@rangojs/router 0.4.2 → 0.4.3
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/read-through-swr.d.ts +7 -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 +22 -1
- package/dist/types/rsc/shell-capture.d.ts +7 -1
- 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/src/browser/prefetch/cache.ts +22 -10
- package/src/cache/cache-runtime.ts +39 -25
- package/src/cache/document-cache.ts +39 -23
- package/src/cache/read-through-swr.ts +22 -16
- 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 +72 -17
- package/src/rsc/handler.ts +171 -73
- package/src/rsc/shell-capture.ts +64 -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
|
/**
|
|
@@ -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 */
|
|
@@ -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,
|
|
@@ -4,9 +4,30 @@ export declare const MAX_ADMITTED_CAPTURES: number;
|
|
|
4
4
|
export declare class CaptureQueueFullError extends Error {
|
|
5
5
|
constructor();
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Budget on how long a capture may WAIT in the queue before it is dropped
|
|
9
|
+
* instead of run. On workerd a queued capture rides the scheduling request's
|
|
10
|
+
* waitUntil, whose post-response lifetime is bounded (~30s): a capture that
|
|
11
|
+
* already burned 15s+ parked behind a slow predecessor would start its own
|
|
12
|
+
* up-to-15s attempt (captureTimeout) with no budget left and risk being
|
|
13
|
+
* killed mid-store-write. Dropping at the budget is safe — captures are
|
|
14
|
+
* best-effort by contract, and a later request re-probes the key (the drop
|
|
15
|
+
* does NOT mark backoff: the route is not doomed, the isolate was busy).
|
|
16
|
+
* Matches one attempt's SHELL_CAPTURE_MAX_WAIT_MS so wait + attempt fits the
|
|
17
|
+
* platform budget. Field-observed: a navigation-shell capture parked ~24s
|
|
18
|
+
* behind a predecessor's two-attempt cycle.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CAPTURE_QUEUE_WAIT_BUDGET_MS: number;
|
|
21
|
+
/** Thrown (async) when the queue wait exceeded the budget; the task never ran. */
|
|
22
|
+
export declare class CaptureQueueWaitTimeoutError extends Error {
|
|
23
|
+
readonly waitedMs: number;
|
|
24
|
+
constructor(waitedMs: number);
|
|
25
|
+
}
|
|
7
26
|
/**
|
|
8
27
|
* Run `task` after every previously enqueued capture has settled. Returns a
|
|
9
28
|
* promise for THIS task's completion (rejections propagate to the caller —
|
|
10
29
|
* the queue itself is insulated).
|
|
11
30
|
*/
|
|
12
|
-
export declare function enqueueSerializedCapture(task: () => Promise<void
|
|
31
|
+
export declare function enqueueSerializedCapture(task: () => Promise<void>, opts?: {
|
|
32
|
+
maxQueueWaitMs?: number;
|
|
33
|
+
}): Promise<void>;
|
|
@@ -125,10 +125,14 @@ 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-queue-timeout: the capture waited past CAPTURE_QUEUE_WAIT_BUDGET_MS
|
|
129
|
+
* behind other captures and was dropped unrun (no backoff — the route is
|
|
130
|
+
* not doomed, the isolate was busy; a later request re-probes). Carries
|
|
131
|
+
* queueWaitMs.
|
|
128
132
|
* - backoff: the key entered (or escalated) backoff after a terminal
|
|
129
133
|
* no-shell — carries the new backoff state
|
|
130
134
|
*/
|
|
131
|
-
outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "backoff";
|
|
135
|
+
outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "skip-queue-timeout" | "backoff";
|
|
132
136
|
/** Attempt number (1 = first, 2 = in-place retry). Absent on skips. */
|
|
133
137
|
attempt?: number;
|
|
134
138
|
/** Wall-clock ms of the whole attempt (barrier + render + drain + put). */
|
|
@@ -157,6 +161,8 @@ export interface ShellCaptureDebugEvent {
|
|
|
157
161
|
backoffFailures?: number;
|
|
158
162
|
/** Ms remaining in the key's backoff window, when one exists. */
|
|
159
163
|
backoffRemainingMs?: number;
|
|
164
|
+
/** Ms the capture waited in the serialized queue (skip-queue-timeout). */
|
|
165
|
+
queueWaitMs?: number;
|
|
160
166
|
}
|
|
161
167
|
/**
|
|
162
168
|
* Debug sink for the capture pipeline, mirroring {@link CFCacheDebug}: `true`
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stream-idle timeout — the enforcement for `timeouts.streamIdleMs` (the
|
|
3
|
+
* "stream-idle" TimeoutPhase, reserved since the timeout API landed).
|
|
4
|
+
*
|
|
5
|
+
* WHY: nothing else bounds a streaming response body's lifetime.
|
|
6
|
+
* `renderStartMs` only bounds time-to-Response-construction; once the body is
|
|
7
|
+
* streaming, a single never-settling promise embedded in the payload (a
|
|
8
|
+
* deferred loader that never resolves, an orphaned ctx.rendered() barrier)
|
|
9
|
+
* holds the Flight/HTML stream — and the client's connection — open forever.
|
|
10
|
+
* Deferred HANDLES have a 10s auto-resolve net (defer.ts); loader promises
|
|
11
|
+
* and everything else have none. Field-observed as multi-second dead
|
|
12
|
+
* connections only closed by client cancellation.
|
|
13
|
+
*
|
|
14
|
+
* SEMANTICS — end-to-end idle flow, deliberately: the watchdog re-arms on
|
|
15
|
+
* every chunk that flows THROUGH to the client, so "idle" means "no bytes
|
|
16
|
+
* reached the wire for N ms". A stalled slow client counts as idle the same
|
|
17
|
+
* as a wedged producer — the two are indistinguishable here without buffering,
|
|
18
|
+
* and buffering is banned on the streaming path. Pick budgets accordingly
|
|
19
|
+
* (generous, seconds not millis); the feature is OPT-IN (unset = today's
|
|
20
|
+
* unbounded behavior, and the `timeout` shorthand deliberately does not apply
|
|
21
|
+
* to streamIdleMs — see resolveTimeouts).
|
|
22
|
+
*
|
|
23
|
+
* ON TRIP: the client-facing stream is errored with a RouterTimeoutError
|
|
24
|
+
* ("stream-idle") — the host terminates the response visibly (truncated
|
|
25
|
+
* chunked encoding), which is debuggable, unlike a silent clean close that
|
|
26
|
+
* would present a half-document as complete. Erroring the transform makes the
|
|
27
|
+
* pipe cancel its SOURCE, which aborts React's fizz/flight render — but only
|
|
28
|
+
* when the watchdog's branch is the sole consumer. When an upstream layer
|
|
29
|
+
* teed or cloned the body first (the document-cache MISS drain,
|
|
30
|
+
* response-cache clones), the watchdog holds one tee branch: tee semantics
|
|
31
|
+
* cancel the underlying source only once EVERY branch cancels, so the cache
|
|
32
|
+
* branch keeps the wedged render alive, bounded only by the platform's
|
|
33
|
+
* waitUntil budget — exactly as it was before this feature. The client-facing
|
|
34
|
+
* bound is unconditional; source teardown is best-effort. `onTimeout` does
|
|
35
|
+
* NOT apply: the response already left the handler, so no replacement
|
|
36
|
+
* Response can be served — the trip is reported via onError + the
|
|
37
|
+
* request.timeout telemetry event instead.
|
|
38
|
+
*
|
|
39
|
+
* COST: one identity TransformStream hop per chunk, only when the timeout is
|
|
40
|
+
* enabled. Never buffers, never reads ahead, adds no work when disabled.
|
|
41
|
+
*/
|
|
42
|
+
import { RouterTimeoutError } from "../router/timeout.js";
|
|
43
|
+
/** What the watchdog observed when it tripped. */
|
|
44
|
+
export interface StreamIdleTrip {
|
|
45
|
+
/** ms since the watchdog armed (response handoff) — the stream's lifetime. */
|
|
46
|
+
totalMs: number;
|
|
47
|
+
/** Chunks forwarded before the trip. */
|
|
48
|
+
chunks: number;
|
|
49
|
+
/** The error the client-facing stream was terminated with. */
|
|
50
|
+
error: RouterTimeoutError;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Wrap `response`'s body in an idle watchdog. Returns a NEW Response with the
|
|
54
|
+
* same status/headers whose body errors (and cancels the source) once no chunk
|
|
55
|
+
* has flowed for `idleMs`. Callers gate on isTimeoutEnabled + body presence +
|
|
56
|
+
* NOT a websocket upgrade (a 101/webSocket response must never be
|
|
57
|
+
* reconstructed); this function assumes those checks were made. `onTrip` fires
|
|
58
|
+
* at most once, after the client-facing stream has been errored.
|
|
59
|
+
*/
|
|
60
|
+
export declare function applyStreamIdleTimeout(response: Response, idleMs: number, onTrip: (trip: StreamIdleTrip) => void): Response;
|
|
@@ -564,6 +564,12 @@ export interface RequestContext<TEnv = DefaultEnv, TParams = Record<string, stri
|
|
|
564
564
|
* to avoid a second resolveRoute call. Cleared on HMR invalidation.
|
|
565
565
|
*/
|
|
566
566
|
_classifiedRoute?: import("../router/route-snapshot.js").RouteSnapshot;
|
|
567
|
+
/**
|
|
568
|
+
* @internal Classified request mode from classifyRequest, read by the
|
|
569
|
+
* rango.response span tail (rsc/handler.ts) for the rango.response.mode
|
|
570
|
+
* attribute. Unset when middleware short-circuits before core execution.
|
|
571
|
+
*/
|
|
572
|
+
_requestMode?: import("../router/request-classification.js").RequestPlan["mode"];
|
|
567
573
|
/**
|
|
568
574
|
* @internal Coarse route-level cache signal for the X-Rango-Cache debug
|
|
569
575
|
* header. Populated by match/matchPartial only when the debug cache signal
|
|
@@ -579,7 +585,7 @@ export interface RequestContext<TEnv = DefaultEnv, TParams = Record<string, stri
|
|
|
579
585
|
* This is the type exported to library consumers. Internal code should
|
|
580
586
|
* use the full RequestContext interface directly.
|
|
581
587
|
*/
|
|
582
|
-
export type PublicRequestContext<TEnv = DefaultEnv, TParams = Record<string, string>> = Omit<RequestContext<TEnv, TParams>, "cookie" | "cookies" | "setCookie" | "deleteCookie" | "_handleStore" | "_transitionWhen" | "_pprTransitionDecisions" | "_pprReplayPostMatchReason" | "_cacheStore" | "_searchParamsFilter" | "_shellCaptureRun" | "_shellImplicitCache" | "_shellLoaderSeed" | "_shellCaptureLoaderRecords" | "_shellCaptureHandleLiveness" | "_shellCaptureLoaderHandleValues" | "_shellFragmentPayload" | "_shellCaptureGuardTripped" | "_shellCaptureGuardTrippedLoaderId" | "_explicitTaggedStores" | "_requestTags" | "_cacheProfiles" | "_onResponseCallbacks" | "_pendingBackgroundTasks" | "_themeConfig" | "_locationState" | "_routeName" | "_prevRouteKey" | "_gateCurrentUrl" | "_gateCurrentParams" | "_gateActionId" | "_gateActionUrl" | "_gateActionResult" | "_gateFormData" | "_inActionRevalidation" | "_reportedErrors" | "_renderBarrier" | "_resolveRenderBarrier" | "_renderBarrierSegmentOrder" | "_treeHasStreaming" | "_renderBarrierWaiters" | "_handlerLoaderDeps" | "_renderBarrierHandleSnapshot" | "_renderBarrierGuardClosed" | "_reportBackgroundError" | "_debugPerformance" | "_metricsStore" | "_renderForeground" | "_renderDiagnosticsEnabled" | "_handlerStart" | "_tracing" | "_basename" | "_routerId" | "_setStatus" | "_rotateStateCookie" | "_setKeepCacheDirective" | "_variables" | "_classifiedRoute" | "_cacheSignal" | "_dynamic" | "res">;
|
|
588
|
+
export type PublicRequestContext<TEnv = DefaultEnv, TParams = Record<string, string>> = Omit<RequestContext<TEnv, TParams>, "cookie" | "cookies" | "setCookie" | "deleteCookie" | "_handleStore" | "_transitionWhen" | "_pprTransitionDecisions" | "_pprReplayPostMatchReason" | "_cacheStore" | "_searchParamsFilter" | "_shellCaptureRun" | "_shellImplicitCache" | "_shellLoaderSeed" | "_shellCaptureLoaderRecords" | "_shellCaptureHandleLiveness" | "_shellCaptureLoaderHandleValues" | "_shellFragmentPayload" | "_shellCaptureGuardTripped" | "_shellCaptureGuardTrippedLoaderId" | "_explicitTaggedStores" | "_requestTags" | "_cacheProfiles" | "_onResponseCallbacks" | "_pendingBackgroundTasks" | "_themeConfig" | "_locationState" | "_routeName" | "_prevRouteKey" | "_gateCurrentUrl" | "_gateCurrentParams" | "_gateActionId" | "_gateActionUrl" | "_gateActionResult" | "_gateFormData" | "_inActionRevalidation" | "_reportedErrors" | "_renderBarrier" | "_resolveRenderBarrier" | "_renderBarrierSegmentOrder" | "_treeHasStreaming" | "_renderBarrierWaiters" | "_handlerLoaderDeps" | "_renderBarrierHandleSnapshot" | "_renderBarrierGuardClosed" | "_reportBackgroundError" | "_debugPerformance" | "_metricsStore" | "_renderForeground" | "_renderDiagnosticsEnabled" | "_handlerStart" | "_tracing" | "_basename" | "_routerId" | "_setStatus" | "_rotateStateCookie" | "_setKeepCacheDirective" | "_variables" | "_classifiedRoute" | "_requestMode" | "_cacheSignal" | "_dynamic" | "res">;
|
|
583
589
|
/**
|
|
584
590
|
* Marker for a waitUntil-scheduled fn whose task promise must NOT enter
|
|
585
591
|
* _pendingBackgroundTasks. Used by the PPR shell capture for its own task:
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Vercel OpenTelemetry tracing integration.
|
|
3
3
|
*
|
|
4
|
-
* Bridges the router's
|
|
5
|
-
*
|
|
6
|
-
* Vercel's trace waterfall next to the platform's automatic spans,
|
|
7
|
-
* nesting. Vercel exposes tracing through OpenTelemetry (not a
|
|
8
|
-
* API like Cloudflare), so this is a thin convenience over
|
|
9
|
-
* it reads the global OTel tracer that `@vercel/otel`'s
|
|
4
|
+
* Bridges the router's observable phases (request, middleware, action, loaders,
|
|
5
|
+
* handler, render, ssr, response, background) onto OpenTelemetry spans so they
|
|
6
|
+
* show up in Vercel's trace waterfall next to the platform's automatic spans,
|
|
7
|
+
* with correct nesting. Vercel exposes tracing through OpenTelemetry (not a
|
|
8
|
+
* native import-free API like Cloudflare), so this is a thin convenience over
|
|
9
|
+
* `createOTelTracing`: it reads the global OTel tracer that `@vercel/otel`'s
|
|
10
|
+
* `registerOTel()` installs.
|
|
10
11
|
*
|
|
11
12
|
* Usage (vercel preset). A Rango/Vite app does NOT auto-load `instrumentation.ts`
|
|
12
13
|
* the way Next.js does, so export the tracing config from there and import it —
|
|
@@ -59,8 +60,8 @@ export interface VercelTracingOptions extends TracingToggleOptions {
|
|
|
59
60
|
/**
|
|
60
61
|
* Create the tracing config for a Vercel router. Pass the result to
|
|
61
62
|
* `createRouter({ tracing })`. Spans are emitted for the request, middleware,
|
|
62
|
-
* action, loaders, handler, render, and
|
|
63
|
-
* individual phases off.
|
|
63
|
+
* action, loaders, handler, render, ssr, response, and background phases; pass
|
|
64
|
+
* `spans` to turn individual phases off.
|
|
64
65
|
*
|
|
65
66
|
* @see createOTelTracing (`@rangojs/router`) for the underlying adapter on any
|
|
66
67
|
* platform with an OpenTelemetry SDK.
|
package/dist/vite/index.js
CHANGED
|
@@ -2530,7 +2530,7 @@ import { resolve } from "node:path";
|
|
|
2530
2530
|
// package.json
|
|
2531
2531
|
var package_default = {
|
|
2532
2532
|
name: "@rangojs/router",
|
|
2533
|
-
version: "0.4.
|
|
2533
|
+
version: "0.4.3",
|
|
2534
2534
|
description: "Django-inspired RSC router with composable URL patterns",
|
|
2535
2535
|
keywords: [
|
|
2536
2536
|
"react",
|
package/package.json
CHANGED
|
@@ -145,10 +145,39 @@ const router = createRouter({ document: Document, urls: urlpatterns, tracing });
|
|
|
145
145
|
These factories return a `RouterTracingConfig` for the same `tracing` slot;
|
|
146
146
|
`telemetry` stays independent (events only, no phase spans). Phase spans:
|
|
147
147
|
`rango.request`, `rango.middleware`, `rango.action`, `rango.loader`,
|
|
148
|
-
`rango.render`, `rango.ssr
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
`rango.handler`, `rango.render`, `rango.ssr`, `rango.response`,
|
|
149
|
+
`rango.background`. All share the `PHASES` registry and `observePhase`
|
|
150
|
+
execution boundary with `debugPerformance`; phases with `metric: false` either
|
|
151
|
+
use finer-grained perf rows or, for `response` and `background`, remain
|
|
152
|
+
span-only. Off-platform (no Cloudflare tracing destination / no OTel SDK) every
|
|
153
|
+
span call is a transparent pass-through, so the request behaves as if tracing
|
|
154
|
+
were off.
|
|
155
|
+
|
|
156
|
+
`rango.response` is the explicit handoff marker: at most one per traced
|
|
157
|
+
request, a direct child of `rango.request`, wrapping only response finalization
|
|
158
|
+
(redirect interception/guarding, `Server-Timing` mutation, final response
|
|
159
|
+
selection) and ending immediately before the handler returns the response to
|
|
160
|
+
the host. It is handoff-bound, never drain-bound — it never reads or awaits
|
|
161
|
+
`response.body`. Attributes: `http.response.status_code`,
|
|
162
|
+
`rango.response.mode` (classified request mode, or `middleware-short-circuit`),
|
|
163
|
+
`rango.response.body_kind` (`stream`/`empty`/`websocket`). For request modes
|
|
164
|
+
that render nothing (fetchable `_rsc_loader`, response routes, middleware
|
|
165
|
+
short-circuits) it shows the trace is complete rather than truncated — those
|
|
166
|
+
requests legitimately have no `rango.render`/`rango.ssr`/`rango.handler` spans.
|
|
167
|
+
On deployed Workers it may read 0 ms (frozen non-I/O timers); its position and
|
|
168
|
+
attributes are the value. Disable per-response billing overhead at volume with
|
|
169
|
+
`spans: { response: false }`.
|
|
170
|
+
|
|
171
|
+
`rango.background` wraps detached waitUntil work — PPR shell captures and SWR
|
|
172
|
+
background revalidations — that runs after the foreground spans ended. Without
|
|
173
|
+
it, a capture or revalidation shows up as an unexplained wave of orphan
|
|
174
|
+
KV/fetch spans minutes into a trace. `rango.background.kind` names the lane
|
|
175
|
+
(`shell-capture` / `document-revalidation` / `loader-revalidation` /
|
|
176
|
+
`use-cache-revalidation`); the shell-capture lane also carries
|
|
177
|
+
`rango.shell_key`, `rango.background.outcome`, and
|
|
178
|
+
`rango.background.queue_wait_ms` (a capture parked behind the per-isolate
|
|
179
|
+
capture queue reads as span duration, not dead air). Toggle with
|
|
180
|
+
`spans: { background: false }`.
|
|
152
181
|
|
|
153
182
|
Custom sinks implement `emit(event)`:
|
|
154
183
|
|