next 15.2.0-canary.70 → 15.2.0-canary.71

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.

Potentially problematic release.


This version of next might be problematic. Click here for more details.

Files changed (285) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +2 -2
  3. package/dist/build/swc/index.js +1 -1
  4. package/dist/build/utils.js +20 -12
  5. package/dist/build/utils.js.map +1 -1
  6. package/dist/build/webpack-config.js +2 -2
  7. package/dist/client/app-bootstrap.js +1 -1
  8. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.d.ts +2 -2
  9. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.js +8 -5
  10. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.js.map +1 -1
  11. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.d.ts +1 -1
  12. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.js +2 -2
  13. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.js.map +1 -1
  14. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.d.ts +3 -3
  15. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js +7 -18
  16. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js.map +1 -1
  17. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js +1 -1
  18. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js.map +1 -1
  19. package/dist/client/components/react-dev-overlay/ui/dev-overlay.d.ts +1 -1
  20. package/dist/client/components/react-dev-overlay/ui/dev-overlay.js.map +1 -1
  21. package/dist/client/index.js +1 -1
  22. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js +2 -2
  23. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js.map +1 -1
  24. package/dist/compiled/next-server/app-page.runtime.dev.js +2 -2
  25. package/dist/compiled/next-server/app-page.runtime.dev.js.map +1 -1
  26. package/dist/compiled/next-server/server.runtime.prod.js +2 -2
  27. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  28. package/dist/esm/build/index.js +2 -2
  29. package/dist/esm/build/swc/index.js +1 -1
  30. package/dist/esm/build/utils.js +20 -12
  31. package/dist/esm/build/utils.js.map +1 -1
  32. package/dist/esm/build/webpack-config.js +2 -2
  33. package/dist/esm/client/app-bootstrap.js +1 -1
  34. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.js +8 -5
  35. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.js.map +1 -1
  36. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.js +2 -2
  37. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.js.map +1 -1
  38. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js +7 -18
  39. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js.map +1 -1
  40. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js +1 -1
  41. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.js.map +1 -1
  42. package/dist/esm/client/components/react-dev-overlay/ui/dev-overlay.js.map +1 -1
  43. package/dist/esm/client/index.js +1 -1
  44. package/dist/esm/export/index.js +4 -1
  45. package/dist/esm/export/index.js.map +1 -1
  46. package/dist/esm/export/worker.js +5 -2
  47. package/dist/esm/export/worker.js.map +1 -1
  48. package/dist/esm/server/base-server.js +11 -11
  49. package/dist/esm/server/base-server.js.map +1 -1
  50. package/dist/esm/server/config-shared.js +1 -1
  51. package/dist/esm/server/config-shared.js.map +1 -1
  52. package/dist/esm/server/config.js +1 -1
  53. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  54. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  55. package/dist/esm/server/lib/app-info-log.js +1 -1
  56. package/dist/esm/server/lib/start-server.js +1 -1
  57. package/dist/export/index.js +4 -1
  58. package/dist/export/index.js.map +1 -1
  59. package/dist/export/worker.js +5 -2
  60. package/dist/export/worker.js.map +1 -1
  61. package/dist/server/base-server.js +11 -11
  62. package/dist/server/base-server.js.map +1 -1
  63. package/dist/server/config-shared.js +1 -1
  64. package/dist/server/config-shared.js.map +1 -1
  65. package/dist/server/config.js +1 -1
  66. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  67. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  68. package/dist/server/lib/app-info-log.js +1 -1
  69. package/dist/server/lib/start-server.js +1 -1
  70. package/dist/telemetry/anonymous-meta.js +1 -1
  71. package/dist/telemetry/events/session-stopped.js +2 -2
  72. package/dist/telemetry/events/version.js +2 -2
  73. package/package.json +16 -16
  74. package/dist/build/analysis/get-page-static-info.test.d.ts +0 -1
  75. package/dist/build/normalize-catchall-routes.test.d.ts +0 -1
  76. package/dist/build/webpack/loaders/metadata/resolve-route-data.test.d.ts +0 -1
  77. package/dist/build/webpack/plugins/next-types-plugin/index.test.d.ts +0 -1
  78. package/dist/bundles/cssnano-simple/cssnano-preset-simple.test.d.ts +0 -1
  79. package/dist/client/components/is-next-router-error.test.d.ts +0 -1
  80. package/dist/client/components/navigation.test.d.ts +0 -1
  81. package/dist/client/components/promise-queue.test.d.ts +0 -1
  82. package/dist/client/components/react-dev-overlay/server/get-next-error-feedback-middleware.test.d.ts +0 -1
  83. package/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.stories.d.ts +0 -7
  84. package/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.stories.js +0 -83
  85. package/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.stories.js.map +0 -1
  86. package/dist/client/components/react-dev-overlay/ui/components/code-frame/code-frame.stories.d.ts +0 -6
  87. package/dist/client/components/react-dev-overlay/ui/components/code-frame/code-frame.stories.js +0 -55
  88. package/dist/client/components/react-dev-overlay/ui/components/code-frame/code-frame.stories.js.map +0 -1
  89. package/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.stories.d.ts +0 -7
  90. package/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.stories.js +0 -106
  91. package/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.stories.js.map +0 -1
  92. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.stories.d.ts +0 -9
  93. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js +0 -135
  94. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js.map +0 -1
  95. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.stories.d.ts +0 -13
  96. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.stories.js +0 -129
  97. package/dist/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.stories.js.map +0 -1
  98. package/dist/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.stories.d.ts +0 -8
  99. package/dist/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.stories.js +0 -65
  100. package/dist/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.stories.js.map +0 -1
  101. package/dist/client/components/react-dev-overlay/ui/components/errors/error-message/error-message.stories.d.ts +0 -9
  102. package/dist/client/components/react-dev-overlay/ui/components/errors/error-message/error-message.stories.js +0 -83
  103. package/dist/client/components/react-dev-overlay/ui/components/errors/error-message/error-message.stories.js.map +0 -1
  104. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.stories.d.ts +0 -10
  105. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.stories.js +0 -100
  106. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.stories.js.map +0 -1
  107. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.test.d.ts +0 -1
  108. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-nav/error-overlay-nav.stories.d.ts +0 -6
  109. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-nav/error-overlay-nav.stories.js +0 -88
  110. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-nav/error-overlay-nav.stories.js.map +0 -1
  111. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.stories.d.ts +0 -9
  112. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js +0 -119
  113. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js.map +0 -1
  114. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/copy-stack-trace-button.stories.d.ts +0 -7
  115. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/copy-stack-trace-button.stories.js +0 -58
  116. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/copy-stack-trace-button.stories.js.map +0 -1
  117. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/docs-link-button.stories.d.ts +0 -7
  118. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/docs-link-button.stories.js +0 -56
  119. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/docs-link-button.stories.js.map +0 -1
  120. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.stories.d.ts +0 -7
  121. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.stories.js +0 -60
  122. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.stories.js.map +0 -1
  123. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/nodejs-inspector-button.stories.d.ts +0 -7
  124. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/nodejs-inspector-button.stories.js +0 -56
  125. package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/nodejs-inspector-button.stories.js.map +0 -1
  126. package/dist/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.stories.d.ts +0 -10
  127. package/dist/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.stories.js +0 -83
  128. package/dist/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.stories.js.map +0 -1
  129. package/dist/client/components/react-dev-overlay/ui/components/terminal/terminal.stories.d.ts +0 -7
  130. package/dist/client/components/react-dev-overlay/ui/components/terminal/terminal.stories.js +0 -56
  131. package/dist/client/components/react-dev-overlay/ui/components/terminal/terminal.stories.js.map +0 -1
  132. package/dist/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.stories.d.ts +0 -12
  133. package/dist/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.stories.js +0 -137
  134. package/dist/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.stories.js.map +0 -1
  135. package/dist/client/components/react-dev-overlay/ui/container/build-error.stories.d.ts +0 -7
  136. package/dist/client/components/react-dev-overlay/ui/container/build-error.stories.js +0 -61
  137. package/dist/client/components/react-dev-overlay/ui/container/build-error.stories.js.map +0 -1
  138. package/dist/client/components/react-dev-overlay/ui/container/errors.stories.d.ts +0 -9
  139. package/dist/client/components/react-dev-overlay/ui/container/errors.stories.js +0 -258
  140. package/dist/client/components/react-dev-overlay/ui/container/errors.stories.js.map +0 -1
  141. package/dist/client/components/react-dev-overlay/ui/container/root-layout-missing-tags-error.stories.d.ts +0 -8
  142. package/dist/client/components/react-dev-overlay/ui/container/root-layout-missing-tags-error.stories.js +0 -79
  143. package/dist/client/components/react-dev-overlay/ui/container/root-layout-missing-tags-error.stories.js.map +0 -1
  144. package/dist/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.stories.d.ts +0 -8
  145. package/dist/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.stories.js +0 -72
  146. package/dist/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.stories.js.map +0 -1
  147. package/dist/client/components/react-dev-overlay/ui/dev-overlay.stories.d.ts +0 -6
  148. package/dist/client/components/react-dev-overlay/ui/dev-overlay.stories.js +0 -118
  149. package/dist/client/components/react-dev-overlay/ui/dev-overlay.stories.js.map +0 -1
  150. package/dist/client/components/react-dev-overlay/ui/utils/cx.test.d.ts +0 -1
  151. package/dist/client/components/react-dev-overlay/ui/utils/parse-url-from-text.test.d.ts +0 -1
  152. package/dist/client/components/react-dev-overlay/utils/css.test.d.ts +0 -1
  153. package/dist/client/components/react-dev-overlay/utils/webpack-module-path.test.d.ts +0 -1
  154. package/dist/client/components/redirect.test.d.ts +0 -1
  155. package/dist/client/components/router-reducer/apply-router-state-patch-to-tree.test.d.ts +0 -1
  156. package/dist/client/components/router-reducer/clear-cache-node-data-for-segment-path.test.d.ts +0 -1
  157. package/dist/client/components/router-reducer/compute-changed-path.test.d.ts +0 -1
  158. package/dist/client/components/router-reducer/create-href-from-url.test.d.ts +0 -1
  159. package/dist/client/components/router-reducer/create-initial-router-state.test.d.ts +0 -1
  160. package/dist/client/components/router-reducer/create-router-cache-key.test.d.ts +0 -1
  161. package/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.test.d.ts +0 -1
  162. package/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.test.d.ts +0 -1
  163. package/dist/client/components/router-reducer/get-segment-value.test.d.ts +0 -1
  164. package/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.test.d.ts +0 -1
  165. package/dist/client/components/router-reducer/invalidate-cache-by-router-state.test.d.ts +0 -1
  166. package/dist/client/components/router-reducer/is-navigating-to-new-root-layout.test.d.ts +0 -1
  167. package/dist/client/components/router-reducer/reducers/find-head-in-cache.test.d.ts +0 -1
  168. package/dist/client/components/router-reducer/should-hard-navigate.test.d.ts +0 -1
  169. package/dist/diagnostics/build-diagnostics.test.d.ts +0 -1
  170. package/dist/esm/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.stories.js +0 -51
  171. package/dist/esm/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.stories.js.map +0 -1
  172. package/dist/esm/client/components/react-dev-overlay/ui/components/code-frame/code-frame.stories.js +0 -27
  173. package/dist/esm/client/components/react-dev-overlay/ui/components/code-frame/code-frame.stories.js.map +0 -1
  174. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.stories.js +0 -74
  175. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.stories.js.map +0 -1
  176. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js +0 -95
  177. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js.map +0 -1
  178. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.stories.js +0 -73
  179. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/next-logo.stories.js.map +0 -1
  180. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.stories.js +0 -29
  181. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/environment-name-label/environment-name-label.stories.js.map +0 -1
  182. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-message/error-message.stories.js +0 -43
  183. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-message/error-message.stories.js.map +0 -1
  184. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.stories.js +0 -56
  185. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.stories.js.map +0 -1
  186. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-nav/error-overlay-nav.stories.js +0 -60
  187. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-nav/error-overlay-nav.stories.js.map +0 -1
  188. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js +0 -79
  189. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js.map +0 -1
  190. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/copy-stack-trace-button.stories.js +0 -26
  191. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/copy-stack-trace-button.stories.js.map +0 -1
  192. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/docs-link-button.stories.js +0 -24
  193. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/docs-link-button.stories.js.map +0 -1
  194. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.stories.js +0 -28
  195. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/error-overlay-toolbar.stories.js.map +0 -1
  196. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/nodejs-inspector-button.stories.js +0 -24
  197. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-toolbar/nodejs-inspector-button.stories.js.map +0 -1
  198. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.stories.js +0 -39
  199. package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-type-label/error-type-label.stories.js.map +0 -1
  200. package/dist/esm/client/components/react-dev-overlay/ui/components/terminal/terminal.stories.js +0 -24
  201. package/dist/esm/client/components/react-dev-overlay/ui/components/terminal/terminal.stories.js.map +0 -1
  202. package/dist/esm/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.stories.js +0 -85
  203. package/dist/esm/client/components/react-dev-overlay/ui/components/version-staleness-info/version-staleness-info.stories.js.map +0 -1
  204. package/dist/esm/client/components/react-dev-overlay/ui/container/build-error.stories.js +0 -29
  205. package/dist/esm/client/components/react-dev-overlay/ui/container/build-error.stories.js.map +0 -1
  206. package/dist/esm/client/components/react-dev-overlay/ui/container/errors.stories.js +0 -218
  207. package/dist/esm/client/components/react-dev-overlay/ui/container/errors.stories.js.map +0 -1
  208. package/dist/esm/client/components/react-dev-overlay/ui/container/root-layout-missing-tags-error.stories.js +0 -43
  209. package/dist/esm/client/components/react-dev-overlay/ui/container/root-layout-missing-tags-error.stories.js.map +0 -1
  210. package/dist/esm/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.stories.js +0 -36
  211. package/dist/esm/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.stories.js.map +0 -1
  212. package/dist/esm/client/components/react-dev-overlay/ui/dev-overlay.stories.js +0 -90
  213. package/dist/esm/client/components/react-dev-overlay/ui/dev-overlay.stories.js.map +0 -1
  214. package/dist/experimental/testing/server/config-testing-utils.test.d.ts +0 -1
  215. package/dist/experimental/testing/server/middleware-testing-utils.test.d.ts +0 -1
  216. package/dist/lib/batcher.test.d.ts +0 -1
  217. package/dist/lib/find-config.test.d.ts +0 -1
  218. package/dist/lib/format-server-error.test.d.ts +0 -1
  219. package/dist/lib/load-custom-routes.test.d.ts +0 -1
  220. package/dist/lib/metadata/is-metadata-route.test.d.ts +0 -1
  221. package/dist/lib/metadata/resolve-metadata.test.d.ts +0 -1
  222. package/dist/lib/metadata/resolvers/resolve-opengraph.test.d.ts +0 -1
  223. package/dist/lib/metadata/resolvers/resolve-title.test.d.ts +0 -1
  224. package/dist/lib/metadata/resolvers/resolve-url.test.d.ts +0 -1
  225. package/dist/lib/typescript/writeConfigurationDefaults.test.d.ts +0 -1
  226. package/dist/server/after/after-context.test.d.ts +0 -1
  227. package/dist/server/after/awaiter.test.d.ts +0 -1
  228. package/dist/server/app-render/action-handler.test.d.ts +0 -1
  229. package/dist/server/app-render/csrf-protection.test.d.ts +0 -1
  230. package/dist/server/app-render/postponed-state.test.d.ts +0 -1
  231. package/dist/server/app-render/types.test.d.ts +0 -1
  232. package/dist/server/base-http/web.test.d.ts +0 -1
  233. package/dist/server/config.test.d.ts +0 -1
  234. package/dist/server/dev/log-requests.test.d.ts +0 -1
  235. package/dist/server/dev/parse-version-info.test.d.ts +0 -1
  236. package/dist/server/lib/experimental/create-env-definitions.test.d.ts +0 -1
  237. package/dist/server/lib/i18n-provider.test.d.ts +0 -1
  238. package/dist/server/lib/incremental-cache/shared-revalidate-timings.test.d.ts +0 -1
  239. package/dist/server/lib/interception-routes.test.d.ts +0 -1
  240. package/dist/server/lib/mock-request.test.d.ts +0 -1
  241. package/dist/server/lib/patch-fetch.test.d.ts +0 -1
  242. package/dist/server/lib/router-utils/build-data-route.test.d.ts +0 -1
  243. package/dist/server/lib/router-utils/build-prefetch-segment-data-route.test.d.ts +0 -1
  244. package/dist/server/lib/router-utils/decode-path-params.test.d.ts +0 -1
  245. package/dist/server/lib/to-route.test.d.ts +0 -1
  246. package/dist/server/lib/utils.test.d.ts +0 -1
  247. package/dist/server/load-manifest.test.d.ts +0 -1
  248. package/dist/server/node-polyfill-crypto.test.d.ts +0 -1
  249. package/dist/server/normalizers/absolute-filename-normalizer.test.d.ts +0 -1
  250. package/dist/server/normalizers/request/base-path.test.d.ts +0 -1
  251. package/dist/server/normalizers/request/next-data.test.d.ts +0 -1
  252. package/dist/server/normalizers/request/prefetch-rsc.test.d.ts +0 -1
  253. package/dist/server/normalizers/request/prefix.test.d.ts +0 -1
  254. package/dist/server/normalizers/request/segment-prefix-rsc.test.d.ts +0 -1
  255. package/dist/server/normalizers/request/suffix.test.d.ts +0 -1
  256. package/dist/server/resume-data-cache/resume-data-cache.test.d.ts +0 -1
  257. package/dist/server/route-matcher-managers/default-route-matcher-manager.test.d.ts +0 -1
  258. package/dist/server/route-matcher-providers/app-page-route-matcher-provider.test.d.ts +0 -1
  259. package/dist/server/route-matcher-providers/app-route-route-matcher-provider.test.d.ts +0 -1
  260. package/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.test.d.ts +0 -1
  261. package/dist/server/route-matcher-providers/dev/dev-app-route-route-matcher-provider.test.d.ts +0 -1
  262. package/dist/server/route-matcher-providers/dev/dev-pages-api-route-matcher-provider.test.d.ts +0 -1
  263. package/dist/server/route-matcher-providers/dev/dev-pages-route-matcher-provider.test.d.ts +0 -1
  264. package/dist/server/route-matcher-providers/dev/helpers/file-reader/batched-file-reader.test.d.ts +0 -1
  265. package/dist/server/route-matcher-providers/pages-api-route-matcher-provider.test.d.ts +0 -1
  266. package/dist/server/route-matcher-providers/pages-route-matcher-provider.test.d.ts +0 -1
  267. package/dist/server/server-utils.test.d.ts +0 -1
  268. package/dist/server/web/spec-extension/adapters/headers.test.d.ts +0 -1
  269. package/dist/server/web/spec-extension/adapters/request-cookies.test.d.ts +0 -1
  270. package/dist/server/web/utils.test.d.ts +0 -1
  271. package/dist/server/web/web-on-close.test.d.ts +0 -1
  272. package/dist/shared/lib/deep-freeze.test.d.ts +0 -1
  273. package/dist/shared/lib/get-hostname.test.d.ts +0 -1
  274. package/dist/shared/lib/normalized-asset-prefix.test.d.ts +0 -1
  275. package/dist/shared/lib/page-path/normalize-page-path.test.d.ts +0 -1
  276. package/dist/shared/lib/router/adapters.test.d.ts +0 -1
  277. package/dist/shared/lib/router/utils/app-paths.test.d.ts +0 -1
  278. package/dist/shared/lib/router/utils/is-dynamic.test.d.ts +0 -1
  279. package/dist/shared/lib/router/utils/parse-relative-url.test.d.ts +0 -1
  280. package/dist/shared/lib/router/utils/prepare-destination.test.d.ts +0 -1
  281. package/dist/shared/lib/router/utils/route-regex.test.d.ts +0 -1
  282. package/dist/shared/lib/server-reference-info.test.d.ts +0 -1
  283. package/dist/telemetry/post-telemetry-payload.test.d.ts +0 -1
  284. package/dist/trace/report/index.test.d.ts +0 -1
  285. package/dist/trace/trace.test.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/export/worker.ts"],"sourcesContent":["import type {\n ExportPagesInput,\n ExportPageInput,\n ExportPageResult,\n ExportRouteResult,\n WorkerRenderOpts,\n ExportPagesResult,\n} from './types'\n\nimport '../server/node-environment'\n\nprocess.env.NEXT_IS_EXPORT_WORKER = 'true'\n\nimport { extname, join, dirname, sep } from 'path'\nimport fs from 'fs/promises'\nimport { loadComponents } from '../server/load-components'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\nimport { normalizeLocalePath } from '../shared/lib/i18n/normalize-locale-path'\nimport { trace } from '../trace'\nimport { setHttpClientAndAgentOptions } from '../server/setup-http-agent-env'\nimport isError from '../lib/is-error'\nimport { addRequestMeta } from '../server/request-meta'\nimport { normalizeAppPath } from '../shared/lib/router/utils/app-paths'\n\nimport { createRequestResponseMocks } from '../server/lib/mock-request'\nimport { isAppRouteRoute } from '../lib/is-app-route-route'\nimport { hasNextSupport } from '../server/ci-info'\nimport { exportAppRoute } from './routes/app-route'\nimport { exportAppPage, prospectiveRenderAppPage } from './routes/app-page'\nimport { exportPagesPage } from './routes/pages'\nimport { getParams } from './helpers/get-params'\nimport { createIncrementalCache } from './helpers/create-incremental-cache'\nimport { isPostpone } from '../server/lib/router-utils/is-postpone'\nimport { isDynamicUsageError } from './helpers/is-dynamic-usage-error'\nimport { isBailoutToCSRError } from '../shared/lib/lazy-dynamic/bailout-to-csr'\nimport {\n turborepoTraceAccess,\n TurborepoAccessTraceResult,\n} from '../build/turborepo-access-trace'\nimport type { Params } from '../server/request/params'\nimport {\n getFallbackRouteParams,\n type FallbackRouteParams,\n} from '../server/request/fallback-params'\nimport { needsExperimentalReact } from '../lib/needs-experimental-react'\nimport type { AppRouteRouteModule } from '../server/route-modules/app-route/module.compiled'\nimport { isStaticGenBailoutError } from '../client/components/static-generation-bailout'\nimport type { PagesRenderContext, PagesSharedContext } from '../server/render'\nimport type { AppSharedContext } from '../server/app-render/app-render'\nimport { MultiFileWriter } from '../lib/multi-file-writer'\n\nconst envConfig = require('../shared/lib/runtime-config.external')\n\n;(globalThis as any).__NEXT_DATA__ = {\n nextExport: true,\n}\n\nclass TimeoutError extends Error {\n code = 'NEXT_EXPORT_TIMEOUT_ERROR'\n}\n\nclass ExportPageError extends Error {\n code = 'NEXT_EXPORT_PAGE_ERROR'\n}\n\nasync function exportPageImpl(\n input: ExportPageInput,\n fileWriter: MultiFileWriter\n): Promise<ExportRouteResult | undefined> {\n const {\n path,\n pathMap,\n distDir,\n pagesDataDir,\n buildExport = false,\n serverRuntimeConfig,\n subFolders = false,\n optimizeCss,\n disableOptimizedLoading,\n debugOutput = false,\n enableExperimentalReact,\n ampValidatorPath,\n trailingSlash,\n sriEnabled,\n } = input\n\n if (enableExperimentalReact) {\n process.env.__NEXT_EXPERIMENTAL_REACT = 'true'\n }\n\n const {\n page,\n\n // The parameters that are currently unknown.\n _fallbackRouteParams = [],\n\n // Check if this is an `app/` page.\n _isAppDir: isAppDir = false,\n\n // Check if this should error when dynamic usage is detected.\n _isDynamicError: isDynamicError = false,\n\n // If this page supports partial prerendering, then we need to pass that to\n // the renderOpts.\n _isRoutePPREnabled: isRoutePPREnabled,\n\n // If this is a prospective render, we don't actually want to persist the\n // result, we just want to use it to error the build if there's a problem.\n _isProspectiveRender: isProspectiveRender = false,\n\n // Pull the original query out.\n query: originalQuery = {},\n } = pathMap\n\n const fallbackRouteParams: FallbackRouteParams | null =\n getFallbackRouteParams(_fallbackRouteParams)\n\n let query = { ...originalQuery }\n const pathname = normalizeAppPath(page)\n const isDynamic = isDynamicRoute(page)\n const outDir = isAppDir ? join(distDir, 'server/app') : input.outDir\n\n const filePath = normalizePagePath(path)\n const ampPath = `${filePath}.amp`\n let renderAmpPath = ampPath\n\n let updatedPath = pathMap._ssgPath || path\n let locale = pathMap._locale || input.renderOpts.locale\n\n if (input.renderOpts.locale) {\n const localePathResult = normalizeLocalePath(path, input.renderOpts.locales)\n\n if (localePathResult.detectedLocale) {\n updatedPath = localePathResult.pathname\n locale = localePathResult.detectedLocale\n\n if (locale === input.renderOpts.defaultLocale) {\n renderAmpPath = `${normalizePagePath(updatedPath)}.amp`\n }\n }\n }\n\n // We need to show a warning if they try to provide query values\n // for an auto-exported page since they won't be available\n const hasOrigQueryValues = Object.keys(originalQuery).length > 0\n\n // Check if the page is a specified dynamic route\n const { pathname: nonLocalizedPath } = normalizeLocalePath(\n path,\n input.renderOpts.locales\n )\n\n let params: Params | undefined\n\n if (isDynamic && page !== nonLocalizedPath) {\n const normalizedPage = isAppDir ? normalizeAppPath(page) : page\n\n params = getParams(normalizedPage, updatedPath)\n }\n\n const { req, res } = createRequestResponseMocks({ url: updatedPath })\n\n // If this is a status code page, then set the response code.\n for (const statusCode of [404, 500]) {\n if (\n [\n `/${statusCode}`,\n `/${statusCode}.html`,\n `/${statusCode}/index.html`,\n ].some((p) => p === updatedPath || `/${locale}${p}` === updatedPath)\n ) {\n res.statusCode = statusCode\n }\n }\n\n // Ensure that the URL has a trailing slash if it's configured.\n if (trailingSlash && !req.url?.endsWith('/')) {\n req.url += '/'\n }\n\n if (\n locale &&\n buildExport &&\n input.renderOpts.domainLocales &&\n input.renderOpts.domainLocales.some(\n (dl) => dl.defaultLocale === locale || dl.locales?.includes(locale || '')\n )\n ) {\n addRequestMeta(req, 'isLocaleDomain', true)\n }\n\n envConfig.setConfig({\n serverRuntimeConfig,\n publicRuntimeConfig: input.renderOpts.runtimeConfig,\n })\n\n const getHtmlFilename = (p: string) =>\n subFolders ? `${p}${sep}index.html` : `${p}.html`\n\n let htmlFilename = getHtmlFilename(filePath)\n\n // dynamic routes can provide invalid extensions e.g. /blog/[...slug] returns an\n // extension of `.slug]`\n const pageExt = isDynamic || isAppDir ? '' : extname(page)\n const pathExt = isDynamic || isAppDir ? '' : extname(path)\n\n // force output 404.html for backwards compat\n if (path === '/404.html') {\n htmlFilename = path\n }\n // Make sure page isn't a folder with a dot in the name e.g. `v1.2`\n else if (pageExt !== pathExt && pathExt !== '') {\n const isBuiltinPaths = ['/500', '/404'].some(\n (p) => p === path || p === path + '.html'\n )\n // If the ssg path has .html extension, and it's not builtin paths, use it directly\n // Otherwise, use that as the filename instead\n const isHtmlExtPath = !isBuiltinPaths && path.endsWith('.html')\n htmlFilename = isHtmlExtPath ? getHtmlFilename(path) : path\n } else if (path === '/') {\n // If the path is the root, just use index.html\n htmlFilename = 'index.html'\n }\n\n const baseDir = join(outDir, dirname(htmlFilename))\n let htmlFilepath = join(outDir, htmlFilename)\n\n await fs.mkdir(baseDir, { recursive: true })\n\n const components = await loadComponents({\n distDir,\n page,\n isAppPath: isAppDir,\n isDev: false,\n sriEnabled,\n })\n\n // Handle App Routes.\n if (isAppDir && isAppRouteRoute(page)) {\n return exportAppRoute(\n req,\n res,\n params,\n page,\n components.routeModule as AppRouteRouteModule,\n input.renderOpts.incrementalCache,\n input.renderOpts.cacheLifeProfiles,\n htmlFilepath,\n fileWriter,\n input.renderOpts.experimental,\n input.buildId\n )\n }\n\n // During the export phase in next build, if it's using PPR we can serve streaming metadata\n // when it's available. When we're building the PPR rendering result, we don't need to rely\n // on the user agent. The result can be determined to serve streaming on infrastructure level.\n const serveStreamingMetadata = Boolean(\n isRoutePPREnabled && input.streamingMetadata\n )\n\n const renderOpts: WorkerRenderOpts = {\n ...components,\n ...input.renderOpts,\n ampPath: renderAmpPath,\n params,\n optimizeCss,\n disableOptimizedLoading,\n locale,\n supportsDynamicResponse: false,\n serveStreamingMetadata,\n experimental: {\n ...input.renderOpts.experimental,\n isRoutePPREnabled,\n },\n }\n\n if (hasNextSupport) {\n renderOpts.isRevalidate = true\n }\n\n // Handle App Pages\n if (isAppDir) {\n const sharedContext: AppSharedContext = {\n buildId: input.buildId,\n }\n\n // If this is a prospective render, don't return any metrics or revalidate\n // timings as we aren't persisting this render (it was only to error).\n if (isProspectiveRender) {\n return prospectiveRenderAppPage(\n req,\n res,\n page,\n pathname,\n query,\n fallbackRouteParams,\n renderOpts,\n sharedContext\n )\n }\n\n return exportAppPage(\n req,\n res,\n page,\n path,\n pathname,\n query,\n fallbackRouteParams,\n renderOpts,\n htmlFilepath,\n debugOutput,\n isDynamicError,\n fileWriter,\n sharedContext\n )\n }\n\n const sharedContext: PagesSharedContext = {\n buildId: input.buildId,\n deploymentId: input.renderOpts.deploymentId,\n customServer: undefined,\n }\n\n const renderContext: PagesRenderContext = {\n isFallback: pathMap._pagesFallback ?? false,\n isDraftMode: false,\n developmentNotFoundSourcePage: undefined,\n }\n\n return exportPagesPage(\n req,\n res,\n path,\n page,\n query,\n params,\n htmlFilepath,\n htmlFilename,\n ampPath,\n subFolders,\n outDir,\n ampValidatorPath,\n pagesDataDir,\n buildExport,\n isDynamic,\n sharedContext,\n renderContext,\n hasOrigQueryValues,\n renderOpts,\n components,\n fileWriter\n )\n}\n\nexport async function exportPages(\n input: ExportPagesInput\n): Promise<ExportPagesResult> {\n const {\n exportPathMap,\n paths,\n dir,\n distDir,\n outDir,\n cacheHandler,\n cacheMaxMemorySize,\n fetchCacheKeyPrefix,\n pagesDataDir,\n renderOpts,\n nextConfig,\n options,\n } = input\n\n // If the fetch cache was enabled, we need to create an incremental\n // cache instance for this page.\n const incrementalCache = await createIncrementalCache({\n cacheHandler,\n cacheMaxMemorySize,\n fetchCacheKeyPrefix,\n distDir,\n dir,\n // skip writing to disk in minimal mode for now, pending some\n // changes to better support it\n flushToDisk: !hasNextSupport,\n cacheHandlers: nextConfig.experimental.cacheHandlers,\n })\n\n renderOpts.incrementalCache = incrementalCache\n\n const maxConcurrency =\n nextConfig.experimental.staticGenerationMaxConcurrency ?? 8\n const results: ExportPagesResult = []\n\n const exportPageWithRetry = async (path: string, maxAttempts: number) => {\n const pathMap = exportPathMap[path]\n const { page } = exportPathMap[path]\n const pageKey = page !== path ? `${page}: ${path}` : path\n let attempt = 0\n let result\n\n while (attempt < maxAttempts) {\n try {\n result = await Promise.race<ExportPageResult | undefined>([\n exportPage({\n path,\n pathMap,\n distDir,\n outDir,\n pagesDataDir,\n renderOpts,\n ampValidatorPath:\n nextConfig.experimental.amp?.validator || undefined,\n trailingSlash: nextConfig.trailingSlash,\n serverRuntimeConfig: nextConfig.serverRuntimeConfig,\n subFolders: nextConfig.trailingSlash && !options.buildExport,\n buildExport: options.buildExport,\n optimizeCss: nextConfig.experimental.optimizeCss,\n disableOptimizedLoading:\n nextConfig.experimental.disableOptimizedLoading,\n parentSpanId: input.parentSpanId,\n httpAgentOptions: nextConfig.httpAgentOptions,\n debugOutput: options.debugOutput,\n enableExperimentalReact: needsExperimentalReact(nextConfig),\n sriEnabled: Boolean(nextConfig.experimental.sri?.algorithm),\n streamingMetadata: nextConfig.experimental.streamingMetadata,\n buildId: input.buildId,\n }),\n // If exporting the page takes longer than the timeout, reject the promise.\n new Promise((_, reject) => {\n setTimeout(() => {\n reject(new TimeoutError())\n }, nextConfig.staticPageGenerationTimeout * 1000)\n }),\n ])\n\n // If there was an error in the export, throw it immediately. In the catch block, we might retry the export,\n // or immediately fail the build, depending on user configuration. We might also continue on and attempt other pages.\n if (result && 'error' in result) {\n throw new ExportPageError()\n }\n\n // If the export succeeds, break out of the retry loop\n break\n } catch (err) {\n // The only error that should be caught here is an ExportError, as `exportPage` doesn't throw and instead returns an object with an `error` property.\n // This is an overly cautious check to ensure that we don't accidentally catch an unexpected error.\n if (!(err instanceof ExportPageError || err instanceof TimeoutError)) {\n throw err\n }\n\n if (err instanceof TimeoutError) {\n // If the export times out, we will restart the worker up to 3 times.\n maxAttempts = 3\n }\n\n // We've reached the maximum number of attempts\n if (attempt >= maxAttempts - 1) {\n // Log a message if we've reached the maximum number of attempts.\n // We only care to do this if maxAttempts was configured.\n if (maxAttempts > 1) {\n console.info(\n `Failed to build ${pageKey} after ${maxAttempts} attempts.`\n )\n }\n // If prerenderEarlyExit is enabled, we'll exit the build immediately.\n if (nextConfig.experimental.prerenderEarlyExit) {\n console.error(\n `Export encountered an error on ${pageKey}, exiting the build.`\n )\n process.exit(1)\n } else {\n // Otherwise, this is a no-op. The build will continue, and a summary of failed pages will be displayed at the end.\n }\n } else {\n // Otherwise, we have more attempts to make. Wait before retrying\n if (err instanceof TimeoutError) {\n console.info(\n `Failed to build ${pageKey} (attempt ${attempt + 1} of ${maxAttempts}) because it took more than ${nextConfig.staticPageGenerationTimeout} seconds. Retrying again shortly.`\n )\n } else {\n console.info(\n `Failed to build ${pageKey} (attempt ${attempt + 1} of ${maxAttempts}). Retrying again shortly.`\n )\n }\n\n // Exponential backoff with random jitter to avoid thundering herd on retries\n const baseDelay = 500 // 500ms\n const maxDelay = 2000 // 2 seconds\n const delay = Math.min(baseDelay * Math.pow(2, attempt), maxDelay)\n const jitter = Math.random() * 0.3 * delay // Add up to 30% random jitter\n await new Promise((r) => setTimeout(r, delay + jitter))\n }\n }\n\n attempt++\n }\n\n return { result, path, pageKey }\n }\n\n for (let i = 0; i < paths.length; i += maxConcurrency) {\n const subset = paths.slice(i, i + maxConcurrency)\n\n const subsetResults = await Promise.all(\n subset.map((path) =>\n exportPageWithRetry(\n path,\n nextConfig.experimental.staticGenerationRetryCount ?? 1\n )\n )\n )\n\n results.push(...subsetResults)\n }\n\n return results\n}\n\nasync function exportPage(\n input: ExportPageInput\n): Promise<ExportPageResult | undefined> {\n trace('export-page', input.parentSpanId).setAttribute('path', input.path)\n\n // Configure the http agent.\n setHttpClientAndAgentOptions({\n httpAgentOptions: input.httpAgentOptions,\n })\n\n const fileWriter = new MultiFileWriter({\n writeFile: (filePath, data) => fs.writeFile(filePath, data),\n mkdir: (dir) => fs.mkdir(dir, { recursive: true }),\n })\n\n const exportPageSpan = trace('export-page-worker', input.parentSpanId)\n\n const start = Date.now()\n\n const turborepoAccessTraceResult = new TurborepoAccessTraceResult()\n\n // Export the page.\n let result: ExportRouteResult | undefined\n try {\n result = await exportPageSpan.traceAsyncFn(() =>\n turborepoTraceAccess(\n () => exportPageImpl(input, fileWriter),\n turborepoAccessTraceResult\n )\n )\n\n // Wait for all the files to flush to disk.\n await fileWriter.wait()\n\n // If there was no result, then we can exit early.\n if (!result) return\n\n // If there was an error, then we can exit early.\n if ('error' in result) {\n return { error: result.error, duration: Date.now() - start }\n }\n } catch (err) {\n console.error(\n `Error occurred prerendering page \"${input.path}\". Read more: https://nextjs.org/docs/messages/prerender-error`\n )\n\n // bailoutToCSRError errors should not leak to the user as they are not actionable; they're\n // a framework signal\n if (!isBailoutToCSRError(err)) {\n // A static generation bailout error is a framework signal to fail static generation but\n // and will encode a reason in the error message. If there is a message, we'll print it.\n // Otherwise there's nothing to show as we don't want to leak an error internal error stack to the user.\n if (isStaticGenBailoutError(err)) {\n if (err.message) {\n console.error(`Error: ${err.message}`)\n }\n } else if (isError(err) && err.stack) {\n console.error(err.stack)\n } else {\n console.error(err)\n }\n }\n\n return { error: true, duration: Date.now() - start }\n }\n\n // Notify the parent process that we processed a page (used by the progress activity indicator)\n process.send?.([3, { type: 'activity' }])\n\n // Otherwise we can return the result.\n return {\n duration: Date.now() - start,\n ampValidations: result.ampValidations,\n revalidate: result.revalidate,\n metadata: result.metadata,\n ssgNotFound: result.ssgNotFound,\n hasEmptyPrelude: result.hasEmptyPrelude,\n hasPostponed: result.hasPostponed,\n turborepoAccessTraceResult: turborepoAccessTraceResult.serialize(),\n fetchMetrics: result.fetchMetrics,\n }\n}\n\nprocess.on('unhandledRejection', (err: unknown) => {\n // if it's a postpone error, it'll be handled later\n // when the postponed promise is actually awaited.\n if (isPostpone(err)) {\n return\n }\n\n // we don't want to log these errors\n if (isDynamicUsageError(err)) {\n return\n }\n\n console.error(err)\n})\n\nprocess.on('rejectionHandled', () => {\n // It is ok to await a Promise late in Next.js as it allows for better\n // prefetching patterns to avoid waterfalls. We ignore logging these.\n // We should've already errored in anyway unhandledRejection.\n})\n\nconst FATAL_UNHANDLED_NEXT_API_EXIT_CODE = 78\n\nprocess.on('uncaughtException', (err) => {\n if (isDynamicUsageError(err)) {\n console.error(\n 'A Next.js API that uses exceptions to signal framework behavior was uncaught. This suggests improper usage of a Next.js API. The original error is printed below and the build will now exit.'\n )\n console.error(err)\n process.exit(FATAL_UNHANDLED_NEXT_API_EXIT_CODE)\n } else {\n console.error(err)\n }\n})\n"],"names":["exportPages","process","env","NEXT_IS_EXPORT_WORKER","envConfig","require","globalThis","__NEXT_DATA__","nextExport","TimeoutError","Error","code","ExportPageError","exportPageImpl","input","fileWriter","req","path","pathMap","distDir","pagesDataDir","buildExport","serverRuntimeConfig","subFolders","optimizeCss","disableOptimizedLoading","debugOutput","enableExperimentalReact","ampValidatorPath","trailingSlash","sriEnabled","__NEXT_EXPERIMENTAL_REACT","page","_fallbackRouteParams","_isAppDir","isAppDir","_isDynamicError","isDynamicError","_isRoutePPREnabled","isRoutePPREnabled","_isProspectiveRender","isProspectiveRender","query","originalQuery","fallbackRouteParams","getFallbackRouteParams","pathname","normalizeAppPath","isDynamic","isDynamicRoute","outDir","join","filePath","normalizePagePath","ampPath","renderAmpPath","updatedPath","_ssgPath","locale","_locale","renderOpts","localePathResult","normalizeLocalePath","locales","detectedLocale","defaultLocale","hasOrigQueryValues","Object","keys","length","nonLocalizedPath","params","normalizedPage","getParams","res","createRequestResponseMocks","url","statusCode","some","p","endsWith","domainLocales","dl","includes","addRequestMeta","setConfig","publicRuntimeConfig","runtimeConfig","getHtmlFilename","sep","htmlFilename","pageExt","extname","pathExt","isBuiltinPaths","isHtmlExtPath","baseDir","dirname","htmlFilepath","fs","mkdir","recursive","components","loadComponents","isAppPath","isDev","isAppRouteRoute","exportAppRoute","routeModule","incrementalCache","cacheLifeProfiles","experimental","buildId","serveStreamingMetadata","Boolean","streamingMetadata","supportsDynamicResponse","hasNextSupport","isRevalidate","sharedContext","prospectiveRenderAppPage","exportAppPage","deploymentId","customServer","undefined","renderContext","isFallback","_pagesFallback","isDraftMode","developmentNotFoundSourcePage","exportPagesPage","exportPathMap","paths","dir","cacheHandler","cacheMaxMemorySize","fetchCacheKeyPrefix","nextConfig","options","createIncrementalCache","flushToDisk","cacheHandlers","maxConcurrency","staticGenerationMaxConcurrency","results","exportPageWithRetry","maxAttempts","pageKey","attempt","result","Promise","race","exportPage","amp","validator","parentSpanId","httpAgentOptions","needsExperimentalReact","sri","algorithm","_","reject","setTimeout","staticPageGenerationTimeout","err","console","info","prerenderEarlyExit","error","exit","baseDelay","maxDelay","delay","Math","min","pow","jitter","random","r","i","subset","slice","subsetResults","all","map","staticGenerationRetryCount","push","trace","setAttribute","setHttpClientAndAgentOptions","MultiFileWriter","writeFile","data","exportPageSpan","start","Date","now","turborepoAccessTraceResult","TurborepoAccessTraceResult","traceAsyncFn","turborepoTraceAccess","wait","duration","isBailoutToCSRError","isStaticGenBailoutError","message","isError","stack","send","type","ampValidations","revalidate","metadata","ssgNotFound","hasEmptyPrelude","hasPostponed","serialize","fetchMetrics","on","isPostpone","isDynamicUsageError","FATAL_UNHANDLED_NEXT_API_EXIT_CODE"],"mappings":";;;;+BAqWsBA;;;eAAAA;;;QA5Vf;sBAIqC;iEAC7B;gCACgB;2BACA;mCACG;qCACE;uBACd;mCACuB;gEACzB;6BACW;0BACE;6BAEU;iCACX;wBACD;0BACA;yBACyB;uBACxB;2BACN;wCACa;4BACZ;qCACS;8BACA;sCAI7B;gCAKA;wCACgC;yCAEC;iCAGR;;;;;;AAvChCC,QAAQC,GAAG,CAACC,qBAAqB,GAAG;AAyCpC,MAAMC,YAAYC,QAAQ;AAExBC,WAAmBC,aAAa,GAAG;IACnCC,YAAY;AACd;AAEA,MAAMC,qBAAqBC;;QAA3B,qBACEC,OAAO;;AACT;AAEA,MAAMC,wBAAwBF;;QAA9B,qBACEC,OAAO;;AACT;AAEA,eAAeE,eACbC,KAAsB,EACtBC,UAA2B;QA6GLC;IA3GtB,MAAM,EACJC,IAAI,EACJC,OAAO,EACPC,OAAO,EACPC,YAAY,EACZC,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qCAAqC;AAE3C5N,QAAQyN,EAAE,CAAC,qBAAqB,CAACtD;IAC/B,IAAIwD,IAAAA,wCAAmB,EAACxD,MAAM;QAC5BC,QAAQG,KAAK,CACX;QAEFH,QAAQG,KAAK,CAACJ;QACdnK,QAAQwK,IAAI,CAACoD;IACf,OAAO;QACLxD,QAAQG,KAAK,CAACJ;IAChB;AACF"}
1
+ {"version":3,"sources":["../../src/export/worker.ts"],"sourcesContent":["import type {\n ExportPagesInput,\n ExportPageInput,\n ExportPageResult,\n ExportRouteResult,\n WorkerRenderOpts,\n ExportPagesResult,\n} from './types'\n\nimport '../server/node-environment'\n\nprocess.env.NEXT_IS_EXPORT_WORKER = 'true'\n\nimport { extname, join, dirname, sep } from 'path'\nimport fs from 'fs/promises'\nimport { loadComponents } from '../server/load-components'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\nimport { normalizeLocalePath } from '../shared/lib/i18n/normalize-locale-path'\nimport { trace } from '../trace'\nimport { setHttpClientAndAgentOptions } from '../server/setup-http-agent-env'\nimport isError from '../lib/is-error'\nimport { addRequestMeta } from '../server/request-meta'\nimport { normalizeAppPath } from '../shared/lib/router/utils/app-paths'\n\nimport { createRequestResponseMocks } from '../server/lib/mock-request'\nimport { isAppRouteRoute } from '../lib/is-app-route-route'\nimport { hasNextSupport } from '../server/ci-info'\nimport { exportAppRoute } from './routes/app-route'\nimport { exportAppPage, prospectiveRenderAppPage } from './routes/app-page'\nimport { exportPagesPage } from './routes/pages'\nimport { getParams } from './helpers/get-params'\nimport { createIncrementalCache } from './helpers/create-incremental-cache'\nimport { isPostpone } from '../server/lib/router-utils/is-postpone'\nimport { isDynamicUsageError } from './helpers/is-dynamic-usage-error'\nimport { isBailoutToCSRError } from '../shared/lib/lazy-dynamic/bailout-to-csr'\nimport {\n turborepoTraceAccess,\n TurborepoAccessTraceResult,\n} from '../build/turborepo-access-trace'\nimport type { Params } from '../server/request/params'\nimport {\n getFallbackRouteParams,\n type FallbackRouteParams,\n} from '../server/request/fallback-params'\nimport { needsExperimentalReact } from '../lib/needs-experimental-react'\nimport type { AppRouteRouteModule } from '../server/route-modules/app-route/module.compiled'\nimport { isStaticGenBailoutError } from '../client/components/static-generation-bailout'\nimport type { PagesRenderContext, PagesSharedContext } from '../server/render'\nimport type { AppSharedContext } from '../server/app-render/app-render'\nimport { MultiFileWriter } from '../lib/multi-file-writer'\n\nconst envConfig = require('../shared/lib/runtime-config.external')\n\n;(globalThis as any).__NEXT_DATA__ = {\n nextExport: true,\n}\n\nclass TimeoutError extends Error {\n code = 'NEXT_EXPORT_TIMEOUT_ERROR'\n}\n\nclass ExportPageError extends Error {\n code = 'NEXT_EXPORT_PAGE_ERROR'\n}\n\nasync function exportPageImpl(\n input: ExportPageInput,\n fileWriter: MultiFileWriter\n): Promise<ExportRouteResult | undefined> {\n const {\n path,\n pathMap,\n distDir,\n pagesDataDir,\n buildExport = false,\n serverRuntimeConfig,\n subFolders = false,\n optimizeCss,\n disableOptimizedLoading,\n debugOutput = false,\n enableExperimentalReact,\n ampValidatorPath,\n trailingSlash,\n sriEnabled,\n } = input\n\n if (enableExperimentalReact) {\n process.env.__NEXT_EXPERIMENTAL_REACT = 'true'\n }\n\n const {\n page,\n\n // The parameters that are currently unknown.\n _fallbackRouteParams = [],\n\n // Check if this is an `app/` page.\n _isAppDir: isAppDir = false,\n\n // Check if this should error when dynamic usage is detected.\n _isDynamicError: isDynamicError = false,\n\n // If this page supports partial prerendering, then we need to pass that to\n // the renderOpts.\n _isRoutePPREnabled: isRoutePPREnabled,\n\n // If this is a prospective render, we don't actually want to persist the\n // result, we just want to use it to error the build if there's a problem.\n _isProspectiveRender: isProspectiveRender = false,\n\n // Pull the original query out.\n query: originalQuery = {},\n } = pathMap\n\n const fallbackRouteParams: FallbackRouteParams | null =\n getFallbackRouteParams(_fallbackRouteParams)\n\n let query = { ...originalQuery }\n const pathname = normalizeAppPath(page)\n const isDynamic = isDynamicRoute(page)\n const outDir = isAppDir ? join(distDir, 'server/app') : input.outDir\n\n const filePath = normalizePagePath(path)\n const ampPath = `${filePath}.amp`\n let renderAmpPath = ampPath\n\n let updatedPath = pathMap._ssgPath || path\n let locale = pathMap._locale || input.renderOpts.locale\n\n if (input.renderOpts.locale) {\n const localePathResult = normalizeLocalePath(path, input.renderOpts.locales)\n\n if (localePathResult.detectedLocale) {\n updatedPath = localePathResult.pathname\n locale = localePathResult.detectedLocale\n\n if (locale === input.renderOpts.defaultLocale) {\n renderAmpPath = `${normalizePagePath(updatedPath)}.amp`\n }\n }\n }\n\n // We need to show a warning if they try to provide query values\n // for an auto-exported page since they won't be available\n const hasOrigQueryValues = Object.keys(originalQuery).length > 0\n\n // Check if the page is a specified dynamic route\n const { pathname: nonLocalizedPath } = normalizeLocalePath(\n path,\n input.renderOpts.locales\n )\n\n let params: Params | undefined\n\n if (isDynamic && page !== nonLocalizedPath) {\n const normalizedPage = isAppDir ? normalizeAppPath(page) : page\n\n params = getParams(normalizedPage, updatedPath)\n }\n\n const { req, res } = createRequestResponseMocks({ url: updatedPath })\n\n // If this is a status code page, then set the response code.\n for (const statusCode of [404, 500]) {\n if (\n [\n `/${statusCode}`,\n `/${statusCode}.html`,\n `/${statusCode}/index.html`,\n ].some((p) => p === updatedPath || `/${locale}${p}` === updatedPath)\n ) {\n res.statusCode = statusCode\n }\n }\n\n // Ensure that the URL has a trailing slash if it's configured.\n if (trailingSlash && !req.url?.endsWith('/')) {\n req.url += '/'\n }\n\n if (\n locale &&\n buildExport &&\n input.renderOpts.domainLocales &&\n input.renderOpts.domainLocales.some(\n (dl) => dl.defaultLocale === locale || dl.locales?.includes(locale || '')\n )\n ) {\n addRequestMeta(req, 'isLocaleDomain', true)\n }\n\n envConfig.setConfig({\n serverRuntimeConfig,\n publicRuntimeConfig: input.renderOpts.runtimeConfig,\n })\n\n const getHtmlFilename = (p: string) =>\n subFolders ? `${p}${sep}index.html` : `${p}.html`\n\n let htmlFilename = getHtmlFilename(filePath)\n\n // dynamic routes can provide invalid extensions e.g. /blog/[...slug] returns an\n // extension of `.slug]`\n const pageExt = isDynamic || isAppDir ? '' : extname(page)\n const pathExt = isDynamic || isAppDir ? '' : extname(path)\n\n // force output 404.html for backwards compat\n if (path === '/404.html') {\n htmlFilename = path\n }\n // Make sure page isn't a folder with a dot in the name e.g. `v1.2`\n else if (pageExt !== pathExt && pathExt !== '') {\n const isBuiltinPaths = ['/500', '/404'].some(\n (p) => p === path || p === path + '.html'\n )\n // If the ssg path has .html extension, and it's not builtin paths, use it directly\n // Otherwise, use that as the filename instead\n const isHtmlExtPath = !isBuiltinPaths && path.endsWith('.html')\n htmlFilename = isHtmlExtPath ? getHtmlFilename(path) : path\n } else if (path === '/') {\n // If the path is the root, just use index.html\n htmlFilename = 'index.html'\n }\n\n const baseDir = join(outDir, dirname(htmlFilename))\n let htmlFilepath = join(outDir, htmlFilename)\n\n await fs.mkdir(baseDir, { recursive: true })\n\n const components = await loadComponents({\n distDir,\n page,\n isAppPath: isAppDir,\n isDev: false,\n sriEnabled,\n })\n\n // Handle App Routes.\n if (isAppDir && isAppRouteRoute(page)) {\n return exportAppRoute(\n req,\n res,\n params,\n page,\n components.routeModule as AppRouteRouteModule,\n input.renderOpts.incrementalCache,\n input.renderOpts.cacheLifeProfiles,\n htmlFilepath,\n fileWriter,\n input.renderOpts.experimental,\n input.buildId\n )\n }\n\n // During the export phase in next build, if it's using PPR we can serve streaming metadata\n // when it's available. When we're building the PPR rendering result, we don't need to rely\n // on the user agent. The result can be determined to serve streaming on infrastructure level.\n const serveStreamingMetadata = Boolean(\n isRoutePPREnabled && input.streamingMetadata\n )\n\n const renderOpts: WorkerRenderOpts = {\n ...components,\n ...input.renderOpts,\n ampPath: renderAmpPath,\n params,\n optimizeCss,\n disableOptimizedLoading,\n locale,\n supportsDynamicResponse: false,\n serveStreamingMetadata,\n experimental: {\n ...input.renderOpts.experimental,\n isRoutePPREnabled,\n },\n }\n\n if (hasNextSupport) {\n renderOpts.isRevalidate = true\n }\n\n // Handle App Pages\n if (isAppDir) {\n const sharedContext: AppSharedContext = {\n buildId: input.buildId,\n }\n\n // If this is a prospective render, don't return any metrics or revalidate\n // timings as we aren't persisting this render (it was only to error).\n if (isProspectiveRender) {\n return prospectiveRenderAppPage(\n req,\n res,\n page,\n pathname,\n query,\n fallbackRouteParams,\n renderOpts,\n sharedContext\n )\n }\n\n return exportAppPage(\n req,\n res,\n page,\n path,\n pathname,\n query,\n fallbackRouteParams,\n renderOpts,\n htmlFilepath,\n debugOutput,\n isDynamicError,\n fileWriter,\n sharedContext\n )\n }\n\n const sharedContext: PagesSharedContext = {\n buildId: input.buildId,\n deploymentId: input.renderOpts.deploymentId,\n customServer: undefined,\n }\n\n const renderContext: PagesRenderContext = {\n isFallback: pathMap._pagesFallback ?? false,\n isDraftMode: false,\n developmentNotFoundSourcePage: undefined,\n }\n\n return exportPagesPage(\n req,\n res,\n path,\n page,\n query,\n params,\n htmlFilepath,\n htmlFilename,\n ampPath,\n subFolders,\n outDir,\n ampValidatorPath,\n pagesDataDir,\n buildExport,\n isDynamic,\n sharedContext,\n renderContext,\n hasOrigQueryValues,\n renderOpts,\n components,\n fileWriter\n )\n}\n\nexport async function exportPages(\n input: ExportPagesInput\n): Promise<ExportPagesResult> {\n const {\n exportPathMap,\n paths,\n dir,\n distDir,\n outDir,\n cacheHandler,\n cacheMaxMemorySize,\n fetchCacheKeyPrefix,\n pagesDataDir,\n renderOpts,\n nextConfig,\n options,\n } = input\n\n // If the fetch cache was enabled, we need to create an incremental\n // cache instance for this page.\n const incrementalCache = await createIncrementalCache({\n cacheHandler,\n cacheMaxMemorySize,\n fetchCacheKeyPrefix,\n distDir,\n dir,\n // skip writing to disk in minimal mode for now, pending some\n // changes to better support it\n flushToDisk: !hasNextSupport,\n cacheHandlers: nextConfig.experimental.cacheHandlers,\n })\n\n renderOpts.incrementalCache = incrementalCache\n\n const maxConcurrency =\n nextConfig.experimental.staticGenerationMaxConcurrency ?? 8\n const results: ExportPagesResult = []\n\n const exportPageWithRetry = async (path: string, maxAttempts: number) => {\n const pathMap = exportPathMap[path]\n const { page } = exportPathMap[path]\n const pageKey = page !== path ? `${page}: ${path}` : path\n let attempt = 0\n let result\n\n while (attempt < maxAttempts) {\n try {\n result = await Promise.race<ExportPageResult | undefined>([\n exportPage({\n path,\n pathMap,\n distDir,\n outDir,\n pagesDataDir,\n renderOpts,\n ampValidatorPath:\n nextConfig.experimental.amp?.validator || undefined,\n trailingSlash: nextConfig.trailingSlash,\n serverRuntimeConfig: nextConfig.serverRuntimeConfig,\n subFolders: nextConfig.trailingSlash && !options.buildExport,\n buildExport: options.buildExport,\n optimizeCss: nextConfig.experimental.optimizeCss,\n disableOptimizedLoading:\n nextConfig.experimental.disableOptimizedLoading,\n parentSpanId: input.parentSpanId,\n httpAgentOptions: nextConfig.httpAgentOptions,\n debugOutput: options.debugOutput,\n enableExperimentalReact: needsExperimentalReact(nextConfig),\n sriEnabled: Boolean(nextConfig.experimental.sri?.algorithm),\n buildId: input.buildId,\n streamingMetadata:\n // Disable streaming metadata when dynamic IO is enabled.\n // FIXME: remove dynamic IO guard once we fixed the dynamic indicator case.\n // test/e2e/app-dir/dynamic-io/dynamic-io.test.ts - should not have static indicator on not-found route\n !nextConfig.experimental.dynamicIO &&\n !!nextConfig.experimental.streamingMetadata,\n }),\n // If exporting the page takes longer than the timeout, reject the promise.\n new Promise((_, reject) => {\n setTimeout(() => {\n reject(new TimeoutError())\n }, nextConfig.staticPageGenerationTimeout * 1000)\n }),\n ])\n\n // If there was an error in the export, throw it immediately. In the catch block, we might retry the export,\n // or immediately fail the build, depending on user configuration. We might also continue on and attempt other pages.\n if (result && 'error' in result) {\n throw new ExportPageError()\n }\n\n // If the export succeeds, break out of the retry loop\n break\n } catch (err) {\n // The only error that should be caught here is an ExportError, as `exportPage` doesn't throw and instead returns an object with an `error` property.\n // This is an overly cautious check to ensure that we don't accidentally catch an unexpected error.\n if (!(err instanceof ExportPageError || err instanceof TimeoutError)) {\n throw err\n }\n\n if (err instanceof TimeoutError) {\n // If the export times out, we will restart the worker up to 3 times.\n maxAttempts = 3\n }\n\n // We've reached the maximum number of attempts\n if (attempt >= maxAttempts - 1) {\n // Log a message if we've reached the maximum number of attempts.\n // We only care to do this if maxAttempts was configured.\n if (maxAttempts > 1) {\n console.info(\n `Failed to build ${pageKey} after ${maxAttempts} attempts.`\n )\n }\n // If prerenderEarlyExit is enabled, we'll exit the build immediately.\n if (nextConfig.experimental.prerenderEarlyExit) {\n console.error(\n `Export encountered an error on ${pageKey}, exiting the build.`\n )\n process.exit(1)\n } else {\n // Otherwise, this is a no-op. The build will continue, and a summary of failed pages will be displayed at the end.\n }\n } else {\n // Otherwise, we have more attempts to make. Wait before retrying\n if (err instanceof TimeoutError) {\n console.info(\n `Failed to build ${pageKey} (attempt ${attempt + 1} of ${maxAttempts}) because it took more than ${nextConfig.staticPageGenerationTimeout} seconds. Retrying again shortly.`\n )\n } else {\n console.info(\n `Failed to build ${pageKey} (attempt ${attempt + 1} of ${maxAttempts}). Retrying again shortly.`\n )\n }\n\n // Exponential backoff with random jitter to avoid thundering herd on retries\n const baseDelay = 500 // 500ms\n const maxDelay = 2000 // 2 seconds\n const delay = Math.min(baseDelay * Math.pow(2, attempt), maxDelay)\n const jitter = Math.random() * 0.3 * delay // Add up to 30% random jitter\n await new Promise((r) => setTimeout(r, delay + jitter))\n }\n }\n\n attempt++\n }\n\n return { result, path, pageKey }\n }\n\n for (let i = 0; i < paths.length; i += maxConcurrency) {\n const subset = paths.slice(i, i + maxConcurrency)\n\n const subsetResults = await Promise.all(\n subset.map((path) =>\n exportPageWithRetry(\n path,\n nextConfig.experimental.staticGenerationRetryCount ?? 1\n )\n )\n )\n\n results.push(...subsetResults)\n }\n\n return results\n}\n\nasync function exportPage(\n input: ExportPageInput\n): Promise<ExportPageResult | undefined> {\n trace('export-page', input.parentSpanId).setAttribute('path', input.path)\n\n // Configure the http agent.\n setHttpClientAndAgentOptions({\n httpAgentOptions: input.httpAgentOptions,\n })\n\n const fileWriter = new MultiFileWriter({\n writeFile: (filePath, data) => fs.writeFile(filePath, data),\n mkdir: (dir) => fs.mkdir(dir, { recursive: true }),\n })\n\n const exportPageSpan = trace('export-page-worker', input.parentSpanId)\n\n const start = Date.now()\n\n const turborepoAccessTraceResult = new TurborepoAccessTraceResult()\n\n // Export the page.\n let result: ExportRouteResult | undefined\n try {\n result = await exportPageSpan.traceAsyncFn(() =>\n turborepoTraceAccess(\n () => exportPageImpl(input, fileWriter),\n turborepoAccessTraceResult\n )\n )\n\n // Wait for all the files to flush to disk.\n await fileWriter.wait()\n\n // If there was no result, then we can exit early.\n if (!result) return\n\n // If there was an error, then we can exit early.\n if ('error' in result) {\n return { error: result.error, duration: Date.now() - start }\n }\n } catch (err) {\n console.error(\n `Error occurred prerendering page \"${input.path}\". Read more: https://nextjs.org/docs/messages/prerender-error`\n )\n\n // bailoutToCSRError errors should not leak to the user as they are not actionable; they're\n // a framework signal\n if (!isBailoutToCSRError(err)) {\n // A static generation bailout error is a framework signal to fail static generation but\n // and will encode a reason in the error message. If there is a message, we'll print it.\n // Otherwise there's nothing to show as we don't want to leak an error internal error stack to the user.\n if (isStaticGenBailoutError(err)) {\n if (err.message) {\n console.error(`Error: ${err.message}`)\n }\n } else if (isError(err) && err.stack) {\n console.error(err.stack)\n } else {\n console.error(err)\n }\n }\n\n return { error: true, duration: Date.now() - start }\n }\n\n // Notify the parent process that we processed a page (used by the progress activity indicator)\n process.send?.([3, { type: 'activity' }])\n\n // Otherwise we can return the result.\n return {\n duration: Date.now() - start,\n ampValidations: result.ampValidations,\n revalidate: result.revalidate,\n metadata: result.metadata,\n ssgNotFound: result.ssgNotFound,\n hasEmptyPrelude: result.hasEmptyPrelude,\n hasPostponed: result.hasPostponed,\n turborepoAccessTraceResult: turborepoAccessTraceResult.serialize(),\n fetchMetrics: result.fetchMetrics,\n }\n}\n\nprocess.on('unhandledRejection', (err: unknown) => {\n // if it's a postpone error, it'll be handled later\n // when the postponed promise is actually awaited.\n if (isPostpone(err)) {\n return\n }\n\n // we don't want to log these errors\n if (isDynamicUsageError(err)) {\n return\n }\n\n console.error(err)\n})\n\nprocess.on('rejectionHandled', () => {\n // It is ok to await a Promise late in Next.js as it allows for better\n // prefetching patterns to avoid waterfalls. We ignore logging these.\n // We should've already errored in anyway unhandledRejection.\n})\n\nconst FATAL_UNHANDLED_NEXT_API_EXIT_CODE = 78\n\nprocess.on('uncaughtException', (err) => {\n if (isDynamicUsageError(err)) {\n console.error(\n 'A Next.js API that uses exceptions to signal framework behavior was uncaught. This suggests improper usage of a Next.js API. The original error is printed below and the build will now exit.'\n )\n console.error(err)\n process.exit(FATAL_UNHANDLED_NEXT_API_EXIT_CODE)\n } else {\n console.error(err)\n }\n})\n"],"names":["exportPages","process","env","NEXT_IS_EXPORT_WORKER","envConfig","require","globalThis","__NEXT_DATA__","nextExport","TimeoutError","Error","code","ExportPageError","exportPageImpl","input","fileWriter","req","path","pathMap","distDir","pagesDataDir","buildExport","serverRuntimeConfig","subFolders","optimizeCss","disableOptimizedLoading","debugOutput","enableExperimentalReact","ampValidatorPath","trailingSlash","sriEnabled","__NEXT_EXPERIMENTAL_REACT","page","_fallbackRouteParams","_isAppDir","isAppDir","_isDynamicError","isDynamicError","_isRoutePPREnabled","isRoutePPREnabled","_isProspectiveRender","isProspectiveRender","query","originalQuery","fallbackRouteParams","getFallbackRouteParams","pathname","normalizeAppPath","isDynamic","isDynamicRoute","outDir","join","filePath","normalizePagePath","ampPath","renderAmpPath","updatedPath","_ssgPath","locale","_locale","renderOpts","localePathResult","normalizeLocalePath","locales","detectedLocale","defaultLocale","hasOrigQueryValues","Object","keys","length","nonLocalizedPath","params","normalizedPage","getParams","res","createRequestResponseMocks","url","statusCode","some","p","endsWith","domainLocales","dl","includes","addRequestMeta","setConfig","publicRuntimeConfig","runtimeConfig","getHtmlFilename","sep","htmlFilename","pageExt","extname","pathExt","isBuiltinPaths","isHtmlExtPath","baseDir","dirname","htmlFilepath","fs","mkdir","recursive","components","loadComponents","isAppPath","isDev","isAppRouteRoute","exportAppRoute","routeModule","incrementalCache","cacheLifeProfiles","experimental","buildId","serveStreamingMetadata","Boolean","streamingMetadata","supportsDynamicResponse","hasNextSupport","isRevalidate","sharedContext","prospectiveRenderAppPage","exportAppPage","deploymentId","customServer","undefined","renderContext","isFallback","_pagesFallback","isDraftMode","developmentNotFoundSourcePage","exportPagesPage","exportPathMap","paths","dir","cacheHandler","cacheMaxMemorySize","fetchCacheKeyPrefix","nextConfig","options","createIncrementalCache","flushToDisk","cacheHandlers","maxConcurrency","staticGenerationMaxConcurrency","results","exportPageWithRetry","maxAttempts","pageKey","attempt","result","Promise","race","exportPage","amp","validator","parentSpanId","httpAgentOptions","needsExperimentalReact","sri","algorithm","dynamicIO","_","reject","setTimeout","staticPageGenerationTimeout","err","console","info","prerenderEarlyExit","error","exit","baseDelay","maxDelay","delay","Math","min","pow","jitter","random","r","i","subset","slice","subsetResults","all","map","staticGenerationRetryCount","push","trace","setAttribute","setHttpClientAndAgentOptions","MultiFileWriter","writeFile","data","exportPageSpan","start","Date","now","turborepoAccessTraceResult","TurborepoAccessTraceResult","traceAsyncFn","turborepoTraceAccess","wait","duration","isBailoutToCSRError","isStaticGenBailoutError","message","isError","stack","send","type","ampValidations","revalidate","metadata","ssgNotFound","hasEmptyPrelude","hasPostponed","serialize","fetchMetrics","on","isPostpone","isDynamicUsageError","FATAL_UNHANDLED_NEXT_API_EXIT_CODE"],"mappings":";;;;+BAqWsBA;;;eAAAA;;;QA5Vf;sBAIqC;iEAC7B;gCACgB;2BACA;mCACG;qCACE;uBACd;mCACuB;gEACzB;6BACW;0BACE;6BAEU;iCACX;wBACD;0BACA;yBACyB;uBACxB;2BACN;wCACa;4BACZ;qCACS;8BACA;sCAI7B;gCAKA;wCACgC;yCAEC;iCAGR;;;;;;AAvChCC,QAAQC,GAAG,CAACC,qBAAqB,GAAG;AAyCpC,MAAMC,YAAYC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,cAAcrE,OAAOqE,YAAY;IACnC;AACF;AAEAzN,QAAQ0N,EAAE,CAAC,sBAAsB,CAACtD;IAChC,mDAAmD;IACnD,kDAAkD;IAClD,IAAIuD,IAAAA,sBAAU,EAACvD,MAAM;QACnB;IACF;IAEA,oCAAoC;IACpC,IAAIwD,IAAAA,wCAAmB,EAACxD,MAAM;QAC5B;IACF;IAEAC,QAAQG,KAAK,CAACJ;AAChB;AAEApK,QAAQ0N,EAAE,CAAC,oBAAoB;AAC7B,sEAAsE;AACtE,qEAAqE;AACrE,6DAA6D;AAC/D;AAEA,MAAMG,qCAAqC;AAE3C7N,QAAQ0N,EAAE,CAAC,qBAAqB,CAACtD;IAC/B,IAAIwD,IAAAA,wCAAmB,EAACxD,MAAM;QAC5BC,QAAQG,KAAK,CACX;QAEFH,QAAQG,KAAK,CAACJ;QACdpK,QAAQyK,IAAI,CAACoD;IACf,OAAO;QACLxD,QAAQG,KAAK,CAACJ;IAChB;AACF"}
@@ -407,7 +407,10 @@ class Server {
407
407
  clientSegmentCache: this.nextConfig.experimental.clientSegmentCache ?? false,
408
408
  inlineCss: this.nextConfig.experimental.inlineCss ?? false,
409
409
  authInterrupts: !!this.nextConfig.experimental.authInterrupts,
410
- streamingMetadata: !!this.nextConfig.experimental.streamingMetadata,
410
+ streamingMetadata: // Disable streaming metadata when dynamic IO is enabled.
411
+ // FIXME: remove dynamic IO guard once we fixed the dynamic indicator case.
412
+ // test/e2e/app-dir/dynamic-io/dynamic-io.test.ts - should not have static indicator on not-found route
413
+ !this.nextConfig.experimental.dynamicIO && !!this.nextConfig.experimental.streamingMetadata,
411
414
  htmlLimitedBots: this.nextConfig.experimental.htmlLimitedBots
412
415
  },
413
416
  onInstrumentationRequestError: this.instrumentationOnRequestError.bind(this),
@@ -1191,21 +1194,12 @@ class Server {
1191
1194
  hasGetStaticPaths = true;
1192
1195
  }
1193
1196
  }
1194
- const isHtmlBot = (0, _streamingmetadata.isHtmlBotRequest)(req);
1195
- if (isHtmlBot) {
1196
- this.renderOpts.serveStreamingMetadata = false;
1197
- }
1198
1197
  if (hasFallback || (staticPaths == null ? void 0 : staticPaths.includes(resolvedUrlPathname)) || // this signals revalidation in deploy environments
1199
1198
  // TODO: make this more generic
1200
1199
  req.headers['x-now-route-matches']) {
1201
1200
  isSSG = true;
1202
1201
  } else if (!this.renderOpts.dev) {
1203
1202
  isSSG ||= !!prerenderManifest.routes[(0, _toroute.toRoute)(pathname)];
1204
- if (isHtmlBot) {
1205
- // When it's html limited bots request, disable SSG
1206
- // and perform the full blocking & dynamic rendering.
1207
- isSSG = false;
1208
- }
1209
1203
  }
1210
1204
  // Toggle whether or not this is a Data request
1211
1205
  const isNextDataRequest = !!((0, _requestmeta.getRequestMeta)(req, 'isNextDataReq') || req.headers['x-nextjs-data'] && this.serverOptions.webServerConfig) && (isSSG || hasServerProps);
@@ -1274,6 +1268,11 @@ class Server {
1274
1268
  // within this function; the static segment data should have already been
1275
1269
  // generated, so we will always either return a static response or a 404.
1276
1270
  const segmentPrefetchHeader = (0, _requestmeta.getRequestMeta)(req, 'segmentPrefetchRSCRequest');
1271
+ const isHtmlBot = (0, _streamingmetadata.isHtmlBotRequest)(req);
1272
+ if (isHtmlBot && isRoutePPREnabled) {
1273
+ isSSG = false;
1274
+ this.renderOpts.serveStreamingMetadata = false;
1275
+ }
1277
1276
  // we need to ensure the status code if /404 is visited directly
1278
1277
  if (is404Page && !isNextDataRequest && !isRSCRequest) {
1279
1278
  res.statusCode = 404;
@@ -1420,7 +1419,8 @@ class Server {
1420
1419
  // make sure to only add query values from original URL
1421
1420
  query: origQuery
1422
1421
  });
1423
- const shouldWaitOnAllReady = !supportsDynamicResponse || isHtmlBot;
1422
+ const shouldWaitOnAllReady = !supportsDynamicResponse || // When html bots request PPR page, perform the full dynamic rendering.
1423
+ isHtmlBot && isRoutePPREnabled;
1424
1424
  const renderOpts = {
1425
1425
  ...components,
1426
1426
  ...opts,