@timber-js/app 0.2.0-alpha.241 → 0.2.0-alpha.243
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-BCYVyoFl.js → actions-DoTj0Jd3.js} +78 -32
- package/dist/_chunks/actions-DoTj0Jd3.js.map +1 -0
- package/dist/_chunks/{als-registry-fabsRnPY.js → als-registry-C-iwbtvI.js} +1 -2
- package/dist/_chunks/{als-registry-fabsRnPY.js.map → als-registry-C-iwbtvI.js.map} +1 -1
- package/dist/_chunks/{cache-api-n5FL4wFs.js → cache-api-D3HmgsFh.js} +5 -5
- package/dist/_chunks/{cache-api-n5FL4wFs.js.map → cache-api-D3HmgsFh.js.map} +1 -1
- package/dist/_chunks/{chains-IswOWMnq.js → chains-BpvDwp08.js} +2 -2
- package/dist/_chunks/{chains-IswOWMnq.js.map → chains-BpvDwp08.js.map} +1 -1
- package/dist/_chunks/chains-CjlZZ5ad.js +1 -0
- package/dist/_chunks/{classify-B08RCF6s.js → classify-Bbb_lKjH.js} +2 -2
- package/dist/_chunks/{classify-B08RCF6s.js.map → classify-Bbb_lKjH.js.map} +1 -1
- package/dist/_chunks/{cli-check-tpFb6pBU.js → cli-check-DlQBSKIN.js} +3 -3
- package/dist/_chunks/{cli-check-tpFb6pBU.js.map → cli-check-DlQBSKIN.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-DRNJutey.js → cli-schema-sync-CWkGFlYu.js} +2 -2
- package/dist/_chunks/{cli-schema-sync-DRNJutey.js.map → cli-schema-sync-CWkGFlYu.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-C0pXBtzG.js → cli-schema-sync-Dyvdkv_I.js} +1 -1
- package/dist/_chunks/{client-dep-entries-Dw5Dvatr.js → client-dep-entries-Dka67elj.js} +2 -2
- package/dist/_chunks/{client-dep-entries-Dw5Dvatr.js.map → client-dep-entries-Dka67elj.js.map} +1 -1
- package/dist/_chunks/{convention-lint-BfC_dAhZ.js → convention-lint-CGGcseNn.js} +19 -5
- package/dist/_chunks/convention-lint-CGGcseNn.js.map +1 -0
- package/dist/_chunks/dev-server-DrjLscqT.js +1 -0
- package/dist/_chunks/{dev-server-3R6Bl9_R.js → dev-server-LO4McfQi.js} +3 -4
- package/dist/_chunks/dev-server-LO4McfQi.js.map +1 -0
- package/dist/_chunks/{error-boundary-Dfhxigko.js → error-boundary-wuNvAJ4n.js} +8 -15
- package/dist/_chunks/error-boundary-wuNvAJ4n.js.map +1 -0
- package/dist/_chunks/{flight-source-node-QOpWZATb.js → flight-source-node-BeF00Wo_.js} +4 -7
- package/dist/_chunks/flight-source-node-BeF00Wo_.js.map +1 -0
- package/dist/_chunks/{interception-CtNt9jPt.js → interception-D1dCGNmQ.js} +6 -6
- package/dist/_chunks/{interception-CtNt9jPt.js.map → interception-D1dCGNmQ.js.map} +1 -1
- package/dist/_chunks/{json-lossy-check-5KFcC1yt.js → json-lossy-check-DpXneTBm.js} +2 -2
- package/dist/_chunks/{json-lossy-check-5KFcC1yt.js.map → json-lossy-check-DpXneTBm.js.map} +1 -1
- package/dist/_chunks/key-headers-uIig1_mU.js +40 -0
- package/dist/_chunks/key-headers-uIig1_mU.js.map +1 -0
- package/dist/_chunks/{live-graph-D1dfVqoT.js → live-graph-DXhz6A_X.js} +4 -4
- package/dist/_chunks/{live-graph-D1dfVqoT.js.map → live-graph-DXhz6A_X.js.map} +1 -1
- package/dist/_chunks/{logger-BvGxPd1e.js → logger-D1sWX2I0.js} +18 -3
- package/dist/_chunks/logger-D1sWX2I0.js.map +1 -0
- package/dist/_chunks/metadata-routes-MXNjWOt5.js.map +1 -1
- package/dist/_chunks/{node-response-D5cfiyWP.js → node-response-Cp62CtH1.js} +2 -2
- package/dist/_chunks/{node-response-D5cfiyWP.js.map → node-response-Cp62CtH1.js.map} +1 -1
- package/dist/_chunks/{poison-scan-CX02ilxN.js → poison-scan-DdkJoHvP.js} +2 -2
- package/dist/_chunks/{poison-scan-CX02ilxN.js.map → poison-scan-DdkJoHvP.js.map} +1 -1
- package/dist/_chunks/{scanner-DneYxQoY.js → scanner-B6V2RqqF.js} +20 -3
- package/dist/_chunks/scanner-B6V2RqqF.js.map +1 -0
- package/dist/_chunks/{sizeof-BtQ3ErLf.js → sizeof-BKA6qOZq.js} +2 -2
- package/dist/_chunks/{sizeof-BtQ3ErLf.js.map → sizeof-BKA6qOZq.js.map} +1 -1
- package/dist/_chunks/{walkers-C9R2A4jN.js → walkers-BAZoAlfI.js} +3 -3
- package/dist/_chunks/{walkers-C9R2A4jN.js.map → walkers-BAZoAlfI.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/router-init.d.ts +0 -1
- package/dist/client/browser-entry/router-init.d.ts.map +1 -1
- package/dist/client/document-withdrawal.d.ts +2 -0
- package/dist/client/document-withdrawal.d.ts.map +1 -0
- package/dist/client/error-boundary.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/internal.js +3 -5
- package/dist/client/internal.js.map +1 -1
- package/dist/client/navigation-commit.d.ts +0 -7
- package/dist/client/navigation-commit.d.ts.map +1 -1
- package/dist/client/outlet-content-cache.d.ts +28 -42
- package/dist/client/outlet-content-cache.d.ts.map +1 -1
- package/dist/client/outlet-scope-context.d.ts +9 -4
- package/dist/client/outlet-scope-context.d.ts.map +1 -1
- package/dist/client/params-context.d.ts +1 -1
- package/dist/client/router-types.d.ts +3 -13
- package/dist/client/router-types.d.ts.map +1 -1
- package/dist/client/router.d.ts.map +1 -1
- package/dist/client/segment-cache.d.ts +2 -2
- package/dist/client/segment-outlet.d.ts +12 -15
- package/dist/client/segment-outlet.d.ts.map +1 -1
- package/dist/client/stale-segment.d.ts +2 -2
- package/dist/config-types.d.ts +2 -18
- package/dist/config-types.d.ts.map +1 -1
- package/dist/config-validation.d.ts.map +1 -1
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/native/rsc/manifest.json +3 -4
- package/dist/native/rsc/routing/segment-keys.js.map +1 -1
- package/dist/native/rsc/server/als-registry.js +1 -2
- package/dist/native/rsc/server/als-registry.js.map +1 -1
- package/dist/native/rsc/server/client-state-tree.js +1 -5
- package/dist/native/rsc/server/client-state-tree.js.map +1 -1
- package/dist/native/rsc/server/cookie-context.js +7 -7
- package/dist/native/rsc/server/cookie-context.js.map +1 -1
- package/dist/native/rsc/server/deny-boundary.js +2 -1
- package/dist/native/rsc/server/deny-boundary.js.map +1 -1
- package/dist/native/rsc/server/dev-overlay-report.js +13 -0
- package/dist/native/rsc/server/dev-overlay-report.js.map +1 -0
- package/dist/native/rsc/server/flight-source-node.js +2 -5
- package/dist/native/rsc/server/flight-source-node.js.map +1 -1
- package/dist/native/rsc/server/flight-source.js +6 -41
- package/dist/native/rsc/server/flight-source.js.map +1 -1
- package/dist/native/rsc/server/framework-stack-frames.js.map +1 -1
- package/dist/native/rsc/server/logger.js +6 -1
- package/dist/native/rsc/server/logger.js.map +1 -1
- package/dist/native/rsc/server/pipeline-interception.js +4 -1
- package/dist/native/rsc/server/pipeline-interception.js.map +1 -1
- package/dist/native/rsc/server/pipeline.js.map +1 -1
- package/dist/native/rsc/server/request-context.js +6 -6
- package/dist/native/rsc/server/request-context.js.map +1 -1
- package/dist/native/rsc/server/route-element-builder.js +5 -5
- package/dist/native/rsc/server/route-element-builder.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/render-route.js +4 -30
- package/dist/native/rsc/server/rsc-entry/render-route.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js +0 -2
- package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js.map +1 -1
- package/dist/native/rsc/server/rsc-entry/rsc-stream.js +2 -5
- package/dist/native/rsc/server/rsc-entry/rsc-stream.js.map +1 -1
- package/dist/native/rsc/server/segment-lifetime/outlet-gate.js +44 -0
- package/dist/native/rsc/server/segment-lifetime/outlet-gate.js.map +1 -0
- package/dist/native/rsc/server/segment-lifetime/read-rule.js +45 -12
- package/dist/native/rsc/server/segment-lifetime/read-rule.js.map +1 -1
- package/dist/native/rsc/server/segment-lifetime/read-scope.js +50 -8
- package/dist/native/rsc/server/segment-lifetime/read-scope.js.map +1 -1
- package/dist/native/rsc/server/segment-lifetime/segment-key.js +17 -3
- package/dist/native/rsc/server/segment-lifetime/segment-key.js.map +1 -1
- package/dist/native/rsc/server/segment-lifetime/slot-outlets.js +4 -4
- package/dist/native/rsc/server/segment-lifetime/slot-outlets.js.map +1 -1
- package/dist/native/rsc/server/slot-resolver.js +8 -7
- package/dist/native/rsc/server/slot-resolver.js.map +1 -1
- package/dist/native/rsc/server/slot-subtree-contain.js +2 -1
- package/dist/native/rsc/server/slot-subtree-contain.js.map +1 -1
- package/dist/native/rsc/server/subtree-walk.js +14 -5
- package/dist/native/rsc/server/subtree-walk.js.map +1 -1
- package/dist/native/rsc/server/vite-handoff-rsc.js.map +1 -1
- package/dist/native/rsc/shared/key-headers.js +20 -0
- package/dist/native/rsc/shared/key-headers.js.map +1 -0
- package/dist/native/rsc/shared/outlet-decision.js.map +1 -1
- package/dist/native/ssr/client/document-withdrawal.js +17 -0
- package/dist/native/ssr/client/document-withdrawal.js.map +1 -0
- package/dist/native/ssr/client/outlet-content-cache.js +10 -25
- package/dist/native/ssr/client/outlet-content-cache.js.map +1 -1
- package/dist/native/ssr/client/outlet-scope-context.js.map +1 -1
- package/dist/native/ssr/client/segment-outlet.js +17 -21
- package/dist/native/ssr/client/segment-outlet.js.map +1 -1
- package/dist/native/ssr/manifest.json +6 -1
- package/dist/native/ssr/server/als-registry.js +0 -1
- package/dist/native/ssr/server/als-registry.js.map +1 -1
- package/dist/native/ssr/server/client-state-tree.js +1 -5
- package/dist/native/ssr/server/client-state-tree.js.map +1 -1
- package/dist/native/ssr/server/cookie-context.js +7 -7
- package/dist/native/ssr/server/cookie-context.js.map +1 -1
- package/dist/native/ssr/server/deny-boundary.js +2 -1
- package/dist/native/ssr/server/deny-boundary.js.map +1 -1
- package/dist/native/ssr/server/dev-overlay-report.js +6 -0
- package/dist/native/ssr/server/dev-overlay-report.js.map +1 -0
- package/dist/native/ssr/server/flight-source-node.js +2 -5
- package/dist/native/ssr/server/flight-source-node.js.map +1 -1
- package/dist/native/ssr/server/flight-source.js +0 -1
- package/dist/native/ssr/server/flight-source.js.map +1 -1
- package/dist/native/ssr/server/framework-stack-frames.js.map +1 -1
- package/dist/native/ssr/server/logger.js +6 -1
- package/dist/native/ssr/server/logger.js.map +1 -1
- package/dist/native/ssr/server/pipeline-interception.js +4 -1
- package/dist/native/ssr/server/pipeline-interception.js.map +1 -1
- package/dist/native/ssr/server/pipeline.js.map +1 -1
- package/dist/native/ssr/server/request-context.js +6 -6
- package/dist/native/ssr/server/request-context.js.map +1 -1
- package/dist/native/ssr/server/segment-lifetime/outlet-gate.js +11 -0
- package/dist/native/ssr/server/segment-lifetime/outlet-gate.js.map +1 -0
- package/dist/native/ssr/server/segment-lifetime/read-rule.js +45 -12
- package/dist/native/ssr/server/segment-lifetime/read-rule.js.map +1 -1
- package/dist/native/ssr/server/segment-lifetime/read-scope.js +16 -0
- package/dist/native/ssr/server/segment-lifetime/read-scope.js.map +1 -0
- package/dist/native/ssr/server/subtree-walk.js +149 -0
- package/dist/native/ssr/server/subtree-walk.js.map +1 -0
- package/dist/native/ssr/server/utils/element-type.js +21 -9
- package/dist/native/ssr/server/utils/element-type.js.map +1 -1
- package/dist/native/ssr/server/vite-handoff-rsc.js.map +1 -1
- package/dist/native/ssr/shared/key-headers.js +13 -0
- package/dist/native/ssr/shared/key-headers.js.map +1 -0
- package/dist/plugins/entries.d.ts.map +1 -1
- package/dist/routing/index.js +3 -3
- package/dist/routing/route-options.d.ts.map +1 -1
- package/dist/routing/segment-keys.d.ts +3 -4
- package/dist/routing/segment-keys.d.ts.map +1 -1
- package/dist/routing/slot-placement.d.ts +23 -4
- package/dist/routing/slot-placement.d.ts.map +1 -1
- package/dist/server/als-registry.d.ts +20 -16
- package/dist/server/als-registry.d.ts.map +1 -1
- package/dist/server/client-state-tree.d.ts +5 -11
- package/dist/server/client-state-tree.d.ts.map +1 -1
- package/dist/server/deny-boundary.d.ts.map +1 -1
- package/dist/server/dev-overlay-report.d.ts +13 -0
- package/dist/server/dev-overlay-report.d.ts.map +1 -0
- package/dist/server/flight-source-node.d.ts +1 -6
- package/dist/server/flight-source-node.d.ts.map +1 -1
- package/dist/server/flight-source.d.ts +0 -27
- package/dist/server/flight-source.d.ts.map +1 -1
- package/dist/server/framework-stack-frames.d.ts +1 -4
- package/dist/server/framework-stack-frames.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/internal.js +105 -26
- package/dist/server/internal.js.map +1 -1
- package/dist/server/logger.d.ts +10 -0
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/pipeline-interception.d.ts.map +1 -1
- package/dist/server/pipeline.d.ts +13 -1
- package/dist/server/pipeline.d.ts.map +1 -1
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/route-element-builder.d.ts +2 -2
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/rsc-entry/helpers.d.ts +1 -1
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts +0 -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-stream.d.ts +2 -11
- package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
- package/dist/server/segment-lifetime/outlet-gate.d.ts +58 -0
- package/dist/server/segment-lifetime/outlet-gate.d.ts.map +1 -0
- package/dist/server/segment-lifetime/read-rule.d.ts +19 -13
- package/dist/server/segment-lifetime/read-rule.d.ts.map +1 -1
- package/dist/server/segment-lifetime/read-scope.d.ts +48 -6
- package/dist/server/segment-lifetime/read-scope.d.ts.map +1 -1
- package/dist/server/segment-lifetime/segment-key.d.ts +3 -0
- package/dist/server/segment-lifetime/segment-key.d.ts.map +1 -1
- package/dist/server/segment-lifetime/slot-outlets.d.ts +3 -3
- package/dist/server/segment-lifetime/slot-outlets.d.ts.map +1 -1
- package/dist/server/slot-resolver.d.ts +5 -5
- package/dist/server/slot-resolver.d.ts.map +1 -1
- package/dist/server/slot-subtree-contain.d.ts.map +1 -1
- package/dist/server/subtree-walk.d.ts +17 -3
- package/dist/server/subtree-walk.d.ts.map +1 -1
- package/dist/server/types.d.ts +8 -2
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/vite-handoff-rsc.d.ts +3 -10
- package/dist/server/vite-handoff-rsc.d.ts.map +1 -1
- package/dist/shared/key-headers.d.ts +13 -0
- package/dist/shared/key-headers.d.ts.map +1 -0
- package/dist/shared/outlet-decision.d.ts +13 -44
- package/dist/shared/outlet-decision.d.ts.map +1 -1
- package/dist/shared/payload-root.d.ts +1 -1
- package/dist/shared/segment-info.d.ts +3 -7
- package/dist/shared/segment-info.d.ts.map +1 -1
- package/docs/api/30-api-server.mdx +1 -1
- package/docs/api/34-api-config.mdx +1 -1
- package/package.json +1 -1
- package/src/client/browser-entry/index.ts +0 -2
- package/src/client/browser-entry/router-init.ts +2 -4
- package/src/client/document-withdrawal.tsx +41 -0
- package/src/client/error-boundary.tsx +1 -1
- package/src/client/navigation-commit.ts +4 -18
- package/src/client/outlet-content-cache.ts +38 -60
- package/src/client/outlet-scope-context.ts +10 -5
- package/src/client/params-context.ts +1 -1
- package/src/client/router-types.ts +3 -14
- package/src/client/router.ts +0 -2
- package/src/client/rsc-fetch.ts +1 -1
- package/src/client/segment-cache.ts +2 -2
- package/src/client/segment-outlet.tsx +28 -54
- package/src/client/stale-segment.ts +2 -2
- package/src/config-types.ts +2 -18
- package/src/config-validation.ts +0 -1
- package/src/plugins/entries.ts +0 -1
- package/src/routing/interception.ts +5 -5
- package/src/routing/route-options.ts +20 -4
- package/src/routing/scanner.ts +1 -1
- package/src/routing/segment-keys.ts +3 -4
- package/src/routing/slot-placement.ts +41 -4
- package/src/rsc-runtime/vendor-types.d.ts +1 -1
- package/src/server/als-registry.ts +16 -23
- package/src/server/client-state-tree.ts +7 -18
- package/src/server/cookie-context.ts +7 -7
- package/src/server/deny-boundary.ts +4 -1
- package/src/server/dev-overlay-report.ts +22 -0
- package/src/server/flight-source-node.ts +1 -5
- package/src/server/flight-source.ts +1 -81
- package/src/server/framework-stack-frames.ts +1 -4
- package/src/server/logger.ts +13 -0
- package/src/server/pipeline-interception.ts +11 -2
- package/src/server/pipeline.ts +13 -1
- package/src/server/request-context.ts +12 -11
- package/src/server/route-element-builder.ts +15 -16
- package/src/server/rsc-entry/helpers.ts +1 -1
- package/src/server/rsc-entry/index.ts +7 -3
- package/src/server/rsc-entry/render-route.ts +7 -54
- package/src/server/rsc-entry/revalidate-renderer.ts +0 -2
- package/src/server/rsc-entry/rsc-stream.ts +3 -23
- package/src/server/segment-lifetime/outlet-gate.ts +102 -0
- package/src/server/segment-lifetime/read-rule.ts +110 -22
- package/src/server/segment-lifetime/read-scope.ts +131 -15
- package/src/server/segment-lifetime/segment-key.ts +31 -3
- package/src/server/segment-lifetime/slot-outlets.ts +6 -6
- package/src/server/slot-resolver.ts +30 -18
- package/src/server/slot-subtree-contain.ts +2 -1
- package/src/server/subtree-walk.ts +34 -9
- package/src/server/types.ts +8 -2
- package/src/server/vite-handoff-rsc.ts +3 -12
- package/src/shared/key-headers.ts +42 -0
- package/src/shared/outlet-decision.ts +13 -48
- package/src/shared/payload-root.ts +1 -1
- package/src/shared/segment-info.ts +3 -7
- package/dist/_chunks/actions-BCYVyoFl.js.map +0 -1
- package/dist/_chunks/chains-DPZAMMav.js +0 -1
- package/dist/_chunks/convention-lint-BfC_dAhZ.js.map +0 -1
- package/dist/_chunks/dev-server-3DNTXQV-.js +0 -1
- package/dist/_chunks/dev-server-3R6Bl9_R.js.map +0 -1
- package/dist/_chunks/error-boundary-Dfhxigko.js.map +0 -1
- package/dist/_chunks/flight-source-node-QOpWZATb.js.map +0 -1
- package/dist/_chunks/logger-BvGxPd1e.js.map +0 -1
- package/dist/_chunks/scanner-DneYxQoY.js.map +0 -1
- package/dist/native/rsc/server/segment-hash/capture.js +0 -107
- package/dist/native/rsc/server/segment-hash/capture.js.map +0 -1
- package/dist/native/rsc/server/segment-hash/outlet.js +0 -101
- package/dist/native/rsc/server/segment-hash/outlet.js.map +0 -1
- package/dist/native/rsc/server/segment-hash/stream-tap.js +0 -139
- package/dist/native/rsc/server/segment-hash/stream-tap.js.map +0 -1
- package/dist/native/rsc/server/segment-hash/value-hash.js +0 -171
- package/dist/native/rsc/server/segment-hash/value-hash.js.map +0 -1
- package/dist/native/ssr/server/segment-hash/value-hash.js +0 -162
- package/dist/native/ssr/server/segment-hash/value-hash.js.map +0 -1
- package/dist/server/segment-hash/capture.d.ts +0 -77
- package/dist/server/segment-hash/capture.d.ts.map +0 -1
- package/dist/server/segment-hash/outlet.d.ts +0 -93
- package/dist/server/segment-hash/outlet.d.ts.map +0 -1
- package/dist/server/segment-hash/stream-tap.d.ts +0 -49
- package/dist/server/segment-hash/stream-tap.d.ts.map +0 -1
- package/dist/server/segment-hash/value-hash.d.ts +0 -70
- package/dist/server/segment-hash/value-hash.d.ts.map +0 -1
- package/src/server/segment-hash/capture.ts +0 -232
- package/src/server/segment-hash/outlet.ts +0 -229
- package/src/server/segment-hash/stream-tap.ts +0 -244
- package/src/server/segment-hash/value-hash.ts +0 -338
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parsing of the client's `X-Timber-State-Tree` request header.
|
|
3
3
|
*
|
|
4
|
-
* The header carries
|
|
4
|
+
* The header carries two unrelated things:
|
|
5
5
|
*
|
|
6
|
-
* - `hashes` — the segment hashes the client holds content for, by outlet
|
|
7
|
-
* path. The outlet gates compare them with a capture of each segment and
|
|
8
|
-
* skip the ones that match (design/52-segment-hash-dedupe.md). Read only
|
|
9
|
-
* when the app opted into `clientSegmentCache`.
|
|
10
6
|
* - `documents` — the key digests of the `'document'` segments the client
|
|
11
7
|
* holds content for, by outlet path. An outlet gate skips a `'document'`
|
|
12
8
|
* segment without rendering it when the digest verifies against this
|
|
@@ -16,15 +12,13 @@
|
|
|
16
12
|
* now, for interception scoping (design/07-routing.md §"Intercepting
|
|
17
13
|
* Routes", TIM-1282).
|
|
18
14
|
*
|
|
19
|
-
*
|
|
20
|
-
* send a skip for content the client claims to hold; the client checks every
|
|
21
|
-
* against the
|
|
22
|
-
* regardless. See design/13-security.md §"State tree manipulation".
|
|
15
|
+
* Neither is a security input. A forged digest can only make the server
|
|
16
|
+
* send a skip for content the client claims to hold; the client checks every
|
|
17
|
+
* skip against the digest of what it actually holds, and every `access.ts`
|
|
18
|
+
* runs regardless. See design/13-security.md §"State tree manipulation".
|
|
23
19
|
*/
|
|
24
20
|
/** The parsed header. */
|
|
25
21
|
export interface ClientStateTree {
|
|
26
|
-
/** Segment hashes by outlet path, or null when none were sent. */
|
|
27
|
-
hashes: ReadonlyMap<string, string> | null;
|
|
28
22
|
/** `'document'` key digests by outlet path, or null when none were sent. */
|
|
29
23
|
documents: ReadonlyMap<string, string> | null;
|
|
30
24
|
/** Directory paths of the mounted segments, or null when none were sent. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-state-tree.d.ts","sourceRoot":"","sources":["../../src/server/client-state-tree.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"client-state-tree.d.ts","sourceRoot":"","sources":["../../src/server/client-state-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,yBAAyB;AACzB,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC9C,4EAA4E;IAC5E,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACvC;AAQD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAwBzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deny-boundary.d.ts","sourceRoot":"","sources":["../../src/server/deny-boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"deny-boundary.d.ts","sourceRoot":"","sources":["../../src/server/deny-boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,sDAAsD;AACtD,MAAM,WAAW,aAAa;IAC5B,yFAAyF;IACzF,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,8DAA8D;IAC9D,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB;;;;;;;OAOG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;CAAE,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AAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IACtC,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAU9B;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAKlD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,SAAS,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAK9D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reports a problem the request survived to the dev server's error overlay.
|
|
3
|
+
*
|
|
4
|
+
* The dev server hands the RSC entry its overlay through `setDevHooks`
|
|
5
|
+
* (`plugins/dev-server.ts`); the entry sets the reporter here, so render code
|
|
6
|
+
* that cannot see the entry can still report. Unset in production, in tests,
|
|
7
|
+
* and under any server that is not timber's dev server: the caller logs instead.
|
|
8
|
+
*/
|
|
9
|
+
/** Set (or clear) the reporter. Called by the RSC entry's `setDevHooks`. */
|
|
10
|
+
export declare function setDevOverlayReporter(report: ((error: Error) => void) | undefined): void;
|
|
11
|
+
/** Report `error` to the overlay; false when no dev server is listening. */
|
|
12
|
+
export declare function reportToDevOverlay(error: Error): boolean;
|
|
13
|
+
//# sourceMappingURL=dev-overlay-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-overlay-report.d.ts","sourceRoot":"","sources":["../../src/server/dev-overlay-report.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAExF;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAIxD"}
|
|
@@ -41,11 +41,6 @@ export interface NodeFlightAbort {
|
|
|
41
41
|
signal?: AbortSignal;
|
|
42
42
|
/** Abort with a `RenderTimeoutError` after this long, if still rendering. */
|
|
43
43
|
timeoutMs?: number;
|
|
44
|
-
/** Shown every chunk, and the end (`FlightRenderOptions.tap`). */
|
|
45
|
-
tap?: {
|
|
46
|
-
observe(chunk: Uint8Array): void;
|
|
47
|
-
end(): void;
|
|
48
|
-
};
|
|
49
44
|
}
|
|
50
45
|
/**
|
|
51
46
|
* Pipe a Flight render into an object-mode Node source.
|
|
@@ -63,7 +58,7 @@ export interface NodeFlightAbort {
|
|
|
63
58
|
* Web `cancel(reason)` hands Flight. The listener and the timer are
|
|
64
59
|
* released when the source closes.
|
|
65
60
|
*/
|
|
66
|
-
export declare function pipeFlightToNode(flight: PipeableFlight, { signal, timeoutMs
|
|
61
|
+
export declare function pipeFlightToNode(flight: PipeableFlight, { signal, timeoutMs }: NodeFlightAbort): Readable;
|
|
67
62
|
/**
|
|
68
63
|
* Tee a Node Flight source into two object-mode branches, with the contract
|
|
69
64
|
* of `teeWithErrorPropagation` (`stream-utils.ts`):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flight-source-node.d.ts","sourceRoot":"","sources":["../../src/server/flight-source-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAC;AAUlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,IAAI,MAAM,CAAC;KACxB;CACF;AAED,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,UAAU,CAAC;AAElD,qEAAqE;AAC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AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,EACtB,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,GACrC,QAAQ,CAuCV;AAOD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,QAAQ,EAChB,cAAc,GAAE,MAAiC,GAChD,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAiItB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,QAAQ,CAEjF;AA2GD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBtE"}
|
|
@@ -54,29 +54,6 @@ export interface FlightRenderOptions {
|
|
|
54
54
|
* themselves.
|
|
55
55
|
*/
|
|
56
56
|
timeoutMs?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Observes every chunk the render writes, and its end — the segment hash
|
|
59
|
-
* tap (segment-hash/stream-tap.ts). Chunks pass through unchanged.
|
|
60
|
-
*/
|
|
61
|
-
tap?: FlightTap;
|
|
62
|
-
/**
|
|
63
|
-
* Values to write as opaque references (`$T<id>`) instead of serializing —
|
|
64
|
-
* Flight's temporary references, keyed by the value. A segment-hash capture
|
|
65
|
-
* writes its nested outlets this way so decoding it can put the live outlet
|
|
66
|
-
* back (segment-hash/capture.ts).
|
|
67
|
-
*/
|
|
68
|
-
temporaryReferences?: WeakMap<object, string>;
|
|
69
|
-
/**
|
|
70
|
-
* Prefix for the ids `useId()` returns in server components. Each render
|
|
71
|
-
* counts from zero, so two renders whose output shares one document — the
|
|
72
|
-
* main render and a segment-hash capture — need different prefixes.
|
|
73
|
-
*/
|
|
74
|
-
identifierPrefix?: string;
|
|
75
|
-
}
|
|
76
|
-
/** An observer of a Flight render's output. */
|
|
77
|
-
export interface FlightTap {
|
|
78
|
-
observe(chunk: Uint8Array): void;
|
|
79
|
-
end(): void;
|
|
80
57
|
}
|
|
81
58
|
export declare function setFlightRenderTimeout(timeoutMs: number | undefined): void;
|
|
82
59
|
/** Render a model to a Flight source. */
|
|
@@ -85,15 +62,11 @@ export type RenderFlight = (model: unknown, options?: FlightRenderOptions) => Fl
|
|
|
85
62
|
export type WebFlightRenderer = (model: unknown, options?: {
|
|
86
63
|
onError?: (error: unknown) => string | void;
|
|
87
64
|
signal?: AbortSignal;
|
|
88
|
-
temporaryReferences?: WeakMap<object, string>;
|
|
89
|
-
identifierPrefix?: string;
|
|
90
65
|
filterStackFrame?: (url: string, functionName: string) => boolean;
|
|
91
66
|
}) => ReadableStream<Uint8Array>;
|
|
92
67
|
/** plugin-rsc's `renderToPipeableStream` (`rsc.node`), with the options timber passes. */
|
|
93
68
|
export type NodeFlightRenderer = (model: unknown, options?: {
|
|
94
69
|
onError?: (error: unknown) => string | void;
|
|
95
|
-
temporaryReferences?: WeakMap<object, string>;
|
|
96
|
-
identifierPrefix?: string;
|
|
97
70
|
filterStackFrame?: (url: string, functionName: string) => boolean;
|
|
98
71
|
}) => import('./flight-source-node.ts').PipeableFlight;
|
|
99
72
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flight-source.d.ts","sourceRoot":"","sources":["../../src/server/flight-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"flight-source.d.ts","sourceRoot":"","sources":["../../src/server/flight-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI5C,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAE3B,4DAA4D;AAC5D,MAAM,MAAM,YAAY,GACpB;I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AAY,GAAG,UAAU,CAmB3D"}
|
|
@@ -7,10 +7,7 @@
|
|
|
7
7
|
* `node_modules` as app code. Installed, timber sits in `node_modules`; run
|
|
8
8
|
* from source (this repo, its examples, a linked checkout) its own files would
|
|
9
9
|
* count as app code, and its internal awaits would be written into every dev
|
|
10
|
-
* payload.
|
|
11
|
-
* segment's decoded content, so a skipped segment's content would be sent as
|
|
12
|
-
* the debug value of the read a decision chained through
|
|
13
|
-
* (design/52-segment-hash-dedupe.md §"Capture").
|
|
10
|
+
* payload.
|
|
14
11
|
*
|
|
15
12
|
* Next.js passes its own `filterStackFrameDEV` for the same reason; its code
|
|
16
13
|
* is always in `node_modules`, so it filters by source map instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-stack-frames.d.ts","sourceRoot":"","sources":["../../src/server/framework-stack-frames.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"framework-stack-frames.d.ts","sourceRoot":"","sources":["../../src/server/framework-stack-frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAoBH;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGpD"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as getHeaders, a as parseFormData, c as deny, d as waitUntil, i as coerce, l as redirect, n as revalidatePath, p as getCookieJar, r as revalidateTag, u as redirectExternal, y as getSegmentParams } from "../_chunks/actions-
|
|
1
|
+
import { _ as getHeaders, a as parseFormData, c as deny, d as waitUntil, i as coerce, l as redirect, n as revalidatePath, p as getCookieJar, r as revalidateTag, u as redirectExternal, y as getSegmentParams } from "../_chunks/actions-DoTj0Jd3.js";
|
|
2
2
|
import { t as formatSize } from "../_chunks/format-DuPOoXUP.js";
|
|
3
|
-
import { C as
|
|
3
|
+
import { C as isDevMode, L as isDenySignal, N as withSpan, O as getSpanId, R as isRedirectSignal, S as isDebug, k as getTraceId, w as addSpanEvent } from "../_chunks/logger-D1sWX2I0.js";
|
|
4
4
|
// src/shared/redirect-type.ts
|
|
5
5
|
/**
|
|
6
6
|
* Next.js redirect type discriminator.
|
package/dist/server/internal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as setMatchedSegmentPath, E as runOutsideReactCacheScope, S as runWithSegmentParams, T as setSegmentParams, b as markResponseFlushed, f as getCookie, g as getHeader, h as applyRequestHeaderOverlay, i as coerce, m as getSetCookieHeaders, o as DenySignal, s as RedirectSignal, t as executeAction, v as getSearchParams, w as setMutableCookieContext, x as runWithRequestContext, y as getSegmentParams } from "../_chunks/actions-
|
|
2
|
-
import { a as requestContextAls, n as earlyHintsSenderAls, r as prebuiltCaptureAls, s as timingAls } from "../_chunks/als-registry-
|
|
1
|
+
import { C as setMatchedSegmentPath, E as runOutsideReactCacheScope, S as runWithSegmentParams, T as setSegmentParams, b as markResponseFlushed, f as getCookie, g as getHeader, h as applyRequestHeaderOverlay, i as coerce, m as getSetCookieHeaders, o as DenySignal, s as RedirectSignal, t as executeAction, v as getSearchParams, w as setMutableCookieContext, x as runWithRequestContext, y as getSegmentParams } from "../_chunks/actions-DoTj0Jd3.js";
|
|
2
|
+
import { a as requestContextAls, n as earlyHintsSenderAls, r as prebuiltCaptureAls, s as timingAls } from "../_chunks/als-registry-C-iwbtvI.js";
|
|
3
3
|
import { c as collectRouteModulepreloads, i as traceTimingEntry, o as collectRouteCss, s as collectRouteFonts } from "../_chunks/dev-span-0aG7Q_Ph.js";
|
|
4
|
-
import { c as drainWithDeadline, d as isAbortError, f as releaseReason, i as withResponseInit, m as onAbortUntil, n as discardResponseBody, o as concatBytes, p as endScope, r as nodeBodyOps, u as wrapResponseWithStreamTiming } from "../_chunks/node-response-
|
|
5
|
-
import { A as
|
|
6
|
-
import { _ as getWaitUntil, a as storeOverlayEntry, c as lookupArtifactSeed, d as checkVersionSkew, g as observeKeyDiscipline, i as overlayKey, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as mayStoreRerender, s as isParamIndependent, u as applyReloadHeaders } from "../_chunks/cache-api-
|
|
4
|
+
import { c as drainWithDeadline, d as isAbortError, f as releaseReason, i as withResponseInit, m as onAbortUntil, n as discardResponseBody, o as concatBytes, p as endScope, r as nodeBodyOps, u as wrapResponseWithStreamTiming } from "../_chunks/node-response-Cp62CtH1.js";
|
|
5
|
+
import { A as replaceTraceId, D as getOtelTraceId, E as generateTraceId, I as isControlFlowSignal, L as isDenySignal, M as setSpanAttribute, N as withSpan, R as isRedirectSignal, S as isDebug, _ as logSwrRefetchFailed, b as setLogger, c as logMiddlewareError, d as logRenderError, f as logRequestCompleted, g as logSlowRequest, h as logRouteSetupError, i as logCsrfRejected, j as runWithTraceId, k as getTraceId, l as logMiddlewareShortCircuit, m as logRouteError, n as logCacheMiss, p as logRequestReceived, t as getLogger, u as logProxyError, v as logWaitUntilRejected, x as swallow, y as logWaitUntilUnsupported } from "../_chunks/logger-D1sWX2I0.js";
|
|
6
|
+
import { _ as getWaitUntil, a as storeOverlayEntry, c as lookupArtifactSeed, d as checkVersionSkew, g as observeKeyDiscipline, i as overlayKey, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as mayStoreRerender, s as isParamIndependent, u as applyReloadHeaders } from "../_chunks/cache-api-D3HmgsFh.js";
|
|
7
7
|
import { c as computeSegmentTreePaths, i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-MXNjWOt5.js";
|
|
8
8
|
import { i as canonicalize, r as canonicalRequestPath } from "../_chunks/canonicalize-CqK135BN.js";
|
|
9
9
|
import { n as isRscContentType, r as isRscRequest } from "../_chunks/rsc-media-type-m8jz9u6_.js";
|
|
@@ -19,7 +19,7 @@ import { _ as wasInvalidatedSince, a as devEntryKey, c as getDevSeed, d as isDev
|
|
|
19
19
|
import { n as createSingleflight } from "../_chunks/singleflight-CzoOVB9Y.js";
|
|
20
20
|
import { createHash } from "node:crypto";
|
|
21
21
|
import { readFile } from "node:fs/promises";
|
|
22
|
-
import { createElement } from "react";
|
|
22
|
+
import { Fragment, createElement } from "react";
|
|
23
23
|
// src/server/server-timing.ts
|
|
24
24
|
/**
|
|
25
25
|
* Server-Timing header — dev-mode timing breakdowns for Chrome DevTools.
|
|
@@ -1715,12 +1715,8 @@ var KEY_DIGEST_SHAPE = new RegExp(`^[A-Za-z0-9_-]{${PART_LENGTH}}\\.[A-Za-z0-9_-
|
|
|
1715
1715
|
/**
|
|
1716
1716
|
* Parsing of the client's `X-Timber-State-Tree` request header.
|
|
1717
1717
|
*
|
|
1718
|
-
* The header carries
|
|
1718
|
+
* The header carries two unrelated things:
|
|
1719
1719
|
*
|
|
1720
|
-
* - `hashes` — the segment hashes the client holds content for, by outlet
|
|
1721
|
-
* path. The outlet gates compare them with a capture of each segment and
|
|
1722
|
-
* skip the ones that match (design/52-segment-hash-dedupe.md). Read only
|
|
1723
|
-
* when the app opted into `clientSegmentCache`.
|
|
1724
1720
|
* - `documents` — the key digests of the `'document'` segments the client
|
|
1725
1721
|
* holds content for, by outlet path. An outlet gate skips a `'document'`
|
|
1726
1722
|
* segment without rendering it when the digest verifies against this
|
|
@@ -1730,17 +1726,16 @@ var KEY_DIGEST_SHAPE = new RegExp(`^[A-Za-z0-9_-]{${PART_LENGTH}}\\.[A-Za-z0-9_-
|
|
|
1730
1726
|
* now, for interception scoping (design/07-routing.md §"Intercepting
|
|
1731
1727
|
* Routes", TIM-1282).
|
|
1732
1728
|
*
|
|
1733
|
-
*
|
|
1734
|
-
* send a skip for content the client claims to hold; the client checks every
|
|
1735
|
-
* against the
|
|
1736
|
-
* regardless. See design/13-security.md §"State tree manipulation".
|
|
1729
|
+
* Neither is a security input. A forged digest can only make the server
|
|
1730
|
+
* send a skip for content the client claims to hold; the client checks every
|
|
1731
|
+
* skip against the digest of what it actually holds, and every `access.ts`
|
|
1732
|
+
* runs regardless. See design/13-security.md §"State tree manipulation".
|
|
1737
1733
|
*/
|
|
1738
1734
|
/**
|
|
1739
1735
|
* More entries than any route renders outlets. A map past it is not a
|
|
1740
1736
|
* client's: it is ignored rather than walked.
|
|
1741
1737
|
*/
|
|
1742
1738
|
var MAX_ENTRIES = 512;
|
|
1743
|
-
var HASH_SHAPE = new RegExp(`^[A-Za-z0-9_-]{22}$`);
|
|
1744
1739
|
/**
|
|
1745
1740
|
* Parse `X-Timber-State-Tree`. Null when the header is missing, malformed, or
|
|
1746
1741
|
* says nothing. Entries of the wrong shape are dropped, not trusted.
|
|
@@ -1756,12 +1751,10 @@ function parseClientStateTree(req) {
|
|
|
1756
1751
|
return null;
|
|
1757
1752
|
}
|
|
1758
1753
|
if (!parsed || typeof parsed !== "object") return null;
|
|
1759
|
-
const hashes = readTokenMap(parsed.hashes, HASH_SHAPE);
|
|
1760
1754
|
const documents = readTokenMap(parsed.documents, KEY_DIGEST_SHAPE);
|
|
1761
1755
|
const treePaths = Array.isArray(parsed.treePaths) ? new Set(parsed.treePaths.filter((p) => typeof p === "string")) : /* @__PURE__ */ new Set();
|
|
1762
|
-
if (
|
|
1756
|
+
if (documents.size === 0 && treePaths.size === 0) return null;
|
|
1763
1757
|
return {
|
|
1764
|
-
hashes: hashes.size > 0 ? hashes : null,
|
|
1765
1758
|
documents: documents.size > 0 ? documents : null,
|
|
1766
1759
|
treePaths: treePaths.size > 0 ? treePaths : null
|
|
1767
1760
|
};
|
|
@@ -1918,7 +1911,10 @@ function resolveInterceptedRoute(config, req, canonicalPathname, canonicalMatch)
|
|
|
1918
1911
|
const sourceMatch = config.matchRoute(rewrite.interceptingPrefix);
|
|
1919
1912
|
if (sourceMatch !== null && computeSegmentTreePaths(sourceMatch.segments).includes(rewrite.interceptingScope)) {
|
|
1920
1913
|
match = sourceMatch;
|
|
1921
|
-
interception = {
|
|
1914
|
+
interception = {
|
|
1915
|
+
targetPathname: canonicalPathname,
|
|
1916
|
+
interceptingScope: rewrite.interceptingScope
|
|
1917
|
+
};
|
|
1922
1918
|
}
|
|
1923
1919
|
}
|
|
1924
1920
|
}
|
|
@@ -2681,6 +2677,92 @@ function clientComponents() {
|
|
|
2681
2677
|
}
|
|
2682
2678
|
var renderFlight = (...args) => flightFn("renderFlight")(...args);
|
|
2683
2679
|
var createFromReadableStream = (...args) => flightFn("createFromReadableStream")(...args);
|
|
2680
|
+
// src/server/segment-lifetime/read-scope.ts
|
|
2681
|
+
/**
|
|
2682
|
+
* The read rule of a `'document'` segment: it may read the request inputs in
|
|
2683
|
+
* its key, and nothing else from the request (design/53-segment-lifetime.md
|
|
2684
|
+
* §"What a 'document' segment may read").
|
|
2685
|
+
*
|
|
2686
|
+
* A `'document'` segment is skipped without rendering whenever its key is
|
|
2687
|
+
* unchanged, so anything else it read would freeze silently at its load-time
|
|
2688
|
+
* value. The rule detects that in every environment, reports it (the dev
|
|
2689
|
+
* overlay, or a warning in the log), and degrades the segment to `'request'`
|
|
2690
|
+
* for the client (below). What it refuses:
|
|
2691
|
+
*
|
|
2692
|
+
* - `getSegmentParams()` returns a view that refuses a param outside the key;
|
|
2693
|
+
* - a search-params definition's `.get()` is refused unless every field it
|
|
2694
|
+
* reads is in the key's definition, and so are the raw search params;
|
|
2695
|
+
* - the cookie jar refuses a cookie outside the key, and `getAll()`;
|
|
2696
|
+
* - `getHeaders()` reads only the headers in the key; any other header, and
|
|
2697
|
+
* iterating them all, is refused — and with that the pathname, which no timber
|
|
2698
|
+
* API exposes to a component except through a header.
|
|
2699
|
+
*
|
|
2700
|
+
* **Reach.** The scope is an AsyncLocalStorage scope around the segment's
|
|
2701
|
+
* component, so it covers the component and everything it calls or awaits.
|
|
2702
|
+
* That alone would not reach the server components it *returns*: Flight
|
|
2703
|
+
* renders those later, as tasks of its own, outside the scope. So the
|
|
2704
|
+
* returned tree is rewritten (`subtree-walk.ts`) and each server component in
|
|
2705
|
+
* it runs inside the scope too, down to the nested outlets — a layout's
|
|
2706
|
+
* `children` and slots, which are other segments with their own rules.
|
|
2707
|
+
*
|
|
2708
|
+
* Not covered: values computed outside this render and handed to it — a
|
|
2709
|
+
* `timber.cache` entry an earlier request filled, or a module-level value. The
|
|
2710
|
+
* accessors' checks are `read-rule.ts`.
|
|
2711
|
+
*
|
|
2712
|
+
* **Degrading.** The read rule reports a refused read, lets it return its
|
|
2713
|
+
* real value and marks the component call that made it: each scoped call runs
|
|
2714
|
+
* in its own copy of the scope, with a fresh `call` record. The render has
|
|
2715
|
+
* already sent the outlet's key digest (the outlet decides before the segment
|
|
2716
|
+
* renders), so the content withdraws itself instead: when a call that read
|
|
2717
|
+
* outside the key returns, its output gets a `DocumentWithdrawal` marker. The
|
|
2718
|
+
* marker sits beside what the read produced, so the client commits it exactly
|
|
2719
|
+
* when it commits that content — not in a Suspense fallback or an unrendered
|
|
2720
|
+
* prop another component happened to finish in. When it commits, the client
|
|
2721
|
+
* drops the segment's entry and records none for that outlet for the rest of
|
|
2722
|
+
* the document (`client/outlet-content-cache.ts`). The client never advertises
|
|
2723
|
+
* a digest for it again, so every later navigation renders it live —
|
|
2724
|
+
* `'request'` for that client.
|
|
2725
|
+
*
|
|
2726
|
+
* A call that reads and then throws has no output to mark. Its error is
|
|
2727
|
+
* remembered, and each catcher that renders a fallback in its place inside an
|
|
2728
|
+
* outlet (a deny page, a slot's `default.tsx`) passes the fallback through
|
|
2729
|
+
* `fallbackAfter`, which marks it. The marker withdraws whichever outlet the
|
|
2730
|
+
* fallback lands in.
|
|
2731
|
+
*
|
|
2732
|
+
* An async iterable the call returned is advanced later, in a call record of
|
|
2733
|
+
* its own; the first chunk it yields after a read carries the marker, or, for
|
|
2734
|
+
* a read on its closing step, a last chunk of the marker alone.
|
|
2735
|
+
*
|
|
2736
|
+
* A scoped view (`getHeaders()`, `getSegmentParams()`) handed down to another
|
|
2737
|
+
* component marks the call reading through it, as well as the one that made it.
|
|
2738
|
+
*
|
|
2739
|
+
* Not marked: a read in other work the call did not await, such as a promise
|
|
2740
|
+
* handed to a client component (it lands in a call record nobody checks).
|
|
2741
|
+
* See design/53 §"Reads outside the key".
|
|
2742
|
+
*/
|
|
2743
|
+
/**
|
|
2744
|
+
* Errors thrown by a scoped call after it read outside its key. Weak: an
|
|
2745
|
+
* error lives only as long as whoever handles it holds it.
|
|
2746
|
+
*/
|
|
2747
|
+
var THROWN_AFTER_READ = /* @__PURE__ */ new WeakSet();
|
|
2748
|
+
/**
|
|
2749
|
+
* The fallback a catcher renders in place of a component that threw: marked
|
|
2750
|
+
* to withdraw its outlet when the throw came from a scoped call that read
|
|
2751
|
+
* outside its key, so the client does not keep the fallback under the key
|
|
2752
|
+
* digest. Every catcher that renders a fallback inside an outlet calls this.
|
|
2753
|
+
*/
|
|
2754
|
+
function fallbackAfter(error, fallback) {
|
|
2755
|
+
return typeof error === "object" && error !== null && THROWN_AFTER_READ.has(error) ? withMarker(fallback) : fallback;
|
|
2756
|
+
}
|
|
2757
|
+
/**
|
|
2758
|
+
* `node` with a `DocumentWithdrawal` marker beside it. Two arguments, not an
|
|
2759
|
+
* array: no key is needed, and `node` keeps its position as the fragment's
|
|
2760
|
+
* first child.
|
|
2761
|
+
*/
|
|
2762
|
+
function withMarker(node) {
|
|
2763
|
+
const { DocumentWithdrawal } = clientComponents();
|
|
2764
|
+
return createElement(Fragment, null, node, createElement(DocumentWithdrawal));
|
|
2765
|
+
}
|
|
2684
2766
|
// src/server/deny-boundary.ts
|
|
2685
2767
|
/**
|
|
2686
2768
|
* Deny boundary subsystem — the in-tree DenySignal flow.
|
|
@@ -2865,7 +2947,7 @@ function handleCaughtDeny(chain, error, selfKey) {
|
|
|
2865
2947
|
const placement = chain ? placeDenyPage(chain, error.status, error.data, selfKey) : null;
|
|
2866
2948
|
if (placement?.kind === "render") {
|
|
2867
2949
|
setDenyStatus(error.status);
|
|
2868
|
-
return placement.element;
|
|
2950
|
+
return fallbackAfter(error, placement.element);
|
|
2869
2951
|
}
|
|
2870
2952
|
if (placement?.kind === "hoist") {
|
|
2871
2953
|
setDenyStatus(error.status);
|
|
@@ -4471,10 +4553,7 @@ function noteWrapperRender(innerId, options, props) {
|
|
|
4471
4553
|
* `node_modules` as app code. Installed, timber sits in `node_modules`; run
|
|
4472
4554
|
* from source (this repo, its examples, a linked checkout) its own files would
|
|
4473
4555
|
* count as app code, and its internal awaits would be written into every dev
|
|
4474
|
-
* payload.
|
|
4475
|
-
* segment's decoded content, so a skipped segment's content would be sent as
|
|
4476
|
-
* the debug value of the read a decision chained through
|
|
4477
|
-
* (design/52-segment-hash-dedupe.md §"Capture").
|
|
4556
|
+
* payload.
|
|
4478
4557
|
*
|
|
4479
4558
|
* Next.js passes its own `filterStackFrameDEV` for the same reason; its code
|
|
4480
4559
|
* is always in `node_modules`, so it filters by source map instead.
|
|
@@ -4495,7 +4574,7 @@ function stripFileScheme(url) {
|
|
|
4495
4574
|
}
|
|
4496
4575
|
frameworkRoot(import.meta.url);
|
|
4497
4576
|
// src/server/flight-source.ts
|
|
4498
|
-
var nodeFlight = typeof process !== "undefined" && process.release?.name === "node" && !(typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") ? await import("../_chunks/flight-source-node-
|
|
4577
|
+
var nodeFlight = typeof process !== "undefined" && process.release?.name === "node" && !(typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") ? await import("../_chunks/flight-source-node-BeF00Wo_.js") : null;
|
|
4499
4578
|
/** The Node helpers, which a `kind: 'node'` source can only exist alongside. */
|
|
4500
4579
|
function requireNodeFlight() {
|
|
4501
4580
|
if (!nodeFlight) throw new Error("[timber] a Node Flight source reached a runtime without node:stream");
|