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
@@ -151,10 +151,14 @@ function ignoreListAnonymousStackFramesIfSandwiched(sourceMappedFrames) {
151
151
  let sourceMapPayload;
152
152
  if (sourceMapCacheEntry === undefined) {
153
153
  let sourceURL = frame.file;
154
- // e.g. "/APP/.next/server/chunks/ssr/[root-of-the-server]__2934a0._.js"
154
+ // e.g. "/Users/foo/APP/.next/server/chunks/ssr/[root-of-the-server]__2934a0._.js"
155
+ // or "C:\Users\foo\APP\.next\server\chunks\ssr\[root-of-the-server]__2934a0._.js"
155
156
  // will be keyed by Node.js as "file:///APP/.next/server/chunks/ssr/[root-of-the-server]__2934a0._.js".
156
157
  // This is likely caused by `callsite.toString()` in `Error.prepareStackTrace converting file URLs to paths.
157
- if (sourceURL.startsWith('/')) {
158
+ //
159
+ // But frame.file might also be "webpack-internal:///(rsc)/./app/bad-sourcemap/page.js" or
160
+ // "<anonymous>" or "node:internal/process/task_queues" here
161
+ if (_path.isAbsolute(frame.file)) {
158
162
  sourceURL = _url.pathToFileURL(frame.file).toString();
159
163
  }
160
164
  let maybeSourceMapPayload;
@@ -278,8 +282,7 @@ function ignoreListAnonymousStackFramesIfSandwiched(sourceMappedFrames) {
278
282
  });
279
283
  }
280
284
  function parseAndSourceMap(error, inspectOptions) {
281
- // TODO(veil): Expose as CLI arg or config option. Useful for local debugging.
282
- const showIgnoreListed = false;
285
+ const showIgnoreListed = process.env.__NEXT_SHOW_IGNORE_LISTED === 'true';
283
286
  // We overwrote Error.prepareStackTrace earlier so error.stack is not sourcemapped.
284
287
  let unparsedStack = String(error.stack);
285
288
  // We could just read it from `error.stack`.
@@ -20,17 +20,10 @@ _export(exports, {
20
20
  return getFallbackRouteParams;
21
21
  }
22
22
  });
23
- const _appsegments = require("../../build/segment-config/app/app-segments");
24
- const _invarianterror = require("../../shared/lib/invariant-error");
25
- const _routematcher = require("../../shared/lib/router/utils/route-matcher");
26
- const _routeregex = require("../../shared/lib/router/utils/route-regex");
23
+ const _utils = require("../../build/static-paths/utils");
27
24
  const _getshortdynamicparamtype = require("../app-render/get-short-dynamic-param-type");
28
- function getParamKeys(page) {
29
- const pattern = (0, _routeregex.getRouteRegex)(page);
30
- const matcher = (0, _routematcher.getRouteMatcher)(pattern);
31
- // Get the default list of allowed params.
32
- return Object.keys(matcher(page));
33
- }
25
+ const _app = require("../../shared/lib/router/routes/app");
26
+ const _extractpathnamerouteparamsegmentsfromloadertree = require("../../build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree");
34
27
  function createOpaqueFallbackRouteParams(fallbackRouteParams) {
35
28
  // If there are no fallback route params, we can return early.
36
29
  if (fallbackRouteParams.length === 0) return null;
@@ -50,62 +43,26 @@ function createOpaqueFallbackRouteParams(fallbackRouteParams) {
50
43
  return keys;
51
44
  }
52
45
  function getFallbackRouteParams(page, routeModule) {
53
- // First, get the fallback route params based on the provided page.
54
- const unknownParamKeys = new Set(getParamKeys(page));
55
- // Needed when processing fallback route params for catchall routes in
56
- // parallel segments, derive from pathname. This is similar to
57
- // getDynamicParam's pagePath parsing logic.
58
- const pathSegments = page.split('/').filter(Boolean);
59
- const collected = (0, _appsegments.collectFallbackRouteParams)(routeModule);
60
- // Then, we have to get the fallback route params from the segments that are
61
- // associated with parallel route segments.
62
- const fallbackRouteParams = [];
63
- for (const fallbackRouteParam of collected){
64
- if (fallbackRouteParam.isParallelRouteParam) {
65
- // Try to see if we can resolve this parameter from the page that was
66
- // passed in.
67
- if (unknownParamKeys.has(fallbackRouteParam.paramName)) {
68
- continue;
69
- }
70
- if (fallbackRouteParam.paramType === 'optional-catchall' || fallbackRouteParam.paramType === 'catchall') {
71
- // If there are any fallback route segments then we can't use the
72
- // pathname to derive the value because it's not complete. We can
73
- // make this assumption because the routes are always resolved left
74
- // to right and the catchall is always the last segment, so any
75
- // route parameters that are unknown will always contribute to the
76
- // pathname and therefore the catchall param too.
77
- if (collected.some((param)=>!param.isParallelRouteParam && unknownParamKeys.has(param.paramName))) {
78
- fallbackRouteParams.push(fallbackRouteParam);
79
- continue;
80
- }
81
- if (pathSegments.length === 0 && fallbackRouteParam.paramType !== 'optional-catchall') {
82
- // We shouldn't be able to match a catchall segment without any path
83
- // segments if it's not an optional catchall.
84
- throw Object.defineProperty(new _invarianterror.InvariantError(`Unexpected empty path segments match for a pathname "${page}" with param "${fallbackRouteParam.paramName}" of type "${fallbackRouteParam.paramType}"`), "__NEXT_ERROR_CODE", {
85
- value: "E792",
86
- enumerable: false,
87
- configurable: true
88
- });
89
- }
90
- // The path segments are not empty, and the segments didn't contain any
91
- // unknown params, so we know that this particular fallback route param
92
- // route param is not actually unknown, and is known. We can skip adding
93
- // it to the fallback route params.
94
- } else {
95
- // This is some other type of route param that shouldn't get resolved
96
- // statically.
97
- throw Object.defineProperty(new _invarianterror.InvariantError(`Unexpected match for a pathname "${page}" with a param "${fallbackRouteParam.paramName}" of type "${fallbackRouteParam.paramType}"`), "__NEXT_ERROR_CODE", {
98
- value: "E791",
99
- enumerable: false,
100
- configurable: true
101
- });
102
- }
103
- } else if (unknownParamKeys.has(fallbackRouteParam.paramName)) {
104
- // As this is a non-parallel route segment, and it exists in the unknown
105
- // param keys, we know it's a fallback route param.
106
- fallbackRouteParams.push(fallbackRouteParam);
107
- }
108
- }
46
+ const route = (0, _app.parseAppRoute)(page, true);
47
+ // Extract the pathname-contributing segments from the loader tree. This
48
+ // mirrors the logic in buildAppStaticPaths where we determine which segments
49
+ // actually contribute to the pathname.
50
+ const { pathnameRouteParamSegments, params } = (0, _extractpathnamerouteparamsegmentsfromloadertree.extractPathnameRouteParamSegmentsFromLoaderTree)(routeModule.userland.loaderTree, route);
51
+ // Create fallback route params for the pathname segments.
52
+ const fallbackRouteParams = pathnameRouteParamSegments.map(({ paramName, paramType })=>({
53
+ paramName,
54
+ paramType
55
+ }));
56
+ // Resolve route params from the loader tree. This mutates the
57
+ // fallbackRouteParams array to add any route params that are
58
+ // unknown at request time.
59
+ //
60
+ // The page parameter contains placeholders like [slug], which helps
61
+ // resolveRouteParamsFromTree determine which params are unknown.
62
+ (0, _utils.resolveRouteParamsFromTree)(routeModule.userland.loaderTree, params, route, fallbackRouteParams // Will be mutated to add route params
63
+ );
64
+ // Convert the fallback route params to an opaque format that can be safely
65
+ // used in the postponed state without exposing implementation details.
109
66
  return createOpaqueFallbackRouteParams(fallbackRouteParams);
110
67
  }
111
68
 
@@ -291,7 +291,7 @@ class AppRouteRouteModule extends _routemodule.RouteModule {
291
291
  // there is no need to try again
292
292
  prospectiveRenderIsDynamic = true;
293
293
  } else if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {
294
- (0, _prospectiverenderutils.printDebugThrownValueForProspectiveRender)(err, workStore.route);
294
+ (0, _prospectiverenderutils.printDebugThrownValueForProspectiveRender)(err, workStore.route, _prospectiverenderutils.Phase.ProspectiveRender);
295
295
  }
296
296
  }
297
297
  if (typeof prospectiveResult === 'object' && prospectiveResult !== null && typeof prospectiveResult.then === 'function') {
@@ -304,7 +304,7 @@ class AppRouteRouteModule extends _routemodule.RouteModule {
304
304
  // there is no need to try again
305
305
  prospectiveRenderIsDynamic = true;
306
306
  } else if (process.env.NEXT_DEBUG_BUILD) {
307
- (0, _prospectiverenderutils.printDebugThrownValueForProspectiveRender)(err, workStore.route);
307
+ (0, _prospectiverenderutils.printDebugThrownValueForProspectiveRender)(err, workStore.route, _prospectiverenderutils.Phase.ProspectiveRender);
308
308
  }
309
309
  });
