Files
dohooo__helmor/cloud/scripts/tsconfig.json
Caspian Zhao 339c532bdf fix(team-cloud): bundle the provisioning toolkit so release builds can create teams (P1-1a)
A release install could never create a team — three independent dead ends:
cloud/scripts wasn't bundled, \`bun\` was spawned by bare name (Finder PATH has
none), and wrangler was never locatable (the "Rust passes HELMOR_WRANGLER_BIN"
comment was a lie). The error then pointed at the Advanced-setup panel R5-A
deleted — an infinite loop with no exit.

- stage-vendor: new team-cloud lane (release-gated like cursor-worker) stages
  vendor/team-cloud/ = prebuilt provision-team.mjs + team-containers.mjs
  (bun build --target=node), wrangler.toml + schema.sql + Worker src, and a
  PRUNED wrangler node_modules (keep-the-JS-drop-the-payloads: workerd binary
  ×2 + sharp/@img removed; 189MB → 67MB, every provision verb validated green
  — evidence in .agent-contexts/team-cloud-round6/class1-findings.md F1).
  Integrity asserts fail the build if any provisioning file is missing, the
  prune regressed, a wrong-arch esbuild slipped in, or the pruned tree stops
  loading (wrangler --version smoke).
- commands/team_cloud: new tooling module resolves script + runtime — dev:
  repo .ts under PATH bun (unchanged); release: staged .mjs under the vendored
  Node (zero PATH dependency). Truthful errors, no more Advanced-setup ghost.
- provision-team.ts/team-containers.ts: wrangler self-resolved next to the
  script and run under process.execPath (the .bin shim's \`env node\` shebang
  can't work from Finder); wrangler cwd moved to a writable temp dir (release
  payload lives in read-only Resources); schema path made absolute; login
  detection fixed to parse whoami OUTPUT (wrangler 4.100 exits 0 when logged
  out, so fresh machines never got the browser login).
- create-flow: error phase gains Copy details next to Try again.
- cloud/scripts now typechecked (tsc -p scripts, node types only) via cloud's
  typecheck chain; bun-only local-docker-team.ts stays excluded by design.
2026-07-10 15:40:53 -07:00

26 lines
1.0 KiB
JSON

{
// Typecheck for cloud/scripts (chained from cloud's `bun run typecheck`).
// Separate from ../tsconfig.json on purpose: these scripts run under Node
// (release: the vendored Node in the app bundle) / bun (dev), so they get
// "node" types — NOT @cloudflare/workers-types, and NOT bun types, so an
// accidental Bun-only API in the release-critical scripts fails right here.
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"lib": ["ES2022"],
"types": ["node"],
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["./**/*.ts"],
// local-docker-team.ts is a bun-runtime dev harness (uses the `Bun` global
// and imports ../src/local-dev/*, which needs workers-types) — checking it
// here would force bun+workers types onto every script and defeat the
// node-only guarantee above. It stays outside the type gate, as before.
"exclude": ["./local-docker-team.ts"]
}