Why. Wiring a binding's config block + Env field (+ class & migrations for DO/Workflow) by hand is the core daily friction — exactly where an Nx generator shines.
Fix. nx g @naxodev/nx-cloudflare:binding --project=w --type=kv|r2|d1|do|queue|workflow|service. Edits wrangler.jsonc, adds the code stub (DO/Workflow/RPC/queue-consumer classes + required [[migrations]] for DO), re-runs wrangler types, emits a matching test. Start with the GA set (KV, R2, D1, Durable Objects, Queues, Workflows, Service/RPC); expand later (Hyperdrive, Vectorize, AI, Browser Rendering).
Depends on: wrangler.jsonc + wrangler types. Effort: M-L · Impact: Very High.
Part of #115.
Why. Wiring a binding's config block +
Envfield (+ class & migrations for DO/Workflow) by hand is the core daily friction — exactly where an Nx generator shines.Fix.
nx g @naxodev/nx-cloudflare:binding --project=w --type=kv|r2|d1|do|queue|workflow|service. Editswrangler.jsonc, adds the code stub (DO/Workflow/RPC/queue-consumer classes + required[[migrations]]for DO), re-runswrangler types, emits a matching test. Start with the GA set (KV, R2, D1, Durable Objects, Queues, Workflows, Service/RPC); expand later (Hyperdrive, Vectorize, AI, Browser Rendering).Depends on: wrangler.jsonc + wrangler types. Effort: M-L · Impact: Very High.
Part of #115.