@farm.js/core 0.2.2 → 0.2.4

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 (199) hide show
  1. package/dist/{agent-mcp.d-gI3ahrF6.d.mts → agent-mcp.d-CaJJsAVy.d.mts} +1 -1
  2. package/dist/{agent-mcp.d-DuZjglYX.d.ts → agent-mcp.d-klsG_XKS.d.ts} +1 -1
  3. package/dist/agent-runtime.d.mts +1 -1
  4. package/dist/agent-runtime.d.ts +1 -1
  5. package/dist/{analyzer-UXWYUTBK.mjs → analyzer-CY7BS4GB.mjs} +2 -2
  6. package/dist/analyzer-KHCOL6JF.cjs +17 -0
  7. package/dist/api/node.d.mts +3 -3
  8. package/dist/api/node.d.ts +3 -3
  9. package/dist/api/route-manager.cjs +4 -4
  10. package/dist/api/route-manager.d.mts +3 -3
  11. package/dist/api/route-manager.d.ts +3 -3
  12. package/dist/api/route-manager.mjs +3 -3
  13. package/dist/api/runtime.d.mts +2 -2
  14. package/dist/api/runtime.d.ts +2 -2
  15. package/dist/api.cjs +5 -5
  16. package/dist/api.d.mts +4 -4
  17. package/dist/api.d.ts +4 -4
  18. package/dist/api.mjs +4 -4
  19. package/dist/{app-manifest.d-bHK9EGPI.d.mts → app-manifest.d-BIdn8Whr.d.mts} +1 -1
  20. package/dist/{app-manifest.d-B3h89j6a.d.ts → app-manifest.d-DkIbmExG.d.ts} +1 -1
  21. package/dist/app-markdown.d.mts +2 -2
  22. package/dist/app-markdown.d.ts +2 -2
  23. package/dist/{app.d-C3uyET_L.d.ts → app.d-DhZ61V9X.d.ts} +8 -5
  24. package/dist/{app.d-Cr7fXGvJ.d.mts → app.d-DnqxbvCI.d.mts} +8 -5
  25. package/dist/{chunk-YOVSWY2E.mjs → chunk-2XDRRAAD.mjs} +1 -1
  26. package/dist/{chunk-2T4GGCQT.cjs → chunk-6UBGXEIH.cjs} +2 -2
  27. package/dist/{chunk-BEAQVRMQ.cjs → chunk-76ES7BCO.cjs} +80 -75
  28. package/dist/{chunk-TK2JJCP5.mjs → chunk-7FNKBP3J.mjs} +186 -29
  29. package/dist/{chunk-ST3U7XVO.mjs → chunk-7IM2MKRK.mjs} +1 -1
  30. package/dist/{chunk-GL4SPJTE.cjs → chunk-7Q6KUXH6.cjs} +58 -27
  31. package/dist/{chunk-5CG2UD6B.cjs → chunk-AMSX2U4D.cjs} +304 -7
  32. package/dist/{chunk-NPR6SCEV.mjs → chunk-AOSZIHL7.mjs} +1 -1
  33. package/dist/chunk-APVJJCMB.mjs +547 -0
  34. package/dist/{chunk-LQZXCSYG.mjs → chunk-B6K2ZM3C.mjs} +5 -3
  35. package/dist/{chunk-IEXZMDF4.mjs → chunk-BCIUG6EQ.mjs} +2 -2
  36. package/dist/{chunk-JCERO6YF.mjs → chunk-BUIZTM3Q.mjs} +1 -1
  37. package/dist/{chunk-SJQ24IB5.cjs → chunk-BY5VQ57W.cjs} +11 -11
  38. package/dist/{chunk-GKDOKES3.mjs → chunk-CQ5LVPBL.mjs} +1 -1
  39. package/dist/{chunk-Q4FHYBFT.cjs → chunk-CSCORWIQ.cjs} +11 -11
  40. package/dist/{chunk-6VMBLDWY.mjs → chunk-CV7C75LN.mjs} +1 -1
  41. package/dist/{chunk-CZMMU3FP.mjs → chunk-D4DAL7KK.mjs} +35 -4
  42. package/dist/{chunk-ZVT2F3JU.mjs → chunk-DR65XXXD.mjs} +2 -2
  43. package/dist/{chunk-PRKFECGT.cjs → chunk-DZWX7FDX.cjs} +6 -4
  44. package/dist/{chunk-A4AYTO2E.cjs → chunk-EZRB5N6S.cjs} +1 -1
  45. package/dist/{chunk-B7CZ7T2I.cjs → chunk-JEJXSTYR.cjs} +2 -2
  46. package/dist/{chunk-56F4CDKE.cjs → chunk-JRPCCBGL.cjs} +449 -291
  47. package/dist/{chunk-JM5VSEYC.cjs → chunk-KHTDVXXR.cjs} +2 -2
  48. package/dist/{chunk-PYPHM7AS.cjs → chunk-LH7S7FI3.cjs} +5 -1
  49. package/dist/{chunk-ZND5D4IC.cjs → chunk-LJZZDRD5.cjs} +363 -326
  50. package/dist/{chunk-WXPY5FRF.cjs → chunk-P2PF5FUW.cjs} +2 -2
  51. package/dist/{chunk-CPL7WIMP.mjs → chunk-P3UT3OLV.mjs} +2 -2
  52. package/dist/{chunk-PZ5ZJAAO.mjs → chunk-POCWXRXW.mjs} +1 -1
  53. package/dist/{chunk-L7Z6OAE2.cjs → chunk-PVR63WHW.cjs} +4 -4
  54. package/dist/{chunk-Z23OCU33.cjs → chunk-RF3VCNV7.cjs} +6 -6
  55. package/dist/{chunk-5AOARZJT.cjs → chunk-T2VXOAC3.cjs} +4 -4
  56. package/dist/{chunk-FEWGKBMM.mjs → chunk-UIBCPZFO.mjs} +85 -48
  57. package/dist/{chunk-MYJPW4XN.mjs → chunk-UKGAP2OK.mjs} +3 -3
  58. package/dist/{chunk-DZXD6CYJ.mjs → chunk-V2RXBDV6.mjs} +4 -0
  59. package/dist/{chunk-ALGAGXWB.mjs → chunk-XEOIZ4QC.mjs} +1 -1
  60. package/dist/{chunk-D2VLHRBN.cjs → chunk-Y3MTKPLN.cjs} +4 -4
  61. package/dist/{chunk-FDS6U2NT.cjs → chunk-Y7FLPQSL.cjs} +3 -3
  62. package/dist/{chunk-MEXGQE4T.mjs → chunk-YR7ZI57S.mjs} +17 -12
  63. package/dist/{client-component.d-BavTzqsn.d.ts → client-component.d-BHE9Ns8s.d.ts} +1 -1
  64. package/dist/{client-component.d-X3j9FOZ2.d.mts → client-component.d-uya-qDZu.d.mts} +1 -1
  65. package/dist/{client-plugins.d-DnnAopKG.d.mts → client-plugins.d-CqFAvu-W.d.mts} +38 -1
  66. package/dist/{client-plugins.d-CqTr5IrQ.d.ts → client-plugins.d-Dp89a9Gf.d.ts} +38 -1
  67. package/dist/client-plugins.d.mts +1 -1
  68. package/dist/client-plugins.d.ts +1 -1
  69. package/dist/client.d.mts +7 -7
  70. package/dist/client.d.ts +7 -7
  71. package/dist/config.d.mts +1 -1
  72. package/dist/config.d.ts +1 -1
  73. package/dist/desktop.d.mts +2 -2
  74. package/dist/desktop.d.ts +2 -2
  75. package/dist/{devtools-RFVGDHXH.mjs → devtools-CRZCFRRL.mjs} +1 -1
  76. package/dist/{devtools-4LMM3DDJ.cjs → devtools-ZHYYPMZ3.cjs} +2 -2
  77. package/dist/docs.cjs +3 -3
  78. package/dist/docs.d.mts +3 -3
  79. package/dist/docs.d.ts +3 -3
  80. package/dist/docs.mjs +2 -2
  81. package/dist/environment/vite.cjs +4 -4
  82. package/dist/environment/vite.mjs +3 -3
  83. package/dist/{handler.d-BSlpYCDB.d.mts → handler.d-BgJGywnq.d.mts} +1 -1
  84. package/dist/{handler.d-DgX7gPO6.d.ts → handler.d-DHxaRQr7.d.ts} +1 -1
  85. package/dist/{headers.d-CmxW42R2.d.ts → headers.d-DVm2BMtR.d.ts} +1 -1
  86. package/dist/{headers.d-Cf8l5LMo.d.mts → headers.d-QrzpChrN.d.mts} +1 -1
  87. package/dist/index.cjs +19 -19
  88. package/dist/{index.d-BZZt7kxO.d.ts → index.d-B8lXhfTs.d.ts} +1 -1
  89. package/dist/{index.d-7xoJqKRZ.d.mts → index.d-Bpu1TV0-.d.mts} +1 -1
  90. package/dist/index.d.mts +22 -22
  91. package/dist/index.d.ts +22 -22
  92. package/dist/index.mjs +18 -18
  93. package/dist/integrations/orm.d.mts +1 -1
  94. package/dist/integrations/orm.d.ts +1 -1
  95. package/dist/integrations.d.mts +1 -1
  96. package/dist/integrations.d.ts +1 -1
  97. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  98. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  99. package/dist/internal/build-runtime.cjs +18 -18
  100. package/dist/internal/build-runtime.d.mts +4 -4
  101. package/dist/internal/build-runtime.d.ts +4 -4
  102. package/dist/internal/build-runtime.mjs +17 -17
  103. package/dist/internal/cli-runtime.cjs +7 -7
  104. package/dist/internal/cli-runtime.d.mts +7 -7
  105. package/dist/internal/cli-runtime.d.ts +7 -7
  106. package/dist/internal/cli-runtime.mjs +6 -6
  107. package/dist/internal/client-error-overlay.cjs +4 -4
  108. package/dist/internal/client-error-overlay.mjs +1 -1
  109. package/dist/internal/client-runtime.d.mts +5 -5
  110. package/dist/internal/client-runtime.d.ts +5 -5
  111. package/dist/internal/compression-runtime.d.mts +1 -1
  112. package/dist/internal/compression-runtime.d.ts +1 -1
  113. package/dist/internal/config-runtime.cjs +3 -3
  114. package/dist/internal/config-runtime.d.mts +3 -3
  115. package/dist/internal/config-runtime.d.ts +3 -3
  116. package/dist/internal/config-runtime.mjs +2 -2
  117. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  118. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  119. package/dist/internal/native-server-fns.cjs +4 -4
  120. package/dist/internal/native-server-fns.mjs +3 -3
  121. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  122. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  123. package/dist/internal/production-runtime.cjs +4 -4
  124. package/dist/internal/production-runtime.d.mts +10 -10
  125. package/dist/internal/production-runtime.d.ts +10 -10
  126. package/dist/internal/production-runtime.mjs +3 -3
  127. package/dist/internal/spa-router.d.mts +3 -3
  128. package/dist/internal/spa-router.d.ts +3 -3
  129. package/dist/internal/start-manifest.d.mts +1 -1
  130. package/dist/internal/start-manifest.d.ts +1 -1
  131. package/dist/markdown.d.mts +1 -1
  132. package/dist/markdown.d.ts +1 -1
  133. package/dist/middleware.d.mts +1 -1
  134. package/dist/middleware.d.ts +1 -1
  135. package/dist/{mount.d-CD-xVBu7.d.ts → mount.d-Cw_75kb9.d.ts} +1 -1
  136. package/dist/{mount.d-Dd0xeRMl.d.mts → mount.d-CyfNKOHK.d.mts} +1 -1
  137. package/dist/{navigation-delegate.d-Bses_F-y.d.ts → navigation-delegate.d--imR0rY7.d.ts} +1 -1
  138. package/dist/{navigation-delegate.d-dBNg976E.d.mts → navigation-delegate.d-DVEtyGYw.d.mts} +1 -1
  139. package/dist/navigation.d.mts +4 -4
  140. package/dist/navigation.d.ts +4 -4
  141. package/dist/plugin.cjs +13 -13
  142. package/dist/plugin.d.mts +5 -5
  143. package/dist/plugin.d.ts +5 -5
  144. package/dist/plugin.mjs +12 -12
  145. package/dist/{render-plan.d-vOdZHHLI.d.mts → render-plan.d-CTehM6y8.d.mts} +1 -1
  146. package/dist/{render-plan.d-DaIwnRK2.d.ts → render-plan.d-DpxLd_1i.d.ts} +1 -1
  147. package/dist/renderer-client.d.mts +5 -5
  148. package/dist/renderer-client.d.ts +5 -5
  149. package/dist/{request.d-CgXp3EEc.d.ts → request.d-BFXzOr32.d.ts} +1 -1
  150. package/dist/{request.d-B8U4pVFP.d.mts → request.d-BmQzlKtT.d.mts} +1 -1
  151. package/dist/request.d.mts +2 -2
  152. package/dist/request.d.ts +2 -2
  153. package/dist/{route-rendering.d-Di0AxFix.d.ts → route-rendering.d-bEil1VkF.d.ts} +1 -1
  154. package/dist/{route-rendering.d-BQvNYQqu.d.mts → route-rendering.d-geg68qd0.d.mts} +1 -1
  155. package/dist/{router.d-BJVGhSAJ.d.ts → router.d-4OCT2ak5.d.ts} +1 -1
  156. package/dist/{router.d-hNedVdoB.d.mts → router.d-CQjEcNih.d.mts} +1 -1
  157. package/dist/routes.cjs +3 -3
  158. package/dist/routes.d.mts +1 -1
  159. package/dist/routes.d.ts +1 -1
  160. package/dist/routes.mjs +2 -2
  161. package/dist/{rsc-pipeline-NCJ3NIE5.mjs → rsc-pipeline-JISGZS6G.mjs} +2 -2
  162. package/dist/{rsc-pipeline-HT4G3QGT.cjs → rsc-pipeline-R5W3PAAL.cjs} +3 -3
  163. package/dist/{runtime-6UF5XKUP.cjs → runtime-HSTND4FF.cjs} +8 -8
  164. package/dist/{runtime-VHXIEXL7.mjs → runtime-I2SBIB2Q.mjs} +5 -5
  165. package/dist/{runtime.d-0R8nHCM6.d.ts → runtime.d-BKoa6J55.d.ts} +1 -1
  166. package/dist/{runtime.d-DpeuF_T-.d.mts → runtime.d-DjYo5E1n.d.mts} +1 -1
  167. package/dist/{schema-dependencies.d-_Wyey4Wv.d.mts → schema-dependencies.d-CGNgsyKS.d.mts} +1 -1
  168. package/dist/{schema-dependencies.d-tkUHREqz.d.ts → schema-dependencies.d-CRoN2Q9N.d.ts} +1 -1
  169. package/dist/{server-components-status.d-sN7ju-ie.d.mts → server-components-status.d-Crl3IonP.d.mts} +1 -1
  170. package/dist/{server-components-status.d-B2Z5WvO5.d.ts → server-components-status.d-CwfcQD6n.d.ts} +1 -1
  171. package/dist/server-plugins.d.mts +3 -3
  172. package/dist/server-plugins.d.ts +3 -3
  173. package/dist/server.cjs +34 -34
  174. package/dist/server.d.mts +11 -11
  175. package/dist/server.d.ts +11 -11
  176. package/dist/server.mjs +14 -14
  177. package/dist/{spa-router.d-MjT6sGb9.d.ts → spa-router.d-Bv-r3AAK.d.ts} +2 -2
  178. package/dist/{spa-router.d-D3AtR2Bc.d.mts → spa-router.d-DhO_PJHP.d.mts} +2 -2
  179. package/dist/{ssg.d-C1SNuPz5.d.ts → ssg.d-CzFOAkqy.d.mts} +13 -2
  180. package/dist/{ssg.d-B32Cp_XW.d.mts → ssg.d-SfEQfMsA.d.ts} +13 -2
  181. package/dist/{store-core.d-BZ3YXs70.d.ts → store-core.d-Ch0N8dni.d.ts} +2 -2
  182. package/dist/{store-core.d-BbVdaoA0.d.mts → store-core.d-pKJCUdTR.d.mts} +2 -2
  183. package/dist/testing.cjs +5 -5
  184. package/dist/testing.d.mts +1 -1
  185. package/dist/testing.d.ts +1 -1
  186. package/dist/testing.mjs +4 -4
  187. package/dist/{utils.d-Bjbm44fP.d.ts → utils.d-BaLODLrK.d.ts} +1 -1
  188. package/dist/{utils.d-CoLozp7-.d.mts → utils.d-TPjb_Q7w.d.mts} +1 -1
  189. package/dist/version.cjs +2 -2
  190. package/dist/version.mjs +1 -1
  191. package/dist/vite.cjs +13 -13
  192. package/dist/vite.d.mts +6 -6
  193. package/dist/vite.d.ts +6 -6
  194. package/dist/vite.mjs +12 -12
  195. package/package.json +2 -2
  196. package/dist/analyzer-ENHO4SA5.cjs +0 -17
  197. package/dist/chunk-Q4CPBKPT.mjs +0 -251
  198. /package/dist/{chunk-JL2HNLMC.mjs → chunk-3QC2XTCN.mjs} +0 -0
  199. /package/dist/{chunk-COXMHCIV.cjs → chunk-GDKJGL7D.cjs} +0 -0
