@timber-js/app 0.2.0-alpha.235 → 0.2.0-alpha.236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-CYjRMpZI.js → actions-Top9GftB.js} +3 -3
- package/dist/_chunks/{actions-CYjRMpZI.js.map → actions-Top9GftB.js.map} +1 -1
- package/dist/_chunks/{cache-api-BZJNt01a.js → cache-api-Bo8c7XVF.js} +6 -6
- package/dist/_chunks/{cache-api-BZJNt01a.js.map → cache-api-Bo8c7XVF.js.map} +1 -1
- package/dist/_chunks/{chains-D-RRc7CM.js → chains-BsGKkMTK.js} +2 -2
- package/dist/_chunks/{chains-D-RRc7CM.js.map → chains-BsGKkMTK.js.map} +1 -1
- package/dist/_chunks/chains-DHmoKxkO.js +1 -0
- package/dist/_chunks/{classify-_W0RWa5w.js → classify-cmE0Gins.js} +2 -2
- package/dist/_chunks/{classify-_W0RWa5w.js.map → classify-cmE0Gins.js.map} +1 -1
- package/dist/_chunks/{cli-check-Dl3yo3Zv.js → cli-check-BwiahbTC.js} +3 -3
- package/dist/_chunks/{cli-check-Dl3yo3Zv.js.map → cli-check-BwiahbTC.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-CyrOHbAo.js → cli-schema-sync-B2ldclRO.js} +2 -2
- package/dist/_chunks/{cli-schema-sync-CyrOHbAo.js.map → cli-schema-sync-B2ldclRO.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-CTWiBMZZ.js → cli-schema-sync-Brw7kTmm.js} +1 -1
- package/dist/_chunks/{client-dep-entries-C9hv-3k9.js → client-dep-entries-C1nMlLKV.js} +2 -2
- package/dist/_chunks/{client-dep-entries-C9hv-3k9.js.map → client-dep-entries-C1nMlLKV.js.map} +1 -1
- package/dist/_chunks/{cloudflare-_2fhxQE8.js → cloudflare-Dk5Hqo-O.js} +3 -3
- package/dist/_chunks/{cloudflare-_2fhxQE8.js.map → cloudflare-Dk5Hqo-O.js.map} +1 -1
- package/dist/_chunks/{convention-lint-D54k6uUM.js → convention-lint-CLpuzY5h.js} +3 -3
- package/dist/_chunks/{convention-lint-D54k6uUM.js.map → convention-lint-CLpuzY5h.js.map} +1 -1
- package/dist/_chunks/dev-server-BGGGhHXx.js +1 -0
- package/dist/_chunks/{dev-server-cmWVDgTf.js → dev-server-lrdpD7Ws.js} +121 -5
- package/dist/_chunks/dev-server-lrdpD7Ws.js.map +1 -0
- package/dist/_chunks/{dev-span-_NzMX-au.js → dev-span-RsVeYYc_.js} +5 -2
- package/dist/_chunks/dev-span-RsVeYYc_.js.map +1 -0
- package/dist/_chunks/{error-boundary-Cf1m-Ywk.js → error-boundary-Bh-egWUI.js} +6 -6
- package/dist/_chunks/{error-boundary-Cf1m-Ywk.js.map → error-boundary-Bh-egWUI.js.map} +1 -1
- package/dist/_chunks/{flight-source-node-BGanuoSS.js → flight-source-node-BO_xD9jC.js} +2 -2
- package/dist/_chunks/{flight-source-node-BGanuoSS.js.map → flight-source-node-BO_xD9jC.js.map} +1 -1
- package/dist/_chunks/{href-BtspoNc9.js → href-8l5VD23D.js} +2 -2
- package/dist/_chunks/{href-BtspoNc9.js.map → href-8l5VD23D.js.map} +1 -1
- package/dist/_chunks/{json-lossy-check-BXM45k8p.js → json-lossy-check-D47R9Fp5.js} +2 -2
- package/dist/_chunks/{json-lossy-check-BXM45k8p.js.map → json-lossy-check-D47R9Fp5.js.map} +1 -1
- package/dist/_chunks/{live-graph-C7-yA8W9.js → live-graph-ChuFfmLi.js} +4 -4
- package/dist/_chunks/{live-graph-C7-yA8W9.js.map → live-graph-ChuFfmLi.js.map} +1 -1
- package/dist/_chunks/{logger-YtMSKfft.js → logger-DDLtp5e-.js} +16 -1
- package/dist/_chunks/logger-DDLtp5e-.js.map +1 -0
- package/dist/_chunks/navigation-root-Cvb7P1ud.js.map +1 -1
- package/dist/_chunks/{node-response-D3hXWb8y.js → node-response-DNNnKnoS.js} +2 -2
- package/dist/_chunks/{node-response-D3hXWb8y.js.map → node-response-DNNnKnoS.js.map} +1 -1
- package/dist/_chunks/{poison-scan-CRSP06Es.js → poison-scan-CJ9QfJWb.js} +2 -2
- package/dist/_chunks/{poison-scan-CRSP06Es.js.map → poison-scan-CJ9QfJWb.js.map} +1 -1
- package/dist/_chunks/{scanner-BNQ4qnLX.js → scanner-CrB_h6FA.js} +5 -5
- package/dist/_chunks/{scanner-BNQ4qnLX.js.map → scanner-CrB_h6FA.js.map} +1 -1
- package/dist/_chunks/{sizeof-Cmx6Fs-Y.js → sizeof-DVhEVN_y.js} +2 -2
- package/dist/_chunks/{sizeof-Cmx6Fs-Y.js.map → sizeof-DVhEVN_y.js.map} +1 -1
- package/dist/_chunks/{walkers-DFC9KsBL.js → walkers-BUvpsb2Q.js} +3 -3
- package/dist/_chunks/{walkers-DFC9KsBL.js.map → walkers-BUvpsb2Q.js.map} +1 -1
- package/dist/adapters/cloudflare-dev.js +1 -1
- package/dist/adapters/cloudflare-kv-cache.js +2 -2
- package/dist/adapters/cloudflare.js +1 -1
- package/dist/adapters/nitro.js +1 -1
- package/dist/analyze/crawl-entry.js +3 -3
- package/dist/analyze/graph-command.js +3 -3
- package/dist/cache/index.js +2 -2
- package/dist/cache/stores/memory.js +1 -1
- package/dist/cli.js +3 -3
- package/dist/client/dev-pill/index.d.ts +2 -1
- package/dist/client/dev-pill/index.d.ts.map +1 -1
- package/dist/client/dev-pill/view.d.ts.map +1 -1
- package/dist/client/error-boundary.js +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/internal.js +3 -3
- package/dist/cookies/index.js +1 -1
- package/dist/dev-tools/await-span.d.ts +7 -0
- package/dist/dev-tools/await-span.d.ts.map +1 -1
- package/dist/dev-tools/instrumentation.d.ts.map +1 -1
- package/dist/dev-tools/logger.d.ts +8 -2
- package/dist/dev-tools/logger.d.ts.map +1 -1
- package/dist/dev-tools/span-sink.d.ts +9 -1
- package/dist/dev-tools/span-sink.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -31
- package/dist/index.js.map +1 -1
- package/dist/native/rsc/_react/chunks/{react-server-dom-webpack-server.node.development-hQ_odxIB.js → react-server-dom-webpack-server.node.development-CAttMzVD.js} +2 -2
- package/dist/native/rsc/_react/flight-client.js +2 -2
- package/dist/native/rsc/_react/flight-server.js +1 -1
- package/dist/native/rsc/_react/flight-static.js +1 -1
- package/dist/native/rsc/adapters/cloudflare-kv-cache.js +1 -1
- package/dist/native/rsc/adapters/cloudflare.js +2 -2
- package/dist/native/rsc/cache/cache-api.js +3 -3
- package/dist/native/rsc/cache/index.js +3 -3
- package/dist/native/rsc/cache/timber-cache.js +2 -2
- package/dist/native/rsc/cdn/index.js +1 -1
- package/dist/native/rsc/client/use-cookie.js +1 -1
- package/dist/native/rsc/dev-tools/404-page.js +1 -1
- package/dist/native/rsc/dev-tools/await-span.js +5 -2
- package/dist/native/rsc/dev-tools/await-span.js.map +1 -1
- package/dist/native/rsc/dev-tools/error-page.js +2 -2
- package/dist/native/rsc/dev-tools/instrumentation.js +38 -3
- package/dist/native/rsc/dev-tools/instrumentation.js.map +1 -1
- package/dist/native/rsc/dev-tools/logger.js +123 -80
- package/dist/native/rsc/dev-tools/logger.js.map +1 -1
- package/dist/native/rsc/dev-tools/span-sink.js +1 -0
- package/dist/native/rsc/dev-tools/span-sink.js.map +1 -1
- package/dist/native/rsc/dev-tools/terminal.js +1 -1
- package/dist/native/rsc/manifest.json +1 -0
- package/dist/native/rsc/params/index.js +1 -1
- package/dist/native/rsc/routing/collision-probe.js +1 -1
- package/dist/native/rsc/routing/interception.js +1 -1
- package/dist/native/rsc/search-params/define.js +2 -2
- package/dist/native/rsc/server/access-gate.js +1 -1
- package/dist/native/rsc/server/action-client.js +2 -2
- package/dist/native/rsc/server/action-handler.js +8 -8
- package/dist/native/rsc/server/actions.js +3 -3
- package/dist/native/rsc/server/children-interception.js +1 -1
- package/dist/native/rsc/server/deny-boundary.js +1 -1
- package/dist/native/rsc/server/deny-renderer.js +10 -10
- package/dist/native/rsc/server/fallback-error.js +1 -1
- package/dist/native/rsc/server/flight-injector-core.js +2 -2
- package/dist/native/rsc/server/flight-source-node.js +2 -2
- package/dist/native/rsc/server/index.js +4 -4
- package/dist/native/rsc/server/interception-gates.js +2 -2
- package/dist/native/rsc/server/internal.js +15 -15
- package/dist/native/rsc/server/logger.js +2 -2
- package/dist/native/rsc/server/metadata-route-links.js +1 -1
- package/dist/native/rsc/server/node-body-response.js +1 -1
- package/dist/native/rsc/server/param-coercion.js +1 -1
- package/dist/native/rsc/server/pipeline-helpers.js +10 -10
- package/dist/native/rsc/server/pipeline-interception.js +4 -4
- package/dist/native/rsc/server/pipeline-metadata-route.js +10 -10
- package/dist/native/rsc/server/pipeline-outcome.js +4 -4
- package/dist/native/rsc/server/pipeline-phases.js +11 -11
- package/dist/native/rsc/server/pipeline.js +10 -10
- package/dist/native/rsc/server/prebuilt/capture-render.js +1 -1
- package/dist/native/rsc/server/prebuilt/dev-store.js +1 -1
- package/dist/native/rsc/server/prebuilt/overlay.js +3 -3
- package/dist/native/rsc/server/prebuilt-builder.js +8 -8
- package/dist/native/rsc/server/prebuilt-runtime.js +15 -15
- package/dist/native/rsc/server/primitives.js +2 -2
- package/dist/native/rsc/server/publish-params.js +1 -1
- package/dist/native/rsc/server/request-context.js +1 -1
- package/dist/native/rsc/server/route-element-builder.js +7 -7
- package/dist/native/rsc/server/route-element-helpers.js +1 -1
- package/dist/native/rsc/server/route-handler.js +1 -1
- package/dist/native/rsc/server/rsc-entry/action-dispatcher.js +1 -1
- package/dist/native/rsc/server/rsc-entry/action-middleware-runner.js +1 -1
- package/dist/native/rsc/server/rsc-entry/api-handler.js +1 -1
- package/dist/native/rsc/server/rsc-entry/deny-fallback.js +6 -6
- package/dist/native/rsc/server/rsc-entry/error-renderer.js +7 -7
- package/dist/native/rsc/server/rsc-entry/helpers.js +1 -1
- package/dist/native/rsc/server/rsc-entry/render-route.js +4 -4
- package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js +7 -7
- package/dist/native/rsc/server/rsc-entry/rsc-payload.js +3 -3
- package/dist/native/rsc/server/rsc-entry/rsc-stream.js +6 -6
- package/dist/native/rsc/server/rsc-entry/ssr-renderer.js +10 -10
- package/dist/native/rsc/server/rsc-error-envelope.js +1 -1
- package/dist/native/rsc/server/sitemap-handler.js +1 -1
- package/dist/native/rsc/server/skippable-prefix.js +2 -2
- package/dist/native/rsc/server/slot-interception.js +1 -1
- package/dist/native/rsc/server/slot-resolver.js +11 -11
- package/dist/native/rsc/server/static-generator.js +2 -2
- package/dist/native/rsc/server/traced-access.js +1 -1
- package/dist/native/rsc/server/tracing.js +10 -0
- package/dist/native/rsc/server/tracing.js.map +1 -1
- package/dist/native/rsc/shared/dev-span.js +8 -2
- package/dist/native/rsc/shared/dev-span.js.map +1 -1
- package/dist/native/rsc/shared/href.js +1 -1
- package/dist/native/rsc/shared/span-waterfall.js +90 -0
- package/dist/native/rsc/shared/span-waterfall.js.map +1 -0
- package/dist/native/ssr/adapters/cloudflare-kv-cache.js +1 -1
- package/dist/native/ssr/adapters/cloudflare.js +2 -2
- package/dist/native/ssr/cache/cache-api.js +3 -3
- package/dist/native/ssr/cache/guarded-read.js +1 -1
- package/dist/native/ssr/cache/index.js +3 -3
- package/dist/native/ssr/cache/timber-cache.js +3 -3
- package/dist/native/ssr/cdn/index.js +1 -1
- package/dist/native/ssr/client/error-boundary.js +1 -1
- package/dist/native/ssr/client/index.js +5 -5
- package/dist/native/ssr/client/link.js +5 -5
- package/dist/native/ssr/client/navigation-commit.js +2 -2
- package/dist/native/ssr/client/nuqs-adapter.js +2 -2
- package/dist/native/ssr/client/params-context.js +1 -1
- package/dist/native/ssr/client/router-skew.js +1 -1
- package/dist/native/ssr/client/rsc-fetch.js +2 -2
- package/dist/native/ssr/client/use-pending-navigation.js +1 -1
- package/dist/native/ssr/client/use-search-params.js +2 -2
- package/dist/native/ssr/client/use-segment-params.js +1 -1
- package/dist/native/ssr/client/use-selected-layout-segment.js +1 -1
- package/dist/native/ssr/dev-tools/await-span.js +5 -2
- package/dist/native/ssr/dev-tools/await-span.js.map +1 -1
- package/dist/native/ssr/dev-tools/instrumentation.js +38 -3
- package/dist/native/ssr/dev-tools/instrumentation.js.map +1 -1
- package/dist/native/ssr/dev-tools/logger.js +123 -80
- package/dist/native/ssr/dev-tools/logger.js.map +1 -1
- package/dist/native/ssr/dev-tools/span-sink.js +1 -0
- package/dist/native/ssr/dev-tools/span-sink.js.map +1 -1
- package/dist/native/ssr/manifest.json +1 -0
- package/dist/native/ssr/params/index.js +1 -1
- package/dist/native/ssr/search-params/define.js +2 -2
- package/dist/native/ssr/server/access-gate.js +1 -1
- package/dist/native/ssr/server/action-client.js +2 -2
- package/dist/native/ssr/server/actions.js +3 -3
- package/dist/native/ssr/server/deny-boundary.js +2 -2
- package/dist/native/ssr/server/flight-injector-core.js +1 -1
- package/dist/native/ssr/server/flight-source-node.js +2 -2
- package/dist/native/ssr/server/index.js +4 -4
- package/dist/native/ssr/server/internal.js +12 -12
- package/dist/native/ssr/server/logger.js +2 -2
- package/dist/native/ssr/server/node-body-response.js +1 -1
- package/dist/native/ssr/server/node-stream-transforms.js +2 -2
- package/dist/native/ssr/server/param-coercion.js +3 -3
- package/dist/native/ssr/server/pipeline-helpers.js +7 -7
- package/dist/native/ssr/server/pipeline-interception.js +4 -4
- package/dist/native/ssr/server/pipeline-metadata-route.js +10 -10
- package/dist/native/ssr/server/pipeline-outcome.js +4 -4
- package/dist/native/ssr/server/pipeline-phases.js +10 -10
- package/dist/native/ssr/server/pipeline.js +10 -10
- package/dist/native/ssr/server/prebuilt/capture-render.js +2 -2
- package/dist/native/ssr/server/prebuilt/dev-store.js +1 -1
- package/dist/native/ssr/server/prebuilt/overlay.js +4 -4
- package/dist/native/ssr/server/prebuilt-runtime.js +14 -14
- package/dist/native/ssr/server/primitives.js +2 -2
- package/dist/native/ssr/server/request-context.js +2 -2
- package/dist/native/ssr/server/route-handler.js +1 -1
- package/dist/native/ssr/server/rsc-error-envelope.js +1 -1
- package/dist/native/ssr/server/ssr-form-state.js +2 -2
- package/dist/native/ssr/server/ssr-wrappers.js +1 -1
- package/dist/native/ssr/server/traced-access.js +1 -1
- package/dist/native/ssr/server/tracing.js +10 -0
- package/dist/native/ssr/server/tracing.js.map +1 -1
- package/dist/native/ssr/shared/dev-span.js +8 -2
- package/dist/native/ssr/shared/dev-span.js.map +1 -1
- package/dist/native/ssr/shared/href.js +1 -1
- package/dist/native/ssr/shared/span-waterfall.js +90 -0
- package/dist/native/ssr/shared/span-waterfall.js.map +1 -0
- package/dist/plugins/dev-precompile.d.ts +84 -0
- package/dist/plugins/dev-precompile.d.ts.map +1 -0
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/plugins/entries.d.ts.map +1 -1
- package/dist/plugins/virtual-ids.d.ts +16 -0
- package/dist/plugins/virtual-ids.d.ts.map +1 -0
- package/dist/routes/index.js +1 -1
- package/dist/routing/index.js +3 -3
- package/dist/search-params/index.js +2 -2
- package/dist/server/index.js +2 -2
- package/dist/server/internal.js +14 -14
- package/dist/server/tracing.d.ts.map +1 -1
- package/dist/shared/dev-span.d.ts +12 -1
- package/dist/shared/dev-span.d.ts.map +1 -1
- package/dist/shared/span-waterfall.d.ts +88 -0
- package/dist/shared/span-waterfall.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/client/dev-pill/index.ts +5 -2
- package/src/client/dev-pill/store.ts +1 -1
- package/src/client/dev-pill/view.ts +15 -5
- package/src/dev-tools/await-span.ts +10 -0
- package/src/dev-tools/instrumentation.ts +44 -6
- package/src/dev-tools/logger.ts +230 -155
- package/src/dev-tools/span-sink.ts +34 -3
- package/src/index.ts +21 -11
- package/src/plugins/dev-precompile.ts +168 -0
- package/src/plugins/dev-server.ts +16 -3
- package/src/plugins/entries.ts +1 -11
- package/src/plugins/virtual-ids.ts +15 -0
- package/src/server/tracing.ts +29 -0
- package/src/shared/dev-span.ts +17 -2
- package/src/{client/dev-pill/waterfall.ts → shared/span-waterfall.ts} +84 -51
- package/dist/_chunks/chains-KblEfYzm.js +0 -1
- package/dist/_chunks/dev-server-DrYBIg66.js +0 -1
- package/dist/_chunks/dev-server-cmWVDgTf.js.map +0 -1
- package/dist/_chunks/dev-span-_NzMX-au.js.map +0 -1
- package/dist/_chunks/logger-YtMSKfft.js.map +0 -1
- package/dist/client/dev-pill/waterfall.d.ts +0 -64
- package/dist/client/dev-pill/waterfall.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getSearchParamsFromAls } from "../shared/als-slots.js";
|
|
2
|
-
import { fromSchema, isCodec, isStandardSchema } from "../schema-bridge.js";
|
|
3
1
|
import { useQueryStates } from "../_virtual/_timber-native-client-ref_client/use-query-states.js";
|
|
2
|
+
import { fromSchema, isCodec, isStandardSchema } from "../schema-bridge.js";
|
|
3
|
+
import { getSearchParamsFromAls } from "../shared/als-slots.js";
|
|
4
4
|
import { parseTotal } from "./parse-total.js";
|
|
5
5
|
import { serializedEqual } from "./serialize-equal.js";
|
|
6
6
|
// src/search-params/define.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
2
|
-
import { isDebug } from "./debug.js";
|
|
3
2
|
import { runTracedAccess } from "./traced-access.js";
|
|
3
|
+
import { isDebug } from "./debug.js";
|
|
4
4
|
import { handleCaughtDeny, setFirstDeniedSegmentIndex } from "./deny-boundary.js";
|
|
5
5
|
// src/server/access-gate.tsx
|
|
6
6
|
function AccessGate(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
2
|
-
import { isDebug, isDevMode } from "./debug.js";
|
|
3
1
|
import { parseFormData } from "./form-data.js";
|
|
4
2
|
import { formatSize } from "../utils/format.js";
|
|
3
|
+
import { isDebug, isDevMode } from "./debug.js";
|
|
4
|
+
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
5
5
|
import { getGlobalSensitiveFieldsConfig, resolveSensitivePredicate, stripSensitiveFields } from "./sensitive-fields.js";
|
|
6
6
|
import { validateWithSchema } from "./action-schema.js";
|
|
7
7
|
import { introspectSchema, normalizeListFields } from "./schema-introspection.js";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { decodeAction, decodeFormState, decodeReply, loadServerAction, renderFlight } from "./vite-handoff-rsc.js";
|
|
2
2
|
import { ServerReferenceLoadError } from "../rsc-runtime/server-reference-load-error.js";
|
|
3
|
-
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
4
|
-
import { logActionError, logActionRejected, swallow } from "./logger.js";
|
|
5
|
-
import { concatBytes } from "./stream-utils.js";
|
|
6
3
|
import { flightChunkBytes, flightResponse, openFlightReader } from "./flight-source.js";
|
|
4
|
+
import { concatBytes } from "./stream-utils.js";
|
|
7
5
|
import { csrfRejectionResponse, validateCsrf } from "./csrf.js";
|
|
8
|
-
import {
|
|
9
|
-
import { applyReloadHeaders, checkVersionSkew } from "./version-skew.js";
|
|
10
|
-
import { canonicalize } from "./canonicalize.js";
|
|
6
|
+
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
11
7
|
import { executeAction } from "./actions.js";
|
|
12
|
-
import { runOutsideReactCacheScope, runWithReactCacheScope } from "./react-cache-scope.js";
|
|
13
8
|
import { runWithRequestContext, setMutableCookieContext } from "./request-context.js";
|
|
9
|
+
import { runOutsideReactCacheScope, runWithReactCacheScope } from "./react-cache-scope.js";
|
|
14
10
|
import { getCookiesForSsr, getSetCookieHeaders } from "./cookie-context.js";
|
|
15
11
|
import { ActionError } from "./action-client.js";
|
|
16
12
|
import { enforceBodyLimits, enforceFieldLimit } from "./body-limits.js";
|
|
17
13
|
import { encodeErrorDigest } from "../shared/error-digest.js";
|
|
18
14
|
import { clientErrorMessage } from "./client-error-message.js";
|
|
19
|
-
import {
|
|
15
|
+
import { applyReloadHeaders, checkVersionSkew } from "./version-skew.js";
|
|
16
|
+
import { logActionError, logActionRejected, swallow } from "./logger.js";
|
|
20
17
|
import { fireOnRequestError } from "./pipeline-helpers.js";
|
|
18
|
+
import { DEFAULT_RENDER_TIMEOUT_MS, RenderTimeoutError, withTimeout } from "./render-timeout.js";
|
|
19
|
+
import { canonicalize } from "./canonicalize.js";
|
|
20
|
+
import { RSC_CONTENT_TYPE } from "../shared/rsc-media-type.js";
|
|
21
21
|
import { randomUUID } from "node:crypto";
|
|
22
22
|
// src/server/action-handler.ts
|
|
23
23
|
function isActionRequest(req) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { revalidationAls } from "./als-registry.js";
|
|
2
|
-
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
3
|
-
import { withSpan } from "./tracing.js";
|
|
4
1
|
import { cache } from "../cache/cache-api.js";
|
|
5
2
|
import { canonicalize } from "./canonicalize.js";
|
|
3
|
+
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
4
|
+
import { withSpan } from "./tracing.js";
|
|
5
|
+
import { revalidationAls } from "./als-registry.js";
|
|
6
6
|
// src/server/actions.ts
|
|
7
7
|
var RevalidationDropped = class extends Error {
|
|
8
8
|
constructor(message) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { collectMiddlewareChain } from "./route-matcher.js";
|
|
2
|
-
import { treePathNames } from "../routing/segment-keys.js";
|
|
3
2
|
import { findInterceptingMatch } from "./slot-interception.js";
|
|
3
|
+
import { treePathNames } from "../routing/segment-keys.js";
|
|
4
4
|
// src/server/children-interception.ts
|
|
5
5
|
function createInterceptedRouteMatcher(root) {
|
|
6
6
|
return (targetPathname, interceptingScope) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { clientComponents } from "./vite-handoff-rsc.js";
|
|
2
2
|
import { requestContextAls } from "./als-registry.js";
|
|
3
3
|
import { isDenySignal } from "./signal-identity.js";
|
|
4
|
-
import { withSpan } from "./tracing.js";
|
|
5
4
|
import { loadFallbackModule } from "./pipeline-helpers.js";
|
|
5
|
+
import { withSpan } from "./tracing.js";
|
|
6
6
|
import { isValidElementType } from "./utils/element-type.js";
|
|
7
7
|
import { createElement } from "../_react/react.js";
|
|
8
8
|
// src/server/deny-boundary.ts
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { renderFlight } from "./vite-handoff-rsc.js";
|
|
2
|
-
import { isDebug } from "./debug.js";
|
|
3
|
-
import { logRenderError } from "./logger.js";
|
|
4
|
-
import { cancelFlightSource, flightResponse, teeFlightSource } from "./flight-source.js";
|
|
5
2
|
import { appVisibleSearch } from "../shared/rsc-cache-key.js";
|
|
3
|
+
import { withPublishedParams } from "./publish-params.js";
|
|
4
|
+
import { renderDenyEntry } from "./deny-boundary.js";
|
|
6
5
|
import { getCookiesForSsr } from "./cookie-context.js";
|
|
7
|
-
import {
|
|
6
|
+
import { logRenderError } from "./logger.js";
|
|
8
7
|
import { loadFallbackModule, reportRenderError } from "./pipeline-helpers.js";
|
|
9
|
-
import {
|
|
10
|
-
import { getCspNonce } from "./csp-nonce.js";
|
|
11
|
-
import { rscErrorEnvelope } from "./rsc-error-envelope.js";
|
|
12
|
-
import { renderMetadataToElements } from "./metadata-render.js";
|
|
8
|
+
import { isDebug } from "./debug.js";
|
|
13
9
|
import { headElementsToReact, resolveMetadata } from "./metadata.js";
|
|
14
|
-
import { renderDenyEntry } from "./deny-boundary.js";
|
|
15
|
-
import { withPublishedParams } from "./publish-params.js";
|
|
16
10
|
import { resolveStatusFile } from "./status-code-resolver.js";
|
|
17
11
|
import { defaultStatusPageResponse } from "./default-status-page.js";
|
|
12
|
+
import { renderMetadataToElements } from "./metadata-render.js";
|
|
13
|
+
import { rscErrorEnvelope } from "./rsc-error-envelope.js";
|
|
18
14
|
import { renderJsonStatusFile } from "./json-status-response.js";
|
|
15
|
+
import { flightInitScript } from "./flight-scripts.js";
|
|
16
|
+
import { getCspNonce } from "./csp-nonce.js";
|
|
17
|
+
import { cancelFlightSource, flightResponse, teeFlightSource } from "./flight-source.js";
|
|
18
|
+
import { RSC_CONTENT_TYPE } from "../shared/rsc-media-type.js";
|
|
19
19
|
import { Fragment, createElement } from "../_react/react.js";
|
|
20
20
|
// src/server/deny-renderer.ts
|
|
21
21
|
function buildDenyElement(deny, component, resolutionKind, filePath) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { swallow } from "./logger.js";
|
|
2
1
|
import { isApiRouteChain } from "./route-matcher.js";
|
|
2
|
+
import { swallow } from "./logger.js";
|
|
3
3
|
import { loadFallbackModule } from "./pipeline-helpers.js";
|
|
4
4
|
// src/server/fallback-error.ts
|
|
5
5
|
async function renderFallbackError(error, req, responseHeaders, match, isDev, rootSegment, clientBootstrap, globalError, projectRoot, hmrOptions) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { openFlightReader } from "./flight-source.js";
|
|
2
|
-
import { resolveRenderTimeoutMs, withTimeout } from "./render-timeout.js";
|
|
3
1
|
import { createMachine } from "../utils/state-machine.js";
|
|
4
2
|
import { flightBinaryChunkScript, flightChunkScript } from "./flight-scripts.js";
|
|
5
3
|
import { flightInjectionTransitions, isHtmlDone, isPullDone } from "./flight-injection-state.js";
|
|
4
|
+
import { openFlightReader } from "./flight-source.js";
|
|
5
|
+
import { resolveRenderTimeoutMs, withTimeout } from "./render-timeout.js";
|
|
6
6
|
// src/server/flight-injector-core.ts
|
|
7
7
|
var encoder = new TextEncoder();
|
|
8
8
|
function incompleteUtf8Tail(bytes) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { NodeBodyResponse } from "./node-body-response.js";
|
|
3
3
|
import { DEFAULT_MAX_BUFFER_BYTES, teeBufferExceeded } from "./stream-utils.js";
|
|
4
4
|
import { onAbortUntil } from "./abort-scope.js";
|
|
5
5
|
import { RenderTimeoutError } from "./render-timeout.js";
|
|
6
|
-
import {
|
|
6
|
+
import { releaseReason } from "./render-utils.js";
|
|
7
7
|
import { Readable, Transform } from "node:stream";
|
|
8
8
|
// src/server/flight-source-node.ts
|
|
9
9
|
function ignoreError() {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { addSpanEvent, getSpanId, getTraceId, withSpan } from "./tracing.js";
|
|
3
|
-
import { revalidatePath, revalidateTag } from "./actions.js";
|
|
4
2
|
import { getHeaders, getSegmentParams } from "./request-context.js";
|
|
5
3
|
import { getCookieJar } from "./cookie-context.js";
|
|
6
|
-
import {
|
|
4
|
+
import { deny, redirect, redirectExternal, waitUntil } from "./primitives.js";
|
|
7
5
|
import { ActionError, createActionClient } from "./action-client.js";
|
|
6
|
+
import { coerce, parseFormData } from "./form-data.js";
|
|
7
|
+
import { revalidatePath, revalidateTag } from "./actions.js";
|
|
8
8
|
import { RedirectType } from "../shared/redirect-type.js";
|
|
9
|
-
import {
|
|
9
|
+
import { addSpanEvent, getSpanId, getTraceId, withSpan } from "./tracing.js";
|
|
10
10
|
export { ActionError, RedirectType, addSpanEvent, coerce, createActionClient, deny, getCookieJar, getHeaders, getSegmentParams, getSpanId, getTraceId, parseFormData, redirect, redirectExternal, revalidatePath, revalidateTag, waitUntil, withSpan };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { loadModule } from "./safe-load.js";
|
|
2
|
-
import { runWithRouteParams } from "./pipeline-interception.js";
|
|
3
1
|
import { AccessGate } from "./access-gate.js";
|
|
2
|
+
import { runWithRouteParams } from "./pipeline-interception.js";
|
|
3
|
+
import { loadModule } from "./safe-load.js";
|
|
4
4
|
// src/server/interception-gates.ts
|
|
5
5
|
async function loadInterceptionGates(match) {
|
|
6
6
|
const canonical = match.canonical;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { generateTraceId, replaceTraceId, runWithTraceId } from "./tracing.js";
|
|
3
|
-
import { getLogger, logCacheMiss, logMiddlewareError, logMiddlewareShortCircuit, logProxyError, logRenderError, logRequestCompleted, logRequestReceived, logSlowRequest, logSwrRefetchFailed, logWaitUntilRejected, logWaitUntilUnsupported, setLogger } from "./logger.js";
|
|
4
|
-
import { RenderTimeoutError } from "./render-timeout.js";
|
|
5
|
-
import { hasPrebuiltPayloadSource, setPrebuiltPayloadSource } from "./prebuilt/payload-source.js";
|
|
6
|
-
import { canonicalize } from "./canonicalize.js";
|
|
7
|
-
import { executeAction } from "./actions.js";
|
|
8
2
|
import { getHeader, getSearchParams, getSegmentParams, markResponseFlushed, runWithRequestContext, setMutableCookieContext, setSegmentParams } from "./request-context.js";
|
|
9
3
|
import { getCookie, getSetCookieHeaders } from "./cookie-context.js";
|
|
10
4
|
import { coerce } from "./form-data.js";
|
|
11
|
-
import { DEFAULT_LIMITS, enforceBodyLimits, parseBodySize } from "./body-limits.js";
|
|
12
|
-
import { callOnRequestError, hasOnRequestError, loadInstrumentation } from "./instrumentation.js";
|
|
13
5
|
import { DenySignal, RedirectSignal } from "./primitives.js";
|
|
14
|
-
import {
|
|
15
|
-
import { runWithEarlyHintsSender, sendEarlyHints103 } from "./early-hints-sender.js";
|
|
6
|
+
import { createPipeline } from "./pipeline.js";
|
|
16
7
|
import { collectEarlyHintHeaders, formatLinkHeader } from "./early-hints.js";
|
|
8
|
+
import { runWithEarlyHintsSender, sendEarlyHints103 } from "./early-hints-sender.js";
|
|
9
|
+
import { canonicalize } from "./canonicalize.js";
|
|
17
10
|
import { runProxy } from "./proxy.js";
|
|
18
11
|
import { runMiddleware } from "./middleware-runner.js";
|
|
19
|
-
import { handleRouteRequest, resolveAllowedMethods } from "./route-handler.js";
|
|
20
|
-
import { createPipeline } from "./pipeline.js";
|
|
21
|
-
import { renderMetadataToElements } from "./metadata-render.js";
|
|
22
|
-
import { resolveMetadata, resolveMetadataUrls, resolveTitle } from "./metadata.js";
|
|
23
12
|
import { AccessGate, SlotAccessGate } from "./access-gate.js";
|
|
24
13
|
import { resolveSlotDenied, resolveStatusFile } from "./status-code-resolver.js";
|
|
25
|
-
import {
|
|
14
|
+
import { DEFAULT_LIMITS, enforceBodyLimits, parseBodySize } from "./body-limits.js";
|
|
15
|
+
import { resolveMetadata, resolveMetadataUrls, resolveTitle } from "./metadata.js";
|
|
16
|
+
import { METADATA_ROUTE_CONVENTIONS, classifyMetadataRoute, getMetadataRouteAutoLink, getMetadataRouteServePath } from "./metadata-routes.js";
|
|
17
|
+
import { executeAction } from "./actions.js";
|
|
18
|
+
import { generateTraceId, replaceTraceId, runWithTraceId } from "./tracing.js";
|
|
19
|
+
import { getLogger, logCacheMiss, logMiddlewareError, logMiddlewareShortCircuit, logProxyError, logRenderError, logRequestCompleted, logRequestReceived, logSlowRequest, logSwrRefetchFailed, logWaitUntilRejected, logWaitUntilUnsupported, setLogger } from "./logger.js";
|
|
20
|
+
import { callOnRequestError, hasOnRequestError, loadInstrumentation } from "./instrumentation.js";
|
|
21
|
+
import { renderMetadataToElements } from "./metadata-render.js";
|
|
22
|
+
import { handleRouteRequest, resolveAllowedMethods } from "./route-handler.js";
|
|
23
|
+
import { RenderTimeoutError } from "./render-timeout.js";
|
|
26
24
|
import { __prebuilt, getPrebuiltRegistration, getPrebuiltRegistry } from "./prebuilt-runtime.js";
|
|
25
|
+
import { hasPrebuiltPayloadSource, setPrebuiltPayloadSource } from "./prebuilt/payload-source.js";
|
|
26
|
+
import { computeComponentCacheKey } from "./prebuilt/cache-key.js";
|
|
27
27
|
export { AccessGate, DEFAULT_LIMITS, DenySignal, METADATA_ROUTE_CONVENTIONS, RedirectSignal, RenderTimeoutError, SlotAccessGate, __prebuilt, callOnRequestError, canonicalize, classifyMetadataRoute, coerce, collectEarlyHintHeaders, computeComponentCacheKey, createPipeline, enforceBodyLimits, executeAction, formatLinkHeader, generateTraceId, getCookie, getHeader, getLogger, getMetadataRouteAutoLink, getMetadataRouteServePath, getPrebuiltRegistration, getPrebuiltRegistry, getSearchParams, getSegmentParams, getSetCookieHeaders, handleRouteRequest, hasOnRequestError, hasPrebuiltPayloadSource, loadInstrumentation, logCacheMiss, logMiddlewareError, logMiddlewareShortCircuit, logProxyError, logRenderError, logRequestCompleted, logRequestReceived, logSlowRequest, logSwrRefetchFailed, logWaitUntilRejected, logWaitUntilUnsupported, markResponseFlushed, parseBodySize, renderMetadataToElements, replaceTraceId, resolveAllowedMethods, resolveMetadata, resolveMetadataUrls, resolveSlotDenied, resolveStatusFile, resolveTitle, runMiddleware, runProxy, runWithEarlyHintsSender, runWithRequestContext, runWithTraceId, sendEarlyHints103, setLogger, setMutableCookieContext, setPrebuiltPayloadSource, setSegmentParams };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isControlFlowSignal } from "./signal-identity.js";
|
|
2
1
|
import { generateTraceId, getTraceStore } from "./tracing.js";
|
|
3
|
-
import { isDevMode } from "./debug.js";
|
|
4
2
|
import { createDefaultLogger } from "./default-logger.js";
|
|
3
|
+
import { isDevMode } from "./debug.js";
|
|
4
|
+
import { isControlFlowSignal } from "./signal-identity.js";
|
|
5
5
|
// src/server/logger.ts
|
|
6
6
|
var _logger = createDefaultLogger();
|
|
7
7
|
function setLogger(logger) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { METADATA_ROUTE_CONVENTIONS, getMetadataRouteAutoLink, resolveServePathForFile } from "./metadata-routes.js";
|
|
2
1
|
import { matchMetadataRoute } from "./route-matcher.js";
|
|
3
2
|
import { extractUrlParts } from "./chain-url-parts.js";
|
|
3
|
+
import { METADATA_ROUTE_CONVENTIONS, getMetadataRouteAutoLink, resolveServePathForFile } from "./metadata-routes.js";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
// src/server/metadata-route-links.ts
|
|
6
6
|
var _devNonce;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createStreamTimingRecorder, wrapResponseWithStreamTiming } from "./stream-utils.js";
|
|
2
1
|
import { NODE_BODY } from "./node-response.js";
|
|
2
|
+
import { createStreamTimingRecorder, wrapResponseWithStreamTiming } from "./stream-utils.js";
|
|
3
3
|
import { Readable, Transform, pipeline } from "node:stream";
|
|
4
4
|
// src/server/node-body-response.ts
|
|
5
5
|
var NULL_BODY_STATUSES = new Set([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isDebug } from "./debug.js";
|
|
2
1
|
import { effectiveUrlSegment } from "../routing/segment-classify.js";
|
|
3
2
|
import { toBracketKey } from "../params/resolve-schema.js";
|
|
4
3
|
import { getSchemaCodec, hasSchemaCodecs } from "../params/codec-registry.js";
|
|
5
4
|
import { normalizeParamValue } from "../shared/param-value.js";
|
|
5
|
+
import { isDebug } from "./debug.js";
|
|
6
6
|
// src/server/param-coercion.ts
|
|
7
7
|
var ParamCoercionError = class extends Error {
|
|
8
8
|
constructor(message) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { isAbortError } from "./render-utils.js";
|
|
2
|
-
import { requestContextAls } from "./als-registry.js";
|
|
3
|
-
import { isControlFlowSignal } from "./signal-identity.js";
|
|
4
|
-
import { getTraceId } from "./tracing.js";
|
|
5
|
-
import { logRenderError, logSkippedModule, swallow } from "./logger.js";
|
|
6
|
-
import { csrfRejectionResponse, validateCsrf } from "./csrf.js";
|
|
7
|
-
import { onAbortUntil } from "./abort-scope.js";
|
|
8
|
-
import { getWaitUntil } from "./waituntil-bridge.js";
|
|
9
|
-
import { canonicalRequestPath } from "./canonicalize.js";
|
|
10
|
-
import { appVisibleSearch } from "../shared/rsc-cache-key.js";
|
|
11
1
|
import { getSetCookieHeaders } from "./cookie-context.js";
|
|
12
2
|
import { callOnRequestError, hasOnRequestError } from "./instrumentation.js";
|
|
3
|
+
import { getTraceId } from "./tracing.js";
|
|
4
|
+
import { requestContextAls } from "./als-registry.js";
|
|
5
|
+
import { onAbortUntil } from "./abort-scope.js";
|
|
13
6
|
import { RedirectSignal } from "./primitives.js";
|
|
7
|
+
import { isControlFlowSignal } from "./signal-identity.js";
|
|
8
|
+
import { logRenderError, logSkippedModule, swallow } from "./logger.js";
|
|
9
|
+
import { isAbortError } from "./render-utils.js";
|
|
14
10
|
import { ModuleLoadError, loadModule } from "./safe-load.js";
|
|
11
|
+
import { getWaitUntil } from "./waituntil-bridge.js";
|
|
15
12
|
import { isApiRouteChain, isCsrfExemptRoute } from "./route-matcher.js";
|
|
13
|
+
import { csrfRejectionResponse, validateCsrf } from "./csrf.js";
|
|
14
|
+
import { canonicalRequestPath } from "./canonicalize.js";
|
|
16
15
|
import { isRscRequest } from "../shared/rsc-media-type.js";
|
|
16
|
+
import { appVisibleSearch } from "../shared/rsc-cache-key.js";
|
|
17
17
|
import { withResponseInit } from "./node-response.js";
|
|
18
18
|
// src/server/pipeline-helpers.ts
|
|
19
19
|
function csrfGate(req, canonicalPath, csrf, matchRoute) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { canonicalize } from "./canonicalize.js";
|
|
2
|
-
import { runWithSegmentParams } from "./request-context.js";
|
|
3
|
-
import { collectMiddlewareChain, matchedSegmentPath } from "./route-matcher.js";
|
|
4
|
-
import { isRscRequest } from "../shared/rsc-media-type.js";
|
|
5
1
|
import { classifyUrlSegment } from "../routing/segment-classify.js";
|
|
6
2
|
import { computeSegmentTreePaths } from "../routing/segment-keys.js";
|
|
3
|
+
import { isRscRequest } from "../shared/rsc-media-type.js";
|
|
4
|
+
import { canonicalize } from "./canonicalize.js";
|
|
7
5
|
import { parseClientStateTree } from "./state-tree-diff.js";
|
|
6
|
+
import { collectMiddlewareChain, matchedSegmentPath } from "./route-matcher.js";
|
|
7
|
+
import { runWithSegmentParams } from "./request-context.js";
|
|
8
8
|
// src/server/pipeline-interception.ts
|
|
9
9
|
function findInterceptionMatch(targetPathname, resolveSourceScopes, rewrites) {
|
|
10
10
|
const candidates = rewrites.filter((rewrite) => pathnameMatchesPattern(targetPathname, rewrite.interceptedPattern));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
2
|
-
import { isDebug } from "./debug.js";
|
|
3
|
-
import { logRenderError, logRouteSetupError } from "./logger.js";
|
|
4
|
-
import { concatBytes, drainWithDeadline } from "./stream-utils.js";
|
|
5
|
-
import { onAbortUntil } from "./abort-scope.js";
|
|
6
|
-
import { resolveRenderTimeoutMs } from "./render-timeout.js";
|
|
7
|
-
import { setMatchedSegmentPath, setSegmentParams } from "./request-context.js";
|
|
8
|
-
import { loadModule } from "./safe-load.js";
|
|
9
|
-
import { collectMiddlewareChain, matchedSegmentPath } from "./route-matcher.js";
|
|
10
1
|
import { applyCookieJar, buildRedirectResponse, cloneWithMutableHeaders, dynamicResponseHeaders, fireOnRequestError } from "./pipeline-helpers.js";
|
|
11
2
|
import { errorResponseHeaders } from "./error-response-headers.js";
|
|
12
3
|
import { outcomeToResponse } from "./pipeline-outcome.js";
|
|
4
|
+
import { runMiddlewarePhase } from "./pipeline-phases.js";
|
|
13
5
|
import { METADATA_CACHE_CONTROL, serializeSitemap, serveStaticMetadataFile } from "./pipeline-metadata.js";
|
|
14
6
|
import { ParamCoercionError, coerceSegmentParams, warnParamCoercionFailure } from "./param-coercion.js";
|
|
7
|
+
import { setMatchedSegmentPath, setSegmentParams } from "./request-context.js";
|
|
8
|
+
import { collectMiddlewareChain, matchedSegmentPath } from "./route-matcher.js";
|
|
15
9
|
import { mergeResponseHeaders } from "./route-handler.js";
|
|
16
10
|
import { runAccessChain } from "./traced-access.js";
|
|
17
|
-
import {
|
|
11
|
+
import { loadModule } from "./safe-load.js";
|
|
12
|
+
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
13
|
+
import { logRenderError, logRouteSetupError } from "./logger.js";
|
|
14
|
+
import { isDebug } from "./debug.js";
|
|
15
|
+
import { resolveRenderTimeoutMs } from "./render-timeout.js";
|
|
16
|
+
import { concatBytes, drainWithDeadline } from "./stream-utils.js";
|
|
17
|
+
import { onAbortUntil } from "./abort-scope.js";
|
|
18
18
|
// src/server/pipeline-metadata-route.ts
|
|
19
19
|
async function serveMetadataRoute(config, req, method, path, pathname, metaMatch) {
|
|
20
20
|
const { segments } = metaMatch;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isDebug } from "./debug.js";
|
|
1
|
+
import { applyCookieJar, buildRedirectResponse, cloneWithMutableHeaders, dynamicResponseHeaders, fireOnRequestError, mergeMissingHeaders } from "./pipeline-helpers.js";
|
|
3
2
|
import { logMiddlewareError, logMiddlewareShortCircuit, logProxyError, logRenderError, logRouteError, logRouteSetupError } from "./logger.js";
|
|
4
3
|
import { markResponseFlushed } from "./request-context.js";
|
|
4
|
+
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
5
5
|
import { isApiRouteChain } from "./route-matcher.js";
|
|
6
|
-
import {
|
|
7
|
-
import { applyCookieJar, buildRedirectResponse, cloneWithMutableHeaders, dynamicResponseHeaders, fireOnRequestError, mergeMissingHeaders } from "./pipeline-helpers.js";
|
|
6
|
+
import { isDebug } from "./debug.js";
|
|
8
7
|
import { errorResponseHeaders } from "./error-response-headers.js";
|
|
9
8
|
import { rscErrorEnvelope } from "./rsc-error-envelope.js";
|
|
9
|
+
import { isRscRequest } from "../shared/rsc-media-type.js";
|
|
10
10
|
// src/server/pipeline-outcome.ts
|
|
11
11
|
function rscErrorResponse(isRsc, status, headers) {
|
|
12
12
|
if (isRsc) return rscErrorEnvelope(status, headers);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { withSpan } from "./tracing.js";
|
|
2
|
-
import { isDebug } from "./debug.js";
|
|
3
|
-
import { logRenderError, swallow } from "./logger.js";
|
|
4
|
-
import { applyReloadHeaders, checkVersionSkew } from "./version-skew.js";
|
|
5
1
|
import { canonicalize } from "./canonicalize.js";
|
|
6
|
-
import { applyRequestHeaderOverlay, setMatchedSegmentPath, setMutableCookieContext, setSegmentParams } from "./request-context.js";
|
|
7
|
-
import { isApiRouteChain, matchedSegmentPath } from "./route-matcher.js";
|
|
8
|
-
import { isRscRequest } from "../shared/rsc-media-type.js";
|
|
9
|
-
import { applyCookieJar, cloneWithMutableHeaders, dynamicResponseHeaders, fireOnRequestError } from "./pipeline-helpers.js";
|
|
10
|
-
import { withTiming } from "./server-timing.js";
|
|
11
2
|
import { runProxy } from "./proxy.js";
|
|
12
3
|
import { runMiddlewareChain } from "./middleware-runner.js";
|
|
4
|
+
import { withTiming } from "./server-timing.js";
|
|
5
|
+
import { applyRequestHeaderOverlay, setMatchedSegmentPath, setMutableCookieContext, setSegmentParams } from "./request-context.js";
|
|
6
|
+
import { withSpan } from "./tracing.js";
|
|
13
7
|
import { requestCspNonce } from "./csp-nonce.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { logRenderError, swallow } from "./logger.js";
|
|
9
|
+
import { applyReloadHeaders, checkVersionSkew } from "./version-skew.js";
|
|
16
10
|
import { serveMetadataRoute } from "./pipeline-metadata-route.js";
|
|
17
11
|
import { interceptedMiddlewareChain, resolveInterceptedRoute, runWithRouteParams } from "./pipeline-interception.js";
|
|
12
|
+
import { isApiRouteChain, matchedSegmentPath } from "./route-matcher.js";
|
|
13
|
+
import { applyCookieJar, cloneWithMutableHeaders, dynamicResponseHeaders, fireOnRequestError } from "./pipeline-helpers.js";
|
|
14
|
+
import { ParamCoercionError, coerceSegmentParams, warnParamCoercionFailure } from "./param-coercion.js";
|
|
15
|
+
import { outcomeToResponse, thrownOutcome } from "./pipeline-outcome.js";
|
|
16
|
+
import { isDebug } from "./debug.js";
|
|
17
|
+
import { isRscRequest } from "../shared/rsc-media-type.js";
|
|
18
18
|
// src/server/pipeline-phases.ts
|
|
19
19
|
async function runProxyPhase(config, getProxy, req, method, path, next) {
|
|
20
20
|
const detailed = config.serverTiming === "detailed";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { logRequestCompleted, logRequestReceived, logSlowRequest } from "./logger.js";
|
|
1
|
+
import { getServerTimingHeader, runWithTimingCollector } from "./server-timing.js";
|
|
2
|
+
import { traceTimingEntry } from "../shared/dev-span.js";
|
|
4
3
|
import { wrapResponseWithStreamTiming } from "./stream-utils.js";
|
|
5
|
-
import { canonicalize } from "./canonicalize.js";
|
|
6
|
-
import { RSC_KEY_HEADERS } from "../shared/rsc-cache-key.js";
|
|
7
4
|
import { runWithRequestContext } from "./request-context.js";
|
|
8
|
-
import {
|
|
5
|
+
import { generateTraceId, getOtelTraceId, getTraceId, replaceTraceId, runWithTraceId, setSpanAttribute, withSpan } from "./tracing.js";
|
|
6
|
+
import { logRequestCompleted, logRequestReceived, logSlowRequest } from "./logger.js";
|
|
9
7
|
import { canonicalRedirect, csrfGate, makeProxyResolver } from "./pipeline-helpers.js";
|
|
10
|
-
import { traceTimingEntry } from "../shared/dev-span.js";
|
|
11
|
-
import { getServerTimingHeader, runWithTimingCollector } from "./server-timing.js";
|
|
12
|
-
import { outcomeToResponse } from "./pipeline-outcome.js";
|
|
13
|
-
import { stripHeadBody } from "./head-response.js";
|
|
14
8
|
import { handleRequest, runProxyPhase } from "./pipeline-phases.js";
|
|
9
|
+
import { outcomeToResponse } from "./pipeline-outcome.js";
|
|
10
|
+
import { canonicalize } from "./canonicalize.js";
|
|
15
11
|
import { enforceRscCacheKey, hardenRscPayloadResponse } from "./rsc-cache-key-guard.js";
|
|
12
|
+
import { stripHeadBody } from "./head-response.js";
|
|
16
13
|
import { dropUpstreamFraming } from "./response-framing.js";
|
|
14
|
+
import { RSC_KEY_HEADERS } from "../shared/rsc-cache-key.js";
|
|
15
|
+
import { isDebug } from "./debug.js";
|
|
16
|
+
import { nodeBodyOps } from "./node-response.js";
|
|
17
17
|
// src/server/pipeline.ts
|
|
18
18
|
function createPipeline(config) {
|
|
19
19
|
const proxyResolver = makeProxyResolver(config.proxy);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { clientComponents } from "../vite-handoff-rsc.js";
|
|
2
2
|
import { requestContextAls } from "../als-registry.js";
|
|
3
3
|
import { collectFlightBytes } from "../flight-source.js";
|
|
4
|
+
import { createCaptureScope } from "./capture-state.js";
|
|
4
5
|
import { resolveTags } from "./lifetime.js";
|
|
5
6
|
import { LAYOUT_CHILDREN_SLOT } from "./slots.js";
|
|
6
|
-
import { createCaptureScope } from "./capture-state.js";
|
|
7
7
|
import { createBuildTimeStore } from "./synthetic-store.js";
|
|
8
8
|
import { createElement } from "../../_react/react.js";
|
|
9
9
|
// src/server/prebuilt/capture-render.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { recordInvalidation, recordInvalidationOfAll } from "../../cache/invalidation-epoch.js";
|
|
2
1
|
import { getCacheHandler } from "../../cache/handler-store.js";
|
|
2
|
+
import { recordInvalidation, recordInvalidationOfAll } from "../../cache/invalidation-epoch.js";
|
|
3
3
|
// src/server/prebuilt/dev-store.ts
|
|
4
4
|
var PREBUILT_DEV_CLEAR_EVENT = "timber:prebuilt-dev-clear";
|
|
5
5
|
var mode = "off";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { wasInvalidatedSince } from "../../cache/invalidation-epoch.js";
|
|
2
|
-
import { guardedRead } from "../../cache/guarded-read.js";
|
|
3
1
|
import { getCacheHandler, isCacheHandlerConfigured } from "../../cache/handler-store.js";
|
|
4
|
-
import { devOverlayNamespace } from "./dev-store.js";
|
|
5
2
|
import { MemoryCacheHandler } from "../../cache/index.js";
|
|
3
|
+
import { guardedRead } from "../../cache/guarded-read.js";
|
|
4
|
+
import { wasInvalidatedSince } from "../../cache/invalidation-epoch.js";
|
|
6
5
|
import { getDeploymentId } from "../version-skew.js";
|
|
6
|
+
import { devOverlayNamespace } from "./dev-store.js";
|
|
7
7
|
import { buildTagIndex } from "./manifest-tag-index.js";
|
|
8
8
|
import { ensureManifestLoaded } from "./payload-source.js";
|
|
9
9
|
// src/server/prebuilt/overlay.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createFromReadableStream, renderFlight } from "./vite-handoff-rsc.js";
|
|
2
|
-
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
3
|
-
import { resolveRenderTimeoutMs } from "./render-timeout.js";
|
|
4
|
-
import { loadModule } from "./safe-load.js";
|
|
5
|
-
import { createRouteMatcher } from "./route-matcher.js";
|
|
6
1
|
import { ParamCoercionError, coerceSegmentParams } from "./param-coercion.js";
|
|
2
|
+
import { isDenySignal, isRedirectSignal } from "./signal-identity.js";
|
|
7
3
|
import { computeComponentCacheKey } from "./prebuilt/cache-key.js";
|
|
8
|
-
import { warnNestingClamps } from "./prebuilt/lifetime.js";
|
|
9
|
-
import { BuildTimeContextError } from "./prebuilt/synthetic-store.js";
|
|
10
4
|
import { bytesToStream, renderEntry } from "./prebuilt/capture-render.js";
|
|
11
|
-
import { resolvePathWithParams } from "./sitemap-generator.js";
|
|
12
5
|
import { collectCandidateRoutes, enumerateCombos } from "./prebuilt/capture-routes.js";
|
|
6
|
+
import { warnNestingClamps } from "./prebuilt/lifetime.js";
|
|
7
|
+
import { BuildTimeContextError } from "./prebuilt/synthetic-store.js";
|
|
13
8
|
import { getPrebuiltRegistration } from "./prebuilt-runtime.js";
|
|
9
|
+
import { createRouteMatcher } from "./route-matcher.js";
|
|
10
|
+
import { createFromReadableStream, renderFlight } from "./vite-handoff-rsc.js";
|
|
11
|
+
import { loadModule } from "./safe-load.js";
|
|
12
|
+
import { resolvePathWithParams } from "./sitemap-generator.js";
|
|
13
|
+
import { resolveRenderTimeoutMs } from "./render-timeout.js";
|
|
14
14
|
// src/server/prebuilt-builder.ts
|
|
15
15
|
async function loadLazyChunk(chunkFile) {
|
|
16
16
|
await import(/^[a-z]+:/i.test(chunkFile) ? chunkFile : new URL(chunkFile, import.meta.url).href);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { createFromReadableStream, renderFlight } from "./vite-handoff-rsc.js";
|
|
2
1
|
import { requestContextAls } from "./als-registry.js";
|
|
3
|
-
import { swallow } from "./logger.js";
|
|
4
|
-
import { collectFlightBytes } from "./flight-source.js";
|
|
5
|
-
import { createSingleflight } from "../cache/singleflight.js";
|
|
6
|
-
import { currentInvalidationEpoch, lastInvalidationEpochFor, wasInvalidatedSince } from "../cache/invalidation-epoch.js";
|
|
7
|
-
import { DEFAULT_RENDER_TIMEOUT_MS } from "./render-timeout.js";
|
|
8
|
-
import { getWaitUntil } from "./waituntil-bridge.js";
|
|
9
|
-
import { clearDevPrebuiltStore, devComponentTag, devEntryKey, discardDevEntry, getDevSeed, isDevPrebuiltCacheBypassed, isDevPrebuiltStoreActive, isHardReload, setDevSeed } from "./prebuilt/dev-store.js";
|
|
10
|
-
import { observeKeyDiscipline } from "../cache/key-discipline.js";
|
|
11
|
-
import { hasPrebuiltPayloadSource, isParamIndependent, lookupArtifactSeed } from "./prebuilt/payload-source.js";
|
|
12
|
-
import { lookupOverlay, mayStoreRerender, overlayKey, storeOverlayEntry } from "./prebuilt/overlay.js";
|
|
13
|
-
import { runOutsideReactCacheScope } from "./react-cache-scope.js";
|
|
14
|
-
import { runBackgroundFlight } from "./pipeline-helpers.js";
|
|
15
2
|
import { computeComponentCacheKey, resolveKeyParams } from "./prebuilt/cache-key.js";
|
|
16
|
-
import { hasRuntimeLifetime, resolveTags, warnNestingClamps } from "./prebuilt/lifetime.js";
|
|
17
3
|
import { prepareSlotRender, resolveSlotNames, withoutChildrenOutlet, wrapInSlotsProvider } from "./prebuilt/slots.js";
|
|
4
|
+
import { observeKeyDiscipline } from "../cache/key-discipline.js";
|
|
18
5
|
import { createCaptureScope, isCaptureActive, noteWrapperRender } from "./prebuilt/capture-state.js";
|
|
19
|
-
import {
|
|
6
|
+
import { hasRuntimeLifetime, resolveTags, warnNestingClamps } from "./prebuilt/lifetime.js";
|
|
7
|
+
import { hasPrebuiltPayloadSource, isParamIndependent, lookupArtifactSeed } from "./prebuilt/payload-source.js";
|
|
8
|
+
import { lookupOverlay, mayStoreRerender, overlayKey, storeOverlayEntry } from "./prebuilt/overlay.js";
|
|
9
|
+
import { clearDevPrebuiltStore, devComponentTag, devEntryKey, discardDevEntry, getDevSeed, isDevPrebuiltCacheBypassed, isDevPrebuiltStoreActive, isHardReload, setDevSeed } from "./prebuilt/dev-store.js";
|
|
20
10
|
import { renderEntry } from "./prebuilt/capture-render.js";
|
|
11
|
+
import { BuildTimeContextError } from "./prebuilt/synthetic-store.js";
|
|
12
|
+
import { getWaitUntil } from "./waituntil-bridge.js";
|
|
13
|
+
import { swallow } from "./logger.js";
|
|
14
|
+
import { runBackgroundFlight } from "./pipeline-helpers.js";
|
|
15
|
+
import { runOutsideReactCacheScope } from "./react-cache-scope.js";
|
|
16
|
+
import { collectFlightBytes } from "./flight-source.js";
|
|
17
|
+
import { createFromReadableStream, renderFlight } from "./vite-handoff-rsc.js";
|
|
18
|
+
import { DEFAULT_RENDER_TIMEOUT_MS } from "./render-timeout.js";
|
|
19
|
+
import { createSingleflight } from "../cache/singleflight.js";
|
|
20
|
+
import { currentInvalidationEpoch, lastInvalidationEpochFor, wasInvalidatedSince } from "../cache/invalidation-epoch.js";
|
|
21
21
|
import { createElement } from "../_react/react.js";
|
|
22
22
|
// src/server/prebuilt-runtime.ts
|
|
23
23
|
var DEFAULT_COMPONENT_TIMEOUT_MS = DEFAULT_RENDER_TIMEOUT_MS;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DENY_BRAND, REDIRECT_BRAND } from "./signal-identity.js";
|
|
2
|
-
import { isDebug } from "./debug.js";
|
|
3
1
|
import { getWaitUntil } from "./waituntil-bridge.js";
|
|
2
|
+
import { isDebug } from "./debug.js";
|
|
4
3
|
import { getRequestSearchString } from "./request-context.js";
|
|
5
4
|
import { mergePreservedSearchParams } from "../shared/merge-search-params.js";
|
|
5
|
+
import { DENY_BRAND, REDIRECT_BRAND } from "./signal-identity.js";
|
|
6
6
|
import { assertRelativeRedirectPath, validateExternalRedirectUrl } from "../shared/href-validation.js";
|
|
7
7
|
import { RedirectType } from "../shared/redirect-type.js";
|
|
8
8
|
// src/server/primitives.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getSegmentParamsForClient, getSlotParamsForClient } from "./request-context.js";
|
|
2
1
|
import { toPlainRecord } from "../shared/param-value.js";
|
|
2
|
+
import { getSegmentParamsForClient, getSlotParamsForClient } from "./request-context.js";
|
|
3
3
|
// src/server/publish-params.ts
|
|
4
4
|
function withPublishedParams(element) {
|
|
5
5
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { requestContextAls } from "./als-registry.js";
|
|
2
|
-
import { isDebug } from "./debug.js";
|
|
3
2
|
import { _setGetSearchParamsFn, _setGetSegmentParamsFn } from "../shared/als-slots.js";
|
|
4
3
|
import { appVisibleSearch } from "../shared/rsc-cache-key.js";
|
|
5
4
|
import { mergeSlotParams, resolveSegmentParams } from "../shared/slot-params.js";
|
|
5
|
+
import { isDebug } from "./debug.js";
|
|
6
6
|
import { runWithReactCacheScope } from "./react-cache-scope.js";
|
|
7
7
|
// src/server/request-context.ts
|
|
8
8
|
function getHeaders() {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { clientComponents } from "./vite-handoff-rsc.js";
|
|
2
|
-
import { isDenySignal } from "./signal-identity.js";
|
|
3
2
|
import { withSpan } from "./tracing.js";
|
|
4
|
-
import {
|
|
5
|
-
import { loadFallbackModule } from "./pipeline-helpers.js";
|
|
6
|
-
import { computeSegmentKeys, computeSegmentTreePaths } from "../routing/segment-keys.js";
|
|
3
|
+
import { isDenySignal } from "./signal-identity.js";
|
|
7
4
|
import { isClientReference } from "./utils/element-type.js";
|
|
8
5
|
import { loadRouteModules } from "./route-module-loader.js";
|
|
9
|
-
import { consumedUrlParts } from "./chain-url-parts.js";
|
|
10
6
|
import { MetadataCollector, MetadataHead } from "./metadata-collector.js";
|
|
11
|
-
import { PageDenyBoundary, buildDenyPageChain, handleCaughtDeny, setFirstDeniedSegmentIndex } from "./deny-boundary.js";
|
|
12
7
|
import { AccessGate } from "./access-gate.js";
|
|
13
|
-
import {
|
|
8
|
+
import { PageDenyBoundary, buildDenyPageChain, handleCaughtDeny, setFirstDeniedSegmentIndex } from "./deny-boundary.js";
|
|
14
9
|
import { emitSlotInfoForSkippedLayout, publishSlotSegmentParams, resolveSlotProps } from "./slot-resolver.js";
|
|
10
|
+
import { consumedUrlParts } from "./chain-url-parts.js";
|
|
15
11
|
import { withPublishedParams } from "./publish-params.js";
|
|
12
|
+
import { wrapSegmentWithErrorBoundaries } from "./error-boundary-wrapper.js";
|
|
16
13
|
import { computeSkippableSet } from "./skippable-prefix.js";
|
|
14
|
+
import { computeSegmentKeys, computeSegmentTreePaths } from "../routing/segment-keys.js";
|
|
15
|
+
import { loadFallbackModule } from "./pipeline-helpers.js";
|
|
17
16
|
import { replaceOutermostSegmentOutlet } from "./route-element-helpers.js";
|
|
17
|
+
import { getActionErrorForRender } from "./request-context.js";
|
|
18
18
|
import { loadInterceptionGates } from "./interception-gates.js";
|
|
19
19
|
import { Fragment, createElement } from "../_react/react.js";
|
|
20
20
|
// src/server/route-element-builder.ts
|