fix(agent): auto-detect wrangler config dir for monorepo CF Workers deploys #27

Merged
gmackie merged 1 commit from fix/agent-wrangler-monorepo into main 2026-06-26 05:07:25 +00:00
Owner

Part 2 of fixing deploy confusion. The CF Workers agent deploy ran build + npx wrangler deploy from the repo root unless a deployment target explicitly set appDir. Monorepos keep their wrangler config in a subdir (linear-clone: apps/web/wrangler.jsonc), so wrangler failed with Could not locate a wrangler.toml and the deploy errored opaquely.

When appDir is unset, detectWranglerDir now scans the repo root then apps/* and packages/* for wrangler.{toml,jsonc,json} and deploys from there. Explicit appDir still wins. 4 unit tests; agent builds + tests pass.

🤖 Generated with Claude Code

Part 2 of fixing deploy confusion. The CF Workers agent deploy ran build + `npx wrangler deploy` from the repo root unless a deployment target explicitly set `appDir`. Monorepos keep their wrangler config in a subdir (linear-clone: `apps/web/wrangler.jsonc`), so wrangler failed with `Could not locate a wrangler.toml` and the deploy errored opaquely. When `appDir` is unset, `detectWranglerDir` now scans the repo root then `apps/*` and `packages/*` for `wrangler.{toml,jsonc,json}` and deploys from there. Explicit `appDir` still wins. 4 unit tests; agent builds + tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(agent): auto-detect wrangler config dir for CF Workers monorepo deploys
Some checks failed
AI Code Review / review (pull_request) Failing after 12s
CI / ci (pull_request) Successful in 18m4s
a454281124
The CF Workers deploy ran build + wrangler from the repo root unless a target
explicitly set appDir, so monorepos (e.g. apps/web/wrangler.jsonc) failed with
'Could not locate a wrangler.toml'. When appDir is unset, scan the repo root
and apps/*/packages/* for a wrangler config and deploy from there.
Sign in to join this conversation.
No description provided.