qalita 2.5.4__py3-none-any.whl → 2.6.1__py3-none-any.whl

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 (213) hide show
  1. qalita/_frontend/.next/static/_0oyfpC7N2IGDMa04TT9R/_clientMiddlewareManifest.json +6 -0
  2. qalita/_frontend/.next/static/chunks/236f7e5abd6f09ff.js +4 -0
  3. qalita/_frontend/.next/static/chunks/30ea11065999f7ac.js +1 -0
  4. qalita/_frontend/.next/static/chunks/4dd28bc3f722184a.js +2 -0
  5. qalita/_frontend/.next/static/chunks/711d597b816a80c1.js +1 -0
  6. qalita/_frontend/.next/static/chunks/7340adf74ff47ec0.js +1 -0
  7. qalita/_frontend/.next/static/chunks/a6dad97d9634a72d.js.map +1 -0
  8. qalita/_frontend/.next/static/chunks/{e393fec0d8ba175d.js → ecf559101be0ae12.js} +3 -3
  9. qalita/_frontend/.next/static/chunks/turbopack-25186fc8e1264445.js +4 -0
  10. qalita/_frontend/node_modules/@img/sharp-libvips-linux-x64/versions.json +30 -0
  11. qalita/_frontend/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
  12. qalita/_frontend/node_modules/@next/env/package.json +4 -4
  13. qalita/_frontend/node_modules/next/dist/build/analyze/index.js +242 -0
  14. qalita/_frontend/node_modules/next/dist/build/define-env.js +22 -13
  15. qalita/_frontend/node_modules/next/dist/build/entries.js +5 -5
  16. qalita/_frontend/node_modules/next/dist/build/generate-routes-manifest.js +91 -0
  17. qalita/_frontend/node_modules/next/dist/build/index.js +172 -223
  18. qalita/_frontend/node_modules/next/dist/build/output/log.js +4 -7
  19. qalita/_frontend/node_modules/next/dist/build/segment-config/app/app-segments.js +23 -99
  20. qalita/_frontend/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +3 -3
  21. qalita/_frontend/node_modules/next/dist/build/spinner.js +3 -3
  22. qalita/_frontend/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
  23. qalita/_frontend/node_modules/next/dist/build/static-paths/app.js +69 -210
  24. qalita/_frontend/node_modules/next/dist/build/static-paths/utils.js +83 -11
  25. qalita/_frontend/node_modules/next/dist/build/swc/index.js +10 -6
  26. qalita/_frontend/node_modules/next/dist/build/templates/app-page.js +21 -14
  27. qalita/_frontend/node_modules/next/dist/build/templates/app-route.js +8 -10
  28. qalita/_frontend/node_modules/next/dist/build/templates/edge-app-route.js +7 -10
  29. qalita/_frontend/node_modules/next/dist/build/templates/edge-ssr-app.js +16 -20
  30. qalita/_frontend/node_modules/next/dist/build/templates/edge-ssr.js +20 -14
  31. qalita/_frontend/node_modules/next/dist/build/templates/edge-wrapper.js +24 -0
  32. qalita/_frontend/node_modules/next/dist/build/templates/middleware.js +7 -6
  33. qalita/_frontend/node_modules/next/dist/build/templates/pages-edge-api.js +3 -2
  34. qalita/_frontend/node_modules/next/dist/build/turbopack-analyze/index.js +116 -0
  35. qalita/_frontend/node_modules/next/dist/build/turbopack-build/impl.js +2 -1
  36. qalita/_frontend/node_modules/next/dist/build/type-check.js +7 -8
  37. qalita/_frontend/node_modules/next/dist/build/utils.js +45 -4
  38. qalita/_frontend/node_modules/next/dist/build/validate-app-paths.js +242 -0
  39. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js +20 -2
  40. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js +2 -5
  41. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js +4 -11
  42. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-root-params-loader.js +1 -1
  43. qalita/_frontend/node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.js +1 -1
  44. qalita/_frontend/node_modules/next/dist/build/webpack/plugins/middleware-plugin.js +3 -0
  45. qalita/_frontend/node_modules/next/dist/build/webpack-build/impl.js +1 -0
  46. qalita/_frontend/node_modules/next/dist/build/webpack-config.js +35 -3
  47. qalita/_frontend/node_modules/next/dist/cli/next-test.js +3 -5
  48. qalita/_frontend/node_modules/next/dist/client/components/app-router-headers.js +5 -0
  49. qalita/_frontend/node_modules/next/dist/client/components/app-router-instance.js +3 -11
  50. qalita/_frontend/node_modules/next/dist/client/components/app-router.js +8 -28
  51. qalita/_frontend/node_modules/next/dist/client/components/navigation-devtools.js +5 -7
  52. qalita/_frontend/node_modules/next/dist/client/components/navigation.js +4 -3
  53. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +3 -22
  54. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +6 -18
  55. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +844 -590
  56. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +4 -76
  57. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +21 -18
  58. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +48 -85
  59. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +25 -10
  60. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +126 -113
  61. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +30 -39
  62. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +0 -1
  63. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/router-reducer.js +2 -2
  64. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/cache-map.js +13 -18
  65. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/cache.js +27 -14
  66. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/lru.js +3 -1
  67. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/navigation.js +176 -133
  68. qalita/_frontend/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +12 -12
  69. qalita/_frontend/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +12 -12
  70. qalita/_frontend/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
  71. qalita/_frontend/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
  72. qalita/_frontend/node_modules/next/dist/compiled/react-is/package.json +1 -1
  73. qalita/_frontend/node_modules/next/dist/lib/build-custom-route.js +4 -4
  74. qalita/_frontend/node_modules/next/dist/lib/constants.js +0 -5
  75. qalita/_frontend/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
  76. qalita/_frontend/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +0 -1
  77. qalita/_frontend/node_modules/next/dist/lib/helpers/get-npx-command.js +3 -3
  78. qalita/_frontend/node_modules/next/dist/lib/inline-static-env.js +1 -1
  79. qalita/_frontend/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
  80. qalita/_frontend/node_modules/next/dist/lib/metadata/metadata.js +17 -11
  81. qalita/_frontend/node_modules/next/dist/lib/needs-experimental-react.js +2 -2
  82. qalita/_frontend/node_modules/next/dist/lib/resolve-build-paths.js +44 -76
  83. qalita/_frontend/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
  84. qalita/_frontend/node_modules/next/dist/lib/static-env.js +6 -6
  85. qalita/_frontend/node_modules/next/dist/lib/turbopack-warning.js +3 -5
  86. qalita/_frontend/node_modules/next/dist/lib/typescript/runTypeCheck.js +61 -5
  87. qalita/_frontend/node_modules/next/dist/lib/typescript/type-paths.js +56 -0
  88. qalita/_frontend/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +6 -17
  89. qalita/_frontend/node_modules/next/dist/lib/verify-typescript-setup.js +10 -2
  90. qalita/_frontend/node_modules/next/dist/lib/worker.js +17 -9
  91. qalita/_frontend/node_modules/next/dist/server/app-render/action-handler.js +113 -77
  92. qalita/_frontend/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +36 -15
  93. qalita/_frontend/node_modules/next/dist/server/app-render/app-render-render-utils.js +36 -15
  94. qalita/_frontend/node_modules/next/dist/server/app-render/app-render-scheduling.js +188 -0
  95. qalita/_frontend/node_modules/next/dist/server/app-render/app-render.js +804 -748
  96. qalita/_frontend/node_modules/next/dist/server/app-render/collect-segment-data.js +8 -2
  97. qalita/_frontend/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +1 -1
  98. qalita/_frontend/node_modules/next/dist/server/app-render/create-error-handler.js +42 -75
  99. qalita/_frontend/node_modules/next/dist/server/app-render/dynamic-rendering.js +127 -14
  100. qalita/_frontend/node_modules/next/dist/server/app-render/encryption-utils.js +3 -108
  101. qalita/_frontend/node_modules/next/dist/server/app-render/encryption.js +4 -3
  102. qalita/_frontend/node_modules/next/dist/server/app-render/flight-render-result.js +3 -2
  103. qalita/_frontend/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +9 -8
  104. qalita/_frontend/node_modules/next/dist/server/app-render/get-layer-assets.js +1 -1
  105. qalita/_frontend/node_modules/next/dist/server/app-render/manifests-singleton.js +257 -0
  106. qalita/_frontend/node_modules/next/dist/server/app-render/prospective-render-utils.js +25 -8
  107. qalita/_frontend/node_modules/next/dist/server/app-render/staged-rendering.js +161 -15
  108. qalita/_frontend/node_modules/next/dist/server/app-render/use-flight-response.js +67 -20
  109. qalita/_frontend/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +2 -2
  110. qalita/_frontend/node_modules/next/dist/server/async-storage/work-store.js +2 -1
  111. qalita/_frontend/node_modules/next/dist/server/base-server.js +32 -23
  112. qalita/_frontend/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
  113. qalita/_frontend/node_modules/next/dist/server/config-schema.js +8 -1
  114. qalita/_frontend/node_modules/next/dist/server/config-shared.js +83 -2
  115. qalita/_frontend/node_modules/next/dist/server/config.js +24 -17
  116. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
  117. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +37 -25
  118. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-types.js +1 -0
  119. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-webpack.js +62 -57
  120. qalita/_frontend/node_modules/next/dist/server/dev/log-requests.js +11 -3
  121. qalita/_frontend/node_modules/next/dist/server/dev/messages.js +10 -0
  122. qalita/_frontend/node_modules/next/dist/server/dev/serialized-errors.js +67 -0
  123. qalita/_frontend/node_modules/next/dist/server/dev/static-paths-worker.js +10 -0
  124. qalita/_frontend/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  125. qalita/_frontend/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +2 -2
  126. qalita/_frontend/node_modules/next/dist/server/lib/dev-bundler-service.js +6 -10
  127. qalita/_frontend/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +4 -4
  128. qalita/_frontend/node_modules/next/dist/server/lib/lazy-result.js +1 -1
  129. qalita/_frontend/node_modules/next/dist/server/lib/patch-fetch.js +9 -9
  130. qalita/_frontend/node_modules/next/dist/server/lib/router-server.js +43 -29
  131. qalita/_frontend/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +0 -21
  132. qalita/_frontend/node_modules/next/dist/server/lib/router-utils/filesystem.js +2 -7
  133. qalita/_frontend/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +8 -4
  134. qalita/_frontend/node_modules/next/dist/server/lib/start-server.js +3 -3
  135. qalita/_frontend/node_modules/next/dist/server/lib/trace/tracer.js +4 -0
  136. qalita/_frontend/node_modules/next/dist/server/load-components.js +3 -9
  137. qalita/_frontend/node_modules/next/dist/server/next-server.js +19 -18
  138. qalita/_frontend/node_modules/next/dist/server/next.js +1 -1
  139. qalita/_frontend/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +570 -0
  140. qalita/_frontend/node_modules/next/dist/server/node-environment-extensions/utils.js +60 -3
  141. qalita/_frontend/node_modules/next/dist/server/node-environment.js +1 -0
  142. qalita/_frontend/node_modules/next/dist/server/patch-error-inspect.js +7 -4
  143. qalita/_frontend/node_modules/next/dist/server/request/fallback-params.js +23 -66
  144. qalita/_frontend/node_modules/next/dist/server/route-modules/app-route/module.js +2 -2
  145. qalita/_frontend/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -3
  146. qalita/_frontend/node_modules/next/dist/server/route-modules/route-module.js +79 -18
  147. qalita/_frontend/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +28 -4
  148. qalita/_frontend/node_modules/next/dist/server/typescript/rules/config.js +50 -6
  149. qalita/_frontend/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +68 -23
  150. qalita/_frontend/node_modules/next/dist/server/web/edge-route-module-wrapper.js +7 -5
  151. qalita/_frontend/node_modules/next/dist/server/web/sandbox/context.js +8 -9
  152. qalita/_frontend/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +2 -1
  153. qalita/_frontend/node_modules/next/dist/server/web/spec-extension/revalidate.js +7 -3
  154. qalita/_frontend/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
  155. qalita/_frontend/node_modules/next/dist/shared/lib/constants.js +6 -1
  156. qalita/_frontend/node_modules/next/dist/shared/lib/deployment-id.js +36 -0
  157. qalita/_frontend/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  158. qalita/_frontend/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +5 -0
  159. qalita/_frontend/node_modules/next/dist/shared/lib/router/routes/app.js +122 -0
  160. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +20 -49
  161. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +6 -6
  162. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
  163. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
  164. qalita/_frontend/node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js +3 -24
  165. qalita/_frontend/node_modules/next/dist/shared/lib/segment.js +5 -0
  166. qalita/_frontend/node_modules/next/dist/shared/lib/turbopack/utils.js +6 -5
  167. qalita/_frontend/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  168. qalita/_frontend/node_modules/next/dist/telemetry/events/build.js +11 -0
  169. qalita/_frontend/node_modules/next/dist/telemetry/events/version.js +2 -2
  170. qalita/_frontend/node_modules/next/package.json +20 -18
  171. qalita/_frontend/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  172. qalita/_frontend/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  173. qalita/_frontend/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  174. qalita/_frontend/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  175. qalita/_frontend/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  176. qalita/_frontend/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  177. qalita/_frontend/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  178. qalita/_frontend/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  179. qalita/_frontend/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  180. qalita/_frontend/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  181. qalita/_frontend/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  182. qalita/_frontend/node_modules/typescript/lib/typesMap.json +497 -0
  183. qalita/_frontend/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  184. qalita/_frontend/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  185. qalita/_frontend/package.json +3 -3
  186. qalita/_frontend/server.js +1 -1
  187. qalita/commands/pack.py +3 -3
  188. qalita/commands/source.py +1 -1
  189. qalita/internal/utils.py +11 -7
  190. qalita/web/app.py +20 -4
  191. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/METADATA +1 -1
  192. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/RECORD +197 -168
  193. qalita/_frontend/.next/static/chunks/023d923a37d494fc.js +0 -1
  194. qalita/_frontend/.next/static/chunks/247eb132b7f7b574.js +0 -1
  195. qalita/_frontend/.next/static/chunks/bba035711c7e37a2.js +0 -4
  196. qalita/_frontend/.next/static/chunks/c903f9580a4b6572.js +0 -2
  197. qalita/_frontend/.next/static/chunks/cbd55ab9639e1e66.js +0 -1
  198. qalita/_frontend/.next/static/chunks/turbopack-1ad58da399056f41.js +0 -3
  199. qalita/_frontend/node_modules/next/dist/build/deployment-id.js +0 -18
  200. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js +0 -53
  201. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js +0 -105
  202. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js +0 -110
  203. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js +0 -131
  204. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js +0 -25
  205. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js +0 -32
  206. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js +0 -104
  207. qalita/_frontend/node_modules/next/dist/server/app-render/action-utils.js +0 -90
  208. qalita/_frontend/node_modules/next/dist/server/normalizers/request/prefetch-rsc.js +0 -31
  209. /qalita/_frontend/.next/static/{X4_AlYMbCyee-ZVLjCYMg → _0oyfpC7N2IGDMa04TT9R}/_buildManifest.js +0 -0
  210. /qalita/_frontend/.next/static/{X4_AlYMbCyee-ZVLjCYMg → _0oyfpC7N2IGDMa04TT9R}/_ssgManifest.js +0 -0
  211. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/WHEEL +0 -0
  212. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/entry_points.txt +0 -0
  213. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/licenses/LICENSE +0 -0
