@timber-js/app 0.2.0-alpha.219 → 0.2.0-alpha.220

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.
Files changed (164) hide show
  1. package/dist/_chunks/chains-CDK1AWZQ.js +1 -0
  2. package/dist/_chunks/{chains-YKZ8WpIW.js → chains-e_Buf9vg.js} +2 -7
  3. package/dist/_chunks/{chains-YKZ8WpIW.js.map → chains-e_Buf9vg.js.map} +1 -1
  4. package/dist/_chunks/{cli-check-D2WtbNqo.js → cli-check-DDwCkeDY.js} +2 -2
  5. package/dist/_chunks/{cli-check-D2WtbNqo.js.map → cli-check-DDwCkeDY.js.map} +1 -1
  6. package/dist/_chunks/cli-context-BJQB6rtF.js +1 -0
  7. package/dist/_chunks/{cli-context-By7k2xVo.js → cli-context-_mPttGGY.js} +3 -3
  8. package/dist/_chunks/{cli-context-By7k2xVo.js.map → cli-context-_mPttGGY.js.map} +1 -1
  9. package/dist/_chunks/{cli-schema-sync-CySLKrO3.js → cli-schema-sync-BdIebmk3.js} +3 -12
  10. package/dist/_chunks/{cli-schema-sync-CySLKrO3.js.map → cli-schema-sync-BdIebmk3.js.map} +1 -1
  11. package/dist/_chunks/cli-schema-sync-CLNfXQDK.js +1 -0
  12. package/dist/_chunks/dev-server-DkytOEG2.js +1 -0
  13. package/dist/_chunks/{dev-server-B8zsT-ee.js → dev-server-DnODXuNM.js} +31 -14
  14. package/dist/_chunks/{dev-server-B8zsT-ee.js.map → dev-server-DnODXuNM.js.map} +1 -1
  15. package/dist/_chunks/flight-source-node-0dE-t3kq.js +519 -0
  16. package/dist/_chunks/flight-source-node-0dE-t3kq.js.map +1 -0
  17. package/dist/_chunks/{live-graph-BhtrZpRd.js → live-graph-tSWrv8eH.js} +2 -2
  18. package/dist/_chunks/{live-graph-BhtrZpRd.js.map → live-graph-tSWrv8eH.js.map} +1 -1
  19. package/dist/_chunks/node-response-Dibufw_b.js +187 -0
  20. package/dist/_chunks/node-response-Dibufw_b.js.map +1 -0
  21. package/dist/_chunks/{plugin-context-BPBPc3lL.js → plugin-context-DxMMvjUt.js} +2 -18
  22. package/dist/_chunks/{plugin-context-BPBPc3lL.js.map → plugin-context-DxMMvjUt.js.map} +1 -1
  23. package/dist/_chunks/plugin-context-uDHFqHHJ.js +1 -0
  24. package/dist/_chunks/{walkers-Ber9bamD.js → walkers-qu8TpiLh.js} +2 -2
  25. package/dist/_chunks/{walkers-Ber9bamD.js.map → walkers-qu8TpiLh.js.map} +1 -1
  26. package/dist/adapters/nitro-preview.d.ts.map +1 -1
  27. package/dist/adapters/nitro.js +40 -1
  28. package/dist/adapters/nitro.js.map +1 -1
  29. package/dist/analyze/crawl-entry.js +2 -2
  30. package/dist/analyze/graph-command.js +3 -3
  31. package/dist/analyze/graph-command.js.map +1 -1
  32. package/dist/cli.js +5 -5
  33. package/dist/cli.js.map +1 -1
  34. package/dist/client/browser-entry/form-state.d.ts.map +1 -1
  35. package/dist/client/browser-entry/index.d.ts +1 -1
  36. package/dist/client/browser-entry/rsc-stream.d.ts +4 -1
  37. package/dist/client/browser-entry/rsc-stream.d.ts.map +1 -1
  38. package/dist/client/react-root.d.ts +6 -0
  39. package/dist/client/react-root.d.ts.map +1 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +36 -5
  42. package/dist/index.js.map +1 -1
  43. package/dist/plugins/encryption-runtime.d.ts +13 -0
  44. package/dist/plugins/encryption-runtime.d.ts.map +1 -0
  45. package/dist/plugins/entries.d.ts +1 -0
  46. package/dist/plugins/entries.d.ts.map +1 -1
  47. package/dist/plugins/server-bundle.d.ts +1 -1
  48. package/dist/plugins/server-bundle.d.ts.map +1 -1
  49. package/dist/routing/index.js +1 -1
  50. package/dist/rsc-runtime/encryption-runtime.d.ts +25 -0
  51. package/dist/rsc-runtime/encryption-runtime.d.ts.map +1 -0
  52. package/dist/rsc-runtime/render-flight.d.ts +14 -0
  53. package/dist/rsc-runtime/render-flight.d.ts.map +1 -0
  54. package/dist/rsc-runtime/rsc.d.ts +6 -2
  55. package/dist/rsc-runtime/rsc.d.ts.map +1 -1
  56. package/dist/rsc-runtime/ssr.d.ts +6 -12
  57. package/dist/rsc-runtime/ssr.d.ts.map +1 -1
  58. package/dist/server/action-handler.d.ts.map +1 -1
  59. package/dist/server/compress.d.ts +2 -0
  60. package/dist/server/compress.d.ts.map +1 -1
  61. package/dist/server/deny-renderer.d.ts +2 -1
  62. package/dist/server/deny-renderer.d.ts.map +1 -1
  63. package/dist/server/flight-injector-core.d.ts +125 -0
  64. package/dist/server/flight-injector-core.d.ts.map +1 -0
  65. package/dist/server/flight-scripts.d.ts +9 -0
  66. package/dist/server/flight-scripts.d.ts.map +1 -1
  67. package/dist/server/flight-source-node.d.ts +105 -0
  68. package/dist/server/flight-source-node.d.ts.map +1 -0
  69. package/dist/server/flight-source.d.ts +136 -0
  70. package/dist/server/flight-source.d.ts.map +1 -0
  71. package/dist/server/head-response.d.ts.map +1 -1
  72. package/dist/server/html-injector-core.d.ts +3 -91
  73. package/dist/server/html-injector-core.d.ts.map +1 -1
  74. package/dist/server/html-injectors.d.ts +5 -17
  75. package/dist/server/html-injectors.d.ts.map +1 -1
  76. package/dist/server/internal.js +78 -138
  77. package/dist/server/internal.js.map +1 -1
  78. package/dist/server/node-body-response.d.ts +55 -0
  79. package/dist/server/node-body-response.d.ts.map +1 -0
  80. package/dist/server/node-response.d.ts +62 -0
  81. package/dist/server/node-response.d.ts.map +1 -0
  82. package/dist/server/node-stream-transforms.d.ts +24 -21
  83. package/dist/server/node-stream-transforms.d.ts.map +1 -1
  84. package/dist/server/node-streams-platform.d.ts +21 -0
  85. package/dist/server/node-streams-platform.d.ts.map +1 -0
  86. package/dist/server/pipeline-helpers.d.ts.map +1 -1
  87. package/dist/server/pipeline.d.ts.map +1 -1
  88. package/dist/server/prebuilt-runtime.d.ts +2 -3
  89. package/dist/server/prebuilt-runtime.d.ts.map +1 -1
  90. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  91. package/dist/server/rsc-entry/render-route.d.ts +4 -1
  92. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  93. package/dist/server/rsc-entry/rsc-payload.d.ts +9 -6
  94. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  95. package/dist/server/rsc-entry/rsc-stream.d.ts +9 -4
  96. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  97. package/dist/server/rsc-entry/ssr-bridge.d.ts +2 -1
  98. package/dist/server/rsc-entry/ssr-bridge.d.ts.map +1 -1
  99. package/dist/server/rsc-entry/ssr-renderer.d.ts +2 -1
  100. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  101. package/dist/server/ssr-bridge-types.d.ts +9 -4
  102. package/dist/server/ssr-bridge-types.d.ts.map +1 -1
  103. package/dist/server/ssr-entry.d.ts +8 -5
  104. package/dist/server/ssr-entry.d.ts.map +1 -1
  105. package/dist/server/ssr-render.d.ts +7 -16
  106. package/dist/server/ssr-render.d.ts.map +1 -1
  107. package/dist/server/stream-utils.d.ts +44 -10
  108. package/dist/server/stream-utils.d.ts.map +1 -1
  109. package/dist/shared/flight-base64.d.ts +13 -0
  110. package/dist/shared/flight-base64.d.ts.map +1 -0
  111. package/dist/shared/flight-segment.d.ts +18 -0
  112. package/dist/shared/flight-segment.d.ts.map +1 -0
  113. package/dist/shared/form-state-flight.d.ts +0 -4
  114. package/dist/shared/form-state-flight.d.ts.map +1 -1
  115. package/docs/learn/12-error-handling.mdx +1 -1
  116. package/package.json +1 -1
  117. package/src/adapters/nitro-preview.ts +39 -0
  118. package/src/client/browser-entry/form-state.ts +3 -2
  119. package/src/client/browser-entry/index.ts +14 -8
  120. package/src/client/browser-entry/rsc-stream.ts +14 -14
  121. package/src/client/react-root.ts +25 -2
  122. package/src/index.ts +2 -0
  123. package/src/plugins/encryption-runtime.ts +31 -0
  124. package/src/plugins/entries.ts +1 -1
  125. package/src/plugins/server-bundle.ts +17 -2
  126. package/src/rsc-runtime/encryption-runtime.ts +78 -0
  127. package/src/rsc-runtime/render-flight.ts +26 -0
  128. package/src/rsc-runtime/rsc.ts +7 -4
  129. package/src/rsc-runtime/ssr.ts +10 -48
  130. package/src/rsc-runtime/vendor-types.d.ts +31 -2
  131. package/src/server/action-handler.ts +43 -44
  132. package/src/server/compress.ts +49 -12
  133. package/src/server/deny-renderer.ts +14 -7
  134. package/src/server/flight-injector-core.ts +328 -0
  135. package/src/server/flight-scripts.ts +14 -2
  136. package/src/server/flight-source-node.ts +430 -0
  137. package/src/server/flight-source.ts +288 -0
  138. package/src/server/form-state-flight.ts +4 -4
  139. package/src/server/head-response.ts +6 -10
  140. package/src/server/html-injector-core.ts +24 -216
  141. package/src/server/html-injectors.ts +12 -71
  142. package/src/server/node-body-response.ts +236 -0
  143. package/src/server/node-response.ts +93 -0
  144. package/src/server/node-stream-transforms.ts +70 -53
  145. package/src/server/node-streams-platform.ts +23 -0
  146. package/src/server/pipeline-helpers.ts +3 -1
  147. package/src/server/pipeline.ts +14 -6
  148. package/src/server/prebuilt/capture-render.ts +5 -5
  149. package/src/server/prebuilt-runtime.ts +7 -10
  150. package/src/server/rsc-entry/error-renderer.ts +8 -4
  151. package/src/server/rsc-entry/index.ts +4 -2
  152. package/src/server/rsc-entry/render-route.ts +5 -2
  153. package/src/server/rsc-entry/rsc-payload.ts +52 -73
  154. package/src/server/rsc-entry/rsc-stream.ts +102 -106
  155. package/src/server/rsc-entry/ssr-bridge.ts +32 -10
  156. package/src/server/rsc-entry/ssr-renderer.ts +15 -18
  157. package/src/server/ssr-bridge-types.ts +10 -4
  158. package/src/server/ssr-entry.ts +56 -52
  159. package/src/server/ssr-render.ts +41 -76
  160. package/src/server/stream-utils.ts +125 -70
  161. package/src/shared/flight-base64.ts +23 -0
  162. package/src/shared/flight-segment.ts +35 -0
  163. package/src/shared/form-state-flight.ts +0 -15
  164. package/dist/_chunks/rolldown-runtime-D7D4PA-g.js +0 -13
