@farm.js/core 0.2.1 → 0.2.3

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 (210) hide show
  1. package/dist/{agent-mcp.d--uQgDp_Q.d.ts → agent-mcp.d-DuZjglYX.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DpthRhqr.d.mts → agent-mcp.d-gI3ahrF6.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +1 -1
  4. package/dist/agent-runtime.d.ts +1 -1
  5. package/dist/analyzer-5RSMYPWD.cjs +17 -0
  6. package/dist/{analyzer-GLFRODYV.mjs → analyzer-7TNBOI3J.mjs} +2 -2
  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-DMgcFuXQ.d.ts → app-manifest.d-B3h89j6a.d.ts} +1 -1
  20. package/dist/{app-manifest.d-DXAvPjMw.d.mts → app-manifest.d-bHK9EGPI.d.mts} +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-htfGqq-d.d.ts → app.d-C3uyET_L.d.ts} +4 -4
  24. package/dist/{app.d-DG_-nN5y.d.mts → app.d-Cr7fXGvJ.d.mts} +4 -4
  25. package/dist/{chunk-BOHBFBRA.mjs → chunk-2FKGY2ZS.mjs} +1 -1
  26. package/dist/{chunk-YOVSWY2E.mjs → chunk-2XDRRAAD.mjs} +1 -1
  27. package/dist/{chunk-QJKGRUBR.mjs → chunk-4WCEWA22.mjs} +4 -4
  28. package/dist/{chunk-YQXLBYY2.cjs → chunk-5B2Y4EVS.cjs} +32 -8
  29. package/dist/{chunk-QCVP22KW.cjs → chunk-5RYBQKBY.cjs} +3 -3
  30. package/dist/{chunk-PGU4SCIU.cjs → chunk-6QWBZGGP.cjs} +132 -132
  31. package/dist/{chunk-DVL3UVYT.mjs → chunk-6XABTMXR.mjs} +2 -2
  32. package/dist/{chunk-D5GFVHBV.mjs → chunk-6YOMQ4GX.mjs} +9 -9
  33. package/dist/chunk-7QGA6UX6.cjs +26 -0
  34. package/dist/{chunk-JJ22OI7J.cjs → chunk-A4WDDASS.cjs} +2 -2
  35. package/dist/{chunk-V36K4TSU.mjs → chunk-ADKPJZPP.mjs} +1 -1
  36. package/dist/{chunk-LQZXCSYG.mjs → chunk-B6K2ZM3C.mjs} +5 -3
  37. package/dist/{chunk-JZAGIXMB.cjs → chunk-C2J5LMH6.cjs} +1 -1
  38. package/dist/{chunk-SIJ3DREB.mjs → chunk-CIRC2LRP.mjs} +1 -1
  39. package/dist/{chunk-Q4FHYBFT.cjs → chunk-CSCORWIQ.cjs} +11 -11
  40. package/dist/{chunk-RCJAOQWW.mjs → chunk-CTHQE7DO.mjs} +1 -1
  41. package/dist/{chunk-PRKFECGT.cjs → chunk-DZWX7FDX.cjs} +6 -4
  42. package/dist/{chunk-OKZHPPBX.mjs → chunk-ERY4VYUH.mjs} +1 -1
  43. package/dist/{chunk-GEZ76JXD.cjs → chunk-F6JSVP5C.cjs} +3 -3
  44. package/dist/chunk-G7LNCHTS.mjs +21 -0
  45. package/dist/{chunk-D2OU4CX2.cjs → chunk-GWFNJLDN.cjs} +11 -11
  46. package/dist/{chunk-V6ACETKR.cjs → chunk-H7DAFRYR.cjs} +4 -4
  47. package/dist/{chunk-TI4BJFYX.mjs → chunk-HOBCEE5J.mjs} +12 -12
  48. package/dist/{chunk-XYCB3CXM.mjs → chunk-IPKL7L6B.mjs} +2 -2
  49. package/dist/{chunk-P2THJDLH.mjs → chunk-IQQ3SWH6.mjs} +86 -51
  50. package/dist/{chunk-HENYWY5J.cjs → chunk-JJUHUPRB.cjs} +2 -2
  51. package/dist/{chunk-XSE4XJKY.cjs → chunk-K7RXZ77U.cjs} +2 -2
  52. package/dist/{chunk-HBZQIRRM.mjs → chunk-KJMRW3IP.mjs} +1 -1
  53. package/dist/{chunk-PYPHM7AS.cjs → chunk-LH7S7FI3.cjs} +5 -1
  54. package/dist/{chunk-WXPY5FRF.cjs → chunk-P2PF5FUW.cjs} +2 -2
  55. package/dist/{chunk-CPL7WIMP.mjs → chunk-P3UT3OLV.mjs} +2 -2
  56. package/dist/{chunk-PZ5ZJAAO.mjs → chunk-POCWXRXW.mjs} +1 -1
  57. package/dist/{chunk-Z23OCU33.cjs → chunk-RF3VCNV7.cjs} +6 -6
  58. package/dist/{chunk-CZMMU3FP.mjs → chunk-RS4QZOFK.mjs} +1 -1
  59. package/dist/{chunk-MR64FNW6.cjs → chunk-SO4USIKL.cjs} +4 -4
  60. package/dist/{chunk-PVB5UYJT.cjs → chunk-TAXZQNFZ.cjs} +74 -74
  61. package/dist/{chunk-MYJPW4XN.mjs → chunk-UKGAP2OK.mjs} +3 -3
  62. package/dist/{chunk-DZXD6CYJ.mjs → chunk-V2RXBDV6.mjs} +4 -0
  63. package/dist/{chunk-L2KGQXFU.mjs → chunk-VZRY3CL5.mjs} +1 -1
  64. package/dist/{chunk-LO5BNR6Y.mjs → chunk-W5T3ZAFU.mjs} +25 -1
  65. package/dist/{chunk-ADCVSTFV.cjs → chunk-WAQIO2VD.cjs} +2 -2
  66. package/dist/{chunk-QI3UYN3P.cjs → chunk-WFL7CD5C.cjs} +12 -12
  67. package/dist/{chunk-E7ISZK3R.mjs → chunk-XGBDRC5B.mjs} +2 -2
  68. package/dist/{chunk-W34OS5CK.cjs → chunk-XLJ2REOI.cjs} +370 -335
  69. package/dist/{chunk-D2VLHRBN.cjs → chunk-Y3MTKPLN.cjs} +4 -4
  70. package/dist/{chunk-GL4SPJTE.cjs → chunk-YPPAYYSX.cjs} +4 -4
  71. package/dist/{client-component.d-DDbDw2yP.d.ts → client-component.d-BavTzqsn.d.ts} +1 -1
  72. package/dist/{client-component.d-D5JVDeQf.d.mts → client-component.d-X3j9FOZ2.d.mts} +1 -1
  73. package/dist/{client-plugins.d-BHqfH3DQ.d.ts → client-plugins.d-CqTr5IrQ.d.ts} +61 -1
  74. package/dist/{client-plugins.d-9jr2yWR3.d.mts → client-plugins.d-DnnAopKG.d.mts} +61 -1
  75. package/dist/client-plugins.d.mts +1 -1
  76. package/dist/client-plugins.d.ts +1 -1
  77. package/dist/client.d.mts +7 -7
  78. package/dist/client.d.ts +7 -7
  79. package/dist/config.d.mts +1 -1
  80. package/dist/config.d.ts +1 -1
  81. package/dist/desktop.cjs +5 -1
  82. package/dist/desktop.d.mts +8 -4
  83. package/dist/desktop.d.ts +8 -4
  84. package/dist/desktop.mjs +4 -0
  85. package/dist/{dev-guard-M3ZCDWCK.cjs → dev-guard-5NUIX6IZ.cjs} +4 -3
  86. package/dist/{dev-guard-TFVWJNIB.mjs → dev-guard-L42ZZRCZ.mjs} +2 -1
  87. package/dist/{devtools-ZDBCJI44.mjs → devtools-VPFBH6I2.mjs} +1 -1
  88. package/dist/{devtools-F6Z436WU.cjs → devtools-YTND2OWT.cjs} +2 -2
  89. package/dist/docs.cjs +3 -3
  90. package/dist/docs.d.mts +3 -3
  91. package/dist/docs.d.ts +3 -3
  92. package/dist/docs.mjs +2 -2
  93. package/dist/environment/vite.cjs +4 -4
  94. package/dist/environment/vite.mjs +3 -3
  95. package/dist/{handler.d-EtTSPkeO.d.mts → handler.d-BSlpYCDB.d.mts} +1 -1
  96. package/dist/{handler.d-Dq_bSEKC.d.ts → handler.d-DgX7gPO6.d.ts} +1 -1
  97. package/dist/{headers.d-BKwGD_uC.d.mts → headers.d-Cf8l5LMo.d.mts} +1 -1
  98. package/dist/{headers.d-CpIHLCEk.d.ts → headers.d-CmxW42R2.d.ts} +1 -1
  99. package/dist/index.cjs +22 -21
  100. package/dist/{index.d-DXtaU9OU.d.mts → index.d-7xoJqKRZ.d.mts} +1 -1
  101. package/dist/{index.d-CoRZKiHA.d.ts → index.d-BZZt7kxO.d.ts} +1 -1
  102. package/dist/index.d.mts +22 -22
  103. package/dist/index.d.ts +22 -22
  104. package/dist/index.mjs +21 -20
  105. package/dist/integrations/orm.d.mts +1 -1
  106. package/dist/integrations/orm.d.ts +1 -1
  107. package/dist/integrations.d.mts +1 -1
  108. package/dist/integrations.d.ts +1 -1
  109. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  110. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  111. package/dist/internal/build-runtime.cjs +22 -21
  112. package/dist/internal/build-runtime.d.mts +4 -4
  113. package/dist/internal/build-runtime.d.ts +4 -4
  114. package/dist/internal/build-runtime.mjs +21 -20
  115. package/dist/internal/cli-runtime.cjs +7 -7
  116. package/dist/internal/cli-runtime.d.mts +7 -7
  117. package/dist/internal/cli-runtime.d.ts +7 -7
  118. package/dist/internal/cli-runtime.mjs +6 -6
  119. package/dist/internal/client-error-overlay.cjs +4 -4
  120. package/dist/internal/client-error-overlay.mjs +1 -1
  121. package/dist/internal/client-runtime.d.mts +5 -5
  122. package/dist/internal/client-runtime.d.ts +5 -5
  123. package/dist/internal/compression-runtime.d.mts +1 -1
  124. package/dist/internal/compression-runtime.d.ts +1 -1
  125. package/dist/internal/config-runtime.cjs +5 -4
  126. package/dist/internal/config-runtime.d.mts +3 -3
  127. package/dist/internal/config-runtime.d.ts +3 -3
  128. package/dist/internal/config-runtime.mjs +4 -3
  129. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  130. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  131. package/dist/internal/native-server-fns.cjs +4 -4
  132. package/dist/internal/native-server-fns.mjs +3 -3
  133. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  134. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  135. package/dist/internal/production-runtime.cjs +4 -4
  136. package/dist/internal/production-runtime.d.mts +10 -10
  137. package/dist/internal/production-runtime.d.ts +10 -10
  138. package/dist/internal/production-runtime.mjs +3 -3
  139. package/dist/internal/spa-router.d.mts +3 -3
  140. package/dist/internal/spa-router.d.ts +3 -3
  141. package/dist/internal/start-manifest.d.mts +1 -1
  142. package/dist/internal/start-manifest.d.ts +1 -1
  143. package/dist/markdown.d.mts +1 -1
  144. package/dist/markdown.d.ts +1 -1
  145. package/dist/middleware.d.mts +1 -1
  146. package/dist/middleware.d.ts +1 -1
  147. package/dist/{mount.d-BzK2Z1pR.d.ts → mount.d-CD-xVBu7.d.ts} +1 -1
  148. package/dist/{mount.d-D-ynBlxU.d.mts → mount.d-Dd0xeRMl.d.mts} +1 -1
  149. package/dist/{navigation-delegate.d-DtsnFnNF.d.ts → navigation-delegate.d-Bses_F-y.d.ts} +1 -1
  150. package/dist/{navigation-delegate.d-aJh3ZmTY.d.mts → navigation-delegate.d-dBNg976E.d.mts} +1 -1
  151. package/dist/navigation.d.mts +4 -4
  152. package/dist/navigation.d.ts +4 -4
  153. package/dist/plugin.cjs +17 -16
  154. package/dist/plugin.d.mts +5 -5
  155. package/dist/plugin.d.ts +5 -5
  156. package/dist/plugin.mjs +16 -15
  157. package/dist/{render-plan.d-h8bkOQyh.d.ts → render-plan.d-DaIwnRK2.d.ts} +1 -1
  158. package/dist/{render-plan.d-C6nUIU2m.d.mts → render-plan.d-vOdZHHLI.d.mts} +1 -1
  159. package/dist/renderer-client.d.mts +5 -5
  160. package/dist/renderer-client.d.ts +5 -5
  161. package/dist/{request.d-CBEdJD5R.d.mts → request.d-B8U4pVFP.d.mts} +1 -1
  162. package/dist/{request.d-CrriEvxy.d.ts → request.d-CgXp3EEc.d.ts} +1 -1
  163. package/dist/request.d.mts +2 -2
  164. package/dist/request.d.ts +2 -2
  165. package/dist/{route-rendering.d-DgXpNk_c.d.mts → route-rendering.d-BQvNYQqu.d.mts} +1 -1
  166. package/dist/{route-rendering.d-C-ivf31T.d.ts → route-rendering.d-Di0AxFix.d.ts} +1 -1
  167. package/dist/{router.d-BRRPd5dE.d.ts → router.d-BJVGhSAJ.d.ts} +1 -1
  168. package/dist/{router.d-O5LrW9mZ.d.mts → router.d-hNedVdoB.d.mts} +1 -1
  169. package/dist/routes.cjs +3 -3
  170. package/dist/routes.d.mts +1 -1
  171. package/dist/routes.d.ts +1 -1
  172. package/dist/routes.mjs +2 -2
  173. package/dist/{rsc-pipeline-HYINQPMW.mjs → rsc-pipeline-2JSNRVIL.mjs} +6 -5
  174. package/dist/{rsc-pipeline-2DNM7UDA.cjs → rsc-pipeline-WTKDMTE2.cjs} +7 -6
  175. package/dist/{runtime-M6GLD4CR.cjs → runtime-I4GV4CDP.cjs} +8 -8
  176. package/dist/{runtime-JP7L5KI7.mjs → runtime-RNSTQY27.mjs} +5 -5
  177. package/dist/{runtime.d-DW_1avVi.d.ts → runtime.d-0R8nHCM6.d.ts} +1 -1
  178. package/dist/{runtime.d-DP8Sk9PM.d.mts → runtime.d-DpeuF_T-.d.mts} +1 -1
  179. package/dist/{schema-dependencies.d-Cedd7QUf.d.mts → schema-dependencies.d-_Wyey4Wv.d.mts} +1 -1
  180. package/dist/{schema-dependencies.d-C__RyTvW.d.ts → schema-dependencies.d-tkUHREqz.d.ts} +1 -1
  181. package/dist/{server-components-status.d-CdsEQbeM.d.ts → server-components-status.d-B2Z5WvO5.d.ts} +1 -1
  182. package/dist/{server-components-status.d-DN98yOT4.d.mts → server-components-status.d-sN7ju-ie.d.mts} +1 -1
  183. package/dist/server-plugins.d.mts +3 -3
  184. package/dist/server-plugins.d.ts +3 -3
  185. package/dist/server.cjs +42 -41
  186. package/dist/server.d.mts +11 -11
  187. package/dist/server.d.ts +11 -11
  188. package/dist/server.mjs +18 -17
  189. package/dist/{spa-router.d-FcDbBCrK.d.mts → spa-router.d-D3AtR2Bc.d.mts} +2 -2
  190. package/dist/{spa-router.d-BJWZAdrV.d.ts → spa-router.d-MjT6sGb9.d.ts} +2 -2
  191. package/dist/{ssg.d--uut8Gya.d.mts → ssg.d-B32Cp_XW.d.mts} +2 -2
  192. package/dist/{ssg.d-Cf9mC1rZ.d.ts → ssg.d-C1SNuPz5.d.ts} +2 -2
  193. package/dist/{store-core.d-h7o6V2kH.d.ts → store-core.d-BZ3YXs70.d.ts} +2 -2
  194. package/dist/{store-core.d-DgYlAo-e.d.mts → store-core.d-BbVdaoA0.d.mts} +2 -2
  195. package/dist/testing.cjs +5 -5
  196. package/dist/testing.d.mts +1 -1
  197. package/dist/testing.d.ts +1 -1
  198. package/dist/testing.mjs +4 -4
  199. package/dist/{utils.d-2lGEnyBc.d.ts → utils.d-Bjbm44fP.d.ts} +1 -1
  200. package/dist/{utils.d-DjFApBfE.d.mts → utils.d-CoLozp7-.d.mts} +1 -1
  201. package/dist/version.cjs +2 -2
  202. package/dist/version.mjs +1 -1
  203. package/dist/vite.cjs +17 -16
  204. package/dist/vite.d.mts +6 -6
  205. package/dist/vite.d.ts +6 -6
  206. package/dist/vite.mjs +16 -15
  207. package/package.json +1 -1
  208. package/dist/analyzer-KBVOHASA.cjs +0 -17
  209. /package/dist/{chunk-EIAA4W3M.cjs → chunk-2LGM5WIK.cjs} +0 -0
  210. /package/dist/{chunk-H6MYRZ2U.mjs → chunk-MVNIAD6O.mjs} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkQCVP22KWcjs = require('./chunk-QCVP22KW.cjs');
