Repository navigation
build: remove wrangler.toml, cloudflare.config.ts is the only Worker config - #21
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Worker config is moving entirely to
cloudflare.config.ts(thecfCLI's config format), so the Wrangler config files are removed. All fourwrangler.tomlfiles (api, auth, admin, frontend) are deleted.cloudflare.config.ts, pluswrangler.config.tsfor build settings, is now the only Worker config. There's nothing left to keep "mirrored in both files".cf deployand Workers Builds already readcloudflare.config.ts, so deploys are unchanged. The toml was only still around for local dev and local D1 access. Those now work like this:Local dev (
pnpm dev). api/auth/admin runwrangler dev --experimental-new-config --port <n> --persist-to ../../.wrangler/state. That flag makeswrangler devloadcloudflare.config.ts+wrangler.config.ts(and.dev.vars) directly, and it keeps--persist-to, so all workers still share one state dir (the api reads auth's DB viaAUTH_DB). Plaincf devstill can't be used:cfrejects--persist-tofordev.cf-wrangler devin the pinned wrangler 4.156 hard-codes no persist dir. Wrangler 4.161 fixes that, but it's younger than this repo's 7-dayminimumReleaseAge, so I didn't take it. Switching the dev scripts tocf dev -- --port … --persist-to …is a follow-up once 4.161+ ages in.Local D1 SQL.
wrangler d1 execute <db> --localcan only find a database through a Wrangler config file, andcf d1 query --localhas no local implementation. The newscripts/d1-local.mjs <main|auth> "<sql>"(or--file) runs SQL through the running api dev server's Local Explorer API (/cdn-cgi/local/explorer/api/d1/database/<id>/raw), against the same SQLite files the dev servers use. The e2e teardown,collab/ink-features/profile-cardspecs (viae2e/d1Local.ts), the apisizeCapintegration test andbackfill-logo-keys.tsuse it. Remote commands (wrangler d1 execute --remote,wrangler r2 object) work without a config file and are unchanged.Docs updated:
CLAUDE.md,CONTRIBUTING.md,README.md,docs/oauth,memories/, and thewrangler.config.tsheaders.Verification (local)
pnpm typecheckpasses. Unit tests (CI's set + mcp): 2,370 passed.pnpm build,cf build(api/auth/admin) andcf-wrangler build(frontend) all succeed.Real
pnpm dev: all four servers up. Every binding shows as before, andDOC_COLLAB+AUTHare[connected]. Register →/meworks through the vite proxy → api → auth service binding →AUTH_DB.api integration suites (
pnpm test:integration, including the collabsizeCaptest that now writes D1 through the helper): 71/71 passed.Playwright e2e: 128 passed, 35 failed. All 35 fail identically in Chromium and Firefox, and they come from frontend UI drift already on
main, not this change (no frontend source is touched here):getByRole('button', { name: 'Sign in' })now matches two buttons because of the passkey button (feat(auth): sign in with just a passkey, no email or password #18).These need their own fix. The specs that depend on the new D1 helper (Ink grant via the auth DB) pass, and the teardown leaves no e2e rows behind.