@timber-js/app 0.2.0-alpha.191 → 0.2.0-alpha.194
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/agent-skill.md +2 -0
- package/dist/_chunks/{actions-BjbbNRFN.js → actions-CWYtq6ii.js} +3 -3
- package/dist/_chunks/actions-CWYtq6ii.js.map +1 -0
- package/dist/_chunks/als-registry-C6kcfprT.js.map +1 -1
- package/dist/_chunks/als-slots-BEEIPKYm.js.map +1 -1
- package/dist/_chunks/{build-output-helper-C3DrfzZR.js → build-output-helper-9dqCv1pZ.js} +3 -2
- package/dist/_chunks/build-output-helper-9dqCv1pZ.js.map +1 -0
- package/dist/_chunks/{cache-api-DllJ-Lyw.js → cache-api-CQeYzA5g.js} +6 -8
- package/dist/_chunks/cache-api-CQeYzA5g.js.map +1 -0
- package/dist/_chunks/chains-h7EO-u3n.js +412 -0
- package/dist/_chunks/chains-h7EO-u3n.js.map +1 -0
- package/dist/_chunks/{cli-check-DJZDc22E.js → cli-check-BVthpfLS.js} +43 -6
- package/dist/_chunks/cli-check-BVthpfLS.js.map +1 -0
- package/dist/_chunks/{cli-schema-sync-D4_AZVUb.js → cli-schema-sync-ZwM9u_ob.js} +6 -5
- package/dist/_chunks/{cli-schema-sync-D4_AZVUb.js.map → cli-schema-sync-ZwM9u_ob.js.map} +1 -1
- package/dist/_chunks/{cloudflare-CGP6BZKO.js → cloudflare-BKJC3SC_.js} +28 -22
- package/dist/_chunks/{cloudflare-CGP6BZKO.js.map → cloudflare-BKJC3SC_.js.map} +1 -1
- package/dist/_chunks/codec-registry-oOUxugz3.js.map +1 -1
- package/dist/_chunks/{convention-lint-CpteIpTm.js → convention-lint-DO10_pVl.js} +93 -7
- package/dist/_chunks/convention-lint-DO10_pVl.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-D-ODYX41.js.map +1 -1
- package/dist/_chunks/{file-cache-DmX7OqZP.js → file-cache-Dw6BJPG7.js} +5 -1
- package/dist/_chunks/{file-cache-DmX7OqZP.js.map → file-cache-Dw6BJPG7.js.map} +1 -1
- package/dist/_chunks/{format-CfwjgPz9.js → format-BKclgVbk.js} +3 -3
- package/dist/_chunks/{format-CfwjgPz9.js.map → format-BKclgVbk.js.map} +1 -1
- package/dist/_chunks/graph-cache-CP4GEmf9.js +304 -0
- package/dist/_chunks/graph-cache-CP4GEmf9.js.map +1 -0
- package/dist/_chunks/href-validation-CMc5JRls.js.map +1 -1
- package/dist/_chunks/live-graph-Bx4HodF1.js +150 -0
- package/dist/_chunks/live-graph-Bx4HodF1.js.map +1 -0
- package/dist/_chunks/{logger-CH7IcMmg.js → logger-pumCm3Il.js} +25 -7
- package/dist/_chunks/{logger-CH7IcMmg.js.map → logger-pumCm3Il.js.map} +1 -1
- package/dist/_chunks/{mdx-file-C005ay-P.js → mdx-file-CXyHGUpS.js} +3 -3
- package/dist/_chunks/mdx-file-CXyHGUpS.js.map +1 -0
- package/dist/_chunks/{plugin-context-rCinWLiE.js → plugin-context-8idfR3UZ.js} +2 -2
- 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-BAxfTT5L.js +101 -0
- package/dist/_chunks/poison-scan-BAxfTT5L.js.map +1 -0
- package/dist/_chunks/resolve-schema-CBR6Lm4i.js.map +1 -1
- package/dist/_chunks/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/_chunks/router-ref-DuYuV_0Q.js.map +1 -1
- package/dist/_chunks/{rsc-media-type-DRqE_lD_.js → rsc-media-type-DDc7duTD.js} +17 -2
- package/dist/_chunks/{rsc-media-type-DRqE_lD_.js.map → rsc-media-type-DDc7duTD.js.map} +1 -1
- package/dist/_chunks/scan-BoP17W3w.js +140 -0
- package/dist/_chunks/scan-BoP17W3w.js.map +1 -0
- package/dist/_chunks/{scanner-CAietmj4.js → scanner-BRIOmHE2.js} +43 -4
- package/dist/_chunks/scanner-BRIOmHE2.js.map +1 -0
- package/dist/_chunks/schema-bridge-C83xa9lT.js.map +1 -1
- package/dist/_chunks/segment-classify-C539Pa2O.js.map +1 -1
- package/dist/_chunks/{segment-keys-BawYuNFO.js → segment-keys-BhqoHiLc.js} +14 -2
- package/dist/_chunks/{segment-keys-BawYuNFO.js.map → segment-keys-BhqoHiLc.js.map} +1 -1
- package/dist/_chunks/slot-params-BCTmZkQB.js.map +1 -1
- package/dist/_chunks/ssr-data-14MXm7Pj.js.map +1 -1
- package/dist/_chunks/use-query-states-I3JMng6J.js.map +1 -1
- package/dist/_chunks/use-segment-params-C4r4BD9T.js.map +1 -1
- package/dist/_chunks/{walkers-BsVLmD1S.js → walkers-uCu3WW6_.js} +9 -6
- package/dist/_chunks/{walkers-BsVLmD1S.js.map → walkers-uCu3WW6_.js.map} +1 -1
- package/dist/adapters/build-output-helper.d.ts +1 -1
- package/dist/adapters/build-output-helper.d.ts.map +1 -1
- package/dist/adapters/cloudflare-dev.d.ts.map +1 -1
- package/dist/adapters/cloudflare-dev.js +2 -1
- package/dist/adapters/cloudflare-dev.js.map +1 -1
- package/dist/adapters/cloudflare-kv-cache.d.ts +1 -1
- package/dist/adapters/cloudflare-kv-cache.d.ts.map +1 -1
- package/dist/adapters/cloudflare-kv-cache.js +7 -8
- package/dist/adapters/cloudflare-kv-cache.js.map +1 -1
- package/dist/adapters/cloudflare.d.ts +1 -1
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js +1 -1
- 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 +28 -51
- package/dist/adapters/nitro.d.ts.map +1 -1
- package/dist/adapters/nitro.js +224 -171
- package/dist/adapters/nitro.js.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 +2 -2
- package/dist/cache/cache-api.d.ts.map +1 -1
- package/dist/cache/index.d.ts +8 -8
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +1 -1
- package/dist/cache/redis-handler.d.ts +1 -1
- package/dist/cache/redis-handler.d.ts.map +1 -1
- package/dist/cache/stores/cloudflare-kv.d.ts +1 -1
- package/dist/cache/stores/cloudflare-kv.d.ts.map +1 -1
- package/dist/cache/stores/cloudflare-kv.js.map +1 -1
- package/dist/cache/stores/memory.d.ts +1 -1
- package/dist/cache/stores/memory.d.ts.map +1 -1
- package/dist/cache/stores/memory.js.map +1 -1
- package/dist/cache/stores/redis.d.ts +1 -1
- package/dist/cache/stores/redis.d.ts.map +1 -1
- package/dist/cache/stores/redis.js.map +1 -1
- package/dist/cache/stores/vercel.d.ts +1 -1
- package/dist/cache/stores/vercel.d.ts.map +1 -1
- package/dist/cache/stores/vercel.js.map +1 -1
- package/dist/cache/tag-aware-handler.d.ts +2 -2
- package/dist/cache/tag-aware-handler.d.ts.map +1 -1
- package/dist/cache/timber-cache.d.ts +1 -1
- package/dist/cache/timber-cache.d.ts.map +1 -1
- package/dist/cdn/cloudflare-purge.d.ts +1 -1
- package/dist/cdn/cloudflare-purge.d.ts.map +1 -1
- package/dist/cdn/cloudflare-purge.js.map +1 -1
- package/dist/cdn/fastly-purge.d.ts +1 -1
- package/dist/cdn/fastly-purge.d.ts.map +1 -1
- package/dist/cdn/fastly-purge.js.map +1 -1
- package/dist/cdn/index.d.ts +4 -4
- package/dist/cdn/index.d.ts.map +1 -1
- package/dist/cdn/workers-cache-purge.d.ts +5 -1
- package/dist/cdn/workers-cache-purge.d.ts.map +1 -1
- package/dist/cdn/workers-cache-purge.js.map +1 -1
- package/dist/cli-check.d.ts +10 -0
- package/dist/cli-check.d.ts.map +1 -1
- package/dist/cli.d.ts +12 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +30 -6
- package/dist/cli.js.map +1 -1
- package/dist/client/browser-entry/hydrate.d.ts +2 -2
- package/dist/client/browser-entry/hydrate.d.ts.map +1 -1
- package/dist/client/browser-entry/post-hydration.d.ts +2 -2
- package/dist/client/browser-entry/router-init.d.ts +2 -2
- package/dist/client/browser-entry/rsc-stream.d.ts +1 -1
- package/dist/client/form.d.ts +2 -2
- package/dist/client/form.d.ts.map +1 -1
- package/dist/client/history.d.ts +2 -2
- package/dist/client/index.d.ts +18 -18
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/internal.d.ts +19 -19
- package/dist/client/internal.d.ts.map +1 -1
- package/dist/client/internal.js +11 -15
- package/dist/client/internal.js.map +1 -1
- package/dist/client/link.d.ts +3 -3
- package/dist/client/navigation-commit.d.ts +5 -5
- package/dist/client/navigation-root.d.ts +1 -1
- package/dist/client/navigation-root.d.ts.map +1 -1
- package/dist/client/params-context.d.ts +3 -3
- package/dist/client/router-pipeline.d.ts +7 -7
- package/dist/client/router-ref.d.ts +1 -1
- package/dist/client/router-types.d.ts +6 -6
- package/dist/client/router-types.d.ts.map +1 -1
- package/dist/client/router.d.ts +1 -1
- package/dist/client/rsc-fetch.d.ts +4 -4
- package/dist/client/rsc-fetch.d.ts.map +1 -1
- package/dist/client/segment-cache.d.ts +2 -2
- package/dist/client/slot-provider.d.ts +1 -1
- package/dist/client/ssr-data.d.ts +2 -2
- package/dist/client/state.d.ts +4 -4
- package/dist/client/use-query-states.d.ts +1 -1
- package/dist/client/use-segment-params.d.ts +3 -3
- package/dist/codec.d.ts +2 -2
- package/dist/codec.js.map +1 -1
- package/dist/config-types.d.ts +24 -6
- package/dist/config-types.d.ts.map +1 -1
- package/dist/config-validation.d.ts +1 -1
- package/dist/cookies/define-cookie.d.ts +3 -3
- package/dist/cookies/index.d.ts +3 -3
- package/dist/cookies/index.js +3 -4
- package/dist/cookies/index.js.map +1 -1
- package/dist/cookies/json-cookie.d.ts +1 -1
- package/dist/dev-tools/404-page.d.ts +2 -2
- package/dist/dev-tools/error-page.d.ts +2 -2
- package/dist/dev-tools/index.d.ts +12 -12
- package/dist/dev-tools/instrumentation.d.ts +1 -1
- package/dist/dev-tools/logs.d.ts +1 -1
- package/dist/dev-tools/overlay.d.ts +2 -2
- package/dist/dev-tools/terminal.d.ts +1 -1
- package/dist/fonts/ast.d.ts +4 -4
- package/dist/fonts/bundle.d.ts +3 -3
- package/dist/fonts/css.d.ts +1 -1
- package/dist/fonts/dev-middleware.d.ts +1 -1
- package/dist/fonts/google.d.ts +1 -1
- package/dist/fonts/local.d.ts +1 -1
- package/dist/fonts/pipeline.d.ts +3 -3
- package/dist/fonts/transform.d.ts +2 -2
- package/dist/fonts/types.d.ts +1 -1
- package/dist/fonts/virtual-modules.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +816 -310
- package/dist/index.js.map +1 -1
- package/dist/params/codec-registry.d.ts +1 -1
- package/dist/params/define-schema.d.ts +2 -2
- package/dist/params/index.d.ts +4 -4
- package/dist/params/index.js.map +1 -1
- package/dist/params/resolve-schema.d.ts +1 -1
- package/dist/plugin-context.d.ts +9 -9
- package/dist/plugin-context.d.ts.map +1 -1
- package/dist/plugins/adapter-build.d.ts +2 -2
- package/dist/plugins/build-manifest.d.ts +2 -2
- package/dist/plugins/build-report.d.ts +5 -5
- package/dist/plugins/cache.d.ts +1 -1
- package/dist/plugins/callsite-jsx.d.ts +2 -2
- package/dist/plugins/chunks.d.ts +1 -1
- package/dist/plugins/chunks.d.ts.map +1 -1
- package/dist/plugins/cloudflare-wasm.d.ts +1 -1
- 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 +1 -1
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/plugins/entries.d.ts +1 -1
- package/dist/plugins/fonts.d.ts +3 -3
- 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 +18 -5
- package/dist/plugins/mdx.d.ts.map +1 -1
- package/dist/plugins/prebuilt-capture.d.ts +2 -2
- package/dist/plugins/prebuilt-options-analysis.d.ts +1 -1
- package/dist/plugins/prebuilt.d.ts +1 -1
- package/dist/plugins/prerender-sugar.d.ts +11 -14
- package/dist/plugins/prerender-sugar.d.ts.map +1 -1
- package/dist/plugins/request-dep/analysis.d.ts +1 -1
- package/dist/plugins/request-dep/index.d.ts +5 -5
- package/dist/plugins/request-dep/origin.d.ts +1 -1
- 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 +1 -1
- package/dist/plugins/shims.d.ts.map +1 -1
- package/dist/plugins/static-build.d.ts +5 -5
- package/dist/routing/codegen-shared.d.ts +1 -1
- package/dist/routing/codegen-write.d.ts +1 -1
- package/dist/routing/codegen.d.ts +1 -1
- package/dist/routing/collision-probe.d.ts +1 -1
- package/dist/routing/collision-spaces.d.ts +1 -1
- package/dist/routing/convention-lint.d.ts +1 -1
- package/dist/routing/convention-lint.d.ts.map +1 -1
- package/dist/routing/index.d.ts +13 -13
- package/dist/routing/index.js +3 -3
- package/dist/routing/interception.d.ts +1 -1
- package/dist/routing/interception.d.ts.map +1 -1
- package/dist/routing/link-codegen.d.ts +1 -1
- package/dist/routing/manifest-codegen.d.ts +1 -1
- package/dist/routing/scanner.d.ts +14 -1
- package/dist/routing/scanner.d.ts.map +1 -1
- package/dist/routing/schema-validation.d.ts +1 -1
- package/dist/routing/segment-classify.d.ts +1 -1
- package/dist/routing/segment-codegen.d.ts +1 -1
- package/dist/routing/segment-keys.d.ts +1 -1
- package/dist/routing/slot-placement.d.ts +1 -1
- package/dist/routing/walkers.d.ts +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 +1 -1
- package/dist/search-params/define.d.ts +3 -3
- package/dist/search-params/index.d.ts +3 -3
- package/dist/search-params/index.js.map +1 -1
- package/dist/search-params/wrappers.d.ts +1 -1
- package/dist/server/access-gate.d.ts +1 -1
- package/dist/server/action-client.d.ts +1 -1
- package/dist/server/action-handler.d.ts +5 -5
- package/dist/server/actions.d.ts +2 -2
- package/dist/server/als-registry.d.ts +8 -8
- package/dist/server/asset-headers.d.ts +1 -1
- package/dist/server/chain-url-parts.d.ts +3 -3
- package/dist/server/children-interception.d.ts +2 -2
- package/dist/server/cookie-context.d.ts +1 -1
- package/dist/server/cookie-parsing.d.ts +2 -2
- package/dist/server/default-logger.d.ts +1 -1
- package/dist/server/deny-boundary.d.ts +2 -2
- package/dist/server/deny-renderer.d.ts +5 -5
- package/dist/server/early-hints.d.ts +1 -1
- package/dist/server/error-boundary-wrapper.d.ts +2 -4
- package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
- package/dist/server/fallback-error.d.ts +5 -5
- package/dist/server/flight-injection-state.d.ts +1 -1
- package/dist/server/form-flash.d.ts +1 -1
- package/dist/server/html-injector-core.d.ts +2 -2
- package/dist/server/html-injectors.d.ts +1 -1
- package/dist/server/index.d.ts +18 -18
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +33 -32
- package/dist/server/index.js.map +1 -1
- package/dist/server/instrumentation.d.ts +1 -1
- package/dist/server/internal.d.ts +50 -50
- package/dist/server/internal.d.ts.map +1 -1
- package/dist/server/internal.js +1023 -1025
- package/dist/server/internal.js.map +1 -1
- package/dist/server/metadata-collector.d.ts +2 -2
- package/dist/server/metadata-platform.d.ts +2 -2
- package/dist/server/metadata-render.d.ts +2 -2
- package/dist/server/metadata-routes.d.ts +3 -3
- package/dist/server/metadata-social.d.ts +2 -2
- package/dist/server/metadata.d.ts +2 -2
- package/dist/server/middleware-runner.d.ts +1 -1
- package/dist/server/node-stream-transforms.d.ts +1 -1
- package/dist/server/param-coercion.d.ts +4 -4
- package/dist/server/pipeline-helpers.d.ts +3 -3
- package/dist/server/pipeline-interception.d.ts +1 -1
- package/dist/server/pipeline-metadata.d.ts +1 -1
- package/dist/server/pipeline-outcome.d.ts +2 -2
- package/dist/server/pipeline-phases.d.ts +3 -3
- package/dist/server/pipeline-phases.d.ts.map +1 -1
- package/dist/server/pipeline.d.ts +9 -9
- package/dist/server/prebuilt/cache-key.d.ts +1 -1
- package/dist/server/prebuilt/capture-state.d.ts +1 -1
- package/dist/server/prebuilt/key-discipline.d.ts +1 -1
- package/dist/server/prebuilt/manifest-tag-index.d.ts +1 -1
- package/dist/server/prebuilt/overlay.d.ts +2 -2
- package/dist/server/prebuilt/payload-source.d.ts +1 -1
- package/dist/server/prebuilt/slots.d.ts +1 -1
- package/dist/server/prebuilt/synthetic-store.d.ts +2 -2
- package/dist/server/prebuilt-builder.d.ts +2 -2
- package/dist/server/primitives.d.ts +2 -2
- package/dist/server/publish-params.d.ts +1 -1
- package/dist/server/request-context.d.ts +3 -3
- package/dist/server/route-element-builder.d.ts +16 -6
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/route-handler.d.ts +1 -1
- package/dist/server/route-matcher.d.ts +4 -4
- package/dist/server/rsc-cache-key-guard.d.ts.map +1 -1
- package/dist/server/rsc-entry/action-middleware-runner.d.ts +2 -2
- package/dist/server/rsc-entry/api-handler.d.ts +1 -1
- package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
- package/dist/server/rsc-entry/deny-fallback.d.ts +3 -3
- package/dist/server/rsc-entry/error-renderer.d.ts +4 -4
- package/dist/server/rsc-entry/helpers.d.ts +6 -6
- package/dist/server/rsc-entry/index.d.ts +7 -6
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts +4 -4
- package/dist/server/rsc-entry/revalidate-renderer.d.ts +4 -4
- package/dist/server/rsc-entry/rsc-payload.d.ts +4 -4
- package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts +3 -3
- package/dist/server/rsc-entry/ssr-bridge.d.ts +1 -1
- package/dist/server/rsc-entry/ssr-renderer.d.ts +7 -7
- package/dist/server/rsc-entry/wrap-action-dispatch.d.ts +5 -5
- package/dist/server/sitemap-generator.d.ts +2 -2
- package/dist/server/sitemap-handler.d.ts +1 -1
- package/dist/server/skippable-prefix.d.ts +3 -3
- package/dist/server/slot-interception.d.ts +2 -2
- package/dist/server/slot-resolver.d.ts +3 -7
- package/dist/server/slot-resolver.d.ts.map +1 -1
- package/dist/server/ssr-bridge-types.d.ts +2 -2
- package/dist/server/ssr-entry.d.ts +1 -1
- package/dist/server/static-generator.d.ts +1 -1
- package/dist/server/static-not-found.d.ts +1 -1
- package/dist/server/status-code-resolver.d.ts +1 -1
- package/dist/server/tracing.d.ts +3 -3
- package/dist/server/tree-builder.d.ts +3 -3
- package/dist/server/tree-match.d.ts +1 -1
- package/dist/server/types.d.ts +2 -2
- package/dist/server/utils/mdx-file.d.ts +2 -0
- package/dist/server/utils/mdx-file.d.ts.map +1 -1
- package/dist/server/workers-cache-bridge.d.ts +1 -1
- package/dist/shared/als-slots.d.ts +1 -1
- package/dist/shared/payload-root.d.ts +2 -2
- package/dist/shared/rsc-media-type.d.ts +12 -0
- package/dist/shared/rsc-media-type.d.ts.map +1 -1
- package/dist/shared/slot-params.d.ts +1 -1
- package/dist/shims/font-google.d.ts +1 -1
- package/dist/shims/font-google.js.map +1 -1
- package/dist/shims/font-local.d.ts +1 -1
- package/dist/shims/font-local.js.map +1 -1
- package/dist/shims/navigation-client.d.ts +4 -4
- package/dist/shims/navigation.d.ts +2 -2
- package/docs/api/34-api-config.mdx +9 -8
- package/docs/api/36-cli.mdx +23 -3
- package/docs/learn/11-error-handling.mdx +11 -0
- package/docs/more/01-advanced-routing.mdx +1 -0
- package/docs/more/04b-mdx.mdx +38 -18
- package/package.json +23 -18
- package/src/adapters/build-output-helper.ts +4 -4
- package/src/adapters/cloudflare-dev.ts +7 -1
- package/src/adapters/cloudflare-kv-cache.ts +11 -8
- package/src/adapters/cloudflare.ts +21 -15
- package/src/adapters/compress-module.ts +2 -2
- package/src/adapters/nitro-presets.ts +139 -0
- package/src/adapters/nitro-preview.ts +340 -0
- package/src/adapters/nitro.ts +100 -465
- package/src/adapters/shared.ts +1 -1
- 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 +7 -7
- package/src/cache/index.ts +9 -9
- package/src/cache/redis-handler.ts +2 -2
- package/src/cache/stores/cloudflare-kv.ts +1 -1
- package/src/cache/stores/memory.ts +2 -2
- package/src/cache/stores/redis.ts +1 -1
- package/src/cache/stores/vercel.ts +1 -1
- package/src/cache/tag-aware-handler.ts +2 -2
- package/src/cache/timber-cache.ts +8 -8
- package/src/cdn/cloudflare-purge.ts +1 -1
- package/src/cdn/fastly-purge.ts +1 -1
- package/src/cdn/index.ts +10 -4
- package/src/cdn/workers-cache-purge.ts +6 -2
- package/src/cli-check.ts +53 -4
- package/src/cli-schema-sync.ts +3 -3
- package/src/cli.ts +50 -11
- package/src/client/browser-dev.ts +1 -1
- package/src/client/browser-entry/action-dispatch.ts +5 -5
- package/src/client/browser-entry/hmr.ts +1 -1
- package/src/client/browser-entry/hydrate.ts +9 -9
- package/src/client/browser-entry/index.ts +10 -10
- package/src/client/browser-entry/post-hydration.ts +5 -5
- package/src/client/browser-entry/router-init.ts +9 -9
- package/src/client/browser-entry/rsc-stream.ts +3 -3
- package/src/client/error-boundary.tsx +4 -4
- package/src/client/form.tsx +7 -2
- package/src/client/history.ts +2 -2
- package/src/client/index.ts +21 -18
- package/src/client/internal.ts +19 -19
- package/src/client/link.tsx +9 -9
- package/src/client/navigation-api.ts +1 -1
- package/src/client/navigation-commit.ts +5 -5
- package/src/client/navigation-context.ts +1 -1
- package/src/client/navigation-root.tsx +1 -1
- package/src/client/nuqs-adapter.tsx +2 -2
- package/src/client/params-context.ts +4 -4
- package/src/client/router-effects.ts +3 -3
- package/src/client/router-lifecycle.ts +2 -2
- package/src/client/router-pipeline.ts +10 -10
- package/src/client/router-ref.ts +2 -2
- package/src/client/router-skew.ts +2 -2
- package/src/client/router-types.ts +6 -6
- package/src/client/router.ts +13 -13
- package/src/client/rsc-fetch.ts +11 -16
- package/src/client/segment-cache.ts +2 -2
- package/src/client/segment-outlet.tsx +1 -1
- package/src/client/shallow-url.ts +1 -1
- package/src/client/slot-outlet.tsx +1 -1
- package/src/client/slot-provider.tsx +1 -1
- package/src/client/ssr-data.ts +3 -3
- package/src/client/stale-client.ts +1 -1
- package/src/client/state.ts +4 -4
- package/src/client/top-loader.tsx +1 -1
- package/src/client/unload-guard.ts +1 -1
- package/src/client/use-cookie.ts +2 -2
- package/src/client/use-pathname.ts +2 -2
- package/src/client/use-pending-navigation.ts +1 -1
- package/src/client/use-query-states.ts +3 -3
- package/src/client/use-router.ts +2 -2
- package/src/client/use-search-params.ts +3 -3
- package/src/client/use-segment-params.ts +6 -6
- package/src/client/use-selected-layout-segment.ts +2 -2
- package/src/codec.ts +2 -2
- package/src/config-types.ts +27 -7
- package/src/config-validation.ts +1 -1
- package/src/cookies/define-cookie.ts +6 -6
- package/src/cookies/index.ts +3 -3
- package/src/cookies/json-cookie.ts +1 -1
- package/src/dev-tools/404-page.ts +4 -4
- package/src/dev-tools/dev-page-shell.ts +1 -1
- package/src/dev-tools/error-page.ts +4 -4
- package/src/dev-tools/index.ts +12 -12
- package/src/dev-tools/instrumentation.ts +1 -1
- package/src/dev-tools/logs.ts +1 -1
- package/src/dev-tools/overlay.ts +3 -3
- package/src/dev-tools/terminal.ts +2 -2
- package/src/fonts/ast.ts +5 -5
- package/src/fonts/bundle.ts +5 -5
- package/src/fonts/css.ts +1 -1
- package/src/fonts/dev-middleware.ts +2 -2
- package/src/fonts/google.ts +2 -2
- package/src/fonts/local.ts +4 -4
- package/src/fonts/pipeline.ts +8 -8
- package/src/fonts/transform.ts +5 -5
- package/src/fonts/types.ts +1 -1
- package/src/fonts/virtual-modules.ts +1 -1
- package/src/index.ts +46 -37
- package/src/params/codec-registry.ts +1 -1
- package/src/params/define-schema.ts +2 -2
- package/src/params/index.ts +4 -4
- package/src/params/resolve-schema.ts +2 -2
- package/src/plugin-context.ts +10 -10
- package/src/plugins/adapter-build.ts +5 -5
- package/src/plugins/build-manifest.ts +4 -4
- package/src/plugins/build-report.ts +6 -6
- package/src/plugins/cache.ts +3 -3
- package/src/plugins/callsite-ast.ts +1 -1
- package/src/plugins/callsite-jsx.ts +2 -2
- package/src/plugins/chunks.ts +1 -1
- package/src/plugins/cloudflare-wasm.ts +1 -1
- package/src/plugins/content.ts +5 -1
- package/src/plugins/dev-discovery.ts +218 -0
- package/src/plugins/dev-server.ts +97 -12
- package/src/plugins/entries.ts +1 -1
- package/src/plugins/fonts.ts +17 -10
- package/src/plugins/graph-endpoint.ts +532 -0
- package/src/plugins/mdx.ts +73 -38
- package/src/plugins/prebuilt-capture.ts +3 -3
- package/src/plugins/prebuilt-options-analysis.ts +1 -1
- package/src/plugins/prebuilt.ts +7 -7
- package/src/plugins/prerender-sugar.ts +11 -19
- package/src/plugins/request-dep/analysis.ts +1 -1
- package/src/plugins/request-dep/index.ts +8 -8
- package/src/plugins/request-dep/origin.ts +1 -1
- package/src/plugins/routing.ts +12 -7
- package/src/plugins/server-bundle.ts +11 -3
- package/src/plugins/shims.ts +16 -31
- package/src/plugins/static-build.ts +10 -10
- package/src/routing/codegen-shared.ts +1 -1
- package/src/routing/codegen-write.ts +3 -3
- package/src/routing/codegen.ts +14 -5
- package/src/routing/collision-probe.ts +3 -3
- package/src/routing/collision-spaces.ts +3 -3
- package/src/routing/convention-lint.ts +136 -6
- package/src/routing/export-detect.ts +1 -1
- package/src/routing/index.ts +13 -13
- package/src/routing/interception.ts +41 -4
- package/src/routing/link-codegen.ts +3 -3
- package/src/routing/manifest-codegen.ts +2 -2
- package/src/routing/scanner.ts +33 -9
- package/src/routing/schema-validation.ts +4 -4
- package/src/routing/segment-classify.ts +2 -2
- package/src/routing/segment-codegen.ts +1 -1
- package/src/routing/segment-keys.ts +1 -1
- package/src/routing/slot-placement.ts +1 -1
- package/src/routing/walkers.ts +1 -1
- package/src/rsc-runtime/transforms.ts +13 -0
- package/src/rsc-runtime/vendor-types.d.ts +12 -0
- package/src/schema-bridge.ts +1 -1
- package/src/search-params/define.ts +8 -8
- package/src/search-params/index.ts +3 -3
- package/src/search-params/wrappers.ts +3 -3
- package/src/server/access-gate.tsx +6 -6
- package/src/server/action-client.ts +5 -5
- package/src/server/action-handler.ts +16 -16
- package/src/server/actions.ts +5 -5
- package/src/server/als-registry.ts +8 -8
- package/src/server/asset-headers.ts +2 -2
- package/src/server/chain-url-parts.ts +5 -5
- package/src/server/children-interception.ts +4 -4
- package/src/server/compress.ts +1 -1
- package/src/server/cookie-context.ts +4 -4
- package/src/server/cookie-parsing.ts +2 -2
- package/src/server/default-logger.ts +3 -3
- package/src/server/deny-boundary.ts +10 -10
- package/src/server/deny-renderer.ts +38 -25
- package/src/server/early-hints-sender.ts +2 -2
- package/src/server/early-hints.ts +2 -2
- package/src/server/error-boundary-wrapper.ts +4 -12
- package/src/server/fallback-error.ts +13 -13
- package/src/server/flight-injection-state.ts +1 -1
- package/src/server/form-flash.ts +2 -2
- package/src/server/html-injector-core.ts +4 -4
- package/src/server/html-injectors.ts +5 -5
- package/src/server/index.ts +18 -18
- package/src/server/instrumentation.ts +1 -1
- package/src/server/internal.ts +50 -50
- package/src/server/logger.ts +4 -4
- package/src/server/metadata-collector.ts +7 -7
- package/src/server/metadata-platform.ts +2 -2
- package/src/server/metadata-render.ts +4 -4
- package/src/server/metadata-routes.ts +3 -3
- package/src/server/metadata-social.ts +2 -2
- package/src/server/metadata.ts +2 -2
- package/src/server/middleware-runner.ts +1 -1
- package/src/server/node-stream-transforms.ts +4 -4
- package/src/server/param-coercion.ts +8 -8
- package/src/server/pipeline-helpers.ts +7 -7
- package/src/server/pipeline-interception.ts +2 -2
- package/src/server/pipeline-metadata.ts +1 -1
- package/src/server/pipeline-outcome.ts +8 -8
- package/src/server/pipeline-phases.ts +24 -28
- package/src/server/pipeline.ts +22 -22
- package/src/server/prebuilt/cache-key.ts +1 -1
- package/src/server/prebuilt/capture-state.ts +1 -1
- package/src/server/prebuilt/key-discipline.ts +1 -1
- package/src/server/prebuilt/manifest-tag-index.ts +1 -1
- package/src/server/prebuilt/overlay.ts +6 -6
- package/src/server/prebuilt/payload-source.ts +2 -2
- package/src/server/prebuilt/slots.ts +5 -5
- package/src/server/prebuilt/synthetic-store.ts +2 -2
- package/src/server/prebuilt-builder.ts +16 -16
- package/src/server/prebuilt-runtime.ts +12 -12
- package/src/server/primitives.ts +7 -7
- package/src/server/publish-params.ts +3 -3
- package/src/server/request-context.ts +7 -7
- package/src/server/route-element-builder.ts +108 -50
- package/src/server/route-handler.ts +4 -4
- package/src/server/route-matcher.ts +5 -5
- package/src/server/rsc-cache-key-guard.ts +3 -5
- package/src/server/rsc-entry/action-middleware-runner.ts +7 -7
- package/src/server/rsc-entry/api-handler.ts +18 -9
- package/src/server/rsc-entry/deny-fallback.ts +10 -10
- package/src/server/rsc-entry/error-renderer.ts +27 -27
- package/src/server/rsc-entry/helpers.ts +10 -10
- package/src/server/rsc-entry/index.ts +51 -47
- package/src/server/rsc-entry/render-route.ts +20 -20
- package/src/server/rsc-entry/revalidate-renderer.ts +12 -12
- package/src/server/rsc-entry/rsc-payload.ts +19 -15
- package/src/server/rsc-entry/rsc-stream.ts +8 -8
- package/src/server/rsc-entry/ssr-bridge.ts +3 -3
- package/src/server/rsc-entry/ssr-renderer.ts +23 -23
- package/src/server/rsc-entry/wrap-action-dispatch.ts +9 -9
- package/src/server/rsc-prop-warnings.ts +1 -1
- package/src/server/sensitive-fields.ts +1 -1
- package/src/server/server-timing.ts +1 -1
- package/src/server/sitemap-generator.ts +3 -3
- package/src/server/sitemap-handler.ts +3 -3
- package/src/server/skippable-prefix.ts +7 -7
- package/src/server/slot-interception.ts +5 -5
- package/src/server/slot-resolver.ts +20 -28
- package/src/server/ssr-bridge-types.ts +2 -2
- package/src/server/ssr-entry.ts +18 -18
- package/src/server/ssr-render.ts +4 -4
- package/src/server/ssr-wrappers.tsx +1 -1
- package/src/server/state-tree-diff.ts +1 -1
- package/src/server/static-generator.ts +6 -6
- package/src/server/static-not-found.ts +3 -3
- package/src/server/status-code-resolver.ts +1 -1
- package/src/server/tracing.ts +5 -5
- package/src/server/tree-builder.ts +4 -4
- package/src/server/tree-match.ts +1 -1
- package/src/server/types.ts +2 -2
- package/src/server/utils/mdx-file.ts +2 -2
- package/src/server/waituntil-bridge.ts +1 -1
- package/src/server/workers-cache-bridge.ts +2 -2
- package/src/shared/als-slots.ts +1 -1
- package/src/shared/payload-root.ts +2 -2
- package/src/shared/rsc-media-type.ts +16 -0
- package/src/shared/slot-params.ts +1 -1
- package/src/shims/font-google.ts +1 -1
- package/src/shims/font-local.ts +1 -1
- package/src/shims/navigation-client.ts +5 -5
- package/src/shims/navigation.ts +2 -2
- package/LICENSE +0 -8
- package/dist/_chunks/actions-BjbbNRFN.js.map +0 -1
- package/dist/_chunks/build-output-helper-C3DrfzZR.js.map +0 -1
- package/dist/_chunks/cache-api-DllJ-Lyw.js.map +0 -1
- package/dist/_chunks/cli-check-DJZDc22E.js.map +0 -1
- package/dist/_chunks/convention-lint-CpteIpTm.js.map +0 -1
- package/dist/_chunks/dist-BA3u1z3W.js +0 -423
- package/dist/_chunks/dist-BA3u1z3W.js.map +0 -1
- package/dist/_chunks/mdx-file-C005ay-P.js.map +0 -1
- package/dist/_chunks/plugin-context-rCinWLiE.js.map +0 -1
- package/dist/_chunks/scanner-CAietmj4.js.map +0 -1
- package/dist/content/index.d.ts +0 -2
- package/dist/content/index.d.ts.map +0 -1
- package/dist/content/index.js +0 -0
- package/src/content/index.ts +0 -5
- package/src/shims/server-only-noop.js +0 -6
package/src/server/actions.ts
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* See design/08-forms-and-actions.md
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { cache } from '../cache/cache-api';
|
|
18
|
-
import { DenySignal, RedirectSignal } from './primitives';
|
|
19
|
-
import { withSpan } from './tracing';
|
|
20
|
-
import { revalidationAls, type RevalidationState } from './als-registry.
|
|
17
|
+
import { cache } from '../cache/cache-api.ts';
|
|
18
|
+
import { DenySignal, RedirectSignal } from './primitives.ts';
|
|
19
|
+
import { withSpan } from './tracing.ts';
|
|
20
|
+
import { revalidationAls, type RevalidationState } from './als-registry.ts';
|
|
21
21
|
// ─── Types ───────────────────────────────────────────────────────────────
|
|
22
22
|
|
|
23
23
|
/** Result of rendering a revalidation — payload root before RSC serialization. */
|
|
@@ -33,7 +33,7 @@ export interface RevalidationResult {
|
|
|
33
33
|
export type RevalidateRenderer = (path: string) => Promise<RevalidationResult>;
|
|
34
34
|
|
|
35
35
|
// Re-export the type from the registry for public API consumers.
|
|
36
|
-
export type { RevalidationState } from './als-registry.
|
|
36
|
+
export type { RevalidationState } from './als-registry.ts';
|
|
37
37
|
|
|
38
38
|
/** Options for creating the action handler. */
|
|
39
39
|
export interface ActionHandlerConfig {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
import '#server-only-guard';
|
|
35
|
-
import type { CoercedParams } from '../shared/param-value.
|
|
36
|
-
import type { SlotParamsRecord } from '../shared/slot-params.
|
|
35
|
+
import type { CoercedParams } from '../shared/param-value.ts';
|
|
36
|
+
import type { SlotParamsRecord } from '../shared/slot-params.ts';
|
|
37
37
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
38
|
-
import type { DebugComponentEntry } from './rsc-entry/helpers.
|
|
38
|
+
import type { DebugComponentEntry } from './rsc-entry/helpers.ts';
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Return a process-wide singleton `AsyncLocalStorage` keyed by `symbol`.
|
|
@@ -159,7 +159,7 @@ export interface RequestContextStore {
|
|
|
159
159
|
* See TIM-1363, TIM-1367, design/16-metadata.md.
|
|
160
160
|
*/
|
|
161
161
|
_metadataEntries?: Array<{
|
|
162
|
-
metadata: import('./types.
|
|
162
|
+
metadata: import('./types.ts').Metadata | Promise<import('./types.ts').Metadata | null>;
|
|
163
163
|
isPage: boolean;
|
|
164
164
|
}>;
|
|
165
165
|
}
|
|
@@ -168,7 +168,7 @@ export interface RequestContextStore {
|
|
|
168
168
|
export interface CookieEntry {
|
|
169
169
|
name: string;
|
|
170
170
|
value: string;
|
|
171
|
-
options: import('./cookie-context.
|
|
171
|
+
options: import('./cookie-context.ts').CookieOptions;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
// ─── Tracing ──────────────────────────────────────────────────────────────
|
|
@@ -186,7 +186,7 @@ export interface TraceStore {
|
|
|
186
186
|
* after span creation — the platform API has no getActiveSpan() equivalent.
|
|
187
187
|
* Saved/restored by withSpan() around each callback. See TIM-1135.
|
|
188
188
|
*/
|
|
189
|
-
platformSpan?: import('./tracing.
|
|
189
|
+
platformSpan?: import('./tracing.ts').PlatformSpan;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/** @internal — import via tracing.ts public API */
|
|
@@ -197,7 +197,7 @@ export const traceAls = getOrCreateAls<TraceStore>(Symbol.for('timber:trace-als'
|
|
|
197
197
|
// Design doc: (dev-only performance instrumentation)
|
|
198
198
|
|
|
199
199
|
export interface TimingStore {
|
|
200
|
-
entries: import('./server-timing.
|
|
200
|
+
entries: import('./server-timing.ts').TimingEntry[];
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
/** @internal — import via server-timing.ts public API */
|
|
@@ -224,7 +224,7 @@ export const revalidationAls = getOrCreateAls<RevalidationState>(
|
|
|
224
224
|
// Design doc: design/08-forms-and-actions.md §"No-JS Error Round-Trip"
|
|
225
225
|
|
|
226
226
|
/** @internal — import via form-flash.ts public API */
|
|
227
|
-
export const formFlashAls = getOrCreateAls<import('./form-flash.
|
|
227
|
+
export const formFlashAls = getOrCreateAls<import('./form-flash.ts').FormFlashData>(
|
|
228
228
|
Symbol.for('timber:form-flash-als')
|
|
229
229
|
);
|
|
230
230
|
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
* Design docs: 18-build-system.md, 06-caching.md
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import { IMMUTABLE_CACHE, STATIC_CACHE } from '../adapters/shared.
|
|
22
|
+
import { IMMUTABLE_CACHE, STATIC_CACHE } from '../adapters/shared.ts';
|
|
23
23
|
|
|
24
24
|
// Re-export cache constants and generateHeadersFile from the shared adapter
|
|
25
25
|
// module. The canonical definitions live in adapters/shared.ts because
|
|
26
26
|
// adapters are loaded by Node before Vite's resolver is available — they
|
|
27
27
|
// can only import from within their own directory.
|
|
28
|
-
export { IMMUTABLE_CACHE, STATIC_CACHE, generateHeadersFile } from '../adapters/shared.
|
|
28
|
+
export { IMMUTABLE_CACHE, STATIC_CACHE, generateHeadersFile } from '../adapters/shared.ts';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Regex matching Vite-hashed asset filenames.
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
* See design/07-routing.md §"Intercepting Routes".
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import type { ManifestSegmentNode } from './route-matcher.
|
|
24
|
-
import type { RouteMatch } from './pipeline.
|
|
25
|
-
import type { CoercedParams } from '../shared/param-value.
|
|
26
|
-
import { effectiveUrlSegment } from '../routing/segment-classify.
|
|
27
|
-
import { computeInterceptedBase } from '../routing/interception.
|
|
23
|
+
import type { ManifestSegmentNode } from './route-matcher.ts';
|
|
24
|
+
import type { RouteMatch } from './pipeline.ts';
|
|
25
|
+
import type { CoercedParams } from '../shared/param-value.ts';
|
|
26
|
+
import { effectiveUrlSegment } from '../routing/segment-classify.ts';
|
|
27
|
+
import { computeInterceptedBase } from '../routing/interception.ts';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Extract raw URL path parts from a segment chain.
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
* See design/07-routing.md §"Intercepting Routes".
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
import type { RouteMatch } from './pipeline.
|
|
33
|
-
import { collectMiddlewareChain, type ManifestSegmentNode } from './route-matcher.
|
|
34
|
-
import { findInterceptingMatch } from './slot-interception.
|
|
35
|
-
import { treePathNames } from '../routing/segment-keys.
|
|
32
|
+
import type { RouteMatch } from './pipeline.ts';
|
|
33
|
+
import { collectMiddlewareChain, type ManifestSegmentNode } from './route-matcher.ts';
|
|
34
|
+
import { findInterceptingMatch } from './slot-interception.ts';
|
|
35
|
+
import { treePathNames } from '../routing/segment-keys.ts';
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Resolve a children-path interception to a complete route match.
|
package/src/server/compress.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// fails the build with an explanatory error rather than resolving to nothing
|
|
15
15
|
// on the deployed server.
|
|
16
16
|
|
|
17
|
-
import { RSC_CONTENT_TYPE } from '../shared/rsc-media-type.
|
|
17
|
+
import { RSC_CONTENT_TYPE } from '../shared/rsc-media-type.ts';
|
|
18
18
|
|
|
19
19
|
// ─── Constants ────────────────────────────────────────────────────────────
|
|
20
20
|
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
* smuggling primitive that the encoding contract closes.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { requestContextAls, type RequestContextStore } from './als-registry.
|
|
16
|
-
import { isDebug } from './debug.
|
|
15
|
+
import { requestContextAls, type RequestContextStore } from './als-registry.ts';
|
|
16
|
+
import { isDebug } from './debug.ts';
|
|
17
17
|
import {
|
|
18
18
|
assertValidCookieName,
|
|
19
19
|
assertValidCookieValue,
|
|
20
20
|
assertValidCookieOptions,
|
|
21
|
-
} from '../cookies/validation.
|
|
21
|
+
} from '../cookies/validation.ts';
|
|
22
22
|
import {
|
|
23
23
|
parseCookieHeader,
|
|
24
24
|
parseSetCookie,
|
|
25
25
|
safeDecodeCookieValue,
|
|
26
26
|
serializeCookieEntry,
|
|
27
|
-
} from './cookie-parsing.
|
|
27
|
+
} from './cookie-parsing.ts';
|
|
28
28
|
|
|
29
29
|
// Re-export the validators so framework-internal consumers and tests can
|
|
30
30
|
// import the canonical implementation from the same module that hosts
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
import { parseCookie, parseSetCookie as upstreamParseSetCookie, stringifySetCookie } from 'cookie';
|
|
19
19
|
|
|
20
|
-
import type { CookieEntry } from './als-registry.
|
|
21
|
-
import type { CookieOptions } from './cookie-context.
|
|
20
|
+
import type { CookieEntry } from './als-registry.ts';
|
|
21
|
+
import type { CookieOptions } from './cookie-context.ts';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Parse a Cookie header string into a Map of name → value pairs.
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* See design/17-logging.md §"DefaultLogger"
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { isDevMode, isDebug } from './debug.
|
|
22
|
-
import { formatSsrError } from './error-formatter.
|
|
23
|
-
import type { TimberLogger } from './logger.
|
|
21
|
+
import { isDevMode, isDebug } from './debug.ts';
|
|
22
|
+
import { formatSsrError } from './error-formatter.ts';
|
|
23
|
+
import type { TimberLogger } from './logger.ts';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Format data fields as `key=value` pairs for human-readable output.
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
|
|
36
36
|
import { createElement } from 'react';
|
|
37
37
|
|
|
38
|
-
import { ErrorReconstituter } from '../client/error-reconstituter.
|
|
39
|
-
import type { SerializableError } from '../client/error-reconstituter.
|
|
40
|
-
import { requestContextAls } from './als-registry.
|
|
41
|
-
import { DenySignal } from './primitives.
|
|
42
|
-
import { loadModule } from './safe-load.
|
|
43
|
-
import type { ManifestLoader } from './safe-load.
|
|
44
|
-
import { withSpan } from './tracing.
|
|
45
|
-
import { isValidElementType, type LoadedComponent } from './utils/element-type.
|
|
46
|
-
import { isMdxFilePath } from './utils/mdx-file.
|
|
47
|
-
import type { ManifestSegmentNode } from './route-matcher.
|
|
38
|
+
import { ErrorReconstituter } from '../client/error-reconstituter.tsx';
|
|
39
|
+
import type { SerializableError } from '../client/error-reconstituter.tsx';
|
|
40
|
+
import { requestContextAls } from './als-registry.ts';
|
|
41
|
+
import { DenySignal } from './primitives.ts';
|
|
42
|
+
import { loadModule } from './safe-load.ts';
|
|
43
|
+
import type { ManifestLoader } from './safe-load.ts';
|
|
44
|
+
import { withSpan } from './tracing.ts';
|
|
45
|
+
import { isValidElementType, type LoadedComponent } from './utils/element-type.ts';
|
|
46
|
+
import { isMdxFilePath } from './utils/mdx-file.ts';
|
|
47
|
+
import type { ManifestSegmentNode } from './route-matcher.ts';
|
|
48
48
|
|
|
49
49
|
// ─── Types ────────────────────────────────────────────────────────────────
|
|
50
50
|
|
|
@@ -16,31 +16,31 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { createElement, Fragment } from 'react';
|
|
19
|
-
import { renderToReadableStream } from '../rsc-runtime/rsc.
|
|
20
|
-
|
|
21
|
-
import { DenySignal } from './primitives.
|
|
22
|
-
import { appVisibleSearch } from '../shared/rsc-cache-key.
|
|
23
|
-
import { getSlotParamsForClient } from './request-context.
|
|
24
|
-
import { withPublishedParams } from './publish-params.
|
|
25
|
-
import { renderDenyEntry, type DenyEntryShape } from './deny-boundary.
|
|
26
|
-
import { getCookiesForSsr } from './cookie-context.
|
|
27
|
-
import { logRenderError } from './logger.
|
|
28
|
-
import { loadModule } from './safe-load.
|
|
29
|
-
import { isMdxFilePath } from './utils/mdx-file.
|
|
30
|
-
import { isDebug } from './debug.
|
|
31
|
-
import { resolveMetadata, renderMetadataToElements } from './metadata.
|
|
32
|
-
import { headElementsToReact } from './metadata.
|
|
33
|
-
import { resolveStatusFile } from './status-code-resolver.
|
|
34
|
-
import { defaultStatusPageResponse } from './default-status-page.
|
|
35
|
-
import { rscErrorEnvelope } from '../shared/rsc-error-envelope.
|
|
36
|
-
import type { ManifestSegmentNode } from './route-matcher.
|
|
37
|
-
import type { RouteMatch } from './pipeline.
|
|
38
|
-
import type { NavContext } from './ssr-bridge-types.
|
|
39
|
-
import { flightInitScript } from './flight-scripts.
|
|
40
|
-
import type { ClientBootstrapConfig } from './html-injectors.
|
|
41
|
-
import type { Metadata } from './types.
|
|
42
|
-
import { teeWithErrorPropagation } from './stream-utils.
|
|
43
|
-
import { RSC_CONTENT_TYPE } from '../shared/rsc-media-type.
|
|
19
|
+
import { renderToReadableStream } from '../rsc-runtime/rsc.ts';
|
|
20
|
+
|
|
21
|
+
import { DenySignal } from './primitives.ts';
|
|
22
|
+
import { appVisibleSearch } from '../shared/rsc-cache-key.ts';
|
|
23
|
+
import { getSlotParamsForClient } from './request-context.ts';
|
|
24
|
+
import { withPublishedParams } from './publish-params.ts';
|
|
25
|
+
import { renderDenyEntry, type DenyEntryShape } from './deny-boundary.ts';
|
|
26
|
+
import { getCookiesForSsr } from './cookie-context.ts';
|
|
27
|
+
import { logRenderError } from './logger.ts';
|
|
28
|
+
import { loadModule } from './safe-load.ts';
|
|
29
|
+
import { isMdxFilePath } from './utils/mdx-file.ts';
|
|
30
|
+
import { isDebug } from './debug.ts';
|
|
31
|
+
import { resolveMetadata, renderMetadataToElements } from './metadata.ts';
|
|
32
|
+
import { headElementsToReact } from './metadata.ts';
|
|
33
|
+
import { resolveStatusFile } from './status-code-resolver.ts';
|
|
34
|
+
import { defaultStatusPageResponse } from './default-status-page.ts';
|
|
35
|
+
import { rscErrorEnvelope } from '../shared/rsc-error-envelope.ts';
|
|
36
|
+
import type { ManifestSegmentNode } from './route-matcher.ts';
|
|
37
|
+
import type { RouteMatch } from './pipeline.ts';
|
|
38
|
+
import type { NavContext } from './ssr-bridge-types.ts';
|
|
39
|
+
import { flightInitScript } from './flight-scripts.ts';
|
|
40
|
+
import type { ClientBootstrapConfig } from './html-injectors.ts';
|
|
41
|
+
import type { Metadata } from './types.ts';
|
|
42
|
+
import { teeWithErrorPropagation } from './stream-utils.ts';
|
|
43
|
+
import { RSC_CONTENT_TYPE } from '../shared/rsc-media-type.ts';
|
|
44
44
|
|
|
45
45
|
/** Layout component entry for deny page wrapping. */
|
|
46
46
|
export interface LayoutEntry {
|
|
@@ -357,6 +357,19 @@ async function renderDenyPageJson(
|
|
|
357
357
|
// A .json status file that fails to load is not a usable match — return
|
|
358
358
|
// null so the caller continues to the framework default rather than
|
|
359
359
|
// rejecting out of the chain.
|
|
360
|
+
// Dev warning: deny(status, data) carries data but JSON status files are
|
|
361
|
+
// static bodies — the data is silently dropped. The same deny() would
|
|
362
|
+
// deliver the data to a .tsx file's dangerouslyPassData prop. See
|
|
363
|
+
// design/10-error-handling.md §"Status-Code File Variants".
|
|
364
|
+
if (isDebug() && deny.data !== undefined) {
|
|
365
|
+
console.warn(
|
|
366
|
+
`[timber] deny(${deny.status}, data) resolved to ${resolution.file.filePath}, ` +
|
|
367
|
+
`which is a static JSON file. The data argument is dropped — JSON status files ` +
|
|
368
|
+
`are returned verbatim with no interpolation. If you need the data in the ` +
|
|
369
|
+
`response, use a .tsx status file or a route handler (route.ts).`
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
360
373
|
const mod = await loadModule(resolution.file).catch(() => null);
|
|
361
374
|
if (!mod) return null;
|
|
362
375
|
const jsonContent = mod.default ?? mod;
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* Design doc: 02-rendering-pipeline.md §"Early Hints (103)"
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { earlyHintsSenderAls } from './als-registry.
|
|
22
|
-
import { swallow } from './logger.
|
|
21
|
+
import { earlyHintsSenderAls } from './als-registry.ts';
|
|
22
|
+
import { swallow } from './logger.ts';
|
|
23
23
|
|
|
24
24
|
/** Function that sends Link header values as a 103 Early Hints response. */
|
|
25
25
|
export type EarlyHintsSenderFn = (links: string[]) => void;
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
collectRouteCss,
|
|
20
20
|
collectRouteFonts,
|
|
21
21
|
collectRouteModulepreloads,
|
|
22
|
-
} from './build-manifest.
|
|
23
|
-
import type { BuildManifest } from './build-manifest.
|
|
22
|
+
} from './build-manifest.ts';
|
|
23
|
+
import type { BuildManifest } from './build-manifest.ts';
|
|
24
24
|
|
|
25
25
|
/** Minimal segment shape needed for early hint collection. */
|
|
26
26
|
interface SegmentWithFiles {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import type { ReactNode } from 'react';
|
|
22
|
-
import type { SegmentNode } from '../routing/types.
|
|
23
|
-
import { isValidElementType, type LoadedComponent } from './utils/element-type.
|
|
24
|
-
import { isMdxFilePath } from './utils/mdx-file.
|
|
22
|
+
import type { SegmentNode } from '../routing/types.ts';
|
|
23
|
+
import { isValidElementType, type LoadedComponent } from './utils/element-type.ts';
|
|
24
|
+
import { isMdxFilePath } from './utils/mdx-file.ts';
|
|
25
25
|
|
|
26
26
|
/** The minimum a route file must carry for the walk: a path to classify as MDX. */
|
|
27
27
|
interface BoundaryFile {
|
|
@@ -73,8 +73,6 @@ export interface ErrorBoundaryWrapConfig<TFile, TElement> {
|
|
|
73
73
|
* host-specific stand-in). Injected — see the module docstring.
|
|
74
74
|
*/
|
|
75
75
|
errorBoundaryComponent: unknown;
|
|
76
|
-
/** When true, skip 4xx error boundaries — deny catching handles them in-tree. See TIM-666. */
|
|
77
|
-
skipDenyBoundaries?: boolean;
|
|
78
76
|
/** Segment key stamped on every boundary this walk creates. See `ErrorBoundaryProps`. */
|
|
79
77
|
segmentKey?: string;
|
|
80
78
|
}
|
|
@@ -149,7 +147,7 @@ export async function wrapSegmentWithErrorBoundaries<
|
|
|
149
147
|
element: TElement,
|
|
150
148
|
config: ErrorBoundaryWrapConfig<TFile, TElement>
|
|
151
149
|
): Promise<TElement> {
|
|
152
|
-
const { loadModule
|
|
150
|
+
const { loadModule } = config;
|
|
153
151
|
|
|
154
152
|
if (segment.statusFiles) {
|
|
155
153
|
// Specific status files (innermost — highest priority at runtime)
|
|
@@ -157,10 +155,6 @@ export async function wrapSegmentWithErrorBoundaries<
|
|
|
157
155
|
if (key === '4xx' || key === '5xx') continue;
|
|
158
156
|
const status = parseInt(key, 10);
|
|
159
157
|
if (isNaN(status)) continue;
|
|
160
|
-
// Skip 4xx boundaries when deny catching is active — the deny
|
|
161
|
-
// page is rendered by AccessGate/PageDenyBoundary instead.
|
|
162
|
-
if (skipDenyBoundaries && status >= 400 && status <= 499) continue;
|
|
163
|
-
|
|
164
158
|
const Component = await loadBoundaryComponent(file, loadModule);
|
|
165
159
|
if (Component) {
|
|
166
160
|
element = wrapInBoundary(element, Component, file, status, { status }, config);
|
|
@@ -170,8 +164,6 @@ export async function wrapSegmentWithErrorBoundaries<
|
|
|
170
164
|
// Category catch-alls (4xx.tsx, 5xx.tsx)
|
|
171
165
|
for (const [key, file] of Object.entries(segment.statusFiles)) {
|
|
172
166
|
if (key !== '4xx' && key !== '5xx') continue;
|
|
173
|
-
if (skipDenyBoundaries && key === '4xx') continue;
|
|
174
|
-
|
|
175
167
|
const Component = await loadBoundaryComponent(file, loadModule);
|
|
176
168
|
if (Component) {
|
|
177
169
|
const categoryStatus = key === '4xx' ? 400 : 500;
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* exposed to the client (design/13-security.md principle 4).
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type { RouteMatch } from './pipeline.
|
|
14
|
-
import type { ManifestSegmentNode } from './route-matcher.
|
|
15
|
-
import type { ClientBootstrapConfig } from './html-injectors.
|
|
16
|
-
import type { LayoutEntry } from './deny-renderer.
|
|
17
|
-
import type { GlobalErrorFile } from './rsc-entry/error-renderer.
|
|
18
|
-
import { swallow } from './logger.
|
|
19
|
-
import { logRenderError } from './logger.
|
|
20
|
-
import { loadModule } from './safe-load.
|
|
21
|
-
import { sourceMapError } from './dev-source-map.
|
|
13
|
+
import type { RouteMatch } from './pipeline.ts';
|
|
14
|
+
import type { ManifestSegmentNode } from './route-matcher.ts';
|
|
15
|
+
import type { ClientBootstrapConfig } from './html-injectors.ts';
|
|
16
|
+
import type { LayoutEntry } from './deny-renderer.ts';
|
|
17
|
+
import type { GlobalErrorFile } from './rsc-entry/error-renderer.ts';
|
|
18
|
+
import { swallow } from './logger.ts';
|
|
19
|
+
import { logRenderError } from './logger.ts';
|
|
20
|
+
import { loadModule } from './safe-load.ts';
|
|
21
|
+
import { sourceMapError } from './dev-source-map.ts';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Render a fallback error page when the render pipeline throws.
|
|
@@ -35,7 +35,7 @@ export async function renderFallbackError(
|
|
|
35
35
|
clientBootstrap: ClientBootstrapConfig,
|
|
36
36
|
globalError?: GlobalErrorFile,
|
|
37
37
|
projectRoot?: string,
|
|
38
|
-
hmrOptions?: import('../dev-tools/dev-page-shell.
|
|
38
|
+
hmrOptions?: import('../dev-tools/dev-page-shell.ts').DevErrorHmrOptions
|
|
39
39
|
): Promise<Response> {
|
|
40
40
|
// Source-map the error's stack trace in dev mode so the error page
|
|
41
41
|
// shows original source positions. See TIM-811.
|
|
@@ -45,7 +45,7 @@ export async function renderFallbackError(
|
|
|
45
45
|
return renderDevErrorPage(error, projectRoot, hmrOptions);
|
|
46
46
|
}
|
|
47
47
|
// Lazy import to avoid loading error-renderer in the pipeline module
|
|
48
|
-
const { renderErrorPage } = await import('./rsc-entry/error-renderer.
|
|
48
|
+
const { renderErrorPage } = await import('./rsc-entry/error-renderer.ts');
|
|
49
49
|
const segments = [rootSegment];
|
|
50
50
|
const layoutComponents: LayoutEntry[] = [];
|
|
51
51
|
// Wrap layout loading in try/catch — if the root layout module itself
|
|
@@ -95,7 +95,7 @@ export async function renderFallbackError(
|
|
|
95
95
|
export async function renderDevErrorPage(
|
|
96
96
|
error: unknown,
|
|
97
97
|
projectRoot?: string,
|
|
98
|
-
hmrOptions?: import('../dev-tools/dev-page-shell.
|
|
98
|
+
hmrOptions?: import('../dev-tools/dev-page-shell.ts').DevErrorHmrOptions
|
|
99
99
|
): Promise<Response> {
|
|
100
100
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
101
101
|
const root = projectRoot ?? process.cwd();
|
|
@@ -104,7 +104,7 @@ export async function renderDevErrorPage(
|
|
|
104
104
|
try {
|
|
105
105
|
// Dynamic import — keeps dev-error-page.ts and its transitive deps
|
|
106
106
|
// (dev-error-overlay.ts, @jridgewell/trace-mapping) out of production bundles.
|
|
107
|
-
const { generateDevErrorPage } = await import('../dev-tools/error-page.
|
|
107
|
+
const { generateDevErrorPage } = await import('../dev-tools/error-page.ts');
|
|
108
108
|
html = generateDevErrorPage(err, 'render', root, hmrOptions);
|
|
109
109
|
// Inject Vite client script so the error overlay fires when HMR connects.
|
|
110
110
|
html = html.replace(
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Design doc: 02-rendering-pipeline.md
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import type { TransitionMap } from '../utils/state-machine.
|
|
21
|
+
import type { TransitionMap } from '../utils/state-machine.ts';
|
|
22
22
|
|
|
23
23
|
// ─── States ──────────────────────────────────────────────────────────────────
|
|
24
24
|
|
package/src/server/form-flash.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* See design/08-forms-and-actions.md §"No-JS Error Round-Trip"
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { ValidationErrors } from './action-client.
|
|
18
|
-
import { formFlashAls } from './als-registry.
|
|
17
|
+
import type { ValidationErrors } from './action-client.ts';
|
|
18
|
+
import { formFlashAls } from './als-registry.ts';
|
|
19
19
|
|
|
20
20
|
// ─── Types ───────────────────────────────────────────────────────────────
|
|
21
21
|
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
* Design docs: 02-rendering-pipeline.md §"Streaming Constraints", 18-build-system.md §"Entry Files"
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
import { createMachine, type Machine } from '../utils/state-machine.
|
|
28
|
-
import { flightChunkScript } from './flight-scripts.
|
|
27
|
+
import { createMachine, type Machine } from '../utils/state-machine.ts';
|
|
28
|
+
import { flightChunkScript } from './flight-scripts.ts';
|
|
29
29
|
import {
|
|
30
30
|
flightInjectionTransitions,
|
|
31
31
|
isHtmlDone,
|
|
32
32
|
isPullDone,
|
|
33
33
|
type FlightInjectionState,
|
|
34
34
|
type FlightInjectionEvent,
|
|
35
|
-
} from './flight-injection-state.
|
|
36
|
-
import { withTimeout, RenderTimeoutError } from './render-timeout.
|
|
35
|
+
} from './flight-injection-state.ts';
|
|
36
|
+
import { withTimeout, RenderTimeoutError } from './render-timeout.ts';
|
|
37
37
|
|
|
38
38
|
// ─── Encoders / Constants ────────────────────────────────────────────────────
|
|
39
39
|
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
processInjectorChunk,
|
|
29
29
|
processSuffixChunk,
|
|
30
30
|
suffixFlush,
|
|
31
|
-
} from './html-injector-core.
|
|
32
|
-
import { flightChunkScript } from './flight-scripts.
|
|
33
|
-
import { withTimeout, RenderTimeoutError } from './render-timeout.
|
|
34
|
-
import { createTickCoalescer } from './coalesce-tick.
|
|
31
|
+
} from './html-injector-core.ts';
|
|
32
|
+
import { flightChunkScript } from './flight-scripts.ts';
|
|
33
|
+
import { withTimeout, RenderTimeoutError } from './render-timeout.ts';
|
|
34
|
+
import { createTickCoalescer } from './coalesce-tick.ts';
|
|
35
35
|
|
|
36
36
|
// ─── Buffered Transform ──────────────────────────────────────────────────────
|
|
37
37
|
|
|
@@ -414,7 +414,7 @@ export function buildClientScripts(runtimeConfig: {
|
|
|
414
414
|
clientJavascript: { disabled: boolean; enableHMRInDev: boolean };
|
|
415
415
|
dev: boolean;
|
|
416
416
|
devBrowserLogs?: string;
|
|
417
|
-
buildManifest?: import('./build-manifest.
|
|
417
|
+
buildManifest?: import('./build-manifest.ts').BuildManifest;
|
|
418
418
|
}): ClientBootstrapConfig {
|
|
419
419
|
if (runtimeConfig.clientJavascript.disabled) {
|
|
420
420
|
// When client JS is disabled, import /@vite/client in dev mode if
|
package/src/server/index.ts
CHANGED
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
// Framework-internal pipeline plumbing is in #server-internal (Node package import).
|
|
5
5
|
// Design doc: design/triage/api-naming-spike.md §8.5
|
|
6
6
|
|
|
7
|
-
export type { AccessContext } from './types';
|
|
8
|
-
export type { MiddlewareContext } from './types';
|
|
9
|
-
export type { RouteContext } from './types';
|
|
10
|
-
export type { Metadata, MetadataRoute, MetadataHandler, MetadataResult } from './types';
|
|
7
|
+
export type { AccessContext } from './types.ts';
|
|
8
|
+
export type { MiddlewareContext } from './types.ts';
|
|
9
|
+
export type { RouteContext } from './types.ts';
|
|
10
|
+
export type { Metadata, MetadataRoute, MetadataHandler, MetadataResult } from './types.ts';
|
|
11
11
|
|
|
12
12
|
// Request Context — ALS-backed accessors (all sync)
|
|
13
13
|
// Prefer defineSearchParams().get() and getSegmentParams(SEGMENT_PATH) for typed access.
|
|
14
14
|
// Design doc: design/04-authorization.md §"AccessContext does not include cookies or headers"
|
|
15
|
-
export { getHeaders, getSegmentParams } from './request-context';
|
|
16
|
-
export type { ReadonlyHeaders } from './request-context';
|
|
15
|
+
export { getHeaders, getSegmentParams } from './request-context.ts';
|
|
16
|
+
export type { ReadonlyHeaders } from './request-context.ts';
|
|
17
17
|
|
|
18
18
|
// Cookie Context — ALS-backed getCookieJar() escape hatch
|
|
19
19
|
// Design doc: design/29-cookies.md
|
|
20
|
-
export { getCookieJar } from './cookie-context';
|
|
21
|
-
export type { RequestCookies, CookieOptions, SetCookieOptions } from './cookie-context';
|
|
20
|
+
export { getCookieJar } from './cookie-context.ts';
|
|
21
|
+
export type { RequestCookies, CookieOptions, SetCookieOptions } from './cookie-context.ts';
|
|
22
22
|
|
|
23
23
|
// Runtime primitives
|
|
24
24
|
export {
|
|
@@ -29,16 +29,16 @@ export {
|
|
|
29
29
|
waitUntil,
|
|
30
30
|
type DenyOptions,
|
|
31
31
|
type RedirectOptions,
|
|
32
|
-
} from './primitives';
|
|
32
|
+
} from './primitives.ts';
|
|
33
33
|
// RenderError removed from public exports per TIM-724.
|
|
34
34
|
// Use deny({ status: 500, data: ... }) instead. RenderError stays in
|
|
35
35
|
// #server-internal for pipeline catch logic.
|
|
36
|
-
export type { RenderErrorDigest } from './primitives';
|
|
36
|
+
export type { RenderErrorDigest } from './primitives.ts';
|
|
37
37
|
// JsonSerializable moved to @timber-js/app/codec as the single canonical path.
|
|
38
38
|
// Re-export removed per TIM-721.
|
|
39
39
|
|
|
40
40
|
// Server Actions — user-facing action client and validation
|
|
41
|
-
export { createActionClient, ActionError, validated } from './action-client';
|
|
41
|
+
export { createActionClient, ActionError, validated } from './action-client.ts';
|
|
42
42
|
export type {
|
|
43
43
|
ActionResult,
|
|
44
44
|
ActionFn,
|
|
@@ -48,24 +48,24 @@ export type {
|
|
|
48
48
|
ActionMiddleware,
|
|
49
49
|
ActionSchema,
|
|
50
50
|
ValidationErrors,
|
|
51
|
-
} from './action-client';
|
|
51
|
+
} from './action-client.ts';
|
|
52
52
|
|
|
53
53
|
// FormData Preprocessing
|
|
54
|
-
export { coerce, parseFormData } from './form-data';
|
|
54
|
+
export { coerce, parseFormData } from './form-data.ts';
|
|
55
55
|
|
|
56
56
|
// Form Flash (no-JS error round-trip)
|
|
57
|
-
export { getFormFlash } from './form-flash';
|
|
58
|
-
export type { FormFlashData } from './form-flash';
|
|
57
|
+
export { getFormFlash } from './form-flash.ts';
|
|
58
|
+
export type { FormFlashData } from './form-flash.ts';
|
|
59
59
|
|
|
60
60
|
// Revalidation — user-facing revalidation APIs
|
|
61
|
-
export { revalidatePath, revalidateTag } from './actions';
|
|
61
|
+
export { revalidatePath, revalidateTag } from './actions.ts';
|
|
62
62
|
|
|
63
63
|
// Tracing — per-request trace ID via ALS (user-facing accessors)
|
|
64
64
|
// Design doc: design/17-logging.md §"trace_id is Always Set"
|
|
65
|
-
export { getTraceId, getSpanId, withSpan, addSpanEvent } from './tracing';
|
|
65
|
+
export { getTraceId, getSpanId, withSpan, addSpanEvent } from './tracing.ts';
|
|
66
66
|
|
|
67
67
|
// Coerced param types — the post-coercion domain for segment params.
|
|
68
68
|
// TIM-1347: these replaced the previous `Record<string, string | string[]>` lie.
|
|
69
|
-
export type { CoercedParamValue, CoercedParams } from '../shared/param-value';
|
|
69
|
+
export type { CoercedParamValue, CoercedParams } from '../shared/param-value.ts';
|
|
70
70
|
|
|
71
71
|
// Segment params types — re-exported for convenience.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* See design/17-logging.md §"instrumentation.ts — The Entry Point"
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { setLogger, type TimberLogger } from './logger.
|
|
12
|
+
import { setLogger, type TimberLogger } from './logger.ts';
|
|
13
13
|
|
|
14
14
|
// ─── Instrumentation Types ────────────────────────────────────────────────
|
|
15
15
|
|