@timber-js/app 0.2.0-alpha.222 → 0.2.0-alpha.224
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 +21 -5
- package/dist/_chunks/{actions-vBHr2vqd.js → actions-7dTXYJfu.js} +53 -24
- package/dist/_chunks/actions-7dTXYJfu.js.map +1 -0
- package/dist/_chunks/{als-registry-BZqHCtq-.js → als-registry-DpygwCp0.js} +2 -3
- package/dist/_chunks/{als-registry-BZqHCtq-.js.map → als-registry-DpygwCp0.js.map} +1 -1
- package/dist/_chunks/{als-slots-BEEIPKYm.js → als-slots-kbQrHTzm.js} +2 -3
- package/dist/_chunks/{als-slots-BEEIPKYm.js.map → als-slots-kbQrHTzm.js.map} +1 -1
- package/dist/_chunks/{base-path-DaQrzbez.js → base-path-DDIx0FXe.js} +2 -3
- package/dist/_chunks/{base-path-DaQrzbez.js.map → base-path-DDIx0FXe.js.map} +1 -1
- package/dist/_chunks/{build-manifest-DWppEdLB.js → build-manifest-Y4jl7nwU.js} +2 -3
- package/dist/_chunks/{build-manifest-DWppEdLB.js.map → build-manifest-Y4jl7nwU.js.map} +1 -1
- package/dist/_chunks/{build-output-helper-RV_BRcF1.js → build-output-helper-B7wWGTfR.js} +14 -10
- package/dist/_chunks/build-output-helper-B7wWGTfR.js.map +1 -0
- package/dist/_chunks/{cache-api-DdcDLpBj.js → cache-api-TDZ4hlDc.js} +190 -38
- package/dist/_chunks/cache-api-TDZ4hlDc.js.map +1 -0
- package/dist/_chunks/{canonicalize-BAWkWiKK.js → canonicalize-CqK135BN.js} +29 -4
- package/dist/_chunks/{canonicalize-BAWkWiKK.js.map → canonicalize-CqK135BN.js.map} +1 -1
- package/dist/_chunks/chains-CwOr3Myj.js +1 -0
- package/dist/_chunks/{chains-BchW_AtW.js → chains-Dgm3PrMe.js} +3 -4
- package/dist/_chunks/{chains-BchW_AtW.js.map → chains-Dgm3PrMe.js.map} +1 -1
- package/dist/_chunks/{classify-IqzMpxMs.js → classify--_kINHQV.js} +4 -5
- package/dist/_chunks/{classify-IqzMpxMs.js.map → classify--_kINHQV.js.map} +1 -1
- package/dist/_chunks/{cli-check-DQne_YhU.js → cli-check-Dv3f8d2j.js} +5 -6
- package/dist/_chunks/{cli-check-DQne_YhU.js.map → cli-check-Dv3f8d2j.js.map} +1 -1
- package/dist/_chunks/{cli-context-_mPttGGY.js → cli-context-CbZp32SK.js} +3 -4
- package/dist/_chunks/{cli-context-_mPttGGY.js.map → cli-context-CbZp32SK.js.map} +1 -1
- package/dist/_chunks/cli-context-n5hmkdla.js +1 -0
- package/dist/_chunks/cli-dev-status-prPMLU8G.js +138 -0
- package/dist/_chunks/cli-dev-status-prPMLU8G.js.map +1 -0
- package/dist/_chunks/cli-init-BoXOYYil.js +196 -0
- package/dist/_chunks/cli-init-BoXOYYil.js.map +1 -0
- package/dist/_chunks/{cli-schema-sync-BS-RFGE2.js → cli-schema-sync-DIPurq7X.js} +4 -5
- package/dist/_chunks/{cli-schema-sync-BS-RFGE2.js.map → cli-schema-sync-DIPurq7X.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-v872sHms.js → cli-schema-sync-uq72EZmD.js} +1 -1
- package/dist/_chunks/{client-dep-entries-BJyP9SIu.js → client-dep-entries-CP7AkMCM.js} +4 -5
- package/dist/_chunks/{client-dep-entries-BJyP9SIu.js.map → client-dep-entries-CP7AkMCM.js.map} +1 -1
- package/dist/_chunks/{cloudflare-Byxl8FWP.js → cloudflare-B75X6u4O.js} +10 -13
- package/dist/_chunks/{cloudflare-Byxl8FWP.js.map → cloudflare-B75X6u4O.js.map} +1 -1
- package/dist/_chunks/{codec-registry-oOUxugz3.js → codec-registry-CPc6bjVl.js} +2 -3
- package/dist/_chunks/{codec-registry-oOUxugz3.js.map → codec-registry-CPc6bjVl.js.map} +1 -1
- package/dist/_chunks/{codegen-Bps1sLKJ.js → codegen-B9oWkWGf.js} +5 -8
- package/dist/_chunks/{codegen-Bps1sLKJ.js.map → codegen-B9oWkWGf.js.map} +1 -1
- package/dist/_chunks/{convention-lint-VwzrtjIt.js → convention-lint-hZwz5wd4.js} +8 -11
- package/dist/_chunks/{convention-lint-VwzrtjIt.js.map → convention-lint-hZwz5wd4.js.map} +1 -1
- package/dist/_chunks/dev-discovery-YnabkCKD.js +238 -0
- package/dist/_chunks/dev-discovery-YnabkCKD.js.map +1 -0
- package/dist/_chunks/{dev-server-BNr5drEO.js → dev-server-B7o4As0l.js} +383 -55
- package/dist/_chunks/dev-server-B7o4As0l.js.map +1 -0
- package/dist/_chunks/dev-server-hZzmbMvK.js +1 -0
- package/dist/_chunks/{dev-store-BOa304m_.js → dev-store-BvdqtHvK.js} +82 -38
- package/dist/_chunks/dev-store-BvdqtHvK.js.map +1 -0
- package/dist/_chunks/{dist-DtrJyBbw.js → dist-C1Rjlo6s.js} +3 -5
- package/dist/_chunks/{dist-DtrJyBbw.js.map → dist-C1Rjlo6s.js.map} +1 -1
- package/dist/_chunks/{error-boundary-Bc8QPZuq.js → error-boundary-DRQXGWCp.js} +20 -27
- package/dist/_chunks/{error-boundary-Bc8QPZuq.js.map → error-boundary-DRQXGWCp.js.map} +1 -1
- package/dist/_chunks/{fast-hash-C-tVYrLb.js → fast-hash-DddxkU5Y.js} +2 -3
- package/dist/_chunks/{fast-hash-C-tVYrLb.js.map → fast-hash-DddxkU5Y.js.map} +1 -1
- package/dist/_chunks/{flight-source-node-BdHUOUqg.js → flight-source-node-0Tp6evlz.js} +6 -8
- package/dist/_chunks/flight-source-node-0Tp6evlz.js.map +1 -0
- package/dist/_chunks/{format-BKclgVbk.js → format-DuPOoXUP.js} +2 -3
- package/dist/_chunks/{format-BKclgVbk.js.map → format-DuPOoXUP.js.map} +1 -1
- package/dist/_chunks/{fs-identity-BRKuL215.js → fs-identity-BmQ_Agg-.js} +3 -5
- package/dist/_chunks/{fs-identity-BRKuL215.js.map → fs-identity-BmQ_Agg-.js.map} +1 -1
- package/dist/_chunks/{global-context-B9PFncvb.js → global-context-DbxNWeBP.js} +2 -3
- package/dist/_chunks/{global-context-B9PFncvb.js.map → global-context-DbxNWeBP.js.map} +1 -1
- package/dist/_chunks/{graph-cache-CYiUS2aS.js → graph-cache-B1LAg4t7.js} +5 -89
- package/dist/_chunks/graph-cache-B1LAg4t7.js.map +1 -0
- package/dist/_chunks/{href-validation-BIrxavIy.js → href-validation-CEZy1V-k.js} +4 -7
- package/dist/_chunks/{href-validation-BIrxavIy.js.map → href-validation-CEZy1V-k.js.map} +1 -1
- package/dist/_chunks/{json-lossy-check-C3Sht92C.js → json-lossy-check-DVkLUlfC.js} +3 -4
- package/dist/_chunks/{json-lossy-check-C3Sht92C.js.map → json-lossy-check-DVkLUlfC.js.map} +1 -1
- package/dist/_chunks/{live-graph-DEu_GWbc.js → live-graph-BcVjQ1Te.js} +6 -7
- package/dist/_chunks/{live-graph-DEu_GWbc.js.map → live-graph-BcVjQ1Te.js.map} +1 -1
- package/dist/_chunks/{logger-CI_hThfy.js → logger-CWk44DLp.js} +89 -47
- package/dist/_chunks/logger-CWk44DLp.js.map +1 -0
- package/dist/_chunks/{metadata-routes-B3XJNyIH.js → metadata-routes-BL26HCDd.js} +2 -3
- package/dist/_chunks/{metadata-routes-B3XJNyIH.js.map → metadata-routes-BL26HCDd.js.map} +1 -1
- package/dist/_chunks/{navigation-root-BQfo1-kG.js → navigation-root-M3B2ZrdO.js} +6 -10
- package/dist/_chunks/{navigation-root-BQfo1-kG.js.map → navigation-root-M3B2ZrdO.js.map} +1 -1
- package/dist/_chunks/{node-response-bF0bKoig.js → node-response-B9aviPDa.js} +43 -9
- package/dist/_chunks/node-response-B9aviPDa.js.map +1 -0
- package/dist/_chunks/{param-value-C8TNYchQ.js → param-value-DqlGfF57.js} +2 -3
- package/dist/_chunks/{param-value-C8TNYchQ.js.map → param-value-DqlGfF57.js.map} +1 -1
- package/dist/_chunks/{plugin-context-uDHFqHHJ.js → plugin-context-BfSRKJfz.js} +1 -1
- package/dist/_chunks/{plugin-context-DxMMvjUt.js → plugin-context-FCkaNLUB.js} +4 -6
- package/dist/_chunks/plugin-context-FCkaNLUB.js.map +1 -0
- package/dist/_chunks/{poison-rules-DoEhbqaY.js → poison-rules-Bmz-lCPi.js} +2 -3
- package/dist/_chunks/{poison-rules-DoEhbqaY.js.map → poison-rules-Bmz-lCPi.js.map} +1 -1
- package/dist/_chunks/{poison-scan-DTWIfNgD.js → poison-scan-DJYxZc_7.js} +4 -5
- package/dist/_chunks/{poison-scan-DTWIfNgD.js.map → poison-scan-DJYxZc_7.js.map} +1 -1
- package/dist/_chunks/{purge-store-WZaxu-3m.js → purge-store-8BqLAYZ1.js} +2 -3
- package/dist/_chunks/{purge-store-WZaxu-3m.js.map → purge-store-8BqLAYZ1.js.map} +1 -1
- package/dist/_chunks/{render-timeout-Ln_u7fX-.js → render-timeout-MrrqD1wd.js} +2 -3
- package/dist/_chunks/{render-timeout-Ln_u7fX-.js.map → render-timeout-MrrqD1wd.js.map} +1 -1
- package/dist/_chunks/{resolve-schema-CkAInout.js → resolve-schema-B-aCuTu3.js} +3 -4
- package/dist/_chunks/{resolve-schema-CkAInout.js.map → resolve-schema-B-aCuTu3.js.map} +1 -1
- package/dist/_chunks/{rsc-cache-key-ClUiXQnK.js → rsc-cache-key-D0cb0Gmc.js} +2 -3
- package/dist/_chunks/{rsc-cache-key-ClUiXQnK.js.map → rsc-cache-key-D0cb0Gmc.js.map} +1 -1
- package/dist/_chunks/{rsc-media-type-DDc7duTD.js → rsc-media-type-m8jz9u6_.js} +2 -3
- package/dist/_chunks/{rsc-media-type-DDc7duTD.js.map → rsc-media-type-m8jz9u6_.js.map} +1 -1
- package/dist/_chunks/{rsc-payload-path-dffcs4jp.js → rsc-payload-path-EphpDB-J.js} +2 -3
- package/dist/_chunks/{rsc-payload-path-dffcs4jp.js.map → rsc-payload-path-EphpDB-J.js.map} +1 -1
- package/dist/_chunks/{scan-BoP17W3w.js → scan-CyizcBiX.js} +2 -3
- package/dist/_chunks/{scan-BoP17W3w.js.map → scan-CyizcBiX.js.map} +1 -1
- package/dist/_chunks/{scanner-C8fdKvKG.js → scanner-CJC-ScJU.js} +15 -23
- package/dist/_chunks/{scanner-C8fdKvKG.js.map → scanner-CJC-ScJU.js.map} +1 -1
- package/dist/_chunks/{schema-bridge-DpOmvZlI.js → schema-bridge-DyRs3cqy.js} +2 -3
- package/dist/_chunks/{schema-bridge-DpOmvZlI.js.map → schema-bridge-DyRs3cqy.js.map} +1 -1
- package/dist/_chunks/{segment-classify-C539Pa2O.js → segment-classify-Ho8jXWeC.js} +3 -5
- package/dist/_chunks/{segment-classify-C539Pa2O.js.map → segment-classify-Ho8jXWeC.js.map} +1 -1
- package/dist/_chunks/{segment-context-D3DNxKFq.js → segment-context-CYiGTi3K.js} +4 -6
- package/dist/_chunks/{segment-context-D3DNxKFq.js.map → segment-context-CYiGTi3K.js.map} +1 -1
- package/dist/_chunks/{segment-keys-D5hu1hz4.js → segment-keys-Y60KNc8C.js} +2 -3
- package/dist/_chunks/{segment-keys-D5hu1hz4.js.map → segment-keys-Y60KNc8C.js.map} +1 -1
- package/dist/_chunks/{singleflight-BeVMMKi0.js → singleflight-BChPMjwH.js} +2 -3
- package/dist/_chunks/{singleflight-BeVMMKi0.js.map → singleflight-BChPMjwH.js.map} +1 -1
- package/dist/_chunks/{sizeof-CO3dk0V1.js → sizeof-DG4W40lv.js} +3 -4
- package/dist/_chunks/{sizeof-CO3dk0V1.js.map → sizeof-DG4W40lv.js.map} +1 -1
- package/dist/_chunks/{ssr-data-nA3I70_n.js → ssr-data-9hPtcNOr.js} +3 -4
- package/dist/_chunks/{ssr-data-nA3I70_n.js.map → ssr-data-9hPtcNOr.js.map} +1 -1
- package/dist/_chunks/{state-BhNGPsdi.js → state-B-EBjeER.js} +2 -3
- package/dist/_chunks/{state-BhNGPsdi.js.map → state-B-EBjeER.js.map} +1 -1
- package/dist/_chunks/{status-page-marker-BRX9Ib-d.js → status-page-marker-XIQXlTOb.js} +8 -13
- package/dist/_chunks/{status-page-marker-BRX9Ib-d.js.map → status-page-marker-XIQXlTOb.js.map} +1 -1
- package/dist/_chunks/{tree-match-6yihorhk.js → tree-match-Bqdr9szG.js} +2 -3
- package/dist/_chunks/{tree-match-6yihorhk.js.map → tree-match-Bqdr9szG.js.map} +1 -1
- package/dist/_chunks/{use-query-states-I3JMng6J.js → use-query-states-pkDV-jSg.js} +4 -7
- package/dist/_chunks/{use-query-states-I3JMng6J.js.map → use-query-states-pkDV-jSg.js.map} +1 -1
- package/dist/_chunks/{walkers-BqzxnwGC.js → walkers-DIE203ir.js} +6 -8
- package/dist/_chunks/{walkers-BqzxnwGC.js.map → walkers-DIE203ir.js.map} +1 -1
- package/dist/_chunks/{write-file-atomic-D1qWqHb4.js → write-file-atomic-DW8m_Atv.js} +2 -3
- package/dist/_chunks/{write-file-atomic-D1qWqHb4.js.map → write-file-atomic-DW8m_Atv.js.map} +1 -1
- package/dist/adapters/build-output-helper.d.ts +10 -1
- package/dist/adapters/build-output-helper.d.ts.map +1 -1
- package/dist/adapters/cloudflare-dev.js +2 -3
- package/dist/adapters/cloudflare-kv-cache.js +3 -4
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js +1 -1
- package/dist/adapters/nitro-presets.d.ts +6 -0
- package/dist/adapters/nitro-presets.d.ts.map +1 -1
- package/dist/adapters/nitro-preview.d.ts.map +1 -1
- package/dist/adapters/nitro.d.ts.map +1 -1
- package/dist/adapters/nitro.js +94 -57
- package/dist/adapters/nitro.js.map +1 -1
- package/dist/analyze/crawl-entry.js +7 -9
- package/dist/analyze/crawl-entry.js.map +1 -1
- package/dist/analyze/graph-command.d.ts.map +1 -1
- package/dist/analyze/graph-command.js +19 -105
- package/dist/analyze/graph-command.js.map +1 -1
- package/dist/cache/index.js +3 -3
- package/dist/cache/key-discipline.d.ts +61 -0
- package/dist/cache/key-discipline.d.ts.map +1 -0
- package/dist/cache/stores/cloudflare-kv.js +1 -2
- package/dist/cache/stores/memory.js +2 -3
- package/dist/cache/stores/redis.js +1 -2
- package/dist/cache/stores/vercel.js +1 -2
- package/dist/cache/timber-cache.d.ts +5 -1
- package/dist/cache/timber-cache.d.ts.map +1 -1
- package/dist/cdn/cloudflare-purge.js +1 -2
- package/dist/cdn/fastly-purge.js +1 -2
- package/dist/cdn/index.js +2 -3
- package/dist/cdn/workers-cache-purge.js +3 -5
- package/dist/cdn/workers-cache-purge.js.map +1 -1
- package/dist/cli-dev-status.d.ts +75 -0
- package/dist/cli-dev-status.d.ts.map +1 -0
- package/dist/cli-init.d.ts +72 -0
- package/dist/cli-init.d.ts.map +1 -0
- package/dist/cli.d.ts +4 -12
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +27 -54
- package/dist/cli.js.map +1 -1
- package/dist/client/error-boundary.d.ts.map +1 -1
- package/dist/client/error-boundary.js +1 -1
- package/dist/client/index.js +22 -34
- package/dist/client/index.js.map +1 -1
- package/dist/client/internal.js +13 -18
- package/dist/client/internal.js.map +1 -1
- package/dist/client/use-cookie.d.ts +18 -5
- package/dist/client/use-cookie.d.ts.map +1 -1
- package/dist/codec.js +2 -3
- package/dist/config-types.d.ts +40 -5
- package/dist/config-types.d.ts.map +1 -1
- package/dist/config-validation.d.ts.map +1 -1
- package/dist/cookies/define-cookie.d.ts.map +1 -1
- package/dist/cookies/index.js +40 -67
- package/dist/cookies/index.js.map +1 -1
- package/dist/cookies/json-cookie.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +698 -237
- package/dist/index.js.map +1 -1
- package/dist/params/index.js +3 -4
- package/dist/plugin-context.d.ts +7 -0
- package/dist/plugin-context.d.ts.map +1 -1
- package/dist/plugins/dev-discovery.d.ts +69 -5
- package/dist/plugins/dev-discovery.d.ts.map +1 -1
- package/dist/plugins/dev-hostname.d.ts +152 -0
- package/dist/plugins/dev-hostname.d.ts.map +1 -0
- package/dist/plugins/dev-server.d.ts +5 -1
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/plugins/dev-store-clear.d.ts +59 -4
- package/dist/plugins/dev-store-clear.d.ts.map +1 -1
- package/dist/plugins/graph-endpoint.d.ts +4 -2
- package/dist/plugins/graph-endpoint.d.ts.map +1 -1
- package/dist/plugins/optimize-package-imports-defaults.d.ts +13 -0
- package/dist/plugins/optimize-package-imports-defaults.d.ts.map +1 -0
- package/dist/plugins/optimize-package-imports.d.ts +113 -0
- package/dist/plugins/optimize-package-imports.d.ts.map +1 -0
- package/dist/plugins/prebuilt.d.ts.map +1 -1
- package/dist/routing/index.js +4 -4
- package/dist/rsc-runtime/rsc.d.ts +2 -1
- package/dist/rsc-runtime/rsc.d.ts.map +1 -1
- package/dist/rsc-runtime/server-references.d.ts +8 -0
- package/dist/rsc-runtime/server-references.d.ts.map +1 -0
- package/dist/search-params/index.js +5 -7
- package/dist/search-params/index.js.map +1 -1
- package/dist/server/access-gate.d.ts +12 -0
- package/dist/server/access-gate.d.ts.map +1 -1
- package/dist/server/canonicalize.d.ts +21 -0
- package/dist/server/canonicalize.d.ts.map +1 -1
- package/dist/server/cookie-context.d.ts +8 -1
- package/dist/server/cookie-context.d.ts.map +1 -1
- package/dist/server/flight-source-node.d.ts.map +1 -1
- package/dist/server/flight-source.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +8 -13
- package/dist/server/index.js.map +1 -1
- package/dist/server/interception-gates.d.ts +49 -0
- package/dist/server/interception-gates.d.ts.map +1 -0
- package/dist/server/internal.js +1061 -943
- package/dist/server/internal.js.map +1 -1
- package/dist/server/logger.d.ts +17 -0
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/param-coercion.d.ts +8 -0
- package/dist/server/param-coercion.d.ts.map +1 -1
- package/dist/server/pipeline-interception.d.ts +34 -4
- package/dist/server/pipeline-interception.d.ts.map +1 -1
- package/dist/server/pipeline-metadata-route.d.ts +24 -0
- package/dist/server/pipeline-metadata-route.d.ts.map +1 -0
- package/dist/server/pipeline-metadata.d.ts +3 -2
- package/dist/server/pipeline-metadata.d.ts.map +1 -1
- package/dist/server/pipeline-phases.d.ts +9 -3
- package/dist/server/pipeline-phases.d.ts.map +1 -1
- package/dist/server/pipeline.d.ts +18 -0
- package/dist/server/pipeline.d.ts.map +1 -1
- package/dist/server/prebuilt/dev-store.d.ts +68 -22
- package/dist/server/prebuilt/dev-store.d.ts.map +1 -1
- package/dist/server/prebuilt/overlay.d.ts +8 -0
- package/dist/server/prebuilt/overlay.d.ts.map +1 -1
- package/dist/server/prebuilt-runtime.d.ts.map +1 -1
- package/dist/server/primitives.d.ts +13 -0
- package/dist/server/primitives.d.ts.map +1 -1
- package/dist/server/render-utils.d.ts +21 -0
- package/dist/server/render-utils.d.ts.map +1 -1
- package/dist/server/request-context.d.ts +14 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/route-handler.d.ts +7 -0
- package/dist/server/route-handler.d.ts.map +1 -1
- package/dist/server/route-matcher.d.ts +14 -3
- package/dist/server/route-matcher.d.ts.map +1 -1
- package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
- package/dist/server/rsc-entry/index.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
- package/dist/server/signal-identity.d.ts +6 -0
- package/dist/server/signal-identity.d.ts.map +1 -1
- package/dist/server/traced-access.d.ts +18 -0
- package/dist/server/traced-access.d.ts.map +1 -0
- package/dist/server/tracing.d.ts.map +1 -1
- package/dist/server/types.d.ts +5 -4
- package/dist/server/types.d.ts.map +1 -1
- package/dist/shims/font-google.js +1 -2
- package/dist/shims/font-local.js +1 -2
- package/dist/shims/headers.d.ts +11 -4
- package/dist/shims/headers.d.ts.map +1 -1
- package/docs/api/30-api-server.mdx +3 -1
- package/docs/api/32-api-cache.mdx +1 -1
- package/docs/api/34-api-config.mdx +42 -0
- package/docs/api/36-cli.mdx +72 -6
- package/docs/learn/01-quick-start.mdx +1 -1
- package/docs/learn/06-typed-params.mdx +2 -2
- package/docs/learn/10-caching.mdx +26 -5
- package/llms.txt +1 -1
- package/package.json +12 -12
- package/src/adapters/build-output-helper.ts +26 -4
- package/src/adapters/cloudflare.ts +1 -0
- package/src/adapters/nitro-presets.ts +15 -0
- package/src/adapters/nitro-preview.ts +66 -34
- package/src/adapters/nitro.ts +14 -6
- package/src/analyze/graph-command.ts +25 -133
- package/src/cache/key-discipline.ts +218 -0
- package/src/cache/timber-cache.ts +42 -5
- package/src/cli-dev-status.ts +196 -0
- package/src/cli-init.ts +278 -0
- package/src/cli.ts +33 -79
- package/src/client/error-boundary.tsx +19 -2
- package/src/client/use-cookie.ts +33 -21
- package/src/config-types.ts +40 -5
- package/src/config-validation.ts +37 -0
- package/src/cookies/define-cookie.ts +10 -46
- package/src/cookies/json-cookie.ts +4 -4
- package/src/index.ts +2 -0
- package/src/plugin-context.ts +7 -0
- package/src/plugins/dev-discovery.ts +216 -6
- package/src/plugins/dev-hostname.ts +322 -0
- package/src/plugins/dev-server.ts +96 -37
- package/src/plugins/dev-store-clear.ts +105 -7
- package/src/plugins/graph-endpoint.ts +15 -3
- package/src/plugins/optimize-package-imports-defaults.ts +88 -0
- package/src/plugins/optimize-package-imports.ts +439 -0
- package/src/plugins/prebuilt.ts +9 -0
- package/src/rsc-runtime/rsc.ts +7 -3
- package/src/rsc-runtime/server-references.ts +73 -0
- package/src/rsc-runtime/vendor-types.d.ts +9 -0
- package/src/server/access-gate.tsx +32 -20
- package/src/server/action-handler.ts +40 -34
- package/src/server/canonicalize.ts +27 -0
- package/src/server/cookie-context.ts +11 -3
- package/src/server/flight-source-node.ts +5 -2
- package/src/server/flight-source.ts +4 -3
- package/src/server/index.ts +6 -1
- package/src/server/interception-gates.ts +94 -0
- package/src/server/logger.ts +23 -0
- package/src/server/param-coercion.ts +22 -0
- package/src/server/pipeline-interception.ts +64 -4
- package/src/server/pipeline-metadata-route.ts +242 -0
- package/src/server/pipeline-metadata.ts +7 -5
- package/src/server/pipeline-phases.ts +71 -131
- package/src/server/pipeline.ts +20 -2
- package/src/server/prebuilt/dev-store.ts +113 -34
- package/src/server/prebuilt/overlay.ts +18 -0
- package/src/server/prebuilt-runtime.ts +43 -44
- package/src/server/primitives.ts +14 -0
- package/src/server/render-utils.ts +25 -0
- package/src/server/request-context.ts +27 -3
- package/src/server/route-element-builder.ts +15 -2
- package/src/server/route-handler.ts +3 -2
- package/src/server/route-matcher.ts +48 -33
- package/src/server/rsc-entry/api-handler.ts +2 -33
- package/src/server/rsc-entry/index.ts +8 -3
- package/src/server/rsc-entry/rsc-stream.ts +7 -1
- package/src/server/signal-identity.ts +30 -12
- package/src/server/traced-access.ts +50 -0
- package/src/server/tracing.ts +18 -1
- package/src/server/types.ts +5 -4
- package/src/shims/headers.ts +12 -4
- package/dist/_chunks/actions-vBHr2vqd.js.map +0 -1
- package/dist/_chunks/build-output-helper-RV_BRcF1.js.map +0 -1
- package/dist/_chunks/cache-api-DdcDLpBj.js.map +0 -1
- package/dist/_chunks/chains-B8TCLved.js +0 -1
- package/dist/_chunks/cli-context-BJQB6rtF.js +0 -1
- package/dist/_chunks/dev-server-BNr5drEO.js.map +0 -1
- package/dist/_chunks/dev-server-CUg7Mqh_.js +0 -1
- package/dist/_chunks/dev-store-BOa304m_.js.map +0 -1
- package/dist/_chunks/flight-source-node-BdHUOUqg.js.map +0 -1
- package/dist/_chunks/graph-cache-CYiUS2aS.js.map +0 -1
- package/dist/_chunks/logger-CI_hThfy.js.map +0 -1
- package/dist/_chunks/node-response-bF0bKoig.js.map +0 -1
- package/dist/_chunks/plugin-context-DxMMvjUt.js.map +0 -1
- package/dist/server/prebuilt/key-discipline.d.ts +0 -52
- package/dist/server/prebuilt/key-discipline.d.ts.map +0 -1
- package/src/server/prebuilt/key-discipline.ts +0 -122
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/cache/handler-store.ts
|
|
2
2
|
var handler = null;
|
|
3
3
|
var explicitlyConfigured = false;
|
|
4
4
|
/** Replace the active cache handler. */
|
|
@@ -54,8 +54,7 @@ function createDefaultHandler() {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
//#region src/cache/invalidation-epoch.ts
|
|
57
|
+
// src/cache/invalidation-epoch.ts
|
|
59
58
|
/**
|
|
60
59
|
* Per-process invalidation epoch tracking for timber.cache (TIM-1028).
|
|
61
60
|
*
|
|
@@ -151,8 +150,7 @@ function lastInvalidationEpochFor(key, tags) {
|
|
|
151
150
|
}
|
|
152
151
|
return last;
|
|
153
152
|
}
|
|
154
|
-
|
|
155
|
-
//#region src/server/prebuilt/dev-store.ts
|
|
153
|
+
// src/server/prebuilt/dev-store.ts
|
|
156
154
|
/**
|
|
157
155
|
* Dev-mode store for cache.component output (TIM-1588, design/44 §Dev Mode).
|
|
158
156
|
*
|
|
@@ -164,21 +162,30 @@ function lastInvalidationEpochFor(key, tags) {
|
|
|
164
162
|
* that. Runtime-tier entries (`ttl`/`tags`) keep using the cache-handler
|
|
165
163
|
* overlay; in dev their keys carry this store's namespace (`overlayKey`).
|
|
166
164
|
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
165
|
+
* Every dev-server watcher event clears the store. The dev-server plugin
|
|
166
|
+
* sends `PREBUILT_DEV_CLEAR_EVENT` to the RSC environment and the RSC entry
|
|
167
|
+
* calls `clearDevPrebuiltStore()` (plugins/dev-store-clear.ts, TIM-1599).
|
|
168
|
+
* A save of a file the RSC module graph knows is scoped: the event names
|
|
169
|
+
* the components declared in the saved module and its transitive
|
|
170
|
+
* importers, which are the only call sites whose code could have changed.
|
|
171
|
+
* Any other event (a file read with `fs`, an add or a delete) names none,
|
|
172
|
+
* and clears everything — the module graph never says who reads a file
|
|
173
|
+
* with `fs`. A clear
|
|
174
|
+
* does three things:
|
|
173
175
|
*
|
|
174
|
-
* 1. drops every seed
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
176
|
+
* 1. drops the seeds of the named components and every ISR seed (every
|
|
177
|
+
* seed, unscoped);
|
|
178
|
+
* 2. bumps the generation, which namespaces dev overlay keys and
|
|
179
|
+
* `cache.data` keys, so EVERY runtime-tier and data entry stored
|
|
180
|
+
* before the save becomes unreachable, scoped or not. Those tiers are
|
|
181
|
+
* cheap to refill, and a data function's ID comes from its call site,
|
|
182
|
+
* so a scoped answer for them would need a dependency walk of its own;
|
|
183
|
+
* 3. records an invalidation of the named components (of everything,
|
|
184
|
+
* unscoped), so a capture of one already in flight — which may have
|
|
185
|
+
* loaded the pre-save code — is not stored, and a request arriving
|
|
186
|
+
* after the save does not join that flight (the TIM-1028 guard every
|
|
187
|
+
* capture path already runs). Captures of the other components are
|
|
188
|
+
* untouched.
|
|
182
189
|
*
|
|
183
190
|
* Inactive outside dev: production never enables it. Dev enables it only
|
|
184
191
|
* when HMR is on — with `server.hmr: false` Vite delivers no watcher events
|
|
@@ -189,6 +196,9 @@ function lastInvalidationEpochFor(key, tags) {
|
|
|
189
196
|
var PREBUILT_DEV_CLEAR_EVENT = "timber:prebuilt-dev-clear";
|
|
190
197
|
var mode = "off";
|
|
191
198
|
var generation = 0;
|
|
199
|
+
/** Components already announced by the one-time dev log. */
|
|
200
|
+
var loggedIds = /* @__PURE__ */ new Set();
|
|
201
|
+
/** Component ID → cache key → seed. */
|
|
192
202
|
var seeds = /* @__PURE__ */ new Map();
|
|
193
203
|
/**
|
|
194
204
|
* Distinguishes this process's overlay keys from a previous dev session's,
|
|
@@ -199,9 +209,6 @@ var seeds = /* @__PURE__ */ new Map();
|
|
|
199
209
|
* in workerd.
|
|
200
210
|
*/
|
|
201
211
|
var processToken = null;
|
|
202
|
-
function seedKey(componentId, cacheKey) {
|
|
203
|
-
return `${componentId}:${cacheKey}`;
|
|
204
|
-
}
|
|
205
212
|
function isDevPrebuiltStoreActive() {
|
|
206
213
|
return mode === "active";
|
|
207
214
|
}
|
|
@@ -233,30 +240,68 @@ function devDataCacheKey(key) {
|
|
|
233
240
|
return namespace === null ? key : `${namespace}\u0000${key}`;
|
|
234
241
|
}
|
|
235
242
|
function getDevSeed(componentId, cacheKey) {
|
|
236
|
-
return seeds.get(
|
|
243
|
+
return seeds.get(componentId)?.get(cacheKey);
|
|
237
244
|
}
|
|
238
245
|
/**
|
|
239
|
-
* Store a captured seed
|
|
240
|
-
* tag invalidation) happened while it
|
|
246
|
+
* Store a captured seed, announcing the component's first one. The caller
|
|
247
|
+
* has already checked that no clear (or tag invalidation) happened while it
|
|
248
|
+
* was capturing.
|
|
241
249
|
*/
|
|
242
250
|
function setDevSeed(componentId, cacheKey, seed) {
|
|
243
|
-
seeds.
|
|
251
|
+
let entries = seeds.get(componentId);
|
|
252
|
+
if (!entries) seeds.set(componentId, entries = /* @__PURE__ */ new Map());
|
|
253
|
+
entries.set(cacheKey, seed);
|
|
254
|
+
if (!loggedIds.has(componentId)) {
|
|
255
|
+
loggedIds.add(componentId);
|
|
256
|
+
console.log(`[timber] cache.component "${componentId}": prerendered in dev — served from memory until a file it depends on changes. A hard reload (Cache-Control: no-cache) renders it again.`);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* An invalidation-epoch tag for one component (it never reaches a cache
|
|
261
|
+
* handler; the NUL keeps it apart from user tags), recorded when a scoped
|
|
262
|
+
* clear drops the component. Dev captures add it
|
|
263
|
+
* to their invalidation checks, so a scoped clear reaches a capture of the
|
|
264
|
+
* component that is in flight, including its first, which has no seed yet.
|
|
265
|
+
*/
|
|
266
|
+
function devComponentTag(componentId) {
|
|
267
|
+
return `\u0000timber-dev-component:${componentId}`;
|
|
244
268
|
}
|
|
245
|
-
/**
|
|
246
|
-
|
|
247
|
-
|
|
269
|
+
/**
|
|
270
|
+
* A source change: drop the seeds of `componentIds`, or of every component
|
|
271
|
+
* when absent. Every clear bumps the generation (see the header).
|
|
272
|
+
*/
|
|
273
|
+
function clearDevPrebuiltStore(componentIds) {
|
|
248
274
|
generation++;
|
|
249
|
-
|
|
275
|
+
if (componentIds === void 0) {
|
|
276
|
+
seeds.clear();
|
|
277
|
+
recordInvalidationOfAll();
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
for (const id of componentIds) {
|
|
281
|
+
recordInvalidation({ tag: devComponentTag(id) });
|
|
282
|
+
seeds.delete(id);
|
|
283
|
+
}
|
|
284
|
+
for (const entries of seeds.values()) for (const [cacheKey, seed] of entries) if (seed.isr) entries.delete(cacheKey);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* The invalidation-epoch key dev captures of one entry check. Unlike the
|
|
288
|
+
* overlay key it carries no generation, like the seed it guards: a capture
|
|
289
|
+
* that a scoped clear kept in flight started under an older generation,
|
|
290
|
+
* and must still see a hard reload that comes after the clear.
|
|
291
|
+
*/
|
|
292
|
+
function devEntryKey(componentId, cacheKey) {
|
|
293
|
+
return `\u0000timber-dev-entry:${componentId}:${cacheKey}`;
|
|
250
294
|
}
|
|
251
295
|
/**
|
|
252
296
|
* A hard reload: discard one entry — its seed and its overlay record — so
|
|
253
|
-
* the request renders it again. Recorded as an invalidation of its
|
|
254
|
-
* first, so a capture of it already in flight (which may have read the
|
|
255
|
-
* external data) neither stores nor is joined by this request.
|
|
297
|
+
* the request renders it again. Recorded as an invalidation of both its
|
|
298
|
+
* keys first, so a capture of it already in flight (which may have read the
|
|
299
|
+
* old external data) neither stores nor is joined by this request.
|
|
256
300
|
*/
|
|
257
301
|
async function discardDevEntry(componentId, cacheKey, overlayKey) {
|
|
302
|
+
recordInvalidation({ key: devEntryKey(componentId, cacheKey) });
|
|
258
303
|
recordInvalidation({ key: overlayKey });
|
|
259
|
-
seeds.delete(
|
|
304
|
+
seeds.get(componentId)?.delete(cacheKey);
|
|
260
305
|
await getCacheHandler().invalidate({ key: overlayKey });
|
|
261
306
|
}
|
|
262
307
|
/**
|
|
@@ -265,7 +310,7 @@ async function discardDevEntry(componentId, cacheKey, overlayKey) {
|
|
|
265
310
|
* mechanics) — the next request misses and captures again.
|
|
266
311
|
*/
|
|
267
312
|
function invalidateDevSeedsByTag(tag) {
|
|
268
|
-
for (const [
|
|
313
|
+
for (const entries of seeds.values()) for (const [cacheKey, seed] of entries) if (seed.tags.includes(tag)) entries.delete(cacheKey);
|
|
269
314
|
}
|
|
270
315
|
/**
|
|
271
316
|
* Whether the request asks to skip caches — a browser hard reload, or any
|
|
@@ -277,7 +322,6 @@ function invalidateDevSeedsByTag(tag) {
|
|
|
277
322
|
function isHardReload(headers) {
|
|
278
323
|
return /(?:^|,)\s*no-cache\s*(?:,|$)/i.test(headers.get("cache-control") ?? "");
|
|
279
324
|
}
|
|
280
|
-
|
|
281
|
-
export { isCacheHandlerConfigured as _, discardDevEntry as a, isDevPrebuiltCacheBypassed as c, setDevSeed as d, currentInvalidationEpoch as f, getCacheHandler as g, wasInvalidatedSince as h, devOverlayNamespace as i, isDevPrebuiltStoreActive as l, recordInvalidation as m, clearDevPrebuiltStore as n, getDevSeed as o, lastInvalidationEpochFor as p, devDataCacheKey as r, invalidateDevSeedsByTag as s, PREBUILT_DEV_CLEAR_EVENT as t, isHardReload as u, setCacheHandler as v };
|
|
325
|
+
export { wasInvalidatedSince as _, devEntryKey as a, setCacheHandler as b, getDevSeed as c, isDevPrebuiltStoreActive as d, isHardReload as f, recordInvalidation as g, lastInvalidationEpochFor as h, devDataCacheKey as i, invalidateDevSeedsByTag as l, currentInvalidationEpoch as m, clearDevPrebuiltStore as n, devOverlayNamespace as o, setDevSeed as p, devComponentTag as r, discardDevEntry as s, PREBUILT_DEV_CLEAR_EVENT as t, isDevPrebuiltCacheBypassed as u, getCacheHandler as v, isCacheHandlerConfigured as y };
|
|
282
326
|
|
|
283
|
-
//# sourceMappingURL=dev-store-
|
|
327
|
+
//# sourceMappingURL=dev-store-BvdqtHvK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-store-BvdqtHvK.js","names":[],"sources":["../../src/cache/handler-store.ts","../../src/cache/invalidation-epoch.ts","../../src/server/prebuilt/dev-store.ts"],"sourcesContent":["/**\n * Module-level cache handler singleton.\n *\n * Lazily initialized to MemoryCacheHandler on first access. The framework\n * replaces this at boot from timber.config.ts via setCacheHandler().\n *\n * This module avoids importing from ./index to prevent circular dependencies.\n */\n\n// Inline the interface to avoid circular import with index.ts\ninterface CacheHandlerLike {\n get(key: string): Promise<{ value: unknown; stale: boolean } | null>;\n set(key: string, value: unknown, opts: { ttl: number; tags: string[] }): Promise<void>;\n invalidate(opts: { key?: string; tag?: string }): Promise<void>;\n}\n\nlet handler: CacheHandlerLike | null = null;\n\nlet explicitlyConfigured = false;\n\n/** Whether `handler` came from timber.cache.ts (applyConfiguredCacheHandler). */\nlet fromCacheConfig = false;\n\n/** The handler last installed by a direct setCacheHandler() call, if any. */\nlet directHandler: CacheHandlerLike | null = null;\n\n/** Replace the active cache handler. */\nexport function setCacheHandler(h: CacheHandlerLike): void {\n handler = h;\n explicitlyConfigured = true;\n fromCacheConfig = false;\n directHandler = h;\n}\n\n/**\n * Apply the handler timber.cache.ts exports, or `null` when it exports none.\n * Called on every run of the RSC entry. In dev the entry re-runs after an\n * edit while this module keeps its state (design/21 §HMR Wiring), so a\n * handler removed from timber.cache.ts must be dropped here, not kept\n * serving. A handler installed by a direct setCacheHandler() call (from\n * register(), say) is left in place when the file exports none, and comes\n * back when a configured handler that replaced it is removed.\n */\nexport function applyConfiguredCacheHandler(h: CacheHandlerLike | null): void {\n if (h) {\n handler = h;\n explicitlyConfigured = true;\n fromCacheConfig = true;\n } else if (fromCacheConfig) {\n handler = directHandler;\n explicitlyConfigured = directHandler !== null;\n fromCacheConfig = false;\n }\n}\n\n/** @internal — reset for tests only. */\nexport function _resetCacheHandler(): void {\n handler = null;\n explicitlyConfigured = false;\n fromCacheConfig = false;\n directHandler = null;\n}\n\n/** Whether the handler was explicitly configured (vs the default in-memory fallback). */\nexport function isCacheHandlerConfigured(): boolean {\n return explicitlyConfigured;\n}\n\n/**\n * Get the active cache handler. Creates a default MemoryCacheHandler on\n * first access if none has been set via setCacheHandler().\n */\nexport function getCacheHandler(): CacheHandlerLike {\n if (!handler) {\n // Inline a minimal LRU cache to avoid circular dep with index.ts.\n // In production, the framework always calls setCacheHandler() at boot.\n handler = createDefaultHandler();\n }\n return handler;\n}\n\nfunction createDefaultHandler(): CacheHandlerLike {\n const store = new Map<string, { value: unknown; expiresAt: number; tags: string[] }>();\n const maxEntries = 1000;\n\n return {\n async get(key) {\n const entry = store.get(key);\n if (!entry) return null;\n store.delete(key);\n store.set(key, entry);\n const stale = Date.now() > entry.expiresAt;\n return { value: entry.value, stale };\n },\n async set(key, value, opts) {\n if (store.has(key)) store.delete(key);\n while (store.size >= maxEntries) {\n const oldest = store.keys().next().value;\n if (oldest !== undefined) store.delete(oldest);\n else break;\n }\n store.set(key, { value, expiresAt: Date.now() + opts.ttl * 1000, tags: opts.tags });\n },\n async invalidate(opts) {\n if (opts.key) store.delete(opts.key);\n if (opts.tag) {\n for (const [key, entry] of store) {\n if (entry.tags.includes(opts.tag)) store.delete(key);\n }\n }\n },\n };\n}\n","/**\n * Per-process invalidation epoch tracking for timber.cache (TIM-1028).\n *\n * handler.set for a cache miss runs after `fn()` resolves. An explicit\n * `cache.invalidate({ tag })` / `revalidateTag` that lands while fn is in\n * flight would otherwise be silently undone — the just-invalidated value\n * re-stored as fresh for the full TTL, resurrecting pre-mutation data.\n *\n * Every invalidation bumps a monotonic epoch and records it against the\n * invalidated key/tag. Before storing a result, the cache wrapper checks\n * whether its key or any of its tags were invalidated after fn started and\n * skips the write if so. Skipping is always safe: the only cost is one\n * extra cache miss on the next call.\n *\n * Scope: per-process, like the singleflight map. An invalidation issued by\n * another instance against a shared handler (Redis/KV) during fn flight is\n * not observable here — closing that window fully would require store-level\n * versioning, which no CacheHandler backend offers.\n */\n\nlet epoch = 0;\n\n/**\n * Last-invalidated epoch per `key:<k>` / `tag:<t>` entry. Insertion order is\n * epoch order (entries are re-inserted on update), so the oldest entry is\n * always first — pruning evicts lowest epochs.\n */\nconst lastInvalidated = new Map<string, number>();\n\n/**\n * Bound on tracked entries so high-cardinality tag invalidation (e.g.\n * per-user tags) cannot grow this map without limit.\n */\nconst MAX_TRACKED_ENTRIES = 10_000;\n\n/**\n * Every execution that started at or before this epoch counts as\n * invalidated. Raised by eviction (history was truncated, so we can no\n * longer prove an execution wasn't invalidated) and by\n * `recordInvalidationOfAll()`.\n */\nlet invalidatedEpochFloor = 0;\n\n/** The current epoch. Capture before running fn(), pass to wasInvalidatedSince. */\nexport function currentInvalidationEpoch(): number {\n return epoch;\n}\n\n/**\n * Record an invalidation. Call BEFORE handler.invalidate() so an execution\n * whose set-check races the invalidation errs toward skipping the write.\n */\nexport function recordInvalidation(opts: { key?: string; tag?: string }): void {\n epoch++;\n if (opts.key) track(`key:${opts.key}`);\n if (opts.tag) track(`tag:${opts.tag}`);\n}\n\n/**\n * Record an invalidation of every key and tag at once. The dev server\n * calls this on a source change (server/prebuilt/dev-store.ts): any cached\n * render in flight may have loaded the pre-change code, so none of them may\n * store, and a caller arriving after the change must not join their flight.\n */\nexport function recordInvalidationOfAll(): void {\n epoch++;\n invalidatedEpochFloor = epoch;\n}\n\nfunction track(entry: string): void {\n lastInvalidated.delete(entry);\n lastInvalidated.set(entry, epoch);\n while (lastInvalidated.size > MAX_TRACKED_ENTRIES) {\n const oldest = lastInvalidated.entries().next().value;\n if (oldest === undefined) break;\n invalidatedEpochFloor = Math.max(invalidatedEpochFloor, oldest[1]);\n lastInvalidated.delete(oldest[0]);\n }\n}\n\n/**\n * Whether the key or any tag was invalidated after `startEpoch` (the epoch\n * captured when fn started executing).\n */\nexport function wasInvalidatedSince(startEpoch: number, key: string, tags: string[]): boolean {\n return lastInvalidationEpochFor(key, tags) > startEpoch;\n}\n\n/**\n * The highest epoch at which the key or any of the tags was invalidated\n * (0 if never). Used to scope the singleflight key: callers arriving after\n * an invalidation must not coalesce onto a flight that started before it —\n * they would receive the pre-invalidation result the invalidation was\n * issued to discard.\n */\nexport function lastInvalidationEpochFor(key: string, tags: string[]): number {\n let last = invalidatedEpochFloor;\n const keyEpoch = lastInvalidated.get(`key:${key}`);\n if (keyEpoch !== undefined && keyEpoch > last) last = keyEpoch;\n for (const tag of tags) {\n const tagEpoch = lastInvalidated.get(`tag:${tag}`);\n if (tagEpoch !== undefined && tagEpoch > last) last = tagEpoch;\n }\n return last;\n}\n","/**\n * Dev-mode store for cache.component output (TIM-1588, design/44 §Dev Mode).\n *\n * In production a `prerender` entry is captured at build time and frozen\n * until the next deploy. Dev has no build step, so this in-memory store\n * stands in for the build artifact: a prerender-tier render is captured on\n * its first request (under the synthetic build store, so request-context\n * reads fail exactly as `pnpm build` would) and served from here after\n * that. Runtime-tier entries (`ttl`/`tags`) keep using the cache-handler\n * overlay; in dev their keys carry this store's namespace (`overlayKey`).\n *\n * Every dev-server watcher event clears the store. The dev-server plugin\n * sends `PREBUILT_DEV_CLEAR_EVENT` to the RSC environment and the RSC entry\n * calls `clearDevPrebuiltStore()` (plugins/dev-store-clear.ts, TIM-1599).\n * A save of a file the RSC module graph knows is scoped: the event names\n * the components declared in the saved module and its transitive\n * importers, which are the only call sites whose code could have changed.\n * Any other event (a file read with `fs`, an add or a delete) names none,\n * and clears everything — the module graph never says who reads a file\n * with `fs`. A clear\n * does three things:\n *\n * 1. drops the seeds of the named components and every ISR seed (every\n * seed, unscoped);\n * 2. bumps the generation, which namespaces dev overlay keys and\n * `cache.data` keys, so EVERY runtime-tier and data entry stored\n * before the save becomes unreachable, scoped or not. Those tiers are\n * cheap to refill, and a data function's ID comes from its call site,\n * so a scoped answer for them would need a dependency walk of its own;\n * 3. records an invalidation of the named components (of everything,\n * unscoped), so a capture of one already in flight — which may have\n * loaded the pre-save code — is not stored, and a request arriving\n * after the save does not join that flight (the TIM-1028 guard every\n * capture path already runs). Captures of the other components are\n * untouched.\n *\n * Inactive outside dev: production never enables it. Dev enables it only\n * when HMR is on — with `server.hmr: false` Vite delivers no watcher events\n * to plugins and nothing would clear the store, so dev bypasses caching\n * entirely instead (`DevPrebuiltStoreMode`).\n */\n\nimport { getCacheHandler } from '../../cache/handler-store.ts';\nimport { recordInvalidation, recordInvalidationOfAll } from '../../cache/invalidation-epoch.ts';\n\n/** Custom HMR event the dev-server plugin sends to the RSC environment. */\nexport const PREBUILT_DEV_CLEAR_EVENT = 'timber:prebuilt-dev-clear';\n\n/**\n * The `PREBUILT_DEV_CLEAR_EVENT` payload: the components whose seeds to\n * drop. Absent means every component.\n */\nexport interface DevStoreClear {\n componentIds?: string[];\n}\n\n/** One captured prerender-tier entry — the dev counterpart of a `.flight` seed. */\nexport interface DevSeed {\n bytes: Uint8Array;\n /** Resolved tags, so `revalidateTag` can drop an ISR seed. */\n tags: string[];\n /** Capture time; stands in for the manifest's buildTimestamp. */\n capturedAt: number;\n /**\n * The component also has a runtime lifetime (`ttl`/`tags`, ISR): its\n * newer renders live in the overlay, which every clear moves on from.\n */\n isr: boolean;\n}\n\n/**\n * - `off`: production (and the default). Wrappers use the build artifact and\n * the overlay.\n * - `active`: dev with HMR. The dev store stands in for the build artifact.\n * - `bypass`: dev without HMR (`server.hmr: false`). No watcher event would\n * ever reach the store, so nothing is cached at all: every wrapper renders\n * live, runtime-tier ones included (the overlay would otherwise hold\n * entries a save never clears).\n */\nexport type DevPrebuiltStoreMode = 'off' | 'active' | 'bypass';\n\nlet mode: DevPrebuiltStoreMode = 'off';\nlet generation = 0;\n/** Components already announced by the one-time dev log. */\nconst loggedIds = new Set<string>();\n/** Component ID → cache key → seed. */\nconst seeds = new Map<string, Map<string, DevSeed>>();\n\n/**\n * Distinguishes this process's overlay keys from a previous dev session's,\n * in case the configured cache handler outlives the process (Redis in dev).\n * Created on first use, never at module load: production imports this\n * module too, and Workers reject random-value generation in global scope.\n * Global `crypto`, not node:crypto, because dev may run the RSC environment\n * in workerd.\n */\nlet processToken: string | null = null;\n\n/**\n * Set by the RSC entry in dev (and by tests). A change of mode starts the\n * store empty. Setting the same mode again keeps it: the RSC entry\n * self-accepts, so it re-runs whenever anything it imports changes (with\n * Tailwind, every source save reaches it through the CSS), and the save\n * has already cleared what it could have changed.\n */\nexport function setDevPrebuiltStoreMode(next: DevPrebuiltStoreMode): void {\n if (next === mode) return;\n mode = next;\n seeds.clear();\n}\n\nexport function isDevPrebuiltStoreActive(): boolean {\n return mode === 'active';\n}\n\n/** Dev without HMR: every cache.component wrapper renders live. */\nexport function isDevPrebuiltCacheBypassed(): boolean {\n return mode === 'bypass';\n}\n\n/**\n * Namespace for overlay keys while the dev store is active, in place of the\n * deployment ID (which is null in dev). Changes on every clear. Null when\n * inactive.\n */\nexport function devOverlayNamespace(): string | null {\n if (mode !== 'active') return null;\n processToken ??= crypto.randomUUID().slice(0, 8);\n return `dev-${processToken}-${generation}`;\n}\n\n/**\n * The key a `cache.data` entry is stored under: the logical key, prefixed in\n * dev with the namespace above. So a save makes every data entry stored\n * before it unreachable, whatever the handler. A data function's ID comes\n * from its call site, so editing a helper it calls, or a file it reads,\n * would otherwise keep serving the old result to every component captured\n * after the save. Invalidation epochs and singleflight stay on the logical\n * key; only the handler sees the prefix.\n */\nexport function devDataCacheKey(key: string): string {\n const namespace = devOverlayNamespace();\n return namespace === null ? key : `${namespace}\\u0000${key}`;\n}\n\nexport function getDevSeed(componentId: string, cacheKey: string): DevSeed | undefined {\n return seeds.get(componentId)?.get(cacheKey);\n}\n\n/**\n * Store a captured seed, announcing the component's first one. The caller\n * has already checked that no clear (or tag invalidation) happened while it\n * was capturing.\n */\nexport function setDevSeed(componentId: string, cacheKey: string, seed: DevSeed): void {\n let entries = seeds.get(componentId);\n if (!entries) seeds.set(componentId, (entries = new Map()));\n entries.set(cacheKey, seed);\n if (!loggedIds.has(componentId)) {\n loggedIds.add(componentId);\n console.log(\n `[timber] cache.component \"${componentId}\": prerendered in dev — served from memory until ` +\n `a file it depends on changes. A hard reload (Cache-Control: no-cache) renders it again.`\n );\n }\n}\n\n/**\n * An invalidation-epoch tag for one component (it never reaches a cache\n * handler; the NUL keeps it apart from user tags), recorded when a scoped\n * clear drops the component. Dev captures add it\n * to their invalidation checks, so a scoped clear reaches a capture of the\n * component that is in flight, including its first, which has no seed yet.\n */\nexport function devComponentTag(componentId: string): string {\n return `\\u0000timber-dev-component:${componentId}`;\n}\n\n/**\n * A source change: drop the seeds of `componentIds`, or of every component\n * when absent. Every clear bumps the generation (see the header).\n */\nexport function clearDevPrebuiltStore(componentIds?: Iterable<string>): void {\n generation++;\n if (componentIds === undefined) {\n seeds.clear();\n recordInvalidationOfAll();\n return;\n }\n for (const id of componentIds) {\n recordInvalidation({ tag: devComponentTag(id) });\n seeds.delete(id);\n }\n // An ISR seed is the base its overlay entries refresh. Kept while they\n // become unreachable, it would serve a render older than the last one.\n for (const entries of seeds.values()) {\n for (const [cacheKey, seed] of entries) {\n if (seed.isr) entries.delete(cacheKey);\n }\n }\n}\n\n/**\n * The invalidation-epoch key dev captures of one entry check. Unlike the\n * overlay key it carries no generation, like the seed it guards: a capture\n * that a scoped clear kept in flight started under an older generation,\n * and must still see a hard reload that comes after the clear.\n */\nexport function devEntryKey(componentId: string, cacheKey: string): string {\n return `\\u0000timber-dev-entry:${componentId}:${cacheKey}`;\n}\n\n/**\n * A hard reload: discard one entry — its seed and its overlay record — so\n * the request renders it again. Recorded as an invalidation of both its\n * keys first, so a capture of it already in flight (which may have read the\n * old external data) neither stores nor is joined by this request.\n */\nexport async function discardDevEntry(\n componentId: string,\n cacheKey: string,\n overlayKey: string\n): Promise<void> {\n recordInvalidation({ key: devEntryKey(componentId, cacheKey) });\n recordInvalidation({ key: overlayKey });\n seeds.get(componentId)?.delete(cacheKey);\n await getCacheHandler().invalidate({ key: overlayKey });\n}\n\n/**\n * `revalidateTag` in dev: drop the seeds carrying the tag. This is the dev\n * counterpart of writing a tombstone over a build seed (design/45 §ISR\n * mechanics) — the next request misses and captures again.\n */\nexport function invalidateDevSeedsByTag(tag: string): void {\n for (const entries of seeds.values()) {\n for (const [cacheKey, seed] of entries) {\n if (seed.tags.includes(tag)) entries.delete(cacheKey);\n }\n }\n}\n\n/**\n * Whether the request asks to skip caches — a browser hard reload, or any\n * request while DevTools \"Disable cache\" is on, sends `Cache-Control:\n * no-cache`. Dev only: the escape hatch for components that read external\n * data (a CMS, a database) while it is being edited. Production never\n * honors it — a client must not be able to force cache.component re-renders.\n */\nexport function isHardReload(headers: Headers): boolean {\n return /(?:^|,)\\s*no-cache\\s*(?:,|$)/i.test(headers.get('cache-control') ?? '');\n}\n"],"mappings":";AAgBA,IAAI,UAAmC;AAEvC,IAAI,uBAAuB;;AAS3B,SAAgB,gBAAgB,GAA2B;CACzD,UAAU;CACV,uBAAuB;AAGzB;;AAgCA,SAAgB,2BAAoC;CAClD,OAAO;AACT;;;;;AAMA,SAAgB,kBAAoC;CAClD,IAAI,CAAC,SAGH,UAAU,qBAAqB;CAEjC,OAAO;AACT;AAEA,SAAS,uBAAyC;CAChD,MAAM,wBAAQ,IAAI,IAAmE;CACrF,MAAM,aAAa;CAEnB,OAAO;EACL,MAAM,IAAI,KAAK;GACb,MAAM,QAAQ,MAAM,IAAI,GAAG;GAC3B,IAAI,CAAC,OAAO,OAAO;GACnB,MAAM,OAAO,GAAG;GAChB,MAAM,IAAI,KAAK,KAAK;GACpB,MAAM,QAAQ,KAAK,IAAI,IAAI,MAAM;GACjC,OAAO;IAAE,OAAO,MAAM;IAAO;GAAM;EACrC;EACA,MAAM,IAAI,KAAK,OAAO,MAAM;GAC1B,IAAI,MAAM,IAAI,GAAG,GAAG,MAAM,OAAO,GAAG;GACpC,OAAO,MAAM,QAAQ,YAAY;IAC/B,MAAM,SAAS,MAAM,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,WAAW,KAAA,GAAW,MAAM,OAAO,MAAM;SACxC;GACP;GACA,MAAM,IAAI,KAAK;IAAE;I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AiB,KAAA,GAAW;EAC9B,MAAM,MAAM;EACZ,wBAAwB;EACxB;CACF;CACA,KAAK,MAAM,MAAM,cAAc;EAC7B,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,EAAE,CAAC;EAC/C,MAAM,OAAO,EAAE;CACjB;CAGA,KAAK,MAAM,WAAW,MAAM,OAAO,GACjC,KAAK,MAAM,CAAC,UAAU,SAAS,SAC7B,IAAI,KAAK,KAAK,QAAQ,OAAO,QAAQ;AAG3C;;;;;;;AAQA,SAAgB,YAAY,aAAqB,UAA0B;CACzE,OAAO,0BAA0B,YAAY,GAAG;AAClD;;;;;;;AAQA,eAAsB,gBACpB,aACA,UACA,YACe;CACf,mBAAmB,EAAE,KAAK,YAAY,aAAa,QAAQ,EAAE,CAAC;CAC9D,mBAAmB,EAAE,KAAK,WAAW,CAAC;CACtC,MAAM,IAAI,WAAW,CAAC,EAAE,OAAO,QAAQ;CACvC,MAAM,gBAAgB,CAAC,CAAC,WAAW,EAAE,KAAK,WAAW,CAAC;AACxD;;;;;;AAOA,SAAgB,wBAAwB,KAAmB;CACzD,KAAK,MAAM,WAAW,MAAM,OAAO,GACjC,KAAK,MAAM,CAAC,UAAU,SAAS,SAC7B,IAAI,KAAK,KAAK,SAAS,GAAG,GAAG,QAAQ,OAAO,QAAQ;AAG1D;;;;;;;;AASA,SAAgB,aAAa,SAA2B;CACtD,OAAO,gCAAgC,KAAK,QAAQ,IAAI,eAAe,KAAK,EAAE;AAChF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/cookies/validation.ts
|
|
2
2
|
/**
|
|
3
3
|
* Cookie name and value validation per RFC 6265 §4.1.1.
|
|
4
4
|
*
|
|
@@ -107,8 +107,7 @@ function assertValidCookieValue(name, value) {
|
|
|
107
107
|
const end = wrapped ? value.length - 1 : value.length;
|
|
108
108
|
for (let i = start; i < end; i++) if (!isCookieOctet(value.charCodeAt(i))) throw new Error(`[timber] cookie ${JSON.stringify(name)}: invalid cookie value — disallowed character ${describeChar(value, i)} at index ${i}. Cookie values must contain only RFC 6265 §4.1.1 cookie-octet bytes (US-ASCII printable, excluding whitespace, \`"\`, \`,\`, \`;\`, and \`\\\`), optionally enclosed in a single DQUOTE pair. Encode the value (e.g. encodeURIComponent or jsonCookieCodec) before storing it.`);
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
//#region ../../node_modules/.pnpm/cookie@2.0.1/node_modules/cookie/dist/index.js
|
|
110
|
+
// ../../node_modules/.pnpm/cookie@2.0.1/node_modules/cookie/dist/index.js
|
|
112
111
|
/**
|
|
113
112
|
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
114
113
|
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
|
|
@@ -380,7 +379,6 @@ function decode(str) {
|
|
|
380
379
|
function defaultEncode(str) {
|
|
381
380
|
return cookieOctetRegExp.test(str) ? str : encodeURIComponent(str);
|
|
382
381
|
}
|
|
383
|
-
//#endregion
|
|
384
382
|
export { assertValidCookieOptions as a, assertValidCookieName as i, parseSetCookie as n, assertValidCookieValue as o, stringifySetCookie as r, parseCookie as t };
|
|
385
383
|
|
|
386
|
-
//# sourceMappingURL=dist-
|
|
384
|
+
//# sourceMappingURL=dist-C1Rjlo6s.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dist-DtrJyBbw.js","names":[],"sources":["../../src/cookies/validation.ts","../../../../node_modules/.pnpm/cookie@2.0.1/node_modules/cookie/dist/index.js"],"sourcesContent":["/**\n * Cookie name and value validation per RFC 6265 §4.1.1.\n *\n * This module is pure — no server or client imports — so it can be loaded\n * by both `server/request-context.ts` (which guards `getCookies().set()`)\n * and `client/use-cookie.ts` (which guards `useCookie()`'s setter). The\n * shared validator gives both sides identical encoding contracts:\n * **the framework never silently encodes — callers emit `cookie-octet`\n * bytes or get a developer-facing error.**\n *\n * Why this matters: see ONGOING_SECURITY.md H-3 (TIM-868) and\n * design/29-cookies.md §\"Cookie Name and Value Validation\".\n */\n\n// ─── RFC 6265 cookie-octet ────────────────────────────────────────────────\n//\n// cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n//\n// Equivalently: US-ASCII printable bytes excluding whitespace, `\"` (0x22),\n// `,` (0x2C), `;` (0x3B), `\\` (0x5C), and DEL (0x7F).\n\n/**\n * RFC 7230 §3.2.6 token characters used as the cookie-name production in\n * RFC 6265 §4.1.1. Anchored, non-empty match.\n *\n * Allowed: US-ASCII letters, digits, and `!#$%&'*+-.^_` `` ` `` `|~`.\n * Disallowed: whitespace, controls, delimiters\n * (`(` `)` `<` `>` `@` `,` `;` `:` `\\` `\"` `/` `[` `]` `?` `=` `{` `}`).\n */\nconst COOKIE_NAME_RE = /^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$/;\n\n/**\n * Format a single byte for a clear error message — escape control bytes\n * and non-ASCII as `0x..` and quote printables.\n */\nfunction describeChar(value: string, index: number): string {\n const code = value.charCodeAt(index);\n if (code < 0x20 || code === 0x7f || code > 0x7e) {\n return `0x${code.toString(16).padStart(2, '0')}`;\n }\n return JSON.stringify(value[index]);\n}\n\n/**\n * Validate a cookie name against RFC 6265 §4.1.1 / RFC 7230 token rules.\n * Throws a developer-facing error naming the offending byte and its index.\n */\nexport function assertValidCookieName(name: string): void {\n if (typeof name !== 'string' || name.length === 0) {\n throw new Error('[timber] cookie name must be a non-empty string.');\n }\n if (!COOKIE_NAME_RE.test(name)) {\n for (let i = 0; i < name.length; i++) {\n if (!COOKIE_NAME_RE.test(name[i])) {\n throw new Error(\n `[timber] invalid cookie name ${JSON.stringify(name)} — ` +\n `disallowed character ${describeChar(name, i)} at index ${i}. ` +\n `Cookie names must match the RFC 6265 §4.1.1 token grammar (US-ASCII letters, digits, ` +\n `and \\`!#$%&'*+-.^_\\`|~\\`; no whitespace, controls, or delimiters).`\n );\n }\n }\n throw new Error(\n `[timber] invalid cookie name ${JSON.stringify(name)} — ` +\n `must match RFC 6265 §4.1.1 token grammar.`\n );\n }\n}\n\n/** Single-byte test for RFC 6265 §4.1.1 cookie-octet. */\nfunction isCookieOctet(code: number): boolean {\n return (\n code === 0x21 ||\n (code >= 0x23 && code <= 0x2b) ||\n (code >= 0x2d && code <= 0x3a) ||\n (code >= 0x3c && code <= 0x5b) ||\n (code >= 0x5d && code <= 0x7e)\n );\n}\n\n/**\n * Validate a cookie value against the RFC 6265 §4.1.1 `cookie-value`\n * production:\n *\n * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n *\n * Both the bare `*cookie-octet` form and the DQUOTE-wrapped form are\n * valid. The wrapped form is common in upstream `Set-Cookie` headers\n * (e.g. `sid=\"abc\"; Path=/`) and must be forwardable through\n * `setFromHeaders` verbatim — stripping or rejecting the surrounding\n * quotes would corrupt the on-the-wire bytes and break value semantics\n * for the upstream service.\n *\n * Excluded bytes (in either form): CTL, whitespace (CR/LF/TAB/SP),\n * interior DQUOTE, comma, semicolon, backslash, DEL, and anything\n * non-ASCII. The smuggling primitive (`;`) is rejected regardless of\n * wrapping.\n *\n * Throws a developer-facing error naming the offending byte and its\n * index. Callers passing user-controlled data through the default\n * `set()` path don't need to call this — `set()` auto-encodes via\n * `encodeURIComponent`, whose output is always valid cookie-octet.\n * This validator is for the `{ raw: true }` opt-out and for\n * `setFromHeaders` forwarding.\n */\n// ─── Cookie attribute validation ──────────────────────────────────────────\n\n/**\n * Characters that must not appear in path or domain cookie attributes.\n * Semicolons delimit cookie attributes on the wire, so allowing `;` in\n * path or domain would inject extra attributes. CR/LF enable HTTP header\n * injection.\n */\nconst ATTR_INJECTION_RE = /[;\\r\\n]/;\n\nconst VALID_SAME_SITE = new Set(['strict', 'lax', 'none']);\n\n/**\n * Validate cookie option attributes at runtime to prevent Set-Cookie\n * header injection through unsanitized option values.\n *\n * TypeScript types enforce correct shapes at compile time, but at runtime\n * (e.g. from untyped libraries or user-controlled config) invalid values\n * could inject additional Set-Cookie attributes.\n */\nexport function assertValidCookieOptions(options: {\n sameSite?: string;\n path?: string;\n domain?: string;\n maxAge?: number;\n}): void {\n if (options.sameSite !== undefined) {\n const lower = options.sameSite.toLowerCase();\n if (!VALID_SAME_SITE.has(lower)) {\n throw new Error(\n `[timber] invalid cookie sameSite value ${JSON.stringify(options.sameSite)} — ` +\n `must be 'strict', 'lax', or 'none'.`\n );\n }\n }\n if (options.path !== undefined && ATTR_INJECTION_RE.test(options.path)) {\n throw new Error(\n `[timber] invalid cookie path ${JSON.stringify(options.path)} — ` +\n `path must not contain ';', CR, or LF (Set-Cookie header injection).`\n );\n }\n if (options.domain !== undefined && ATTR_INJECTION_RE.test(options.domain)) {\n throw new Error(\n `[timber] invalid cookie domain ${JSON.stringify(options.domain)} — ` +\n `domain must not contain ';', CR, or LF (Set-Cookie header injection).`\n );\n }\n if (\n options.maxAge !== undefined &&\n (typeof options.maxAge !== 'number' || !Number.isFinite(options.maxAge))\n ) {\n throw new Error(\n `[timber] invalid cookie maxAge ${JSON.stringify(options.maxAge)} — ` +\n `maxAge must be a finite number.`\n );\n }\n}\n\nexport function assertValidCookieValue(name: string, value: string): void {\n if (typeof value !== 'string') {\n throw new Error(`[timber] cookie ${JSON.stringify(name)}: cookie value must be a string.`);\n }\n // Detect the DQUOTE-wrapped form: at least two characters and both\n // endpoints are `\"`. The interior must be pure cookie-octet (no\n // interior DQUOTEs allowed — the grammar says *cookie-octet, and\n // cookie-octet excludes 0x22).\n const wrapped =\n value.length >= 2 &&\n value.charCodeAt(0) === 0x22 &&\n value.charCodeAt(value.length - 1) === 0x22;\n const start = wrapped ? 1 : 0;\n const end = wrapped ? value.length - 1 : value.length;\n for (let i = start; i < end; i++) {\n const code = value.charCodeAt(i);\n if (!isCookieOctet(code)) {\n throw new Error(\n `[timber] cookie ${JSON.stringify(name)}: invalid cookie value — ` +\n `disallowed character ${describeChar(value, i)} at index ${i}. ` +\n `Cookie values must contain only RFC 6265 §4.1.1 cookie-octet bytes ` +\n `(US-ASCII printable, excluding whitespace, \\`\"\\`, \\`,\\`, \\`;\\`, and \\`\\\\\\`), ` +\n `optionally enclosed in a single DQUOTE pair. ` +\n `Encode the value (e.g. encodeURIComponent or jsonCookieCodec) before storing it.`\n );\n }\n }\n}\n","/**\n * RegExp to match cookie-name in RFC 6265 sec 4.1.1\n * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2\n * which has been replaced by the token definition in RFC 7230 appendix B.\n *\n * cookie-name = token\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" /\n * \"*\" / \"+\" / \"-\" / \".\" / \"^\" / \"_\" /\n * \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\n *\n * Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191\n * Allow same range as cookie value, except `=`, which delimits end of name.\n */\nconst cookieNameRegExp = /^[\\u0021-\\u003A\\u003C\\u003E-\\u007E]+$/;\n/**\n * RegExp to match cookie-value in RFC 6265 sec 4.1.1\n *\n * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n * ; US-ASCII characters excluding CTLs,\n * ; whitespace DQUOTE, comma, semicolon,\n * ; and backslash\n *\n * Allowing more characters: https://github.com/jshttp/cookie/issues/191\n * Comma, backslash, and DQUOTE are not part of the parsing algorithm.\n */\nconst cookieValueRegExp = /^[\\u0021-\\u003A\\u003C-\\u007E]*$/;\n/**\n * RegExp to match domain-value in RFC 6265 sec 4.1.1\n *\n * domain-value = <subdomain>\n * ; defined in [RFC1034], Section 3.5, as\n * ; enhanced by [RFC1123], Section 2.1\n * <subdomain> = <label> | <subdomain> \".\" <label>\n * <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]\n * Labels must be 63 characters or less.\n * 'let-dig' not 'letter' in the first char, per RFC1123\n * <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>\n * <let-dig-hyp> = <let-dig> | \"-\"\n * <let-dig> = <letter> | <digit>\n * <letter> = any one of the 52 alphabetic characters A through Z in\n * upper case and a through z in lower case\n * <digit> = any one of the ten digits 0 through 9\n *\n * Keep support for leading dot: https://github.com/jshttp/cookie/issues/173\n *\n * > (Note that a leading %x2E (\".\"), if present, is ignored even though that\n * character is not permitted, but a trailing %x2E (\".\"), if present, will\n * cause the user agent to ignore the attribute.)\n */\nconst domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;\n/**\n * RegExp to match path-value in RFC 6265 sec 4.1.1\n *\n * path-value = <any CHAR except CTLs or \";\">\n * CHAR = %x01-7F\n * ; defined in RFC 5234 appendix B.1\n */\nconst pathValueRegExp = /^[\\u0020-\\u003A\\u003D-\\u007E]*$/;\n/**\n * RegExp to match max-age-value in RFC 6265 sec 5.6.2\n */\nconst maxAgeRegExp = /^-?\\d+$/;\n/**\n * RegExp to match RFC 6265 cookie-octet values (without % to preserve roundtrip) that need no URL encoding.\n */\nconst cookieOctetRegExp = /^[!#$&'()*+\\-.\\/0-9:<=>?@A-Z[\\]\\^_`a-z{|}~]*$/;\nconst NullObject = /* @__PURE__ */ (() => {\n const C = function () { };\n C.prototype = Object.create(null);\n return C;\n})();\n/**\n * Parse a `Cookie` header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function parseCookie(str, options) {\n const obj = new NullObject();\n const len = str.length;\n // RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.\n if (len < 2)\n return obj;\n const dec = options?.decode || decode;\n let index = 0;\n do {\n const eqIdx = eqIndex(str, index, len);\n if (eqIdx === len)\n break; // No more cookie pairs.\n const endIdx = endIndex(str, index, len);\n if (eqIdx > endIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n const key = valueSlice(str, index, eqIdx);\n // only assign once\n if (obj[key] === undefined) {\n obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));\n }\n index = endIdx + 1;\n } while (index < len);\n return obj;\n}\n/**\n * Stringifies an object into an HTTP `Cookie` header.\n */\nexport function stringifyCookie(cookie, options) {\n const enc = options?.encode || defaultEncode;\n const keys = Object.keys(cookie);\n let str = \"\";\n for (let i = 0; i < keys.length; i++) {\n const name = keys[i];\n const val = cookie[name];\n if (val === undefined)\n continue;\n if (!cookieNameRegExp.test(name)) {\n throw new TypeError(`cookie name is invalid: ${name}`);\n }\n const value = enc(val);\n if (!cookieValueRegExp.test(value)) {\n throw new TypeError(`cookie val is invalid: ${val}`);\n }\n if (str)\n str += \"; \";\n str += name + \"=\" + value;\n }\n return str;\n}\n/**\n * Serialize data into a cookie header.\n *\n * Serialize a name value pair into a cookie string suitable for\n * http headers. An optional options object specifies cookie parameters.\n *\n * stringifySetCookie({ name: 'foo', value: 'bar', httpOnly: true })\n * => \"foo=bar; HttpOnly\"\n */\nexport function stringifySetCookie(cookie, options) {\n const enc = options?.encode || defaultEncode;\n if (!cookieNameRegExp.test(cookie.name)) {\n throw new TypeError(`argument name is invalid: ${cookie.name}`);\n }\n const value = cookie.value == null ? \"\" : enc(cookie.value);\n if (!cookieValueRegExp.test(value)) {\n throw new TypeError(`argument val is invalid: ${cookie.value}`);\n }\n let str = cookie.name + \"=\" + value;\n if (cookie.maxAge !== undefined) {\n if (!Number.isInteger(cookie.maxAge)) {\n throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);\n }\n str += \"; Max-Age=\" + cookie.maxAge;\n }\n if (cookie.domain) {\n if (!domainValueRegExp.test(cookie.domain)) {\n throw new TypeError(`option domain is invalid: ${cookie.domain}`);\n }\n str += \"; Domain=\" + cookie.domain;\n }\n if (cookie.path) {\n if (!pathValueRegExp.test(cookie.path)) {\n throw new TypeError(`option path is invalid: ${cookie.path}`);\n }\n str += \"; Path=\" + cookie.path;\n }\n if (cookie.expires) {\n if (!Number.isFinite(cookie.expires.valueOf())) {\n throw new TypeError(`option expires is invalid: ${cookie.expires}`);\n }\n str += \"; Expires=\" + cookie.expires.toUTCString();\n }\n if (cookie.httpOnly) {\n str += \"; HttpOnly\";\n }\n if (cookie.secure) {\n str += \"; Secure\";\n }\n if (cookie.partitioned) {\n str += \"; Partitioned\";\n }\n if (cookie.priority) {\n const priority = typeof cookie.priority === \"string\"\n ? cookie.priority.toLowerCase()\n : undefined;\n switch (priority) {\n case \"low\":\n str += \"; Priority=Low\";\n break;\n case \"medium\":\n str += \"; Priority=Medium\";\n break;\n case \"high\":\n str += \"; Priority=High\";\n break;\n default:\n throw new TypeError(`option priority is invalid: ${cookie.priority}`);\n }\n }\n if (cookie.sameSite) {\n const sameSite = typeof cookie.sameSite === \"string\"\n ? cookie.sameSite.toLowerCase()\n : cookie.sameSite;\n switch (sameSite) {\n case true:\n case \"strict\":\n str += \"; SameSite=Strict\";\n break;\n case \"lax\":\n str += \"; SameSite=Lax\";\n break;\n case \"none\":\n str += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);\n }\n }\n return str;\n}\n/**\n * Deserialize a `Set-Cookie` header into an object.\n *\n * parseSetCookie('foo=bar; HttpOnly')\n * => { name: 'foo', value: 'bar', httpOnly: true }\n */\nexport function parseSetCookie(str, options) {\n const dec = options?.decode || decode;\n const len = str.length;\n const endIdx = endIndex(str, 0, len);\n let eqIdx = eqIndex(str, 0, len);\n const setCookie = eqIdx < endIdx\n ? {\n name: valueSlice(str, 0, eqIdx),\n value: dec(valueSlice(str, eqIdx + 1, endIdx)),\n }\n : { name: \"\", value: dec(valueSlice(str, 0, endIdx)) };\n let index = endIdx + 1;\n while (index < len) {\n const endIdx = endIndex(str, index, len);\n if (eqIdx < index)\n eqIdx = eqIndex(str, index, len);\n const attr = eqIdx < endIdx\n ? valueSlice(str, index, eqIdx)\n : valueSlice(str, index, endIdx);\n const val = eqIdx < endIdx ? valueSlice(str, eqIdx + 1, endIdx) : undefined;\n switch (attr.toLowerCase()) {\n case \"httponly\":\n setCookie.httpOnly = true;\n break;\n case \"secure\":\n setCookie.secure = true;\n break;\n case \"partitioned\":\n setCookie.partitioned = true;\n break;\n case \"domain\":\n setCookie.domain = val;\n break;\n case \"path\":\n setCookie.path = val;\n break;\n case \"max-age\":\n if (val && maxAgeRegExp.test(val))\n setCookie.maxAge = Number(val);\n break;\n case \"expires\":\n if (!val)\n break;\n const date = new Date(val);\n if (Number.isFinite(date.valueOf()))\n setCookie.expires = date;\n break;\n case \"priority\":\n if (!val)\n break;\n const priority = val.toLowerCase();\n if (priority === \"low\" ||\n priority === \"medium\" ||\n priority === \"high\") {\n setCookie.priority = priority;\n }\n break;\n case \"samesite\":\n if (!val)\n break;\n const sameSite = val.toLowerCase();\n if (sameSite === \"lax\" ||\n sameSite === \"strict\" ||\n sameSite === \"none\") {\n setCookie.sameSite = sameSite;\n }\n break;\n }\n index = endIdx + 1;\n }\n return setCookie;\n}\n/**\n * Find the next `;` character, or return `len`.\n */\nfunction endIndex(str, min, len) {\n const index = str.indexOf(\";\", min);\n return index === -1 ? len : index;\n}\n/**\n * Find the next `=` character, or return `len`.\n */\nfunction eqIndex(str, min, len) {\n const index = str.indexOf(\"=\", min);\n return index === -1 ? len : index;\n}\n/**\n * Slice out a value between startPod to max.\n */\nfunction valueSlice(str, min, max) {\n if (min === max)\n return \"\";\n let start = min;\n let end = max;\n do {\n const code = str.charCodeAt(start);\n if (code !== 32 /* */ && code !== 9 /* \\t */)\n break;\n } while (++start < end);\n while (end > start) {\n const code = str.charCodeAt(end - 1);\n if (code !== 32 /* */ && code !== 9 /* \\t */)\n break;\n end--;\n }\n return str.slice(start, end);\n}\n/**\n * URL-decode string value. Optimized to skip native call when no %.\n */\nfunction decode(str) {\n if (str.indexOf(\"%\") === -1)\n return str;\n try {\n return decodeURIComponent(str);\n }\n catch (e) {\n return str;\n }\n}\n/**\n * URL-encode string value. Optimized to skip native call for round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;;AAIA,SAAS,SAAS,KAAK,KAAK,KAAK;CAC7B,MAAM,QAAQ,IAAI,QAAQ,KAAK,GAAG;CAClC,OAAO,UAAU,KAAK,MAAM;AAChC;;;;AAIA,SAAS,QAAQ,KAAK,KAAK,KAAK;CAC5B,MAAM,QAAQ,IAAI,QAAQ,KAAK,GAAG;CAClC,OAAO,UAAU,KAAK,MAAM;AAChC;;;;AAIA,SAAS,WAAW,KAAK,KAAK,KAAK;CAC/B,IAAI,QAAQ,KACR,OAAO;CACX,IAAI,QAAQ;CACZ,IAAI,MAAM;CACV,GAAG;EACC,MAAM,OAAO,IAAI,WAAW,KAAK;EACjC,IAAI,SAAS,MAAc,SAAS,GAChC;CACR,SAAS,EAAE,QAAQ;CACnB,OAAO,MAAM,OAAO;EAChB,MAAM,OAAO,IAAI,WAAW,MAAM,CAAC;EACnC,IAAI,SAAS,MAAc,SAAS,GAChC;EACJ;CACJ;CACA,OAAO,IAAI,MAAM,OAAO,GAAG;AAC/B;;;;AAIA,SAAS,OAAO,KAAK;CACjB,IAAI,IAAI,QAAQ,GAAG,MAAM,IACrB,OAAO;CACX,IAAI;EACA,OAAO,mBAAmB,GAAG;CACjC,SACO,GAAG;EACN,OAAO;CACX;AACJ;;;;AAIA,SAAS,cAAc,KAAK;CACxB,OAAO,kBAAkB,KAAK,GAAG,IAAI,MAAM,mBAAmB,GAAG;AACrE"}
|
|
1
|
+
{"version":3,"file":"dist-C1Rjlo6s.js","names":[],"sources":["../../src/cookies/validation.ts","../../../../node_modules/.pnpm/cookie@2.0.1/node_modules/cookie/dist/index.js"],"sourcesContent":["/**\n * Cookie name and value validation per RFC 6265 §4.1.1.\n *\n * This module is pure — no server or client imports — so it can be loaded\n * by both `server/request-context.ts` (which guards `getCookies().set()`)\n * and `client/use-cookie.ts` (which guards `useCookie()`'s setter). The\n * shared validator gives both sides identical encoding contracts:\n * **the framework never silently encodes — callers emit `cookie-octet`\n * bytes or get a developer-facing error.**\n *\n * Why this matters: see ONGOING_SECURITY.md H-3 (TIM-868) and\n * design/29-cookies.md §\"Cookie Name and Value Validation\".\n */\n\n// ─── RFC 6265 cookie-octet ────────────────────────────────────────────────\n//\n// cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n//\n// Equivalently: US-ASCII printable bytes excluding whitespace, `\"` (0x22),\n// `,` (0x2C), `;` (0x3B), `\\` (0x5C), and DEL (0x7F).\n\n/**\n * RFC 7230 §3.2.6 token characters used as the cookie-name production in\n * RFC 6265 §4.1.1. Anchored, non-empty match.\n *\n * Allowed: US-ASCII letters, digits, and `!#$%&'*+-.^_` `` ` `` `|~`.\n * Disallowed: whitespace, controls, delimiters\n * (`(` `)` `<` `>` `@` `,` `;` `:` `\\` `\"` `/` `[` `]` `?` `=` `{` `}`).\n */\nconst COOKIE_NAME_RE = /^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$/;\n\n/**\n * Format a single byte for a clear error message — escape control bytes\n * and non-ASCII as `0x..` and quote printables.\n */\nfunction describeChar(value: string, index: number): string {\n const code = value.charCodeAt(index);\n if (code < 0x20 || code === 0x7f || code > 0x7e) {\n return `0x${code.toString(16).padStart(2, '0')}`;\n }\n return JSON.stringify(value[index]);\n}\n\n/**\n * Validate a cookie name against RFC 6265 §4.1.1 / RFC 7230 token rules.\n * Throws a developer-facing error naming the offending byte and its index.\n */\nexport function assertValidCookieName(name: string): void {\n if (typeof name !== 'string' || name.length === 0) {\n throw new Error('[timber] cookie name must be a non-empty string.');\n }\n if (!COOKIE_NAME_RE.test(name)) {\n for (let i = 0; i < name.length; i++) {\n if (!COOKIE_NAME_RE.test(name[i])) {\n throw new Error(\n `[timber] invalid cookie name ${JSON.stringify(name)} — ` +\n `disallowed character ${describeChar(name, i)} at index ${i}. ` +\n `Cookie names must match the RFC 6265 §4.1.1 token grammar (US-ASCII letters, digits, ` +\n `and \\`!#$%&'*+-.^_\\`|~\\`; no whitespace, controls, or delimiters).`\n );\n }\n }\n throw new Error(\n `[timber] invalid cookie name ${JSON.stringify(name)} — ` +\n `must match RFC 6265 §4.1.1 token grammar.`\n );\n }\n}\n\n/** Single-byte test for RFC 6265 §4.1.1 cookie-octet. */\nfunction isCookieOctet(code: number): boolean {\n return (\n code === 0x21 ||\n (code >= 0x23 && code <= 0x2b) ||\n (code >= 0x2d && code <= 0x3a) ||\n (code >= 0x3c && code <= 0x5b) ||\n (code >= 0x5d && code <= 0x7e)\n );\n}\n\n/**\n * Validate a cookie value against the RFC 6265 §4.1.1 `cookie-value`\n * production:\n *\n * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n *\n * Both the bare `*cookie-octet` form and the DQUOTE-wrapped form are\n * valid. The wrapped form is common in upstream `Set-Cookie` headers\n * (e.g. `sid=\"abc\"; Path=/`) and must be forwardable through\n * `setFromHeaders` verbatim — stripping or rejecting the surrounding\n * quotes would corrupt the on-the-wire bytes and break value semantics\n * for the upstream service.\n *\n * Excluded bytes (in either form): CTL, whitespace (CR/LF/TAB/SP),\n * interior DQUOTE, comma, semicolon, backslash, DEL, and anything\n * non-ASCII. The smuggling primitive (`;`) is rejected regardless of\n * wrapping.\n *\n * Throws a developer-facing error naming the offending byte and its\n * index. Callers passing user-controlled data through the default\n * `set()` path don't need to call this — `set()` auto-encodes via\n * `encodeURIComponent`, whose output is always valid cookie-octet.\n * This validator is for the `{ raw: true }` opt-out and for\n * `setFromHeaders` forwarding.\n */\n// ─── Cookie attribute validation ──────────────────────────────────────────\n\n/**\n * Characters that must not appear in path or domain cookie attributes.\n * Semicolons delimit cookie attributes on the wire, so allowing `;` in\n * path or domain would inject extra attributes. CR/LF enable HTTP header\n * injection.\n */\nconst ATTR_INJECTION_RE = /[;\\r\\n]/;\n\nconst VALID_SAME_SITE = new Set(['strict', 'lax', 'none']);\n\n/**\n * Validate cookie option attributes at runtime to prevent Set-Cookie\n * header injection through unsanitized option values.\n *\n * TypeScript types enforce correct shapes at compile time, but at runtime\n * (e.g. from untyped libraries or user-controlled config) invalid values\n * could inject additional Set-Cookie attributes.\n */\nexport function assertValidCookieOptions(options: {\n sameSite?: string;\n path?: string;\n domain?: string;\n maxAge?: number;\n}): void {\n if (options.sameSite !== undefined) {\n const lower = options.sameSite.toLowerCase();\n if (!VALID_SAME_SITE.has(lower)) {\n throw new Error(\n `[timber] invalid cookie sameSite value ${JSON.stringify(options.sameSite)} — ` +\n `must be 'strict', 'lax', or 'none'.`\n );\n }\n }\n if (options.path !== undefined && ATTR_INJECTION_RE.test(options.path)) {\n throw new Error(\n `[timber] invalid cookie path ${JSON.stringify(options.path)} — ` +\n `path must not contain ';', CR, or LF (Set-Cookie header injection).`\n );\n }\n if (options.domain !== undefined && ATTR_INJECTION_RE.test(options.domain)) {\n throw new Error(\n `[timber] invalid cookie domain ${JSON.stringify(options.domain)} — ` +\n `domain must not contain ';', CR, or LF (Set-Cookie header injection).`\n );\n }\n if (\n options.maxAge !== undefined &&\n (typeof options.maxAge !== 'number' || !Number.isFinite(options.maxAge))\n ) {\n throw new Error(\n `[timber] invalid cookie maxAge ${JSON.stringify(options.maxAge)} — ` +\n `maxAge must be a finite number.`\n );\n }\n}\n\nexport function assertValidCookieValue(name: string, value: string): void {\n if (typeof value !== 'string') {\n throw new Error(`[timber] cookie ${JSON.stringify(name)}: cookie value must be a string.`);\n }\n // Detect the DQUOTE-wrapped form: at least two characters and both\n // endpoints are `\"`. The interior must be pure cookie-octet (no\n // interior DQUOTEs allowed — the grammar says *cookie-octet, and\n // cookie-octet excludes 0x22).\n const wrapped =\n value.length >= 2 &&\n value.charCodeAt(0) === 0x22 &&\n value.charCodeAt(value.length - 1) === 0x22;\n const start = wrapped ? 1 : 0;\n const end = wrapped ? value.length - 1 : value.length;\n for (let i = start; i < end; i++) {\n const code = value.charCodeAt(i);\n if (!isCookieOctet(code)) {\n throw new Error(\n `[timber] cookie ${JSON.stringify(name)}: invalid cookie value — ` +\n `disallowed character ${describeChar(value, i)} at index ${i}. ` +\n `Cookie values must contain only RFC 6265 §4.1.1 cookie-octet bytes ` +\n `(US-ASCII printable, excluding whitespace, \\`\"\\`, \\`,\\`, \\`;\\`, and \\`\\\\\\`), ` +\n `optionally enclosed in a single DQUOTE pair. ` +\n `Encode the value (e.g. encodeURIComponent or jsonCookieCodec) before storing it.`\n );\n }\n }\n}\n","/**\n * RegExp to match cookie-name in RFC 6265 sec 4.1.1\n * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2\n * which has been replaced by the token definition in RFC 7230 appendix B.\n *\n * cookie-name = token\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" /\n * \"*\" / \"+\" / \"-\" / \".\" / \"^\" / \"_\" /\n * \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\n *\n * Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191\n * Allow same range as cookie value, except `=`, which delimits end of name.\n */\nconst cookieNameRegExp = /^[\\u0021-\\u003A\\u003C\\u003E-\\u007E]+$/;\n/**\n * RegExp to match cookie-value in RFC 6265 sec 4.1.1\n *\n * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n * ; US-ASCII characters excluding CTLs,\n * ; whitespace DQUOTE, comma, semicolon,\n * ; and backslash\n *\n * Allowing more characters: https://github.com/jshttp/cookie/issues/191\n * Comma, backslash, and DQUOTE are not part of the parsing algorithm.\n */\nconst cookieValueRegExp = /^[\\u0021-\\u003A\\u003C-\\u007E]*$/;\n/**\n * RegExp to match domain-value in RFC 6265 sec 4.1.1\n *\n * domain-value = <subdomain>\n * ; defined in [RFC1034], Section 3.5, as\n * ; enhanced by [RFC1123], Section 2.1\n * <subdomain> = <label> | <subdomain> \".\" <label>\n * <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]\n * Labels must be 63 characters or less.\n * 'let-dig' not 'letter' in the first char, per RFC1123\n * <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>\n * <let-dig-hyp> = <let-dig> | \"-\"\n * <let-dig> = <letter> | <digit>\n * <letter> = any one of the 52 alphabetic characters A through Z in\n * upper case and a through z in lower case\n * <digit> = any one of the ten digits 0 through 9\n *\n * Keep support for leading dot: https://github.com/jshttp/cookie/issues/173\n *\n * > (Note that a leading %x2E (\".\"), if present, is ignored even though that\n * character is not permitted, but a trailing %x2E (\".\"), if present, will\n * cause the user agent to ignore the attribute.)\n */\nconst domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;\n/**\n * RegExp to match path-value in RFC 6265 sec 4.1.1\n *\n * path-value = <any CHAR except CTLs or \";\">\n * CHAR = %x01-7F\n * ; defined in RFC 5234 appendix B.1\n */\nconst pathValueRegExp = /^[\\u0020-\\u003A\\u003D-\\u007E]*$/;\n/**\n * RegExp to match max-age-value in RFC 6265 sec 5.6.2\n */\nconst maxAgeRegExp = /^-?\\d+$/;\n/**\n * RegExp to match RFC 6265 cookie-octet values (without % to preserve roundtrip) that need no URL encoding.\n */\nconst cookieOctetRegExp = /^[!#$&'()*+\\-.\\/0-9:<=>?@A-Z[\\]\\^_`a-z{|}~]*$/;\nconst NullObject = /* @__PURE__ */ (() => {\n const C = function () { };\n C.prototype = Object.create(null);\n return C;\n})();\n/**\n * Parse a `Cookie` header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function parseCookie(str, options) {\n const obj = new NullObject();\n const len = str.length;\n // RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.\n if (len < 2)\n return obj;\n const dec = options?.decode || decode;\n let index = 0;\n do {\n const eqIdx = eqIndex(str, index, len);\n if (eqIdx === len)\n break; // No more cookie pairs.\n const endIdx = endIndex(str, index, len);\n if (eqIdx > endIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n const key = valueSlice(str, index, eqIdx);\n // only assign once\n if (obj[key] === undefined) {\n obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));\n }\n index = endIdx + 1;\n } while (index < len);\n return obj;\n}\n/**\n * Stringifies an object into an HTTP `Cookie` header.\n */\nexport function stringifyCookie(cookie, options) {\n const enc = options?.encode || defaultEncode;\n const keys = Object.keys(cookie);\n let str = \"\";\n for (let i = 0; i < keys.length; i++) {\n const name = keys[i];\n const val = cookie[name];\n if (val === undefined)\n continue;\n if (!cookieNameRegExp.test(name)) {\n throw new TypeError(`cookie name is invalid: ${name}`);\n }\n const value = enc(val);\n if (!cookieValueRegExp.test(value)) {\n throw new TypeError(`cookie val is invalid: ${val}`);\n }\n if (str)\n str += \"; \";\n str += name + \"=\" + value;\n }\n return str;\n}\n/**\n * Serialize data into a cookie header.\n *\n * Serialize a name value pair into a cookie string suitable for\n * http headers. An optional options object specifies cookie parameters.\n *\n * stringifySetCookie({ name: 'foo', value: 'bar', httpOnly: true })\n * => \"foo=bar; HttpOnly\"\n */\nexport function stringifySetCookie(cookie, options) {\n const enc = options?.encode || defaultEncode;\n if (!cookieNameRegExp.test(cookie.name)) {\n throw new TypeError(`argument name is invalid: ${cookie.name}`);\n }\n const value = cookie.value == null ? \"\" : enc(cookie.value);\n if (!cookieValueRegExp.test(value)) {\n throw new TypeError(`argument val is invalid: ${cookie.value}`);\n }\n let str = cookie.name + \"=\" + value;\n if (cookie.maxAge !== undefined) {\n if (!Number.isInteger(cookie.maxAge)) {\n throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);\n }\n str += \"; Max-Age=\" + cookie.maxAge;\n }\n if (cookie.domain) {\n if (!domainValueRegExp.test(cookie.domain)) {\n throw new TypeError(`option domain is invalid: ${cookie.domain}`);\n }\n str += \"; Domain=\" + cookie.domain;\n }\n if (cookie.path) {\n if (!pathValueRegExp.test(cookie.path)) {\n throw new TypeError(`option path is invalid: ${cookie.path}`);\n }\n str += \"; Path=\" + cookie.path;\n }\n if (cookie.expires) {\n if (!Number.isFinite(cookie.expires.valueOf())) {\n throw new TypeError(`option expires is invalid: ${cookie.expires}`);\n }\n str += \"; Expires=\" + cookie.expires.toUTCString();\n }\n if (cookie.httpOnly) {\n str += \"; HttpOnly\";\n }\n if (cookie.secure) {\n str += \"; Secure\";\n }\n if (cookie.partitioned) {\n str += \"; Partitioned\";\n }\n if (cookie.priority) {\n const priority = typeof cookie.priority === \"string\"\n ? cookie.priority.toLowerCase()\n : undefined;\n switch (priority) {\n case \"low\":\n str += \"; Priority=Low\";\n break;\n case \"medium\":\n str += \"; Priority=Medium\";\n break;\n case \"high\":\n str += \"; Priority=High\";\n break;\n default:\n throw new TypeError(`option priority is invalid: ${cookie.priority}`);\n }\n }\n if (cookie.sameSite) {\n const sameSite = typeof cookie.sameSite === \"string\"\n ? cookie.sameSite.toLowerCase()\n : cookie.sameSite;\n switch (sameSite) {\n case true:\n case \"strict\":\n str += \"; SameSite=Strict\";\n break;\n case \"lax\":\n str += \"; SameSite=Lax\";\n break;\n case \"none\":\n str += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);\n }\n }\n return str;\n}\n/**\n * Deserialize a `Set-Cookie` header into an object.\n *\n * parseSetCookie('foo=bar; HttpOnly')\n * => { name: 'foo', value: 'bar', httpOnly: true }\n */\nexport function parseSetCookie(str, options) {\n const dec = options?.decode || decode;\n const len = str.length;\n const endIdx = endIndex(str, 0, len);\n let eqIdx = eqIndex(str, 0, len);\n const setCookie = eqIdx < endIdx\n ? {\n name: valueSlice(str, 0, eqIdx),\n value: dec(valueSlice(str, eqIdx + 1, endIdx)),\n }\n : { name: \"\", value: dec(valueSlice(str, 0, endIdx)) };\n let index = endIdx + 1;\n while (index < len) {\n const endIdx = endIndex(str, index, len);\n if (eqIdx < index)\n eqIdx = eqIndex(str, index, len);\n const attr = eqIdx < endIdx\n ? valueSlice(str, index, eqIdx)\n : valueSlice(str, index, endIdx);\n const val = eqIdx < endIdx ? valueSlice(str, eqIdx + 1, endIdx) : undefined;\n switch (attr.toLowerCase()) {\n case \"httponly\":\n setCookie.httpOnly = true;\n break;\n case \"secure\":\n setCookie.secure = true;\n break;\n case \"partitioned\":\n setCookie.partitioned = true;\n break;\n case \"domain\":\n setCookie.domain = val;\n break;\n case \"path\":\n setCookie.path = val;\n break;\n case \"max-age\":\n if (val && maxAgeRegExp.test(val))\n setCookie.maxAge = Number(val);\n break;\n case \"expires\":\n if (!val)\n break;\n const date = new Date(val);\n if (Number.isFinite(date.valueOf()))\n setCookie.expires = date;\n break;\n case \"priority\":\n if (!val)\n break;\n const priority = val.toLowerCase();\n if (priority === \"low\" ||\n priority === \"medium\" ||\n priority === \"high\") {\n setCookie.priority = priority;\n }\n break;\n case \"samesite\":\n if (!val)\n break;\n const sameSite = val.toLowerCase();\n if (sameSite === \"lax\" ||\n sameSite === \"strict\" ||\n sameSite === \"none\") {\n setCookie.sameSite = sameSite;\n }\n break;\n }\n index = endIdx + 1;\n }\n return setCookie;\n}\n/**\n * Find the next `;` character, or return `len`.\n */\nfunction endIndex(str, min, len) {\n const index = str.indexOf(\";\", min);\n return index === -1 ? len : index;\n}\n/**\n * Find the next `=` character, or return `len`.\n */\nfunction eqIndex(str, min, len) {\n const index = str.indexOf(\"=\", min);\n return index === -1 ? len : index;\n}\n/**\n * Slice out a value between startPod to max.\n */\nfunction valueSlice(str, min, max) {\n if (min === max)\n return \"\";\n let start = min;\n let end = max;\n do {\n const code = str.charCodeAt(start);\n if (code !== 32 /* */ && code !== 9 /* \\t */)\n break;\n } while (++start < end);\n while (end > start) {\n const code = str.charCodeAt(end - 1);\n if (code !== 32 /* */ && code !== 9 /* \\t */)\n break;\n end--;\n }\n return str.slice(start, end);\n}\n/**\n * URL-decode string value. Optimized to skip native call when no %.\n */\nfunction decode(str) {\n if (str.indexOf(\"%\") === -1)\n return str;\n try {\n return decodeURIComponent(str);\n }\n catch (e) {\n return str;\n }\n}\n/**\n * URL-encode string value. Optimized to skip native call for roundtrip-safe cookie-octet values.\n */\nfunction defaultEncode(str) {\n return cookieOctetRegExp.test(str) ? str : encodeURIComponent(str);\n}\n//# sourceMappingURL=index.js.map"],"ignoreList":[1],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAM,iBAAiB;;;;;AAMvB,SAAS,aAAa,OAAe,OAAuB;CAC1D,MAAM,OAAO,MAAM,WAAW,KAAK;CACnC,IAAI,OAAO,MAAQ,SAAS,OAAQ,OAAO,KACzC,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CAE/C,OAAO,KAAK,UAAU,MAAM,MAAM;AACpC;;;;;AAMA,SAAgB,sBAAsB,MAAoB;CACxD,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,GAC9C,MAAM,IAAI,MAAM,kDAAkD;CAEpE,IAAI,CAAC,eAAe,KAAK,IAAI,GAAG;EAC9B,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAC/B,IAAI,CAAC,eAAe,KAAK,KAAK,EAAE,GAC9B,MAAM,IAAI,MACR,gCAAgC,KAAK,UAAU,IAAI,EAAE,0BAC3B,aAAa,MAAM,CAAC,EAAE,YAAY,EAAE,0JAGhE;EAGJ,MAAM,IAAI,MACR,gCAAgC,KAAK,UAAU,IAAI,EAAE,6CAEvD;CACF;AACF;;AAGA,SAAS,cAAc,MAAuB;CAC5C,OACE,SAAS,MACR,QAAQ,MAAQ,QAAQ,MACxB,QAAQ,MAAQ,QAAQ,MACxB,QAAQ,MAAQ,QAAQ,MACxB,QAAQ,MAAQ,QAAQ;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAM,oBAAoB;AAE1B,IAAM,kCAAkB,IAAI,IAAI;CAAC;CAAU;CAAO;AAAM,CAAC;;;;;;;;;AAUzD,SAAgB,yBAAyB,SAKhC;CACP,IAAI,QAAQ,aAAa,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W;EAGjC;EACA,QAAQ,SAAS;CACrB;CACA,OAAO;AACX;;;;AAIA,SAAS,SAAS,KAAK,KAAK,KAAK;CAC7B,MAAM,QAAQ,IAAI,QAAQ,KAAK,GAAG;CAClC,OAAO,UAAU,KAAK,MAAM;AAChC;;;;AAIA,SAAS,QAAQ,KAAK,KAAK,KAAK;CAC5B,MAAM,QAAQ,IAAI,QAAQ,KAAK,GAAG;CAClC,OAAO,UAAU,KAAK,MAAM;AAChC;;;;AAIA,SAAS,WAAW,KAAK,KAAK,KAAK;CAC/B,IAAI,QAAQ,KACR,OAAO;CACX,IAAI,QAAQ;CACZ,IAAI,MAAM;CACV,GAAG;EACC,MAAM,OAAO,IAAI,WAAW,KAAK;EACjC,IAAI,SAAS,MAAc,SAAS,GAChC;CACR,SAAS,EAAE,QAAQ;CACnB,OAAO,MAAM,OAAO;EAChB,MAAM,OAAO,IAAI,WAAW,MAAM,CAAC;EACnC,IAAI,SAAS,MAAc,SAAS,GAChC;EACJ;CACJ;CACA,OAAO,IAAI,MAAM,OAAO,GAAG;AAC/B;;;;AAIA,SAAS,OAAO,KAAK;CACjB,IAAI,IAAI,QAAQ,GAAG,MAAM,IACrB,OAAO;CACX,IAAI;EACA,OAAO,mBAAmB,GAAG;CACjC,SACO,GAAG;EACN,OAAO;CACX;AACJ;;;;AAIA,SAAS,cAAc,KAAK;CACxB,OAAO,kBAAkB,KAAK,GAAG,IAAI,MAAM,mBAAmB,GAAG;AACrE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { n as isRscContentType, t as RSC_CONTENT_TYPE } from "./rsc-media-type-
|
|
2
|
-
import { i as withBasePath, r as stripBasePath } from "./base-path-
|
|
3
|
-
import { n as rscPayloadPath } from "./rsc-payload-path-
|
|
4
|
-
import { a as randomRscCacheKey, n as RSC_KEY_PARAM, o as recordLookup, s as rscCacheKey } from "./rsc-cache-key-
|
|
5
|
-
import { t as StatusPageMarker } from "./status-page-marker-
|
|
6
|
-
import { o as _setUnloading, p as unloading } from "./state-
|
|
7
|
-
import { i as getRouterOrNull, t as setHardNavigating } from "./navigation-root-
|
|
1
|
+
import { n as isRscContentType, t as RSC_CONTENT_TYPE } from "./rsc-media-type-m8jz9u6_.js";
|
|
2
|
+
import { i as withBasePath, r as stripBasePath } from "./base-path-DDIx0FXe.js";
|
|
3
|
+
import { n as rscPayloadPath } from "./rsc-payload-path-EphpDB-J.js";
|
|
4
|
+
import { a as randomRscCacheKey, n as RSC_KEY_PARAM, o as recordLookup, s as rscCacheKey } from "./rsc-cache-key-D0cb0Gmc.js";
|
|
5
|
+
import { t as StatusPageMarker } from "./status-page-marker-XIQXlTOb.js";
|
|
6
|
+
import { o as _setUnloading, p as unloading } from "./state-B-EBjeER.js";
|
|
7
|
+
import { i as getRouterOrNull, t as setHardNavigating } from "./navigation-root-M3B2ZrdO.js";
|
|
8
8
|
import { Component, createContext, createElement } from "react";
|
|
9
|
-
|
|
9
|
+
// src/shared/payload-root.ts
|
|
10
10
|
/**
|
|
11
11
|
* What a reader gets when the value it was handed is not a payload root.
|
|
12
12
|
*
|
|
@@ -69,8 +69,7 @@ function splitPayloadRoot(root) {
|
|
|
69
69
|
params: Promise.resolve(settled).then(readPublishedParams, () => NO_PUBLISHED_PARAMS)
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
//#region src/client/rsc-fetch.ts
|
|
72
|
+
// src/client/rsc-fetch.ts
|
|
74
73
|
/**
|
|
75
74
|
* RSC Fetch — handles fetching and parsing RSC Flight payloads.
|
|
76
75
|
*
|
|
@@ -451,8 +450,7 @@ async function fetchRscPayload(url, deps, stateTree, currentUrl, signal) {
|
|
|
451
450
|
skippedSegments
|
|
452
451
|
};
|
|
453
452
|
}
|
|
454
|
-
|
|
455
|
-
//#region src/client/unload-guard.ts
|
|
453
|
+
// src/client/unload-guard.ts
|
|
456
454
|
/**
|
|
457
455
|
* Page unload detection — suppresses spurious errors during page refresh/navigation.
|
|
458
456
|
*
|
|
@@ -504,8 +502,7 @@ if (typeof window !== "undefined") {
|
|
|
504
502
|
function isPageUnloading() {
|
|
505
503
|
return unloading;
|
|
506
504
|
}
|
|
507
|
-
|
|
508
|
-
//#region src/client/stale-client.ts
|
|
505
|
+
// src/client/stale-client.ts
|
|
509
506
|
/**
|
|
510
507
|
* Stale Client — knowing when this bundle has been superseded.
|
|
511
508
|
*
|
|
@@ -624,8 +621,7 @@ function markStaleFromError(error) {
|
|
|
624
621
|
stale = true;
|
|
625
622
|
return true;
|
|
626
623
|
}
|
|
627
|
-
|
|
628
|
-
//#region src/client/navigation-transition.ts
|
|
624
|
+
// src/client/navigation-transition.ts
|
|
629
625
|
/** The outcome of a render that ended without committing. */
|
|
630
626
|
function abandonedOutcome(owner) {
|
|
631
627
|
return owner.outcome === "superseded" ? "superseded" : "failed";
|
|
@@ -653,8 +649,7 @@ function createRenderOwner(kind) {
|
|
|
653
649
|
};
|
|
654
650
|
return owner;
|
|
655
651
|
}
|
|
656
|
-
|
|
657
|
-
//#region src/client/router-skew.ts
|
|
652
|
+
// src/client/router-skew.ts
|
|
658
653
|
/**
|
|
659
654
|
* Router Skew Recording — turning a rejection into "this bundle is superseded".
|
|
660
655
|
*
|
|
@@ -681,8 +676,7 @@ function recordSkew(error) {
|
|
|
681
676
|
}
|
|
682
677
|
return markStaleFromError(error);
|
|
683
678
|
}
|
|
684
|
-
|
|
685
|
-
//#region src/client/router-effects.ts
|
|
679
|
+
// src/client/router-effects.ts
|
|
686
680
|
/**
|
|
687
681
|
* Router Effects — full-page navigation and post-paint scroll.
|
|
688
682
|
*
|
|
@@ -865,8 +859,7 @@ function hardNavigate(url, fromUrl) {
|
|
|
865
859
|
window.location.reload();
|
|
866
860
|
} else window.location.href = url;
|
|
867
861
|
}
|
|
868
|
-
|
|
869
|
-
//#region src/shared/error-digest.ts
|
|
862
|
+
// src/shared/error-digest.ts
|
|
870
863
|
/**
|
|
871
864
|
* The correlation ID in an error's Flight digest, or `null` when the error
|
|
872
865
|
* carries none — a deny or redirect row, an error that never crossed Flight,
|
|
@@ -886,8 +879,7 @@ function errorDigestId(error) {
|
|
|
886
879
|
const errorId = Reflect.get(parsed, "errorId");
|
|
887
880
|
return Reflect.get(parsed, "type") === "error" && typeof errorId === "string" ? errorId : null;
|
|
888
881
|
}
|
|
889
|
-
|
|
890
|
-
//#region src/client/error-boundary.tsx
|
|
882
|
+
// src/client/error-boundary.tsx
|
|
891
883
|
/**
|
|
892
884
|
* Framework-injected React error boundary.
|
|
893
885
|
*
|
|
@@ -978,6 +970,8 @@ var TimberErrorBoundary = class extends Component {
|
|
|
978
970
|
}
|
|
979
971
|
return this.markStatusPage(null);
|
|
980
972
|
}
|
|
973
|
+
const leavesSpa = parsed?.type !== "deny" || parsed.leaveSpa === true;
|
|
974
|
+
if (parsed?.type === "deny" && parsed.leaveSpa && !this.props.lastResort) throw error;
|
|
981
975
|
if (parsed?.type === "deny" && Array.isArray(parsed.owners) && parsed.owners.length > 0) {
|
|
982
976
|
if (!this.props.lastResort && !this.props.isSlotBoundary) {
|
|
983
977
|
const reachable = parsed.owners.find((k) => this.childAncestry.includes(k));
|
|
@@ -985,7 +979,7 @@ var TimberErrorBoundary = class extends Component {
|
|
|
985
979
|
}
|
|
986
980
|
}
|
|
987
981
|
if (this.props.denyOnly && !this.props.lastResort && parsed?.type !== "deny") throw error;
|
|
988
|
-
if (this.props.lastResort &&
|
|
982
|
+
if (this.props.lastResort && leavesSpa) {
|
|
989
983
|
if (typeof window === "undefined") throw error;
|
|
990
984
|
if (!_handledExits.has(error)) {
|
|
991
985
|
_handledExits.add(error);
|
|
@@ -1101,7 +1095,6 @@ function statusMatches(boundaryStatus, errorStatus) {
|
|
|
1101
1095
|
if (boundaryStatus === 500) return errorStatus >= 500 && errorStatus <= 599;
|
|
1102
1096
|
return boundaryStatus === errorStatus;
|
|
1103
1097
|
}
|
|
1104
|
-
//#endregion
|
|
1105
1098
|
export { createSpaExits as a, createRenderOwner as c, fetchRscPayload as d, readPayloadTree as f, createScrollEffects as i, isClientStale as l, TimberErrorBoundary as n, runAsHandle as o, readPublishedParams as p, createNavigationRecovery as r, recordSkew as s, DenyAncestryContext as t, NonRscResponse as u };
|
|
1106
1099
|
|
|
1107
|
-
//# sourceMappingURL=error-boundary-
|
|
1100
|
+
//# sourceMappingURL=error-boundary-DRQXGWCp.js.map
|