mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 22:32:04 +00:00
Replace Unix-only init.sh with cross-platform init.mjs Node.js script. Changes: - Add init.mjs: Cross-platform Node.js implementation of init.sh - Update package.json: Change dev script from ./init.sh to node init.mjs - Add tree-kill dependency for reliable cross-platform process termination Key features of init.mjs: - Cross-platform port detection (netstat on Windows, lsof on Unix) - Cross-platform process killing using tree-kill package - Uses cross-spawn for reliable npm/npx command execution on Windows - Interactive prompts via Node.js readline module - Colored terminal output (works on modern Windows terminals) - Proper cleanup handlers for Ctrl+C/SIGTERM Bug fix: - Fixed Playwright browser check to run from apps/app directory where @playwright/test is actually installed (was silently failing before) The original init.sh is preserved for backward compatibility.
39 lines
2.0 KiB
JSON
39 lines
2.0 KiB
JSON
{
|
|
"name": "automaker",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"workspaces": [
|
|
"apps/*",
|
|
"libs/*"
|
|
],
|
|
"scripts": {
|
|
"postinstall": "node -e \"const fs=require('fs');if(process.platform==='darwin'){['darwin-arm64','darwin-x64'].forEach(a=>{const p='node_modules/node-pty/prebuilds/'+a+'/spawn-helper';if(fs.existsSync(p))fs.chmodSync(p,0o755)})}\"",
|
|
"dev": "node init.mjs",
|
|
"dev:web": "npm run dev:web --workspace=apps/app",
|
|
"dev:electron": "npm run dev:electron --workspace=apps/app",
|
|
"dev:electron:debug": "npm run dev:electron:debug --workspace=apps/app",
|
|
"dev:electron:wsl": "npm run dev:electron:wsl --workspace=apps/app",
|
|
"dev:electron:wsl:gpu": "npm run dev:electron:wsl:gpu --workspace=apps/app",
|
|
"dev:server": "npm run dev --workspace=apps/server",
|
|
"dev:full": "concurrently \"npm run dev:server\" \"npm run dev:web\"",
|
|
"build": "npm run build --workspace=apps/app",
|
|
"build:server": "npm run build --workspace=apps/server",
|
|
"build:electron": "npm run build:electron --workspace=apps/app",
|
|
"build:electron:win": "npm run build:electron:win --workspace=apps/app",
|
|
"build:electron:mac": "npm run build:electron:mac --workspace=apps/app",
|
|
"build:electron:linux": "npm run build:electron:linux --workspace=apps/app",
|
|
"start": "npm run start --workspace=apps/app",
|
|
"start:server": "npm run start --workspace=apps/server",
|
|
"lint": "npm run lint --workspace=apps/app",
|
|
"test": "npm run test --workspace=apps/app",
|
|
"test:headed": "npm run test:headed --workspace=apps/app",
|
|
"test:server": "npm run test --workspace=apps/server",
|
|
"test:server:coverage": "npm run test:cov --workspace=apps/server",
|
|
"lint:lockfile": "! grep -q 'git+ssh://' package-lock.json || (echo 'Error: package-lock.json contains git+ssh:// URLs. Run: git config --global url.\"https://github.com/\".insteadOf \"git@github.com:\"' && exit 1)"
|
|
},
|
|
"dependencies": {
|
|
"cross-spawn": "^7.0.6",
|
|
"tree-kill": "^1.2.2"
|
|
}
|
|
}
|