Skip to content

feat(opennext): experimental opennext/workers support#382

Open
theuargb wants to merge 2 commits into
keinsaasforever:mainfrom
theuargb:feat-opennext-experimental
Open

feat(opennext): experimental opennext/workers support#382
theuargb wants to merge 2 commits into
keinsaasforever:mainfrom
theuargb:feat-opennext-experimental

Conversation

@theuargb

@theuargb theuargb commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Adds a Cloudflare Workers/OpenNext deployment path while keeping the existing Node deployment path usable.

What Changed

  • Added OpenNext Cloudflare config, Wrangler config, worker build/deploy scripts, static asset headers, and local worker env example.
  • Upgraded Next to 16.2.10 to match current @opennextjs/cloudflare support.
  • Added Hyperdrive-aware Postgres connection handling for Workers.
  • Added pg-cloudflare and tracing config so pg bundles correctly for Workers.
  • Kept normal Node storage options, but forces Workers to use S3-compatible storage for R2.
  • Updated S3 storage download handling for both Node streams and Worker/Web stream bodies.
  • Preserved stdio/file-based MCP for Node deployments, while Workers automatically use remote-only MCP and hide/reject stdio configs.
  • Moved the auth gate from Next 16 proxy.ts to middleware.ts because OpenNext Cloudflare cannot run Node proxy yet.
  • Skips startup migrations and eager MCP init on Workers; Node behavior remains.
  • Added guards for Node-only APIs like process.on() and timer .unref().

Notes

Worker deploy still needs real Cloudflare values:

  • Replace Hyperdrive ID in wrangler.jsonc.
  • Configure R2 S3 API env/secrets.
  • Set production auth/base URL secrets.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the cgoinglove's projects Team on Vercel.

A member of the Team first needs to authorize it.

@theuargb theuargb changed the title feat(opennext): experimental opennext support feat(opennext): experimental opennext/workers support Jul 5, 2026
@theuargb

theuargb commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

now requires #383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant