vinext 1.0.0-beta.1 → 1.0.0-beta.11

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 (877) hide show
  1. package/README.md +135 -27
  2. package/THIRD_PARTY_LICENSES.md +25 -0
  3. package/dist/_virtual/_rolldown/runtime.js +25 -0
  4. package/dist/build/action-owner-manifest.d.ts +41 -0
  5. package/dist/build/action-owner-manifest.js +110 -0
  6. package/dist/build/assets-ignore.d.ts +3 -4
  7. package/dist/build/clean-output.d.ts +2 -3
  8. package/dist/build/clean-output.js +1 -4
  9. package/dist/build/client-build-config.d.ts +39 -13
  10. package/dist/build/client-build-config.js +86 -12
  11. package/dist/build/css-url-assets.d.ts +4 -6
  12. package/dist/build/css-url-assets.js +5 -2
  13. package/dist/build/google-fonts/build-url.d.ts +8 -6
  14. package/dist/build/google-fonts/fallback-metrics.d.ts +3 -4
  15. package/dist/build/google-fonts/find-font-files-in-css.d.ts +2 -3
  16. package/dist/build/google-fonts/font-metadata.d.ts +9 -6
  17. package/dist/build/google-fonts/get-axes.d.ts +2 -4
  18. package/dist/build/google-fonts/sort-variants.d.ts +2 -3
  19. package/dist/build/google-fonts/validate.d.ts +2 -3
  20. package/dist/build/google-fonts/validate.js +8 -4
  21. package/dist/build/inject-pregenerated-paths.d.ts +2 -3
  22. package/dist/build/inject-pregenerated-paths.js +16 -14
  23. package/dist/build/inline-css.d.ts +3 -4
  24. package/dist/build/layout-classification-types.d.ts +4 -5
  25. package/dist/build/layout-classification.d.ts +14 -12
  26. package/dist/build/module-dependency-cache.d.ts +2 -3
  27. package/dist/build/next-client-runtime-manifests.d.ts +4 -6
  28. package/dist/build/next-client-runtime-manifests.js +2 -19
  29. package/dist/build/nitro-route-rules.d.ts +6 -8
  30. package/dist/build/pages-client-assets-module.d.ts +7 -9
  31. package/dist/build/precompress.d.ts +9 -5
  32. package/dist/build/precompress.js +42 -8
  33. package/dist/build/prerender-paths.d.ts +73 -9
  34. package/dist/build/prerender-paths.js +730 -95
  35. package/dist/build/prerender-phase.d.ts +14 -0
  36. package/dist/build/prerender-phase.js +37 -0
  37. package/dist/build/prerender-server-entry.d.ts +1 -1
  38. package/dist/build/prerender-server-entry.js +8 -2
  39. package/dist/build/prerender-server-pool.d.ts +13 -8
  40. package/dist/build/prerender-server-pool.js +9 -4
  41. package/dist/build/prerender.d.ts +63 -43
  42. package/dist/build/prerender.js +171 -53
  43. package/dist/build/preview-credentials.d.ts +5 -6
  44. package/dist/build/public-dir-conflict.d.ts +13 -0
  45. package/dist/build/public-dir-conflict.js +26 -0
  46. package/dist/build/report.d.ts +42 -21
  47. package/dist/build/report.js +75 -4
  48. package/dist/build/route-classification-injector.d.ts +2 -4
  49. package/dist/build/route-classification-manifest.d.ts +11 -10
  50. package/dist/build/run-prerender.d.ts +13 -10
  51. package/dist/build/run-prerender.js +27 -17
  52. package/dist/build/server-entry.d.ts +4 -0
  53. package/dist/build/server-entry.js +28 -0
  54. package/dist/build/server-manifest.d.ts +8 -3
  55. package/dist/build/server-manifest.js +14 -2
  56. package/dist/build/ssr-manifest.d.ts +5 -6
  57. package/dist/build/standalone.d.ts +2 -3
  58. package/dist/build/static-export.d.ts +30 -20
  59. package/dist/cache/cache-adapters-virtual.d.ts +89 -11
  60. package/dist/cache/cache-adapters-virtual.js +42 -6
  61. package/dist/check.d.ts +9 -10
  62. package/dist/check.js +91 -18
  63. package/dist/cli-args.d.ts +4 -4
  64. package/dist/cli-args.js +10 -0
  65. package/dist/cli-dev-config.d.ts +5 -7
  66. package/dist/cli.d.ts +1 -1
  67. package/dist/cli.js +45 -18
  68. package/dist/client/app-nav-failure-handler.d.ts +6 -7
  69. package/dist/client/app-nav-failure-handler.js +1 -0
  70. package/dist/client/client-rewrite-matcher.d.ts +11 -0
  71. package/dist/client/client-rewrite-matcher.js +20 -0
  72. package/dist/client/client-rewrites.d.ts +30 -0
  73. package/dist/client/client-rewrites.js +41 -0
  74. package/dist/client/dev-error-overlay-store.d.ts +13 -14
  75. package/dist/client/dev-error-overlay.d.ts +15 -16
  76. package/dist/client/dev-error-overlay.js +8 -5
  77. package/dist/client/empty-module.d.ts +1 -1
  78. package/dist/client/index.d.ts +2 -0
  79. package/dist/client/index.js +2 -0
  80. package/dist/client/instrumentation-client-inject.d.ts +3 -4
  81. package/dist/client/instrumentation-client-state.d.ts +5 -7
  82. package/dist/client/instrumentation-client.d.ts +3 -4
  83. package/dist/client/navigation-runtime.d.ts +31 -19
  84. package/dist/client/navigation-runtime.js +8 -8
  85. package/dist/client/pages-router-link-navigation.d.ts +4 -23
  86. package/dist/client/react-instance-bootstrap.d.ts +1 -0
  87. package/dist/client/react-instance-bootstrap.js +7 -0
  88. package/dist/client/react-instance.d.ts +12 -0
  89. package/dist/client/react-instance.js +20 -0
  90. package/dist/client/validate-module-path.d.ts +2 -3
  91. package/dist/client/vinext-next-data.d.ts +20 -14
  92. package/dist/client/window-next.d.ts +9 -7
  93. package/dist/config/config-matchers.d.ts +27 -53
  94. package/dist/config/config-matchers.js +49 -132
  95. package/dist/config/dotenv.d.ts +5 -11
  96. package/dist/config/dotenv.js +32 -23
  97. package/dist/config/next-config.d.ts +148 -73
  98. package/dist/config/next-config.js +195 -19
  99. package/dist/config/prerender.d.ts +16 -17
  100. package/dist/config/prerender.js +2 -2
  101. package/dist/config/request-context.d.ts +13 -0
  102. package/dist/config/request-context.js +26 -0
  103. package/dist/config/server-external-packages.d.ts +14 -3
  104. package/dist/config/server-external-packages.js +37 -3
  105. package/dist/config/tsconfig-paths.d.ts +3 -4
  106. package/dist/deps/.pnpm/ignore@5.3.2/deps/ignore/index.js +189 -0
  107. package/dist/deps/.pnpm/image-size@2.0.2/deps/image-size/dist/index.js +808 -0
  108. package/dist/deps/.pnpm/ua-parser-js@1.0.35/deps/ua-parser-js/src/ua-parser.js +1057 -0
  109. package/dist/entries/app-browser-entry.d.ts +7 -15
  110. package/dist/entries/app-browser-entry.js +30 -8
  111. package/dist/entries/app-rsc-entry.d.ts +42 -20
  112. package/dist/entries/app-rsc-entry.js +621 -56
  113. package/dist/entries/app-rsc-manifest.d.ts +4 -4
  114. package/dist/entries/app-rsc-manifest.js +49 -4
  115. package/dist/entries/app-ssr-entry.d.ts +2 -3
  116. package/dist/entries/app-ssr-entry.js +8 -1
  117. package/dist/entries/pages-client-entry.d.ts +3 -5
  118. package/dist/entries/pages-client-entry.js +15 -6
  119. package/dist/entries/pages-server-entry.d.ts +14 -5
  120. package/dist/entries/pages-server-entry.js +272 -41
  121. package/dist/entries/runtime-entry-module.d.ts +4 -5
  122. package/dist/image/image-adapters-virtual.d.ts +8 -7
  123. package/dist/index.d.ts +7 -4
  124. package/dist/index.js +1039 -363
  125. package/dist/init-cloudflare.d.ts +19 -15
  126. package/dist/init-cloudflare.js +415 -58
  127. package/dist/init-platform.d.ts +24 -23
  128. package/dist/init-platform.js +70 -23
  129. package/dist/init.d.ts +52 -29
  130. package/dist/init.js +32 -25
  131. package/dist/plugins/action-owner-manifest.d.ts +13 -0
  132. package/dist/plugins/action-owner-manifest.js +91 -0
  133. package/dist/plugins/ast-scope.d.ts +10 -12
  134. package/dist/plugins/ast-scope.js +10 -22
  135. package/dist/plugins/ast-utils.d.ts +37 -21
  136. package/dist/plugins/ast-utils.js +69 -38
  137. package/dist/plugins/async-hooks-stub.d.ts +2 -4
  138. package/dist/plugins/client-reference-dedup.d.ts +4 -6
  139. package/dist/plugins/client-reference-dedup.js +7 -5
  140. package/dist/plugins/css-data-url.d.ts +2 -4
  141. package/dist/plugins/css-module-imports.d.ts +4 -6
  142. package/dist/plugins/css-module-imports.js +5 -13
  143. package/dist/plugins/dynamic-preload-metadata.d.ts +3 -5
  144. package/dist/plugins/dynamic-preload-metadata.js +59 -179
  145. package/dist/plugins/environment.d.ts +10 -0
  146. package/dist/plugins/environment.js +7 -0
  147. package/dist/plugins/extensionless-dynamic-import.d.ts +2 -4
  148. package/dist/plugins/extensionless-dynamic-import.js +379 -63
  149. package/dist/plugins/fonts.d.ts +10 -12
  150. package/dist/plugins/fonts.js +11 -14
  151. package/dist/plugins/ignore-dynamic-requests.d.ts +5 -9
  152. package/dist/plugins/ignore-dynamic-requests.js +107 -140
  153. package/dist/plugins/import-meta-url.d.ts +16 -12
  154. package/dist/plugins/import-meta-url.js +337 -113
  155. package/dist/plugins/instrumentation-client.d.ts +3 -4
  156. package/dist/plugins/instrumentation-client.js +49 -14
  157. package/dist/plugins/middleware-export-validation.d.ts +3 -4
  158. package/dist/plugins/middleware-export-validation.js +5 -17
  159. package/dist/plugins/middleware-server-only.d.ts +2 -4
  160. package/dist/plugins/middleware-server-only.js +2 -2
  161. package/dist/plugins/og-asset-ownership.d.ts +3 -5
  162. package/dist/plugins/og-asset-ownership.js +18 -26
  163. package/dist/plugins/og-assets.d.ts +4 -6
  164. package/dist/plugins/og-assets.js +3 -5
  165. package/dist/plugins/optimize-imports.d.ts +7 -8
  166. package/dist/plugins/optimize-imports.js +33 -47
  167. package/dist/plugins/pages-node-externals.d.ts +22 -0
  168. package/dist/plugins/pages-node-externals.js +174 -0
  169. package/dist/plugins/postcss.d.ts +3 -4
  170. package/dist/plugins/remove-console.d.ts +2 -4
  171. package/dist/plugins/remove-console.js +2 -5
  172. package/dist/plugins/require-condition-resolution.d.ts +15 -0
  173. package/dist/plugins/require-condition-resolution.js +166 -0
  174. package/dist/plugins/require-context.d.ts +2 -4
  175. package/dist/plugins/require-context.js +163 -84
  176. package/dist/plugins/rsc-client-reference-loaders.d.ts +2 -4
  177. package/dist/plugins/rsc-client-shim-excludes.d.ts +4 -5
  178. package/dist/plugins/rsc-reference-validation-normalizer.d.ts +2 -4
  179. package/dist/plugins/sass.d.ts +34 -7
  180. package/dist/plugins/sass.js +73 -8
  181. package/dist/plugins/server-externals-manifest.d.ts +2 -4
  182. package/dist/plugins/server-externals-manifest.js +1 -23
  183. package/dist/plugins/strip-server-exports.d.ts +5 -7
  184. package/dist/plugins/strip-server-exports.js +13 -19
  185. package/dist/plugins/styled-jsx.d.ts +2 -4
  186. package/dist/plugins/styled-jsx.js +22 -24
  187. package/dist/plugins/transform-cache.d.ts +18 -0
  188. package/dist/plugins/transform-cache.js +36 -0
  189. package/dist/plugins/transform-result.d.ts +9 -0
  190. package/dist/plugins/transform-result.js +10 -0
  191. package/dist/plugins/transitive-externals.d.ts +23 -0
  192. package/dist/plugins/transitive-externals.js +107 -0
  193. package/dist/plugins/typeof-window.d.ts +11 -7
  194. package/dist/plugins/typeof-window.js +154 -37
  195. package/dist/plugins/use-cache-callable.d.ts +11 -0
  196. package/dist/plugins/use-cache-callable.js +202 -0
  197. package/dist/plugins/wasm-module-import.d.ts +2 -4
  198. package/dist/plugins/wasm-module-import.js +1 -1
  199. package/dist/plugins/worker-image-imports.d.ts +11 -0
  200. package/dist/plugins/worker-image-imports.js +134 -0
  201. package/dist/routing/app-route-graph.d.ts +135 -59
  202. package/dist/routing/app-route-graph.js +162 -24
  203. package/dist/routing/app-router.d.ts +7 -6
  204. package/dist/routing/app-router.js +17 -7
  205. package/dist/routing/file-matcher.d.ts +19 -31
  206. package/dist/routing/file-matcher.js +21 -33
  207. package/dist/routing/pages-router.d.ts +15 -11
  208. package/dist/routing/pages-router.js +23 -29
  209. package/dist/routing/route-matching.d.ts +16 -5
  210. package/dist/routing/route-matching.js +16 -2
  211. package/dist/routing/route-pattern.d.ts +19 -12
  212. package/dist/routing/route-pattern.js +33 -3
  213. package/dist/routing/route-trie.d.ts +8 -5
  214. package/dist/routing/route-trie.js +5 -2
  215. package/dist/routing/route-validation.d.ts +3 -4
  216. package/dist/routing/route-validation.js +19 -12
  217. package/dist/routing/utils.d.ts +13 -36
  218. package/dist/routing/utils.js +1 -30
  219. package/dist/server/accept-encoding.d.ts +9 -12
  220. package/dist/server/accept-encoding.js +1 -4
  221. package/dist/server/api-handler.d.ts +4 -4
  222. package/dist/server/api-handler.js +16 -12
  223. package/dist/server/app-action-forwarding.d.ts +17 -0
  224. package/dist/server/app-action-forwarding.js +140 -0
  225. package/dist/server/app-action-request.d.ts +2 -3
  226. package/dist/server/app-bfcache-id.d.ts +3 -4
  227. package/dist/server/app-bfcache-identity.d.ts +14 -16
  228. package/dist/server/app-bfcache-identity.js +27 -102
  229. package/dist/server/app-browser-action-result.d.ts +15 -17
  230. package/dist/server/app-browser-client-reuse-manifest.d.ts +2 -4
  231. package/dist/server/app-browser-entry.d.ts +1 -1
  232. package/dist/server/app-browser-entry.js +468 -139
  233. package/dist/server/app-browser-error.d.ts +5 -7
  234. package/dist/server/app-browser-error.js +2 -6
  235. package/dist/server/app-browser-history-controller.d.ts +29 -12
  236. package/dist/server/app-browser-history-controller.js +137 -20
  237. package/dist/server/app-browser-hydration.d.ts +5 -7
  238. package/dist/server/app-browser-interception-context.d.ts +3 -5
  239. package/dist/server/app-browser-mpa-navigation.d.ts +4 -6
  240. package/dist/server/app-browser-navigation-abort.d.ts +15 -0
  241. package/dist/server/app-browser-navigation-abort.js +29 -0
  242. package/dist/server/app-browser-navigation-controller.d.ts +36 -33
  243. package/dist/server/app-browser-navigation-controller.js +58 -14
  244. package/dist/server/app-browser-navigation-response.d.ts +10 -0
  245. package/dist/server/app-browser-navigation-response.js +8 -0
  246. package/dist/server/app-browser-popstate.d.ts +8 -5
  247. package/dist/server/app-browser-popstate.js +6 -2
  248. package/dist/server/app-browser-prefetch-response.d.ts +24 -0
  249. package/dist/server/app-browser-prefetch-response.js +54 -0
  250. package/dist/server/app-browser-rsc-redirect.d.ts +4 -5
  251. package/dist/server/app-browser-server-action-client.d.ts +5 -6
  252. package/dist/server/app-browser-server-action-client.js +6 -4
  253. package/dist/server/app-browser-server-action-navigation.d.ts +2 -4
  254. package/dist/server/app-browser-state.d.ts +26 -20
  255. package/dist/server/app-browser-state.js +15 -9
  256. package/dist/server/app-browser-stream.d.ts +4 -8
  257. package/dist/server/app-browser-stream.js +8 -6
  258. package/dist/server/app-browser-supplemental-refresh.d.ts +48 -0
  259. package/dist/server/app-browser-supplemental-refresh.js +190 -0
  260. package/dist/server/app-browser-visible-commit.d.ts +7 -8
  261. package/dist/server/app-browser-visible-commit.js +26 -11
  262. package/dist/server/app-client-reference-preloader.d.ts +2 -3
  263. package/dist/server/app-elements-wire-key.d.ts +25 -0
  264. package/dist/server/app-elements-wire-key.js +69 -0
  265. package/dist/server/app-elements-wire.d.ts +46 -60
  266. package/dist/server/app-elements-wire.js +43 -80
  267. package/dist/server/app-elements.d.ts +6 -7
  268. package/dist/server/app-elements.js +2 -2
  269. package/dist/server/app-fallback-renderer.d.ts +15 -8
  270. package/dist/server/app-fallback-renderer.js +12 -9
  271. package/dist/server/app-fetch-tracing.d.ts +15 -0
  272. package/dist/server/app-fetch-tracing.js +38 -0
  273. package/dist/server/app-history-state.d.ts +37 -17
  274. package/dist/server/app-history-state.js +110 -18
  275. package/dist/server/app-hook-warning-suppression.d.ts +2 -4
  276. package/dist/server/app-hydration-cache-publication.d.ts +3 -4
  277. package/dist/server/app-inline-css-client.d.ts +3 -4
  278. package/dist/server/app-interception-context-header.d.ts +2 -3
  279. package/dist/server/app-layout-param-observation.d.ts +7 -9
  280. package/dist/server/app-layout-param-observation.js +1 -1
  281. package/dist/server/app-metadata-tracing.d.ts +12 -0
  282. package/dist/server/app-metadata-tracing.js +17 -0
  283. package/dist/server/app-middleware.d.ts +20 -8
  284. package/dist/server/app-middleware.js +125 -34
  285. package/dist/server/app-mounted-slots-header.d.ts +2 -3
  286. package/dist/server/app-mounted-slots-header.js +2 -2
  287. package/dist/server/app-optimistic-routing.d.ts +35 -9
  288. package/dist/server/app-optimistic-routing.js +151 -13
  289. package/dist/server/app-page-boundary-render.d.ts +24 -9
  290. package/dist/server/app-page-boundary-render.js +98 -13
  291. package/dist/server/app-page-boundary.d.ts +9 -10
  292. package/dist/server/app-page-boundary.js +2 -1
  293. package/dist/server/app-page-cache-finalizer.d.ts +27 -9
  294. package/dist/server/app-page-cache-finalizer.js +129 -24
  295. package/dist/server/app-page-cache-render.d.ts +9 -7
  296. package/dist/server/app-page-cache-render.js +24 -5
  297. package/dist/server/app-page-cache.d.ts +12 -12
  298. package/dist/server/app-page-cache.js +55 -20
  299. package/dist/server/app-page-dispatch.d.ts +49 -20
  300. package/dist/server/app-page-dispatch.js +140 -60
  301. package/dist/server/app-page-element-builder.d.ts +77 -26
  302. package/dist/server/app-page-element-builder.js +326 -110
  303. package/dist/server/app-page-execution.d.ts +26 -19
  304. package/dist/server/app-page-execution.js +32 -15
  305. package/dist/server/app-page-head.d.ts +68 -13
  306. package/dist/server/app-page-head.js +235 -91
  307. package/dist/server/app-page-http-access-fallback-metadata.d.ts +30 -0
  308. package/dist/server/app-page-http-access-fallback-metadata.js +121 -0
  309. package/dist/server/app-page-method.d.ts +3 -4
  310. package/dist/server/app-page-params.d.ts +5 -7
  311. package/dist/server/app-page-ppr-runtime.d.ts +2 -3
  312. package/dist/server/app-page-ppr-runtime.js +3 -2
  313. package/dist/server/app-page-probe.d.ts +13 -9
  314. package/dist/server/app-page-probe.js +9 -4
  315. package/dist/server/app-page-render-identity.d.ts +5 -5
  316. package/dist/server/app-page-render-observation.d.ts +8 -10
  317. package/dist/server/app-page-render-observation.js +1 -1
  318. package/dist/server/app-page-render.d.ts +33 -13
  319. package/dist/server/app-page-render.js +171 -34
  320. package/dist/server/app-page-request.d.ts +27 -43
  321. package/dist/server/app-page-request.js +118 -64
  322. package/dist/server/app-page-response.d.ts +22 -10
  323. package/dist/server/app-page-response.js +25 -13
  324. package/dist/server/app-page-route-wiring.d.ts +58 -18
  325. package/dist/server/app-page-route-wiring.js +420 -103
  326. package/dist/server/app-page-search-params-observation.d.ts +3 -5
  327. package/dist/server/app-page-segment-plan.d.ts +55 -0
  328. package/dist/server/app-page-segment-plan.js +177 -0
  329. package/dist/server/app-page-segment-state.d.ts +23 -8
  330. package/dist/server/app-page-segment-state.js +35 -10
  331. package/dist/server/app-page-stream.d.ts +54 -21
  332. package/dist/server/app-page-stream.js +44 -9
  333. package/dist/server/app-page-tracing.d.ts +33 -0
  334. package/dist/server/app-page-tracing.js +49 -0
  335. package/dist/server/app-pages-bridge.d.ts +7 -7
  336. package/dist/server/app-pages-bridge.js +33 -5
  337. package/dist/server/app-post-middleware-context.d.ts +3 -5
  338. package/dist/server/app-post-middleware-context.js +1 -1
  339. package/dist/server/app-ppr-fallback-shell-render.d.ts +3 -5
  340. package/dist/server/app-ppr-fallback-shell-render.js +3 -2
  341. package/dist/server/app-ppr-fallback-shell.d.ts +7 -8
  342. package/dist/server/app-ppr-fallback-shell.js +3 -6
  343. package/dist/server/app-prerender-endpoints.d.ts +5 -6
  344. package/dist/server/app-prerender-endpoints.js +36 -11
  345. package/dist/server/app-prerender-static-params.d.ts +3 -5
  346. package/dist/server/app-prerender-static-params.js +18 -8
  347. package/dist/server/app-render-dependency.d.ts +16 -10
  348. package/dist/server/app-render-dependency.js +59 -9
  349. package/dist/server/app-request-context.d.ts +4 -4
  350. package/dist/server/app-request-stage-context.d.ts +5 -0
  351. package/dist/server/app-request-stage-context.js +11 -0
  352. package/dist/server/app-request-stage-dispatch.d.ts +25 -0
  353. package/dist/server/app-request-stage-dispatch.js +54 -0
  354. package/dist/server/app-request-stage-independent-entry.d.ts +8 -0
  355. package/dist/server/app-request-stage-independent-entry.js +115 -0
  356. package/dist/server/app-response-header-provenance.d.ts +19 -0
  357. package/dist/server/app-response-header-provenance.js +59 -0
  358. package/dist/server/app-response-stage-entry.d.ts +9 -0
  359. package/dist/server/app-response-stage-entry.js +86 -0
  360. package/dist/server/app-route-handler-cache.d.ts +5 -5
  361. package/dist/server/app-route-handler-cache.js +53 -33
  362. package/dist/server/app-route-handler-dispatch.d.ts +2 -4
  363. package/dist/server/app-route-handler-dispatch.js +116 -74
  364. package/dist/server/app-route-handler-execution.d.ts +22 -13
  365. package/dist/server/app-route-handler-execution.js +228 -30
  366. package/dist/server/app-route-handler-middleware-context.d.ts +8 -0
  367. package/dist/server/app-route-handler-middleware-context.js +15 -0
  368. package/dist/server/app-route-handler-policy.d.ts +25 -11
  369. package/dist/server/app-route-handler-policy.js +21 -6
  370. package/dist/server/app-route-handler-response.d.ts +11 -11
  371. package/dist/server/app-route-handler-response.js +18 -6
  372. package/dist/server/app-route-handler-runtime.d.ts +10 -12
  373. package/dist/server/app-route-handler-runtime.js +222 -85
  374. package/dist/server/app-route-module-loader.d.ts +43 -10
  375. package/dist/server/app-route-module-loader.js +77 -3
  376. package/dist/server/app-route-request-built-ins.d.ts +15 -0
  377. package/dist/server/app-route-request-built-ins.js +41 -0
  378. package/dist/server/app-route-tree-prefetch.d.ts +6 -7
  379. package/dist/server/app-route-tree-prefetch.js +2 -1
  380. package/dist/server/app-router-entry.d.ts +2 -1
  381. package/dist/server/app-router-entry.js +83 -16
  382. package/dist/server/app-rsc-cache-busting.d.ts +50 -23
  383. package/dist/server/app-rsc-cache-busting.js +122 -31
  384. package/dist/server/app-rsc-combined-handler.d.ts +9 -0
  385. package/dist/server/app-rsc-combined-handler.js +11 -0
  386. package/dist/server/app-rsc-embedded-chunks.d.ts +6 -7
  387. package/dist/server/app-rsc-error-handler.d.ts +12 -6
  388. package/dist/server/app-rsc-error-handler.js +15 -6
  389. package/dist/server/app-rsc-errors.d.ts +12 -9
  390. package/dist/server/app-rsc-errors.js +24 -4
  391. package/dist/server/app-rsc-handler.d.ts +43 -13
  392. package/dist/server/app-rsc-handler.js +701 -122
  393. package/dist/server/app-rsc-redirect-flight.d.ts +4 -6
  394. package/dist/server/app-rsc-render-mode.d.ts +8 -8
  395. package/dist/server/app-rsc-render-mode.js +4 -1
  396. package/dist/server/app-rsc-request-normalization.d.ts +25 -13
  397. package/dist/server/app-rsc-request-normalization.js +78 -6
  398. package/dist/server/app-rsc-response-finalizer.d.ts +13 -5
  399. package/dist/server/app-rsc-response-finalizer.js +56 -29
  400. package/dist/server/app-rsc-response-stage.d.ts +6 -0
  401. package/dist/server/app-rsc-response-stage.js +248 -0
  402. package/dist/server/app-rsc-route-matching.d.ts +42 -7
  403. package/dist/server/app-rsc-route-matching.js +118 -17
  404. package/dist/server/app-rsc-state-fingerprint.d.ts +13 -0
  405. package/dist/server/app-rsc-state-fingerprint.js +13 -0
  406. package/dist/server/app-rsc-vary.d.ts +16 -0
  407. package/dist/server/app-rsc-vary.js +31 -0
  408. package/dist/server/app-segment-config.d.ts +7 -7
  409. package/dist/server/app-segment-config.js +36 -14
  410. package/dist/server/app-server-action-execution.d.ts +60 -19
  411. package/dist/server/app-server-action-execution.js +321 -147
  412. package/dist/server/app-ssr-entry.d.ts +19 -7
  413. package/dist/server/app-ssr-entry.js +47 -24
  414. package/dist/server/app-ssr-error-meta.d.ts +3 -4
  415. package/dist/server/app-ssr-error-meta.js +2 -1
  416. package/dist/server/app-ssr-router-instance.d.ts +2 -4
  417. package/dist/server/app-ssr-stream.d.ts +21 -17
  418. package/dist/server/app-ssr-stream.js +33 -16
  419. package/dist/server/app-static-generation.d.ts +4 -6
  420. package/dist/server/app-visited-response-cache.d.ts +17 -8
  421. package/dist/server/app-visited-response-cache.js +68 -4
  422. package/dist/server/app-worker-stages.d.ts +84 -0
  423. package/dist/server/app-worker-stages.js +52 -0
  424. package/dist/server/artifact-compatibility.d.ts +11 -12
  425. package/dist/server/artifact-compatibility.js +1 -1
  426. package/dist/server/before-interactive-head.d.ts +2 -4
  427. package/dist/server/before-interactive-head.js +2 -0
  428. package/dist/server/bfcache-identity.d.ts +44 -0
  429. package/dist/server/bfcache-identity.js +52 -0
  430. package/dist/server/cache-control.d.ts +46 -16
  431. package/dist/server/cache-control.js +117 -13
  432. package/dist/server/cache-headers.d.ts +3 -4
  433. package/dist/server/cache-proof.d.ts +69 -71
  434. package/dist/server/cacheability-limits.d.ts +8 -0
  435. package/dist/server/cacheability-limits.js +9 -0
  436. package/dist/server/cacheability-manifest.d.ts +41 -0
  437. package/dist/server/cacheability-manifest.js +196 -0
  438. package/dist/server/cacheability-request.d.ts +49 -0
  439. package/dist/server/cacheability-request.js +545 -0
  440. package/dist/server/client-reuse-manifest.d.ts +17 -19
  441. package/dist/server/client-reuse-manifest.js +3 -3
  442. package/dist/server/client-trace-metadata.d.ts +9 -6
  443. package/dist/server/client-trace-metadata.js +27 -15
  444. package/dist/server/cloudflare-workers-tracing.d.ts +1 -0
  445. package/dist/server/cloudflare-workers-tracing.js +8 -0
  446. package/dist/server/config-headers.d.ts +42 -0
  447. package/dist/server/config-headers.js +102 -0
  448. package/dist/server/cookie-utils.d.ts +2 -3
  449. package/dist/server/csp.d.ts +5 -7
  450. package/dist/server/default-global-error-module.d.ts +2 -4
  451. package/dist/server/default-global-not-found-module.d.ts +2 -4
  452. package/dist/server/default-not-found-module.d.ts +2 -4
  453. package/dist/server/defer-until-stream-consumed.d.ts +2 -3
  454. package/dist/server/defer-until-stream-consumed.js +2 -1
  455. package/dist/server/dev-initial-server-error.d.ts +3 -4
  456. package/dist/server/dev-initial-server-error.js +2 -1
  457. package/dist/server/dev-lockfile.d.ts +29 -18
  458. package/dist/server/dev-module-runner.d.ts +2 -4
  459. package/dist/server/dev-origin-check.d.ts +5 -6
  460. package/dist/server/dev-route-files.d.ts +2 -4
  461. package/dist/server/dev-route-files.js +2 -5
  462. package/dist/server/dev-server.d.ts +10 -21
  463. package/dist/server/dev-server.js +381 -513
  464. package/dist/server/dev-stack-sourcemap.d.ts +7 -9
  465. package/dist/server/dev-stack-sourcemap.js +2 -5
  466. package/dist/server/document-initial-head.d.ts +13 -4
  467. package/dist/server/document-initial-head.js +17 -2
  468. package/dist/server/edge-api-runtime.d.ts +11 -3
  469. package/dist/server/edge-api-runtime.js +29 -1
  470. package/dist/server/fetch-handler.d.ts +3 -2
  471. package/dist/server/fetch-handler.js +3 -18
  472. package/dist/server/file-based-metadata.d.ts +2 -4
  473. package/dist/server/framework-tracer.d.ts +46 -0
  474. package/dist/server/framework-tracer.js +125 -0
  475. package/dist/server/fully-buffered-response.d.ts +11 -0
  476. package/dist/server/fully-buffered-response.js +19 -0
  477. package/dist/server/headers.d.ts +78 -47
  478. package/dist/server/headers.js +59 -18
  479. package/dist/server/html.d.ts +6 -7
  480. package/dist/server/http-conditional.d.ts +21 -0
  481. package/dist/server/http-conditional.js +117 -0
  482. package/dist/server/http-date.d.ts +4 -0
  483. package/dist/server/http-date.js +73 -0
  484. package/dist/server/http-error-responses.d.ts +9 -9
  485. package/dist/server/http-error-responses.js +21 -4
  486. package/dist/server/http-range.d.ts +24 -0
  487. package/dist/server/http-range.js +67 -0
  488. package/dist/server/hybrid-route-priority.d.ts +4 -5
  489. package/dist/server/image-optimization.d.ts +34 -27
  490. package/dist/server/image-optimization.js +0 -1
  491. package/dist/server/implicit-tags.d.ts +3 -4
  492. package/dist/server/instrumentation-runtime.d.ts +17 -21
  493. package/dist/server/instrumentation-runtime.js +26 -8
  494. package/dist/server/instrumentation.d.ts +24 -20
  495. package/dist/server/instrumentation.js +8 -8
  496. package/dist/server/isr-cache.d.ts +53 -68
  497. package/dist/server/isr-cache.js +49 -135
  498. package/dist/server/isr-decision.d.ts +11 -9
  499. package/dist/server/metadata-route-build-data.d.ts +4 -6
  500. package/dist/server/metadata-route-build-data.js +1 -1
  501. package/dist/server/metadata-route-cache-policy.d.ts +5 -0
  502. package/dist/server/metadata-route-cache-policy.js +6 -0
  503. package/dist/server/metadata-route-response.d.ts +28 -5
  504. package/dist/server/metadata-route-response.js +226 -11
  505. package/dist/server/metadata-routes.d.ts +52 -35
  506. package/dist/server/metadata-routes.js +1 -1
  507. package/dist/server/middleware-matcher-pattern.d.ts +20 -0
  508. package/dist/server/middleware-matcher-pattern.js +219 -0
  509. package/dist/server/middleware-matcher.d.ts +19 -12
  510. package/dist/server/middleware-matcher.js +56 -77
  511. package/dist/server/middleware-path-to-regexp.d.ts +13 -0
  512. package/dist/server/middleware-path-to-regexp.js +230 -0
  513. package/dist/server/middleware-response-headers.d.ts +3 -4
  514. package/dist/server/middleware-response-headers.js +4 -2
  515. package/dist/server/middleware-runtime.d.ts +19 -9
  516. package/dist/server/middleware-runtime.js +144 -36
  517. package/dist/server/middleware.d.ts +6 -20
  518. package/dist/server/middleware.js +4 -20
  519. package/dist/server/multi-stage.d.ts +118 -0
  520. package/dist/server/multi-stage.js +8 -0
  521. package/dist/server/navigation-planner.d.ts +28 -27
  522. package/dist/server/navigation-planner.js +57 -9
  523. package/dist/server/navigation-trace.d.ts +12 -12
  524. package/dist/server/navigation-trace.js +1 -0
  525. package/dist/server/next-error-digest.d.ts +4 -6
  526. package/dist/server/normalize-path.d.ts +5 -6
  527. package/dist/server/normalize-path.js +1 -1
  528. package/dist/server/open-redirect.d.ts +2 -3
  529. package/dist/server/opentelemetry-api.d.ts +59 -0
  530. package/dist/server/opentelemetry-api.js +53 -0
  531. package/dist/server/opentelemetry-tracing.d.ts +5 -0
  532. package/dist/server/opentelemetry-tracing.js +83 -0
  533. package/dist/server/operation-token.d.ts +11 -12
  534. package/dist/server/otel-tracer-extension.d.ts +7 -9
  535. package/dist/server/otel-tracer-extension.js +37 -36
  536. package/dist/server/pages-api-route.d.ts +9 -5
  537. package/dist/server/pages-api-route.js +51 -10
  538. package/dist/server/pages-asset-tags.d.ts +8 -7
  539. package/dist/server/pages-asset-tags.js +6 -4
  540. package/dist/server/pages-body-parser-config.d.ts +4 -5
  541. package/dist/server/pages-body-parser-config.js +4 -4
  542. package/dist/server/pages-client-assets.d.ts +4 -5
  543. package/dist/server/pages-data-route.d.ts +29 -21
  544. package/dist/server/pages-data-route.js +31 -18
  545. package/dist/server/pages-default-404.d.ts +3 -4
  546. package/dist/server/pages-dev-hydration.d.ts +3 -4
  547. package/dist/server/pages-dev-hydration.js +14 -5
  548. package/dist/server/pages-dev-module-url.d.ts +3 -4
  549. package/dist/server/pages-dev-stylesheets.d.ts +9 -0
  550. package/dist/server/pages-dev-stylesheets.js +150 -0
  551. package/dist/server/pages-document-asset-props.d.ts +25 -0
  552. package/dist/server/pages-document-asset-props.js +69 -0
  553. package/dist/server/pages-document-initial-props.d.ts +14 -11
  554. package/dist/server/pages-document-initial-props.js +4 -2
  555. package/dist/server/pages-execution-tracing.d.ts +40 -0
  556. package/dist/server/pages-execution-tracing.js +80 -0
  557. package/dist/server/pages-get-initial-props.d.ts +21 -9
  558. package/dist/server/pages-get-initial-props.js +17 -10
  559. package/dist/server/pages-i18n.d.ts +8 -14
  560. package/dist/server/pages-i18n.js +67 -18
  561. package/dist/server/pages-media-type.d.ts +4 -5
  562. package/dist/server/pages-node-compat.d.ts +21 -12
  563. package/dist/server/pages-node-compat.js +71 -18
  564. package/dist/server/pages-page-data.d.ts +86 -21
  565. package/dist/server/pages-page-data.js +447 -98
  566. package/dist/server/pages-page-handler.d.ts +80 -33
  567. package/dist/server/pages-page-handler.js +220 -69
  568. package/dist/server/pages-page-method.d.ts +2 -3
  569. package/dist/server/pages-page-response.d.ts +22 -21
  570. package/dist/server/pages-page-response.js +99 -81
  571. package/dist/server/pages-preview.d.ts +10 -11
  572. package/dist/server/pages-readiness.d.ts +5 -7
  573. package/dist/server/pages-readiness.js +4 -4
  574. package/dist/server/pages-request-pipeline.d.ts +43 -17
  575. package/dist/server/pages-request-pipeline.js +126 -47
  576. package/dist/server/pages-request-stage-entry.d.ts +23 -0
  577. package/dist/server/pages-request-stage-entry.js +314 -0
  578. package/dist/server/pages-response-stage-entry.d.ts +11 -0
  579. package/dist/server/pages-response-stage-entry.js +106 -0
  580. package/dist/server/pages-response-stage.d.ts +31 -0
  581. package/dist/server/pages-response-stage.js +49 -0
  582. package/dist/server/pages-revalidate.d.ts +3 -5
  583. package/dist/server/pages-revalidate.js +60 -9
  584. package/dist/server/pages-route-data-kind.d.ts +18 -0
  585. package/dist/server/pages-route-data-kind.js +11 -0
  586. package/dist/server/pages-router-entry.d.ts +1 -24
  587. package/dist/server/pages-router-entry.js +49 -99
  588. package/dist/server/pages-serializable-props.d.ts +3 -4
  589. package/dist/server/pregenerated-concrete-paths.d.ts +9 -7
  590. package/dist/server/pregenerated-concrete-paths.js +12 -6
  591. package/dist/server/prerender-cache-life-header.d.ts +10 -0
  592. package/dist/server/prerender-cache-life-header.js +18 -0
  593. package/dist/server/prerender-manifest.d.ts +21 -11
  594. package/dist/server/prerender-manifest.js +10 -4
  595. package/dist/server/prerender-route-params.d.ts +16 -10
  596. package/dist/server/prerender-route-params.js +20 -7
  597. package/dist/server/prerender-work-unit-setup.d.ts +4 -4
  598. package/dist/server/prerender-work-unit-setup.js +37 -14
  599. package/dist/server/prod-server.d.ts +28 -21
  600. package/dist/server/prod-server.js +450 -137
  601. package/dist/server/proxy-trust.d.ts +5 -7
  602. package/dist/server/request-log.d.ts +9 -14
  603. package/dist/server/request-pipeline.d.ts +40 -49
  604. package/dist/server/request-pipeline.js +60 -87
  605. package/dist/server/request-stage.d.ts +5 -0
  606. package/dist/server/request-stage.js +7 -0
  607. package/dist/server/request-tracing.d.ts +22 -0
  608. package/dist/server/request-tracing.js +180 -0
  609. package/dist/server/response-stage-cacheability.d.ts +31 -0
  610. package/dist/server/response-stage-cacheability.js +37 -0
  611. package/dist/server/response-stage-policy.d.ts +23 -0
  612. package/dist/server/response-stage-policy.js +89 -0
  613. package/dist/server/response-stage.d.ts +5 -0
  614. package/dist/server/response-stage.js +7 -0
  615. package/dist/server/response-start-tracing.d.ts +14 -0
  616. package/dist/server/response-start-tracing.js +80 -0
  617. package/dist/server/revalidation-host.d.ts +9 -0
  618. package/dist/server/revalidation-host.js +20 -0
  619. package/dist/server/revalidation-request.d.ts +8 -0
  620. package/dist/server/revalidation-request.js +37 -0
  621. package/dist/server/rsc-completion-metadata.d.ts +14 -0
  622. package/dist/server/rsc-completion-metadata.js +183 -0
  623. package/dist/server/rsc-stream-hints.d.ts +6 -7
  624. package/dist/server/rsc-stream-hints.js +122 -18
  625. package/dist/server/seed-cache.d.ts +8 -5
  626. package/dist/server/seed-cache.js +41 -12
  627. package/dist/server/server-action-not-found.d.ts +5 -6
  628. package/dist/server/server-globals.d.ts +2 -3
  629. package/dist/server/server-globals.js +13 -0
  630. package/dist/server/skip-cache-proof.d.ts +4 -5
  631. package/dist/server/socket-error-backstop.d.ts +5 -6
  632. package/dist/server/static-file-cache.d.ts +26 -13
  633. package/dist/server/static-file-cache.js +56 -30
  634. package/dist/server/static-file-signal.d.ts +16 -0
  635. package/dist/server/static-file-signal.js +82 -0
  636. package/dist/server/static-layout-client-reuse-proof.d.ts +4 -6
  637. package/dist/server/streaming-metadata.d.ts +2 -3
  638. package/dist/server/tracer.d.ts +5 -0
  639. package/dist/server/tracer.js +13 -0
  640. package/dist/server/worker-prerender-discovery.d.ts +18 -0
  641. package/dist/server/worker-prerender-discovery.js +55 -0
  642. package/dist/server/worker-revalidation-context.d.ts +11 -0
  643. package/dist/server/worker-revalidation-context.js +30 -0
  644. package/dist/server/worker-stages.d.ts +43 -0
  645. package/dist/server/worker-stages.js +25 -0
  646. package/dist/server/worker-utils.d.ts +6 -5
  647. package/dist/server/worker-utils.js +16 -7
  648. package/dist/server/workers-tracing.d.ts +17 -0
  649. package/dist/server/workers-tracing.js +27 -0
  650. package/dist/shims/amp.d.ts +3 -4
  651. package/dist/shims/app-router-scroll-state.d.ts +9 -9
  652. package/dist/shims/app-router-scroll-state.js +7 -2
  653. package/dist/shims/app-router-scroll.d.ts +4 -11
  654. package/dist/shims/app-router-scroll.js +2 -1
  655. package/dist/shims/app.d.ts +7 -12
  656. package/dist/shims/before-interactive-context.d.ts +10 -9
  657. package/dist/shims/cache-callable-runtime.d.ts +13 -0
  658. package/dist/shims/cache-callable-runtime.js +39 -0
  659. package/dist/shims/cache-for-request.d.ts +2 -3
  660. package/dist/shims/cache-handler.d.ts +33 -22
  661. package/dist/shims/cache-handler.js +74 -10
  662. package/dist/shims/cache-request-state.d.ts +62 -23
  663. package/dist/shims/cache-request-state.js +86 -1
  664. package/dist/shims/cache-runtime.d.ts +47 -17
  665. package/dist/shims/cache-runtime.js +273 -85
  666. package/dist/shims/cache.d.ts +17 -18
  667. package/dist/shims/cache.js +50 -22
  668. package/dist/shims/cacheability-classification.d.ts +98 -0
  669. package/dist/shims/cacheability-classification.js +149 -0
  670. package/dist/shims/cdn-cache-state.d.ts +13 -0
  671. package/dist/shims/cdn-cache-state.js +23 -0
  672. package/dist/shims/cdn-cache.d.ts +73 -17
  673. package/dist/shims/cdn-cache.js +41 -38
  674. package/dist/shims/client-hook-error.d.ts +3 -4
  675. package/dist/shims/client-locale.d.ts +2 -8
  676. package/dist/shims/client-only.d.ts +1 -1
  677. package/dist/shims/compat-router.d.ts +2 -4
  678. package/dist/shims/config.d.ts +3 -4
  679. package/dist/shims/constants.d.ts +73 -74
  680. package/dist/shims/default-global-error.d.ts +1 -4
  681. package/dist/shims/default-not-found.d.ts +2 -4
  682. package/dist/shims/document.d.ts +42 -84
  683. package/dist/shims/document.js +76 -53
  684. package/dist/shims/dynamic-preload-chunks.d.ts +2 -4
  685. package/dist/shims/dynamic-preload-chunks.js +12 -12
  686. package/dist/shims/dynamic.d.ts +9 -30
  687. package/dist/shims/dynamic.js +33 -14
  688. package/dist/shims/error-boundary-navigation.d.ts +3 -5
  689. package/dist/shims/error-boundary.d.ts +17 -43
  690. package/dist/shims/error-boundary.js +17 -11
  691. package/dist/shims/error.d.ts +6 -11
  692. package/dist/shims/error.js +2 -2
  693. package/dist/shims/error.react-server.d.ts +3 -4
  694. package/dist/shims/fetch-cache.d.ts +23 -21
  695. package/dist/shims/fetch-cache.js +194 -88
  696. package/dist/shims/font-google-base.d.ts +18 -12
  697. package/dist/shims/font-google-base.js +19 -9
  698. package/dist/shims/font-local.d.ts +13 -7
  699. package/dist/shims/font-local.js +44 -13
  700. package/dist/shims/font-utils.d.ts +14 -15
  701. package/dist/shims/form.d.ts +7 -5
  702. package/dist/shims/form.js +9 -6
  703. package/dist/shims/hash-scroll.d.ts +5 -6
  704. package/dist/shims/hash-scroll.js +2 -1
  705. package/dist/shims/head-state.d.ts +4 -6
  706. package/dist/shims/head.d.ts +39 -16
  707. package/dist/shims/head.js +76 -13
  708. package/dist/shims/headers.d.ts +83 -73
  709. package/dist/shims/headers.js +236 -80
  710. package/dist/shims/i18n-context.d.ts +5 -7
  711. package/dist/shims/i18n-state.d.ts +4 -6
  712. package/dist/shims/image-config.d.ts +5 -6
  713. package/dist/shims/image.d.ts +29 -40
  714. package/dist/shims/image.js +34 -24
  715. package/dist/shims/internal/als-registry.d.ts +32 -4
  716. package/dist/shims/internal/als-registry.js +50 -2
  717. package/dist/shims/internal/api-utils.d.ts +3 -4
  718. package/dist/shims/internal/app-page-props-cache-key.d.ts +3 -4
  719. package/dist/shims/internal/app-prefetch-fetch-queue.d.ts +18 -4
  720. package/dist/shims/internal/app-prefetch-fetch-queue.js +69 -7
  721. package/dist/shims/internal/app-prefetch-rsc-request.d.ts +13 -0
  722. package/dist/shims/internal/app-prefetch-rsc-request.js +12 -0
  723. package/dist/shims/internal/app-route-detection.d.ts +2 -3
  724. package/dist/shims/internal/app-route-prefetch-policy.d.ts +31 -0
  725. package/dist/shims/internal/app-route-prefetch-policy.js +65 -0
  726. package/dist/shims/internal/app-router-context.d.ts +9 -11
  727. package/dist/shims/internal/cookie-serialize.d.ts +15 -13
  728. package/dist/shims/internal/cookie-serialize.js +10 -7
  729. package/dist/shims/internal/hybrid-client-route-owner-direct.d.ts +6 -11
  730. package/dist/shims/internal/hybrid-client-route-owner-direct.js +29 -11
  731. package/dist/shims/internal/hybrid-client-route-owner.d.ts +3 -4
  732. package/dist/shims/internal/hybrid-client-route-owner.js +8 -7
  733. package/dist/shims/internal/interpolate-as.d.ts +19 -5
  734. package/dist/shims/internal/interpolate-as.js +31 -4
  735. package/dist/shims/internal/link-status-registry.d.ts +5 -6
  736. package/dist/shims/internal/make-hanging-promise.d.ts +8 -3
  737. package/dist/shims/internal/make-hanging-promise.js +13 -2
  738. package/dist/shims/internal/navigation-untracked.d.ts +2 -3
  739. package/dist/shims/internal/pages-data-fetch-dedup.d.ts +8 -9
  740. package/dist/shims/internal/pages-data-target.d.ts +26 -16
  741. package/dist/shims/internal/pages-data-target.js +23 -7
  742. package/dist/shims/internal/pages-data-url.d.ts +7 -6
  743. package/dist/shims/internal/pages-data-url.js +2 -1
  744. package/dist/shims/internal/pages-router-accessor.d.ts +3 -4
  745. package/dist/shims/internal/pages-router-components.d.ts +3 -4
  746. package/dist/shims/internal/route-pattern-for-warning.d.ts +3 -4
  747. package/dist/shims/internal/router-context.d.ts +2 -4
  748. package/dist/shims/internal/utils.d.ts +10 -11
  749. package/dist/shims/internal/work-unit-async-storage.d.ts +16 -14
  750. package/dist/shims/internal/work-unit-async-storage.js +2 -0
  751. package/dist/shims/layout-segment-context.d.ts +4 -9
  752. package/dist/shims/legacy-image.d.ts +3 -38
  753. package/dist/shims/legacy-image.js +6 -16
  754. package/dist/shims/link-prefetch.d.ts +9 -10
  755. package/dist/shims/link.d.ts +42 -41
  756. package/dist/shims/link.js +161 -178
  757. package/dist/shims/metadata.d.ts +25 -50
  758. package/dist/shims/metadata.js +129 -84
  759. package/dist/shims/navigation-context-accessors.d.ts +9 -0
  760. package/dist/shims/navigation-context-accessors.js +19 -0
  761. package/dist/shims/navigation-context-state.d.ts +21 -19
  762. package/dist/shims/navigation-errors.d.ts +18 -19
  763. package/dist/shims/navigation-state.d.ts +7 -7
  764. package/dist/shims/navigation.d.ts +147 -59
  765. package/dist/shims/navigation.js +496 -95
  766. package/dist/shims/navigation.react-server.d.ts +10 -9
  767. package/dist/shims/navigation.react-server.js +1 -1
  768. package/dist/shims/next-shims-augmentations.d.ts +1 -0
  769. package/dist/shims/next-shims-public.d.ts +1 -0
  770. package/dist/shims/offline.d.ts +2 -3
  771. package/dist/shims/og.d.ts +2 -3
  772. package/dist/shims/pages-router-runtime.d.ts +4 -5
  773. package/dist/shims/ppr-fallback-shell.d.ts +13 -14
  774. package/dist/shims/public-shim-map.json.js +103 -0
  775. package/dist/shims/readonly-url-search-params.d.ts +5 -6
  776. package/dist/shims/readonly-url-search-params.js +3 -3
  777. package/dist/shims/request-context.d.ts +15 -6
  778. package/dist/shims/request-state-types.d.ts +3 -2
  779. package/dist/shims/root-params.d.ts +15 -14
  780. package/dist/shims/root-params.js +7 -1
  781. package/dist/shims/router-state.d.ts +5 -6
  782. package/dist/shims/router.d.ts +100 -45
  783. package/dist/shims/router.js +464 -144
  784. package/dist/shims/script-nonce-context.d.ts +5 -7
  785. package/dist/shims/script.d.ts +30 -22
  786. package/dist/shims/script.js +16 -11
  787. package/dist/shims/server-only.d.ts +1 -1
  788. package/dist/shims/server.d.ts +66 -76
  789. package/dist/shims/server.js +208 -84
  790. package/dist/shims/slot.d.ts +30 -18
  791. package/dist/shims/slot.js +107 -21
  792. package/dist/shims/streamed-icons.d.ts +6 -0
  793. package/dist/shims/streamed-icons.js +33 -0
  794. package/dist/shims/thenable-params.d.ts +4 -5
  795. package/dist/shims/unified-request-context.d.ts +57 -12
  796. package/dist/shims/unified-request-context.js +118 -1
  797. package/dist/shims/unrecognized-action-error.d.ts +3 -4
  798. package/dist/shims/url-safety.d.ts +5 -6
  799. package/dist/shims/url-safety.js +2 -2
  800. package/dist/shims/url-utils.d.ts +18 -12
  801. package/dist/shims/url-utils.js +10 -1
  802. package/dist/shims/use-merged-ref.d.ts +2 -4
  803. package/dist/shims/user-agent.d.ts +31 -0
  804. package/dist/shims/user-agent.js +16 -0
  805. package/dist/shims/web-vitals.d.ts +2 -3
  806. package/dist/typegen.d.ts +7 -3
  807. package/dist/typegen.js +75 -14
  808. package/dist/utils/asset-prefix.d.ts +7 -8
  809. package/dist/utils/base-path.d.ts +5 -6
  810. package/dist/utils/built-asset-url.d.ts +2 -3
  811. package/dist/utils/built-asset-url.js +4 -2
  812. package/dist/utils/cache-control-metadata.d.ts +15 -3
  813. package/dist/utils/cache-control-metadata.js +21 -1
  814. package/dist/utils/client-build-manifest.d.ts +6 -8
  815. package/dist/utils/client-build-manifest.js +2 -1
  816. package/dist/utils/client-entry-manifest.d.ts +6 -7
  817. package/dist/utils/client-runtime-metadata.d.ts +2 -3
  818. package/dist/utils/client-runtime-metadata.js +2 -1
  819. package/dist/utils/commonjs-loader.d.ts +4 -5
  820. package/dist/utils/compare.d.ts +2 -3
  821. package/dist/utils/deployment-id.d.ts +6 -7
  822. package/dist/utils/dev-error-recovery-event.d.ts +2 -3
  823. package/dist/utils/dev-stack-sourcemap-endpoint.d.ts +2 -3
  824. package/dist/utils/domain-locale.d.ts +9 -14
  825. package/dist/utils/encode-cache-tag.d.ts +4 -5
  826. package/dist/utils/encode-cache-tag.js +1 -1
  827. package/dist/utils/error-cause.d.ts +2 -3
  828. package/dist/utils/external-url.d.ts +4 -0
  829. package/dist/utils/external-url.js +7 -0
  830. package/dist/utils/has-trailing-comma.d.ts +3 -4
  831. package/dist/utils/hash.d.ts +3 -4
  832. package/dist/utils/html-limited-bots.d.ts +3 -4
  833. package/dist/utils/html-limited-bots.js +1 -1
  834. package/dist/utils/lazy-chunks.d.ts +8 -9
  835. package/dist/utils/lazy-chunks.js +3 -3
  836. package/dist/utils/manifest-paths.d.ts +5 -6
  837. package/dist/utils/mdx-scan.d.ts +3 -4
  838. package/dist/utils/middleware-request-headers.d.ts +21 -8
  839. package/dist/utils/middleware-request-headers.js +37 -23
  840. package/dist/utils/navigation-signal.d.ts +3 -3
  841. package/dist/utils/navigation-signal.js +16 -1
  842. package/dist/utils/number.d.ts +2 -3
  843. package/dist/utils/package-name.d.ts +10 -0
  844. package/dist/utils/package-name.js +18 -0
  845. package/dist/utils/parse-cookie.d.ts +4 -5
  846. package/dist/utils/path.d.ts +11 -5
  847. package/dist/utils/path.js +21 -1
  848. package/dist/utils/plugin-options.d.ts +2 -3
  849. package/dist/utils/precompressed-variant.d.ts +8 -0
  850. package/dist/utils/precompressed-variant.js +15 -0
  851. package/dist/utils/prerender-output-paths.d.ts +10 -9
  852. package/dist/utils/prerender-output-paths.js +22 -10
  853. package/dist/utils/project.d.ts +29 -25
  854. package/dist/utils/promise.d.ts +2 -3
  855. package/dist/utils/protocol-headers.d.ts +17 -12
  856. package/dist/utils/protocol-headers.js +7 -1
  857. package/dist/utils/public-file-path.d.ts +4 -0
  858. package/dist/utils/public-file-path.js +12 -0
  859. package/dist/utils/public-routes.d.ts +2 -3
  860. package/dist/utils/public-routes.js +6 -5
  861. package/dist/utils/query.d.ts +8 -9
  862. package/dist/utils/react-compiler-support.d.ts +19 -0
  863. package/dist/utils/react-compiler-support.js +29 -0
  864. package/dist/utils/react-version.d.ts +2 -3
  865. package/dist/utils/record.d.ts +2 -3
  866. package/dist/utils/redirect-digest.d.ts +3 -4
  867. package/dist/utils/regex-safety.d.ts +7 -0
  868. package/dist/utils/regex-safety.js +737 -0
  869. package/dist/utils/regex.d.ts +2 -3
  870. package/dist/utils/safe-json-file.d.ts +2 -3
  871. package/dist/utils/sorted-array.d.ts +2 -3
  872. package/dist/utils/text-stream.d.ts +3 -4
  873. package/dist/utils/vinext-root.d.ts +2 -3
  874. package/dist/utils/virtual-module.d.ts +3 -4
  875. package/dist/utils/vite-version.d.ts +5 -6
  876. package/next-package.json +4 -0
  877. package/package.json +66 -9
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Run Next.js applications on Vite, with Cloudflare Workers as the primary deployment target.
4
4
 
