@farm.js/core 0.1.78 → 0.1.80

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 (363) hide show
  1. package/dist/{agent-mcp-handler-EDJNU224.mjs → agent-mcp-handler-GDY5CPPW.mjs} +5 -5
  2. package/dist/{agent-mcp-handler-LNBYLRTZ.cjs → agent-mcp-handler-IUL6OPC3.cjs} +6 -6
  3. package/dist/{agent-mcp.d-BErtnhV2.d.ts → agent-mcp.d-BPa5n0ld.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-CYHfcjur.d.mts → agent-mcp.d-DOP95Jxm.d.mts} +1 -1
  5. package/dist/agent-runtime.cjs +2 -2
  6. package/dist/agent-runtime.d.mts +4 -4
  7. package/dist/agent-runtime.d.ts +4 -4
  8. package/dist/agent-runtime.mjs +1 -1
  9. package/dist/{analyzer-M2BG6QYU.mjs → analyzer-F7CWE5VA.mjs} +2 -2
  10. package/dist/analyzer-I7RBBQ65.cjs +16 -0
  11. package/dist/api/node.cjs +6 -6
  12. package/dist/api/node.d.mts +6 -6
  13. package/dist/api/node.d.ts +6 -6
  14. package/dist/api/node.mjs +5 -5
  15. package/dist/api/route-manager.cjs +8 -8
  16. package/dist/api/route-manager.d.mts +6 -6
  17. package/dist/api/route-manager.d.ts +6 -6
  18. package/dist/api/route-manager.mjs +7 -7
  19. package/dist/api/runtime.cjs +5 -5
  20. package/dist/api/runtime.d.mts +5 -5
  21. package/dist/api/runtime.d.ts +5 -5
  22. package/dist/api/runtime.mjs +4 -4
  23. package/dist/api.cjs +10 -10
  24. package/dist/api.d.mts +7 -7
  25. package/dist/api.d.ts +7 -7
  26. package/dist/api.mjs +9 -9
  27. package/dist/{app-manifest.d-6NCkLQ1y.d.mts → app-manifest.d-9UD6BznX.d.mts} +1 -1
  28. package/dist/{app-manifest.d-DuqLBcmi.d.ts → app-manifest.d-CO6Iu0Hx.d.ts} +1 -1
  29. package/dist/app-markdown.cjs +5 -5
  30. package/dist/app-markdown.d.mts +5 -5
  31. package/dist/app-markdown.d.ts +5 -5
  32. package/dist/app-markdown.mjs +4 -4
  33. package/dist/{app.d-Dk2HkvPh.d.mts → app.d-DXeRWZK7.d.mts} +4 -4
  34. package/dist/{app.d-Bz6vYBFF.d.ts → app.d-DwX1ePhs.d.ts} +4 -4
  35. package/dist/cache.cjs +3 -3
  36. package/dist/cache.mjs +2 -2
  37. package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
  38. package/dist/{chunk-4SLHSODZ.cjs → chunk-2FK47RRZ.cjs} +13 -13
  39. package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
  40. package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
  41. package/dist/{chunk-B3IRRANH.mjs → chunk-2RRTOKRZ.mjs} +1 -1
  42. package/dist/{chunk-PNWRH6TR.mjs → chunk-3JQBQG7K.mjs} +4 -4
  43. package/dist/{chunk-H76C5AOU.mjs → chunk-3K2E55BJ.mjs} +2 -2
  44. package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
  45. package/dist/{chunk-R77D7TCZ.mjs → chunk-44G4XHEL.mjs} +13 -6
  46. package/dist/{chunk-6XDDE7M6.cjs → chunk-4H4ZXUNB.cjs} +3 -3
  47. package/dist/{chunk-LIC6CMLB.mjs → chunk-4MIDUSIX.mjs} +13 -13
  48. package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
  49. package/dist/{chunk-VRI43FDN.mjs → chunk-4WXNTAOM.mjs} +1 -1
  50. package/dist/{chunk-5KISFWD2.cjs → chunk-5OAN7BG5.cjs} +12 -12
  51. package/dist/{chunk-DPBQRDWW.cjs → chunk-5VDJEKGK.cjs} +3 -3
  52. package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
  53. package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
  54. package/dist/{chunk-CBP7AKZH.mjs → chunk-6GJZJAED.mjs} +1 -1
  55. package/dist/{chunk-K3ZELA6U.cjs → chunk-7DD5TNPS.cjs} +8 -8
  56. package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
  57. package/dist/{chunk-62DZHPDK.cjs → chunk-7YLDUB4R.cjs} +10 -10
  58. package/dist/{chunk-ZEWIWAS2.mjs → chunk-A5D3UMLJ.mjs} +1 -1
  59. package/dist/{chunk-NNGBTJCX.cjs → chunk-ANZLZNNX.cjs} +83 -25
  60. package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
  61. package/dist/{chunk-ZCYGYIC2.cjs → chunk-AXA2BSX3.cjs} +2 -2
  62. package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
  63. package/dist/{chunk-X2SEYK7I.mjs → chunk-BPWTSPK6.mjs} +3 -3
  64. package/dist/{chunk-LMXGCFAM.cjs → chunk-CCMP4JD2.cjs} +1 -1
  65. package/dist/{chunk-JHZ6HULQ.cjs → chunk-CGIVCGH5.cjs} +2 -2
  66. package/dist/{chunk-ERT6HQAI.mjs → chunk-CNDBLUKI.mjs} +2 -2
  67. package/dist/{chunk-OGVOKAQU.mjs → chunk-COTFX4GT.mjs} +1 -1
  68. package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
  69. package/dist/{chunk-2G6JPLSL.cjs → chunk-DVHFIETW.cjs} +25 -18
  70. package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
  71. package/dist/{chunk-VCW6BR6U.mjs → chunk-EG5YBYHO.mjs} +2 -2
  72. package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
  73. package/dist/{chunk-XT2CHTDN.mjs → chunk-EY7ED5UW.mjs} +3 -3
  74. package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
  75. package/dist/{chunk-DD2ANOEF.cjs → chunk-G4SZC2WH.cjs} +589 -472
  76. package/dist/{chunk-H5OVJHXY.cjs → chunk-GAWSWJJ2.cjs} +27 -27
  77. package/dist/{chunk-CKNZJFK5.cjs → chunk-GBESKA76.cjs} +3 -3
  78. package/dist/{chunk-EBFTAVGD.mjs → chunk-GBW5DU7V.mjs} +327 -210
  79. package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
  80. package/dist/{chunk-Q2EKSSEG.cjs → chunk-HEDGTXXB.cjs} +14 -14
  81. package/dist/{chunk-5QZT2EQN.cjs → chunk-HNUBRUFQ.cjs} +2 -2
  82. package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
  83. package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
  84. package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
  85. package/dist/{chunk-VRJAMU34.mjs → chunk-JGEN2FIT.mjs} +1 -1
  86. package/dist/{chunk-QES76U42.mjs → chunk-K3XKEZR6.mjs} +3 -3
  87. package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
  88. package/dist/{chunk-7JTVN6IJ.mjs → chunk-KEU55O2D.mjs} +1 -1
  89. package/dist/{chunk-5REIO5DT.mjs → chunk-KKVRWNDH.mjs} +3 -3
  90. package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
  91. package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
  92. package/dist/{chunk-F7PKUP6P.cjs → chunk-LVGB5PYK.cjs} +27 -27
  93. package/dist/{chunk-7RQ5KAK6.mjs → chunk-MDEFTF63.mjs} +69 -14
  94. package/dist/{chunk-IWGGRXD2.cjs → chunk-MHKPXX3J.cjs} +2 -2
  95. package/dist/{chunk-5DREJN4G.cjs → chunk-MQOHYV6L.cjs} +15 -15
  96. package/dist/{chunk-BGUTIQII.mjs → chunk-MUZHULW2.mjs} +1 -1
  97. package/dist/{chunk-WGNGM6MJ.mjs → chunk-MZ5QGWRW.mjs} +2 -2
  98. package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
  99. package/dist/{chunk-WJ4NUY2H.mjs → chunk-NJ4OASLP.mjs} +4 -4
  100. package/dist/{chunk-EVVV2XZ2.cjs → chunk-NW3DL2PM.cjs} +53 -7
  101. package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
  102. package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
  103. package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
  104. package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
  105. package/dist/{chunk-PG7J7XYT.cjs → chunk-Q4TRGTO7.cjs} +6 -6
  106. package/dist/{chunk-KUXEII7V.mjs → chunk-Q4YEAWUK.mjs} +1 -1
  107. package/dist/{chunk-IGE5BAWK.mjs → chunk-QBJ6N5MT.mjs} +53 -7
  108. package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
  109. package/dist/{chunk-S6RUJRWI.mjs → chunk-QHAISITM.mjs} +1 -1
  110. package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
  111. package/dist/{chunk-TZ2YPXLB.cjs → chunk-RLCOWWE5.cjs} +7 -7
  112. package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
  113. package/dist/{chunk-VO5XDZHK.mjs → chunk-RPA45OQS.mjs} +2 -2
  114. package/dist/{chunk-A37D6LOS.mjs → chunk-RQBGHHOQ.mjs} +1 -1
  115. package/dist/{chunk-BZJYPIFZ.cjs → chunk-SDICLSQU.cjs} +8 -8
  116. package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
  117. package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
  118. package/dist/{chunk-26CNCIFI.cjs → chunk-T3SMMLSB.cjs} +2 -2
  119. package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
  120. package/dist/{chunk-LJKTJNOF.cjs → chunk-TS3ZHJN5.cjs} +3 -3
  121. package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
  122. package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
  123. package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
  124. package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
  125. package/dist/{chunk-PE2LEWXA.mjs → chunk-UJPE75GF.mjs} +1 -1
  126. package/dist/{chunk-6ZFGWB75.cjs → chunk-UWOCYINY.cjs} +4 -4
  127. package/dist/{chunk-E7V2GYBP.mjs → chunk-V73Y4UBL.mjs} +67 -9
  128. package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
  129. package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
  130. package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
  131. package/dist/{chunk-47R7CX4A.mjs → chunk-WBPVLCNE.mjs} +1 -1
  132. package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
  133. package/dist/{chunk-NB2ZEBIS.cjs → chunk-WJ2O2MPP.cjs} +287 -288
  134. package/dist/{chunk-HVMQAVZK.cjs → chunk-X4TSMQWF.cjs} +333 -303
  135. package/dist/{chunk-DASQJ5UD.mjs → chunk-XF7MJSUS.mjs} +1 -1
  136. package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
  137. package/dist/{chunk-YN7G22MP.cjs → chunk-XKUKWMGX.cjs} +3 -3
  138. package/dist/{chunk-FOULIN4S.cjs → chunk-XY5OZQF6.cjs} +2 -2
  139. package/dist/{chunk-RIMEFQYO.mjs → chunk-XZBBKZGW.mjs} +73 -74
  140. package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
  141. package/dist/{chunk-A7EJATEW.mjs → chunk-YN3YMSKD.mjs} +3 -3
  142. package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
  143. package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
  144. package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
  145. package/dist/{chunk-KZ5BOWJS.cjs → chunk-Z4SMFUZ7.cjs} +28 -28
  146. package/dist/{chunk-MBD34AS5.cjs → chunk-Z5BANEQD.cjs} +6 -6
  147. package/dist/{chunk-AHGOHPRN.mjs → chunk-ZDYYZX73.mjs} +60 -30
  148. package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
  149. package/dist/{chunk-XGS76V7L.cjs → chunk-ZPEZXQTM.cjs} +22 -22
  150. package/dist/{chunk-ODYKCC6W.cjs → chunk-ZVSQN7NC.cjs} +135 -80
  151. package/dist/{cli-runtime.d-BG9q2_vC.d.ts → cli-runtime.d-8BhZy_wr.d.ts} +7 -6
  152. package/dist/{cli-runtime.d-CGMGs1Zz.d.mts → cli-runtime.d-DPNTN-JV.d.mts} +7 -6
  153. package/dist/client/lifecycle.d.mts +1 -1
  154. package/dist/client/lifecycle.d.ts +1 -1
  155. package/dist/{client-component.d-CdsG1E7p.d.mts → client-component.d-CMCdyAr8.d.mts} +1 -1
  156. package/dist/{client-component.d-B84GPb_u.d.ts → client-component.d-CkDcob6D.d.ts} +1 -1
  157. package/dist/{client-plugins.d-FptsHgls.d.ts → client-plugins.d-BYIovYqX.d.ts} +4 -4
  158. package/dist/{client-plugins.d-DX-iCJWE.d.mts → client-plugins.d-WcMwOZGZ.d.mts} +4 -4
  159. package/dist/client-plugins.d.mts +4 -4
  160. package/dist/client-plugins.d.ts +4 -4
  161. package/dist/client.cjs +3 -3
  162. package/dist/client.d.mts +9 -9
  163. package/dist/client.d.ts +9 -9
  164. package/dist/client.mjs +2 -2
  165. package/dist/config.d.mts +4 -4
  166. package/dist/config.d.ts +4 -4
  167. package/dist/cron.cjs +3 -3
  168. package/dist/cron.mjs +2 -2
  169. package/dist/desktop.d.mts +5 -5
  170. package/dist/desktop.d.ts +5 -5
  171. package/dist/{devtools-7P3OUNLV.mjs → devtools-F3FDFV26.mjs} +10 -10
  172. package/dist/{devtools-TMATFNUY.cjs → devtools-JJOYTIMS.cjs} +12 -12
  173. package/dist/docs.cjs +14 -14
  174. package/dist/docs.d.mts +6 -6
  175. package/dist/docs.d.ts +6 -6
  176. package/dist/docs.mjs +13 -13
  177. package/dist/environment/vite.cjs +5 -5
  178. package/dist/environment/vite.d.mts +9 -0
  179. package/dist/environment/vite.d.ts +9 -0
  180. package/dist/environment/vite.mjs +4 -4
  181. package/dist/{handler.d-Cy3XbY_W.d.ts → handler.d-BwdOyc9x.d.ts} +1 -1
  182. package/dist/{handler.d-DSwLTpa5.d.mts → handler.d-s3IM6pbJ.d.mts} +1 -1
  183. package/dist/{headers.d-DiL9YTH3.d.mts → headers.d-BR-OXrqQ.d.mts} +1 -1
  184. package/dist/{headers.d-Qbjo38a0.d.ts → headers.d-CAW4wPey.d.ts} +1 -1
  185. package/dist/index.cjs +65 -59
  186. package/dist/{index.d-CqQKX3s6.d.mts → index.d-BEVK61zS.d.mts} +1 -1
  187. package/dist/{index.d-OccJoC6I.d.ts → index.d-ah2c89Wu.d.ts} +1 -1
  188. package/dist/index.d.mts +25 -25
  189. package/dist/index.d.ts +25 -25
  190. package/dist/index.mjs +67 -61
  191. package/dist/integrations/orm.cjs +3 -3
  192. package/dist/integrations/orm.d.mts +4 -4
  193. package/dist/integrations/orm.d.ts +4 -4
  194. package/dist/integrations/orm.mjs +2 -2
  195. package/dist/integrations.cjs +2 -2
  196. package/dist/integrations.d.mts +4 -4
  197. package/dist/integrations.d.ts +4 -4
  198. package/dist/integrations.mjs +1 -1
  199. package/dist/internal/app-markdown-runtime.cjs +4 -4
  200. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  201. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  202. package/dist/internal/app-markdown-runtime.mjs +3 -3
  203. package/dist/internal/build-runtime.cjs +47 -47
  204. package/dist/internal/build-runtime.d.mts +7 -7
  205. package/dist/internal/build-runtime.d.ts +7 -7
  206. package/dist/internal/build-runtime.mjs +46 -46
  207. package/dist/internal/cli-runtime.cjs +29 -26
  208. package/dist/internal/cli-runtime.d.mts +11 -11
  209. package/dist/internal/cli-runtime.d.ts +11 -11
  210. package/dist/internal/cli-runtime.mjs +28 -25
  211. package/dist/internal/client-error-overlay.cjs +4 -4
  212. package/dist/internal/client-error-overlay.mjs +1 -1
  213. package/dist/internal/client-runtime.cjs +48 -11
  214. package/dist/internal/client-runtime.d.mts +17 -21
  215. package/dist/internal/client-runtime.d.ts +17 -21
  216. package/dist/internal/client-runtime.mjs +37 -0
  217. package/dist/internal/compression-runtime.d.mts +4 -4
  218. package/dist/internal/compression-runtime.d.ts +4 -4
  219. package/dist/internal/config-runtime.cjs +12 -12
  220. package/dist/internal/config-runtime.d.mts +6 -6
  221. package/dist/internal/config-runtime.d.ts +6 -6
  222. package/dist/internal/config-runtime.mjs +11 -11
  223. package/dist/internal/infra-analytics-runtime.cjs +10 -10
  224. package/dist/internal/infra-analytics-runtime.mjs +8 -8
  225. package/dist/internal/islands-boot.cjs +33 -5
  226. package/dist/internal/islands-boot.d.mts +19 -1
  227. package/dist/internal/islands-boot.d.ts +19 -1
  228. package/dist/internal/islands-boot.mjs +32 -4
  229. package/dist/internal/native-server-fns.cjs +4 -4
  230. package/dist/internal/native-server-fns.mjs +3 -3
  231. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  232. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  233. package/dist/internal/production-runtime.cjs +26 -26
  234. package/dist/internal/production-runtime.d.mts +14 -13
  235. package/dist/internal/production-runtime.d.ts +14 -13
  236. package/dist/internal/production-runtime.mjs +27 -27
  237. package/dist/internal/spa-router.cjs +44 -0
  238. package/dist/internal/spa-router.d.mts +41 -0
  239. package/dist/internal/spa-router.d.ts +41 -0
  240. package/dist/internal/spa-router.mjs +44 -0
  241. package/dist/internal/start-manifest.d.mts +4 -4
  242. package/dist/internal/start-manifest.d.ts +4 -4
  243. package/dist/internal/vercel-edge-middleware.cjs +3 -3
  244. package/dist/internal/vercel-edge-middleware.mjs +2 -2
  245. package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
  246. package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
  247. package/dist/markdown.cjs +3 -3
  248. package/dist/markdown.d.mts +4 -4
  249. package/dist/markdown.d.ts +4 -4
  250. package/dist/markdown.mjs +2 -2
  251. package/dist/middleware.cjs +8 -8
  252. package/dist/middleware.d.mts +4 -4
  253. package/dist/middleware.d.ts +4 -4
  254. package/dist/middleware.mjs +7 -7
  255. package/dist/{mount.d-CPzqOm-a.d.ts → mount.d-DcoPFqv5.d.ts} +1 -1
  256. package/dist/{mount.d-AcJaUtHF.d.mts → mount.d-Ylo-CmzK.d.mts} +1 -1
  257. package/dist/{native-server-fn-handler-WYYY4YBN.mjs → native-server-fn-handler-OXFTI6V5.mjs} +4 -4
  258. package/dist/{native-server-fn-handler-XRTZR7SZ.cjs → native-server-fn-handler-TNVFEQW3.cjs} +5 -5
  259. package/dist/{native-tree-MNUFN5G6.cjs → native-tree-5TENEQ7Y.cjs} +4 -4
  260. package/dist/{native-tree-JDI3LJSH.mjs → native-tree-LNO7K6JR.mjs} +3 -3
  261. package/dist/{navigation-delegate.d-_Df9DnPY.d.ts → navigation-delegate.d-2MK4YSlL.d.ts} +1 -1
  262. package/dist/{navigation-delegate.d-C4i5Y39E.d.mts → navigation-delegate.d-BA5h0fbE.d.mts} +1 -1
  263. package/dist/navigation.cjs +4 -4
  264. package/dist/navigation.d.mts +7 -7
  265. package/dist/navigation.d.ts +7 -7
  266. package/dist/navigation.mjs +3 -3
  267. package/dist/{nitro-NUCTYEKJ.cjs → nitro-6UOJXJZ6.cjs} +7 -7
  268. package/dist/{nitro-VCJ6QQSI.mjs → nitro-C3MYDX7V.mjs} +3 -3
  269. package/dist/observability.cjs +8 -2
  270. package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.mts} +17 -1
  271. package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.ts} +17 -1
  272. package/dist/observability.d.mts +1 -1
  273. package/dist/observability.d.ts +1 -1
  274. package/dist/observability.mjs +7 -1
  275. package/dist/{plugin-TV6W7YNK.mjs → plugin-33I3V42N.mjs} +1 -1
  276. package/dist/{plugin-AGEFSU7K.cjs → plugin-LN3JBZRR.cjs} +2 -2
  277. package/dist/plugin.cjs +37 -37
  278. package/dist/plugin.d.mts +8 -8
  279. package/dist/plugin.d.ts +8 -8
  280. package/dist/plugin.mjs +36 -36
  281. package/dist/query/client.cjs +6 -6
  282. package/dist/query/client.mjs +1 -1
  283. package/dist/{render-plan.d-CslZE7o7.d.ts → render-plan.d-2o-AG-ot.d.ts} +1 -1
  284. package/dist/{render-plan.d-4V_NmaA6.d.mts → render-plan.d-ChYBMhLu.d.mts} +1 -1
  285. package/dist/renderer-client.cjs +4 -4
  286. package/dist/renderer-client.d.mts +7 -7
  287. package/dist/renderer-client.d.ts +7 -7
  288. package/dist/renderer-client.mjs +1 -1
  289. package/dist/renderer.d.mts +16 -1
  290. package/dist/renderer.d.ts +16 -1
  291. package/dist/{request.d-CbV3y7j3.d.ts → request.d-CE0FIkiM.d.ts} +1 -1
  292. package/dist/{request.d-CmLTxEgS.d.mts → request.d-RCnCBuWq.d.mts} +1 -1
  293. package/dist/request.d.mts +5 -5
  294. package/dist/request.d.ts +5 -5
  295. package/dist/{route-rendering.d-CETnXNez.d.ts → route-rendering.d-BTPOM2nU.d.ts} +1 -1
  296. package/dist/{route-rendering.d-CmoqfOmj.d.mts → route-rendering.d-BZJnfKsp.d.mts} +1 -1
  297. package/dist/{router.d-Dga3N5YO.d.ts → router.d-BU_WE6Ol.d.ts} +1 -1
  298. package/dist/{router.d-ktz7pwYm.d.mts → router.d-D8Vvwl4i.d.mts} +1 -1
  299. package/dist/routes.cjs +4 -4
  300. package/dist/routes.d.mts +4 -4
  301. package/dist/routes.d.ts +4 -4
  302. package/dist/routes.mjs +3 -3
  303. package/dist/{rsc-pipeline-JLYD26AR.cjs → rsc-pipeline-A3R4U26C.cjs} +15 -15
  304. package/dist/{rsc-pipeline-N7CWJW7T.mjs → rsc-pipeline-JZWVSHOR.mjs} +14 -14
  305. package/dist/{runtime-QXX2A4TS.mjs → runtime-SQFRHRGJ.mjs} +18 -18
  306. package/dist/{runtime-F5NSS4DD.cjs → runtime-WZ3CHHGJ.cjs} +26 -26
  307. package/dist/{runtime.d-DuaXEM0p.d.mts → runtime.d-BnmuOXVD.d.mts} +1 -1
  308. package/dist/{runtime.d-BWLZUOfA.d.ts → runtime.d-DJ6IIKcF.d.ts} +1 -1
  309. package/dist/{schema-dev-notice-2GN5V7Y2.mjs → schema-dev-notice-EUPAUJVN.mjs} +2 -2
  310. package/dist/{schema-dev-notice-6VCOZGG2.cjs → schema-dev-notice-ZSCL47CT.cjs} +5 -5
  311. package/dist/search-client-A7YJT7JZ.cjs +15 -0
  312. package/dist/{search-client-W4PEFAQB.mjs → search-client-GIXIEU75.mjs} +1 -1
  313. package/dist/{server-components-status.d-C5JpC7_Y.d.ts → server-components-status.d-BeqSXcjM.d.ts} +1 -1
  314. package/dist/{server-components-status.d-CqxtJmqP.d.mts → server-components-status.d-BzOg9M8g.d.mts} +1 -1
  315. package/dist/server-fn.cjs +4 -4
  316. package/dist/server-fn.mjs +3 -3
  317. package/dist/server-plugins.d.mts +6 -6
  318. package/dist/server-plugins.d.ts +6 -6
  319. package/dist/server-query.cjs +5 -5
  320. package/dist/server-query.mjs +4 -4
  321. package/dist/server.cjs +73 -73
  322. package/dist/server.d.mts +15 -15
  323. package/dist/server.d.ts +15 -15
  324. package/dist/server.mjs +47 -47
  325. package/dist/{session-AK2OA5UZ.mjs → session-4IB34X35.mjs} +2 -2
  326. package/dist/session-MOYQJ7E6.cjs +24 -0
  327. package/dist/{spa-router.d-C3LzwTlY.d.ts → spa-router.d-BOwuVkMl.d.ts} +20 -4
  328. package/dist/{spa-router.d-BLE188EL.d.mts → spa-router.d-CDpftSsk.d.mts} +20 -4
  329. package/dist/{ssg.d-DisOfj0I.d.ts → ssg.d-BTVqyq8T.d.ts} +2 -2
  330. package/dist/{ssg.d-QrFyU6T4.d.mts → ssg.d-Bx_WFuwg.d.mts} +2 -2
  331. package/dist/storage.cjs +2 -2
  332. package/dist/storage.d.mts +112 -96
  333. package/dist/storage.d.ts +112 -96
  334. package/dist/storage.mjs +1 -1
  335. package/dist/testing.cjs +11 -11
  336. package/dist/testing.d.mts +4 -4
  337. package/dist/testing.d.ts +4 -4
  338. package/dist/testing.mjs +8 -8
  339. package/dist/{types.d-DW2vyaUq.d.mts → types.d-C5hlNbHa.d.mts} +8 -1
  340. package/dist/{types.d-DW2vyaUq.d.ts → types.d-C5hlNbHa.d.ts} +8 -1
  341. package/dist/{utils.d-BlWZFgdL.d.mts → utils.d-JkrpS-NJ.d.mts} +1 -1
  342. package/dist/{utils.d-7YcgfTCK.d.ts → utils.d-_dvevm5s.d.ts} +1 -1
  343. package/dist/version.cjs +2 -2
  344. package/dist/version.mjs +1 -1
  345. package/dist/vite.cjs +39 -37
  346. package/dist/vite.d.mts +15 -10
  347. package/dist/vite.d.ts +15 -10
  348. package/dist/vite.mjs +38 -36
  349. package/dist/workflows.cjs +3 -3
  350. package/dist/workflows.mjs +2 -2
  351. package/package.json +7 -1
  352. package/types/images.d.ts +9 -0
  353. package/dist/analyzer-KVTUYGTT.cjs +0 -16
  354. package/dist/search-client-6NVC6HM2.cjs +0 -15
  355. package/dist/session-H4TWP73H.cjs +0 -24
  356. package/dist/{chunk-GFXKO4UW.mjs → chunk-3XTRT3MB.mjs} +48 -48
  357. package/dist/{chunk-JKFN3YVG.mjs → chunk-6JWXHPVR.mjs} +0 -0
  358. package/dist/{chunk-522K362I.mjs → chunk-C2OLXVUC.mjs} +0 -0
  359. package/dist/{chunk-MALGIHIC.cjs → chunk-HS4JPIGR.cjs} +0 -0
  360. package/dist/{chunk-CUZT7474.cjs → chunk-TCMRLW3K.cjs} +0 -0
  361. package/dist/{chunk-Q3DO7MVK.mjs → chunk-URBP6DLH.mjs} +0 -0
  362. package/dist/{chunk-AOTD2N5P.cjs → chunk-WGWWRV2M.cjs} +0 -0
  363. package/dist/{chunk-L7Y65BQU.cjs → chunk-WHEQJN4G.cjs} +48 -48