5
+ var _chunk5RYBQKBYcjs = require('./chunk-5RYBQKBY.cjs');
6
6
 
7
7
 
8
8
 
@@ -44,25 +44,25 @@ var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
44
44
 
45
45
 
46
46
 
47
- var _chunkPVB5UYJTcjs = require('./chunk-PVB5UYJT.cjs');
47
+ var _chunkTAXZQNFZcjs = require('./chunk-TAXZQNFZ.cjs');
48
48
 
49
49
 
50
50
 
51
51
 
52
- var _chunkADCVSTFVcjs = require('./chunk-ADCVSTFV.cjs');
52
+ var _chunkWAQIO2VDcjs = require('./chunk-WAQIO2VD.cjs');
53
53
 
54
54
 
55
55
  var _chunkIGA3OTFYcjs = require('./chunk-IGA3OTFY.cjs');
56
56
 
57
57
 
58
- var _chunkYQXLBYY2cjs = require('./chunk-YQXLBYY2.cjs');
58
+ var _chunk5B2Y4EVScjs = require('./chunk-5B2Y4EVS.cjs');
59
59
 
60
60
 
61
61
 
62
- var _chunkGL4SPJTEcjs = require('./chunk-GL4SPJTE.cjs');
62
+ var _chunkYPPAYYSXcjs = require('./chunk-YPPAYYSX.cjs');
63
63
 
64
64
 
65
- var _chunkV6ACETKRcjs = require('./chunk-V6ACETKR.cjs');
65
+ var _chunkH7DAFRYRcjs = require('./chunk-H7DAFRYR.cjs');
66
66
 
67
67
 
68
68
 
@@ -89,13 +89,13 @@ var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
89
89
 
90
90
 
91
91
 
92
- var _chunkMR64FNW6cjs = require('./chunk-MR64FNW6.cjs');
92
+ var _chunkSO4USIKLcjs = require('./chunk-SO4USIKL.cjs');
93
93
 
94
94
 
95
95
  var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
96
96
 
97
97
 
98
- var _chunkHENYWY5Jcjs = require('./chunk-HENYWY5J.cjs');
98
+ var _chunkJJUHUPRBcjs = require('./chunk-JJUHUPRB.cjs');
99
99
 
100
100
 
101
101
 
@@ -148,7 +148,7 @@ var _chunkSIQPXYBBcjs = require('./chunk-SIQPXYBB.cjs');
148
148
 
149
149
 
150
150
 
151
- var _chunkD2OU4CX2cjs = require('./chunk-D2OU4CX2.cjs');
151
+ var _chunkGWFNJLDNcjs = require('./chunk-GWFNJLDN.cjs');
152
152
 
153
153
 
154
154
 
@@ -253,7 +253,7 @@ var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
253
253
  var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
254
254
 
255
255
 
256
- var _chunkD2VLHRBNcjs = require('./chunk-D2VLHRBN.cjs');
256
+ var _chunkY3MTKPLNcjs = require('./chunk-Y3MTKPLN.cjs');
257
257
 
258
258
 
259
259
 
@@ -278,7 +278,8 @@ var _chunk3ACTVXZGcjs = require('./chunk-3ACTVXZG.cjs');
278
278
 
279
279
 
280
280
 
281
- var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
281
+
282
+ var _chunkLH7S7FI3cjs = require('./chunk-LH7S7FI3.cjs');
282
283
 
283
284
 
284
285
  var _chunkCH2JX3CMcjs = require('./chunk-CH2JX3CM.cjs');
@@ -321,7 +322,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
321
322
  var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
322
323
 
323
324
 
324
- var _chunkJZAGIXMBcjs = require('./chunk-JZAGIXMB.cjs');
325
+ var _chunkC2J5LMH6cjs = require('./chunk-C2J5LMH6.cjs');
325
326
 
326
327
 
327
328
  var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
@@ -738,7 +739,7 @@ function findClientServerFnViolation(code, id) {
738
739
  return null;
739
740
  }
740
741
  function createServerFnBoundaryDiagnostic(violation, id, location) {
741
- return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
742
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
742
743
  "CLIENT_SERVER_FUNCTION",
743
744
  id,
744
745
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -998,21 +999,21 @@ function readPropertyKey(property) {
998
999
  function createClientBoundaryDiagnostic(file, finding, location) {
999
1000
  switch (finding.kind) {
1000
1001
  case "server-env":
1001
- return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
1002
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1002
1003
  "CLIENT_SERVER_ENV",
1003
1004
  file,
1004
1005
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
1005
1006
  location
1006
1007
  );
1007
1008
  case "public-env":
1008
- return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
1009
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1009
1010
  "CLIENT_PROCESS_ENV_PUBLIC",
1010
1011
  file,
1011
1012
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
1012
1013
  location
1013
1014
  );
1014
1015
  case "builtin":
1015
- return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
1016
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1016
1017
  "CLIENT_NODE_BUILTIN",
1017
1018
  file,
1018
1019
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1319,7 +1320,7 @@ function loadFarmWorkflowsDevRuntime() {
1319
1320
  return import("./workflows.cjs");
1320
1321
  }
1321
1322
  function loadFarmDevtoolsSnapshotRuntime() {
1322
- return import("./devtools-F6Z436WU.cjs");
1323
+ return import("./devtools-YTND2OWT.cjs");
1323
1324
  }
1324
1325
  function loadFarmDevtoolsUIRuntime() {
1325
1326
  return import("./devtools-ui-TPBPQEEB.cjs");
@@ -1369,16 +1370,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1369
1370
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1370
1371
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1371
1372
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1372
- _chunkPVB5UYJTcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1373
- new RegExp(`^${_chunkD2OU4CX2cjs.FARM_RESOLVE_FROM_PREFIX}`),
1373
+ _chunkTAXZQNFZcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1374
+ new RegExp(`^${_chunkGWFNJLDNcjs.FARM_RESOLVE_FROM_PREFIX}`),
1374
1375
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1375
1376
  // included.
1376
1377
  /^node:/,
1377
- _chunkPVB5UYJTcjs.exactIdPattern.call(void 0, _module.builtinModules)
1378
+ _chunkTAXZQNFZcjs.exactIdPattern.call(void 0, _module.builtinModules)
1378
1379
  ];
1379
1380
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1380
- _chunkPVB5UYJTcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1381
- new RegExp(`^${_chunkD2OU4CX2cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1381
+ _chunkTAXZQNFZcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1382
+ new RegExp(`^${_chunkGWFNJLDNcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1382
1383
  ];
1383
1384
  function createFarmPlatformClientModule(platform) {
1384
1385
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1414,7 +1415,7 @@ function farmIslandContainersPlugin(config) {
1414
1415
  // without calling into JavaScript.
1415
1416
  filter: {
1416
1417
  id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
1417
- code: _chunkD2OU4CX2cjs.FARM_ISLAND_CONTAINER_TAG
1418
+ code: _chunkGWFNJLDNcjs.FARM_ISLAND_CONTAINER_TAG
1418
1419
  },
1419
1420
  handler(code, id) {
1420
1421
  if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "islands") {
@@ -1423,20 +1424,20 @@ function farmIslandContainersPlugin(config) {
1423
1424
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1424
1425
  return null;
1425
1426
  }
1426
- if (_chunkD2OU4CX2cjs.hasUseClientDirective.call(void 0, code)) return null;
1427
- if (!_chunkD2OU4CX2cjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
1427
+ if (_chunkGWFNJLDNcjs.hasUseClientDirective.call(void 0, code)) return null;
1428
+ if (!_chunkGWFNJLDNcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
1428
1429
  const file = id.split("?", 1)[0];
1429
- const inspect = () => _chunkD2OU4CX2cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1430
+ const inspect = () => _chunkGWFNJLDNcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1430
1431
  const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
1431
1432
  if (bindings.length === 0) return null;
1432
- const grown = _chunkD2OU4CX2cjs.wrapFarmIslandContainers.call(void 0, {
1433
+ const grown = _chunkGWFNJLDNcjs.wrapFarmIslandContainers.call(void 0, {
1433
1434
  code,
1434
1435
  file,
1435
1436
  bindings,
1436
- reference: _chunkD2OU4CX2cjs.farmIslandContainerReferencePath.call(void 0, root)
1437
+ reference: _chunkGWFNJLDNcjs.farmIslandContainerReferencePath.call(void 0, root)
1437
1438
  });
1438
1439
  if (grown === null) return null;
1439
- _chunkD2OU4CX2cjs.ensureFarmIslandContainerReference.call(void 0, root);
1440
+ _chunkGWFNJLDNcjs.ensureFarmIslandContainerReference.call(void 0, root);
1440
1441
  return { code: grown, map: null };
1441
1442
  }
1442
1443
  }
@@ -1451,18 +1452,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1451
1452
  config(config) {
1452
1453
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1453
1454
  if (options.distDir) {
1454
- _chunkD2OU4CX2cjs.usePackageScanCacheFile.call(void 0,
1455
+ _chunkGWFNJLDNcjs.usePackageScanCacheFile.call(void 0,
1455
1456
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1456
1457
  );
1457
1458
  }
1458
- const bundledPackages = _chunkD2OU4CX2cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1459
+ const bundledPackages = _chunkGWFNJLDNcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1459
1460
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1460
- _chunkD2OU4CX2cjs.persistPackageScanCache.call(void 0, );
1461
+ _chunkGWFNJLDNcjs.persistPackageScanCache.call(void 0, );
1461
1462
  return {
1462
1463
  optimizeDeps: {
1463
1464
  // A package that defines fonts is served unbundled, so Farm's font compiler sees it.
1464
1465
  exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
1465
- rolldownOptions: { plugins: [_chunkD2OU4CX2cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1466
+ rolldownOptions: { plugins: [_chunkGWFNJLDNcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1466
1467
  },
1467
1468
  ssr: {
1468
1469
  noExternal: [
@@ -1488,8 +1489,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1488
1489
  return FARM_SERVER_ONLY_PACKAGE_ID;
1489
1490
  }
1490
1491
  this.error(
1491
- _chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
1492
- _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
1492
+ _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
1493
+ _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1493
1494
  "CLIENT_SERVER_ONLY_IMPORT",
1494
1495
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1495
1496
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1499,9 +1500,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1499
1500
  );
1500
1501
  }
1501
1502
  if (!_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) && _module.isBuiltin.call(void 0, id)) {
1502
- return _chunkD2OU4CX2cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1503
+ return _chunkGWFNJLDNcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1503
1504
  }
1504
- const resolveFrom = importer ? _chunkD2OU4CX2cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1505
+ const resolveFrom = importer ? _chunkGWFNJLDNcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1505
1506
  if (resolveFrom) {
1506
1507
  const directory = path6.dirname(resolveFrom.importer);
1507
1508
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1518,8 +1519,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1518
1519
  const importedBy = importer ? ` (imported by ${importer})` : "";
1519
1520
  if (!_optionalChain([options2, 'optionalAccess', _78 => _78.ssr])) {
1520
1521
  this.error(
1521
- _chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
1522
- _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
1522
+ _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
1523
+ _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1523
1524
  "CLIENT_SERVER_ONLY_ENTRY",
1524
1525
  _nullishCoalesce(importer, () => ( id)),
1525
1526
  `${id} is server-only and cannot be imported into client code.`
@@ -1542,9 +1543,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1542
1543
  handler(id) {
1543
1544
  if (id === FARM_SERVER_ONLY_PACKAGE_ID) return "export {};";
1544
1545
  if (id === FARM_PLATFORM_CLIENT_ID) {
1545
- return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkYQXLBYY2cjs.resolveFarmPlatform.call(void 0, ))));
1546
+ return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunk5B2Y4EVScjs.resolveFarmPlatform.call(void 0, ))));
1546
1547
  }
1547
- return _nullishCoalesce(_chunkD2OU4CX2cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1548
+ return _nullishCoalesce(_chunkGWFNJLDNcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1548
1549
  }
1549
1550
  }
1550
1551
  };
@@ -1650,7 +1651,7 @@ function sendFarmDevRuntimeHookError(res, json) {
1650
1651
  res.end(json ? _chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1651
1652
  }
1652
1653
  function opensFarmDevRuntimeSession(pm) {
1653
- return pm.hasRuntimeRequestHooks() || _chunkADCVSTFVcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1654
+ return pm.hasRuntimeRequestHooks() || _chunkWAQIO2VDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1654
1655
  }
1655
1656
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1656
1657
  _chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -2050,14 +2051,14 @@ function isResolvedEnvScope(value) {
2050
2051
  function isPotentialProgrammaticRouteSourceFile(normalizedFile, srcDirSlug) {
2051
2052
  return normalizedFile.startsWith(`${srcDirSlug}/`) && /\.(ts|tsx|js|jsx)$/.test(normalizedFile) && // A declaration file, including TypeScript's `.d.<ext>.ts` form such as a
2052
2053
  // Polyroute `route.d.rs.ts`, has no runtime code to register a route.
2053
- !/\.d(\.[^./]+)?\.ts$/.test(normalizedFile) && !normalizedFile.endsWith("/farm-routes.d.ts") && !normalizedFile.endsWith("/farm-env.d.ts") && !normalizedFile.endsWith("/lib/api.generated.ts");
2054
+ !/\.d(\.[^./]+)?\.ts$/.test(normalizedFile) && !normalizedFile.endsWith("/farm-routes.d.ts") && !normalizedFile.endsWith("/farm-env.d.ts") && !normalizedFile.endsWith("/lib/api.generated.ts") && !_chunkLH7S7FI3cjs.isTestSourceFile.call(void 0, normalizedFile.slice(srcDirSlug.length));
2054
2055
  }
2055
2056
  function fileContainsProgrammaticPageRoute(file) {
2056
2057
  if (!fs2.existsSync(file)) {
2057
2058
  return false;
2058
2059
  }
2059
2060
  try {
2060
- return _chunkPYPHM7AScjs.scanProgrammaticPagePaths.call(void 0, fs2.readFileSync(file, "utf8")).length > 0;
2061
+ return _chunkLH7S7FI3cjs.scanProgrammaticPagePaths.call(void 0, fs2.readFileSync(file, "utf8")).length > 0;
2061
2062
  } catch (e15) {
2062
2063
  return false;
2063
2064
  }
@@ -2160,7 +2161,7 @@ function transformIsolatedClientBoundaryModule(options) {
2160
2161
  return null;
2161
2162
  }
2162
2163
  const body = Array.isArray(ast.body) ? ast.body : [];
2163
- const everyExportIsComponent = options.code.includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2164
+ const everyExportIsComponent = options.code.includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2164
2165
  const replacements = [];
2165
2166
  const wrapperStatements = [];
2166
2167
  const originalEntries = [];
@@ -2315,16 +2316,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2315
2316
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2316
2317
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2317
2318
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2318
- if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkD2OU4CX2cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2319
+ if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkGWFNJLDNcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2319
2320
  }
2320
2321
  findings.push(finding);
2321
2322
  }
2322
2323
  if (findings.length === 0) return;
2323
2324
  warnedClientBoundaryIds.add(id);
2324
- const locate = _chunkD2OU4CX2cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2325
+ const locate = _chunkGWFNJLDNcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2325
2326
  _chunk7ZDLE77Pcjs.logger.warn(
2326
2327
  findings.map(
2327
- (finding) => _chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
2328
+ (finding) => _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
2328
2329
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2329
2330
  config.root
2330
2331
  )
@@ -2366,6 +2367,11 @@ function toFarmRuntimeModuleId(specifier) {
2366
2367
  function getFarmCoreFile() {
2367
2368
  return typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0, _chunkUGL4BDNBcjs.define_import_meta_default.url);
2368
2369
  }
2370
+ var farmCoreModuleDirectory;
2371
+ function isFarmCoreModule(id) {
2372
+ _nullishCoalesce(farmCoreModuleDirectory, () => ( (farmCoreModuleDirectory = `${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.dirname(getFarmCoreFile()))}/`)));
2373
+ return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id.split("?", 1)[0]).startsWith(farmCoreModuleDirectory);
2374
+ }
2369
2375
  var FARM_SOURCE_ALIAS_PROBES = [
2370
2376
  "@/x",
2371
2377
  "@/index.ts",
@@ -2390,12 +2396,12 @@ function hasFarmSourceAliasOverride(alias) {
2390
2396
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2391
2397
  const rendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, options.renderer);
2392
2398
  const imageImports = farmImageImportsPlugin();
2393
- const fontImports = _chunkPVB5UYJTcjs.farmFontImportsPlugin.call(void 0, {
2399
+ const fontImports = _chunkTAXZQNFZcjs.farmFontImportsPlugin.call(void 0, {
2394
2400
  root: options.root,
2395
2401
  basePath: options.basePath,
2396
2402
  publicDir: options.publicDir,
2397
2403
  // A production build never starts the app, so it reads the directories from these options.
2398
- isLayoutModule: (id) => _chunkPVB5UYJTcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options))))
2404
+ isLayoutModule: (id) => _chunkTAXZQNFZcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options))))
2399
2405
  });
2400
2406
  let farmApp;
2401
2407
  const isFarmGeneratedOutput = (file) => {
@@ -2426,8 +2432,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2426
2432
  if (mdxComponents) files.add(mdxComponents);
2427
2433
  return files;
2428
2434
  };
2429
- const islxActionsMode = () => _chunkPVB5UYJTcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
2430
- const islandsServerFns = () => _chunkPVB5UYJTcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
2435
+ const islxActionsMode = () => _chunkTAXZQNFZcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
2436
+ const islandsServerFns = () => _chunkTAXZQNFZcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
2431
2437
  let reactRefreshActive = false;
2432
2438
  let server;
2433
2439
  let deferredGates;
@@ -2437,6 +2443,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2437
2443
  let openAPIManager = null;
2438
2444
  let middlewareManager;
2439
2445
  let refreshRouteDiscovery = null;
2446
+ let refreshFarmDocsConfig = null;
2440
2447
  const pendingRouteReloads = /* @__PURE__ */ new Set();
2441
2448
  let workflowHandler = null;
2442
2449
  let isBuild = false;
@@ -2457,7 +2464,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2457
2464
  console.log(log);
2458
2465
  };
2459
2466
  const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _121 => _121.getRouteManager, 'call', _122 => _122(), 'access', _123 => _123.getProgrammaticClientRoutes, 'call', _124 => _124()])));
2460
- const inBuildPackageCache = _chunkD2OU4CX2cjs.bindPackageClientBoundaryCache.call(void 0, );
2467
+ const inBuildPackageCache = _chunkGWFNJLDNcjs.bindPackageClientBoundaryCache.call(void 0, );
2461
2468
  const inspectPackages = (operation) => {
2462
2469
  const routeManager = _optionalChain([farmApp, 'optionalAccess', _125 => _125.getRouteManager, 'call', _126 => _126()]);
2463
2470
  return inBuildPackageCache(
@@ -2480,11 +2487,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2480
2487
  isBuild = configEnv.command === "build";
2481
2488
  const farmAliases = {
2482
2489
  ..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, options.layers),
2483
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} : _chunkPVB5UYJTcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2490
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} : _chunkTAXZQNFZcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2484
2491
  };
2485
2492
  if (Object.keys(farmAliases).length > 0) {
2486
2493
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2487
- userConfig.resolve.alias = _chunkPVB5UYJTcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2494
+ userConfig.resolve.alias = _chunkTAXZQNFZcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2488
2495
  }
2489
2496
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2490
2497
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.cors]) === void 0;
@@ -2524,7 +2531,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2524
2531
  serverFnTransformActive = config.plugins.some(
2525
2532
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2526
2533
  );
2527
- reactRefreshActive = _chunkQCVP22KWcjs.isFarmReactRefreshActive.call(void 0, config);
2534
+ reactRefreshActive = _chunk5RYBQKBYcjs.isFarmReactRefreshActive.call(void 0, config);
2528
2535
  if (_optionalChain([options, 'access', _141 => _141.experimental, 'optionalAccess', _142 => _142.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2529
2536
  _chunk7ZDLE77Pcjs.logger.warn(
2530
2537
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
@@ -2532,11 +2539,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2532
2539
  }
2533
2540
  },
2534
2541
  async configureServer(viteServer) {
2535
- viteServer.middlewares.use(
2536
- createFarmDevPreviewGuard(viteServer, {
2542
+ viteServer.middlewares.stack.unshift({
2543
+ route: "",
2544
+ handle: createFarmDevPreviewGuard(viteServer, {
2537
2545
  getSourceRoots: () => _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _143 => _143.getConfig, 'call', _144 => _144()]), () => ( options)))
2538
2546
  })
2539
- );
2547
+ });
2540
2548
  if (typeof fontImports.configureServer === "function") {
2541
2549
  await fontImports.configureServer.call(this, viteServer);
2542
2550
  }
@@ -2558,7 +2566,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2558
2566
  } catch (e21) {
2559
2567
  }
2560
2568
  };
2561
- farmApp = new (0, _chunkPVB5UYJTcjs.FarmApp)(
2569
+ farmApp = new (0, _chunkTAXZQNFZcjs.FarmApp)(
2562
2570
  {
2563
2571
  ...options,
2564
2572
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2566,7 +2574,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2566
2574
  server
2567
2575
  );
2568
2576
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2569
- _chunkD2OU4CX2cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2577
+ _chunkGWFNJLDNcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2570
2578
  farmApp.getConfig().root,
2571
2579
  options.distDir || ".farm"
2572
2580
  )
@@ -2577,7 +2585,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2577
2585
  let farmAppPackages;
2578
2586
  if (_optionalChain([farmConfig, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.noindexPreviews])) {
2579
2587
  farmMiddlewares.use((_req, res, next) => {
2580
- if (_chunkHENYWY5Jcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2588
+ if (_chunkJJUHUPRBcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2581
2589
  res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
2582
2590
  }
2583
2591
  next();
@@ -2585,7 +2593,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2585
2593
  }
2586
2594
  const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2587
2595
  const devBuiltInRoutePaths = new Set(
2588
- _chunkMR64FNW6cjs.listFarmBuiltInRoutePaths.call(void 0, {
2596
+ _chunkSO4USIKLcjs.listFarmBuiltInRoutePaths.call(void 0, {
2589
2597
  agent: {
2590
2598
  apiCatalog: true,
2591
2599
  mcp: true,
@@ -2636,7 +2644,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2636
2644
  const polyroute = _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
2637
2645
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2638
2646
  try {
2639
- const result = await _chunkGL4SPJTEcjs.generateFarmTypeArtifacts.call(void 0, {
2647
+ const result = await _chunkYPPAYYSXcjs.generateFarmTypeArtifacts.call(void 0, {
2640
2648
  root: farmConfig.root,
2641
2649
  srcDir: farmConfig.srcDir,
2642
2650
  layers: farmConfig.layers,
@@ -2701,7 +2709,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2701
2709
  };
2702
2710
  const isProgrammaticRouteFile = (file) => {
2703
2711
  const normalized = file.replace(/\\/g, "/");
2704
- return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalized);
2712
+ return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) && _chunkLH7S7FI3cjs.isProgrammaticRoutesFileName.call(void 0, normalized);
2705
2713
  };
2706
2714
  const isProgrammaticRouteSourceFile = (file) => {
2707
2715
  const normalized = file.replace(/\\/g, "/");
@@ -2826,7 +2834,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2826
2834
  }
2827
2835
  })]);
2828
2836
  }
2829
- apiRouteManager = new (0, _chunkD2VLHRBNcjs.APIRouteManager)(appDirs, server, {
2837
+ apiRouteManager = new (0, _chunkY3MTKPLNcjs.APIRouteManager)(appDirs, server, {
2830
2838
  plugins: farmConfig.plugins,
2831
2839
  i18n: farmApp.getI18nRuntime(),
2832
2840
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2935,45 +2943,65 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2935
2943
  },
2936
2944
  href
2937
2945
  );
2938
- const farmDocsHandler = farmDocsDevRuntime ? farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs) ? await farmDocsDevRuntime.createFarmDocsAdapterHandler(farmConfig.docs, {
2939
- root: farmConfig.root,
2940
- srcDir: farmConfig.srcDir,
2941
- clientEntry: "/@farm/client.js",
2942
- rendererServer: farmConfig.renderer.server,
2943
- resolveLayoutFonts: resolveDocsLayoutFonts,
2944
- fontStylesheetHref: "/@farm/fonts.css",
2945
- globalStylesheetHref: _chunkPVB5UYJTcjs.resolveDevGlobalStylesheetHref.call(void 0,
2946
- farmConfig.root,
2947
- farmConfig.srcDir
2948
- ),
2949
- loadModule: async (specifier) => {
2950
- const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2951
- if (specifier === _optionalChain([farmConfig, 'access', _191 => _191.docs, 'access', _192 => _192.adapter, 'optionalAccess', _193 => _193.server]) && _optionalChain([resolved, 'optionalAccess', _194 => _194.id])) {
2952
- const file = resolved.id.split("?", 1)[0];
2953
- return import(
2954
- /* @vite-ignore */
2955
- _url.pathToFileURL.call(void 0, file).href
2956
- );
2946
+ let farmDocsRuntimeGeneration = 0;
2947
+ const createFarmDocsAdapterHandler = () => {
2948
+ const generation = ++farmDocsRuntimeGeneration;
2949
+ return farmDocsDevRuntime.createFarmDocsAdapterHandler(farmConfig.docs, {
2950
+ root: farmConfig.root,
2951
+ srcDir: farmConfig.srcDir,
2952
+ clientEntry: "/@farm/client.js",
2953
+ rendererServer: farmConfig.renderer.server,
2954
+ resolveLayoutFonts: resolveDocsLayoutFonts,
2955
+ fontStylesheetHref: "/@farm/fonts.css",
2956
+ globalStylesheetHref: _chunkTAXZQNFZcjs.resolveDevGlobalStylesheetHref.call(void 0, farmConfig.root, farmConfig.srcDir),
2957
+ loadModule: async (specifier) => {
2958
+ const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2959
+ if (specifier === _optionalChain([farmConfig, 'access', _191 => _191.docs, 'access', _192 => _192.adapter, 'optionalAccess', _193 => _193.server]) && _optionalChain([resolved, 'optionalAccess', _194 => _194.id])) {
2960
+ const file = resolved.id.split("?", 1)[0];
2961
+ return import(
2962
+ /* @vite-ignore */
2963
+ _url.pathToFileURL.call(void 0, file).href
2964
+ );
2965
+ }
2966
+ return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _195 => _195.id]), () => ( specifier)));
2967
+ },
2968
+ registerMCPServer: (mcpServer) => {
2969
+ if (generation !== farmDocsRuntimeGeneration) return () => {
2970
+ };
2971
+ const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
2972
+ docsMCPServerDisposers.add(dispose);
2973
+ return () => {
2974
+ docsMCPServerDisposers.delete(dispose);
2975
+ dispose();
2976
+ };
2977
+ },
2978
+ isPathGuarded: isFarmDocsPathGuarded
2979
+ });
2980
+ };
2981
+ let farmDocsAdapterHandler = _optionalChain([farmDocsDevRuntime, 'optionalAccess', _196 => _196.hasFarmDocsRuntimeAdapter, 'call', _197 => _197(farmConfig.docs)]) ? createFarmDocsAdapterHandler() : void 0;
2982
+ if (farmDocsAdapterHandler) await farmDocsAdapterHandler;
2983
+ const farmDocsConfigModule = farmDocsAdapterHandler ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, farmConfig.docs) : void 0;
2984
+ if (farmDocsConfigModule) {
2985
+ const configFile = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.resolve(farmConfig.root, farmDocsConfigModule));
2986
+ refreshFarmDocsConfig = (file) => {
2987
+ if (_chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server, file, /* @__PURE__ */ new Set([configFile])).length === 0) {
2988
+ return false;
2957
2989
  }
2958
- return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _195 => _195.id]), () => ( specifier)));
2959
- },
2960
- registerMCPServer: (mcpServer) => {
2961
- const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
2962
- docsMCPServerDisposers.add(dispose);
2963
- return () => {
2964
- docsMCPServerDisposers.delete(dispose);
2965
- dispose();
2966
- };
2967
- },
2968
- isPathGuarded: isFarmDocsPathGuarded
2969
- }) : farmDocsDevRuntime.createFarmDocsHandler(farmConfig.docs, {
2990
+ releaseDocsMCPServers();
2991
+ farmDocsAdapterHandler = createFarmDocsAdapterHandler();
2992
+ farmDocsAdapterHandler.catch(() => {
2993
+ });
2994
+ return true;
2995
+ };
2996
+ }
2997
+ const farmDocsHandler = farmDocsDevRuntime ? farmDocsAdapterHandler ? (request) => farmDocsAdapterHandler.then((handle) => handle(request)) : farmDocsDevRuntime.createFarmDocsHandler(farmConfig.docs, {
2970
2998
  root: farmConfig.root,
2971
2999
  srcDir: farmConfig.srcDir,
2972
3000
  clientEntry: "/@farm/client.js",
2973
3001
  fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2974
3002
  resolveLayoutFonts: resolveDocsLayoutFonts,
2975
3003
  fontStylesheetHref: "/@farm/fonts.css",
2976
- globalStylesheetHref: _chunkPVB5UYJTcjs.resolveDevGlobalStylesheetHref.call(void 0,
3004
+ globalStylesheetHref: _chunkTAXZQNFZcjs.resolveDevGlobalStylesheetHref.call(void 0,
2977
3005
  farmConfig.root,
2978
3006
  farmConfig.srcDir
2979
3007
  ),
@@ -2981,7 +3009,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2981
3009
  basePath: farmConfig.basePath
2982
3010
  }) : null;
2983
3011
  const farmDocsListsPages = Boolean(
2984
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _196 => _196.getPlugins, 'call', _197 => _197(), 'access', _198 => _198.some, 'call', _199 => _199((plugin2) => plugin2.name === "farm:infra-analytics")])
3012
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _198 => _198.getPlugins, 'call', _199 => _199(), 'access', _200 => _200.some, 'call', _201 => _201((plugin2) => plugin2.name === "farm:infra-analytics")])
2985
3013
  );