@@ -0,0 +1,13 @@
1
+ /**
2
+ * timber-encryption-runtime — route plugin-rsc's server-action encryption
3
+ * runtime to timber's (`rsc-runtime/encryption-runtime.ts`), which serializes
4
+ * through `renderFlight`.
5
+ *
6
+ * plugin-rsc prepends an import of `@vitejs/plugin-rsc/utils/encryption-runtime`
7
+ * (as a resolved `file://` URL) to every module with an inline `'use server'`
8
+ * closure. Its runtime renders with the edge Flight server, which cannot
9
+ * render in a process where the Node Flight server already has (TIM-1585).
10
+ */
11
+ import type { Plugin } from 'vite';
12
+ export declare function timberEncryptionRuntime(): Plugin;
13
+ //# sourceMappingURL=encryption-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption-runtime.d.ts","sourceRoot":"","sources":["../../src/plugins/encryption-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAMnC,wBAAgB,uBAAuB,IAAI,MAAM,CAYhD"}
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import type { Plugin } from 'vite';
14
14
  import type { PluginContext } from '../plugin-context.ts';
15
+ export declare const SRC_DIR: string;
15
16
  /**
16
17
  * The real file behind virtual:timber-browser-entry. The client dep
17
18
  * optimizer scans it explicitly once timber sets optimizeDeps.entries
@@ -1 +1 @@
1
- {"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAsC1D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAA2C,CAAC;AAmI3E;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUlF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAA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AAG,EAAE,aAAa,GAAG,MAAM,CAiFxD"}
@@ -10,6 +10,6 @@
10
10
  *
11
11
  * Design docs: design/11-platform.md, design/25-production-deployments.md
12
12
  */