@@ -290,6 +290,7 @@ const experimentalSchema = {
290
290
  ]).optional()
291
291
  })
292
292
  ]).optional(),
293
+ transitionIndicator: _zod.z.boolean().optional(),
293
294
  typedRoutes: _zod.z.boolean().optional(),
294
295
  webpackBuildWorker: _zod.z.boolean().optional(),
295
296
  webpackMemoryOptimizations: _zod.z.boolean().optional(),
@@ -298,9 +299,13 @@ const experimentalSchema = {
298
299
  turbopackFileSystemCacheForDev: _zod.z.boolean().optional(),
299
300
  turbopackFileSystemCacheForBuild: _zod.z.boolean().optional(),
300
301
  turbopackSourceMaps: _zod.z.boolean().optional(),
302
+ turbopackInputSourceMaps: _zod.z.boolean().optional(),
301
303
  turbopackTreeShaking: _zod.z.boolean().optional(),
304
+ turbopackRemoveUnusedImports: _zod.z.boolean().optional(),
302
305
  turbopackRemoveUnusedExports: _zod.z.boolean().optional(),
303
306
  turbopackScopeHoisting: _zod.z.boolean().optional(),
307
+ turbopackClientSideNestedAsyncChunking: _zod.z.boolean().optional(),
308
+ turbopackServerSideNestedAsyncChunking: _zod.z.boolean().optional(),
304
309
  turbopackImportTypeBytes: _zod.z.boolean().optional(),
305
310
  turbopackUseSystemTlsCerts: _zod.z.boolean().optional(),
306
311
  turbopackUseBuiltinBabel: _zod.z.boolean().optional(),
@@ -309,6 +314,7 @@ const experimentalSchema = {
309
314
  'named',
310
315
  'deterministic'
311
316
  ]).optional(),