5
+ **Website:** [vinext.dev](https://vinext.dev)
6
+
7
+ **Documentation:** [vinext.dev/docs](https://vinext.dev/docs)
8
+
5
9
  > **Read the announcement:** [How we rebuilt Next.js with AI in one week](https://blog.cloudflare.com/vinext/)
6
10
 
7
11
  > **Under active development.** vinext supports substantial Next.js applications today, but it is not yet a drop-in replacement for every application or production workload. Expect compatibility gaps, especially in newer App Router features, and evaluate it against your own application before adopting it.
@@ -116,7 +120,7 @@ Your existing `pages/`, `app/`, `next.config.js`, and `public/` directories work
116
120
 
117
121
  Options: `-p / --port <port>`, `-H / --hostname <host>`, `--turbopack` (accepted, no-op).
118
122
 
119
- `@vinext/cloudflare deploy` options: `--preview`, `--env <name>`, `--name <name>`, `--skip-build`, `--dry-run`, `--experimental-tpr`.
123
+ `@vinext/cloudflare deploy` options: `--preview`, `--env <name>`, `--name <name>`, `--skip-build`, `--dry-run`, `--experimental-traffic-aware-warm-cache`.
120
124
 
121
125
  `vinext init` prompts for a deployment target, defaulting to Cloudflare. Agents must ask the
122
126
  user which target they want, then pass `--platform=cloudflare` or `--platform=node`.
@@ -206,7 +210,10 @@ vinext works everywhere. It natively supports Cloudflare Workers (with `npx @vin
206
210
  vinext is a Vite plugin that reimplements the public Next.js API — routing, server rendering, `next/*` module imports, the CLI — so you can run Next.js applications on Vite instead of the Next.js compiler toolchain. It can be deployed anywhere: Cloudflare Workers is the first natively supported target, with other platforms available via Nitro. Native adapters for more platforms are [planned](https://github.com/cloudflare/vinext/issues/80).
207
211
 
208
212
  **Is this a fork of Next.js?**
209
- No. vinext is an alternative implementation of the Next.js API surface built on Vite. It does import some Next.js types and utilities, but the core is written from scratch. The goal is not to create a competing framework or add features beyond what Next.js offers; it is to provide the same well-defined API surface on Vite's toolchain.
213
+ No. vinext is an alternative implementation of the Next.js API surface built on Vite. The core is written from scratch. The goal is not to create a competing framework or add features beyond what Next.js offers; it is to provide the same well-defined API surface on Vite's toolchain.
214
+
215
+ **Does vinext require Next.js to be installed?**
216
+ No. vinext ships fallback declarations for the supported `next` and `next/*` APIs, so applications can run and type-check without the `next` package. If both packages are installed, vinext keeps using Next.js's authoritative types and adds only its own extensions. Compatibility features that consume Next.js internals, such as `styled-jsx`, may still require a matching Next.js installation when used.
210
217
 
211
218
  **How is this different from OpenNext?**
212
219
  [OpenNext](https://opennext.js.org/) adapts the _output_ of a standard `next build` to run on various platforms. Because it builds on Next.js's own output, it inherits broad API coverage and has been well-tested for much longer. vinext takes a different approach: it reimplements the Next.js APIs on Vite from scratch, which means faster builds and smaller bundles, but less coverage of the long tail of Next.js features. If you need a mature, well-tested way to run Next.js outside Vercel, OpenNext is the safer choice. If you want a lighter Vite-based toolchain and do not need every Next.js API, vinext may be a good fit.
@@ -326,40 +333,34 @@ For TypeScript types, generate them with `wrangler types` and the `env` import w
326
333
 
327
334
  > **Note:** You do not need `getPlatformProxy()`, a custom worker entry with `fetch(request, env)`, or any other workaround. `cloudflare:workers` is the recommended way to access bindings in vinext.
328
335
 
329
- #### Traffic-aware Pre-Rendering (experimental)
336
+ #### Traffic-aware pre-warming (experimental)
330
337
 
331
- TPR queries Cloudflare zone analytics at deploy time to find which pages actually get traffic, pre-renders only those, and uploads them to KV cache. The result is SSG-level latency for popular pages without pre-rendering your entire site.
338
+ Traffic-aware warming queries Cloudflare zone analytics at deploy time to select the routes that actually get traffic. Those routes then go through vinext's standard staged CDN pre-warming flow, including route resolution, cacheability checks, and promotion.
332
339
 
333
340
  ```bash
334
- npx @vinext/cloudflare deploy --experimental-tpr # Pre-render pages covering 90% of traffic
335
- vp exec vinext-cloudflare deploy --experimental-tpr # Same, with Vite+
336
- npx @vinext/cloudflare deploy --experimental-tpr --tpr-coverage 95 # More aggressive coverage
337
- npx @vinext/cloudflare deploy --experimental-tpr --tpr-limit 500 # Cap at 500 pages
338
- npx @vinext/cloudflare deploy --experimental-tpr --tpr-window 48 # Use 48h of analytics
341
+ npx @vinext/cloudflare deploy --experimental-traffic-aware-warm-cache # Pre-warm routes covering 90% of traffic
342
+ vp exec vinext-cloudflare deploy --experimental-traffic-aware-warm-cache # Same, with Vite+
343
+ npx @vinext/cloudflare deploy --experimental-traffic-aware-warm-cache --traffic-aware-coverage 95 # More aggressive coverage
344
+ npx @vinext/cloudflare deploy --experimental-traffic-aware-warm-cache --traffic-aware-limit 500 # Cap at 500 routes
345
+ npx @vinext/cloudflare deploy --experimental-traffic-aware-warm-cache --traffic-aware-window 48 # Use 48h of analytics
339
346
  ```
340
347
 
341
348
  Requires a custom domain (zone analytics are unavailable on `*.workers.dev`) and `CLOUDFLARE_API_TOKEN` with Zone.Analytics read permission.
342
349
 
350
+ The previous `--experimental-tpr` and `--tpr-*` names remain supported as aliases.
351
+
343
352
  #### Custom Vite configuration
344
353
 
345
- If you need to customize the Vite config, create a `vite.config.ts`. vinext will merge its config with yours. This is required for Cloudflare Workers deployment with the App Router (RSC needs explicit plugin configuration):
354
+ If you need to customize the Vite config, create a `vite.config.ts`. vinext will merge its config with yours. For Cloudflare Workers deployment with the App Router, configure `@cloudflare/vite-plugin` so the RSC environment runs in workerd:
346
355
 
347
356
  ```ts
348
357
  import { defineConfig } from "vite";
349
358
  import vinext from "vinext";
350
- import rsc from "@vitejs/plugin-rsc";
351
359
  import { cloudflare } from "@cloudflare/vite-plugin";
352
360
 
353
361
  export default defineConfig({
354
362
  plugins: [
355
363
  vinext(),
356
- rsc({
357
- entries: {
358
- rsc: "virtual:vinext-rsc-entry",
359
- ssr: "virtual:vinext-app-ssr-entry",
360
- client: "virtual:vinext-app-browser-entry",
361
- },
362
- }),
363
364
  cloudflare({
364
365
  viteEnvironment: { name: "rsc", childEnvironments: ["ssr"] },
365
366
  }),
@@ -367,6 +368,54 @@ export default defineConfig({
367
368
  });
368
369
  ```
369
370
 
371
+ > **Do not register `@vitejs/plugin-rsc` yourself.** It is an optional peer dependency, so it must be
372
+ > _installed_ in your project, but vinext auto-registers it whenever an `app/` directory is detected.
373
+ > Adding an explicit `rsc()` call fails the build with `[vinext] Duplicate @vitejs/plugin-rsc detected`.
374
+ > Pass `rsc: false` to `vinext()` only if you want to own that registration.
375
+
376
+ #### Module Federation (client-side)
377
+
378
+ For client-side Module Federation, configure React and React DOM as singleton shared modules in both the host and remotes:
379
+
380
+ ```ts
381
+ import { federation } from "@module-federation/vite";
382
+ import { defineConfig } from "vite";
383
+ import vinext from "vinext";
384
+
385
+ export default defineConfig({
386
+ plugins: [
387
+ federation({
388
+ name: "host",
389
+ shared: {
390
+ react: { singleton: true },
391
+ "react/": { singleton: true },
392
+ "react-dom": { singleton: true },
393
+ "react-dom/": { singleton: true },
394
+ },
395
+ }),
396
+ vinext(),
397
+ ],
398
+ });
399
+ ```
400
+
401
+ In a remote client component, use `getVinextReact()` before reading React hooks. vinext registers the host's browser React instance before application modules execute, and the first registration remains stable across remote evaluation and HMR:
402
+
403
+ ```tsx
404
+ "use client";
405
+
406
+ import * as React from "react";
407
+ import { getVinextReact } from "vinext/client";
408
+
409
+ const { useState } = getVinextReact(React);
410
+
411
+ export function RemoteCounter() {
412
+ const [count, setCount] = useState(0);
413
+ return <button onClick={() => setCount((value) => value + 1)}>{count}</button>;
414
+ }
415
+ ```
416
+
417
+ This bridge is browser-only. It does not provide App Router Module Federation SSR or transparently replace React imports inside third-party packages; compatible React versions remain the responsibility of the Module Federation `shared` configuration.
418
+
370
419
  See the [examples](#live-examples) for complete working configurations.
371
420
 
372
421
  ### Other platforms (via Nitro)
@@ -472,13 +521,14 @@ These are deployed to Cloudflare Workers and updated on every push to `main`:
472
521
  | Nextra Docs | Nextra docs site (MDX, App Router) | [nextra-docs-template.vinext.workers.dev](https://nextra-docs-template.vinext.workers.dev) |
473
522
  | App Router (minimal) | Minimal App Router on Workers | [app-router-cloudflare.vinext.workers.dev](https://app-router-cloudflare.vinext.workers.dev) |
474
523
  | Pages Router (minimal) | Minimal Pages Router on Workers | [pages-router-cloudflare.vinext.workers.dev](https://pages-router-cloudflare.vinext.workers.dev) |
524
+ | Static export | [Hybrid App/Pages Router site](examples/static-export) served as assets only | [static-export.vinext.workers.dev](https://static-export.vinext.workers.dev) |
475
525
  | RealWorld API | REST API routes example | [realworld-api-rest.vinext.workers.dev](https://realworld-api-rest.vinext.workers.dev) |
476
- | Benchmarks Dashboard | Build performance tracking over time (D1-backed) | [vinext-web.vinext.workers.dev/benchmarks](https://vinext-web.vinext.workers.dev/benchmarks) |
526
+ | Benchmarks Dashboard | Build performance tracking over time (D1-backed) | [vinext.dev/benchmarks](https://vinext.dev/benchmarks) |
477
527
  | App Router + Nitro | App Router deployed via Nitro (multi-platform) | [examples/app-router-nitro](examples/app-router-nitro) |
478
528
 
479
529
  ## API coverage
480
530
 
481
- ~94% of the Next.js 16 API surface has full or partial support. The remaining gaps are intentional stubs for deprecated features and Partial Prerendering (which Next.js 16 reworked into `"use cache"` — that directive is fully supported).
531
+ ~94% of the Next.js 16 API surface has full or partial support. The remaining gaps are intentional stubs for deprecated features, plus Partial Prerendering and Cache Components. Next.js 16 reworked PPR into `"use cache"`; vinext implements that directive for file-level and function-level caching, but full `cacheComponents` behavior is still incomplete — see [Known gaps we're working on](#known-gaps-were-working-on).
482
532
 
483
533
  > ✅ = full implementation | 🟡 = partial (runtime behavior correct, some build-time optimizations missing) | ⬜ = intentional stub/no-op
484
534
 
@@ -548,7 +598,7 @@ Every `next/*` import is shimmed to a Vite-compatible implementation.
548
598
  | Standalone output (`output: 'standalone'`) | ✅ | Generates `dist/standalone` with `server.js`, build artifacts, and runtime deps |
549
599
  | `connection()` | ✅ | Forces dynamic rendering |
550
600
  | `"use cache"` directive | ✅ | File-level and function-level. `cacheLife()` profiles, `cacheTag()`, stale-while-revalidate |
551
- | `instrumentation.ts` | ✅ | `register()` and `onRequestError()` callbacks |
601
+ | `instrumentation.ts` | ✅ | `register()`, `onRequestError()`, and [framework tracing](docs/tracing.mdx) |
552
602
  | Route segment config | 🟡 | `revalidate`, `dynamic`, `dynamicParams`. `runtime` and `preferredRegion` are ignored |
553
603
 
554
604
  ### Configuration
@@ -561,6 +611,33 @@ Every `next/*` import is shimmed to a Vite-compatible implementation.
561
611
  | `images` config | 🟡 | Parsed but not used for optimization |
562
612
  | `experimental.optimizePackageImports` | ✅ | Rewrites barrel imports to direct sub-module imports in RSC/SSR environments. A default set (lucide-react, date-fns, radix-ui, antd, MUI, and others) are always optimized. Add package names here to extend the list. |
563
613
  | `vinext({ nextConfig })` | ✅ | Inline Next-style config from `vite.config.*`. Supports object-form and function-form config. When provided, this overrides root `next.config.*`. |
614
+ | `vinext({ react: { compiler: true } })` | ✅ | React Compiler auto memoization. Needs `@vitejs/plugin-react` 6.1+ and the optional `oxc-transform-react` package. |
615
+
616
+ ### React Compiler
617
+
618
+ vinext auto-registers `@vitejs/plugin-react`, so the React Compiler is enabled through the same `react` option:
619
+
620
+ ```ts
621
+ import { defineConfig } from "vite";
622
+ import vinext from "vinext";
623
+
624
+ export default defineConfig({
625
+ plugins: [vinext({ react: { compiler: true } })],
626
+ });
627
+ ```
628
+
629
+ The transform itself ships separately, so install it alongside:
630
+
631
+ ```bash
632
+ npm install -D oxc-transform-react
633
+ ```
634
+
635
+ This requires `@vitejs/plugin-react` 6.1.0 or newer. Older versions accept the option and drop it, so vinext fails with an actionable error instead of leaving the compiler silently disabled. The compiler runs on the client environment only.
636
+
637
+ One caveat: modules whose JSX is lowered earlier in the pipeline are not memoized. Those build and behave correctly, they just miss auto memoization:
638
+
639
+ - JSX in plain `.js` files, which `vinext:jsx-in-js` compiles first so the compiler can parse them at all. Rename to `.jsx` or `.tsx` to get memoization.
640
+ - Components using `<style jsx>`, which `vinext:styled-jsx` compiles through the Next.js SWC transform before the compiler runs.
564
641
 
565
642
  ### Environment variable loading (`.env*`)
566
643
 
@@ -600,16 +677,21 @@ The cache is pluggable. The default `MemoryCacheHandler` works out of the box. S
600
677
  Instead of wiring up cache handlers imperatively from a worker entry, you can declare them in the `vinext()` plugin config. The `@vinext/cloudflare` package ships Cloudflare adapters for this:
601
678
 
602
679
  - **`kvDataAdapter()`** (`@vinext/cloudflare/cache/kv-data-adapter`) — backs the `"use cache"` data cache with a Workers KV namespace.
680
+ - **`cdnAdapter()`** (`@vinext/cloudflare/cache/cdn-adapter`) — serves page-level ISR from the Cloudflare Workers Cache (`ctx.cache`) instead of from the origin.
681
+
682
+ The two fill different slots and can be used together:
603
683
 
604
684
  ```ts
605
685
  import { defineConfig } from "vite";
606
686
  import vinext from "vinext";
687
+ import { cdnAdapter } from "@vinext/cloudflare/cache/cdn-adapter";
607
688
  import { kvDataAdapter } from "@vinext/cloudflare/cache/kv-data-adapter";
608
689
 
609
690
  export default defineConfig({
610
691
  plugins: [
611
692
  vinext({
612
693
  cache: {
694
+ cdn: cdnAdapter(),
613
695
  data: kvDataAdapter(),
614
696
  },
615
697
  }),
@@ -625,9 +707,37 @@ The KV data adapter reads `env[binding]` at runtime, so add the matching KV name
625
707
  }
626
708
  ```
627
709
 
628
- `binding` defaults to `VINEXT_KV_CACHE`, so `kvDataAdapter()` with no options works as long as that's your binding name. Other options: `appPrefix` (namespace cache keys to isolate multiple apps in one KV namespace), `ttlSeconds` (default KV `expirationTtl`, default 30 days), and `tagCacheTtlMs` (in-memory tag-invalidation cache TTL, default 5s).
710
+ `binding` defaults to `VINEXT_KV_CACHE`, so `kvDataAdapter()` with no options works as long as that's your binding name. Other options: `appPrefix` (namespace cache keys to isolate multiple apps in one KV namespace), `ttlSeconds` (default KV `expirationTtl`, default 30 days), `tagCacheTtlMs` (in-memory tag-invalidation cache TTL, default 5s), and `entryCacheTtlSeconds` (optional KV edge-cache TTL for entry reads; tag markers keep KV's default).
629
711
 
630
- Each builder returns a plain, serializable `{ adapter, options }` descriptor — **it never touches the Workers runtime**, so nothing throws at build or dev time when bindings aren't available. The actual adapter (and its `env` binding lookup) is instantiated lazily on the first request.
712
+ When `cdnAdapter()` is used in a Cloudflare build, vinext emits two Worker
713
+ entrypoints and configures Workers Cache only on the response entrypoint. The
714
+ default entrypoint keeps caching disabled so middleware and request-time routing
715
+ run on every request. Do not enable Workers Cache on the default entrypoint in
716
+ your source `wrangler.jsonc`; the generated `dist/server/wrangler.json` contains
717
+ the per-entrypoint cache settings and version metadata binding used for staged
718
+ discovery and warming.
719
+
720
+ The generated version metadata binding lets staged discovery and warming verify
721
+ the uploaded Worker version. Pass `versionMetadataBinding` to `cdnAdapter()`
722
+ only when the deployment needs a custom binding name.
723
+
724
+ `vinext-cloudflare deploy --experimental-warm-cdn-cache` performs the two-stage
725
+ upload and makes one final cache-fill request per admitted identity by default.
726
+ Add `--warm-cdn-certify` only to opt into a second, header-only request that
727
+ must prove every planned entry reusable before promotion.
728
+
729
+ While the data adapter can store entries and serve HIT/STALE itself, the CDN adapter delegates serving to Cloudflare's edge: the origin renders fresh responses and tags them with `Cache-Tag`, and `revalidateTag()` / `revalidatePath()` purge the edge through `ctx.cache.purge({ tags })`. See [examples/response-store-demo](examples/response-store-demo) for the Workers Response Store adapter.
730
+
731
+ The response entrypoint adds a transport-only digest of the complete stage
732
+ identity to its Workers Cache URL. That internal key is independent of zone
733
+ Cache Rules and prevents distinct query, representation, rewrite, or
734
+ interception identities from colliding.
735
+
736
+ Adapter declarations do not access the Workers runtime, so nothing throws at
737
+ config-evaluation or dev time when bindings are unavailable. Builders may also
738
+ provide platform-specific output hooks; `cdnAdapter()` uses one to configure
739
+ the Cloudflare entrypoints after the application build. Runtime adapters (and
740
+ their `env` binding lookups) are instantiated lazily on the first request.
631
741
 
632
742
  Registration is wired into **every router and runtime** — App Router and Pages Router, on Cloudflare Workers as well as the Node.js server (`vinext start`) and dev. It self-guards (instantiated once per isolate) and is resilient: if an adapter can't initialize on a given runtime (e.g. a KV binding doesn't exist on the Node server), vinext logs a warning and falls back to the default handler instead of failing requests.
633
743
 
@@ -638,9 +748,7 @@ vinext({
638
748
  cache: {
639
749
  data: {
640
750
  adapter: require.resolve("./my-adapter.js"),
641
- options: {
642
- /* … */
643
- },
751
+ options: {/* … */},
644
752
  },
645
753
  },
646
754
  });
