Add auto-port dev script for worktree support

- Add scripts/dev.sh that finds available ports for daemon (6767+) and Metro (8081+)
- Runs both services via concurrently with colored output
- Sets PASEO_CORS_ORIGINS dynamically for the Metro port
- Sets EXPO_PUBLIC_DAEMONS to auto-configure app with daemon endpoint
- Add get-port-cli and concurrently as dev dependencies
- Rename npm run dev to use the script, add dev:server for daemon-only
This commit is contained in:
Mohamed Boudra
2026-01-24 15:45:39 +07:00
parent 657644b5e7
commit 1b61fabde5
3 changed files with 607 additions and 1 deletions

View File

@@ -10,7 +10,8 @@
"packages/desktop"
],
"scripts": {
"dev": "NODE_ENV=development tsx packages/server/scripts/dev-runner.ts",
"dev": "./scripts/dev.sh",
"dev:server": "NODE_ENV=development tsx packages/server/scripts/dev-runner.ts",
"dev:app": "npm run start --workspace=@paseo/app",
"dev:website": "npm run dev --workspace=@paseo/website",
"build": "npm run build --workspaces --if-present",
@@ -27,6 +28,8 @@
"postinstall": "patch-package"
},
"devDependencies": {
"concurrently": "^9.2.1",
"get-port-cli": "^3.0.0",
"patch-package": "^8.0.1",
"typescript": "^5.9.3"
},