af360 0.1.14 → 0.1.16

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 (289) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/app-build-manifest.json +139 -130
  3. package/dist/.next/app-path-routes-manifest.json +17 -17
  4. package/dist/.next/build-manifest.json +5 -5
  5. package/dist/.next/prerender-manifest.json +45 -45
  6. package/dist/.next/server/app/_not-found/page.js +2 -2
  7. package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  8. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/dist/.next/server/app/_not-found.html +1 -1
  10. package/dist/.next/server/app/_not-found.meta +8 -0
  11. package/dist/.next/server/app/_not-found.rsc +4 -4
  12. package/dist/.next/server/app/ahead/page.js +2 -2
  13. package/dist/.next/server/app/ahead/page.js.nft.json +1 -1
  14. package/dist/.next/server/app/ahead/page_client-reference-manifest.js +1 -1
  15. package/dist/.next/server/app/ahead.html +1 -1
  16. package/dist/.next/server/app/ahead.meta +8 -0
  17. package/dist/.next/server/app/ahead.rsc +5 -5
  18. package/dist/.next/server/app/api/browse/route.js +1 -1
  19. package/dist/.next/server/app/api/browse/route.js.nft.json +1 -1
  20. package/dist/.next/server/app/api/browse/route_client-reference-manifest.js +1 -1
  21. package/dist/.next/server/app/api/card/route.js +1 -1
  22. package/dist/.next/server/app/api/card/route.js.nft.json +1 -1
  23. package/dist/.next/server/app/api/card/route_client-reference-manifest.js +1 -1
  24. package/dist/.next/server/app/api/check/route.js +1 -1
  25. package/dist/.next/server/app/api/check/route.js.nft.json +1 -1
  26. package/dist/.next/server/app/api/check/route_client-reference-manifest.js +1 -1
  27. package/dist/.next/server/app/api/config/route.js +1 -1
  28. package/dist/.next/server/app/api/config/route.js.nft.json +1 -1
  29. package/dist/.next/server/app/api/config/route_client-reference-manifest.js +1 -1
  30. package/dist/.next/server/app/api/connections/route.js +3 -3
  31. package/dist/.next/server/app/api/connections/route.js.nft.json +1 -1
  32. package/dist/.next/server/app/api/connections/route_client-reference-manifest.js +1 -1
  33. package/dist/.next/server/app/api/connectors/github/route.js +1 -1
  34. package/dist/.next/server/app/api/connectors/github/route.js.nft.json +1 -1
  35. package/dist/.next/server/app/api/connectors/github/route_client-reference-manifest.js +1 -1
  36. package/dist/.next/server/app/api/consent/route.js +1 -1
  37. package/dist/.next/server/app/api/consent/route.js.nft.json +1 -1
  38. package/dist/.next/server/app/api/consent/route_client-reference-manifest.js +1 -1
  39. package/dist/.next/server/app/api/context/route.js +3 -3
  40. package/dist/.next/server/app/api/context/route.js.nft.json +1 -1
  41. package/dist/.next/server/app/api/context/route_client-reference-manifest.js +1 -1
  42. package/dist/.next/server/app/api/discover/route.js +1 -1
  43. package/dist/.next/server/app/api/discover/route.js.nft.json +1 -1
  44. package/dist/.next/server/app/api/discover/route_client-reference-manifest.js +1 -1
  45. package/dist/.next/server/app/api/expiry/route.js +1 -1
  46. package/dist/.next/server/app/api/expiry/route.js.nft.json +1 -1
  47. package/dist/.next/server/app/api/expiry/route_client-reference-manifest.js +1 -1
  48. package/dist/.next/server/app/api/first-light/route.js +1 -1
  49. package/dist/.next/server/app/api/first-light/route.js.nft.json +1 -1
  50. package/dist/.next/server/app/api/first-light/route_client-reference-manifest.js +1 -1
  51. package/dist/.next/server/app/api/handoff/route.js +1 -1
  52. package/dist/.next/server/app/api/handoff/route.js.nft.json +1 -1
  53. package/dist/.next/server/app/api/handoff/route_client-reference-manifest.js +1 -1
  54. package/dist/.next/server/app/api/health/route.js +1 -1
  55. package/dist/.next/server/app/api/health/route.js.nft.json +1 -1
  56. package/dist/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  57. package/dist/.next/server/app/api/incidents/route.js +1 -1
  58. package/dist/.next/server/app/api/incidents/route.js.nft.json +1 -1
  59. package/dist/.next/server/app/api/incidents/route_client-reference-manifest.js +1 -1
  60. package/dist/.next/server/app/api/insights/route.js +1 -1
  61. package/dist/.next/server/app/api/insights/route.js.nft.json +1 -1
  62. package/dist/.next/server/app/api/insights/route_client-reference-manifest.js +1 -1
  63. package/dist/.next/server/app/api/log/route.js +1 -1
  64. package/dist/.next/server/app/api/log/route.js.nft.json +1 -1
  65. package/dist/.next/server/app/api/log/route_client-reference-manifest.js +1 -1
  66. package/dist/.next/server/app/api/pulse/route.js +1 -1
  67. package/dist/.next/server/app/api/pulse/route.js.nft.json +1 -1
  68. package/dist/.next/server/app/api/pulse/route_client-reference-manifest.js +1 -1
  69. package/dist/.next/server/app/api/radar/route.js +1 -1
  70. package/dist/.next/server/app/api/radar/route.js.nft.json +1 -1
  71. package/dist/.next/server/app/api/radar/route_client-reference-manifest.js +1 -1
  72. package/dist/.next/server/app/api/report/route.js +1 -1
  73. package/dist/.next/server/app/api/report/route.js.nft.json +1 -1
  74. package/dist/.next/server/app/api/report/route_client-reference-manifest.js +1 -1
  75. package/dist/.next/server/app/api/services/route.js +1 -1
  76. package/dist/.next/server/app/api/services/route.js.nft.json +1 -1
  77. package/dist/.next/server/app/api/services/route_client-reference-manifest.js +1 -1
  78. package/dist/.next/server/app/api/status/route.js +1 -1
  79. package/dist/.next/server/app/api/status/route.js.nft.json +1 -1
  80. package/dist/.next/server/app/api/status/route_client-reference-manifest.js +1 -1
  81. package/dist/.next/server/app/connections/page.js +2 -2
  82. package/dist/.next/server/app/connections/page.js.nft.json +1 -1
  83. package/dist/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  84. package/dist/.next/server/app/connections.html +1 -1
  85. package/dist/.next/server/app/connections.meta +8 -0
  86. package/dist/.next/server/app/connections.rsc +5 -5
  87. package/dist/.next/server/app/dashboard/page.js +2 -2
  88. package/dist/.next/server/app/dashboard/page.js.nft.json +1 -1
  89. package/dist/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
  90. package/dist/.next/server/app/dashboard.html +1 -1
  91. package/dist/.next/server/app/dashboard.meta +8 -0
  92. package/dist/.next/server/app/dashboard.rsc +4 -4
  93. package/dist/.next/server/app/discoveries/page.js +2 -2
  94. package/dist/.next/server/app/discoveries/page.js.nft.json +1 -1
  95. package/dist/.next/server/app/discoveries/page_client-reference-manifest.js +1 -1
  96. package/dist/.next/server/app/discoveries.html +1 -1
  97. package/dist/.next/server/app/discoveries.meta +8 -0
  98. package/dist/.next/server/app/discoveries.rsc +5 -5
  99. package/dist/.next/server/app/expiry/page.js +2 -2
  100. package/dist/.next/server/app/expiry/page.js.nft.json +1 -1
  101. package/dist/.next/server/app/expiry/page_client-reference-manifest.js +1 -1
  102. package/dist/.next/server/app/expiry.html +1 -1
  103. package/dist/.next/server/app/expiry.meta +8 -0
  104. package/dist/.next/server/app/expiry.rsc +4 -4
  105. package/dist/.next/server/app/fleet/page.js +2 -2
  106. package/dist/.next/server/app/fleet/page.js.nft.json +1 -1
  107. package/dist/.next/server/app/fleet/page_client-reference-manifest.js +1 -1
  108. package/dist/.next/server/app/fleet.html +1 -1
  109. package/dist/.next/server/app/fleet.meta +8 -0
  110. package/dist/.next/server/app/fleet.rsc +4 -4
  111. package/dist/.next/server/app/home/page.js +2 -2
  112. package/dist/.next/server/app/home/page.js.nft.json +1 -1
  113. package/dist/.next/server/app/home/page_client-reference-manifest.js +1 -1
  114. package/dist/.next/server/app/home.html +1 -1
  115. package/dist/.next/server/app/home.meta +8 -0
  116. package/dist/.next/server/app/home.rsc +4 -4
  117. package/dist/.next/server/app/legal/privacy/page.js +2 -2
  118. package/dist/.next/server/app/legal/privacy/page.js.nft.json +1 -1
  119. package/dist/.next/server/app/legal/privacy/page_client-reference-manifest.js +1 -1
  120. package/dist/.next/server/app/legal/terms/page.js +2 -2
  121. package/dist/.next/server/app/legal/terms/page.js.nft.json +1 -1
  122. package/dist/.next/server/app/legal/terms/page_client-reference-manifest.js +1 -1
  123. package/dist/.next/server/app/log/page.js +2 -2
  124. package/dist/.next/server/app/log/page.js.nft.json +1 -1
  125. package/dist/.next/server/app/log/page_client-reference-manifest.js +1 -1
  126. package/dist/.next/server/app/log.html +1 -1
  127. package/dist/.next/server/app/log.meta +8 -0
  128. package/dist/.next/server/app/log.rsc +5 -5
  129. package/dist/.next/server/app/page.js +2 -2
  130. package/dist/.next/server/app/page.js.nft.json +1 -1
  131. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  132. package/dist/.next/server/app/projects/page.js +2 -2
  133. package/dist/.next/server/app/projects/page.js.nft.json +1 -1
  134. package/dist/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  135. package/dist/.next/server/app/projects.html +1 -1
  136. package/dist/.next/server/app/projects.meta +8 -0
  137. package/dist/.next/server/app/projects.rsc +5 -5
  138. package/dist/.next/server/app/radar/page.js +2 -65
  139. package/dist/.next/server/app/radar/page.js.nft.json +1 -1
  140. package/dist/.next/server/app/radar/page_client-reference-manifest.js +1 -1
  141. package/dist/.next/server/app/radar.html +1 -1
  142. package/dist/.next/server/app/radar.meta +8 -0
  143. package/dist/.next/server/app/radar.rsc +5 -5
  144. package/dist/.next/server/app/report/page.js +2 -2
  145. package/dist/.next/server/app/report/page.js.nft.json +1 -1
  146. package/dist/.next/server/app/report/page_client-reference-manifest.js +1 -1
  147. package/dist/.next/server/app/report.html +1 -1
  148. package/dist/.next/server/app/report.meta +8 -0
  149. package/dist/.next/server/app/report.rsc +5 -5
  150. package/dist/.next/server/app/settings/page.js +2 -2
  151. package/dist/.next/server/app/settings/page.js.nft.json +1 -1
  152. package/dist/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  153. package/dist/.next/server/app/settings.html +1 -1
  154. package/dist/.next/server/app/settings.meta +8 -0
  155. package/dist/.next/server/app/settings.rsc +5 -5
  156. package/dist/.next/server/app/sites/page.js +2 -2
  157. package/dist/.next/server/app/sites/page.js.nft.json +1 -1
  158. package/dist/.next/server/app/sites/page_client-reference-manifest.js +1 -1
  159. package/dist/.next/server/app/sites.html +1 -1
  160. package/dist/.next/server/app/sites.meta +8 -0
  161. package/dist/.next/server/app/sites.rsc +5 -5
  162. package/dist/.next/server/app/welcome/page.js +2 -2
  163. package/dist/.next/server/app/welcome/page.js.nft.json +1 -1
  164. package/dist/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
  165. package/dist/.next/server/app/welcome.html +1 -1
  166. package/dist/.next/server/app/welcome.meta +8 -0
  167. package/dist/.next/server/app/welcome.rsc +5 -5
  168. package/dist/.next/server/app-paths-manifest.json +17 -17
  169. package/dist/.next/server/chunks/1155.js +1 -1
  170. package/dist/.next/server/chunks/1232.js +1 -0
  171. package/dist/.next/server/chunks/2346.js +1 -1
  172. package/dist/.next/server/chunks/2465.js +64 -1
  173. package/dist/.next/server/chunks/2817.js +1 -1
  174. package/dist/.next/server/chunks/3897.js +22 -0
  175. package/dist/.next/server/chunks/4134.js +1 -1
  176. package/dist/.next/server/chunks/5277.js +1 -0
  177. package/dist/.next/server/chunks/5611.js +1 -1
  178. package/dist/.next/server/chunks/572.js +1 -1
  179. package/dist/.next/server/chunks/6992.js +1 -1
  180. package/dist/.next/server/chunks/7511.js +1 -1
  181. package/dist/.next/server/chunks/7719.js +1 -1
  182. package/dist/.next/server/chunks/8150.js +1 -1
  183. package/dist/.next/server/chunks/8549.js +1 -1
  184. package/dist/.next/server/chunks/876.js +1 -1
  185. package/dist/.next/server/chunks/9170.js +1 -1
  186. package/dist/.next/server/chunks/9655.js +11 -0
  187. package/dist/.next/server/middleware-build-manifest.js +1 -1
  188. package/dist/.next/server/middleware-manifest.json +5 -5
  189. package/dist/.next/server/pages/404.html +1 -1
  190. package/dist/.next/server/pages/500.html +1 -1
  191. package/dist/.next/server/pages/_document.js.nft.json +1 -1
  192. package/dist/.next/server/pages/_error.js +3 -3
  193. package/dist/.next/server/pages/_error.js.nft.json +1 -1
  194. package/dist/.next/server/pages-manifest.json +1 -1
  195. package/dist/.next/server/server-reference-manifest.json +1 -1
  196. package/dist/.next/static/chunks/1255-5cd2fe06309409a0.js +1 -0
  197. package/dist/.next/static/chunks/2619-3c9e02e22d10480a.js +1 -0
  198. package/dist/.next/static/chunks/3192-7e153722ff079fc6.js +1 -0
  199. package/dist/.next/static/chunks/5623-53fb7cea5de0afef.js +1 -0
  200. package/dist/.next/static/chunks/7897-52f8a153c1970ef0.js +1 -0
  201. package/dist/.next/static/chunks/8050-6c17ccfd85ac3208.js +1 -0
  202. package/dist/.next/static/chunks/app/ahead/page-f5789a03967af6e1.js +1 -0
  203. package/dist/.next/static/chunks/app/connections/page-5b833f9485623b92.js +1 -0
  204. package/dist/.next/static/chunks/app/discoveries/{page-52696e6ee0c8d3d5.js → page-337bb60e4cbdcebb.js} +1 -1
  205. package/dist/.next/static/chunks/app/{error-37987420de14c10c.js → error-b32d8c6d4bfa070e.js} +1 -1
  206. package/dist/.next/static/chunks/app/{layout-d14e087b541b48b1.js → layout-0f3f0098b5d1e6be.js} +1 -1
  207. package/dist/.next/static/chunks/app/log/page-1711fe02581c58e8.js +1 -0
  208. package/dist/.next/static/chunks/app/projects/page-b05c7b0c3284db79.js +1 -0
  209. package/dist/.next/static/chunks/app/radar/page-2c972e78ae153706.js +1 -0
  210. package/dist/.next/static/chunks/app/report/page-6bd98ca320f3730c.js +1 -0
  211. package/dist/.next/static/chunks/app/settings/{page-a38c457b7c57567b.js → page-d50e8193d000c9be.js} +1 -1
  212. package/dist/.next/static/chunks/app/sites/page-80cc0a08ae2339a8.js +1 -0
  213. package/dist/.next/static/chunks/app/welcome/{page-d26225bed7e1ad39.js → page-f2cd15c4b50942bc.js} +1 -1
  214. package/dist/.next/static/chunks/main-8e42304858de4a63.js +1 -0
  215. package/dist/.next/static/css/5ddef273a3ac3217.css +1 -0
  216. package/dist/.next/static/css/fbb4cf81dde34731.css +1 -0
  217. package/dist/build-id.json +228 -228
  218. package/dist/node_modules/@next/env/package.json +1 -1
  219. package/dist/node_modules/next/dist/build/swc/index.js +1 -1
  220. package/dist/node_modules/next/dist/build/webpack-config.js +2 -2
  221. package/dist/node_modules/next/dist/compiled/hash.js/sha256/256.js +1 -0
  222. package/dist/node_modules/next/dist/compiled/hash.js/sha256/package.json +1 -0
  223. package/dist/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +13 -13
  224. package/dist/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +13 -13
  225. package/dist/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +10 -10
  226. package/dist/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +11 -11
  227. package/dist/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  228. package/dist/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
  229. package/dist/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +8 -8
  230. package/dist/node_modules/next/dist/lib/has-necessary-dependencies.js +2 -0
  231. package/dist/node_modules/next/dist/lib/verify-typescript-setup.js +19 -0
  232. package/dist/node_modules/next/dist/server/base-server.js +2 -5
  233. package/dist/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1 -1
  234. package/dist/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  235. package/dist/node_modules/next/dist/server/image-optimizer.js +65 -2
  236. package/dist/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  237. package/dist/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +197 -23
  238. package/dist/node_modules/next/dist/server/lib/incremental-cache/index.js +36 -17
  239. package/dist/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +3 -3
  240. package/dist/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +14 -6
  241. package/dist/node_modules/next/dist/server/lib/match-next-data-pathname.js +3 -1
  242. package/dist/node_modules/next/dist/server/lib/node-fs-methods.js +14 -0
  243. package/dist/node_modules/next/dist/server/lib/route-cache-key.js +77 -0
  244. package/dist/node_modules/next/dist/server/lib/start-server.js +1 -1
  245. package/dist/node_modules/next/dist/server/next-server.js +8 -6
  246. package/dist/node_modules/next/dist/server/response-cache/index.js +31 -15
  247. package/dist/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +2 -2
  248. package/dist/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -1
  249. package/dist/node_modules/next/dist/server/route-modules/route-module.js +9 -2
  250. package/dist/node_modules/next/dist/shared/lib/canary-only.js +1 -1
  251. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +17 -1
  252. package/dist/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +1 -1
  253. package/dist/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  254. package/dist/node_modules/next/dist/telemetry/events/version.js +2 -2
  255. package/dist/node_modules/next/package.json +11 -11
  256. package/dist/node_modules/source-map-js/lib/quick-sort.js +10 -1
  257. package/dist/node_modules/source-map-js/lib/source-map-consumer.js +51 -3
  258. package/dist/node_modules/source-map-js/lib/source-map-generator.js +6 -4
  259. package/dist/node_modules/source-map-js/lib/source-node.js +7 -0
  260. package/dist/node_modules/source-map-js/package.json +1 -1
  261. package/dist/package.json +3 -3
  262. package/dist/shell/bin/af360-bridge.exe +0 -0
  263. package/docs/legal/PRIVACY.md +1 -1
  264. package/lib/mask.mjs +21 -1
  265. package/package.json +3 -3
  266. package/scripts/mcp-server.mjs +19 -9
  267. package/shell/bin/af360-bridge.exe +0 -0
  268. package/dist/.next/server/chunks/1331.js +0 -22
  269. package/dist/.next/server/chunks/6584.js +0 -1
  270. package/dist/.next/server/chunks/8134.js +0 -11
  271. package/dist/.next/server/chunks/9946.js +0 -1
  272. package/dist/.next/static/chunks/1255-612df69cb02f2021.js +0 -1
  273. package/dist/.next/static/chunks/1681-b233404f9ec2fc2e.js +0 -1
  274. package/dist/.next/static/chunks/2036-e29441d605c493a4.js +0 -1
  275. package/dist/.next/static/chunks/3192-6b341d547a49fa85.js +0 -1
  276. package/dist/.next/static/chunks/5623-ec4f1a6f7695d8d1.js +0 -1
  277. package/dist/.next/static/chunks/7897-6e6c509aea495560.js +0 -1
  278. package/dist/.next/static/chunks/app/ahead/page-e72bed448dd40bd5.js +0 -1
  279. package/dist/.next/static/chunks/app/connections/page-5d6cae02e6f2b49a.js +0 -1
  280. package/dist/.next/static/chunks/app/log/page-45b4cfd8f1a29d09.js +0 -1
  281. package/dist/.next/static/chunks/app/projects/page-75a41d4a90675d93.js +0 -1
  282. package/dist/.next/static/chunks/app/radar/page-4b4aad549dffcd3a.js +0 -1
  283. package/dist/.next/static/chunks/app/report/page-145496e8f0d5bc86.js +0 -1
  284. package/dist/.next/static/chunks/app/sites/page-96a7dcf3c1e9aa19.js +0 -1
  285. package/dist/.next/static/chunks/main-6828c74376f2b965.js +0 -1
  286. package/dist/.next/static/css/94d302c686de7e23.css +0 -1
  287. package/dist/.next/static/css/9b639a814d15c5ff.css +0 -1
  288. /package/dist/.next/static/{0b943e6aa8d5ffe860588 → be31a391928486d5659f1}/_buildManifest.js +0 -0
  289. /package/dist/.next/static/{0b943e6aa8d5ffe860588 → be31a391928486d5659f1}/_ssgManifest.js +0 -0