@@ -672,7 +780,7 @@ We measure three things:
672
780
  - **Client bundle size** — gzipped output of each build.
673
781
  - **Dev server cold start** — 10 runs, randomized execution order. Vite's dependency optimizer cache is cleared before each run.
674
782
 
675
- Benchmarks run on GitHub CI runners (2-core Ubuntu) on every merge to `main`. See the launch numbers in the [announcement blog post](https://blog.cloudflare.com/vinext/) and the latest results at **[vinext-web.vinext.workers.dev/benchmarks](https://vinext-web.vinext.workers.dev/benchmarks)**.
783
+ Benchmarks run on GitHub CI runners (2-core Ubuntu) on every merge to `main`. See the launch numbers in the [announcement blog post](https://blog.cloudflare.com/vinext/) and the latest results at **[vinext.dev/benchmarks](https://vinext.dev/benchmarks)**.
676
784
 
677
785
  <details>
678
786
  <summary>Why the bundle size difference?</summary>
@@ -0,0 +1,25 @@
1
+ # Third-party licenses
2
+
3
+ ## ua-parser-js
4
+
5
+ MIT License
6
+
7
+ Copyright (c) 2012-2021 Faisal Salman <f@faisalman.com>
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ import "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
+ key = keys[i];
13
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
21
+ value: mod,
22
+ enumerable: true
23
+ }) : target, mod));
24
+ //#endregion
25
+ export { __commonJSMin, __toESM };
@@ -0,0 +1,41 @@
1
+ import { AppRoute } from "../routing/app-route-graph.js";
2
+ import { Rollup } from "vite";
3
+ import { RscPluginManager } from "@vitejs/plugin-rsc";
4
+ //#region src/build/action-owner-manifest.d.ts
5
+ type ActionOwnerRoute = Pick<AppRoute, "errorPath" | "errorPaths" | "forbiddenPath" | "forbiddenPaths" | "layoutErrorPaths" | "layouts" | "loadingPath" | "loadingPaths" | "notFoundPath" | "notFoundPaths" | "pagePath" | "parallelSlots" | "pattern" | "siblingIntercepts" | "templates" | "unauthorizedPath" | "unauthorizedPaths">;
6
+ export type ActionOwnerRouteReachability = Map<string, {
7
+ clientReferenceImportIds: Set<string>;
8
+ serverReferenceIds: Set<string>;
9
+ }>;
10
+ type ActionOwnerModuleInfo = Pick<Rollup.ModuleInfo, "dynamicallyImportedIds" | "importedIds">;
11
+ type ActionOwnerReferenceMaps = {
12
+ clientReferenceMetaMap: RscPluginManager["clientReferenceMetaMap"];
13
+ serverReferenceMetaMap: RscPluginManager["serverReferences"]["metaMap"];
14
+ };
15
+ export declare function actionOwnerRouteEntryIds(route: ActionOwnerRoute): string[];
16
+ export declare function collectReachableActionReferences(options: {
17
+ canonicalizeModuleId?: (id: string) => string;
18
+ getModuleInfo: (id: string) => ActionOwnerModuleInfo | null;
19
+ roots: readonly string[];
20
+ } & ActionOwnerReferenceMaps): {
21
+ clientReferenceImportIds: Set<string>;
22
+ serverReferenceIds: Set<string>;
23
+ };
24
+ export declare function collectRscActionReachability(options: {
25
+ canonicalizeModuleId?: (id: string) => string;
26
+ getModuleInfo: (id: string) => ActionOwnerModuleInfo | null;
27
+ routes: readonly ActionOwnerRoute[];
28
+ sharedRoots?: readonly string[];
29
+ } & ActionOwnerReferenceMaps): ActionOwnerRouteReachability;
30
+ export declare function resolveClientReferenceImportIds(options: {
31
+ canonicalizeModuleId?: (id: string) => string;
32
+ resolveId: (id: string) => Promise<string | null>;
33
+ routeReachability: ActionOwnerRouteReachability;
34
+ }): Promise<void>;
35
+ export declare function addClientActionReachability(options: {
36
+ canonicalizeModuleId?: (id: string) => string;
37
+ getModuleInfo: (id: string) => ActionOwnerModuleInfo | null;
38
+ routeReachability: ActionOwnerRouteReachability;
39
+ } & ActionOwnerReferenceMaps): void;
40
+ export declare function buildActionOwnerManifest(routeReachability: ActionOwnerRouteReachability): Record<string, string[]>;
41
+ //#endregion
@@ -0,0 +1,110 @@
1
+ //#region src/build/action-owner-manifest.ts
2
+ function actionOwnerRouteEntryIds(route) {
3
+ return [
4
+ route.pagePath,
5
+ ...route.layouts,
6
+ ...route.templates,
7
+ route.loadingPath,
8
+ ...route.loadingPaths ?? [],
9
+ route.errorPath,
10
+ ...route.layoutErrorPaths ?? [],
11
+ ...route.errorPaths ?? [],
12
+ route.notFoundPath,
13
+ ...route.notFoundPaths ?? [],
14
+ route.forbiddenPath,
15
+ ...route.forbiddenPaths ?? [],
16
+ route.unauthorizedPath,
17
+ ...route.unauthorizedPaths ?? [],
18
+ ...route.parallelSlots.flatMap((slot) => [
19
+ slot.pagePath,
20
+ slot.defaultPath,
21
+ slot.layoutPath,
22
+ ...slot.configLayoutPaths ?? [],
23
+ slot.loadingPath,
24
+ ...slot.loadingPaths ?? [],
25
+ slot.errorPath,
26
+ slot.notFoundPath,
27
+ ...slot.interceptingRoutes.flatMap((intercept) => [
28
+ intercept.pagePath,
29
+ ...intercept.layoutPaths,
30
+ ...intercept.loadingPaths ?? [],
31
+ intercept.notFoundPath
32
+ ])
33
+ ]),
34
+ ...route.siblingIntercepts.flatMap((intercept) => [
35
+ intercept.pagePath,
36
+ ...intercept.layoutPaths,
37
+ ...intercept.loadingPaths ?? [],
38
+ intercept.notFoundPath
39
+ ])
40
+ ].filter((value) => typeof value === "string");
41
+ }
42
+ function collectReachableActionReferences(options) {
43
+ const canonicalizeModuleId = options.canonicalizeModuleId ?? ((id) => id);
44
+ const clientReferenceImportIds = /* @__PURE__ */ new Set();
45
+ const serverReferenceIds = /* @__PURE__ */ new Set();
46
+ const visited = /* @__PURE__ */ new Set();
47
+ const queue = options.roots.map(canonicalizeModuleId);
48
+ for (let index = 0; index < queue.length; index++) {
49
+ const id = queue[index];
50
+ if (visited.has(id)) continue;
51
+ visited.add(id);
52
+ const clientReference = options.clientReferenceMetaMap[id];
53
+ if (clientReference) clientReferenceImportIds.add(clientReference.importId);
54
+ const serverReference = options.serverReferenceMetaMap.get(id);
55
+ if (serverReference) for (const exportName of serverReference.exportNames) serverReferenceIds.add(`${serverReference.referenceKey}#${exportName}`);
56
+ const info = options.getModuleInfo(id);
57
+ for (const importedId of [...info?.importedIds ?? [], ...info?.dynamicallyImportedIds ?? []]) if (!visited.has(importedId)) queue.push(importedId);
58
+ }
59
+ return {
60
+ clientReferenceImportIds,
61
+ serverReferenceIds
62
+ };
63
+ }
64
+ function collectRscActionReachability(options) {
65
+ const routeReachability = new Map(options.routes.map((route) => [route.pattern, collectReachableActionReferences({
66
+ canonicalizeModuleId: options.canonicalizeModuleId,
67
+ clientReferenceMetaMap: options.clientReferenceMetaMap,
68
+ getModuleInfo: options.getModuleInfo,
69
+ roots: actionOwnerRouteEntryIds(route),
70
+ serverReferenceMetaMap: options.serverReferenceMetaMap
71
+ })]));
72
+ if (options.sharedRoots?.length) routeReachability.set("*", collectReachableActionReferences({
73
+ canonicalizeModuleId: options.canonicalizeModuleId,
74
+ clientReferenceMetaMap: options.clientReferenceMetaMap,
75
+ getModuleInfo: options.getModuleInfo,
76
+ roots: options.sharedRoots,
77
+ serverReferenceMetaMap: options.serverReferenceMetaMap
78
+ }));
79
+ return routeReachability;
80
+ }
81
+ async function resolveClientReferenceImportIds(options) {
82
+ const canonicalizeModuleId = options.canonicalizeModuleId ?? ((id) => id);
83
+ for (const reachability of options.routeReachability.values()) {
84
+ const resolvedImportIds = /* @__PURE__ */ new Set();
85
+ for (const importId of reachability.clientReferenceImportIds) {
86
+ const resolvedId = await options.resolveId(importId) ?? importId;
87
+ resolvedImportIds.add(canonicalizeModuleId(resolvedId));
88
+ }
89
+ reachability.clientReferenceImportIds = resolvedImportIds;
90
+ }
91
+ }
92
+ function addClientActionReachability(options) {
93
+ for (const reachability of options.routeReachability.values()) {
94
+ const clientReachability = collectReachableActionReferences({
95
+ canonicalizeModuleId: options.canonicalizeModuleId,
96
+ clientReferenceMetaMap: options.clientReferenceMetaMap,
97
+ getModuleInfo: options.getModuleInfo,
98
+ roots: [...reachability.clientReferenceImportIds],
99
+ serverReferenceMetaMap: options.serverReferenceMetaMap
100
+ });
101
+ for (const actionId of clientReachability.serverReferenceIds) reachability.serverReferenceIds.add(actionId);
102
+ }
103
+ }
104
+ function buildActionOwnerManifest(routeReachability) {
105
+ const manifest = {};
106
+ for (const [pattern, reachability] of routeReachability) for (const actionId of reachability.serverReferenceIds) (manifest[actionId] ??= []).push(pattern);
107
+ return manifest;
108
+ }
109
+ //#endregion
110
+ export { actionOwnerRouteEntryIds, addClientActionReachability, buildActionOwnerManifest, collectReachableActionReferences, collectRscActionReachability, resolveClientReferenceImportIds };
@@ -16,7 +16,7 @@
16
16
  * patterns with `.gitignore` semantics (via the `ignore` package), so the bare
