@timber-js/app 0.2.0-alpha.222 → 0.2.0-alpha.223
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-C61GWpGg.js} +369 -55
- package/dist/_chunks/dev-server-C61GWpGg.js.map +1 -0
- package/dist/_chunks/dev-server-CBvvM7Lr.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 +22 -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.js +266 -229
- 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/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 +22 -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 +22 -5
- package/src/config-validation.ts +17 -0
- package/src/cookies/define-cookie.ts +10 -46
- package/src/cookies/json-cookie.ts +4 -4
- 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/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
package/dist/params/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as toBracketKey, t as resolveSchemaCodecs } from "../_chunks/resolve-schema-
|
|
2
|
-
import { n as setLinkCodecs, t as getLinkCodec } from "../_chunks/codec-registry-
|
|
3
|
-
|
|
1
|
+
import { n as toBracketKey, t as resolveSchemaCodecs } from "../_chunks/resolve-schema-B-aCuTu3.js";
|
|
2
|
+
import { n as setLinkCodecs, t as getLinkCodec } from "../_chunks/codec-registry-CPc6bjVl.js";
|
|
3
|
+
// src/params/define-schema.ts
|
|
4
4
|
/**
|
|
5
5
|
* Define the global segment param schema.
|
|
6
6
|
*
|
|
@@ -28,7 +28,6 @@ import { n as setLinkCodecs, t as getLinkCodec } from "../_chunks/codec-registry
|
|
|
28
28
|
function defineSchema(config) {
|
|
29
29
|
return config;
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { defineSchema, getLinkCodec, resolveSchemaCodecs, setLinkCodecs, toBracketKey };
|
|
33
32
|
|
|
34
33
|
//# sourceMappingURL=index.js.map
|
package/dist/plugin-context.d.ts
CHANGED
|
@@ -137,6 +137,13 @@ export interface PluginContext {
|
|
|
137
137
|
* RSC generateBundle alongside routePrebuiltComponents.
|
|
138
138
|
*/
|
|
139
139
|
prebuiltLazyChunks?: Map<string, string>;
|
|
140
|
+
/**
|
|
141
|
+
* Dev only: RSC module ID → the cache.component IDs its last transform
|
|
142
|
+
* declared. Written by timber-prebuilt's transform, read by
|
|
143
|
+
* timber-dev-server to scope a dev store clear to the components a saved
|
|
144
|
+
* module could have changed (plugins/dev-store-clear.ts, TIM-1599).
|
|
145
|
+
*/
|
|
146
|
+
devPrebuiltComponentIds?: Map<string, string[]>;
|
|
140
147
|
/**
|
|
141
148
|
* Content-keyed AST parse memo shared across cache/prebuilt/prerender-sugar
|
|
142
149
|
* transforms. Collapses both cross-plugin and cross-environment duplicate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-context.d.ts","sourceRoot":"","sources":["../src/plugin-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAA0B,MAAM,mBAAmB,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAA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AAe,CAAC,EAAE,MAAM,GACvB,MAAM,CAQR;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CA6B9E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAqB1E;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,gBAAgB,GAC3B,MAAM,EAAE,CAgBV;AAWD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,gBAAgB,GAC3B,gBAAgB,CAiBlB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dev-server discovery records — `.timber/dev/<pid>-<port>-<token>.json`.
|
|
3
3
|
*
|
|
4
|
-
* On startup each dev server writes `{ port, pid, host, protocol }` to its own record
|
|
5
|
-
* file under the app's `.timber/dev/` so
|
|
6
|
-
* VS Code extension can discover a running
|
|
7
|
-
*
|
|
4
|
+
* On startup each dev server writes `{ url, port, pid, host, protocol }` to its own record
|
|
5
|
+
* file under the app's `.timber/dev/` so `timber dev status`, the
|
|
6
|
+
* `timber graph` CLI, and the VS Code extension can discover a running
|
|
7
|
+
* dev server. `timber dev status` is the public, agent-facing consumer;
|
|
8
|
+
* the records themselves are not.
|
|
8
9
|
*
|
|
9
10
|
* One record file per server, one writer per file. This is what makes
|
|
10
11
|
* multi-server roots (Vite auto-increments the port across processes;
|
|
@@ -25,9 +26,24 @@
|
|
|
25
26
|
* Design doc: 47-module-environment-tooling.md §5, 21-dev-server.md.
|
|
26
27
|
*/
|
|
27
28
|
import type { Server } from 'node:net';
|
|
29
|
+
import type { AdvertisedUrls } from './dev-hostname.ts';
|
|
28
30
|
/** Relative path of the discovery directory within the project root. */
|
|
29
31
|
export declare const DEV_DISCOVERY_DIR: string;
|
|
30
32
|
export interface DevRecord {
|
|
33
|
+
/**
|
|
34
|
+
* The URL the server printed and opened — Vite's `resolvedUrls` pick,
|
|
35
|
+
* with the app's dev hostname applied (`http://blog.localhost:3000/`,
|
|
36
|
+
* see plugins/dev-hostname.ts). What `timber dev status` reports. Taken
|
|
37
|
+
* from Vite rather than rebuilt from `host`, so the two cannot disagree.
|
|
38
|
+
*/
|
|
39
|
+
url: string;
|
|
40
|
+
/**
|
|
41
|
+
* The same server for non-browser HTTP clients: `url` at plain
|
|
42
|
+
* `localhost` when that resolves and verifies (see `loopbackUrl` in
|
|
43
|
+
* plugins/dev-hostname.ts). Computed by the server, which alone knows its
|
|
44
|
+
* TLS certificate.
|
|
45
|
+
*/
|
|
46
|
+
loopbackUrl: string;
|
|
31
47
|
port: number;
|
|
32
48
|
pid: number;
|
|
33
49
|
/**
|
|
@@ -87,19 +103,32 @@ export interface DevRecord {
|
|
|
87
103
|
}
|
|
88
104
|
/** Best-effort "is this pid alive" — signal 0 probes without killing. */
|
|
89
105
|
export declare function isPidAlive(pid: number): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* The directory whose `.timber/dev/` holds a server's record: the Vite
|
|
108
|
+
* config file's directory, falling back to the resolved root for an inline
|
|
109
|
+
* (`configFile: false`) server. Every consumer — `timber dev status`,
|
|
110
|
+
* `timber graph`, the VS Code extension — locates an app by its config or
|
|
111
|
+
* package directory without evaluating Vite, so the record goes where they
|
|
112
|
+
* look rather than under a `root` the config may move elsewhere.
|
|
113
|
+
*/
|
|
114
|
+
export declare function devRecordRoot(root: string, configFile: string | false | undefined): string;
|
|
90
115
|
/**
|
|
91
116
|
* Register discovery-record lifecycle handlers on the dev server's HTTP
|
|
92
117
|
* server. Writes `.timber/dev/<pid>-<port>-<token>.json` once the server is
|
|
93
118
|
* listening (the bound port is only known then) and removes exactly
|
|
94
119
|
* that record on clean shutdown.
|
|
95
120
|
*
|
|
121
|
+
* `urls` is read when the server starts listening: the URLs to advertise
|
|
122
|
+
* (`advertisedUrls`). With none, nothing is written — a record no one can
|
|
123
|
+
* open is not worth advertising.
|
|
124
|
+
*
|
|
96
125
|
* All filesystem work is best-effort: a failure to write or remove a
|
|
97
126
|
* record must never break the dev server. `httpServer` is null in
|
|
98
127
|
* middleware mode — no port exists, so there is nothing to advertise.
|
|
99
128
|
* Typed as `net.Server` — the common base of Vite's `http.Server` and
|
|
100
129
|
* `Http2SecureServer` variants, which carries the events and `address()`.
|
|
101
130
|
*/
|
|
102
|
-
export declare function registerDevDiscovery(httpServer: Server | null, root: string, config?: {
|
|
131
|
+
export declare function registerDevDiscovery(httpServer: Server | null, root: string, urls: () => AdvertisedUrls | undefined, config?: {
|
|
103
132
|
configFile?: string | false;
|
|
104
133
|
base?: string;
|
|
105
134
|
server?: {
|
|
@@ -120,4 +149,39 @@ export declare function registerDevDiscovery(httpServer: Server | null, root: st
|
|
|
120
149
|
};
|
|
121
150
|
webSocketToken?: string;
|
|
122
151
|
}): void;
|
|
152
|
+
/**
|
|
153
|
+
* `GET /__timber/status` — the dev server's identity probe. Answers
|
|
154
|
+
* `{ pid }` with the serving process's pid, so a consumer can confirm the
|
|
155
|
+
* server on a record's port is the one that wrote the record (a crashed
|
|
156
|
+
* server's port may since have been taken by another process).
|
|
157
|
+
*/
|
|
158
|
+
export declare const STATUS_ENDPOINT_PATH = "/__timber/status";
|
|
159
|
+
/** Probe deadline: discovery must never hold a CLI hostage. */
|
|
160
|
+
export declare const DEV_PROBE_TIMEOUT_MS = 2000;
|
|
161
|
+
/**
|
|
162
|
+
* Records under `<root>/.timber/dev/` that are well-formed and name a live
|
|
163
|
+
* pid. These are candidates, not proof: the caller still has to probe the
|
|
164
|
+
* endpoint (`readLiveDevRecords`, or `timber graph`'s own graph request,
|
|
165
|
+
* which doubles as its probe). A missing directory or unreadable record is
|
|
166
|
+
* absence, never an error.
|
|
167
|
+
*/
|
|
168
|
+
export declare function readDevRecords(root: string): DevRecord[];
|
|
169
|
+
/**
|
|
170
|
+
* Records whose server answers the status probe with the record's own pid —
|
|
171
|
+
* the full "pid alive AND probe succeeds" validation. Probes run in
|
|
172
|
+
* parallel, each under `DEV_PROBE_TIMEOUT_MS`.
|
|
173
|
+
*/
|
|
174
|
+
export declare function readLiveDevRecords(root: string): Promise<DevRecord[]>;
|
|
175
|
+
/**
|
|
176
|
+
* HTTP(S) GET against a record's server with a wall-clock deadline and a
|
|
177
|
+
* response-size limit, returning the parsed JSON body or null on any failure
|
|
178
|
+
* (non-200, bad JSON, timeout, connection error). Uses node:http/https
|
|
179
|
+
* directly — `fetch` silently strips the Host header, which the endpoint's
|
|
180
|
+
* DNS-rebinding defense needs to see as a localhost form.
|
|
181
|
+
*
|
|
182
|
+
* The wall-clock timer covers both connection and body streaming — node's
|
|
183
|
+
* `timeout` option is an INACTIVITY timeout that resets on every chunk, so a
|
|
184
|
+
* slow-drip response would never fire it.
|
|
185
|
+
*/
|
|
186
|
+
export declare function probeDevServer(record: DevRecord, path: string, timeoutMs: number): Promise<unknown>;
|
|
123
187
|
//# sourceMappingURL=dev-discovery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-discovery.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-discovery.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dev-discovery.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,QAAyB,CAAC;AAExD,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,WAAW,EAAE,MAAM,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,OAAO,CAAC;QACZ,EAAE,CAAC,EACC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,UAAU,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,GACvF,KAAK,CAAC;KACX,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GACA,IAAI,CA0DN;AASD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AAEvD,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAqB1C;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAoBxD;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAW3E;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CA8DlB"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-app dev hostnames — print and open `<name>.localhost:<port>`.
|
|
3
|
+
*
|
|
4
|
+
* Cookies are not scoped by port, so every app served on `localhost` shares
|
|
5
|
+
* one cookie jar: two apps on :3000 and :3001 overwrite each other's
|
|
6
|
+
* sessions, and service workers stuck to `localhost:3000` carry over to
|
|
7
|
+
* whichever project next gets that port. Browsers resolve
|
|
8
|
+
* `*.localhost` (at any depth) to loopback with no DNS or `/etc/hosts` setup,
|
|
9
|
+
* so giving each app its own name gives it its own cookie jar.
|
|
10
|
+
*
|
|
11
|
+
* This only changes the URL Vite prints, opens, and records for discovery.
|
|
12
|
+
* Nothing is proxied, no `Host` is rewritten, and plain `localhost:<port>`
|
|
13
|
+
* keeps working. Vite's host check already accepts `*.localhost`.
|
|
14
|
+
*
|
|
15
|
+
* See design/21-dev-server.md §"Dev Hostnames" (TIM-1613).
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Reduce arbitrary text to one DNS label: lowercase, anything outside
|
|
19
|
+
* `[a-z0-9-]` becomes `-`, runs of `-` collapse, no leading or trailing
|
|
20
|
+
* `-`, at most 63 characters. May return '' when nothing usable is left.
|
|
21
|
+
*/
|
|
22
|
+
export declare function sanitizeLabel(raw: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Why a `dev.hostname` value is unusable, or null when it is fine. Accepts
|
|
25
|
+
* `false` (opt out: keep plain `localhost`) or a dot-separated sequence of
|
|
26
|
+
* DNS labels, case-insensitively, with or without a trailing `.localhost`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function devHostnameError(value: unknown): string | null;
|
|
29
|
+
export interface DevHostnameSource {
|
|
30
|
+
/** `dev.hostname` from timber.config.ts. */
|
|
31
|
+
override?: string | false;
|
|
32
|
+
/** `name` from the app's package.json, if it has one. */
|
|
33
|
+
packageName?: unknown;
|
|
34
|
+
/** The app directory's own name. */
|
|
35
|
+
dirName: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The dev hostname for an app. In order:
|
|
39
|
+
*
|
|
40
|
+
* 1. `dev.hostname`, when set (`false` → plain `localhost`). An invalid value
|
|
41
|
+
* throws; config validation reports it as fatal before this runs.
|
|
42
|
+
* 2. package.json `name`, unless it is a placeholder. Preferred over the
|
|
43
|
+
* directory because it is stable across clones and worktrees, so OAuth
|
|
44
|
+
* callback URLs registered against it keep working, and because monorepo
|
|
45
|
+
* directories are generic (`apps/web` everywhere).
|
|
46
|
+
* 3. The directory name.
|
|
47
|
+
* 4. Plain `localhost`, when nothing usable is left after sanitizing.
|
|
48
|
+
*/
|
|
49
|
+
export declare function deriveDevHostname(source: DevHostnameSource): string;
|
|
50
|
+
/**
|
|
51
|
+
* `deriveDevHostname` for the app in `appDir` — the directory its
|
|
52
|
+
* `.timber/` lives in (`devRecordRoot`), where its package.json is. A
|
|
53
|
+
* missing or unreadable package.json falls through to the directory name.
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveDevHostname(appDir: string, override: string | false | undefined): string;
|
|
56
|
+
/**
|
|
57
|
+
* Whether a TLS `cert` option (PEM string or Buffer, a path to one, or an
|
|
58
|
+
* array of them — Node's `tls` shape plus Vite's paths) names `hostname`.
|
|
59
|
+
* A `pfx`-only config has no `cert` and so keeps `localhost`. An https dev server prints the
|
|
60
|
+
* named URL only when it does: a trusted certificate issued for `localhost`
|
|
61
|
+
* alone (mkcert's default) would turn a working URL into a certificate error.
|
|
62
|
+
*/
|
|
63
|
+
export declare function certCoversHostname(cert: unknown, hostname: string): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The hostname to print for this server, after the https check. `https` is
|
|
66
|
+
* Vite's resolved `server.https` (undefined for plain http).
|
|
67
|
+
*/
|
|
68
|
+
export declare function effectiveDevHostname(hostname: string, https: {
|
|
69
|
+
cert?: unknown;
|
|
70
|
+
} | undefined): string;
|
|
71
|
+
/**
|
|
72
|
+
* Vite's `server.resolvedUrls` shape — the URLs it prints under Local and
|
|
73
|
+
* Network and picks from for `server.open`.
|
|
74
|
+
*/
|
|
75
|
+
export interface ResolvedServerUrls {
|
|
76
|
+
local: string[];
|
|
77
|
+
network: string[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Rename the `localhost` entries of `urls.local` to `hostname`. Only those:
|
|
81
|
+
* an explicit loopback IP (`host: '127.0.0.1'`) is what the developer asked
|
|
82
|
+
* to see, certificate-derived names already name a host, and network URLs
|
|
83
|
+
* are other machines' way in. Idempotent: a renamed URL is no longer a
|
|
84
|
+
* `localhost` URL.
|
|
85
|
+
*/
|
|
86
|
+
export declare function withDevHostname<T extends ResolvedServerUrls>(urls: T, hostname: string): T;
|
|
87
|
+
/**
|
|
88
|
+
* The same URL through plain `localhost`: what a non-browser HTTP client can
|
|
89
|
+
* reach. Browsers and curl resolve `*.localhost` themselves, but Node, Python
|
|
90
|
+
* and other clients ask the OS, and not every resolver (glibc without
|
|
91
|
+
* systemd-resolved) maps `*.localhost` to loopback. The server answers both
|
|
92
|
+
* names, so only the hostname changes. Other URLs are returned unchanged.
|
|
93
|
+
*
|
|
94
|
+
* Under https the swap also has to survive TLS hostname verification: a
|
|
95
|
+
* certificate issued for `blog.localhost` alone fails for `localhost`
|
|
96
|
+
* (`ERR_TLS_CERT_ALTNAME_INVALID`), so the named URL is kept unless the
|
|
97
|
+
* certificate covers `localhost` too. `https` is Vite's `server.https`.
|
|
98
|
+
*/
|
|
99
|
+
export declare function loopbackUrl(href: string, https: {
|
|
100
|
+
cert?: unknown;
|
|
101
|
+
} | undefined): string;
|
|
102
|
+
/**
|
|
103
|
+
* The URL a server is opened at, after the rename: Vite's own choice, as its
|
|
104
|
+
* `getServerUrlByHost` makes it for `server.open` — the first URL containing
|
|
105
|
+
* a string `server.host`, else `local[0]`, else `network[0]`. The discovery
|
|
106
|
+
* record stores this, so `timber dev status` reports the URL Vite opens.
|
|
107
|
+
*/
|
|
108
|
+
export declare function primaryServerUrl(urls: ResolvedServerUrls | null | undefined, hostname: string, serverHost: string | boolean | undefined): string | undefined;
|
|
109
|
+
/** The URLs a discovery record advertises. */
|
|
110
|
+
export interface AdvertisedUrls {
|
|
111
|
+
/** What the server printed and opens (`primaryServerUrl`). */
|
|
112
|
+
url: string;
|
|
113
|
+
/** The same server for non-browser HTTP clients (`loopbackUrl`). */
|
|
114
|
+
loopbackUrl: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The record's URLs, computed by the server, which alone knows its
|
|
118
|
+
* certificate. `server` is Vite's resolved `server` config.
|
|
119
|
+
*/
|
|
120
|
+
export declare function advertisedUrls(urls: ResolvedServerUrls | null | undefined, hostname: string, server: {
|
|
121
|
+
host?: string | boolean;
|
|
122
|
+
https?: {
|
|
123
|
+
cert?: unknown;
|
|
124
|
+
};
|
|
125
|
+
} | undefined): AdvertisedUrls | undefined;
|
|
126
|
+
/** The slice of `ViteDevServer` the rename needs. */
|
|
127
|
+
interface DevHostnameServer {
|
|
128
|
+
httpServer: {
|
|
129
|
+
on(event: 'listening', listener: () => void): unknown;
|
|
130
|
+
} | null;
|
|
131
|
+
resolvedUrls: ResolvedServerUrls | null;
|
|
132
|
+
config: {
|
|
133
|
+
server?: {
|
|
134
|
+
https?: {
|
|
135
|
+
cert?: unknown;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Resolve the app's dev hostname and rename the printed/opened URL once the
|
|
142
|
+
* server is listening. Returns the hostname so the discovery record can
|
|
143
|
+
* describe the same URL (`primaryServerUrl`).
|
|
144
|
+
*
|
|
145
|
+
* Vite assigns `resolvedUrls` in a `listening` listener it *prepends* in
|
|
146
|
+
* `listen()`, after every `configureServer` hook has run, so this listener
|
|
147
|
+
* always sees them; `printUrls()` and `openBrowser()` run after `listen()`
|
|
148
|
+
* resolves. Middleware mode has no `httpServer` and prints nothing.
|
|
149
|
+
*/
|
|
150
|
+
export declare function applyDevHostname(server: DevHostnameServer, appDir: string, override: string | false | undefined): string;
|
|
151
|
+
export {};
|
|
152
|
+
//# sourceMappingURL=dev-hostname.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-hostname.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-hostname.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA0BH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQjD;AAeD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAoB9D;AAOD,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,QAAQ,C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C9C,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,EAC3C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GAAG,SAAS,GAC1E,cAAc,GAAG,SAAS,CAG5B;AAED,qDAAqD;AACrD,UAAU,iBAAiB;IACzB,UAAU,EAAE;QAAE,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7E,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACxC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE;gBAAE,IAAI,CAAC,EAAE,OAAO,CAAA;aAAE,CAAA;SAAE,CAAA;KAAE,CAAC;CACrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GACnC,MAAM,CAWR"}
|
|
@@ -39,7 +39,11 @@ export declare function timberDevServer(ctx: PluginContext): Plugin;
|
|
|
39
39
|
* consulted: dev connections are direct, so the header would be
|
|
40
40
|
* attacker-controlled. (TIM-1067, B32)
|
|
41
41
|
*
|
|
42
|
+
* Returns null for a request that names no URL — a Host that is not a bare
|
|
43
|
+
* host[:port], or a request target that does not parse — which the caller
|
|
44
|
+
* answers with 400. (TIM-1600)
|
|
45
|
+
*
|
|
42
46
|
* Exported for tests.
|
|
43
47
|
*/
|
|
44
|
-
export declare function toWebRequest(nodeReq: IncomingMessage): Request;
|
|
48
|
+
export declare function toWebRequest(nodeReq: IncomingMessage): Request | null;
|
|
45
49
|
//# sourceMappingURL=dev-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAGL,KAAK,MAAM,EAGZ,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,WAAW,CAAC;AAKjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAiC1D;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AA2BpC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA4O1D;AAgOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,IAAI,CA6CrE"}
|
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
* Clear the cache.component dev store on every dev-server watcher event
|
|
3
3
|
* (TIM-1588, server/prebuilt/dev-store.ts) — and once more shortly after.
|
|
4
4
|
*
|
|
5
|
+
* A clear is scoped when the RSC module graph can say what a save changed
|
|
6
|
+
* (TIM-1599). A `change` to a file the graph knows as a module can only have
|
|
7
|
+
* changed the output of the modules that import it, transitively, so only
|
|
8
|
+
* the components declared in those modules (and in the file itself) are
|
|
9
|
+
* dropped. Element props need no tracking: non-slot element props make a
|
|
10
|
+
* render unkeyable, and slot content is composed live (design/45 §Cache Key,
|
|
11
|
+
* §Slot Components). Nested cache.component children are baked flat into
|
|
12
|
+
* their parent, whose module imports them, so the walk reaches the parent.
|
|
13
|
+
*
|
|
14
|
+
* The graph also holds file-only entries: files a plugin declared with
|
|
15
|
+
* `addWatchFile`. Tailwind's plugin declares every file its scanner finds,
|
|
16
|
+
* markdown and JSON included, as a dependency of the stylesheet. A file-only
|
|
17
|
+
* entry says what watches the file, never what reads it with fs, so a file
|
|
18
|
+
* with no module node clears everything. When the walk meets one on its way
|
|
19
|
+
* up (a module Tailwind also scans), it goes through it to the stylesheet's
|
|
20
|
+
* importers, which costs extra re-renders of components declared up that
|
|
21
|
+
* chain and never a stale one.
|
|
22
|
+
*
|
|
23
|
+
* Everything else clears every component: a file the graph does not know as
|
|
24
|
+
* a module (markdown or JSON read with fs), and an add or a delete (a glob
|
|
25
|
+
* or a route scan may pick it up). The decision is graph membership, never
|
|
26
|
+
* the file's extension. Not covered: a module loaded by a variable dynamic
|
|
27
|
+
* `import()` that Vite cannot analyze has no importer edge, and a component
|
|
28
|
+
* that reads a project module with fs is not that module's importer. A hard
|
|
29
|
+
* reload covers both.
|
|
30
|
+
*
|
|
5
31
|
* Vite's watcher (chokidar) throttles `change`: once it emits one for a
|
|
6
32
|
* path, it DROPS every further `change` for that path for 50ms, and never
|
|
7
33
|
* emits a trailing event for them. So a save is invisible when it lands
|
|
@@ -13,16 +39,45 @@
|
|
|
13
39
|
* fs was read again on every request.
|
|
14
40
|
*
|
|
15
41
|
* The trailing clear lands after that window closes, so it follows any
|
|
16
|
-
* write whose event was dropped. A
|
|
17
|
-
*
|
|
42
|
+
* write whose event was dropped. A dropped event is always for a path the
|
|
43
|
+
* burst already reported, so the trailing clear covers every path seen in
|
|
44
|
+
* the burst, and resolves them against the graph again when it fires: a
|
|
45
|
+
* request between the saves may have re-transformed a module and given its
|
|
46
|
+
* call sites new IDs. A render of a covered component that started before
|
|
47
|
+
* it cannot store (the clear records an invalidation of it), and a render
|
|
18
48
|
* after it reads the file as written. Debounced, so a burst of saves gets
|
|
19
49
|
* one trailing clear, after the last of them. The cost is at most one
|
|
20
50
|
* extra re-render per save, in dev only.
|
|
21
51
|
*/
|
|
22
52
|
/** The part of Vite's `FSWatcher` this needs. */
|
|
23
53
|
interface WatcherEvents {
|
|
24
|
-
on(event: 'all', listener: () => void): unknown;
|
|
54
|
+
on(event: 'all', listener: (event: string, path: string) => void): unknown;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* What a clear covers: the paths changed in place, or null for anything
|
|
58
|
+
* else (an add, a delete, a directory event), which clears everything.
|
|
59
|
+
*/
|
|
60
|
+
export type ChangedPaths = ReadonlySet<string> | null;
|
|
61
|
+
export declare function clearDevStoreOnWatcherEvents(watcher: WatcherEvents, clear: (changed: ChangedPaths) => void): void;
|
|
62
|
+
/** The part of Vite's `EnvironmentModuleNode` the walk reads. */
|
|
63
|
+
export interface GraphModule {
|
|
64
|
+
/** Null for a file-only entry (`addWatchFile`), which declares nothing. */
|
|
65
|
+
id: string | null;
|
|
66
|
+
importers: Set<GraphModule>;
|
|
67
|
+
}
|
|
68
|
+
/** The part of Vite's `EnvironmentModuleGraph` the walk reads. */
|
|
69
|
+
export interface ModuleGraphView {
|
|
70
|
+
getModulesByFile(file: string): Set<GraphModule> | undefined;
|
|
25
71
|
}
|
|
26
|
-
|
|
72
|
+
/**
|
|
73
|
+
* The cache.component IDs whose output the changed paths could have
|
|
74
|
+
* changed: those declared in each changed module and its transitive
|
|
75
|
+
* importers. Null means every component — a path the graph does not know.
|
|
76
|
+
*
|
|
77
|
+
* `componentIds` maps a module ID to the IDs its last transform declared
|
|
78
|
+
* (`PluginContext.devPrebuiltComponentIds`). `toGraphPath` puts a watcher
|
|
79
|
+
* path in the graph's path space (symlinks resolved, `/` separators).
|
|
80
|
+
*/
|
|
81
|
+
export declare function componentsChangedBy(changed: ChangedPaths, graph: ModuleGraphView, componentIds: ReadonlyMap<string, readonly string[]>, toGraphPath: (path: string) => string): string[] | null;
|
|
27
82
|
export {};
|
|
28
83
|
//# sourceMappingURL=dev-store-clear.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-store-clear.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-store-clear.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dev-store-clear.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-store-clear.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAYH,iDAAiD;AACjD,UAAU,aAAa;IACrB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC;CAC5E;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAEtD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,GACrC,IAAI,CAkBN;AAED,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,2EAA2E;IAC3E,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CAC7B;AAED,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;CAC9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,eAAe,EACtB,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,EACpD,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GACpC,MAAM,EAAE,GAAG,IAAI,CAsBjB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* graph-endpoint — `GET /__timber/graph`
|
|
2
|
+
* graph-endpoint — `GET /__timber/graph` (and the `GET /__timber/status`
|
|
3
|
+
* identity probe) on the dev server.
|
|
3
4
|
*
|
|
4
5
|
* The fast path of design/47: when a dev server runs, the env module
|
|
5
6
|
* graphs are already resident and classification is a lookup. Serves
|
|
@@ -51,7 +52,8 @@ export declare function isAllowedGraphHost(hostHeader: string | undefined, allow
|
|
|
51
52
|
/** Origin check: absent is fine (CLI probe); present must pass the host allowlist. */
|
|
52
53
|
export declare function isAllowedGraphOrigin(originHeader: string | undefined, allowedHosts: true | string[] | undefined): boolean;
|
|
53
54
|
/**
|
|
54
|
-
* Create the Connect middleware handling GET /__timber/graph
|
|
55
|
+
* Create the Connect middleware handling GET /__timber/graph and the
|
|
56
|
+
* GET /__timber/status identity probe.
|
|
55
57
|
*
|
|
56
58
|
* Query surface: `?file=<path>` (absolute or project-root-relative) or
|
|
57
59
|
* `?all=1`. Anything else is a 400 — fail loudly, like the CLI.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-endpoint.d.ts","sourceRoot":"","sources":["../../src/plugins/graph-endpoint.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"graph-endpoint.d.ts","sourceRoot":"","sources":["../../src/plugins/graph-endpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAK1D,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,wBA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AiB,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"prebuilt.d.ts","sourceRoot":"","sources":["../../src/plugins/prebuilt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAU1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AA2GnE;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,MAAM,CAUR;AAID,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,kCAAkC,CAChD,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACvC,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,kBAAkB,GAAG,IAAI,GACvD,MAAM,EAAE,CAgBV;AA6HD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CAChE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,iBAAiB,CAAA;CAAE,CA4StF"}
|
package/dist/routing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as INTERCEPTION_MARKERS, i as DEFAULT_PAGE_EXTENSIONS, n as classifyUrlSegment, t as classifySegment } from "../_chunks/segment-classify-
|
|
2
|
-
import { d as collectInterceptionRewrites, n as scanRoutes } from "../_chunks/scanner-
|
|
3
|
-
import { t as generateRouteMap } from "../_chunks/codegen-
|
|
4
|
-
import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-
|
|
1
|
+
import { a as INTERCEPTION_MARKERS, i as DEFAULT_PAGE_EXTENSIONS, n as classifyUrlSegment, t as classifySegment } from "../_chunks/segment-classify-Ho8jXWeC.js";
|
|
2
|
+
import { d as collectInterceptionRewrites, n as scanRoutes } from "../_chunks/scanner-CJC-ScJU.js";
|
|
3
|
+
import { t as generateRouteMap } from "../_chunks/codegen-B9oWkWGf.js";
|
|
4
|
+
import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-DIE203ir.js";
|
|
5
5
|
export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectDynamicSegmentsFromTree, collectInterceptionRewrites, collectLeafRoutes, generateRouteMap, scanRoutes, validateSchemaAgainstRoutes };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { renderFlight } from './render-flight.ts';
|
|
2
|
-
export { loadServerAction
|
|
2
|
+
export { loadServerAction } from './server-references.ts';
|
|
3
|
+
export { decodeReply, decodeAction, decodeFormState, createFromReadableStream, } from '@vitejs/plugin-rsc/rsc';
|
|
3
4
|
//# sourceMappingURL=rsc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/rsc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/rsc.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EACL,WAAW,EACX,YAAY,EAGZ,eAAe,EAOf,wBAAwB,GACzB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The export `id` (`<module>#<export>`) names, or `undefined` when the module
|
|
3
|
+
* or the export does not exist. Rejects only when a known module fails to
|
|
4
|
+
* load. The value is not checked: the caller decides whether it is a server
|
|
5
|
+
* function.
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadServerAction(id: string): Promise<unknown>;
|
|
8
|
+
//# sourceMappingURL=server-references.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-references.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/server-references.ts"],"names":[],"mappings":"AA6DA;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAKnE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as getSearchParamsFromAls } from "../_chunks/als-slots-
|
|
2
|
-
import { i as isStandardSchema, n as fromSchema, r as isCodec } from "../_chunks/schema-bridge-
|
|
3
|
-
import { i as parseTotal, n as useQueryStates, r as serializedEqual } from "../_chunks/use-query-states-
|
|
4
|
-
|
|
1
|
+
import { r as getSearchParamsFromAls } from "../_chunks/als-slots-kbQrHTzm.js";
|
|
2
|
+
import { i as isStandardSchema, n as fromSchema, r as isCodec } from "../_chunks/schema-bridge-DyRs3cqy.js";
|
|
3
|
+
import { i as parseTotal, n as useQueryStates, r as serializedEqual } from "../_chunks/use-query-states-pkDV-jSg.js";
|
|
4
|
+
// src/search-params/define.ts
|
|
5
5
|
/**
|
|
6
6
|
* defineSearchParams — factory for SearchParamsDefinition<T>.
|
|
7
7
|
*
|
|
@@ -198,8 +198,7 @@ function buildDefinition(codecMap, urlKeys) {
|
|
|
198
198
|
urlKeys: Object.freeze({ ...urlKeys })
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
//#region src/search-params/wrappers.ts
|
|
201
|
+
// src/search-params/wrappers.ts
|
|
203
202
|
/**
|
|
204
203
|
* Wrap a nullable codec with a default value. The output type becomes
|
|
205
204
|
* non-nullable, and the wrapper is TOTAL over `string | string[] |
|
|
@@ -286,7 +285,6 @@ function withUrlKey(codecOrSchema, urlKey) {
|
|
|
286
285
|
if (typeof codec.parseServerSide === "function") wrapped.parseServerSide = codec.parseServerSide.bind(codec);
|
|
287
286
|
return wrapped;
|
|
288
287
|
}
|
|
289
|
-
//#endregion
|
|
290
288
|
export { defineSearchParams, withDefault, withUrlKey };
|
|
291
289
|
|
|
292
290
|
//# sourceMappingURL=index.js.map
|