@@ -20,11 +20,10 @@ _export(exports, {
20
20
  return IncrementalCache;
21
21
  }
22
22
  });
23
+ const _routecachekey = require("../route-cache-key");
23
24
  const _responsecache = require("../../response-cache");
24
25
  const _filesystemcache = /*#__PURE__*/ _interop_require_default(require("./file-system-cache"));
25
- const _normalizepagepath = require("../../../shared/lib/page-path/normalize-page-path");
26
26
  const _constants = require("../../../lib/constants");
27
- const _toroute = require("../to-route");
28
27
  const _sharedcachecontrolsexternal = require("./shared-cache-controls.external");
29
28
  const _workunitasyncstorageexternal = require("../../app-render/work-unit-async-storage.external");
30
29
  const _invarianterror = require("../../../shared/lib/invariant-error");
@@ -88,7 +87,7 @@ async function hashString(cacheString) {
88
87
  const MAIN_KEY_PREFIX = 'v4';
89
88
  class IncrementalCache {
90
89
  static #_ = this.debug = !!process.env.NEXT_PRIVATE_DEBUG_CACHE;
91
- constructor({ fs, dev, flushToDisk, minimalMode, serverDistDir, requestHeaders, maxMemoryCacheSize, getPrerenderManifest, fetchCacheKeyPrefix, CurCacheHandler, allowedRevalidateHeaderKeys }){
90
+ constructor({ fs, dev, flushToDisk, minimalMode, serverDistDir, requestHeaders, maxMemoryCacheSize, getPrerenderManifest, fetchCacheKeyPrefix, CurCacheHandler, allowedRevalidateHeaderKeys, locales }){
92
91
  var _this_prerenderManifest_preview, _this_prerenderManifest;
93
92
  this.locks = new Map();
94
93
  this.hasCustomCacheHandler = Boolean(CurCacheHandler);
@@ -123,7 +122,8 @@ class IncrementalCache {
123
122
  this.requestHeaders = requestHeaders;
124
123
  this.allowedRevalidateHeaderKeys = allowedRevalidateHeaderKeys;
125
124
  this.prerenderManifest = getPrerenderManifest();
126
- this.cacheControls = new _sharedcachecontrolsexternal.SharedCacheControls(this.prerenderManifest);
125
+ this.locales = locales;
126
+ this.cacheControls = new _sharedcachecontrolsexternal.SharedCacheControls(this.prerenderManifest, locales);
127
127
  this.fetchCacheKeyPrefix = fetchCacheKeyPrefix;
128
128
  let revalidatedTags = [];
129
129
  if (requestHeaders[_constants.PRERENDER_REVALIDATE_HEADER] === ((_this_prerenderManifest = this.prerenderManifest) == null ? void 0 : (_this_prerenderManifest_preview = _this_prerenderManifest.preview) == null ? void 0 : _this_prerenderManifest_preview.previewModeId)) {
@@ -146,20 +146,16 @@ class IncrementalCache {
146
146
  });
147
147
  }
148
148
  }
149
- calculateRevalidate(pathname, fromTime, dev, isFallback) {
149
+ calculateRevalidate(cacheControl, fromTime, dev, isFallback) {
150
150
  // in development we don't have a prerender-manifest
151
151
  // and default to always revalidating to allow easier debugging
152
152
  if (dev) return Math.floor(performance.timeOrigin + performance.now() - 1000);
153
- const cacheControl = this.cacheControls.get((0, _toroute.toRoute)(pathname));
154
153
  // if an entry isn't present in routes we fallback to a default
155
154
  // of revalidating after 1 second unless it's a fallback request.
156
155
  const initialRevalidateSeconds = cacheControl ? cacheControl.revalidate : isFallback ? false : 1;
157
156
  const revalidateAfter = typeof initialRevalidateSeconds === 'number' ? initialRevalidateSeconds * 1000 + fromTime : initialRevalidateSeconds;
158
157
  return revalidateAfter;
159
158
  }
160
- _getPathname(pathname, fetchCache) {
161
- return fetchCache ? pathname : (0, _normalizepagepath.normalizePagePath)(pathname);
162
- }
163
159
  resetRequestCache() {
164
160
  var _this_cacheHandler_resetRequestCache, _this_cacheHandler;
165
161
  (_this_cacheHandler = this.cacheHandler) == null ? void 0 : (_this_cacheHandler_resetRequestCache = _this_cacheHandler.resetRequestCache) == null ? void 0 : _this_cacheHandler_resetRequestCache.call(_this_cacheHandler);
@@ -303,6 +299,9 @@ class IncrementalCache {
303
299
  }
304
300
  async get(cacheKey, ctx) {
305
301
  var _this_cacheHandler, _cacheData_value;
302
+ if (ctx.kind === _responsecache.IncrementalCacheKind.IMAGE) {
303
+ throw new _invarianterror.InvariantError('Images must use the image optimizer cache');
304
+ }
306
305
  // Unlike other caches if we have a resume data cache, we use it even if
307
306
  // testmode would normally disable it or if requestHeaders say 'no-cache'.
308
307
  if (ctx.kind === _responsecache.IncrementalCacheKind.FETCH) {
@@ -323,8 +322,16 @@ class IncrementalCache {
323
322
  if (this.disableForTestmode || this.dev && (ctx.kind !== _responsecache.IncrementalCacheKind.FETCH || this.requestHeaders['cache-control'] === 'no-cache')) {
324
323
  return null;
325
324
  }
326
- cacheKey = this._getPathname(cacheKey, ctx.kind === _responsecache.IncrementalCacheKind.FETCH);
327
- const cacheData = await ((_this_cacheHandler = this.cacheHandler) == null ? void 0 : _this_cacheHandler.get(cacheKey, ctx));
325
+ let storageKey = cacheKey;
326
+ let handlerContext = ctx;
327
+ if (ctx.kind !== _responsecache.IncrementalCacheKind.FETCH) {
328
+ // Ownership scopes the key and metadata inside Next.js. Storage handlers
329
+ // only need the resulting key and the existing cache options.
330
+ const { route, ...responseContext } = ctx;
331
+ storageKey = (0, _routecachekey.getRouteCacheKey)(cacheKey, route);
332
+ handlerContext = responseContext;
333
+ }
334
+ const cacheData = await ((_this_cacheHandler = this.cacheHandler) == null ? void 0 : _this_cacheHandler.get(storageKey, handlerContext));
328
335
  if (ctx.kind === _responsecache.IncrementalCacheKind.FETCH) {
329
336
  var _cacheData_value1;
330
337
  if (!cacheData) {
@@ -370,14 +377,14 @@ class IncrementalCache {
370
377
  });
371
378
  }
372
379
  let entry = null;
373
- const cacheControl = this.cacheControls.get((0, _toroute.toRoute)(cacheKey));
380
+ const cacheControl = this.cacheControls.get(cacheKey, ctx.route);
374
381
  let isStale;
375
382
  let revalidateAfter;
376
383
  if ((cacheData == null ? void 0 : cacheData.lastModified) === -1) {
377
384
  isStale = -1;
378
385
  revalidateAfter = -1 * _constants.CACHE_ONE_YEAR;
379
386
  } else {
380
- revalidateAfter = this.calculateRevalidate(cacheKey, (cacheData == null ? void 0 : cacheData.lastModified) || performance.timeOrigin + performance.now(), this.dev ?? false, ctx.isFallback);
387
+ revalidateAfter = this.calculateRevalidate(cacheControl, (cacheData == null ? void 0 : cacheData.lastModified) || performance.timeOrigin + performance.now(), this.dev ?? false, ctx.isFallback);
381
388
  isStale = revalidateAfter !== false && revalidateAfter < performance.timeOrigin + performance.now() ? true : undefined;
382
389
  }
383
390
  if (cacheData) {
@@ -388,7 +395,7 @@ class IncrementalCache {
388
395
  value: cacheData.value
389
396
  };
390
397
  }
391
- if (!cacheData && this.prerenderManifest.notFoundRoutes.includes(cacheKey)) {
398
+ if (!cacheData && this.prerenderManifest.notFoundRoutes.includes(cacheKey) && (0, _routecachekey.isRouteCacheOwner)(cacheKey, ctx.route, this.prerenderManifest.routes[cacheKey], this.locales)) {
392
399
  // for the first hit after starting the server the cache
393
400
  // may not have a way to save notFound: true so if
394
401
  // the prerender-manifest marks this as notFound then we
@@ -408,6 +415,9 @@ class IncrementalCache {
408
415
  return entry;
409
416
  }
410
417
  async set(pathname, data, ctx) {
418
+ if ('kind' in ctx && ctx.kind === _responsecache.IncrementalCacheKind.IMAGE) {
419
+ throw new _invarianterror.InvariantError('Images must use the image optimizer cache');
420
+ }
411
421
  // Even if we otherwise disable caching for testMode or if no fetchCache is
412
422
  // configured we still always stash results in the resume data cache if one
413
423
  // exists. This is because this is a transient in memory cache that
@@ -421,7 +431,16 @@ class IncrementalCache {
421
431
  }
422
432
  }
423
433
  if (this.disableForTestmode || this.dev && !ctx.fetchCache) return;
424
- pathname = this._getPathname(pathname, ctx.fetchCache);
434
+ let storageKey = pathname;
435
+ let handlerContext = ctx;
436
+ if (!ctx.fetchCache) {
437
+ const { route, ...responseContext } = ctx;
438
+ if (!route) {
439
+ throw new _invarianterror.InvariantError('Response cache requires a source route');
440
+ }
441
+ storageKey = (0, _routecachekey.getRouteCacheKey)(pathname, route);
442
+ handlerContext = responseContext;
443
+ }
425
444
  // FetchCache has upper limit of 2MB per-entry currently
426
445
  const itemSize = JSON.stringify(data).length;
427
446
  if (ctx.fetchCache && itemSize > 2 * 1024 * 1024 && // We ignore the size limit when custom cache handler is being used, as it
@@ -443,9 +462,9 @@ class IncrementalCache {
443
462
  try {
444
463
  var _this_cacheHandler;
445
464
  if (!ctx.fetchCache && ctx.cacheControl) {
446
- this.cacheControls.set((0, _toroute.toRoute)(pathname), ctx.cacheControl);
465
+ this.cacheControls.set(storageKey, ctx.cacheControl);
447
466
  }
448
- await ((_this_cacheHandler = this.cacheHandler) == null ? void 0 : _this_cacheHandler.set(pathname, data, ctx));
467
+ await ((_this_cacheHandler = this.cacheHandler) == null ? void 0 : _this_cacheHandler.set(storageKey, data, handlerContext));
449
468
  } catch (error) {
450
469
  console.warn('Failed to update prerender cache for', pathname, error);
451
470
  }
@@ -14,7 +14,7 @@ let memoryCache;
14
14
  function getMemoryCache(maxMemoryCacheSize) {
15
15
  if (!memoryCache) {
16
16
  memoryCache = new _lrucache.LRUCache(maxMemoryCacheSize, function length({ value }) {
17
- var _JSON_stringify;
17
+ var _value_postponed, _JSON_stringify;
18
18
  if (!value) {
19
19
  return 25;
20
20
  } else if (value.kind === _types.CachedRouteKind.REDIRECT) {
@@ -28,10 +28,10 @@ function getMemoryCache(maxMemoryCacheSize) {
28
28
  } else if (value.kind === _types.CachedRouteKind.FETCH) {
29
29
  return JSON.stringify(value.data || '').length;
30
30
  } else if (value.kind === _types.CachedRouteKind.APP_ROUTE) {
31
- return value.body.length;
31
+ return Math.max(1, value.body.length);
32
32
  }
33
33
  // rough estimate of size of cache value
34
- return value.html.length + (((_JSON_stringify = JSON.stringify(value.kind === _types.CachedRouteKind.APP_PAGE ? value.rscData : value.pageData)) == null ? void 0 : _JSON_stringify.length) || 0);
34
+ return Math.max(1, (value.kind === _types.CachedRouteKind.APP_PAGE ? ((_value_postponed = value.postponed) == null ? void 0 : _value_postponed.length) || 0 : 0) + value.html.length + (((_JSON_stringify = JSON.stringify(value.kind === _types.CachedRouteKind.APP_PAGE ? value.rscData : value.pageData)) == null ? void 0 : _JSON_stringify.length) || 0));
35
35
  });
36
36
  }
37
37
  return memoryCache;
@@ -8,6 +8,9 @@ Object.defineProperty(exports, "SharedCacheControls", {
8
8
  return SharedCacheControls;
9
9
  }
10
10
  });
11
+ const _routecachekey = require("../route-cache-key");
12
+ const _normalizelocalepath = require("../../../shared/lib/i18n/normalize-locale-path");
13
+ const _routekind = require("../../route-kind");
11
14
  class SharedCacheControls {
12
15
  static #_ = /**
13
16
  * The in-memory cache of cache lives for routes. This cache is populated when
@@ -16,8 +19,9 @@ class SharedCacheControls {
16
19
  constructor(/**
17
20
  * The prerender manifest that contains the initial cache controls for
18
21
  * routes.
19
- */ prerenderManifest){
22
+ */ prerenderManifest, locales){
20
23
  this.prerenderManifest = prerenderManifest;
24
+ this.locales = locales;
21
25
  }
22
26
  /**
23
27
  * Try to get the cache control value for a route. This will first try to get
@@ -25,16 +29,17 @@ class SharedCacheControls {
25
29
  * in-memory cache, it will be sourced from the prerender manifest.
26
30
  *
27
31
  * @param route the route to get the cache control for
32
+ * @param owner the source route that owns the response
28
33
  * @returns the cache control for the route, or undefined if the values
29
34
  * are not present in the in-memory cache or the prerender manifest
30
- */ get(route) {
35
+ */ get(route, owner) {
31
36
  // This is a copy on write cache that is updated when the cache is updated.
32
37
  // If the cache is never written to, then the values will be sourced from
33
38
  // the prerender manifest.
34
- let cacheControl = SharedCacheControls.cacheControls.get(route);
39
+ let cacheControl = SharedCacheControls.cacheControls.get((0, _routecachekey.getRouteCacheKey)(route, owner));
35
40
  if (cacheControl) return cacheControl;
36
41
  let prerenderData = this.prerenderManifest.routes[route];
37
- if (prerenderData) {
42
+ if (prerenderData && (0, _routecachekey.isRouteCacheOwner)(route, owner, prerenderData, this.locales)) {
38
43
  const { initialRevalidateSeconds, initialExpireSeconds } = prerenderData;
39
44
  if (typeof initialRevalidateSeconds !== 'undefined') {
40
45
  return {
@@ -43,8 +48,9 @@ class SharedCacheControls {
43
48
  };
44
49
  }
45
50
  }
46
- const dynamicPrerenderData = this.prerenderManifest.dynamicRoutes[route];
47
- if (dynamicPrerenderData) {
51
+ const dynamicPathname = owner.kind === _routekind.RouteKind.PAGES ? (0, _normalizelocalepath.normalizeLocalePath)(route, this.locales).pathname : route;
52
+ const dynamicPrerenderData = this.prerenderManifest.dynamicRoutes[dynamicPathname];
53
+ if (dynamicPrerenderData && (0, _routecachekey.isRouteCacheOwner)(route, owner, dynamicPrerenderData, this.locales)) {
48
54
  const { fallbackRevalidate, fallbackExpire } = dynamicPrerenderData;
49
55
  if (typeof fallbackRevalidate !== 'undefined') {
50
56
  return {
@@ -53,6 +59,8 @@ class SharedCacheControls {
53
59
  };
54
60
  }
55
61
  }
62
+ // A new runtime pathname has no initial lifetime. Its own render supplies
63
+ // one instead of borrowing a sibling route's build-time metadata.
56
64
  return undefined;
57
65
  }
58
66
  /**
@@ -9,7 +9,9 @@ Object.defineProperty(exports, "matchNextDataPathname", {
9
9
  }
10
10
  });
11
11
  const _pathmatch = require("../../shared/lib/router/utils/path-match");
12
- const matcher = (0, _pathmatch.getPathMatch)('/_next/data/:path*');
12
+ const matcher = (0, _pathmatch.getPathMatch)('/_next/data/:path*', {
13
+ sensitive: true
14
+ });
13
15
  function matchNextDataPathname(pathname) {
14
16
  if (typeof pathname !== 'string') return false;
15
17
  return matcher(pathname);
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "nodeFs", {
9
9
  }
10
10
  });
11
11
  const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
12
+ const _nodecrypto = require("node:crypto");
12
13
  function _interop_require_default(obj) {
13
14
  return obj && obj.__esModule ? obj : {
14
15
  default: obj
@@ -19,6 +20,19 @@ const nodeFs = {
19
20
  readFile: _fs.default.promises.readFile,
20
21
  readFileSync: _fs.default.readFileSync,
21
22
  writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
23
+ writeFileAtomic: async (f, d)=>{
24
+ const temporary = `${f}.${(0, _nodecrypto.randomUUID)()}.tmp`;
25
+ try {
26
+ await _fs.default.promises.writeFile(temporary, d);
27
+ await _fs.default.promises.link(temporary, f);
28
+ return true;
29
+ } catch (error) {
30
+ if (error.code === 'EEXIST') return false;
31
+ throw error;
32
+ } finally{
33
+ await _fs.default.promises.unlink(temporary).catch(()=>{});
34
+ }
35
+ },
22
36
  mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
23
37
  recursive: true
24
38
  }),
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ ROUTE_CACHE_DIRECTORY: null,
7
+ getResponseCacheOwner: null,
8
+ getRouteCacheKey: null,
9
+ isRouteCacheOwner: 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
+ ROUTE_CACHE_DIRECTORY: function() {
19
+ return ROUTE_CACHE_DIRECTORY;
20
+ },
21
+ getResponseCacheOwner: function() {
22
+ return getResponseCacheOwner;
23
+ },
24
+ getRouteCacheKey: function() {
25
+ return getRouteCacheKey;
26
+ },
27
+ isRouteCacheOwner: function() {
28
+ return isRouteCacheOwner;
29
+ }
30
+ });
31
+ const _normalizepagepath = require("../../shared/lib/page-path/normalize-page-path");
32
+ const _normalizelocalepath = require("../../shared/lib/i18n/normalize-locale-path");
33
+ const _invarianterror = require("../../shared/lib/invariant-error");
34
+ const _apppathnamenormalizer = require("../normalizers/built/app/app-pathname-normalizer");
35
+ const _routekind = require("../route-kind");
36
+ const ROUTE_CACHE_DIRECTORY = 'route-cache';
37
+ const appPathnameNormalizer = new _apppathnamenormalizer.AppPathnameNormalizer();
38
+ function getResponseCacheOwner(definition) {
39
+ return {
40
+ kind: definition.kind,
41
+ // Pages module names can include a trailing /index in Turbopack. Their
42
+ // pathname matches the manifest's source in both bundlers. App modules
43
+ // retain groups and parallel slots in their cache identity.
44
+ sourceRoute: definition.kind === _routekind.RouteKind.PAGES ? definition.pathname : definition.page
45
+ };
46
+ }
47
+ function isRouteCacheOwner(pathname, owner, prerender, locales) {
48
+ if (!prerender) {
49
+ return false;
50
+ }
51
+ // Pages have JSON data routes, App Pages have RSC data routes, and App
52
+ // Route Handlers have no separate data route.
53
+ const kind = prerender.dataRoute === null ? _routekind.RouteKind.APP_ROUTE : prerender.dataRoute.endsWith('.json') ? _routekind.RouteKind.PAGES : prerender.dataRoute.endsWith('.rsc') ? _routekind.RouteKind.APP_PAGE : undefined;
54
+ if (kind !== owner.kind) {
55
+ return false;
56
+ }
57
+ const source = 'srcRoute' in prerender ? prerender.srcRoute : prerender.fallbackSourceRoute;
58
+ const prerenderOwner = source ?? (kind === _routekind.RouteKind.PAGES ? (0, _normalizelocalepath.normalizeLocalePath)(pathname, locales).pathname : pathname);
59
+ return prerenderOwner === (kind === _routekind.RouteKind.PAGES ? owner.sourceRoute : appPathnameNormalizer.normalize(owner.sourceRoute));
60
+ }
61
+ function getRouteCacheKey(pathname, owner) {
62
+ if (!owner) {
63
+ throw new _invarianterror.InvariantError('Response cache requires a source route');
64
+ }
65
+ const { sourceRoute } = owner;
66
+ let source;
67
+ if (process.env.NEXT_RUNTIME === 'edge') {
68
+ const sha256 = require('next/dist/compiled/hash.js/sha256');
69
+ source = sha256().update(new TextEncoder().encode(sourceRoute)).digest('hex');
70
+ } else {
71
+ const { createHash } = require('crypto');
72
+ source = createHash('sha256').update(sourceRoute).digest('hex');
73
+ }
74
+ return `/${ROUTE_CACHE_DIRECTORY}/${owner.kind}/${source}/$${(0, _normalizepagepath.normalizePagePath)(pathname)}`;
75
+ }
76
+
77
+ //# sourceMappingURL=route-cache-key.js.map
@@ -179,7 +179,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
179
179
  async function startServer(serverOptions) {
180
180
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
181
181
  let { port } = serverOptions;
182
- process.title = `next-server (v${"15.5.21"})`;
182
+ process.title = `next-server (v${"15.5.27"})`;
183
183
  let handlersReady = ()=>{};
184
184
  let handlersError = ()=>{};
185
185
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -510,7 +510,10 @@ class NextNodeServer extends _baseserver.default {
510
510
  }
511
511
  process.env.NEXT_DEPLOYMENT_ID = this.nextConfig.experimental.useSkewCookie ? '' : this.nextConfig.deploymentId || '';
512
512
  if (!this.minimalMode) {
513
- this.imageResponseCache = new _responsecache.default(this.minimalMode);
513
+ this.imageResponseCache = new _responsecache.default({
514
+ minimalMode: this.minimalMode,
515
+ route: 'image'
516
+ });
514
517
  }
515
518
  const { appDocumentPreloading } = this.nextConfig.experimental;
516
519
  const isDefaultEnabled = typeof appDocumentPreloading === 'undefined';
@@ -658,6 +661,7 @@ class NextNodeServer extends _baseserver.default {
658
661
  }
659
662
  }
660
663
  async getIncrementalCache({ requestHeaders }) {
664
+ var _this_nextConfig_i18n;
661
665
  const dev = !!this.renderOpts.dev;
662
666
  let CacheHandler;
663
667
  const { cacheHandler } = this.nextConfig;
@@ -679,12 +683,10 @@ class NextNodeServer extends _baseserver.default {
679
683
  maxMemoryCacheSize: this.nextConfig.cacheMaxMemorySize,
680
684
  flushToDisk: !this.minimalMode && this.nextConfig.experimental.isrFlushToDisk,
681
685
  getPrerenderManifest: ()=>this.getPrerenderManifest(),
686
+ locales: (_this_nextConfig_i18n = this.nextConfig.i18n) == null ? void 0 : _this_nextConfig_i18n.locales,
682
687
  CurCacheHandler: CacheHandler
683
688
  });
684
689
  }
685
- getResponseCache() {
686
- return new _responsecache.default(this.minimalMode);
687
- }
688
690
  getPublicDir() {
689
691
  return (0, _path.join)(this.dir, _constants.CLIENT_PUBLIC_FILES_PATH);
690
692
  }
@@ -850,8 +852,8 @@ class NextNodeServer extends _baseserver.default {
850
852
  const isAppPath = Array.isArray(appPaths);
851
853
  let page = ctx.pathname;
852
854
  if (isAppPath) {
853
- // When it's an array, we need to pass all parallel routes to the loader.
854
- page = appPaths[0];
855
+ // Match the build owner while passing all parallel paths to the loader.
856
+ page = (0, _apppaths.selectAppPageEntry)(ctx.pathname, appPaths);
855
857
  }
856
858
  for (const edgeFunctionsPage of edgeFunctionsPages){
857
859
  if (edgeFunctionsPage === page) {
@@ -9,12 +9,13 @@ Object.defineProperty(exports, "default", {
9
9
  }
10
10
  });
11
11
  0 && __export(require("./types"));
12
+ const _types = _export_star(require("./types"), exports);
13
+ const _invarianterror = require("../../shared/lib/invariant-error");
12
14
  const _batcher = require("../../lib/batcher");
13
15
  const _lrucache = require("../lib/lru-cache");
14
16
  const _log = require("../../build/output/log");
15
17
  const _scheduler = require("../../lib/scheduler");
16
18
  const _utils = require("./utils");
17
- _export_star(require("./types"), exports);
18
19
  function _export_star(from, to) {
19
20
  Object.keys(from).forEach(function(k) {
20
21
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
@@ -74,7 +75,7 @@ function _export_star(from, to) {
74
75
  return invocationID === TTL_SENTINEL ? undefined : invocationID;
75
76
  }
76
77
  class ResponseCache {
77
- constructor(minimal_mode, maxSize = DEFAULT_MAX_SIZE, ttl = DEFAULT_TTL_MS){
78
+ constructor({ minimalMode, route, maxSize = DEFAULT_MAX_SIZE, ttl = DEFAULT_TTL_MS }){
78
79
  this.batcher = _batcher.Batcher.create({
79
80
  // Ensure on-demand revalidate doesn't block normal requests, it should be
80
81
  // safe to run an on-demand revalidate for the same key as a normal request.
@@ -95,7 +96,11 @@ class ResponseCache {
95
96
  * Used to detect when the cache size may be too small.
96
97
  * Bounded to prevent memory growth.
97
98
  */ this.evictedInvocationIDs = new Set();
98
- this.minimal_mode = minimal_mode;
99
+ if (!route) {
100
+ throw new _invarianterror.InvariantError('Response cache requires a source route');
101
+ }
102
+ this.route = route;
103
+ this.minimal_mode = minimalMode;
99
104
  this.maxSize = maxSize;
100
105
  this.ttl = ttl;
101
106
  // Create the LRU cache with eviction tracking
@@ -150,7 +155,7 @@ class ResponseCache {
150
155
  (0, _log.warnOnce)(`Response cache entry was evicted for invocation ${context.invocationID}. ` + `Consider increasing NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE (current: ${this.maxSize}).`);
151
156
  }
152
157
  }
153
- const { incrementalCache, isOnDemandRevalidate = false, isFallback = false, isRoutePPREnabled = false, isPrefetch = false, waitUntil, routeKind, invocationID } = context;
158
+ const { incrementalCache, isOnDemandRevalidate = false, isFallback = false, isRoutePPREnabled = false, isPrefetch = false, waitUntil, invocationID } = context;
154
159
  const response = await this.batcher.batch({
155
160
  key,
156
161
  isOnDemandRevalidate
@@ -161,7 +166,6 @@ class ResponseCache {
161
166
  isFallback,
162
167
  isRoutePPREnabled,
163
168
  isPrefetch,
164
- routeKind,
165
169
  invocationID
166
170
  }, resolve);
167
171
  // we need to ensure background revalidates are
@@ -186,11 +190,7 @@ class ResponseCache {
186
190
  let resolved = false;
187
191
  try {
188
192
  // Get the previous cache entry if not in minimal mode
189
- previousIncrementalCacheEntry = !this.minimal_mode ? await context.incrementalCache.get(key, {
190
- kind: (0, _utils.routeKindToIncrementalCacheKind)(context.routeKind),
191
- isRoutePPREnabled: context.isRoutePPREnabled,
192
- isFallback: context.isFallback
193
- }) : null;
193
+ previousIncrementalCacheEntry = !this.minimal_mode ? await context.incrementalCache.get(key, this.getCacheContext(context.isRoutePPREnabled, context.isFallback)) : null;
194
194
  if (previousIncrementalCacheEntry && !context.isOnDemandRevalidate) {
195
195
  resolve(previousIncrementalCacheEntry);
196
196
  resolved = true;
@@ -277,8 +277,7 @@ class ResponseCache {
277
277
  } else {
278
278
  await incrementalCache.set(key, incrementalResponseCacheEntry.value, {
279
279
  cacheControl: incrementalResponseCacheEntry.cacheControl,
280
- isRoutePPREnabled,
281
- isFallback
280
+ ...this.getCacheContext(isRoutePPREnabled, isFallback)
282
281
  });
283
282
  }
284
283
  }
@@ -290,18 +289,35 @@ class ResponseCache {
290
289
  const revalidate = Math.min(Math.max(previousIncrementalCacheEntry.cacheControl.revalidate || 3, 3), 30);
291
290
  const expire = previousIncrementalCacheEntry.cacheControl.expire === undefined ? undefined : Math.max(revalidate + 3, previousIncrementalCacheEntry.cacheControl.expire);
292
291
  await incrementalCache.set(key, previousIncrementalCacheEntry.value, {
292
+ ...this.getCacheContext(isRoutePPREnabled, isFallback),
293
293
  cacheControl: {
294
294
  revalidate: revalidate,
295
295
  expire: expire
296
- },
297
- isRoutePPREnabled,
298
- isFallback
296
+ }
299
297
  });
300
298
  }
301
299
  // We haven't resolved yet, so let's throw to indicate an error.
302
300
  throw err;
303
301
  }
304
302
  }
303
+ getCacheContext(isRoutePPREnabled, isFallback) {
304
+ if (this.route === 'image') {
305
+ return {
306
+ kind: _types.IncrementalCacheKind.IMAGE,
307
+ isFallback: false
308
+ };
309
+ }
310
+ const kind = (0, _utils.routeKindToIncrementalCacheKind)(this.route.kind);
311
+ if (kind === _types.IncrementalCacheKind.IMAGE) {
312
+ throw new _invarianterror.InvariantError('Images must use the image response cache');
313
+ }
314
+ return {
315
+ route: this.route,
316
+ kind,
317
+ isRoutePPREnabled,
318
+ isFallback
319
+ };
320
+ }
305
321
  }
306
322
 
307
323
  //# sourceMappingURL=index.js.map
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "AppPageRouteMatcherProvider", {
8
8
  return AppPageRouteMatcherProvider;
9
9
  }
10
10
  });
11
+ const _apppaths = require("../../shared/lib/router/utils/app-paths");
11
12
  const _isapppageroute = require("../../lib/is-app-page-route");
12
13
  const _constants = require("../../shared/lib/constants");
13
14
  const _app = require("../normalizers/built/app");
@@ -35,8 +36,7 @@ class AppPageRouteMatcherProvider extends _manifestroutematcherprovider.Manifest
35
36
  // Format the routes.
36
37
  const matchers = [];
37
38
  for (const [pathname, appPaths] of Object.entries(allAppPaths)){
38
- // TODO-APP: (wyattjoh) this is a hack right now, should be more deterministic
39
- const page = appPaths[0];
39
+ const page = (0, _apppaths.selectAppPageEntry)(pathname, appPaths);
40
40
  const filename = this.normalizers.filename.normalize(manifest[page]);
41
41
  const bundlePath = this.normalizers.bundlePath.normalize(page);
42
42
  matchers.push(new _apppageroutematcher.AppPageRouteMatcher({
@@ -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 _routecachekey = require("../../lib/route-cache-key");
33
34
  function _interop_require_default(obj) {
34
35
  return obj && obj.__esModule ? obj : {
35
36
  default: obj
@@ -81,8 +82,12 @@ const getHandler = ({ srcPage: originalSrcPage, config, userland, routeModule, i
81
82
  cacheKey = cacheKey === '/index' ? '/' : cacheKey;
82
83
  }
83
84
  if (hasStaticPaths && !isDraftMode) {
85
+ var _nextConfig_i18n;
84
86
  const decodedPathname = (0, _removetrailingslash.removeTrailingSlash)(locale ? (0, _addpathprefix.addPathPrefix)(resolvedPathname, `/${locale}`) : resolvedPathname);
85
- const isPrerendered = Boolean(prerenderManifest.routes[decodedPathname]) || prerenderManifest.notFoundRoutes.includes(decodedPathname);
87
+ const isPrerendered = (Boolean(prerenderManifest.routes[decodedPathname]) || prerenderManifest.notFoundRoutes.includes(decodedPathname)) && // A sibling's positive or negative prerender cannot admit parameters
88
+ // that this route excluded. Development computes static paths on demand
89
+ // instead of reading build-time prerender metadata.
90
+ (routeModule.isDev || (0, _routecachekey.isRouteCacheOwner)(decodedPathname, routeModule.cacheOwner, prerenderManifest.routes[decodedPathname], (_nextConfig_i18n = nextConfig.i18n) == null ? void 0 : _nextConfig_i18n.locales));
86
91
  const prerenderInfo = prerenderManifest.dynamicRoutes[srcPage];
87
92
  if (prerenderInfo) {
88
93
  if (prerenderInfo.fallback === false && !isPrerendered) {
@@ -25,6 +25,7 @@ const _ismetadataroute = require("../../lib/metadata/is-metadata-route");
25
25
  const _incrementalcache = require("../lib/incremental-cache");
26
26
  const _handlers = require("../use-cache/handlers");
27
27
  const _interopdefault = require("../app-render/interop-default");
28
+ const _routecachekey = require("../lib/route-cache-key");
28
29
  const _responsecache = /*#__PURE__*/ _interop_require_default(require("../response-cache"));
29
30
  const _apppaths = require("../../shared/lib/router/utils/app-paths");
30
31
  const _routerservercontext = require("../lib/router-utils/router-server-context");
@@ -41,6 +42,7 @@ class RouteModule {
41
42
  constructor({ userland, definition, distDir, relativeProjectDir }){
42
43
  this.userland = userland;
43
44
  this.definition = definition;
45
+ this.cacheOwner = (0, _routecachekey.getResponseCacheOwner)(definition);
44
46
  this.isDev = process.env.NODE_ENV === 'development';
45
47
  this.distDir = distDir;
46
48
  this.relativeProjectDir = relativeProjectDir;
@@ -227,6 +229,7 @@ class RouteModule {
227
229
  if (process.env.NEXT_RUNTIME === 'edge') {
228
230
  return globalThis.__incrementalCache;
229
231
  } else {
232
+ var _nextConfig_i18n;
230
233
  let CacheHandler;
231
234
  const { cacheHandler } = nextConfig;
232
235
  if (cacheHandler) {
@@ -250,7 +253,8 @@ class RouteModule {
250
253
  maxMemoryCacheSize: nextConfig.cacheMaxMemorySize,
251
254
  flushToDisk: nextConfig.experimental.isrFlushToDisk,
252
255
  getPrerenderManifest: ()=>prerenderManifest,
253
- CurCacheHandler: CacheHandler
256
+ CurCacheHandler: CacheHandler,
257
+ locales: (_nextConfig_i18n = nextConfig.i18n) == null ? void 0 : _nextConfig_i18n.locales
254
258
  });
255
259
  }
256
260
  }
@@ -478,7 +482,10 @@ class RouteModule {
478
482
  getResponseCache(req) {
479
483
  if (!this.responseCache) {
480
484
  const minimalMode = (0, _requestmeta.getRequestMeta)(req, 'minimalMode') ?? false;
481
- this.responseCache = new _responsecache.default(minimalMode);
485
+ this.responseCache = new _responsecache.default({
486
+ minimalMode,
487
+ route: this.cacheOwner
488
+ });
482
489
  }
483
490
  return this.responseCache;
484
491
  }
@@ -22,7 +22,7 @@ _export(exports, {
22
22
  });
23
23
  function isStableBuild() {
24
24
  var _process_env___NEXT_VERSION;
25
- return !((_process_env___NEXT_VERSION = "15.5.21") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
25
+ return !((_process_env___NEXT_VERSION = "15.5.27") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
26
26
  }
27
27
  class CanaryOnlyError extends Error {
28
28
  constructor(arg){