+ sveltekit, cloudflare runtime, --quiet flag#5
Conversation
raiden076
commented
Apr 28, 2026
- Add support for sveltekit
- Add support for cloudflare runtime
- Minor restructure
…kInfo, SchemaSource, Config §V1,V2,V5,V14,V15,V16 §I.adapter,I.info
…dDirsNamed, DEFAULT_SKIP_DIRS, ROOT, TODAY (C7)
- Create src/generators/schema.ts: parsePrismaSchema, parseDrizzleSchema, generateSchema (framework-agnostic per V4) - Add parseWranglerBindings: JSONC/TOML → binding metadata (V11) - generateSchema emits bindings comment in schema.md header when present - Add src/lib/server/db to drizzle detection paths (V10) - Update monolith to import generateSchema from generators - Add 12 unit tests covering Prisma parse, Drizzle parse, wrangler parse, and generateSchema output with/without bindings - Install vitest for test runner
- Created src/adapters/nextjs.ts implementing FrameworkAdapter - detect(): next.config.* → app/pages router detection, component dirs - generateRoutes(): API routes for both app & pages router - generatePages(): page tree with [client]/[server] tags - generateComponents(): component index with UI primitive filtering - pathToRoute() adapter-owned per V3 - Schema/lib detection left for core (T6) per V4/C18
- Adapter registry: loops adapters, first non-null detect wins (V1) - Core imports adapters by name — new framework = new file + one import (V2) - Schema source detection (prisma/drizzle) in core, framework-agnostic (V4,V18) - Lib dir detection in core, framework-agnostic (V18) - Main generation loop: adapter generators + framework-agnostic generators - CLI output formatting - Added @types/node for clean type-check
…V9,V12,V13,V15,V16
…Next.js unchanged §V5
METHOD_REGEX only matched `export function GET` style. Added match for `export const GET: RequestHandler = async` (const-arrow form). - Fix regex in sveltekit adapter generateRoutes - Add const-export fixture (+server.ts in api/items) - Add test for const-export detection - Backprop: V18 invariant, B1 bug entry in SPEC.md
Suppresses all console.log output. Errors and warnings still visible. Non-zero exit on failure preserved.
Original PR by @raiden076 with three maintainer patches applied on top: - exclude test files from npm tarball - fix [[optional]] SvelteKit route params - add Next.js pipeline integration snapshot test 19 commits total. 53/53 tests passing. Zero Next.js regressions.
|
Merged as part of master, lands as v1.3.0. Thank you for the careful work, @raiden076. The per-task commit discipline (T1 through T12 with SPEC invariant references, plus the B1 fix loop) made this very easy to review. I applied three small patches on top before the final merge commit:
All 53 tests pass. Two SvelteKit limitations I noticed but haven't fixed (good follow-up issues if you want them): matcher syntax Tag v1.3.0 and npm publish landing shortly. Thanks again. This set up the adapter architecture cleanly and made adding the next framework (Remix? Astro?) a single-file affair. |