spawn/packages/cli/package.json
Ahmed Abushagur 1ac0171daf
fix(local): install OrbStack from DMG when Homebrew is missing (#3372)
ensureDocker() on macOS unconditionally shelled out to `brew install
orbstack`, then on failure printed "install OrbStack manually: brew
install orbstack" — circular dead-end for Macs without Homebrew.

Now:
- Probe `which brew`. If present, keep using brew (existing happy path).
- If brew is missing, download the official OrbStack DMG over HTTPS
  from orbstack.dev (arch-aware: arm64 vs amd64), mount it via
  `hdiutil`, copy OrbStack.app into /Applications, and clear the
  quarantine xattr so it launches cleanly.
- If both paths fail, the new error message points users at the
  OrbStack download page (not back at brew).

DMG handling uses tryCatch + sequential cleanup (no try/finally, per
the `lint/plugin` rule in this repo). Adds a test for the brew-missing
fallback and updates the existing brew-present test to account for the
new `which brew` probe.

Bumps version to 1.0.24.
2026-04-29 15:40:21 -07:00

27 lines
696 B
JSON

{
"name": "@openrouter/spawn",
"version": "1.0.27",
"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",
"@daytonaio/sdk": "0.160.0",
"@openrouter/spawn-shared": "workspace:*",
"picocolors": "1.1.1",
"valibot": "1.2.0"
},
"devDependencies": {
"@biomejs/biome": "2.4.3",
"@types/bun": "1.3.8"
}
}