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
@@ -44,6 +44,7 @@ var HMR_MESSAGE_SENT_TO_BROWSER = /*#__PURE__*/ function(HMR_MESSAGE_SENT_TO_BRO
44
44
  HMR_MESSAGE_SENT_TO_BROWSER["REQUEST_PAGE_METADATA"] = "requestPageMetadata";
45
45
  // Binary messages:
46
46
  HMR_MESSAGE_SENT_TO_BROWSER[HMR_MESSAGE_SENT_TO_BROWSER["REACT_DEBUG_CHUNK"] = 0] = "REACT_DEBUG_CHUNK";
47
+ HMR_MESSAGE_SENT_TO_BROWSER[HMR_MESSAGE_SENT_TO_BROWSER["ERRORS_TO_SHOW_IN_BROWSER"] = 1] = "ERRORS_TO_SHOW_IN_BROWSER";
47
48
  return HMR_MESSAGE_SENT_TO_BROWSER;
48
49
  }({});
49
50
  var HMR_MESSAGE_SENT_TO_SERVER = /*#__PURE__*/ function(HMR_MESSAGE_SENT_TO_SERVER) {
@@ -23,6 +23,7 @@ _export(exports, {
23
23
  const _webpack = require("next/dist/compiled/webpack/webpack");
24
24
  const _middlewarewebpack = require("./middleware-webpack");
25
25
  const _hotmiddleware = require("./hot-middleware");
26
+ const _inspector = /*#__PURE__*/ _interop_require_wildcard(require("inspector"));
26
27
  const _path = require("path");
27
28
  const _entries = require("../../build/entries");
28
29
  const _getstaticinfoincludinglayouts = require("../../build/get-static-info-including-layouts");
@@ -50,7 +51,6 @@ const _routekind = require("../route-kind");
50
51
  const _hotreloadertypes = require("./hot-reloader-types");
51
52
  const _pagetypes = require("../../lib/page-types");
52
53
  const _messages = require("./messages");
53
- const _utils2 = require("../lib/utils");
54
54
  const _getnexterrorfeedbackmiddleware = require("../../next-devtools/server/get-next-error-feedback-middleware");
55
55
  const _getdevoverlayfontmiddleware = require("../../next-devtools/server/font/get-dev-overlay-font-middleware");
56
56
  const _devindicatormiddleware = require("../../next-devtools/server/dev-indicator-middleware");
@@ -59,6 +59,7 @@ const _restartdevservermiddleware = require("../../next-devtools/server/restart-
59
59
  const _cacheinvalidation = require("../../build/webpack/cache-invalidation");
60
60
  const _receivelogs = require("./browser-logs/receive-logs");
61
61
  const _devtoolsconfigmiddleware = require("../../next-devtools/server/devtools-config-middleware");
62
+ const _attachnodejsdebuggermiddleware = require("../../next-devtools/server/attach-nodejs-debugger-middleware");
62
63
  const _invarianterror = require("../../shared/lib/invariant-error");
63
64
  const _debugchannel = require("./debug-channel");
64
65
  const _hotreloadersharedutils = require("./hot-reloader-shared-utils");
@@ -66,6 +67,7 @@ const _getmcpmiddleware = require("../mcp/get-mcp-middleware");
66
67
  const _formaterrors = require("../mcp/tools/utils/format-errors");
67
68
  const _mcptelemetrytracker = require("../mcp/mcp-telemetry-tracker");
68
69
  const _filelogger = require("./browser-logs/file-logger");
70
+ const _serializederrors = require("./serialized-errors");
69
71
  function _interop_require_default(obj) {
70
72
  return obj && obj.__esModule ? obj : {
71
73
  default: obj
@@ -231,7 +233,7 @@ class HotReloaderWebpack {
231
233
  this.previewProps = previewProps;
232
234
  this.rewrites = rewrites;
233
235
  this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
234
- version: "16.0.10"
236
+ version: "16.1.1"
235
237
  });
236
238
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
237
239
  // of the current `next dev` invocation.
@@ -502,6 +504,7 @@ class HotReloaderWebpack {
502
504
  });
503
505
  if (htmlRequestId) {
504
506
  (0, _debugchannel.connectReactDebugChannelForHtmlRequest)(htmlRequestId, this.sendToClient.bind(this, client));
507
+ (0, _serializederrors.sendSerializedErrorsToClientForHtmlRequest)(htmlRequestId, this.sendToClient.bind(this, client));
505
508
  if (enableCacheComponents) {
506
509
  const status = this.cacheStatusesByRequestId.get(htmlRequestId);
507
510
  if (status) {
@@ -665,15 +668,12 @@ class HotReloaderWebpack {
665
668
  startSpan.stop() // Stop immediately to create an artificial parent span
666
669
  ;
667
670
  this.versionInfo = await this.tracedGetVersionInfo(startSpan);
668
- const nodeOptions = (0, _utils2.getParsedNodeOptions)();
669
- const nodeDebugType = (0, _utils2.getNodeDebugType)(nodeOptions);
670
- if (nodeDebugType && !this.devtoolsFrontendUrl) {
671
- const debugPort = process.debugPort;
671
+ const inspectorURLRaw = _inspector.url();
672
+ if (inspectorURLRaw !== undefined) {
673
+ const inspectorURL = new URL(inspectorURLRaw);
672
674
  let debugInfo;
673
675
  try {
674
- // It requires to use 127.0.0.1 instead of localhost for server-side fetching.
675
- const debugInfoList = await fetch(`http://127.0.0.1:${debugPort}/json/list`).then((res)=>res.json());
676
- // There will be only one item for current process, so always get the first item.
676
+ const debugInfoList = await fetch(`http://${inspectorURL.host}/json/list`).then((res)=>res.json());
677
677
  debugInfo = debugInfoList[0];
678
678
  } catch {}
679
679
  if (debugInfo) {
@@ -947,6 +947,7 @@ class HotReloaderWebpack {
947
947
  this.activeWebpackConfigs.parallelism = 1;
948
948
  await Promise.all(Array.from((0, _webpackconfig.getCacheDirectories)(this.activeWebpackConfigs)).map(_cacheinvalidation.checkFileSystemCacheInvalidationAndCleanup));
949
949
  this.multiCompiler = (0, _getwebpackbundler.default)()(this.activeWebpackConfigs);
950
+ await this.afterCompile(this.multiCompiler);
950
951
  // Copy over the filesystem so that it is shared between all compilers.
951
952
  const inputFileSystem = this.multiCompiler.compilers[0].inputFileSystem;
952
953
  for (const compiler of this.multiCompiler.compilers){
@@ -1199,55 +1200,46 @@ class HotReloaderWebpack {
1199
1200
  nextConfig: this.config,
1200
1201
  ...this.config.onDemandEntries
1201
1202
  });
1202
- this.middlewares = [
1203
- (0, _middlewarewebpack.getOverlayMiddleware)({
1204
- rootDirectory: this.dir,
1205
- isSrcDir: this.isSrcDir,
1206
- clientStats: ()=>this.clientStats,
1207
- serverStats: ()=>this.serverStats,
1208
- edgeServerStats: ()=>this.edgeServerStats
1209
- }),
1210
- (0, _middlewarewebpack.getSourceMapMiddleware)({
1211
- clientStats: ()=>this.clientStats,
1212
- serverStats: ()=>this.serverStats,
1213
- edgeServerStats: ()=>this.edgeServerStats
1214
- }),
1215
- (0, _getnexterrorfeedbackmiddleware.getNextErrorFeedbackMiddleware)(this.telemetry),
1216
- (0, _getdevoverlayfontmiddleware.getDevOverlayFontMiddleware)(),
1217
- (0, _devindicatormiddleware.getDisableDevIndicatorMiddleware)(),
1218
- (0, _restartdevservermiddleware.getRestartDevServerMiddleware)({
1219
- telemetry: this.telemetry,
1220
- webpackCacheDirectories: this.activeWebpackConfigs != null ? (0, _webpackconfig.getCacheDirectories)(this.activeWebpackConfigs) : undefined
1221
- }),
1222
- (0, _devtoolsconfigmiddleware.devToolsConfigMiddleware)({
1203
+ this.middlewares.push((0, _middlewarewebpack.getOverlayMiddleware)({
1204
+ rootDirectory: this.dir,
1205
+ isSrcDir: this.isSrcDir,
1206
+ clientStats: ()=>this.clientStats,
1207
+ serverStats: ()=>this.serverStats,
1208
+ edgeServerStats: ()=>this.edgeServerStats
1209
+ }), (0, _middlewarewebpack.getSourceMapMiddleware)({
1210
+ clientStats: ()=>this.clientStats,
1211
+ serverStats: ()=>this.serverStats,
1212
+ edgeServerStats: ()=>this.edgeServerStats
1213
+ }), (0, _getnexterrorfeedbackmiddleware.getNextErrorFeedbackMiddleware)(this.telemetry), (0, _getdevoverlayfontmiddleware.getDevOverlayFontMiddleware)(), (0, _devindicatormiddleware.getDisableDevIndicatorMiddleware)(), (0, _restartdevservermiddleware.getRestartDevServerMiddleware)({
1214
+ telemetry: this.telemetry,
1215
+ webpackCacheDirectories: this.activeWebpackConfigs != null ? (0, _webpackconfig.getCacheDirectories)(this.activeWebpackConfigs) : undefined
1216
+ }), (0, _devtoolsconfigmiddleware.devToolsConfigMiddleware)({
1217
+ distDir: this.distDir,
1218
+ sendUpdateSignal: (data)=>{
1219
+ var // Update the in-memory devToolsConfig value
1220
+ // which will be used for the next onHMR call.
1221
+ _this_webpackHotMiddleware;
1222
+ (_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.updateDevToolsConfig(data);
1223
+ this.send({
1224
+ type: _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.DEVTOOLS_CONFIG,
1225
+ data
1226
+ });
1227
+ }
1228
+ }), (0, _attachnodejsdebuggermiddleware.getAttachNodejsDebuggerMiddleware)(), ...this.config.experimental.mcpServer ? [
1229
+ (0, _getmcpmiddleware.getMcpMiddleware)({
1230
+ projectPath: this.dir,
1223
1231
  distDir: this.distDir,
1224
- sendUpdateSignal: (data)=>{
1225
- var // Update the in-memory devToolsConfig value
1226
- // which will be used for the next onHMR call.
1227
- _this_webpackHotMiddleware;
1228
- (_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.updateDevToolsConfig(data);
1229
- this.send({
1230
- type: _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.DEVTOOLS_CONFIG,
1231
- data
1232
- });
1233
- }
1234
- }),
1235
- ...this.config.experimental.mcpServer ? [
1236
- (0, _getmcpmiddleware.getMcpMiddleware)({
1237
- projectPath: this.dir,
1238
- distDir: this.distDir,
1239
- nextConfig: this.config,
1240
- pagesDir: this.pagesDir,
1241
- appDir: this.appDir,
1242
- sendHmrMessage: (message)=>this.send(message),
1243
- getActiveConnectionCount: ()=>{
1244
- var _this_webpackHotMiddleware;
1245
- return ((_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.getClientCount()) ?? 0;
1246
- },
1247
- getDevServerUrl: ()=>process.env.__NEXT_PRIVATE_ORIGIN
1248
- })
1249
- ] : []
1250
- ];
1232
+ nextConfig: this.config,
1233
+ pagesDir: this.pagesDir,
1234
+ appDir: this.appDir,
1235
+ sendHmrMessage: (message)=>this.send(message),
1236
+ getActiveConnectionCount: ()=>{
1237
+ var _this_webpackHotMiddleware;
1238
+ return ((_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.getClientCount()) ?? 0;
1239
+ },
1240
+ getDevServerUrl: ()=>process.env.__NEXT_PRIVATE_ORIGIN
1241
+ })
1242
+ ] : []);
1251
1243
  (0, _formaterrors.setStackFrameResolver)(async (request)=>{
1252
1244
  return (0, _middlewarewebpack.getOriginalStackFrames)({
1253
1245
  isServer: request.isServer,
@@ -1261,6 +1253,7 @@ class HotReloaderWebpack {
1261
1253
  });
1262
1254
  });
1263
1255
  }
1256
+ async afterCompile(_multiCompiler) {}
1264
1257
  invalidate({ reloadAfterInvalidation } = {
1265
1258
  reloadAfterInvalidation: false
1266
1259
  }) {
@@ -1344,6 +1337,18 @@ class HotReloaderWebpack {
1344
1337
  (0, _debugchannel.connectReactDebugChannel)(requestId, debugChannel, this.sendToClient.bind(this, client));
1345
1338
  }
1346
1339
  }
1340
+ sendErrorsToBrowser(errorsRscStream, htmlRequestId) {
1341
+ var _this_webpackHotMiddleware;
1342
+ const client = (_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.getClient(htmlRequestId);
1343
+ if (client) {
1344
+ // If the client is connected, we can send the errors immediately.
1345
+ (0, _serializederrors.sendSerializedErrorsToClient)(errorsRscStream, this.sendToClient.bind(this, client));
1346
+ } else {
1347
+ // Otherwise, store the errors stream so that we can send it when the
1348
+ // client connects.
1349
+ (0, _serializederrors.setErrorsRscStreamForHtmlRequest)(htmlRequestId, errorsRscStream);
1350
+ }
1351
+ }
1347
1352
  async ensurePage({ page, clientOnly, appPaths, definition, isApp, url }) {
1348
1353
  return this.hotReloaderSpan.traceChild('ensure-page', {
1349
1354
  inputPage: page
@@ -39,9 +39,9 @@ function ignoreLoggingIncomingRequests(request, loggingConfig) {
39
39
  // If array of RegExp, ignore if any pattern matches
40
40
  return ignore.some((pattern)=>pattern.test(request.url));
41
41
  }
42
- function logRequests(request, response, loggingConfig, requestStartTime, requestEndTime, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd) {
42
+ function logRequests(request, response, loggingConfig, requestStartTime, requestEndTime, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd, devGenerateStaticParamsDuration) {
43
43
  if (!ignoreLoggingIncomingRequests(request, loggingConfig)) {
44
- logIncomingRequests(request, requestStartTime, requestEndTime, response.statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd);
44
+ logIncomingRequests(request, requestStartTime, requestEndTime, response.statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd, devGenerateStaticParamsDuration);
45
45
  }
46
46
  if (request.fetchMetrics) {
47
47
  for (const fetchMetric of request.fetchMetrics){
@@ -49,7 +49,7 @@ function logRequests(request, response, loggingConfig, requestStartTime, request
49
49
  }
50
50
  }
51
51
  }
52
- function logIncomingRequests(request, requestStartTime, requestEndTime, statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd) {
52
+ function logIncomingRequests(request, requestStartTime, requestEndTime, statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd, devGenerateStaticParamsDuration) {
53
53
  const isRSC = (0, _requestmeta.getRequestMeta)(request, 'isRSCRequest');
54
54
  const url = isRSC ? (0, _url.stripNextRscUnionQuery)(request.url) : request.url;
55
55
  const statusCodeColor = statusCode < 200 ? _picocolors.white : statusCode < 300 ? _picocolors.green : statusCode < 400 ? _picocolors.blue : statusCode < 500 ? _picocolors.yellow : _picocolors.red;
@@ -74,6 +74,14 @@ function logIncomingRequests(request, requestStartTime, requestEndTime, statusCo
74
74
  'compile',
75
75
  frameworkTime
76
76
  ]);
77
+ // Insert after compile, before render based on the execution order.
78
+ if (devGenerateStaticParamsDuration) {
79
+ // Pages Router getStaticPaths are technically "generate params" as well.
80
+ times.push([
81
+ 'generate-params',
82
+ devGenerateStaticParamsDuration
83
+ ]);
84
+ }
77
85
  times.push([
78
86
  'render',
79
87
  requestEndTime - devRequestTimingInternalsEnd
@@ -26,6 +26,16 @@ const FAST_REFRESH_RUNTIME_RELOAD = 'Fast Refresh had to perform a full reload d
26
26
  const textEncoder = new TextEncoder();
27
27
  function createBinaryHmrMessageData(message) {
28
28
  switch(message.type){
29
+ case _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER:
30
+ {
31
+ const { serializedErrors } = message;
32
+ const totalLength = 1 + serializedErrors.length;
33
+ const data = new Uint8Array(totalLength);
34
+ const view = new DataView(data.buffer);
35
+ view.setUint8(0, _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER);
36
+ data.set(serializedErrors, 1);
37
+ return data;
38
+ }
29
39
  case _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK:
30
40
  {
31
41
  const { requestId, chunk } = message;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ deleteErrorsRscStreamForHtmlRequest: null,
7
+ sendSerializedErrorsToClient: null,
8
+ sendSerializedErrorsToClientForHtmlRequest: null,
9
+ setErrorsRscStreamForHtmlRequest: null
10
+ });
11
+ function _export(target, all) {
12
+ for(var name in all)Object.defineProperty(target, name, {
13
+ enumerable: true,
14
+ get: all[name]
15
+ });
16
+ }
17
+ _export(exports, {
18
+ deleteErrorsRscStreamForHtmlRequest: function() {
19
+ return deleteErrorsRscStreamForHtmlRequest;
20
+ },
21
+ sendSerializedErrorsToClient: function() {
22
+ return sendSerializedErrorsToClient;
23
+ },
24
+ sendSerializedErrorsToClientForHtmlRequest: function() {
25
+ return sendSerializedErrorsToClientForHtmlRequest;
26
+ },
27
+ setErrorsRscStreamForHtmlRequest: function() {
28
+ return setErrorsRscStreamForHtmlRequest;
29
+ }
30
+ });
31
+ const _nodewebstreamshelper = require("../stream-utils/node-web-streams-helper");
32
+ const _hotreloadertypes = require("./hot-reloader-types");
33
+ const errorsRscStreamsByHtmlRequestId = new Map();
34
+ function sendSerializedErrorsToClient(errorsRscStream, sendToClient) {
35
+ (0, _nodewebstreamshelper.streamToUint8Array)(errorsRscStream).then((serializedErrors)=>{
36
+ sendToClient({
37
+ type: _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER,
38
+ serializedErrors
39
+ });
40
+ }, (err)=>{
41
+ console.error(Object.defineProperty(new Error('Failed to serialize errors.', {
42
+ cause: err
43
+ }), "__NEXT_ERROR_CODE", {
44
+ value: "E948",
45
+ enumerable: false,
46
+ configurable: true
47
+ }));
48
+ });
49
+ }
50
+ function sendSerializedErrorsToClientForHtmlRequest(htmlRequestId, sendToClient) {
51
+ const errorsRscStream = errorsRscStreamsByHtmlRequestId.get(htmlRequestId);
52
+ if (!errorsRscStream) {
53
+ return;
54
+ }
55
+ errorsRscStreamsByHtmlRequestId.delete(htmlRequestId);
56
+ sendSerializedErrorsToClient(errorsRscStream, sendToClient);
57
+ }
58
+ function setErrorsRscStreamForHtmlRequest(htmlRequestId, errorsRscStream) {
59
+ // TODO: Clean up after a timeout, in case the client never connects, e.g.
60
+ // when CURL'ing the page, or loading the page with JavaScript disabled etc.
61
+ errorsRscStreamsByHtmlRequestId.set(htmlRequestId, errorsRscStream);
62
+ }
63
+ function deleteErrorsRscStreamForHtmlRequest(htmlRequestId) {
64
+ errorsRscStreamsByHtmlRequestId.delete(htmlRequestId);
65
+ }
66
+
67
+ //# sourceMappingURL=serialized-errors.js.map
@@ -20,6 +20,7 @@ const _collectrootparamkeys = require("../../build/segment-config/app/collect-ro
20
20
  const _app = require("../../build/static-paths/app");
21
21
  const _pages = require("../../build/static-paths/pages");
22
22
  const _createincrementalcache = require("../../export/helpers/create-incremental-cache");
23
+ const _app1 = require("../../shared/lib/router/routes/app");
23
24
  async function loadStaticPaths({ dir, distDir, pathname, config, httpAgentOptions, locales, defaultLocale, isAppPath, page, isrFlushToDisk, fetchCacheKeyPrefix, cacheMaxMemorySize, requestHeaders, cacheHandler, cacheHandlers, cacheLifeProfiles, nextConfigOutput, buildId, authInterrupts, sriEnabled }) {
24
25
  // this needs to be initialized before loadComponents otherwise
25
26
  // "use cache" could be missing it's cache handlers
@@ -51,11 +52,20 @@ async function loadStaticPaths({ dir, distDir, pathname, config, httpAgentOption
51
52
  const segments = await (0, _appsegments.collectSegments)(// We know this is an app page or app route module because we checked
52
53
  // above that the page type is 'app'.
53
54
  routeModule);
55
+ const route = (0, _app1.parseAppRoute)(pathname, true);
56
+ if (route.dynamicSegments.length === 0) {
57
+ throw Object.defineProperty(new _invarianterror.InvariantError(`Expected a dynamic route, but got a static route: ${pathname}`), "__NEXT_ERROR_CODE", {
58
+ value: "E930",
59
+ enumerable: false,
60
+ configurable: true
61
+ });
62
+ }
54
63
  const isRoutePPREnabled = (0, _checks.isAppPageRouteModule)(routeModule) && (0, _ppr.checkIsRoutePPREnabled)(config.pprConfig);
55
64
  const rootParamKeys = (0, _collectrootparamkeys.collectRootParamKeys)(routeModule);
56
65
  return (0, _app.buildAppStaticPaths)({
57
66
  dir,
58
67
  page: pathname,
68
+ route,
59
69
  cacheComponents: config.cacheComponents,
60
70
  segments,
61
71
  distDir,
@@ -91,7 +91,7 @@ function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, logBu
91
91
  if (parts.length > 0) {
92
92
  versionSuffix = ` (${parts.join(', ')})`;
93
93
  }
94
- _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.0.10"}`))}${versionSuffix}`);
94
+ _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.1.1"}`))}${versionSuffix}`);
95
95
  if (appUrl) {
96
96
  _log.bootstrap(`- Local: ${appUrl}`);
97
97
  }
@@ -67,8 +67,8 @@ function _interop_require_wildcard(obj, nodeInterop) {
67
67
  }
68
68
  // Keep the uuid in memory as it should never change during the lifetime of the server.
69
69
  let workspaceUUID = null;
70
- function isChromeDevtoolsWorkspaceUrl(url) {
71
- return url.pathname === '/.well-known/appspecific/com.chrome.devtools.json';
70
+ function isChromeDevtoolsWorkspaceUrl(pathname) {
71
+ return pathname === '/.well-known/appspecific/com.chrome.devtools.json';
72
72
  }
73
73
  async function handleChromeDevtoolsWorkspaceRequest(response, opts, config) {
74
74
  response.setHeader('Content-Type', 'application/json');
@@ -23,6 +23,11 @@ class DevBundlerService {
23
23
  this.appIsrManifestInner = new _lrucache.LRUCache(8000, function length() {
24
24
  return 16;
25
25
  });
26
+ const { hotReloader } = bundler;
27
+ this.close = hotReloader.close.bind(hotReloader);
28
+ this.setCacheStatus = hotReloader.setCacheStatus.bind(hotReloader);
29
+ this.setReactDebugChannel = hotReloader.setReactDebugChannel.bind(hotReloader);
30
+ this.sendErrorsToBrowser = hotReloader.sendErrorsToBrowser.bind(hotReloader);
26
31
  }
27
32
  async getFallbackErrorComponents(url) {
28
33
  await this.bundler.hotReloader.buildFallbackError();
@@ -64,9 +69,6 @@ class DevBundlerService {
64
69
  }
65
70
  return serializableManifest;
66
71
  }
67
- setCacheStatus(status, htmlRequestId) {
68
- this.bundler.hotReloader.setCacheStatus(status, htmlRequestId);
69
- }
70
72
  setIsrStatus(key, value) {
71
73
  var // Only send the ISR manifest to legacy clients, i.e. Pages Router clients,
72
74
  // or App Router clients that have Cache Components disabled. The ISR
@@ -85,13 +87,7 @@ class DevBundlerService {
85
87
  data: this.appIsrManifest
86
88
  });
87
89
  }
88
- setReactDebugChannel(debugChannel, htmlRequestId, requestId) {
89
- this.bundler.hotReloader.setReactDebugChannel(debugChannel, htmlRequestId, requestId);
90
- }
91
- close() {
92
- this.bundler.hotReloader.close();
93
- }
94
- triggerHMR(message) {
90
+ sendHmrMessage(message) {
95
91
  this.bundler.hotReloader.send(message);
96
92
  }
97
93
  }
@@ -164,8 +164,8 @@ class FileSystemCache {
164
164
  }));
165
165
  }
166
166
  let rscData;
167
- if (!ctx.isFallback) {
168
- rscData = await this.fs.readFile(this.getFilePath(`${key}${ctx.isRoutePPREnabled ? _constants.RSC_PREFETCH_SUFFIX : _constants.RSC_SUFFIX}`, _responsecache.IncrementalCacheKind.APP_PAGE));
167
+ if (!ctx.isFallback && !ctx.isRoutePPREnabled) {
168
+ rscData = await this.fs.readFile(this.getFilePath(`${key}${_constants.RSC_SUFFIX}`, _responsecache.IncrementalCacheKind.APP_PAGE));
169
169
  }
170
170
  data = {
171
171
  lastModified: mtime.getTime(),
@@ -276,8 +276,8 @@ class FileSystemCache {
276
276
  const htmlPath = this.getFilePath(`${key}.html`, isAppPath ? _responsecache.IncrementalCacheKind.APP_PAGE : _responsecache.IncrementalCacheKind.PAGES);
277
277
  writer.append(htmlPath, data.html);
278
278
  // Fallbacks don't generate a data file.
279
- if (!ctx.fetchCache && !ctx.isFallback) {
280
- writer.append(this.getFilePath(`${key}${isAppPath ? ctx.isRoutePPREnabled ? _constants.RSC_PREFETCH_SUFFIX : _constants.RSC_SUFFIX : _constants.NEXT_DATA_SUFFIX}`, isAppPath ? _responsecache.IncrementalCacheKind.APP_PAGE : _responsecache.IncrementalCacheKind.PAGES), isAppPath ? data.rscData : JSON.stringify(data.pageData));
279
+ if (!ctx.fetchCache && !ctx.isFallback && !ctx.isRoutePPREnabled) {
280
+ writer.append(this.getFilePath(`${key}${isAppPath ? _constants.RSC_SUFFIX : _constants.NEXT_DATA_SUFFIX}`, isAppPath ? _responsecache.IncrementalCacheKind.APP_PAGE : _responsecache.IncrementalCacheKind.PAGES), isAppPath ? data.rscData : JSON.stringify(data.pageData));
281
281
  }
282
282
  if ((data == null ? void 0 : data.kind) === _responsecache.CachedRouteKind.APP_PAGE) {
283
283
  let segmentPaths;
@@ -25,7 +25,7 @@ function createLazyResult(fn) {
25
25
  const result = {
26
26
  then (onfulfilled, onrejected) {
27
27
  if (!pendingResult) {
28
- pendingResult = fn();
28
+ pendingResult = Promise.resolve(fn());
29
29
  }
30
30
  pendingResult.then((value)=>{
31
31
  result.value = value;
@@ -166,20 +166,20 @@ async function createCachedDynamicResponse(workStore, res, cacheKey, incremental
166
166
  }
167
167
  }).catch((error)=>console.warn(`Failed to set fetch cache`, input, error)).finally(handleUnlock);
168
168
  const pendingRevalidateKey = `cache-set-${cacheKey}`;
169
- workStore.pendingRevalidates ??= {};
170
- if (pendingRevalidateKey in workStore.pendingRevalidates) {
171
- // there is already a pending revalidate entry that we need to await to
172
- // avoid race conditions
173
- await workStore.pendingRevalidates[pendingRevalidateKey];
169
+ const pendingRevalidates = workStore.pendingRevalidates ??= {};
170
+ let pendingRevalidatePromise = Promise.resolve();
171
+ if (pendingRevalidateKey in pendingRevalidates) {
172
+ // There is already a pending revalidate entry that we need to await to
173
+ // avoid race conditions.
174
+ pendingRevalidatePromise = pendingRevalidates[pendingRevalidateKey];
174
175
  }
175
- workStore.pendingRevalidates[pendingRevalidateKey] = cacheSetPromise.finally(()=>{
176
- var _workStore_pendingRevalidates;
176
+ pendingRevalidates[pendingRevalidateKey] = pendingRevalidatePromise.then(()=>cacheSetPromise).finally(()=>{
177
177
  // If the pending revalidate is not present in the store, then we have
178
178
  // nothing to delete.
179
- if (!((_workStore_pendingRevalidates = workStore.pendingRevalidates) == null ? void 0 : _workStore_pendingRevalidates[pendingRevalidateKey])) {
179
+ if (!(pendingRevalidates == null ? void 0 : pendingRevalidates[pendingRevalidateKey])) {
180
180
  return;
181
181
  }
182
- delete workStore.pendingRevalidates[pendingRevalidateKey];
182
+ delete pendingRevalidates[pendingRevalidateKey];
183
183
  });
184
184
  return cloned2;
185
185
  }