@timber-js/app 0.2.0-alpha.208 → 0.2.0-alpha.209

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 (520) hide show
  1. package/dist/_chunks/{primitives-DLAnvsrk.js → actions-BerlqoXA.js} +640 -410
  2. package/dist/_chunks/actions-BerlqoXA.js.map +1 -0
  3. package/dist/_chunks/{als-registry-C6kcfprT.js → als-registry-DaxkVjt5.js} +6 -2
  4. package/dist/_chunks/als-registry-DaxkVjt5.js.map +1 -0
  5. package/dist/_chunks/{build-manifest-DTmSGLRz.js → build-manifest-DWppEdLB.js} +2 -51
  6. package/dist/_chunks/build-manifest-DWppEdLB.js.map +1 -0
  7. package/dist/_chunks/{build-output-helper-9dqCv1pZ.js → build-output-helper-RV_BRcF1.js} +50 -53
  8. package/dist/_chunks/build-output-helper-RV_BRcF1.js.map +1 -0
  9. package/dist/_chunks/{cache-api-CUD9Ezaq.js → cache-api-CR23J_NC.js} +64 -32
  10. package/dist/_chunks/cache-api-CR23J_NC.js.map +1 -0
  11. package/dist/_chunks/{chains-B4bgOl2g.js → chains-CpFg56UB.js} +2 -2
  12. package/dist/_chunks/{chains-B4bgOl2g.js.map → chains-CpFg56UB.js.map} +1 -1
  13. package/dist/_chunks/{cli-check-G8o30ldg.js → cli-check-C6Ev6wBO.js} +11 -52
  14. package/dist/_chunks/cli-check-C6Ev6wBO.js.map +1 -0
  15. package/dist/_chunks/cli-context-By7k2xVo.js +70 -0
  16. package/dist/_chunks/cli-context-By7k2xVo.js.map +1 -0
  17. package/dist/_chunks/{cli-schema-sync--LZKs8Zn.js → cli-schema-sync-CbT2AUUI.js} +3 -3
  18. package/dist/_chunks/{cli-schema-sync--LZKs8Zn.js.map → cli-schema-sync-CbT2AUUI.js.map} +1 -1
  19. package/dist/_chunks/{cloudflare-BFb__LYG.js → cloudflare-Byxl8FWP.js} +96 -53
  20. package/dist/_chunks/{cloudflare-BFb__LYG.js.map → cloudflare-Byxl8FWP.js.map} +1 -1
  21. package/dist/_chunks/{convention-lint-5KzoMg_A.js → convention-lint-jKTwKwPe.js} +21 -6
  22. package/dist/_chunks/convention-lint-jKTwKwPe.js.map +1 -0
  23. package/dist/_chunks/{dev-server-BzBxgYAV.js → dev-server-C4WZdB7L.js} +15 -167
  24. package/dist/_chunks/dev-server-C4WZdB7L.js.map +1 -0
  25. package/dist/_chunks/{error-boundary-BrHmG-2X.js → error-boundary-tA7kVfs4.js} +84 -104
  26. package/dist/_chunks/error-boundary-tA7kVfs4.js.map +1 -0
  27. package/dist/_chunks/{fs-identity-D7vb6GdI.js → fs-identity-BRKuL215.js} +3 -4
  28. package/dist/_chunks/fs-identity-BRKuL215.js.map +1 -0
  29. package/dist/_chunks/{graph-cache-CP4GEmf9.js → graph-cache-CYiUS2aS.js} +4 -5
  30. package/dist/_chunks/graph-cache-CYiUS2aS.js.map +1 -0
  31. package/dist/_chunks/{json-lossy-check-ClNvBM_3.js → json-lossy-check-ip0Qi0MT.js} +6 -3
  32. package/dist/_chunks/json-lossy-check-ip0Qi0MT.js.map +1 -0
  33. package/dist/_chunks/{live-graph-Bm5WTvcr.js → live-graph-Dv-JJCZw.js} +3 -3
  34. package/dist/_chunks/{live-graph-Bm5WTvcr.js.map → live-graph-Dv-JJCZw.js.map} +1 -1
  35. package/dist/_chunks/{logger-k2DQ4EUf.js → logger-DiDt5ppH.js} +192 -51
  36. package/dist/_chunks/logger-DiDt5ppH.js.map +1 -0
  37. package/dist/_chunks/{navigation-root-mHSK9psY.js → navigation-root-BQfo1-kG.js} +2 -2
  38. package/dist/_chunks/{navigation-root-mHSK9psY.js.map → navigation-root-BQfo1-kG.js.map} +1 -1
  39. package/dist/_chunks/{plugin-context-8idfR3UZ.js → plugin-context-BPBPc3lL.js} +28 -4
  40. package/dist/_chunks/plugin-context-BPBPc3lL.js.map +1 -0
  41. package/dist/_chunks/{poison-scan-DG5eI2_z.js → poison-scan-CpeT6_OJ.js} +2 -2
  42. package/dist/_chunks/{poison-scan-DG5eI2_z.js.map → poison-scan-CpeT6_OJ.js.map} +1 -1
  43. package/dist/_chunks/render-timeout-DOf_BBcO.js +46 -0
  44. package/dist/_chunks/render-timeout-DOf_BBcO.js.map +1 -0
  45. package/dist/_chunks/{rsc-payload-path-B_LBodc2.js → rsc-payload-path-dffcs4jp.js} +9 -3
  46. package/dist/_chunks/{rsc-payload-path-B_LBodc2.js.map → rsc-payload-path-dffcs4jp.js.map} +1 -1
  47. package/dist/_chunks/{scanner-BQ5sPIJ7.js → scanner-Bw0oq1HB.js} +2 -2
  48. package/dist/_chunks/{scanner-BQ5sPIJ7.js.map → scanner-Bw0oq1HB.js.map} +1 -1
  49. package/dist/_chunks/{navigation-context-D0TU0Jog.js → segment-context-xtPUGfdq.js} +36 -34
  50. package/dist/_chunks/segment-context-xtPUGfdq.js.map +1 -0
  51. package/dist/_chunks/{singleflight-2lUWfcAk.js → singleflight-BeVMMKi0.js} +4 -3
  52. package/dist/_chunks/{singleflight-2lUWfcAk.js.map → singleflight-BeVMMKi0.js.map} +1 -1
  53. package/dist/_chunks/{sizeof-lXffQ1Vr.js → sizeof-UwzwB1uM.js} +3 -2
  54. package/dist/_chunks/sizeof-UwzwB1uM.js.map +1 -0
  55. package/dist/_chunks/ssr-data-nA3I70_n.js +49 -0
  56. package/dist/_chunks/ssr-data-nA3I70_n.js.map +1 -0
  57. package/dist/_chunks/{state-FippDgxN.js → state-BhNGPsdi.js} +6 -8
  58. package/dist/_chunks/state-BhNGPsdi.js.map +1 -0
  59. package/dist/_chunks/{status-page-marker-CNbpUOPB.js → status-page-marker-gaihi0KZ.js} +53 -20
  60. package/dist/_chunks/status-page-marker-gaihi0KZ.js.map +1 -0
  61. package/dist/_chunks/{walkers-CN2N_bA-.js → walkers-BXExhzzk.js} +2 -2
  62. package/dist/_chunks/{walkers-CN2N_bA-.js.map → walkers-BXExhzzk.js.map} +1 -1
  63. package/dist/_chunks/write-file-atomic-D1qWqHb4.js +32 -0
  64. package/dist/_chunks/write-file-atomic-D1qWqHb4.js.map +1 -0
  65. package/dist/adapters/build-output-helper.d.ts +7 -7
  66. package/dist/adapters/build-output-helper.d.ts.map +1 -1
  67. package/dist/adapters/canonicalize-module.d.ts +8 -0
  68. package/dist/adapters/canonicalize-module.d.ts.map +1 -0
  69. package/dist/adapters/cloudflare-dev.js +1 -1
  70. package/dist/adapters/cloudflare-kv-cache.js +2 -2
  71. package/dist/adapters/cloudflare.d.ts +30 -8
  72. package/dist/adapters/cloudflare.d.ts.map +1 -1
  73. package/dist/adapters/cloudflare.js +2 -2
  74. package/dist/adapters/compress-module.d.ts +8 -0
  75. package/dist/adapters/compress-module.d.ts.map +1 -1
  76. package/dist/adapters/fs-identity.d.ts +2 -3
  77. package/dist/adapters/fs-identity.d.ts.map +1 -1
  78. package/dist/adapters/nitro-presets.d.ts +0 -6
  79. package/dist/adapters/nitro-presets.d.ts.map +1 -1
  80. package/dist/adapters/nitro-preview.d.ts +43 -11
  81. package/dist/adapters/nitro-preview.d.ts.map +1 -1
  82. package/dist/adapters/nitro.d.ts +1 -13
  83. package/dist/adapters/nitro.d.ts.map +1 -1
  84. package/dist/adapters/nitro.js +291 -176
  85. package/dist/adapters/nitro.js.map +1 -1
  86. package/dist/adapters/shared.d.ts +7 -2
  87. package/dist/adapters/shared.d.ts.map +1 -1
  88. package/dist/adapters/types.d.ts +105 -21
  89. package/dist/adapters/types.d.ts.map +1 -1
  90. package/dist/adapters/types.js +0 -0
  91. package/dist/analyze/crawl-entry.js +3 -3
  92. package/dist/analyze/graph-cache.d.ts.map +1 -1
  93. package/dist/analyze/graph-command.js +4 -4
  94. package/dist/cache/index.js +2 -2
  95. package/dist/cache/json-lossy-check.d.ts.map +1 -1
  96. package/dist/cache/singleflight.d.ts.map +1 -1
  97. package/dist/cache/sizeof.d.ts.map +1 -1
  98. package/dist/cache/stores/memory.js +1 -1
  99. package/dist/cache/tag-aware-handler.d.ts.map +1 -1
  100. package/dist/cdn/workers-cache-purge.js +1 -1
  101. package/dist/cli-check.d.ts +7 -37
  102. package/dist/cli-check.d.ts.map +1 -1
  103. package/dist/cli-context.d.ts +54 -0
  104. package/dist/cli-context.d.ts.map +1 -0
  105. package/dist/cli.d.ts +9 -9
  106. package/dist/cli.d.ts.map +1 -1
  107. package/dist/cli.js +20 -24
  108. package/dist/cli.js.map +1 -1
  109. package/dist/client/browser-dev.d.ts +1 -1
  110. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
  111. package/dist/client/browser-entry/hydrate.d.ts +19 -29
  112. package/dist/client/browser-entry/hydrate.d.ts.map +1 -1
  113. package/dist/client/browser-entry/index.d.ts +7 -7
  114. package/dist/client/browser-entry/post-hydration.d.ts +6 -9
  115. package/dist/client/browser-entry/post-hydration.d.ts.map +1 -1
  116. package/dist/client/browser-entry/router-init.d.ts +6 -11
  117. package/dist/client/browser-entry/router-init.d.ts.map +1 -1
  118. package/dist/client/error-boundary.d.ts +4 -3
  119. package/dist/client/error-boundary.d.ts.map +1 -1
  120. package/dist/client/error-boundary.js +1 -1
  121. package/dist/client/error-reconstituter.d.ts +3 -9
  122. package/dist/client/error-reconstituter.d.ts.map +1 -1
  123. package/dist/client/history.d.ts +12 -11
  124. package/dist/client/history.d.ts.map +1 -1
  125. package/dist/client/index.d.ts +0 -1
  126. package/dist/client/index.d.ts.map +1 -1
  127. package/dist/client/index.js +5 -6
  128. package/dist/client/index.js.map +1 -1
  129. package/dist/client/internal.d.ts +3 -3
  130. package/dist/client/internal.d.ts.map +1 -1
  131. package/dist/client/internal.js +68 -104
  132. package/dist/client/internal.js.map +1 -1
  133. package/dist/client/navigation-commit.d.ts +16 -7
  134. package/dist/client/navigation-commit.d.ts.map +1 -1
  135. package/dist/client/navigation-context.d.ts +3 -5
  136. package/dist/client/navigation-context.d.ts.map +1 -1
  137. package/dist/client/react-root.d.ts +3 -2
  138. package/dist/client/react-root.d.ts.map +1 -1
  139. package/dist/client/router-pipeline.d.ts +1 -6
  140. package/dist/client/router-pipeline.d.ts.map +1 -1
  141. package/dist/client/router-types.d.ts +45 -39
  142. package/dist/client/router-types.d.ts.map +1 -1
  143. package/dist/client/router-url.d.ts +24 -0
  144. package/dist/client/router-url.d.ts.map +1 -0
  145. package/dist/client/router.d.ts.map +1 -1
  146. package/dist/client/rsc-fetch.d.ts +8 -4
  147. package/dist/client/rsc-fetch.d.ts.map +1 -1
  148. package/dist/client/ssr-data.d.ts +18 -64
  149. package/dist/client/ssr-data.d.ts.map +1 -1
  150. package/dist/client/state.d.ts +2 -5
  151. package/dist/client/state.d.ts.map +1 -1
  152. package/dist/client/use-pathname.d.ts +1 -1
  153. package/dist/config-types.d.ts +2 -1
  154. package/dist/config-types.d.ts.map +1 -1
  155. package/dist/config-validation.d.ts.map +1 -1
  156. package/dist/cookies/index.js +1 -1
  157. package/dist/dev-tools/dev-page-shell.d.ts +17 -0
  158. package/dist/dev-tools/dev-page-shell.d.ts.map +1 -1
  159. package/dist/dev-tools/index.d.ts +1 -1
  160. package/dist/dev-tools/index.d.ts.map +1 -1
  161. package/dist/dev-tools/instrumentation.d.ts +17 -2
  162. package/dist/dev-tools/instrumentation.d.ts.map +1 -1
  163. package/dist/dev-tools/overlay.d.ts +6 -27
  164. package/dist/dev-tools/overlay.d.ts.map +1 -1
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +531 -373
  167. package/dist/index.js.map +1 -1
  168. package/dist/plugin-context.d.ts +26 -40
  169. package/dist/plugin-context.d.ts.map +1 -1
  170. package/dist/plugins/build-manifest.d.ts.map +1 -1
  171. package/dist/plugins/build-report.d.ts +15 -2
  172. package/dist/plugins/build-report.d.ts.map +1 -1
  173. package/dist/plugins/dev-server.d.ts.map +1 -1
  174. package/dist/plugins/entries.d.ts.map +1 -1
  175. package/dist/plugins/fonts.d.ts +19 -1
  176. package/dist/plugins/fonts.d.ts.map +1 -1
  177. package/dist/plugins/post-build.d.ts +110 -0
  178. package/dist/plugins/post-build.d.ts.map +1 -0
  179. package/dist/plugins/prebuilt-capture.d.ts +11 -4
  180. package/dist/plugins/prebuilt-capture.d.ts.map +1 -1
  181. package/dist/plugins/prebuilt.d.ts +17 -1
  182. package/dist/plugins/prebuilt.d.ts.map +1 -1
  183. package/dist/plugins/prerender-sugar.d.ts.map +1 -1
  184. package/dist/plugins/rsc-assets-manifest.d.ts +33 -0
  185. package/dist/plugins/rsc-assets-manifest.d.ts.map +1 -0
  186. package/dist/plugins/shims.d.ts.map +1 -1
  187. package/dist/plugins/static-build.d.ts +32 -9
  188. package/dist/plugins/static-build.d.ts.map +1 -1
  189. package/dist/routing/codegen-write.d.ts +0 -9
  190. package/dist/routing/codegen-write.d.ts.map +1 -1
  191. package/dist/routing/index.js +2 -2
  192. package/dist/routing/segment-codegen.d.ts.map +1 -1
  193. package/dist/server/access-gate.d.ts.map +1 -1
  194. package/dist/server/action-handler.d.ts +5 -4
  195. package/dist/server/action-handler.d.ts.map +1 -1
  196. package/dist/server/actions.d.ts +46 -7
  197. package/dist/server/actions.d.ts.map +1 -1
  198. package/dist/server/als-registry.d.ts +58 -5
  199. package/dist/server/als-registry.d.ts.map +1 -1
  200. package/dist/server/children-interception.d.ts.map +1 -1
  201. package/dist/server/cookie-context.d.ts +2 -23
  202. package/dist/server/cookie-context.d.ts.map +1 -1
  203. package/dist/server/csp-nonce.d.ts +0 -9
  204. package/dist/server/csp-nonce.d.ts.map +1 -1
  205. package/dist/server/csrf.d.ts +27 -4
  206. package/dist/server/csrf.d.ts.map +1 -1
  207. package/dist/server/debug.d.ts +0 -1
  208. package/dist/server/debug.d.ts.map +1 -1
  209. package/dist/server/default-logger.d.ts +2 -1
  210. package/dist/server/default-logger.d.ts.map +1 -1
  211. package/dist/server/deny-boundary.d.ts +12 -6
  212. package/dist/server/deny-boundary.d.ts.map +1 -1
  213. package/dist/server/deny-renderer.d.ts +2 -2
  214. package/dist/server/deny-renderer.d.ts.map +1 -1
  215. package/dist/server/error-boundary-wrapper.d.ts +7 -3
  216. package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
  217. package/dist/server/fallback-error.d.ts +9 -2
  218. package/dist/server/fallback-error.d.ts.map +1 -1
  219. package/dist/server/head-response.d.ts +4 -4
  220. package/dist/server/html-injectors.d.ts.map +1 -1
  221. package/dist/server/index.d.ts +0 -1
  222. package/dist/server/index.d.ts.map +1 -1
  223. package/dist/server/index.js +3 -4
  224. package/dist/server/index.js.map +1 -1
  225. package/dist/server/instrumentation.d.ts +10 -3
  226. package/dist/server/instrumentation.d.ts.map +1 -1
  227. package/dist/server/internal.d.ts +1 -4
  228. package/dist/server/internal.d.ts.map +1 -1
  229. package/dist/server/internal.js +961 -581
  230. package/dist/server/internal.js.map +1 -1
  231. package/dist/server/json-status-response.d.ts +34 -0
  232. package/dist/server/json-status-response.d.ts.map +1 -0
  233. package/dist/server/logger.d.ts +26 -0
  234. package/dist/server/logger.d.ts.map +1 -1
  235. package/dist/server/param-coercion.d.ts +11 -6
  236. package/dist/server/param-coercion.d.ts.map +1 -1
  237. package/dist/server/pipeline-helpers.d.ts +95 -7
  238. package/dist/server/pipeline-helpers.d.ts.map +1 -1
  239. package/dist/server/pipeline-interception.d.ts +11 -0
  240. package/dist/server/pipeline-interception.d.ts.map +1 -1
  241. package/dist/server/pipeline-outcome.d.ts +11 -1
  242. package/dist/server/pipeline-outcome.d.ts.map +1 -1
  243. package/dist/server/pipeline-phases.d.ts +2 -2
  244. package/dist/server/pipeline-phases.d.ts.map +1 -1
  245. package/dist/server/pipeline.d.ts +23 -35
  246. package/dist/server/pipeline.d.ts.map +1 -1
  247. package/dist/server/prebuilt/capture-render.d.ts +25 -0
  248. package/dist/server/prebuilt/capture-render.d.ts.map +1 -0
  249. package/dist/server/prebuilt/capture-routes.d.ts +37 -0
  250. package/dist/server/prebuilt/capture-routes.d.ts.map +1 -0
  251. package/dist/server/prebuilt/capture-state.d.ts +79 -35
  252. package/dist/server/prebuilt/capture-state.d.ts.map +1 -1
  253. package/dist/server/prebuilt/lifetime.d.ts +38 -0
  254. package/dist/server/prebuilt/lifetime.d.ts.map +1 -0
  255. package/dist/server/prebuilt/slots.d.ts +7 -0
  256. package/dist/server/prebuilt/slots.d.ts.map +1 -1
  257. package/dist/server/prebuilt/synthetic-store.d.ts.map +1 -1
  258. package/dist/server/prebuilt-builder.d.ts.map +1 -1
  259. package/dist/server/prebuilt-runtime.d.ts.map +1 -1
  260. package/dist/server/primitives.d.ts +6 -81
  261. package/dist/server/primitives.d.ts.map +1 -1
  262. package/dist/server/react-cache-bridge.d.ts +59 -0
  263. package/dist/server/react-cache-bridge.d.ts.map +1 -0
  264. package/dist/server/react-cache-scope.d.ts +49 -0
  265. package/dist/server/react-cache-scope.d.ts.map +1 -0
  266. package/dist/server/render-timeout.d.ts +15 -0
  267. package/dist/server/render-timeout.d.ts.map +1 -1
  268. package/dist/server/render-utils.d.ts +9 -0
  269. package/dist/server/render-utils.d.ts.map +1 -1
  270. package/dist/server/request-context.d.ts +26 -5
  271. package/dist/server/request-context.d.ts.map +1 -1
  272. package/dist/server/route-element-builder.d.ts.map +1 -1
  273. package/dist/server/route-handler.d.ts.map +1 -1
  274. package/dist/server/route-matcher.d.ts +7 -0
  275. package/dist/server/route-matcher.d.ts.map +1 -1
  276. package/dist/server/rsc-entry/action-middleware-runner.d.ts +22 -22
  277. package/dist/server/rsc-entry/action-middleware-runner.d.ts.map +1 -1
  278. package/dist/server/rsc-entry/api-handler.d.ts +7 -0
  279. package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
  280. package/dist/server/rsc-entry/deny-fallback.d.ts +32 -6
  281. package/dist/server/rsc-entry/deny-fallback.d.ts.map +1 -1
  282. package/dist/server/rsc-entry/error-renderer.d.ts +11 -18
  283. package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
  284. package/dist/server/rsc-entry/helpers.d.ts +0 -1
  285. package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
  286. package/dist/server/rsc-entry/index.d.ts +5 -15
  287. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  288. package/dist/server/rsc-entry/render-route.d.ts +5 -6
  289. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  290. package/dist/server/rsc-entry/render-signals.d.ts +65 -0
  291. package/dist/server/rsc-entry/render-signals.d.ts.map +1 -0
  292. package/dist/server/rsc-entry/revalidate-renderer.d.ts +6 -16
  293. package/dist/server/rsc-entry/revalidate-renderer.d.ts.map +1 -1
  294. package/dist/server/rsc-entry/rsc-payload.d.ts +7 -3
  295. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  296. package/dist/server/rsc-entry/rsc-stream.d.ts +8 -53
  297. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  298. package/dist/server/rsc-entry/ssr-bridge.d.ts +2 -2
  299. package/dist/server/rsc-entry/ssr-bridge.d.ts.map +1 -1
  300. package/dist/server/rsc-entry/ssr-renderer.d.ts +9 -4
  301. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  302. package/dist/server/rsc-entry/wrap-action-dispatch.d.ts +1 -1
  303. package/dist/server/rsc-entry/wrap-action-dispatch.d.ts.map +1 -1
  304. package/dist/server/signal-identity.d.ts +43 -0
  305. package/dist/server/signal-identity.d.ts.map +1 -0
  306. package/dist/server/slot-resolver.d.ts +4 -3
  307. package/dist/server/slot-resolver.d.ts.map +1 -1
  308. package/dist/server/slot-subtree-contain.d.ts.map +1 -1
  309. package/dist/server/ssr-bridge-types.d.ts +91 -53
  310. package/dist/server/ssr-bridge-types.d.ts.map +1 -1
  311. package/dist/server/ssr-entry.d.ts +8 -5
  312. package/dist/server/ssr-entry.d.ts.map +1 -1
  313. package/dist/server/ssr-render.d.ts +26 -40
  314. package/dist/server/ssr-render.d.ts.map +1 -1
  315. package/dist/server/ssr-wrappers.d.ts +1 -1
  316. package/dist/server/static-generator.d.ts.map +1 -1
  317. package/dist/server/stream-utils.d.ts +12 -0
  318. package/dist/server/stream-utils.d.ts.map +1 -1
  319. package/dist/server/tracing.d.ts +12 -16
  320. package/dist/server/tracing.d.ts.map +1 -1
  321. package/dist/server/types.d.ts +1 -1
  322. package/dist/server/version-skew.d.ts +3 -3
  323. package/dist/shared/csrf-reject.d.ts +16 -0
  324. package/dist/shared/csrf-reject.d.ts.map +1 -0
  325. package/dist/shared/error-digest.d.ts +28 -0
  326. package/dist/shared/error-digest.d.ts.map +1 -0
  327. package/dist/shared/payload-root.d.ts +11 -10
  328. package/dist/shared/payload-root.d.ts.map +1 -1
  329. package/dist/shared/rsc-payload-path.d.ts +6 -0
  330. package/dist/shared/rsc-payload-path.d.ts.map +1 -1
  331. package/dist/utils/write-file-atomic.d.ts +17 -0
  332. package/dist/utils/write-file-atomic.d.ts.map +1 -0
  333. package/docs/api/30-api-server.mdx +17 -14
  334. package/docs/api/32-api-cache.mdx +51 -23
  335. package/docs/api/34-api-config.mdx +34 -6
  336. package/docs/api/36-cli.mdx +11 -1
  337. package/docs/learn/03-fetching-data.mdx +17 -1
  338. package/docs/learn/04-access-control.mdx +1 -1
  339. package/docs/learn/10-caching.mdx +29 -11
  340. package/docs/learn/11-middleware.mdx +8 -2
  341. package/docs/learn/12-error-handling.mdx +6 -1
  342. package/package.json +5 -1
  343. package/src/adapters/build-output-helper.ts +55 -53
  344. package/src/adapters/canonicalize-module.ts +29 -0
  345. package/src/adapters/cloudflare.ts +105 -63
  346. package/src/adapters/compress-module.ts +16 -5
  347. package/src/adapters/fs-identity.ts +2 -3
  348. package/src/adapters/nitro-presets.ts +0 -15
  349. package/src/adapters/nitro-preview.ts +272 -136
  350. package/src/adapters/nitro.ts +119 -82
  351. package/src/adapters/shared.ts +23 -14
  352. package/src/adapters/types.ts +110 -21
  353. package/src/analyze/graph-cache.ts +3 -4
  354. package/src/cache/json-lossy-check.ts +3 -9
  355. package/src/cache/singleflight.ts +5 -2
  356. package/src/cache/sizeof.ts +3 -1
  357. package/src/cache/tag-aware-handler.ts +43 -26
  358. package/src/cli-check.ts +8 -98
  359. package/src/cli-context.ts +119 -0
  360. package/src/cli.ts +19 -28
  361. package/src/client/browser-dev.ts +1 -1
  362. package/src/client/browser-entry/action-dispatch.ts +26 -4
  363. package/src/client/browser-entry/hydrate.ts +53 -58
  364. package/src/client/browser-entry/index.ts +16 -27
  365. package/src/client/browser-entry/post-hydration.ts +6 -40
  366. package/src/client/browser-entry/router-init.ts +66 -84
  367. package/src/client/error-boundary.tsx +9 -41
  368. package/src/client/error-reconstituter.tsx +10 -5
  369. package/src/client/history.ts +18 -21
  370. package/src/client/index.ts +0 -1
  371. package/src/client/internal.ts +2 -7
  372. package/src/client/navigation-commit.ts +35 -18
  373. package/src/client/navigation-context.ts +3 -39
  374. package/src/client/react-root.ts +3 -2
  375. package/src/client/router-pipeline.ts +65 -128
  376. package/src/client/router-types.ts +46 -44
  377. package/src/client/router-url.ts +32 -0
  378. package/src/client/router.ts +43 -22
  379. package/src/client/rsc-fetch.ts +117 -155
  380. package/src/client/ssr-data.ts +19 -80
  381. package/src/client/state.ts +2 -9
  382. package/src/client/use-pathname.ts +1 -1
  383. package/src/config-types.ts +2 -1
  384. package/src/config-validation.ts +2 -1
  385. package/src/dev-tools/dev-page-shell.ts +18 -0
  386. package/src/dev-tools/index.ts +0 -2
  387. package/src/dev-tools/instrumentation.ts +50 -2
  388. package/src/dev-tools/overlay.ts +8 -238
  389. package/src/index.ts +24 -14
  390. package/src/plugin-context.ts +39 -40
  391. package/src/plugins/build-manifest.ts +4 -11
  392. package/src/plugins/build-report.ts +70 -70
  393. package/src/plugins/dev-server.ts +24 -44
  394. package/src/plugins/entries.ts +2 -1
  395. package/src/plugins/fonts.ts +35 -7
  396. package/src/plugins/post-build.ts +327 -0
  397. package/src/plugins/prebuilt-capture.ts +28 -32
  398. package/src/plugins/prebuilt.ts +54 -39
  399. package/src/plugins/prerender-sugar.ts +0 -4
  400. package/src/plugins/{adapter-build.ts → rsc-assets-manifest.ts} +20 -109
  401. package/src/plugins/shims.ts +1 -0
  402. package/src/plugins/static-build.ts +42 -74
  403. package/src/routing/codegen-write.ts +25 -3
  404. package/src/routing/segment-codegen.ts +3 -2
  405. package/src/rsc-runtime/vendor-types.d.ts +8 -0
  406. package/src/server/access-gate.tsx +2 -1
  407. package/src/server/action-client.ts +1 -1
  408. package/src/server/action-handler.ts +253 -110
  409. package/src/server/actions.ts +73 -25
  410. package/src/server/als-registry.ts +73 -5
  411. package/src/server/chain-url-parts.ts +1 -1
  412. package/src/server/children-interception.ts +2 -1
  413. package/src/server/cookie-context.ts +18 -48
  414. package/src/server/csp-nonce.ts +0 -12
  415. package/src/server/csrf.ts +140 -8
  416. package/src/server/debug.ts +0 -1
  417. package/src/server/default-logger.ts +2 -1
  418. package/src/server/deny-boundary.ts +25 -13
  419. package/src/server/deny-renderer.ts +30 -97
  420. package/src/server/error-boundary-wrapper.ts +7 -3
  421. package/src/server/fallback-error.ts +26 -11
  422. package/src/server/flight-scripts.ts +1 -1
  423. package/src/server/head-response.ts +4 -4
  424. package/src/server/html-injector-core.ts +2 -2
  425. package/src/server/html-injectors.ts +2 -4
  426. package/src/server/index.ts +0 -4
  427. package/src/server/instrumentation.ts +10 -3
  428. package/src/server/internal.ts +1 -6
  429. package/src/server/json-status-response.ts +105 -0
  430. package/src/server/logger.ts +39 -3
  431. package/src/server/param-coercion.ts +15 -12
  432. package/src/server/pipeline-helpers.ts +257 -12
  433. package/src/server/pipeline-interception.ts +133 -0
  434. package/src/server/pipeline-outcome.ts +103 -31
  435. package/src/server/pipeline-phases.ts +127 -237
  436. package/src/server/pipeline.ts +204 -207
  437. package/src/server/prebuilt/capture-render.ts +118 -0
  438. package/src/server/prebuilt/capture-routes.ts +104 -0
  439. package/src/server/prebuilt/capture-state.ts +155 -48
  440. package/src/server/prebuilt/lifetime.ts +151 -0
  441. package/src/server/prebuilt/slots.ts +14 -2
  442. package/src/server/prebuilt/synthetic-store.ts +3 -0
  443. package/src/server/prebuilt-builder.ts +30 -320
  444. package/src/server/prebuilt-runtime.ts +125 -129
  445. package/src/server/primitives.ts +8 -168
  446. package/src/server/react-cache-bridge.ts +124 -0
  447. package/src/server/react-cache-scope.ts +104 -0
  448. package/src/server/render-timeout.ts +20 -0
  449. package/src/server/render-utils.ts +11 -1
  450. package/src/server/request-context.ts +36 -9
  451. package/src/server/route-element-builder.ts +11 -6
  452. package/src/server/route-handler.ts +36 -23
  453. package/src/server/route-matcher.ts +15 -1
  454. package/src/server/rsc-entry/action-middleware-runner.ts +79 -123
  455. package/src/server/rsc-entry/api-handler.ts +27 -103
  456. package/src/server/rsc-entry/deny-fallback.ts +93 -26
  457. package/src/server/rsc-entry/error-renderer.ts +39 -91
  458. package/src/server/rsc-entry/helpers.ts +2 -4
  459. package/src/server/rsc-entry/index.ts +64 -58
  460. package/src/server/rsc-entry/render-route.ts +15 -80
  461. package/src/server/rsc-entry/render-signals.ts +108 -0
  462. package/src/server/rsc-entry/revalidate-renderer.ts +56 -57
  463. package/src/server/rsc-entry/rsc-payload.ts +28 -61
  464. package/src/server/rsc-entry/rsc-stream.ts +113 -213
  465. package/src/server/rsc-entry/ssr-bridge.ts +2 -2
  466. package/src/server/rsc-entry/ssr-renderer.ts +182 -263
  467. package/src/server/rsc-entry/wrap-action-dispatch.ts +12 -14
  468. package/src/server/signal-identity.ts +112 -0
  469. package/src/server/slot-resolver.ts +18 -18
  470. package/src/server/slot-subtree-contain.ts +2 -1
  471. package/src/server/ssr-bridge-types.ts +92 -56
  472. package/src/server/ssr-entry.ts +87 -111
  473. package/src/server/ssr-render.ts +55 -64
  474. package/src/server/ssr-wrappers.tsx +2 -2
  475. package/src/server/static-generator.ts +7 -42
  476. package/src/server/static-not-found.ts +3 -3
  477. package/src/server/stream-utils.ts +51 -0
  478. package/src/server/tracing.ts +58 -75
  479. package/src/server/types.ts +1 -1
  480. package/src/server/version-skew.ts +5 -5
  481. package/src/shared/csrf-reject.ts +15 -0
  482. package/src/shared/error-digest.ts +46 -0
  483. package/src/shared/payload-root.ts +11 -10
  484. package/src/shared/rsc-payload-path.ts +8 -1
  485. package/src/utils/write-file-atomic.ts +32 -0
  486. package/dist/_chunks/actions-jNrXdzgs.js +0 -346
  487. package/dist/_chunks/actions-jNrXdzgs.js.map +0 -1
  488. package/dist/_chunks/als-registry-C6kcfprT.js.map +0 -1
  489. package/dist/_chunks/build-manifest-DTmSGLRz.js.map +0 -1
  490. package/dist/_chunks/build-output-helper-9dqCv1pZ.js.map +0 -1
  491. package/dist/_chunks/cache-api-CUD9Ezaq.js.map +0 -1
  492. package/dist/_chunks/cli-check-G8o30ldg.js.map +0 -1
  493. package/dist/_chunks/convention-lint-5KzoMg_A.js.map +0 -1
  494. package/dist/_chunks/dev-server-BzBxgYAV.js.map +0 -1
  495. package/dist/_chunks/error-boundary-BrHmG-2X.js.map +0 -1
  496. package/dist/_chunks/fs-identity-D7vb6GdI.js.map +0 -1
  497. package/dist/_chunks/graph-cache-CP4GEmf9.js.map +0 -1
  498. package/dist/_chunks/json-lossy-check-ClNvBM_3.js.map +0 -1
  499. package/dist/_chunks/logger-k2DQ4EUf.js.map +0 -1
  500. package/dist/_chunks/navigation-context-D0TU0Jog.js.map +0 -1
  501. package/dist/_chunks/plugin-context-8idfR3UZ.js.map +0 -1
  502. package/dist/_chunks/primitives-DLAnvsrk.js.map +0 -1
  503. package/dist/_chunks/segment-context-D9_89u34.js +0 -34
  504. package/dist/_chunks/segment-context-D9_89u34.js.map +0 -1
  505. package/dist/_chunks/sizeof-lXffQ1Vr.js.map +0 -1
  506. package/dist/_chunks/ssr-data-D6T6Y3ef.js +0 -60
  507. package/dist/_chunks/ssr-data-D6T6Y3ef.js.map +0 -1
  508. package/dist/_chunks/state-FippDgxN.js.map +0 -1
  509. package/dist/_chunks/status-page-marker-CNbpUOPB.js.map +0 -1
  510. package/dist/client/types.d.ts +0 -14
  511. package/dist/client/types.d.ts.map +0 -1
  512. package/dist/plugins/adapter-build.d.ts +0 -38
  513. package/dist/plugins/adapter-build.d.ts.map +0 -1
  514. package/dist/server/asset-headers.d.ts +0 -32
  515. package/dist/server/asset-headers.d.ts.map +0 -1
  516. package/dist/server/dev-source-map.d.ts +0 -22
  517. package/dist/server/dev-source-map.d.ts.map +0 -1
  518. package/src/client/types.ts +0 -21
  519. package/src/server/asset-headers.ts +0 -59
  520. package/src/server/dev-source-map.ts +0 -31
@@ -1,57 +1,101 @@
1
1
  /**
2
- * Build-time capture state — the channel between the post-build capture
3
- * pass (server/prebuilt-builder.ts) and the `__prebuilt` wrapper
4
- * (server/prebuilt-runtime.ts).
2
+ * Capture state — the channel between a payload capture and the
3
+ * `__prebuilt` wrappers that render inside it (server/prebuilt-runtime.ts).
5
4
  *
6
- * During capture, a wrapped component's subtree may render OTHER wrapped
7
- * components. With no payload source registered (the capture pass runs
8
- * before artifacts exist), those inner wrappers render live and their
9
- * output is baked flat into the outer entry — the nesting clamp of
10
- * design/45-cache-lifetimes.md §Nesting Semantics (TIM-1136). The capture
11
- * pass is the designated detection point for that clamp, so the wrapper
12
- * reports every render that happens while a capture is active:
5
+ * Two callers capture a wrapped component's flight payload:
13
6
  *
14
- * - **Cycle**: the inner wrapper IS the component being captured (directly
15
- * or transitively — the transitive case still renders the outer's own
16
- * wrapper, so the identity check catches both). Left alone this recurses
7
+ * - **Build time**: the post-build capture pass (server/prebuilt-builder.ts)
8
+ * renders each registry entry in turn.
9
+ * - **Request time**: `captureComponentPayload()` in prebuilt-runtime.ts
10
+ * renders a component in isolation for an inline re-render (full miss,
11
+ * stale entry, tombstone) or an SWR background re-render. These run
12
+ * concurrently with other requests' renders — and with each other.
13
+ *
14
+ * During a capture, the component's subtree may render OTHER wrapped
15
+ * components. Those inner wrappers render live and their output is baked
16
+ * flat into the outer entry — the nesting clamp of
17
+ * design/45-cache-lifetimes.md §Nesting Semantics (TIM-1136). The wrapper
18
+ * reports every render that happens inside a capture:
19
+ *
20
+ * - **Cycle**: the inner render IS the entry being captured — same
21
+ * component id AND same props key (TIM-1547). Left alone this recurses
17
22
  * until the render times out; instead the wrapper throws
18
23
  * `PrebuiltCaptureCycleError`, failing that entry with an error naming
19
- * the cycle while the build continues (doc 44 skip-and-report policy).
20
- * - **Nesting**: any other wrapper render is recorded as an (outer, inner)
21
- * pair. The builder warns after the entry completes when the inner
22
- * declares a refresh channel the outer cannot honor (doc 45 clamp rule).
24
+ * the cycle (build continues per doc 44 skip-and-report policy; at
25
+ * request time the re-render fails and is not cached, and the wrapper
26
+ * falls back as for any failed re-render). A component that renders
27
+ * itself with different props (a comment thread, a tree) is legitimate
28
+ * recursion with a base case and bakes flat like any other nesting.
29
+ * - **Nesting**: any other wrapper render is recorded per inner component
30
+ * with the tags it resolved to. Both capture callers run the clamp rule
31
+ * over those records when the entry completes (prebuilt/lifetime.ts).
32
+ *
33
+ * Identity is the capture ROOT only. A wrapper cannot see the wrappers
34
+ * between it and the root: Flight renders a component's children after
35
+ * the wrapper has returned, in Flight's own async context, not in a frame
36
+ * the wrapper could enter. So a same-key cycle that closes below the root
37
+ * (`A(p1) → A(p2) → A(p2) → …`) is not detected here; it is also an
38
+ * infinite recursion without caching, and the capture's render timeout
39
+ * fails it.
23
40
  *
24
- * Captures run strictly sequentially (one entry at a time), so a single
25
- * module-level slot is sufficient — there is never a second active capture
26
- * to confuse renders between. At request time `active` is null and
27
- * `noteWrapperRender` is a single null-check.
41
+ * The props key is the props half of the cache key (data props only,
42
+ * framework children outlet stripped — the same inputs the cache key
43
+ * hashes). The params half is left out: every render inside one capture
44
+ * reads the same segment params, so props decide identity. Unkeyable props
45
+ * (live React elements, …) cannot be proven identical and are never a
46
+ * cycle.
47
+ *
48
+ * Each capture's state lives in an AsyncLocalStorage store entered by
49
+ * `CaptureScope.run()`, so it is visible only to renders started inside
50
+ * that capture — including work Flight resumes after an await, which runs
51
+ * in the context the awaited promise was created in. A concurrent request
52
+ * rendering the same component is not a cycle, and a concurrent request
53
+ * rendering a different cached component still revives it from cache
54
+ * instead of baking it live (TIM-1536). Outside any capture
55
+ * `noteWrapperRender` is a single store lookup.
28
56
  */
29
57
  import type { PrebuiltComponentOptions } from '../prebuilt-runtime.ts';
30
58
  /** A wrapped component that rendered inside an active capture. */
31
59
  export interface NestedWrapperRender {
32
60
  innerId: string;
33
61
  options: PrebuiltComponentOptions;
62
+ /**
63
+ * Every tag the inner resolved to across its renders in this capture;
64
+ * null when its tags function threw (the tags are unknown).
65
+ */
66
+ tags: string[] | null;
34
67
  }
35
- /** Thrown by the wrapper when a capture renders its own component. */
68
+ /** Per-inner record kept while the capture runs. */
69
+ export interface NestedRecord {
70
+ options: PrebuiltComponentOptions;
71
+ tags: Set<string> | null;
72
+ }
73
+ /** Thrown by the wrapper when a capture renders its own entry. */
36
74
  export declare class PrebuiltCaptureCycleError extends Error {
37
75
  constructor(componentId: string);
38
76
  }
77
+ /** One capture's state, entered for the duration of its render. */
78
+ export interface CaptureScope {
79
+ /**
80
+ * Run `fn` inside this capture. Flight renders in the async context it
81
+ * was started (and pinged) from, so the render must be CREATED inside
82
+ * `run`; every wrapper it renders then sees this capture.
83
+ */
84
+ run<T>(fn: () => T): T;
85
+ /** Wrapped components that rendered inside this capture so far. */
86
+ nestedRenders(): NestedWrapperRender[];
87
+ }
39
88
  /**
40
- * Mark a capture as active. The builder calls this immediately before
41
- * rendering an entry and MUST pair it with `endCapture()` in a finally.
42
- */
43
- export declare function beginCapture(outerId: string): void;
44
- /**
45
- * End the active capture and return the wrapped components that rendered
46
- * inside it (first options object wins per inner ID).
89
+ * Open a capture of component `outerId` rendered with `props`. Its state
90
+ * ends with the scope object.
47
91
  */