13
- import type { Plugin } from 'vite';
13
+ import { type Plugin } from 'vite';
14
14
  export declare function timberServerBundle(): Plugin[];
15
15
  //# sourceMappingURL=server-bundle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-bundle.d.ts","sourceRoot":"","sources":["../../src/plugins/server-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AA4CnC,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAuK7C"}
1
+ {"version":3,"file":"server-bundle.d.ts","sourceRoot":"","sources":["../../src/plugins/server-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAA4B,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AA4C7D,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAsL7C"}
@@ -1,5 +1,5 @@
1
1
  import { a as INTERCEPTION_MARKERS, i as DEFAULT_PAGE_EXTENSIONS, n as classifyUrlSegment, t as classifySegment } from "../_chunks/segment-classify-C539Pa2O.js";
2
2
  import { d as collectInterceptionRewrites, n as scanRoutes } from "../_chunks/scanner-Cb3fSjAC.js";
3
3
  import { t as generateRouteMap } from "../_chunks/codegen-Bps1sLKJ.js";
4
- import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-Ber9bamD.js";
4
+ import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-qu8TpiLh.js";
5
5
  export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectDynamicSegmentsFromTree, collectInterceptionRewrites, collectLeafRoutes, generateRouteMap, scanRoutes, validateSchemaAgainstRoutes };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Server action bound-args encryption, rendered through `renderFlight`.
3
+ *
4
+ * plugin-rsc injects `@vitejs/plugin-rsc/utils/encryption-runtime` into every
5
+ * inline `'use server'` closure to encrypt its captured variables. That
6
+ * runtime serializes with plugin-rsc's `renderToReadableStream` — the edge
7
+ * Flight server — even from `rsc.node`. On Node every other render uses the
8
+ * Node Flight server, and React allows one Flight server build to render per
9
+ * process ("Currently React only supports one RSC renderer at a time"), so
10
+ * every page with such a closure failed to render. `timber-encryption-runtime`
11
+ * (plugins/encryption-runtime.ts) resolves plugin-rsc's runtime to this
12
+ * module instead (TIM-1585).
13
+ *
14
+ * Same wire format as plugin-rsc's runtime: Flight bytes, AES-GCM under the
15
+ * build's key (`virtual:vite-rsc/encryption-key`), with a 16-byte random IV
16
+ * prepended, as base64. Decryption decodes with the Flight client, which
17
+ * installs no server dispatcher.
18
+ *
19
+ * See design/08-forms-and-actions.md §"Bound Args Encryption".
20
+ */
21
+ /** Serialize bound args with Flight and encrypt them. */
22
+ export declare function encryptActionBoundArgs(value: unknown): Promise<string>;
23
+ /** Decrypt bound args and decode them with the Flight client. */
24
+ export declare function decryptActionBoundArgs(encrypted: unknown): Promise<unknown>;
25
+ //# sourceMappingURL=encryption-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption-runtime.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/encryption-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAyBH,yDAAyD;AACzD,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAc5E;AAED,iEAAiE;AACjE,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAejF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `renderFlight` — the only way to render Flight in the RSC environment.
3
+ *
4
+ * Kept apart from `rsc.ts` so the action-encryption runtime
5
+ * (`encryption-runtime.ts`), which `rsc.ts` re-exports, can import it without
6
+ * a cycle. See server/flight-source.ts.
7
+ */
8
+ /**
9
+ * Render a model to Flight. On Node: `renderToPipeableStream` from
10
+ * `@vitejs/plugin-rsc/rsc.node`, into an object-mode Node stream. Everywhere
11
+ * else: `renderToReadableStream`.
12
+ */
13
+ export declare const renderFlight: import("../server/flight-source.ts").RenderFlight;
14
+ //# sourceMappingURL=render-flight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-flight.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/render-flight.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH;;;;GAIG;AACH,eAAO,MAAM,YAAY,mDAGxB,CAAC"}
@@ -8,7 +8,11 @@
8
8
  * touches the RSC runtime.
