@timber-js/app 0.2.0-alpha.198 → 0.2.0-alpha.199
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-BS-m5SLv.js → actions-d1hCqnU3.js} +35 -8
- package/dist/_chunks/actions-d1hCqnU3.js.map +1 -0
- package/dist/_chunks/als-registry-C6kcfprT.js.map +1 -1
- package/dist/_chunks/{cache-api-DqzgTEqk.js → cache-api-ByagcC-J.js} +2 -2
- package/dist/_chunks/{cache-api-DqzgTEqk.js.map → cache-api-ByagcC-J.js.map} +1 -1
- package/dist/_chunks/canonicalize-CgHoscYO.js +66 -0
- package/dist/_chunks/canonicalize-CgHoscYO.js.map +1 -0
- package/dist/_chunks/{chains-CZG7E5zg.js → chains-Bpb0W4ax.js} +3 -3
- package/dist/_chunks/{chains-CZG7E5zg.js.map → chains-Bpb0W4ax.js.map} +1 -1
- package/dist/_chunks/{cli-check-dVDi1GQz.js → cli-check-D6VolrDV.js} +3 -3
- package/dist/_chunks/{cli-check-dVDi1GQz.js.map → cli-check-D6VolrDV.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-DTy_-Msq.js → cli-schema-sync-D6rO-VcS.js} +2 -2
- package/dist/_chunks/{cli-schema-sync-DTy_-Msq.js.map → cli-schema-sync-D6rO-VcS.js.map} +1 -1
- package/dist/_chunks/{convention-lint-Ph6luW4c.js → convention-lint-fRkwVwEH.js} +25 -4
- package/dist/_chunks/convention-lint-fRkwVwEH.js.map +1 -0
- package/dist/_chunks/error-boundary-BfPHZjm0.js +1050 -0
- package/dist/_chunks/error-boundary-BfPHZjm0.js.map +1 -0
- package/dist/_chunks/{live-graph-BXDsdzBv.js → live-graph-D_2D32Ad.js} +3 -3
- package/dist/_chunks/{live-graph-BXDsdzBv.js.map → live-graph-D_2D32Ad.js.map} +1 -1
- package/dist/_chunks/{logger-DDirEsn7.js → logger-uLBuGKDI.js} +471 -440
- package/dist/_chunks/logger-uLBuGKDI.js.map +1 -0
- package/dist/_chunks/{navigation-root-B00jjGd5.js → navigation-context-D0TU0Jog.js} +3 -101
- package/dist/_chunks/navigation-context-D0TU0Jog.js.map +1 -0
- package/dist/_chunks/navigation-root-mHSK9psY.js +126 -0
- package/dist/_chunks/{navigation-root-B00jjGd5.js.map → navigation-root-mHSK9psY.js.map} +1 -1
- package/dist/_chunks/{poison-scan-BoDLgbix.js → poison-scan-Bm9Yyqk9.js} +2 -2
- package/dist/_chunks/{poison-scan-BoDLgbix.js.map → poison-scan-Bm9Yyqk9.js.map} +1 -1
- package/dist/_chunks/{scanner-tdFPvDYi.js → scanner-AiazgH_f.js} +6 -5
- package/dist/_chunks/scanner-AiazgH_f.js.map +1 -0
- package/dist/_chunks/{segment-keys-BhqoHiLc.js → segment-keys-lqtdookO.js} +2 -65
- package/dist/_chunks/segment-keys-lqtdookO.js.map +1 -0
- package/dist/_chunks/{ssr-data-BQGhTPAK.js → ssr-data-D6T6Y3ef.js} +4 -26
- package/dist/_chunks/ssr-data-D6T6Y3ef.js.map +1 -0
- package/dist/_chunks/state-FippDgxN.js +52 -0
- package/dist/_chunks/state-FippDgxN.js.map +1 -0
- package/dist/_chunks/status-page-marker-DwQBrLBz.js +496 -0
- package/dist/_chunks/status-page-marker-DwQBrLBz.js.map +1 -0
- package/dist/_chunks/{walkers-DNX05dC0.js → walkers-B6XUtmqK.js} +2 -2
- package/dist/_chunks/{walkers-DNX05dC0.js.map → walkers-B6XUtmqK.js.map} +1 -1
- package/dist/analyze/crawl-entry.js +2 -2
- package/dist/analyze/graph-command.js +2 -2
- package/dist/cache/index.js +1 -1
- package/dist/cli.js +2 -2
- package/dist/client/browser-entry/action-dispatch.d.ts +6 -4
- package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
- package/dist/client/browser-entry/action-queue.d.ts +44 -0
- package/dist/client/browser-entry/action-queue.d.ts.map +1 -0
- package/dist/client/browser-entry/router-init.d.ts.map +1 -1
- package/dist/client/deny-last-resort.d.ts +29 -0
- package/dist/client/deny-last-resort.d.ts.map +1 -0
- package/dist/client/error-boundary.d.ts +48 -2
- package/dist/client/error-boundary.d.ts.map +1 -1
- package/dist/client/error-boundary.js +2 -2
- package/dist/client/history.d.ts +21 -2
- package/dist/client/history.d.ts.map +1 -1
- package/dist/client/index.js +34 -14
- package/dist/client/index.js.map +1 -1
- package/dist/client/internal.d.ts +1 -0
- package/dist/client/internal.d.ts.map +1 -1
- package/dist/client/internal.js +272 -1225
- package/dist/client/internal.js.map +1 -1
- package/dist/client/link.d.ts.map +1 -1
- package/dist/client/navigation-commit.d.ts +12 -19
- package/dist/client/navigation-commit.d.ts.map +1 -1
- package/dist/client/navigation-transition.d.ts +62 -11
- package/dist/client/navigation-transition.d.ts.map +1 -1
- package/dist/client/router-effects.d.ts +9 -8
- package/dist/client/router-effects.d.ts.map +1 -1
- package/dist/client/router-lifecycle.d.ts +60 -17
- package/dist/client/router-lifecycle.d.ts.map +1 -1
- package/dist/client/router-pipeline.d.ts +7 -4
- package/dist/client/router-pipeline.d.ts.map +1 -1
- package/dist/client/router-types.d.ts +63 -8
- package/dist/client/router-types.d.ts.map +1 -1
- package/dist/client/router.d.ts.map +1 -1
- package/dist/client/rsc-fetch.d.ts +0 -9
- package/dist/client/rsc-fetch.d.ts.map +1 -1
- package/dist/client/segment-cache.d.ts +23 -8
- package/dist/client/segment-cache.d.ts.map +1 -1
- package/dist/client/state.d.ts +16 -0
- package/dist/client/state.d.ts.map +1 -1
- package/dist/client/status-page-marker.d.ts +25 -0
- package/dist/client/status-page-marker.d.ts.map +1 -0
- package/dist/cookies/index.js +1 -1
- package/dist/dev-tools/holding-server.d.ts +4 -17
- package/dist/dev-tools/holding-server.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +74 -175
- package/dist/index.js.map +1 -1
- package/dist/plugins/dev-server.d.ts.map +1 -1
- package/dist/routing/index.js +2 -2
- package/dist/routing/interception.d.ts +2 -2
- package/dist/routing/slot-placement.d.ts +2 -2
- package/dist/server/access-gate.d.ts +73 -1
- package/dist/server/access-gate.d.ts.map +1 -1
- package/dist/server/action-handler.d.ts.map +1 -1
- package/dist/server/actions.d.ts +16 -1
- package/dist/server/actions.d.ts.map +1 -1
- package/dist/server/als-registry.d.ts +3 -9
- package/dist/server/als-registry.d.ts.map +1 -1
- package/dist/server/children-interception.d.ts +1 -1
- package/dist/server/default-status-page.d.ts +2 -2
- package/dist/server/default-status-page.d.ts.map +1 -1
- package/dist/server/deny-boundary.d.ts +15 -9
- package/dist/server/deny-boundary.d.ts.map +1 -1
- package/dist/server/deny-renderer.d.ts.map +1 -1
- package/dist/server/error-boundary-wrapper.d.ts +21 -4
- package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
- package/dist/server/error-response-headers.d.ts +3 -0
- package/dist/server/error-response-headers.d.ts.map +1 -0
- package/dist/server/index.js +3 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/internal.d.ts +1 -2
- package/dist/server/internal.d.ts.map +1 -1
- package/dist/server/internal.js +2339 -2506
- package/dist/server/internal.js.map +1 -1
- package/dist/server/metadata-collector.d.ts +2 -5
- package/dist/server/metadata-collector.d.ts.map +1 -1
- package/dist/server/param-coercion.d.ts +10 -3
- package/dist/server/param-coercion.d.ts.map +1 -1
- package/dist/server/pipeline-outcome.d.ts.map +1 -1
- package/dist/server/pipeline-phases.d.ts +11 -0
- package/dist/server/pipeline-phases.d.ts.map +1 -1
- package/dist/server/port-resolution.d.ts +3 -89
- package/dist/server/port-resolution.d.ts.map +1 -1
- package/dist/server/primitives.d.ts +38 -10
- package/dist/server/primitives.d.ts.map +1 -1
- package/dist/server/response-cache-policy.d.ts +3 -0
- package/dist/server/response-cache-policy.d.ts.map +1 -0
- package/dist/server/route-element-builder.d.ts +11 -41
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/route-element-helpers.d.ts +12 -0
- package/dist/server/route-element-helpers.d.ts.map +1 -0
- package/dist/server/route-module-loader.d.ts +37 -0
- package/dist/server/route-module-loader.d.ts.map +1 -0
- package/dist/server/rsc-cache-key-guard.d.ts.map +1 -1
- package/dist/server/rsc-entry/action-middleware-runner.d.ts.map +1 -1
- package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-payload.d.ts +22 -1
- package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
- package/dist/server/rsc-entry/rsc-stream.d.ts +4 -11
- package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
- package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
- package/dist/server/rsc-error-envelope.d.ts +11 -0
- package/dist/server/rsc-error-envelope.d.ts.map +1 -0
- package/dist/server/skippable-prefix.d.ts +18 -15
- package/dist/server/skippable-prefix.d.ts.map +1 -1
- package/dist/server/slot-resolver.d.ts.map +1 -1
- package/dist/server/slot-subtree-contain.d.ts +54 -0
- package/dist/server/slot-subtree-contain.d.ts.map +1 -0
- package/dist/server/stream-utils.d.ts.map +1 -1
- package/dist/server/utils/element-type.d.ts +10 -0
- package/dist/server/utils/element-type.d.ts.map +1 -1
- package/dist/shared/rsc-error-envelope.d.ts +0 -9
- package/dist/shared/rsc-error-envelope.d.ts.map +1 -1
- package/dist/shared/status-reason-phrase.d.ts +26 -0
- package/dist/shared/status-reason-phrase.d.ts.map +1 -0
- package/docs/api/30-api-server.mdx +4 -2
- package/docs/api/31-api-client.mdx +5 -1
- package/docs/api/36-cli.mdx +5 -3
- package/docs/learn/12-error-handling.mdx +5 -1
- package/package.json +10 -10
- package/src/client/browser-entry/action-dispatch.ts +166 -99
- package/src/client/browser-entry/action-queue.ts +90 -0
- package/src/client/browser-entry/router-init.ts +60 -35
- package/src/client/deny-last-resort.tsx +54 -0
- package/src/client/error-boundary.tsx +144 -42
- package/src/client/history.ts +52 -3
- package/src/client/internal.ts +1 -0
- package/src/client/link.tsx +70 -35
- package/src/client/navigation-commit.ts +79 -27
- package/src/client/navigation-transition.ts +176 -127
- package/src/client/router-effects.ts +14 -17
- package/src/client/router-lifecycle.ts +181 -115
- package/src/client/router-pipeline.ts +94 -71
- package/src/client/router-types.ts +61 -7
- package/src/client/router.ts +147 -74
- package/src/client/rsc-fetch.ts +0 -13
- package/src/client/segment-cache.ts +43 -10
- package/src/client/state.ts +26 -0
- package/src/client/status-page-marker.tsx +32 -0
- package/src/dev-tools/holding-server.ts +4 -17
- package/src/index.ts +18 -34
- package/src/plugins/dev-server.ts +2 -1
- package/src/routing/interception.ts +2 -2
- package/src/routing/slot-placement.ts +2 -2
- package/src/server/access-gate.tsx +89 -21
- package/src/server/action-client.ts +2 -2
- package/src/server/action-handler.ts +23 -10
- package/src/server/actions.ts +81 -34
- package/src/server/als-registry.ts +3 -9
- package/src/server/children-interception.ts +1 -1
- package/src/server/default-status-page.ts +7 -47
- package/src/server/deny-boundary.ts +45 -28
- package/src/server/deny-renderer.ts +6 -2
- package/src/server/error-boundary-wrapper.ts +23 -4
- package/src/server/error-response-headers.ts +18 -0
- package/src/server/internal.ts +2 -10
- package/src/server/metadata-collector.ts +3 -18
- package/src/server/param-coercion.ts +13 -4
- package/src/server/pipeline-outcome.ts +35 -13
- package/src/server/pipeline-phases.ts +22 -16
- package/src/server/port-resolution.ts +3 -165
- package/src/server/prebuilt-builder.ts +4 -4
- package/src/server/primitives.ts +75 -11
- package/src/server/response-cache-policy.ts +45 -0
- package/src/server/route-element-builder.ts +149 -412
- package/src/server/route-element-helpers.ts +37 -0
- package/src/server/route-handler.ts +2 -2
- package/src/server/route-module-loader.ts +161 -0
- package/src/server/rsc-cache-key-guard.ts +2 -42
- package/src/server/rsc-entry/action-middleware-runner.ts +4 -4
- package/src/server/rsc-entry/api-handler.ts +5 -5
- package/src/server/rsc-entry/error-renderer.ts +3 -4
- package/src/server/rsc-entry/helpers.ts +1 -1
- package/src/server/rsc-entry/index.ts +3 -3
- package/src/server/rsc-entry/render-route.ts +4 -8
- package/src/server/rsc-entry/rsc-payload.ts +59 -42
- package/src/server/rsc-entry/rsc-stream.ts +48 -27
- package/src/server/rsc-entry/ssr-renderer.ts +6 -10
- package/src/server/rsc-error-envelope.ts +18 -0
- package/src/server/skippable-prefix.ts +105 -7
- package/src/server/slot-resolver.ts +43 -12
- package/src/server/slot-subtree-contain.ts +255 -0
- package/src/server/stream-utils.ts +12 -8
- package/src/server/utils/element-type.ts +18 -2
- package/src/shared/rsc-error-envelope.ts +0 -15
- package/src/shared/status-reason-phrase.ts +61 -0
- package/dist/_chunks/actions-BS-m5SLv.js.map +0 -1
- package/dist/_chunks/convention-lint-Ph6luW4c.js.map +0 -1
- package/dist/_chunks/error-boundary-BvRCCmbN.js +0 -353
- package/dist/_chunks/error-boundary-BvRCCmbN.js.map +0 -1
- package/dist/_chunks/logger-DDirEsn7.js.map +0 -1
- package/dist/_chunks/mdx-file-CXyHGUpS.js +0 -25
- package/dist/_chunks/mdx-file-CXyHGUpS.js.map +0 -1
- package/dist/_chunks/router-ref-8gr8qsxN.js +0 -28
- package/dist/_chunks/router-ref-8gr8qsxN.js.map +0 -1
- package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js +0 -40
- package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js.map +0 -1
- package/dist/_chunks/scanner-tdFPvDYi.js.map +0 -1
- package/dist/_chunks/segment-keys-BhqoHiLc.js.map +0 -1
- package/dist/_chunks/ssr-data-BQGhTPAK.js.map +0 -1
- package/dist/server/tree-builder.d.ts +0 -150
- package/dist/server/tree-builder.d.ts.map +0 -1
- package/src/server/tree-builder.ts +0 -313
|
@@ -29,7 +29,6 @@ export interface MetadataCollectorProps {
|
|
|
29
29
|
metadataExport: Metadata | (() => Promise<Metadata>);
|
|
30
30
|
segmentName: string;
|
|
31
31
|
isPage: boolean;
|
|
32
|
-
onSettled?: () => void;
|
|
33
32
|
children: ReactNode;
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
@@ -41,10 +40,8 @@ export interface MetadataCollectorProps {
|
|
|
41
40
|
* Static metadata objects are pushed synchronously (no side effects).
|
|
42
41
|
* Dynamic metadata functions are started (not awaited) and pushed as
|
|
43
42
|
* promises — React descends into children immediately while the I/O
|
|
44
|
-
* runs concurrently (TIM-1367).
|
|
45
|
-
*
|
|
46
|
-
* sibling MetadataSettle component awaits the promise for error
|
|
47
|
-
* ownership only.
|
|
43
|
+
* runs concurrently (TIM-1367). A sibling MetadataSettle component
|
|
44
|
+
* awaits the promise for error ownership.
|
|
48
45
|
*/
|
|
49
46
|
export declare function MetadataCollector(props: MetadataCollectorProps): ReactNode;
|
|
50
47
|
export interface MetadataHeadProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-collector.d.ts","sourceRoot":"","sources":["../../src/server/metadata-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"metadata-collector.d.ts","sourceRoot":"","sources":["../../src/server/metadata-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AA4C9D,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,QAAQ,GAAG,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,SAAS,CAmB1E;AAID,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,CAiC/E"}
|
|
@@ -7,14 +7,21 @@
|
|
|
7
7
|
* the revalidation renderer in `rsc-entry/index.ts`) without pulling
|
|
8
8
|
* the entire pipeline phase module along with it.
|
|
9
9
|
*
|
|
10
|
-
* The function throws `ParamCoercionError`
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* The function throws `ParamCoercionError` (defined below) on any codec
|
|
11
|
+
* failure; the pipeline catches that and dispatches to the 404 page.
|
|
12
|
+
* See design/07-routing.md §"Where Coercion Runs".
|
|
13
13
|
*/
|
|
14
14
|
import type { Codec } from '../codec.ts';
|
|
15
15
|
import type { SegmentType } from '../routing/types.ts';
|
|
16
16
|
import type { RouteMatch } from './pipeline.ts';
|
|
17
17
|
import { type CoercedParams } from '../shared/param-value.ts';
|
|
18
|
+
/**
|
|
19
|
+
* Thrown when an app/schema.ts segment-param codec's parse() fails.
|
|
20
|
+
* The pipeline catches this and responds with 404.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ParamCoercionError extends Error {
|
|
23
|
+
constructor(message: string);
|
|
24
|
+
}
|
|
18
25
|
/**
|
|
19
26
|
* Register the global schema codecs. Called once from the RSC entry
|
|
20
27
|
* at server startup when app/schema.ts provides segment param codecs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"param-coercion.d.ts","sourceRoot":"","sources":["../../src/server/param-coercion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GA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yD1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-outcome.d.ts","sourceRoot":"","sources":["../../src/server/pipeline-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgBH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"pipeline-outcome.d.ts","sourceRoot":"","sources":["../../src/server/pipeline-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgBH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK7D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmChE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE1D,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAID;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,QAAQ,CAAC,CAwHnB"}
|
|
@@ -37,6 +37,17 @@ export declare function runMiddlewarePhase(config: PipelineConfig, req: Request,
|
|
|
37
37
|
/**
|
|
38
38
|
* Run the render phase. Wraps the configured renderer in a span and a
|
|
39
39
|
* timing scope, and translates thrown signals into outcome variants.
|
|
40
|
+
*
|
|
41
|
+
* The render phase owns `responseHeaders` from here on, so it is the one
|
|
42
|
+
* place the cookie jar is applied to that bag (design/29-cookies.md
|
|
43
|
+
* §"Applied Exactly Once"). Doing it here rather than in the middleware
|
|
44
|
+
* phase means every render-phase outcome — a 200, or a deny / redirect /
|
|
45
|
+
* error thrown from render — carries the jar whether or not a middleware
|
|
46
|
+
* chain ran, and `outcomeToResponse` can skip render-phase outcomes
|
|
47
|
+
* unconditionally (TIM-1491). Application precedes `config.render` so
|
|
48
|
+
* middleware cookie writes are visible to route-handler header merging,
|
|
49
|
+
* while handler `Set-Cookie` values still come after them and take
|
|
50
|
+
* precedence.
|
|
40
51
|
*/
|
|
41
52
|
export declare function runRenderPhase(config: PipelineConfig, req: Request, match: RouteMatch, responseHeaders: Headers, requestHeaderOverlay: Headers, { canonicalPathname, interception }: RenderContext): Promise<PhaseOutcome>;
|
|
42
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-phases.d.ts","sourceRoot":"","sources":["../../src/server/pipeline-phases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuBH,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEpG,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAMrF,UAAU,aAAa;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,m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,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,OAAO,EACxB,oBAAoB,EAAE,OAAO,EAC7B,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,YAAY,CAAC,CA2DvB;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,OAAO,EACxB,oBAAoB,EAAE,OAAO,EAC7B,EAAE,iBAAiB,EAAE,YAAY,EAAE,EAAE,aAAa,GACjD,OAAO,CAAC,YAAY,CAAC,CAmBvB;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAAC,QAAQ,CAAC,CAkWnB"}
|
|
@@ -1,31 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Port resolution for the dev server, Vite preview, and the Node
|
|
3
|
-
* production preview server.
|
|
4
|
-
*
|
|
5
|
-
* Behavior (see TIM-842):
|
|
6
|
-
*
|
|
7
|
-
* 1. Default port is **3000** for both dev and prod.
|
|
8
|
-
* 2. If the user did NOT set an explicit port, auto-bump from 3000
|
|
9
|
-
* until a free port is found (3000 → 3001 → 3002 → …).
|
|
10
|
-
* 3. If the user DID set an explicit port (via `--port`, `PORT` env
|
|
11
|
-
* var, or `vite.config.ts` `server.port`), use it as-is and let
|
|
12
|
-
* the bind fail loudly on conflict (`strictPort: true`).
|
|
13
|
-
*
|
|
14
|
-
* The port-bump probe is performed by binding the **actual** server
|
|
15
|
-
* (e.g. the dev holding server) — not a throwaway probe — so there is
|
|
16
|
-
* no time-of-check / time-of-use race between probing and listening.
|
|
17
|
-
*
|
|
18
|
-
* Design doc: 21-dev-server.md §"Default Port and Auto-Bump".
|
|
19
|
-
*/
|
|
1
|
+
/** Port input precedence for dev and preview. Vite owns binding and restart reuse. */
|
|
20
2
|
/** Default port used by `timber dev` and `timber preview`. */
|
|
21
3
|
export declare const DEFAULT_PORT = 3000;
|
|
22
|
-
/**
|
|
23
|
-
* A function that attempts to bind to a given port.
|
|
24
|
-
*
|
|
25
|
-
* Resolves with the bound port on success. Rejects with an error
|
|
26
|
-
* (typically with `code === 'EADDRINUSE'`) on failure.
|
|
27
|
-
*/
|
|
28
|
-
export type ListenFn = (port: number) => Promise<number>;
|
|
29
4
|
export interface ResolvePortInput {
|
|
30
5
|
/**
|
|
31
6
|
* Port read from `vite.config.ts` `server.port` or the `--port` CLI
|
|
@@ -43,75 +18,14 @@ export interface ResolvedPortInput {
|
|
|
43
18
|
port: number;
|
|
44
19
|
/**
|
|
45
20
|
* `true` if the port came from an explicit user override (config or
|
|
46
|
-
* env).
|
|
47
|
-
* `EADDRINUSE` to the user.
|
|
21
|
+
* env). Preview uses this to default to strict port binding.
|
|
48
22
|
*/
|
|
49
23
|
explicit: boolean;
|
|
50
24
|
}
|
|
51
25
|
/**
|
|
52
26
|
* Pure: compute the starting port from config / env / defaults.
|
|
53
27
|
*
|
|
54
|
-
* Performs no I/O
|
|
28
|
+
* Performs no I/O.
|
|
55
29
|
*/
|
|
56
30
|
export declare function resolveStartPort(input: ResolvePortInput): ResolvedPortInput;
|
|
57
|
-
export interface BindWithBumpOptions {
|
|
58
|
-
/** First port to attempt. */
|
|
59
|
-
startPort: number;
|
|
60
|
-
/**
|
|
61
|
-
* If `true`, increment the port and retry on `EADDRINUSE`. If
|
|
62
|
-
* `false`, attempt once and let the error propagate.
|
|
63
|
-
*/
|
|
64
|
-
autoBump: boolean;
|
|
65
|
-
/** Maximum number of port attempts when `autoBump` is `true`. */
|
|
66
|
-
maxAttempts?: number;
|
|
67
|
-
}
|
|
68
|
-
export interface BindWithBumpResult {
|
|
69
|
-
/** Port that was actually bound. */
|
|
70
|
-
port: number;
|
|
71
|
-
/** `true` if the bound port differs from `startPort`. */
|
|
72
|
-
bumped: boolean;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Bind a server starting at `startPort`, optionally bumping the port
|
|
76
|
-
* on `EADDRINUSE` until a free one is found.
|
|
77
|
-
*
|
|
78
|
-
* Use this with the actual server you intend to keep listening (e.g.
|
|
79
|
-
* the dev holding server). Pairing the probe with the real listen
|
|
80
|
-
* eliminates the TOCTOU race that a throwaway probe would introduce.
|
|
81
|
-
*/
|
|
82
|
-
export declare function bindWithBump(listen: ListenFn, options: BindWithBumpOptions): Promise<BindWithBumpResult>;
|
|
83
|
-
/** True if `err` is a Node `EADDRINUSE` error from `server.listen()`. */
|
|
84
|
-
export declare function isAddrInUse(err: unknown): boolean;
|
|
85
|
-
export interface StartDevServerPortInput {
|
|
86
|
-
/** Resolved port from `userConfig.server?.port` (or `--port`), or undefined. */
|
|
87
|
-
configPort: number | undefined;
|
|
88
|
-
/** Raw `process.env.PORT` value. */
|
|
89
|
-
envPort: string | undefined;
|
|
90
|
-
/** ListenFn for the holding server (or any pre-bind probe target). */
|
|
91
|
-
listen: ListenFn;
|
|
92
|
-
/** Logger — defaults to `console`. Injected for tests. */
|
|
93
|
-
log?: (msg: string) => void;
|
|
94
|
-
warn?: (msg: string) => void;
|
|
95
|
-
}
|
|
96
|
-
export interface StartDevServerPortResult {
|
|
97
|
-
/** Port chosen for both the holding server and Vite's dev server. */
|
|
98
|
-
port: number;
|
|
99
|
-
/** True if the user explicitly set the port (=> Vite must `strictPort: true`). */
|
|
100
|
-
explicit: boolean;
|
|
101
|
-
/** True if the holding server actually bound the port. */
|
|
102
|
-
bound: boolean;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Run the full dev-server port resolution + holding-server bind sequence.
|
|
106
|
-
*
|
|
107
|
-
* Resolves the port from config / env / default, attempts to bind the
|
|
108
|
-
* holding server (auto-bumping when the port came from the default),
|
|
109
|
-
* and logs the chosen URL. On a clean failure for an explicit port, it
|
|
110
|
-
* warns and falls back to the requested port so Vite can surface the
|
|
111
|
-
* conflict via `strictPort: true`.
|
|
112
|
-
*
|
|
113
|
-
* Extracted from `index.ts` so the rootSync `config()` hook stays
|
|
114
|
-
* focused on plugin assembly.
|
|
115
|
-
*/
|
|
116
|
-
export declare function startDevServerPort(input: StartDevServerPortInput): Promise<StartDevServerPortResult>;
|
|
117
31
|
//# sourceMappingURL=port-resolution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"port-resolution.d.ts","sourceRoot":"","sources":["../../src/server/port-resolution.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"port-resolution.d.ts","sourceRoot":"","sources":["../../src/server/port-resolution.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,8DAA8D;AAC9D,eAAO,MAAM,YAAY,OAAO,CAAC;AAIjC,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,CAiB3E"}
|
|
@@ -6,28 +6,46 @@ import type { JsonSerializable } from './types.ts';
|
|
|
6
6
|
* @internal Exported for testing only.
|
|
7
7
|
*/
|
|
8
8
|
export declare function findNonSerializable(value: unknown, path?: string): string | null;
|
|
9
|
+
declare const DENY_BRAND: unique symbol;
|
|
10
|
+
declare const REDIRECT_BRAND: unique symbol;
|
|
11
|
+
declare const RENDER_ERROR_BRAND: unique symbol;
|
|
12
|
+
declare const SSR_STREAM_ERROR_BRAND: unique symbol;
|
|
13
|
+
/** True for any `DenySignal`, regardless of which module evaluation created it. */
|
|
14
|
+
export declare function isDenySignal(error: unknown): error is DenySignal;
|
|
15
|
+
/** True for any `RedirectSignal`, regardless of which module evaluation created it. */
|
|
16
|
+
export declare function isRedirectSignal(error: unknown): error is RedirectSignal;
|
|
17
|
+
/** True for any `RenderError`, regardless of which module evaluation created it. */
|
|
18
|
+
export declare function isRenderError(error: unknown): error is RenderError;
|
|
19
|
+
/**
|
|
20
|
+
* True for any `SsrStreamError`. This one also crosses Vite environments:
|
|
21
|
+
* it is thrown in SSR and caught in RSC, which are separate module graphs in
|
|
22
|
+
* the same process — the brand is the only identity the two share.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isSsrStreamError(error: unknown): error is SsrStreamError;
|
|
9
25
|
/**
|
|
10
26
|
* Render-phase signal thrown by `deny()`. Caught by the framework to produce
|
|
11
27
|
* the correct HTTP status code (segment context) or graceful degradation (slot context).
|
|
28
|
+
*
|
|
29
|
+
* Detect with `isDenySignal()`, never `instanceof` — see "Signal branding" above.
|
|
12
30
|
*/
|
|
13
31
|
export declare class DenySignal extends Error {
|
|
32
|
+
readonly [DENY_BRAND] = true;
|
|
14
33
|
readonly status: number;
|
|
15
34
|
readonly data: JsonSerializable | undefined;
|
|
16
35
|
/**
|
|
17
|
-
*
|
|
18
|
-
* signal
|
|
19
|
-
* render
|
|
20
|
-
* segment renders it instead.
|
|
36
|
+
* Ordered list of segment keys that own matching deny pages for this
|
|
37
|
+
* signal, best match first. Present = addressed (a boundary should
|
|
38
|
+
* render it); absent = unplaced (the re-render fallback serves it).
|
|
21
39
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
40
|
+
* In-tree hoists stamp a single-element list (`[entry.ownerKey]`) —
|
|
41
|
+
* identical to the pre-TIM-1450 `ownerKey`. Late addressing (TIM-1450)
|
|
42
|
+
* stamps the full candidate list so the client can find the first
|
|
43
|
+
* *reachable* owner via its ancestry context, eliminating the
|
|
44
|
+
* owner-below-throw-site escape.
|
|
27
45
|
*
|
|
28
46
|
* See design/04-authorization.md §"Where a Deny Page Renders", TIM-1356.
|
|
29
47
|
*/
|
|
30
|
-
|
|
48
|
+
owners?: string[];
|
|
31
49
|
/**
|
|
32
50
|
* When true, the pipeline must respond with `rscErrorEnvelope` so the
|
|
33
51
|
* client hard-navigates instead of attempting to render a deny page
|
|
@@ -81,8 +99,11 @@ export { RedirectType } from '../shared/redirect-type.ts';
|
|
|
81
99
|
/**
|
|
82
100
|
* Render-phase signal thrown by `redirect()` and `redirectExternal()`.
|
|
83
101
|
* Caught by the framework to produce a 3xx response or client-side navigation.
|
|
102
|
+
*
|
|
103
|
+
* Detect with `isRedirectSignal()`, never `instanceof` — see "Signal branding" above.
|
|
84
104
|
*/
|
|
85
105
|
export declare class RedirectSignal extends Error {
|
|
106
|
+
readonly [REDIRECT_BRAND] = true;
|
|
86
107
|
readonly location: string;
|
|
87
108
|
readonly status: number;
|
|
88
109
|
constructor(location: string, status: number);
|
|
@@ -170,8 +191,11 @@ export interface RenderErrorDigest<TCode extends string = string, TData extends
|
|
|
170
191
|
* resourceId: params.id,
|
|
171
192
|
* })
|
|
172
193
|
* ```
|
|
194
|
+
*
|
|
195
|
+
* Detect with `isRenderError()`, never `instanceof` — see "Signal branding" above.
|
|
173
196
|
*/
|
|
174
197
|
export declare class RenderError<TCode extends string = string, TData extends JsonSerializable = JsonSerializable> extends Error {
|
|
198
|
+
readonly [RENDER_ERROR_BRAND] = true;
|
|
175
199
|
readonly code: TCode;
|
|
176
200
|
readonly digest: RenderErrorDigest<TCode, TData>;
|
|
177
201
|
readonly status: number;
|
|
@@ -206,8 +230,12 @@ export declare function _resetWaitUntilWarning(): void;
|
|
|
206
230
|
*
|
|
207
231
|
* Defined in primitives.ts (not ssr-entry.ts) because ssr-entry.ts imports
|
|
208
232
|
* react-dom/server which cannot be loaded in the RSC environment.
|
|
233
|
+
*
|
|
234
|
+
* Detect with `isSsrStreamError()` — it is thrown in the SSR environment and
|
|
235
|
+
* caught in RSC, so `instanceof` never matches. See "Signal branding" above.
|
|
209
236
|
*/
|
|
210
237
|
export declare class SsrStreamError extends Error {
|
|
238
|
+
readonly [SSR_STREAM_ERROR_BRAND] = true;
|
|
211
239
|
readonly cause: unknown;
|
|
212
240
|
constructor(message: string, cause: unknown);
|
|
213
241
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/server/primitives.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAYnD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,SAAS,GAAG,MAAM,GAAG,IAAI,CA8DhF;
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/server/primitives.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAYnD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,SAAS,GAAG,MAAM,GAAG,IAAI,CA8DhF;AAuCD,QAAA,MAAM,UAAU,EAAE,OAAO,MAAyC,CAAC;AACnE,QAAA,MAAM,cAAc,EAAE,OAAO,MAA6C,CAAC;AAC3E,QAAA,MAAM,kBAAkB,EAAE,OAAO,MAAiD,CAAC;AACnF,QAAA,MAAM,sBAAsB,EAAE,OAAO,MAAqD,CAAC;AAM3F,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,oFAAoF;AACpF,wBAAgB,aAA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,MAAM,CAAA;KAAE,EAalE;CACF;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAczD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAID;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,CAAC,sBAAsB,CAAC,QAAQ;IACzC,SAAkB,KAAK,EAAE,OAAO,CAAC;IAEjC,YAAY,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAI1C;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-cache-policy.d.ts","sourceRoot":"","sources":["../../src/server/response-cache-policy.ts"],"names":[],"mappings":"AAgCA,wFAAwF;AACxF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAW7D"}
|
|
@@ -16,29 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import type { RouteMatch } from './pipeline.ts';
|
|
18
18
|
import type { ManifestSegmentNode } from './route-matcher.ts';
|
|
19
|
+
import type { DenyPageEntry } from './deny-boundary.ts';
|
|
19
20
|
import { type SlotSkipEntry } from './slot-resolver.ts';
|
|
20
21
|
import type { RscPayloadRoot } from '../shared/payload-root.ts';
|
|
21
22
|
import type { InterceptionContext } from './pipeline.ts';
|
|
22
|
-
import {
|
|
23
|
-
/**
|
|
24
|
-
* Whether a layout's returned tree still contains its children boundary.
|
|
25
|
-
*
|
|
26
|
-
* Layouts may forward `children` through a non-children prop or clone it with
|
|
27
|
-
* React.Children/cloneElement. Checking only `props.children` or object
|
|
28
|
-
* identity would incorrectly classify those layouts as suppressing their
|
|
29
|
-
* descendants and let shell settlement complete before an async child deny.
|
|
30
|
-
*/
|
|
31
|
-
export declare function containsLayoutChildren(node: unknown, boundaryType: React.ElementType, seen?: WeakSet<object>): boolean;
|
|
32
|
-
export declare function descendantSettleCallbacks(callbacks: Array<() => void>, layoutSettled: (() => void) | undefined): Array<() => void>;
|
|
33
|
-
/**
|
|
34
|
-
* Detect whether a component is a React client reference.
|
|
35
|
-
* Client references have $$typeof set to Symbol.for('react.client.reference')
|
|
36
|
-
* by registerClientReference() in the React Flight server runtime.
|
|
37
|
-
*
|
|
38
|
-
* Used to skip OTEL tracing wrappers that would call the component as a
|
|
39
|
-
* function. Client components must go through createElement only — they are
|
|
40
|
-
* serialized as references in the RSC Flight stream, not executed on the server.
|
|
41
|
-
*/
|
|
23
|
+
import type { ClientStateTree } from './state-tree-diff.ts';
|
|
42
24
|
/**
|
|
43
25
|
* The `segments` array handed to a layout's `SegmentProvider` — the value
|
|
44
26
|
* `useSelectedLayoutSegment(s)` reads.
|
|
@@ -53,14 +35,6 @@ export declare function descendantSettleCallbacks(callbacks: Array<() => void>,
|
|
|
53
35
|
* @internal — exported for tests; production has exactly one caller.
|
|
54
36
|
*/
|
|
55
37
|
export declare function computeLayoutSegmentPath(segments: ManifestSegmentNode[], index: number, match: RouteMatch): string[];
|
|
56
|
-
export declare function isClientReference(component: unknown): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Thrown when an app/schema.ts segment-param codec's parse() fails.
|
|
59
|
-
* The pipeline catches this and responds with 404.
|
|
60
|
-
*/
|
|
61
|
-
export declare class ParamCoercionError extends Error {
|
|
62
|
-
constructor(message: string);
|
|
63
|
-
}
|
|
64
38
|
/**
|
|
65
39
|
* Thrown when a matched route has no page component in its leaf segment.
|
|
66
40
|
* The pipeline catches this and renders the custom 404 page.
|
|
@@ -94,29 +68,25 @@ export interface RouteElementResult {
|
|
|
94
68
|
* See design/19-client-navigation.md §"X-Timber-State-Tree Header"
|
|
95
69
|
*/
|
|
96
70
|
skippedSegments: string[];
|
|
97
|
-
/**
|
|
98
|
-
* Resolves when every deny-capable shell component (PageDenyBoundary and
|
|
99
|
-
* each TracedLayout with a deny page chain) has finished executing, OR
|
|
100
|
-
* immediately when any of them catches a DenySignal in-tree (the HTTP
|
|
101
|
-
* status is known at that point; inner components may never run).
|
|
102
|
-
* Undefined when the route has no deny-capable server components.
|
|
103
|
-
* See TIM-1045 (pages), TIM-1208 (layouts).
|
|
104
|
-
*/
|
|
105
|
-
shellSettled?: Promise<void>;
|
|
106
71
|
/**
|
|
107
72
|
* Slot metadata for the X-Timber-Segments header. Contains info about
|
|
108
73
|
* all parallel route slots encountered during element tree construction,
|
|
109
74
|
* enabling the client to populate its segment cache with slot entries.
|
|
110
75
|
*/
|
|
111
76
|
slotSkipInfo: SlotSkipEntry[];
|
|
77
|
+
/**
|
|
78
|
+
* The deny page chain built from the leaf segment outward to root.
|
|
79
|
+
* Threaded into `renderRscStream` for late addressing of nested-component
|
|
80
|
+
* denies in Flight's `onError`. See TIM-1450.
|
|
81
|
+
*/
|
|
82
|
+
leafDenyChain?: DenyPageEntry[];
|
|
112
83
|
}
|
|
113
84
|
/**
|
|
114
85
|
* Build a React element tree from a matched route.
|
|
115
86
|
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* as AccessGate verdicts for synchronous replay during render.
|
|
87
|
+
* Loads route modules, resolves metadata (skipping denied segments via
|
|
88
|
+
* AccessGate), and constructs the element tree. Access checks run during
|
|
89
|
+
* render inside AccessGate — denied segments' metadata never executes.
|
|
120
90
|
*
|
|
121
91
|
* Does NOT serialize to RSC Flight — the caller decides whether to render
|
|
122
92
|
* to a stream or use the element directly (e.g., for action revalidation).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-element-builder.d.ts","sourceRoot":"","sources":["../../src/server/route-element-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"route-element-builder.d.ts","sourceRoot":"","sources":["../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,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AA2DD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,YAAY,CAAC,EAAE,mBAAmB,EAClC,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,EACxC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3C,OAAO,CAAC,kBAAkB,CAAC,CAyZ7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers for `route-element-builder.ts` — tree inspection and rewriting
|
|
3
|
+
* that need no request state. Split out so the builder stays within the
|
|
4
|
+
* 500-line limit as its wrapping steps grew (TIM-1450).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Replace the outermost SegmentOutlet in a partial payload with its
|
|
8
|
+
* SegmentProvider child. Walks through AccessGate wrappers (which sit
|
|
9
|
+
* outside SegmentOutlet) to find the outlet.
|
|
10
|
+
*/
|
|
11
|
+
export declare function replaceOutermostSegmentOutlet(element: React.ReactElement, replacement: React.ReactElement): React.ReactElement;
|
|
12
|
+
//# sourceMappingURL=route-element-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-element-helpers.d.ts","sourceRoot":"","sources":["../../src/server/route-element-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,KAAK,CAAC,YAAY,EAC3B,WAAW,EAAE,KAAK,CAAC,YAAY,GAC9B,KAAK,CAAC,YAAY,CAgBpB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route module loading — loads layout, page, and access.ts modules from
|
|
3
|
+
* a matched route's segment chain in a single pass.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from `route-element-builder.ts` to keep that file focused on
|
|
6
|
+
* element-tree construction.
|
|
7
|
+
*
|
|
8
|
+
* See design/02-rendering-pipeline.md, design/07-routing.md.
|
|
9
|
+
*/
|
|
10
|
+
import type { ManifestSegmentNode } from './route-matcher.ts';
|
|
11
|
+
import type { Metadata } from './types.ts';
|
|
12
|
+
import { type LayoutComponentEntry } from './route-element-builder.ts';
|
|
13
|
+
/** Metadata export from a layout or page module, with its segment context. */
|
|
14
|
+
export interface MetadataSource {
|
|
15
|
+
metadataExport: Metadata | (() => Promise<Metadata>);
|
|
16
|
+
segmentName: string;
|
|
17
|
+
isPage: boolean;
|
|
18
|
+
segmentIndex: number;
|
|
19
|
+
}
|
|
20
|
+
/** Access function loaded from a segment's access.ts. */
|
|
21
|
+
export type AccessFn = (() => unknown) | undefined;
|
|
22
|
+
/** Result of the module-loading phase. */
|
|
23
|
+
export interface LoadedRouteModules {
|
|
24
|
+
metadataSources: MetadataSource[];
|
|
25
|
+
layoutComponents: LayoutComponentEntry[];
|
|
26
|
+
PageComponent: (...args: unknown[]) => unknown;
|
|
27
|
+
deferSuspenseFor: number;
|
|
28
|
+
accessFns: Array<AccessFn>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Load all route modules (layouts, page, access functions) in a single pass.
|
|
32
|
+
*
|
|
33
|
+
* Access functions are loaded eagerly here so the wrapping loop does not need
|
|
34
|
+
* to await `loadModule(segment.access)` at each iteration.
|
|
35
|
+
*/
|
|
36
|
+
export declare function loadRouteModules(segments: ManifestSegmentNode[], requestUrl: string): Promise<LoadedRouteModules>;
|
|
37
|
+
//# sourceMappingURL=route-module-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-module-loader.d.ts","sourceRoot":"","sources":["../../src/server/route-module-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,QAAQ,GAAG,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAAC;AAEnD,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,aAAa,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC/C,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC5B;AAuDD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,kBAAkB,CAAC,CA+D7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rsc-cache-key-guard.d.ts","sourceRoot":"","sources":["../../src/server/rsc-cache-key-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;
|
|
1
|
+
{"version":3,"file":"rsc-cache-key-guard.d.ts","sourceRoot":"","sources":["../../src/server/rsc-cache-key-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAgCxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAGjE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-middleware-runner.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/action-middleware-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAUH,OAAO,
|
|
1
|
+
{"version":3,"file":"action-middleware-runner.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/action-middleware-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAUH,OAAO,EAAkC,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,0EAA0E;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GACzB;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,QAAQ,CAAC;IACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,M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AAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CA6DnB;
|
|
1
|
+
{"version":3,"file":"error-renderer.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/error-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAIlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAiB5E;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAkHD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,qBAAqB,EACtC,WAAW,CAAC,EAAE,eAAe,EAC7B,gBAAgB,SAAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CA6DnB;AA6ID;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,mBAAmB,EAChC,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,qBAAqB,EACtC,WAAW,CAAC,EAAE,mBAAmB,GAChC,OAAO,CAAC,QAAQ,CAAC,CA2CnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-route.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/render-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAW1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"render-route.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/render-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAW1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAe/D;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,qBAAqB,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAClE;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,OAAO,EACxB,IAAI,EAAE,eAAe,EACrB,YAAY,CAAC,EAAE,mBAAmB,GACjC,OAAO,CAAC,QAAQ,CAAC,CA+NnB"}
|
|
@@ -5,7 +5,18 @@
|
|
|
5
5
|
* returned directly without SSR HTML rendering. The client decodes it via
|
|
6
6
|
* `createFromFetch` and renders into the hydrated React root.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* The response's HTTP status carries no deny semantics: a payload response
|
|
9
|
+
* commits 200 when Flight's opening window closes (the first chunk plus one
|
|
10
|
+
* macrotask), and a deny, redirect, or error that lands after that rides
|
|
11
|
+
* the payload as a Flight error row for the client's boundaries — the same
|
|
12
|
+
* way a nested component's already did. The status
|
|
13
|
+
* code contract (design/05) is a document-path contract, enforced by Fizz's
|
|
14
|
+
* `onShellReady`; Flight has no such checkpoint, and the only reader of a
|
|
15
|
+
* payload response's status is the static generator's check for an error
|
|
16
|
+
* envelope — the client router reads the body. See TIM-1495.
|
|
17
|
+
*
|
|
18
|
+
* Design docs: 19-client-navigation.md §"RSC Payload Handling",
|
|
19
|
+
* 04-authorization.md §"Status codes on the RSC payload path"
|
|
9
20
|
*/
|
|
10
21
|
import type { LayoutComponentEntry } from '../route-element-builder.ts';
|
|
11
22
|
import type { ManifestSegmentNode } from '../route-matcher.ts';
|
|
@@ -19,6 +30,16 @@ import type { RenderSignals } from './rsc-stream.ts';
|
|
|
19
30
|
* renderToReadableStream. Reading one chunk triggers rendering of the
|
|
20
31
|
* initial component tree, allowing onError to capture DenySignal/
|
|
21
32
|
* RedirectSignal before we commit the response. See TIM-344.
|
|
33
|
+
*
|
|
34
|
+
* The commit point is the close of Flight's opening window: the first chunk
|
|
35
|
+
* plus one macrotask turn. Nothing is held for it. A signal that lands
|
|
36
|
+
* inside the window still gets a server-level answer — a redirect response,
|
|
37
|
+
* the fallback deny page, the hard-navigate envelope — because the race
|
|
38
|
+
* below and the one timer turn after it deliver it for free. A signal that
|
|
39
|
+
* lands after it is a row in the stream, and the client's boundaries answer
|
|
40
|
+
* it. Waiting for the shell components to settle (TIM-1045, TIM-1208) made
|
|
41
|
+
* the payload path pretend to a status contract it could not keep for
|
|
42
|
+
* nested components, and was removed in TIM-1495.
|
|
22
43
|
*/
|
|
23
44
|
export declare function buildRscPayloadResponse(req: Request, rscStream: ReadableStream<Uint8Array>, signals: RenderSignals, segments: ManifestSegmentNode[], layoutComponents: LayoutComponentEntry[], responseHeaders: Headers, skippedSegments?: string[], slotSkipInfo?: SlotSkipEntry[]): Promise<Response>;
|
|
24
45
|
//# sourceMappingURL=rsc-payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rsc-payload.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-payload.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rsc-payload.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAWrD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EACrC,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,oBAAoB,EAAE,EACxC,eAAe,EAAE,OAAO,EACxB,eAAe,CAAC,EAAE,MAAM,EAAE,EAC1B,YAAY,CAAC,EAAE,aAAa,EAAE,GAC7B,OAAO,CAAC,QAAQ,CAAC,CAyPnB"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* 13-security.md §"Errors don't leak"
|
|
11
11
|
*/
|
|
12
12
|
import type { RscPayloadRoot } from '../../shared/payload-root.ts';
|
|
13
|
+
import { type DenyPageEntry } from '../deny-boundary.ts';
|
|
13
14
|
import { DenySignal, RedirectSignal } from '../primitives.ts';
|
|
14
15
|
import { type DebugComponentEntry } from './helpers.ts';
|
|
15
16
|
/**
|
|
@@ -25,7 +26,7 @@ import { type DebugComponentEntry } from './helpers.ts';
|
|
|
25
26
|
export interface RenderSignals {
|
|
26
27
|
denySignal: DenySignal | null;
|
|
27
28
|
/**
|
|
28
|
-
* The first deny that no in-tree catch site could place — no `
|
|
29
|
+
* The first deny that no in-tree catch site could place — no `owners`, so
|
|
29
30
|
* no boundary may claim its error row and only the re-render fallback can
|
|
30
31
|
* produce a page for it.
|
|
31
32
|
*
|
|
@@ -33,7 +34,7 @@ export interface RenderSignals {
|
|
|
33
34
|
* deep page can hoist a 404 to a boundary that will render it while an
|
|
34
35
|
* outer layout separately throws a 403 nothing matches; whichever lands in
|
|
35
36
|
* `denySignal` first, the unplaced one still needs the fallback, and
|
|
36
|
-
* deciding from `denySignal.
|
|
37
|
+
* deciding from `denySignal.owners` alone would strand it. See TIM-1356.
|
|
37
38
|
*/
|
|
38
39
|
unplacedDeny: DenySignal | null;
|
|
39
40
|
redirectSignal: RedirectSignal | null;
|
|
@@ -53,14 +54,6 @@ export interface RenderSignals {
|
|
|
53
54
|
lastUnhandledError: unknown | null;
|
|
54
55
|
/** Callback fired when a redirect or deny signal is captured in onError. */
|
|
55
56
|
onSignal?: () => void;
|
|
56
|
-
/**
|
|
57
|
-
* Resolves when every deny-capable shell component (PageDenyBoundary +
|
|
58
|
-
* TracedLayouts with deny chains) has settled, OR immediately when any
|
|
59
|
-
* catches a DenySignal in-tree (status is known). Set by renderRoute
|
|
60
|
-
* after element-tree construction. Awaited by buildRscPayloadResponse
|
|
61
|
-
* before committing HTTP status. See TIM-1045, TIM-1208.
|
|
62
|
-
*/
|
|
63
|
-
shellSettled?: Promise<void>;
|
|
64
57
|
/** Callback fired when an unhandled error (non-signal) is captured. Used
|
|
65
58
|
* to halt Flight data injection into the inline stream. */
|
|
66
59
|
onUnhandledError?: () => void;
|
|
@@ -82,5 +75,5 @@ export interface RscStreamResult {
|
|
|
82
75
|
* fires onError during stream consumption. Signals are captured in the
|
|
83
76
|
* returned `signals` object for the caller to handle.
|
|
84
77
|
*/
|
|
85
|
-
export declare function renderRscStream(payload: RscPayloadRoot, req: Request): RscStreamResult;
|
|
78
|
+
export declare function renderRscStream(payload: RscPayloadRoot, req: Request, leafDenyChain?: DenyPageEntry[]): RscStreamResult;
|
|
86
79
|
//# sourceMappingURL=rsc-stream.d.ts.map
|