refactor(adapters)!: consolidate to a single generic web-standard handler#75
Merged
Conversation
…dler Remove the platform-specific deploy adapters and the file generator in favor of createWebRequestHandler, which runs on any web-standard runtime (Cloudflare Workers, modern Netlify functions, Vercel Edge, Deno, Bun). BREAKING CHANGE: removes createVercelHandler, createNetlifyHandler (and the VercelRequest/VercelResponse/NetlifyEvent/NetlifyContext types), and the file generator (generateAdapterFiles, Platform, GeneratorOptions, GeneratedFile). Kept: createWebRequestHandler (with createCloudflareHandler as a deprecated alias) and createNodeServer/createNodeHandler for local development. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 16, 2026
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.
Follows up #74. Collapses the platform-specific deploy adapters into one generic, web-standard handler.
Why
The deploy adapters were all doing the same thing behind different shapes. Every modern serverless/edge runtime (Cloudflare Workers, modern Netlify functions, Vercel Edge, Deno, Bun) speaks web-standard
Request/Response, so a singlecreateWebRequestHandlercovers them all — the only per-platform difference is the export wrapper, which is a few lines of glue.Breaking changes
Removed:
createVercelHandler(+VercelRequest,VercelResponse)createNetlifyHandler(+NetlifyEvent,NetlifyContext)generateAdapterFiles(+Platform,GeneratorOptions,GeneratedFile)Kept:
createWebRequestHandler— the single deploy handler (pre-loaded data, web-standard)createNodeServer/createNodeHandler— local-dev server (Nodehttp, filesystem)createCloudflareHandler/CloudflareAdapterConfig— deprecated aliases, still exportedMigration
createWebRequestHandlerwith pre-loaded data (import docs from '.../docs.json') on a web-standard runtime (Vercel Edge / modern Netlify functions).generateAdapterFilesusers: scaffolding moves to an AI-directed deploy skill (follow-up).Follow-up
A deploy skill (via the gleanwork
configure-agentsbaseline) will direct an AI to scaffold the per-platform wrapper + config (wrangler.toml,netlify.toml, Vercel Edge), seeded from the templates removed here (recoverable from git history).Verification
typecheck, eslint, build, 65/65 unit tests, and snippets:check all pass.
🤖 Generated with Claude Code