@@ -7,7 +7,7 @@ var _chunkY2FEFQAYcjs = require('./chunk-Y2FEFQAY.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkVJ6L7TIIcjs = require('./chunk-VJ6L7TII.cjs');
10
+ var _chunk3SPECQXIcjs = require('./chunk-3SPECQXI.cjs');
11
11
 
12
12
 
13
13
  var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
@@ -40,22 +40,23 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
40
40
 
41
41
 
42
42
 
43
- var _chunkHVMQAVZKcjs = require('./chunk-HVMQAVZK.cjs');
44
43
 
44
+ var _chunkX4TSMQWFcjs = require('./chunk-X4TSMQWF.cjs');
45
45
 
46
46
 
47
47
 
48
- var _chunkMBD34AS5cjs = require('./chunk-MBD34AS5.cjs');
49
48
 
49
+ var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
50
50
 
51
- var _chunkCUZT7474cjs = require('./chunk-CUZT7474.cjs');
51
+
52
+ var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
52
53
 
53
54
 
54
55
  var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
55
56
 
56
57
 
57
58
 
58
- var _chunkBZJYPIFZcjs = require('./chunk-BZJYPIFZ.cjs');
59
+ var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
59
60
 
60
61
 
61
62
 
@@ -64,7 +65,7 @@ var _chunkBZJYPIFZcjs = require('./chunk-BZJYPIFZ.cjs');
64
65
 
65
66
 
66
67
 
67
- var _chunk6ZFGWB75cjs = require('./chunk-6ZFGWB75.cjs');
68
+ var _chunkUWOCYINYcjs = require('./chunk-UWOCYINY.cjs');
68
69
 
69
70
 
70
71
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -82,13 +83,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
82
83
 
83
84
 
84
85
 
85
- var _chunk5KISFWD2cjs = require('./chunk-5KISFWD2.cjs');
86
+ var _chunk5OAN7BG5cjs = require('./chunk-5OAN7BG5.cjs');
86
87
 
87
88
 
88
- var _chunkYRXPDKMMcjs = require('./chunk-YRXPDKMM.cjs');
89
+ var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
89
90
 
90
91
 
91
- var _chunkFOULIN4Scjs = require('./chunk-FOULIN4S.cjs');
92
+ var _chunkXY5OZQF6cjs = require('./chunk-XY5OZQF6.cjs');
92
93
 
93
94
 
94
95
 
@@ -139,7 +140,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
139
140
 
140
141
 
141
142
 
142
- var _chunkODYKCC6Wcjs = require('./chunk-ODYKCC6W.cjs');
143
+ var _chunkZVSQN7NCcjs = require('./chunk-ZVSQN7NC.cjs');
143
144
 
144
145
 
145
146
 
@@ -163,10 +164,10 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
163
164
 
164
165
 
165
166
 
166
- var _chunkF4ID7BGOcjs = require('./chunk-F4ID7BGO.cjs');
167
+ var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
167
168
 
168
169
 
169
- var _chunkWRWJ7IWTcjs = require('./chunk-WRWJ7IWT.cjs');
170
+ var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
170
171
 
171
172
 
172
173
  var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
@@ -174,17 +175,17 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
174
175
 
175
176
 
176
177
 
177
- var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
178
178
 
179
179
 
180
180
 
181
181
 
182
182
 
183
+ var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
183
184
 
184
185
 
185
186
 
186
187
 
187
- var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
188
+ var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
188
189
 
189
190
 
190
191
 
@@ -196,7 +197,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
196
197
 
197
198
 
198
199
 
199
- var _chunkPG7J7XYTcjs = require('./chunk-PG7J7XYT.cjs');
200
+ var _chunkQ4TRGTO7cjs = require('./chunk-Q4TRGTO7.cjs');
200
201
 
201
202
 
202
203
 
@@ -208,21 +209,21 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
208
209
 
209
210
 
210
211
 
211
- var _chunk2YJ4DHTDcjs = require('./chunk-2YJ4DHTD.cjs');
212
+ var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
212
213
 
213
214
 
214
215
 
215
216
 
216
217
 
217
218
 
218
- var _chunkAOTD2N5Pcjs = require('./chunk-AOTD2N5P.cjs');
219
+ var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
219
220
 
220
221
 
221
222
 
222
223
  var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
223
224
 
224
225
 
225
- var _chunk4SLHSODZcjs = require('./chunk-4SLHSODZ.cjs');
226
+ var _chunk2FK47RRZcjs = require('./chunk-2FK47RRZ.cjs');
226
227
 
227
228
 
228
229
 
@@ -238,7 +239,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
238
239
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
239
240
 
240
241
 
241
- var _chunk5DREJN4Gcjs = require('./chunk-5DREJN4G.cjs');
242
+ var _chunkMQOHYV6Lcjs = require('./chunk-MQOHYV6L.cjs');
242
243
 
243
244
 
244
245
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -250,7 +251,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
250
251
 
251
252
 
252
253
 
253
- var _chunk4VLXQ55Ocjs = require('./chunk-4VLXQ55O.cjs');
254
+ var _chunkWIZRYFB2cjs = require('./chunk-WIZRYFB2.cjs');
254
255
 
255
256
 
256
257
  var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
@@ -280,7 +281,7 @@ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
280
281
 
281
282
 
282
283
 
283
- var _chunkGC5ROI3Acjs = require('./chunk-GC5ROI3A.cjs');
284
+ var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
284
285
 
285
286
 
286
287
  var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
@@ -298,10 +299,10 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
298
299
 
299
300
 
300
301
 
301
- var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
302
+ var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
302
303
 
303
304
 
304
- var _chunkLMXGCFAMcjs = require('./chunk-LMXGCFAM.cjs');
305
+ var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
305
306
 
306
307
 
307
308
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -700,7 +701,7 @@ function findClientServerFnViolation(code, id) {
700
701
  return null;
701
702
  }
702
703
  function createServerFnBoundaryDiagnostic(violation, id, location) {
703
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
704
+ return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
704
705
  "CLIENT_SERVER_FUNCTION",
705
706
  id,
706
707
  `${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.`,
@@ -959,21 +960,21 @@ function readPropertyKey(property) {
959
960
  function createClientBoundaryDiagnostic(file, finding, location) {
960
961
  switch (finding.kind) {
961
962
  case "server-env":
962
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
963
+ return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
963
964
  "CLIENT_SERVER_ENV",
964
965
  file,
965
966
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
966
967
  location
967
968
  );
968
969
  case "public-env":
969
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
970
+ return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
970
971
  "CLIENT_PROCESS_ENV_PUBLIC",
971
972
  file,
972
973
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
973
974
  location
974
975
  );
975
976
  case "builtin":
976
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
977
+ return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
977
978
  "CLIENT_NODE_BUILTIN",
978
979
  file,
979
980
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -987,7 +988,8 @@ var _promises = require('fs/promises');
987
988
 
988
989
  var _imagesize = require('image-size');
989
990
  var FARM_IMAGE_ID_PREFIX = "\0farm:image:";
990
- var STATIC_IMAGE_RE = /\.(?:avif|gif|jpe?g|png|webp)$/i;
991
+ var STATIC_IMAGE_RE = /\.(?:avif|gif|jpe?g|png|svg|webp)$/i;
992
+ var SVG_RE = /\.svg$/i;
991
993
  var SCRIPT_IMPORTER_RE = /\.(?:[cm]?[jt]sx?|mdx?)$/i;
992
994
  function farmImageImportsPlugin() {
993
995
  return {
@@ -1022,7 +1024,7 @@ async function createStaticImageModule(filePath, sourceDeclaration) {
1022
1024
  if (!dimensions.width || !dimensions.height) {
1023
1025
  throw new Error(`Could not determine image dimensions for ${filePath}`);
1024
1026
  }
1025
- const blurDataURL = await createBlurDataURL(bytes);
1027
+ const blurDataURL = SVG_RE.test(filePath) ? void 0 : await createBlurDataURL(bytes);
1026
1028
  return [
1027
1029
  sourceDeclaration,
1028
1030
  `const image = ${JSON.stringify({
@@ -1212,7 +1214,7 @@ function resolveFarmPageDataFailure(error) {
1212
1214
  }
1213
1215
 
1214
1216
  // src/openapi/dev-status.ts
1215
- function reportOpenAPIDevGenerationResult(spec, output = _chunkGC5ROI3Acjs.logger) {
1217
+ function reportOpenAPIDevGenerationResult(spec, output = _chunk7U4XF76Rcjs.logger) {
1216
1218
  if (spec) {
1217
1219
  output.success("\u2705 OpenAPI documentation enabled");
1218
1220
  return;
@@ -1223,13 +1225,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkGC5ROI3Acjs.logge
1223
1225
  // src/vite.ts
1224
1226
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
1225
1227
  function farmLlmsTxtGeneratedPaths(config) {
1226
- const llms = _chunkWRWJ7IWTcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
1228
+ const llms = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
1227
1229
  if (!llms.enabled) return [];
1228
1230
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1229
1231
  }
1230
1232
  function farmAgentGeneratedPaths(config) {
1231
- const crawlers = _chunkF4ID7BGOcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1232
- const sitemap = _chunkF4ID7BGOcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1233
+ const crawlers = _chunk4OFWG4IKcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1234
+ const sitemap = _chunk4OFWG4IKcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1233
1235
  return [
1234
1236
  ...farmLlmsTxtGeneratedPaths(config),
1235
1237
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1265,7 +1267,7 @@ function loadFarmDocsDevRuntime() {
1265
1267
  return import("./docs.cjs");
1266
1268
  }
1267
1269
  function loadFarmDocsSearchDevRuntime() {
1268
- return import("./search-client-6NVC6HM2.cjs");
1270
+ return import("./search-client-A7YJT7JZ.cjs");
1269
1271
  }
1270
1272
  function loadFarmOpenAPIDevRuntime() {
1271
1273
  return import("./manager-PX4QN4HK.cjs");
@@ -1274,7 +1276,7 @@ function loadFarmWorkflowsDevRuntime() {
1274
1276
  return import("./workflows.cjs");
1275
1277
  }
1276
1278
  function loadFarmDevtoolsSnapshotRuntime() {
1277
- return import("./devtools-TMATFNUY.cjs");
1279
+ return import("./devtools-JJOYTIMS.cjs");
1278
1280
  }
1279
1281
  function loadFarmDevtoolsUIRuntime() {
1280
1282
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1305,16 +1307,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1305
1307
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1306
1308
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1307
1309
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1308
- _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1309
- new RegExp(`^${_chunkODYKCC6Wcjs.FARM_RESOLVE_FROM_PREFIX}`),
1310
+ _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1311
+ new RegExp(`^${_chunkZVSQN7NCcjs.FARM_RESOLVE_FROM_PREFIX}`),
1310
1312
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1311
1313
  // included.
1312
1314
  /^node:/,
1313
- _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, _module.builtinModules)
1315
+ _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, _module.builtinModules)
1314
1316
  ];
1315
1317
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1316
- _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1317
- new RegExp(`^${_chunkODYKCC6Wcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1318
+ _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1319
+ new RegExp(`^${_chunkZVSQN7NCcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1318
1320
  ];
1319
1321
  function createFarmPlatformClientModule(platform) {
1320
1322
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1350,18 +1352,18 @@ function farmIslandContainersPlugin(config) {
1350
1352
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1351
1353
  return null;
1352
1354
  }
1353
- if (_chunkODYKCC6Wcjs.hasUseClientDirective.call(void 0, code)) return null;
1355
+ if (_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, code)) return null;
1354
1356
  const file = id.split("?", 1)[0];
1355
- const bindings = _chunkODYKCC6Wcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1357
+ const bindings = _chunkZVSQN7NCcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1356
1358
  if (bindings.length === 0) return null;
1357
- const grown = _chunkODYKCC6Wcjs.wrapFarmIslandContainers.call(void 0, {
1359
+ const grown = _chunkZVSQN7NCcjs.wrapFarmIslandContainers.call(void 0, {
1358
1360
  code,
1359
1361
  file,
1360
1362
  bindings,
1361
- reference: _chunkODYKCC6Wcjs.farmIslandContainerReferencePath.call(void 0, root)
1363
+ reference: _chunkZVSQN7NCcjs.farmIslandContainerReferencePath.call(void 0, root)
1362
1364
  });
1363
1365
  if (grown === null) return null;
1364
- _chunkODYKCC6Wcjs.ensureFarmIslandContainerReference.call(void 0, root);
1366
+ _chunkZVSQN7NCcjs.ensureFarmIslandContainerReference.call(void 0, root);
1365
1367
  return { code: grown, map: null };
1366
1368
  }
1367
1369
  };
@@ -1375,15 +1377,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1375
1377
  config(config) {
1376
1378
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1377
1379
  if (options.distDir) {
1378
- _chunkODYKCC6Wcjs.usePackageScanCacheFile.call(void 0,
1380
+ _chunkZVSQN7NCcjs.usePackageScanCacheFile.call(void 0,
1379
1381
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1380
1382
  );
1381
1383
  }
1382
- const bundledPackages = _chunkODYKCC6Wcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1384
+ const bundledPackages = _chunkZVSQN7NCcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1383
1385
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1384
- _chunkODYKCC6Wcjs.persistPackageScanCache.call(void 0, );
1386
+ _chunkZVSQN7NCcjs.persistPackageScanCache.call(void 0, );
1385
1387
  return {
1386
- optimizeDeps: { rolldownOptions: { plugins: [_chunkODYKCC6Wcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1388
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkZVSQN7NCcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1387
1389
  ssr: {
1388
1390
  noExternal: [
1389
1391
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1407,8 +1409,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1407
1409
  return FARM_SERVER_ONLY_PACKAGE_ID;
1408
1410
  }
1409
1411
  this.error(
1410
- _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
1411
- _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
1412
+ _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
1413
+ _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
1412
1414
  "CLIENT_SERVER_ONLY_IMPORT",
1413
1415
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1414
1416
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1418,9 +1420,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1418
1420
  );
1419
1421
  }
1420
1422
  if (!_optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) && _module.isBuiltin.call(void 0, id)) {
1421
- return _chunkODYKCC6Wcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1423
+ return _chunkZVSQN7NCcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1422
1424
  }
1423
- const resolveFrom = importer ? _chunkODYKCC6Wcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1425
+ const resolveFrom = importer ? _chunkZVSQN7NCcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1424
1426
  if (resolveFrom) {
1425
1427
  const directory = path6.dirname(resolveFrom.importer);
1426
1428
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1437,8 +1439,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1437
1439
  const importedBy = importer ? ` (imported by ${importer})` : "";
1438
1440
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr])) {
1439
1441
  this.error(
1440
- _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
1441
- _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
1442
+ _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
1443
+ _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
1442
1444
  "CLIENT_SERVER_ONLY_ENTRY",
1443
1445
  _nullishCoalesce(importer, () => ( id)),
1444
1446
  `${id} is server-only and cannot be imported into client code.`
@@ -1463,7 +1465,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1463
1465
  if (id === FARM_PLATFORM_CLIENT_ID) {
1464
1466
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1465
1467
  }
1466
- return _nullishCoalesce(_chunkODYKCC6Wcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1468
+ return _nullishCoalesce(_chunkZVSQN7NCcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1467
1469
  }
1468
1470
  }
1469
1471
  };
@@ -1496,7 +1498,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1496
1498
  if (!snapshot) return "";
1497
1499
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1498
1500
  if (snapshot.routing === "none") return runtime;
1499
- return `${_chunk6ZFGWB75cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1501
+ return `${_chunkUWOCYINYcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1500
1502
  }
1501
1503
  function getPublicEnvDefine(config) {
1502
1504
  const publicEnv = _optionalChain([config, 'access', _76 => _76.env, 'optionalAccess', _77 => _77.public]);
@@ -1525,7 +1527,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1525
1527
  return (req, res, next) => {
1526
1528
  const traceUrl = resolveTraceUrl(req);
1527
1529
  const traceRequest = createRequestFromNodeRequest(req, traceUrl);
1528
- const run = () => _chunkEVIWKPJVcjs.runWithFarmRequestSpan.call(void 0, traceRequest, () => middleware(req, res, next), {
1530
+ const run = () => _chunkPLJMEUANcjs.runWithFarmRequestSpan.call(void 0, traceRequest, () => middleware(req, res, next), {
1529
1531
  getStatusCode: () => res.statusCode || 200
1530
1532
  });
1531
1533
  const result = apiRuntime ? _chunkKBGZ5FD6cjs._runWithAPIRequestRuntime.call(void 0, apiRuntime, run) : run();
@@ -1543,7 +1545,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1543
1545
  }
1544
1546
  res.statusCode = 500;
1545
1547
  res.setHeader("Content-Type", "application/json");
1546
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1548
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1547
1549
  });
1548
1550
  };
1549
1551
  }
@@ -1551,10 +1553,10 @@ function sendFarmDevErrorJSON(res) {
1551
1553
  res.statusCode = 500;
1552
1554
  res.setHeader("Content-Type", "application/json");
1553
1555
  res.setHeader("Cache-Control", "private, no-store");
1554
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1556
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1555
1557
  }
1556
1558
  function createFarmDevMiddlewareErrorResponse() {
1557
- return new Response(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1559
+ return new Response(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1558
1560
  status: 500,
1559
1561
  headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
1560
1562
  });
@@ -1566,10 +1568,10 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
1566
1568
  }
1567
1569
  function sendFarmDevRuntimeHookError(res, json) {
1568
1570
  setFarmDevRuntimeHookErrorHead(res, json);
1569
- res.end(json ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1571
+ res.end(json ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1570
1572
  }
1571
1573
  function opensFarmDevRuntimeSession(pm) {
1572
- return pm.hasRuntimeRequestHooks() || _chunkMBD34AS5cjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1574
+ return pm.hasRuntimeRequestHooks() || _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1573
1575
  }
1574
1576
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1575
1577
  _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -1682,7 +1684,7 @@ function interceptFarmDevPageResponse(options) {
1682
1684
  res.end = originalEnd;
1683
1685
  res.writeHead = originalWriteHead;
1684
1686
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1685
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1687
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1686
1688
  };
1687
1689
  let runtimeHookFailed = false;
1688
1690
  const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
@@ -1696,7 +1698,7 @@ function interceptFarmDevPageResponse(options) {
1696
1698
  const writeRuntimeHookFailure = () => {
1697
1699
  setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
1698
1700
  originalWriteHead(500);
1699
- originalWrite(options.jsonError ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1701
+ originalWrite(options.jsonError ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1700
1702
  };
1701
1703
  const htmlChunks = [];
1702
1704
  const responseChunks = [];
@@ -1806,7 +1808,7 @@ function interceptFarmDevPageResponse(options) {
1806
1808
  });
1807
1809
  res.end = ((...args) => {
1808
1810
  interceptedEnd = true;
1809
- res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1811
+ res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1810
1812
  if (afterResponseCalled) return res;
1811
1813
  afterResponseCalled = true;
1812
1814
  options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
@@ -1889,7 +1891,7 @@ function interceptFarmDevPageResponse(options) {
1889
1891
  res.end = originalEnd;
1890
1892
  res.writeHead = originalWriteHead;
1891
1893
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1892
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1894
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1893
1895
  originalEnd(...originalEndArgs);
1894
1896
  }).catch((error) => {
1895
1897
  reportFailure(error);
@@ -1906,14 +1908,14 @@ function interceptFarmDevPageResponse(options) {
1906
1908
  res.end = originalEnd;
1907
1909
  res.writeHead = originalWriteHead;
1908
1910
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1909
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1911
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1910
1912
  originalEnd(body, callback);
1911
1913
  } else {
1912
1914
  res.write = originalWrite;
1913
1915
  res.end = originalEnd;
1914
1916
  res.writeHead = originalWriteHead;
1915
1917
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1916
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1918
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1917
1919
  originalEnd(...originalEndArgs);
1918
1920
  }
1919
1921
  });
@@ -2034,8 +2036,8 @@ function rewriteEarlySsrRelativeImports(options) {
2034
2036
  const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
2035
2037
  const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
2036
2038
  const resolvedPath = path6.resolve(path6.dirname(cleanId), sourcePath);
2037
- const moduleId = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, resolvedPath, options.root);
2038
- const specifier = moduleId.startsWith("/@fs/") ? _chunkGC5ROI3Acjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
2039
+ const moduleId = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, resolvedPath, options.root);
2040
+ const specifier = moduleId.startsWith("/@fs/") ? _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
2039
2041
  replacements.push({
2040
2042
  start: source.start,
2041
2043
  end: source.end,
@@ -2077,7 +2079,7 @@ function transformIsolatedClientBoundaryModule(options) {
2077
2079
  return null;
2078
2080
  }
2079
2081
  const body = Array.isArray(ast.body) ? ast.body : [];
2080
- const everyExportIsComponent = options.code.includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2082
+ const everyExportIsComponent = options.code.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2081
2083
  const replacements = [];
2082
2084
  const wrapperStatements = [];
2083
2085
  const originalEntries = [];
@@ -2228,22 +2230,31 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2228
2230
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2229
2231
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2230
2232
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2231
- if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkODYKCC6Wcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2233
+ if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkZVSQN7NCcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2232
2234
  }
2233
2235
  findings.push(finding);
2234
2236
  }
2235
2237
  if (findings.length === 0) return;
2236
2238
  warnedClientBoundaryIds.add(id);
2237
- const locate = _chunkODYKCC6Wcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2238
- _chunkGC5ROI3Acjs.logger.warn(
2239
+ const locate = _chunkZVSQN7NCcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2240
+ _chunk7U4XF76Rcjs.logger.warn(
2239
2241
  findings.map(
2240
- (finding) => _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
2242
+ (finding) => _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
2241
2243
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2242
2244
  config.root
2243
2245
  )
2244
2246
  ).join("\n")
2245
2247
  );
2246
2248
  }
2249
+ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2250
+ const normalized = file.replace(/\\/g, "/");
2251
+ if (!appDirs.some((appDir) => normalized.startsWith(`${appDir}/`))) return false;
2252
+ const routeModule = /\/(?:page|default|layout|loading|error)(\.[^./]+)$/.exec(normalized);
2253
+ if (routeModule) return routeModuleExtensions.has(routeModule[1].toLowerCase());
2254
+ return /\/(?:middleware|route)\.(?:ts|tsx|js|jsx|md|mdx)$|\/(?:sitemap|robots|manifest)\.(?:ts|js)$|\/(?:opengraph-image|twitter-image)(?:\.(?:ts|tsx|js|jsx|png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2255
+ normalized
2256
+ );
2257
+ }
2247
2258
  function shouldEmitFarmClientRootHmr(renderer) {
2248
2259
  return _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2249
2260
  }
@@ -2278,7 +2289,7 @@ function hasFarmSourceAliasOverride(alias) {
2278
2289
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2279
2290
  const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2280
2291
  const imageImports = farmImageImportsPlugin();
2281
- const fontImports = _chunkHVMQAVZKcjs.farmFontImportsPlugin.call(void 0, {
2292
+ const fontImports = _chunkX4TSMQWFcjs.farmFontImportsPlugin.call(void 0, {
2282
2293
  root: options.root,
2283
2294
  basePath: options.basePath,
2284
2295
  publicDir: options.publicDir
@@ -2287,7 +2298,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2287
2298
  const isFarmGeneratedOutput = (file) => {
2288
2299
  const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _105 => _105.getConfig, 'call', _106 => _106(), 'access', _107 => _107.root]), () => ( options.root));
2289
2300
  if (!root) return file.includes("/.farm/");
2290
- const output = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2301
+ const output = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2291
2302
  return file === output || file.startsWith(`${output}/`);
2292
2303
  };
2293
2304
  let serverFnTransformActive = false;
@@ -2358,11 +2369,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2358
2369
  isBuild = configEnv.command === "build";
2359
2370
  const farmAliases = {
2360
2371
  ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, options.layers),
2361
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2372
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2362
2373
  };
2363
2374
  if (Object.keys(farmAliases).length > 0) {
2364
2375
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2365
- userConfig.resolve.alias = _chunkHVMQAVZKcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2376
+ userConfig.resolve.alias = _chunkX4TSMQWFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2366
2377
  }
2367
2378
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2368
2379
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _127 => _127.server, 'optionalAccess', _128 => _128.cors]) === void 0;
@@ -2404,7 +2415,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2404
2415
  );
2405
2416
  reactRefreshActive = _chunkY2FEFQAYcjs.isFarmReactRefreshActive.call(void 0, config);
2406
2417
  if (_optionalChain([options, 'access', _134 => _134.experimental, 'optionalAccess', _135 => _135.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2407
- _chunkGC5ROI3Acjs.logger.warn(
2418
+ _chunk7U4XF76Rcjs.logger.warn(
2408
2419
  "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."
2409
2420
  );
2410
2421
  }
@@ -2436,7 +2447,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2436
2447
  } catch (e21) {
2437
2448
  }
2438
2449
  };
2439
- farmApp = new (0, _chunkHVMQAVZKcjs.FarmApp)(
2450
+ farmApp = new (0, _chunkX4TSMQWFcjs.FarmApp)(
2440
2451
  {
2441
2452
  ...options,
2442
2453
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2444,7 +2455,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2444
2455
  server
2445
2456
  );
2446
2457
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2447
- _chunkODYKCC6Wcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2458
+ _chunkZVSQN7NCcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2448
2459
  farmApp.getConfig().root,
2449
2460
  options.distDir || ".farm"
2450
2461
  )
@@ -2455,15 +2466,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2455
2466
  let farmAppPackages;
2456
2467
  if (_optionalChain([farmConfig, 'access', _150 => _150.agent, 'optionalAccess', _151 => _151.noindexPreviews])) {
2457
2468
  farmMiddlewares.use((_req, res, next) => {
2458
- if (_chunkFOULIN4Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2459
- res.setHeader("X-Robots-Tag", _chunkF4ID7BGOcjs.FARM_PREVIEW_ROBOTS_TAG);
2469
+ if (_chunkXY5OZQF6cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2470
+ res.setHeader("X-Robots-Tag", _chunk4OFWG4IKcjs.FARM_PREVIEW_ROBOTS_TAG);
2460
2471
  }
2461
2472
  next();
2462
2473
  });
2463
2474
  }
2464
2475
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2465
2476
  const devBuiltInRoutePaths = new Set(
2466
- _chunk5KISFWD2cjs.listFarmBuiltInRoutePaths.call(void 0, {
2477
+ _chunk5OAN7BG5cjs.listFarmBuiltInRoutePaths.call(void 0, {
2467
2478
  agent: {
2468
2479
  apiCatalog: true,
2469
2480
  mcp: true,
@@ -2487,7 +2498,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2487
2498
  // a caller-controlled Host header.
2488
2499
  trustedLocalOrigin: () => _optionalChain([server, 'access', _152 => _152.resolvedUrls, 'optionalAccess', _153 => _153.local, 'access', _154 => _154[0]]),
2489
2500
  onError(error) {
2490
- _chunkGC5ROI3Acjs.logger.error(
2501
+ _chunk7U4XF76Rcjs.logger.error(
2491
2502
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
2492
2503
  );
2493
2504
  }
@@ -2513,7 +2524,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2513
2524
  );
2514
2525
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2515
2526
  try {
2516
- const result = await _chunkBZJYPIFZcjs.generateFarmTypeArtifacts.call(void 0, {
2527
+ const result = await _chunkSDICLSQUcjs.generateFarmTypeArtifacts.call(void 0, {
2517
2528
  root: farmConfig.root,
2518
2529
  srcDir: farmConfig.srcDir,
2519
2530
  layers: farmConfig.layers,
@@ -2543,7 +2554,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2543
2554
  }
2544
2555
  } catch (e) {
2545
2556
  const message = e instanceof Error ? e.message : String(e);
2546
- _chunkGC5ROI3Acjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
2557
+ _chunk7U4XF76Rcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
2547
2558
  if (pm) {
2548
2559
  await emitPluginError("type-artifact-generation", e, { reason });
2549
2560
  }
@@ -2580,12 +2591,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2580
2591
  (srcDir) => isPotentialProgrammaticRouteSourceFile(normalized, srcDir)
2581
2592
  );
2582
2593
  };
2583
- const isAppRuntimeFile = (file) => {
2584
- const normalized = file.replace(/\\/g, "/");
2585
- return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && /\/(?:page|default|layout|loading|error|middleware|route)\.(?:ts|tsx|js|jsx|md|mdx)$|\/(?:sitemap|robots|manifest)\.(?:ts|js)$|\/(?:opengraph-image|twitter-image)(?:\.(?:ts|tsx|js|jsx|png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2586
- normalized
2587
- );
2588
- };
2594
+ const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
2589
2595
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2590
2596
  file.replace(/\\/g, "/")
2591
2597
  );
@@ -2595,7 +2601,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2595
2601
  let pendingTypeArtifactReason = "";
2596
2602
  let queuedRouteFiles;
2597
2603
  const scheduleTypeArtifactGen = (file, event, selection) => {
2598
- const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
2604
+ const normalizedFile = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, file);
2599
2605
  for (const [artifact, enabled] of Object.entries(selection)) {
2600
2606
  if (enabled) {
2601
2607
  pendingTypeArtifacts[artifact] = true;
@@ -2632,7 +2638,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2632
2638
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2633
2639
  }
2634
2640
  if (isI18nCatalogFile(file)) {
2635
- _optionalChain([farmApp, 'optionalAccess', _162 => _162.getI18nRuntime, 'call', _163 => _163(), 'access', _164 => _164.reload, 'call', _165 => _165(), 'access', _166 => _166.then, 'call', _167 => _167(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _168 => _168.catch, 'call', _169 => _169((error) => _chunkGC5ROI3Acjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2641
+ _optionalChain([farmApp, 'optionalAccess', _162 => _162.getI18nRuntime, 'call', _163 => _163(), 'access', _164 => _164.reload, 'call', _165 => _165(), 'access', _166 => _166.then, 'call', _167 => _167(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _168 => _168.catch, 'call', _169 => _169((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2636
2642
  }
2637
2643
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2638
2644
  if (isRouteRefreshEvent) {
@@ -2650,7 +2656,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2650
2656
  if (pendingRouteReloads.size === 1)
2651
2657
  server.ws.send({ type: "full-reload", path: "*" });
2652
2658
  } catch (error) {
2653
- _chunkGC5ROI3Acjs.logger.warn(
2659
+ _chunk7U4XF76Rcjs.logger.warn(
2654
2660
  `Route refresh failed: ${error instanceof Error ? error.message : String(error)}`
2655
2661
  );
2656
2662
  } finally {
@@ -2701,7 +2707,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2701
2707
  }
2702
2708
  })]);
2703
2709
  }
2704
- apiRouteManager = new (0, _chunk5DREJN4Gcjs.APIRouteManager)(appDirs, server, {
2710
+ apiRouteManager = new (0, _chunkMQOHYV6Lcjs.APIRouteManager)(appDirs, server, {
2705
2711
  plugins: farmConfig.plugins,
2706
2712
  i18n: farmApp.getI18nRuntime(),
2707
2713
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2735,7 +2741,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2735
2741
  loadModule: async (workflow) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
2736
2742
  server: farmConfig.server
2737
2743
  });
2738
- _chunkGC5ROI3Acjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
2744
+ _chunk7U4XF76Rcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
2739
2745
  }
2740
2746
  }
2741
2747
  if (pm) {
@@ -2747,7 +2753,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2747
2753
  });
2748
2754
  }
2749
2755
  }
2750
- middlewareManager = new (0, _chunk4SLHSODZcjs.MiddlewareManager)(
2756
+ middlewareManager = new (0, _chunk2FK47RRZcjs.MiddlewareManager)(
2751
2757
  appDirs,
2752
2758
  server,
2753
2759
  farmConfig.middleware,
@@ -2791,7 +2797,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2791
2797
  await openAPIManager.invalidateCache();
2792
2798
  }
2793
2799
  if (process.env.FARM_VERBOSE) {
2794
- _chunkGC5ROI3Acjs.logger.info(`Refreshed routes: ${reason}`);
2800
+ _chunk7U4XF76Rcjs.logger.info(`Refreshed routes: ${reason}`);
2795
2801
  }
2796
2802
  };
2797
2803
  const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
@@ -2803,7 +2809,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2803
2809
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2804
2810
  };
2805
2811
  releaseDocsMCPServers();
2806
- const isFarmDocsPathGuarded = (href) => _chunk6ZFGWB75cjs.farmPathGuardCoversPage.call(void 0,
2812
+ const isFarmDocsPathGuarded = (href) => _chunkUWOCYINYcjs.farmPathGuardCoversPage.call(void 0,
2807
2813
  {
2808
2814
  config: farmConfig,
2809
2815
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2816,7 +2822,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2816
2822
  clientEntry: "/@farm/client.js",
2817
2823
  resolveLayoutFonts: resolveDocsLayoutFonts,
2818
2824
  fontStylesheetHref: "/@farm/fonts.css",
2819
- globalStylesheetHref: _chunkHVMQAVZKcjs.resolveDevGlobalStylesheetHref.call(void 0,
2825
+ globalStylesheetHref: _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2820
2826
  farmConfig.root,
2821
2827
  farmConfig.srcDir
2822
2828
  ),
@@ -2847,7 +2853,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2847
2853
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2848
2854
  resolveLayoutFonts: resolveDocsLayoutFonts,
2849
2855
  fontStylesheetHref: "/@farm/fonts.css",
2850
- globalStylesheetHref: _chunkHVMQAVZKcjs.resolveDevGlobalStylesheetHref.call(void 0,
2856
+ globalStylesheetHref: _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2851
2857
  farmConfig.root,
2852
2858
  farmConfig.srcDir
2853
2859
  ),
@@ -2867,7 +2873,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2867
2873
  }).then(
2868
2874
  (pages) => new Set(pages),
2869
2875
  (error) => {
2870
- _chunkGC5ROI3Acjs.logger.warn(
2876
+ _chunk7U4XF76Rcjs.logger.warn(
2871
2877
  `Farm Infra analytics reports docs pages by the docs route, not each page's path: listing them failed (${error instanceof Error ? error.message : String(error)}).`
2872
2878
  );
2873
2879
  return void 0;
@@ -2890,7 +2896,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2890
2896
  server.watcher.add(docsContentDirs);
2891
2897
  for (const event of ["add", "change", "unlink"]) {
2892
2898
  server.watcher.on(event, (file) => {
2893
- const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
2899
+ const normalizedFile = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, file);
2894
2900
  if (appDirSlugs.some((appDir) => normalizedFile.startsWith(`${appDir}/`))) return;
2895
2901
  const contentDirs = docsContentDirs.filter(
2896
2902
  (contentDir) => farmDocsDevRuntime.isFarmDocsContentFile(contentDir, file)
@@ -2901,7 +2907,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2901
2907
  }
2902
2908
  logUpdate(
2903
2909
  "PAGE",
2904
- `${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, path6.relative(farmConfig.root, file))}`
2910
+ `${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.relative(farmConfig.root, file))}`
2905
2911
  );
2906
2912
  server.ws.send({ type: "full-reload", path: "*" });
2907
2913
  });
@@ -3015,7 +3021,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3015
3021
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3016
3022
  res.statusCode = 200;
3017
3023
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3018
- res.end(requestMethod === "HEAD" ? void 0 : _chunkHVMQAVZKcjs.FARM_VIDEO_PLAYER_HTML);
3024
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkX4TSMQWFcjs.FARM_VIDEO_PLAYER_HTML);
3019
3025
  return;
3020
3026
  }
3021
3027
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3083,7 +3089,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3083
3089
  } else {
3084
3090
  if (!warnedDeprecatedDevtoolsDashboard) {
3085
3091
  warnedDeprecatedDevtoolsDashboard = true;
3086
- _chunkGC5ROI3Acjs.logger.warn(
3092
+ _chunk7U4XF76Rcjs.logger.warn(
3087
3093
  "The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
3088
3094
  );
3089
3095
  }
@@ -3094,7 +3100,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3094
3100
  }
3095
3101
  const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
3096
3102
  const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
3097
- const runtimeHookErrorAnswersJSON = rendererDisabled || _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3103
+ const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3098
3104
  const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
3099
3105
  let pageHookRouteMatch;
3100
3106
  const pageHookRoute = () => {
@@ -3175,7 +3181,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3175
3181
  const redirectResponse = response;
3176
3182
  try {
3177
3183
  const metadataRoute = matchAppMetadataRoute(requestPathname);
3178
- const kind = metadataRoute ? "asset" : _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3184
+ const kind = metadataRoute ? "asset" : _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3179
3185
  response = await pm.runRuntimeRequest(
3180
3186
  createRequestFromNodeRequest(req, parsedRequestUrl),
3181
3187
  async () => {
@@ -3295,9 +3301,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3295
3301
  if (pm && opensFarmDevRuntimeSession(pm)) {
3296
3302
  try {
3297
3303
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3298
- const route = _chunk5KISFWD2cjs.setFarmRouteLabel.call(void 0,
3304
+ const route = _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
3299
3305
  { pathname: requestPathname },
3300
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk5KISFWD2cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3306
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk5OAN7BG5cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3301
3307
  );
3302
3308
  runtimeSession2 = await pm.beginRuntimeRequest(
3303
3309
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3339,7 +3345,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3339
3345
  );
3340
3346
  } catch (error) {
3341
3347
  if (!responding && !res.headersSent) {
3342
- _chunkGC5ROI3Acjs.logger.error(`Middleware error: ${error}`);
3348
+ _chunk7U4XF76Rcjs.logger.error(`Middleware error: ${error}`);
3343
3349
  await discard();
3344
3350
  await sendMiddlewareErrorJSON(runtimeSession2, error);
3345
3351
  return;
@@ -3386,8 +3392,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3386
3392
  );
3387
3393
  return;
3388
3394
  }
3389
- if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunk5KISFWD2cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3390
- const manifestGuardCoversPath = (path7) => _chunk6ZFGWB75cjs.farmPathGuardCoversEndpoint.call(void 0,
3395
+ if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunk5OAN7BG5cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3396
+ const manifestGuardCoversPath = (path7) => _chunkUWOCYINYcjs.farmPathGuardCoversEndpoint.call(void 0,
3391
3397
  {
3392
3398
  config: farmConfig,
3393
3399
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3396,25 +3402,25 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3396
3402
  apiServerBasePath
3397
3403
  );
3398
3404
  await serveBuiltInRoute(async () => {
3399
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkHVMQAVZKcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3400
- const manifest = await _chunk5KISFWD2cjs.createFarmAppManifestResponse.call(void 0,
3405
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkX4TSMQWFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3406
+ const manifest = await _chunk5OAN7BG5cjs.createFarmAppManifestResponse.call(void 0,
3401
3407
  new Request(parsedRequestUrl, {
3402
3408
  method: requestMethod,
3403
3409
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3404
3410
  }),
3405
3411
  {
3406
- ..._chunk5KISFWD2cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3412
+ ..._chunk5OAN7BG5cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3407
3413
  build: "development",
3408
3414
  packages: farmAppPackages,
3409
3415
  // Read again on each request; unchanged files come from a cache.
3410
- webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkHVMQAVZKcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3416
+ webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkX4TSMQWFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3411
3417
  }),
3412
3418
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3413
3419
  // A guard written for an MCP server's path keeps its tools out of the public view.
3414
3420
  guardCoversPath: manifestGuardCoversPath,
3415
3421
  // A docs runtime's MCP server lists its tools when asked, read on each request.
3416
3422
  ...farmDocsHandler ? {
3417
- registeredMCP: (request) => _chunkVJ6L7TIIcjs._listFarmRegisteredMCPServerTools.call(void 0, farmDocsHandler, request, {
3423
+ registeredMCP: (request) => _chunk3SPECQXIcjs._listFarmRegisteredMCPServerTools.call(void 0, farmDocsHandler, request, {
3418
3424
  basePath: farmConfig.basePath,
3419
3425
  guardCoversPath: manifestGuardCoversPath
3420
3426
  })
@@ -3425,11 +3431,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3425
3431
  });
3426
3432
  return;
3427
3433
  }
3428
- if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk5KISFWD2cjs.FARM_API_CATALOG_PATH) {
3434
+ if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk5OAN7BG5cjs.FARM_API_CATALOG_PATH) {
3429
3435
  await serveBuiltInRoute(
3430
- () => _chunk5KISFWD2cjs.createFarmApiCatalogResponse.call(void 0,
3436
+ () => _chunk5OAN7BG5cjs.createFarmApiCatalogResponse.call(void 0,
3431
3437
  requestMethod,
3432
- _chunk5KISFWD2cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3438
+ _chunk5OAN7BG5cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3433
3439
  new Request(parsedRequestUrl, {
3434
3440
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3435
3441
  })
@@ -3438,7 +3444,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3438
3444
  return;
3439
3445
  }
3440
3446
  if (_optionalChain([options, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.aiCatalog]) !== false) {
3441
- const aiCatalog = _chunk5KISFWD2cjs.createFarmAiCatalogResponse.call(void 0,
3447
+ const aiCatalog = _chunk5OAN7BG5cjs.createFarmAiCatalogResponse.call(void 0,
3442
3448
  new Request(parsedRequestUrl, {
3443
3449
  method: requestMethod,
3444
3450
  headers: {
@@ -3480,7 +3486,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3480
3486
  });
3481
3487
  const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
3482
3488
  const docsHandlerRequest = new Request(docsRequest, docsBodyInit);
3483
- const registeredMCPCalls = await _chunkVJ6L7TIIcjs._readFarmRegisteredMCPCalls.call(void 0,
3489
+ const registeredMCPCalls = await _chunk3SPECQXIcjs._readFarmRegisteredMCPCalls.call(void 0,
3484
3490
  docsHandlerRequest,
3485
3491
  farmConfig.basePath
3486
3492
  );
@@ -3496,7 +3502,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3496
3502
  );
3497
3503
  return _chunk2RSVYJT6cjs._runWithCurrentRequest.call(void 0,
3498
3504
  request,
3499
- () => _chunkVJ6L7TIIcjs._observeFarmRegisteredMCPResponse.call(void 0, response, registeredMCPCalls)
3505
+ () => _chunk3SPECQXIcjs._observeFarmRegisteredMCPResponse.call(void 0, response, registeredMCPCalls)
3500
3506
  );
3501
3507
  }
3502
3508
  const deploymentMismatch = _chunkNLBHLPEOcjs.getFarmDeploymentMismatch.call(void 0,
@@ -3520,7 +3526,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3520
3526
  {
3521
3527
  kind: "docs",
3522
3528
  computed: docsResponse,
3523
- label: _chunk5KISFWD2cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3529
+ label: _chunk5OAN7BG5cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3524
3530
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3525
3531
  {
3526
3532
  path: _optionalChain([farmConfig, 'access', _242 => _242.docs, 'optionalAccess', _243 => _243.entry]) || "/docs",
@@ -3534,7 +3540,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3534
3540
  }
3535
3541
  }
3536
3542
  if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _248 => _248.headers, 'access', _249 => _249.accept, 'optionalAccess', _250 => _250.includes, 'call', _251 => _251(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3537
- const { createFarmNativeTreeResponse } = await import("./native-tree-MNUFN5G6.cjs");
3543
+ const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3538
3544
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3539
3545
  const treeResponse = await createFarmNativeTreeResponse({
3540
3546
  request: new Request(fullUrl, {
@@ -3557,12 +3563,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3557
3563
  }
3558
3564
  const markdownRouteLabel = () => (
3559
3565
  // On the route path, as production labels it: /fr/index.md is /index.md.
3560
- _chunk5KISFWD2cjs.resolveFarmMarkdownRouteLabel.call(void 0,
3566
+ _chunk5OAN7BG5cjs.resolveFarmMarkdownRouteLabel.call(void 0,
3561
3567
  toRoutePathname(requestPathname),
3562
3568
  (page) => _optionalChain([farmApp, 'access', _258 => _258.getRouteManager, 'call', _259 => _259(), 'access', _260 => _260.matchRoute, 'call', _261 => _261(page), 'access', _262 => _262.route, 'optionalAccess', _263 => _263.pattern])
3563
3569
  )
3564
3570
  );
3565
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkPG7J7XYTcjs.createFarmMarkdownSourceResponse.call(void 0, {
3571
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunkQ4TRGTO7cjs.createFarmMarkdownSourceResponse.call(void 0, {
3566
3572
  request: new Request(fullUrl, {
3567
3573
  method: requestMethod,
3568
3574
  headers: docsHeaders
@@ -3571,14 +3577,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3571
3577
  routePathname: toRoutePathname,
3572
3578
  resolveSource: async (pathname2) => {
3573
3579
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3574
- const sourcePath = _optionalChain([match, 'access', _264 => _264.route, 'optionalAccess', _265 => _265.markdownSourcePath]) || (match.route && _chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3580
+ const sourcePath = _optionalChain([match, 'access', _264 => _264.route, 'optionalAccess', _265 => _265.markdownSourcePath]) || (match.route && _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3575
3581
  if (!sourcePath) {
3576
3582
  return null;
3577
3583
  }
3578
3584
  return {
3579
3585
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3580
3586
  // Project-relative, as production sends it: never the machine's path.
3581
- filePath: _chunkHVMQAVZKcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3587
+ filePath: _chunkX4TSMQWFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3582
3588
  };
3583
3589
  },
3584
3590
  // The anonymous check goes through this server, so its guards and
@@ -3604,7 +3610,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3604
3610
  });
3605
3611
  return;
3606
3612
  }
3607
- const markdownResponse = viteModuleRequest ? null : await _chunk2YJ4DHTDcjs.createMarkdownMirrorResponse.call(void 0, {
3613
+ const markdownResponse = viteModuleRequest ? null : await _chunk2NOHVIJ3cjs.createMarkdownMirrorResponse.call(void 0, {
3608
3614
  request: new Request(fullUrl, {
3609
3615
  method: requestMethod,
3610
3616
  headers: docsHeaders
@@ -3643,16 +3649,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3643
3649
  });
3644
3650
  return;
3645
3651
  }
3646
- if (!viteModuleRequest && _chunk2YJ4DHTDcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3647
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkPG7J7XYTcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3652
+ if (!viteModuleRequest && _chunk2NOHVIJ3cjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3653
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkQ4TRGTO7cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3648
3654
  if (!markdownRoute.route) {
3649
3655
  await serveBuiltInRoute(
3650
3656
  () => new Response(
3651
- _chunk2YJ4DHTDcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3657
+ _chunk2NOHVIJ3cjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3652
3658
  {
3653
3659
  status: 404,
3654
3660
  headers: {
3655
- "Content-Type": _chunk2YJ4DHTDcjs.FARM_MARKDOWN_CONTENT_TYPE,
3661
+ "Content-Type": _chunk2NOHVIJ3cjs.FARM_MARKDOWN_CONTENT_TYPE,
3656
3662
  "X-Farm-Markdown-Error": "404",
3657
3663
  "Cache-Control": "no-store"
3658
3664
  }
@@ -3662,7 +3668,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3662
3668
  return;
3663
3669
  }
3664
3670
  }
3665
- const markdownPageTarget = _chunk2YJ4DHTDcjs.resolveMarkdownMirrorTarget.call(void 0,
3671
+ const markdownPageTarget = _chunk2NOHVIJ3cjs.resolveMarkdownMirrorTarget.call(void 0,
3666
3672
  farmApp.getConfig().md,
3667
3673
  requestPathname,
3668
3674
  {
@@ -3713,7 +3719,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3713
3719
  }
3714
3720
  const configuredIntegrations = currentConfig.integrations;
3715
3721
  const tryConfiguredIntegrationRoute = async () => {
3716
- const matchedRoute = _chunkAOTD2N5Pcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3722
+ const matchedRoute = _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3717
3723
  pathname: requestPathname,
3718
3724
  method: requestMethod
3719
3725
  });
@@ -3727,7 +3733,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3727
3733
  await pm.runHookParallelFiltered(
3728
3734
  "beforeRequest",
3729
3735
  (plugin2) => {
3730
- const owner = _chunkAOTD2N5Pcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3736
+ const owner = _chunkWGWWRV2Mcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3731
3737
  return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _266 => _266.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3732
3738
  },
3733
3739
  req,
@@ -3757,7 +3763,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3757
3763
  });
3758
3764
  const dispatchIntegration = async (request, runtime) => {
3759
3765
  try {
3760
- const result = await _chunkAOTD2N5Pcjs.dispatchIntegrationRequest.call(void 0,
3766
+ const result = await _chunkWGWWRV2Mcjs.dispatchIntegrationRequest.call(void 0,
3761
3767
  {
3762
3768
  integration: matchedRoute.integration,
3763
3769
  config: currentConfig,
@@ -3772,9 +3778,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3772
3778
  }
3773
3779
  return result;
3774
3780
  } catch (error) {
3775
- _chunkGC5ROI3Acjs.logger.error(`Integration route error: ${error}`);
3781
+ _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3776
3782
  await _optionalChain([runtime, 'optionalAccess', _269 => _269.reportError, 'call', _270 => _270(error)]);
3777
- return _chunk4VLXQ55Ocjs.createFarmInternalServerErrorResponse.call(void 0, );
3783
+ return _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
3778
3784
  }
3779
3785
  };
3780
3786
  runtimeReportsErrors = Boolean(pm);
@@ -3808,14 +3814,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3808
3814
  integration: matchedRoute.key
3809
3815
  });
3810
3816
  }
3811
- _chunkGC5ROI3Acjs.logger.error(`Integration route error: ${error}`);
3817
+ _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3812
3818
  if (runtimeReportsErrors) {
3813
3819
  if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3814
3820
  else if (!res.writableEnded) res.end();
3815
3821
  } else if (!res.writableEnded) {
3816
3822
  res.statusCode = 500;
3817
3823
  res.setHeader("Content-Type", "application/json");
3818
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3824
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3819
3825
  }
3820
3826
  return true;
3821
3827
  }
@@ -3824,7 +3830,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3824
3830
  const hasLocalDevRoute = () => {
3825
3831
  const routeManager3 = farmApp.getRouteManager();
3826
3832
  return Boolean(
3827
- _chunkAOTD2N5Pcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3833
+ _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3828
3834
  pathname: requestPathname,
3829
3835
  method: requestMethod
3830
3836
  }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _271 => _271.isFarmDocsAPIRequest, 'call', _272 => _272(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
@@ -3861,7 +3867,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3861
3867
  }
3862
3868
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
3863
3869
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
3864
- if (hasMatchedApiRoute || _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3870
+ if (hasMatchedApiRoute || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3865
3871
  const startTime2 = Date.now();
3866
3872
  const method2 = req.method || "GET";
3867
3873
  const urlPath2 = req.url || "/";
@@ -3887,10 +3893,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3887
3893
  urlPath: urlPath2,
3888
3894
  method: method2
3889
3895
  });
3890
- _chunkGC5ROI3Acjs.logger.error(`Request hook error: ${error}`);
3896
+ _chunk7U4XF76Rcjs.logger.error(`Request hook error: ${error}`);
3891
3897
  res.statusCode = 500;
3892
3898
  res.setHeader("Content-Type", "application/json");
3893
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3899
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3894
3900
  return;
3895
3901
  }
3896
3902
  const createAPIRequest = async () => {
@@ -3921,9 +3927,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3921
3927
  );
3922
3928
  const docsRuntimeOptions = () => ({
3923
3929
  kind: "docs",
3924
- route: _chunk5KISFWD2cjs.setFarmRouteLabel.call(void 0,
3930
+ route: _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
3925
3931
  { pathname: pathname2, pattern: urlPath2 },
3926
- _chunk5KISFWD2cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3932
+ _chunk5OAN7BG5cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3927
3933
  path: _optionalChain([farmConfig, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.entry]) || "/docs",
3928
3934
  roots: _optionalChain([farmConfig, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.roots, 'optionalAccess', _279 => _279.map, 'call', _280 => _280((root) => root.entry)])
3929
3935
  })
@@ -3962,7 +3968,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3962
3968
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
3963
3969
  return;
3964
3970
  }
3965
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
3971
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
3966
3972
  sendFarmDevRuntimeHookError(res, true);
3967
3973
  return;
3968
3974
  }
@@ -3982,7 +3988,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3982
3988
  if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
3983
3989
  throw error;
3984
3990
  }
3985
- _chunkGC5ROI3Acjs.logger.error(`Middleware error: ${error}`);
3991
+ _chunk7U4XF76Rcjs.logger.error(`Middleware error: ${error}`);
3986
3992
  const status = await sendMiddlewareErrorJSON(runtimeSession2, error);
3987
3993
  logResponse(method2, urlPath2, status, Date.now() - startTime2, "API");
3988
3994
  return;
@@ -4008,12 +4014,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4008
4014
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4009
4015
  if (apiHandler && hasExplicitAPIRoute) {
4010
4016
  const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _281 => _281.route, 'access', _282 => _282.path]) || urlPath2;
4011
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4017
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4012
4018
  type: "route.matched",
4013
4019
  pathname: pathname2,
4014
4020
  route: apiRoutePattern
4015
4021
  });
4016
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4022
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4017
4023
  type: "api.request.start",
4018
4024
  pathname: pathname2,
4019
4025
  route: apiRoutePattern,
@@ -4038,7 +4044,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4038
4044
  try {
4039
4045
  response = await apiHandler(handledRequest);
4040
4046
  apiOutcomeReported = true;
4041
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4047
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4042
4048
  type: "api.request.complete",
4043
4049
  pathname: pathname2,
4044
4050
  route: apiRoutePattern,
@@ -4048,7 +4054,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4048
4054
  });
4049
4055
  } catch (error) {
4050
4056
  apiOutcomeReported = true;
4051
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4057
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4052
4058
  type: "api.error",
4053
4059
  pathname: pathname2,
4054
4060
  route: apiRoutePattern,
@@ -4056,9 +4062,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4056
4062
  durationMs: Date.now() - startTime2,
4057
4063
  error
4058
4064
  });
4059
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
4065
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4060
4066
  await _optionalChain([runtime, 'optionalAccess', _283 => _283.reportError, 'call', _284 => _284(error)]);
4061
- response = _chunk4VLXQ55Ocjs.createFarmInternalServerErrorResponse.call(void 0, );
4067
+ response = _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
4062
4068
  }
4063
4069
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
4064
4070
  };
@@ -4076,7 +4082,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4076
4082
  } catch (error) {
4077
4083
  const duration = Date.now() - startTime2;
4078
4084
  if (!apiOutcomeReported) {
4079
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4085
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4080
4086
  type: "api.error",
4081
4087
  pathname: pathname2,
4082
4088
  route: apiRoutePattern,
@@ -4091,7 +4097,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4091
4097
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
4092
4098
  return;
4093
4099
  }
4094
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
4100
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4095
4101
  sendFarmDevRuntimeHookError(res, true);
4096
4102
  return;
4097
4103
  }
@@ -4133,7 +4139,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4133
4139
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
4134
4140
  return;
4135
4141
  }
4136
- _chunkGC5ROI3Acjs.logger.error(`Docs API route error: ${error}`);
4142
+ _chunk7U4XF76Rcjs.logger.error(`Docs API route error: ${error}`);
4137
4143
  sendFarmDevRuntimeHookError(res, true);
4138
4144
  return;
4139
4145
  }
@@ -4157,7 +4163,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4157
4163
  logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
4158
4164
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
4159
4165
  } catch (error) {
4160
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
4166
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4161
4167
  sendFarmDevRuntimeHookError(res, true);
4162
4168
  }
4163
4169
  return;
@@ -4277,7 +4283,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4277
4283
  );
4278
4284
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4279
4285
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4280
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4286
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4281
4287
  const isClientComponent = moduleMetadata.isClientComponent;
4282
4288
  const shouldHydrate = moduleMetadata.shouldHydrate;
4283
4289
  let mergedMetadata = {};
@@ -4288,7 +4294,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4288
4294
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4289
4295
  (entry) => entry.pattern === layout.pattern
4290
4296
  ), () => ( {
4291
- ..._chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4297
+ ..._chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4292
4298
  serverTree: false
4293
4299
  }))
4294
4300
  );
@@ -4303,7 +4309,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4303
4309
  ];
4304
4310
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4305
4311
  _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]), () => ( options))), 'access', _305 => _305.experimental, 'optionalAccess', _306 => _306.serverComponents])
4306
- ) === "islands" ? _chunkHVMQAVZKcjs.resolveFarmRouteRootStrategy.call(void 0,
4312
+ ) === "islands" ? _chunkX4TSMQWFcjs.resolveFarmRouteRootStrategy.call(void 0,
4307
4313
  route,
4308
4314
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4309
4315
  layouts.map((layout, index) => ({
@@ -4360,7 +4366,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4360
4366
  mergedMetadata = await _chunkY3DO7BIJcjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
4361
4367
  mergedMetadata = _chunkY3DO7BIJcjs.addMetadataMarkdownAlternate.call(void 0,
4362
4368
  mergedMetadata,
4363
- _chunk2YJ4DHTDcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4369
+ _chunk2NOHVIJ3cjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4364
4370
  routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
4365
4371
  })
4366
4372
  );
@@ -4369,7 +4375,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4369
4375
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4370
4376
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4371
4377
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4372
- ), () => ( _chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4378
+ ), () => ( _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4373
4379
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4374
4380
  request: targetRequest,
4375
4381
  params: slot.params,
@@ -4414,16 +4420,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4414
4420
  })
4415
4421
  );
4416
4422
  const projectRoot = server.config.root;
4417
- const toUrlPath = (absolutePath) => _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4418
- const renderPlan = _chunk6ZFGWB75cjs.createFarmRouteRenderPlan.call(void 0, {
4423
+ const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4424
+ const renderPlan = _chunkUWOCYINYcjs.createFarmRouteRenderPlan.call(void 0, {
4419
4425
  pageShouldHydrate: shouldHydrate,
4420
4426
  layoutShouldHydrate: shouldHydrateLayout,
4421
4427
  islandStrategy: hydrationIslandStrategy,
4422
- rendering: _chunkBZJYPIFZcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4428
+ rendering: _chunkSDICLSQUcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4423
4429
  });
4424
4430
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4425
- const layoutStartIndex = _chunk6ZFGWB75cjs.getSharedLayoutPrefixLength.call(void 0,
4426
- _chunk6ZFGWB75cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4431
+ const layoutStartIndex = _chunkUWOCYINYcjs.getSharedLayoutPrefixLength.call(void 0,
4432
+ _chunkUWOCYINYcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4427
4433
  destinationLayoutPatterns
4428
4434
  );
4429
4435
  const renderer = farmApp.getServerRenderer();
@@ -4505,7 +4511,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4505
4511
  {
4506
4512
  status: 200,
4507
4513
  headers: {
4508
- "Cache-Control": _chunk6ZFGWB75cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4514
+ "Cache-Control": _chunkUWOCYINYcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4509
4515
  "X-Farm-Navigation": "html-fragment",
4510
4516
  Vary: "X-Farm-Layout-Chain",
4511
4517
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4513,7 +4519,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4513
4519
  },
4514
4520
  {
4515
4521
  onError(error, id) {
4516
- _chunkGC5ROI3Acjs.logger.error(`Deferred route data ${id} failed: ${error}`);
4522
+ _chunk7U4XF76Rcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
4517
4523
  }
4518
4524
  }
4519
4525
  )
@@ -4554,16 +4560,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4554
4560
  const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _324 => _324.hasRuntimeHook, 'call', _325 => _325("after")]), () => ( false));
4555
4561
  const pageBuiltInRouteLabel = (pathname2) => {
4556
4562
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4557
- const mcpLabel = _chunk5KISFWD2cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4563
+ const mcpLabel = _chunk5OAN7BG5cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4558
4564
  if (mcpLabel) return mcpLabel;
4559
4565
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4560
- return routePathname === _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH : null;
4566
+ return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
4561
4567
  };
4562
4568
  const pageRuntimeOptions = (pathname2) => {
4563
4569
  const match = routeManager2.matchRoute(pathname2);
4564
4570
  return {
4565
4571
  kind: "page",
4566
- route: _chunk5KISFWD2cjs.setFarmRouteLabel.call(void 0,
4572
+ route: _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
4567
4573
  {
4568
4574
  pathname: pathname2,
4569
4575
  pattern: _optionalChain([match, 'optionalAccess', _326 => _326.route, 'optionalAccess', _327 => _327.pattern]) || null,
@@ -4828,8 +4834,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4828
4834
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4829
4835
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4830
4836
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4831
- const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkAOTD2N5Pcjs.getIntegrationProviders.call(void 0, integrations) : [];
4832
- const isolatedHydrationMode = _chunkODYKCC6Wcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4837
+ const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, integrations) : [];
4838
+ const isolatedHydrationMode = _chunkZVSQN7NCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4833
4839
  _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.isolatedClientHydration]),
4834
4840
  {
4835
4841
  serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.experimental, 'optionalAccess', _375 => _375.serverComponents])) === "rsc",
@@ -4839,7 +4845,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4839
4845
  return generateClientCode(
4840
4846
  integrationProviders,
4841
4847
  [
4842
- ..._chunkAOTD2N5Pcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4848
+ ..._chunkWGWWRV2Mcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4843
4849
  ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _376 => _376.getFarmDocsDocumentNavigationMatchers, 'call', _377 => _377(docs)]), () => ( []))
4844
4850
  ],
4845
4851
  generatedDocsSearchRuntime,
@@ -4854,8 +4860,8 @@ ${generatedDevIndicatorsClientRuntime}`,
4854
4860
  isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _383 => _383.getRouteManager, 'call', _384 => _384(), 'access', _385 => _385.getIsolatedClientBoundaryModules, 'call', _386 => _386(root)])))), 'optionalAccess', _387 => _387.size]) > 0,
4855
4861
  _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.trailingSlash]), () => ( false)),
4856
4862
  _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.basePath]), () => ( "/")),
4857
- _chunkHVMQAVZKcjs.generateClientCachePersistenceCode.call(void 0,
4858
- _chunkHVMQAVZKcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
4863
+ _chunkX4TSMQWFcjs.generateClientCachePersistenceCode.call(void 0,
4864
+ _chunkX4TSMQWFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
4859
4865
  ),
4860
4866
  _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4861
4867
  _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "islands"
@@ -4877,11 +4883,11 @@ export const getManifest = () => ({
4877
4883
  });
4878
4884
  `;
4879
4885
  }
4880
- const globalStylesheetHref = _chunkHVMQAVZKcjs.resolveDevGlobalStylesheetHref.call(void 0,
4886
+ const globalStylesheetHref = _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
4881
4887
  server.config.root,
4882
4888
  _optionalChain([farmApp, 'optionalAccess', _395 => _395.getConfig, 'call', _396 => _396(), 'access', _397 => _397.srcDir])
4883
4889
  );
4884
- const fullManifest = _chunkHVMQAVZKcjs.createFarmDevClientManifest.call(void 0,
4890
+ const fullManifest = _chunkX4TSMQWFcjs.createFarmDevClientManifest.call(void 0,
4885
4891
  routeManager.generateClientManifest(server.config.root),
4886
4892
  {
4887
4893
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4903,45 +4909,45 @@ export { manifest };
4903
4909
  const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4904
4910
  const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _400 => _400.getConfig, 'call', _401 => _401()]), () => ( options));
4905
4911
  let rewrotePackageImports = false;
4906
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkODYKCC6Wcjs.hasUseClientDirective.call(void 0, code)) {
4912
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, code)) {
4907
4913
  const file = id.split("?", 1)[0];
4908
4914
  const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd();
4909
4915
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4910
4916
  const rewrite = () => {
4911
4917
  if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
4912
4918
  if (farmReactServerFiles.has(file)) {
4913
- for (const child of _chunkODYKCC6Wcjs.farmRelativeImportFiles.call(void 0, code, file))
4919
+ for (const child of _chunkZVSQN7NCcjs.farmRelativeImportFiles.call(void 0, code, file))
4914
4920
  farmReactServerFiles.add(child);
4915
4921
  }
4916
- const serverModule = farmReactServerFiles.has(file) || !_chunkODYKCC6Wcjs.getFarmClientReachableModules.call(void 0,
4922
+ const serverModule = farmReactServerFiles.has(file) || !_chunkZVSQN7NCcjs.getFarmClientReachableModules.call(void 0,
4917
4923
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4918
4924
  projectRoot
4919
4925
  ).has(path6.resolve(file));
4920
- const reactServer = !serverModule ? null : _chunkODYKCC6Wcjs.rewriteFarmReactServerImports.call(void 0, {
4926
+ const reactServer = !serverModule ? null : _chunkZVSQN7NCcjs.rewriteFarmReactServerImports.call(void 0, {
4921
4927
  code,
4922
4928
  file,
4923
- reference: (specifier, exportName) => _chunkODYKCC6Wcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4929
+ reference: (specifier, exportName) => _chunkZVSQN7NCcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4924
4930
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4925
4931
  });
4926
4932
  if (reactServer !== null) {
4927
4933
  code = reactServer;
4928
4934
  rewrotePackageImports = true;
4929
4935
  }
4930
- const internal = farmReactServerFiles.has(file) ? _chunkODYKCC6Wcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4936
+ const internal = farmReactServerFiles.has(file) ? _chunkZVSQN7NCcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4931
4937
  code,
4932
4938
  file,
4933
- reference: (clientFile) => _chunkODYKCC6Wcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4939
+ reference: (clientFile) => _chunkZVSQN7NCcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4934
4940
  }) : null;
4935
4941
  if (internal !== null) {
4936
4942
  code = internal;
4937
4943
  rewrotePackageImports = true;
4938
4944
  }
4939
4945
  }
4940
- const rewritePackageImports = (source2) => _chunkODYKCC6Wcjs.rewriteFarmPackageClientImports.call(void 0, {
4946
+ const rewritePackageImports = (source2) => _chunkZVSQN7NCcjs.rewriteFarmPackageClientImports.call(void 0, {
4941
4947
  code: source2,
4942
4948
  file,
4943
4949
  root: projectRoot,
4944
- isClientPackage: (specifier) => _chunkODYKCC6Wcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4950
+ isClientPackage: (specifier) => _chunkZVSQN7NCcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4945
4951
  });
4946
4952
  const routeManager = _optionalChain([farmApp, 'optionalAccess', _408 => _408.getRouteManager, 'call', _409 => _409()]);
4947
4953
  const source = code;
@@ -4962,7 +4968,7 @@ export { manifest };
4962
4968
  }
4963
4969
  }
4964
4970
  };
4965
- if (buildSnapshot) _chunkODYKCC6Wcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4971
+ if (buildSnapshot) _chunkZVSQN7NCcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4966
4972
  else rewrite();
4967
4973
  }
4968
4974
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
@@ -4989,8 +4995,8 @@ export { manifest };
4989
4995
  }
4990
4996
  if (!_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr])) {
4991
4997
  const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420(), 'optionalAccess', _421 => _421.docs]));
4992
- if (_chunkHVMQAVZKcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4993
- const redacted = _chunkHVMQAVZKcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4998
+ if (_chunkX4TSMQWFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4999
+ const redacted = _chunkX4TSMQWFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4994
5000
  if (redacted !== null) return { code: redacted, map: null };
4995
5001
  }
4996
5002
  }
@@ -4999,9 +5005,9 @@ export { manifest };
4999
5005
  if ((_optionalChain([currentConfig, 'access', _425 => _425.experimental, 'optionalAccess', _426 => _426.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5000
5006
  const violation = findClientServerFnViolation(code, id);
5001
5007
  if (violation) {
5002
- const locate = _chunkODYKCC6Wcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5008
+ const locate = _chunkZVSQN7NCcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5003
5009
  this.error(
5004
- _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
5010
+ _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
5005
5011
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5006
5012
  currentConfig.root
5007
5013
  )
@@ -5043,13 +5049,13 @@ export { manifest };
5043
5049
  transformed = true;
5044
5050
  }
5045
5051
  }
5046
- if (_chunkODYKCC6Wcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5052
+ if (_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5047
5053
  const clientBoundarySource = transformedCode;
5048
5054
  const moduleInfo = this.getModuleInfo(id);
5049
5055
  if (moduleInfo) {
5050
5056
  moduleInfo.isClientComponent = true;
5051
5057
  }
5052
- transformedCode = _chunkODYKCC6Wcjs.stripUseClientDirective.call(void 0, transformedCode);
5058
+ transformedCode = _chunkZVSQN7NCcjs.stripUseClientDirective.call(void 0, transformedCode);
5053
5059
  transformed = true;
5054
5060
  const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _434 => _434.getConfig, 'call', _435 => _435()]), () => ( options));
5055
5061
  let isolatedModuleReference = null;
@@ -5057,12 +5063,12 @@ export { manifest };
5057
5063
  const cleanId = id.split("?", 1)[0];
5058
5064
  const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _438 => _438.getRouteManager, 'call', _439 => _439(), 'access', _440 => _440.getIsolatedClientBoundaryModules, 'call', _441 => _441(root)])));
