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 完全移除生产代码
90 lines
3.5 KiB
JSON
90 lines
3.5 KiB
JSON
{
|
|
"name": "desktop",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"preview": "vite preview",
|
|
"prepare:openclaw-runtime": "node scripts/prepare-openclaw-runtime.mjs",
|
|
"prepare:openclaw-runtime:dry-run": "node scripts/prepare-openclaw-runtime.mjs --dry-run",
|
|
"prepare:openfang-runtime": "node scripts/prepare-openfang-runtime.mjs",
|
|
"prepare:openfang-runtime:dry-run": "node scripts/prepare-openfang-runtime.mjs --dry-run",
|
|
"prepare:tauri-tools": "node scripts/preseed-tauri-tools.mjs",
|
|
"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",
|
|
"tauri:build:nsis:debug": "pnpm prepare:openfang-runtime && node scripts/tauri-build-bundled.mjs --debug --bundles nsis",
|
|
"tauri:build:msi:debug": "pnpm prepare:openfang-runtime && node scripts/tauri-build-bundled.mjs --debug --bundles msi",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:e2e": "playwright test --project chromium --config=tests/e2e/playwright.config.ts",
|
|
"test:e2e:ui": "playwright test --project chromium-ui --config=tests/e2e/playwright.config.ts --grep 'UI'",
|
|
"test:e2e:headed": "playwright test --project chromium-headed --headed",
|
|
"test:tauri": "playwright test --config=tests/e2e/playwright.tauri.config.ts",
|
|
"test:tauri:headed": "playwright test --config=tests/e2e/playwright.tauri.config.ts --headed",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint src/",
|
|
"lint:fix": "eslint src/ --fix",
|
|
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
|
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,css}\""
|
|
},
|
|
"dependencies": {
|
|
"@dagrejs/dagre": "^3.0.0",
|
|
"@tauri-apps/api": "^2",
|
|
"@tauri-apps/plugin-opener": "^2",
|
|
"@xstate/react": "^6.1.0",
|
|
"@xyflow/react": "^12.10.1",
|
|
"clsx": "^2.1.1",
|
|
"dagre": "^0.8.5",
|
|
"date-fns": "^4.1.0",
|
|
"framer-motion": "^12.36.0",
|
|
"lucide-react": "^0.577.0",
|
|
"react": "^19.1.0",
|
|
"react-dom": "^19.1.0",
|
|
"react-window": "^2.2.7",
|
|
"smol-toml": "^1.6.0",
|
|
"tailwind-merge": "^3.5.0",
|
|
"tweetnacl": "^1.0.3",
|
|
"uuid": "^11.0.0",
|
|
"valtio": "^2.3.1",
|
|
"xstate": "^5.28.0",
|
|
"zustand": "^5.0.11"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@playwright/test": "^1.58.2",
|
|
"@tailwindcss/vite": "^4.2.1",
|
|
"@tauri-apps/cli": "^2",
|
|
"@testing-library/jest-dom": "6.6.3",
|
|
"@testing-library/react": "16.1.0",
|
|
"@types/js-yaml": "^4.0.9",
|
|
"@types/react": "^19.1.8",
|
|
"@types/react-dom": "^19.1.6",
|
|
"@types/react-window": "^2.0.0",
|
|
"@types/uuid": "^10.0.0",
|
|
"@vitejs/plugin-react": "^4.6.0",
|
|
"@vitest/coverage-v8": "2.1.8",
|
|
"autoprefixer": "^10.4.27",
|
|
"eslint": "^10.1.0",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
"jsdom": "25.0.1",
|
|
"playwright": "^1.58.2",
|
|
"postcss": "^8.5.8",
|
|
"prettier": "^3.8.1",
|
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
"tailwindcss": "^4.2.1",
|
|
"typescript": "~5.8.3",
|
|
"typescript-eslint": "^8.57.2",
|
|
"vite": "^7.0.4",
|
|
"vitest": "2.1.8"
|
|
}
|
|
}
|