48
- export declare function endCapture(): NestedWrapperRender[];
49
- /** Whether a build-time capture is currently rendering. */
92
+ export declare function createCaptureScope(outerId: string, options: PrebuiltComponentOptions, props: Record<string, unknown>): CaptureScope;
93
+ /** Whether the current render is inside a capture. */
50
94
  export declare function isCaptureActive(): boolean;
51
95
  /**
52
- * Called by the `__prebuilt` wrapper on every render. No-op unless a
53
- * capture is active. Throws `PrebuiltCaptureCycleError` when the wrapper
54
- * belongs to the component currently being captured.
96
+ * Called by the `__prebuilt` wrapper on every render. No-op outside a
97
+ * capture. Throws `PrebuiltCaptureCycleError` when the render is the
98
+ * entry the enclosing capture is producing.
55
99
  */
56
- export declare function noteWrapperRender(innerId: string, options: PrebuiltComponentOptions): void;
100
+ export declare function noteWrapperRender(innerId: string, options: PrebuiltComponentOptions, props: Record<string, unknown>): void;
57
101
  //# sourceMappingURL=capture-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capture-state.d.ts","sourceRoot":"","sources":["../../../src/server/prebuilt/capture-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED,sEAAsE;AACtE,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,YAAY,WAAW,EAAE,MAAM,EAO9B;CACF;AAID;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,mBAAmB,EAAE,CAKlD;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAQ1F"}