5059
5065
  const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _442 => _442.has, 'call', _443 => _443(path6.resolve(cleanId))]) === true;
5060
- if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkODYKCC6Wcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5061
- cleanId.replace(/\\/g, "/").includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5062
- isolatedModuleReference = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, cleanId, root);
5066
+ if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkZVSQN7NCcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5067
+ cleanId.replace(/\\/g, "/").includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5068
+ isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5063
5069
  const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _444 => _444.experimental, 'optionalAccess', _445 => _445.serverComponents])) === "islands";
5064
- const explicitStrategy = _chunkODYKCC6Wcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5065
- const inference = islandsMode && explicitStrategy === null ? _chunkHVMQAVZKcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5070
+ const explicitStrategy = _chunkZVSQN7NCcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5071
+ const inference = islandsMode && explicitStrategy === null ? _chunkX4TSMQWFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5066
5072
  if (inference) {
5067
5073
  for (const file of inference.files) {
5068
5074
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5158,11 +5164,11 @@ if (import.meta.hot) {
5158
5164
  if (!routeManager) return;
5159
5165
  const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
5160
5166
  if (ssgPages.length === 0) {
5161
- _chunkGC5ROI3Acjs.logger.info("No SSG pages found - all pages will use SSR");
5167
+ _chunk7U4XF76Rcjs.logger.info("No SSG pages found - all pages will use SSR");
5162
5168
  return;
5163
5169
  }
5164
- _chunkGC5ROI3Acjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5165
- _chunkGC5ROI3Acjs.logger.info("Pre-rendering SSG pages...");
5170
+ _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5171
+ _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5166
5172
  const outDir = path6.join(_optionalChain([server, 'optionalAccess', _449 => _449.config, 'access', _450 => _450.root]) || process.cwd(), options.outDir || "dist");
5167
5173
  const clientDir = path6.join(outDir, "client");
5168
5174
  for (const page of ssgPages) {
@@ -5220,10 +5226,10 @@ if (import.meta.hot) {
5220
5226
  fs2.mkdirSync(path6.dirname(outputPath), { recursive: true });
5221
5227
  fs2.writeFileSync(outputPath, fullHtml);
5222
5228
  const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
5223
- _chunkGC5ROI3Acjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
5229
+ _chunk7U4XF76Rcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
5224
5230
  });
5225
5231
  } catch (error) {
5226
- _chunkGC5ROI3Acjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
5232
+ _chunk7U4XF76Rcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
5227
5233
  }
5228
5234
  }
5229
5235
  const manifestPath = path6.join(outDir, "__ssg_manifest.json");
@@ -5239,20 +5245,20 @@ if (import.meta.hot) {
5239
5245
  2
5240
5246
  )
5241
5247
  );