17
17
  * `.vite` entry excludes the directory and everything beneath it.
18
18
  */
19
- declare const DEFAULT_VINEXT_ASSET_IGNORE_PATTERNS: readonly string[];
19
+ export declare const DEFAULT_VINEXT_ASSET_IGNORE_PATTERNS: readonly string[];
20
20
  /**
21
21
  * Ensure a `.assetsignore` in `clientDir` contains every pattern in `patterns`.
22
22
  *
@@ -27,6 +27,5 @@ declare const DEFAULT_VINEXT_ASSET_IGNORE_PATTERNS: readonly string[];
27
27
  * @returns `true` when the file was created or modified, `false` when it already
28
28
  * covered every requested pattern.
29
29
  */
30
- declare function ensureAssetsIgnore(clientDir: string, patterns?: readonly string[]): boolean;
31
- //#endregion
32
- export { DEFAULT_VINEXT_ASSET_IGNORE_PATTERNS, ensureAssetsIgnore };
30
+ export declare function ensureAssetsIgnore(clientDir: string, patterns?: readonly string[]): boolean;
31
+ //#endregion
@@ -8,6 +8,5 @@ type CleanBuildOutputResult = {
8
8
  cleaned: boolean;
9
9
  outDir: string;
10
10
  };
11
- declare function cleanBuildOutput(options: CleanBuildOutputOptions): CleanBuildOutputResult;
12
- //#endregion
13
- export { cleanBuildOutput };
11
+ export declare function cleanBuildOutput(options: CleanBuildOutputOptions): CleanBuildOutputResult;
12
+ //#endregion
@@ -1,4 +1,5 @@
1
1
  import path from "../deps/.pnpm/pathslash@0.1.0/deps/pathslash/dist/index.js";
