vinext 1.3.0 → 1.3.1

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 (391) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +1 -1
  2. package/dist/build/action-owner-manifest.d.ts +3 -2
  3. package/dist/build/action-owner-manifest.js +18 -2
  4. package/dist/build/app-page-static-eligibility.d.ts +17 -1
  5. package/dist/build/app-page-static-eligibility.js +80 -13
  6. package/dist/build/clean-output.d.ts +2 -1
  7. package/dist/build/client-build-config.d.ts +13 -3
  8. package/dist/build/client-build-config.js +46 -9
  9. package/dist/build/client-reference-async.d.ts +48 -0
  10. package/dist/build/client-reference-async.js +123 -0
  11. package/dist/build/client-reference-chunks.d.ts +32 -0
  12. package/dist/build/client-reference-chunks.js +111 -0
  13. package/dist/build/client-reference-groups.d.ts +9 -1
  14. package/dist/build/client-reference-groups.js +40 -2
  15. package/dist/build/css-url-assets.d.ts +2 -1
  16. package/dist/build/google-fonts/fallback-metrics.d.ts +2 -1
  17. package/dist/build/google-fonts/find-font-files-in-css.d.ts +1 -0
  18. package/dist/build/google-fonts/find-font-files-in-css.js +17 -4
  19. package/dist/build/google-fonts/font-metadata.d.ts +2 -1
  20. package/dist/build/google-fonts/validate.d.ts +2 -1
  21. package/dist/build/inline-css.d.ts +2 -1
  22. package/dist/build/layout-classification.d.ts +2 -1
  23. package/dist/build/module-dependency-cache.d.ts +2 -1
  24. package/dist/build/next-client-runtime-manifests.d.ts +2 -1
  25. package/dist/build/precompress.d.ts +2 -1
  26. package/dist/build/precompress.js +1 -1
  27. package/dist/build/prerender-paths.d.ts +2 -1
  28. package/dist/build/prerender-phase.d.ts +2 -1
  29. package/dist/build/prerender-server-pool.js +1 -1
  30. package/dist/build/prerender.d.ts +3 -2
  31. package/dist/build/prerender.js +5 -4
  32. package/dist/build/report.d.ts +2 -1
  33. package/dist/build/route-classification-injector.d.ts +2 -1
  34. package/dist/build/route-classification-manifest.d.ts +2 -1
  35. package/dist/build/run-prerender.d.ts +2 -1
  36. package/dist/build/server-actions-encryption-key.d.ts +2 -1
  37. package/dist/build/ssr-manifest.js +25 -2
  38. package/dist/build/standalone.d.ts +2 -1
  39. package/dist/cache/cache-adapters-virtual.d.ts +2 -1
  40. package/dist/cache.js +1 -2
  41. package/dist/check.d.ts +2 -1
  42. package/dist/check.js +4 -0
  43. package/dist/cli-args.d.ts +2 -1
  44. package/dist/cli.js +2 -0
  45. package/dist/client/client-redirect-matcher.js +2 -1
  46. package/dist/client/client-redirects.d.ts +4 -3
  47. package/dist/client/client-redirects.js +2 -1
  48. package/dist/client/client-rewrites.d.ts +2 -1
  49. package/dist/client/dev-error-overlay-store.d.ts +2 -1
  50. package/dist/client/index.js +1 -2
  51. package/dist/client/instrumentation-client-state.js +5 -5
  52. package/dist/client/navigation-runtime.d.ts +3 -1
  53. package/dist/client/navigation-runtime.js +1 -1
  54. package/dist/client/pages-router-link-navigation.d.ts +2 -1
  55. package/dist/client/vinext-next-data.d.ts +25 -1
  56. package/dist/client/window-next.d.ts +2 -1
  57. package/dist/config/config-matchers.d.ts +12 -1
  58. package/dist/config/config-matchers.js +111 -16
  59. package/dist/config/dotenv.d.ts +2 -1
  60. package/dist/config/next-config.d.ts +13 -1
  61. package/dist/config/next-config.js +29 -4
  62. package/dist/config/tsconfig-paths.d.ts +2 -1
  63. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/detector.js +23 -0
  64. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/index.js +2 -0
  65. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/lookup.js +25 -0
  66. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/bmp.js +11 -0
  67. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/cur.js +15 -0
  68. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/dds.js +11 -0
  69. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/gif.js +12 -0
  70. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/heif.js +55 -0
  71. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/icns.js +76 -0
  72. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ico.js +39 -0
  73. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/index.js +46 -0
  74. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/j2c.js +11 -0
  75. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jp2.js +21 -0
  76. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jpg.js +71 -0
  77. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl-stream.js +42 -0
  78. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl.js +46 -0
  79. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ktx.js +19 -0
  80. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/png.js +28 -0
  81. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/pnm.js +54 -0
  82. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/psd.js +11 -0
  83. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/svg.js +79 -0
  84. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tga.js +15 -0
  85. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tiff.js +96 -0
  86. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/utils.js +53 -0
  87. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/webp.js +45 -0
  88. package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/utils/bit-reader.js +38 -0
  89. package/dist/deps/.pnpm/ua-parser-js@1.0.35/deps/ua-parser-js/src/ua-parser.js +2 -2
  90. package/dist/entries/app-browser-entry.d.ts +20 -5
  91. package/dist/entries/app-browser-entry.js +79 -6
  92. package/dist/entries/app-rsc-entry.d.ts +2 -1
  93. package/dist/entries/app-rsc-entry.js +42 -12
  94. package/dist/entries/app-rsc-manifest.d.ts +2 -1
  95. package/dist/entries/app-rsc-manifest.js +53 -0
  96. package/dist/entries/pages-entry-helpers.js +1 -2
  97. package/dist/entries/pages-server-entry.d.ts +2 -1
  98. package/dist/entries/pages-server-entry.js +1 -1
  99. package/dist/entries/runtime-entry-module.d.ts +1 -0
  100. package/dist/entries/runtime-entry-module.js +4 -1
  101. package/dist/image/image-adapters-virtual.d.ts +2 -1
  102. package/dist/index.js +102 -34
  103. package/dist/plugins/client-compile-hints.d.ts +30 -0
  104. package/dist/plugins/client-compile-hints.js +88 -0
  105. package/dist/plugins/client-reference-dedup.d.ts +2 -1
  106. package/dist/plugins/cloudflare-dev-module-urls.d.ts +2 -1
  107. package/dist/plugins/dynamic-preload-metadata.d.ts +3 -1
  108. package/dist/plugins/dynamic-preload-metadata.js +1 -1
  109. package/dist/plugins/environment.d.ts +2 -1
  110. package/dist/plugins/fonts.js +9 -12
  111. package/dist/plugins/ignore-dynamic-requests.d.ts +2 -1
  112. package/dist/plugins/import-meta-url.d.ts +2 -1
  113. package/dist/plugins/og-assets.d.ts +2 -1
  114. package/dist/plugins/og-assets.js +2 -3
  115. package/dist/plugins/optimize-imports.d.ts +2 -1
  116. package/dist/plugins/pages-node-externals.d.ts +2 -1
  117. package/dist/plugins/remove-console.d.ts +2 -1
  118. package/dist/plugins/require-condition-resolution.d.ts +2 -1
  119. package/dist/plugins/rsc-client-reference-loaders.d.ts +8 -0
  120. package/dist/plugins/rsc-client-reference-loaders.js +170 -68
  121. package/dist/plugins/rsc-client-shim-excludes.js +2 -0
  122. package/dist/plugins/sass.d.ts +2 -1
  123. package/dist/plugins/strip-server-exports.d.ts +2 -1
  124. package/dist/plugins/styled-jsx.d.ts +2 -1
  125. package/dist/plugins/transform-result.d.ts +2 -1
  126. package/dist/plugins/typeof-window.d.ts +2 -1
  127. package/dist/plugins/worker-image-imports.js +1 -1
  128. package/dist/plugins/worker-use-server.d.ts +2 -1
  129. package/dist/routing/app-route-graph.d.ts +40 -0
  130. package/dist/routing/app-route-graph.js +122 -50
  131. package/dist/routing/browser-route-manifest.d.ts +2 -1
  132. package/dist/routing/optimistic-route-trie.d.ts +2 -1
  133. package/dist/routing/route-matching.d.ts +2 -1
  134. package/dist/routing/route-pattern.d.ts +2 -1
  135. package/dist/server/accept-encoding.d.ts +2 -1
  136. package/dist/server/app-action-forwarding.d.ts +2 -1
  137. package/dist/server/app-bfcache-identity.d.ts +2 -1
  138. package/dist/server/app-browser-action-result.d.ts +2 -1
  139. package/dist/server/app-browser-client-reuse-manifest.d.ts +2 -1
  140. package/dist/server/app-browser-entry.js +30 -6
  141. package/dist/server/app-browser-error.d.ts +2 -1
  142. package/dist/server/app-browser-history-controller.d.ts +2 -1
  143. package/dist/server/app-browser-hydration.d.ts +2 -1
  144. package/dist/server/app-browser-interception-context.d.ts +2 -1
  145. package/dist/server/app-browser-navigation-controller.js +15 -10
  146. package/dist/server/app-browser-popstate.d.ts +2 -1
  147. package/dist/server/app-browser-rsc-redirect.d.ts +2 -1
  148. package/dist/server/app-browser-server-action-client.d.ts +2 -1
  149. package/dist/server/app-browser-state.js +1 -1
  150. package/dist/server/app-browser-stream.d.ts +2 -1
  151. package/dist/server/app-browser-visible-commit.d.ts +2 -1
  152. package/dist/server/app-client-reference-manifest.d.ts +31 -0
  153. package/dist/server/app-client-reference-manifest.js +46 -0
  154. package/dist/server/app-client-reference-preloader.d.ts +25 -5
  155. package/dist/server/app-client-reference-preloader.js +22 -7
  156. package/dist/server/app-elements-wire.d.ts +2 -1
  157. package/dist/server/app-elements.d.ts +2 -0
  158. package/dist/server/app-elements.js +3 -1
  159. package/dist/server/app-fallback-renderer.d.ts +9 -2
  160. package/dist/server/app-fallback-renderer.js +4 -1
  161. package/dist/server/app-history-state.d.ts +2 -1
  162. package/dist/server/app-inline-css-client.d.ts +2 -1
  163. package/dist/server/app-layout-param-observation.d.ts +2 -1
  164. package/dist/server/app-metadata-tracing.d.ts +2 -1
  165. package/dist/server/app-optimistic-routing.d.ts +18 -1
  166. package/dist/server/app-optimistic-routing.js +34 -1
  167. package/dist/server/app-page-boundary-render.d.ts +20 -2
  168. package/dist/server/app-page-boundary-render.js +221 -38
  169. package/dist/server/app-page-boundary.d.ts +34 -5
  170. package/dist/server/app-page-boundary.js +40 -7
  171. package/dist/server/app-page-cache-finalizer.d.ts +2 -1
  172. package/dist/server/app-page-cache-finalizer.js +1 -1
  173. package/dist/server/app-page-cache-render.d.ts +10 -2
  174. package/dist/server/app-page-cache-render.js +14 -2
  175. package/dist/server/app-page-cache.js +2 -2
  176. package/dist/server/app-page-dispatch.d.ts +34 -1
  177. package/dist/server/app-page-dispatch.js +163 -34
  178. package/dist/server/app-page-element-builder.d.ts +17 -1
  179. package/dist/server/app-page-element-builder.js +187 -66
  180. package/dist/server/app-page-execution.d.ts +28 -1
  181. package/dist/server/app-page-execution.js +114 -5
  182. package/dist/server/app-page-head.d.ts +95 -3
  183. package/dist/server/app-page-head.js +307 -152
  184. package/dist/server/app-page-http-access-fallback-metadata.d.ts +48 -2
  185. package/dist/server/app-page-http-access-fallback-metadata.js +76 -1
  186. package/dist/server/app-page-method.d.ts +2 -1
  187. package/dist/server/app-page-probe.d.ts +2 -1
  188. package/dist/server/app-page-render-identity.d.ts +2 -1
  189. package/dist/server/app-page-render.d.ts +7 -1
  190. package/dist/server/app-page-render.js +35 -10
  191. package/dist/server/app-page-request.d.ts +14 -1
  192. package/dist/server/app-page-request.js +1 -1
  193. package/dist/server/app-page-route-wiring.d.ts +52 -2
  194. package/dist/server/app-page-route-wiring.js +197 -47
  195. package/dist/server/app-page-rsc-render-status.d.ts +2 -1
  196. package/dist/server/app-page-search-params-observation.d.ts +7 -2
  197. package/dist/server/app-page-search-params-observation.js +8 -1
  198. package/dist/server/app-page-segment-plan.d.ts +2 -1
  199. package/dist/server/app-page-stream.d.ts +31 -1
  200. package/dist/server/app-page-stream.js +23 -4
  201. package/dist/server/app-pages-bridge.d.ts +2 -1
  202. package/dist/server/app-ppr-fallback-shell-render.d.ts +2 -1
  203. package/dist/server/app-ppr-fallback-shell.d.ts +2 -1
  204. package/dist/server/app-prerender-endpoints.d.ts +2 -1
  205. package/dist/server/app-prerender-static-params.d.ts +2 -1
  206. package/dist/server/app-render-dependency.d.ts +11 -1
  207. package/dist/server/app-render-dependency.js +26 -7
  208. package/dist/server/app-request-stage-independent-entry.d.ts +2 -1
  209. package/dist/server/app-response-stage-entry.d.ts +2 -1
  210. package/dist/server/app-route-handler-cache.d.ts +2 -1
  211. package/dist/server/app-route-handler-dispatch.d.ts +2 -1
  212. package/dist/server/app-route-handler-dispatch.js +1 -1
  213. package/dist/server/app-route-handler-execution.d.ts +2 -1
  214. package/dist/server/app-route-handler-response.d.ts +2 -1
  215. package/dist/server/app-route-handler-runtime.d.ts +2 -1
  216. package/dist/server/app-route-module-loader.d.ts +18 -1
  217. package/dist/server/app-route-module-loader.js +8 -0
  218. package/dist/server/app-route-tree-prefetch.d.ts +2 -1
  219. package/dist/server/app-rsc-error-handler.d.ts +2 -1
  220. package/dist/server/app-rsc-errors.d.ts +2 -1
  221. package/dist/server/app-rsc-handler.d.ts +2 -1
  222. package/dist/server/app-rsc-handler.js +6 -10
  223. package/dist/server/app-rsc-response-finalizer.d.ts +2 -1
  224. package/dist/server/app-rsc-route-matching.d.ts +38 -1
  225. package/dist/server/app-rsc-route-matching.js +24 -0
  226. package/dist/server/app-segment-config.d.ts +2 -1
  227. package/dist/server/app-segment-config.js +1 -14
  228. package/dist/server/app-server-action-execution.d.ts +2 -1
  229. package/dist/server/app-server-action-execution.js +3 -3
  230. package/dist/server/app-ssr-entry.d.ts +6 -0
  231. package/dist/server/app-ssr-entry.js +91 -44
  232. package/dist/server/app-ssr-error-meta.d.ts +2 -1
  233. package/dist/server/app-ssr-search-params-gate.d.ts +2 -1
  234. package/dist/server/app-ssr-stream.d.ts +22 -10
  235. package/dist/server/app-ssr-stream.js +299 -67
  236. package/dist/server/app-static-generation.d.ts +2 -1
  237. package/dist/server/app-streamed-client-references.d.ts +39 -0
  238. package/dist/server/app-streamed-client-references.js +156 -0
  239. package/dist/server/app-visited-response-cache.d.ts +2 -1
  240. package/dist/server/app-worker-stages.d.ts +2 -1
  241. package/dist/server/artifact-compatibility.d.ts +2 -1
  242. package/dist/server/bfcache-identity.d.ts +2 -1
  243. package/dist/server/cache-headers.d.ts +2 -1
  244. package/dist/server/cacheability-request.d.ts +2 -1
  245. package/dist/server/client-reuse-manifest.d.ts +2 -1
  246. package/dist/server/config-headers.d.ts +2 -1
  247. package/dist/server/csp.d.ts +2 -1
  248. package/dist/server/default-global-not-found-module.d.ts +2 -1
  249. package/dist/server/default-http-access-fallback-modules.d.ts +33 -0
  250. package/dist/server/default-http-access-fallback-modules.js +31 -0
  251. package/dist/server/defer-until-stream-consumed.d.ts +34 -0
  252. package/dist/server/defer-until-stream-consumed.js +154 -21
  253. package/dist/server/dev-lockfile.d.ts +32 -2
  254. package/dist/server/dev-lockfile.js +46 -2
  255. package/dist/server/dev-module-runner.d.ts +2 -1
  256. package/dist/server/dev-server.js +10 -3
  257. package/dist/server/fetch-handler.js +1 -2
  258. package/dist/server/file-based-metadata.d.ts +2 -1
  259. package/dist/server/framework-tracer.d.ts +2 -1
  260. package/dist/server/html.d.ts +1 -0
  261. package/dist/server/html.js +19 -1
  262. package/dist/server/http-conditional.d.ts +2 -1
  263. package/dist/server/http-error-responses.d.ts +2 -1
  264. package/dist/server/implicit-tags.d.ts +2 -1
  265. package/dist/server/metadata-route-build-data.d.ts +2 -1
  266. package/dist/server/metadata-route-build-data.js +1 -1
  267. package/dist/server/metadata-route-response.d.ts +2 -1
  268. package/dist/server/metadata-route-response.js +1 -1
  269. package/dist/server/metadata-routes.d.ts +2 -1
  270. package/dist/server/middleware-runtime.d.ts +2 -1
  271. package/dist/server/navigation-trace.d.ts +2 -1
  272. package/dist/server/next-error-digest.d.ts +2 -1
  273. package/dist/server/nitro-public-files-plugin.d.ts +2 -1
  274. package/dist/server/nitro-public-files.d.ts +2 -1
  275. package/dist/server/opentelemetry-api.d.ts +2 -1
  276. package/dist/server/operation-token.d.ts +2 -1
  277. package/dist/server/pages-api-route.d.ts +2 -1
  278. package/dist/server/pages-asset-tags.d.ts +2 -1
  279. package/dist/server/pages-body-parser-config.d.ts +2 -1
  280. package/dist/server/pages-client-assets.d.ts +4 -0
  281. package/dist/server/pages-data-route.d.ts +2 -1
  282. package/dist/server/pages-document-asset-props.d.ts +2 -1
  283. package/dist/server/pages-document-initial-props.d.ts +2 -1
  284. package/dist/server/pages-execution-tracing.d.ts +2 -1
  285. package/dist/server/pages-execution-tracing.js +1 -1
  286. package/dist/server/pages-get-initial-props.d.ts +2 -1
  287. package/dist/server/pages-page-data.d.ts +7 -1
  288. package/dist/server/pages-page-data.js +35 -12
  289. package/dist/server/pages-page-handler.d.ts +3 -2
  290. package/dist/server/pages-page-handler.js +16 -7
  291. package/dist/server/pages-page-method.d.ts +2 -1
  292. package/dist/server/pages-page-response.d.ts +2 -1
  293. package/dist/server/pages-preview.d.ts +2 -1
  294. package/dist/server/pages-readiness.d.ts +2 -1
  295. package/dist/server/pages-request-pipeline.d.ts +2 -1
  296. package/dist/server/pages-request-pipeline.js +4 -5
  297. package/dist/server/pages-request-stage-entry.d.ts +2 -1
  298. package/dist/server/pages-response-stage-entry.d.ts +2 -1
  299. package/dist/server/pages-route-data-kind.d.ts +2 -1
  300. package/dist/server/prerender-cache-life-header.d.ts +2 -1
  301. package/dist/server/prerender-route-params.d.ts +2 -1
  302. package/dist/server/prod-server.js +9 -3
  303. package/dist/server/request-log.d.ts +2 -1
  304. package/dist/server/request-tracing.d.ts +2 -1
  305. package/dist/server/request-tracing.js +1 -1
  306. package/dist/server/response-start-tracing.js +7 -29
  307. package/dist/server/rsc-render-stream.d.ts +4 -0
  308. package/dist/server/rsc-render-stream.js +25 -0
  309. package/dist/server/seed-cache.d.ts +2 -1
  310. package/dist/server/seed-cache.js +1 -1
  311. package/dist/server/static-file-cache.d.ts +2 -1
  312. package/dist/server/static-file-cache.js +1 -0
  313. package/dist/server/static-layout-client-reuse-proof.d.ts +2 -1
  314. package/dist/server/worker-revalidation-context.d.ts +2 -1
  315. package/dist/server/worker-stages.d.ts +2 -1
  316. package/dist/shims/app.d.ts +2 -1
  317. package/dist/shims/cache-callable-runtime.d.ts +2 -1
  318. package/dist/shims/cache-handler.d.ts +8 -3
  319. package/dist/shims/cache-handler.js +29 -9
  320. package/dist/shims/caught-not-found-boundaries.d.ts +15 -0
  321. package/dist/shims/caught-not-found-boundaries.js +48 -0
  322. package/dist/shims/cdn-purge-routes.d.ts +2 -1
  323. package/dist/shims/client-locale.js +2 -1
  324. package/dist/shims/client-page-root.d.ts +2 -1
  325. package/dist/shims/config.d.ts +2 -1
  326. package/dist/shims/default-forbidden.d.ts +4 -0
  327. package/dist/shims/default-forbidden.js +18 -0
  328. package/dist/shims/default-not-found.d.ts +0 -5
  329. package/dist/shims/default-not-found.js +5 -41
  330. package/dist/shims/default-unauthorized.d.ts +4 -0
  331. package/dist/shims/default-unauthorized.js +18 -0
  332. package/dist/shims/error-boundary.d.ts +39 -3
  333. package/dist/shims/error-boundary.js +31 -16
  334. package/dist/shims/font-google.js +1 -2
  335. package/dist/shims/font-utils.d.ts +3 -2
  336. package/dist/shims/font-utils.js +5 -3
  337. package/dist/shims/form.js +1 -1
  338. package/dist/shims/http-access-error-fallback.d.ts +7 -0
  339. package/dist/shims/http-access-error-fallback.js +47 -0
  340. package/dist/shims/image.d.ts +1 -22
  341. package/dist/shims/internal/app-prefetch-fetch-queue.d.ts +22 -2
  342. package/dist/shims/internal/app-prefetch-fetch-queue.js +71 -18
  343. package/dist/shims/internal/app-route-prefetch-policy.d.ts +14 -3
  344. package/dist/shims/internal/app-route-prefetch-policy.js +29 -4
  345. package/dist/shims/internal/cache-context-accessor.d.ts +2 -1
  346. package/dist/shims/internal/client-reference-loader.d.ts +7 -0
  347. package/dist/shims/internal/client-reference-loader.js +91 -0
  348. package/dist/shims/internal/cookie-serialize.d.ts +2 -1
  349. package/dist/shims/internal/cookies.js +1 -2
  350. package/dist/shims/internal/headers-state.d.ts +2 -0
  351. package/dist/shims/internal/headers-state.js +6 -1
  352. package/dist/shims/internal/hybrid-client-route-owner-direct.d.ts +2 -1
  353. package/dist/shims/internal/interpolate-as.d.ts +2 -1
  354. package/dist/shims/internal/pages-data-target.d.ts +2 -1
  355. package/dist/shims/internal/pages-data-url.d.ts +2 -1
  356. package/dist/shims/internal/thenable-well-known-properties.d.ts +2 -1
  357. package/dist/shims/link.js +195 -52
  358. package/dist/shims/metadata.d.ts +32 -11
  359. package/dist/shims/metadata.js +88 -26
  360. package/dist/shims/navigation-errors.d.ts +2 -1
  361. package/dist/shims/navigation.d.ts +22 -2
  362. package/dist/shims/navigation.js +74 -20
  363. package/dist/shims/pages-router-runtime.d.ts +2 -1
  364. package/dist/shims/ppr-fallback-shell.d.ts +2 -1
  365. package/dist/shims/router.js +14 -3
  366. package/dist/shims/unified-request-context.js +3 -3
  367. package/dist/typegen.d.ts +2 -1
  368. package/dist/utils/client-build-manifest.d.ts +4 -1
  369. package/dist/utils/client-build-manifest.js +9 -2
  370. package/dist/utils/client-entry-manifest.d.ts +13 -0
  371. package/dist/utils/client-entry-manifest.js +20 -1
  372. package/dist/utils/client-reference-chunks.d.ts +45 -0
  373. package/dist/utils/client-reference-chunks.js +30 -0
  374. package/dist/utils/client-runtime-metadata.d.ts +9 -1
  375. package/dist/utils/client-runtime-metadata.js +40 -9
  376. package/dist/utils/compare.d.ts +9 -0
  377. package/dist/utils/compare.js +15 -1
  378. package/dist/utils/lazy-chunks.d.ts +14 -0
  379. package/dist/utils/lazy-chunks.js +27 -1
  380. package/dist/utils/middleware-request-headers.d.ts +2 -1
  381. package/dist/utils/project.d.ts +2 -1
  382. package/dist/utils/project.js +9 -1
  383. package/dist/utils/query.d.ts +2 -1
  384. package/dist/utils/sorted-array.d.ts +2 -1
  385. package/dist/utils/vite-cli-invocation.d.ts +2 -1
  386. package/package.json +5 -5
  387. package/dist/deps/.pnpm/image-size@2.0.2/deps/image-size/dist/index.js +0 -808
  388. package/dist/server/default-not-found-module.d.ts +0 -19
  389. package/dist/server/default-not-found-module.js +0 -18
  390. package/dist/server/rsc-stream-hints.d.ts +0 -21
  391. package/dist/server/rsc-stream-hints.js +0 -227
@@ -0,0 +1,111 @@
1
+ import "../plugins/rsc-client-reference-loaders.js";
2
+ import { toManifestModuleId } from "../plugins/dynamic-preload-metadata.js";
3
+ //#region src/build/client-reference-chunks.ts
4
+ /** As Vite's preload helper tells a stylesheet: by its URL's path. */
5
+ function isStylesheet(file) {
6
+ return new URL(file, "http://vinext.local/").pathname.endsWith(".css");
7
+ }
8
+ /**
9
+ * Collect what each App Router client reference loads in the browser from the
10
+ * client bundle: the chunk holding the module that registers it (see
11
+ * plugins/rsc-client-reference-loaders.ts), and the JS chunks and stylesheets
12
+ * that chunk needs, as Vite's preload helper would load them for a dynamic
13
+ * import. JS chunks the App browser entry imports statically have loaded
14
+ * before any Flight row decodes, so they are left out.
15
+ *
16
+ * @param moduleKeys Client reference modules by resolved id, with the keys of
17
+ * the references each registers.
18
+ * @param modulePreload The client build's `build.modulePreload`, which picks
19
+ * the JS chunks to modulepreload, as it does for Vite's preload helper. Its
20
+ * `resolveDependencies` sees the chunk that dynamically imports each
21
+ * registering module as the host, as Vite passes it.
22
+ */
23
+ function collectClientReferenceChunks(bundle, moduleKeys, appBrowserEntry, modulePreload) {
24
+ const chunks = /* @__PURE__ */ new Map();
25
+ let host;
26
+ for (const output of Object.values(bundle)) {
27
+ if (output.type !== "chunk") continue;
28
+ chunks.set(output.fileName, output);
29
+ if (output.facadeModuleId === "\0virtual:vinext-client-reference-chunks") host = output;
30
+ }
31
+ const staticImports = (chunk) => {
32
+ const seen = /* @__PURE__ */ new Set([chunk.fileName]);
33
+ const order = [chunk];
34
+ for (let i = 0; i < order.length; i++) for (const file of order[i].imports) {
35
+ const imported = chunks.get(file);
36
+ if (!imported || seen.has(file)) continue;
37
+ seen.add(file);
38
+ order.push(imported);
39
+ }
40
+ return order;
41
+ };
42
+ const eager = new Set(appBrowserEntry ? staticImports(appBrowserEntry).map((chunk) => chunk.fileName) : []);
43
+ const result = {
44
+ references: {},
45
+ modules: []
46
+ };
47
+ for (const chunk of chunks.values()) {
48
+ const keys = chunk.moduleIds.flatMap((moduleId) => moduleKeys.get(moduleId) ?? []);
49
+ if (keys.length === 0) continue;
50
+ const imports = [];
51
+ const css = /* @__PURE__ */ new Set();
52
+ const visited = /* @__PURE__ */ new Set();
53
+ const addDeps = (loaded) => {
54
+ if (visited.has(loaded.fileName)) return;
55
+ visited.add(loaded.fileName);
56
+ if (loaded !== chunk) imports.push(loaded.fileName);
57
+ for (const file of loaded.imports) {
58
+ const imported = chunks.get(file);
59
+ if (imported) addDeps(imported);
60
+ }
61
+ for (const file of loaded.viteMetadata?.importedCss ?? []) css.add(file);
62
+ };
63
+ addDeps(chunk);
64
+ let preloads = imports.length + css.size > 0 ? [chunk.fileName, ...imports] : [];
65
+ let stylesheets = [...css];
66
+ if (modulePreload === false) preloads = [];
67
+ else if (modulePreload?.resolveDependencies && host) {
68
+ const resolved = modulePreload.resolveDependencies(chunk.fileName, preloads, {
69
+ hostId: host.fileName,
70
+ hostType: "js"
71
+ });
72
+ preloads = resolved.filter((file) => !isStylesheet(file));
73
+ stylesheets = [.../* @__PURE__ */ new Set([...resolved.filter(isStylesheet), ...css])];
74
+ }
75
+ preloads = [...new Set(preloads)].filter((file) => !eager.has(file) && (file !== chunk.fileName || stylesheets.length > 0));
76
+ const index = result.modules.push({
77
+ file: chunk.fileName,
78
+ imports: preloads,
79
+ css: stylesheets
80
+ }) - 1;
81
+ for (const key of keys) result.references[key] = index;
82
+ }
83
+ return result.modules.length > 0 ? result : void 0;
84
+ }
85
+ /**
86
+ * Vite's build manifest keys a dynamic import by the module it imports, and
87
+ * next/dynamic's SSR preloads look up the module a boundary imports (see
88
+ * shims/dynamic-preload-chunks.tsx). The client build imports a client
89
+ * reference outside every group through the module that registers it, not
90
+ * the reference's own module, so map the reference's module to the chunk of
91
+ * the module that registers it, keyed as Vite keys a manifest entry.
92
+ *
93
+ * @param getImportedIds A module's static imports, as the bundler resolved
94
+ * them.
95
+ */
96
+ function collectClientReferenceSources(bundle, getImportedIds, root) {
97
+ const sources = {};
98
+ for (const output of Object.values(bundle)) {
99
+ if (output.type !== "chunk") continue;
100
+ for (const moduleId of output.moduleIds) {
101
+ if (!moduleId.startsWith("\0virtual:vinext-client-reference-module/")) continue;
102
+ const source = getImportedIds(moduleId)?.at(-1);
103
+ if (source === void 0 || source.startsWith("\0")) continue;
104
+ const key = toManifestModuleId(root, source);
105
+ if (key) sources[key] = output.fileName;
106
+ }
107
+ }
108
+ return Object.keys(sources).length > 0 ? sources : void 0;
109
+ }
110
+ //#endregion
111
+ export { collectClientReferenceChunks, collectClientReferenceSources };
@@ -49,6 +49,13 @@ export type ClientReferencePreloadPlan = {
49
49
  routes: Map<string, number[]>;
50
50
  /** The files of a render without a route, as indices into `files`. */
51
51
  routeless: number[];
52
+ /**
53
+ * References route files reach only through static imports, outside
54
+ * `always`. A render may stream one whose module evaluates asynchronously
55
+ * instead of waiting for it; a reference any dynamic import reaches, such as
56
+ * a `next/dynamic` component, always loads first.
57
+ */
58
+ staticOnly: string[];
52
59
  };
53
60
  /**
54
61
  * Plan which client references SSR loads before rendering each route. A route
@@ -160,4 +167,5 @@ export declare function planClientReferenceGroups(options: {
160
167
  costs: ReadonlyMap<string, number | null>;
161
168
  maxCostBytes: number;
162
169
  }): ClientReferenceGroup[];
163
- //#endregion
170
+ //#endregion
171
+ export {};
@@ -46,7 +46,13 @@ function interceptEntryIds(intercept) {
46
46
  intercept.pagePath,
47
47
  ...intercept.layoutPaths,
48
48
  ...intercept.loadingPaths ?? [],
49
- intercept.notFoundPath
49
+ intercept.notFoundPath,
50
+ intercept.forbiddenPath,
51
+ intercept.unauthorizedPath,
52
+ ...intercept.notFoundPaths ?? [],
53
+ ...intercept.forbiddenPaths ?? [],
54
+ ...intercept.unauthorizedPaths ?? [],
55
+ ...intercept.errorPaths ?? []
50
56
  ].filter((value) => typeof value === "string");
51
57
  }
52
58
  /**
@@ -221,11 +227,43 @@ function collectClientReferencePreloadPlan(options) {
221
227
  const stopAt = /* @__PURE__ */ new Set([...fileIndices.keys(), ...[...interceptFiles, ...alwaysRoots].map(canonicalize)]);
222
228
  const always = /* @__PURE__ */ new Set([...referencesReachedFrom(options.entryIds, stopAt), ...referencesReachedFrom(alwaysRoots)]);
223
229
  for (const id of options.clientReferenceIds) if (!reached.has(id)) always.add(id);
230
+ const dynamicallyReached = /* @__PURE__ */ new Set();
231
+ const visited = /* @__PURE__ */ new Set();
232
+ const pending = [...options.entryIds.map(canonicalize), ...stopAt].map((id) => [
233
+ id,
234
+ false,
235
+ true
236
+ ]);
237
+ while (pending.length > 0) {
238
+ const [id, dynamic, root] = pending.pop();
239
+ if (!root && stopAt.has(id)) continue;
240
+ const key = dynamic ? `dynamic:${id}` : id;
241
+ if (visited.has(key)) continue;
242
+ visited.add(key);
243
+ if (options.clientReferenceIds.has(id)) {
244
+ if (dynamic) dynamicallyReached.add(id);
245
+ continue;
246
+ }
247
+ const info = getModuleInfo(id);
248
+ if (!info) continue;
249
+ for (const imported of info.importedIds) pending.push([
250
+ imported,
251
+ dynamic,
252
+ false
253
+ ]);
254
+ for (const imported of info.dynamicallyImportedIds) pending.push([
255
+ imported,
256
+ true,
257
+ false
258
+ ]);
259
+ }
260
+ const staticOnly = [...new Set(files.flat())].filter((id) => !always.has(id) && !dynamicallyReached.has(id));
224
261
  return {
225
262
  always: [...always],
226
263
  files,
227
264
  routes,
228
- routeless
265
+ routeless,
266
+ staticOnly
229
267
  };
230
268
  }
231
269
  function importedName(kind, name) {
@@ -26,4 +26,5 @@ export declare function rebaseCssUrlAssetReferences(code: string, sourceDirector
26
26
  * code only has the leaked marker stripped — no sibling files are emitted.
27
27
  */
28
28
  export declare function restoreDedupedCssAssetReferences(bundle: CssUrlAssetBundle, emitRestoredAsset: EmitRestoredCssUrlAsset): void;
29
- //#endregion
29
+ //#endregion
30
+ export {};
@@ -8,4 +8,5 @@ type AdjustFontFallback = {
8
8
  };
9
9
  export declare function getFallbackFontOverrideMetrics(fontFamily: string): AdjustFontFallback | undefined;
10
10
  export declare function buildFallbackFontFace(family: string, metrics: AdjustFontFallback): string;
11
- //#endregion
11
+ //#endregion
12
+ export {};
@@ -11,5 +11,6 @@
11
11
  export declare function findFontFilesInCss(css: string, subsetsToPreload?: string[]): {
12
12
  googleFontFileUrl: string;
13
13
  preloadFontFile: boolean;
14
+ ext: string;
14
15
  }[];
15
16
  //#endregion
@@ -1,4 +1,11 @@
1
1
  //#region src/build/google-fonts/find-font-files-in-css.ts
2
+ const formatToExtension = /* @__PURE__ */ new Map([
3
+ ["woff", "woff"],
4
+ ["woff2", "woff2"],
5
+ ["truetype", "ttf"],
6
+ ["opentype", "otf"],
7
+ ["embedded-opentype", "eot"]
8
+ ]);
2
9
  /**
3
10
  * Find all font files in the CSS response and determine which files should be preloaded.
4
11
  * In Google Fonts responses, the @font-face's subset is above it in a comment.
@@ -16,10 +23,16 @@ function findFontFilesInCss(css, subsetsToPreload) {
16
23
  if (newSubset) currentSubset = newSubset;
17
24
  else {
18
25
  const googleFontFileUrl = /src: url\((.+?)\)/.exec(line)?.[1];
19
- if (googleFontFileUrl && !fontFiles.some((foundFile) => foundFile.googleFontFileUrl === googleFontFileUrl)) fontFiles.push({
20
- googleFontFileUrl,
21
- preloadFontFile: !!subsetsToPreload?.includes(currentSubset)
22
- });
26
+ if (googleFontFileUrl && !fontFiles.some((foundFile) => foundFile.googleFontFileUrl === googleFontFileUrl)) {
27
+ const pathname = googleFontFileUrl.split(/[?#]/, 1)[0];
28
+ const format = /format\(['"](.+?)['"]\)/.exec(line)?.[1];
29
+ const ext = /\.(woff|woff2|eot|ttf|otf)$/.exec(pathname)?.[1] ?? formatToExtension.get(format ?? "") ?? "woff2";
30
+ fontFiles.push({
31
+ googleFontFileUrl,
32
+ preloadFontFile: !!subsetsToPreload?.includes(currentSubset),
33
+ ext
34
+ });
35
+ }
23
36
  }
24
37
  }
25
38
  return fontFiles;
@@ -16,4 +16,5 @@ type FontFamilyMetadata = {
16
16
  subsets: string[];
17
17
  };
18
18
  export declare const googleFontsMetadata: Record<string, FontFamilyMetadata>;
19
- //#endregion
19
+ //#endregion
20
+ export {};
@@ -23,4 +23,5 @@ type ValidatedGoogleFontOptions = {
23
23
  subsets: string[];
24
24
  };
25
25
  export declare function validateGoogleFontOptions(fontFamily: string, options: GoogleFontOptions): ValidatedGoogleFontOptions;
26
- //#endregion
26
+ //#endregion
27
+ export {};
@@ -2,4 +2,5 @@
2
2
  type InlineCssManifest = Record<string, string>;
3
3
  export declare function collectInlineCssManifest(clientDir: string, assetPrefix: string): InlineCssManifest;
4
4
  export declare function injectInlineCssManifestGlobal(entryPath: string, manifest: InlineCssManifest): boolean;
5
- //#endregion
5
+ //#endregion
6
+ export {};
@@ -58,4 +58,5 @@ export declare function isStaticModuleGraphResult(graphResult: ModuleGraphClassi
58
58
  * Used only by `tests/layout-classification.test.ts`.
59
59
  */
60
60
  export declare function classifyAllRouteLayouts(routes: readonly RouteForClassification[], dynamicShimPaths: ReadonlySet<string>, moduleInfo: ModuleInfoProvider): Map<string, LayoutBuildClassification>;
61
- //#endregion
61
+ //#endregion
62
+ export {};
@@ -31,4 +31,5 @@ export declare class ModuleDependencyStore<T> {
31
31
  invalidate(files: readonly string[], event: FileEvent["event"]): boolean;
32
32
  clear(): void;
33
33
  }
34
- //#endregion
34
+ //#endregion
35
+ export {};
@@ -18,4 +18,5 @@ export declare function getPagesManifestPage(pagesDir: string, filePath: string,
18
18
  export declare function buildNextClientBuildManifestContent(rewrites: ResolvedNextConfig["rewrites"], pages: readonly string[]): string;
19
19
  export declare function buildNextClientSsgManifestContent(): string;
20
20
  export declare function emitNextClientRuntimeManifests(options: EmitNextClientRuntimeManifestsOptions): void;
21
- //#endregion
21
+ //#endregion
22
+ export {};
@@ -28,4 +28,5 @@ export declare function precompressAssets(clientDir: string, options?: {
28
28
  assetsDir?: string;
29
29
  onProgress?: (completed: number, total: number, file: string) => void;
30
30
  }): Promise<PrecompressResult>;
31
- //#endregion
31
+ //#endregion
32
+ export {};
@@ -2,8 +2,8 @@ import path from "../deps/.pnpm/pathslash@0.1.0/deps/pathslash/dist/index.js";
2
2
  import { ASSET_PREFIX_URL_DIR } from "../utils/asset-prefix.js";
3
3
  import { isPrecompressedVariantBeneficial } from "../utils/precompressed-variant.js";
4
4
  import fsp from "node:fs/promises";
5
- import { randomUUID } from "node:crypto";
6
5
  import os from "node:os";
6
+ import { randomUUID } from "node:crypto";
7
7
  import zlib from "node:zlib";
8
8
  import { promisify } from "node:util";
9
9
  //#region src/build/precompress.ts
@@ -94,4 +94,5 @@ type PrerenderPathDiscoveryOptions = {
94
94
  export declare function matchesMiddlewareWarmPath(pathname: string, matcher: MatcherConfig | undefined, i18n: ResolvedNextConfig["i18n"]): boolean;
95
95
  export declare function discoverPrerenderPathManifest(options: PrerenderPathDiscoveryOptions): Promise<PrerenderPathManifest | null>;
96
96
  export declare function emitPrerenderPathManifest(options: PrerenderPathDiscoveryOptions): Promise<PrerenderPathManifest | null>;
97
- //#endregion
97
+ //#endregion
98
+ export {};
@@ -11,4 +11,5 @@ type PrerenderPhaseEnv = {
11
11
  * overwriting the caller's prior phase when they finish.
12
12
  */
13
13
  export declare function enterPrerenderPhase(env?: PrerenderPhaseEnv): () => void;
14
- //#endregion
14
+ //#endregion
15
+ export {};
@@ -2,8 +2,8 @@ import path from "../deps/.pnpm/pathslash@0.1.0/deps/pathslash/dist/index.js";
2
2
  import { PHASE_PRODUCTION_BUILD } from "../shims/constants.js";
3
3
  import fs from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
- import { fork } from "node:child_process";
6
5
  import os from "node:os";
6
+ import { fork } from "node:child_process";
7
7
  //#region src/build/prerender-server-pool.ts
8
8
  /**
9
9
  * Parallel prerender server pool.
@@ -171,8 +171,9 @@ type PrerenderAppOptionsInternal = PrerenderAppOptions & {
171
171
  * Throws on partial or malformed embeds (chunks present but no done marker,
172
172
  * tampered chunk JSON, etc.) — those are real vinext-internal regressions.
173
173
  *
174
- * Safe regex usage: safeJsonStringify (used by createRscEmbedTransform) escapes
175
- * all '<' and '>' in the embedded JSON, preventing false </script> matches.
174
+ * Safe regex usage: scriptSafeJsonStringify (used by createRscEmbedTransform)
175
+ * escapes every '<' that begins "</script" (case-insensitive) in the embedded
176
+ * JSON, preventing false </script> matches.
176
177
  */
177
178
  export declare function extractRscPayloadFromPrerenderedHtml(html: string): Uint8Array | null;
178
179
  /**
@@ -18,10 +18,10 @@ import { buildPregeneratedConcretePathTable } from "../server/prerender-manifest
18
18
  import { concatUint8Arrays, decodeRscEmbeddedChunk } from "../server/app-rsc-embedded-chunks.js";
19
19
  import { navigationRuntimeRscBootstrapExpression } from "../server/app-ssr-stream.js";
20
20
  import { encodePrerenderRouteParams, serializePrerenderRouteParamsHeader } from "../server/prerender-route-params.js";
21
- import { createAppPprFallbackShells, markAppPprDynamicFallbackShellHtml } from "../server/app-ppr-fallback-shell.js";
22
- import { getAppRouteOutputPath, getOutputPath, getRscOutputPath } from "../utils/prerender-output-paths.js";
23
21
  import { startProdServer } from "../server/prod-server.js";
24
22
  import { prerenderPoolAvailable, resolvePrerenderPoolSize, startPrerenderServerPool } from "./prerender-server-pool.js";
23
+ import { getAppRouteOutputPath, getOutputPath, getRscOutputPath } from "../utils/prerender-output-paths.js";
24
+ import { createAppPprFallbackShells, markAppPprDynamicFallbackShellHtml } from "../server/app-ppr-fallback-shell.js";
25
25
  import { enterPrerenderPhase } from "./prerender-phase.js";
26
26
  import { buildAppRouteCacheValue } from "../server/app-route-handler-response.js";
27
27
  import fs from "node:fs";
@@ -92,8 +92,9 @@ const RSC_RUNTIME_DONE_SCRIPT = `${RSC_RUNTIME_BOOTSTRAP_EXPRESSION}.done=true`;
92
92
  * Throws on partial or malformed embeds (chunks present but no done marker,
93
93
  * tampered chunk JSON, etc.) — those are real vinext-internal regressions.
94
94
  *
95
- * Safe regex usage: safeJsonStringify (used by createRscEmbedTransform) escapes
96
- * all '<' and '>' in the embedded JSON, preventing false <\/script> matches.
95
+ * Safe regex usage: scriptSafeJsonStringify (used by createRscEmbedTransform)
96
+ * escapes every '<' that begins "<\/script" (case-insensitive) in the embedded
97
+ * JSON, preventing false <\/script> matches.
97
98
  */
98
99
  function extractRscPayloadFromPrerenderedHtml(html) {
99
100
  const scriptPattern = /<script(?:\s[^>]*)?>([\s\S]*?)<\/script>/gi;
@@ -163,4 +163,5 @@ export declare function printBuildReport(options: {
163
163
  pageExtensions: string[];
164
164
  prerenderResult?: PrerenderResult;
165
165
  }): Promise<void>;
166
- //#endregion
166
+ //#endregion
167
+ export {};
@@ -29,4 +29,5 @@ type PlanRouteClassificationInjectionOptions = {
29
29
  moduleInfo: ModuleInfoProvider;
30
30
  };
31
31
  export declare function planRouteClassificationInjection(options: PlanRouteClassificationInjectionOptions): RouteClassificationInjectionPlan;
32
- //#endregion
32
+ //#endregion
33
+ export {};
@@ -50,4 +50,5 @@ export declare function buildClassificationReplacement(manifest: RouteClassifica
50
50
  * layout index.
51
51
  */
52
52
  export declare function buildReasonsReplacement(manifest: RouteClassificationManifest, layer2PerRoute: ReadonlyMap<number, ReadonlyMap<number, ModuleGraphStaticReason>>): string;
53
- //#endregion
53
+ //#endregion
54
+ export {};
@@ -59,4 +59,5 @@ export declare function assertNoFatalPrerenderRoutes(routes: readonly PrerenderR
59
59
  * Statically generate routes and return the prerender result.
60
60
  */
61
61
  export declare function runPrerender(options: RunPrerenderOptions): Promise<PrerenderResult | null>;
62
- //#endregion
62
+ //#endregion
63
+ export {};
@@ -20,4 +20,5 @@ export declare function loadOrGenerateServerActionsEncryptionKey(options: LoadEn
20
20
  * when `server.fs.strict` is false, which turns off Vite's file restrictions.
21
21
  */
22
22
  export declare function getServerActionsKeyCacheFsDeny(configuredDeny: string[] | undefined): string[];
23
- //#endregion
23
+ //#endregion
24
+ export {};
@@ -62,13 +62,36 @@ function augmentSsrManifestFromBundle(ssrManifest, bundle, root, base = "/") {
62
62
  if (!nextManifest[normalizedKey]) nextManifest[normalizedKey] = /* @__PURE__ */ new Set();
63
63
  for (const file of files) nextManifest[normalizedKey].add(collapseDuplicateBase(file, base));
64
64
  }
65
+ const staticImportClosures = /* @__PURE__ */ new Map();
66
+ const getStaticImportClosure = (fileName) => {
67
+ let closure = staticImportClosures.get(fileName);
68
+ if (closure) return closure;
69
+ const files = /* @__PURE__ */ new Set();
70
+ const visit = (importer) => {
71
+ const chunk = bundle[importer];
72
+ if (chunk?.type !== "chunk") return;
73
+ for (const importedFile of chunk.imports ?? []) {
74
+ if (importedFile === fileName || files.has(importedFile)) continue;
75
+ files.add(importedFile);
76
+ visit(importedFile);
77
+ }
78
+ };
79
+ visit(fileName);
80
+ closure = [...files];
81
+ staticImportClosures.set(fileName, closure);
82
+ return closure;
83
+ };
65
84
  for (const item of Object.values(bundle)) {
66
85
  if (item.type !== "chunk") continue;
67
86
  const chunk = item;
68
- if (chunk.fileName.endsWith(".js") && (isSharedClientChunkName(chunk.name) || chunk.isEntry && isPagesClientEntryFacade(chunk.facadeModuleId))) sharedChunkFiles.add(manifestFileWithBase(chunk.fileName, base));
87
+ if (chunk.fileName.endsWith(".js") && isSharedClientChunkName(chunk.name)) sharedChunkFiles.add(manifestFileWithBase(chunk.fileName, base));
88
+ if (chunk.isEntry && isPagesClientEntryFacade(chunk.facadeModuleId)) {
89
+ sharedChunkFiles.add(manifestFileWithBase(chunk.fileName, base));
90
+ for (const importedFile of getStaticImportClosure(chunk.fileName)) sharedChunkFiles.add(manifestFileWithBase(importedFile, base));
91
+ }
69
92
  const files = /* @__PURE__ */ new Set();
70
93
  files.add(manifestFileWithBase(chunk.fileName, base));
71
- for (const importedFile of chunk.imports ?? []) files.add(manifestFileWithBase(importedFile, base));
94
+ for (const importedFile of getStaticImportClosure(chunk.fileName)) files.add(manifestFileWithBase(importedFile, base));
72
95
  for (const cssFile of chunk.viteMetadata?.importedCss ?? []) files.add(manifestFileWithBase(cssFile, base));
73
96
  for (const assetFile of chunk.viteMetadata?.importedAssets ?? []) files.add(manifestFileWithBase(assetFile, base));
74
97
  for (const moduleId of Object.keys(chunk.modules ?? {})) {
@@ -27,4 +27,5 @@ type StandaloneBuildResult = {
27
27
  * included.
28
28
  */
29
29
  export declare function emitStandaloneOutput(options: StandaloneBuildOptions): StandaloneBuildResult;
30
- //#endregion
30
+ //#endregion
31
+ export {};
@@ -132,4 +132,5 @@ export declare function loadVinextCacheConfigFromViteConfig(vite: ViteConfigLoad
132
132
  export declare function generateCacheAdaptersModule(cache?: VinextCacheConfig): string;
133
133
  /** Generate request-stage registration without importing a configured data adapter. */
134
134
  export declare function generateCdnCacheAdapterModule(cache?: VinextCacheConfig): string;
135
- //#endregion
135
+ //#endregion
136
+ export {};
package/dist/cache.js CHANGED
@@ -1,2 +1 @@
1
- import { cacheForRequest } from "./shims/cache-for-request.js";
2
- export { cacheForRequest };
1
+ export { cacheForRequest } from "./shims/cache-for-request.js";
package/dist/check.d.ts CHANGED
@@ -85,4 +85,5 @@ export declare function runCheck(root: string): CheckResult;
85
85
  export declare function formatReport(result: CheckResult, opts?: {
86
86
  calledFromInit?: boolean;
87
87
  }): string;
88
- //#endregion
88
+ //#endregion
89
+ export {};
package/dist/check.js CHANGED
@@ -323,6 +323,10 @@ const CONFIG_SUPPORT = {
323
323
  status: "partial",
324
324
  detail: "experimental support; behavior is incomplete"
325
325
  },
326
+ "experimental.cacheComponents": {
327
+ status: "partial",
328
+ detail: "legacy alias of cacheComponents; experimental support, behavior is incomplete"
329
+ },
326
330
  "experimental.ppr": {
327
331
  status: "unsupported",
328
332
  detail: "removed in Next.js 16 and ignored; use cacheComponents"
@@ -21,4 +21,5 @@ type ParsedArgs = {
21
21
  * arguments directly to Vite.
22
22
  */
23
23
  export declare function parseArgs(args: string[]): ParsedArgs;
24
- //#endregion
24
+ //#endregion
25
+ export {};
package/dist/cli.js CHANGED
@@ -125,6 +125,7 @@ async function proxyVite(command) {
125
125
  async function start() {
126
126
  const parsed = parseArgs(rawArgs);
127
127
  if (parsed.help) return printHelp("start");
128
+ if (!process.env.NODE_ENV) Reflect.set(process.env, "NODE_ENV", "production");
128
129
  loadDotenv({
129
130
  root: process.cwd(),
130
131
  mode: "production"
@@ -194,6 +195,7 @@ async function check() {
194
195
  async function typegen() {
195
196
  const parsed = parseArgs(rawArgs);
196
197
  if (parsed.help) return printHelp("typegen");
198
+ if (!process.env.NODE_ENV) Reflect.set(process.env, "NODE_ENV", "production");
197
199
  const root = path.resolve(parsed.positionals?.[0] ?? process.cwd());
198
200
  loadDotenv({
199
201
  root,
@@ -11,7 +11,8 @@ function getMatcherRule(redirect) {
11
11
  has: redirect.has,
12
12
  missing: redirect.missing,
13
13
  locale: redirect.locale,
14
- basePath: redirect.basePath
14
+ basePath: redirect.basePath,
15
+ defaultLocaleVariant: redirect.defaultLocaleVariant
15
16
  }];
16
17
  matcherRules.set(redirect, rule);
17
18
  }
@@ -1,7 +1,7 @@
1
1
  import { NextRedirect, ResolvedNextConfig } from "../config/next-config.js";
2
2
  import { ClientHasCondition } from "./client-rewrites.js";
3
3
  //#region src/client/client-redirects.d.ts
4
- type ClientRedirectFields = Pick<NextRedirect, "basePath" | "locale" | "source"> & {
4
+ type ClientRedirectFields = Pick<NextRedirect, "basePath" | "defaultLocaleVariant" | "locale" | "source"> & {
5
5
  has?: ClientHasCondition[];
6
6
  missing?: ClientHasCondition[];
7
7
  };
@@ -16,7 +16,7 @@ type ClientRedirectFields = Pick<NextRedirect, "basePath" | "locale" | "source">
16
16
  */
17
17
  export type ClientRedirect = (ClientRedirectFields & {
18
18
  destination: string;
19
- permanent: boolean;
19
+ permanent?: boolean;
20
20
  requiresServerEvaluation?: never;
21
21
  }) | (ClientRedirectFields & {
22
22
  destination?: never;
@@ -24,4 +24,5 @@ export type ClientRedirect = (ClientRedirectFields & {
24
24
  requiresServerEvaluation: true;
25
25
  });
26
26
  export declare function toClientRedirects(redirects: ResolvedNextConfig["redirects"]): ClientRedirect[];
27
- //#endregion
27
+ //#endregion
28
+ export {};
@@ -9,7 +9,8 @@ function toClientRedirect(redirect) {
9
9
  has: clientHas?.length ? clientHas : void 0,
10
10
  missing: clientMissing?.length ? clientMissing : void 0,
11
11
  locale: redirect.locale,
12
- basePath: redirect.basePath
12
+ basePath: redirect.basePath,
13
+ defaultLocaleVariant: redirect.defaultLocaleVariant
13
14
  };
14
15
  if (hasServerOnlyCondition) return {
15
16
  ...common,
@@ -28,4 +28,5 @@ export type ClientRewrites = {
28
28
  };
29
29
  export declare function isClientHasCondition(condition: HasCondition): condition is ClientHasCondition;
30
30
  export declare function toClientRewrites(rewrites: ResolvedNextConfig["rewrites"]): ClientRewrites;
31
- //#endregion
31
+ //#endregion
32
+ export {};
@@ -35,4 +35,5 @@ export declare function dismissOverlay(): void;
35
35
  export declare function setOverlayIndex(index: number): void;
36
36
  export declare function minimizeOverlay(): void;
37
37
  export declare function expandOverlay(): void;
38
- //#endregion
38
+ //#endregion
39
+ export {};
@@ -1,2 +1 @@
1
- import { getVinextReact } from "./react-instance.js";
2
- export { getVinextReact };
1
+ export { getVinextReact } from "./react-instance.js";
@@ -1,17 +1,17 @@
1
1
  //#region src/client/instrumentation-client-state.ts
2
- let clientInstrumentationHooks = null;
2
+ const VINEXT_CLIENT_INSTRUMENTATION_HOOKS = Symbol.for("vinext.client.instrumentationHooks");
3
3
  function normalizeClientInstrumentationHooks(hooks) {
4
4
  return Object.values(hooks).some((value) => typeof value === "function") ? hooks : null;
5
5
  }
6
6
  function setClientInstrumentationHooks(hooks) {
7
- clientInstrumentationHooks = hooks;
8
- return clientInstrumentationHooks;
7
+ Reflect.set(globalThis, VINEXT_CLIENT_INSTRUMENTATION_HOOKS, hooks);
8
+ return hooks;
9
9
  }
10
10
  function getClientInstrumentationHooks() {
11
- return clientInstrumentationHooks;
11
+ return Reflect.get(globalThis, VINEXT_CLIENT_INSTRUMENTATION_HOOKS) ?? null;
12
12
  }
13
13
  function notifyAppRouterTransitionStart(href, navigationType) {
14
- clientInstrumentationHooks?.onRouterTransitionStart?.(href, navigationType);
14
+ getClientInstrumentationHooks()?.onRouterTransitionStart?.(href, navigationType);
15
15
  }
16
16
  //#endregion
17
17
  export { getClientInstrumentationHooks, normalizeClientInstrumentationHooks, notifyAppRouterTransitionStart, setClientInstrumentationHooks };
@@ -86,6 +86,7 @@ export type NavigationRuntime = {
86
86
  functions: NavigationRuntimeFunctions;
87
87
  };
88
88
  export declare const NAVIGATION_RUNTIME_KEY: unique symbol;
89
+ export declare function isNavigationRuntimeFunctions(value: unknown): value is NavigationRuntimeFunctions;
89
90
  export declare function getNavigationRuntime(): NavigationRuntime | null;
90
91
  export declare function registerNavigationRuntimeBootstrap(bootstrap: Partial<NavigationRuntimeBootstrap>): NavigationRuntime;
91
92
  export declare function registerNavigationRuntimeFunctions(functions: Partial<NavigationRuntimeFunctions>): NavigationRuntime;
@@ -119,4 +120,5 @@ export declare function hasAppNavigationRuntime(): boolean;
119
120
  * tag) should call this instead.
120
121
  */
121
122
  export declare function hasAppNavigationRuntimeBootstrap(): boolean;
122
- //#endregion
123
+ //#endregion
124
+ export {};