5242
- _chunkGC5ROI3Acjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
5248
+ _chunk7U4XF76Rcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
5243
5249
  } catch (error) {
5244
- _chunkGC5ROI3Acjs.logger.error(`SSG build failed: ${error}`);
5250
+ _chunk7U4XF76Rcjs.logger.error(`SSG build failed: ${error}`);
5245
5251
  }
5246
5252
  },
5247
5253
  watchChange(id, change) {
5248
- const watched = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, id);
5254
+ const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5249
5255
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5250
5256
  _optionalChain([farmApp, 'optionalAccess', _453 => _453.getRouteManager, 'call', _454 => _454(), 'access', _455 => _455.noteSourceChange, 'call', _456 => _456(id, change.event)]);
5251
5257
  }
5252
- _chunkODYKCC6Wcjs.invalidateFarmClientReachableModules.call(void 0, );
5253
- _chunkODYKCC6Wcjs.invalidateFarmClientOnlyScan.call(void 0, );
5254
- _chunkHVMQAVZKcjs.invalidateFarmRouteRootInferences.call(void 0, );
5255
- _chunkODYKCC6Wcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5258
+ _chunkZVSQN7NCcjs.invalidateFarmClientReachableModules.call(void 0, );
5259
+ _chunkZVSQN7NCcjs.invalidateFarmClientOnlyScan.call(void 0, );
5260
+ _chunkX4TSMQWFcjs.invalidateFarmRouteRootInferences.call(void 0, );
5261
+ _chunkZVSQN7NCcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5256
5262
  },
