@timber-js/app 0.2.0-alpha.239 → 0.2.0-alpha.240
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/dist/_chunks/{actions-Top9GftB.js → actions-DIgnvDrG.js} +4 -4
- package/dist/_chunks/{actions-Top9GftB.js.map → actions-DIgnvDrG.js.map} +1 -1
- package/dist/_chunks/{als-registry-DpygwCp0.js → als-registry-PPYstxK0.js} +2 -1
- package/dist/_chunks/{als-registry-DpygwCp0.js.map → als-registry-PPYstxK0.js.map} +1 -1
- package/dist/_chunks/{cache-api-Bo8c7XVF.js → cache-api-uWQwuxWb.js} +5 -5
- package/dist/_chunks/{cache-api-Bo8c7XVF.js.map → cache-api-uWQwuxWb.js.map} +1 -1
- package/dist/_chunks/{chains-DMoHX4yH.js → chains-C7CExrUI.js} +2 -2
- package/dist/_chunks/{chains-DMoHX4yH.js.map → chains-C7CExrUI.js.map} +1 -1
- package/dist/_chunks/chains-CSslTUdI.js +1 -0
- package/dist/_chunks/{classify-BwyAd-dZ.js → classify-Cj9EeZoL.js} +2 -2
- package/dist/_chunks/{classify-BwyAd-dZ.js.map → classify-Cj9EeZoL.js.map} +1 -1
- package/dist/_chunks/{cli-check-DQAD9MLo.js → cli-check-C3QOAru7.js} +3 -3
- package/dist/_chunks/{cli-check-DQAD9MLo.js.map → cli-check-C3QOAru7.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-C_xNLqBj.js → cli-schema-sync-BRxZz66D.js} +1 -1
- package/dist/_chunks/{cli-schema-sync-CmGls3dc.js → cli-schema-sync-DQUS_o3V.js} +2 -2
- package/dist/_chunks/{cli-schema-sync-CmGls3dc.js.map → cli-schema-sync-DQUS_o3V.js.map} +1 -1
- package/dist/_chunks/{client-dep-entries-C5BTQtFS.js → client-dep-entries-ZETBdLgv.js} +2 -2
- package/dist/_chunks/{client-dep-entries-C5BTQtFS.js.map → client-dep-entries-ZETBdLgv.js.map} +1 -1
- package/dist/_chunks/{convention-lint-GQA6WTRo.js → convention-lint-BoVISNS6.js} +3 -3
- package/dist/_chunks/{convention-lint-GQA6WTRo.js.map → convention-lint-BoVISNS6.js.map} +1 -1
- package/dist/_chunks/dev-server-B8roKA3Q.js +1 -0
- package/dist/_chunks/{dev-server-Cr3_Fu5A.js → dev-server-C5R6jx8Q.js} +2 -2
- package/dist/_chunks/{dev-server-Cr3_Fu5A.js.map → dev-server-C5R6jx8Q.js.map} +1 -1
- package/dist/_chunks/{dev-span-RsVeYYc_.js → dev-span-0aG7Q_Ph.js} +3 -7
- package/dist/_chunks/dev-span-0aG7Q_Ph.js.map +1 -0
- package/dist/_chunks/{error-boundary-Bh-egWUI.js → error-boundary-DB51f9ih.js} +98 -419
- package/dist/_chunks/error-boundary-DB51f9ih.js.map +1 -0
- package/dist/_chunks/{flight-source-node-BsrlUjMO.js → flight-source-node-D9cHBhjP.js} +7 -4
- package/dist/_chunks/flight-source-node-D9cHBhjP.js.map +1 -0
- package/dist/_chunks/{json-lossy-check-D47R9Fp5.js → json-lossy-check-Y1GxqVX_.js} +2 -2
- package/dist/_chunks/{json-lossy-check-D47R9Fp5.js.map → json-lossy-check-Y1GxqVX_.js.map} +1 -1
- package/dist/_chunks/{live-graph-HcLScfiV.js → live-graph-BDQWvnMm.js} +4 -4
- package/dist/_chunks/{live-graph-HcLScfiV.js.map → live-graph-BDQWvnMm.js.map} +1 -1
- package/dist/_chunks/{logger-DDLtp5e-.js → logger-DmRR9tmZ.js} +2 -2
- package/dist/_chunks/{logger-DDLtp5e-.js.map → logger-DmRR9tmZ.js.map} +1 -1
- package/dist/_chunks/metadata-routes-MXNjWOt5.js.map +1 -1
- package/dist/_chunks/{node-response-omewa8e6.js → node-response-yp8zdyRp.js} +2 -2
- package/dist/_chunks/{node-response-omewa8e6.js.map → node-response-yp8zdyRp.js.map} +1 -1
- package/dist/_chunks/plugin-context-BtaQcMuh.js.map +1 -1
- package/dist/_chunks/{poison-scan-DONdiCGX.js → poison-scan-WQgUydF_.js} +2 -2
- package/dist/_chunks/{poison-scan-DONdiCGX.js.map → poison-scan-WQgUydF_.js.map} +1 -1
- package/dist/_chunks/{scanner-DSAJjH0x.js → scanner-C9Lrf77z.js} +3 -2
- package/dist/_chunks/{scanner-DSAJjH0x.js.map → scanner-C9Lrf77z.js.map} +1 -1
- package/dist/_chunks/{sizeof-DVhEVN_y.js → sizeof-BISkSaU0.js} +2 -2
- package/dist/_chunks/{sizeof-DVhEVN_y.js.map → sizeof-BISkSaU0.js.map} +1 -1
- package/dist/_chunks/{walkers-96YopJds.js → walkers-Bxv4v7tX.js} +3 -3
- package/dist/_chunks/{walkers-96YopJds.js.map → walkers-Bxv4v7tX.js.map} +1 -1
- package/dist/adapters/cloudflare-kv-cache.js +1 -1
- package/dist/analyze/crawl-entry.js +3 -3
- package/dist/analyze/graph-command.js +2 -2
- package/dist/cache/index.js +2 -2
- package/dist/cache/stores/memory.js +1 -1
- package/dist/cdn/workers-cache-purge.js +1 -1
- package/dist/cli.js +3 -3
- package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
- package/dist/client/browser-entry/hydrate.d.ts +1 -1
- package/dist/client/browser-entry/router-init.d.ts.map +1 -1
- package/dist/client/error-boundary.d.ts +1 -0
- package/dist/client/error-boundary.d.ts.map +1 -1
- package/dist/client/error-boundary.js +1 -1
- package/dist/client/history.d.ts +4 -5
- package/dist/client/history.d.ts.map +1 -1
- package/dist/client/index.js +6 -7
- package/dist/client/index.js.map +1 -1
- package/dist/client/internal.d.ts +1 -1
- package/dist/client/internal.d.ts.map +1 -1
- package/dist/client/internal.js +194 -55
- package/dist/client/internal.js.map +1 -1
- package/dist/client/navigation-commit.d.ts +6 -25
- package/dist/client/navigation-commit.d.ts.map +1 -1
- package/dist/client/outlet-content-cache.d.ts +59 -0
- package/dist/client/outlet-content-cache.d.ts.map +1 -0
- package/dist/client/outlet-scope-context.d.ts +30 -0
- package/dist/client/outlet-scope-context.d.ts.map +1 -0
- package/dist/client/params-context.d.ts +10 -11
- package/dist/client/params-context.d.ts.map +1 -1
- package/dist/client/router-pipeline.d.ts +5 -5
- package/dist/client/router-pipeline.d.ts.map +1 -1
- package/dist/client/router-types.d.ts +10 -24
- package/dist/client/router-types.d.ts.map +1 -1
- package/dist/client/router.d.ts.map +1 -1
- package/dist/client/rsc-fetch.d.ts +4 -17
- package/dist/client/rsc-fetch.d.ts.map +1 -1
- package/dist/client/segment-cache.d.ts +15 -103
- package/dist/client/segment-cache.d.ts.map +1 -1
- package/dist/client/segment-outlet.d.ts +28 -52
- package/dist/client/segment-outlet.d.ts.map +1 -1
- package/dist/client/stale-segment.d.ts +39 -0
- package/dist/client/stale-segment.d.ts.map +1 -0
- package/dist/client/use-segment-params.d.ts +1 -1
- package/dist/config-types.d.ts +7 -6
- package/dist/config-types.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -732
- package/dist/index.js.map +1 -1
- package/dist/native/rsc/manifest.json +6 -4
- package/dist/native/rsc/routing/segment-keys.js +3 -11
- package/dist/native/rsc/routing/segment-keys.js.map +1 -1
- package/dist/native/rsc/server/access-gate.js +3 -7
- package/dist/native/rsc/server/access-gate.js.map +1 -1
- package/dist/native/rsc/server/als-registry.js +2 -1
- package/dist/native/rsc/server/als-registry.js.map +1 -1
- package/dist/native/rsc/server/build-manifest.js.map +1 -1
- package/dist/native/rsc/server/chain-url-parts.js +1 -6
- package/dist/native/rsc/server/chain-url-parts.js.map +1 -1
- package/dist/native/rsc/server/client-state-tree.js +33 -0
- package/dist/native/rsc/server/client-state-tree.js.map +1 -0
- package/dist/native/rsc/server/flight-source-node.js +5 -2
- package/dist/native/rsc/server/flight-source-node.js.map +1 -1
- package/dist/native/rsc/server/flight-source.js +46 -7
- package/dist/native/rsc/server/flight-source.js.map +1 -1
- package/dist/native/rsc/server/pipeline-interception.js +1 -1
- package/dist/native/rsc/server/publish-params.js.map +1 -1
- package/dist/native/rsc/server/route-element-builder.js +43 -61
- package/dist/native/rsc/server/route-element-builder.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/helpers.js +5 -28
- package/dist/native/rsc/server/rsc-entry/helpers.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/render-route.js +33 -7
- package/dist/native/rsc/server/rsc-entry/render-route.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js +2 -1
- package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/rsc-payload.js +2 -5
- package/dist/native/rsc/server/rsc-entry/rsc-payload.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/rsc-stream.js +44 -40
- package/dist/native/rsc/server/rsc-entry/rsc-stream.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/ssr-renderer.js +1 -1
- package/dist/native/rsc/server/rsc-entry/ssr-renderer.js.map +1 -1
- package/dist/native/rsc/server/segment-hash/capture.js +107 -0
- package/dist/native/rsc/server/segment-hash/capture.js.map +1 -0
- package/dist/native/rsc/server/segment-hash/outlet.js +81 -0
- package/dist/native/rsc/server/segment-hash/outlet.js.map +1 -0
- package/dist/native/rsc/server/segment-hash/stream-tap.js +139 -0
- package/dist/native/rsc/server/segment-hash/stream-tap.js.map +1 -0
- package/dist/native/rsc/server/segment-hash/value-hash.js +171 -0
- package/dist/native/rsc/server/segment-hash/value-hash.js.map +1 -0
- package/dist/native/rsc/server/slot-resolver.js +20 -124
- package/dist/native/rsc/server/slot-resolver.js.map +1 -1
- package/dist/native/rsc/server/vite-handoff-rsc.js.map +1 -1
- package/dist/native/rsc/shared/outlet-decision.js +5 -0
- package/dist/native/rsc/shared/outlet-decision.js.map +1 -0
- package/dist/native/ssr/client/error-boundary.js +16 -3
- package/dist/native/ssr/client/error-boundary.js.map +1 -1
- package/dist/native/ssr/client/navigation-commit.js +1 -5
- package/dist/native/ssr/client/navigation-commit.js.map +1 -1
- package/dist/native/ssr/client/outlet-content-cache.js +53 -0
- package/dist/native/ssr/client/outlet-content-cache.js.map +1 -0
- package/dist/native/ssr/client/outlet-scope-context.js +12 -0
- package/dist/native/ssr/client/outlet-scope-context.js.map +1 -0
- package/dist/native/ssr/client/params-context.js.map +1 -1
- package/dist/native/ssr/client/rsc-fetch.js +1 -12
- package/dist/native/ssr/client/rsc-fetch.js.map +1 -1
- package/dist/native/ssr/client/segment-outlet.js +34 -13
- package/dist/native/ssr/client/segment-outlet.js.map +1 -1
- package/dist/native/ssr/client/stale-segment.js +29 -0
- package/dist/native/ssr/client/stale-segment.js.map +1 -0
- package/dist/native/ssr/manifest.json +5 -4
- package/dist/native/ssr/routing/segment-keys.js +5 -1
- package/dist/native/ssr/routing/segment-keys.js.map +1 -1
- package/dist/native/ssr/server/access-gate.js +3 -7
- package/dist/native/ssr/server/access-gate.js.map +1 -1
- package/dist/native/ssr/server/als-registry.js +1 -0
- package/dist/native/ssr/server/als-registry.js.map +1 -1
- package/dist/native/ssr/server/build-manifest.js.map +1 -1
- package/dist/native/ssr/server/client-state-tree.js +33 -0
- package/dist/native/ssr/server/client-state-tree.js.map +1 -0
- package/dist/native/ssr/server/flight-source-node.js +5 -2
- package/dist/native/ssr/server/flight-source-node.js.map +1 -1
- package/dist/native/ssr/server/flight-source.js +1 -0
- package/dist/native/ssr/server/flight-source.js.map +1 -1
- package/dist/native/ssr/server/pipeline-interception.js +1 -1
- package/dist/native/ssr/server/segment-hash/value-hash.js +162 -0
- package/dist/native/ssr/server/segment-hash/value-hash.js.map +1 -0
- package/dist/native/ssr/server/ssr-wrappers.js.map +1 -1
- package/dist/native/ssr/server/vite-handoff-rsc.js.map +1 -1
- package/dist/native/ssr/shared/payload-root.js.map +1 -1
- package/dist/plugin-context.d.ts +0 -16
- package/dist/plugin-context.d.ts.map +1 -1
- package/dist/plugins/build-manifest.d.ts.map +1 -1
- package/dist/routing/index.js +2 -2
- package/dist/routing/segment-keys.d.ts +8 -21
- package/dist/routing/segment-keys.d.ts.map +1 -1
- package/dist/server/access-gate.d.ts +0 -14
- package/dist/server/access-gate.d.ts.map +1 -1
- package/dist/server/als-registry.d.ts +16 -0
- package/dist/server/als-registry.d.ts.map +1 -1
- package/dist/server/build-manifest.d.ts +1 -10
- package/dist/server/build-manifest.d.ts.map +1 -1
- package/dist/server/chain-url-parts.d.ts +3 -13
- package/dist/server/chain-url-parts.d.ts.map +1 -1
- package/dist/server/client-state-tree.d.ts +31 -0
- package/dist/server/client-state-tree.d.ts.map +1 -0
- package/dist/server/flight-source-node.d.ts +6 -1
- package/dist/server/flight-source-node.d.ts.map +1 -1
- package/dist/server/flight-source.d.ts +27 -0
- package/dist/server/flight-source.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/internal.js +48 -47
- package/dist/server/internal.js.map +1 -1
- package/dist/server/publish-params.d.ts +5 -4
- package/dist/server/publish-params.d.ts.map +1 -1
- package/dist/server/route-element-builder.d.ts +4 -19
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/rsc-entry/helpers.d.ts +7 -13
- package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
- package/dist/server/rsc-entry/revalidate-renderer.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-payload.d.ts +1 -2
- package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts +11 -2
- package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
- package/dist/server/rsc-entry/ssr-renderer.d.ts +0 -2
- package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
- package/dist/server/segment-hash/capture.d.ts +77 -0
- package/dist/server/segment-hash/capture.d.ts.map +1 -0
- package/dist/server/segment-hash/outlet.d.ts +65 -0
- package/dist/server/segment-hash/outlet.d.ts.map +1 -0
- package/dist/server/segment-hash/stream-tap.d.ts +49 -0
- package/dist/server/segment-hash/stream-tap.d.ts.map +1 -0
- package/dist/server/segment-hash/value-hash.d.ts +70 -0
- package/dist/server/segment-hash/value-hash.d.ts.map +1 -0
- package/dist/server/slot-resolver.d.ts +13 -78
- package/dist/server/slot-resolver.d.ts.map +1 -1
- package/dist/server/ssr-wrappers.d.ts +7 -9
- package/dist/server/ssr-wrappers.d.ts.map +1 -1
- package/dist/server/vite-handoff-rsc.d.ts +10 -1
- package/dist/server/vite-handoff-rsc.d.ts.map +1 -1
- package/dist/shared/outlet-decision.d.ts +48 -0
- package/dist/shared/outlet-decision.d.ts.map +1 -0
- package/dist/shared/payload-root.d.ts +5 -8
- package/dist/shared/payload-root.d.ts.map +1 -1
- package/dist/shared/segment-info.d.ts +13 -28
- package/dist/shared/segment-info.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/browser-entry/action-dispatch.ts +1 -15
- package/src/client/browser-entry/hydrate.ts +3 -3
- package/src/client/browser-entry/router-init.ts +28 -47
- package/src/client/error-boundary.tsx +49 -9
- package/src/client/history.ts +4 -5
- package/src/client/internal.ts +1 -1
- package/src/client/navigation-commit.ts +25 -83
- package/src/client/outlet-content-cache.ts +119 -0
- package/src/client/outlet-scope-context.ts +42 -0
- package/src/client/params-context.ts +11 -12
- package/src/client/router-pipeline.ts +10 -74
- package/src/client/router-types.ts +11 -26
- package/src/client/router.ts +7 -22
- package/src/client/rsc-fetch.ts +5 -30
- package/src/client/segment-cache.ts +19 -264
- package/src/client/segment-outlet.tsx +80 -72
- package/src/client/stale-segment.ts +60 -0
- package/src/client/use-segment-params.ts +1 -1
- package/src/config-types.ts +7 -6
- package/src/index.ts +0 -2
- package/src/plugin-context.ts +0 -16
- package/src/plugins/build-manifest.ts +1 -22
- package/src/routing/scanner.ts +12 -0
- package/src/routing/segment-keys.ts +9 -35
- package/src/rsc-runtime/vendor-types.d.ts +8 -0
- package/src/server/access-gate.tsx +3 -32
- package/src/server/als-registry.ts +23 -0
- package/src/server/build-manifest.ts +1 -11
- package/src/server/chain-url-parts.ts +3 -21
- package/src/server/client-state-tree.ts +75 -0
- package/src/server/flight-source-node.ts +7 -2
- package/src/server/flight-source.ts +102 -9
- package/src/server/pipeline-interception.ts +1 -1
- package/src/server/publish-params.ts +5 -4
- package/src/server/route-element-builder.ts +77 -206
- package/src/server/rsc-entry/helpers.ts +11 -65
- package/src/server/rsc-entry/render-route.ts +54 -28
- package/src/server/rsc-entry/revalidate-renderer.ts +2 -1
- package/src/server/rsc-entry/rsc-payload.ts +11 -39
- package/src/server/rsc-entry/rsc-stream.ts +123 -101
- package/src/server/rsc-entry/ssr-renderer.ts +1 -3
- package/src/server/segment-hash/capture.ts +232 -0
- package/src/server/segment-hash/outlet.ts +185 -0
- package/src/server/segment-hash/stream-tap.ts +244 -0
- package/src/server/segment-hash/value-hash.ts +338 -0
- package/src/server/slot-resolver.ts +37 -323
- package/src/server/ssr-wrappers.tsx +7 -9
- package/src/server/vite-handoff-rsc.ts +12 -1
- package/src/shared/outlet-decision.ts +54 -0
- package/src/shared/payload-root.ts +5 -8
- package/src/shared/segment-info.ts +13 -28
- package/dist/_chunks/chains-CmzbpG-6.js +0 -1
- package/dist/_chunks/dev-server--4_Ogy_6.js +0 -1
- package/dist/_chunks/dev-span-RsVeYYc_.js.map +0 -1
- package/dist/_chunks/error-boundary-Bh-egWUI.js.map +0 -1
- package/dist/_chunks/flight-source-node-BsrlUjMO.js.map +0 -1
- package/dist/client/segment-update-context.d.ts +0 -15
- package/dist/client/segment-update-context.d.ts.map +0 -1
- package/dist/client/slot-content-cache-context.d.ts +0 -35
- package/dist/client/slot-content-cache-context.d.ts.map +0 -1
- package/dist/native/rsc/server/request-dep.js +0 -12
- package/dist/native/rsc/server/request-dep.js.map +0 -1
- package/dist/native/rsc/server/route-element-helpers.js +0 -20
- package/dist/native/rsc/server/route-element-helpers.js.map +0 -1
- package/dist/native/rsc/server/skippable-prefix.js +0 -72
- package/dist/native/rsc/server/skippable-prefix.js.map +0 -1
- package/dist/native/rsc/server/state-tree-diff.js +0 -35
- package/dist/native/rsc/server/state-tree-diff.js.map +0 -1
- package/dist/native/ssr/client/segment-cache.js +0 -119
- package/dist/native/ssr/client/segment-cache.js.map +0 -1
- package/dist/native/ssr/client/segment-update-context.js +0 -9
- package/dist/native/ssr/client/segment-update-context.js.map +0 -1
- package/dist/native/ssr/client/slot-content-cache-context.js +0 -8
- package/dist/native/ssr/client/slot-content-cache-context.js.map +0 -1
- package/dist/native/ssr/server/state-tree-diff.js +0 -23
- package/dist/native/ssr/server/state-tree-diff.js.map +0 -1
- package/dist/plugins/request-dep/analysis.d.ts +0 -106
- package/dist/plugins/request-dep/analysis.d.ts.map +0 -1
- package/dist/plugins/request-dep/index.d.ts +0 -75
- package/dist/plugins/request-dep/index.d.ts.map +0 -1
- package/dist/plugins/request-dep/origin.d.ts +0 -61
- package/dist/plugins/request-dep/origin.d.ts.map +0 -1
- package/dist/server/request-dep.d.ts +0 -15
- package/dist/server/request-dep.d.ts.map +0 -1
- package/dist/server/route-element-helpers.d.ts +0 -12
- package/dist/server/route-element-helpers.d.ts.map +0 -1
- package/dist/server/skippable-prefix.d.ts +0 -29
- package/dist/server/skippable-prefix.d.ts.map +0 -1
- package/dist/server/state-tree-diff.d.ts +0 -78
- package/dist/server/state-tree-diff.d.ts.map +0 -1
- package/src/client/segment-update-context.ts +0 -23
- package/src/client/slot-content-cache-context.ts +0 -43
- package/src/plugins/request-dep/analysis.ts +0 -447
- package/src/plugins/request-dep/index.ts +0 -376
- package/src/plugins/request-dep/origin.ts +0 -310
- package/src/server/request-dep.ts +0 -37
- package/src/server/route-element-helpers.ts +0 -37
- package/src/server/skippable-prefix.ts +0 -172
- package/src/server/state-tree-diff.ts +0 -132
|
@@ -31,7 +31,10 @@ import type { InterceptionContext, RouteMatch } from '../pipeline.ts';
|
|
|
31
31
|
import { DenySignal } from '../primitives.ts';
|
|
32
32
|
import { buildRouteElement, NoPageComponentError } from '../route-element-builder.ts';
|
|
33
33
|
import { recordTiming } from '../server-timing.ts';
|
|
34
|
-
import { parseClientStateTree } from '../state-tree
|
|
34
|
+
import { parseClientStateTree } from '../client-state-tree.ts';
|
|
35
|
+
import { isOutletType, type SegmentHashRender } from '../segment-hash/outlet.ts';
|
|
36
|
+
import { createFromReadableStream } from '../vite-handoff-rsc.ts';
|
|
37
|
+
import { createSegmentHashTap } from '../segment-hash/stream-tap.ts';
|
|
35
38
|
|
|
36
39
|
import { handleApiRoute } from './api-handler.ts';
|
|
37
40
|
import type { DenyFallbackRenderer } from './deny-fallback.ts';
|
|
@@ -89,13 +92,36 @@ export async function renderRoute(
|
|
|
89
92
|
return handleApiRoute(req, segments, responseHeaders);
|
|
90
93
|
}
|
|
91
94
|
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
const
|
|
98
|
-
|
|
95
|
+
// Segment hash dedupe (design/52-segment-hash-dedupe.md), when the app
|
|
96
|
+
// opted in. Every render that can reach a client router hashes its live
|
|
97
|
+
// segments, document requests included — the client records those hashes
|
|
98
|
+
// as it hydrates. Only a navigation request carries hashes to compare
|
|
99
|
+
// against (`X-Timber-State-Tree`), so only it can skip.
|
|
100
|
+
const hashing = deps.clientSegmentCache && !clientJsDisabled;
|
|
101
|
+
const tap = hashing
|
|
102
|
+
? createSegmentHashTap({
|
|
103
|
+
timeoutMs: deps.renderTimeoutMs,
|
|
104
|
+
isOutlet: isOutletType,
|
|
105
|
+
decode: (stream) => createFromReadableStream(stream),
|
|
106
|
+
})
|
|
107
|
+
: null;
|
|
108
|
+
// A capture reports through the main render's error handler, which exists
|
|
109
|
+
// only once the main render starts — captures start inside it. The digests
|
|
110
|
+
// it hands out are remembered, so the main render passes a decoded error
|
|
111
|
+
// row through instead of reporting it a second time.
|
|
112
|
+
const relayedDigests = new Set<string>();
|
|
113
|
+
let mainOnError: ((error: unknown) => string | void) | null = null;
|
|
114
|
+
const segmentHashRender: SegmentHashRender = {
|
|
115
|
+
clientHashes: hashing && isRscRequest(req) ? (parseClientStateTree(req)?.hashes ?? null) : null,
|
|
116
|
+
tap,
|
|
117
|
+
captureTimeoutMs: deps.renderTimeoutMs,
|
|
118
|
+
signal: req.signal,
|
|
119
|
+
onCaptureError(error) {
|
|
120
|
+
const digest = mainOnError?.(error);
|
|
121
|
+
if (typeof digest === 'string') relayedDigests.add(digest);
|
|
122
|
+
return digest;
|
|
123
|
+
},
|
|
124
|
+
};
|
|
99
125
|
|
|
100
126
|
// Build the React element tree — runs access checks eagerly to gate
|
|
101
127
|
// metadata resolution (TIM-1027), then loads modules and resolves
|
|
@@ -109,7 +135,7 @@ export async function renderRoute(
|
|
|
109
135
|
req,
|
|
110
136
|
match,
|
|
111
137
|
interception,
|
|
112
|
-
|
|
138
|
+
segmentHashRender,
|
|
113
139
|
buildManifest.metadataRouteHashes
|
|
114
140
|
);
|
|
115
141
|
} catch (error) {
|
|
@@ -134,14 +160,7 @@ export async function renderRoute(
|
|
|
134
160
|
desc: 'build element tree',
|
|
135
161
|
});
|
|
136
162
|
|
|
137
|
-
const {
|
|
138
|
-
payload,
|
|
139
|
-
layoutComponents,
|
|
140
|
-
deferSuspenseFor,
|
|
141
|
-
skippedSegments,
|
|
142
|
-
slotSkipInfo,
|
|
143
|
-
leafDenyChain,
|
|
144
|
-
} = routeResult;
|
|
163
|
+
const { payload, layoutComponents, deferSuspenseFor, leafDenyChain } = routeResult;
|
|
145
164
|
|
|
146
165
|
// Build head HTML for injection into the SSR output.
|
|
147
166
|
// Collects CSS, fonts, and modulepreload from the build manifest for matched segments.
|
|
@@ -194,7 +213,23 @@ export async function renderRoute(
|
|
|
194
213
|
|
|
195
214
|
// Render to RSC Flight stream with signal tracking.
|
|
196
215
|
const _rscStart = performance.now();
|
|
197
|
-
const { rscStream, signals } = renderRscStream(
|
|
216
|
+
const { rscStream, signals, onError } = renderRscStream(
|
|
217
|
+
payload,
|
|
218
|
+
req,
|
|
219
|
+
deps.renderTimeoutMs,
|
|
220
|
+
leafDenyChain,
|
|
221
|
+
tap ?? undefined,
|
|
222
|
+
relayedDigests
|
|
223
|
+
);
|
|
224
|
+
// Released when the render ends: the outlet gates close over this handler,
|
|
225
|
+
// and dev keeps finished render's components reachable long enough that a
|
|
226
|
+
// handler still set here held every request (dev-request-retention).
|
|
227
|
+
if (tap) {
|
|
228
|
+
mainOnError = onError;
|
|
229
|
+
tap.onEnd(() => {
|
|
230
|
+
mainOnError = null;
|
|
231
|
+
});
|
|
232
|
+
}
|
|
198
233
|
|
|
199
234
|
recordTiming({
|
|
200
235
|
name: 'rsc-init',
|
|
@@ -206,15 +241,7 @@ export async function renderRoute(
|
|
|
206
241
|
// stream directly — skip SSR HTML rendering entirely.
|
|
207
242
|
// See design/19-client-navigation.md §"RSC Payload Handling"
|
|
208
243
|
if (isRscRequest(req)) {
|
|
209
|
-
return buildRscPayloadResponse(
|
|
210
|
-
rscStream,
|
|
211
|
-
signals,
|
|
212
|
-
segments,
|
|
213
|
-
layoutComponents,
|
|
214
|
-
responseHeaders,
|
|
215
|
-
skippedSegments,
|
|
216
|
-
slotSkipInfo
|
|
217
|
-
);
|
|
244
|
+
return buildRscPayloadResponse(rscStream, signals, segments, layoutComponents, responseHeaders);
|
|
218
245
|
}
|
|
219
246
|
|
|
220
247
|
// The form state of the no-JS action this page answers, if any, as the
|
|
@@ -242,7 +269,6 @@ export async function renderRoute(
|
|
|
242
269
|
headHtml,
|
|
243
270
|
deferSuspenseFor,
|
|
244
271
|
globalError,
|
|
245
|
-
slotSkipInfo,
|
|
246
272
|
formState,
|
|
247
273
|
});
|
|
248
274
|
}
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
import type { CoercedParams } from '../../shared/param-value.ts';
|
|
48
48
|
|
|
49
49
|
import { runMiddlewareForAction } from './action-middleware-runner.ts';
|
|
50
|
+
import { NO_SEGMENT_HASHING } from '../segment-hash/outlet.ts';
|
|
50
51
|
import { RSC_CONTENT_TYPE } from '../../shared/rsc-media-type.ts';
|
|
51
52
|
|
|
52
53
|
/** Result of validating a `revalidatePath()` argument. */
|
|
@@ -337,7 +338,7 @@ export function createRevalidateRendererFactory(
|
|
|
337
338
|
revalidateReq,
|
|
338
339
|
match,
|
|
339
340
|
undefined,
|
|
340
|
-
|
|
341
|
+
NO_SEGMENT_HASHING,
|
|
341
342
|
deps.buildManifest.metadataRouteHashes
|
|
342
343
|
);
|
|
343
344
|
return {
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
import type { LayoutComponentEntry } from '../route-element-builder.ts';
|
|
23
23
|
import type { ManifestSegmentNode } from '../route-matcher.ts';
|
|
24
|
-
import type { SlotSkipEntry } from '../slot-resolver.ts';
|
|
25
24
|
|
|
26
25
|
import { buildSegmentInfo } from './helpers.ts';
|
|
27
26
|
import { RSC_CONTENT_TYPE } from '../../shared/rsc-media-type.ts';
|
|
@@ -76,9 +75,7 @@ export async function buildRscPayloadResponse(
|
|
|
76
75
|
signals: RenderSignals,
|
|
77
76
|
segments: ManifestSegmentNode[],
|
|
78
77
|
layoutComponents: LayoutComponentEntry[],
|
|
79
|
-
responseHeaders: Headers
|
|
80
|
-
skippedSegments?: string[],
|
|
81
|
-
slotSkipInfo?: SlotSkipEntry[]
|
|
78
|
+
responseHeaders: Headers
|
|
82
79
|
): Promise<Response> {
|
|
83
80
|
// Wait for the first chunk of the Flight source before committing headers.
|
|
84
81
|
// Race it against signal detection — if an async component
|
|
@@ -218,42 +215,17 @@ export async function buildRscPayloadResponse(
|
|
|
218
215
|
// React elements — React 19 Float manages them in document.head during
|
|
219
216
|
// client rendering. No X-Timber-Head header needed. See TIM-1151.
|
|
220
217
|
|
|
221
|
-
//
|
|
222
|
-
//
|
|
223
|
-
//
|
|
224
|
-
//
|
|
225
|
-
//
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
// Emitted in full even when a deny rendered, because this header answers two
|
|
232
|
-
// questions and they diverge here. The client picks its merge point out of
|
|
233
|
-
// this list (`buildSegmentUpdates`), and a partial payload with no merge
|
|
234
|
-
// point is never inserted at all — the URL commits over the stale previous
|
|
235
|
-
// UI. So it has to keep describing the chain the payload was BUILT against.
|
|
236
|
-
//
|
|
237
|
-
// What it must not also do on a deny is seed the segment cache, since the
|
|
238
|
-
// deny page replaced a subtree and part of that chain never mounted. That
|
|
239
|
-
// half is decided on the client by the boundary that renders the status
|
|
240
|
-
// page, at the commit that puts it on screen — the only place that knows,
|
|
241
|
-
// since the row may arrive after this response has been returned. See
|
|
242
|
-
// `client/navigation-commit.ts` and TIM-1356, TIM-1495.
|
|
243
|
-
const segmentInfo = buildSegmentInfo(
|
|
244
|
-
segments,
|
|
245
|
-
layoutComponents,
|
|
246
|
-
slotSkipInfo,
|
|
247
|
-
skippedSegments,
|
|
248
|
-
resolvedDenyIndex
|
|
218
|
+
// Describe the mounted chain so the client can report it back for
|
|
219
|
+
// interception scoping (`treePaths`, TIM-1282). Read the deny index first —
|
|
220
|
+
// what mounted depends on it. Recorded in ALS during render by AccessGate's
|
|
221
|
+
// catch path; a gate that denies after this point leaves it unset, and the
|
|
222
|
+
// client corrects for that itself: the boundary that renders the status
|
|
223
|
+
// page drops the tree at the commit that puts it on screen
|
|
224
|
+
// (`client/navigation-commit.ts`, TIM-1356, TIM-1495).
|
|
225
|
+
responseHeaders.set(
|
|
226
|
+
'X-Timber-Segments',
|
|
227
|
+
JSON.stringify(buildSegmentInfo(segments, layoutComponents, getFirstDeniedSegmentIndex()))
|
|
249
228
|
);
|
|
250
|
-
responseHeaders.set('X-Timber-Segments', JSON.stringify(segmentInfo));
|
|
251
|
-
|
|
252
|
-
// Send skipped segments so the client can merge the partial RSC payload
|
|
253
|
-
// with its cached segment elements. See design/19-client-navigation.md.
|
|
254
|
-
if (skippedSegments && skippedSegments.length > 0) {
|
|
255
|
-
responseHeaders.set('X-Timber-Skipped-Segments', JSON.stringify(skippedSegments));
|
|
256
|
-
}
|
|
257
229
|
|
|
258
230
|
// Always 200. A deny that already streamed — addressed at its owner's
|
|
259
231
|
// boundary — is in the body, not the status line, and the one consumer of
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { renderFlight } from '../vite-handoff-rsc.ts';
|
|
14
|
-
import type { FlightSource } from '../flight-source.ts';
|
|
14
|
+
import type { FlightSource, FlightTap } from '../flight-source.ts';
|
|
15
15
|
import type { RscPayloadRoot } from '../../shared/payload-root.ts';
|
|
16
16
|
import { encodeErrorDigest } from '../../shared/error-digest.ts';
|
|
17
17
|
|
|
@@ -31,6 +31,8 @@ import { isDebug } from '../debug.ts';
|
|
|
31
31
|
export interface RscStreamResult {
|
|
32
32
|
rscStream: FlightSource;
|
|
33
33
|
signals: RenderSignals;
|
|
34
|
+
/** The render's error handler — segment-hash captures report through it. */
|
|
35
|
+
onError: (error: unknown) => string | void;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
/**
|
|
@@ -52,116 +54,136 @@ export function renderRscStream(
|
|
|
52
54
|
payload: RscPayloadRoot,
|
|
53
55
|
req: Request,
|
|
54
56
|
renderTimeoutMs: number,
|
|
55
|
-
leafDenyChain?: DenyPageEntry[]
|
|
57
|
+
leafDenyChain?: DenyPageEntry[],
|
|
58
|
+
tap?: FlightTap,
|
|
59
|
+
/**
|
|
60
|
+
* Digests a segment-hash capture already produced through this handler. A
|
|
61
|
+
* capture's error row decoded into the live content reaches this render
|
|
62
|
+
* again as an error carrying that digest: pass it through, it has been
|
|
63
|
+
* reported and signalled once already.
|
|
64
|
+
*/
|
|
65
|
+
relayedDigests?: ReadonlySet<string>
|
|
56
66
|
): RscStreamResult {
|
|
57
67
|
const recorder = createSignalRecorder();
|
|
58
68
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
const onError = (error: unknown): string | void => {
|
|
70
|
+
if (
|
|
71
|
+
typeof error === 'object' &&
|
|
72
|
+
error !== null &&
|
|
73
|
+
'digest' in error &&
|
|
74
|
+
typeof error.digest === 'string' &&
|
|
75
|
+
relayedDigests?.has(error.digest)
|
|
76
|
+
) {
|
|
77
|
+
return error.digest;
|
|
78
|
+
}
|
|
79
|
+
// Connection abort (user refreshed or navigated away) — suppress.
|
|
80
|
+
// Not an application error; no need to track or log.
|
|
81
|
+
if (isAbortError(error) || req.signal?.aborted) return;
|
|
82
|
+
if (isDenySignal(error)) {
|
|
83
|
+
// Late addressing (TIM-1450): a nested-component deny escapes
|
|
84
|
+
// all in-tree catch sites and arrives here without owners.
|
|
85
|
+
// Resolve it against the leaf deny chain and stamp the full
|
|
86
|
+
// candidate list so the client can find the first reachable
|
|
87
|
+
// owner via its ancestry context.
|
|
88
|
+
//
|
|
89
|
+
// Not a deny the tree cannot hold (`_leaveSpa`, TIM-1607): the
|
|
90
|
+
// leaf chain here is the rendered route's, and its files are not
|
|
91
|
+
// the URL's answer. Left unaddressed, it is the deny fallback's
|
|
92
|
+
// inside the opening window, and the client terminal's after it.
|
|
93
|
+
if (!error.owners && leafDenyChain && !error._leaveSpa) {
|
|
94
|
+
const entries = matchDenyEntries(leafDenyChain, error.status);
|
|
95
|
+
if (entries.length > 0) {
|
|
96
|
+
error.owners = entries.map((e) => e.ownerKey);
|
|
82
97
|
}
|
|
83
|
-
recorder.deny(error);
|
|
84
|
-
return JSON.stringify({
|
|
85
|
-
type: 'deny',
|
|
86
|
-
status: error.status,
|
|
87
|
-
data: error.data,
|
|
88
|
-
owners: error.owners,
|
|
89
|
-
leaveSpa: error._leaveSpa,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
if (isRedirectSignal(error)) {
|
|
93
|
-
recorder.redirect(error);
|
|
94
|
-
return JSON.stringify({
|
|
95
|
-
type: 'redirect',
|
|
96
|
-
location: error.location,
|
|
97
|
-
status: error.status,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
// Dev diagnostic: detect "Invalid hook call" errors which indicate
|
|
101
|
-
// a 'use client' component is being executed during RSC rendering
|
|
102
|
-
// instead of being serialized as a client reference. This happens when
|
|
103
|
-
// the RSC plugin's transform doesn't detect the directive — e.g., the
|
|
104
|
-
// directive isn't at the very top of the file, or the component is
|
|
105
|
-
// re-exported through a barrel file without 'use client'.
|
|
106
|
-
// See LOCAL-297.
|
|
107
|
-
if (isDebug() && error instanceof Error && error.message.includes('Invalid hook call')) {
|
|
108
|
-
console.error(
|
|
109
|
-
'[timber] A React hook was called during RSC rendering. This usually means a ' +
|
|
110
|
-
"'use client' component is being executed as a server component instead of " +
|
|
111
|
-
'being serialized as a client reference.\n\n' +
|
|
112
|
-
'Common causes:\n' +
|
|
113
|
-
" 1. The 'use client' directive is not the FIRST statement in the file (before any imports)\n" +
|
|
114
|
-
" 2. The component is re-exported through a barrel file (index.ts) that lacks 'use client'\n" +
|
|
115
|
-
' 3. @vitejs/plugin-rsc is not loaded or is misconfigured\n\n' +
|
|
116
|
-
`Request: ${req.method} ${new URL(req.url).pathname}`
|
|
117
|
-
);
|
|
118
98
|
}
|
|
99
|
+
recorder.deny(error);
|
|
100
|
+
return JSON.stringify({
|
|
101
|
+
type: 'deny',
|
|
102
|
+
status: error.status,
|
|
103
|
+
data: error.data,
|
|
104
|
+
owners: error.owners,
|
|
105
|
+
leaveSpa: error._leaveSpa,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (isRedirectSignal(error)) {
|
|
109
|
+
recorder.redirect(error);
|
|
110
|
+
return JSON.stringify({
|
|
111
|
+
type: 'redirect',
|
|
112
|
+
location: error.location,
|
|
113
|
+
status: error.status,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
// Dev diagnostic: detect "Invalid hook call" errors which indicate
|
|
117
|
+
// a 'use client' component is being executed during RSC rendering
|
|
118
|
+
// instead of being serialized as a client reference. This happens when
|
|
119
|
+
// the RSC plugin's transform doesn't detect the directive — e.g., the
|
|
120
|
+
// directive isn't at the very top of the file, or the component is
|
|
121
|
+
// re-exported through a barrel file without 'use client'.
|
|
122
|
+
// See LOCAL-297.
|
|
123
|
+
if (isDebug() && error instanceof Error && error.message.includes('Invalid hook call')) {
|
|
124
|
+
console.error(
|
|
125
|
+
'[timber] A React hook was called during RSC rendering. This usually means a ' +
|
|
126
|
+
"'use client' component is being executed as a server component instead of " +
|
|
127
|
+
'being serialized as a client reference.\n\n' +
|
|
128
|
+
'Common causes:\n' +
|
|
129
|
+
" 1. The 'use client' directive is not the FIRST statement in the file (before any imports)\n" +
|
|
130
|
+
" 2. The component is re-exported through a barrel file (index.ts) that lacks 'use client'\n" +
|
|
131
|
+
' 3. @vitejs/plugin-rsc is not loaded or is misconfigured\n\n' +
|
|
132
|
+
`Request: ${req.method} ${new URL(req.url).pathname}`
|
|
133
|
+
);
|
|
134
|
+
}
|
|
119
135
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
136
|
+
// Dev-mode: detect non-serializable RSC props and provide
|
|
137
|
+
// actionable fix suggestions (TIM-358).
|
|
138
|
+
// checkAndWarnRscPropError no-ops in production internally.
|
|
139
|
+
if (error instanceof Error) {
|
|
140
|
+
checkAndWarnRscPropError(error, new URL(req.url).pathname);
|
|
141
|
+
}
|
|
126
142
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
143
|
+
// Log the error but do NOT track it as a page-level signal. If this
|
|
144
|
+
// error is inside a <Suspense> boundary, React will emit an error
|
|
145
|
+
// row in the Flight stream and the nearest error boundary renders
|
|
146
|
+
// it on the client; treating it as page-level would turn a page
|
|
147
|
+
// whose shell rendered into a 500. See TIM-524. An error no
|
|
148
|
+
// boundary contains fails SSR's shell instead, and the SSR renderer
|
|
149
|
+
// answers that with the error page.
|
|
150
|
+
recorder.unhandledError();
|
|
135
151
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
152
|
+
// Return a digest so React emits a per-row error in the Flight
|
|
153
|
+
// stream instead of leaving the lazy reference unresolved.
|
|
154
|
+
//
|
|
155
|
+
// SECURITY: Never include error.message in the digest — it may
|
|
156
|
+
// contain SQL queries, filesystem paths, secret fragments, or
|
|
157
|
+
// internal IDs. Use a generic message with a correlation ID so
|
|
158
|
+
// the error can be matched to server logs. The ID is the `digest`
|
|
159
|
+
// prop error pages receive (shared/error-digest.ts).
|
|
160
|
+
// See design/13-security.md §"Errors don't leak".
|
|
161
|
+
//
|
|
162
|
+
// This is the error's one log and one `onRequestError` report,
|
|
163
|
+
// whether a Suspense boundary contains it or it crashes the shell
|
|
164
|
+
// and the renderer answers with the error page (design/49
|
|
165
|
+
// §"Deferred: render-error handoff").
|
|
166
|
+
//
|
|
167
|
+
// The one exception is a no-JS action's error, rendered in place of
|
|
168
|
+
// the page (route-element-builder.ts): the action already logged and
|
|
169
|
+
// reported it, so it keeps that log line's ID and is not reported
|
|
170
|
+
// twice.
|
|
171
|
+
const actionError = getActionErrorForRender();
|
|
172
|
+
const errorId =
|
|
173
|
+
actionError && actionError.error === error
|
|
174
|
+
? actionError.errorId
|
|
175
|
+
: reportedErrorId(error, req);
|
|
176
|
+
return encodeErrorDigest({ message: clientErrorMessage(error), errorId });
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const rscStream = renderFlight(payload, {
|
|
180
|
+
signal: req.signal,
|
|
181
|
+
timeoutMs: renderTimeoutMs,
|
|
182
|
+
tap,
|
|
183
|
+
onError,
|
|
162
184
|
});
|
|
163
185
|
|
|
164
|
-
return { rscStream, signals: recorder.signals };
|
|
186
|
+
return { rscStream, signals: recorder.signals, onError };
|
|
165
187
|
}
|
|
166
188
|
|
|
167
189
|
/** Log and report an unhandled render error; the ID it was logged with. */
|
|
@@ -22,7 +22,6 @@ import type { RouteMatch } from '../pipeline.ts';
|
|
|
22
22
|
import { isSsrStreamError } from '../signal-identity.ts';
|
|
23
23
|
import type { LayoutComponentEntry } from '../route-element-builder.ts';
|
|
24
24
|
import type { ManifestSegmentNode } from '../route-matcher.ts';
|
|
25
|
-
import type { SlotSkipEntry } from '../slot-resolver.ts';
|
|
26
25
|
import type { NavContext, SsrRenderResult } from '../ssr-bridge-types.ts';
|
|
27
26
|
|
|
28
27
|
import { htmlEscapeJsonString } from '../flight-scripts.ts';
|
|
@@ -100,7 +99,6 @@ interface SsrRenderOptions {
|
|
|
100
99
|
deferSuspenseFor: number;
|
|
101
100
|
/** Tier 2 global-error.tsx file, if present in app/. */
|
|
102
101
|
globalError?: GlobalErrorFile;
|
|
103
|
-
slotSkipInfo?: SlotSkipEntry[];
|
|
104
102
|
/**
|
|
105
103
|
* The Flight bytes of the no-JS action's form state this page answers
|
|
106
104
|
* (`encodeFormState`); absent on every other render. Fizz and hydrateRoot
|
|
@@ -193,7 +191,7 @@ export async function renderSsrResponse(opts: SsrRenderOptions): Promise<Respons
|
|
|
193
191
|
getHeadSegmentScript: clientJsDisabled
|
|
194
192
|
? undefined
|
|
195
193
|
: () =>
|
|
196
|
-
`<script${nonceAttr(nonce)}>self.__timber_segments=${htmlEscapeJsonString(JSON.stringify(buildSegmentInfo(segments, layoutComponents,
|
|
194
|
+
`<script${nonceAttr(nonce)}>self.__timber_segments=${htmlEscapeJsonString(JSON.stringify(buildSegmentInfo(segments, layoutComponents, getFirstDeniedSegmentIndex())))}</script>`,
|
|
197
195
|
bootstrapScriptContent: clientBootstrap.bootstrapScriptContent,
|
|
198
196
|
nonce,
|
|
199
197
|
// Skip RSC inline stream when client JS is disabled — no client to hydrate.
|