1
+ {"version":3,"file":"capture-state.d.ts","sourceRoot":"","sources":["../../../src/server/prebuilt/capture-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAOH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAKvE,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,wBAAwB,CAAC;IAClC;;;OAGG;IACH,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CACvB;AAED,oDAAoD;AACpD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,wBAAwB,CAAC;IAClC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1B;AAED,kEAAkE;AAClE,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,YAAY,WAAW,EAAE,MAAM,EAO9B;CACF;AAED,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IACvB,mEAAmE;IACnE,aAAa,IAAI,mBAAmB,EAAE,CAAC;CACxC;AAoBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,YAAY,CAed;AAED,sDAAsD;AACtD,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,IAAI,CA8BN"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Lifetime declarations of a `cache.component` — `prerender`, `ttl`,
3
+ * `tags` (design/45-cache-lifetimes.md) — and the nesting clamp between
4
+ * two of them (§Nesting Semantics, TIM-1136).
5
+ *
6
+ * The clamp rule lives here once, for both places a capture can embed one
7
+ * wrapped component in another: the post-build capture pass
8
+ * (server/prebuilt-builder.ts) and request-time re-renders
9
+ * (`captureComponentPayload()` in server/prebuilt-runtime.ts, TIM-1545).
10
+ */
11
+ import type { NestedWrapperRender } from './capture-state.ts';
12
+ import type { PrebuiltComponentOptions } from '../prebuilt-runtime.ts';
13
+ /** Whether the component has a runtime lifetime (ttl or tags). */
14
+ export declare function hasRuntimeLifetime(options: PrebuiltComponentOptions): boolean;
15
+ /**
16
+ * Resolve tags from options (may be static array or function of props).
17
+ * Function-form tags receive DATA props only — slot props are excluded so
18
+ * the tags fn never sees SlotOutlet placeholders (capture paths pass
19
+ * placeholder-substituted props) and tags stay deterministic per key.
20
+ */
21
+ export declare function resolveTags(options: PrebuiltComponentOptions, props: Record<string, unknown>): string[];
22
+ /** The entry a capture is producing: its declaration and resolved tags. */
23
+ export interface CapturedLifetime {
24
+ id: string;
25
+ options: PrebuiltComponentOptions;
26
+ tags: readonly string[];
27
+ }
28
+ /**
29
+ * Warn for each wrapped component embedded in `outer`'s captured payload
30
+ * whose refresh channels the outer cannot honor. Once per (outer, inner)
31
+ * pair for the lifetime of `warnedPairs` — the builder passes one per
32
+ * build, the runtime one per process, since re-renders repeat. The key is
33
+ * the pair alone, not the reason: resolved tags vary with props, and a key
34
+ * that included them would grow with the data. So the first clamp found
35
+ * for a pair is the one reported. Returns the number of warnings emitted.
36
+ */
37
+ export declare function warnNestingClamps(outer: CapturedLifetime, nested: readonly NestedWrapperRender[], warnedPairs: Set<string>, log: (message: string) => void): number;
38
+ //# sourceMappingURL=lifetime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifetime.d.ts","sourceRoot":"","sources":["../../../src/server/prebuilt/lifetime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,EAAE,CASV;AAID,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,wBAAwB,CAAC;IAClC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACzB;AAmDD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,SAAS,mBAAmB,EAAE,EACtC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EACxB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAC7B,MAAM,CAsCR"}
@@ -46,6 +46,13 @@ export declare const LAYOUT_CHILDREN_SLOT = "\0timber:children";
46
46
  * abort the request (codex P2 on PR #890).
47
47
  */
48
48
  export declare function isChildrenSlotOutletElement(value: unknown): boolean;
49
+ /**
50
+ * `props` without the framework-injected children outlet — the key props
51
+ * of a render. The outlet is the same client reference on every request,
52
+ * so it never varies the cache key; user-provided children stay (and
53
+ * leave the props unkeyable). See design/45 §Layout Propagation, TIM-1181.
54
+ */
55
+ export declare function withoutChildrenOutlet(props: Record<string, unknown>): Record<string, unknown>;
49
56
  /**
50
57
  * Outcome of validating a `slots` declaration at registration time.
51
58
  *
@@ -1 +1 @@
1
- {"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../../src/server/prebuilt/slots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CASnE;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI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YAAY,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAU3C;CACF;AAED,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,oEAAoE;IACpE,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAC3B,oBAAoB,CAsCtB"}
1
+ {"version":3,"file":"synthetic-store.d.ts","sourceRoot":"","sources":["../../../src/server/prebuilt/synthetic-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,8DAA8D;IAC9D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,YAAY,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAU3C;CACF;AAED,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,oEAAoE;IACpE,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAC3B,oBAAoB,CAyCtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"prebuilt-builder.d.ts","sourceRoot":"","sources":["../../src/server/prebuilt-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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UAAU,YAAY;IACpB,wBAAwB,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnF,sBAAsB,EAAE,CACtB,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;KAAE,KAC/C,cAAc,CAAC,UAAU,CAAC,CAAC;CACjC;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CAEvD;AA4YD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,eAAe,EAClD,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,CAAC,EACZ,OAAO,GAAE,wBAA6B,GACrC,CAAC,CAoEH;AAED,qDAAqD;AACrD,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAEpF;AAED,qEAAqE;AACrE,wBAAgB,mBAAmB,IAAI,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAE/E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,eAAe,EACrD,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,CAAC,EACZ,OAAO,GAAE,wBAA6B,GACrC,CAAC,CAmCH"}
@@ -1,4 +1,5 @@
1
1
  import type { JsonSerializable } from './types.ts';
2
+ import { DENY_BRAND, REDIRECT_BRAND } from './signal-identity.ts';
2
3
  /**
3
4
  * Check if a value is JSON-serializable without data loss.
4
5
  * Returns a description of the first non-serializable value found, or null if OK.
@@ -6,27 +7,11 @@ import type { JsonSerializable } from './types.ts';
6
7
  * @internal Exported for testing only.
7
8
  */
8
9
  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;
25
10
  /**
26
11
  * Render-phase signal thrown by `deny()`. Caught by the framework to produce
27
12
  * the correct HTTP status code (segment context) or graceful degradation (slot context).
28
13
  *
29
- * Detect with `isDenySignal()`, never `instanceof` — see "Signal branding" above.
14
+ * Detect with `isDenySignal()`, never `instanceof` — see "Signal branding" in signal-identity.ts.
30
15
  */
31
16
  export declare class DenySignal extends Error {
32
17
  readonly [DENY_BRAND] = true;
@@ -89,9 +74,9 @@ export interface DenyOptions {
89
74
  * deny(404, { dangerouslyPassData: { resourceId: params.id } }) // explicit client opt-in
90
75
  * ```
91
76
  *
92
- * Accepts any 4xx or 5xx status code. This replaces the need for
93
- * `throw new RenderError(...)` in user code — RenderError is now an
94
- * internal pipeline detail.
77
+ * Accepts any 4xx or 5xx status code — it is also how a page renders a 5xx
78
+ * status file with data. An unplanned throw needs no primitive: it renders
79
+ * the error page with a 500.
95
80
  *
96
81
  * @param status - HTTP status code (4xx or 5xx). Default: 403.
97
82
  * @param options - Optional message and/or data to pass to the client.
@@ -102,7 +87,7 @@ export { RedirectType } from '../shared/redirect-type.ts';
102
87
  * Render-phase signal thrown by `redirect()` and `redirectExternal()`.
103
88
  * Caught by the framework to produce a 3xx response or client-side navigation.
104
89
  *
105
- * Detect with `isRedirectSignal()`, never `instanceof` — see "Signal branding" above.
90
+ * Detect with `isRedirectSignal()`, never `instanceof` — see "Signal branding" in signal-identity.ts.
106
91
  */
107
92
  export declare class RedirectSignal extends Error {
108
93
  readonly [REDIRECT_BRAND] = true;
@@ -110,14 +95,6 @@ export declare class RedirectSignal extends Error {
110
95
  readonly status: number;
111
96
  constructor(location: string, status: number);
112
97
  }
113
- /**
114
- * Returns true if the error is a framework control-flow signal (RedirectSignal
115
- * or DenySignal) rather than a genuine application error. Works both for direct
116
- * instances (RSC-side) and deserialized digest errors (SSR cross-boundary).
117
- *
118
- * See also: isFrameworkSignalError() in client/browser-dev.ts (client-only).
119
- */
120
- export declare function isControlFlowSignal(error: unknown): boolean;
121
98
  /**
122
99
  * Options for redirect() — alternative to passing a bare status code.
123
100
  */
@@ -172,39 +149,6 @@ export declare function redirect(path: string, statusOrOptions?: number | Redire
172
149
  * @param status - HTTP redirect status code (3xx). Defaults to 302.
173
150
  */
174
151
  export declare function redirectExternal(url: string, allowList: string[], status?: number): never;
175
- /**
176
- * Typed digest that crosses the RSC → client boundary.
177
- * The `code` identifies the error class; `data` carries JSON-serializable context.
178
- */
179
- export interface RenderErrorDigest<TCode extends string = string, TData extends JsonSerializable = JsonSerializable> {
180
- code: TCode;
181
- data: TData;
182
- }
183
- /**
184
- * Typed throw for render-phase errors that carry structured context to error boundaries.
185
- *
186
- * The `digest` (code + data) is serialized into the RSC stream separately from the
187
- * Error instance — only the digest crosses the RSC → client boundary.
188
- *
189
- * @example
190
- * ```ts
191
- * throw new RenderError('PRODUCT_NOT_FOUND', {
192
- * title: 'Product not found',
193
- * resourceId: params.id,
194
- * })
195
- * ```
196
- *
197
- * Detect with `isRenderError()`, never `instanceof` — see "Signal branding" above.
198
- */
199
- export declare class RenderError<TCode extends string = string, TData extends JsonSerializable = JsonSerializable> extends Error {
200
- readonly [RENDER_ERROR_BRAND] = true;
201
- readonly code: TCode;
202
- readonly digest: RenderErrorDigest<TCode, TData>;
203
- readonly status: number;
204
- constructor(code: TCode, data: TData, options?: {
205
- status?: number;
206
- });
207
- }
208
152
  /**
209
153
  * Register a promise to be kept alive after the response is sent.
210
154
  * Maps to `ctx.waitUntil()` on Cloudflare Workers and similar platforms.
@@ -222,23 +166,4 @@ export declare function waitUntil(promise: Promise<unknown>): void;
222
166
  * @internal
223
167
  */
224
168
  export declare function _resetWaitUntilWarning(): void;
225
- /**
226
- * Error thrown when SSR's renderToReadableStream fails due to an error
227
- * in the decoded RSC stream (e.g., uncontained slot errors).
228
- *
229
- * The RSC entry checks for this error type in its catch block to avoid
230
- * re-executing server components via renderDenyPage. Instead, it renders
231
- * a bare deny/error page without layout wrapping.
232
- *
233
- * Defined in primitives.ts (not ssr-entry.ts) because ssr-entry.ts imports
234
- * react-dom/server which cannot be loaded in the RSC environment.
235
- *
236
- * Detect with `isSsrStreamError()` — it is thrown in the SSR environment and
237
- * caught in RSC, so `instanceof` never matches. See "Signal branding" above.
238
- */
239
- export declare class SsrStreamError extends Error {
240
- readonly [SSR_STREAM_ERROR_BRAND] = true;
241
- readonly cause: unknown;
242
- constructor(message: string, cause: unknown);
243
- }
244
169
  //# sourceMappingURL=primitives.d.ts.map
@@ -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;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,CA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@@ -0,0 +1,59 @@
1
+ /**
2
+ * React.cache bridge — one `React.cache` scope per request, shared by
3
+ * `proxy.ts`, `middleware.ts`, route handlers, and the render.
4
+ *
5
+ * `React.cache(fn)` stores its memo table in whatever Map
6
+ * `ReactSharedInternals.A.getCacheForType()` returns. `A` is Flight's
7
+ * `DefaultAsyncDispatcher`, whose `getCacheForType` returns the active Flight
8
+ * request's `cache` Map, or a throwaway `new Map()` outside a render. So
9
+ * without this bridge a `React.cache` call in middleware silently never
10
+ * dedupes with the same call in `access.ts` or a layout.
11
+ *
12
+ * The bridge wraps that one method on the existing dispatcher object:
13
+ *
14
+ * - When a timber scope is active (`reactCacheScopeAls`), it returns the
15
+ * scope's Map — inside or outside a Flight render.
16
+ * - Otherwise it calls Flight's original method, so behaviour outside a
17
+ * request (build-time capture, tests, isolated renders) is unchanged.
18
+ *
19
+ * Opening, resuming, and leaving scopes lives in `react-cache-scope.ts`,
20
+ * which does not import `react` so request-context and cookie code can use it.
21
+ *
22
+ * Constraints (TIM-1529, design/spike-TIM-1529-react-cache-bridge.md):
23
+ *
24
+ * - Never reassign `ReactSharedInternals.A`. Flight's `Request` constructor
25
+ * throws "Currently React only supports one RSC renderer at a time" when
26
+ * `A` is set to anything but its own dispatcher.
27
+ * - Never shim the `react` module's `cache` export and never patch the
28
+ * vendored Flight bundle.
29
+ * - Flight installs `A` lazily, in the `Request` constructor, so it is
30
+ * `null` until the first render. `installReactCacheBridge` takes a
31
+ * `warmUp` callback that constructs one throwaway render to install it.
32
+ * - Idempotent: a program reload that re-evaluates this module but not
33
+ * Flight finds the brand on the live method and does not wrap it twice.
34
+ * A reload that re-evaluates Flight too hands back a fresh dispatcher,
35
+ * which the re-evaluated RSC entry patches again. The wrapper closes over
36
+ * nothing but the `globalThis`-anchored ALS, so an old wrapper that
37
+ * survives a reload still reads the current scope.
38
+ */
39
+ /** Result of `installReactCacheBridge`, for the boot log and the canary test. */
40
+ export type ReactCacheBridgeStatus = {
41
+ installed: true;
42
+ alreadyBridged: boolean;
43
+ } | {
44
+ installed: false;
45
+ reason: string;
46
+ };
47
+ /**
48
+ * Patch Flight's dispatcher so `React.cache` resolves the active timber
49
+ * scope. Call once from the RSC entry, after the Flight server has loaded.
50
+ *
51
+ * `warmUp` must construct a Flight render (e.g. `renderToReadableStream(null)`
52
+ * and cancel it) — that is the only public way to make Flight install `A`.
53
+ *
54
+ * Never throws: if React's internals change shape the bridge is skipped,
55
+ * `React.cache` keeps its stock per-render behaviour, and the reason is
56
+ * returned. `tests/react-cache-bridge.test.ts` fails CI on that path.
57
+ */
58
+ export declare function installReactCacheBridge(warmUp: () => void): ReactCacheBridgeStatus;
59
+ //# sourceMappingURL=react-cache-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-cache-bridge.d.ts","sourceRoot":"","sources":["../../src/server/react-cache-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AA+BH,iFAAiF;AACjF,MAAM,MAAM,sBAAsB,GAC9B;IAAE,SAAS,EAAE,IAAI,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,GAC5C;IAAE,SAAS,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,sBAAsB,CAuClF"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * React.cache scopes — opening, resuming, and leaving the per-request
3
+ * `React.cache` scope that `react-cache-bridge.ts` makes Flight read.
4
+ *
5
+ * Kept apart from the bridge so request-context and cookie code can use
6
+ * it without importing `react`. See design/spike-TIM-1529-react-cache-bridge.md.
7
+ */
8
+ import { type ReactCacheScope } from './als-registry.ts';
9
+ export type { ReactCacheScope };
10
+ /** A new, empty `React.cache` scope. */
11
+ export declare function createReactCacheScope(): ReactCacheScope;
12
+ /**
13
+ * Run `fn` in a `React.cache` scope — a fresh one unless `scope` is given.
14
+ * Every `React.cache` call made from `fn` — synchronously, in its async
15
+ * continuations, and in any Flight render it starts — shares one memo table.
16
+ *
17
+ * Opened by `runWithRequestContext`, so each request context gets its own
18
+ * scope. Pass `scope` to resume one across two ALS runs: the post-action
19
+ * revalidation opens a fresh scope for the target route's middleware and
20
+ * renders the revalidated tree in that same scope later.
21
+ */
22
+ export declare function runWithReactCacheScope<T>(fn: () => T, scope?: ReactCacheScope): T;
23
+ /**
24
+ * Run `fn` with no timber scope, so `React.cache` behaves as stock React:
25
+ * no dedupe outside a render, Flight's own per-render cache inside one.
26
+ *
27
+ * Used for server action bodies — an action reads, writes cookies, and
28
+ * mutates, so memoized reads would go stale mid-action (the same choice
29
+ * Next.js makes) — and for renders whose output outlives the request
30
+ * (`cache.component` capture), which must not bake request-memoized values
31
+ * into a cross-request cache entry.
32
+ */
33
+ export declare function runOutsideReactCacheScope<T>(fn: () => T): T;
34
+ /** Stands for "every cookie" — a getAll()/size read, or a clear() write. */
35
+ export declare const ANY_COOKIE = "*";
36
+ /**
37
+ * Dev-only: record that cookie `name` (or {@link ANY_COOKIE}) was read
38
+ * while `React.cache` held values in this request — the read may have
39
+ * happened inside a cached function.
40
+ */
41
+ export declare function noteCookieReadForReactCache(name: string): void;
42
+ /**
43
+ * Dev-only: warn (once per request) when a cookie recorded by
44
+ * {@link noteCookieReadForReactCache} is written. `name` is the written
45
+ * cookie, or {@link ANY_COOKIE} for `clear()`. Dev-only because reads are
46
+ * only recorded in dev.
47
+ */
48
+ export declare function warnIfCachedCookieIsWritten(name: string): void;
49
+ //# sourceMappingURL=react-cache-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-cache-scope.d.ts","sourceRoot":"","sources":["../../src/server/react-cache-scope.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAG7E,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,wCAAwC;AACxC,wBAAgB,qBAAqB,IAAI,eAAe,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,EAAE,EAAE,MAAM,CAAC,EACX,KAAK,GAAE,eAAyC,GAC/C,CAAC,CAEH;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAE3D;AAaD,4EAA4E;AAC5E,eAAO,MAAM,UAAU,MAAM,CAAC;AAK9B;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAU9D;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAc9D"}
@@ -7,6 +7,21 @@
7
7
  *
8
8
  * Design doc: 02-rendering-pipeline.md §"Streaming Constraints"
9
9
  */
10
+ /** `renderTimeoutMs` when timber.config.ts leaves it unset. */
11
+ export declare const DEFAULT_RENDER_TIMEOUT_MS = 30000;
12
+ /**
13
+ * What `renderTimeoutMs: 0` means: a safety ceiling, never "no timeout" —
14
+ * an unbounded render or singleflight wait can hang a connection or
15
+ * deadlock a cache key forever.
16
+ */
17
+ export declare const RENDER_TIMEOUT_CEILING_MS = 120000;
18
+ /**
19
+ * The one mapping from configured `renderTimeoutMs` to the timeout every
20
+ * consumer enforces. Config enters the runtime already resolved (the
21
+ * runtime config module, static generation's options), so readers never
22
+ * see 0 or undefined.
23
+ */
24
+ export declare function resolveRenderTimeoutMs(configured: number | undefined): number;
10
25
  /**
11
26
  * Error thrown when an SSR render or RSC stream read exceeds the
12
27
  * configured timeout. Callers can check `instanceof RenderTimeoutError`
@@ -1 +1 @@
1
- {"version":3,"file":"render-timeout.d.ts","sourceRoot":"","sources":["../../src/server/render-timeout.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,qBAAa,kBAAm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AAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,WAAW,GAAG,aAAa,CA+BhG;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,CAAC,CAAC,CAWZ"}
@@ -5,6 +5,15 @@
5
5
  * Consolidated from duplicated copies in node-stream-transforms.ts,
6
6
  * ssr-render.ts, and rsc-entry/helpers.ts. See TIM-1071 item 1.
7
7
  */
8
+ /**
9
+ * The ` nonce="…"` attribute fragment for a timber-generated `<script>` tag,
10
+ * or `''` when the request has no nonce. Callers interpolate it directly
11
+ * after the tag name: `` `<script${nonceAttr(nonce)}>` ``.
12
+ *
13
+ * The value comes from `generateNonce` in csp-nonce.ts and is base64, so no attribute
14
+ * escaping is required.
15
+ */
16
+ export declare function nonceAttr(nonce: string | undefined): string;
8
17
  /**
9
18
  * Check if an error is an abort error (connection closed by client).
10
19
  *
@@ -1 +1 @@
1
- {"version":3,"file":"render-utils.d.ts","sourceRoot":"","sources":["../../src/server/render-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAIpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpD"}
1
+ {"version":3,"file":"render-utils.d.ts","sourceRoot":"","sources":["../../src/server/render-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE3D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAIpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpD"}
@@ -16,6 +16,7 @@
16
16
  import type { CoercedParams } from '../shared/param-value.ts';
17
17
  import { requestContextAls } from './als-registry.ts';
18
18
  import { type SlotParamsRecord } from '../shared/slot-params.ts';
19
+ import { type ReactCacheScope } from './react-cache-scope.ts';
19
20
  export { requestContextAls };
20
21
  /**
21
22
  * Returns a read-only view of the current request's headers.
@@ -138,19 +139,39 @@ export declare function getRequestSearchString(): string;
138
139
  * still a Headers instance, but user code should not mutate it.
139
140
  */
140
141
  export type ReadonlyHeaders = Pick<Headers, 'get' | 'has' | 'entries' | 'keys' | 'values' | 'forEach' | typeof Symbol.iterator>;
142
+ /** Options for `runWithRequestContext()`. */
143
+ export interface RequestContextOptions {
144
+ /**
145
+ * Resume this `React.cache` scope instead of opening a fresh one. Only the
146
+ * post-action revalidation passes it.
147
+ */
148
+ reactCacheScope?: ReactCacheScope;
149
+ /**
150
+ * The request's cookies, already parsed. Re-entry callers (the no-JS form
151
+ * rerender and the revalidation middleware) pass the action's
152
+ * post-mutation cookie state here instead of round-tripping it through a
153
+ * `Cookie:` header — the same parse the H-3 smuggling primitive abused
154
+ * (TIM-868).
155
+ */
156
+ cookies?: Map<string, string>;
157
+ }
141
158
  /**
142
159
  * Run a callback within a request context. Used by the pipeline to establish
143
160
  * per-request ALS scope so that `getHeaders()` and `getCookies()` work.
144
161
  *
145
- * If the request was previously registered via `seedRequestCookies`, the
146
- * resulting context's `parsedCookies` map is initialized from the seed and
147
- * the raw `cookieHeader` is left empty — `parseCookieHeader` is never called
148
- * for that request. This is the no-JS form-rerender path. See TIM-868.
162
+ * When `options.cookies` is given, the context's `parsedCookies` map is a
163
+ * copy of it and the raw `cookieHeader` is left empty, so
164
+ * `parseCookieHeader` never runs for that request. Re-entry callers pass the
165
+ * action's post-mutation cookie state this way (TIM-868).
166
+ *
167
+ * Each request context also opens its own `React.cache` scope, shared by
168
+ * everything that runs inside it — proxy.ts, middleware.ts, route handlers,
169
+ * and the render (design/02-rendering-pipeline.md §"Cache Scoping Model").
149
170
  *
150
171
  * @param req - The incoming Request object.
151
172
  * @param fn - The function to run within the request context.
152
173
  */
153
- export declare function runWithRequestContext<T>(req: Request, fn: () => T): T;
174
+ export declare function runWithRequestContext<T>(req: Request, fn: () => T, { reactCacheScope, cookies }?: RequestContextOptions): T;
154
175
  /**
155
176
  * Enable cookie mutation for the current context. Called by the framework
156
177
  * when entering middleware.ts, server actions, or route.ts handlers.
@@ -1 +1 @@
1
- {"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../src/server/request-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAA4B,MAAM,mBAAmB,CAAC;AAIhF,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAI7B;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,eAAe,CAU5C;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,eAAe,CAUjD;AAaD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,CA2CpE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAM5D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAK9E;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,eAAe,EAAE,MAAM,GAAG,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