5257
5263
  async handleHotUpdate(ctx) {
5258
5264
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5273,7 +5279,7 @@ if (import.meta.hot) {
5273
5279
  }
5274
5280
  for (const island of _nullishCoalesce(farmIslandInferenceDependents.get(path6.resolve(file)), () => ( []))) {
5275
5281
  if (island === path6.resolve(file)) continue;
5276
- for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, island)), () => ( []))) {
5282
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, island)), () => ( []))) {
5277
5283
  server2.moduleGraph.invalidateModule(mod);
5278
5284
  }
5279
5285
  }
@@ -5285,15 +5291,15 @@ if (import.meta.hot) {
5285
5291
  }
5286
5292
  server2.ws.send({ type: "full-reload", path: "*" });
5287
5293
  };
5288
- if (normalizedFile.includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5294
+ if (normalizedFile.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5289
5295
  path6.posix.join(
5290
- _chunkGC5ROI3Acjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
5291
- _chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5296
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
5297
+ _chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5292
5298
  )
5293
5299
  ))
5294
5300
  return modules;
5295
5301
  if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5296
- (appDir) => normalizedFile.startsWith(`${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, appDir)}/api/`)
5302
+ (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5297
5303
  )) {
5298
5304
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5299
5305
  await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
@@ -5355,7 +5361,7 @@ if (import.meta.hot) {
5355
5361
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5356
5362
  for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
5357
5363
  if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
5358
- for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
5364
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
5359
5365
  server2.moduleGraph.invalidateModule(mod);
5360
5366
  }
5361
5367
  }
