feat(dev-server): 添加开发模式 HTTP/WebSocket 服务器
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
功能: - 创建 dev_server.rs 模块,提供 HTTP/WebSocket API - 使用 feature flag \dev-server\ 控制编译 - 仅绑定 localhost:50051,安全限制 CORS - 生产构建不包含此模块 使用方式: - pnpm tauri:dev:web - 启动带开发服务器的 Tauri - pnpm tauri:dev - 常规开发模式(无服务器) 安全: - 仅 localhost 绑定 - CORS 限制为 Vite 开发端口 - 通过 feature flag 完全移除生产代码
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
"prepare:tauri-tools:dry-run": "node scripts/preseed-tauri-tools.mjs --dry-run",
|
||||
"tauri": "tauri",
|
||||
"tauri:dev": "tauri dev",
|
||||
"tauri:dev:web": "tauri dev --features dev-server",
|
||||
"tauri:build": "tauri build",
|
||||
"tauri:build:bundled": "pnpm prepare:openfang-runtime && node scripts/tauri-build-bundled.mjs",
|
||||
"tauri:build:bundled:debug": "pnpm prepare:openfang-runtime && node scripts/tauri-build-bundled.mjs --debug",
|
||||
|
||||
Reference in New Issue
Block a user