9
9
  *
10
10
  * Keep this as thin pass-through re-exports — the value is the single choke
11
- * point, not abstraction.
11
+ * point, not abstraction. The exception is `renderFlight`, the only way to
12
+ * render Flight (render-flight.ts). Bound-args encryption is plugin-rsc's
13
+ * injected runtime, resolved to encryption-runtime.ts so it renders through
14
+ * `renderFlight` too.
12
15
  */
13
- export { renderToReadableStream, loadServerAction, decodeReply, decodeAction, decodeFormState, encryptActionBoundArgs, decryptActionBoundArgs, createFromReadableStream, } from '@vitejs/plugin-rsc/rsc';
16
+ export { renderFlight } from './render-flight.ts';
17
+ export { loadServerAction, decodeReply, decodeAction, decodeFormState, createFromReadableStream, } from '@vitejs/plugin-rsc/rsc';
14
18
  //# sourceMappingURL=rsc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/rsc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,YAAY,EAGZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EAOtB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/rsc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,EAGZ,eAAe,EAOf,wBAAwB,GACzB,MAAM,wBAAwB,CAAC"}
@@ -11,17 +11,11 @@
11
11
  */
12
12
  export { createFromReadableStream } from '@vitejs/plugin-rsc/ssr';
13
13
  /**
14
- * Decode an RSC Flight stream from a Node.js Readable.
15
- *
16
- * Uses the vendored createFromNodeStream which reads via Node.js native
17
- * streams (C++ libuv) instead of Web ReadableStream (JS Promise per chunk).
18
- *
19
- * Returns null if createFromNodeStream isn't available (CF Workers, etc),
20
- * signaling the caller to use createFromReadableStream instead.
14
+ * Decode a Node Flight source (`server/flight-source.ts`) for SSR — plugin-rsc's
15
+ * `ssr.node` entry, which reads a Node `Readable`, string chunks included.
16
+ * `null` off Node, where every Flight source is a Web stream. Loaded behind
17
+ * the platform probe `renderFlight` (`rsc.ts`) reads, so it exists exactly
18
+ * when the RSC side renders Node sources.
21
19
  */
22
- export declare function createFromNodeStream(stream: import('node:stream').Readable, options?: {
23
- nonce?: string;
24
- }): React.ReactNode | null;
25
- /** Whether the Node.js stream RSC decode path is available. */
26
- export declare const hasNodeStreamDecode: boolean;
20
+ export declare const createFromNodeStream: typeof import("@vitejs/plugin-rsc/ssr.node").createFromNodeStream | null;
27
21
  //# sourceMappingURL=ssr.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/ssr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAiClE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,aAAa,EAAE,QAAQ,EACtC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3B,KAAK,CAAC,SAAS,GAAG,IAAI,CAGxB;AAED,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,SAAiC,CAAC"}
1
+ {"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/ssr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,0EAEzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../../src/server/action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAEjF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKtE,OAAO,EAAwC,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAYvD,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,gDAAgD;IAChD,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAarD;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,iBAAiB,GACzB;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B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AE,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B,CAAC;AAON;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,QAAQ,GAAG,iBAAiB,GAAG,IAAI,CAAC,CAuF9C"}
@@ -39,4 +39,6 @@ export declare function shouldCompress(response: Response): boolean;
39
39
  * This preserves streaming behavior for HTML shell + deferred Suspense chunks.
40
40
  */
41
41
  export declare function compressResponse(request: Request, response: Response): Response;
42
+ /** Registry key of the Node-body brand; must equal `NODE_BODY` in node-response.ts. */
43
+ export declare const NODE_BODY_KEY = "timber.response.nodeBody";
42
44
  //# sourceMappingURL=compress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["../../src/server/compress.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,aAc7B,CAAC;AASH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4BvE;AAID;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAmB1D;AAID;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAiC/E"}