@@ -5368,7 +5374,7 @@ if (import.meta.hot) {
5368
5374
  }
5369
5375
  clientPlanCurrent = true;
5370
5376
  } catch (error) {
5371
- _chunkGC5ROI3Acjs.logger.warn(
5377
+ _chunk7U4XF76Rcjs.logger.warn(
5372
5378
  `[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
5373
5379
  );
5374
5380
  return modules;
@@ -5379,7 +5385,7 @@ if (import.meta.hot) {
5379
5385
  if (normalizedFile.includes("middleware.")) {
5380
5386
  if (middlewareManager) {
5381
5387
  await middlewareManager.reload();
5382
- _chunkGC5ROI3Acjs.logger.success("\u2705 Middleware reloaded!");
5388
+ _chunk7U4XF76Rcjs.logger.success("\u2705 Middleware reloaded!");
5383
5389
  if (initialPluginManager) {
5384
5390
  for (const middleware of middlewareManager.getMiddlewares()) {
5385
5391
  await initialPluginManager.runHookParallel("middlewareDiscovered", {
@@ -5584,23 +5590,23 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5584
5590
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5585
5591
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5586
5592
  watchFile(routesFile);
5587
- return _chunkODYKCC6Wcjs.generateProgrammaticClientRouteModule.call(void 0, {
5593
+ return _chunkZVSQN7NCcjs.generateProgrammaticClientRouteModule.call(void 0, {
5588
5594
  kind: parsed.kind,
5589
5595
  routePath: parsed.routePath,
5590
5596
  routesFile,
5591
5597
  route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _491 => _491.routes, 'access', _492 => _492.get, 'call', _493 => _493(
5592
- _chunkODYKCC6Wcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5598
+ _chunkZVSQN7NCcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5593
5599
  )]),
5594
5600
  rendererServer: renderer.server,
5595
5601
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5596
5602
  });
5597
5603
  }
5598
5604
  function resolveRealModuleFile(filePath, root) {
5599
- const resolved = _nullishCoalesce(_chunkODYKCC6Wcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5605
+ const resolved = _nullishCoalesce(_chunkZVSQN7NCcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5600
5606
  try {
5601
- return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5607
+ return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5602
5608
  } catch (e28) {
5603
- return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, resolved);
5609
+ return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5604
5610
  }
5605
5611
  }
5606
5612
  function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk67MZTLTFcjs.REACT_RENDERER) {
@@ -5896,7 +5902,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
5896
5902
  `.trim();
5897
5903
  }
5898
5904
  function toProgrammaticRouteImportSpecifier(filePath, root) {
5899
- return root ? _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, filePath, root) : filePath;
5905
+ return root ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
5900
5906
  }
5901
5907
  async function parseRouteModuleProps(routeModule, input) {
5902
5908
  if (typeof routeModule.__farmResolveRouteProps === "function") {
@@ -5935,12 +5941,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5935
5941
  }
5936
5942
  }
5937
5943
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5938
- const providerClientCode = _chunkHVMQAVZKcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5944
+ const providerClientCode = _chunkX4TSMQWFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5939
5945
  integrationProviders,
5940
5946
  root,
5941
5947
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
5942
5948
  );
