Skip to content

Commit d854f2b

Browse files
committed
refactor runtime lookup and delegate middleware matching to @next/routing
1 parent d1cf513 commit d854f2b

6 files changed

Lines changed: 1070 additions & 1873 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,16 @@ The adapter hooks into Next.js via the `onBuildComplete` callback. It takes the
7373
```
7474
bun-dist/
7575
server.js # entry point (Bun.serve)
76-
deployment-manifest.json # routes, functions, assets, config
76+
deployment-manifest.json # routes, functions, assets, config + lookup tables
7777
cache.db # SQLite — prerender + image cache
7878
bundle/ # function artifacts (route handlers)
7979
static/ # static assets (/_next/static + public/)
80-
runtime/ # router, cache, invokers
80+
runtime/ # cache/runtime helpers
8181
node_modules/ # traced dependencies
8282
```
8383

8484
Functions are consolidated into a shared `bundle/` directory with deduplicated assets. Prerender seeds (SSG pages) are written into the SQLite cache so they're served immediately on first request.
85+
The deployment manifest includes precomputed pathname/output/source-page lookup maps so request-time routing does less dynamic resolution work.
8586

8687
### Runtime
8788

@@ -124,19 +125,18 @@ src/
124125
staging.ts # stages assets, functions, prerender seeds
125126
types.ts # adapter types
126127
runtime/
127-
router.ts # request router (createRouterRuntime)
128-
isr.ts # prerender cache logic + types
129-
image.ts # image optimization cache
128+
server.ts # main HTTP runtime implementation
130129
sqlite-cache.ts # SQLite cache stores
131-
function-invoker.ts # dispatches to node/edge invokers
132-
function-invoker-node.ts # Node.js function runtime
133-
function-invoker-edge.ts # Edge function runtime + middleware
134-
function-invoker-shared.ts # shared invoker utilities
135-
static.ts # static file serving
136-
revalidate.ts # background revalidation queue
137-
tag-manifest-bridge.ts # syncs Next.js revalidateTag to SQLite
138-
next-routing.ts # lazy-loads @next/routing
139-
types.ts # runtime types
130+
incremental-cache-handler.ts
131+
incremental-cache-handler-http.ts
132+
cache-handler.ts
133+
cache-handler-http.ts
134+
cache-http-client.ts
135+
cache-http-server.ts
136+
cache-http-protocol.ts
137+
cache-store.ts
138+
isr.ts
139+
binary.ts
140140
```
141141

142142
## Development

0 commit comments

Comments
 (0)