310
310
  }
@@ -30,6 +30,7 @@ const _redirectstatuscode = require("../../../client/components/redirect-status-
30
30
  const _isbot = require("../../../shared/lib/router/utils/is-bot");
31
31
  const _addpathprefix = require("../../../shared/lib/router/utils/add-path-prefix");
32
32
  const _removetrailingslash = require("../../../shared/lib/router/utils/remove-trailing-slash");
33
+ const _deploymentid = require("../../../shared/lib/deployment-id");
33
34
  function _interop_require_default(obj) {
34
35
  return obj && obj.__esModule ? obj : {
35
36
  default: obj
@@ -146,7 +147,7 @@ const getHandler = ({ srcPage: originalSrcPage, config, userland, routeModule, i
146
147
  sharedContext: {
147
148
  buildId,
148
149
  customServer: Boolean(routerServerContext == null ? void 0 : routerServerContext.isCustomServer) || undefined,
149
- deploymentId: process.env.NEXT_DEPLOYMENT_ID
150
+ deploymentId: (0, _deploymentid.getDeploymentId)()
150
151
  },
151
152
  renderOpts: {
152
153
  params,
@@ -261,6 +262,7 @@ const getHandler = ({ srcPage: originalSrcPage, config, userland, routeModule, i
261
262
  // if this is a background revalidate we need to report
262
263
  // the request error here as it won't be bubbled
263
264
  if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
265
+ const silenceLog = false;
264
266
  await routeModule.onRequestError(req, err, {
265
267
  routerKind: 'Pages Router',
266
268
  routePath: srcPage,
@@ -269,7 +271,7 @@ const getHandler = ({ srcPage: originalSrcPage, config, userland, routeModule, i
269
271
  isStaticGeneration: hasStaticProps,
270
272
  isOnDemandRevalidate
271
273
  })
272
- }, routerServerContext);
274
+ }, silenceLog, routerServerContext);
273
275
  }
274
276
  throw err;
275
277
  }
@@ -500,6 +502,7 @@ const getHandler = ({ srcPage: originalSrcPage, config, userland, routeModule, i
500
502
  }
501
503
  } catch (err) {
502
504
  if (!(err instanceof _nofallbackerrorexternal.NoFallbackError)) {
505
+ const silenceLog = false;
503
506
  await routeModule.onRequestError(req, err, {
504
507
  routerKind: 'Pages Router',
505
508
  routePath: srcPage,
@@ -508,7 +511,7 @@ const getHandler = ({ srcPage: originalSrcPage, config, userland, routeModule, i
508
511
  isStaticGeneration: hasStaticProps,
509
512
  isOnDemandRevalidate
510
513
  })
511
- }, routerServerContext);
514
+ }, silenceLog, routerServerContext);
512
515
  }
513
516
  // rethrow so that we can handle serving error page
514
517
  throw err;
@@ -61,11 +61,12 @@ class RouteModule {
61
61
  }
62
62
  }
63
63
  loadManifests(srcPage, projectDir) {
64
+ let result;
64
65
  if (process.env.NEXT_RUNTIME === 'edge') {
65
66
  var _self___RSC_MANIFEST;
66
67
  const { getEdgePreviewProps } = require('../web/get-edge-preview-props');
67
68
  const maybeJSONParse = (str)=>str ? JSON.parse(str) : undefined;
68
- return {
69
+ result = {
69
70
  buildId: process.env.__NEXT_BUILD_ID || '',
70
71
  buildManifest: self.__BUILD_MANIFEST,
71
72
  fallbackBuildManifest: {},
@@ -92,9 +93,7 @@ class RouteModule {
92
93
  i18n: process.env.__NEXT_I18N_CONFIG || undefined,
93
94
  skipProxyUrlNormalize: Boolean(process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE)
94
95
  },
95
- serverFilesManifest: {
96
- config: globalThis.nextConfig || {}
97
- },
96
+ serverFilesManifest: self.__SERVER_FILES_MANIFEST,
98
97
  clientReferenceManifest: (_self___RSC_MANIFEST = self.__RSC_MANIFEST) == null ? void 0 : _self___RSC_MANIFEST[srcPage],
99
98
  serverActionsManifest: maybeJSONParse(self.__RSC_SERVER_MANIFEST),
100
99
  subresourceIntegrityManifest: maybeJSONParse(self.__SUBRESOURCE_INTEGRITY_MANIFEST),
@@ -174,10 +173,10 @@ class RouteModule {
174
173
  handleMissing: true,
175
174
  shouldCache: !this.isDev
176
175
  }),
177
- this.isDev ? {} : loadManifestFromRelativePath({
176
+ this.isDev ? undefined : loadManifestFromRelativePath({
178
177
  projectDir,
179
178
  distDir: this.distDir,
180
- manifest: _constants.SERVER_FILES_MANIFEST
179
+ manifest: `${_constants.SERVER_FILES_MANIFEST}.json`
181
180
  }),
182
181
  this.isDev ? 'development' : loadManifestFromRelativePath({
183
182
  projectDir,
@@ -192,7 +191,7 @@ class RouteModule {
192
191
  handleMissing: true
193
192
  })
194
193
  ];
195
- return {
194
+ result = {
196
195
  buildId,
197
196
  buildManifest,
198
197
  fallbackBuildManifest,
@@ -208,6 +207,7 @@ class RouteModule {
208
207
  interceptionRoutePatterns: routesManifest.rewrites.beforeFiles.filter(_generateinterceptionroutesrewrites.isInterceptionRouteRewrite).map((rewrite)=>new RegExp(rewrite.regex))
209
208
  };
210
209
  }
210
+ return result;
211
211
  }
212
212
  async loadCustomCacheHandlers(req, nextConfig) {
213
213
  if (process.env.NEXT_RUNTIME !== 'edge') {
@@ -258,11 +258,13 @@ class RouteModule {
258
258
  return incrementalCache;
259
259
  }
260
260
  }
261
- async onRequestError(req, err, errorContext, routerServerContext) {
262
- if (routerServerContext == null ? void 0 : routerServerContext.logErrorWithOriginalStack) {
263
- routerServerContext.logErrorWithOriginalStack(err, 'app-dir');
264
- } else {
265
- console.error(err);
261
+ async onRequestError(req, err, errorContext, silenceLog, routerServerContext) {
262
+ if (!silenceLog) {
263
+ if (routerServerContext == null ? void 0 : routerServerContext.logErrorWithOriginalStack) {
264
+ routerServerContext.logErrorWithOriginalStack(err, 'app-dir');
265
+ } else {
266
+ console.error(err);
267
+ }
266
268
  }
267
269
  await this.instrumentationOnRequestError(req, err, {
268
270
  path: req.url || '/',
@@ -270,8 +272,46 @@ class RouteModule {
270
272
  method: req.method || 'GET'
271
273
  }, errorContext);
272
274
  }
275
+ /** A more lightweight version of `prepare()` for only retrieving the config on edge */ getNextConfigEdge(req) {
276
+ var _routerServerGlobal_RouterServerContextSymbol, _nextConfig_experimental;
277
+ if (process.env.NEXT_RUNTIME !== 'edge') {
278
+ throw Object.defineProperty(new Error('Invariant: getNextConfigEdge must only be called in edge runtime'), "__NEXT_ERROR_CODE", {
279
+ value: "E968",
280
+ enumerable: false,
281
+ configurable: true
282
+ });
283
+ }
284
+ let serverFilesManifest = self.__SERVER_FILES_MANIFEST;
285
+ const relativeProjectDir = (0, _requestmeta.getRequestMeta)(req, 'relativeProjectDir') || this.relativeProjectDir;
286
+ const routerServerContext = (_routerServerGlobal_RouterServerContextSymbol = _routerservercontext.routerServerGlobal[_routerservercontext.RouterServerContextSymbol]) == null ? void 0 : _routerServerGlobal_RouterServerContextSymbol[relativeProjectDir];
287
+ const nextConfig = (routerServerContext == null ? void 0 : routerServerContext.nextConfig) || (serverFilesManifest == null ? void 0 : serverFilesManifest.config);
288
+ if (!nextConfig) {
289
+ throw Object.defineProperty(new Error("Invariant: nextConfig couldn't be loaded"), "__NEXT_ERROR_CODE", {
290
+ value: "E969",
291
+ enumerable: false,
292
+ configurable: true
293
+ });
294
+ }
295
+ let deploymentId;
296
+ if ((_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.runtimeServerDeploymentId) {
297
+ if (!process.env.NEXT_DEPLOYMENT_ID) {
298
+ throw Object.defineProperty(new Error('process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled'), "__NEXT_ERROR_CODE", {
299
+ value: "E970",
300
+ enumerable: false,
301
+ configurable: true
302
+ });
303
+ }
304
+ deploymentId = process.env.NEXT_DEPLOYMENT_ID;
305
+ } else {
306
+ deploymentId = nextConfig.deploymentId || '';
307
+ }
308
+ return {
309
+ nextConfig,
310
+ deploymentId
311
+ };
312
+ }
273
313
  async prepare(req, res, { srcPage, multiZoneDraftMode }) {
274
- var _routerServerGlobal_RouterServerContextSymbol;
314
+ var _routerServerGlobal_RouterServerContextSymbol, _nextConfig_experimental;
275
315
  let absoluteProjectDir;
276
316
  // edge runtime handles loading instrumentation at the edge adapter level
277
317
  if (process.env.NEXT_RUNTIME !== 'edge') {
@@ -454,7 +494,14 @@ class RouteModule {
454
494
  }
455
495
  const relativeProjectDir = (0, _requestmeta.getRequestMeta)(req, 'relativeProjectDir') || this.relativeProjectDir;
456
496
  const routerServerContext = (_routerServerGlobal_RouterServerContextSymbol = _routerservercontext.routerServerGlobal[_routerservercontext.RouterServerContextSymbol]) == null ? void 0 : _routerServerGlobal_RouterServerContextSymbol[relativeProjectDir];
457
- const nextConfig = (routerServerContext == null ? void 0 : routerServerContext.nextConfig) || serverFilesManifest.config;
497
+ const nextConfig = (routerServerContext == null ? void 0 : routerServerContext.nextConfig) || (serverFilesManifest == null ? void 0 : serverFilesManifest.config);
498
+ if (!nextConfig) {
499
+ throw Object.defineProperty(new Error("Invariant: nextConfig couldn't be loaded"), "__NEXT_ERROR_CODE", {
500
+ value: "E969",
501
+ enumerable: false,
502
+ configurable: true
503
+ });
504
+ }
458
505
  let resolvedPathname = normalizedSrcPage;
459
506
  if ((0, _utils.isDynamicRoute)(resolvedPathname) && params) {
460
507
  resolvedPathname = serverUtils.interpolateDynamicPath(resolvedPathname, params);
@@ -469,6 +516,19 @@ class RouteModule {
469
516
  resolvedPathname = (0, _decodepathparams.decodePathParams)(resolvedPathname);
470
517
  } catch (_) {}
471
518
  resolvedPathname = (0, _removetrailingslash.removeTrailingSlash)(resolvedPathname);
519
+ let deploymentId;
520
+ if ((_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.runtimeServerDeploymentId) {
521
+ if (!process.env.NEXT_DEPLOYMENT_ID) {
522
+ throw Object.defineProperty(new Error('process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled'), "__NEXT_ERROR_CODE", {
523
+ value: "E970",
524
+ enumerable: false,
525
+ configurable: true
526
+ });
527
+ }
528
+ deploymentId = process.env.NEXT_DEPLOYMENT_ID;
529
+ } else {
530
+ deploymentId = nextConfig.deploymentId || '';
531
+ }
472
532
  return {
473
533
  query,
474
534
  originalQuery,
@@ -487,10 +547,11 @@ class RouteModule {
487
547
  isOnDemandRevalidate,
488
548
  revalidateOnlyGenerated,
489
549
  ...manifests,
490
- serverActionsManifest: manifests.serverActionsManifest,
491
- clientReferenceManifest: manifests.clientReferenceManifest,
492
- nextConfig,
493
- routerServerContext
550
+ // loadManifest returns a readonly object, but we don't want to propagate that throughout the
551
+ // whole codebase (for now)
552
+ nextConfig: nextConfig,
553
+ routerServerContext,
554
+ deploymentId
494
555
  };
495
556
  }
496
557
  getResponseCache(req) {
@@ -16,7 +16,8 @@ Object.defineProperty(exports, "__esModule", {
16
16
  streamFromBuffer: null,
17
17
  streamFromString: null,
18
18
  streamToBuffer: null,
19
- streamToString: null
19
+ streamToString: null,
20
+ streamToUint8Array: null
20
21
  });
21
22
  function _export(target, all) {
22
23
  for(var name in all)Object.defineProperty(target, name, {
@@ -66,6 +67,9 @@ _export(exports, {
66
67
  },
67
68
  streamToString: function() {
68
69
  return streamToString;
70
+ },
71
+ streamToUint8Array: function() {
72
+ return streamToUint8Array;
69
73
  }
70
74
  });
71
75
  const _tracer = require("../lib/trace/tracer");
@@ -139,7 +143,7 @@ function streamFromBuffer(chunk) {
139
143
  }
140
144
  });
141
145
  }
142
- async function streamToBuffer(stream) {
146
+ async function streamToChunks(stream) {
143
147
  const reader = stream.getReader();
144
148
  const chunks = [];
145
149
  while(true){
@@ -149,7 +153,23 @@ async function streamToBuffer(stream) {
149
153
  }
150
154
  chunks.push(value);
151
155
  }
152
- return Buffer.concat(chunks);
156
+ return chunks;
157
+ }
158
+ function concatUint8Arrays(chunks) {
159
+ const totalLength = chunks.reduce((sum, chunk)=>sum + chunk.length, 0);
160
+ const result = new Uint8Array(totalLength);
161
+ let offset = 0;
162
+ for (const chunk of chunks){
163
+ result.set(chunk, offset);
164
+ offset += chunk.length;
165
+ }
166
+ return result;
167
+ }
168
+ async function streamToUint8Array(stream) {
169
+ return concatUint8Arrays(await streamToChunks(stream));
170
+ }
171
+ async function streamToBuffer(stream) {
172
+ return Buffer.concat(await streamToChunks(stream));
153
173
  }
154
174
  async function streamToString(stream, signal) {
155
175
  const decoder = new TextDecoder('utf-8', {
@@ -645,9 +665,13 @@ function chainTransformers(readable, transformers) {
645
665
  async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isStaticGeneration, isBuildTimePrerendering, buildId, getServerInsertedHTML, getServerInsertedMetadata, validateRootLayout }) {
646
666
  // Suffix itself might contain close tags at the end, so we need to split it.
647
667
  const suffixUnclosed = suffix ? suffix.split(CLOSE_TAG, 1)[0] : null;
648
- // If we're generating static HTML we need to wait for it to resolve before continuing.
649
668
  if (isStaticGeneration) {
669
+ // If we're generating static HTML we need to wait for it to resolve before continuing.
650
670
  await renderStream.allReady;
671
+ } else {
672
+ // Otherwise, we want to make sure Fizz is done with all microtasky work
673
+ // before we start pulling the stream and cause a flush.
674
+ await (0, _scheduler.waitAtLeastOneReactRenderTask)();
651
675
  }
652
676
  return chainTransformers(renderStream, [
653
677
  // Buffer everything to avoid flushing too frequently
@@ -211,10 +211,43 @@ const config = {
211
211
  kind: 'text',
212
212
  text: `\n\nRead more about the "${entryConfig}" option: ` + API_DOCS[entryConfig].link
213
213
  };
214
- if (value && (0, _utils.isPositionInsideNode)(position, value)) {
214
+ // When the value is a flexible type (like a function), also compute its
215
+ // inferred type so we can surface it alongside the docs. This is useful
216
+ // even when the value is considered invalid by the config validation,
217
+ // as long as it's not a direct literal export.
218
+ let displayParts = [];
219
+ const typeChecker = (0, _utils.getTypeChecker)();
220
+ const isString = !!value && ts.isStringLiteral(value);
221
+ const isFunctionValue = !!value && !isString && (ts.isArrowFunction(value) || ts.isFunctionExpression(value) || ts.isFunctionDeclaration(value));
222
+ if (typeChecker && value && isFunctionValue) {
223
+ try {
224
+ // If we're hovering the config identifier, ask for the type at the
225
+ // identifier; otherwise, ask at the value node. This makes sure
226
+ // highlighting `generateMetadata` itself also shows the inferred type.
227
+ const typeTarget = (0, _utils.isPositionInsideNode)(position, name) ? name : value;
228
+ const type = typeChecker.getTypeAtLocation(typeTarget);
229
+ if (type) {
230
+ const typeString = typeChecker.typeToString(type, typeTarget);
231
+ if (typeString) {
232
+ displayParts = [
233
+ {
234
+ text: typeString,
235
+ kind: 'typeName'
236
+ }
237
+ ];
238
+ }
239
+ }
240
+ } catch {
241
+ // If type checking fails, continue without type info.
242
+ }
243
+ }
244
+ // For non-function values (like literals), hovering the value should show
245
+ // option-specific docs. For function-valued configs (e.g. `generateMetadata`),
246
+ // we let TypeScript handle hover anywhere in the initializer except for the
247
+ // export identifier itself.
248
+ if (value && !isFunctionValue && (0, _utils.isPositionInsideNode)(position, value)) {
215
249
  var _API_DOCS_entryConfig_isValid, _API_DOCS_entryConfig, _API_DOCS_entryConfig_options;
216
- // Hovers the value of the config
217
- const isString = ts.isStringLiteral(value);
250
+ // Hovering the value of the config
218
251
  const text = (0, _utils.removeStringQuotes)(value.getText());
219
252
  const key = isString ? `"${text}"` : text;
220
253
  const isValid = API_DOCS[entryConfig].isValid ? (_API_DOCS_entryConfig_isValid = (_API_DOCS_entryConfig = API_DOCS[entryConfig]).isValid) == null ? void 0 : _API_DOCS_entryConfig_isValid.call(_API_DOCS_entryConfig, key) : !!((_API_DOCS_entryConfig_options = API_DOCS[entryConfig].options) == null ? void 0 : _API_DOCS_entryConfig_options[key]);
@@ -237,7 +270,8 @@ const config = {
237
270
  ]
238
271
  };
239
272
  } else {
240
- // Wrong value, display the docs link
273
+ // Wrong value: still show the docs link, and when available, the
274
+ // inferred type for non-literal (i.e. non-direct) exports.
241
275
  overridden = {
242
276
  kind: ts.ScriptElementKind.enumElement,
243
277
  kindModifiers: ts.ScriptElementKindModifier.none,
@@ -245,13 +279,23 @@ const config = {
245
279
  start: value.getStart(),
246
280
  length: value.getWidth()
247
281
  },
248
- displayParts: [],
282
+ displayParts,
249
283
  documentation: [
250
284
  docsLink
251
285
  ]
252
286
  };
253
287
  }
254
288
  } else {
289
+ // For function-valued configs, if we're hovering anywhere within the
290
+ // initializer (including `async`, parameters, or the body) but not on
291
+ // the export identifier itself, don't override TypeScript's default
292
+ // hover. We only want to override when hovering the config identifier
293
+ // (e.g. `generateMetadata`), not arbitrary tokens within the function.
294
+ if (isFunctionValue && (0, _utils.isPositionInsideNode)(position, value) && // hover is somewhere within the function initializer
295
+ !(0, _utils.isPositionInsideNode)(position, name) // ...but not on the export identifier itself
296
+ ) {
297
+ return;
298
+ }
255
299
  // Hovers the name of the config
256
300
  overridden = {
257
301
  kind: ts.ScriptElementKind.enumElement,
@@ -260,7 +304,7 @@ const config = {
260
304
  start: name.getStart(),
261
305
  length: name.getWidth()
262
306
  },
263
- displayParts: [],
307
+ displayParts,
264
308
  documentation: [
265
309
  {
266
310
  kind: 'text',