@timber-js/app 0.2.0-alpha.2 → 0.2.0-alpha.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/agent-skill.md +346 -0
- package/dist/_chunks/actions-d1hCqnU3.js +345 -0
- package/dist/_chunks/actions-d1hCqnU3.js.map +1 -0
- package/dist/_chunks/als-registry-C6kcfprT.js +41 -0
- package/dist/_chunks/als-registry-C6kcfprT.js.map +1 -0
- package/dist/_chunks/als-slots-BEEIPKYm.js +26 -0
- package/dist/_chunks/als-slots-BEEIPKYm.js.map +1 -0
- package/dist/_chunks/base-path-DaQrzbez.js +80 -0
- package/dist/_chunks/base-path-DaQrzbez.js.map +1 -0
- package/dist/_chunks/build-manifest-DTmSGLRz.js +135 -0
- package/dist/_chunks/build-manifest-DTmSGLRz.js.map +1 -0
- package/dist/_chunks/build-output-helper-9dqCv1pZ.js +370 -0
- package/dist/_chunks/build-output-helper-9dqCv1pZ.js.map +1 -0
- package/dist/_chunks/cache-api-ByagcC-J.js +1149 -0
- package/dist/_chunks/cache-api-ByagcC-J.js.map +1 -0
- package/dist/_chunks/canonicalize-CgHoscYO.js +66 -0
- package/dist/_chunks/canonicalize-CgHoscYO.js.map +1 -0
- package/dist/_chunks/chains-Bpb0W4ax.js +412 -0
- package/dist/_chunks/chains-Bpb0W4ax.js.map +1 -0
- package/dist/_chunks/cli-check-D6VolrDV.js +293 -0
- package/dist/_chunks/cli-check-D6VolrDV.js.map +1 -0
- package/dist/_chunks/cli-schema-sync-D6rO-VcS.js +299 -0
- package/dist/_chunks/cli-schema-sync-D6rO-VcS.js.map +1 -0
- package/dist/_chunks/cloudflare-BFb__LYG.js +1290 -0
- package/dist/_chunks/cloudflare-BFb__LYG.js.map +1 -0
- package/dist/_chunks/codec-registry-oOUxugz3.js +21 -0
- package/dist/_chunks/codec-registry-oOUxugz3.js.map +1 -0
- package/dist/_chunks/convention-lint-fRkwVwEH.js +893 -0
- package/dist/_chunks/convention-lint-fRkwVwEH.js.map +1 -0
- package/dist/_chunks/dist-DtrJyBbw.js +386 -0
- package/dist/_chunks/dist-DtrJyBbw.js.map +1 -0
- package/dist/_chunks/error-boundary-BfPHZjm0.js +1050 -0
- package/dist/_chunks/error-boundary-BfPHZjm0.js.map +1 -0
- package/dist/_chunks/fast-hash-C-tVYrLb.js +41 -0
- package/dist/_chunks/fast-hash-C-tVYrLb.js.map +1 -0
- package/dist/_chunks/file-cache-Dw6BJPG7.js +458 -0
- package/dist/_chunks/file-cache-Dw6BJPG7.js.map +1 -0
- package/dist/_chunks/format-BKclgVbk.js +14 -0
- package/dist/_chunks/format-BKclgVbk.js.map +1 -0
- package/dist/_chunks/fs-identity-D7vb6GdI.js +208 -0
- package/dist/_chunks/fs-identity-D7vb6GdI.js.map +1 -0
- package/dist/_chunks/graph-cache-CP4GEmf9.js +304 -0
- package/dist/_chunks/graph-cache-CP4GEmf9.js.map +1 -0
- package/dist/_chunks/href-validation-BIrxavIy.js +213 -0
- package/dist/_chunks/href-validation-BIrxavIy.js.map +1 -0
- package/dist/_chunks/json-lossy-check-ClNvBM_3.js +63 -0
- package/dist/_chunks/json-lossy-check-ClNvBM_3.js.map +1 -0
- package/dist/_chunks/live-graph-D_2D32Ad.js +150 -0
- package/dist/_chunks/live-graph-D_2D32Ad.js.map +1 -0
- package/dist/_chunks/logger-uLBuGKDI.js +1484 -0
- package/dist/_chunks/logger-uLBuGKDI.js.map +1 -0
- package/dist/_chunks/navigation-context-D0TU0Jog.js +135 -0
- package/dist/_chunks/navigation-context-D0TU0Jog.js.map +1 -0
- package/dist/_chunks/navigation-root-mHSK9psY.js +126 -0
- package/dist/_chunks/navigation-root-mHSK9psY.js.map +1 -0
- package/dist/_chunks/param-value-C8TNYchQ.js +66 -0
- package/dist/_chunks/param-value-C8TNYchQ.js.map +1 -0
- package/dist/_chunks/plugin-context-8idfR3UZ.js +321 -0
- package/dist/_chunks/plugin-context-8idfR3UZ.js.map +1 -0
- package/dist/_chunks/poison-rules-DoEhbqaY.js +110 -0
- package/dist/_chunks/poison-rules-DoEhbqaY.js.map +1 -0
- package/dist/_chunks/poison-scan-Bm9Yyqk9.js +101 -0
- package/dist/_chunks/poison-scan-Bm9Yyqk9.js.map +1 -0
- package/dist/_chunks/purge-store-Byr8XOjU.js +14 -0
- package/dist/_chunks/purge-store-Byr8XOjU.js.map +1 -0
- package/dist/_chunks/resolve-schema-CBR6Lm4i.js +50 -0
- package/dist/_chunks/resolve-schema-CBR6Lm4i.js.map +1 -0
- package/dist/_chunks/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/_chunks/rsc-cache-key-ClUiXQnK.js +243 -0
- package/dist/_chunks/rsc-cache-key-ClUiXQnK.js.map +1 -0
- package/dist/_chunks/rsc-media-type-DDc7duTD.js +61 -0
- package/dist/_chunks/rsc-media-type-DDc7duTD.js.map +1 -0
- package/dist/_chunks/rsc-payload-path-B_LBodc2.js +48 -0
- package/dist/_chunks/rsc-payload-path-B_LBodc2.js.map +1 -0
- package/dist/_chunks/scan-BoP17W3w.js +140 -0
- package/dist/_chunks/scan-BoP17W3w.js.map +1 -0
- package/dist/_chunks/scanner-AiazgH_f.js +1771 -0
- package/dist/_chunks/scanner-AiazgH_f.js.map +1 -0
- package/dist/_chunks/schema-bridge-C83xa9lT.js +199 -0
- package/dist/_chunks/schema-bridge-C83xa9lT.js.map +1 -0
- package/dist/_chunks/segment-classify-C539Pa2O.js +197 -0
- package/dist/_chunks/segment-classify-C539Pa2O.js.map +1 -0
- package/dist/_chunks/segment-context-D9_89u34.js +34 -0
- package/dist/_chunks/segment-context-D9_89u34.js.map +1 -0
- package/dist/_chunks/segment-keys-lqtdookO.js +256 -0
- package/dist/_chunks/segment-keys-lqtdookO.js.map +1 -0
- package/dist/_chunks/singleflight-2lUWfcAk.js +54 -0
- package/dist/_chunks/singleflight-2lUWfcAk.js.map +1 -0
- package/dist/_chunks/sizeof-lXffQ1Vr.js +35 -0
- package/dist/_chunks/sizeof-lXffQ1Vr.js.map +1 -0
- package/dist/_chunks/{ssr-data-DLnbYpj1.js → ssr-data-D6T6Y3ef.js} +3 -31
- package/dist/_chunks/ssr-data-D6T6Y3ef.js.map +1 -0
- package/dist/_chunks/state-FippDgxN.js +52 -0
- package/dist/_chunks/state-FippDgxN.js.map +1 -0
- package/dist/_chunks/status-page-marker-DwQBrLBz.js +496 -0
- package/dist/_chunks/status-page-marker-DwQBrLBz.js.map +1 -0
- package/dist/_chunks/use-query-states-I3JMng6J.js +226 -0
- package/dist/_chunks/use-query-states-I3JMng6J.js.map +1 -0
- package/dist/_chunks/walkers-B6XUtmqK.js +144 -0
- package/dist/_chunks/walkers-B6XUtmqK.js.map +1 -0
- package/dist/adapters/build-output-helper.d.ts +72 -0
- package/dist/adapters/build-output-helper.d.ts.map +1 -0
- package/dist/adapters/cloudflare-dev.d.ts +109 -0
- package/dist/adapters/cloudflare-dev.d.ts.map +1 -0
- package/dist/adapters/cloudflare-dev.js +74 -0
- package/dist/adapters/cloudflare-dev.js.map +1 -0
- package/dist/adapters/cloudflare-kv-cache.d.ts +65 -0
- package/dist/adapters/cloudflare-kv-cache.d.ts.map +1 -0
- package/dist/adapters/cloudflare-kv-cache.js +123 -0
- package/dist/adapters/cloudflare-kv-cache.js.map +1 -0
- package/dist/adapters/cloudflare.d.ts +200 -22
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js +2 -188
- package/dist/adapters/compress-module.d.ts +17 -4
- package/dist/adapters/compress-module.d.ts.map +1 -1
- package/dist/adapters/fs-identity.d.ts +64 -0
- package/dist/adapters/fs-identity.d.ts.map +1 -0
- package/dist/adapters/nitro-presets.d.ts +37 -0
- package/dist/adapters/nitro-presets.d.ts.map +1 -0
- package/dist/adapters/nitro-preview.d.ts +32 -0
- package/dist/adapters/nitro-preview.d.ts.map +1 -0
- package/dist/adapters/nitro.d.ts +82 -37
- package/dist/adapters/nitro.d.ts.map +1 -1
- package/dist/adapters/nitro.js +457 -288
- package/dist/adapters/nitro.js.map +1 -1
- package/dist/adapters/shared.d.ts +62 -0
- package/dist/adapters/shared.d.ts.map +1 -0
- package/dist/adapters/types.d.ts +28 -6
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/analyze/chains.d.ts +124 -0
- package/dist/analyze/chains.d.ts.map +1 -0
- package/dist/analyze/classify.d.ts +150 -0
- package/dist/analyze/classify.d.ts.map +1 -0
- package/dist/analyze/crawl-entry.d.ts +17 -0
- package/dist/analyze/crawl-entry.d.ts.map +1 -0
- package/dist/analyze/crawl-entry.js +313 -0
- package/dist/analyze/crawl-entry.js.map +1 -0
- package/dist/analyze/crawl.d.ts +134 -0
- package/dist/analyze/crawl.d.ts.map +1 -0
- package/dist/analyze/graph-cache.d.ts +104 -0
- package/dist/analyze/graph-cache.d.ts.map +1 -0
- package/dist/analyze/graph-command.d.ts +43 -0
- package/dist/analyze/graph-command.d.ts.map +1 -0
- package/dist/analyze/graph-command.js +472 -0
- package/dist/analyze/graph-command.js.map +1 -0
- package/dist/analyze/live-graph.d.ts +81 -0
- package/dist/analyze/live-graph.d.ts.map +1 -0
- package/dist/analyze/poison-rules.d.ts +72 -0
- package/dist/analyze/poison-rules.d.ts.map +1 -0
- package/dist/analyze/poison-scan.d.ts +48 -0
- package/dist/analyze/poison-scan.d.ts.map +1 -0
- package/dist/analyze/scan.d.ts +73 -0
- package/dist/analyze/scan.d.ts.map +1 -0
- package/dist/cache/cache-api.d.ts +48 -0
- package/dist/cache/cache-api.d.ts.map +1 -0
- package/dist/cache/fast-hash.d.ts +27 -0
- package/dist/cache/fast-hash.d.ts.map +1 -0
- package/dist/cache/handler-store.d.ts +33 -0
- package/dist/cache/handler-store.d.ts.map +1 -0
- package/dist/cache/index.d.ts +32 -9
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +3 -284
- package/dist/cache/invalidation-epoch.d.ts +43 -0
- package/dist/cache/invalidation-epoch.d.ts.map +1 -0
- package/dist/cache/json-lossy-check.d.ts +11 -0
- package/dist/cache/json-lossy-check.d.ts.map +1 -0
- package/dist/cache/redis-handler.d.ts +141 -9
- package/dist/cache/redis-handler.d.ts.map +1 -1
- package/dist/cache/singleflight.d.ts +21 -2
- package/dist/cache/singleflight.d.ts.map +1 -1
- package/dist/cache/sizeof.d.ts +22 -0
- package/dist/cache/sizeof.d.ts.map +1 -0
- package/dist/cache/stable-stringify.d.ts +9 -0
- package/dist/cache/stable-stringify.d.ts.map +1 -1
- package/dist/cache/store.d.ts +53 -0
- package/dist/cache/store.d.ts.map +1 -0
- package/dist/cache/stores/cloudflare-kv.d.ts +38 -0
- package/dist/cache/stores/cloudflare-kv.d.ts.map +1 -0
- package/dist/cache/stores/cloudflare-kv.js +29 -0
- package/dist/cache/stores/cloudflare-kv.js.map +1 -0
- package/dist/cache/stores/memory.d.ts +42 -0
- package/dist/cache/stores/memory.d.ts.map +1 -0
- package/dist/cache/stores/memory.js +90 -0
- package/dist/cache/stores/memory.js.map +1 -0
- package/dist/cache/stores/redis.d.ts +69 -0
- package/dist/cache/stores/redis.d.ts.map +1 -0
- package/dist/cache/stores/redis.js +35 -0
- package/dist/cache/stores/redis.js.map +1 -0
- package/dist/cache/stores/vercel.d.ts +36 -0
- package/dist/cache/stores/vercel.d.ts.map +1 -0
- package/dist/cache/stores/vercel.js +33 -0
- package/dist/cache/stores/vercel.js.map +1 -0
- package/dist/cache/tag-aware-handler.d.ts +52 -0
- package/dist/cache/tag-aware-handler.d.ts.map +1 -0
- package/dist/cache/timber-cache.d.ts +21 -11
- package/dist/cache/timber-cache.d.ts.map +1 -1
- package/dist/cdn/cloudflare-purge.d.ts +23 -0
- package/dist/cdn/cloudflare-purge.d.ts.map +1 -0
- package/dist/cdn/cloudflare-purge.js +30 -0
- package/dist/cdn/cloudflare-purge.js.map +1 -0
- package/dist/cdn/fastly-purge.d.ts +25 -0
- package/dist/cdn/fastly-purge.d.ts.map +1 -0
- package/dist/cdn/fastly-purge.js +33 -0
- package/dist/cdn/fastly-purge.js.map +1 -0
- package/dist/cdn/headers.d.ts +97 -0
- package/dist/cdn/headers.d.ts.map +1 -0
- package/dist/cdn/index.d.ts +5 -0
- package/dist/cdn/index.d.ts.map +1 -0
- package/dist/cdn/index.js +94 -0
- package/dist/cdn/index.js.map +1 -0
- package/dist/cdn/purge-store.d.ts +23 -0
- package/dist/cdn/purge-store.d.ts.map +1 -0
- package/dist/cdn/workers-cache-purge.d.ts +20 -0
- package/dist/cdn/workers-cache-purge.d.ts.map +1 -0
- package/dist/cdn/workers-cache-purge.js +35 -0
- package/dist/cdn/workers-cache-purge.js.map +1 -0
- package/dist/cli-check.d.ts +163 -0
- package/dist/cli-check.d.ts.map +1 -0
- package/dist/cli-schema-sync.d.ts +59 -0
- package/dist/cli-schema-sync.d.ts.map +1 -0
- package/dist/cli.d.ts +75 -8
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +175 -47
- package/dist/cli.js.map +1 -1
- package/dist/client/browser-dev.d.ts +37 -1
- package/dist/client/browser-dev.d.ts.map +1 -1
- package/dist/client/browser-entry/action-dispatch.d.ts +19 -0
- package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -0
- package/dist/client/browser-entry/action-queue.d.ts +44 -0
- package/dist/client/browser-entry/action-queue.d.ts.map +1 -0
- package/dist/client/browser-entry/hmr.d.ts +21 -0
- package/dist/client/browser-entry/hmr.d.ts.map +1 -0
- package/dist/client/browser-entry/hydrate.d.ts +63 -0
- package/dist/client/browser-entry/hydrate.d.ts.map +1 -0
- package/dist/client/browser-entry/index.d.ts +30 -0
- package/dist/client/browser-entry/index.d.ts.map +1 -0
- package/dist/client/browser-entry/post-hydration.d.ts +29 -0
- package/dist/client/browser-entry/post-hydration.d.ts.map +1 -0
- package/dist/client/browser-entry/router-init.d.ts +46 -0
- package/dist/client/browser-entry/router-init.d.ts.map +1 -0
- package/dist/client/browser-entry/rsc-stream.d.ts +32 -0
- package/dist/client/browser-entry/rsc-stream.d.ts.map +1 -0
- package/dist/client/browser-entry/scroll.d.ts +28 -0
- package/dist/client/browser-entry/scroll.d.ts.map +1 -0
- package/dist/client/deny-last-resort.d.ts +29 -0
- package/dist/client/deny-last-resort.d.ts.map +1 -0
- package/dist/client/error-boundary.d.ts +66 -6
- package/dist/client/error-boundary.d.ts.map +1 -1
- package/dist/client/error-boundary.js +2 -126
- package/dist/client/error-reconstituter.d.ts +61 -0
- package/dist/client/error-reconstituter.d.ts.map +1 -0
- package/dist/client/form.d.ts +16 -27
- package/dist/client/form.d.ts.map +1 -1
- package/dist/client/global-context.d.ts +15 -0
- package/dist/client/global-context.d.ts.map +1 -0
- package/dist/client/history.d.ts +50 -9
- package/dist/client/history.d.ts.map +1 -1
- package/dist/client/index.d.ts +20 -33
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +323 -1148
- package/dist/client/index.js.map +1 -1
- package/dist/client/internal.d.ts +20 -0
- package/dist/client/internal.d.ts.map +1 -0
- package/dist/client/internal.js +818 -0
- package/dist/client/internal.js.map +1 -0
- package/dist/client/link.d.ts +63 -60
- package/dist/client/link.d.ts.map +1 -1
- package/dist/client/location-search.d.ts +12 -0
- package/dist/client/location-search.d.ts.map +1 -0
- package/dist/client/navigation-api.d.ts +121 -0
- package/dist/client/navigation-api.d.ts.map +1 -0
- package/dist/client/navigation-commit.d.ts +98 -0
- package/dist/client/navigation-commit.d.ts.map +1 -0
- package/dist/client/navigation-context.d.ts +51 -31
- package/dist/client/navigation-context.d.ts.map +1 -1
- package/dist/client/navigation-root.d.ts +98 -0
- package/dist/client/navigation-root.d.ts.map +1 -0
- package/dist/client/navigation-transition.d.ts +187 -0
- package/dist/client/navigation-transition.d.ts.map +1 -0
- package/dist/client/nuqs-adapter.d.ts +1 -1
- package/dist/client/nuqs-adapter.d.ts.map +1 -1
- package/dist/client/params-context.d.ts +81 -0
- package/dist/client/params-context.d.ts.map +1 -0
- package/dist/client/react-root.d.ts +44 -0
- package/dist/client/react-root.d.ts.map +1 -0
- package/dist/client/router-effects.d.ts +130 -0
- package/dist/client/router-effects.d.ts.map +1 -0
- package/dist/client/router-lifecycle.d.ts +98 -0
- package/dist/client/router-lifecycle.d.ts.map +1 -0
- package/dist/client/router-pipeline.d.ts +87 -0
- package/dist/client/router-pipeline.d.ts.map +1 -0
- package/dist/client/router-ref.d.ts +2 -2
- package/dist/client/router-ref.d.ts.map +1 -1
- package/dist/client/router-skew.d.ts +21 -0
- package/dist/client/router-skew.d.ts.map +1 -0
- package/dist/client/router-types.d.ts +272 -0
- package/dist/client/router-types.d.ts.map +1 -0
- package/dist/client/router.d.ts +1 -97
- package/dist/client/router.d.ts.map +1 -1
- package/dist/client/rsc-fetch.d.ts +104 -26
- package/dist/client/rsc-fetch.d.ts.map +1 -1
- package/dist/client/segment-cache.d.ts +161 -25
- package/dist/client/segment-cache.d.ts.map +1 -1
- package/dist/client/segment-context.d.ts +1 -1
- package/dist/client/segment-context.d.ts.map +1 -1
- package/dist/client/segment-outlet.d.ts +68 -0
- package/dist/client/segment-outlet.d.ts.map +1 -0
- package/dist/client/segment-update-context.d.ts +15 -0
- package/dist/client/segment-update-context.d.ts.map +1 -0
- package/dist/client/shallow-url.d.ts +10 -0
- package/dist/client/shallow-url.d.ts.map +1 -0
- package/dist/client/slot-content-cache-context.d.ts +35 -0
- package/dist/client/slot-content-cache-context.d.ts.map +1 -0
- package/dist/client/slot-context.d.ts +31 -0
- package/dist/client/slot-context.d.ts.map +1 -0
- package/dist/client/slot-outlet.d.ts +16 -0
- package/dist/client/slot-outlet.d.ts.map +1 -0
- package/dist/client/slot-provider.d.ts +25 -0
- package/dist/client/slot-provider.d.ts.map +1 -0
- package/dist/client/ssr-data.d.ts +29 -7
- package/dist/client/ssr-data.d.ts.map +1 -1
- package/dist/client/stale-client.d.ts +69 -0
- package/dist/client/stale-client.d.ts.map +1 -0
- package/dist/client/state.d.ts +19 -8
- package/dist/client/state.d.ts.map +1 -1
- package/dist/client/status-page-marker.d.ts +25 -0
- package/dist/client/status-page-marker.d.ts.map +1 -0
- package/dist/client/top-loader.d.ts +7 -6
- package/dist/client/top-loader.d.ts.map +1 -1
- package/dist/client/unload-guard.d.ts +5 -0
- package/dist/client/unload-guard.d.ts.map +1 -1
- package/dist/client/use-cookie.d.ts +12 -0
- package/dist/client/use-cookie.d.ts.map +1 -1
- package/dist/client/use-link-status.d.ts +5 -5
- package/dist/client/use-link-status.d.ts.map +1 -1
- package/dist/client/use-pathname.d.ts +13 -11
- package/dist/client/use-pathname.d.ts.map +1 -1
- package/dist/client/use-pending-navigation.d.ts +23 -0
- package/dist/client/use-pending-navigation.d.ts.map +1 -0
- package/dist/client/use-query-states.d.ts +10 -4
- package/dist/client/use-query-states.d.ts.map +1 -1
- package/dist/client/use-router.d.ts +2 -2
- package/dist/client/use-router.d.ts.map +1 -1
- package/dist/client/use-search-params.d.ts +15 -8
- package/dist/client/use-search-params.d.ts.map +1 -1
- package/dist/client/use-segment-params.d.ts +55 -0
- package/dist/client/use-segment-params.d.ts.map +1 -0
- package/dist/codec.d.ts +69 -0
- package/dist/codec.d.ts.map +1 -0
- package/dist/codec.js +76 -0
- package/dist/codec.js.map +1 -0
- package/dist/config-types.d.ts +322 -0
- package/dist/config-types.d.ts.map +1 -0
- package/dist/config-validation.d.ts +51 -0
- package/dist/config-validation.d.ts.map +1 -0
- package/dist/cookies/define-cookie.d.ts +58 -25
- package/dist/cookies/define-cookie.d.ts.map +1 -1
- package/dist/cookies/index.d.ts +3 -2
- package/dist/cookies/index.d.ts.map +1 -1
- package/dist/cookies/index.js +256 -36
- package/dist/cookies/index.js.map +1 -1
- package/dist/cookies/json-cookie.d.ts +64 -0
- package/dist/cookies/json-cookie.d.ts.map +1 -0
- package/dist/cookies/validation.d.ts +34 -0
- package/dist/cookies/validation.d.ts.map +1 -0
- package/dist/dev-tools/404-page.d.ts +50 -0
- package/dist/dev-tools/404-page.d.ts.map +1 -0
- package/dist/dev-tools/browser-logs.d.ts +40 -0
- package/dist/dev-tools/browser-logs.d.ts.map +1 -0
- package/dist/dev-tools/dev-page-shell.d.ts +78 -0
- package/dist/dev-tools/dev-page-shell.d.ts.map +1 -0
- package/dist/dev-tools/error-page.d.ts +32 -0
- package/dist/dev-tools/error-page.d.ts.map +1 -0
- package/dist/dev-tools/holding-server.d.ts +46 -0
- package/dist/dev-tools/holding-server.d.ts.map +1 -0
- package/dist/dev-tools/hydration-overlay.d.ts +11 -0
- package/dist/dev-tools/hydration-overlay.d.ts.map +1 -0
- package/dist/dev-tools/index.d.ts +31 -0
- package/dist/dev-tools/index.d.ts.map +1 -0
- package/dist/dev-tools/instrumentation.d.ts +59 -0
- package/dist/dev-tools/instrumentation.d.ts.map +1 -0
- package/dist/{server/dev-logger.d.ts → dev-tools/logger.d.ts} +1 -1
- package/dist/dev-tools/logger.d.ts.map +1 -0
- package/dist/{plugins/dev-logs.d.ts → dev-tools/logs.d.ts} +17 -3
- package/dist/dev-tools/logs.d.ts.map +1 -0
- package/dist/dev-tools/overlay.d.ts +91 -0
- package/dist/dev-tools/overlay.d.ts.map +1 -0
- package/dist/dev-tools/stack-classifier.d.ts +34 -0
- package/dist/dev-tools/stack-classifier.d.ts.map +1 -0
- package/dist/dev-tools/terminal.d.ts +28 -0
- package/dist/dev-tools/terminal.d.ts.map +1 -0
- package/dist/fonts/ast-walk.d.ts +68 -0
- package/dist/fonts/ast-walk.d.ts.map +1 -0
- package/dist/fonts/ast.d.ts +112 -8
- package/dist/fonts/ast.d.ts.map +1 -1
- package/dist/fonts/bundle.d.ts +50 -0
- package/dist/fonts/bundle.d.ts.map +1 -0
- package/dist/fonts/css.d.ts +2 -1
- package/dist/fonts/css.d.ts.map +1 -1
- package/dist/fonts/dev-middleware.d.ts +22 -0
- package/dist/fonts/dev-middleware.d.ts.map +1 -0
- package/dist/fonts/fallbacks.d.ts +0 -7
- package/dist/fonts/fallbacks.d.ts.map +1 -1
- package/dist/fonts/google.d.ts +5 -3
- package/dist/fonts/google.d.ts.map +1 -1
- package/dist/fonts/local.d.ts +6 -4
- package/dist/fonts/local.d.ts.map +1 -1
- package/dist/fonts/paths.d.ts +43 -0
- package/dist/fonts/paths.d.ts.map +1 -0
- package/dist/fonts/pipeline.d.ts +177 -0
- package/dist/fonts/pipeline.d.ts.map +1 -0
- package/dist/fonts/transform.d.ts +82 -0
- package/dist/fonts/transform.d.ts.map +1 -0
- package/dist/fonts/types.d.ts +47 -1
- package/dist/fonts/types.d.ts.map +1 -1
- package/dist/fonts/virtual-modules.d.ts +77 -0
- package/dist/fonts/virtual-modules.d.ts.map +1 -0
- package/dist/index.d.ts +35 -153
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10488 -13975
- package/dist/index.js.map +1 -1
- package/dist/params/codec-registry.d.ts +26 -0
- package/dist/params/codec-registry.d.ts.map +1 -0
- package/dist/params/define-schema.d.ts +81 -0
- package/dist/params/define-schema.d.ts.map +1 -0
- package/dist/params/index.d.ts +5 -0
- package/dist/params/index.d.ts.map +1 -0
- package/dist/params/index.js +34 -0
- package/dist/params/index.js.map +1 -0
- package/dist/params/resolve-schema.d.ts +34 -0
- package/dist/params/resolve-schema.d.ts.map +1 -0
- package/dist/plugin-context.d.ts +276 -0
- package/dist/plugin-context.d.ts.map +1 -0
- package/dist/plugins/adapter-build.d.ts +21 -1
- package/dist/plugins/adapter-build.d.ts.map +1 -1
- package/dist/plugins/build-manifest.d.ts +7 -3
- package/dist/plugins/build-manifest.d.ts.map +1 -1
- package/dist/plugins/build-report.d.ts +54 -7
- package/dist/plugins/build-report.d.ts.map +1 -1
- package/dist/plugins/cache.d.ts +64 -0
- package/dist/plugins/cache.d.ts.map +1 -0
- package/dist/plugins/callsite-ast.d.ts +117 -0
- package/dist/plugins/callsite-ast.d.ts.map +1 -0
- package/dist/plugins/callsite-jsx.d.ts +35 -0
- package/dist/plugins/callsite-jsx.d.ts.map +1 -0
- package/dist/plugins/chunks.d.ts +11 -4
- package/dist/plugins/chunks.d.ts.map +1 -1
- package/dist/plugins/client-chunks.d.ts +40 -0
- package/dist/plugins/client-chunks.d.ts.map +1 -0
- package/dist/plugins/cloudflare-wasm.d.ts +21 -0
- package/dist/plugins/cloudflare-wasm.d.ts.map +1 -0
- package/dist/plugins/content.d.ts +1 -1
- package/dist/plugins/content.d.ts.map +1 -1
- package/dist/plugins/dev-discovery.d.ts +123 -0
- package/dist/plugins/dev-discovery.d.ts.map +1 -0
- package/dist/plugins/dev-server.d.ts +17 -1
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/plugins/entries.d.ts +32 -1
- package/dist/plugins/entries.d.ts.map +1 -1
- package/dist/plugins/fonts.d.ts +16 -65
- package/dist/plugins/fonts.d.ts.map +1 -1
- package/dist/plugins/graph-endpoint.d.ts +112 -0
- package/dist/plugins/graph-endpoint.d.ts.map +1 -0
- package/dist/plugins/mdx.d.ts +24 -5
- package/dist/plugins/mdx.d.ts.map +1 -1
- package/dist/plugins/prebuilt-capture.d.ts +60 -0
- package/dist/plugins/prebuilt-capture.d.ts.map +1 -0
- package/dist/plugins/prebuilt-options-analysis.d.ts +40 -0
- package/dist/plugins/prebuilt-options-analysis.d.ts.map +1 -0
- package/dist/plugins/prebuilt.d.ts +82 -0
- package/dist/plugins/prebuilt.d.ts.map +1 -0
- package/dist/plugins/prerender-sugar.d.ts +39 -0
- package/dist/plugins/prerender-sugar.d.ts.map +1 -0
- package/dist/plugins/request-dep/analysis.d.ts +106 -0
- package/dist/plugins/request-dep/analysis.d.ts.map +1 -0
- package/dist/plugins/request-dep/index.d.ts +75 -0
- package/dist/plugins/request-dep/index.d.ts.map +1 -0
- package/dist/plugins/request-dep/origin.d.ts +61 -0
- package/dist/plugins/request-dep/origin.d.ts.map +1 -0
- package/dist/plugins/routing.d.ts +1 -1
- package/dist/plugins/routing.d.ts.map +1 -1
- package/dist/plugins/server-bundle.d.ts.map +1 -1
- package/dist/plugins/shims.d.ts +29 -5
- package/dist/plugins/shims.d.ts.map +1 -1
- package/dist/plugins/static-build.d.ts +218 -21
- package/dist/plugins/static-build.d.ts.map +1 -1
- package/dist/routing/codegen-shared.d.ts +26 -0
- package/dist/routing/codegen-shared.d.ts.map +1 -0
- package/dist/routing/codegen-types.d.ts +61 -0
- package/dist/routing/codegen-types.d.ts.map +1 -0
- package/dist/routing/codegen-write.d.ts +51 -0
- package/dist/routing/codegen-write.d.ts.map +1 -0
- package/dist/routing/codegen.d.ts +8 -3
- package/dist/routing/codegen.d.ts.map +1 -1
- package/dist/routing/collision-probe.d.ts +104 -0
- package/dist/routing/collision-probe.d.ts.map +1 -0
- package/dist/routing/collision-spaces.d.ts +26 -0
- package/dist/routing/collision-spaces.d.ts.map +1 -0
- package/dist/routing/convention-lint.d.ts +55 -0
- package/dist/routing/convention-lint.d.ts.map +1 -0
- package/dist/routing/export-detect.d.ts +72 -0
- package/dist/routing/export-detect.d.ts.map +1 -0
- package/dist/routing/file-cache.d.ts +8 -0
- package/dist/routing/file-cache.d.ts.map +1 -0
- package/dist/routing/index.d.ts +13 -7
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +5 -2
- package/dist/routing/interception-overlap.d.ts +35 -0
- package/dist/routing/interception-overlap.d.ts.map +1 -0
- package/dist/routing/interception.d.ts +234 -10
- package/dist/routing/interception.d.ts.map +1 -1
- package/dist/routing/link-codegen.d.ts +105 -0
- package/dist/routing/link-codegen.d.ts.map +1 -0
- package/dist/routing/manifest-codegen.d.ts +26 -0
- package/dist/routing/manifest-codegen.d.ts.map +1 -0
- package/dist/routing/scanner.d.ts +14 -10
- package/dist/routing/scanner.d.ts.map +1 -1
- package/dist/routing/schema-validation.d.ts +35 -0
- package/dist/routing/schema-validation.d.ts.map +1 -0
- package/dist/routing/segment-classify.d.ts +114 -0
- package/dist/routing/segment-classify.d.ts.map +1 -0
- package/dist/routing/segment-codegen.d.ts +38 -0
- package/dist/routing/segment-codegen.d.ts.map +1 -0
- package/dist/routing/segment-keys.d.ts +118 -0
- package/dist/routing/segment-keys.d.ts.map +1 -0
- package/dist/routing/slot-placement.d.ts +48 -0
- package/dist/routing/slot-placement.d.ts.map +1 -0
- package/dist/routing/types.d.ts +74 -26
- package/dist/routing/types.d.ts.map +1 -1
- package/dist/routing/walkers.d.ts +57 -0
- package/dist/routing/walkers.d.ts.map +1 -0
- package/dist/rsc-runtime/rsc.d.ts +1 -1
- package/dist/rsc-runtime/rsc.d.ts.map +1 -1
- package/dist/rsc-runtime/ssr.d.ts +14 -0
- package/dist/rsc-runtime/ssr.d.ts.map +1 -1
- package/dist/rsc-runtime/transforms.d.ts +13 -0
- package/dist/rsc-runtime/transforms.d.ts.map +1 -0
- package/dist/schema-bridge.d.ts +145 -0
- package/dist/schema-bridge.d.ts.map +1 -0
- package/dist/search-params/define.d.ts +262 -0
- package/dist/search-params/define.d.ts.map +1 -0
- package/dist/search-params/index.d.ts +3 -7
- package/dist/search-params/index.d.ts.map +1 -1
- package/dist/search-params/index.js +179 -360
- package/dist/search-params/index.js.map +1 -1
- package/dist/search-params/parse-total.d.ts +81 -0
- package/dist/search-params/parse-total.d.ts.map +1 -0
- package/dist/search-params/serialize-equal.d.ts +9 -0
- package/dist/search-params/serialize-equal.d.ts.map +1 -0
- package/dist/search-params/wrappers.d.ts +76 -0
- package/dist/search-params/wrappers.d.ts.map +1 -0
- package/dist/server/access-gate.d.ts +98 -10
- package/dist/server/access-gate.d.ts.map +1 -1
- package/dist/server/action-client.d.ts +42 -7
- package/dist/server/action-client.d.ts.map +1 -1
- package/dist/server/action-encryption.d.ts +76 -0
- package/dist/server/action-encryption.d.ts.map +1 -0
- package/dist/server/action-handler.d.ts +39 -5
- package/dist/server/action-handler.d.ts.map +1 -1
- package/dist/server/actions.d.ts +29 -35
- package/dist/server/actions.d.ts.map +1 -1
- package/dist/server/als-registry.d.ts +117 -13
- package/dist/server/als-registry.d.ts.map +1 -1
- package/dist/server/asset-headers.d.ts +8 -18
- package/dist/server/asset-headers.d.ts.map +1 -1
- package/dist/server/body-limits.d.ts.map +1 -1
- package/dist/server/build-manifest.d.ts +25 -30
- package/dist/server/build-manifest.d.ts.map +1 -1
- package/dist/server/canonicalize.d.ts +10 -0
- package/dist/server/canonicalize.d.ts.map +1 -1
- package/dist/server/chain-url-parts.d.ts +82 -0
- package/dist/server/chain-url-parts.d.ts.map +1 -0
- package/dist/server/children-interception.d.ts +49 -0
- package/dist/server/children-interception.d.ts.map +1 -0
- package/dist/server/coalesce-tick.d.ts +40 -0
- package/dist/server/coalesce-tick.d.ts.map +1 -0
- package/dist/server/compress.d.ts.map +1 -1
- package/dist/server/cookie-context.d.ts +170 -0
- package/dist/server/cookie-context.d.ts.map +1 -0
- package/dist/server/cookie-parsing.d.ts +65 -0
- package/dist/server/cookie-parsing.d.ts.map +1 -0
- package/dist/server/csp-nonce.d.ts +45 -0
- package/dist/server/csp-nonce.d.ts.map +1 -0
- package/dist/server/csrf.d.ts +3 -2
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/debug.d.ts +82 -0
- package/dist/server/debug.d.ts.map +1 -0
- package/dist/server/default-logger.d.ts +22 -0
- package/dist/server/default-logger.d.ts.map +1 -0
- package/dist/server/default-status-page.d.ts +45 -0
- package/dist/server/default-status-page.d.ts.map +1 -0
- package/dist/server/deny-boundary.d.ts +253 -0
- package/dist/server/deny-boundary.d.ts.map +1 -0
- package/dist/server/deny-renderer.d.ts +20 -9
- package/dist/server/deny-renderer.d.ts.map +1 -1
- package/dist/server/dev-source-map.d.ts +22 -0
- package/dist/server/dev-source-map.d.ts.map +1 -0
- package/dist/server/early-hints-sender.d.ts.map +1 -1
- package/dist/server/early-hints.d.ts +14 -12
- package/dist/server/early-hints.d.ts.map +1 -1
- package/dist/server/error-boundary-wrapper.d.ts +101 -10
- package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
- package/dist/server/error-response-headers.d.ts +3 -0
- package/dist/server/error-response-headers.d.ts.map +1 -0
- package/dist/server/fallback-error.d.ts +12 -7
- package/dist/server/fallback-error.d.ts.map +1 -1
- package/dist/server/flight-injection-state.d.ts +66 -0
- package/dist/server/flight-injection-state.d.ts.map +1 -0
- package/dist/server/flight-scripts.d.ts +45 -0
- package/dist/server/flight-scripts.d.ts.map +1 -0
- package/dist/server/form-data.d.ts +41 -0
- package/dist/server/form-data.d.ts.map +1 -1
- package/dist/server/form-flash.d.ts +1 -1
- package/dist/server/head-response.d.ts +35 -0
- package/dist/server/head-response.d.ts.map +1 -0
- package/dist/server/html-injector-core.d.ts +257 -0
- package/dist/server/html-injector-core.d.ts.map +1 -0
- package/dist/server/html-injectors.d.ts +84 -42
- package/dist/server/html-injectors.d.ts.map +1 -1
- package/dist/server/index.d.ts +18 -54
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +212 -2930
- package/dist/server/index.js.map +1 -1
- package/dist/server/instrumentation.d.ts +1 -1
- package/dist/server/internal.d.ts +50 -0
- package/dist/server/internal.d.ts.map +1 -0
- package/dist/server/internal.js +4034 -0
- package/dist/server/internal.js.map +1 -0
- package/dist/server/logger.d.ts +39 -7
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/metadata-collector.d.ts +71 -0
- package/dist/server/metadata-collector.d.ts.map +1 -0
- package/dist/server/metadata-platform.d.ts +2 -2
- package/dist/server/metadata-render.d.ts +2 -2
- package/dist/server/metadata-render.d.ts.map +1 -1
- package/dist/server/metadata-routes.d.ts +60 -11
- package/dist/server/metadata-routes.d.ts.map +1 -1
- package/dist/server/metadata-social.d.ts +2 -2
- package/dist/server/metadata.d.ts +10 -2
- package/dist/server/metadata.d.ts.map +1 -1
- package/dist/server/middleware-runner.d.ts +20 -5
- package/dist/server/middleware-runner.d.ts.map +1 -1
- package/dist/server/node-stream-transforms.d.ts +105 -0
- package/dist/server/node-stream-transforms.d.ts.map +1 -0
- package/dist/server/nuqs-ssr-provider.d.ts +7 -3
- package/dist/server/nuqs-ssr-provider.d.ts.map +1 -1
- package/dist/server/param-coercion.d.ts +78 -0
- package/dist/server/param-coercion.d.ts.map +1 -0
- package/dist/server/pipeline-helpers.d.ts +77 -0
- package/dist/server/pipeline-helpers.d.ts.map +1 -0
- package/dist/server/pipeline-interception.d.ts +59 -9
- package/dist/server/pipeline-interception.d.ts.map +1 -1
- package/dist/server/pipeline-metadata.d.ts +7 -1
- package/dist/server/pipeline-metadata.d.ts.map +1 -1
- package/dist/server/pipeline-outcome.d.ts +49 -0
- package/dist/server/pipeline-outcome.d.ts.map +1 -0
- package/dist/server/pipeline-phases.d.ts +70 -0
- package/dist/server/pipeline-phases.d.ts.map +1 -0
- package/dist/server/pipeline.d.ts +160 -24
- package/dist/server/pipeline.d.ts.map +1 -1
- package/dist/server/port-resolution.d.ts +31 -0
- package/dist/server/port-resolution.d.ts.map +1 -0
- package/dist/server/prebuilt/cache-key.d.ts +63 -0
- package/dist/server/prebuilt/cache-key.d.ts.map +1 -0
- package/dist/server/prebuilt/capture-state.d.ts +57 -0
- package/dist/server/prebuilt/capture-state.d.ts.map +1 -0
- package/dist/server/prebuilt/key-discipline.d.ts +52 -0
- package/dist/server/prebuilt/key-discipline.d.ts.map +1 -0
- package/dist/server/prebuilt/manifest-tag-index.d.ts +27 -0
- package/dist/server/prebuilt/manifest-tag-index.d.ts.map +1 -0
- package/dist/server/prebuilt/overlay.d.ts +100 -0
- package/dist/server/prebuilt/overlay.d.ts.map +1 -0
- package/dist/server/prebuilt/payload-source.d.ts +79 -0
- package/dist/server/prebuilt/payload-source.d.ts.map +1 -0
- package/dist/server/prebuilt/slots.d.ts +99 -0
- package/dist/server/prebuilt/slots.d.ts.map +1 -0
- package/dist/server/prebuilt/synthetic-store.d.ts +67 -0
- package/dist/server/prebuilt/synthetic-store.d.ts.map +1 -0
- package/dist/server/prebuilt-builder.d.ts +121 -0
- package/dist/server/prebuilt-builder.d.ts.map +1 -0
- package/dist/server/prebuilt-runtime.d.ts +111 -0
- package/dist/server/prebuilt-runtime.d.ts.map +1 -0
- package/dist/server/primitives.d.ts +129 -45
- package/dist/server/primitives.d.ts.map +1 -1
- package/dist/server/publish-params.d.ts +33 -0
- package/dist/server/publish-params.d.ts.map +1 -0
- package/dist/server/render-timeout.d.ts +51 -0
- package/dist/server/render-timeout.d.ts.map +1 -0
- package/dist/server/render-utils.d.ts +26 -0
- package/dist/server/render-utils.d.ts.map +1 -0
- package/dist/server/request-context.d.ts +111 -107
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-dep.d.ts +15 -0
- package/dist/server/request-dep.d.ts.map +1 -0
- package/dist/server/response-cache-policy.d.ts +3 -0
- package/dist/server/response-cache-policy.d.ts.map +1 -0
- package/dist/server/route-element-builder.d.ts +57 -30
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/route-element-helpers.d.ts +12 -0
- package/dist/server/route-element-helpers.d.ts.map +1 -0
- package/dist/server/route-handler.d.ts +1 -1
- package/dist/server/route-handler.d.ts.map +1 -1
- package/dist/server/route-matcher.d.ts +40 -38
- package/dist/server/route-matcher.d.ts.map +1 -1
- package/dist/server/route-module-loader.d.ts +37 -0
- package/dist/server/route-module-loader.d.ts.map +1 -0
- package/dist/server/rsc-cache-key-guard.d.ts +78 -0
- package/dist/server/rsc-cache-key-guard.d.ts.map +1 -0
- package/dist/server/rsc-entry/action-middleware-runner.d.ts +66 -0
- package/dist/server/rsc-entry/action-middleware-runner.d.ts.map +1 -0
- package/dist/server/rsc-entry/api-handler.d.ts +12 -3
- package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
- package/dist/server/rsc-entry/deny-fallback.d.ts +29 -0
- package/dist/server/rsc-entry/deny-fallback.d.ts.map +1 -0
- package/dist/server/rsc-entry/error-renderer.d.ts +38 -13
- package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
- package/dist/server/rsc-entry/helpers.d.ts +59 -42
- package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
- package/dist/server/rsc-entry/index.d.ts +40 -6
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts +51 -0
- package/dist/server/rsc-entry/render-route.d.ts.map +1 -0
- package/dist/server/rsc-entry/revalidate-renderer.d.ts +108 -0
- package/dist/server/rsc-entry/revalidate-renderer.d.ts.map +1 -0
- package/dist/server/rsc-entry/rsc-payload.d.ts +26 -6
- package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts +39 -3
- package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
- package/dist/server/rsc-entry/ssr-bridge.d.ts +5 -1
- package/dist/server/rsc-entry/ssr-bridge.d.ts.map +1 -1
- package/dist/server/rsc-entry/ssr-renderer.d.ts +37 -5
- package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
- package/dist/server/rsc-entry/wrap-action-dispatch.d.ts +89 -0
- package/dist/server/rsc-entry/wrap-action-dispatch.d.ts.map +1 -0
- package/dist/server/rsc-error-envelope.d.ts +11 -0
- package/dist/server/rsc-error-envelope.d.ts.map +1 -0
- package/dist/server/rsc-prop-warnings.d.ts.map +1 -1
- package/dist/server/safe-load.d.ts +46 -0
- package/dist/server/safe-load.d.ts.map +1 -0
- package/dist/server/sensitive-fields.d.ts +74 -0
- package/dist/server/sensitive-fields.d.ts.map +1 -0
- package/dist/server/sitemap-generator.d.ts +130 -0
- package/dist/server/sitemap-generator.d.ts.map +1 -0
- package/dist/server/sitemap-handler.d.ts +22 -0
- package/dist/server/sitemap-handler.d.ts.map +1 -0
- package/dist/server/skippable-prefix.d.ts +29 -0
- package/dist/server/skippable-prefix.d.ts.map +1 -0
- package/dist/server/slot-interception.d.ts +80 -0
- package/dist/server/slot-interception.d.ts.map +1 -0
- package/dist/server/slot-resolver.d.ts +137 -7
- package/dist/server/slot-resolver.d.ts.map +1 -1
- package/dist/server/slot-subtree-contain.d.ts +54 -0
- package/dist/server/slot-subtree-contain.d.ts.map +1 -0
- package/dist/server/ssr-bridge-types.d.ts +160 -0
- package/dist/server/ssr-bridge-types.d.ts.map +1 -0
- package/dist/server/ssr-entry.d.ts +1 -43
- package/dist/server/ssr-entry.d.ts.map +1 -1
- package/dist/server/ssr-render.d.ts +69 -22
- package/dist/server/ssr-render.d.ts.map +1 -1
- package/dist/server/ssr-wrappers.d.ts +93 -0
- package/dist/server/ssr-wrappers.d.ts.map +1 -0
- package/dist/server/state-tree-diff.d.ts +44 -9
- package/dist/server/state-tree-diff.d.ts.map +1 -1
- package/dist/server/static-generator.d.ts +112 -0
- package/dist/server/static-generator.d.ts.map +1 -0
- package/dist/server/static-not-found.d.ts +52 -0
- package/dist/server/static-not-found.d.ts.map +1 -0
- package/dist/server/status-code-resolver.d.ts +26 -15
- package/dist/server/status-code-resolver.d.ts.map +1 -1
- package/dist/server/stream-utils.d.ts +47 -0
- package/dist/server/stream-utils.d.ts.map +1 -0
- package/dist/server/tracing.d.ts +56 -11
- package/dist/server/tracing.d.ts.map +1 -1
- package/dist/server/tree-match.d.ts +49 -0
- package/dist/server/tree-match.d.ts.map +1 -0
- package/dist/server/types.d.ts +88 -7
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/utils/element-type.d.ts +50 -0
- package/dist/server/utils/element-type.d.ts.map +1 -0
- package/dist/server/utils/escape-html.d.ts +14 -0
- package/dist/server/utils/escape-html.d.ts.map +1 -0
- package/dist/server/utils/mdx-file.d.ts +17 -0
- package/dist/server/utils/mdx-file.d.ts.map +1 -0
- package/dist/server/version-skew.d.ts +61 -0
- package/dist/server/version-skew.d.ts.map +1 -0
- package/dist/server/waituntil-bridge.d.ts.map +1 -1
- package/dist/server/workers-cache-bridge.d.ts +26 -0
- package/dist/server/workers-cache-bridge.d.ts.map +1 -0
- package/dist/shared/als-slots.d.ts +42 -0
- package/dist/shared/als-slots.d.ts.map +1 -0
- package/dist/shared/base-path.d.ts +56 -0
- package/dist/shared/base-path.d.ts.map +1 -0
- package/dist/shared/href-validation.d.ts +49 -0
- package/dist/shared/href-validation.d.ts.map +1 -0
- package/dist/shared/merge-search-params.d.ts +22 -0
- package/dist/shared/merge-search-params.d.ts.map +1 -0
- package/dist/shared/param-value.d.ts +104 -0
- package/dist/shared/param-value.d.ts.map +1 -0
- package/dist/shared/payload-root.d.ts +109 -0
- package/dist/shared/payload-root.d.ts.map +1 -0
- package/dist/shared/redirect-type.d.ts +17 -0
- package/dist/shared/redirect-type.d.ts.map +1 -0
- package/dist/shared/rsc-cache-key.d.ts +163 -0
- package/dist/shared/rsc-cache-key.d.ts.map +1 -0
- package/dist/shared/rsc-error-envelope.d.ts +16 -0
- package/dist/shared/rsc-error-envelope.d.ts.map +1 -0
- package/dist/shared/rsc-manifest.d.ts +28 -0
- package/dist/shared/rsc-manifest.d.ts.map +1 -0
- package/dist/shared/rsc-media-type.d.ts +52 -0
- package/dist/shared/rsc-media-type.d.ts.map +1 -0
- package/dist/shared/rsc-payload-path.d.ts +42 -0
- package/dist/shared/rsc-payload-path.d.ts.map +1 -0
- package/dist/shared/segment-info.d.ts +66 -0
- package/dist/shared/segment-info.d.ts.map +1 -0
- package/dist/shared/slot-params.d.ts +52 -0
- package/dist/shared/slot-params.d.ts.map +1 -0
- package/dist/shared/static-platform-files.d.ts +71 -0
- package/dist/shared/static-platform-files.d.ts.map +1 -0
- package/dist/shared/status-reason-phrase.d.ts +26 -0
- package/dist/shared/status-reason-phrase.d.ts.map +1 -0
- package/dist/shims/font-google.d.ts +1 -1
- package/dist/shims/font-google.d.ts.map +1 -1
- package/dist/shims/font-google.js +42 -0
- package/dist/shims/font-google.js.map +1 -0
- package/dist/shims/font-local.d.ts +26 -0
- package/dist/shims/font-local.d.ts.map +1 -0
- package/dist/shims/font-local.js +20 -0
- package/dist/shims/font-local.js.map +1 -0
- package/dist/shims/headers.d.ts +53 -1
- package/dist/shims/headers.d.ts.map +1 -1
- package/dist/shims/image.d.ts +120 -120
- package/dist/shims/image.d.ts.map +1 -1
- package/dist/shims/navigation-client.d.ts +25 -12
- package/dist/shims/navigation-client.d.ts.map +1 -1
- package/dist/shims/navigation-rsc.d.ts +21 -0
- package/dist/shims/navigation-rsc.d.ts.map +1 -0
- package/dist/shims/navigation.d.ts +10 -5
- package/dist/shims/navigation.d.ts.map +1 -1
- package/dist/utils/state-machine.d.ts +80 -0
- package/dist/utils/state-machine.d.ts.map +1 -0
- package/docs/api/30-api-server.mdx +236 -0
- package/docs/api/31-api-client.mdx +167 -0
- package/docs/api/32-api-cache.mdx +311 -0
- package/docs/api/33-api-search-params.mdx +176 -0
- package/docs/api/34-api-config.mdx +329 -0
- package/docs/api/35-api-typescript.mdx +91 -0
- package/docs/api/36-cli.mdx +192 -0
- package/docs/learn/00-introduction.mdx +109 -0
- package/docs/learn/01-quick-start.mdx +94 -0
- package/docs/learn/02-pages-and-layouts.mdx +147 -0
- package/docs/learn/03-fetching-data.mdx +211 -0
- package/docs/learn/04-access-control.mdx +115 -0
- package/docs/learn/05-the-flush-point.mdx +175 -0
- package/docs/learn/06-typed-params.mdx +275 -0
- package/docs/learn/07-typed-routes.mdx +108 -0
- package/docs/learn/08-forms-and-actions.mdx +146 -0
- package/docs/learn/09-streaming.mdx +140 -0
- package/docs/learn/10-caching.mdx +252 -0
- package/docs/learn/11-middleware.mdx +158 -0
- package/docs/learn/12-error-handling.mdx +188 -0
- package/docs/learn/13-deploying.mdx +287 -0
- package/llms.txt +55 -0
- package/package.json +117 -29
- package/src/adapters/build-output-helper.ts +351 -0
- package/src/adapters/cloudflare-dev.ts +183 -0
- package/src/adapters/cloudflare-kv-cache.ts +207 -0
- package/src/adapters/cloudflare.ts +747 -130
- package/src/adapters/compress-module.ts +101 -88
- package/src/adapters/fs-identity.ts +156 -0
- package/src/adapters/nitro-presets.ts +139 -0
- package/src/adapters/nitro-preview.ts +340 -0
- package/src/adapters/nitro.ts +279 -418
- package/src/adapters/raw-imports.d.ts +5 -0
- package/src/adapters/shared.ts +274 -0
- package/src/adapters/types.ts +28 -7
- package/src/adapters/wrangler.d.ts +7 -0
- package/src/analyze/chains.ts +411 -0
- package/src/analyze/classify.ts +258 -0
- package/src/analyze/crawl-entry.ts +68 -0
- package/src/analyze/crawl.ts +500 -0
- package/src/analyze/graph-cache.ts +332 -0
- package/src/analyze/graph-command.ts +762 -0
- package/src/analyze/live-graph.ts +232 -0
- package/src/analyze/poison-rules.ts +165 -0
- package/src/analyze/poison-scan.ts +162 -0
- package/src/analyze/scan.ts +149 -0
- package/src/cache/cache-api.ts +107 -0
- package/src/cache/fast-hash.ts +39 -0
- package/src/cache/handler-store.ts +76 -0
- package/src/cache/index.ts +115 -22
- package/src/cache/invalidation-epoch.ts +93 -0
- package/src/cache/json-lossy-check.ts +75 -0
- package/src/cache/redis-handler.ts +198 -20
- package/src/cache/singleflight.ts +69 -6
- package/src/cache/sizeof.ts +33 -0
- package/src/cache/stable-stringify.ts +65 -2
- package/src/cache/store.ts +71 -0
- package/src/cache/stores/cloudflare-kv.ts +52 -0
- package/src/cache/stores/memory.ts +125 -0
- package/src/cache/stores/redis.ts +97 -0
- package/src/cache/stores/vercel.ts +59 -0
- package/src/cache/tag-aware-handler.ts +237 -0
- package/src/cache/timber-cache.ts +180 -48
- package/src/cdn/cloudflare-purge.ts +50 -0
- package/src/cdn/fastly-purge.ts +63 -0
- package/src/cdn/headers.ts +153 -0
- package/src/cdn/index.ts +23 -0
- package/src/cdn/purge-store.ts +34 -0
- package/src/cdn/workers-cache-purge.ts +34 -0
- package/src/cli-check.ts +507 -0
- package/src/cli-schema-sync.ts +401 -0
- package/src/cli.ts +262 -55
- package/src/client/browser-dev.ts +157 -2
- package/src/client/browser-entry/action-dispatch.ts +197 -0
- package/src/client/browser-entry/action-queue.ts +90 -0
- package/src/client/browser-entry/hmr.ts +70 -0
- package/src/client/browser-entry/hydrate.ts +148 -0
- package/src/client/browser-entry/index.ts +131 -0
- package/src/client/browser-entry/post-hydration.ts +123 -0
- package/src/client/browser-entry/router-init.ts +418 -0
- package/src/client/browser-entry/rsc-stream.ts +166 -0
- package/src/client/browser-entry/scroll.ts +50 -0
- package/src/client/deny-last-resort.tsx +54 -0
- package/src/client/error-boundary.tsx +316 -40
- package/src/client/error-reconstituter.tsx +79 -0
- package/src/client/form.tsx +36 -32
- package/src/client/global-context.ts +31 -0
- package/src/client/history.ts +81 -10
- package/src/client/index.ts +89 -53
- package/src/client/internal.ts +59 -0
- package/src/client/link.tsx +452 -159
- package/src/client/location-search.ts +15 -0
- package/src/client/navigation-api.ts +347 -0
- package/src/client/navigation-commit.ts +295 -0
- package/src/client/navigation-context.ts +67 -98
- package/src/client/navigation-root.tsx +224 -0
- package/src/client/navigation-transition.ts +327 -0
- package/src/client/nuqs-adapter.tsx +21 -9
- package/src/client/params-context.ts +187 -0
- package/src/client/react-root.ts +72 -0
- package/src/client/router-effects.ts +228 -0
- package/src/client/router-lifecycle.ts +354 -0
- package/src/client/router-pipeline.ts +490 -0
- package/src/client/router-ref.ts +3 -3
- package/src/client/router-skew.ts +30 -0
- package/src/client/router-types.ts +294 -0
- package/src/client/router.ts +436 -424
- package/src/client/rsc-fetch.ts +512 -73
- package/src/client/segment-cache.ts +327 -40
- package/src/client/segment-context.ts +13 -5
- package/src/client/segment-outlet.tsx +96 -0
- package/src/client/segment-update-context.ts +23 -0
- package/src/client/shallow-url.ts +22 -0
- package/src/client/slot-content-cache-context.ts +43 -0
- package/src/client/slot-context.ts +50 -0
- package/src/client/slot-outlet.tsx +22 -0
- package/src/client/slot-provider.tsx +32 -0
- package/src/client/ssr-data.ts +30 -9
- package/src/client/stale-client.ts +191 -0
- package/src/client/state.ts +29 -15
- package/src/client/status-page-marker.tsx +32 -0
- package/src/client/top-loader.tsx +36 -29
- package/src/client/unload-guard.ts +35 -3
- package/src/client/use-cookie.ts +70 -18
- package/src/client/use-link-status.ts +7 -7
- package/src/client/use-pathname.ts +22 -31
- package/src/client/use-pending-navigation.ts +40 -0
- package/src/client/use-query-states.ts +206 -36
- package/src/client/use-router.ts +6 -3
- package/src/client/use-search-params.ts +38 -49
- package/src/client/use-segment-params.ts +69 -0
- package/src/client/use-selected-layout-segment.ts +2 -2
- package/src/codec.ts +149 -0
- package/src/config-types.ts +322 -0
- package/src/config-validation.ts +347 -0
- package/src/cookies/define-cookie.ts +222 -53
- package/src/cookies/index.ts +13 -2
- package/src/cookies/json-cookie.ts +105 -0
- package/src/cookies/validation.ts +192 -0
- package/src/dev-tools/404-page.ts +286 -0
- package/src/dev-tools/browser-logs.ts +55 -0
- package/src/dev-tools/dev-page-shell.ts +260 -0
- package/src/dev-tools/error-page.ts +331 -0
- package/src/dev-tools/holding-server.ts +185 -0
- package/src/dev-tools/hydration-overlay.ts +158 -0
- package/src/dev-tools/index.ts +83 -0
- package/src/dev-tools/instrumentation.ts +213 -0
- package/src/{server/dev-logger.ts → dev-tools/logger.ts} +33 -51
- package/src/{plugins/dev-logs.ts → dev-tools/logs.ts} +122 -26
- package/src/dev-tools/overlay.ts +469 -0
- package/src/dev-tools/stack-classifier.ts +75 -0
- package/src/dev-tools/terminal.ts +182 -0
- package/src/fonts/ast-walk.ts +235 -0
- package/src/fonts/ast.ts +479 -128
- package/src/fonts/bundle.ts +138 -0
- package/src/fonts/css.ts +3 -2
- package/src/fonts/dev-middleware.ts +85 -0
- package/src/fonts/fallbacks.ts +0 -23
- package/src/fonts/google.ts +101 -19
- package/src/fonts/local.ts +13 -8
- package/src/fonts/paths.ts +58 -0
- package/src/fonts/pipeline.ts +348 -0
- package/src/fonts/transform.ts +311 -0
- package/src/fonts/types.ts +52 -1
- package/src/fonts/virtual-modules.ts +179 -0
- package/src/index.ts +486 -344
- package/src/params/codec-registry.ts +34 -0
- package/src/params/define-schema.ts +115 -0
- package/src/params/index.ts +17 -0
- package/src/params/resolve-schema.ts +84 -0
- package/src/plugin-context.ts +503 -0
- package/src/plugins/adapter-build.ts +229 -7
- package/src/plugins/build-manifest.ts +201 -26
- package/src/plugins/build-report.ts +275 -43
- package/src/plugins/cache.ts +243 -0
- package/src/plugins/callsite-ast.ts +472 -0
- package/src/plugins/callsite-jsx.ts +243 -0
- package/src/plugins/chunks.ts +74 -5
- package/src/plugins/client-chunks.ts +185 -0
- package/src/plugins/cloudflare-wasm.ts +141 -0
- package/src/plugins/content.ts +5 -1
- package/src/plugins/dev-discovery.ts +218 -0
- package/src/plugins/dev-server.ts +369 -96
- package/src/plugins/entries.ts +148 -18
- package/src/plugins/fonts.ts +251 -524
- package/src/plugins/graph-endpoint.ts +532 -0
- package/src/plugins/mdx.ts +116 -40
- package/src/plugins/prebuilt-capture.ts +217 -0
- package/src/plugins/prebuilt-options-analysis.ts +175 -0
- package/src/plugins/prebuilt.ts +655 -0
- package/src/plugins/prerender-sugar.ts +320 -0
- package/src/plugins/request-dep/analysis.ts +447 -0
- package/src/plugins/request-dep/index.ts +376 -0
- package/src/plugins/request-dep/origin.ts +310 -0
- package/src/plugins/routing.ts +273 -277
- package/src/plugins/server-bundle.ts +103 -14
- package/src/plugins/shims.ts +259 -97
- package/src/plugins/static-build.ts +708 -66
- package/src/react-canary.d.ts +2 -0
- package/src/routing/codegen-shared.ts +39 -0
- package/src/routing/codegen-types.ts +62 -0
- package/src/routing/codegen-write.ts +141 -0
- package/src/routing/codegen.ts +349 -232
- package/src/routing/collision-probe.ts +438 -0
- package/src/routing/collision-spaces.ts +281 -0
- package/src/routing/convention-lint.ts +623 -0
- package/src/routing/export-detect.ts +448 -0
- package/src/routing/file-cache.ts +23 -0
- package/src/routing/index.ts +16 -7
- package/src/routing/interception-overlap.ts +141 -0
- package/src/routing/interception.ts +1044 -67
- package/src/routing/link-codegen.ts +280 -0
- package/src/routing/manifest-codegen.ts +226 -0
- package/src/routing/scanner.ts +393 -219
- package/src/routing/schema-validation.ts +155 -0
- package/src/routing/segment-classify.ts +280 -0
- package/src/routing/segment-codegen.ts +98 -0
- package/src/routing/segment-keys.ts +186 -0
- package/src/routing/slot-placement.ts +97 -0
- package/src/routing/types.ts +75 -26
- package/src/routing/walkers.ts +98 -0
- package/src/rsc-runtime/rsc.ts +9 -0
- package/src/rsc-runtime/ssr.ts +51 -0
- package/src/rsc-runtime/transforms.ts +13 -0
- package/src/rsc-runtime/vendor-types.d.ts +19 -0
- package/src/schema-bridge.ts +380 -0
- package/src/search-params/define.ts +677 -0
- package/src/search-params/index.ts +14 -20
- package/src/search-params/parse-total.ts +91 -0
- package/src/search-params/serialize-equal.ts +14 -0
- package/src/search-params/wrappers.ts +150 -0
- package/src/server/access-gate.tsx +196 -57
- package/src/server/action-client.ts +136 -35
- package/src/server/action-encryption.ts +144 -0
- package/src/server/action-handler.ts +256 -56
- package/src/server/actions.ts +112 -68
- package/src/server/als-registry.ts +160 -21
- package/src/server/asset-headers.ts +15 -37
- package/src/server/body-limits.ts +10 -2
- package/src/server/build-manifest.ts +33 -57
- package/src/server/canonicalize.ts +6 -3
- package/src/server/chain-url-parts.ts +163 -0
- package/src/server/children-interception.ts +115 -0
- package/src/server/coalesce-tick.ts +75 -0
- package/src/server/compress.ts +43 -8
- package/src/server/cookie-context.ts +484 -0
- package/src/server/cookie-parsing.ts +163 -0
- package/src/server/csp-nonce.ts +70 -0
- package/src/server/csrf.ts +39 -6
- package/src/server/debug.ts +137 -0
- package/src/server/default-logger.ts +99 -0
- package/src/server/default-status-page.ts +88 -0
- package/src/server/deny-boundary.ts +533 -0
- package/src/server/deny-renderer.ts +214 -112
- package/src/server/dev-source-map.ts +31 -0
- package/src/server/early-hints-sender.ts +4 -3
- package/src/server/early-hints.ts +39 -29
- package/src/server/error-boundary-wrapper.ts +181 -44
- package/src/server/error-response-headers.ts +18 -0
- package/src/server/fallback-error.ts +79 -102
- package/src/server/flight-injection-state.ts +113 -0
- package/src/server/flight-scripts.ts +67 -0
- package/src/server/form-data.ts +124 -12
- package/src/server/form-flash.ts +2 -2
- package/src/server/head-response.ts +54 -0
- package/src/server/html-injector-core.ts +512 -0
- package/src/server/html-injectors.ts +272 -235
- package/src/server/index.ts +40 -192
- package/src/server/instrumentation.ts +1 -1
- package/src/server/internal.ts +173 -0
- package/src/server/logger.ts +73 -36
- package/src/server/metadata-collector.ts +174 -0
- package/src/server/metadata-platform.ts +2 -2
- package/src/server/metadata-render.ts +30 -8
- package/src/server/metadata-routes.ts +205 -24
- package/src/server/metadata-social.ts +2 -2
- package/src/server/metadata.ts +23 -2
- package/src/server/middleware-runner.ts +32 -5
- package/src/server/node-stream-transforms.ts +323 -0
- package/src/server/nuqs-ssr-provider.tsx +8 -7
- package/src/server/param-coercion.ts +198 -0
- package/src/server/pipeline-helpers.ts +159 -0
- package/src/server/pipeline-interception.ts +109 -33
- package/src/server/pipeline-metadata.ts +15 -1
- package/src/server/pipeline-outcome.ts +218 -0
- package/src/server/pipeline-phases.ts +606 -0
- package/src/server/pipeline.ts +343 -389
- package/src/server/port-resolution.ts +53 -0
- package/src/server/prebuilt/cache-key.ts +299 -0
- package/src/server/prebuilt/capture-state.ts +89 -0
- package/src/server/prebuilt/key-discipline.ts +122 -0
- package/src/server/prebuilt/manifest-tag-index.ts +46 -0
- package/src/server/prebuilt/overlay.ts +256 -0
- package/src/server/prebuilt/payload-source.ts +202 -0
- package/src/server/prebuilt/slots.ts +190 -0
- package/src/server/prebuilt/synthetic-store.ts +122 -0
- package/src/server/prebuilt-builder.ts +804 -0
- package/src/server/prebuilt-runtime.ts +817 -0
- package/src/server/primitives.ts +246 -97
- package/src/server/publish-params.ts +42 -0
- package/src/server/render-timeout.ts +108 -0
- package/src/server/render-utils.ts +35 -0
- package/src/server/request-context.ts +244 -333
- package/src/server/request-dep.ts +37 -0
- package/src/server/response-cache-policy.ts +45 -0
- package/src/server/route-element-builder.ts +508 -360
- package/src/server/route-element-helpers.ts +37 -0
- package/src/server/route-handler.ts +40 -13
- package/src/server/route-matcher.ts +165 -272
- package/src/server/route-module-loader.ts +161 -0
- package/src/server/rsc-cache-key-guard.ts +122 -0
- package/src/server/rsc-entry/action-middleware-runner.ts +174 -0
- package/src/server/rsc-entry/api-handler.ts +78 -34
- package/src/server/rsc-entry/deny-fallback.ts +93 -0
- package/src/server/rsc-entry/error-renderer.ts +373 -95
- package/src/server/rsc-entry/helpers.ts +226 -95
- package/src/server/rsc-entry/index.ts +405 -323
- package/src/server/rsc-entry/render-route.ts +304 -0
- package/src/server/rsc-entry/revalidate-renderer.ts +350 -0
- package/src/server/rsc-entry/rsc-payload.ts +239 -50
- package/src/server/rsc-entry/rsc-stream.ts +160 -30
- package/src/server/rsc-entry/ssr-bridge.ts +18 -5
- package/src/server/rsc-entry/ssr-renderer.ts +315 -57
- package/src/server/rsc-entry/wrap-action-dispatch.ts +186 -0
- package/src/server/rsc-error-envelope.ts +18 -0
- package/src/server/rsc-prop-warnings.ts +3 -1
- package/src/server/safe-load.ts +60 -0
- package/src/server/sensitive-fields.ts +230 -0
- package/src/server/server-only-guard-noop.js +3 -0
- package/src/server/server-timing.ts +1 -1
- package/src/server/sitemap-generator.ts +337 -0
- package/src/server/sitemap-handler.ts +157 -0
- package/src/server/skippable-prefix.ts +172 -0
- package/src/server/slot-interception.ts +168 -0
- package/src/server/slot-resolver.ts +707 -300
- package/src/server/slot-subtree-contain.ts +255 -0
- package/src/server/ssr-bridge-types.ts +165 -0
- package/src/server/ssr-entry.ts +230 -85
- package/src/server/ssr-render.ts +357 -85
- package/src/server/ssr-wrappers.tsx +162 -0
- package/src/server/state-tree-diff.ts +85 -30
- package/src/server/static-generator.ts +715 -0
- package/src/server/static-not-found.ts +134 -0
- package/src/server/status-code-resolver.ts +107 -148
- package/src/server/stream-utils.ts +292 -0
- package/src/server/tracing.ts +151 -16
- package/src/server/tree-match.ts +262 -0
- package/src/server/types.ts +95 -10
- package/src/server/utils/element-type.ts +88 -0
- package/src/server/utils/escape-html.ts +20 -0
- package/src/server/utils/mdx-file.ts +22 -0
- package/src/server/version-skew.ts +104 -0
- package/src/server/waituntil-bridge.ts +5 -2
- package/src/server/workers-cache-bridge.ts +33 -0
- package/src/shared/als-slots.ts +74 -0
- package/src/shared/base-path.ts +80 -0
- package/src/shared/href-validation.ts +159 -0
- package/src/shared/merge-search-params.ts +55 -0
- package/src/shared/param-value.ts +281 -0
- package/src/shared/payload-root.ts +152 -0
- package/src/shared/redirect-type.ts +17 -0
- package/src/shared/rsc-cache-key.ts +269 -0
- package/src/shared/rsc-error-envelope.ts +16 -0
- package/src/shared/rsc-manifest.ts +29 -0
- package/src/shared/rsc-media-type.ts +59 -0
- package/src/shared/rsc-payload-path.ts +45 -0
- package/src/shared/segment-info.ts +67 -0
- package/src/shared/slot-params.ts +109 -0
- package/src/shared/static-platform-files.ts +75 -0
- package/src/shared/status-reason-phrase.ts +61 -0
- package/src/shims/font-google.ts +1 -1
- package/src/shims/font-local.ts +34 -0
- package/src/shims/headers.ts +122 -1
- package/src/shims/navigation-client.ts +36 -32
- package/src/shims/navigation-rsc.ts +47 -0
- package/src/shims/navigation.ts +10 -7
- package/src/utils/state-machine.ts +111 -0
- package/dist/_chunks/als-registry-k-AtAQ9R.js +0 -41
- package/dist/_chunks/als-registry-k-AtAQ9R.js.map +0 -1
- package/dist/_chunks/format-DNt20Kt8.js +0 -163
- package/dist/_chunks/format-DNt20Kt8.js.map +0 -1
- package/dist/_chunks/interception-DGDIjDbR.js +0 -676
- package/dist/_chunks/interception-DGDIjDbR.js.map +0 -1
- package/dist/_chunks/metadata-routes-CQCnF4VK.js +0 -153
- package/dist/_chunks/metadata-routes-CQCnF4VK.js.map +0 -1
- package/dist/_chunks/request-context-CRj2Zh1E.js +0 -329
- package/dist/_chunks/request-context-CRj2Zh1E.js.map +0 -1
- package/dist/_chunks/ssr-data-DLnbYpj1.js.map +0 -1
- package/dist/_chunks/tracing-DF0G3FB7.js +0 -173
- package/dist/_chunks/tracing-DF0G3FB7.js.map +0 -1
- package/dist/_chunks/use-cookie-dDbpCTx-.js +0 -91
- package/dist/_chunks/use-cookie-dDbpCTx-.js.map +0 -1
- package/dist/_chunks/use-query-states-DAhgj8Gx.js +0 -109
- package/dist/_chunks/use-query-states-DAhgj8Gx.js.map +0 -1
- package/dist/adapters/cloudflare.js.map +0 -1
- package/dist/cache/index.js.map +0 -1
- package/dist/cache/register-cached-function.d.ts +0 -17
- package/dist/cache/register-cached-function.d.ts.map +0 -1
- package/dist/client/browser-entry.d.ts +0 -21
- package/dist/client/browser-entry.d.ts.map +0 -1
- package/dist/client/error-boundary.js.map +0 -1
- package/dist/client/head.d.ts +0 -16
- package/dist/client/head.d.ts.map +0 -1
- package/dist/client/link-status-provider.d.ts +0 -11
- package/dist/client/link-status-provider.d.ts.map +0 -1
- package/dist/client/segment-merger.d.ts +0 -119
- package/dist/client/segment-merger.d.ts.map +0 -1
- package/dist/client/stale-reload.d.ts +0 -44
- package/dist/client/stale-reload.d.ts.map +0 -1
- package/dist/client/transition-root.d.ts +0 -74
- package/dist/client/transition-root.d.ts.map +0 -1
- package/dist/client/use-navigation-pending.d.ts +0 -26
- package/dist/client/use-navigation-pending.d.ts.map +0 -1
- package/dist/client/use-params.d.ts +0 -92
- package/dist/client/use-params.d.ts.map +0 -1
- package/dist/content/index.d.ts +0 -11
- package/dist/content/index.d.ts.map +0 -1
- package/dist/content/index.js +0 -2
- package/dist/plugins/cache-transform.d.ts +0 -36
- package/dist/plugins/cache-transform.d.ts.map +0 -1
- package/dist/plugins/dev-error-overlay.d.ts +0 -60
- package/dist/plugins/dev-error-overlay.d.ts.map +0 -1
- package/dist/plugins/dev-logs.d.ts.map +0 -1
- package/dist/plugins/dynamic-transform.d.ts +0 -72
- package/dist/plugins/dynamic-transform.d.ts.map +0 -1
- package/dist/plugins/server-action-exports.d.ts +0 -26
- package/dist/plugins/server-action-exports.d.ts.map +0 -1
- package/dist/routing/status-file-lint.d.ts +0 -33
- package/dist/routing/status-file-lint.d.ts.map +0 -1
- package/dist/search-params/analyze.d.ts +0 -54
- package/dist/search-params/analyze.d.ts.map +0 -1
- package/dist/search-params/builtin-codecs.d.ts +0 -105
- package/dist/search-params/builtin-codecs.d.ts.map +0 -1
- package/dist/search-params/codecs.d.ts +0 -53
- package/dist/search-params/codecs.d.ts.map +0 -1
- package/dist/search-params/create.d.ts +0 -106
- package/dist/search-params/create.d.ts.map +0 -1
- package/dist/search-params/registry.d.ts +0 -20
- package/dist/search-params/registry.d.ts.map +0 -1
- package/dist/server/client-module-map.d.ts +0 -47
- package/dist/server/client-module-map.d.ts.map +0 -1
- package/dist/server/dev-fetch-instrumentation.d.ts +0 -22
- package/dist/server/dev-fetch-instrumentation.d.ts.map +0 -1
- package/dist/server/dev-logger.d.ts.map +0 -1
- package/dist/server/dev-span-processor.d.ts +0 -29
- package/dist/server/dev-span-processor.d.ts.map +0 -1
- package/dist/server/dev-warnings.d.ts +0 -129
- package/dist/server/dev-warnings.d.ts.map +0 -1
- package/dist/server/flush.d.ts +0 -74
- package/dist/server/flush.d.ts.map +0 -1
- package/dist/server/manifest-status-resolver.d.ts +0 -58
- package/dist/server/manifest-status-resolver.d.ts.map +0 -1
- package/dist/server/prerender.d.ts +0 -77
- package/dist/server/prerender.d.ts.map +0 -1
- package/dist/server/tree-builder.d.ts +0 -126
- package/dist/server/tree-builder.d.ts.map +0 -1
- package/dist/utils/directive-parser.d.ts +0 -70
- package/dist/utils/directive-parser.d.ts.map +0 -1
- package/src/cache/register-cached-function.ts +0 -99
- package/src/client/browser-entry.ts +0 -674
- package/src/client/head.ts +0 -61
- package/src/client/link-status-provider.tsx +0 -30
- package/src/client/segment-merger.ts +0 -345
- package/src/client/stale-reload.ts +0 -89
- package/src/client/transition-root.tsx +0 -160
- package/src/client/use-navigation-pending.ts +0 -38
- package/src/client/use-params.ts +0 -141
- package/src/content/index.ts +0 -13
- package/src/plugins/cache-transform.ts +0 -199
- package/src/plugins/dev-error-overlay.ts +0 -230
- package/src/plugins/dynamic-transform.ts +0 -161
- package/src/plugins/server-action-exports.ts +0 -220
- package/src/routing/status-file-lint.ts +0 -112
- package/src/search-params/analyze.ts +0 -192
- package/src/search-params/builtin-codecs.ts +0 -228
- package/src/search-params/codecs.ts +0 -153
- package/src/search-params/create.ts +0 -321
- package/src/search-params/registry.ts +0 -31
- package/src/server/client-module-map.ts +0 -58
- package/src/server/dev-fetch-instrumentation.ts +0 -96
- package/src/server/dev-span-processor.ts +0 -78
- package/src/server/dev-warnings.ts +0 -282
- package/src/server/flush.ts +0 -182
- package/src/server/manifest-status-resolver.ts +0 -215
- package/src/server/prerender.ts +0 -139
- package/src/server/tree-builder.ts +0 -382
- package/src/shims/server-only-noop.js +0 -6
- package/src/utils/directive-parser.ts +0 -529
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of an RSC payload's root row.
|
|
3
|
+
*
|
|
4
|
+
* Every tree the server sends the browser is serialized as
|
|
5
|
+
* `{ tree, params, slotParams }` — the route's element tree, plus the coerced
|
|
6
|
+
* params it rendered with, as *siblings* rather than as a wrapper around the
|
|
7
|
+
* tree. See design/41-global-params.md §"Transport".
|
|
8
|
+
*
|
|
9
|
+
* Two reasons it is a sibling field rather than a provider inside the payload
|
|
10
|
+
* (TIM-1297, which is TIM-1294's mechanism corrected):
|
|
11
|
+
*
|
|
12
|
+
* 1. **A provider inside the payload cannot serve a partial navigation.** The
|
|
13
|
+
* client keeps the previous tree and splices the new payload in at the
|
|
14
|
+
* first updated `SegmentOutlet`, so the payload's own provider lands
|
|
15
|
+
* *below* the retained region — and the retained region's root is the
|
|
16
|
+
* *departing* route's provider, which therefore wins for every reader in a
|
|
17
|
+
* skipped layout. Wrapping something above it does not help: context
|
|
18
|
+
* resolves to the nearest provider, and the departing one is nearer.
|
|
19
|
+
* Params belong to the *navigation*, so the provider has to be owned by the
|
|
20
|
+
* client, above the merge point, and there must be exactly one.
|
|
21
|
+
*
|
|
22
|
+
* 2. **Element props are not readable at the instant the root resolves.**
|
|
23
|
+
* Flight outlines a React element's props and fills the record in after the
|
|
24
|
+
* root row resolves, so a reader that unblocks on the root sees `{}` — and
|
|
25
|
+
* since the object is filled *in place*, its identity never changes and any
|
|
26
|
+
* memo keyed on it caches the empty snapshot permanently. A plain model
|
|
27
|
+
* field has no such window: the root chunk stays blocked until everything
|
|
28
|
+
* it references has resolved.
|
|
29
|
+
*
|
|
30
|
+
* This module is the single declaration of that shape. The server builds roots
|
|
31
|
+
* through `server/publish-params.ts` and the client reads them through the
|
|
32
|
+
* helpers here — producer and consumer do not each describe the payload.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import type { CoercedParams } from './param-value.ts';
|
|
36
|
+
import type { SlotParamsRecord } from './slot-params.ts';
|
|
37
|
+
|
|
38
|
+
/** The params published beside a tree. */
|
|
39
|
+
export interface PublishedParams {
|
|
40
|
+
/** The main route's coerced params. */
|
|
41
|
+
params: CoercedParams;
|
|
42
|
+
/** Per-slot params, or null when the route rendered no slots with params. */
|
|
43
|
+
slotParams: SlotParamsRecord | null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Params ready to publish: settled, or a promise the root provider suspends on.
|
|
48
|
+
*
|
|
49
|
+
* Both forms exist on purpose. The hydration path cannot await — `hydrateRoot`
|
|
50
|
+
* has to be called before the inline Flight stream has necessarily produced
|
|
51
|
+
* the root row — so it hands over the promise and suspends exactly where React
|
|
52
|
+
* was already going to suspend on the tree. Every other path settles it inside
|
|
53
|
+
* the navigation transition first, which is what keeps a decode failure inside
|
|
54
|
+
* the app's own error boundaries instead of above them (TIM-1297).
|
|
55
|
+
*/
|
|
56
|
+
export type ParamsSource = PublishedParams | Promise<PublishedParams>;
|
|
57
|
+
|
|
58
|
+
/** The root row of an RSC payload. */
|
|
59
|
+
export interface RscPayloadRoot extends PublishedParams {
|
|
60
|
+
/** The route's element tree. */
|
|
61
|
+
tree: unknown;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* What a reader gets when the value it was handed is not a payload root.
|
|
66
|
+
*
|
|
67
|
+
* In the browser this is unreachable for a real response: all four producers
|
|
68
|
+
* of a route payload go through `withPublishedParams`, and a client talking to
|
|
69
|
+
* a different build is answered with 204 at Stage 1c
|
|
70
|
+
* (`server/pipeline-phases.ts`) before any payload exists. It is reachable in
|
|
71
|
+
* the router's test/fallback path, where `decodeRsc` is absent and the
|
|
72
|
+
* "payload" is the raw response text.
|
|
73
|
+
*/
|
|
74
|
+
export const NO_PUBLISHED_PARAMS: PublishedParams = { params: {}, slotParams: null };
|
|
75
|
+
|
|
76
|
+
/** True when `value` carries published params — a root, or a read of one. */
|
|
77
|
+
function hasPublishedParams(value: unknown): value is PublishedParams {
|
|
78
|
+
return (
|
|
79
|
+
typeof value === 'object' &&
|
|
80
|
+
value !== null &&
|
|
81
|
+
'params' in value &&
|
|
82
|
+
typeof (value as PublishedParams).params === 'object' &&
|
|
83
|
+
(value as PublishedParams).params !== null
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Read the params published beside a tree.
|
|
89
|
+
*
|
|
90
|
+
* Accepts a payload root *or* a `PublishedParams` already split off one, so
|
|
91
|
+
* the client can pre-resolve on the navigation path and still hand the same
|
|
92
|
+
* value to the same provider. Never throws.
|
|
93
|
+
*/
|
|
94
|
+
export function readPublishedParams(source: unknown): PublishedParams {
|
|
95
|
+
if (!hasPublishedParams(source)) return NO_PUBLISHED_PARAMS;
|
|
96
|
+
return { params: source.params, slotParams: source.slotParams ?? null };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Read the renderable tree out of a payload root.
|
|
101
|
+
*
|
|
102
|
+
* Returns the value unchanged when it is not a root — the router's fallback
|
|
103
|
+
* path stores raw response text under the same name, and a test asserting on
|
|
104
|
+
* that text should see the text.
|
|
105
|
+
*/
|
|
106
|
+
export function readPayloadTree(root: unknown): unknown {
|
|
107
|
+
if (typeof root === 'object' && root !== null && 'tree' in root && hasPublishedParams(root)) {
|
|
108
|
+
return (root as RscPayloadRoot).tree;
|
|
109
|
+
}
|
|
110
|
+
return root;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** A decoded payload, split into the two things the client does with it. */
|
|
114
|
+
export interface SplitPayload {
|
|
115
|
+
/** The renderable tree — an element, or a thenable React suspends on. */
|
|
116
|
+
tree: unknown;
|
|
117
|
+
/**
|
|
118
|
+
* The params published beside it. Settled when the root already is, so the
|
|
119
|
+
* hydration path can render without an extra await.
|
|
120
|
+
*
|
|
121
|
+
* **Never rejects.** A decode failure has to surface where React renders
|
|
122
|
+
* `tree`, so the error boundary *around the tree* catches it. Rejecting here
|
|
123
|
+
* too would take down the provider above every boundary in the app, turning
|
|
124
|
+
* a contained failure into a blank page (TIM-1297).
|
|
125
|
+
*/
|
|
126
|
+
params: ParamsSource;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Split a decoded payload root into its tree and its params.
|
|
131
|
+
*
|
|
132
|
+
* Accepts a settled root or a thenable of one, and preserves which it was: a
|
|
133
|
+
* settled root splits synchronously, so no code path gains a suspend point it
|
|
134
|
+
* did not already have.
|
|
135
|
+
*/
|
|
136
|
+
export function splitPayloadRoot(root: unknown): SplitPayload {
|
|
137
|
+
if (
|
|
138
|
+
typeof root !== 'object' ||
|
|
139
|
+
root === null ||
|
|
140
|
+
typeof (root as PromiseLike<unknown>).then !== 'function'
|
|
141
|
+
) {
|
|
142
|
+
return { tree: readPayloadTree(root), params: readPublishedParams(root) };
|
|
143
|
+
}
|
|
144
|
+
const settled = root as PromiseLike<unknown>;
|
|
145
|
+
const tree = Promise.resolve(settled).then(readPayloadTree);
|
|
146
|
+
// The rejection still reaches React through its own read of `tree`; this
|
|
147
|
+
// only marks it handled for the case where nothing renders it (a partial
|
|
148
|
+
// navigation whose segment update finds no matching outlet).
|
|
149
|
+
tree.catch(() => {});
|
|
150
|
+
const params = Promise.resolve(settled).then(readPublishedParams, () => NO_PUBLISHED_PARAMS);
|
|
151
|
+
return { tree, params };
|
|
152
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Next.js redirect type discriminator.
|
|
3
|
+
*
|
|
4
|
+
* Provided for API compatibility with libraries that import `RedirectType`
|
|
5
|
+
* from `next/navigation`. In timber, `redirect()` always uses `replace`
|
|
6
|
+
* semantics (no history entry for the redirect itself).
|
|
7
|
+
*
|
|
8
|
+
* Lives in shared/ (isomorphic) so both the server primitives and the
|
|
9
|
+
* client-only next/navigation shim export the same definition without the
|
|
10
|
+
* client shim pulling in server code.
|
|
11
|
+
*/
|
|
12
|
+
export const RedirectType = {
|
|
13
|
+
push: 'push',
|
|
14
|
+
replace: 'replace',
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
export type RedirectTypeValue = (typeof RedirectType)[keyof typeof RedirectType];
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `_rsc` payload cache key — derived identically on both sides.
|
|
3
|
+
*
|
|
4
|
+
* The client puts this in the payload URL so the document and its Flight
|
|
5
|
+
* payload occupy different cache keys (TIM-1268). The server recomputes it
|
|
6
|
+
* from the received headers so a request cannot claim one client's key while
|
|
7
|
+
* sending another client's headers — see `server/rsc-cache-key-guard.ts`.
|
|
8
|
+
* Both sides must agree exactly, which is why the derivation lives here and
|
|
9
|
+
* not in either one.
|
|
10
|
+
*
|
|
11
|
+
* Isomorphic: no server or client imports. The browser bundle audit
|
|
12
|
+
* (`tests/client-bundle-audit.test.ts`) enforces the client half of that.
|
|
13
|
+
*
|
|
14
|
+
* See design/19-client-navigation.md §"The `_rsc` cache key".
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Digest length in hex characters. 128 bits: the origin guard compares a
|
|
19
|
+
* caller-supplied key against a recomputed one, so the relevant bound is a
|
|
20
|
+
* birthday attack (an attacker who can influence a victim's `X-Timber-URL`
|
|
21
|
+
* gets to search both sides), not second preimage. 64 bits would fall to
|
|
22
|
+
* ~2^32 work; 128 puts it at 2^64.
|
|
23
|
+
*/
|
|
24
|
+
const KEY_HEX_LENGTH = 32;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Marks a value as a framework-issued key, and versions the derivation.
|
|
28
|
+
*
|
|
29
|
+
* Without it, an application value that happened to be 32 lowercase hex — an
|
|
30
|
+
* MD5, a token — is indistinguishable from a forged claim: both are "the
|
|
31
|
+
* right shape, the wrong digest", and no information in the value separates
|
|
32
|
+
* them. So the exemption cannot key on shape alone.
|
|
33
|
+
*
|
|
34
|
+
* The prefix resolves that because it is anchored to the address the
|
|
35
|
+
* victim's own client uses. A payload lives at `?_rsc=1.<digest>`, so
|
|
36
|
+
* anything aimed at that cache entry must carry the prefix and therefore
|
|
37
|
+
* gets validated; anything without it cannot be addressing a payload URL at
|
|
38
|
+
* all, and is exempt as application data. An attacker cannot both hit the
|
|
39
|
+
* victim's cache key and dodge the check.
|
|
40
|
+
*
|
|
41
|
+
* The version component also gives the derivation a migration path: the
|
|
42
|
+
* client and the origin must agree byte for byte, so a future change to the
|
|
43
|
+
* canonical form can be rolled out by bumping this instead of a flag day.
|
|
44
|
+
*/
|
|
45
|
+
const KEY_PREFIX = '1.';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The request headers that vary an RSC payload response, in canonical
|
|
49
|
+
* casing — this list is also emitted verbatim as the response's `Vary`
|
|
50
|
+
* tokens (`server/pipeline.ts`), since "what varies the response" is one
|
|
51
|
+
* question with one answer, not two lists that happen to agree.
|
|
52
|
+
*
|
|
53
|
+
* This list is the contract, and it is enforced rather than trusted:
|
|
54
|
+
* `tests/rsc-cache-key.test.ts` asserts that the header names
|
|
55
|
+
* `buildRscHeaders()` can emit are exactly this set. A header added to the
|
|
56
|
+
* request without being added here fails that test, because a varying input
|
|
57
|
+
* outside the key is precisely the cache-poisoning hazard the key exists to
|
|
58
|
+
* close.
|
|
59
|
+
*
|
|
60
|
+
* **No credentials, session identifiers, or user-supplied content may be
|
|
61
|
+
* added.** Every value here is hashed into a URL, and URLs are logged by
|
|
62
|
+
* proxies, CDNs, and origin access logs. `fnv1aHash` is a cache-key hash,
|
|
63
|
+
* not a KDF — a low-entropy secret would be recoverable by brute force.
|
|
64
|
+
* Authentication travels on cookies, which never enter the key.
|
|
65
|
+
*/
|
|
66
|
+
export const RSC_KEY_HEADERS = [
|
|
67
|
+
'Accept',
|
|
68
|
+
'X-Timber-State-Tree',
|
|
69
|
+
'X-Timber-URL',
|
|
70
|
+
'X-Timber-Deployment-Id',
|
|
71
|
+
] as const;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Whether a value could be a key this module produced.
|
|
75
|
+
*
|
|
76
|
+
* `_rsc` is not a reserved parameter name — an application may already use
|
|
77
|
+
* it for its own search state, including for a value that happens to look
|
|
78
|
+
* like a digest. Anything without the `KEY_PREFIX` is therefore application
|
|
79
|
+
* data, not a claim on a payload cache key, and the origin guard leaves it
|
|
80
|
+
* alone rather than penalizing the response.
|
|
81
|
+
*
|
|
82
|
+
* Derived from `KEY_PREFIX` and `KEY_HEX_LENGTH` rather than spelled again,
|
|
83
|
+
* so the shape cannot drift from the digest that has to satisfy it.
|
|
84
|
+
*
|
|
85
|
+
* Ignoring a malformed value costs no protection: clients only ever send
|
|
86
|
+
* well-formed keys, so a URL bearing a malformed one is an address no
|
|
87
|
+
* legitimate request will ever ask for, and nothing can be poisoned at an
|
|
88
|
+
* address nobody reads.
|
|
89
|
+
*/
|
|
90
|
+
export function isRscCacheKeyShape(value: string): boolean {
|
|
91
|
+
if (!value.startsWith(KEY_PREFIX)) return false;
|
|
92
|
+
const digest = value.slice(KEY_PREFIX.length);
|
|
93
|
+
return digest.length === KEY_HEX_LENGTH && /^[0-9a-f]+$/.test(digest);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The query parameter carrying the payload cache key.
|
|
98
|
+
*
|
|
99
|
+
* Spelled here rather than at each of the four places that read or write it
|
|
100
|
+
* — the client that appends it, the origin guard that validates it, and the
|
|
101
|
+
* strip below — because it is a wire contract between two independent
|
|
102
|
+
* implementations, exactly like the digest itself.
|
|
103
|
+
*/
|
|
104
|
+
export const RSC_KEY_PARAM = '_rsc';
|
|
105
|
+
|
|
106
|
+
// ─── Keeping the key out of application state ────────────────────────────
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Decode one raw `name` or `value` the way `URLSearchParams` does:
|
|
110
|
+
* `application/x-www-form-urlencoded`, so `+` is a space.
|
|
111
|
+
*
|
|
112
|
+
* Malformed percent-escapes throw in `decodeURIComponent`. `URLSearchParams`
|
|
113
|
+
* leaves those bytes as-is rather than throwing, and so do we — a pair we
|
|
114
|
+
* cannot decode is by definition not the framework's, so it is kept.
|
|
115
|
+
*/
|
|
116
|
+
function formDecode(raw: string): string {
|
|
117
|
+
try {
|
|
118
|
+
return decodeURIComponent(raw.replace(/\+/g, ' '));
|
|
119
|
+
} catch {
|
|
120
|
+
return raw;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Remove framework-issued `_rsc` values from a raw query string.
|
|
126
|
+
*
|
|
127
|
+
* Only values matching `isRscCacheKeyShape` are removed. `_rsc` is not a
|
|
128
|
+
* reserved name (see that function), so `/search?_rsc=foo` is application
|
|
129
|
+
* state and survives — the same exemption the origin guard applies, derived
|
|
130
|
+
* from the same predicate so the two cannot disagree about what "ours"
|
|
131
|
+
* means.
|
|
132
|
+
*
|
|
133
|
+
* Operates on the raw string rather than round-tripping through
|
|
134
|
+
* `URLSearchParams`, so every surviving pair keeps its original bytes.
|
|
135
|
+
* Re-serializing would rewrite `?b` as `?b=` and `?a=%7E` as `?a=~` on RSC
|
|
136
|
+
* navigations only, which is the same class of inconsistency this function
|
|
137
|
+
* exists to remove.
|
|
138
|
+
*
|
|
139
|
+
* Matching decodes the name, because `?%5Frsc=<key>` is a `_rsc` parameter
|
|
140
|
+
* as far as `URLSearchParams` is concerned — the same reasoning as the
|
|
141
|
+
* guard's fast path.
|
|
142
|
+
*
|
|
143
|
+
* @param search - `url.search`, with or without the leading `?`.
|
|
144
|
+
* @returns The query string including a leading `?`, or `''` if empty.
|
|
145
|
+
*/
|
|
146
|
+
export function stripRscCacheKey(search: string): string {
|
|
147
|
+
const query = search.startsWith('?') ? search.slice(1) : search;
|
|
148
|
+
if (query === '') return '';
|
|
149
|
+
const kept = query.split('&').filter((pair) => {
|
|
150
|
+
const eq = pair.indexOf('=');
|
|
151
|
+
if (formDecode(eq === -1 ? pair : pair.slice(0, eq)) !== RSC_KEY_PARAM) return true;
|
|
152
|
+
return !isRscCacheKeyShape(eq === -1 ? '' : formDecode(pair.slice(eq + 1)));
|
|
153
|
+
});
|
|
154
|
+
const result = kept.join('&');
|
|
155
|
+
return result === '' ? '' : `?${result}`;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** A request's search state as application code should see it. */
|
|
159
|
+
export interface AppVisibleSearch {
|
|
160
|
+
/** Parsed params, with the framework's cache key removed. */
|
|
161
|
+
params: URLSearchParams;
|
|
162
|
+
/** The matching raw query string — `''` or `?…`. */
|
|
163
|
+
search: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The search state application code sees, for any request URL.
|
|
168
|
+
*
|
|
169
|
+
* The `_rsc` key rides on the payload URL of every RSC navigation and on no
|
|
170
|
+
* other request, so reading search params straight off `req.url` makes the
|
|
171
|
+
* same page observe different search state depending on whether it was
|
|
172
|
+
* reached by a full load or a client navigation — and lets the cache key
|
|
173
|
+
* leak into whatever the page builds from it: a canonical URL, a pagination
|
|
174
|
+
* link, an analytics payload (TIM-1272).
|
|
175
|
+
*
|
|
176
|
+
* Every application-facing derivation of search state goes through here.
|
|
177
|
+
* `params` and `search` are returned together, from one strip, because they
|
|
178
|
+
* are two views of one answer and were previously two expressions that had
|
|
179
|
+
* to agree.
|
|
180
|
+
*
|
|
181
|
+
* The raw request URL is deliberately untouched: `server/rsc-cache-key-guard.ts`
|
|
182
|
+
* still reads the parameter from `req.url` to bind the key to the request.
|
|
183
|
+
*/
|
|
184
|
+
export function appVisibleSearch(url: URL): AppVisibleSearch {
|
|
185
|
+
const search = stripRscCacheKey(url.search);
|
|
186
|
+
return { params: new URLSearchParams(search), search };
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Reads a header value by name. Must be case-insensitive — `Headers.get()`
|
|
191
|
+
* already is, and `recordLookup` below makes a plain record so.
|
|
192
|
+
*/
|
|
193
|
+
export type HeaderLookup = (name: string) => string | null | undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Compute the `_rsc` cache key for a request.
|
|
197
|
+
*
|
|
198
|
+
* Absent headers are omitted rather than sent as empty, so "header missing"
|
|
199
|
+
* and "header present but empty" produce different keys.
|
|
200
|
+
*
|
|
201
|
+
* Values are length-prefixed rather than delimiter-separated. Any delimiter
|
|
202
|
+
* can be forged by a value that contains it: with a `\0` separator, an
|
|
203
|
+
* `accept` of `a\nx-timber-url\0b` serializes identically to an `accept` of
|
|
204
|
+
* `a` alongside an `x-timber-url` of `b`, which would let one header claim
|
|
205
|
+
* another's key. HTTP forbids control characters in header values and both
|
|
206
|
+
* `fetch()` and the server runtime reject them, so this is defense in depth
|
|
207
|
+
* — but a length prefix is unambiguous for *any* content, which is a
|
|
208
|
+
* property worth having in a function whose whole job is to be agreed on by
|
|
209
|
+
* two independent implementations.
|
|
210
|
+
*
|
|
211
|
+
* SHA-256, truncated to 128 bits. A fast non-cryptographic hash is the
|
|
212
|
+
* obvious choice for a cache key and is the wrong one here: the origin
|
|
213
|
+
* *compares* this value against a recomputed one, which makes it a check.
|
|
214
|
+
* FNV-1a — used for timber's other cache keys — is a multiply-xor over a
|
|
215
|
+
* fixed field, so an attacker controlling a few bytes of any input (their
|
|
216
|
+
* own `X-Timber-URL`, say) can solve for a chosen digest rather than search
|
|
217
|
+
* for one, and forge a key belonging to somebody else.
|
|
218
|
+
*
|
|
219
|
+
* Returns `null` when no digest is available — `crypto.subtle` is absent in
|
|
220
|
+
* non-secure browsing contexts (plain `http://` on a LAN address). Callers
|
|
221
|
+
* must treat that as "no key", never as "key matches": the client omits the
|
|
222
|
+
* parameter and the server refuses to share-cache. That returns those
|
|
223
|
+
* clients to the pre-TIM-1268 posture, where `Vary` alone separates HTML
|
|
224
|
+
* from Flight — acceptable, because a non-secure origin has no shared-CDN
|
|
225
|
+
* caching story to protect in the first place.
|
|
226
|
+
*/
|
|
227
|
+
export async function rscCacheKey(lookup: HeaderLookup): Promise<string | null> {
|
|
228
|
+
const subtle = globalThis.crypto?.subtle;
|
|
229
|
+
if (!subtle) return null;
|
|
230
|
+
let canonical = '';
|
|
231
|
+
for (const name of RSC_KEY_HEADERS) {
|
|
232
|
+
const value = lookup(name);
|
|
233
|
+
if (value == null) continue;
|
|
234
|
+
// Lowercased in the canonical form so the two implementations cannot
|
|
235
|
+
// disagree over the casing of the constant they share.
|
|
236
|
+
canonical += `${name.toLowerCase()}:${value.length}:${value}`;
|
|
237
|
+
}
|
|
238
|
+
const digest = await subtle.digest('SHA-256', new TextEncoder().encode(canonical));
|
|
239
|
+
let hex = '';
|
|
240
|
+
for (const byte of new Uint8Array(digest, 0, KEY_HEX_LENGTH / 2)) {
|
|
241
|
+
hex += byte.toString(16).padStart(2, '0');
|
|
242
|
+
}
|
|
243
|
+
return KEY_PREFIX + hex;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* An unverifiable stand-in key, for the one case where the digest cannot be
|
|
248
|
+
* computed: `crypto.subtle` is absent in non-secure browsing contexts.
|
|
249
|
+
* `crypto.getRandomValues` is not gated that way, so it is available exactly
|
|
250
|
+
* where the digest is not.
|
|
251
|
+
*
|
|
252
|
+
* Carries `KEY_PREFIX` like any other key, so the origin reads it as a claim
|
|
253
|
+
* it cannot verify — and refuses to share-cache the response — rather than
|
|
254
|
+
* exempting it as application data. Lives here so the prefix has one home.
|
|
255
|
+
*/
|
|
256
|
+
export function randomRscCacheKey(): string {
|
|
257
|
+
const bytes = new Uint8Array(KEY_HEX_LENGTH / 2);
|
|
258
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
259
|
+
return KEY_PREFIX + [...bytes].map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** Build a case-insensitive lookup over a plain header record. */
|
|
263
|
+
export function recordLookup(headers: Record<string, string>): HeaderLookup {
|
|
264
|
+
const lowered: Record<string, string> = {};
|
|
265
|
+
for (const name of Object.keys(headers)) {
|
|
266
|
+
lowered[name.toLowerCase()] = headers[name];
|
|
267
|
+
}
|
|
268
|
+
return (name) => lowered[name.toLowerCase()];
|
|
269
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hard-navigate error envelope shared by the server and the client router.
|
|
3
|
+
*
|
|
4
|
+
* A client-navigation (RSC) request cannot carry an error *page* — the response
|
|
5
|
+
* body must be Flight data or the decoder crashes. Instead the server answers
|
|
6
|
+
* with this envelope: an `X-Timber-Error: 1` header and a minimal JSON body.
|
|
7
|
+
* The client treats it as "give up on SPA navigation and hard-navigate", and
|
|
8
|
+
* the resulting document request renders the real error page as HTML.
|
|
9
|
+
*
|
|
10
|
+
* The header name lives here so the four server producers and the single
|
|
11
|
+
* client consumer cannot drift apart. See design/10-error-handling.md
|
|
12
|
+
* §"Error Page Rendering for Client Navigation".
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** Header the client checks to decide whether to hard-navigate. */
|
|
16
|
+
export const TIMBER_ERROR_HEADER = 'X-Timber-Error';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The RSC manifest — the shape the static build writes and the client reads.
|
|
3
|
+
*
|
|
4
|
+
* In `output: 'static'` there is no server at navigation time and a generated
|
|
5
|
+
* `.rsc` file carries no response headers, so anything a navigation would
|
|
6
|
+
* normally learn from headers has to be inlined here at build time.
|
|
7
|
+
*
|
|
8
|
+
* Route params used to be such a thing (TIM-1255, TIM-1285). They are not any
|
|
9
|
+
* more: they ride inside the payload, on its root row, so the
|
|
10
|
+
* `.rsc` file carries them the same way it carries the tree, and the static
|
|
11
|
+
* path stopped needing a special case (TIM-1294). What is left is the content
|
|
12
|
+
* hash, which genuinely cannot live inside the file it names.
|
|
13
|
+
*
|
|
14
|
+
* Declared once rather than in each half. The producer
|
|
15
|
+
* (`plugins/static-build.ts`) and the consumer (`client/rsc-fetch.ts`) each
|
|
16
|
+
* had their own copy, and the copies drifted the moment a field was added to
|
|
17
|
+
* one — a static SPA navigation then committed `null` for the field the
|
|
18
|
+
* producer was faithfully writing.
|
|
19
|
+
*
|
|
20
|
+
* Isomorphic: no server, client, or build-time imports.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
export interface RscManifestEntry {
|
|
24
|
+
/** The content-hashed URL the payload actually lives at, in route space. */
|
|
25
|
+
url: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Keyed by the unhashed `/_rsc/*.rsc` path. */
|
|
29
|
+
export type RscManifest = Record<string, RscManifestEntry>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The RSC Flight media type, and the request predicate over it.
|
|
3
|
+
*
|
|
4
|
+
* One module owns the string because two independently-written spellings of
|
|
5
|
+
* "is this an RSC request?" must agree, and the consequence of them
|
|
6
|
+
* disagreeing is cache poisoning rather than a visible bug. The Cloudflare
|
|
7
|
+
* adapter's `isRsc` decides what may enter the edge cache; the origin's
|
|
8
|
+
* pipeline decides which headers may vary the response. TIM-1269 made the
|
|
9
|
+
* adapter's `VARY_HONORED` allowlist exempt `Accept` *because* `isRsc`
|
|
10
|
+
* excludes Flight responses from the cache, and exempt the `X-Timber-*`
|
|
11
|
+
* headers *because* the origin reads them only behind its own RSC check. If
|
|
12
|
+
* one predicate is ever tightened (a real media-type parse, a
|
|
13
|
+
* parameter-aware match) and the other is not, the adapter can classify a
|
|
14
|
+
* request as a document while the origin treats it as RSC, and store a
|
|
15
|
+
* Flight payload under the document's key — the class
|
|
16
|
+
* `design/48-payload-addressing.md` exists to prevent.
|
|
17
|
+
*
|
|
18
|
+
* `tests/rsc-media-type-single-source.test.ts` fails if the literal reappears
|
|
19
|
+
* in executable source outside this file.
|
|
20
|
+
*
|
|
21
|
+
* Isomorphic: zero imports, so `adapters/cloudflare.ts` — which Node's native
|
|
22
|
+
* ESM loader evaluates before Vite's resolver exists — can load it and
|
|
23
|
+
* interpolate the value into the generated worker. Same precedent as
|
|
24
|
+
* `shared/rsc-cache-key.ts`.
|
|
25
|
+
*
|
|
26
|
+
* See design/19-client-navigation.md, design/25-production-deployments.md
|
|
27
|
+
* §"`Vary` and the Workers Cache API".
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/** Media type of a React Flight payload. */
|
|
31
|
+
export const RSC_CONTENT_TYPE = 'text/x-component';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Is this request asking for an RSC payload rather than a full document?
|
|
35
|
+
*
|
|
36
|
+
* Substring containment, deliberately: `Accept` is a list, and a client may
|
|
37
|
+
* send `text/x-component;charset=utf-8` or list it alongside other types.
|
|
38
|
+
* Tightening this to a real media-type parse is a behaviour change that has
|
|
39
|
+
* to move the adapter's generated `isRsc` in the same commit — see above.
|
|
40
|
+
*/
|
|
41
|
+
export function isRscRequest(req: Request): boolean {
|
|
42
|
+
return (req.headers.get('Accept') ?? '').includes(RSC_CONTENT_TYPE);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Does this Content-Type header value designate an RSC Flight payload?
|
|
47
|
+
*
|
|
48
|
+
* Case-insensitive exact media-type match per RFC 9110 §8.3.1 — media types
|
|
49
|
+
* are case-insensitive. Parameters (`;charset=utf-8`) are stripped before
|
|
50
|
+
* comparison.
|
|
51
|
+
*
|
|
52
|
+
* Contrast with `isRscRequest`, which uses substring containment because
|
|
53
|
+
* `Accept` is a list of types. A `Content-Type` header names exactly one
|
|
54
|
+
* type, so substring would over-match (e.g. `text/x-component-v2`).
|
|
55
|
+
*/
|
|
56
|
+
export function isRscContentType(contentType: string | null): boolean {
|
|
57
|
+
if (!contentType) return false;
|
|
58
|
+
return contentType.split(';')[0].trim().toLowerCase() === RSC_CONTENT_TYPE;
|
|
59
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a route's Flight payload lives in `output: 'static'`.
|
|
3
|
+
*
|
|
4
|
+
* The static build writes these files and the client fetches them, so the two
|
|
5
|
+
* halves must agree byte for byte. They used to state the naming rule
|
|
6
|
+
* separately — `plugins/static-build.ts` for the write and
|
|
7
|
+
* `client/rsc-fetch.ts` for the read — which is a duplicate representation with
|
|
8
|
+
* nothing checking it. One function now, called by both.
|
|
9
|
+
*
|
|
10
|
+
* ## The shape
|
|
11
|
+
*
|
|
12
|
+
* The payload path mirrors the HTML path: every route gets a directory and the
|
|
13
|
+
* artifact is the `index` inside it.
|
|
14
|
+
*
|
|
15
|
+
* / → /_rsc/index.rsc (cf. index.html)
|
|
16
|
+
* /about → /_rsc/about/index.rsc (cf. about/index.html)
|
|
17
|
+
* /blog/hello → /_rsc/blog/hello/index.rsc
|
|
18
|
+
*
|
|
19
|
+
* That shape is **injective**, which the previous one (`/about` →
|
|
20
|
+
* `/_rsc/about.rsc`, root → `/_rsc/index.rsc`) was not: a site with both `/`
|
|
21
|
+
* and `/index` produced two payloads at `_rsc/index.rsc`, and the second write
|
|
22
|
+
* won silently — a client navigation to one route was served the other route's
|
|
23
|
+
* payload, same content type and same shape, undetectable downstream
|
|
24
|
+
* (TIM-1266).
|
|
25
|
+
*
|
|
26
|
+
* Injectivity holds because two distinct non-root routes give distinct
|
|
27
|
+
* directories, and the root's `/_rsc/index.rsc` has no directory component for
|
|
28
|
+
* a non-root route to occupy — reaching it would need an empty route path,
|
|
29
|
+
* which is not a route.
|
|
30
|
+
*
|
|
31
|
+
* Isomorphic: no server, client, or build-time imports.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The route-space path of a route's static Flight payload.
|
|
36
|
+
*
|
|
37
|
+
* @param routePath A route-space pathname: leading slash, no deployment base,
|
|
38
|
+
* no query or fragment, no trailing slash (except the root `/`). Callers
|
|
39
|
+
* normalize; this function does not, because the two callers normalize from
|
|
40
|
+
* different sources (a browser URL, a build-time route entry).
|
|
41
|
+
*/
|
|
42
|
+
export function rscPayloadPath(routePath: string): string {
|
|
43
|
+
const prefix = routePath === '/' ? '' : routePath;
|
|
44
|
+
return `/_rsc${prefix}/index.rsc`;
|
|
45
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The segment metadata wire contract between server and client.
|
|
3
|
+
*
|
|
4
|
+
* One declaration, imported by both ends. The producer
|
|
5
|
+
* (`server/rsc-entry/helpers.ts` → `X-Timber-Segments` and the
|
|
6
|
+
* `self.__timber_segments` bootstrap script) and the consumers
|
|
7
|
+
* (`client/segment-cache.ts`, the history stack, the prefetch cache) used to
|
|
8
|
+
* declare this shape separately, which is how a field gets added to one side
|
|
9
|
+
* only.
|
|
10
|
+
*
|
|
11
|
+
* See design/19-client-navigation.md §"X-Timber-State-Tree Header"
|
|
12
|
+
* See design/07-routing.md §"Intercepting Routes"
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Metadata for one rendered segment or slot, sent via `X-Timber-Segments`.
|
|
17
|
+
*/
|
|
18
|
+
export interface SegmentInfo {
|
|
19
|
+
/** The segment's URL path (e.g. `/`, `/feed`), or the slot key for slots. */
|
|
20
|
+
path: string;
|
|
21
|
+
/** Outlet key — includes route group name when applicable (e.g. `/(marketing)`). */
|
|
22
|
+
segmentId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The segment's directory path in `app/`, groups included and slots elided
|
|
25
|
+
* (e.g. `app/(browse)/feed` → `/(browse)/feed`). Absent on slot entries.
|
|
26
|
+
*
|
|
27
|
+
* This is the identity interception scoping compares against, and it is the
|
|
28
|
+
* reason it travels: `path`/`segmentId` are URL-addressed and collapse
|
|
29
|
+
* `(browse)/feed` and `(landing)/feed` to the same key, while a scope has to
|
|
30
|
+
* tell those two directories apart. See `computeSegmentTreePaths`.
|
|
31
|
+
*/
|
|
32
|
+
treePath?: string;
|
|
33
|
+
isRequestDependent: boolean;
|
|
34
|
+
/** True for parallel route slot entries, keyed by slot path (e.g. `/@sidebar`). */
|
|
35
|
+
slot?: boolean;
|
|
36
|
+
/** Parent segment path for slot entries — attaches the slot to its SegmentNode. */
|
|
37
|
+
parentSegment?: string;
|
|
38
|
+
/** True when the slot's access.ts denied on this render. Denied slots are excluded from the state tree. */
|
|
39
|
+
denied?: boolean;
|
|
40
|
+
/** True when the slot was skipped (cached content reused). Payloads with skipped slots are not replayable. */
|
|
41
|
+
skipped?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Content key for slot entries — encodes owner parts, slot name, matched
|
|
44
|
+
* entry file, and slot params. The client stores and advertises this key;
|
|
45
|
+
* the server computes the destination key and checks membership.
|
|
46
|
+
* Replaces URL-based departing/destination diffing (TIM-1370).
|
|
47
|
+
*/
|
|
48
|
+
contentKey?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The client's `X-Timber-State-Tree` request header.
|
|
53
|
+
*
|
|
54
|
+
* `segments` and `slots` are a caching optimization — they tell the server what
|
|
55
|
+
* the client can reuse. `treePaths` is not: it describes the *shape* of the
|
|
56
|
+
* tree currently on screen, so the server can answer "does the rendered route
|
|
57
|
+
* pass through the segment that owns this intercepting slot?" without
|
|
58
|
+
* re-deriving it from the address bar, which stops being the source route the
|
|
59
|
+
* moment a modal is open (TIM-1282).
|
|
60
|
+
*
|
|
61
|
+
* None of the three is a security input. Every `access.ts` runs regardless.
|
|
62
|
+
*/
|
|
63
|
+
export interface StateTree {
|
|
64
|
+
segments: string[];
|
|
65
|
+
slots?: string[];
|
|
66
|
+
treePaths?: string[];
|
|
67
|
+
}
|