spawn/packages/cli/package.json
Ahmed Abushagur bdcde7bfc4
fix: use spawnSync for script execution to eliminate fd 0 competition (#1942)
The cmdRun path (the main user flow) was still using async
child_process.spawn for script execution. This left Bun's event loop
running while SSH (a grandchild process inside the bash script)
competed for fd 0 input bytes — causing intermittent keystroke loss.

Switch spawnBash to use spawnSync, which blocks the event loop entirely
and gives the child process exclusive terminal access. This matches
what we already did for runInteractiveCommand in #1939.

Also removes dead spawnCalls tracking code from cmdrun-happy-path test.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 02:50:59 -05:00

26 lines
664 B
JSON

{
"name": "@openrouter/spawn",
"version": "0.10.19",
"type": "module",
"bin": {
"spawn": "cli.js"
},
"scripts": {
"dev": "bun run src/index.ts",
"build": "bun build src/index.ts --outfile cli.js --target bun --minify --packages bundle",
"compile": "bun build src/index.ts --compile --outfile spawn",
"lint": "biome lint src/",
"test": "bun test",
"test:watch": "bun test --watch"
},
"dependencies": {
"@clack/prompts": "1.0.0",
"@openrouter/spawn-shared": "workspace:*",
"picocolors": "1.1.1",
"valibot": "1.2.0"
},
"devDependencies": {
"@biomejs/biome": "2.4.3",
"@types/bun": "1.3.8"
}
}