@@ -11,7 +11,7 @@ var _chunkLEZJZX4Ccjs = require('./chunk-LEZJZX4C.cjs');
11
11
  var _chunkRBDAW6IZcjs = require('./chunk-RBDAW6IZ.cjs');
12
12
 
13
13
 
14
- var _chunkPRKFECGTcjs = require('./chunk-PRKFECGT.cjs');
14
+ var _chunkDZWX7FDXcjs = require('./chunk-DZWX7FDX.cjs');
15
15
 
16
16
 
17
17
  var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
@@ -375,7 +375,7 @@ async function scanRoutePatterns(options) {
375
375
  );
376
376
  }
377
377
  }
378
- for (const route of await _chunkPRKFECGTcjs.discoverProgrammaticRoutePaths.call(void 0, source.root, source.srcDir)) {
378
+ for (const route of await _chunkDZWX7FDXcjs.discoverProgrammaticRoutePaths.call(void 0, source.root, source.srcDir)) {
379
379
  pages.add(route);
380
380
  modules.add(route);
381
381
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-NRWEY2CM.mjs";
4
4
  import {
5
5
  findProgrammaticRouteFilesInDir
6
- } from "./chunk-LQZXCSYG.mjs";
6
+ } from "./chunk-B6K2ZM3C.mjs";
7
7
  import {
8
8
  hasPolyroutePlugin,
9
9
  isFarmAPIRouteFileName
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-2LKUR5QJ.mjs";
29
29
  import {
30
30
  createProgrammaticRouteModuleId
31
- } from "./chunk-DZXD6CYJ.mjs";
31
+ } from "./chunk-V2RXBDV6.mjs";
32
32
  import {
33
33
  getFarmRouteRuntimeConfig,
34
34
  normalizeFarmRouteRuntimeConfig
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-CYRO3WP4.mjs";
12
12
  import {
13
13
  discoverProgrammaticRoutePaths
14
- } from "./chunk-LQZXCSYG.mjs";
14
+ } from "./chunk-B6K2ZM3C.mjs";
15
15
  import {
16
16
  parseRoutePath
17
17
  } from "./chunk-U6GMCDRS.mjs";
@@ -4,7 +4,7 @@
4
4
  var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
5
5
 
6
6
 
7
- var _chunk2T4GGCQTcjs = require('./chunk-2T4GGCQT.cjs');
7
+ var _chunk6UBGXEIHcjs = require('./chunk-6UBGXEIH.cjs');
8
8
 
9
9
 
10
10
  var _chunk6QCZWAGOcjs = require('./chunk-6QCZWAGO.cjs');
@@ -29,7 +29,7 @@ var _chunkH5AC3XSEcjs = require('./chunk-H5AC3XSE.cjs');
29
29
  var _chunk7GKZDRY2cjs = require('./chunk-7GKZDRY2.cjs');
30
30
 
31
31
 
32
- var _chunkA4AYTO2Ecjs = require('./chunk-A4AYTO2E.cjs');
32
+ var _chunkEZRB5N6Scjs = require('./chunk-EZRB5N6S.cjs');
33
33
 
34
34
 
35
35
  var _chunkTFCBJFP7cjs = require('./chunk-TFCBJFP7.cjs');
@@ -294,7 +294,7 @@ function createFarmAppManifest(input, registered = []) {
294
294
  return {
295
295
  schemaVersion: 1,
296
296
  app: app ? {
297
- ...app.version ? { farm: _chunkA4AYTO2Ecjs.FARM_VERSION } : {},
297
+ ...app.version ? { farm: _chunkEZRB5N6Scjs.FARM_VERSION } : {},
298
298
  ...app.renderer ? { renderer: input.renderer } : {},
299
299
  basePath: input.basePath,
300
300
  ...app.build ? { build: input.build } : {}
@@ -325,7 +325,7 @@ function resolveFarmSiteUrl() {
325
325
  asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
326
326
  ];
327
327
  for (const candidate of candidates) {
328
- const origin = candidate ? _chunk2T4GGCQTcjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
328
+ const origin = candidate ? _chunk6UBGXEIHcjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
329
329
  if (origin) return origin;
330
330
  }
331
331
  return null;
@@ -7,7 +7,7 @@ var _chunkYZMSJRM5cjs = require('./chunk-YZMSJRM5.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
10
+ var _chunkLH7S7FI3cjs = require('./chunk-LH7S7FI3.cjs');
11
11
 
12
12
 
13
13
  var _chunkGUDYDNKUcjs = require('./chunk-GUDYDNKU.cjs');
@@ -105,13 +105,13 @@ function createProgrammaticRoute(route) {
105
105
  return stampProgrammaticRouteSource(normalizeProgrammaticRoute(route), route, true);
106
106
  }
107
107
  function stampProgrammaticRouteSource(route, input, created) {
108
- if (!globalThis[_chunkPYPHM7AScjs.TRACK_PROGRAMMATIC_ROUTE_SOURCES]) return route;
109
- const previous = _chunkPYPHM7AScjs.getProgrammaticRouteDefinitionSource.call(void 0, input);
108
+ if (!globalThis[_chunkLH7S7FI3cjs.TRACK_PROGRAMMATIC_ROUTE_SOURCES]) return route;
109
+ const previous = _chunkLH7S7FI3cjs.getProgrammaticRouteDefinitionSource.call(void 0, input);
110
110
  const source = {
111
111
  stacks: [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _ => _.stacks]), () => ( [])), captureRouteSourceStack()],
112
112
  raw: created ? false : _nullishCoalesce(_optionalChain([previous, 'optionalAccess', _2 => _2.raw]), () => ( true))
113
113
  };
114
- Object.defineProperty(route, _chunkPYPHM7AScjs.PROGRAMMATIC_ROUTE_SOURCE, {
114
+ Object.defineProperty(route, _chunkLH7S7FI3cjs.PROGRAMMATIC_ROUTE_SOURCE, {
115
115
  value: source,
116
116
  enumerable: true,
117
117
  configurable: true,
@@ -305,7 +305,7 @@ function parseProgrammaticRouteModuleId(moduleId) {
305
305
  };
306
306
  }
307
307
  function parseProgrammaticRoutePath2(routePath, type = "page") {
308
- return _chunkPYPHM7AScjs.parseProgrammaticRoutePath.call(void 0, routePath, type);
308
+ return _chunkLH7S7FI3cjs.parseProgrammaticRoutePath.call(void 0, routePath, type);
309
309
  }
310
310
  function createRouteModuleFromProgrammaticPage(route, rendererRuntime) {
311
311
  const mod = {
@@ -365,7 +365,7 @@ function createLayoutModuleFromProgrammaticLayout(route) {
365
365
  }
366
366
  function scanProgrammaticPagePaths(source) {
367
367
  const paths = /* @__PURE__ */ new Set();
368
- for (const routePath of _chunkPYPHM7AScjs.extractProgrammaticPageCallPathLiterals.call(void 0, source)) {
368
+ for (const routePath of _chunkLH7S7FI3cjs.extractProgrammaticPageCallPathLiterals.call(void 0, source)) {
369
369
  if (routePath) {
370
370
  paths.add(normalizeRoutePath(routePath));
371
371
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkL7Z6OAE2cjs = require('./chunk-L7Z6OAE2.cjs');
3
+ var _chunkPVR63WHWcjs = require('./chunk-PVR63WHW.cjs');
4
4
 
5
5
 
6
6
 
@@ -370,7 +370,7 @@ function requestEvent(metadata, method, status, durationMs) {
370
370
  id: uuid(),
371
371
  requestId: metadata.id,
372
372
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
373
- route: routeTemplate(_chunkL7Z6OAE2cjs.getFarmRouteLabel.call(void 0, metadata.route)),
373
+ route: routeTemplate(_chunkPVR63WHWcjs.getFarmRouteLabel.call(void 0, metadata.route)),
374
374
  ...metadata.path ? { path: metadata.path } : {},
375
375
  agent: metadata.agent,
376
376
  kind: "request",
@@ -426,7 +426,7 @@ function toolEvent(metadata, event, payloads) {
426
426
  id: uuid(),
427
427
  requestId: metadata.id,
428
428
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
429
- route: routeTemplate(_chunkL7Z6OAE2cjs.getFarmRouteLabel.call(void 0, metadata.route)),
429
+ route: routeTemplate(_chunkPVR63WHWcjs.getFarmRouteLabel.call(void 0, metadata.route)),
430
430
  ...metadata.path ? { path: metadata.path } : {},
431
431
  agent: metadata.agent,
432
432
  kind: "mcp.tool",
@@ -512,7 +512,7 @@ async function receiveWebMCPReport(request, exporter, options, webmcp, waitUntil
512
512
  exporter.enqueue({
513
513
  id: uuid(),
514
514
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
515
- route: routeTemplate(_chunkL7Z6OAE2cjs.getFarmRouteLabel.call(void 0, route)),
515
+ route: routeTemplate(_chunkPVR63WHWcjs.getFarmRouteLabel.call(void 0, route)),
516
516
  ...path ? { path } : {},
517
517
  agent: _chunkU2HFXURZcjs.classifyFarmClient.call(void 0, request),
518
518
  kind: "mcp.tool",
@@ -44,7 +44,7 @@ import {
44
44
  resolveFarmIslxActionsMode,
45
45
  resolveFarmRouteRootStrategy,
46
46
  toBakedMarkdownSourcePath
47
- } from "./chunk-MEXGQE4T.mjs";
47
+ } from "./chunk-YR7ZI57S.mjs";
48
48
  import {
49
49
  generateFarmClientPluginEntryCode,
50
50
  hasFarmServerRuntimePlugins,
@@ -59,10 +59,10 @@ import {
59
59
  import {
60
60
  generateFarmTypeArtifacts,
61
61
  resolveRouteRenderingConfig
62
- } from "./chunk-CZMMU3FP.mjs";
62
+ } from "./chunk-D4DAL7KK.mjs";
63
63
  import {
64
64
  _setFarmInfraAnalyticsWebMCPRoute
65
- } from "./chunk-ST3U7XVO.mjs";
65
+ } from "./chunk-7IM2MKRK.mjs";
66
66
  import {
67
67
  createFarmRouteRenderPlan,
68
68
  farmPathGuardCoversEndpoint,
@@ -89,13 +89,13 @@ import {
89
89
  resolveFarmMCPRouteLabel,
90
90
  resolveFarmMarkdownRouteLabel,
91
91
  setFarmRouteLabel
92
- } from "./chunk-IEXZMDF4.mjs";
92
+ } from "./chunk-BCIUG6EQ.mjs";
93
93
  import {
94
94
  FARM_DEFAULT_MCP_PATH
95
95
  } from "./chunk-WABOJXAA.mjs";
96
96
  import {
97
97
  isFarmPreviewDeploymentEnvironment
98
- } from "./chunk-NPR6SCEV.mjs";
98
+ } from "./chunk-AOSZIHL7.mjs";
99
99
  import {
100
100
  createFarmServerFnBoundaryModule,
101
101
  isFarmServerFnBoundaryId,
@@ -148,7 +148,7 @@ import {
148
148
  usePackageScanCacheFile,
149
149
  withFarmSourceSnapshotOf,
150
150
  wrapFarmIslandContainers
151
- } from "./chunk-ZVT2F3JU.mjs";
151
+ } from "./chunk-DR65XXXD.mjs";
152
152
  import {
153
153
  generateFarmDocsAdapterClientRuntime,
154
154
  getFarmDocsAdapterConfigModule
@@ -253,7 +253,7 @@ import {
253
253
  } from "./chunk-IYEY3JWJ.mjs";
254
254
  import {
255
255
  APIRouteManager
256
- } from "./chunk-CPL7WIMP.mjs";
256
+ } from "./chunk-P3UT3OLV.mjs";
257
257
  import {
258
258
  hasPolyroutePlugin,
259
259
  isFarmAPIRouteFileName,
@@ -276,9 +276,10 @@ import {
276
276
  } from "./chunk-F7MJWW6A.mjs";
277
277
  import {
278
278
  isProgrammaticRoutesFileName,
279
+ isTestSourceFile,
279
280
  parseProgrammaticRouteModuleId,
280
281
  scanProgrammaticPagePaths
281
- } from "./chunk-DZXD6CYJ.mjs";
282
+ } from "./chunk-V2RXBDV6.mjs";
282
283
  import {
283
284
  createCliColors
284
285
  } from "./chunk-IGL6CO6M.mjs";
@@ -321,7 +322,7 @@ import {
321
322
  } from "./chunk-EILUVBKS.mjs";
322
323
  import {
323
324
  FARM_VERSION
324
- } from "./chunk-6VMBLDWY.mjs";
325
+ } from "./chunk-CV7C75LN.mjs";
325
326
  import {
326
327
  DEFAULT_FARM_API_BASE_PATH
327
328
  } from "./chunk-W6QLRQ3V.mjs";
@@ -1303,7 +1304,7 @@ function loadFarmWorkflowsDevRuntime() {
1303
1304
  return import("./workflows.mjs");
1304
1305
  }
1305
1306
  function loadFarmDevtoolsSnapshotRuntime() {
1306
- return import("./devtools-RFVGDHXH.mjs");
1307
+ return import("./devtools-CRZCFRRL.mjs");
1307
1308
  }
1308
1309
  function loadFarmDevtoolsUIRuntime() {
1309
1310
  return import("./devtools-ui-UYEVDADD.mjs");
@@ -2034,7 +2035,7 @@ function isResolvedEnvScope(value) {
2034
2035
  function isPotentialProgrammaticRouteSourceFile(normalizedFile, srcDirSlug) {
2035
2036
  return normalizedFile.startsWith(`${srcDirSlug}/`) && /\.(ts|tsx|js|jsx)$/.test(normalizedFile) && // A declaration file, including TypeScript's `.d.<ext>.ts` form such as a
2036
2037
  // Polyroute `route.d.rs.ts`, has no runtime code to register a route.
2037
- !/\.d(\.[^./]+)?\.ts$/.test(normalizedFile) && !normalizedFile.endsWith("/farm-routes.d.ts") && !normalizedFile.endsWith("/farm-env.d.ts") && !normalizedFile.endsWith("/lib/api.generated.ts");
2038
+ !/\.d(\.[^./]+)?\.ts$/.test(normalizedFile) && !normalizedFile.endsWith("/farm-routes.d.ts") && !normalizedFile.endsWith("/farm-env.d.ts") && !normalizedFile.endsWith("/lib/api.generated.ts") && !isTestSourceFile(normalizedFile.slice(srcDirSlug.length));
2038
2039
  }
2039
2040
  function fileContainsProgrammaticPageRoute(file) {
2040
2041
  if (!fs2.existsSync(file)) {
@@ -2426,6 +2427,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2426
2427
  let openAPIManager = null;
2427
2428
  let middlewareManager;
2428
2429
  let refreshRouteDiscovery = null;
2430
+ let refreshFarmDocsConfig = null;
2429
2431
  const pendingRouteReloads = /* @__PURE__ */ new Set();
2430
2432
  let workflowHandler = null;
2431
2433
  let isBuild = false;
@@ -2521,11 +2523,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2521
2523
  }
2522
2524
  },
2523
2525
  async configureServer(viteServer) {
2524
- viteServer.middlewares.use(
2525
- createFarmDevPreviewGuard(viteServer, {
2526
+ viteServer.middlewares.stack.unshift({
2527
+ route: "",
2528
+ handle: createFarmDevPreviewGuard(viteServer, {
2526
2529
  getSourceRoots: () => getFarmSourceRoots(farmApp?.getConfig() ?? options)
2527
2530
  })
2528
- );
2531
+ });
2529
2532
  if (typeof fontImports.configureServer === "function") {
2530
2533
  await fontImports.configureServer.call(this, viteServer);
2531
2534
  }
@@ -2606,6 +2609,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2606
2609
  }
2607
2610
  const sourceRoots = getFarmSourceRoots(farmConfig);
2608
2611
  server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
2612
+ server.watcher.add(farmConfig.layers.map((layer) => layer.root));
2609
2613
  if (farmConfig.i18n.enabled) {
2610
2614
  server.watcher.add(
2611
2615
  farmConfig.i18n.locales.map(
@@ -2733,7 +2737,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2733
2737
  invalidateFailedFarmDevModules(server);
2734
2738
  }
2735
2739
  const normalizedFile = file.replace(/\\/g, "/");
2736
- const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
2740
+ const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile) || farmConfig.layers.some((layer) => isFarmConfigFile(file, layer.root));
2741
+ if (configChanged) {
2742
+ const displayPath = path6.posix.relative(toPosixPath(farmConfig.root), normalizedFile);
2743
+ logger.warn(
2744
+ `Farm config changed (${displayPath}). Restart the dev server to apply the change.`
2745
+ );
2746
+ }
2737
2747
  const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
2738
2748
  const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
2739
2749
  routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
@@ -2924,38 +2934,58 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2924
2934
  },
2925
2935
  href
2926
2936
  );
2927
- const farmDocsHandler = farmDocsDevRuntime ? farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs) ? await farmDocsDevRuntime.createFarmDocsAdapterHandler(farmConfig.docs, {
2928
- root: farmConfig.root,
2929
- srcDir: farmConfig.srcDir,
2930
- clientEntry: "/@farm/client.js",
2931
- rendererServer: farmConfig.renderer.server,
2932
- resolveLayoutFonts: resolveDocsLayoutFonts,
2933
- fontStylesheetHref: "/@farm/fonts.css",
2934
- globalStylesheetHref: resolveDevGlobalStylesheetHref(
2935
- farmConfig.root,
2936
- farmConfig.srcDir
2937
- ),
2938
- loadModule: async (specifier) => {
2939
- const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2940
- if (specifier === farmConfig.docs.adapter?.server && resolved?.id) {
2941
- const file = resolved.id.split("?", 1)[0];
2942
- return import(
2943
- /* @vite-ignore */
2944
- pathToFileURL(file).href
2945
- );
2937
+ let farmDocsRuntimeGeneration = 0;
2938
+ const createFarmDocsAdapterHandler = () => {
2939
+ const generation = ++farmDocsRuntimeGeneration;
2940
+ return farmDocsDevRuntime.createFarmDocsAdapterHandler(farmConfig.docs, {
2941
+ root: farmConfig.root,
2942
+ srcDir: farmConfig.srcDir,
2943
+ clientEntry: "/@farm/client.js",
2944
+ rendererServer: farmConfig.renderer.server,
2945
+ resolveLayoutFonts: resolveDocsLayoutFonts,
2946
+ fontStylesheetHref: "/@farm/fonts.css",
2947
+ globalStylesheetHref: resolveDevGlobalStylesheetHref(farmConfig.root, farmConfig.srcDir),
2948
+ loadModule: async (specifier) => {
2949
+ const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2950
+ if (specifier === farmConfig.docs.adapter?.server && resolved?.id) {
2951
+ const file = resolved.id.split("?", 1)[0];
2952
+ return import(
2953
+ /* @vite-ignore */
2954
+ pathToFileURL(file).href
2955
+ );
2956
+ }
2957
+ return loadFarmDevModule(server, resolved?.id ?? specifier);
2958
+ },
2959
+ registerMCPServer: (mcpServer) => {
2960
+ if (generation !== farmDocsRuntimeGeneration) return () => {
2961
+ };
2962
+ const dispose = registerFarmMCPServer(mcpServer);
2963
+ docsMCPServerDisposers.add(dispose);
2964
+ return () => {
2965
+ docsMCPServerDisposers.delete(dispose);
2966
+ dispose();
2967
+ };
2968
+ },
2969
+ isPathGuarded: isFarmDocsPathGuarded
2970
+ });
2971
+ };
2972
+ let farmDocsAdapterHandler = farmDocsDevRuntime?.hasFarmDocsRuntimeAdapter(farmConfig.docs) ? createFarmDocsAdapterHandler() : void 0;
2973
+ if (farmDocsAdapterHandler) await farmDocsAdapterHandler;
2974
+ const farmDocsConfigModule = farmDocsAdapterHandler ? getFarmDocsAdapterConfigModule(farmConfig.docs) : void 0;
2975
+ if (farmDocsConfigModule) {
2976
+ const configFile = toPosixPath(path6.resolve(farmConfig.root, farmDocsConfigModule));
2977
+ refreshFarmDocsConfig = (file) => {
2978
+ if (invalidateFarmDevDependents(server, file, /* @__PURE__ */ new Set([configFile])).length === 0) {
2979
+ return false;
2946
2980
  }
2947
- return loadFarmDevModule(server, resolved?.id ?? specifier);
2948
- },
2949
- registerMCPServer: (mcpServer) => {
2950
- const dispose = registerFarmMCPServer(mcpServer);
2951
- docsMCPServerDisposers.add(dispose);
2952
- return () => {
2953
- docsMCPServerDisposers.delete(dispose);
2954
- dispose();
2955
- };
2956
- },
2957
- isPathGuarded: isFarmDocsPathGuarded
2958
- }) : farmDocsDevRuntime.createFarmDocsHandler(farmConfig.docs, {
2981
+ releaseDocsMCPServers();
2982
+ farmDocsAdapterHandler = createFarmDocsAdapterHandler();
2983
+ farmDocsAdapterHandler.catch(() => {
2984
+ });
2985
+ return true;
2986
+ };
2987
+ }
2988
+ const farmDocsHandler = farmDocsDevRuntime ? farmDocsAdapterHandler ? (request) => farmDocsAdapterHandler.then((handle) => handle(request)) : farmDocsDevRuntime.createFarmDocsHandler(farmConfig.docs, {
2959
2989
  root: farmConfig.root,
2960
2990
  srcDir: farmConfig.srcDir,
2961
2991
  clientEntry: "/@farm/client.js",
@@ -5516,6 +5546,11 @@ if (import.meta.hot) {
5516
5546
  if (apiRouteManager && invalidateFarmDevDependents(server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5517
5547
  await refreshRouteDiscovery?.(`updated ${file}`);
5518
5548
  }
5549
+ if (refreshFarmDocsConfig?.(file)) {
5550
+ logUpdate("PAGE", `updated ${path6.basename(file)}`);
5551
+ reloadAfterEdit();
5552
+ return [];
5553
+ }
5519
5554
  const isolatedHydrationMode = currentFarmConfig?.experimental?.isolatedClientHydration;
5520
5555
  const planRouteManager = farmApp?.getRouteManager();
5521
5556
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
@@ -5617,10 +5652,11 @@ if (import.meta.hot) {
5617
5652
  return modules;
5618
5653
  }
5619
5654
  };
5620
- if (!deferredSetup) return plugin;
5621
5655
  const setUpDevServer = plugin.configureServer;
5656
+ plugin.configureServer = { order: "post", handler: setUpDevServer };
5657
+ if (!deferredSetup) return plugin;
5622
5658
  let deferred = false;
5623
- plugin.configureServer = function(viteServer) {
5659
+ const setUpDeferredDevServer = function(viteServer) {
5624
5660
  if (deferred) {
5625
5661
  deferredGates = void 0;
5626
5662
  return setUpDevServer.call(this, viteServer);
@@ -5650,6 +5686,7 @@ if (import.meta.hot) {
5650
5686
  viteServer.middlewares.use(post);
5651
5687
  };
5652
5688
  };
5689
+ plugin.configureServer = { order: "post", handler: setUpDeferredDevServer };
5653
5690
  return plugin;
5654
5691
  }
5655
5692
  function runFarmMiddlewareWithNavigation(renderer, middlewareRequest, req, res, execute) {
@@ -9,10 +9,10 @@ import {
9
9
  } from "./chunk-IYEY3JWJ.mjs";
10
10
  import {
11
11
  APIRouteConflictError
12
- } from "./chunk-CPL7WIMP.mjs";
12
+ } from "./chunk-P3UT3OLV.mjs";
13
13
  import {
14
14
  findProgrammaticRouteFilesInDir
15
- } from "./chunk-LQZXCSYG.mjs";
15
+ } from "./chunk-B6K2ZM3C.mjs";
16
16
  import {
17
17
  hasPolyroutePlugin,
18
18
  isFarmAPIRouteFileName
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-KWI3SQFX.mjs";
31
31
  import {
32
32
  isProgrammaticRoutesFileName
33
- } from "./chunk-DZXD6CYJ.mjs";
33
+ } from "./chunk-V2RXBDV6.mjs";
34
34
  import {
35
35
  createCliColors
36
36
  } from "./chunk-IGL6CO6M.mjs";
@@ -339,6 +339,9 @@ var PROGRAMMATIC_ROUTE_FILE_NAMES = [
339
339
  "routes.js",
340
340
  "routes.jsx"
341
341
  ];
342
+ function isTestSourceFile(file) {
343
+ return /(?:^|[\\/])__tests__[\\/]|\.(?:test|spec)\.[^./\\]+$/.test(file);
344
+ }
342
345
  function getProgrammaticRouteSearchClientOptions(search) {
343
346
  if (!search || "parse" in search) return void 0;
344
347
  const options = {};
@@ -435,6 +438,7 @@ function getProgrammaticRouteDefinitionSource(route) {
435
438
  export {
436
439
  extractProgrammaticPageCallPathLiterals,
437
440
  PROGRAMMATIC_ROUTE_FILE_NAMES,
441
+ isTestSourceFile,
438
442
  getProgrammaticRouteSearchClientOptions,
439
443
  isProgrammaticRoutesFileName,
440
444
  createProgrammaticRouteModuleId,
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-D2VAANBS.mjs";
19
19
  import {
20
20
  FARM_VERSION
21
- } from "./chunk-6VMBLDWY.mjs";
21
+ } from "./chunk-CV7C75LN.mjs";
22
22
 
23
23
  // src/mobile/analyzer.ts
24
24
  import { createHash } from "crypto";
@@ -3,7 +3,7 @@
3
3
  var _chunk6K7LEL2Tcjs = require('./chunk-6K7LEL2T.cjs');
4
4
 
5
5
 
6
- var _chunkPRKFECGTcjs = require('./chunk-PRKFECGT.cjs');
6
+ var _chunkDZWX7FDXcjs = require('./chunk-DZWX7FDX.cjs');
7
7
 
8
8
 
9
9
 
@@ -28,7 +28,7 @@ var _chunk5P3TZGS3cjs = require('./chunk-5P3TZGS3.cjs');
28
28
  var _chunkSGBEJBBBcjs = require('./chunk-SGBEJBBB.cjs');
29
29
 
30
30
 
31
- var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
31
+ var _chunkLH7S7FI3cjs = require('./chunk-LH7S7FI3.cjs');
32
32
 
33
33
 
34
34
 
@@ -247,7 +247,7 @@ var APIRouteManager = class _APIRouteManager {
247
247
  async loadProgrammaticApiRoutes(appDir) {
248
248
  const candidateRoots = [path.dirname(appDir), appDir];
249
249
  const routeFiles = Array.from(
250
- new Set(candidateRoots.flatMap((srcRoot) => _chunkPRKFECGTcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot)))
250
+ new Set(candidateRoots.flatMap((srcRoot) => _chunkDZWX7FDXcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot)))
251
251
  );
252
252
  if (routeFiles.length === 0) return;
253
253
  const { getProgrammaticRouteManifest } = await import("./routes.cjs");
@@ -335,7 +335,7 @@ var APIRouteManager = class _APIRouteManager {
335
335
  this.endpointSources.set(routePath, /* @__PURE__ */ new Map([[normalizedMethod, { appDir, filePath }]]));
336
336
  }
337
337
  addProgrammaticApiRoute(filePath, route, appDir) {
338
- const modulePath = _chunkPYPHM7AScjs.createProgrammaticRouteModuleId.call(void 0, filePath, "api", route.path);
338
+ const modulePath = _chunkLH7S7FI3cjs.createProgrammaticRouteModuleId.call(void 0, filePath, "api", route.path);
339
339
  const runtimeConfig = _chunkGUDYDNKUcjs.normalizeFarmRouteRuntimeConfig.call(void 0, route, `API route "${route.path}"`);
340
340
  for (const [method, endpoint] of Object.entries(route.methods)) {
341
341
  if (endpoint) {
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkJM5VSEYCcjs = require('./chunk-JM5VSEYC.cjs');
4
+ var _chunkKHTDVXXRcjs = require('./chunk-KHTDVXXR.cjs');
5
5
 
6
6
 
7
7
  var _chunk7O3YJ6NPcjs = require('./chunk-7O3YJ6NP.cjs');
@@ -68,7 +68,7 @@ function findFarmNativeScreenFiles(appDirs) {
68
68
  }
69
69
  function collectFarmNativeServerFns(options) {
70
70
  const { root, srcDir } = options;
71
- const aliases = _chunkJM5VSEYCcjs.readAliases.call(void 0, root, srcDir);
71
+ const aliases = _chunkKHTDVXXRcjs.readAliases.call(void 0, root, srcDir);
72
72
  const seen = /* @__PURE__ */ new Set();
73
73
  const found = /* @__PURE__ */ new Map();
74
74
  const queue = [...options.entries];
@@ -102,7 +102,7 @@ function collectFarmNativeServerFns(options) {
102
102
  }
103
103
  }
104
104
  for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
105
- const resolved = _chunkJM5VSEYCcjs.resolveFile.call(void 0, candidate);
105
+ const resolved = _chunkKHTDVXXRcjs.resolveFile.call(void 0, candidate);
106
106
  if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
107
107
  queue.push(resolved);
108
108
  break;
@@ -9,10 +9,10 @@ import {
9
9
  collectSSGPages,
10
10
  matchSSGPage,
11
11
  resolveRouteRenderingConfigFromFile
12
- } from "./chunk-CZMMU3FP.mjs";
12
+ } from "./chunk-D4DAL7KK.mjs";
13
13
  import {
14
14
  resolveFarmRendererRoutes
15
- } from "./chunk-PZ5ZJAAO.mjs";
15
+ } from "./chunk-POCWXRXW.mjs";
16
16
  import {
17
17
  findFarmAppPackageDir
18
18
  } from "./chunk-KQXYBJES.mjs";
@@ -59,7 +59,7 @@ import {
59
59
  } from "./chunk-LP6DIYGA.mjs";
60
60
  import {
61
61
  listFarmMCPLlmsTxtLinks
62
- } from "./chunk-IEXZMDF4.mjs";
62
+ } from "./chunk-BCIUG6EQ.mjs";
63
63
  import {
64
64
  FARM_DEFAULT_MCP_PATH,
65
65
  collectFarmDefaultMCPPages,
@@ -108,7 +108,7 @@ import {
108
108
  usesFarmServerTree,
109
109
  withFarmSourceSnapshot,
110
110
  withFarmSourceSnapshotAside
111
- } from "./chunk-ZVT2F3JU.mjs";
111
+ } from "./chunk-DR65XXXD.mjs";
112
112
  import {
113
113
  _setDefaultFarmThemeConfig,
114
114
  getTheme
@@ -234,7 +234,7 @@ import {
234
234
  import {
235
235
  findProgrammaticRouteFiles,
236
236
  loadProgrammaticRouteManifests
237
- } from "./chunk-LQZXCSYG.mjs";
237
+ } from "./chunk-B6K2ZM3C.mjs";
238
238
  import {
239
239
  _runWithFarmI18nRequest,
240
240
  _setDefaultFarmI18nRuntime,
@@ -251,7 +251,7 @@ import {
251
251
  normalizeProgrammaticRoutePath,
252
252
  parseProgrammaticRoutePath,
253
253
  trackProgrammaticRouteSources
254
- } from "./chunk-DZXD6CYJ.mjs";
254
+ } from "./chunk-V2RXBDV6.mjs";
255
255
  import {
256
256
  getFarmRouteRuntimeConfig,
257
257
  mergeFarmRouteRuntimeConfigs,
@@ -312,7 +312,7 @@ import {
312
312
  } from "./chunk-EILUVBKS.mjs";
313
313
  import {
314
314
  FARM_VERSION
315
- } from "./chunk-6VMBLDWY.mjs";
315
+ } from "./chunk-CV7C75LN.mjs";
316
316
  import {
317
317
  normalizeFarmAPIConfig
318
318
  } from "./chunk-W6QLRQ3V.mjs";
@@ -1826,16 +1826,18 @@ var RouteManager = class _RouteManager {
1826
1826
  return null;
1827
1827
  }
1828
1828
  findMatchingRouteSlots(pathname, pathnameParts, interceptFrom) {
1829
+ const normalizedFrom = interceptFrom ? this.toRoutePathname(new URL(interceptFrom, "http://farm.local").pathname) : void 0;
1830
+ const normalizedFromParts = normalizedFrom ? splitRoutePath(normalizedFrom) : void 0;
1829
1831
  const groups = /* @__PURE__ */ new Map();
1830
1832
  for (const entry of this.routeSlots.values()) {
1831
- if (!this.matchesRoutePrefix(pathname, entry.ownerPattern, pathnameParts)) continue;
1833
+ if (!this.matchesRoutePrefix(pathname, entry.ownerPattern, pathnameParts) && !(entry.interception && normalizedFrom !== void 0 && this.matchesRoutePrefix(normalizedFrom, entry.ownerPattern, normalizedFromParts))) {
1834
+ continue;
1835
+ }
1832
1836
  const key = `${entry.ownerPattern}:${entry.name}`;
1833
1837
  const entries = groups.get(key) ?? [];
1834
1838
  entries.push(entry);
1835
1839
  groups.set(key, entries);
1836
1840
  }
1837
- const normalizedFrom = interceptFrom ? this.toRoutePathname(new URL(interceptFrom, "http://farm.local").pathname) : void 0;
1838
- const normalizedFromParts = normalizedFrom ? splitRoutePath(normalizedFrom) : void 0;
1839
1841
  const matches = [];
1840
1842
  for (const entries of groups.values()) {
1841
1843
  const candidates = entries.filter((entry) => !entry.fallback).filter(
@@ -1939,7 +1941,7 @@ var RouteManager = class _RouteManager {
1939
1941
  * Returns all pages marked with `export const ssg = true` along with
1940
1942
  * their pre-computed paths (for dynamic routes using getStaticPaths)
1941
1943
  */
1942
- async collectSSGPages() {
1944
+ async collectSSGPages(options = {}) {
1943
1945
  const routes = Array.from(this.routes.values()).map((entry) => ({
1944
1946
  path: entry.pattern,
1945
1947
  filePath: entry.modulePath,
@@ -1950,7 +1952,10 @@ var RouteManager = class _RouteManager {
1950
1952
  const docsAdapterRoutes = this.getDocsAdapterRoutes();
1951
1953
  const result = await collectSSGPages(routes, (filePath) => this.loadRouteModule(filePath), {
1952
1954
  suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
1953
- ...docsAdapterRoutes ? { docsAdapterRoutes } : {}
1955
+ ...docsAdapterRoutes ? { docsAdapterRoutes } : {},
1956
+ // A localized URL's render depends on the locale the request resolves, so i18n apps keep
1957
+ // every page that asks for nothing on the server.
1958
+ ...options.staticCandidates && !i18n ? { staticCandidates: true } : {}
1954
1959
  });
1955
1960
  if (!i18n) {
1956
1961
  return result;
@@ -1,5 +1,5 @@
1
1
  import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
2
- import { a$ as FarmIsolatedClientHydrationMode } from './client-plugins.d-CqTr5IrQ.js';
2
+ import { a$ as FarmIsolatedClientHydrationMode } from './client-plugins.d-Dp89a9Gf.js';
3
3
 
4
4
  /**
5
5
  * The browser copy of a programmatic page or layout imports only the module that defines its
@@ -1,5 +1,5 @@
1
1
  import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
2
- import { a$ as FarmIsolatedClientHydrationMode } from './client-plugins.d-DnnAopKG.mjs';
2
+ import { a$ as FarmIsolatedClientHydrationMode } from './client-plugins.d-CqFAvu-W.mjs';
3
3
 
4
4
  /**
5
5
  * The browser copy of a programmatic page or layout imports only the module that defines its