2986
3014
  let farmDocsPagePaths;
2987
3015
  const getFarmDocsPagePaths = () => {
@@ -3008,22 +3036,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3008
3036
  });
3009
3037
  }
3010
3038
  }
3011
- const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _200 => _200.getPlugins, 'call', _201 => _201(), 'access', _202 => _202.find, 'call', _203 => _203((plugin2) => plugin2.name === "farm:infra-analytics")]);
3039
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _202 => _202.getPlugins, 'call', _203 => _203(), 'access', _204 => _204.find, 'call', _205 => _205((plugin2) => plugin2.name === "farm:infra-analytics")]);
3012
3040
  if (farmInfraAnalyticsPlugin) {
3013
- _chunkV6ACETKRcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
3041
+ _chunkH7DAFRYRcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
3014
3042
  if (farmDocsDevRuntime) {
3015
- const label = _chunkMR64FNW6cjs.resolveFarmDocsRouteLabel.call(void 0,
3043
+ const label = _chunkSO4USIKLcjs.resolveFarmDocsRouteLabel.call(void 0,
3016
3044
  _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
3017
3045
  {
3018
- path: _optionalChain([farmConfig, 'access', _204 => _204.docs, 'optionalAccess', _205 => _205.entry]) || "/docs",
3019
- roots: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.roots, 'optionalAccess', _208 => _208.map, 'call', _209 => _209((root) => root.entry)]),
3046
+ path: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.entry]) || "/docs",
3047
+ roots: _optionalChain([farmConfig, 'access', _208 => _208.docs, 'optionalAccess', _209 => _209.roots, 'optionalAccess', _210 => _210.map, 'call', _211 => _211((root) => root.entry)]),
3020
3048
  pages: await getFarmDocsPagePaths()
3021
3049
  }
3022
3050
  );
3023
- if (label) return _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0, { pathname }, label);
3051
+ if (label) return _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
3024
3052
  }
3025
3053
  const match = farmApp.getRouteManager().matchRoute(pathname);
3026
- return { pathname, pattern: _optionalChain([match, 'access', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null };
3054
+ return { pathname, pattern: _optionalChain([match, 'access', _212 => _212.route, 'optionalAccess', _213 => _213.pattern]) || null };
3027
3055
  });
3028
3056
  }
3029
3057
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
@@ -3098,7 +3126,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3098
3126
  }
3099
3127
  },
3100
3128
  (request) => {
3101
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _212 => _212.getConfig, 'call', _213 => _213()]), () => ( options));
3129
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
3102
3130
  const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3103
3131
  return _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request, {
3104
3132
  trustProxy: currentServerConfig.trustProxy
@@ -3114,7 +3142,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3114
3142
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
3115
3143
  const requestUrl = req.url || "/";
3116
3144
  const requestMethod = req.method || "GET";
3117
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
3145
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _216 => _216.getConfig, 'call', _217 => _217()]), () => ( options));
3118
3146
  const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3119
3147
  const parsedRequestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
3120
3148
  trustProxy: currentServerConfig.trustProxy
@@ -3184,7 +3212,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3184
3212
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
3185
3213
  res.statusCode = 200;
3186
3214
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3187
- res.end(requestMethod === "HEAD" ? void 0 : _chunkPVB5UYJTcjs.FARM_VIDEO_PLAYER_HTML);
3215
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkTAXZQNFZcjs.FARM_VIDEO_PLAYER_HTML);
3188
3216
  return;
3189
3217
  }
3190
3218
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3239,7 +3267,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3239
3267
  openapi: options.openapi
3240
3268
  },
3241
3269
  workflows: discoveredWorkflows,
3242
- plugins: _optionalChain([pm, 'optionalAccess', _216 => _216.getSortedPlugins, 'call', _217 => _217()])
3270
+ plugins: _optionalChain([pm, 'optionalAccess', _218 => _218.getSortedPlugins, 'call', _219 => _219()])
3243
3271
  });
3244
3272
  res.statusCode = 200;
3245
3273
  res.setHeader(
@@ -3274,10 +3302,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3274
3302
  render: {
3275
3303
  pathname: pathname2,
3276
3304
  method: requestMethod,
3277
- routePattern: _optionalChain([match, 'optionalAccess', _218 => _218.route, 'optionalAccess', _219 => _219.pattern]) || null,
3278
- params: _optionalChain([match, 'optionalAccess', _220 => _220.params]) || {}
3305
+ routePattern: _optionalChain([match, 'optionalAccess', _220 => _220.route, 'optionalAccess', _221 => _221.pattern]) || null,
3306
+ params: _optionalChain([match, 'optionalAccess', _222 => _222.params]) || {}
3279
3307
  },
3280
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _221 => _221.layouts]) || []).map((layout) => layout.pattern)
3308
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _223 => _223.layouts]) || []).map((layout) => layout.pattern)
3281
3309
  };
3282
3310
  return pageHookRouteMatch;
3283
3311
  };
@@ -3365,7 +3393,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3365
3393
  }
3366
3394
  }
3367
3395
  const runAppMiddlewareForContentRoute = async () => {
3368
- if (!_optionalChain([middlewareManager, 'optionalAccess', _222 => _222.hasMiddleware, 'call', _223 => _223()])) return false;
3396
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _224 => _224.hasMiddleware, 'call', _225 => _225()])) return false;
3369
3397
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3370
3398
  return runFarmMiddlewareWithNavigation(
3371
3399
  farmApp.getServerRenderer(),
@@ -3403,7 +3431,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3403
3431
  return response.status;
3404
3432
  };
3405
3433
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3406
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _224 => _224.hasRuntimeHook, 'call', _225 => _225("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _226 => _226.hasMiddleware, 'call', _227 => _227()]) ? interceptFarmDevPageResponse({
3434
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _226 => _226.hasRuntimeHook, 'call', _227 => _227("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _228 => _228.hasMiddleware, 'call', _229 => _229()]) ? interceptFarmDevPageResponse({
3407
3435
  req,
3408
3436
  res,
3409
3437
  pm,
@@ -3416,7 +3444,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3416
3444
  urlPath: requestUrl,
3417
3445
  pathname: requestPathname,
3418
3446
  startTime: Date.now(),
3419
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _228 => _228(status)]),
3447
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _230 => _230(status)]),
3420
3448
  // The runtime reports a runtime.after failure itself.
3421
3449
  emitError: async () => {
3422
3450
  },
@@ -3427,7 +3455,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3427
3455
  handled = await runAppMiddlewareForContentRoute();
3428
3456
  } catch (error) {
3429
3457
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3430
- _optionalChain([interceptor, 'optionalAccess', _229 => _229.release, 'call', _230 => _230()]);
3458
+ _optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
3431
3459
  throw error;
3432
3460
  }
3433
3461
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3435,10 +3463,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3435
3463
  return true;
3436
3464
  }
3437
3465
  if (!handled) {
3438
- _optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
3466
+ _optionalChain([interceptor, 'optionalAccess', _233 => _233.release, 'call', _234 => _234()]);
3439
3467
  return false;
3440
3468
  }
3441
- if (!_optionalChain([interceptor, 'optionalAccess', _233 => _233.isEnded, 'call', _234 => _234()])) _optionalChain([logResponse2, 'optionalCall', _235 => _235(res.statusCode || 200)]);
3469
+ if (!_optionalChain([interceptor, 'optionalAccess', _235 => _235.isEnded, 'call', _236 => _236()])) _optionalChain([logResponse2, 'optionalCall', _237 => _237(res.statusCode || 200)]);
3442
3470
  return true;
3443
3471
  };
