fix(scripts): use powershell instead of pwsh and add DesktopOnly mode

- Replace pwsh with powershell for Windows compatibility
- Add -DesktopOnly flag to skip all external services
- Add automatic port 1420 cleanup before starting
- Improve stop command to kill all related processes
- Update package.json scripts for easier access

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-17 09:40:16 +08:00
parent d890fa1858
commit 6c6d21400c
2 changed files with 52 additions and 21 deletions

View File

@@ -11,11 +11,10 @@
"gateway:start": "openfang gateway start",
"gateway:status": "openfang gateway status",
"gateway:doctor": "openfang doctor",
"start": "pwsh -File ./start-all.ps1",
"start:dev": "pwsh -File ./start-all.ps1 -Dev",
"start:no-browser": "pwsh -File ./start-all.ps1 -NoBrowser",
"start:no-gateway": "pwsh -File ./start-all.ps1 -NoGateway",
"start:stop": "pwsh -File ./start-all.ps1 -Stop",
"start": "powershell -ExecutionPolicy Bypass -File ./start-all.ps1",
"start:dev": "powershell -ExecutionPolicy Bypass -File ./start-all.ps1 -Dev",
"start:desktop": "powershell -ExecutionPolicy Bypass -File ./start-all.ps1 -DesktopOnly",
"start:stop": "powershell -ExecutionPolicy Bypass -File ./start-all.ps1 -Stop",
"desktop": "cd desktop && pnpm tauri dev",
"desktop:build": "cd desktop && pnpm tauri build",
"chromedriver": "chromedriver --port=4444"