2
+ import { isPathInsideOrEqual } from "../utils/path.js";
2
3
  import fs from "node:fs";
3
4
  //#region src/build/clean-output.ts
4
5
  function resolveOutDir(root, outDir) {
@@ -6,10 +7,6 @@ function resolveOutDir(root, outDir) {
6
7
  if (!outDir) return path.join(resolvedRoot, "dist");
7
8
  return path.isAbsolute(outDir) ? outDir : path.resolve(resolvedRoot, outDir);
8
9
  }
9
- function isPathInsideOrEqual(parent, child) {
10
- const relative = path.relative(parent, child);
11
- return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
12
- }
13
10
  function shouldCleanBuildOutput(options) {
14
11
  if (options.emptyOutDir === false) return false;
15
12
  if (options.emptyOutDir === true) return true;
@@ -1,5 +1,4 @@
1
1
  import { UserConfig } from "vite";
2
-
3
2
  //#region src/build/client-build-config.d.ts
4
3
  type ClientAssetFileNameInfo = {
5
4
  readonly name?: string;
@@ -13,7 +12,7 @@ type ClientAssetFileNameInfo = {
13
12
  * function so it can inspect every source-name candidate Rolldown records for
14
13
  * an asset (a single output asset can carry several `originalFileNames`).
15
14
  */
16
- declare function createClientAssetFileNames(assetsDir: string): (assetInfo: ClientAssetFileNameInfo) => string;
15
+ export declare function createClientAssetFileNames(assetsDir: string): (assetInfo: ClientAssetFileNameInfo) => string;
17
16
  /**
18
17
  * Create a manualChunks function for client builds.
19
18
  *
@@ -39,12 +38,12 @@ declare function createClientAssetFileNames(assetsDir: string): (assetInfo: Clie
39
38
  * well: shared dependencies between routes get their own chunks,
40
39
  * and route-specific code stays in route chunks.
41
40
  */
42
- declare function createClientManualChunks(shimsDir: string, preserveRouteBoundaries?: boolean): (id: string) => string | undefined;
43
- declare function createClientFileNameConfig(assetsDir: string): {
41
+ export declare function createClientManualChunks(shimsDir: string, preserveRouteBoundaries?: boolean): (id: string) => string | undefined;
42
+ export declare function createClientFileNameConfig(assetsDir: string): {
44
43
  entryFileNames: string;
45
44
  chunkFileNames: string;
46
45
  };
47
- declare function createClientCodeSplittingConfig(clientManualChunks: (id: string) => string | undefined): {
46
+ export declare function createClientCodeSplittingConfig(clientManualChunks: (id: string) => string | undefined): {
48
47
  minSize: number;
49
48
  groups: {
50
49
  name(moduleId: string): string | null;
@@ -55,8 +54,16 @@ declare function createClientCodeSplittingConfig(clientManualChunks: (id: string
55
54
  * Derived from the package list so the regex and {@link isRscFrameworkModule}
56
55
  * predicate can't drift.
57
56
  */
58
- declare const RSC_FRAMEWORK_CHUNK_TEST: RegExp;
59
- declare function isRscFrameworkModule(id: string): boolean;
57
+ export declare const RSC_FRAMEWORK_CHUNK_TEST: RegExp;
58
+ export declare function isRscFrameworkModule(id: string): boolean;
59
+ /**
60
+ * Keep virtual entry ids out of emitted RSC chunk filenames.
61
+ *
62
+ * Rolldown's entries-aware chunk names can contain the `\\0` virtual-id marker,
63
+ * which is not a portable module-specifier or filesystem name. Preserve every
64
+ * other character and remove both the printable and actual-NUL forms.
65
+ */
66
+ export declare function sanitizeRscChunkFileName(name: string): string;
60
67
  /**
61
68
  * Output config that isolates React (and the RSC flight runtime) into a
62
69
  * dedicated "framework" chunk in the RSC server build. See
@@ -64,7 +71,8 @@ declare function isRscFrameworkModule(id: string): boolean;
64
71
  * modules that are only reachable through dynamic imports must stay out of the
65
72
  * eager framework chunk (issue #2073).
66
73
  */
67
- declare function createRscFrameworkChunkOutputConfig(): {
74
+ export declare function createRscFrameworkChunkOutputConfig(): {
75
+ sanitizeFileName: typeof sanitizeRscChunkFileName;
68
76
  codeSplitting: {
69
77
  groups: {
70
78
  name: string;
@@ -81,12 +89,30 @@ declare function createRscFrameworkChunkOutputConfig(): {
81
89
  * treats node_modules as side-effect-free while preserving side effects in
82
90
  * local code.
83
91
  */
84
- declare function getClientTreeshakeConfig(): {
92
+ export declare function getClientTreeshakeConfig(): {
85
93
  moduleSideEffects: "no-external";
86
94
  };
87
95
  type VinextBuildConfig = NonNullable<UserConfig["build"]>;
88
96
  type VinextBuildBundlerOptions = NonNullable<VinextBuildConfig["rolldownOptions"]>;
89
- declare function getBuildBundlerOptions(build: UserConfig["build"] | undefined): VinextBuildBundlerOptions | undefined;
90
- declare function withBuildBundlerOptions(bundlerOptions: VinextBuildBundlerOptions): Partial<VinextBuildConfig>;
91
- //#endregion
92
- export { RSC_FRAMEWORK_CHUNK_TEST, createClientAssetFileNames, createClientCodeSplittingConfig, createClientFileNameConfig, createClientManualChunks, createRscFrameworkChunkOutputConfig, getBuildBundlerOptions, getClientTreeshakeConfig, isRscFrameworkModule, withBuildBundlerOptions };
97
+ export declare function getBuildBundlerOptions(build: UserConfig["build"] | undefined): VinextBuildBundlerOptions | undefined;
98
+ export declare function withBuildBundlerOptions(bundlerOptions: VinextBuildBundlerOptions): Partial<VinextBuildConfig>;
99
+ type VinextBuildOutput = Exclude<NonNullable<VinextBuildBundlerOptions["output"]>, readonly unknown[]>;
100
+ type VinextCodeSplittingConfig = Exclude<NonNullable<VinextBuildOutput["codeSplitting"]>, boolean>;
101
+ type ChunkFileNames = NonNullable<VinextBuildOutput["chunkFileNames"]>;
102
+ type ChunkFileNameFunction = Exclude<ChunkFileNames, string>;
103
+ /**
104
+ * Keep vinext modules partitioned by the stage entries that actually use them.
105
+ * Without an entry-aware catch-all, Rolldown may merge a small helper shared by
106
+ * request/response entries into a response-heavy chunk; importing that helper
107
+ * then evaluates React and renderer code on a request-stage cache hit.
108
+ */
109
+ export declare function createMultiStageCodeSplittingConfig(existing: VinextBuildOutput["codeSplitting"]): VinextCodeSplittingConfig & {
110
+ groups: NonNullable<VinextCodeSplittingConfig["groups"]>;
111
+ };
112
+ /**
113
+ * Keep router stage chunks beside the server entry so their generated
114
+ * `./vinext-client-assets.js` external continues to resolve. Other chunks keep
115
+ * the host's existing output pattern (or vinext's server-assets default).
116
+ */
117
+ export declare function createMultiStageChunkFileNames(assetsDir: string, existing: VinextBuildOutput["chunkFileNames"]): ChunkFileNameFunction;
118
+ //#endregion