3444
3472
  const serveBuiltInRoute = async (respond, {
@@ -3447,7 +3475,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3447
3475
  label
3448
3476
  } = {}) => {
3449
3477
  const discard = async () => {
3450
- await _optionalChain([computed, 'optionalAccess', _236 => _236.body, 'optionalAccess', _237 => _237.cancel, 'call', _238 => _238(), 'access', _239 => _239.catch, 'call', _240 => _240(() => {
3478
+ await _optionalChain([computed, 'optionalAccess', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240(), 'access', _241 => _241.catch, 'call', _242 => _242(() => {
3451
3479
  })]);
3452
3480
  };
3453
3481
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3464,9 +3492,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3464
3492
  if (pm && opensFarmDevRuntimeSession(pm)) {
3465
3493
  try {
3466
3494
  const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3467
- const route = _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0,
3495
+ const route = _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0,
3468
3496
  { pathname: requestPathname },
3469
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkMR64FNW6cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3497
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkSO4USIKLcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3470
3498
  );
3471
3499
  runtimeSession2 = await pm.beginRuntimeRequest(
3472
3500
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3504,7 +3532,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3504
3532
  }
3505
3533
  responding = true;
3506
3534
  response = await respond(
3507
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _241 => _241.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3535
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _243 => _243.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3508
3536
  );
3509
3537
  } catch (error) {
3510
3538
  if (!responding && !res.headersSent) {
@@ -3524,7 +3552,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3524
3552
  else await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
3525
3553
  };
3526
3554
  const openAPIRequestPathname = openAPIManager ? _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3527
- if (openAPIManager && _optionalChain([options, 'access', _242 => _242.openapi, 'optionalAccess', _243 => _243.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3555
+ if (openAPIManager && _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3528
3556
  const specManager = openAPIManager;
3529
3557
  await serveBuiltInRoute(async () => {
3530
3558
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3544,7 +3572,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3544
3572
  });
3545
3573
  return;
3546
3574
  }
3547
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.route])) {
3575
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _246 => _246.openapi, 'optionalAccess', _247 => _247.route])) {
3548
3576
  const docsManager = openAPIManager;
3549
3577
  await serveBuiltInRoute(
3550
3578
  async () => {
@@ -3555,7 +3583,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3555
3583
  );
3556
3584
  return;
3557
3585
  }
3558
- if (_optionalChain([options, 'access', _246 => _246.agent, 'optionalAccess', _247 => _247.manifest]) !== false && _chunkMR64FNW6cjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3586
+ if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false && _chunkSO4USIKLcjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3559
3587
  const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
3560
3588
  {
3561
3589
  config: farmConfig,
@@ -3565,18 +3593,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3565
3593
  apiServerBasePath
3566
3594
  );
3567
3595
  await serveBuiltInRoute(async () => {
3568
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkPVB5UYJTcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3569
- const manifest = await _chunkMR64FNW6cjs.createFarmAppManifestResponse.call(void 0,
3596
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkTAXZQNFZcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3597
+ const manifest = await _chunkSO4USIKLcjs.createFarmAppManifestResponse.call(void 0,
3570
3598
  new Request(parsedRequestUrl, {
3571
3599
  method: requestMethod,
3572
3600
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3573
3601
  }),
3574
3602
  {
3575
- ..._chunkMR64FNW6cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3603
+ ..._chunkSO4USIKLcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3576
3604
  build: "development",
3577
3605
  packages: farmAppPackages,
3578
3606
  // Read again on each request; unchanged files come from a cache.
3579
- webmcpTools: _optionalChain([farmConfig, 'access', _248 => _248.plugins, 'optionalAccess', _249 => _249.some, 'call', _250 => _250(({ name }) => name === "farm:webmcp")]) ? _chunkPVB5UYJTcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3607
+ webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ? _chunkTAXZQNFZcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3580
3608
  }),
3581
3609
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3582
3610
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3594,11 +3622,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3594
3622
  });
3595
3623
  return;
3596
3624
  }
3597
- if (_optionalChain([options, 'access', _251 => _251.agent, 'optionalAccess', _252 => _252.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkMR64FNW6cjs.FARM_API_CATALOG_PATH) {
3625
+ if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkSO4USIKLcjs.FARM_API_CATALOG_PATH) {
3598
3626
  await serveBuiltInRoute(
3599
- () => _chunkMR64FNW6cjs.createFarmApiCatalogResponse.call(void 0,
3627
+ () => _chunkSO4USIKLcjs.createFarmApiCatalogResponse.call(void 0,
3600
3628
  requestMethod,
3601
- _chunkMR64FNW6cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3629
+ _chunkSO4USIKLcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3602
3630
  new Request(parsedRequestUrl, {
3603
3631
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3604
3632
  })
@@ -3606,8 +3634,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3606
3634
  );
3607
3635
  return;
3608
3636
  }
3609
- if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.aiCatalog]) !== false) {
3610
- const aiCatalog = _chunkMR64FNW6cjs.createFarmAiCatalogResponse.call(void 0,
3637
+ if (_optionalChain([options, 'access', _255 => _255.agent, 'optionalAccess', _256 => _256.aiCatalog]) !== false) {
3638
+ const aiCatalog = _chunkSO4USIKLcjs.createFarmAiCatalogResponse.call(void 0,
3611
3639
  new Request(parsedRequestUrl, {
3612
3640
  method: requestMethod,
3613
3641
  headers: {
@@ -3655,7 +3683,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3655
3683
  );
3656
3684
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3657
3685
  if (docsResponse) {
3658
- const docsPage = _optionalChain([docsResponse, 'access', _255 => _255.headers, 'access', _256 => _256.get, 'call', _257 => _257("content-type"), 'optionalAccess', _258 => _258.toLowerCase, 'call', _259 => _259(), 'access', _260 => _260.includes, 'call', _261 => _261("text/html")]);
3686
+ const docsPage = _optionalChain([docsResponse, 'access', _257 => _257.headers, 'access', _258 => _258.get, 'call', _259 => _259("content-type"), 'optionalAccess', _260 => _260.toLowerCase, 'call', _261 => _261(), 'access', _262 => _262.includes, 'call', _263 => _263("text/html")]);
3659
3687
  await serveBuiltInRoute(
3660
3688
  async (request) => {
3661
3689
  if (!docsPage) {
@@ -3673,7 +3701,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3673
3701
  farmConfig.deploymentId
3674
3702
  );
3675
3703
  if (deploymentMismatch) {
3676
- await _optionalChain([docsResponse, 'access', _262 => _262.body, 'optionalAccess', _263 => _263.cancel, 'call', _264 => _264()]);
3704
+ await _optionalChain([docsResponse, 'access', _264 => _264.body, 'optionalAccess', _265 => _265.cancel, 'call', _266 => _266()]);
3677
3705
  return _chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3678
3706
  }
3679
3707
  const page = _chunkSWOJU7LIcjs._withFarmResponseHeaders.call(void 0,
@@ -3694,11 +3722,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3694
3722
  {
3695
3723
  kind: "docs",
3696
3724
  computed: docsResponse,
3697
- label: _chunkMR64FNW6cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3725
+ label: _chunkSO4USIKLcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3698
3726
  _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3699
3727
  {
3700
- path: _optionalChain([farmConfig, 'access', _265 => _265.docs, 'optionalAccess', _266 => _266.entry]) || "/docs",
3701
- roots: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.roots, 'optionalAccess', _269 => _269.map, 'call', _270 => _270((root) => root.entry)]),
3728
+ path: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.entry]) || "/docs",
3729
+ roots: _optionalChain([farmConfig, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.roots, 'optionalAccess', _271 => _271.map, 'call', _272 => _272((root) => root.entry)]),
3702
3730
  pages: await getFarmDocsPagePaths()
3703
3731
  }
3704
3732
  )
@@ -3707,7 +3735,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3707
3735
  return;
3708
3736
  }
3709
3737
  }
3710
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _271 => _271.headers, 'access', _272 => _272.accept, 'optionalAccess', _273 => _273.includes, 'call', _274 => _274(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3738
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _273 => _273.headers, 'access', _274 => _274.accept, 'optionalAccess', _275 => _275.includes, 'call', _276 => _276(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3711
3739
  const { createFarmNativeTreeResponse } = await import("./native-tree-PHCV43W4.cjs");
3712
3740
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3713
3741
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3725,15 +3753,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3725
3753
  });
3726
3754
  await serveBuiltInRoute(() => treeResponse, {
3727
3755
  computed: treeResponse,
3728
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _275 => _275.getRouteManager, 'call', _276 => _276(), 'access', _277 => _277.matchRoute, 'call', _278 => _278(_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _279 => _279.route, 'optionalAccess', _280 => _280.pattern]), () => ( null))
3756
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern]), () => ( null))
3729
3757
  });
3730
3758
  return;
3731
3759
  }
3732
3760
  const markdownRouteLabel = () => (
3733
3761
  // On the route path, as production labels it: /fr/index.md is /index.md.
3734
- _chunkMR64FNW6cjs.resolveFarmMarkdownRouteLabel.call(void 0,
3762
+ _chunkSO4USIKLcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3735
3763
  toRoutePathname(requestPathname),
3736
- (page) => _optionalChain([farmApp, 'access', _281 => _281.getRouteManager, 'call', _282 => _282(), 'access', _283 => _283.matchRoute, 'call', _284 => _284(page), 'access', _285 => _285.route, 'optionalAccess', _286 => _286.pattern])
3764
+ (page) => _optionalChain([farmApp, 'access', _283 => _283.getRouteManager, 'call', _284 => _284(), 'access', _285 => _285.matchRoute, 'call', _286 => _286(page), 'access', _287 => _287.route, 'optionalAccess', _288 => _288.pattern])
3737
3765
  )
3738
3766
  );
3739
3767
  const markdownSourceResponse = viteModuleRequest ? null : await _chunk27IPPPCVcjs.createFarmMarkdownSourceResponse.call(void 0, {
@@ -3745,14 +3773,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3745
3773
  routePathname: toRoutePathname,
3746
3774
  resolveSource: async (pathname2) => {
3747
3775
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3748
- const sourcePath = _optionalChain([match, 'access', _287 => _287.route, 'optionalAccess', _288 => _288.markdownSourcePath]) || (match.route && _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3776
+ const sourcePath = _optionalChain([match, 'access', _289 => _289.route, 'optionalAccess', _290 => _290.markdownSourcePath]) || (match.route && _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3749
3777
  if (!sourcePath) {
3750
3778
  return null;
3751
3779
  }
3752
3780
  return {
3753
3781
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3754
3782
  // Project-relative, as production sends it: never the machine's path.
3755
- filePath: _chunkPVB5UYJTcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3783
+ filePath: _chunkTAXZQNFZcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3756
3784
  };
3757
3785
  },
3758
3786
  // The anonymous check goes through this server, so its guards and
@@ -3902,7 +3930,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3902
3930
  "beforeRequest",
3903
3931
  (plugin2) => {
3904
3932
  const owner = _chunkN4AM7Q34cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3905
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _289 => _289.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3933
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _291 => _291.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3906
3934
  },
3907
3935
  req,
3908
3936
  res
@@ -3939,7 +3967,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3939
3967
  isProd: false
3940
3968
  },
3941
3969
  request,
3942
- { clientAddress: _optionalChain([req, 'access', _290 => _290.socket, 'optionalAccess', _291 => _291.remoteAddress]) }
3970
+ { clientAddress: _optionalChain([req, 'access', _292 => _292.socket, 'optionalAccess', _293 => _293.remoteAddress]) }
3943
3971
  );
3944
3972
  if (!result) {
3945
3973
  throw new Error(`Matched integration route did not return a response`);
@@ -3947,7 +3975,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3947
3975
  return result;
3948
3976
  } catch (error) {
3949
3977
  _chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
3950
- await _optionalChain([runtime, 'optionalAccess', _292 => _292.reportError, 'call', _293 => _293(error)]);
3978
+ await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
3951
3979
  return _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
3952
3980
  }
3953
3981
  };
@@ -4001,7 +4029,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4001
4029
  _chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
4002
4030
  pathname: requestPathname,
4003
4031
  method: requestMethod
4004
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _294 => _294.isFarmDocsAPIRequest, 'call', _295 => _295(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
4032
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
4005
4033
  );
4006
4034
  };
4007
4035
  try {
@@ -4091,15 +4119,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4091
4119
  );
4092
4120
  };
4093
4121
  const isDocsAPIRequest = Boolean(
4094
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(pathname2)])
4122
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _298 => _298.isFarmDocsAPIRequest, 'call', _299 => _299(pathname2)])
4095
4123
  );
4096
4124
  const docsRuntimeOptions = () => ({
4097
4125
  kind: "docs",
4098
- route: _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0,
4126
+ route: _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0,
4099
4127
  { pathname: pathname2, pattern: urlPath2 },
4100
- _chunkMR64FNW6cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4101
- path: _optionalChain([farmConfig, 'access', _298 => _298.docs, 'optionalAccess', _299 => _299.entry]) || "/docs",
4102
- roots: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.roots, 'optionalAccess', _302 => _302.map, 'call', _303 => _303((root) => root.entry)])
4128
+ _chunkSO4USIKLcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4129
+ path: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.entry]) || "/docs",
4130
+ roots: _optionalChain([farmConfig, 'access', _302 => _302.docs, 'optionalAccess', _303 => _303.roots, 'optionalAccess', _304 => _304.map, 'call', _305 => _305((root) => root.entry)])
4103
4131
  })
4104
4132
  )
4105
4133
  });
@@ -4181,7 +4209,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4181
4209
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4182
4210
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4183
4211
  if (apiHandler && hasExplicitAPIRoute) {
4184
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _304 => _304.route, 'access', _305 => _305.path]) || urlPath2;
4212
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _306 => _306.route, 'access', _307 => _307.path]) || urlPath2;
4185
4213
  _chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
4186
4214
  type: "route.matched",
4187
4215
  pathname: pathname2,
@@ -4231,7 +4259,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4231
4259
  error
4232
4260
  });
4233
4261
  _chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
4234
- await _optionalChain([runtime, 'optionalAccess', _306 => _306.reportError, 'call', _307 => _307(error)]);
4262
+ await _optionalChain([runtime, 'optionalAccess', _308 => _308.reportError, 'call', _309 => _309(error)]);
4235
4263
  response = _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
4236
4264
  }
4237
4265
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -4336,12 +4364,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4336
4364
  }
4337
4365
  return;
4338
4366
  }
4339
- if (_optionalChain([req, 'access', _308 => _308.url, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("/@")]) || _optionalChain([req, 'access', _311 => _311.url, 'optionalAccess', _312 => _312.startsWith, 'call', _313 => _313("/node_modules")])) {
4367
+ if (_optionalChain([req, 'access', _310 => _310.url, 'optionalAccess', _311 => _311.startsWith, 'call', _312 => _312("/@")]) || _optionalChain([req, 'access', _313 => _313.url, 'optionalAccess', _314 => _314.startsWith, 'call', _315 => _315("/node_modules")])) {
4340
4368
  return next();
4341
4369
  }
4342
4370
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4343
4371
  requestPathname,
4344
- _optionalChain([farmApp, 'optionalAccess', _314 => _314.getRouteManager, 'call', _315 => _315()]),
4372
+ _optionalChain([farmApp, 'optionalAccess', _316 => _316.getRouteManager, 'call', _317 => _317()]),
4345
4373
  [server.config.publicDir, server.config.root],
4346
4374
  farmAgentGeneratedPaths(farmConfig),
4347
4375
  requestMethod
@@ -4349,7 +4377,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4349
4377
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4350
4378
  return next();
4351
4379
  }
4352
- if (_optionalChain([req, 'access', _316 => _316.url, 'optionalAccess', _317 => _317.startsWith, 'call', _318 => _318("/__farm/page-data")])) {
4380
+ if (_optionalChain([req, 'access', _318 => _318.url, 'optionalAccess', _319 => _319.startsWith, 'call', _320 => _320("/__farm/page-data")])) {
4353
4381
  const urlObj = parsedRequestUrl;
4354
4382
  const targetPath = urlObj.searchParams.get("path") || "/";
4355
4383
  let renderedRequest;
@@ -4379,7 +4407,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4379
4407
  renderedRequest = targetRequest;
4380
4408
  let middlewareMap = /* @__PURE__ */ new Map();
4381
4409
  let middlewareContext = /* @__PURE__ */ new Map();
4382
- if (_optionalChain([middlewareManager, 'optionalAccess', _319 => _319.hasMiddleware, 'call', _320 => _320()])) {
4410
+ if (_optionalChain([middlewareManager, 'optionalAccess', _321 => _321.hasMiddleware, 'call', _322 => _322()])) {
4383
4411
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4384
4412
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4385
4413
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4413,10 +4441,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4413
4441
  if (pm) {
4414
4442
  await pm.runHookParallel("afterRouteMatch", {
4415
4443
  pathname: targetPath,
4416
- matched: !!_optionalChain([match, 'optionalAccess', _321 => _321.route]),
4417
- routePattern: _optionalChain([match, 'optionalAccess', _322 => _322.route, 'optionalAccess', _323 => _323.pattern]) || null,
4418
- params: _optionalChain([match, 'optionalAccess', _324 => _324.params]) || {},
4419
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _325 => _325.layouts]) || []).map((l) => l.pattern)
4444
+ matched: !!_optionalChain([match, 'optionalAccess', _323 => _323.route]),
4445
+ routePattern: _optionalChain([match, 'optionalAccess', _324 => _324.route, 'optionalAccess', _325 => _325.pattern]) || null,
4446
+ params: _optionalChain([match, 'optionalAccess', _326 => _326.params]) || {},
4447
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _327 => _327.layouts]) || []).map((l) => l.pattern)
4420
4448
  });
4421
4449
  }
4422
4450
  if (!match) {
@@ -4451,7 +4479,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4451
4479
  );
4452
4480
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4453
4481
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4454
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4482
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkGWFNJLDNcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4455
4483
  const isClientComponent = moduleMetadata.isClientComponent;
4456
4484
  const shouldHydrate = moduleMetadata.shouldHydrate;
4457
4485
  let mergedMetadata = {};
@@ -4462,7 +4490,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4462
4490
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4463
4491
  (entry) => entry.pattern === layout.pattern
4464
4492
  ), () => ( {
4465
- ..._chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4493
+ ..._chunkGWFNJLDNcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4466
4494
  serverTree: false
4467
4495
  }))
4468
4496
  );
@@ -4476,17 +4504,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4476
4504
  )
4477
4505
  ];
4478
4506
  const hydrationIslandStrategy = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0,
4479
- _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _326 => _326.getConfig, 'call', _327 => _327()]), () => ( options)))
4480
- ) === "islands" ? _chunkPVB5UYJTcjs.resolveFarmRouteRootStrategy.call(void 0,
4507
+ _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options)))
4508
+ ) === "islands" ? _chunkTAXZQNFZcjs.resolveFarmRouteRootStrategy.call(void 0,
4481
4509
  route,
4482
4510
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4483
4511
  layouts.map((layout, index) => ({
4484
4512
  pattern: layout.pattern,
4485
4513
  modulePath: layout.modulePath,
4486
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _328 => _328[index], 'optionalAccess', _329 => _329.shouldHydrate]) === true,
4514
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _330 => _330[index], 'optionalAccess', _331 => _331.shouldHydrate]) === true,
4487
4515
  // Manifest entries carry it; metadata read from source does not.
4488
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _330 => _330[index], 'optionalAccess', _331 => _331.hasIsolatedClientBoundaries]) === true,
4489
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.islandStrategy]), () => ( null))
4516
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.hasIsolatedClientBoundaries]) === true,
4517
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _334 => _334[index], 'optionalAccess', _335 => _335.islandStrategy]), () => ( null))
4490
4518
  })),
4491
4519
  server.config.root,
4492
4520
  true
@@ -4543,7 +4571,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4543
4571
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4544
4572
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4545
4573
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4546
- ), () => ( _chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4574
+ ), () => ( _chunkGWFNJLDNcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4547
4575
  const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4548
4576
  request: targetRequest,
4549
4577
  params: slot.params,
@@ -4593,7 +4621,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4593
4621
  pageShouldHydrate: shouldHydrate,
4594
4622
  layoutShouldHydrate: shouldHydrateLayout,
4595
4623
  islandStrategy: hydrationIslandStrategy,
4596
- rendering: _chunkGL4SPJTEcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4624
+ rendering: _chunkYPPAYYSXcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4597
4625
  });
4598
4626
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4599
4627
  const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
@@ -4607,13 +4635,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4607
4635
  middlewareContext,
4608
4636
  () => renderer.renderNavigationFragment({
4609
4637
  PageComponent: routeModule.default,
4610
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _334 => _334.default]),
4638
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _336 => _336.default]),
4611
4639
  pageProps: routeProps,
4612
4640
  params,
4613
4641
  layouts: layouts.map((layout, index) => ({
4614
4642
  pattern: layout.pattern,
4615
4643
  module: layoutModules[index],
4616
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _335 => _335[index], 'optionalAccess', _336 => _336.serverTree])
4644
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _337 => _337[index], 'optionalAccess', _338 => _338.serverTree])
4617
4645
  })),
4618
4646
  layoutStartIndex,