317
+ turbopackInferModuleSideEffects: _zod.z.boolean().optional(),
312
318
  optimizePackageImports: _zod.z.array(_zod.z.string()).optional(),
313
319
  optimizeServerReact: _zod.z.boolean().optional(),
314
320
  clientTraceMetadata: _zod.z.array(_zod.z.string()).optional(),
@@ -340,7 +346,8 @@ const experimentalSchema = {
340
346
  })
341
347
  ]).optional(),
342
348
  lockDistDir: _zod.z.boolean().optional(),
343
- hideLogsAfterAbort: _zod.z.boolean().optional()
349
+ hideLogsAfterAbort: _zod.z.boolean().optional(),
350
+ runtimeServerDeploymentId: _zod.z.boolean().optional()
344
351
  };
345
352
  const configSchema = _zod.z.lazy(()=>_zod.z.strictObject({
346
353
  allowedDevOrigins: _zod.z.array(_zod.z.string()).optional(),
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  0 && (module.exports = {
6
6
  defaultConfig: null,
7
+ getNextConfigRuntime: null,
7
8
  normalizeConfig: null
8
9
  });
9
10
  function _export(target, all) {
@@ -16,6 +17,9 @@ _export(exports, {
16
17
  defaultConfig: function() {
17
18
  return defaultConfig;
18
19
  },
20
+ getNextConfigRuntime: function() {
21
+ return getNextConfigRuntime;
22
+ },
19
23
  normalizeConfig: function() {
20
24
  return normalizeConfig;
21
25
  }
@@ -136,7 +140,6 @@ const defaultConfig = Object.freeze({
136
140
  appNavFailHandling: false,
137
141
  prerenderEarlyExit: true,
138
142
  serverMinification: true,
139
- serverSourceMaps: false,
140
143
  linkNoTouchStart: false,
141
144
  caseSensitiveRoutes: false,
142
145
  clientParamParsingOrigins: undefined,
@@ -197,6 +200,7 @@ const defaultConfig = Object.freeze({
197
200
  serverComponentsHmrCache: true,
198
201
  staticGenerationMaxConcurrency: 8,
199
202
  staticGenerationMinPagesPerWorker: 25,
203
+ transitionIndicator: false,
200
204
  inlineCss: false,
201
205
  useCache: undefined,
202
206
  slowModuleDetection: undefined,
@@ -206,7 +210,10 @@ const defaultConfig = Object.freeze({
206
210
  isolatedDevBuild: true,
207
211
  proxyClientMaxBodySize: 10485760,
208
212
  hideLogsAfterAbort: false,
209
- mcpServer: true
213
+ mcpServer: true,
214
+ turbopackFileSystemCacheForDev: true,
215
+ turbopackFileSystemCacheForBuild: false,
216
+ turbopackInferModuleSideEffects: !(0, _canaryonlyconfigerror.isStableBuild)()
210
217
  },
211
218
  htmlLimitedBots: undefined,
212
219
  bundlePagesRouterDependencies: false
@@ -220,5 +227,79 @@ async function normalizeConfig(phase, config) {
220
227
  // Support `new Promise` and `async () =>` as return values of the config export
221
228
  return await config;
222
229
  }
230
+ function getNextConfigRuntime(config) {
231
+ let ex = config.experimental;
232
+ let experimental = ex ? {
233
+ ppr: ex.ppr,
234
+ taint: ex.taint,
235
+ serverActions: ex.serverActions,
236
+ staleTimes: ex.staleTimes,
237
+ dynamicOnHover: ex.dynamicOnHover,
238
+ inlineCss: ex.inlineCss,
239
+ authInterrupts: ex.authInterrupts,
240
+ clientTraceMetadata: ex.clientTraceMetadata,
241
+ clientParamParsingOrigins: ex.clientParamParsingOrigins,
242
+ adapterPath: ex.adapterPath,
243
+ allowedRevalidateHeaderKeys: ex.allowedRevalidateHeaderKeys,
244
+ fetchCacheKeyPrefix: ex.fetchCacheKeyPrefix,
245
+ isrFlushToDisk: ex.isrFlushToDisk,
246
+ optimizeCss: ex.optimizeCss,
247
+ nextScriptWorkers: ex.nextScriptWorkers,
248
+ disableOptimizedLoading: ex.disableOptimizedLoading,
249
+ largePageDataBytes: ex.largePageDataBytes,
250
+ serverComponentsHmrCache: ex.serverComponentsHmrCache,
251
+ caseSensitiveRoutes: ex.caseSensitiveRoutes,
252
+ validateRSCRequestHeaders: ex.validateRSCRequestHeaders,
253
+ sri: ex.sri,
254
+ useSkewCookie: ex.useSkewCookie,
255
+ preloadEntriesOnStart: ex.preloadEntriesOnStart,
256
+ hideLogsAfterAbort: ex.hideLogsAfterAbort,
257
+ removeUncaughtErrorAndRejectionListeners: ex.removeUncaughtErrorAndRejectionListeners,
258
+ imgOptConcurrency: ex.imgOptConcurrency,
259
+ imgOptMaxInputPixels: ex.imgOptMaxInputPixels,
260
+ imgOptSequentialRead: ex.imgOptSequentialRead,
261
+ imgOptSkipMetadata: ex.imgOptSkipMetadata,
262
+ imgOptTimeoutInSeconds: ex.imgOptTimeoutInSeconds,
263
+ proxyClientMaxBodySize: ex.proxyClientMaxBodySize,
264
+ proxyTimeout: ex.proxyTimeout,
265
+ testProxy: ex.testProxy,
266
+ runtimeServerDeploymentId: ex.runtimeServerDeploymentId,
267
+ trustHostHeader: ex.trustHostHeader,
268
+ isExperimentalCompile: ex.isExperimentalCompile
269
+ } : {};
270
+ let runtimeConfig = {
271
+ deploymentId: config.experimental.runtimeServerDeploymentId ? '' : config.deploymentId,
272
+ configFileName: undefined,
273
+ env: undefined,
274
+ distDir: config.distDir,
275
+ cacheComponents: config.cacheComponents,
276
+ htmlLimitedBots: config.htmlLimitedBots,
277
+ assetPrefix: config.assetPrefix,
278
+ output: config.output,
279
+ crossOrigin: config.crossOrigin,
280
+ trailingSlash: config.trailingSlash,
281
+ images: config.images,
282
+ reactMaxHeadersLength: config.reactMaxHeadersLength,
283
+ cacheLife: config.cacheLife,
284
+ basePath: config.basePath,
285
+ expireTime: config.expireTime,
286
+ generateEtags: config.generateEtags,
287
+ poweredByHeader: config.poweredByHeader,
288
+ cacheHandler: config.cacheHandler,
289
+ cacheHandlers: config.cacheHandlers,
290
+ cacheMaxMemorySize: config.cacheMaxMemorySize,
291
+ compress: config.compress,
292
+ i18n: config.i18n,
293
+ httpAgentOptions: config.httpAgentOptions,
294
+ skipProxyUrlNormalize: config.skipProxyUrlNormalize,
295
+ pageExtensions: config.pageExtensions,
296
+ useFileSystemPublicRoutes: config.useFileSystemPublicRoutes,
297
+ experimental
298
+ };
299
+ if (config.experimental.isExperimentalCompile) {
300
+ runtimeConfig.env = config.env;
301
+ }
302
+ return runtimeConfig;
303
+ }
223
304
 
224
305
  //# sourceMappingURL=config-shared.js.map
@@ -49,7 +49,6 @@ const _dset = require("../shared/lib/dset");
49
49
  const _zod = require("../shared/lib/zod");
50
50
  const _isbot = require("../shared/lib/router/utils/is-bot");
51
51
  const _findpagesdir = require("../lib/find-pages-dir");
52
- const _canaryonlyconfigerror = require("../shared/lib/errors/canary-only-config-error");
53
52
  const _interopdefault = require("../lib/interop-default");
54
53
  const _hash = require("../shared/lib/hash");
55
54
  const _harddeprecatedconfigerror = require("../shared/lib/errors/hard-deprecated-config-error");
@@ -215,7 +214,7 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
215
214
  * @param silent - Whether to suppress warnings.
216
215
  * @returns The complete config.
217
216
  */ function assignDefaultsAndValidate(dir, userConfig, silent, phase) {
218
- var _result_experimental, _result_experimental1, _result_experimental_serverActions, _result_experimental2, _userConfig_experimental, _userConfig_experimental1, _userConfig_experimental2, _userConfig_experimental3, _userConfig_experimental4, _userConfig_experimental5, _userConfig_experimental6, _userConfig_experimental7, _userConfig_experimental8, _userConfig_experimental9, _userConfig_experimental10, _userConfig_experimental11, _userConfig_experimental12, _userConfig_experimental13, _userConfig_experimental14, _userConfig_experimental15, _result_experimental3, _result_turbopack, _result_turbopack1, _result_devIndicators, _result_experimental4, _result_experimental5;
217
+ var _result_experimental, _result_experimental_serverActions, _result_experimental1, _userConfig_experimental, _userConfig_experimental1, _userConfig_experimental2, _userConfig_experimental3, _userConfig_experimental4, _userConfig_experimental5, _userConfig_experimental6, _userConfig_experimental7, _userConfig_experimental8, _userConfig_experimental9, _userConfig_experimental10, _userConfig_experimental11, _userConfig_experimental12, _userConfig_experimental13, _userConfig_experimental14, _userConfig_experimental15, _result_experimental2, _result_turbopack, _result_turbopack1, _result_devIndicators, _result_experimental3;
219
218
  const configFileName = userConfig.configFileName;
220
219
  if (typeof userConfig.exportTrailingSlash !== 'undefined') {
221
220
  if (!silent) {
@@ -310,10 +309,10 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
310
309
  }
311
310
  };
312
311
  // ensure correct default is set for api-resolver revalidate handling
313
- if (!((_result_experimental = result.experimental) == null ? void 0 : _result_experimental.trustHostHeader) && _ciinfo.hasNextSupport) {
312
+ if (!result.experimental.trustHostHeader && _ciinfo.hasNextSupport) {
314
313
  result.experimental.trustHostHeader = true;
315
314
  }
316
- if (((_result_experimental1 = result.experimental) == null ? void 0 : _result_experimental1.allowDevelopmentBuild) && process.env.NODE_ENV !== 'development') {
315
+ if (((_result_experimental = result.experimental) == null ? void 0 : _result_experimental.allowDevelopmentBuild) && process.env.NODE_ENV !== 'development') {
317
316
  throw Object.defineProperty(new Error(`The experimental.allowDevelopmentBuild option requires NODE_ENV to be explicitly set to 'development'.`), "__NEXT_ERROR_CODE", {
318
317
  value: "E195",
319
318
  enumerable: false,
@@ -328,15 +327,6 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
328
327
  configurable: true
329
328
  });
330
329
  }
331
- if ((0, _canaryonlyconfigerror.isStableBuild)()) {
332
- var _result_experimental6;
333
- // Prevents usage of certain experimental features outside of canary
334
- if ((_result_experimental6 = result.experimental) == null ? void 0 : _result_experimental6.turbopackFileSystemCacheForBuild) {
335
- throw new _canaryonlyconfigerror.CanaryOnlyConfigError({
336
- feature: 'experimental.turbopackFileSystemCacheForBuild'
337
- });
338
- }
339
- }
340
330
  if (result.experimental.ppr) {
341
331
  throw new _harddeprecatedconfigerror.HardDeprecatedConfigError(`\`experimental.ppr\` has been merged into \`cacheComponents\`. The Partial Prerendering feature is still available, but is now enabled via \`cacheComponents\`. Please update your ${configFileName} accordingly.`);
342
332
  }
@@ -563,7 +553,7 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
563
553
  }
564
554
  result.output = 'standalone';
565
555
  }
566
- if (typeof ((_result_experimental2 = result.experimental) == null ? void 0 : (_result_experimental_serverActions = _result_experimental2.serverActions) == null ? void 0 : _result_experimental_serverActions.bodySizeLimit) !== 'undefined') {
556
+ if (typeof ((_result_experimental1 = result.experimental) == null ? void 0 : (_result_experimental_serverActions = _result_experimental1.serverActions) == null ? void 0 : _result_experimental_serverActions.bodySizeLimit) !== 'undefined') {
567
557
  var _result_experimental_serverActions1;
568
558
  const value = parseInt((_result_experimental_serverActions1 = result.experimental.serverActions) == null ? void 0 : _result_experimental_serverActions1.bodySizeLimit.toString());
569
559
  if (isNaN(value) || value < 1) {
@@ -628,7 +618,7 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
628
618
  result.skipMiddlewareUrlNormalize = userConfig.skipProxyUrlNormalize;
629
619
  }
630
620
  // Normalize & validate experimental.proxyClientMaxBodySize
631
- if (typeof ((_result_experimental3 = result.experimental) == null ? void 0 : _result_experimental3.proxyClientMaxBodySize) !== 'undefined') {
621
+ if (typeof ((_result_experimental2 = result.experimental) == null ? void 0 : _result_experimental2.proxyClientMaxBodySize) !== 'undefined') {
632
622
  const proxyClientMaxBodySize = result.experimental.proxyClientMaxBodySize;
633
623
  let normalizedValue;
634
624
  if (typeof proxyClientMaxBodySize === 'string') {
@@ -668,6 +658,16 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
668
658
  _log.warn(`turbopack.root should be absolute, using: ${result.turbopack.root}`);
669
659
  }
670
660
  }
661
+ if (result.experimental.runtimeServerDeploymentId == null && phase === _constants.PHASE_PRODUCTION_BUILD && _ciinfo.hasNextSupport && process.env.NEXT_DEPLOYMENT_ID) {
662
+ if (result.deploymentId != null && result.deploymentId !== process.env.NEXT_DEPLOYMENT_ID) {
663
+ throw Object.defineProperty(new Error(`The NEXT_DEPLOYMENT_ID environment variable value "${process.env.NEXT_DEPLOYMENT_ID}" does not match the provided deploymentId "${result.deploymentId}" in the config.`), "__NEXT_ERROR_CODE", {
664
+ value: "E971",
665
+ enumerable: false,
666
+ configurable: true
667
+ });
668
+ }
669
+ result.experimental.runtimeServerDeploymentId = true;
670
+ }
671
671
  // only leverage deploymentId
672
672
  if (process.env.NEXT_DEPLOYMENT_ID) {
673
673
  result.deploymentId = process.env.NEXT_DEPLOYMENT_ID;
@@ -928,7 +928,7 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
928
928
  transform: 'lodash/{{member}}'
929
929
  }
930
930
  };
931
- const userProvidedOptimizePackageImports = ((_result_experimental4 = result.experimental) == null ? void 0 : _result_experimental4.optimizePackageImports) || [];
931
+ const userProvidedOptimizePackageImports = ((_result_experimental3 = result.experimental) == null ? void 0 : _result_experimental3.optimizePackageImports) || [];
932
932
  result.experimental.optimizePackageImports = [
933
933
  ...new Set([
934
934
  ...userProvidedOptimizePackageImports,
@@ -1037,7 +1037,7 @@ function warnCustomizedOption(config, key, defaultValue, customMessage, configFi
1037
1037
  // Store the distDirRoot in the config before it is modified by the isolatedDevBuild flag
1038
1038
  ;
1039
1039
  result.distDirRoot = result.distDir;
1040
- if (phase === _constants.PHASE_DEVELOPMENT_SERVER && ((_result_experimental5 = result.experimental) == null ? void 0 : _result_experimental5.isolatedDevBuild)) {
1040
+ if (phase === _constants.PHASE_DEVELOPMENT_SERVER && result.experimental.isolatedDevBuild) {
1041
1041
  result.distDir = (0, _path.join)(result.distDir, 'dev');
1042
1042
  }
1043
1043
  return result;
@@ -1344,6 +1344,13 @@ function enforceExperimentalFeatures(config, options) {
1344
1344
  addConfiguredExperimentalFeature(configuredExperimentalFeatures, 'reactDebugChannel', true, 'enabled by `__NEXT_EXPERIMENTAL_DEBUG_CHANNEL`');
1345
1345
  }
1346
1346
  }
1347
+ if (process.env.__NEXT_EXPERIMENTAL_TRANSITION_INDICATOR === 'true' && // We do respect an explicit value in the user config.
1348
+ (config.experimental.transitionIndicator === undefined || isDefaultConfig && !config.experimental.transitionIndicator)) {
1349
+ config.experimental.transitionIndicator = true;
1350
+ if (configuredExperimentalFeatures) {
1351
+ addConfiguredExperimentalFeature(configuredExperimentalFeatures, 'transitionIndicator', true, 'enabled by `__NEXT_EXPERIMENTAL_TRANSITION_INDICATOR`');
1352
+ }
1353
+ }
1347
1354
  if (process.env.__NEXT_ENABLE_REACT_COMPILER === 'true' && // We do respect an explicit value in the user config.
1348
1355
  (config.reactCompiler === undefined || isDefaultConfig && !config.reactCompiler)) {
1349
1356
  config.reactCompiler = true;
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, /**
6
+ * Rspack Persistent Cache Strategy for Next.js Development
7
+ *
8
+ * Rspack's persistent caching differs from Webpack in how it manages module graphs.
9
+ * While Webpack incrementally updates modules, Rspack operates on complete module
10
+ * graph snapshots for cache restoration.
11
+ *
12
+ * Problem:
13
+ * - Next.js dev server starts with no page modules in the initial entry points
14
+ * - When Rspack restores from persistent cache, it finds no modules and purges
15
+ * the entire module graph
16
+ * - Later page requests find no cached module information, preventing cache reuse
17
+ *
18
+ * Solution:
19
+ * - Track successfully built page entries after each compilation
20
+ * - Restore these entries on dev server restart to maintain module graph continuity
21
+ * - This ensures previously compiled pages can leverage persistent cache for faster builds
22
+ */ "default", {
23
+ enumerable: true,
24
+ get: function() {
25
+ return HotReloaderRspack;
26
+ }
27
+ });
28
+ const _path = /*#__PURE__*/ _interop_require_default(require("path"));
29
+ const _promises = /*#__PURE__*/ _interop_require_default(require("fs/promises"));
30
+ const _crypto = require("crypto");
31
+ const _hotreloaderwebpack = /*#__PURE__*/ _interop_require_default(require("./hot-reloader-webpack"));
32
+ const _ondemandentryhandler = require("./on-demand-entry-handler");
33
+ const _constants = require("../../shared/lib/constants");
34
+ function _interop_require_default(obj) {
35
+ return obj && obj.__esModule ? obj : {
36
+ default: obj
37
+ };
38
+ }
39
+ class HotReloaderRspack extends _hotreloaderwebpack.default {
40
+ async afterCompile(multiCompiler) {
41
+ // Always initialize the fallback error watcher for Rspack.
42
+ // Rspack may restore/retain the previous build's error state, so without this
43
+ // a page that previously failed to build might not be rebuilt on the next request.
44
+ await super.buildFallbackError();
45
+ const rspackStartSpan = this.hotReloaderSpan.traceChild('rspack-after-compile');
46
+ await rspackStartSpan.traceAsyncFn(async ()=>{
47
+ const hash = (0, _crypto.createHash)('sha1');
48
+ multiCompiler.compilers.forEach((compiler)=>{
49
+ const cache = compiler.options.cache;
50
+ if (typeof cache === 'object' && 'version' in cache && cache.version) {
51
+ hash.update(cache.version);
52
+ if (compiler.name === _constants.COMPILER_NAMES.client) {
53
+ this.isClientCacheEnabled = true;
54
+ } else if (compiler.name === _constants.COMPILER_NAMES.server) {
55
+ this.isServerCacheEnabled = true;
56
+ } else if (compiler.name === _constants.COMPILER_NAMES.edgeServer) {
57
+ this.isEdgeServerCacheEnabled = true;
58
+ }
59
+ } else {
60
+ hash.update('-');
61
+ }
62
+ return undefined;
63
+ });
64
+ this.builtEntriesCachePath = _path.default.join(this.distDir, 'cache', 'rspack', hash.digest('hex').substring(0, 16), 'built-entries.json');
65
+ const hasBuiltEntriesCache = await _promises.default.access(this.builtEntriesCachePath).then(()=>true, ()=>false);
66
+ if (hasBuiltEntriesCache) {
67
+ try {
68
+ const builtEntries = JSON.parse(await _promises.default.readFile(this.builtEntriesCachePath, 'utf-8') || '{}');
69
+ await Promise.all(Object.keys(builtEntries).map(async (entryKey)=>{
70
+ const entryData = builtEntries[entryKey];
71
+ const isEntry = entryData.type === _ondemandentryhandler.EntryTypes.ENTRY;
72
+ const isChildEntry = entryData.type === _ondemandentryhandler.EntryTypes.CHILD_ENTRY;
73
+ // Check if the page was removed or disposed and remove it
74
+ if (isEntry) {
75
+ const pageExists = !entryData.dispose && await _promises.default.access(entryData.absolutePagePath).then(()=>true, ()=>false);
76
+ if (!pageExists) {
77
+ delete builtEntries[entryKey];
78
+ return;
79
+ } else if (!('hash' in builtEntries[entryKey]) || builtEntries[entryKey].hash !== await calculateFileHash(entryData.absolutePagePath)) {
80
+ delete builtEntries[entryKey];
81
+ return;
82
+ }
83
+ }
84
+ // For child entries, if it has an entry file and it's gone, remove it
85
+ if (isChildEntry) {
86
+ if (entryData.absoluteEntryFilePath) {
87
+ const pageExists = !entryData.dispose && await _promises.default.access(entryData.absoluteEntryFilePath).then(()=>true, ()=>false);
88
+ if (!pageExists) {
89
+ delete builtEntries[entryKey];
90
+ return;
91
+ } else {
92
+ if (!('hash' in builtEntries[entryKey]) || builtEntries[entryKey].hash !== await calculateFileHash(entryData.absoluteEntryFilePath)) {
93
+ delete builtEntries[entryKey];
94
+ return;
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }));
100
+ Object.assign((0, _ondemandentryhandler.getEntries)(multiCompiler.outputPath), builtEntries);
101
+ } catch (error) {
102
+ console.error('Rspack failed to read built entries cache: ', error);
103
+ }
104
+ }
105
+ });
106
+ }
107
+ async ensurePage({ page, clientOnly, appPaths, definition, isApp, url }) {
108
+ await super.ensurePage({
109
+ page,
110
+ clientOnly,
111
+ appPaths,
112
+ definition,
113
+ isApp,
114
+ url
115
+ });
116
+ const entries = (0, _ondemandentryhandler.getEntries)(this.multiCompiler.outputPath);
117
+ const builtEntries = {};
118
+ await Promise.all(Object.keys(entries).map(async (entryName)=>{
119
+ const entry = entries[entryName];
120
+ if (entry.status !== _ondemandentryhandler.BUILT) return;
121
+ const result = /^(client|server|edge-server)@(app|pages|root)@(.*)/g.exec(entryName);
122
+ const [, key /* pageType */ , , ] = result// this match should always happen
123
+ ;
124
+ if (key === 'client' && !this.isClientCacheEnabled) return;
125
+ if (key === 'server' && !this.isServerCacheEnabled) return;
126
+ if (key === 'edge-server' && !this.isEdgeServerCacheEnabled) return;
127
+ // TODO: Rspack does not store middleware entries in persistent cache, causing
128
+ // test/integration/middleware-src/test/index.test.ts to fail. This is a temporary
129
+ // workaround to skip middleware entry caching until Rspack properly supports it.
130
+ if (page === '/middleware') {
131
+ return;
132
+ }
133
+ let hash;
134
+ if (entry.type === _ondemandentryhandler.EntryTypes.ENTRY) {
135
+ hash = await calculateFileHash(entry.absolutePagePath);
136
+ } else if (entry.absoluteEntryFilePath) {
137
+ hash = await calculateFileHash(entry.absoluteEntryFilePath);
138
+ }
139
+ if (!hash) {
140
+ return;
141
+ }
142
+ builtEntries[entryName] = entry;
143
+ builtEntries[entryName].hash = hash;
144
+ }));
145
+ const hasBuitEntriesCache = await _promises.default.access(this.builtEntriesCachePath).then(()=>true, ()=>false);
146
+ try {
147
+ if (!hasBuitEntriesCache) {
148
+ await _promises.default.mkdir(_path.default.dirname(this.builtEntriesCachePath), {
149
+ recursive: true
150
+ });
151
+ }
152
+ await _promises.default.writeFile(this.builtEntriesCachePath, JSON.stringify(builtEntries, null, 2));
153
+ } catch (error) {
154
+ console.error('Rspack failed to write built entries cache: ', error);
155
+ }
156
+ }
157
+ constructor(...args){
158
+ super(...args), this.isClientCacheEnabled = false, this.isServerCacheEnabled = false, this.isEdgeServerCacheEnabled = false;
159
+ }
160
+ }
161
+ async function calculateFileHash(filePath, algorithm = 'sha256') {
162
+ if (!await _promises.default.access(filePath).then(()=>true, ()=>false)) {
163
+ return;
164
+ }
165
+ const fileBuffer = await _promises.default.readFile(filePath);
166
+ const hash = (0, _crypto.createHash)(algorithm);
167
+ hash.update(fileBuffer);
168
+ return hash.digest('hex');
169
+ }
170
+
171
+ //# sourceMappingURL=hot-reloader-rspack.js.map
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "createHotReloaderTurbopack", {
9
9
  }
10
10
  });
11
11
  const _promises = require("fs/promises");
12
+ const _inspector = /*#__PURE__*/ _interop_require_wildcard(require("inspector"));
12
13
  const _path = require("path");
13
14
  const _url = require("url");
14
15
  const _ws = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/ws"));
@@ -33,20 +34,20 @@ const _messages = require("./messages");
33
34
  const _encryptionutilsserver = require("../app-render/encryption-utils-server");
34
35
  const _apppageroutedefinition = require("../route-definitions/app-page-route-definition");
35
36
  const _apppaths = require("../../shared/lib/router/utils/app-paths");
36
- const _utils2 = require("../lib/utils");
37
37
  const _ismetadataroute = require("../../lib/metadata/is-metadata-route");
38
38
  const _patcherrorinspect = require("../patch-error-inspect");
39
39
  const _getnexterrorfeedbackmiddleware = require("../../next-devtools/server/get-next-error-feedback-middleware");
40
- const _utils3 = require("../../shared/lib/turbopack/utils");
40
+ const _utils2 = require("../../shared/lib/turbopack/utils");
41
41
  const _getdevoverlayfontmiddleware = require("../../next-devtools/server/font/get-dev-overlay-font-middleware");
42
42
  const _devindicatorserverstate = require("./dev-indicator-server-state");
43
43
  const _devindicatormiddleware = require("../../next-devtools/server/dev-indicator-middleware");
44
44
  const _restartdevservermiddleware = require("../../next-devtools/server/restart-dev-server-middleware");
45
45
  const _compilationevents = require("../../shared/lib/turbopack/compilation-events");
46
- const _utils4 = require("../../build/utils");
46
+ const _utils3 = require("../../build/utils");
47
47
  const _receivelogs = require("./browser-logs/receive-logs");
48
48
  const _normalizepath = require("../../lib/normalize-path");
49
49
  const _devtoolsconfigmiddleware = require("../../next-devtools/server/devtools-config-middleware");
50
+ const _attachnodejsdebuggermiddleware = require("../../next-devtools/server/attach-nodejs-debugger-middleware");
50
51
  const _debugchannel = require("./debug-channel");
51
52
  const _hotreloadersharedutils = require("./hot-reloader-shared-utils");
52
53
  const _getmcpmiddleware = require("../mcp/get-mcp-middleware");
@@ -55,6 +56,7 @@ const _getpagemetadata = require("../mcp/tools/get-page-metadata");
55
56
  const _formaterrors = require("../mcp/tools/utils/format-errors");
56
57
  const _mcptelemetrytracker = require("../mcp/mcp-telemetry-tracker");
57
58
  const _filelogger = require("./browser-logs/file-logger");
59
+ const _serializederrors = require("./serialized-errors");
58
60
  function _interop_require_default(obj) {
59
61
  return obj && obj.__esModule ? obj : {
60
62
  default: obj
@@ -151,7 +153,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
151
153
  }
152
154
  const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
153
155
  const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
154
- version: "16.0.10"
156
+ version: "16.1.1"
155
157
  });
156
158
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
157
159
  // of the current `next dev` invocation.
@@ -170,7 +172,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
170
172
  if (nextConfig.experimental.clientRouterFilter) {
171
173
  // TODO this need to be set correctly for filesystem cache to work
172
174
  }
173
- const supportedBrowsers = (0, _utils4.getSupportedBrowsers)(projectPath, dev);
175
+ const supportedBrowsers = (0, _utils3.getSupportedBrowsers)(projectPath, dev);
174
176
  const currentNodeJsVersion = process.versions.node;
175
177
  const rootPath = ((_opts_nextConfig_turbopack = opts.nextConfig.turbopack) == null ? void 0 : _opts_nextConfig_turbopack.root) || opts.nextConfig.outputFileTracingRoot || projectPath;
176
178
  const project = await bindings.turbo.createProject({
@@ -202,9 +204,10 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
202
204
  previewProps: opts.fsChecker.prerenderManifest.preview,
203
205
  browserslistQuery: supportedBrowsers.join(', '),
204
206
  noMangling: false,
207
+ writeRoutesHashesManifest: false,
205
208
  currentNodeJsVersion
206
209
  }, {
207
- persistentCaching: (0, _utils3.isFileSystemCacheEnabledForDev)(opts.nextConfig),
210
+ persistentCaching: (0, _utils2.isFileSystemCacheEnabledForDev)(opts.nextConfig),
208
211
  memoryLimit: (_opts_nextConfig_experimental = opts.nextConfig.experimental) == null ? void 0 : _opts_nextConfig_experimental.turbopackMemoryLimit,
209
212
  isShortSession: false
210
213
  });
@@ -409,7 +412,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
409
412
  try {
410
413
  const changed = await changedPromise;
411
414
  for await (const change of changed){
412
- (0, _utils3.processIssues)(currentEntryIssues, key, change, false, true);
415
+ (0, _utils2.processIssues)(currentEntryIssues, key, change, false, true);
413
416
  // TODO: Get an actual content hash from Turbopack.
414
417
  const message = await createMessage(change, String(++hmrHash));
415
418
  if (message) {
@@ -451,7 +454,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
451
454
  try {
452
455
  await subscription.next();
453
456
  for await (const data of subscription){
454
- (0, _utils3.processIssues)(state.clientIssues, key, data, false, true);
457
+ (0, _utils2.processIssues)(state.clientIssues, key, data, false, true);
455
458
  if (data.type !== 'issues') {
456
459
  sendTurbopackMessage(data);
457
460
  }
@@ -490,7 +493,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
490
493
  (0, _turbopackutils.processTopLevelIssues)(currentTopLevelIssues, entrypoints);
491
494
  // Certain crtical issues prevent any entrypoints from being constructed so return early
492
495
  if (!('routes' in entrypoints)) {
493
- (0, _utils4.printBuildErrors)(entrypoints, true);
496
+ (0, _utils3.printBuildErrors)(entrypoints, true);
494
497
  currentEntriesHandlingResolve();
495
498
  currentEntriesHandlingResolve = undefined;
496
499
  continue;
@@ -603,6 +606,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
603
606
  });
604
607
  }
605
608
  }),
609
+ (0, _attachnodejsdebuggermiddleware.getAttachNodejsDebuggerMiddleware)(),
606
610
  ...nextConfig.experimental.mcpServer ? [
607
611
  (0, _getmcpmiddleware.getMcpMiddleware)({
608
612
  projectPath,
@@ -638,14 +642,12 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
638
642
  return versionInfoCached;
639
643
  };
640
644
  let devtoolsFrontendUrl;
641
- const nodeOptions = (0, _utils2.getParsedNodeOptions)();
642
- const nodeDebugType = (0, _utils2.getNodeDebugType)(nodeOptions);
643
- if (nodeDebugType) {
644
- const debugPort = process.debugPort;
645
+ const inspectorURLRaw = _inspector.url();
646
+ if (inspectorURLRaw !== undefined) {
647
+ const inspectorURL = new URL(inspectorURLRaw);
645
648
  let debugInfo;
646
649
  try {
647
- // It requires to use 127.0.0.1 instead of localhost for server-side fetching.
648
- const debugInfoList = await fetch(`http://127.0.0.1:${debugPort}/json/list`).then((res)=>res.json());
650
+ const debugInfoList = await fetch(`http://${inspectorURL.host}/json/list`).then((res)=>res.json());
649
651
  debugInfo = debugInfoList[0];
650
652
  } catch {}
651
653
  if (debugInfo) {
@@ -720,6 +722,8 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
720
722
  isLegacyClient: true
721
723
  });
722
724
  }
725
+ (0, _debugchannel.connectReactDebugChannelForHtmlRequest)(htmlRequestId, sendToClient.bind(null, client));
726
+ (0, _serializederrors.sendSerializedErrorsToClientForHtmlRequest)(htmlRequestId, sendToClient.bind(null, client));
723
727
  } else {
724
728
  clientsWithoutHtmlRequestId.add(client);
725
729
  onUpgrade(client, {
@@ -854,7 +858,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
854
858
  for (const issue of entryIssues.values()){
855
859
  if (issue.severity !== 'warning') {
856
860
  errors.push({
857
- message: (0, _utils3.formatIssue)(issue)
861
+ message: (0, _utils2.formatIssue)(issue)
858
862
  });
859
863
  } else {
860
864
  (0, _turbopackutils.printNonFatalIssue)(issue);
@@ -881,9 +885,6 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
881
885
  devToolsConfig
882
886
  };
883
887
  sendToClient(client, syncMessage);
884
- if (htmlRequestId) {
885
- (0, _debugchannel.connectReactDebugChannelForHtmlRequest)(htmlRequestId, sendToClient.bind(null, client));
886
- }
887
888
  })();
888
889
  });
889
890
  },
@@ -946,6 +947,17 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
946
947
  (0, _debugchannel.connectReactDebugChannel)(requestId, debugChannel, sendToClient.bind(null, client));
947
948
  }
948
949
  },
950
+ sendErrorsToBrowser (errorsRscStream, htmlRequestId) {
951
+ const client = clientsByHtmlRequestId.get(htmlRequestId);
952
+ if (client) {
953
+ // If the client is connected, we can send the errors immediately.
954
+ (0, _serializederrors.sendSerializedErrorsToClient)(errorsRscStream, sendToClient.bind(null, client));
955
+ } else {
956
+ // Otherwise, store the errors stream so that we can send it when the
957
+ // client connects.
958
+ (0, _serializederrors.setErrorsRscStreamForHtmlRequest)(htmlRequestId, errorsRscStream);
959
+ }
960
+ },
949
961
  setHmrServerError (_error) {
950
962
  // Not implemented yet.
951
963
  },
@@ -964,11 +976,11 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
964
976
  ...topLevelIssues,
965
977
  ...thisEntryIssues.values()
966
978
  ].map((issue)=>{
967
- const formattedIssue = (0, _utils3.formatIssue)(issue);
979
+ const formattedIssue = (0, _utils2.formatIssue)(issue);
968
980
  if (issue.severity === 'warning') {
969
981
  (0, _turbopackutils.printNonFatalIssue)(issue);
970
982
  return null;
971
- } else if ((0, _utils3.isWellKnownError)(issue)) {
983
+ } else if ((0, _utils2.isWellKnownError)(issue)) {
972
984
  _log.error(formattedIssue);
973
985
  }
974
986
  return Object.defineProperty(new Error(formattedIssue), "__NEXT_ERROR_CODE", {
@@ -982,7 +994,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
982
994
  const errors = [];
983
995
  for (const issue of topLevelIssues){
984
996
  if (issue.severity !== 'warning') {
985
- errors.push(Object.defineProperty(new Error((0, _utils3.formatIssue)(issue)), "__NEXT_ERROR_CODE", {
997
+ errors.push(Object.defineProperty(new Error((0, _utils2.formatIssue)(issue)), "__NEXT_ERROR_CODE", {
986
998
  value: "E394",
987
999
  enumerable: false,
988
1000
  configurable: true
@@ -992,7 +1004,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
992
1004
  for (const entryIssues of currentEntryIssues.values()){
993
1005
  for (const issue of entryIssues.values()){
994
1006
  if (issue.severity !== 'warning') {
995
- const message = (0, _utils3.formatIssue)(issue);
1007
+ const message = (0, _utils2.formatIssue)(issue);
996
1008
  errors.push(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
997
1009
  value: "E394",
998
1010
  enumerable: false,
@@ -1179,10 +1191,10 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
1179
1191
  for (const [key, issue] of issueMap){
1180
1192
  if (issue.severity === 'warning') continue;
1181
1193
  if (errorsMap.has(key)) continue;
1182
- const message = (0, _utils3.formatIssue)(issue);
1194
+ const message = (0, _utils2.formatIssue)(issue);
1183
1195
  errorsMap.set(key, {
1184
1196
  message,
1185
- details: issue.detail ? (0, _utils3.renderStyledStringToErrorAnsi)(issue.detail) : undefined
1197
+ details: issue.detail ? (0, _utils2.renderStyledStringToErrorAnsi)(issue.detail) : undefined
1186
1198
  });
1187
1199
  }
1188
1200
  }