1
+ {"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["../../src/server/compress.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,aAc7B,CAAC;AASH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4BvE;AAID;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAsB1D;AAID;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CA8B/E;AASD,uFAAuF;AACvF,eAAO,MAAM,aAAa,6BAA6B,CAAC"}
@@ -19,13 +19,14 @@ import type { ManifestSegmentNode } from './route-matcher.ts';
19
19
  import type { RouteMatch } from './pipeline.ts';
20
20
  import type { NavContext, SsrRenderResult } from './ssr-bridge-types.ts';
21
21
  import type { ClientBootstrapConfig } from './html-injectors.ts';
22
+ import { type FlightSource } from './flight-source.ts';
22
23
  /** Layout component entry for deny page wrapping. */
23
24
  export interface LayoutEntry {
24
25
  component: (...args: unknown[]) => unknown;
25
26
  segment: ManifestSegmentNode;
26
27
  }
27
28
  /** Callback to pass RSC stream to SSR for HTML rendering. */
28
- export type CallSsrFn = (rscStream: ReadableStream<Uint8Array>, navContext: NavContext) => Promise<SsrRenderResult>;
29
+ export type CallSsrFn = (rscSource: FlightSource, navContext: NavContext) => Promise<SsrRenderResult>;
29
30
  /**
30
31
  * Supplies a replacement for the framework default page at the end of the
31
32
  * chain. Returning `null` keeps the framework default.
@@ -1 +1 @@
1
- {"version":3,"file":"deny-renderer.d.ts","sourceRoot":"","sources":["../../src/server/deny-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAa7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,K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AC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,OAAO,EACxB,gBAAgB,SAAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAgDnB"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Flight injector core — the pull loop that turns the inline Flight source
3
+ * into `<script>` tags interleaved with the HTML stream.
4
+ *
5
+ * Shape-agnostic like the rest of `html-injector-core.ts`: the Web wrapper
6
+ * (`html-injectors.ts`) and the Node wrapper (`node-stream-transforms.ts`)
7
+ * compose this class, and it reads either kind of Flight source through
8
+ * `openFlightReader` (`flight-source.ts`), so the inline branch is a Node
9
+ * stream end to end on Node and a Web stream on Workers.
10
+ *
11
+ * Design docs: 02-rendering-pipeline.md §"Stream Tee",
12
+ * §"Scripts at Chunk Boundaries Only", §"Streaming Constraints"
13
+ */
14
+ import { type Machine } from '../utils/state-machine.ts';
15
+ import { type FlightInjectionState, type FlightInjectionEvent } from './flight-injection-state.ts';
16
+ import { type FlightChunk, type FlightSource } from './flight-source.ts';
17
+ /**
18
+ * Turns Flight chunks into inline script tags, in order.
19
+ *
20
+ * - Adjacent text in one batch of chunks becomes one `[1, text]` script, so
21
+ * the many small chunks Node's Flight writer produces (a header chunk and a
22
+ * string per long row) cost one script, not one each.
23
+ * - A string chunk (Node only) is already text: it is JSON-escaped straight
24
+ * into the tuple, with no decode.
25
+ * - A run of byte chunks is decoded as a whole, holding back an incomplete
26
+ * trailing character for the next chunk. A run that is not valid UTF-8 —
27
+ * the binary row of a typed array or ArrayBuffer — is sent as a
28
+ * `[3, base64]` tuple instead of failing the response. The browser
29
+ * (`client/browser-entry/rsc-stream.ts`) enqueues both tuples' bytes in
30
+ * order, so it rebuilds the exact byte stream either way.
31
+ */
32
+ export declare class FlightInlineEncoder {
33
+ private readonly nonce?;
34
+ private readonly decoder;
35
+ /** Bytes held back because they end in an incomplete UTF-8 sequence. */
36
+ private carry;
37
+ constructor(nonce?: string | undefined);
38
+ /** The scripts for a batch of chunks, in order. */
39
+ push(chunks: readonly FlightChunk[]): string[];
40
+ /** The scripts for bytes still held back at the end of the stream. */
41
+ end(): string[];
42
+ private takeCarry;
43
+ /** The bytes as text, or `null` if they are not valid UTF-8. */
44
+ private decode;
45
+ }
46
+ /**
47
+ * Both wrappers (Web `TransformStream` and Node `Transform`) implement the
48
+ * exact same protocol around the inline Flight source:
49
+ *
50
+ * 1. On the first HTML chunk, send `FIRST_CHUNK` and start the pull loop.
51
+ * 2. The pull loop reads the source (timeout-guarded), turns each chunk
52
+ * into `<script>` tags via {@link FlightInlineEncoder}, and pushes them
53
+ * onto a pending queue. Between reads, it yields with a single-shot
54
+ * `setImmediate` so HTML chunks get event-loop priority — and after
55
+ * yielding, it drains the queue (via the wrapper's `onYieldDrain`)
56
+ * so flight data reaches the client at shell-flush time.
57
+ * 3. After every emitted HTML chunk, the wrapper drains the queue.
58
+ * 4. On `flush()` the wrapper sends `HTML_DONE` and awaits `pullPromise`.
59
+ * No polling — just `.then()`.
60
+ *
61
+ * The wrappers only differ in:
62
+ * - How they push bytes (controller.enqueue vs transform.push).
63
+ * - How they signal a terminal error (controller.error vs transform.destroy).
64
+ *
65
+ * **No polling.** See design/02-rendering-pipeline.md §"No Polling".
66
+ * **Always timeout-guarded reads.** Per design/02 §"Streaming Constraints".
67
+ */
68
+ export interface FlightInjectorOptions {
69
+ /**
70
+ * Timeout in milliseconds for individual Flight reads. If one read does
71
+ * not resolve within this duration, the read is aborted and the stream
72
+ * errors with a `RenderTimeoutError`. Default: 30000 (30s). `0`
73
+ * ("disabled") still enforces a 120s ceiling so a stalled RSC stream can
74
+ * never hang the connection forever.
75
+ */
76
+ renderTimeoutMs?: number;
77
+ /** Signal that fires when an unhandled RSC error is detected. */
78
+ errorSignal?: AbortSignal;
79
+ /** Request CSP nonce, stamped on every emitted `<script>` (TIM-1414). */
80
+ nonce?: string;
81
+ }
82
+ export declare class FlightInjectorCore {
83
+ readonly machine: Machine<FlightInjectionState, FlightInjectionEvent>;
84
+ /** Script chunks waiting to be drained between HTML chunks. */
85
+ readonly pending: Uint8Array[];
86
+ private readonly reader;
87
+ private readonly timeoutMs;
88
+ private readonly errorSignal?;
89
+ private readonly encoder;
90
+ private pullPromise;
91
+ private _aborted;
92
+ constructor(source: FlightSource, options?: FlightInjectorOptions);
93
+ /** Tell the machine the first HTML chunk has arrived. Idempotent-ish: caller checks. */
94
+ notifyFirstChunk(): void;
95
+ /** Tell the machine HTML output is finished — pull loop will stop yielding. */
96
+ notifyHtmlDone(): void;
97
+ get isInit(): boolean;
98
+ get isPullDone(): boolean;
99
+ get hasPullPromise(): boolean;
100
+ /**
101
+ * Get (or start) the pull-loop promise. The wrapper calls this from
102
+ * `flush()` and chains `.then()` onto it — never `await` without an
103
+ * existing finish callback (we don't want to block transform()).
104
+ *
105
+ * `onYieldDrain` is invoked between Flight reads while HTML is still
106
+ * streaming. It must drain the pending queue into the output stream.
107
+ */
108
+ ensurePullLoop(onYieldDrain: () => void): Promise<void>;
109
+ /**
110
+ * Get the current terminal error if the machine is in the error phase,
111
+ * else `null`. Wrappers use this after a drain to decide whether to
112
+ * `controller.error()` / `transform.destroy()`.
113
+ */
114
+ get terminalError(): unknown;
115
+ /**
116
+ * Abort the pull loop and release the Flight source. Called by stream
117
+ * wrappers when the HTML pipeline is torn down (Node `destroy()`,
118
+ * Web `cancel()`). Safe to call multiple times.
119
+ */
120
+ abort(reason?: unknown): void;
121
+ get isAborted(): boolean;
122
+ private enqueue;
123
+ private runPullLoop;
124
+ }
125
+ //# sourceMappingURL=flight-injector-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flight-injector-core.d.ts","sourceRoot":"","sources":["../../src/server/flight-injector-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MA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E;IAED,wFAAwF;IACxF,gBAAgB,IAAI,IAAI,CAEvB;IAED,+EAA+E;IAC/E,cAAc,IAAI,IAAI,CAErB;IAED,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,YAAY,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAKtD;IAED;;;;OAIG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAQ5B;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,OAAO,CAAC,OAAO;YAID,WAAW;CAuD1B"}
@@ -42,6 +42,15 @@ export declare function flightInitScript(nonce?: string): string;
42
42
  * push if needed, preventing a TypeError. See TIM-559.
43
43
  */
44
44
  export declare function flightChunkScript(data: string, nonce?: string): string;
45
+ /**
46
+ * Generate a push script for Flight bytes that are not valid UTF-8 — the
47
+ * binary row of a typed array or ArrayBuffer, which a `[1, text]` tuple
48
+ * cannot carry. Sent as base64 in a `[3, base64]` tuple; the browser
49
+ * decodes it back to the same bytes (client/browser-entry/rsc-stream.ts).
50
+ * Base64 has no character that can end the script element or the string,
51
+ * the same argument {@link formStateScript} makes.
52
+ */
53
+ export declare function flightBinaryChunkScript(bytes: Uint8Array, nonce?: string): string;
45
54
  /**
46
55
  * Generate the script that embeds a no-JS action's form state for
47
56
  * hydration: its Flight bytes (server/form-state-flight.ts), as base64. Only
@@ -1 +1 @@
1
- {"version":3,"file":"flight-scripts.d.ts","sourceRoot":"","sources":["../../src/server/flight-scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMxD;AAOD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzE"}
1
+ {"version":3,"file":"flight-scripts.d.ts","sourceRoot":"","sources":["../../src/server/flight-scripts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMxD;AAOD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzE"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Node halves of the Flight source helpers in `flight-source.ts`.
3
+ *
4
+ * Only loaded on Node (`flight-source.ts` imports it behind
5
+ * `nodeStreamsPlatform`), so Workers never evaluate it.
6
+ *
7
+ * A Node Flight source is an object-mode `Readable` whose chunks are exactly
8
+ * what React's `renderToPipeableStream` wrote: `Uint8Array` views for short
9
+ * rows, and JS strings for long rows (≥ ~1365 chars) and text row bodies.
10
+ * The Node Flight client (`createFromNodeStream`) requires every string chunk
11
+ * in its original shape — it throws "String chunks need to be passed in their
12
+ * original shape" if one is split or merged — so nothing here splits or
13
+ * concatenates a chunk on its way to a consumer.
14
+ *
15
+ * Design doc: 02-rendering-pipeline.md §"RSC → SSR → Client Hydration",
16
+ * §"Stream Tee"
17
+ */
18
+ import { Readable } from 'node:stream';
19
+ declare global {
20
+ interface String {
21
+ toWellFormed(): string;
22
+ }
23
+ }
24
+ /** A chunk of a Node Flight source. */
25
+ export type NodeFlightChunk = string | Uint8Array;
26
+ /** The part of React's `PipeableStream` a Flight render hands us. */
27
+ export interface PipeableFlight {
28
+ pipe<T extends NodeJS.WritableStream>(destination: T): T;
29
+ abort(reason?: unknown): void;
30
+ }
31
+ /**
32
+ * Release a Node Flight source: destroy it with `reason`, which aborts the
33
+ * render behind it. Cancellation reasons in the pipeline are `unknown` (a Web
34
+ * `cancel(reason)` takes anything); `destroy` takes an `Error`. Never throws
35
+ * and never leaves an unhandled `'error'` event, whoever is listening.
36
+ */
37
+ export declare function destroyNodeFlight(stream: Readable, reason: unknown): void;
38
+ /** When a Node Flight render is aborted, besides its consumer cancelling. */
39
+ export interface NodeFlightAbort {
40
+ /** The request's signal (client disconnect). */
41
+ signal?: AbortSignal;
42
+ /** Abort with a `RenderTimeoutError` after this long, if still rendering. */
43
+ timeoutMs?: number;
44
+ }
45
+ /**
46
+ * Pipe a Flight render into an object-mode Node source.
47
+ *
48
+ * - Strings pass through `toWellFormed()`, as Next does
49
+ * (`renderToNodeFlightStream`): SSR decodes the raw string while the inline
50
+ * copy round-trips through JSON + `TextEncoder`, which turns a lone
51
+ * surrogate into U+FFFD, so without it SSR and hydration see different
52
+ * text. Length in UTF-16 units is unchanged, so a text row's length header
53
+ * still holds.
54
+ * - `renderToPipeableStream` takes no `signal`. `abort()` is called when the
55
+ * request signal fires, when `timeoutMs` passes (design/02 §"Always Wire
56
+ * abort() to Both Request Signal AND Timeout"), and when the source is
57
+ * destroyed (a consumer cancelling), with the destroy reason — the reason a
58
+ * Web `cancel(reason)` hands Flight. The listener and the timer are
59
+ * released when the source closes.
60
+ */
61
+ export declare function pipeFlightToNode(flight: PipeableFlight, { signal, timeoutMs }: NodeFlightAbort): Readable;
62
+ /**
63
+ * Tee a Node Flight source into two object-mode branches, with the contract
64
+ * of `teeWithErrorPropagation` (`stream-utils.ts`):
65
+ *
66
+ * - Each branch has its own queue, so the lagging branch buffers without
67
+ * bound until the divergence guard (`maxBufferBytes`, default 5MB, counted
68
+ * in UTF-8 bytes) cancels both. Nothing couples the branches' backpressure:
69
+ * the inline branch is not read until Fizz emits its first HTML chunk, and
70
+ * Fizz needs SSR to consume Flight first, so a `pipe()` into two
71
+ * PassThroughs would deadlock once the inline one filled.
72
+ * - The source is read at the pace of the faster branch (paused only while
73
+ * neither branch wants data), like a Web `tee()`.
74
+ * - An error on the source, or a branch destroyed before it ended, destroys
75
+ * the other branch with an error and destroys the source — which aborts the
76
+ * render — so neither consumer hangs and both are released.
77
+ */
78
+ export declare function teeNodeFlight(source: Readable, maxBufferBytes?: number): [Readable, Readable];
79
+ /**
80
+ * A Node Flight source as a `Response` (`NodeBodyResponse`): its body stays a
81
+ * Node stream all the way to the adapter, which pipes it to the socket
82
+ * (LOCAL-1475). Nothing in the Flight path converts it to a Web stream.
83
+ *
84
+ * Every chunk that arrives in one tick goes out as one buffer, with string
85
+ * chunks encoded straight into it. React writes a flush synchronously, and
86
+ * its Node build passes each long row as its own string: a heavy payload
87
+ * arrives as ~4x the chunks of the Web build's 4KB views, and the socket pays
88
+ * per write. The body pauses the source while the client is slow (a payload
89
+ * never piles up in memory), destroying it early destroys the source (which
90
+ * aborts the render), and an error or early close on the source ends it.
91
+ * Wired by hand rather than with `pipeline()`, which allocates an
92
+ * AbortController and an error on every finish.
93
+ */
94
+ export declare function nodeFlightResponse(source: Readable, init: ResponseInit): Response;
95
+ /**
96
+ * Settles once a chunk (or the end) can be read from `source`, without
97
+ * consuming it: the chunk stays in the source for whatever reads it next.
98
+ * Rejects if the source errors first.
99
+ *
100
+ * The `'readable'` listener is removed on settle; Node restores the stream's
101
+ * flowing state on the next tick, so a consumer attached afterwards (a pipe,
102
+ * a `'data'` listener) still starts it.
103
+ */
104
+ export declare function whenNodeFlightReadable(source: Readable): Promise<void>;
105
+ //# sourceMappingURL=flight-source-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flight-source-node.d.ts","sourceRoot":"","sources":["../../src/server/flight-source-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAC;AAQlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,IAAI,MAAM,CAAC;KACxB;CACF;AAED,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,UAAU,CAAC;AAElD,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,cAAc,EAAE,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IACzD,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/B;AAWD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CASzE;AAED,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,EACtB,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,GACrC,QAAQ,CA2BV;AAOD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,QAAQ,EAChB,cAAc,GAAE,MAAiC,GAChD,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAiItB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,QAAQ,CAEjF;AA2GD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBtE"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Flight sources — the one shape a Flight render takes on each platform.
3
+ *
4
+ * Every Flight render in the RSC environment goes through `renderFlight()`
5
+ * (`rsc-runtime/rsc.ts`, built by {@link createRenderFlight} here). On Node
6
+ * (`nodeStreamsPlatform`) it renders with `renderToPipeableStream` into an
7
+ * object-mode Node `Readable`; on Workers (and any runtime without native
8
+ * Node streams) with `renderToReadableStream`.
9
+ * A consumer on a given platform therefore only ever sees that platform's
10
+ * kind. The union exists so shared code typechecks for both; nothing adapts
11
+ * one kind into the other; a Node source becomes a Node-body response
12
+ * ({@link flightResponse}) that the adapter pipes to the socket.
13
+ *
14
+ * Consumers never switch on kind themselves — they use the helpers below:
15
+ * a timeout-guardable reader, cancel, tee, whole-payload collection, the
16
+ * response body, and the first-chunk wait.
17
+ *
18
+ * The Node halves live in `flight-source-node.ts`, loaded only on Node so
19
+ * Workers never evaluate them.
20
+ *
21
+ * Design doc: 02-rendering-pipeline.md §"RSC → SSR → Client Hydration"
22
+ */
23
+ import type { Readable } from 'node:stream';
24
+ import { type ChunkReader, type TeeOptions } from './stream-utils.ts';
25
+ /** A Flight render's output, as its platform streams it. */
26
+ export type FlightSource = {
27
+ kind: 'node';
28
+ stream: Readable;
29
+ } | {
30
+ kind: 'web';
31
+ stream: ReadableStream<Uint8Array>;
32
+ };
33
+ /**
34
+ * One chunk of a Flight source. A Web source yields bytes only; a Node
35
+ * source yields bytes for short rows and JS strings for long rows, which
36
+ * must reach the Node Flight client unsplit and unmerged.
37
+ */
38
+ export type FlightChunk = string | Uint8Array;
39
+ /** Options every Flight render takes. */
40
+ export interface FlightRenderOptions {
41
+ /**
42
+ * Flight's error callback. Its return value is the digest written into the
43
+ * error row.
44
+ */
45
+ onError?: (error: unknown) => string | void;
46
+ /** Aborts the render (client disconnect). */
47
+ signal?: AbortSignal;
48
+ /**
49
+ * Aborts the render with a `RenderTimeoutError` after this long, if it is
50
+ * still running. Defaults to the configured `renderTimeoutMs`
51
+ * ({@link setFlightRenderTimeout}), so no render can stream forever. Node only, where the source's close clears the timer:
52
+ * Workers keep the stock `renderToReadableStream` call, whose end is not
53
+ * observable without wrapping its stream, and bound a request's wall time
54
+ * themselves.
55
+ */
56
+ timeoutMs?: number;
57
+ }
58
+ export declare function setFlightRenderTimeout(timeoutMs: number | undefined): void;
59
+ /** Render a model to a Flight source. */
60
+ export type RenderFlight = (model: unknown, options?: FlightRenderOptions) => FlightSource;
61
+ /** plugin-rsc's `renderToReadableStream`, with the options timber passes. */
62
+ export type WebFlightRenderer = (model: unknown, options?: {
63
+ onError?: (error: unknown) => string | void;
64
+ signal?: AbortSignal;
65
+ }) => ReadableStream<Uint8Array>;
66
+ /** plugin-rsc's `renderToPipeableStream` (`rsc.node`), with the options timber passes. */
67
+ export type NodeFlightRenderer = (model: unknown, options?: {
68
+ onError?: (error: unknown) => string | void;
69
+ }) => import('./flight-source-node.ts').PipeableFlight;
70
+ /**
71
+ * Build `renderFlight()` from the platform's renderers. The Node renderer is
72
+ * used whenever it was loaded (on Node it always is — see `rsc-runtime/rsc.ts`);
73
+ * otherwise every render is a Web stream.
74
+ *
75
+ * On Node only one Flight server build may ever render in a process: React
76
+ * throws "Currently React only supports one RSC renderer at a time" when a
77
+ * second build's render starts. That is the second reason every render goes
78
+ * through here.
79
+ */
80
+ export declare function createRenderFlight(web: WebFlightRenderer, node: NodeFlightRenderer | null): RenderFlight;
81
+ /** A pull reader over a Flight source, of either kind. */
82
+ export interface FlightReader extends ChunkReader<FlightChunk> {
83
+ /**
84
+ * Every chunk the source already holds, taken without waiting — for
85
+ * coalescing them into one inline script. Always empty for a Web source,
86
+ * which has no synchronous read.
87
+ */
88
+ takeBuffered(): FlightChunk[];
89
+ }
90
+ /**
91
+ * A pull reader over either kind. `read()` is unguarded: every caller races
92
+ * it against a timeout (design/02 §"Always Timeout-Guard Stream Reads").
93
+ * `cancel()` releases the source, which aborts the render.
94
+ */
95
+ export declare function openFlightReader(source: FlightSource): FlightReader;
96
+ /** Release a source nothing will read, aborting the render behind it. */
97
+ export declare function cancelFlightSource(source: FlightSource, reason?: unknown): void;
98
+ /** A chunk as bytes. */
99
+ export declare function flightChunkBytes(chunk: FlightChunk): Uint8Array;
100
+ /**
101
+ * Read a whole Flight source into bytes under one overall deadline, cancelling
102
+ * it on every exit (`drainWithDeadline`). For renders whose payload is stored
103
+ * rather than streamed: the no-JS form state and both prebuilt captures.
104
+ */
105
+ export declare function collectFlightBytes(source: FlightSource, timeoutMs: number, label: string): Promise<Uint8Array<ArrayBuffer>>;
106
+ /**
107
+ * Tee a source for SSR and the inline payload, each branch its source's kind.
108
+ * Both implementations share one contract: unbounded lag up to the
109
+ * divergence guard, and an error or cancel on either branch reaches the
110
+ * other and the render (design/02 §"Stream Tee").
111
+ */
112
+ export declare function teeFlightSource(source: FlightSource, options?: TeeOptions): [FlightSource, FlightSource];
113
+ /**
114
+ * A source as a `Response`. A Web source is the body as is; a Node source
115
+ * stays a Node stream to the socket (`NodeBodyResponse`, node-response.ts), so
116
+ * a payload is never converted Node → Web → Node.
117
+ */
118
+ export declare function flightResponse(source: FlightSource, init: ResponseInit): Response;
119
+ /** A source whose first chunk can be awaited without losing it. */
120
+ export interface FlightPeek {
121
+ /**
122
+ * Settles when the first chunk (or the end) is available. Rejects if the
123
+ * source errors first. Unguarded, like every read: callers race it.
124
+ */
125
+ ready: Promise<void>;
126
+ /** The source, first chunk included — what to send or cancel afterwards. */
127
+ source: FlightSource;
128
+ }
129
+ /**
130
+ * Wait for a source's first chunk without consuming it, so the payload path
131
+ * can decide on a response before committing to the stream. A Node source
132
+ * waits for `'readable'` and keeps its chunk; a Web source reads the chunk
133
+ * and replays it at the head of a wrapping stream.
134
+ */
135
+ export declare function peekFlight(source: FlightSource): FlightPeek;
136
+ //# sourceMappingURL=flight-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flight-source.d.ts","sourceRoot":"","sources":["../../src/server/flight-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAE3B,4DAA4D;AAC5D,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;CAAE,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;AAc9C,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;IAC5C,6CAA6C;IAC7C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAE1E;AAED,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,YAAY,CAAC;AAE3F,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,CAC9B,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE;IAAE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C,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,GAAG,QAAQ,CAGjF;AAED,mEAAmE;AACnE,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,4EAA4E;IAC5E,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,UAAU,CAmB3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-response.d.ts","sourceRoot":"","sources":["../../src/server/head-response.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAmB1E"}
1
+ {"version":3,"file":"head-response.d.ts","sourceRoot":"","sources":["../../src/server/head-response.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAa1E"}