4619
4647
  slots: routeSlots.map((slot) => ({
@@ -4721,14 +4749,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4721
4749
  trustProxy: currentServerConfig.trustProxy
4722
4750
  }).pathname;
4723
4751
  const routeManager2 = farmApp.getRouteManager();
4724
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("beforeRequest")]), () => ( false));
4725
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasHook, 'call', _340 => _340("afterResponse")]), () => ( false));
4726
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("afterRender")]), () => ( false)));
4752
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasHook, 'call', _340 => _340("beforeRequest")]), () => ( false));
4753
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("afterResponse")]), () => ( false));
4754
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasHook, 'call', _346 => _346("afterRender")]), () => ( false)));
4727
4755
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4728
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasRuntimeHook, 'call', _346 => _346("after")]), () => ( false));
4756
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _347 => _347.hasRuntimeHook, 'call', _348 => _348("after")]), () => ( false));
4729
4757
  const pageBuiltInRouteLabel = (pathname2) => {
4730
4758
  const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4731
- const mcpLabel = _chunkMR64FNW6cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4759
+ const mcpLabel = _chunkSO4USIKLcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4732
4760
  if (mcpLabel) return mcpLabel;
4733
4761
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4734
4762
  return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4737,13 +4765,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4737
4765
  const match = routeManager2.matchRoute(pathname2);
4738
4766
  return {
4739
4767
  kind: "page",
4740
- route: _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0,
4768
+ route: _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0,
4741
4769
  {
4742
4770
  pathname: pathname2,
4743
- pattern: _optionalChain([match, 'optionalAccess', _347 => _347.route, 'optionalAccess', _348 => _348.pattern]) || null,
4744
- params: _optionalChain([match, 'optionalAccess', _349 => _349.params]) || {}
4771
+ pattern: _optionalChain([match, 'optionalAccess', _349 => _349.route, 'optionalAccess', _350 => _350.pattern]) || null,
4772
+ params: _optionalChain([match, 'optionalAccess', _351 => _351.params]) || {}
4745
4773
  },
4746
- _optionalChain([match, 'optionalAccess', _350 => _350.route]) ? null : pageBuiltInRouteLabel(pathname2)
4774
+ _optionalChain([match, 'optionalAccess', _352 => _352.route]) ? null : pageBuiltInRouteLabel(pathname2)
4747
4775
  )
4748
4776
  };
4749
4777
  };
@@ -4823,7 +4851,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4823
4851
  }) : void 0;
4824
4852
  let middlewareFailed = false;
4825
4853
  try {
4826
- if (_optionalChain([middlewareManager, 'optionalAccess', _351 => _351.hasMiddleware, 'call', _352 => _352()])) {
4854
+ if (_optionalChain([middlewareManager, 'optionalAccess', _353 => _353.hasMiddleware, 'call', _354 => _354()])) {
4827
4855
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4828
4856
  const handled = await runFarmMiddlewareWithNavigation(
4829
4857
  farmApp.getServerRenderer(),
@@ -4836,7 +4864,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4836
4864
  throw error;
4837
4865
  });
4838
4866
  if (handled) {
4839
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4867
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
4840
4868
  const duration = Date.now() - startTime;
4841
4869
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4842
4870
  }
@@ -4851,8 +4879,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4851
4879
  res
4852
4880
  );
4853
4881
  }
4854
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
4855
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4882
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4883
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
4856
4884
  const duration = Date.now() - startTime;
4857
4885
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4858
4886
  }
@@ -4871,8 +4899,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4871
4899
  await pm.reportRuntimeRequestError(runtimeSession, error);
4872
4900
  } else {
4873
4901
  await pm.failRuntimeRequest(runtimeSession, error);
4874
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
4875
- _optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.release, 'call', _362 => _362()]);
4902
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.isEnded, 'call', _362 => _362()])) {
4903
+ _optionalChain([responseInterceptor, 'optionalAccess', _363 => _363.release, 'call', _364 => _364()]);
4876
4904
  console.error("[FARM] Page error:", error);
4877
4905
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4878
4906
  return;
@@ -4889,7 +4917,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4889
4917
  }
4890
4918
  })
4891
4919
  );
4892
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _363 => _363.stack, 'access', _364 => _364.at, 'call', _365 => _365(-1), 'optionalAccess', _366 => _366.handle]);
4920
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _365 => _365.stack, 'access', _366 => _366.at, 'call', _367 => _367(-1), 'optionalAccess', _368 => _368.handle]);
4893
4921
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4894
4922
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4895
4923
  }
@@ -4918,7 +4946,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4918
4946
  });
4919
4947
  }
4920
4948
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4921
- const root = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.root]) || _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
4949
+ const root = _optionalChain([farmApp, 'optionalAccess', _369 => _369.getConfig, 'call', _370 => _370(), 'access', _371 => _371.root]) || _optionalChain([server, 'optionalAccess', _372 => _372.config, 'access', _373 => _373.root]) || options.root;
4922
4950
  return this.resolve(id, path6.join(root, "package.json"), {
4923
4951
  ...resolveOptions,
4924
4952
  skipSelf: true
@@ -4932,7 +4960,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4932
4960
  const imageId = await imageImports.resolveId.call(this, id, importer, resolveOptions);
4933
4961
  if (imageId) return imageId;
4934
4962
  }
4935
- if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4963
+ if (_chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4936
4964
  return id;
4937
4965
  }
4938
4966
  if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
@@ -4946,7 +4974,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4946
4974
  }
4947
4975
  },
4948
4976
  async load(id, loadOptions) {
4949
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _372 => _372.ssr]) && !farmSetupContext.getStore()) {
4977
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _374 => _374.ssr]) && !farmSetupContext.getStore()) {
4950
4978
  await pendingClientSetup;
4951
4979
  }
4952
4980
  if (_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4963,9 +4991,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4963
4991
  const imageModule = await imageImports.load.call(this, id);
4964
4992
  if (imageModule) return imageModule;
4965
4993
  }
4966
- if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4967
- const renderer = _optionalChain([farmApp, 'optionalAccess', _373 => _373.getConfig, 'call', _374 => _374(), 'access', _375 => _375.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
4968
- const root = _optionalChain([server, 'optionalAccess', _376 => _376.config, 'access', _377 => _377.root]) || options.root;
4994
+ if (_chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4995
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _375 => _375.getConfig, 'call', _376 => _376(), 'access', _377 => _377.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
4996
+ const root = _optionalChain([server, 'optionalAccess', _378 => _378.config, 'access', _379 => _379.root]) || options.root;
4969
4997
  if (isClientEnvironment(this, loadOptions)) {
4970
4998
  return generateProgrammaticClientRouteModuleForId(
4971
4999
  id,
@@ -4981,19 +5009,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4981
5009
  return FARM_DEV_CLIENT_BOOT_MODULE;
4982
5010
  }
4983
5011
  if (isFarmClientVirtualId(id)) {
4984
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _378 => _378.getConfig, 'call', _379 => _379()]);
4985
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
4986
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _381 => _381.integrations]) || options.integrations;
4987
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _382 => _382.root]) || _optionalChain([server, 'optionalAccess', _383 => _383.config, 'access', _384 => _384.root]) || process.cwd();
4988
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.docs]);
5012
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _380 => _380.getConfig, 'call', _381 => _381()]);
5013
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _382 => _382.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
5014
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.integrations]) || options.integrations;
5015
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.root]) || _optionalChain([server, 'optionalAccess', _385 => _385.config, 'access', _386 => _386.root]) || process.cwd();
5016
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.docs]);
4989
5017
  const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
4990
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
5018
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4991
5019
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4992
- _optionalChain([docs, 'optionalAccess', _387 => _387.enabled]) ? loadFarmDocsDevRuntime() : null,
4993
- _optionalChain([docs, 'optionalAccess', _388 => _388.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
5020
+ _optionalChain([docs, 'optionalAccess', _389 => _389.enabled]) ? loadFarmDocsDevRuntime() : null,
5021
+ _optionalChain([docs, 'optionalAccess', _390 => _390.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4994
5022
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4995
5023
  ]);
4996
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _389 => _389.isFarmDocsSearchEnabled, 'call', _390 => _390(docs)]), () => ( false));
5024
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _391 => _391.isFarmDocsSearchEnabled, 'call', _392 => _392(docs)]), () => ( false));
4997
5025
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4998
5026
  docsSearchEnabled,
4999
5027
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -5001,8 +5029,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
5001
5029
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
5002
5030
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
5003
5031
  const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
5004
- const isolatedHydrationMode = _chunkD2OU4CX2cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
5005
- _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.isolatedClientHydration]),
5032
+ const isolatedHydrationMode = _chunkGWFNJLDNcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
5033
+ _optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.experimental, 'optionalAccess', _394 => _394.isolatedClientHydration]),
5006
5034
  {
5007
5035
  serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "rsc",
5008
5036
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider))
@@ -5012,22 +5040,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
5012
5040
  integrationProviders,
5013
5041
  [
5014
5042
  ..._chunkN4AM7Q34cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
5015
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _393 => _393.getFarmDocsDocumentNavigationMatchers, 'call', _394 => _394(docs)]), () => ( []))
5043
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _395 => _395.getFarmDocsDocumentNavigationMatchers, 'call', _396 => _396(docs)]), () => ( []))
5016
5044
  ],
5017
5045
  generatedDocsSearchRuntime,
5018
5046
  `${generatedDevtoolsClientRuntime}
5019
5047
  ${generatedDevIndicatorsClientRuntime}`,
5020
- _optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.plugins]) || [],
5048
+ _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.plugins]) || [],
5021
5049
  root,
5022
- _optionalChain([resolvedConfig, 'optionalAccess', _396 => _396.srcDir]) || options.srcDir || "src",
5023
- _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.publicRuntimeConfig]) || options.publicRuntimeConfig,
5024
- adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _398 => _398.adapter])) : void 0,
5050
+ _optionalChain([resolvedConfig, 'optionalAccess', _398 => _398.srcDir]) || options.srcDir || "src",
5051
+ _optionalChain([resolvedConfig, 'optionalAccess', _399 => _399.publicRuntimeConfig]) || options.publicRuntimeConfig,
5052
+ adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _400 => _400.adapter])) : void 0,
5025
5053
  renderer,
5026
- isolatedHydrationMode === "enabled" || _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _399 => _399.getRouteManager, 'call', _400 => _400(), 'access', _401 => _401.getIsolatedClientBoundaryModules, 'call', _402 => _402(root)])))), 'optionalAccess', _403 => _403.size]) > 0,
5027
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
5028
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
5029
- _chunkPVB5UYJTcjs.generateClientCachePersistenceCode.call(void 0,
5030
- _chunkPVB5UYJTcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
5054
+ isolatedHydrationMode === "enabled" || _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _401 => _401.getRouteManager, 'call', _402 => _402(), 'access', _403 => _403.getIsolatedClientBoundaryModules, 'call', _404 => _404(root)])))), 'optionalAccess', _405 => _405.size]) > 0,
5055
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.trailingSlash]), () => ( false)),
5056
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _407 => _407.basePath]), () => ( "/")),
5057
+ _chunkTAXZQNFZcjs.generateClientCachePersistenceCode.call(void 0,
5058
+ _chunkTAXZQNFZcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _408 => _408.cache]))
5031
5059
  ),
5032
5060
  adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
5033
5061
  _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "islands"
@@ -5037,7 +5065,7 @@ ${generatedDevIndicatorsClientRuntime}`,
5037
5065
  return generateServerCode();
5038
5066
  }
5039
5067
  if (id === "/@farm/manifest") {
5040
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
5068
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _409 => _409.getRouteManager, 'call', _410 => _410()]);
5041
5069
  if (!routeManager) {
5042
5070
  return `