5943
- const clientPluginEntry = _chunkMBD34AS5cjs.generateFarmClientPluginEntryCode.call(void 0,
5949
+ const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
5944
5950
  plugins,
5945
5951
  root,
5946
5952
  srcDir,
@@ -5949,9 +5955,18 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
5949
5955
  const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5950
5956
  const rendererClientImports = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5951
5957
  import { hydrateRoot, createRoot } from 'react-dom/client'
5952
- import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : appSetupPath ? `import React, { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
5953
- import __farmAppSetup from ${JSON.stringify(_chunkGC5ROI3Acjs.toViteModuleId.call(void 0, appSetupPath, root))}
5954
- __farmConfigureApp(__farmAppSetup)` : `import React, { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}`;
5958
+ import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
5959
+ // Named exports only: a renderer's client module needs no default export. `React` is a
5960
+ // copy of the namespace, as in the production entry, where Rolldown warns about each
5961
+ // optional export (`Children`, `markFunctionComponent`) feature-checked on the namespace.
5962
+ appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
5963
+ import { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
5964
+ import __farmAppSetup from ${JSON.stringify(_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, appSetupPath, root))}
5965
+ const React = { ...__farmRendererClient }
5966
+ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
5967
+ import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
5968
+ const React = { ...__farmRendererClient }`
5969
+ );
5955
5970
  const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
5956
5971
  const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
5957
5972
  docsAdapterReact,
@@ -5990,7 +6005,7 @@ async function createFarmServerTreePageElement(source, pathname) {
5990
6005
  return null;
5991
6006
  }
5992
6007
  }
5993
- ${islandValues ? `${_chunkHVMQAVZKcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6008
+ ${islandValues ? `${_chunkX4TSMQWFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5994
6009
  let farmLastRouteState = null;
5995
6010
 
5996
6011
  // A hot update to a layout tree's client module renders the route again.
@@ -6007,10 +6022,11 @@ function rerenderFarmTreeLayouts() {}`;
6007
6022
  return `
6008
6023
  ${rendererClientImports}
6009
6024
  ${isolatedHydrationImport}
6010
- import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
6011
6025
  import { createClientPluginManager } from '@farm.js/core/plugin/client'
6026
+ // Not @farm.js/core/client: that module's graph imports react, which other renderers' apps lack.
6027
+ import { SPARouter } from '@farm.js/core/internal/spa-router'
6012
6028
  import { isFarmRouteActive } from '@farm.js/core/router'
6013
- import { installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
6029
+ import { installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
6014
6030
  import { reviveDeferredData } from '@farm.js/core/deferred'
6015
6031
  import {
6016
6032
  createFarmDeploymentMismatchError,
@@ -6830,7 +6846,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6830
6846
  return loadedLayouts;
6831
6847
  }
6832
6848
 
6833
- ${_chunkHVMQAVZKcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6849
+ ${_chunkX4TSMQWFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6834
6850
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6835
6851
  let wrapped = element;
6836
6852
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7128,7 +7144,7 @@ function readActiveLayoutPatterns() {
7128
7144
  );
7129
7145
  }
7130
7146
 
7131
- ${_chunkHVMQAVZKcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7147
+ ${_chunkX4TSMQWFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7132
7148
 
7133
7149
  function activateFragmentScripts(root) {
7134
7150
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7187,7 +7203,7 @@ function getLayoutShell(root, patterns, index, find) {
7187
7203
  return shell.innerHTML;
7188
7204
  }
7189
7205
 
7190
- ${islandValues ? _chunkHVMQAVZKcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7206
+ ${islandValues ? _chunkX4TSMQWFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7191
7207
  container,
7192
7208
  fragment,
7193
7209
  currentPatterns,
@@ -7260,7 +7276,9 @@ ${islandValues ? `
7260
7276
  return nextTarget;
7261
7277
  }
7262
7278
 
7263
- ${islandValues ? `${_chunkHVMQAVZKcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7279
+ ${islandValues ? `${_chunkX4TSMQWFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7280
+
7281
+ ${_chunkX4TSMQWFcjs.FARM_EARLY_NAVIGATION_SOURCE}
7264
7282
 
7265
7283
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7266
7284
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7333,19 +7351,20 @@ async function fetchFarmNavigationDocument(path, context) {
7333
7351
  keepLayouts && !context.refresh && !activeLayoutShouldHydrate
7334
7352
  ? readLayoutIdentities(container)
7335
7353
  : [];
7336
- const response = await fetch(url.pathname + url.search, {
7337
- signal: context.signal,
7338
- redirect: 'manual',
7339
- headers: createFarmDeploymentRequestHeaders(deploymentId, {
7340
- Accept: 'text/html',
7341
- // A refresh arrives whole, like a transition: the islands it keeps are all in it.
7342
- ...(context.prefetch || context.refresh ? {} : { 'F-Stream': 'flush' }),
7343
- ...getFarmIslandValueHeaders(),
7344
- // A prefetch names its layouts even when it keeps none: that marks it as a navigation,
7345
- // which the server answers without loading.tsx.
7346
- ...(identities.length || context.prefetch ? { 'F-Layouts': JSON.stringify(identities) } : {}),
7347
- }),
7354
+ const headers = createFarmDeploymentRequestHeaders(deploymentId, {
7355
+ Accept: 'text/html',
7356
+ // A refresh arrives whole, like a transition: the islands it keeps are all in it.
7357
+ ...(context.prefetch || context.refresh ? {} : { 'F-Stream': 'flush' }),
7358
+ ...getFarmIslandValueHeaders(),
7359
+ // A prefetch names its layouts even when it keeps none: that marks it as a navigation,
7360
+ // which the server answers without loading.tsx.
7361
+ ...(identities.length || context.prefetch ? { 'F-Layouts': JSON.stringify(identities) } : {}),
7348
7362
  });
7363
+ const target = url.pathname + url.search;
7364
+ const response = await (
7365
+ (!context.prefetch && takeFarmEarlyNavigation(target, headers, context.signal)) ||
7366
+ fetch(target, { signal: context.signal, redirect: 'manual', headers })
7367
+ );
7349
7368
  if (isFarmDeploymentMismatchResponse(response, deploymentId)) {
7350
7369
  const error = createFarmDeploymentMismatchError(response, deploymentId || 'unknown');
7351
7370
  window.dispatchEvent(new CustomEvent('farm:deployment-mismatch', { detail: error }));
@@ -7849,27 +7868,6 @@ function farmIslandsOnlyDocument() {
7849
7868
  }
7850
7869
  },
7851
7870
  });
7852
- ${islandValues ? `// A layout root that waits for a click renders again on a navigation, and a link under the
7853
- // pointer is a navigation on its way: hydrate the root now, as the production entry does.
7854
- if (layoutShouldHydrate && islandStrategy !== 'load') {
7855
- const hydrateForLink = (target) => {
7856
- const anchor = target instanceof Element ? target.closest('a[href]') : null;
7857
- const href = anchor && anchor.getAttribute('href');
7858
- if (!href || href.startsWith('#') || hasAbsoluteNavigationHref(href)) return false;
7859
- if (!pageContainer.contains(anchor)) return false;
7860
- document.dispatchEvent(
7861
- new CustomEvent('farm:island-interaction', { detail: { target: anchor, kind: null } }),
7862
- );
7863
- return true;
7864
- };
7865
- const onLinkIntent = (event) => {
7866
- if (hydrateForLink(event.target)) document.removeEventListener('mouseover', onLinkIntent, true);
7867
- };
7868
- if (!hydrateForLink(pageContainer.querySelector('a[href]:hover'))) {
7869
- document.addEventListener('mouseover', onLinkIntent, true);
7870
- void pageHydration.finally(() => document.removeEventListener('mouseover', onLinkIntent, true));
7871
- }
7872
- }` : ""}
7873
7871
  ${isolatedHydrationEnabled ? `const isolatedHydration =
7874
7872
  hasIsolatedClientBoundaries &&
7875
7873
  !layoutShouldHydrate
@@ -7978,7 +7976,7 @@ function generateClientManifest(bundle) {
7978
7976
  return manifest;
7979
7977
  }
7980
7978
  async function defineConfig(config = {}) {
7981
- const tailwindVitePlugin = await _chunkMBD34AS5cjs.loadTailwindVitePlugin.call(void 0, );
7979
+ const tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, );
7982
7980
  const appRoot = path6.resolve(config.root || process.cwd());
7983
7981
  if (_optionalChain([config, 'access', _496 => _496.extends, 'optionalAccess', _497 => _497.length])) {
7984
7982
  const { config: layeredConfig } = await import("./layers-HMEGUEXM.cjs").then(
@@ -7990,7 +7988,7 @@ async function defineConfig(config = {}) {
7990
7988
  config = layeredConfig;
7991
7989
  }
7992
7990
  config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
7993
- config.images = _chunkHVMQAVZKcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7991
+ config.images = _chunkX4TSMQWFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7994
7992
  const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
7995
7993
  ssr: true
7996
7994
  });
@@ -8088,7 +8086,7 @@ async function defineConfig(config = {}) {
8088
8086
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8089
8087
  console.log("");
8090
8088
  console.log(
8091
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkLMXGCFAMcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8089
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkCCMP4JD2cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8092
8090
  );
8093
8091
  console.log("");
8094
8092
  console.log(
@@ -8122,7 +8120,7 @@ async function defineConfig(config = {}) {
8122
8120
  plugins: [
8123
8121
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8124
8122
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8125
- _chunkHVMQAVZKcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8123
+ _chunkX4TSMQWFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8126
8124
  tailwindVitePlugin,
8127
8125
  ...rendererVitePlugins,
8128
8126
  ...reactRefreshPlugins,
@@ -8131,14 +8129,14 @@ async function defineConfig(config = {}) {
8131
8129
  farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
8132
8130
  farmIslandContainersPlugin(config),
8133
8131
  farmPlugin(config),
8134
- _chunkODYKCC6Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8132
+ _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8135
8133
  farmBrandingPlugin
8136
8134
  ],
8137
8135
  customLogger: farmLogger,
8138
8136
  clearScreen: false,
8139
8137
  optimizeDeps: {
8140
- ..._chunkHVMQAVZKcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8141
- _chunkHVMQAVZKcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8138
+ ..._chunkX4TSMQWFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8139
+ _chunkX4TSMQWFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8142
8140
  appRoot,
8143
8141
  _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8144
8142
  ),
@@ -8181,7 +8179,7 @@ async function defineConfig(config = {}) {
8181
8179
  // Stub out problematic server-only modules during dev mode
8182
8180
  alias: {
8183
8181
  ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, config.layers),
8184
- ..._chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8182
+ ..._chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8185
8183
  // Nitro internals that should not be resolved in browser
8186
8184
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8187
8185
  "@poppinss/dumper": "data:text/javascript,export default {};",
@@ -8213,4 +8211,5 @@ async function defineConfig(config = {}) {
8213
8211
 
8214
8212
 
8215
8213
 
8216
- exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
8214
+
8215
+ exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;