@rangojs/router 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/browser/prefetch/cache.d.ts +11 -8
- package/dist/types/cache/cf/cf-cache-store.d.ts +2 -0
- package/dist/types/cache/read-through-swr.d.ts +7 -6
- package/dist/types/cache/types.d.ts +39 -6
- package/dist/types/cloudflare/tracing.d.ts +16 -12
- package/dist/types/router/instrument.d.ts +45 -15
- package/dist/types/router/telemetry-otel.d.ts +4 -4
- package/dist/types/router/timeout.d.ts +12 -1
- package/dist/types/router/tracing.d.ts +31 -17
- package/dist/types/rsc/capture-queue.d.ts +41 -4
- package/dist/types/rsc/shell-build-manifest.d.ts +2 -2
- package/dist/types/rsc/shell-capture.d.ts +28 -2
- package/dist/types/rsc/shell-serve.d.ts +18 -12
- package/dist/types/rsc/stream-idle.d.ts +60 -0
- package/dist/types/server/request-context.d.ts +7 -1
- package/dist/types/vercel/tracing.d.ts +9 -8
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/skills/observability/SKILL.md +33 -4
- package/skills/ppr/SKILL.md +44 -3
- package/src/browser/prefetch/cache.ts +22 -10
- package/src/cache/cache-runtime.ts +39 -25
- package/src/cache/cf/cf-cache-store.ts +27 -8
- package/src/cache/document-cache.ts +39 -23
- package/src/cache/read-through-swr.ts +22 -16
- package/src/cache/types.ts +41 -6
- package/src/cache/vercel/vercel-cache-store.ts +24 -10
- package/src/cloudflare/tracing.ts +16 -12
- package/src/router/instrument.ts +61 -15
- package/src/router/segment-resolution/loader-cache.ts +12 -1
- package/src/router/segment-resolution/revalidation.ts +16 -1
- package/src/router/telemetry-otel.ts +4 -4
- package/src/router/timeout.ts +12 -1
- package/src/router/tracing.ts +37 -17
- package/src/rsc/capture-queue.ts +150 -22
- package/src/rsc/handler.ts +171 -73
- package/src/rsc/rsc-rendering.ts +11 -3
- package/src/rsc/shell-build-manifest.ts +20 -7
- package/src/rsc/shell-capture.ts +222 -18
- package/src/rsc/shell-serve.ts +27 -12
- package/src/rsc/stream-idle.ts +137 -0
- package/src/server/request-context.ts +8 -0
- package/src/testing/dispatch.ts +55 -1
- package/src/vercel/tracing.ts +9 -8
- package/dist/__internal.d.ts +0 -83
- package/dist/__internal.d.ts.map +0 -1
- package/dist/__internal.js +0 -19
- package/dist/__internal.js.map +0 -1
- package/dist/__mocks__/version.d.ts +0 -7
- package/dist/__mocks__/version.d.ts.map +0 -1
- package/dist/__mocks__/version.js +0 -7
- package/dist/__mocks__/version.js.map +0 -1
- package/dist/__tests__/client-href.test.d.ts +0 -2
- package/dist/__tests__/client-href.test.d.ts.map +0 -1
- package/dist/__tests__/client-href.test.js +0 -74
- package/dist/__tests__/client-href.test.js.map +0 -1
- package/dist/__tests__/component-utils.test.d.ts +0 -2
- package/dist/__tests__/component-utils.test.d.ts.map +0 -1
- package/dist/__tests__/component-utils.test.js +0 -51
- package/dist/__tests__/component-utils.test.js.map +0 -1
- package/dist/__tests__/event-controller.test.d.ts +0 -2
- package/dist/__tests__/event-controller.test.d.ts.map +0 -1
- package/dist/__tests__/event-controller.test.js +0 -538
- package/dist/__tests__/event-controller.test.js.map +0 -1
- package/dist/__tests__/helpers/route-tree.d.ts +0 -118
- package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
- package/dist/__tests__/helpers/route-tree.js +0 -374
- package/dist/__tests__/helpers/route-tree.js.map +0 -1
- package/dist/__tests__/match-result.test.d.ts +0 -2
- package/dist/__tests__/match-result.test.d.ts.map +0 -1
- package/dist/__tests__/match-result.test.js +0 -154
- package/dist/__tests__/match-result.test.js.map +0 -1
- package/dist/__tests__/navigation-store.test.d.ts +0 -2
- package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
- package/dist/__tests__/navigation-store.test.js +0 -440
- package/dist/__tests__/navigation-store.test.js.map +0 -1
- package/dist/__tests__/partial-update.test.d.ts +0 -2
- package/dist/__tests__/partial-update.test.d.ts.map +0 -1
- package/dist/__tests__/partial-update.test.js +0 -1009
- package/dist/__tests__/partial-update.test.js.map +0 -1
- package/dist/__tests__/reverse-types.test.d.ts +0 -8
- package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
- package/dist/__tests__/reverse-types.test.js +0 -656
- package/dist/__tests__/reverse-types.test.js.map +0 -1
- package/dist/__tests__/route-definition.test.d.ts +0 -2
- package/dist/__tests__/route-definition.test.d.ts.map +0 -1
- package/dist/__tests__/route-definition.test.js +0 -55
- package/dist/__tests__/route-definition.test.js.map +0 -1
- package/dist/__tests__/router-helpers.test.d.ts +0 -2
- package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
- package/dist/__tests__/router-helpers.test.js +0 -377
- package/dist/__tests__/router-helpers.test.js.map +0 -1
- package/dist/__tests__/router-integration-2.test.d.ts +0 -2
- package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
- package/dist/__tests__/router-integration-2.test.js +0 -426
- package/dist/__tests__/router-integration-2.test.js.map +0 -1
- package/dist/__tests__/router-integration.test.d.ts +0 -2
- package/dist/__tests__/router-integration.test.d.ts.map +0 -1
- package/dist/__tests__/router-integration.test.js +0 -1051
- package/dist/__tests__/router-integration.test.js.map +0 -1
- package/dist/__tests__/search-params.test.d.ts +0 -5
- package/dist/__tests__/search-params.test.d.ts.map +0 -1
- package/dist/__tests__/search-params.test.js +0 -306
- package/dist/__tests__/search-params.test.js.map +0 -1
- package/dist/__tests__/segment-system.test.d.ts +0 -2
- package/dist/__tests__/segment-system.test.d.ts.map +0 -1
- package/dist/__tests__/segment-system.test.js +0 -627
- package/dist/__tests__/segment-system.test.js.map +0 -1
- package/dist/__tests__/static-handler-types.test.d.ts +0 -8
- package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
- package/dist/__tests__/static-handler-types.test.js +0 -63
- package/dist/__tests__/static-handler-types.test.js.map +0 -1
- package/dist/__tests__/urls.test.d.ts +0 -2
- package/dist/__tests__/urls.test.d.ts.map +0 -1
- package/dist/__tests__/urls.test.js +0 -421
- package/dist/__tests__/urls.test.js.map +0 -1
- package/dist/__tests__/use-mount.test.d.ts +0 -2
- package/dist/__tests__/use-mount.test.d.ts.map +0 -1
- package/dist/__tests__/use-mount.test.js +0 -35
- package/dist/__tests__/use-mount.test.js.map +0 -1
- package/dist/bin/rango.d.ts +0 -2
- package/dist/bin/rango.d.ts.map +0 -1
- package/dist/bin/rango.js.map +0 -1
- package/dist/browser/event-controller.d.ts +0 -191
- package/dist/browser/event-controller.d.ts.map +0 -1
- package/dist/browser/event-controller.js +0 -559
- package/dist/browser/event-controller.js.map +0 -1
- package/dist/browser/index.d.ts +0 -2
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -14
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/link-interceptor.d.ts +0 -38
- package/dist/browser/link-interceptor.d.ts.map +0 -1
- package/dist/browser/link-interceptor.js +0 -99
- package/dist/browser/link-interceptor.js.map +0 -1
- package/dist/browser/logging.d.ts +0 -10
- package/dist/browser/logging.d.ts.map +0 -1
- package/dist/browser/logging.js +0 -29
- package/dist/browser/logging.js.map +0 -1
- package/dist/browser/lru-cache.d.ts +0 -17
- package/dist/browser/lru-cache.d.ts.map +0 -1
- package/dist/browser/lru-cache.js +0 -50
- package/dist/browser/lru-cache.js.map +0 -1
- package/dist/browser/merge-segment-loaders.d.ts +0 -39
- package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
- package/dist/browser/merge-segment-loaders.js +0 -102
- package/dist/browser/merge-segment-loaders.js.map +0 -1
- package/dist/browser/navigation-bridge.d.ts +0 -102
- package/dist/browser/navigation-bridge.d.ts.map +0 -1
- package/dist/browser/navigation-bridge.js +0 -708
- package/dist/browser/navigation-bridge.js.map +0 -1
- package/dist/browser/navigation-client.d.ts +0 -25
- package/dist/browser/navigation-client.d.ts.map +0 -1
- package/dist/browser/navigation-client.js +0 -157
- package/dist/browser/navigation-client.js.map +0 -1
- package/dist/browser/navigation-store.d.ts +0 -101
- package/dist/browser/navigation-store.d.ts.map +0 -1
- package/dist/browser/navigation-store.js +0 -625
- package/dist/browser/navigation-store.js.map +0 -1
- package/dist/browser/partial-update.d.ts +0 -75
- package/dist/browser/partial-update.d.ts.map +0 -1
- package/dist/browser/partial-update.js +0 -426
- package/dist/browser/partial-update.js.map +0 -1
- package/dist/browser/react/Link.d.ts +0 -86
- package/dist/browser/react/Link.d.ts.map +0 -1
- package/dist/browser/react/Link.js +0 -128
- package/dist/browser/react/Link.js.map +0 -1
- package/dist/browser/react/NavigationProvider.d.ts +0 -63
- package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
- package/dist/browser/react/NavigationProvider.js +0 -216
- package/dist/browser/react/NavigationProvider.js.map +0 -1
- package/dist/browser/react/ScrollRestoration.d.ts +0 -75
- package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
- package/dist/browser/react/ScrollRestoration.js +0 -57
- package/dist/browser/react/ScrollRestoration.js.map +0 -1
- package/dist/browser/react/context.d.ts +0 -46
- package/dist/browser/react/context.d.ts.map +0 -1
- package/dist/browser/react/context.js +0 -10
- package/dist/browser/react/context.js.map +0 -1
- package/dist/browser/react/index.d.ts +0 -11
- package/dist/browser/react/index.d.ts.map +0 -1
- package/dist/browser/react/index.js +0 -22
- package/dist/browser/react/index.js.map +0 -1
- package/dist/browser/react/location-state-shared.d.ts +0 -63
- package/dist/browser/react/location-state-shared.d.ts.map +0 -1
- package/dist/browser/react/location-state-shared.js +0 -81
- package/dist/browser/react/location-state-shared.js.map +0 -1
- package/dist/browser/react/location-state.d.ts +0 -23
- package/dist/browser/react/location-state.d.ts.map +0 -1
- package/dist/browser/react/location-state.js +0 -29
- package/dist/browser/react/location-state.js.map +0 -1
- package/dist/browser/react/mount-context.d.ts +0 -24
- package/dist/browser/react/mount-context.d.ts.map +0 -1
- package/dist/browser/react/mount-context.js +0 -24
- package/dist/browser/react/mount-context.js.map +0 -1
- package/dist/browser/react/use-action.d.ts +0 -64
- package/dist/browser/react/use-action.d.ts.map +0 -1
- package/dist/browser/react/use-action.js +0 -134
- package/dist/browser/react/use-action.js.map +0 -1
- package/dist/browser/react/use-client-cache.d.ts +0 -41
- package/dist/browser/react/use-client-cache.d.ts.map +0 -1
- package/dist/browser/react/use-client-cache.js +0 -39
- package/dist/browser/react/use-client-cache.js.map +0 -1
- package/dist/browser/react/use-handle.d.ts +0 -31
- package/dist/browser/react/use-handle.d.ts.map +0 -1
- package/dist/browser/react/use-handle.js +0 -144
- package/dist/browser/react/use-handle.js.map +0 -1
- package/dist/browser/react/use-href.d.ts +0 -33
- package/dist/browser/react/use-href.d.ts.map +0 -1
- package/dist/browser/react/use-href.js +0 -39
- package/dist/browser/react/use-href.js.map +0 -1
- package/dist/browser/react/use-link-status.d.ts +0 -37
- package/dist/browser/react/use-link-status.d.ts.map +0 -1
- package/dist/browser/react/use-link-status.js +0 -99
- package/dist/browser/react/use-link-status.js.map +0 -1
- package/dist/browser/react/use-mount.d.ts +0 -25
- package/dist/browser/react/use-mount.d.ts.map +0 -1
- package/dist/browser/react/use-mount.js +0 -30
- package/dist/browser/react/use-mount.js.map +0 -1
- package/dist/browser/react/use-navigation.d.ts +0 -27
- package/dist/browser/react/use-navigation.d.ts.map +0 -1
- package/dist/browser/react/use-navigation.js +0 -87
- package/dist/browser/react/use-navigation.js.map +0 -1
- package/dist/browser/react/use-segments.d.ts +0 -38
- package/dist/browser/react/use-segments.d.ts.map +0 -1
- package/dist/browser/react/use-segments.js +0 -130
- package/dist/browser/react/use-segments.js.map +0 -1
- package/dist/browser/request-controller.d.ts +0 -26
- package/dist/browser/request-controller.d.ts.map +0 -1
- package/dist/browser/request-controller.js +0 -147
- package/dist/browser/request-controller.js.map +0 -1
- package/dist/browser/rsc-router.d.ts +0 -129
- package/dist/browser/rsc-router.d.ts.map +0 -1
- package/dist/browser/rsc-router.js +0 -195
- package/dist/browser/rsc-router.js.map +0 -1
- package/dist/browser/scroll-restoration.d.ts +0 -93
- package/dist/browser/scroll-restoration.d.ts.map +0 -1
- package/dist/browser/scroll-restoration.js +0 -321
- package/dist/browser/scroll-restoration.js.map +0 -1
- package/dist/browser/segment-structure-assert.d.ts +0 -17
- package/dist/browser/segment-structure-assert.d.ts.map +0 -1
- package/dist/browser/segment-structure-assert.js +0 -59
- package/dist/browser/segment-structure-assert.js.map +0 -1
- package/dist/browser/server-action-bridge.d.ts +0 -26
- package/dist/browser/server-action-bridge.d.ts.map +0 -1
- package/dist/browser/server-action-bridge.js +0 -668
- package/dist/browser/server-action-bridge.js.map +0 -1
- package/dist/browser/shallow.d.ts +0 -12
- package/dist/browser/shallow.d.ts.map +0 -1
- package/dist/browser/shallow.js +0 -34
- package/dist/browser/shallow.js.map +0 -1
- package/dist/browser/types.d.ts +0 -369
- package/dist/browser/types.d.ts.map +0 -1
- package/dist/browser/types.js +0 -2
- package/dist/browser/types.js.map +0 -1
- package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
- package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
- package/dist/build/__tests__/generate-cli.test.js +0 -237
- package/dist/build/__tests__/generate-cli.test.js.map +0 -1
- package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
- package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
- package/dist/build/__tests__/generate-manifest.test.js +0 -119
- package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
- package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
- package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
- package/dist/build/__tests__/generate-route-types.test.js +0 -620
- package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
- package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
- package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
- package/dist/build/__tests__/per-router-manifest.test.js +0 -308
- package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
- package/dist/build/generate-manifest.d.ts +0 -81
- package/dist/build/generate-manifest.d.ts.map +0 -1
- package/dist/build/generate-manifest.js +0 -276
- package/dist/build/generate-manifest.js.map +0 -1
- package/dist/build/generate-route-types.d.ts +0 -115
- package/dist/build/generate-route-types.d.ts.map +0 -1
- package/dist/build/generate-route-types.js +0 -740
- package/dist/build/generate-route-types.js.map +0 -1
- package/dist/build/index.d.ts +0 -21
- package/dist/build/index.d.ts.map +0 -1
- package/dist/build/index.js +0 -21
- package/dist/build/index.js.map +0 -1
- package/dist/build/route-trie.d.ts +0 -71
- package/dist/build/route-trie.d.ts.map +0 -1
- package/dist/build/route-trie.js +0 -175
- package/dist/build/route-trie.js.map +0 -1
- package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
- package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
- package/dist/cache/__tests__/cache-scope.test.js +0 -208
- package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
- package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
- package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
- package/dist/cache/__tests__/document-cache.test.js +0 -345
- package/dist/cache/__tests__/document-cache.test.js.map +0 -1
- package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
- package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
- package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
- package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
- package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
- package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
- package/dist/cache/__tests__/memory-store.test.js +0 -367
- package/dist/cache/__tests__/memory-store.test.js.map +0 -1
- package/dist/cache/cache-scope.d.ts +0 -102
- package/dist/cache/cache-scope.d.ts.map +0 -1
- package/dist/cache/cache-scope.js +0 -440
- package/dist/cache/cache-scope.js.map +0 -1
- package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
- package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
- package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
- package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
- package/dist/cache/cf/cf-cache-store.d.ts +0 -165
- package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
- package/dist/cache/cf/cf-cache-store.js +0 -242
- package/dist/cache/cf/cf-cache-store.js.map +0 -1
- package/dist/cache/cf/index.d.ts +0 -14
- package/dist/cache/cf/index.d.ts.map +0 -1
- package/dist/cache/cf/index.js +0 -17
- package/dist/cache/cf/index.js.map +0 -1
- package/dist/cache/document-cache.d.ts +0 -64
- package/dist/cache/document-cache.d.ts.map +0 -1
- package/dist/cache/document-cache.js +0 -228
- package/dist/cache/document-cache.js.map +0 -1
- package/dist/cache/index.d.ts +0 -19
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/cache/index.js +0 -21
- package/dist/cache/index.js.map +0 -1
- package/dist/cache/memory-segment-store.d.ts +0 -110
- package/dist/cache/memory-segment-store.d.ts.map +0 -1
- package/dist/cache/memory-segment-store.js +0 -117
- package/dist/cache/memory-segment-store.js.map +0 -1
- package/dist/cache/memory-store.d.ts +0 -41
- package/dist/cache/memory-store.d.ts.map +0 -1
- package/dist/cache/memory-store.js +0 -191
- package/dist/cache/memory-store.js.map +0 -1
- package/dist/cache/types.d.ts +0 -317
- package/dist/cache/types.d.ts.map +0 -1
- package/dist/cache/types.js +0 -12
- package/dist/cache/types.js.map +0 -1
- package/dist/client.d.ts +0 -248
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -367
- package/dist/client.js.map +0 -1
- package/dist/client.rsc.d.ts +0 -26
- package/dist/client.rsc.d.ts.map +0 -1
- package/dist/client.rsc.js +0 -46
- package/dist/client.rsc.js.map +0 -1
- package/dist/component-utils.d.ts +0 -36
- package/dist/component-utils.d.ts.map +0 -1
- package/dist/component-utils.js +0 -61
- package/dist/component-utils.js.map +0 -1
- package/dist/components/DefaultDocument.d.ts +0 -13
- package/dist/components/DefaultDocument.d.ts.map +0 -1
- package/dist/components/DefaultDocument.js +0 -15
- package/dist/components/DefaultDocument.js.map +0 -1
- package/dist/debug.d.ts +0 -58
- package/dist/debug.d.ts.map +0 -1
- package/dist/debug.js +0 -157
- package/dist/debug.js.map +0 -1
- package/dist/default-error-boundary.d.ts +0 -11
- package/dist/default-error-boundary.d.ts.map +0 -1
- package/dist/default-error-boundary.js +0 -45
- package/dist/default-error-boundary.js.map +0 -1
- package/dist/deps/browser.d.ts +0 -2
- package/dist/deps/browser.d.ts.map +0 -1
- package/dist/deps/browser.js +0 -3
- package/dist/deps/browser.js.map +0 -1
- package/dist/deps/html-stream-client.d.ts +0 -2
- package/dist/deps/html-stream-client.d.ts.map +0 -1
- package/dist/deps/html-stream-client.js +0 -3
- package/dist/deps/html-stream-client.js.map +0 -1
- package/dist/deps/html-stream-server.d.ts +0 -2
- package/dist/deps/html-stream-server.d.ts.map +0 -1
- package/dist/deps/html-stream-server.js +0 -3
- package/dist/deps/html-stream-server.js.map +0 -1
- package/dist/deps/rsc.d.ts +0 -2
- package/dist/deps/rsc.d.ts.map +0 -1
- package/dist/deps/rsc.js +0 -4
- package/dist/deps/rsc.js.map +0 -1
- package/dist/deps/ssr.d.ts +0 -2
- package/dist/deps/ssr.d.ts.map +0 -1
- package/dist/deps/ssr.js +0 -3
- package/dist/deps/ssr.js.map +0 -1
- package/dist/errors.d.ts +0 -174
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -241
- package/dist/errors.js.map +0 -1
- package/dist/handle.d.ts +0 -78
- package/dist/handle.d.ts.map +0 -1
- package/dist/handle.js +0 -82
- package/dist/handle.js.map +0 -1
- package/dist/handles/MetaTags.d.ts +0 -14
- package/dist/handles/MetaTags.d.ts.map +0 -1
- package/dist/handles/MetaTags.js +0 -136
- package/dist/handles/MetaTags.js.map +0 -1
- package/dist/handles/index.d.ts +0 -6
- package/dist/handles/index.d.ts.map +0 -1
- package/dist/handles/index.js +0 -6
- package/dist/handles/index.js.map +0 -1
- package/dist/handles/meta.d.ts +0 -39
- package/dist/handles/meta.d.ts.map +0 -1
- package/dist/handles/meta.js +0 -202
- package/dist/handles/meta.js.map +0 -1
- package/dist/host/__tests__/errors.test.d.ts +0 -2
- package/dist/host/__tests__/errors.test.d.ts.map +0 -1
- package/dist/host/__tests__/errors.test.js +0 -76
- package/dist/host/__tests__/errors.test.js.map +0 -1
- package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
- package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
- package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
- package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
- package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
- package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
- package/dist/host/__tests__/pattern-matcher.test.js +0 -251
- package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
- package/dist/host/__tests__/router.test.d.ts +0 -2
- package/dist/host/__tests__/router.test.d.ts.map +0 -1
- package/dist/host/__tests__/router.test.js +0 -241
- package/dist/host/__tests__/router.test.js.map +0 -1
- package/dist/host/__tests__/testing.test.d.ts +0 -2
- package/dist/host/__tests__/testing.test.d.ts.map +0 -1
- package/dist/host/__tests__/testing.test.js +0 -64
- package/dist/host/__tests__/testing.test.js.map +0 -1
- package/dist/host/__tests__/utils.test.d.ts +0 -2
- package/dist/host/__tests__/utils.test.d.ts.map +0 -1
- package/dist/host/__tests__/utils.test.js +0 -29
- package/dist/host/__tests__/utils.test.js.map +0 -1
- package/dist/host/cookie-handler.d.ts +0 -34
- package/dist/host/cookie-handler.d.ts.map +0 -1
- package/dist/host/cookie-handler.js +0 -124
- package/dist/host/cookie-handler.js.map +0 -1
- package/dist/host/errors.d.ts +0 -56
- package/dist/host/errors.d.ts.map +0 -1
- package/dist/host/errors.js +0 -79
- package/dist/host/errors.js.map +0 -1
- package/dist/host/index.d.ts +0 -29
- package/dist/host/index.d.ts.map +0 -1
- package/dist/host/index.js +0 -32
- package/dist/host/index.js.map +0 -1
- package/dist/host/pattern-matcher.d.ts +0 -36
- package/dist/host/pattern-matcher.d.ts.map +0 -1
- package/dist/host/pattern-matcher.js +0 -172
- package/dist/host/pattern-matcher.js.map +0 -1
- package/dist/host/router.d.ts +0 -26
- package/dist/host/router.d.ts.map +0 -1
- package/dist/host/router.js +0 -218
- package/dist/host/router.js.map +0 -1
- package/dist/host/testing.d.ts +0 -36
- package/dist/host/testing.d.ts.map +0 -1
- package/dist/host/testing.js +0 -55
- package/dist/host/testing.js.map +0 -1
- package/dist/host/types.d.ts +0 -115
- package/dist/host/types.d.ts.map +0 -1
- package/dist/host/types.js +0 -7
- package/dist/host/types.js.map +0 -1
- package/dist/host/utils.d.ts +0 -21
- package/dist/host/utils.d.ts.map +0 -1
- package/dist/host/utils.js +0 -23
- package/dist/host/utils.js.map +0 -1
- package/dist/href-client.d.ts +0 -131
- package/dist/href-client.d.ts.map +0 -1
- package/dist/href-client.js +0 -64
- package/dist/href-client.js.map +0 -1
- package/dist/href-context.d.ts +0 -29
- package/dist/href-context.d.ts.map +0 -1
- package/dist/href-context.js +0 -21
- package/dist/href-context.js.map +0 -1
- package/dist/index.d.ts +0 -73
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -91
- package/dist/index.js.map +0 -1
- package/dist/index.rsc.d.ts +0 -32
- package/dist/index.rsc.d.ts.map +0 -1
- package/dist/index.rsc.js +0 -40
- package/dist/index.rsc.js.map +0 -1
- package/dist/internal-debug.d.ts +0 -2
- package/dist/internal-debug.d.ts.map +0 -1
- package/dist/internal-debug.js +0 -5
- package/dist/internal-debug.js.map +0 -1
- package/dist/loader.d.ts +0 -14
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -20
- package/dist/loader.js.map +0 -1
- package/dist/loader.rsc.d.ts +0 -19
- package/dist/loader.rsc.d.ts.map +0 -1
- package/dist/loader.rsc.js +0 -99
- package/dist/loader.rsc.js.map +0 -1
- package/dist/network-error-thrower.d.ts +0 -17
- package/dist/network-error-thrower.d.ts.map +0 -1
- package/dist/network-error-thrower.js +0 -14
- package/dist/network-error-thrower.js.map +0 -1
- package/dist/outlet-context.d.ts +0 -13
- package/dist/outlet-context.d.ts.map +0 -1
- package/dist/outlet-context.js +0 -3
- package/dist/outlet-context.js.map +0 -1
- package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
- package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
- package/dist/prerender/__tests__/param-hash.test.js +0 -148
- package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
- package/dist/prerender/param-hash.d.ts +0 -16
- package/dist/prerender/param-hash.d.ts.map +0 -1
- package/dist/prerender/param-hash.js +0 -36
- package/dist/prerender/param-hash.js.map +0 -1
- package/dist/prerender/store.d.ts +0 -38
- package/dist/prerender/store.d.ts.map +0 -1
- package/dist/prerender/store.js +0 -61
- package/dist/prerender/store.js.map +0 -1
- package/dist/prerender.d.ts +0 -66
- package/dist/prerender.d.ts.map +0 -1
- package/dist/prerender.js +0 -57
- package/dist/prerender.js.map +0 -1
- package/dist/reverse.d.ts +0 -196
- package/dist/reverse.d.ts.map +0 -1
- package/dist/reverse.js +0 -78
- package/dist/reverse.js.map +0 -1
- package/dist/root-error-boundary.d.ts +0 -33
- package/dist/root-error-boundary.d.ts.map +0 -1
- package/dist/root-error-boundary.js +0 -165
- package/dist/root-error-boundary.js.map +0 -1
- package/dist/route-content-wrapper.d.ts +0 -46
- package/dist/route-content-wrapper.d.ts.map +0 -1
- package/dist/route-content-wrapper.js +0 -77
- package/dist/route-content-wrapper.js.map +0 -1
- package/dist/route-definition.d.ts +0 -421
- package/dist/route-definition.d.ts.map +0 -1
- package/dist/route-definition.js +0 -868
- package/dist/route-definition.js.map +0 -1
- package/dist/route-map-builder.d.ts +0 -155
- package/dist/route-map-builder.d.ts.map +0 -1
- package/dist/route-map-builder.js +0 -237
- package/dist/route-map-builder.js.map +0 -1
- package/dist/route-types.d.ts +0 -165
- package/dist/route-types.d.ts.map +0 -1
- package/dist/route-types.js +0 -7
- package/dist/route-types.js.map +0 -1
- package/dist/router/__tests__/handler-context.test.d.ts +0 -2
- package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
- package/dist/router/__tests__/handler-context.test.js +0 -65
- package/dist/router/__tests__/handler-context.test.js.map +0 -1
- package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
- package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
- package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
- package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
- package/dist/router/__tests__/match-context.test.d.ts +0 -2
- package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
- package/dist/router/__tests__/match-context.test.js +0 -92
- package/dist/router/__tests__/match-context.test.js.map +0 -1
- package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
- package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
- package/dist/router/__tests__/match-pipelines.test.js +0 -417
- package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
- package/dist/router/__tests__/match-result.test.d.ts +0 -2
- package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
- package/dist/router/__tests__/match-result.test.js +0 -457
- package/dist/router/__tests__/match-result.test.js.map +0 -1
- package/dist/router/__tests__/on-error.test.d.ts +0 -2
- package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
- package/dist/router/__tests__/on-error.test.js +0 -678
- package/dist/router/__tests__/on-error.test.js.map +0 -1
- package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
- package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
- package/dist/router/__tests__/pattern-matching.test.js +0 -629
- package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
- package/dist/router/error-handling.d.ts +0 -77
- package/dist/router/error-handling.d.ts.map +0 -1
- package/dist/router/error-handling.js +0 -202
- package/dist/router/error-handling.js.map +0 -1
- package/dist/router/handler-context.d.ts +0 -20
- package/dist/router/handler-context.d.ts.map +0 -1
- package/dist/router/handler-context.js +0 -198
- package/dist/router/handler-context.js.map +0 -1
- package/dist/router/intercept-resolution.d.ts +0 -66
- package/dist/router/intercept-resolution.d.ts.map +0 -1
- package/dist/router/intercept-resolution.js +0 -246
- package/dist/router/intercept-resolution.js.map +0 -1
- package/dist/router/loader-resolution.d.ts +0 -64
- package/dist/router/loader-resolution.d.ts.map +0 -1
- package/dist/router/loader-resolution.js +0 -284
- package/dist/router/loader-resolution.js.map +0 -1
- package/dist/router/logging.d.ts +0 -15
- package/dist/router/logging.d.ts.map +0 -1
- package/dist/router/logging.js +0 -99
- package/dist/router/logging.js.map +0 -1
- package/dist/router/manifest.d.ts +0 -22
- package/dist/router/manifest.d.ts.map +0 -1
- package/dist/router/manifest.js +0 -181
- package/dist/router/manifest.js.map +0 -1
- package/dist/router/match-api.d.ts +0 -35
- package/dist/router/match-api.d.ts.map +0 -1
- package/dist/router/match-api.js +0 -406
- package/dist/router/match-api.js.map +0 -1
- package/dist/router/match-context.d.ts +0 -206
- package/dist/router/match-context.d.ts.map +0 -1
- package/dist/router/match-context.js +0 -17
- package/dist/router/match-context.js.map +0 -1
- package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
- package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
- package/dist/router/match-middleware/background-revalidation.js +0 -75
- package/dist/router/match-middleware/background-revalidation.js.map +0 -1
- package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
- package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
- package/dist/router/match-middleware/cache-lookup.js +0 -257
- package/dist/router/match-middleware/cache-lookup.js.map +0 -1
- package/dist/router/match-middleware/cache-store.d.ts +0 -113
- package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
- package/dist/router/match-middleware/cache-store.js +0 -108
- package/dist/router/match-middleware/cache-store.js.map +0 -1
- package/dist/router/match-middleware/index.d.ts +0 -81
- package/dist/router/match-middleware/index.d.ts.map +0 -1
- package/dist/router/match-middleware/index.js +0 -80
- package/dist/router/match-middleware/index.js.map +0 -1
- package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
- package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
- package/dist/router/match-middleware/intercept-resolution.js +0 -134
- package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
- package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
- package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
- package/dist/router/match-middleware/segment-resolution.js +0 -53
- package/dist/router/match-middleware/segment-resolution.js.map +0 -1
- package/dist/router/match-pipelines.d.ts +0 -147
- package/dist/router/match-pipelines.d.ts.map +0 -1
- package/dist/router/match-pipelines.js +0 -82
- package/dist/router/match-pipelines.js.map +0 -1
- package/dist/router/match-result.d.ts +0 -126
- package/dist/router/match-result.d.ts.map +0 -1
- package/dist/router/match-result.js +0 -93
- package/dist/router/match-result.js.map +0 -1
- package/dist/router/metrics.d.ts +0 -20
- package/dist/router/metrics.d.ts.map +0 -1
- package/dist/router/metrics.js +0 -47
- package/dist/router/metrics.js.map +0 -1
- package/dist/router/middleware.d.ts +0 -249
- package/dist/router/middleware.d.ts.map +0 -1
- package/dist/router/middleware.js +0 -434
- package/dist/router/middleware.js.map +0 -1
- package/dist/router/middleware.test.d.ts +0 -2
- package/dist/router/middleware.test.d.ts.map +0 -1
- package/dist/router/middleware.test.js +0 -816
- package/dist/router/middleware.test.js.map +0 -1
- package/dist/router/pattern-matching.d.ts +0 -149
- package/dist/router/pattern-matching.d.ts.map +0 -1
- package/dist/router/pattern-matching.js +0 -349
- package/dist/router/pattern-matching.js.map +0 -1
- package/dist/router/revalidation.d.ts +0 -44
- package/dist/router/revalidation.d.ts.map +0 -1
- package/dist/router/revalidation.js +0 -147
- package/dist/router/revalidation.js.map +0 -1
- package/dist/router/router-context.d.ts +0 -135
- package/dist/router/router-context.d.ts.map +0 -1
- package/dist/router/router-context.js +0 -36
- package/dist/router/router-context.js.map +0 -1
- package/dist/router/segment-resolution.d.ts +0 -127
- package/dist/router/segment-resolution.d.ts.map +0 -1
- package/dist/router/segment-resolution.js +0 -919
- package/dist/router/segment-resolution.js.map +0 -1
- package/dist/router/trie-matching.d.ts +0 -40
- package/dist/router/trie-matching.d.ts.map +0 -1
- package/dist/router/trie-matching.js +0 -127
- package/dist/router/trie-matching.js.map +0 -1
- package/dist/router/types.d.ts +0 -136
- package/dist/router/types.d.ts.map +0 -1
- package/dist/router/types.js +0 -7
- package/dist/router/types.js.map +0 -1
- package/dist/router.d.ts +0 -753
- package/dist/router.d.ts.map +0 -1
- package/dist/router.gen.d.ts +0 -6
- package/dist/router.gen.d.ts.map +0 -1
- package/dist/router.gen.js +0 -6
- package/dist/router.gen.js.map +0 -1
- package/dist/router.js +0 -1304
- package/dist/router.js.map +0 -1
- package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
- package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
- package/dist/rsc/__tests__/helpers.test.js +0 -140
- package/dist/rsc/__tests__/helpers.test.js.map +0 -1
- package/dist/rsc/handler.d.ts +0 -45
- package/dist/rsc/handler.d.ts.map +0 -1
- package/dist/rsc/handler.js +0 -1172
- package/dist/rsc/handler.js.map +0 -1
- package/dist/rsc/helpers.d.ts +0 -16
- package/dist/rsc/helpers.d.ts.map +0 -1
- package/dist/rsc/helpers.js +0 -55
- package/dist/rsc/helpers.js.map +0 -1
- package/dist/rsc/index.d.ts +0 -22
- package/dist/rsc/index.d.ts.map +0 -1
- package/dist/rsc/index.js +0 -23
- package/dist/rsc/index.js.map +0 -1
- package/dist/rsc/nonce.d.ts +0 -9
- package/dist/rsc/nonce.d.ts.map +0 -1
- package/dist/rsc/nonce.js +0 -18
- package/dist/rsc/nonce.js.map +0 -1
- package/dist/rsc/types.d.ts +0 -206
- package/dist/rsc/types.d.ts.map +0 -1
- package/dist/rsc/types.js +0 -8
- package/dist/rsc/types.js.map +0 -1
- package/dist/search-params.d.ts +0 -103
- package/dist/search-params.d.ts.map +0 -1
- package/dist/search-params.js +0 -74
- package/dist/search-params.js.map +0 -1
- package/dist/segment-system.d.ts +0 -75
- package/dist/segment-system.d.ts.map +0 -1
- package/dist/segment-system.js +0 -336
- package/dist/segment-system.js.map +0 -1
- package/dist/server/context.d.ts +0 -245
- package/dist/server/context.d.ts.map +0 -1
- package/dist/server/context.js +0 -197
- package/dist/server/context.js.map +0 -1
- package/dist/server/fetchable-loader-store.d.ts +0 -18
- package/dist/server/fetchable-loader-store.d.ts.map +0 -1
- package/dist/server/fetchable-loader-store.js +0 -18
- package/dist/server/fetchable-loader-store.js.map +0 -1
- package/dist/server/handle-store.d.ts +0 -85
- package/dist/server/handle-store.d.ts.map +0 -1
- package/dist/server/handle-store.js +0 -142
- package/dist/server/handle-store.js.map +0 -1
- package/dist/server/loader-registry.d.ts +0 -55
- package/dist/server/loader-registry.d.ts.map +0 -1
- package/dist/server/loader-registry.js +0 -132
- package/dist/server/loader-registry.js.map +0 -1
- package/dist/server/request-context.d.ts +0 -226
- package/dist/server/request-context.d.ts.map +0 -1
- package/dist/server/request-context.js +0 -290
- package/dist/server/request-context.js.map +0 -1
- package/dist/server/root-layout.d.ts +0 -4
- package/dist/server/root-layout.d.ts.map +0 -1
- package/dist/server/root-layout.js +0 -5
- package/dist/server/root-layout.js.map +0 -1
- package/dist/server.d.ts +0 -15
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -20
- package/dist/server.js.map +0 -1
- package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
- package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
- package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
- package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
- package/dist/ssr/index.d.ts +0 -98
- package/dist/ssr/index.d.ts.map +0 -1
- package/dist/ssr/index.js +0 -158
- package/dist/ssr/index.js.map +0 -1
- package/dist/static-handler.d.ts +0 -50
- package/dist/static-handler.d.ts.map +0 -1
- package/dist/static-handler.gen.d.ts +0 -5
- package/dist/static-handler.gen.d.ts.map +0 -1
- package/dist/static-handler.gen.js +0 -5
- package/dist/static-handler.gen.js.map +0 -1
- package/dist/static-handler.js +0 -29
- package/dist/static-handler.js.map +0 -1
- package/dist/theme/ThemeProvider.d.ts +0 -20
- package/dist/theme/ThemeProvider.d.ts.map +0 -1
- package/dist/theme/ThemeProvider.js +0 -240
- package/dist/theme/ThemeProvider.js.map +0 -1
- package/dist/theme/ThemeScript.d.ts +0 -48
- package/dist/theme/ThemeScript.d.ts.map +0 -1
- package/dist/theme/ThemeScript.js +0 -13
- package/dist/theme/ThemeScript.js.map +0 -1
- package/dist/theme/__tests__/theme.test.d.ts +0 -2
- package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
- package/dist/theme/__tests__/theme.test.js +0 -103
- package/dist/theme/__tests__/theme.test.js.map +0 -1
- package/dist/theme/constants.d.ts +0 -29
- package/dist/theme/constants.d.ts.map +0 -1
- package/dist/theme/constants.js +0 -48
- package/dist/theme/constants.js.map +0 -1
- package/dist/theme/index.d.ts +0 -31
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -36
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/theme-context.d.ts +0 -40
- package/dist/theme/theme-context.d.ts.map +0 -1
- package/dist/theme/theme-context.js +0 -60
- package/dist/theme/theme-context.js.map +0 -1
- package/dist/theme/theme-script.d.ts +0 -27
- package/dist/theme/theme-script.d.ts.map +0 -1
- package/dist/theme/theme-script.js +0 -147
- package/dist/theme/theme-script.js.map +0 -1
- package/dist/theme/types.d.ts +0 -163
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme/types.js +0 -11
- package/dist/theme/types.js.map +0 -1
- package/dist/theme/use-theme.d.ts +0 -12
- package/dist/theme/use-theme.d.ts.map +0 -1
- package/dist/theme/use-theme.js +0 -40
- package/dist/theme/use-theme.js.map +0 -1
- package/dist/types.d.ts +0 -1479
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +0 -1
- package/dist/urls.d.ts +0 -441
- package/dist/urls.d.ts.map +0 -1
- package/dist/urls.gen.d.ts +0 -8
- package/dist/urls.gen.d.ts.map +0 -1
- package/dist/urls.gen.js +0 -8
- package/dist/urls.gen.js.map +0 -1
- package/dist/urls.js +0 -443
- package/dist/urls.js.map +0 -1
- package/dist/use-loader.d.ts +0 -127
- package/dist/use-loader.d.ts.map +0 -1
- package/dist/use-loader.js +0 -237
- package/dist/use-loader.js.map +0 -1
- package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
- package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
- package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
- package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
- package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
- package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
- package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
- package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
- package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
- package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
- package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
- package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
- package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
- package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
- package/dist/vite/__tests__/expose-router-id.test.js +0 -39
- package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
- package/dist/vite/ast-handler-extract.d.ts +0 -49
- package/dist/vite/ast-handler-extract.d.ts.map +0 -1
- package/dist/vite/ast-handler-extract.js +0 -249
- package/dist/vite/ast-handler-extract.js.map +0 -1
- package/dist/vite/expose-action-id.d.ts +0 -19
- package/dist/vite/expose-action-id.d.ts.map +0 -1
- package/dist/vite/expose-action-id.js +0 -250
- package/dist/vite/expose-action-id.js.map +0 -1
- package/dist/vite/expose-id-utils.d.ts +0 -69
- package/dist/vite/expose-id-utils.d.ts.map +0 -1
- package/dist/vite/expose-id-utils.js +0 -289
- package/dist/vite/expose-id-utils.js.map +0 -1
- package/dist/vite/expose-internal-ids.d.ts +0 -22
- package/dist/vite/expose-internal-ids.d.ts.map +0 -1
- package/dist/vite/expose-internal-ids.js +0 -886
- package/dist/vite/expose-internal-ids.js.map +0 -1
- package/dist/vite/index.d.ts +0 -149
- package/dist/vite/index.d.ts.map +0 -1
- package/dist/vite/index.js.bak +0 -5448
- package/dist/vite/index.js.map +0 -1
- package/dist/vite/index.named-routes.gen.ts +0 -103
- package/dist/vite/package-resolution.d.ts +0 -43
- package/dist/vite/package-resolution.d.ts.map +0 -1
- package/dist/vite/package-resolution.js +0 -112
- package/dist/vite/package-resolution.js.map +0 -1
- package/dist/vite/virtual-entries.d.ts +0 -25
- package/dist/vite/virtual-entries.d.ts.map +0 -1
- package/dist/vite/virtual-entries.js +0 -110
- package/dist/vite/virtual-entries.js.map +0 -1
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
* scopes are in play:
|
|
11
11
|
* - Wildcard (default): built by `buildPrefetchKey(rangoState, target)` —
|
|
12
12
|
* shape `rangoState\0/target?...`. Shared across all source pages and
|
|
13
|
-
*
|
|
14
|
-
* server-action invalidation).
|
|
13
|
+
* source segment trees; `_rsc_segments` is omitted from this key. Invalidated
|
|
14
|
+
* automatically when Rango state bumps (deploy or server-action invalidation).
|
|
15
15
|
* - Source-scoped: built by `buildSourceKey(rangoState, sourceHref, target)`
|
|
16
16
|
* — shape `rangoState\0sourceHref\0/target?...`. Embeds the Rango state
|
|
17
|
-
* (so rotation invalidates source-scoped entries too)
|
|
18
|
-
*
|
|
17
|
+
* (so rotation invalidates source-scoped entries too), the source href, and
|
|
18
|
+
* the exact source segment tree. Populated when the
|
|
19
19
|
* server tags a response with `X-RSC-Prefetch-Scope: source` (intercept
|
|
20
20
|
* modals etc.), OR when a Link opts in with `prefetchKey=":source"` — in
|
|
21
21
|
* both cases so source-sensitive responses cannot bleed into navigations
|
|
@@ -91,7 +91,9 @@ export declare function isPrefetchCacheDisabled(): boolean;
|
|
|
91
91
|
* - Wildcard (source-agnostic): prefix is the Rango state value from
|
|
92
92
|
* `getRangoState()`. Shared across all source pages. Invalidated
|
|
93
93
|
* automatically when Rango state bumps (deploy or server-action).
|
|
94
|
-
*
|
|
94
|
+
* `_rsc_segments` is omitted so sibling payloads prefetched from one page
|
|
95
|
+
* remain reusable after another prefetched navigation commits. Key shape:
|
|
96
|
+
* `rangoState\0/target?...`.
|
|
95
97
|
* - Source-scoped: use `buildSourceKey()`. Key shape:
|
|
96
98
|
* `rangoState\0sourceHref\0/target?...` — embeds the Rango state so
|
|
97
99
|
* rotation invalidates source-scoped entries alongside wildcard ones,
|
|
@@ -100,9 +102,10 @@ export declare function isPrefetchCacheDisabled(): boolean;
|
|
|
100
102
|
* `X-RSC-Prefetch-Scope: source` (intercept modals, etc.) or when a
|
|
101
103
|
* Link opts in via `prefetchKey=":source"`.
|
|
102
104
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
105
|
+
* Source-scoped keys retain `_rsc_segments` because their exact source tree is
|
|
106
|
+
* part of the opt-in contract. Wildcard responses are source-agnostic by
|
|
107
|
+
* contract; callers use source scope when a custom revalidation decision makes
|
|
108
|
+
* the response depend on the current URL or segment tree.
|
|
106
109
|
*/
|
|
107
110
|
export declare function buildPrefetchKey(prefix: string, targetUrl: URL): string;
|
|
108
111
|
/**
|
|
@@ -30,6 +30,8 @@ import type { KVNamespace, CFCacheReadDebugEvent, CFCacheDebug, CFCacheStoreOpti
|
|
|
30
30
|
export type { KVNamespace, CFCacheReadDebugEvent, CFCacheDebug, CFCacheStoreOptions, };
|
|
31
31
|
export declare class CFCacheStore<TEnv = unknown> implements SegmentCacheStore<TEnv> {
|
|
32
32
|
readonly supportsPassiveShellReads: true;
|
|
33
|
+
/** True when constructed without KV: the shell family no-ops (see ctor). */
|
|
34
|
+
readonly shellFamilyInert?: boolean;
|
|
33
35
|
readonly defaults?: CacheDefaults;
|
|
34
36
|
readonly keyGenerator?: (ctx: RequestContext<TEnv>, defaultKey: string) => string | Promise<string>;
|
|
35
37
|
private readonly namespace?;
|
|
@@ -25,13 +25,14 @@ export interface ReadThroughItemConfig<T> {
|
|
|
25
25
|
/** Execute the underlying function/loader on miss or revalidation */
|
|
26
26
|
execute: () => Promise<T>;
|
|
27
27
|
/**
|
|
28
|
-
* Optional wrapper applied to
|
|
29
|
-
*
|
|
30
|
-
* is already established
|
|
31
|
-
* a detached waitUntil task loses on workerd
|
|
32
|
-
*
|
|
28
|
+
* Optional wrapper applied to the WHOLE background stale-revalidation task
|
|
29
|
+
* (execute + serialize + setItem) — not the foreground miss, where the
|
|
30
|
+
* caller's context is already established. Used to re-establish the
|
|
31
|
+
* request-context ALS, which a detached waitUntil task loses on workerd,
|
|
32
|
+
* and to open the rango.background span so the write is covered too.
|
|
33
|
+
* Defaults to running the task directly.
|
|
33
34
|
*/
|
|
34
|
-
wrapBackground?: (run: () => Promise<
|
|
35
|
+
wrapBackground?: (run: () => Promise<void>) => Promise<void>;
|
|
35
36
|
/** Serialize result for storage. Return null to skip caching. */
|
|
36
37
|
serialize: (data: T) => Promise<string | null>;
|
|
37
38
|
/** Deserialize cached value back to the original type */
|
|
@@ -164,6 +164,15 @@ export interface SegmentCacheStore<TEnv = unknown> {
|
|
|
164
164
|
* `stored` when acknowledged, or void for stores without acknowledgements.
|
|
165
165
|
*/
|
|
166
166
|
putShell?(key: string, entry: ShellCacheEntry, ttlSeconds?: number, swrSeconds?: number, tags?: string[]): Promise<"stored" | "invalidated" | void>;
|
|
167
|
+
/**
|
|
168
|
+
* Declares the shell family present-but-inert: getShell/putShell exist but
|
|
169
|
+
* no-op (CFCacheStore without a KV namespace). scheduleShellCapture skips
|
|
170
|
+
* captures whose only write target is inert — the background render would be
|
|
171
|
+
* dead work that still occupies the per-isolate serialized capture queue
|
|
172
|
+
* (a promise-heavy route bakes for seconds per MISS with nothing stored).
|
|
173
|
+
* Absent/false means the family, when present, actually stores.
|
|
174
|
+
*/
|
|
175
|
+
shellFamilyInert?: boolean;
|
|
167
176
|
/**
|
|
168
177
|
* Get a cached function result by key.
|
|
169
178
|
* Returns the serialized value, optional handle data, and staleness flag.
|
|
@@ -221,8 +230,8 @@ export interface CacheItemResult {
|
|
|
221
230
|
/**
|
|
222
231
|
* A cached PPR (Partial Pre-rendering) shell entry.
|
|
223
232
|
*
|
|
224
|
-
*
|
|
225
|
-
* and React's postponed state — because the pair is version- and
|
|
233
|
+
* A DOCUMENT entry carries BOTH artifacts a resume needs — the rendered HTML
|
|
234
|
+
* prelude and React's postponed state — because the pair is version- and
|
|
226
235
|
* generation-coupled and must never be mixed across a React upgrade or a build
|
|
227
236
|
* change. The reactVersion and buildVersion fields are the read-time gates that
|
|
228
237
|
* enforce both halves: isValidShellHit (rsc/shell-serve.ts) treats an entry
|
|
@@ -231,15 +240,28 @@ export interface CacheItemResult {
|
|
|
231
240
|
* positions against one exact tree; resuming it against a different React or a
|
|
232
241
|
* different app build tree-mismatches inside resume(), AFTER the 200 + prelude
|
|
233
242
|
* are committed — an unrecoverable broken serve).
|
|
243
|
+
*
|
|
244
|
+
* A `navigationOnly` entry stores NEITHER half: nothing ever serves its HTML
|
|
245
|
+
* (document serving skips navigationOnly entries at the read gate, and partial
|
|
246
|
+
* replay consumes only `snapshot`/`docKey`), so the prelude would ride every
|
|
247
|
+
* store write and read as dead weight at KV-value scale. The capture still runs
|
|
248
|
+
* the full fizz prerender — it is the completeness arbiter and sanity gate —
|
|
249
|
+
* but its output is dropped before putShell. hasIntactShellPayload is the
|
|
250
|
+
* document-half gate; navigationOnly entries never satisfy it.
|
|
234
251
|
*/
|
|
235
252
|
export interface ShellCacheEntry {
|
|
236
|
-
/**
|
|
237
|
-
|
|
253
|
+
/**
|
|
254
|
+
* Rendered HTML prelude bytes, base64-encoded (stores are JSON-serializing).
|
|
255
|
+
* Absent on `navigationOnly` entries (no document half is stored — see the
|
|
256
|
+
* interface doc); present on every document-servable entry.
|
|
257
|
+
*/
|
|
258
|
+
prelude?: string;
|
|
238
259
|
/**
|
|
239
260
|
* JSON.stringify of React's postponed state, or null when the shell settled
|
|
240
|
-
* with no holes (the DATA variant — served without a fizz resume).
|
|
261
|
+
* with no holes (the DATA variant — served without a fizz resume). Absent
|
|
262
|
+
* exactly when `prelude` is (navigationOnly entries).
|
|
241
263
|
*/
|
|
242
|
-
postponed
|
|
264
|
+
postponed?: string | null;
|
|
243
265
|
/** React.version captured at prerender time; the read-time invalidation gate. */
|
|
244
266
|
reactVersion: string;
|
|
245
267
|
/**
|
|
@@ -322,6 +344,17 @@ export interface ShellCacheEntry {
|
|
|
322
344
|
/** Capture-generation start time; tag invalidations at or after it win. */
|
|
323
345
|
createdAt: number;
|
|
324
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* A shell entry whose document half is present — what the document HIT path
|
|
349
|
+
* (serveShellHit / lookupBuildShell) consumes. hasIntactShellPayload
|
|
350
|
+
* (rsc/shell-serve.ts) is the runtime gate AND the type narrowing to this
|
|
351
|
+
* shape; navigationOnly entries never pass it (their document half is not
|
|
352
|
+
* stored).
|
|
353
|
+
*/
|
|
354
|
+
export type DocumentShellCacheEntry = ShellCacheEntry & {
|
|
355
|
+
prelude: string;
|
|
356
|
+
postponed: string | null;
|
|
357
|
+
};
|
|
325
358
|
/**
|
|
326
359
|
* The families a shell snapshot pins. The item/segment/response families are
|
|
327
360
|
* cache-store reads/writes (recorded by RecordingShellStore); the loader family
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cloudflare custom-spans integration.
|
|
3
3
|
*
|
|
4
|
-
* Bridges the router's
|
|
5
|
-
*
|
|
6
|
-
* up in the trace waterfall and OpenTelemetry exports next
|
|
7
|
-
* automatic spans (KV reads, D1 queries, fetch calls), with
|
|
4
|
+
* Bridges the router's observable phases (request, middleware, action, loaders,
|
|
5
|
+
* handler, render, ssr, response, background) onto Cloudflare Workers custom
|
|
6
|
+
* spans so they show up in the trace waterfall and OpenTelemetry exports next
|
|
7
|
+
* to the platform's automatic spans (KV reads, D1 queries, fetch calls), with
|
|
8
|
+
* correct nesting.
|
|
8
9
|
*
|
|
9
10
|
* Usage (Cloudflare preset only):
|
|
10
11
|
*
|
|
@@ -27,12 +28,15 @@
|
|
|
27
28
|
*
|
|
28
29
|
* Span duration note: enterSpan ends a span when its callback's returned value
|
|
29
30
|
* (or promise) settles. For the streaming phases (request/render/ssr) that is at
|
|
30
|
-
* stream CONSTRUCTION, not body-drain.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
31
|
+
* stream CONSTRUCTION, not body-drain; rango.response marks that handoff
|
|
32
|
+
* boundary explicitly (it wraps only response finalization, never the body).
|
|
33
|
+
* Instrumentation is best-effort and never wraps or buffers the response body,
|
|
34
|
+
* so it cannot regress streaming or latency. A loader/Suspense child that
|
|
35
|
+
* resolves mid-stream therefore keeps a rango.loader span that can extend past
|
|
36
|
+
* its render parent — overlapping spans are valid. Uses only the typed enterSpan
|
|
37
|
+
* API; spans bound work up to stream-handoff, matching the co-emitted perf
|
|
38
|
+
* metric. On deployed Workers a rango.response span may report 0 ms (non-I/O
|
|
39
|
+
* timers are frozen); its position and attributes are the value.
|
|
36
40
|
*/
|
|
37
41
|
import { type RouterTracingConfig, type TracingToggleOptions } from "../router/tracing.js";
|
|
38
42
|
/**
|
|
@@ -44,8 +48,8 @@ export type CloudflareTracingOptions = TracingToggleOptions;
|
|
|
44
48
|
/**
|
|
45
49
|
* Create the tracing config for a Cloudflare router. Pass the result to
|
|
46
50
|
* `createRouter({ tracing })`. Spans are emitted for the request, middleware,
|
|
47
|
-
* action, loaders, handler, render, and
|
|
48
|
-
* individual phases off.
|
|
51
|
+
* action, loaders, handler, render, ssr, response, and background phases; pass
|
|
52
|
+
* `spans` to turn individual phases off.
|
|
49
53
|
*
|
|
50
54
|
* @see createOTelTracing (`@rangojs/router`) for the same slot on any platform
|
|
51
55
|
* with an OpenTelemetry SDK.
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
* The router exposes the same work on three surfaces, and the rule is: each
|
|
6
6
|
* surface has exactly one owner here, so they cannot drift.
|
|
7
7
|
*
|
|
8
|
-
* - observePhase(): a span of work.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* decomposition (request, middleware) pass `metric: false` and get the span
|
|
14
|
-
* only — still co-located, still one owner per surface.
|
|
8
|
+
* - observePhase(): a span of work. From one wrap site, emits the platform
|
|
9
|
+
* span (tracing runner -> Cloudflare custom spans / OTel) and, when the
|
|
10
|
+
* phase has one, its `debugPerformance` metric (metrics store -> [RSC Perf]
|
|
11
|
+
* timeline + Server-Timing). Phases that meter their own perf metric with a
|
|
12
|
+
* finer decomposition, or are deliberately span-only, pass `metric: false`.
|
|
15
13
|
* - observeEvent(): a discrete fact (TelemetrySink): cache decisions,
|
|
16
14
|
* revalidation decisions, handler errors, timeouts, origin rejections.
|
|
17
15
|
* Event-shaped, not phase-shaped — derived from the same call sites but a
|
|
@@ -59,6 +57,11 @@ export interface PhaseSpec {
|
|
|
59
57
|
*/
|
|
60
58
|
lazyAttributes?: () => Record<string, string | number | boolean> | undefined;
|
|
61
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* The detached background lanes wrapped by the rango.background span (the
|
|
62
|
+
* `rango.background.kind` attribute). One name per task execution boundary.
|
|
63
|
+
*/
|
|
64
|
+
export type BackgroundTaskKind = "shell-capture" | "document-revalidation" | "loader-revalidation" | "use-cache-revalidation";
|
|
62
65
|
/**
|
|
63
66
|
* The router's observable phases. One definition per phase keeps the `rango.*`
|
|
64
67
|
* span names, perf-metric labels, and identifying attributes from spreading
|
|
@@ -99,6 +102,32 @@ export declare const PHASES: {
|
|
|
99
102
|
/** SSR HTML render from the RSC stream. Colon-delimited like the other ssr:*
|
|
100
103
|
* setup metrics (ssr:module-load / ssr:stream-mode). */
|
|
101
104
|
readonly ssr: PhaseSpec;
|
|
105
|
+
/**
|
|
106
|
+
* One detached background task (waitUntil work that outlives the response):
|
|
107
|
+
* a PPR shell capture or an SWR background revalidation. The wrapper is the
|
|
108
|
+
* explanatory parent for everything the task does — the platform's automatic
|
|
109
|
+
* KV/fetch/cache spans, and (for the revalidation lanes) the re-run's own
|
|
110
|
+
* rango.* phase spans — so post-handoff work never appears as orphan spans
|
|
111
|
+
* dangling under an ended foreground phase. `kind` identifies the lane.
|
|
112
|
+
* Span only (metric:false): the perf timeline is finalized with the
|
|
113
|
+
* response, so a background metric could never reach it. The shell-capture
|
|
114
|
+
* lane keeps its INNER phase spans suppressed (derived context strips
|
|
115
|
+
* _tracing — a capture re-render duplicating the foreground's span set was
|
|
116
|
+
* the original #670 leak); the revalidation lanes keep theirs, nested here.
|
|
117
|
+
*/
|
|
118
|
+
readonly background: (kind: BackgroundTaskKind) => PhaseSpec;
|
|
119
|
+
/** Final response construction + host handoff: opened AFTER downstream
|
|
120
|
+
* middleware/core execution returns a Response, wrapping only finalization
|
|
121
|
+
* (redirect interception/guarding, Server-Timing mutation, final response
|
|
122
|
+
* selection) and ending immediately before the router handler returns the
|
|
123
|
+
* response to the host. Handoff-bound, never drain-bound — it must never
|
|
124
|
+
* read, tee, buffer, or await response.body, so it cannot regress streaming.
|
|
125
|
+
* At most one per traced request; absent when the request throws before a
|
|
126
|
+
* response exists. Span only (metric:false) — a co-emitted metric would
|
|
127
|
+
* circularly mutate the Server-Timing header this phase itself finalizes.
|
|
128
|
+
* On Cloudflare it may report 0 ms (non-I/O timers are frozen); its position
|
|
129
|
+
* and attributes (status/mode/body kind, set by the handler) are the value. */
|
|
130
|
+
readonly response: PhaseSpec;
|
|
102
131
|
};
|
|
103
132
|
/**
|
|
104
133
|
* Instrument one unit of work: open its span AND (unless `metric: false`) record
|
|
@@ -108,14 +137,15 @@ export declare const PHASES: {
|
|
|
108
137
|
* returns a promise both the metric duration and the span end when it settles.
|
|
109
138
|
*
|
|
110
139
|
* This is the ONLY phase primitive: every phase (request/middleware/action/
|
|
111
|
-
* loader/handler/render/ssr)
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* really did take that
|
|
140
|
+
* loader/handler/render/ssr/response/background) settles when fn's own work
|
|
141
|
+
* completes. For streaming phases that means when the RSC/HTML stream is
|
|
142
|
+
* constructed, NOT when the body drains; for response, when finalization hands
|
|
143
|
+
* the stream to the host. Instrumentation is strictly best-effort: it never
|
|
144
|
+
* wraps or buffers the response and adds no work on the streaming path, so it
|
|
145
|
+
* cannot regress response latency or streaming. A loader that resolves while
|
|
146
|
+
* the body streams therefore keeps a rango.loader span that may extend past its
|
|
147
|
+
* render parent — overlapping spans are valid; the loader really did take that
|
|
148
|
+
* long.
|
|
119
149
|
*
|
|
120
150
|
* Reads the metrics store + tracing off the RequestContext ALS, which is active
|
|
121
151
|
* for the WHOLE request — contrast observeEvent, which reads the RouterContext
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* - createOTelTracing(tracer): the OTel adapter for the `tracing` SLOT — the
|
|
7
7
|
* canonical phase-span layer. It bridges observePhase's callback boundary
|
|
8
8
|
* onto OTel's callback-bound `startActiveSpan`, so the router's phase spans
|
|
9
|
-
* (rango.request/middleware/loader/render/ssr
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* `createRouter({ tracing })`.
|
|
9
|
+
* (rango.request/middleware/action/loader/handler/render/ssr/response/
|
|
10
|
+
* background) nest by async context and the loader's own OTel spans
|
|
11
|
+
* (db/fetch) land under rango.loader. This is the OTel equivalent of
|
|
12
|
+
* createCloudflareTracing — pass it to `createRouter({ tracing })`.
|
|
13
13
|
*
|
|
14
14
|
* - createOTelSink(tracer): the OTel adapter for the `telemetry` SLOT — a
|
|
15
15
|
* TelemetrySink for the EVENT-shaped facts (handler errors, cache decisions,
|
|
@@ -10,7 +10,18 @@ export interface RouterTimeouts {
|
|
|
10
10
|
actionMs?: number;
|
|
11
11
|
/** Timeout for initial render/response production (ms). */
|
|
12
12
|
renderStartMs?: number;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Timeout for idle streaming after the response is handed off (ms): when no
|
|
15
|
+
* chunk flows to the client for this long, the body stream is errored with a
|
|
16
|
+
* RouterTimeoutError ("stream-idle") and the source render is canceled —
|
|
17
|
+
* bounding hangs from never-settling promises embedded in the payload.
|
|
18
|
+
* END-TO-END semantics: a stalled slow client counts as idle the same as a
|
|
19
|
+
* wedged producer, so pick generous budgets (seconds). Opt-in (unset =
|
|
20
|
+
* unbounded, and the `timeout` shorthand deliberately does not apply);
|
|
21
|
+
* onTimeout does NOT fire — no replacement Response can be served
|
|
22
|
+
* mid-stream — the trip reports via onError + the request.timeout event.
|
|
23
|
+
* Enforcement: rsc/stream-idle.ts, wired at the handler's response tail.
|
|
24
|
+
*/
|
|
14
25
|
streamIdleMs?: number;
|
|
15
26
|
}
|
|
16
27
|
export type TimeoutPhase = "action" | "render-start" | "stream-idle";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Span tracing hook (platform-agnostic).
|
|
3
3
|
*
|
|
4
|
-
* The core router emits its
|
|
5
|
-
* loaders, render, ssr) as spans by calling
|
|
6
|
-
* execution boundaries. When no tracing is
|
|
7
|
-
* pass-through: fn is invoked with a no-op
|
|
8
|
-
* allocation, so a non-traced request behaves
|
|
4
|
+
* The core router emits its observable phases (request, middleware, action,
|
|
5
|
+
* loaders, handler, render, ssr, response, background) as spans by calling
|
|
6
|
+
* traceSpan() at a small set of execution boundaries. When no tracing is
|
|
7
|
+
* configured the call is a direct pass-through: fn is invoked with a no-op
|
|
8
|
+
* span, with no wrapper and no allocation, so a non-traced request behaves
|
|
9
|
+
* exactly as before.
|
|
9
10
|
*
|
|
10
11
|
* A platform integration supplies a SpanRunner that wraps fn in a real span.
|
|
11
12
|
* Two runners ship: the Cloudflare one (createCloudflareTracing in
|
|
@@ -29,7 +30,10 @@
|
|
|
29
30
|
* useLoader, plus the fetchable path), rango.handler (span-only, one per segment
|
|
30
31
|
* route/layout handler execution; the handler:<id> perf metric is owned by the
|
|
31
32
|
* track() at the call site), rango.render (render:total:<route>; normal AND
|
|
32
|
-
* action-revalidation renders), rango.ssr (ssr:render-html).
|
|
33
|
+
* action-revalidation renders), rango.ssr (ssr:render-html), rango.response
|
|
34
|
+
* (span-only; final response construction + host handoff — the explicit
|
|
35
|
+
* stream-handoff marker), and rango.background (span-only; detached work, see
|
|
36
|
+
* below).
|
|
33
37
|
*
|
|
34
38
|
* Span-duration caveat (best-effort, never buffers): a span ends when its
|
|
35
39
|
* callback's value (or promise) settles. For the streaming phases (request,
|
|
@@ -40,6 +44,19 @@
|
|
|
40
44
|
* rango.loader span that can extend past its render parent; overlapping spans are
|
|
41
45
|
* valid (the loader really did take that long). Phase spans bound the work up to
|
|
42
46
|
* stream-handoff, which is also what the co-emitted perf metric measures.
|
|
47
|
+
* rango.response makes that handoff boundary explicit: it wraps only response
|
|
48
|
+
* finalization (redirect interception/guarding, Server-Timing mutation, final
|
|
49
|
+
* response selection) after downstream execution returns, ending immediately
|
|
50
|
+
* before the handler returns the Response to the host. It is handoff-bound,
|
|
51
|
+
* never drain-bound — it never reads, tees, or awaits response.body, and it is
|
|
52
|
+
* absent when the request throws before a response exists.
|
|
53
|
+
*
|
|
54
|
+
* rango.background wraps DETACHED work (waitUntil tasks that outlive the
|
|
55
|
+
* response): PPR shell captures and SWR background revalidations. It is the
|
|
56
|
+
* explanatory parent for spans those tasks produce after the foreground
|
|
57
|
+
* phases ended — without it, post-handoff work reads as orphan spans dangling
|
|
58
|
+
* under an ended parent. See PHASES.background (instrument.ts) for the lane
|
|
59
|
+
* kinds and per-lane inner-span policy.
|
|
43
60
|
*
|
|
44
61
|
* Both shipped runners (Cloudflare, OTel) keep the core agnostic: the
|
|
45
62
|
* platform-specific bridge lives at the edge behind the SpanRunner contract.
|
|
@@ -58,17 +75,14 @@ export interface TraceSpan {
|
|
|
58
75
|
*/
|
|
59
76
|
export type SpanRunner = <T>(name: string, fn: (span: TraceSpan) => T) => T;
|
|
60
77
|
/** The router phases that can be wrapped in a span. */
|
|
61
|
-
export type TracePhase = "request" | "middleware" | "action" | "loader" | "handler" | "render" | "ssr";
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
render?: boolean;
|
|
70
|
-
ssr?: boolean;
|
|
71
|
-
}
|
|
78
|
+
export type TracePhase = "request" | "middleware" | "action" | "loader" | "handler" | "render" | "ssr" | "response" | "background";
|
|
79
|
+
/**
|
|
80
|
+
* Per-phase span toggles. Omitted phases default to enabled. Derived from
|
|
81
|
+
* TracePhase so a new phase cannot be silently missing here — the other phase
|
|
82
|
+
* lists in this file (ALL_PHASES_ON, resolveTracing) are exhaustiveness-checked
|
|
83
|
+
* by their Record<TracePhase, boolean> annotations.
|
|
84
|
+
*/
|
|
85
|
+
export type TracePhaseToggles = Partial<Record<TracePhase, boolean>>;
|
|
72
86
|
/**
|
|
73
87
|
* The option pair shared by every tracing factory (enabled master switch +
|
|
74
88
|
* per-phase span toggles). Extended by OTelTracingOptions,
|
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
/** Bound queued/running capture closures retained by one isolate. */
|
|
2
2
|
export declare const MAX_ADMITTED_CAPTURES: number;
|
|
3
|
+
/** Point-in-time queue occupancy, for capture-scheduling telemetry. */
|
|
4
|
+
export interface CaptureQueueDepths {
|
|
5
|
+
/** A capture is currently executing (never preempted). */
|
|
6
|
+
running: boolean;
|
|
7
|
+
/** Waiting document-priority captures (run before every navigation capture). */
|
|
8
|
+
document: number;
|
|
9
|
+
/** Waiting navigation-priority captures. */
|
|
10
|
+
navigation: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Snapshot the queue's waiting/running state. Wait-timed-out entries still
|
|
14
|
+
* sitting in the arrays (pruned lazily by takeNextCapture) are excluded — they
|
|
15
|
+
* will never run, so counting them would overstate the backlog.
|
|
16
|
+
*/
|
|
17
|
+
export declare function captureQueueDepths(): CaptureQueueDepths;
|
|
3
18
|
/** The caller may drop this best-effort capture and retry on a later request. */
|
|
4
19
|
export declare class CaptureQueueFullError extends Error {
|
|
5
20
|
constructor();
|
|
6
21
|
}
|
|
7
22
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
23
|
+
* Budget on how long a capture may WAIT in the queue before it is dropped
|
|
24
|
+
* instead of run. On workerd a queued capture rides the scheduling request's
|
|
25
|
+
* waitUntil, whose post-response lifetime is bounded (~30s): a capture that
|
|
26
|
+
* already burned 15s+ parked behind a slow predecessor would start its own
|
|
27
|
+
* up-to-15s attempt (captureTimeout) with no budget left and risk being
|
|
28
|
+
* killed mid-store-write. Dropping at the budget is safe — captures are
|
|
29
|
+
* best-effort by contract, and a later request re-probes the key (the drop
|
|
30
|
+
* does NOT mark backoff: the route is not doomed, the isolate was busy).
|
|
31
|
+
* Matches one attempt's SHELL_CAPTURE_MAX_WAIT_MS so wait + attempt fits the
|
|
32
|
+
* platform budget. Field-observed: a navigation-shell capture parked ~24s
|
|
33
|
+
* behind a predecessor's two-attempt cycle.
|
|
34
|
+
*/
|
|
35
|
+
export declare const CAPTURE_QUEUE_WAIT_BUDGET_MS: number;
|
|
36
|
+
/** Thrown (async) when the queue wait exceeded the budget; the task never ran. */
|
|
37
|
+
export declare class CaptureQueueWaitTimeoutError extends Error {
|
|
38
|
+
readonly waitedMs: number;
|
|
39
|
+
constructor(waitedMs: number);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Run `task` after the active capture and every higher/equal-priority capture
|
|
43
|
+
* ahead of it have settled. Returns a promise for THIS task's completion
|
|
44
|
+
* (rejections propagate to the caller — the queue itself is insulated).
|
|
11
45
|
*/
|
|
12
|
-
export declare function enqueueSerializedCapture(task: () => Promise<void
|
|
46
|
+
export declare function enqueueSerializedCapture(task: () => Promise<void>, opts?: {
|
|
47
|
+
maxQueueWaitMs?: number;
|
|
48
|
+
priority?: "document" | "navigation";
|
|
49
|
+
}): Promise<void>;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* as the reference instant. No tombstones — the manifest is immutable; the
|
|
25
25
|
* markers say whether it is still current.
|
|
26
26
|
*/
|
|
27
|
-
import type { SegmentCacheStore, ShellCacheEntry } from "../cache/types.js";
|
|
27
|
+
import type { DocumentShellCacheEntry, SegmentCacheStore, ShellCacheEntry } from "../cache/types.js";
|
|
28
28
|
import type { SearchParamsFilter } from "../cache/search-params-filter.js";
|
|
29
29
|
/** One baked manifest record (the __ps asset module's default export). */
|
|
30
30
|
export interface BuildShellEntry {
|
|
@@ -49,7 +49,7 @@ declare global {
|
|
|
49
49
|
/** Reset the memoized manifest (unit tests swap the global loader). */
|
|
50
50
|
export declare function resetBuildShellManifestForTests(): void;
|
|
51
51
|
export interface BuildShellHit {
|
|
52
|
-
entry:
|
|
52
|
+
entry: DocumentShellCacheEntry;
|
|
53
53
|
/** Past createdAt + ttl: serve, but schedule the runtime recapture. */
|
|
54
54
|
stale: boolean;
|
|
55
55
|
}
|
|
@@ -125,10 +125,18 @@ export interface ShellCaptureDebugEvent {
|
|
|
125
125
|
* - skip-backoff: the key is inside its refused-capture backoff window and
|
|
126
126
|
* the capture was not attempted
|
|
127
127
|
* - skip-capacity: the isolate capture queue is full; a later request may retry
|
|
128
|
+
* - skip-inert-store: the resolved store's shell family is missing or
|
|
129
|
+
* declared inert (SegmentCacheStore.shellFamilyInert — a CFCacheStore
|
|
130
|
+
* without a KV namespace); nothing could store the result, so the
|
|
131
|
+
* background render was not scheduled at all
|
|
132
|
+
* - skip-queue-timeout: the capture waited past CAPTURE_QUEUE_WAIT_BUDGET_MS
|
|
133
|
+
* behind other captures and was dropped unrun (no backoff — the route is
|
|
134
|
+
* not doomed, the isolate was busy; a later request re-probes). Carries
|
|
135
|
+
* queueWaitMs.
|
|
128
136
|
* - backoff: the key entered (or escalated) backoff after a terminal
|
|
129
137
|
* no-shell — carries the new backoff state
|
|
130
138
|
*/
|
|
131
|
-
outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "backoff";
|
|
139
|
+
outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "skip-inert-store" | "skip-queue-timeout" | "backoff";
|
|
132
140
|
/** Attempt number (1 = first, 2 = in-place retry). Absent on skips. */
|
|
133
141
|
attempt?: number;
|
|
134
142
|
/** Wall-clock ms of the whole attempt (barrier + render + drain + put). */
|
|
@@ -157,6 +165,24 @@ export interface ShellCaptureDebugEvent {
|
|
|
157
165
|
backoffFailures?: number;
|
|
158
166
|
/** Ms remaining in the key's backoff window, when one exists. */
|
|
159
167
|
backoffRemainingMs?: number;
|
|
168
|
+
/** Ms the capture waited in the serialized queue (skip-queue-timeout). */
|
|
169
|
+
queueWaitMs?: number;
|
|
170
|
+
/** Queue priority class at enqueue: document outranks queued navigation. */
|
|
171
|
+
queuePriority?: "document" | "navigation";
|
|
172
|
+
/**
|
|
173
|
+
* Captures ahead at enqueue: the active one plus every waiting capture of
|
|
174
|
+
* same-or-higher priority. 0 = this capture starts immediately.
|
|
175
|
+
*/
|
|
176
|
+
queueAhead?: number;
|
|
177
|
+
/**
|
|
178
|
+
* Ms the capture gate was HELD waiting for the slowest bake source — a
|
|
179
|
+
* top-level pushed handle promise or a bake-lane loader container — to
|
|
180
|
+
* settle, measured from capture start. Bake time is by-design shell latency
|
|
181
|
+
* (the hole doctrine: top-level promises bake), but it recurs on EVERY
|
|
182
|
+
* capture of the route and occupies the serialized queue; this field makes
|
|
183
|
+
* it attributable. Absent when nothing held the gate.
|
|
184
|
+
*/
|
|
185
|
+
bakeWaitMs?: number;
|
|
160
186
|
}
|
|
161
187
|
/**
|
|
162
188
|
* Debug sink for the capture pipeline, mirroring {@link CFCacheDebug}: `true`
|
|
@@ -316,7 +342,7 @@ type CaptureAttemptOutcome = "stored" | "redirect" | "no-shell" | "refused";
|
|
|
316
342
|
* bag, not a return value: captureAndStoreShell's outcome type stays a string
|
|
317
343
|
* union its existing callers (producer B, tests) consume unchanged.
|
|
318
344
|
*/
|
|
319
|
-
type CaptureAttemptStats = Pick<ShellCaptureDebugEvent, "barrierWaitMs" | "writeSettleMs" | "preludeBytes" | "snapshotBytes" | "snapshotSkipped" | "untaggedBake" | "storeWrite">;
|
|
345
|
+
type CaptureAttemptStats = Pick<ShellCaptureDebugEvent, "barrierWaitMs" | "writeSettleMs" | "preludeBytes" | "snapshotBytes" | "snapshotSkipped" | "untaggedBake" | "storeWrite" | "bakeWaitMs">;
|
|
320
346
|
/**
|
|
321
347
|
* Run the shell capture with a single in-place retry, then store the result.
|
|
322
348
|
*
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { type EntryData } from "../server/context.js";
|
|
19
19
|
import type { SearchParamsFilter } from "../cache/search-params-filter.js";
|
|
20
|
-
import type { ShellCacheEntry, SegmentCacheStore } from "../cache/types.js";
|
|
20
|
+
import type { DocumentShellCacheEntry, ShellCacheEntry, SegmentCacheStore } from "../cache/types.js";
|
|
21
21
|
/** Debug/status header the browser (and e2e assertions) can read: HIT | MISS. */
|
|
22
22
|
export declare const SHELL_STATUS_HEADER = "x-rango-shell";
|
|
23
23
|
/** Partial-navigation status header set only after captured PPR segments are consumed. */
|
|
@@ -106,18 +106,24 @@ export declare function buildShellKey(url: URL, filter?: SearchParamsFilter): st
|
|
|
106
106
|
*/
|
|
107
107
|
export declare function isValidShellHit(entry: ShellCacheEntry, buildVersion: string): boolean;
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
110
|
-
* whose prelude is not decodable base64 or whose
|
|
111
|
-
* parseable JSON would otherwise throw AFTER the 200 +
|
|
112
|
-
* flushed (`serveShellHit` decodes at stream construction,
|
|
113
|
-
* parses in the tail) — the client gets a visually complete
|
|
114
|
-
* hydrates, re-served on every request until the entry ages
|
|
115
|
-
* path exists; failure schedules no recapture by itself).
|
|
116
|
-
* a corrupt entry (store-layer fault) into a plain MISS
|
|
117
|
-
* overwrites. Cost: one duplicate decode/parse per HIT, sub-ms
|
|
118
|
-
* prelude flush that dominates the path.
|
|
109
|
+
* DOCUMENT-half integrity gate and type narrowing, run BEFORE the HIT response
|
|
110
|
+
* commits: a stored entry whose prelude is not decodable base64 or whose
|
|
111
|
+
* postponed blob is not parseable JSON would otherwise throw AFTER the 200 +
|
|
112
|
+
* full static prelude flushed (`serveShellHit` decodes at stream construction,
|
|
113
|
+
* `resumeShellHTML` parses in the tail) — the client gets a visually complete
|
|
114
|
+
* page that never hydrates, re-served on every request until the entry ages
|
|
115
|
+
* out (no eviction path exists; failure schedules no recapture by itself).
|
|
116
|
+
* Checking here turns a corrupt entry (store-layer fault) into a plain MISS
|
|
117
|
+
* the recapture overwrites. Cost: one duplicate decode/parse per HIT, sub-ms
|
|
118
|
+
* against a prelude flush that dominates the path.
|
|
119
|
+
*
|
|
120
|
+
* navigationOnly entries store no document half (prelude/postponed absent) and
|
|
121
|
+
* therefore never pass. The partial-replay path skips this gate for them
|
|
122
|
+
* (replayableShellSnapshot) — snapshot fragment corruption is caught by the
|
|
123
|
+
* consumer-side Flight decoders instead (SegmentFragmentDecodeError → healing
|
|
124
|
+
* capture).
|
|
119
125
|
*/
|
|
120
|
-
export declare function hasIntactShellPayload(entry: ShellCacheEntry):
|
|
126
|
+
export declare function hasIntactShellPayload(entry: ShellCacheEntry): entry is DocumentShellCacheEntry;
|
|
121
127
|
/** Decode a base64 prelude back into bytes for stream composition. */
|
|
122
128
|
export declare function base64ToBytes(b64: string): Uint8Array;
|
|
123
129
|
/** True when the store implements the shell entry family. */
|