5043
5071
  export const getManifest = () => ({
@@ -5049,11 +5077,11 @@ export const getManifest = () => ({
5049
5077
  });
5050
5078
  `;
5051
5079
  }
5052
- const globalStylesheetHref = _chunkPVB5UYJTcjs.resolveDevGlobalStylesheetHref.call(void 0,
5080
+ const globalStylesheetHref = _chunkTAXZQNFZcjs.resolveDevGlobalStylesheetHref.call(void 0,
5053
5081
  server.config.root,
5054
- _optionalChain([farmApp, 'optionalAccess', _409 => _409.getConfig, 'call', _410 => _410(), 'access', _411 => _411.srcDir])
5082
+ _optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412(), 'access', _413 => _413.srcDir])
5055
5083
  );
5056
- const fullManifest = _chunkPVB5UYJTcjs.createFarmDevClientManifest.call(void 0,
5084
+ const fullManifest = _chunkTAXZQNFZcjs.createFarmDevClientManifest.call(void 0,
5057
5085
  routeManager.generateClientManifest(server.config.root),
5058
5086
  {
5059
5087
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -5069,51 +5097,51 @@ export { manifest };
5069
5097
  }
5070
5098
  },
5071
5099
  async transform(code, id, transformOptions) {
5072
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) && !farmSetupContext.getStore()) {
5100
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) && !farmSetupContext.getStore()) {
5073
5101
  await pendingClientSetup;
5074
5102
  }
5075
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _413 => _413.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5076
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _414 => _414.getConfig, 'call', _415 => _415()]), () => ( options));
5103
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5104
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417()]), () => ( options));
5077
5105
  let rewrotePackageImports = false;
5078
- if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkD2OU4CX2cjs.hasUseClientDirective.call(void 0, code)) {
5106
+ if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") && !isFarmCoreModule(id) || _optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkGWFNJLDNcjs.hasUseClientDirective.call(void 0, code)) {
5079
5107
  const file = id.split("?", 1)[0];
5080
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
5108
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _419 => _419.config, 'access', _420 => _420.root]) || process.cwd();
5081
5109
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
5082
5110
  const rewrite = () => {
5083
- if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
5111
+ if (_optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true) {
5084
5112
  if (farmReactServerFiles.has(file)) {
5085
- for (const child of _chunkD2OU4CX2cjs.farmRelativeImportFiles.call(void 0, code, file))
5113
+ for (const child of _chunkGWFNJLDNcjs.farmRelativeImportFiles.call(void 0, code, file))
5086
5114
  farmReactServerFiles.add(child);
5087
5115
  }
5088
- const serverModule = farmReactServerFiles.has(file) || !_chunkD2OU4CX2cjs.getFarmClientReachableModules.call(void 0,
5116
+ const serverModule = farmReactServerFiles.has(file) || !_chunkGWFNJLDNcjs.getFarmClientReachableModules.call(void 0,
5089
5117
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
5090
5118
  projectRoot
5091
5119
  ).has(path6.resolve(file));
5092
- const reactServer = !serverModule ? null : _chunkD2OU4CX2cjs.rewriteFarmReactServerImports.call(void 0, {
5120
+ const reactServer = !serverModule ? null : _chunkGWFNJLDNcjs.rewriteFarmReactServerImports.call(void 0, {
5093
5121
  code,
5094
5122
  file,
5095
- reference: (specifier, exportName) => _chunkD2OU4CX2cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5123
+ reference: (specifier, exportName) => _chunkGWFNJLDNcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5096
5124
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5097
5125
  });
5098
5126
  if (reactServer !== null) {
5099
5127
  code = reactServer;
5100
5128
  rewrotePackageImports = true;
5101
5129
  }
5102
- const internal = farmReactServerFiles.has(file) ? _chunkD2OU4CX2cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5130
+ const internal = farmReactServerFiles.has(file) ? _chunkGWFNJLDNcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5103
5131
  code,
5104
5132
  file,
5105
- reference: (clientFile) => _chunkD2OU4CX2cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5133
+ reference: (clientFile) => _chunkGWFNJLDNcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5106
5134
  }) : null;
5107
5135
  if (internal !== null) {
5108
5136
  code = internal;
5109
5137
  rewrotePackageImports = true;
5110
5138
  }
5111
5139
  }
5112
- const rewritePackageImports = (source2) => _chunkD2OU4CX2cjs.rewriteFarmPackageClientImports.call(void 0, {
5140
+ const rewritePackageImports = (source2) => _chunkGWFNJLDNcjs.rewriteFarmPackageClientImports.call(void 0, {
5113
5141
  code: source2,
5114
5142
  file,
5115
5143
  root: projectRoot,
5116
- isClientPackage: (specifier) => _chunkD2OU4CX2cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5144
+ isClientPackage: (specifier) => _chunkGWFNJLDNcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5117
5145
  });
5118
5146
  const source = code;
5119
5147
  const referenced = inspectPackages(() => rewritePackageImports(source));
@@ -5121,11 +5149,11 @@ export { manifest };
5121
5149
  code = referenced;
5122
5150
  rewrotePackageImports = true;
5123
5151
  }
5124
- if (_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true) {
5152
+ if (_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true) {
5125
5153
  const cached = rewriteFarmReactCacheImport(
5126
5154
  code,
5127
5155
  file,
5128
- _optionalChain([runtimeModule, 'optionalCall', _421 => _421(FARM_REACT_CACHE_MODULE)])
5156
+ _optionalChain([runtimeModule, 'optionalCall', _423 => _423(FARM_REACT_CACHE_MODULE)])
5129
5157
  );
5130
5158
  if (cached !== null) {
5131
5159
  code = cached;
@@ -5133,12 +5161,12 @@ export { manifest };
5133
5161
  }
5134
5162
  }
5135
5163
  };
5136
- if (buildSnapshot) _chunkD2OU4CX2cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5164
+ if (buildSnapshot) _chunkGWFNJLDNcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5137
5165
  else rewrite();
5138
5166
  }
5139
5167
  if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5140
5168
  const serverFns = _chunk7O3YJ6NPcjs.transformFarmServerFns.call(void 0, code, id, {
5141
- environment: _optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true ? "rsc" : "client"
5169
+ environment: _optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) === true ? "rsc" : "client"
5142
5170
  });
5143
5171
  if (serverFns) {
5144
5172
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5151,8 +5179,8 @@ export { manifest };
5151
5179
  const actionModule = transformFarmFormActionModule({
5152
5180
  code,
5153
5181
  id,
5154
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _423 => _423.config, 'access', _424 => _424.root]) || process.cwd(),
5155
- ssr: _optionalChain([transformOptions, 'optionalAccess', _425 => _425.ssr]) === true,
5182
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _425 => _425.config, 'access', _426 => _426.root]) || process.cwd(),
5183
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) === true,
5156
5184
  // Parsed by file type: page components are TSX.
5157
5185
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5158
5186
  runtimeModule,
@@ -5160,21 +5188,21 @@ export { manifest };
5160
5188
  });
5161
5189
  if (actionModule) return { code: actionModule, map: null };
5162
5190
  }
5163
- if (!_optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr])) {
5164
- const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _427 => _427.getConfig, 'call', _428 => _428(), 'optionalAccess', _429 => _429.docs]));
5165
- if (_chunkPVB5UYJTcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5166
- const redacted = _chunkPVB5UYJTcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5191
+ if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
5192
+ const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
5193
+ if (_chunkTAXZQNFZcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5194
+ const redacted = _chunkTAXZQNFZcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5167
5195
  if (redacted !== null) return { code: redacted, map: null };
5168
5196
  }
5169
5197
  }
5170
- if (!_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr])) {
5171
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
5172
- if ((_optionalChain([currentConfig, 'access', _433 => _433.experimental, 'optionalAccess', _434 => _434.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5198
+ if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
5199
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434()]), () => ( options));
5200
+ if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5173
5201
  const violation = findClientServerFnViolation(code, id);
5174
5202
  if (violation) {
5175
- const locate = _chunkD2OU4CX2cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5203
+ const locate = _chunkGWFNJLDNcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5176
5204
  this.error(
5177
- _chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
5205
+ _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
5178
5206
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5179
5207
  currentConfig.root
5180
5208
  )
@@ -5182,8 +5210,8 @@ export { manifest };
5182
5210
  }
5183
5211
  }
5184
5212
  }
5185
- if (!_optionalChain([transformOptions, 'optionalAccess', _435 => _435.ssr]) && shouldInspectClientBoundary(id, code)) {
5186
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _436 => _436.getConfig, 'call', _437 => _437()]), () => ( options)));
5213
+ if (!_optionalChain([transformOptions, 'optionalAccess', _437 => _437.ssr]) && shouldInspectClientBoundary(id, code)) {
5214
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _438 => _438.getConfig, 'call', _439 => _439()]), () => ( options)));
5187
5215
  }
5188
5216
  if (typeof imageImports.transform === "function") {
5189
5217
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5198,13 +5226,13 @@ export { manifest };
5198
5226
  id,
5199
5227
  transformOptions
5200
5228
  );
5201
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _438 => _438.code, 'optionalAccess', _439 => _439.toString, 'call', _440 => _440()]);
5229
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _440 => _440.code, 'optionalAccess', _441 => _441.toString, 'call', _442 => _442()]);
5202
5230
  if (fontCode) {
5203
5231
  transformedCode = fontCode;
5204
5232
  transformed = true;
5205
5233
  }
5206
5234
  }
5207
- if (_optionalChain([transformOptions, 'optionalAccess', _441 => _441.ssr]) && server) {
5235
+ if (_optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) && server) {
5208
5236
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5209
5237
  code: transformedCode,
5210
5238
  id,
@@ -5216,27 +5244,27 @@ export { manifest };
5216
5244
  transformed = true;
5217
5245
  }
5218
5246
  }
5219
- if (_chunkD2OU4CX2cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5247
+ if (_chunkGWFNJLDNcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5220
5248
  const clientBoundarySource = transformedCode;
5221
5249
  const moduleInfo = this.getModuleInfo(id);
5222
5250
  if (moduleInfo) {
5223
5251
  moduleInfo.isClientComponent = true;
5224
5252
  }
5225
- transformedCode = _chunkD2OU4CX2cjs.stripUseClientDirective.call(void 0, transformedCode);
5253
+ transformedCode = _chunkGWFNJLDNcjs.stripUseClientDirective.call(void 0, transformedCode);
5226
5254
  transformed = true;
5227
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _442 => _442.getConfig, 'call', _443 => _443()]), () => ( options));
5255
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
5228
5256
  let isolatedModuleReference = null;
5229
5257
  let rendererIslandModule = false;
5230
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _444 => _444.config, 'access', _445 => _445.root]) || process.cwd();
5258
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
5231
5259
  const cleanId = id.split("?", 1)[0];
5232
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _446 => _446.getRouteManager, 'call', _447 => _447(), 'access', _448 => _448.getIsolatedClientBoundaryModules, 'call', _449 => _449(root)])));
5233
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _450 => _450.has, 'call', _451 => _451(path6.resolve(cleanId))]) === true;
5234
- if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkD2OU4CX2cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5235
- cleanId.replace(/\\/g, "/").includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5260
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
5261
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
5262
+ if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkGWFNJLDNcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5263
+ cleanId.replace(/\\/g, "/").includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5236
5264
  isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
5237
5265
  const islandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, currentConfig)) === "islands";
5238
- const explicitStrategy = _chunkD2OU4CX2cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5239
- const inference = islandsMode && explicitStrategy === null ? _chunkPVB5UYJTcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5266
+ const explicitStrategy = _chunkGWFNJLDNcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5267
+ const inference = islandsMode && explicitStrategy === null ? _chunkTAXZQNFZcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5240
5268
  if (inference) {
5241
5269
  for (const file of inference.files) {
5242
5270
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5249,8 +5277,8 @@ export { manifest };
5249
5277
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5250
5278
  parse: (source) => this.parse(source),
5251
5279
  slots: islandsMode,
5252
- browser: _optionalChain([transformOptions, 'optionalAccess', _452 => _452.ssr]) !== true,
5253
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _453 => _453.strategy]) === "interaction",
5280
+ browser: _optionalChain([transformOptions, 'optionalAccess', _454 => _454.ssr]) !== true,
5281
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _455 => _455.strategy]) === "interaction",
5254
5282
  runtimeModule
5255
5283
  });
5256
5284
  if (!transformedBoundary) {
@@ -5259,14 +5287,14 @@ export { manifest };
5259
5287
  );
5260
5288
  }
5261
5289
  transformedCode = transformedBoundary;
5262
- } else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkD2OU4CX2cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5290
+ } else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkGWFNJLDNcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5263
5291
  rendererIslandModule = true;
5264
- if (_optionalChain([transformOptions, 'optionalAccess', _454 => _454.ssr]) === true) {
5292
+ if (_optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) === true) {
5265
5293
  const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5266
5294
  const transformedBoundary = transformIsolatedClientBoundaryModule({
5267
5295
  code: transformedCode,
5268
5296
  moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
5269
- islandStrategy: _nullishCoalesce(_chunkD2OU4CX2cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5297
+ islandStrategy: _nullishCoalesce(_chunkGWFNJLDNcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5270
5298
  parse: (source) => this.parse(source),
5271
5299
  withIsland: renderer.server
5272
5300
  });
@@ -5299,7 +5327,7 @@ export { manifest };
5299
5327
  );
5300
5328
  return;
5301
5329
  }` : "";
5302
- const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _455 => _455.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5330
+ const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _457 => _457.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5303
5331
  const hmrCode = rendererIslandHmr ? `
5304
5332
  if (import.meta.hot) {
5305
5333
  import.meta.hot.accept((newModule) => {
@@ -5309,7 +5337,7 @@ if (import.meta.hot) {
5309
5337
  }
5310
5338
  });
5311
5339
  }
5312
- ` : _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5340
+ ` : _optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5313
5341
  if (import.meta.hot) {
5314
5342
  import.meta.hot.accept((newModule) => {
5315
5343
  ${isolatedHmrUpdate}
@@ -5365,14 +5393,14 @@ if (import.meta.hot) {
5365
5393
  }
5366
5394
  _chunk7ZDLE77Pcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5367
5395
  _chunk7ZDLE77Pcjs.logger.info("Pre-rendering SSG pages...");
5368
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _457 => _457.config, 'access', _458 => _458.root]) || process.cwd(), options.outDir || "dist");
5396
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _459 => _459.config, 'access', _460 => _460.root]) || process.cwd(), options.outDir || "dist");
5369
5397
  const clientDir = path6.join(outDir, "client");
5370
5398
  for (const page of ssgPages) {
5371
5399
  try {
5372
5400
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5373
5401
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5374
5402
  const mod = await routeManager.loadRouteModule(page.filePath);
5375
- if (!_optionalChain([mod, 'optionalAccess', _459 => _459.default])) return;
5403
+ if (!_optionalChain([mod, 'optionalAccess', _461 => _461.default])) return;
5376
5404
  const { layouts } = routeManager.matchRoute(page.urlPath);
5377
5405
  const layoutModules = await Promise.all(
5378
5406
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5404,7 +5432,7 @@ if (import.meta.hot) {
5404
5432
  const i18nSnapshot = _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, );
5405
5433
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5406
5434
  const fullHtml = `<!DOCTYPE html>
5407
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _460 => _460.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5435
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _462 => _462.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5408
5436
  <head>
5409
5437
  <meta charset="utf-8">
5410
5438
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5449,11 +5477,11 @@ if (import.meta.hot) {
5449
5477
  watchChange(id, change) {
5450
5478
  const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
5451
5479
  const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
5452
- if (appSource) _optionalChain([farmApp, 'optionalAccess', _461 => _461.getRouteManager, 'call', _462 => _462(), 'access', _463 => _463.noteSourceChange, 'call', _464 => _464(id, change.event)]);
5453
- _chunkD2OU4CX2cjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
5454
- _chunkD2OU4CX2cjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
5455
- _chunkPVB5UYJTcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
5456
- _chunkD2OU4CX2cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5480
+ if (appSource) _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464(), 'access', _465 => _465.noteSourceChange, 'call', _466 => _466(id, change.event)]);
5481
+ _chunkGWFNJLDNcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
5482
+ _chunkGWFNJLDNcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
5483
+ _chunkTAXZQNFZcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
5484
+ _chunkGWFNJLDNcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5457
5485
  },
5458
5486
  async handleHotUpdate(ctx) {
5459
5487
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5478,7 +5506,7 @@ if (import.meta.hot) {
5478
5506
  server2.moduleGraph.invalidateModule(mod);
5479
5507
  }
5480
5508
  }
5481
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _465 => _465.getConfig, 'call', _466 => _466()]);
5509
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _467 => _467.getConfig, 'call', _468 => _468()]);
5482
5510
  const normalizedFile = file.replace(/\\/g, "/");
5483
5511
  const reloadAfterEdit = () => {
5484
5512
  for (const files of pendingRouteReloads) {
@@ -5486,10 +5514,10 @@ if (import.meta.hot) {
5486
5514
  }
5487
5515
  server2.ws.send({ type: "full-reload", path: "*" });
5488
5516
  };
5489
- if (normalizedFile.includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5517
+ if (normalizedFile.includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5490
5518
  path6.posix.join(
5491
- _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _467 => _467.root]) || options.root || server2.config.root),
5492
- _chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5519
+ _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _469 => _469.root]) || options.root || server2.config.root),
5520
+ _chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5493
5521
  )
5494
5522
  ))
5495
5523
  return modules;
@@ -5500,17 +5528,17 @@ if (import.meta.hot) {
5500
5528
  (appDir) => normalizedFile.startsWith(`${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appDir)}/api/`)
5501
5529
  )) {
5502
5530
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5503
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _468 => _468(`updated ${file}`)]);
5531
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5504
5532
  reloadAfterEdit();
5505
5533
  return [];
5506
5534
  }
5507
5535
  const currentSrcRoot = currentFarmConfig ? _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5508
- if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5536
+ if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkLH7S7FI3cjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5509
5537
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5510
5538
  for (const mod of modules) {
5511
5539
  server2.moduleGraph.invalidateModule(mod);
5512
5540
  }
5513
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _469 => _469(`updated ${file}`)]);
5541
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5514
5542
  reloadAfterEdit();
5515
5543
  return [];
5516
5544
  }
@@ -5520,22 +5548,27 @@ if (import.meta.hot) {
5520
5548
  for (const mod of modules) {
5521
5549
  server2.moduleGraph.invalidateModule(mod);
5522
5550
  }
5523
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5551
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5524
5552
  reloadAfterEdit();
5525
5553
  return [];
5526
5554
  }
5527
5555
  if (apiRouteManager && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5528
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5556
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5557
+ }
5558
+ if (_optionalChain([refreshFarmDocsConfig, 'optionalCall', _474 => _474(file)])) {
5559
+ logUpdate("PAGE", `updated ${path6.basename(file)}`);
5560
+ reloadAfterEdit();
5561
+ return [];
5529
5562
  }
