Repository navigation
feat(cloudflare/email): local send_email stub in dev with dev.remote opt-in - #865
Conversation
|
The way Miniflare and Wrangler handle it, the message is |
|
Yes — logging-by-default with an opt-in for real sends is what we'd want. The catch is that a faithful stub is entirely a In cloudflare-runtime (distilled):
In alchemy:
Happy to implement in that order (runtime PR first, then submodule bump + alchemy wiring) if you're good with the placement and the opt-in name. |
|
Yeah that sounds great! Go ahead - would be happy to review and merge when ready. The one part of your plan that I'd alter is making the option flag |
|
|
|
Runtime half is up: alchemy-run/cloudflare-tools#76 (the |
|
Is this ready to merge @john-royal ? |
|
Docs need to be updated now that the local binding is implemented and remote now defaults to false. After that, good to merge. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…r-aggregating destroy Ports into the LocalProvider.make structure: - make-before-break serveWith (workerd scopes fork from rootScope, closed on cutover / closeWorkerd) from #863 - url/urls/domain Attributes + resolveLocalUrls wildcard-host handling from #977 (local urls no longer carry a trailing slash; tests updated to `${url}/path`) - ALCHEMY_WORKER_NAME env (#860), viteMain root-relative resolution (#796), toRuntimeBinding dev.remote param for send_email (#865) distilled bumped to main (0.30.2). Co-authored-by: Cursor <cursoragent@cursor.com>
Under
alchemy dev, asend_emailbinding used to proxy straight to the live Cloudflare binding, sosend()from a dev loop sent real mail (an OTP flow test made real send attempts). It now defaults to a local stub:send()logs the message'sfrom/to/subjectto the dev console and resolves without delivering. Opt into real sends per binding:SendEmailProps.dev.remotethreads through the Worker's local provider to selectSendEmail.remotevsSendEmail.local(the cloudflare-tools stub keeps theEmailMessageshim, so user code can still construct messages in dev)cloudflare/email/send-and-receive.mdxdocuments the stub and thedev.remoteopt-in;environments/local-development.mdxnotes that side-effect bindings default to local🤖 Generated with Claude Code