spawn/test/fixtures/fly
A 2ef621cc69
refactor: convert fly/ cloud provider from bash to TypeScript (#1601) (#1602)
Replace fly/lib/common.sh (741 lines of bash) with a TypeScript
implementation using Bun runtime. The fly/ provider was the most
complex bash code in the project — recent fixes (#1597, #1599, #1600)
highlight the pain of debugging HTTP calls, JSON parsing, and multi-step
auth flows in shell.

New TypeScript modules:
- fly/lib/ui.ts — logging, prompts, validation (zero deps)
- fly/lib/fly.ts — API client (fetch), auth chain, org listing, provisioning
- fly/lib/oauth.ts — OpenRouter OAuth via Bun.serve(), key management
- fly/lib/agents.ts — typed agent configs for all 6 agents
- fly/main.ts — orchestrator entry point

Agent .sh files become thin shims (~30 lines) that install bun if needed,
download TS sources for curl|bash execution, and delegate to main.ts.

Test coverage:
- 44 TypeScript unit tests (bun test) for pure logic
- 4 fly failure-mode tests (mock.sh) for error scenarios
- All existing test suites pass (110 run.sh, 76 mock.sh)

Co-authored-by: lab <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 10:41:34 -08:00
..
_api_assertions.sh refactor: convert fly/ cloud provider from bash to TypeScript (#1601) (#1602) 2026-02-21 10:41:34 -08:00
_env.sh fix: address architectural brittleness in Fly.io integration (issue #1581) (#1585) 2026-02-21 07:19:23 -08:00
_metadata.json test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00
apps.json test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00
create_server.json test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00