5530
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _472 => _472.experimental, 'optionalAccess', _473 => _473.isolatedClientHydration]);
5531
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _474 => _474.getRouteManager, 'call', _475 => _475()]);
5563
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.experimental, 'optionalAccess', _476 => _476.isolatedClientHydration]);
5564
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getRouteManager, 'call', _478 => _478()]);
5532
5565
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5533
- const tracksAsyncOwnerIslands = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _476 => _476.renderer])) && planRouteManager !== void 0;
5566
+ const tracksAsyncOwnerIslands = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.renderer])) && planRouteManager !== void 0;
5534
5567
  let clientPlanCurrent = false;
5535
5568
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5536
5569
  const routeManager = planRouteManager;
5537
- await _optionalChain([ctx, 'access', _477 => _477.read, 'optionalCall', _478 => _478()]);
5538
- if (_optionalChain([routeManager, 'optionalAccess', _479 => _479.isEditPlanNeutral, 'call', _480 => _480(file)])) {
5570
+ await _optionalChain([ctx, 'access', _480 => _480.read, 'optionalCall', _481 => _481()]);
5571
+ if (_optionalChain([routeManager, 'optionalAccess', _482 => _482.isEditPlanNeutral, 'call', _483 => _483(file)])) {
5539
5572
  clientPlanCurrent = true;
5540
5573
  } else if (routeManager) {
5541
5574
  routeManager.noteSourceChange(file, "update");
@@ -5579,7 +5612,7 @@ if (import.meta.hot) {
5579
5612
  }
5580
5613
  }
5581
5614
  }
5582
- const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _481 => _481.getRouteManager, 'call', _482 => _482(), 'access', _483 => _483.isRendererRouteModule, 'call', _484 => _484(normalizedFile)]) === true;
5615
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _484 => _484.getRouteManager, 'call', _485 => _485(), 'access', _486 => _486.isRendererRouteModule, 'call', _487 => _487(normalizedFile)]) === true;
5583
5616
  if (normalizedFile.includes("/app/") || rendererRouteFile) {
5584
5617
  if (normalizedFile.includes("middleware.")) {
5585
5618
  if (middlewareManager) {
@@ -5597,7 +5630,7 @@ if (import.meta.hot) {
5597
5630
  }
5598
5631
  return [];
5599
5632
  }
5600
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _485 => _485.getRouteManager, 'call', _486 => _486(), 'access', _487 => _487.invalidateClientManifest, 'call', _488 => _488()]);
5633
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _488 => _488.getRouteManager, 'call', _489 => _489(), 'access', _490 => _490.invalidateClientManifest, 'call', _491 => _491()]);
5601
5634
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5602
5635
  if (manifestModule) {
5603
5636
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5613,14 +5646,14 @@ if (import.meta.hot) {
5613
5646
  }
5614
5647
  }
5615
5648
  if (currentFarmConfig && planRouteManager && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
5616
- _optionalChain([server2, 'access', _489 => _489.environments, 'access', _490 => _490.client, 'optionalAccess', _491 => _491.moduleGraph]),
5649
+ _optionalChain([server2, 'access', _492 => _492.environments, 'access', _493 => _493.client, 'optionalAccess', _494 => _494.moduleGraph]),
5617
5650
  normalizedFile,
5618
5651
  planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
5619
5652
  )) {
5620
5653
  reloadAfterEdit();
5621
5654
  return [];
5622
5655
  }
5623
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _492 => _492.environments, 'access', _493 => _493.client, 'optionalAccess', _494 => _494.moduleGraph, 'access', _495 => _495.getModulesByFile, 'call', _496 => _496(normalizedFile), 'optionalAccess', _497 => _497.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5656
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _495 => _495.environments, 'access', _496 => _496.client, 'optionalAccess', _497 => _497.moduleGraph, 'access', _498 => _498.getModulesByFile, 'call', _499 => _499(normalizedFile), 'optionalAccess', _500 => _500.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5624
5657
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5625
5658
  reloadAfterEdit();
5626
5659
  return [];
@@ -5628,10 +5661,11 @@ if (import.meta.hot) {
5628
5661
  return modules;
5629
5662
  }
5630
5663
  };
5631
- if (!deferredSetup) return plugin;
5632
5664
  const setUpDevServer = plugin.configureServer;
5665
+ plugin.configureServer = { order: "post", handler: setUpDevServer };
5666
+ if (!deferredSetup) return plugin;
5633
5667
  let deferred = false;
5634
- plugin.configureServer = function(viteServer) {
5668
+ const setUpDeferredDevServer = function(viteServer) {
5635
5669
  if (deferred) {
5636
5670
  deferredGates = void 0;
5637
5671
  return setUpDevServer.call(this, viteServer);
@@ -5661,6 +5695,7 @@ if (import.meta.hot) {
5661
5695
  viteServer.middlewares.use(post);
5662
5696
  };
5663
5697
  };
5698
+ plugin.configureServer = { order: "post", handler: setUpDeferredDevServer };
5664
5699
  return plugin;
5665
5700
  }
5666
5701
  function runFarmMiddlewareWithNavigation(renderer, middlewareRequest, req, res, execute) {
@@ -5718,7 +5753,7 @@ function createPageDataMiddlewareResponse(res) {
5718
5753
  return (...args) => {
5719
5754
  if (captures(target.statusCode, target.getHeader("location"))) {
5720
5755
  const callback = args.find((arg) => typeof arg === "function");
5721
- _optionalChain([callback, 'optionalCall', _498 => _498()]);
5756
+ _optionalChain([callback, 'optionalCall', _501 => _501()]);
5722
5757
  return property === "write" ? true : response;
5723
5758
  }
5724
5759
  return target[property](...args);
@@ -5782,27 +5817,27 @@ function isFarmClientVirtualId(id) {
5782
5817
  }
5783
5818
  function isClientEnvironment(context, loadOptions) {
5784
5819
  const environment = context.environment;
5785
- if (_optionalChain([environment, 'optionalAccess', _499 => _499.config, 'optionalAccess', _500 => _500.consumer])) return environment.config.consumer === "client";
5786
- if (_optionalChain([environment, 'optionalAccess', _501 => _501.name])) return environment.name === "client";
5787
- return _optionalChain([loadOptions, 'optionalAccess', _502 => _502.ssr]) !== true;
5820
+ if (_optionalChain([environment, 'optionalAccess', _502 => _502.config, 'optionalAccess', _503 => _503.consumer])) return environment.config.consumer === "client";
5821
+ if (_optionalChain([environment, 'optionalAccess', _504 => _504.name])) return environment.name === "client";
5822
+ return _optionalChain([loadOptions, 'optionalAccess', _505 => _505.ssr]) !== true;
5788
5823
  }
5789
5824
  function invalidateProgrammaticClientRouteModules(server) {
5790
- const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
5825
+ const graph = _optionalChain([server, 'access', _506 => _506.environments, 'optionalAccess', _507 => _507.client, 'optionalAccess', _508 => _508.moduleGraph]);
5791
5826
  if (!graph) return;
5792
5827
  for (const [id, module] of graph.idToModuleMap) {
5793
- if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
5828
+ if (_chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
5794
5829
  }
5795
5830
  }
5796
5831
  function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, clientRoutes, watchFile) {
5797
- const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5832
+ const parsed = _chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5798
5833
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5799
5834
  watchFile(routesFile);
5800
- return _chunkD2OU4CX2cjs.generateProgrammaticClientRouteModule.call(void 0, {
5835
+ return _chunkGWFNJLDNcjs.generateProgrammaticClientRouteModule.call(void 0, {
5801
5836
  kind: parsed.kind,
5802
5837
  routePath: parsed.routePath,
5803
5838
  routesFile,
5804
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
5805
- _chunkD2OU4CX2cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5839
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _509 => _509.routes, 'access', _510 => _510.get, 'call', _511 => _511(
5840
+ _chunkGWFNJLDNcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5806
5841
  )]),
5807
5842
  // React's client module exports no createElement; the main client entry imports React too.
5808
5843
  rendererClient: _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
@@ -5810,7 +5845,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5810
5845
  });
5811
5846
  }
5812
5847
  function resolveRealModuleFile(filePath, root) {
5813
- const resolved = _nullishCoalesce(_chunkD2OU4CX2cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5848
+ const resolved = _nullishCoalesce(_chunkGWFNJLDNcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5814
5849
  try {
5815
5850
  return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5816
5851
  } catch (e29) {
@@ -5818,7 +5853,7 @@ function resolveRealModuleFile(filePath, root) {
5818
5853
  }
5819
5854
  }
5820
5855
  function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER) {
5821
- const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5856
+ const parsed = _chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5822
5857
  if (!parsed) {
5823
5858
  return "";
5824
5859
  }
@@ -6124,12 +6159,12 @@ async function parseRouteModuleProps(routeModule, input) {
6124
6159
  }
6125
6160
  const schemas = routeModule.__farmRouteSchemas;
6126
6161
  const params = parseRouteModuleSchema(
6127
- _optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
6162
+ _optionalChain([schemas, 'optionalAccess', _512 => _512.params]),
6128
6163
  input.props.params,
6129
6164
  "params",
6130
6165
  input.routePath
6131
6166
  );
6132
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
6167
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _513 => _513.search]), input.search, "search", input.routePath);
6133
6168
  return {
6134
6169
  ...input.props,
6135
6170
  params,
@@ -6149,12 +6184,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6149
6184
  }
6150
6185
  }
6151
6186
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6152
- const providerClientCode = _chunkPVB5UYJTcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6187
+ const providerClientCode = _chunkTAXZQNFZcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6153
6188
  integrationProviders,
6154
6189
  root,
6155
6190
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
6156
6191
  );
6157
- const clientPluginEntry = _chunkADCVSTFVcjs.generateFarmClientPluginEntryCode.call(void 0,
6192
+ const clientPluginEntry = _chunkWAQIO2VDcjs.generateFarmClientPluginEntryCode.call(void 0,
6158
6193
  plugins,
6159
6194
  root,
6160
6195
  srcDir,
@@ -6247,7 +6282,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6247
6282
  return null;
6248
6283
  }
6249
6284
  }
6250
- ${islandValues ? `${_chunkPVB5UYJTcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6285
+ ${islandValues ? `${_chunkTAXZQNFZcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6251
6286
  let farmLastRouteState = null;
6252
6287
 
6253
6288
  // A hot update to a layout tree's client module renders the route again.
@@ -7088,7 +7123,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
7088
7123
  return loadedLayouts;
7089
7124
  }
7090
7125
 
7091
- ${_chunkPVB5UYJTcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7126
+ ${_chunkTAXZQNFZcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7092
7127
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
7093
7128
  let wrapped = element;
7094
7129
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7388,7 +7423,7 @@ function readActiveLayoutPatterns() {
7388
7423
  );
7389
7424
  }
7390
7425
 
7391
- ${_chunkPVB5UYJTcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7426
+ ${_chunkTAXZQNFZcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7392
7427
 
7393
7428
  function activateFragmentScripts(root) {
7394
7429
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7447,7 +7482,7 @@ function getLayoutShell(root, patterns, index, find) {
7447
7482
  return shell.innerHTML;
7448
7483
  }
7449
7484
 
7450
- ${islandValues ? _chunkPVB5UYJTcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7485
+ ${islandValues ? _chunkTAXZQNFZcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7451
7486
  container,
7452
7487
  fragment,
7453
7488
  currentPatterns,
@@ -7522,9 +7557,9 @@ ${islandValues ? `
7522
7557
  return nextTarget;
7523
7558
  }
7524
7559
 
7525
- ${islandValues ? `${_chunkPVB5UYJTcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7560
+ ${islandValues ? `${_chunkTAXZQNFZcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7526
7561
 
7527
- ${_chunkPVB5UYJTcjs.FARM_EARLY_NAVIGATION_SOURCE}
7562
+ ${_chunkTAXZQNFZcjs.FARM_EARLY_NAVIGATION_SOURCE}
7528
7563
 
7529
7564
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7530
7565
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -8228,9 +8263,9 @@ function generateClientManifest(bundle) {
8228
8263
  return manifest;
8229
8264
  }
8230
8265
  async function defineConfig(config = {}) {
8231
- const tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, );
8266
+ const tailwindVitePlugin = await _chunkWAQIO2VDcjs.loadTailwindVitePlugin.call(void 0, );
8232
8267
  const appRoot = path6.resolve(config.root || process.cwd());
8233
- if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
8268
+ if (_optionalChain([config, 'access', _514 => _514.extends, 'optionalAccess', _515 => _515.length])) {
8234
8269
  const { config: layeredConfig } = await import("./layers-6R55QDT5.cjs").then(
8235
8270
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8236
8271
  root: appRoot,
@@ -8240,11 +8275,11 @@ async function defineConfig(config = {}) {
8240
8275
  config = layeredConfig;
8241
8276
  }
8242
8277
  config.renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
8243
- config.images = _chunkPVB5UYJTcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8278
+ config.images = _chunkTAXZQNFZcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8244
8279
  const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8245
8280
  ssr: true
8246
8281
  });
8247
- const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkQCVP22KWcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8282
+ const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await _chunk5RYBQKBYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8248
8283
  const nodeBuiltinStubs = {
8249
8284
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8250
8285
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8332,13 +8367,13 @@ async function defineConfig(config = {}) {
8332
8367
  if (!serverStarted) {
8333
8368
  serverStarted = true;
8334
8369
  const elapsed = Date.now() - startTime;
8335
- const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
8370
+ const address = _optionalChain([server, 'access', _516 => _516.httpServer, 'optionalAccess', _517 => _517.address, 'call', _518 => _518()]);
8336
8371
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8337
8372
  const hostConfig = server.config.server.host;
8338
8373
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8339
8374
  console.log("");
8340
8375
  console.log(
8341
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkJZAGIXMBcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8376
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkC2J5LMH6cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8342
8377
  );
8343
8378
  console.log("");
8344
8379
  console.log(
@@ -8371,8 +8406,8 @@ async function defineConfig(config = {}) {
8371
8406
  return {
8372
8407
  plugins: [
8373
8408
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8374
- _chunkQCVP22KWcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8375
- _chunkPVB5UYJTcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8409
+ _chunk5RYBQKBYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8410
+ _chunkTAXZQNFZcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8376
8411
  tailwindVitePlugin,
8377
8412
  ...rendererVitePlugins,
8378
8413
  ...reactRefreshPlugins,
@@ -8382,14 +8417,14 @@ async function defineConfig(config = {}) {
8382
8417
  farmNavigationPlugin(config.renderer),
8383
8418
  farmIslandContainersPlugin(config),
8384
8419
  farmPlugin(config),
8385
- _chunkD2OU4CX2cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8420
+ _chunkGWFNJLDNcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8386
8421
  farmBrandingPlugin
8387
8422
  ],
8388
8423
  customLogger: farmLogger,
8389
8424
  clearScreen: false,
8390
8425
  optimizeDeps: {
8391
- ..._chunkPVB5UYJTcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8392
- _chunkPVB5UYJTcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8426
+ ..._chunkTAXZQNFZcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8427
+ _chunkTAXZQNFZcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8393
8428
  appRoot,
8394
8429
  _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8395
8430
  ),
@@ -8433,7 +8468,7 @@ async function defineConfig(config = {}) {
8433
8468
  // Stub out problematic server-only modules during dev mode
8434
8469
  alias: {
8435
8470
  ..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, config.layers),
8436
- ..._chunkPVB5UYJTcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8471
+ ..._chunkTAXZQNFZcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8437
8472
  // Nitro internals that should not be resolved in browser
8438
8473
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8439
8474
  "@poppinss/dumper": "data:text/javascript,export default {};",