@farm.js/core 0.1.78 → 0.1.81

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 (467) 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-Cxi3214_.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-CYHfcjur.d.mts → agent-mcp.d-DMqOqnOA.d.mts} +1 -1
  5. package/dist/agent-runtime.cjs +2 -2
  6. package/dist/agent-runtime.d.mts +5 -4
  7. package/dist/agent-runtime.d.ts +5 -4
  8. package/dist/agent-runtime.mjs +1 -1
  9. package/dist/analyzer-435DCIQ6.cjs +17 -0
  10. package/dist/{analyzer-M2BG6QYU.mjs → analyzer-IC66UJCU.mjs} +3 -2
  11. package/dist/api/client.cjs +1 -1
  12. package/dist/api/client.mjs +1 -1
  13. package/dist/api/client.native.cjs +1 -1
  14. package/dist/api/client.native.mjs +1 -1
  15. package/dist/api/node.cjs +7 -7
  16. package/dist/api/node.d.mts +7 -6
  17. package/dist/api/node.d.ts +7 -6
  18. package/dist/api/node.mjs +6 -6
  19. package/dist/api/route-manager.cjs +10 -10
  20. package/dist/api/route-manager.d.mts +7 -6
  21. package/dist/api/route-manager.d.ts +7 -6
  22. package/dist/api/route-manager.mjs +9 -9
  23. package/dist/api/runtime.cjs +6 -6
  24. package/dist/api/runtime.d.mts +6 -5
  25. package/dist/api/runtime.d.ts +6 -5
  26. package/dist/api/runtime.mjs +5 -5
  27. package/dist/api.cjs +12 -12
  28. package/dist/api.d.mts +8 -7
  29. package/dist/api.d.ts +8 -7
  30. package/dist/api.mjs +11 -11
  31. package/dist/{app-manifest.d-6NCkLQ1y.d.mts → app-manifest.d-Bbxp5kes.d.mts} +1 -1
  32. package/dist/{app-manifest.d-DuqLBcmi.d.ts → app-manifest.d-C8Cswd31.d.ts} +1 -1
  33. package/dist/app-markdown.cjs +5 -5
  34. package/dist/app-markdown.d.mts +8 -7
  35. package/dist/app-markdown.d.ts +8 -7
  36. package/dist/app-markdown.mjs +4 -4
  37. package/dist/{app.d-Dk2HkvPh.d.mts → app.d-BJuSurgy.d.mts} +13 -4
  38. package/dist/{app.d-Bz6vYBFF.d.ts → app.d-DGIoFt5D.d.ts} +13 -4
  39. package/dist/cache.cjs +3 -3
  40. package/dist/cache.mjs +2 -2
  41. package/dist/{chunk-PG7J7XYT.cjs → chunk-26WP75W5.cjs} +38 -22
  42. package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
  43. package/dist/{chunk-GCRT6GJG.mjs → chunk-2HMSSPCZ.mjs} +26 -0
  44. package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
  45. package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
  46. package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
  47. package/dist/chunk-2UYYXSUS.mjs +401 -0
  48. package/dist/{chunk-DD2ANOEF.cjs → chunk-2Y2HRZQY.cjs} +843 -627
  49. package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
  50. package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
  51. package/dist/{chunk-XT2CHTDN.mjs → chunk-3RVLJTFZ.mjs} +6 -6
  52. package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
  53. package/dist/{chunk-ODYKCC6W.cjs → chunk-46UV2E7I.cjs} +156 -104
  54. package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
  55. package/dist/{chunk-VRI43FDN.mjs → chunk-4WXNTAOM.mjs} +1 -1
  56. package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
  57. package/dist/chunk-5MMKNW7Q.cjs +54 -0
  58. package/dist/{chunk-RIMEFQYO.mjs → chunk-5N526T7Q.mjs} +116 -86
  59. package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
  60. package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
  61. package/dist/{chunk-CBP7AKZH.mjs → chunk-6GJZJAED.mjs} +1 -1
  62. package/dist/{chunk-5REIO5DT.mjs → chunk-6WVRVGKC.mjs} +6 -6
  63. package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
  64. package/dist/{chunk-FOULIN4S.cjs → chunk-ADQ2LATR.cjs} +2 -2
  65. package/dist/{chunk-K3ZELA6U.cjs → chunk-AHVF5GI2.cjs} +10 -10
  66. package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
  67. package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
  68. package/dist/chunk-B7L24VPX.cjs +401 -0
  69. package/dist/{chunk-DPBQRDWW.cjs → chunk-BBVLOEND.cjs} +4 -4
  70. package/dist/{chunk-DASQJ5UD.mjs → chunk-BCQIXH7L.mjs} +1 -1
  71. package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
  72. package/dist/{chunk-R77D7TCZ.mjs → chunk-BJWJP5A4.mjs} +20 -13
  73. package/dist/{chunk-X2SEYK7I.mjs → chunk-BPWTSPK6.mjs} +3 -3
  74. package/dist/{chunk-CKNZJFK5.cjs → chunk-BSX5OGSD.cjs} +4 -4
  75. package/dist/{chunk-ERT6HQAI.mjs → chunk-BVJUFVCU.mjs} +2 -2
  76. package/dist/chunk-C5QHZ626.cjs +85 -0
  77. package/dist/{chunk-HVMQAVZK.cjs → chunk-CL7BUGVB.cjs} +656 -521
  78. package/dist/{chunk-TZ2YPXLB.cjs → chunk-CN2JOTRO.cjs} +7 -7
  79. package/dist/{chunk-ZCYGYIC2.cjs → chunk-CPZZBCPO.cjs} +22 -21
  80. package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
  81. package/dist/chunk-D2VAANBS.mjs +48 -0
  82. package/dist/{chunk-VRJAMU34.mjs → chunk-D77OGI6X.mjs} +1 -1
  83. package/dist/{chunk-6XDDE7M6.cjs → chunk-DJ3PVHTW.cjs} +3 -3
  84. package/dist/{chunk-XGS76V7L.cjs → chunk-E3HBD2K3.cjs} +22 -22
  85. package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
  86. package/dist/{chunk-KUXEII7V.mjs → chunk-ECVSRE4Y.mjs} +3 -2
  87. package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
  88. package/dist/chunk-EZYKV24V.mjs +385 -0
  89. package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
  90. package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
  91. package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
  92. package/dist/{chunk-5KISFWD2.cjs → chunk-FYZD7DUS.cjs} +12 -12
  93. package/dist/{chunk-H5OVJHXY.cjs → chunk-GAWSWJJ2.cjs} +27 -27
  94. package/dist/{chunk-A37D6LOS.mjs → chunk-GY63XD6K.mjs} +1 -1
  95. package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
  96. package/dist/{chunk-5QZT2EQN.cjs → chunk-HQEYZSF3.cjs} +4 -3
  97. package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
  98. package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
  99. package/dist/{chunk-7RQ5KAK6.mjs → chunk-HTNJ7A4D.mjs} +88 -36
  100. package/dist/chunk-I4WZRG73.mjs +54 -0
  101. package/dist/{chunk-BGUTIQII.mjs → chunk-ICOJ2BC6.mjs} +24 -8
  102. package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
  103. package/dist/{chunk-E7V2GYBP.mjs → chunk-IM3UINTZ.mjs} +67 -9
  104. package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
  105. package/dist/{chunk-AHGOHPRN.mjs → chunk-IPG6B25T.mjs} +235 -100
  106. package/dist/{chunk-PE2LEWXA.mjs → chunk-J2VUPCCR.mjs} +4 -4
  107. package/dist/{chunk-Q2EKSSEG.cjs → chunk-JB4BHRFK.cjs} +17 -17
  108. package/dist/{chunk-YN7G22MP.cjs → chunk-JCYDWJVO.cjs} +3 -3
  109. package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
  110. package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
  111. package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
  112. package/dist/{chunk-5DREJN4G.cjs → chunk-LKIG5SM6.cjs} +17 -17
  113. package/dist/{chunk-OGVOKAQU.mjs → chunk-LTOT5KVJ.mjs} +2 -2
  114. package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
  115. package/dist/{chunk-67MZTLTF.cjs → chunk-M6DAIE4T.cjs} +27 -1
  116. package/dist/{chunk-IWGGRXD2.cjs → chunk-MHKPXX3J.cjs} +2 -2
  117. package/dist/{chunk-F7PKUP6P.cjs → chunk-MOGRRZMW.cjs} +38 -38
  118. package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
  119. package/dist/{chunk-WGNGM6MJ.mjs → chunk-N3VMHPIY.mjs} +2 -2
  120. package/dist/{chunk-EBFTAVGD.mjs → chunk-NOYKBGUK.mjs} +672 -456
  121. package/dist/{chunk-LMXGCFAM.cjs → chunk-NSLRK5DK.cjs} +1 -1
  122. package/dist/{chunk-EVVV2XZ2.cjs → chunk-NW3DL2PM.cjs} +53 -7
  123. package/dist/{chunk-6ZFGWB75.cjs → chunk-OFVCWV2D.cjs} +5 -5
  124. package/dist/{chunk-NB2ZEBIS.cjs → chunk-OIWDEDUO.cjs} +540 -510
  125. package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
  126. package/dist/{chunk-QES76U42.mjs → chunk-ONSZP5JK.mjs} +4 -4
  127. package/dist/{chunk-H76C5AOU.mjs → chunk-OO4GVGM3.mjs} +4 -4
  128. package/dist/{chunk-BZJYPIFZ.cjs → chunk-OUDNUFVR.cjs} +12 -12
  129. package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
  130. package/dist/{chunk-GFXKO4UW.mjs → chunk-PO5MZIWK.mjs} +49 -49
  131. package/dist/{chunk-VCW6BR6U.mjs → chunk-POL5RCVU.mjs} +2 -2
  132. package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
  133. package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
  134. package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
  135. package/dist/{chunk-IGE5BAWK.mjs → chunk-QBJ6N5MT.mjs} +53 -7
  136. package/dist/{chunk-62DZHPDK.cjs → chunk-QCKSYYXK.cjs} +10 -10
  137. package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
  138. package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
  139. package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
  140. package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
  141. package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
  142. package/dist/{chunk-VO5XDZHK.mjs → chunk-RPA45OQS.mjs} +2 -2
  143. package/dist/{chunk-PNWRH6TR.mjs → chunk-RZ6XUEQS.mjs} +4 -4
  144. package/dist/{chunk-S6RUJRWI.mjs → chunk-S3IWDDQ3.mjs} +1 -1
  145. package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
  146. package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
  147. package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
  148. package/dist/{chunk-26CNCIFI.cjs → chunk-T3SMMLSB.cjs} +2 -2
  149. package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
  150. package/dist/{chunk-A7EJATEW.mjs → chunk-TLSGRK7E.mjs} +4 -4
  151. package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
  152. package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
  153. package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
  154. package/dist/chunk-UDMBUTJD.mjs +85 -0
  155. package/dist/{chunk-WJ4NUY2H.mjs → chunk-UF4BNKKJ.mjs} +4 -4
  156. package/dist/{chunk-L7Y65BQU.cjs → chunk-UGD53SNO.cjs} +50 -50
  157. package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
  158. package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
  159. package/dist/{chunk-4SLHSODZ.cjs → chunk-VGHDPEPQ.cjs} +15 -15
  160. package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
  161. package/dist/{chunk-47R7CX4A.mjs → chunk-VPGEYX5Y.mjs} +4 -4
  162. package/dist/chunk-VS7HLH4S.cjs +385 -0
  163. package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
  164. package/dist/{chunk-NNGBTJCX.cjs → chunk-W6C3LEXX.cjs} +83 -25
  165. package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
  166. package/dist/chunk-WMRGIQTA.cjs +48 -0
  167. package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
  168. package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
  169. package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
  170. package/dist/{chunk-JHZ6HULQ.cjs → chunk-XOFJUSWC.cjs} +4 -4
  171. package/dist/{chunk-LJKTJNOF.cjs → chunk-XOGCNKB7.cjs} +3 -3
  172. package/dist/{chunk-7JTVN6IJ.mjs → chunk-XOXCQGAF.mjs} +7 -6
  173. package/dist/{chunk-LIC6CMLB.mjs → chunk-YH7ENV3K.mjs} +18 -18
  174. package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
  175. package/dist/{chunk-B3IRRANH.mjs → chunk-YHM4PXJY.mjs} +1 -1
  176. package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
  177. package/dist/{chunk-ZEWIWAS2.mjs → chunk-YSU3WCW6.mjs} +2 -2
  178. package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
  179. package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
  180. package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
  181. package/dist/{chunk-MBD34AS5.cjs → chunk-Z5BANEQD.cjs} +6 -6
  182. package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
  183. package/dist/{chunk-2G6JPLSL.cjs → chunk-ZIYJWJV2.cjs} +27 -20
  184. package/dist/{chunk-KZ5BOWJS.cjs → chunk-ZKNXCRUQ.cjs} +28 -28
  185. package/dist/{cli-runtime.d-CGMGs1Zz.d.mts → cli-runtime.d-D8O1v2_X.d.mts} +7 -6
  186. package/dist/{cli-runtime.d-BG9q2_vC.d.ts → cli-runtime.d-hf4L1MNP.d.ts} +7 -6
  187. package/dist/client/lifecycle.d.mts +1 -1
  188. package/dist/client/lifecycle.d.ts +1 -1
  189. package/dist/{client-component.d-B84GPb_u.d.ts → client-component.d-CX8UCQh-.d.ts} +1 -1
  190. package/dist/{client-component.d-CdsG1E7p.d.mts → client-component.d-DFwUHlOz.d.mts} +1 -1
  191. package/dist/{client-plugins.d-DX-iCJWE.d.mts → client-plugins.d-BflSNO-b.d.mts} +5 -16
  192. package/dist/{client-plugins.d-FptsHgls.d.ts → client-plugins.d-qWp8hNwd.d.ts} +5 -16
  193. package/dist/client-plugins.d.mts +5 -4
  194. package/dist/client-plugins.d.ts +5 -4
  195. package/dist/client.cjs +9 -8
  196. package/dist/client.d.mts +23 -154
  197. package/dist/client.d.ts +23 -154
  198. package/dist/client.mjs +8 -7
  199. package/dist/config.d.mts +5 -4
  200. package/dist/config.d.ts +5 -4
  201. package/dist/cron.cjs +3 -3
  202. package/dist/cron.mjs +2 -2
  203. package/dist/desktop.d.mts +6 -5
  204. package/dist/desktop.d.ts +6 -5
  205. package/dist/{devtools-TMATFNUY.cjs → devtools-EI5N366Z.cjs} +17 -17
  206. package/dist/{devtools-7P3OUNLV.mjs → devtools-XJHODO5H.mjs} +14 -14
  207. package/dist/docs.cjs +18 -18
  208. package/dist/docs.d.mts +7 -6
  209. package/dist/docs.d.ts +7 -6
  210. package/dist/docs.mjs +17 -17
  211. package/dist/environment/vite.cjs +8 -7
  212. package/dist/environment/vite.d.mts +9 -0
  213. package/dist/environment/vite.d.ts +9 -0
  214. package/dist/environment/vite.mjs +7 -6
  215. package/dist/{handler.d-Cy3XbY_W.d.ts → handler.d-C2oRihfa.d.ts} +1 -1
  216. package/dist/{handler.d-DSwLTpa5.d.mts → handler.d-DoH5Krkq.d.mts} +1 -1
  217. package/dist/{headers.d-DiL9YTH3.d.mts → headers.d-BrX53wFQ.d.mts} +1 -1
  218. package/dist/{headers.d-Qbjo38a0.d.ts → headers.d-Dj0mfYpb.d.ts} +1 -1
  219. package/dist/index.cjs +90 -82
  220. package/dist/{index.d-OccJoC6I.d.ts → index.d-Dhc2scRl.d.ts} +1 -1
  221. package/dist/{index.d-CqQKX3s6.d.mts → index.d-DzDHOttz.d.mts} +1 -1
  222. package/dist/index.d.mts +29 -27
  223. package/dist/index.d.ts +29 -27
  224. package/dist/index.mjs +92 -84
  225. package/dist/instrumentation.cjs +3 -3
  226. package/dist/instrumentation.mjs +2 -2
  227. package/dist/integrations/orm.cjs +3 -3
  228. package/dist/integrations/orm.d.mts +5 -4
  229. package/dist/integrations/orm.d.ts +5 -4
  230. package/dist/integrations/orm.mjs +2 -2
  231. package/dist/integrations.cjs +2 -2
  232. package/dist/integrations.d.mts +5 -4
  233. package/dist/integrations.d.ts +5 -4
  234. package/dist/integrations.mjs +1 -1
  235. package/dist/internal/app-markdown-runtime.cjs +4 -4
  236. package/dist/internal/app-markdown-runtime.d.mts +15 -8
  237. package/dist/internal/app-markdown-runtime.d.ts +15 -8
  238. package/dist/internal/app-markdown-runtime.mjs +3 -3
  239. package/dist/internal/build-runtime.cjs +63 -62
  240. package/dist/internal/build-runtime.d.mts +8 -7
  241. package/dist/internal/build-runtime.d.ts +8 -7
  242. package/dist/internal/build-runtime.mjs +62 -61
  243. package/dist/internal/cli-runtime.cjs +37 -34
  244. package/dist/internal/cli-runtime.d.mts +12 -11
  245. package/dist/internal/cli-runtime.d.ts +12 -11
  246. package/dist/internal/cli-runtime.mjs +39 -36
  247. package/dist/internal/client-error-overlay.cjs +4 -4
  248. package/dist/internal/client-error-overlay.mjs +1 -1
  249. package/dist/internal/client-runtime.cjs +112 -14
  250. package/dist/internal/client-runtime.d.mts +29 -22
  251. package/dist/internal/client-runtime.d.ts +29 -22
  252. package/dist/internal/client-runtime.mjs +104 -6
  253. package/dist/internal/compression-runtime.d.mts +5 -4
  254. package/dist/internal/compression-runtime.d.ts +5 -4
  255. package/dist/internal/config-runtime.cjs +16 -16
  256. package/dist/internal/config-runtime.d.mts +7 -6
  257. package/dist/internal/config-runtime.d.ts +7 -6
  258. package/dist/internal/config-runtime.mjs +15 -15
  259. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  260. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  261. package/dist/internal/form-actions.cjs +3 -3
  262. package/dist/internal/form-actions.mjs +2 -2
  263. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  264. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  265. package/dist/internal/island-codec.cjs +3 -3
  266. package/dist/internal/island-codec.mjs +2 -2
  267. package/dist/internal/island-value-store.d.mts +1 -1
  268. package/dist/internal/island-value-store.d.ts +1 -1
  269. package/dist/internal/islands-boot.cjs +39 -5
  270. package/dist/internal/islands-boot.d.mts +19 -1
  271. package/dist/internal/islands-boot.d.ts +19 -1
  272. package/dist/internal/islands-boot.mjs +38 -4
  273. package/dist/internal/islands-runtime.cjs +10 -56
  274. package/dist/internal/islands-runtime.mjs +6 -52
  275. package/dist/internal/islands-server.cjs +4 -4
  276. package/dist/internal/islands-server.mjs +3 -3
  277. package/dist/internal/islx-actions-client.cjs +36 -0
  278. package/dist/internal/islx-actions-client.d.mts +13 -0
  279. package/dist/internal/islx-actions-client.d.ts +13 -0
  280. package/dist/internal/islx-actions-client.mjs +36 -0
  281. package/dist/internal/islx-actions-server.cjs +8 -0
  282. package/dist/internal/islx-actions-server.d.mts +6 -0
  283. package/dist/internal/islx-actions-server.d.ts +6 -0
  284. package/dist/internal/islx-actions-server.mjs +8 -0
  285. package/dist/internal/islx-client.d.mts +0 -4
  286. package/dist/internal/islx-client.d.ts +0 -4
  287. package/dist/internal/isolated-boundary.cjs +3 -3
  288. package/dist/internal/isolated-boundary.d.mts +1 -1
  289. package/dist/internal/isolated-boundary.d.ts +1 -1
  290. package/dist/internal/isolated-boundary.mjs +2 -2
  291. package/dist/internal/metadata-image-runtime.cjs +4 -2
  292. package/dist/internal/metadata-image-runtime.d.mts +18 -2
  293. package/dist/internal/metadata-image-runtime.d.ts +18 -2
  294. package/dist/internal/metadata-image-runtime.mjs +5 -3
  295. package/dist/internal/native-server-fns.cjs +5 -4
  296. package/dist/internal/native-server-fns.mjs +4 -3
  297. package/dist/internal/navigation-neutral.cjs +36 -0
  298. package/dist/internal/navigation-neutral.d.mts +14 -0
  299. package/dist/internal/navigation-neutral.d.ts +14 -0
  300. package/dist/internal/navigation-neutral.mjs +36 -0
  301. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  302. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  303. package/dist/internal/production-runtime.cjs +36 -36
  304. package/dist/internal/production-runtime.d.mts +15 -13
  305. package/dist/internal/production-runtime.d.ts +15 -13
  306. package/dist/internal/production-runtime.mjs +46 -46
  307. package/dist/internal/server-tree.cjs +5 -4
  308. package/dist/internal/server-tree.d.mts +3 -4
  309. package/dist/internal/server-tree.d.ts +3 -4
  310. package/dist/internal/server-tree.mjs +4 -3
  311. package/dist/internal/spa-router.cjs +44 -0
  312. package/dist/internal/spa-router.d.mts +42 -0
  313. package/dist/internal/spa-router.d.ts +42 -0
  314. package/dist/internal/spa-router.mjs +44 -0
  315. package/dist/internal/start-manifest.d.mts +5 -4
  316. package/dist/internal/start-manifest.d.ts +5 -4
  317. package/dist/internal/vercel-edge-middleware.cjs +4 -4
  318. package/dist/internal/vercel-edge-middleware.mjs +3 -3
  319. package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
  320. package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
  321. package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
  322. package/dist/layers-XLOMMQP7.cjs +21 -0
  323. package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
  324. package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
  325. package/dist/markdown.cjs +3 -3
  326. package/dist/markdown.d.mts +5 -4
  327. package/dist/markdown.d.ts +5 -4
  328. package/dist/markdown.mjs +2 -2
  329. package/dist/middleware.cjs +10 -10
  330. package/dist/middleware.d.mts +5 -4
  331. package/dist/middleware.d.ts +5 -4
  332. package/dist/middleware.mjs +9 -9
  333. package/dist/{mount.d-AcJaUtHF.d.mts → mount.d-DOaeUoWq.d.mts} +1 -1
  334. package/dist/{mount.d-CPzqOm-a.d.ts → mount.d-DwXjaOHY.d.ts} +1 -1
  335. package/dist/{native-server-fn-handler-XRTZR7SZ.cjs → native-server-fn-handler-57TCQPSM.cjs} +6 -6
  336. package/dist/{native-server-fn-handler-WYYY4YBN.mjs → native-server-fn-handler-PYK65A46.mjs} +5 -5
  337. package/dist/{native-tree-MNUFN5G6.cjs → native-tree-5TENEQ7Y.cjs} +4 -4
  338. package/dist/{native-tree-JDI3LJSH.mjs → native-tree-LNO7K6JR.mjs} +3 -3
  339. package/dist/{navigation-delegate.d-C4i5Y39E.d.mts → navigation-delegate.d-BElGUMgt.d.mts} +1 -1
  340. package/dist/{navigation-delegate.d-_Df9DnPY.d.ts → navigation-delegate.d-o3pPd9VI.d.ts} +1 -1
  341. package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
  342. package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
  343. package/dist/navigation.cjs +6 -6
  344. package/dist/navigation.d.mts +10 -9
  345. package/dist/navigation.d.ts +10 -9
  346. package/dist/navigation.mjs +5 -5
  347. package/dist/{nitro-NUCTYEKJ.cjs → nitro-XGIO6EQN.cjs} +7 -7
  348. package/dist/{nitro-VCJ6QQSI.mjs → nitro-YLTGVGK4.mjs} +3 -3
  349. package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
  350. package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
  351. package/dist/observability.cjs +8 -2
  352. package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.mts} +17 -1
  353. package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.ts} +17 -1
  354. package/dist/observability.d.mts +1 -1
  355. package/dist/observability.d.ts +1 -1
  356. package/dist/observability.mjs +7 -1
  357. package/dist/{plugin-TV6W7YNK.mjs → plugin-33I3V42N.mjs} +1 -1
  358. package/dist/{plugin-AGEFSU7K.cjs → plugin-LN3JBZRR.cjs} +2 -2
  359. package/dist/plugin.cjs +50 -48
  360. package/dist/plugin.d.mts +9 -8
  361. package/dist/plugin.d.ts +9 -8
  362. package/dist/plugin.mjs +49 -47
  363. package/dist/query/client.cjs +10 -10
  364. package/dist/query/client.mjs +5 -5
  365. package/dist/{render-plan.d-CslZE7o7.d.ts → render-plan.d-BD06tqFA.d.ts} +1 -1
  366. package/dist/{render-plan.d-4V_NmaA6.d.mts → render-plan.d-xWCRAJeR.d.mts} +1 -1
  367. package/dist/renderer/none/server.cjs +5 -1
  368. package/dist/renderer/none/server.d.mts +3 -1
  369. package/dist/renderer/none/server.d.ts +3 -1
  370. package/dist/renderer/none/server.mjs +4 -0
  371. package/dist/renderer/react/server.cjs +6 -6
  372. package/dist/renderer/react/server.mjs +3 -3
  373. package/dist/renderer-client.cjs +34 -15
  374. package/dist/renderer-client.d.mts +16 -100
  375. package/dist/renderer-client.d.ts +16 -100
  376. package/dist/renderer-client.mjs +23 -4
  377. package/dist/renderer.cjs +4 -2
  378. package/dist/renderer.d.mts +49 -6
  379. package/dist/renderer.d.ts +49 -6
  380. package/dist/renderer.mjs +3 -1
  381. package/dist/{request.d-CbV3y7j3.d.ts → request.d-DUMuWxSN.d.ts} +1 -1
  382. package/dist/{request.d-CmLTxEgS.d.mts → request.d-Dx82V8bz.d.mts} +1 -1
  383. package/dist/request.d.mts +6 -5
  384. package/dist/request.d.ts +6 -5
  385. package/dist/{route-rendering.d-CETnXNez.d.ts → route-rendering.d-BwBVpLtD.d.ts} +1 -1
  386. package/dist/{route-rendering.d-CmoqfOmj.d.mts → route-rendering.d-DJh6GauM.d.mts} +1 -1
  387. package/dist/{router.d-ktz7pwYm.d.mts → router.d-BtkKDxUB.d.mts} +1 -1
  388. package/dist/{router.d-Dga3N5YO.d.ts → router.d-CJBSG5jr.d.ts} +1 -1
  389. package/dist/routes.cjs +5 -5
  390. package/dist/routes.d.mts +5 -4
  391. package/dist/routes.d.ts +5 -4
  392. package/dist/routes.mjs +4 -4
  393. package/dist/{rsc-pipeline-N7CWJW7T.mjs → rsc-pipeline-GD6KLOIG.mjs} +20 -20
  394. package/dist/{rsc-pipeline-JLYD26AR.cjs → rsc-pipeline-H5AXQA7A.cjs} +21 -21
  395. package/dist/{runtime-QXX2A4TS.mjs → runtime-OJ7FXFUI.mjs} +22 -22
  396. package/dist/{runtime-F5NSS4DD.cjs → runtime-YWQVBC3V.cjs} +32 -32
  397. package/dist/{runtime.d-BWLZUOfA.d.ts → runtime.d-BQnD0cfC.d.ts} +1 -1
  398. package/dist/{runtime.d-DuaXEM0p.d.mts → runtime.d-C4SuZXf6.d.mts} +1 -1
  399. package/dist/{schema-dev-notice-2GN5V7Y2.mjs → schema-dev-notice-EUPAUJVN.mjs} +2 -2
  400. package/dist/{schema-dev-notice-6VCOZGG2.cjs → schema-dev-notice-ZSCL47CT.cjs} +5 -5
  401. package/dist/search-client-A7YJT7JZ.cjs +15 -0
  402. package/dist/{search-client-W4PEFAQB.mjs → search-client-GIXIEU75.mjs} +1 -1
  403. package/dist/server-action-security.cjs +1 -1
  404. package/dist/server-action-security.mjs +1 -1
  405. package/dist/{server-components-status.d-CqxtJmqP.d.mts → server-components-status.d-9rH7ZoEq.d.mts} +1 -1
  406. package/dist/{server-components-status.d-C5JpC7_Y.d.ts → server-components-status.d-rfKOcE0N.d.ts} +1 -1
  407. package/dist/server-fn.cjs +5 -5
  408. package/dist/server-fn.mjs +4 -4
  409. package/dist/server-plugins.cjs +1 -1
  410. package/dist/server-plugins.d.mts +7 -6
  411. package/dist/server-plugins.d.ts +7 -6
  412. package/dist/server-plugins.mjs +1 -1
  413. package/dist/server-query.cjs +6 -6
  414. package/dist/server-query.mjs +5 -5
  415. package/dist/server.cjs +95 -90
  416. package/dist/server.d.mts +16 -15
  417. package/dist/server.d.ts +16 -15
  418. package/dist/server.mjs +61 -56
  419. package/dist/{session-AK2OA5UZ.mjs → session-4IB34X35.mjs} +2 -2
  420. package/dist/session-MOYQJ7E6.cjs +24 -0
  421. package/dist/{spa-router.d-C3LzwTlY.d.ts → spa-router.d-DMKiBsHH.d.ts} +20 -4
  422. package/dist/{spa-router.d-BLE188EL.d.mts → spa-router.d-V6XLSTCy.d.mts} +20 -4
  423. package/dist/{ssg.d-QrFyU6T4.d.mts → ssg.d-BnCKPQL0.d.mts} +2 -2
  424. package/dist/{ssg.d-DisOfj0I.d.ts → ssg.d-MNedvvMB.d.ts} +2 -2
  425. package/dist/storage.cjs +2 -2
  426. package/dist/storage.d.mts +112 -96
  427. package/dist/storage.d.ts +112 -96
  428. package/dist/storage.mjs +1 -1
  429. package/dist/store-core.d-Ad5biajo.d.ts +301 -0
  430. package/dist/store-core.d-BqJI1-ix.d.mts +301 -0
  431. package/dist/testing.cjs +13 -13
  432. package/dist/testing.d.mts +5 -4
  433. package/dist/testing.d.ts +5 -4
  434. package/dist/testing.mjs +10 -10
  435. package/dist/{types.d-DW2vyaUq.d.mts → types.d-C5hlNbHa.d.mts} +8 -1
  436. package/dist/{types.d-DW2vyaUq.d.ts → types.d-C5hlNbHa.d.ts} +8 -1
  437. package/dist/{utils.d-BlWZFgdL.d.mts → utils.d-BEKLWa0Z.d.mts} +1 -1
  438. package/dist/{utils.d-7YcgfTCK.d.ts → utils.d-BdjHKDuT.d.ts} +1 -1
  439. package/dist/version.cjs +2 -2
  440. package/dist/version.mjs +1 -1
  441. package/dist/vite.cjs +55 -49
  442. package/dist/vite.d.mts +26 -10
  443. package/dist/vite.d.ts +26 -10
  444. package/dist/vite.mjs +54 -48
  445. package/dist/workflows.cjs +3 -3
  446. package/dist/workflows.mjs +2 -2
  447. package/package.json +23 -2
  448. package/types/images.d.ts +9 -0
  449. package/dist/analyzer-KVTUYGTT.cjs +0 -16
  450. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  451. package/dist/chunk-HONTCUK6.mjs +0 -203
  452. package/dist/chunk-K6PGK7DC.cjs +0 -203
  453. package/dist/chunk-NBIVGHAT.mjs +0 -50
  454. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  455. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  456. package/dist/layers-HMEGUEXM.cjs +0 -21
  457. package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
  458. package/dist/search-client-6NVC6HM2.cjs +0 -15
  459. package/dist/session-H4TWP73H.cjs +0 -24
  460. package/dist/{chunk-JKFN3YVG.mjs → chunk-6JWXHPVR.mjs} +0 -0
  461. package/dist/{chunk-522K362I.mjs → chunk-C2OLXVUC.mjs} +0 -0
  462. package/dist/{chunk-MALGIHIC.cjs → chunk-HS4JPIGR.cjs} +0 -0
  463. package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
  464. package/dist/{chunk-CUZT7474.cjs → chunk-TCMRLW3K.cjs} +0 -0
  465. package/dist/{chunk-Q3DO7MVK.mjs → chunk-URBP6DLH.mjs} +0 -0
  466. package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
  467. /package/dist/{chunk-AOTD2N5P.cjs → chunk-WGWWRV2M.cjs} +0 -0
@@ -1,5 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
+
4
+ var _chunkWMRGIQTAcjs = require('./chunk-WMRGIQTA.cjs');
5
+
6
+
3
7
  var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
4
8
 
5
9
 
@@ -7,10 +11,11 @@ var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
7
11
  var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
8
12
 
9
13
 
10
- var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
14
+ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
15
+
11
16
 
12
17
 
13
- var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
18
+ var _chunkM6DAIE4Tcjs = require('./chunk-M6DAIE4T.cjs');
14
19
 
15
20
 
16
21
 
@@ -18,10 +23,10 @@ var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
18
23
  var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
19
24
 
20
25
 
21
- var _chunkGC5ROI3Acjs = require('./chunk-GC5ROI3A.cjs');
26
+ var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
22
27
 
23
28
 
24
- var _chunkLMXGCFAMcjs = require('./chunk-LMXGCFAM.cjs');
29
+ var _chunkNSLRK5DKcjs = require('./chunk-NSLRK5DK.cjs');
25
30
 
26
31
  // src/environment-vite.ts
27
32
  var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
@@ -49,7 +54,7 @@ var FARM_DIAGNOSTIC_RULES = {
49
54
  },
50
55
  CLIENT_SERVER_FUNCTION: {
51
56
  severity: "error",
52
- fix: "Add @farm.js/plugin/rsc and set experimental.serverActions: true so client imports become server references, or call it from server code, or expose an API route and call it with createAPIClient.",
57
+ fix: "Set experimental.serverActions: true so client imports become server references (a React app outside islands mode also needs @farm.js/plugin/rsc), or call it from server code, or expose an API route and call it with createAPIClient.",
53
58
  docs: BOUNDARY_DOCS
54
59
  },
55
60
  CLIENT_SERVER_ONLY_IMPORT: {
@@ -878,7 +883,7 @@ function usePackageScanCacheFile(file) {
878
883
  const stored = /* @__PURE__ */ new Map();
879
884
  try {
880
885
  const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
881
- if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkLMXGCFAMcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
886
+ if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkNSLRK5DKcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
882
887
  for (const [directory, scan] of Object.entries(value.scans)) {
883
888
  if (isStoredPackageScan(scan)) stored.set(directory, scan);
884
889
  }
@@ -907,7 +912,7 @@ function persistPackageScanCache() {
907
912
  _fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
908
913
  _fs2.default.writeFileSync(
909
914
  temporary,
910
- JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkLMXGCFAMcjs.FARM_VERSION, scans })
915
+ JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkNSLRK5DKcjs.FARM_VERSION, scans })
911
916
  );
912
917
  _fs2.default.renameSync(temporary, cache2.file);
913
918
  cache2.dirty = false;
@@ -1293,7 +1298,7 @@ export default __farmComponent;
1293
1298
  ...route.serverProps ? [`__farmServerHooks: ${JSON.stringify(route.serverProps)}`] : []
1294
1299
  ];
1295
1300
  return `
1296
- import * as __farmRendererRuntime from ${JSON.stringify(options.rendererServer)};
1301
+ import * as __farmRendererRuntime from ${JSON.stringify(options.rendererClient)};
1297
1302
  import { createRouteModuleFromProgrammaticPage as __farmCreatePageRouteModule } from "@farm.js/core/routes";
1298
1303
  ${component}
1299
1304
  ${pending}
@@ -2207,7 +2212,7 @@ var PackageClientBoundaryCache = class {
2207
2212
  }
2208
2213
  const contents = JSON.stringify({
2209
2214
  schema: SCHEMA_VERSION,
2210
- farm: _chunkLMXGCFAMcjs.FARM_VERSION,
2215
+ farm: _chunkNSLRK5DKcjs.FARM_VERSION,
2211
2216
  paths,
2212
2217
  entries
2213
2218
  });
@@ -2247,7 +2252,7 @@ function readStoredCache(file) {
2247
2252
  } catch (e37) {
2248
2253
  return null;
2249
2254
  }
2250
- if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkLMXGCFAMcjs.FARM_VERSION) {
2255
+ if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkNSLRK5DKcjs.FARM_VERSION) {
2251
2256
  return null;
2252
2257
  }
2253
2258
  const { paths, entries } = value;
@@ -2258,7 +2263,7 @@ function readStoredCache(file) {
2258
2263
  const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
2259
2264
  if (usable.length > 0) valid[key] = usable;
2260
2265
  }
2261
- return { schema: SCHEMA_VERSION, farm: _chunkLMXGCFAMcjs.FARM_VERSION, paths, entries: valid };
2266
+ return { schema: SCHEMA_VERSION, farm: _chunkNSLRK5DKcjs.FARM_VERSION, paths, entries: valid };
2262
2267
  }
2263
2268
  function isRecord(value) {
2264
2269
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -2337,6 +2342,41 @@ function readIfExists(filePath) {
2337
2342
  (content) => content !== null
2338
2343
  );
2339
2344
  }
2345
+ var MARKDOWN_MODULE = /\.mdx?$/i;
2346
+ function readModuleCode(filePath) {
2347
+ const content = readIfExists(filePath);
2348
+ if (content === null || !MARKDOWN_MODULE.test(filePath)) return content;
2349
+ return memoizeInFarmSourceSnapshot("markdown-code", content, () => scanMarkdownCode(content));
2350
+ }
2351
+ function scanMarkdownCode(content) {
2352
+ const lines = content.split(/\r?\n/);
2353
+ const code = [];
2354
+ let index = 0;
2355
+ if (/^---\s*$/.test(_nullishCoalesce(lines[0], () => ( "")))) {
2356
+ const end = lines.findIndex((line, lineIndex) => lineIndex > 0 && /^---\s*$/.test(line));
2357
+ if (end > 0) index = end + 1;
2358
+ }
2359
+ let fence = null;
2360
+ let inCode = false;
2361
+ for (; index < lines.length; index++) {
2362
+ const line = lines[index];
2363
+ const marker = _optionalChain([/^ {0,3}(`{3,}|~{3,})/, 'access', _120 => _120.exec, 'call', _121 => _121(line), 'optionalAccess', _122 => _122[1]]);
2364
+ if (fence) {
2365
+ if (_optionalChain([marker, 'optionalAccess', _123 => _123[0]]) === fence[0] && marker.length >= fence.length && line.trim() === marker) {
2366
+ fence = null;
2367
+ }
2368
+ } else if (inCode) {
2369
+ inCode = line.trim() !== "";
2370
+ code.push(line);
2371
+ } else if (marker) {
2372
+ fence = marker;
2373
+ } else if (/^(?:import|export)(?=[\s{*])/.test(line)) {
2374
+ inCode = true;
2375
+ code.push(line);
2376
+ }
2377
+ }
2378
+ return code.join("\n");
2379
+ }
2340
2380
  function readSourceFile(filePath) {
2341
2381
  const content = readSourceFileContents(filePath);
2342
2382
  if (content !== null) noteFarmSourceRead(filePath);
@@ -2374,7 +2414,7 @@ function resolveModuleSourcePath(modulePath, root) {
2374
2414
  candidates.add(_path2.default.join(root, normalized));
2375
2415
  candidates.add(_path2.default.resolve(root, normalized));
2376
2416
  }
2377
- if (_optionalChain([withoutQuery, 'optionalAccess', _120 => _120.startsWith, 'call', _121 => _121("/src/")])) {
2417
+ if (_optionalChain([withoutQuery, 'optionalAccess', _124 => _124.startsWith, 'call', _125 => _125("/src/")])) {
2378
2418
  const normalized = withoutQuery.replace(/^\/+/, "");
2379
2419
  candidates.add(_path2.default.join(process.cwd(), normalized));
2380
2420
  candidates.add(_path2.default.resolve(process.cwd(), normalized));
@@ -2387,7 +2427,7 @@ function resolveModuleSourcePath(modulePath, root) {
2387
2427
  return null;
2388
2428
  }
2389
2429
  function getFarmClientHydrationPlanOptions(renderer, hasUnsupportedIntegrationProvider) {
2390
- return { asyncOwnerIslands: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && !hasUnsupportedIntegrationProvider };
2430
+ return { asyncOwnerIslands: _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && !hasUnsupportedIntegrationProvider };
2391
2431
  }
2392
2432
  function describeSuppressedAsyncHydration(subject, reason) {
2393
2433
  const remediation = reason ? "Fix the reason above, or render the interactive UI from a synchronous owner." : 'Move the interactive UI into an eligible "use client" boundary, or render it from a synchronous owner.';
@@ -2444,22 +2484,7 @@ function hasUseClientDirective(content) {
2444
2484
  return false;
2445
2485
  }
2446
2486
  function hasHydrateExport(content) {
2447
- if (!content) {
2448
- return false;
2449
- }
2450
- if (/\bexport\s+const\s+hydrate\s*=\s*true\b/.test(content)) {
2451
- return true;
2452
- }
2453
- for (const match of content.matchAll(/\bexport\s*\{([^}]*)\}/g)) {
2454
- for (const specifier of match[1].split(",")) {
2455
- const parts = specifier.trim().split(/\s+as\s+/);
2456
- const exportedName2 = _optionalChain([(_nullishCoalesce(parts[1], () => ( parts[0]))), 'optionalAccess', _122 => _122.trim, 'call', _123 => _123()]);
2457
- if (exportedName2 === "hydrate") {
2458
- return true;
2459
- }
2460
- }
2461
- }
2462
- return false;
2487
+ return _optionalChain([_chunkWMRGIQTAcjs.readFarmHydrateExport.call(void 0, content), 'optionalAccess', _126 => _126.value]) === true;
2463
2488
  }
2464
2489
  var REGEXP_PREFIX_PUNCTUATION = /* @__PURE__ */ new Set([
2465
2490
  "(",
@@ -2648,7 +2673,7 @@ function isIslandExportStart(tokens, index) {
2648
2673
  const token = tokens[index];
2649
2674
  const previous = tokens[index - 1];
2650
2675
  const startsStatement = !previous || previous.value === ";" || previous.value === "{" || previous.value === "}" || token.line > previous.line;
2651
- return startsStatement && token.value === "export" && _optionalChain([tokens, 'access', _124 => _124[index + 1], 'optionalAccess', _125 => _125.value]) === "const" && _optionalChain([tokens, 'access', _126 => _126[index + 2], 'optionalAccess', _127 => _127.value]) === "island";
2676
+ return startsStatement && token.value === "export" && _optionalChain([tokens, 'access', _127 => _127[index + 1], 'optionalAccess', _128 => _128.value]) === "const" && _optionalChain([tokens, 'access', _129 => _129[index + 2], 'optionalAccess', _130 => _130.value]) === "island";
2652
2677
  }
2653
2678
  function getIslandStrategyExport(content) {
2654
2679
  if (!content) return null;
@@ -2656,15 +2681,15 @@ function getIslandStrategyExport(content) {
2656
2681
  for (let index = 0; index < tokens.length - 2; index++) {
2657
2682
  if (!isIslandExportStart(tokens, index)) continue;
2658
2683
  let valueIndex = index + 3;
2659
- if (_optionalChain([tokens, 'access', _128 => _128[valueIndex], 'optionalAccess', _129 => _129.value]) === ":") {
2684
+ if (_optionalChain([tokens, 'access', _131 => _131[valueIndex], 'optionalAccess', _132 => _132.value]) === ":") {
2660
2685
  while (valueIndex < tokens.length && tokens[valueIndex].value !== "=") valueIndex++;
2661
2686
  }
2662
- if (_optionalChain([tokens, 'access', _130 => _130[valueIndex], 'optionalAccess', _131 => _131.value]) !== "=") break;
2687
+ if (_optionalChain([tokens, 'access', _133 => _133[valueIndex], 'optionalAccess', _134 => _134.value]) !== "=") break;
2663
2688
  valueIndex++;
2664
2689
  const literal = tokens[valueIndex];
2665
2690
  if (!literal || literal.kind !== "string" || !_chunk7KJJ4SBScjs.isFarmIslandStrategy.call(void 0, literal.value)) break;
2666
2691
  let trailingIndex = valueIndex + 1;
2667
- if (_optionalChain([tokens, 'access', _132 => _132[trailingIndex], 'optionalAccess', _133 => _133.value]) === "as" && _optionalChain([tokens, 'access', _134 => _134[trailingIndex + 1], 'optionalAccess', _135 => _135.value]) === "const") {
2692
+ if (_optionalChain([tokens, 'access', _135 => _135[trailingIndex], 'optionalAccess', _136 => _136.value]) === "as" && _optionalChain([tokens, 'access', _137 => _137[trailingIndex + 1], 'optionalAccess', _138 => _138.value]) === "const") {
2668
2693
  trailingIndex += 2;
2669
2694
  }
2670
2695
  const trailing = tokens[trailingIndex];
@@ -2690,13 +2715,13 @@ function hasAsyncDefaultExport(content) {
2690
2715
  for (let index = 0; index < tokens.length - 2; index++) {
2691
2716
  const token = tokens[index];
2692
2717
  if (token.kind !== "identifier" || token.value !== "export") continue;
2693
- if (_optionalChain([tokens, 'access', _136 => _136[index - 1], 'optionalAccess', _137 => _137.value]) === ".") continue;
2694
- if (_optionalChain([tokens, 'access', _138 => _138[index + 1], 'optionalAccess', _139 => _139.value]) !== "default") continue;
2718
+ if (_optionalChain([tokens, 'access', _139 => _139[index - 1], 'optionalAccess', _140 => _140.value]) === ".") continue;
2719
+ if (_optionalChain([tokens, 'access', _141 => _141[index + 1], 'optionalAccess', _142 => _142.value]) !== "default") continue;
2695
2720
  const exported = tokens[index + 2];
2696
2721
  if (exported.kind === "identifier" && exported.value === "async") {
2697
2722
  return true;
2698
2723
  }
2699
- if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access', _140 => _140[index + 3], 'optionalAccess', _141 => _141.value]) !== "(" && isAsyncLocalDeclaration(tokens, exported.value)) {
2724
+ if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access', _143 => _143[index + 3], 'optionalAccess', _144 => _144.value]) !== "(" && isAsyncLocalDeclaration(tokens, exported.value)) {
2700
2725
  return true;
2701
2726
  }
2702
2727
  }
@@ -2704,16 +2729,16 @@ function hasAsyncDefaultExport(content) {
2704
2729
  }
2705
2730
  function isAsyncLocalDeclaration(tokens, name) {
2706
2731
  for (let index = 0; index < tokens.length - 2; index++) {
2707
- if (tokens[index].value === "async" && _optionalChain([tokens, 'access', _142 => _142[index + 1], 'optionalAccess', _143 => _143.value]) === "function" && _optionalChain([tokens, 'access', _144 => _144[index + 2], 'optionalAccess', _145 => _145.value]) === name) {
2732
+ if (tokens[index].value === "async" && _optionalChain([tokens, 'access', _145 => _145[index + 1], 'optionalAccess', _146 => _146.value]) === "function" && _optionalChain([tokens, 'access', _147 => _147[index + 2], 'optionalAccess', _148 => _148.value]) === name) {
2708
2733
  return true;
2709
2734
  }
2710
- if (tokens[index].value === name && _optionalChain([tokens, 'access', _146 => _146[index + 1], 'optionalAccess', _147 => _147.value]) === "=" && _optionalChain([tokens, 'access', _148 => _148[index + 2], 'optionalAccess', _149 => _149.value]) === "async") {
2735
+ if (tokens[index].value === name && _optionalChain([tokens, 'access', _149 => _149[index + 1], 'optionalAccess', _150 => _150.value]) === "=" && _optionalChain([tokens, 'access', _151 => _151[index + 2], 'optionalAccess', _152 => _152.value]) === "async") {
2711
2736
  return true;
2712
2737
  }
2713
2738
  }
2714
2739
  return false;
2715
2740
  }
2716
- function parseClientModuleMetadata(content, inspectIslandExport) {
2741
+ function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
2717
2742
  if (!content) {
2718
2743
  return {
2719
2744
  isClientComponent: false,
@@ -2722,7 +2747,11 @@ function parseClientModuleMetadata(content, inspectIslandExport) {
2722
2747
  };
2723
2748
  }
2724
2749
  const isClientComponent = hasUseClientDirective(content);
2725
- const hasHydrate = hasHydrateExport(content);
2750
+ const hydrate = _chunkWMRGIQTAcjs.readFarmHydrateExport.call(void 0, content);
2751
+ if (inspectIslandExport && hydrate && hydrate.value === null) {
2752
+ throw new Error(_chunkWMRGIQTAcjs.formatFarmHydrateExportError.call(void 0, hydrate, sourcePath));
2753
+ }
2754
+ const hasHydrate = _optionalChain([hydrate, 'optionalAccess', _153 => _153.value]) === true;
2726
2755
  return {
2727
2756
  isClientComponent,
2728
2757
  hasHydrateExport: hasHydrate,
@@ -2805,7 +2834,11 @@ function getClientModuleHydrationPlan(modulePath, root, mode = "off", options =
2805
2834
  return plan;
2806
2835
  }
2807
2836
  const resolvedPath = resolveOwnerSourcePath(resolveModuleSourcePath(modulePath, root), root);
2808
- const owner = parseClientModuleMetadata(readIfExists(_nullishCoalesce(resolvedPath, () => ( ""))), true);
2837
+ const owner = parseClientModuleMetadata(
2838
+ readIfExists(_nullishCoalesce(resolvedPath, () => ( ""))),
2839
+ true,
2840
+ _nullishCoalesce(resolvedPath, () => ( void 0))
2841
+ );
2809
2842
  if (!resolvedPath || owner.isClientComponent || owner.hasHydrateExport) return plan;
2810
2843
  const layout = collectIsolatedClientBoundaries(resolvedPath, root, {
2811
2844
  allowDynamicCardinality: true,
@@ -2857,7 +2890,7 @@ function planClientModuleHydration(modulePath, root, mode, options) {
2857
2890
  if (mode === "off" && !asyncOwner) return emptyPlan();
2858
2891
  const resolvedPath = resolveOwnerSourcePath(resolveModuleSourcePath(modulePath, root), root);
2859
2892
  const content = readIfExists(_nullishCoalesce(resolvedPath, () => ( "")));
2860
- const parsed = parseClientModuleMetadata(content, true);
2893
+ const parsed = parseClientModuleMetadata(content, true, _nullishCoalesce(resolvedPath, () => ( void 0)));
2861
2894
  if (!resolvedPath) return emptyPlan("the owner source could not be resolved");
2862
2895
  if (parsed.isClientComponent) {
2863
2896
  return emptyPlan("the owner is already a client component");
@@ -2921,7 +2954,7 @@ function planClientModuleHydration(modulePath, root, mode, options) {
2921
2954
  return plan;
2922
2955
  }
2923
2956
  function usesFarmServerTree(plan) {
2924
- return _optionalChain([plan, 'optionalAccess', _150 => _150.asyncOwnerIslands]) === true && plan.isolatedBoundaries.length > 0;
2957
+ return _optionalChain([plan, 'optionalAccess', _154 => _154.asyncOwnerIslands]) === true && plan.isolatedBoundaries.length > 0;
2925
2958
  }
2926
2959
  function getMarkdownPageHydrationPlan(componentsModulePath, root, mode = "off", options = {}) {
2927
2960
  const plan = {
@@ -3076,7 +3109,7 @@ function getStaticImportBindings(content) {
3076
3109
  if (!content) return bindings;
3077
3110
  const tokens = tokenizeModuleSource(content);
3078
3111
  for (let index = 0; index < tokens.length; index++) {
3079
- if (tokens[index].value !== "import" || _optionalChain([tokens, 'access', _151 => _151[index - 1], 'optionalAccess', _152 => _152.value]) === ".") continue;
3112
+ if (tokens[index].value !== "import" || _optionalChain([tokens, 'access', _155 => _155[index - 1], 'optionalAccess', _156 => _156.value]) === ".") continue;
3080
3113
  const first = tokens[index + 1];
3081
3114
  if (!first || first.value === "type" || first.value === "(" || first.kind === "string") {
3082
3115
  continue;
@@ -3084,7 +3117,7 @@ function getStaticImportBindings(content) {
3084
3117
  let fromIndex = -1;
3085
3118
  for (let cursor = index + 1; cursor < tokens.length; cursor++) {
3086
3119
  if (tokens[cursor].value === ";") break;
3087
- if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access', _153 => _153[cursor + 1], 'optionalAccess', _154 => _154.kind]) === "string") {
3120
+ if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access', _157 => _157[cursor + 1], 'optionalAccess', _158 => _158.kind]) === "string") {
3088
3121
  fromIndex = cursor;
3089
3122
  break;
3090
3123
  }
@@ -3093,13 +3126,13 @@ function getStaticImportBindings(content) {
3093
3126
  const specifier = tokens[fromIndex + 1].value;
3094
3127
  const clause = tokens.slice(index + 1, fromIndex);
3095
3128
  const localNames = [];
3096
- if (_optionalChain([clause, 'access', _155 => _155[0], 'optionalAccess', _156 => _156.kind]) === "identifier" && clause[0].value !== "type") {
3129
+ if (_optionalChain([clause, 'access', _159 => _159[0], 'optionalAccess', _160 => _160.kind]) === "identifier" && clause[0].value !== "type") {
3097
3130
  localNames.push(clause[0].value);
3098
3131
  }
3099
3132
  const namespaceAs = clause.findIndex(
3100
- (token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access', _157 => _157[clauseIndex + 1], 'optionalAccess', _158 => _158.value]) === "as"
3133
+ (token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access', _161 => _161[clauseIndex + 1], 'optionalAccess', _162 => _162.value]) === "as"
3101
3134
  );
3102
- if (namespaceAs !== -1 && _optionalChain([clause, 'access', _159 => _159[namespaceAs + 2], 'optionalAccess', _160 => _160.kind]) === "identifier") {
3135
+ if (namespaceAs !== -1 && _optionalChain([clause, 'access', _163 => _163[namespaceAs + 2], 'optionalAccess', _164 => _164.kind]) === "identifier") {
3103
3136
  localNames.push(clause[namespaceAs + 2].value);
3104
3137
  }
3105
3138
  const openingBrace = clause.findIndex((token) => token.value === "{");
@@ -3109,11 +3142,11 @@ function getStaticImportBindings(content) {
3109
3142
  if (openingBrace !== -1 && closingBrace !== -1) {
3110
3143
  let entryStart = openingBrace + 1;
3111
3144
  for (let cursor = entryStart; cursor <= closingBrace; cursor++) {
3112
- if (cursor !== closingBrace && _optionalChain([clause, 'access', _161 => _161[cursor], 'optionalAccess', _162 => _162.value]) !== ",") continue;
3145
+ if (cursor !== closingBrace && _optionalChain([clause, 'access', _165 => _165[cursor], 'optionalAccess', _166 => _166.value]) !== ",") continue;
3113
3146
  const entry = clause.slice(entryStart, cursor).filter((token) => token.value !== "type");
3114
3147
  const asIndex = entry.findIndex((token) => token.value === "as");
3115
3148
  const local = asIndex === -1 ? entry[0] : entry[asIndex + 1];
3116
- if (_optionalChain([local, 'optionalAccess', _163 => _163.kind]) === "identifier") localNames.push(local.value);
3149
+ if (_optionalChain([local, 'optionalAccess', _167 => _167.kind]) === "identifier") localNames.push(local.value);
3117
3150
  entryStart = cursor + 1;
3118
3151
  }
3119
3152
  }
@@ -3150,18 +3183,19 @@ function findParserSensitiveJsxContainer(content, localBindings) {
3150
3183
  const open = [];
3151
3184
  const isSelfClosing = (openingIndex) => {
3152
3185
  for (let index = openingIndex; index < tokens.length; index++) {
3153
- if (tokens[index].value === ">") return _optionalChain([tokens, 'access', _164 => _164[index - 1], 'optionalAccess', _165 => _165.value]) === "/";
3186
+ if (tokens[index].value === ">") return _optionalChain([tokens, 'access', _168 => _168[index - 1], 'optionalAccess', _169 => _169.value]) === "/";
3154
3187
  }
3155
3188
  return false;
3156
3189
  };
3157
3190
  for (let index = 0; index < tokens.length - 1; index++) {
3158
3191
  if (tokens[index].value !== "<") continue;
3159
3192
  if (tokens[index + 1].value === "/") {
3160
- const closing = _optionalChain([tokens, 'access', _166 => _166[index + 2], 'optionalAccess', _167 => _167.value]);
3161
- const at = closing ? open.lastIndexOf(closing) : -1;
3193
+ const closing = tokens[index + 2];
3194
+ const at = _optionalChain([closing, 'optionalAccess', _170 => _170.kind]) === "identifier" ? open.lastIndexOf(closing.value) : -1;
3162
3195
  if (at !== -1) open.length = at;
3163
3196
  continue;
3164
3197
  }
3198
+ if (tokens[index + 1].kind !== "identifier") continue;
3165
3199
  const tag = tokens[index + 1].value;
3166
3200
  if (names.has(tag)) {
3167
3201
  let container;
@@ -3200,7 +3234,7 @@ function findMatchingToken(tokens, openingIndex, opening, closing) {
3200
3234
  }
3201
3235
  function containsClientJsx(tokens, start, end, clientBindings) {
3202
3236
  for (let index = start; index < end; index++) {
3203
- if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access', _168 => _168[index + 1], 'optionalAccess', _169 => _169.value]))) return true;
3237
+ if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access', _171 => _171[index + 1], 'optionalAccess', _172 => _172.value]))) return true;
3204
3238
  }
3205
3239
  return false;
3206
3240
  }
@@ -3238,7 +3272,7 @@ function getClientRenderingHelpers(tokens, clientBindings) {
3238
3272
  let helperName;
3239
3273
  let bodyStart = -1;
3240
3274
  let bodyEnd = -1;
3241
- if (tokens[index].value === "function" && _optionalChain([tokens, 'access', _170 => _170[index + 1], 'optionalAccess', _171 => _171.kind]) === "identifier") {
3275
+ if (tokens[index].value === "function" && _optionalChain([tokens, 'access', _173 => _173[index + 1], 'optionalAccess', _174 => _174.kind]) === "identifier") {
3242
3276
  helperName = tokens[index + 1].value;
3243
3277
  const parametersStart = tokens.findIndex(
3244
3278
  (token, tokenIndex) => tokenIndex > index + 1 && token.value === "("
@@ -3248,21 +3282,21 @@ function getClientRenderingHelpers(tokens, clientBindings) {
3248
3282
  (token, tokenIndex) => tokenIndex > parametersEnd && token.value === "{"
3249
3283
  );
3250
3284
  if (bodyStart !== -1) bodyEnd = findMatchingToken(tokens, bodyStart, "{", "}");
3251
- } else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access', _172 => _172[index + 1], 'optionalAccess', _173 => _173.kind]) === "identifier") {
3285
+ } else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access', _175 => _175[index + 1], 'optionalAccess', _176 => _176.kind]) === "identifier") {
3252
3286
  helperName = tokens[index + 1].value;
3253
3287
  let assignmentIndex = -1;
3254
3288
  let arrowIndex = -1;
3255
3289
  for (let cursor = index + 2; cursor < tokens.length; cursor++) {
3256
3290
  if (tokens[cursor].value === ";") break;
3257
3291
  if (assignmentIndex === -1 && tokens[cursor].value === "=") assignmentIndex = cursor;
3258
- if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access', _174 => _174[cursor + 1], 'optionalAccess', _175 => _175.value]) === ">") {
3292
+ if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access', _177 => _177[cursor + 1], 'optionalAccess', _178 => _178.value]) === ">") {
3259
3293
  arrowIndex = cursor;
3260
3294
  break;
3261
3295
  }
3262
3296
  }
3263
3297
  if (arrowIndex !== -1) {
3264
3298
  bodyStart = arrowIndex + 2;
3265
- bodyEnd = _optionalChain([tokens, 'access', _176 => _176[bodyStart], 'optionalAccess', _177 => _177.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : findStatementEnd(tokens, bodyStart);
3299
+ bodyEnd = _optionalChain([tokens, 'access', _179 => _179[bodyStart], 'optionalAccess', _180 => _180.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : findStatementEnd(tokens, bodyStart);
3266
3300
  } else if (assignmentIndex !== -1) {
3267
3301
  bodyStart = assignmentIndex + 1;
3268
3302
  bodyEnd = findStatementEnd(tokens, bodyStart);
@@ -3302,14 +3336,14 @@ function passesElementValuedProps(content, localBindings) {
3302
3336
  else if (value === "}") braceDepth--;
3303
3337
  else if (value === "<" && braceDepth > 0) return true;
3304
3338
  else if (value === ">" && braceDepth === 0) {
3305
- selfClosing = _optionalChain([tokens, 'access', _178 => _178[cursor - 1], 'optionalAccess', _179 => _179.value]) === "/";
3339
+ selfClosing = _optionalChain([tokens, 'access', _181 => _181[cursor - 1], 'optionalAccess', _182 => _182.value]) === "/";
3306
3340
  break;
3307
3341
  }
3308
3342
  }
3309
3343
  if (selfClosing || cursor >= tokens.length) continue;
3310
3344
  for (let child = cursor + 1; child < tokens.length; child++) {
3311
3345
  if (tokens[child].value !== "<") continue;
3312
- const closesBoundary = _optionalChain([tokens, 'access', _180 => _180[child + 1], 'optionalAccess', _181 => _181.value]) === "/" && _optionalChain([tokens, 'access', _182 => _182[child + 2], 'optionalAccess', _183 => _183.value]) === name;
3346
+ const closesBoundary = _optionalChain([tokens, 'access', _183 => _183[child + 1], 'optionalAccess', _184 => _184.value]) === "/" && _optionalChain([tokens, 'access', _185 => _185[child + 2], 'optionalAccess', _186 => _186.value]) === name;
3313
3347
  if (!closesBoundary) return true;
3314
3348
  break;
3315
3349
  }
@@ -3331,7 +3365,7 @@ function rendersOnlyLeafElements(content, localBindings) {
3331
3365
  else if (value === "<" && braceDepth > 0) return false;
3332
3366
  else if (value === ">" && braceDepth === 0) break;
3333
3367
  }
3334
- if (cursor >= tokens.length || _optionalChain([tokens, 'access', _184 => _184[cursor - 1], 'optionalAccess', _185 => _185.value]) !== "/") return false;
3368
+ if (cursor >= tokens.length || _optionalChain([tokens, 'access', _187 => _187[cursor - 1], 'optionalAccess', _188 => _188.value]) !== "/") return false;
3335
3369
  }
3336
3370
  return true;
3337
3371
  }
@@ -3343,9 +3377,9 @@ function hasDynamicJsxCardinality(content, localBindings) {
3343
3377
  const containsDynamicRenderer = (start, end) => containsClientJsx(tokens, start, end, clientBindings) || tokens.slice(start, end).some((token) => renderingHelpers.has(token.value));
3344
3378
  for (let index = 0; index < tokens.length; index++) {
3345
3379
  let callStart = -1;
3346
- if (tokens[index].value === "." && (_optionalChain([tokens, 'access', _186 => _186[index + 1], 'optionalAccess', _187 => _187.value]) === "map" || _optionalChain([tokens, 'access', _188 => _188[index + 1], 'optionalAccess', _189 => _189.value]) === "flatMap") && _optionalChain([tokens, 'access', _190 => _190[index + 2], 'optionalAccess', _191 => _191.value]) === "(") {
3380
+ if (tokens[index].value === "." && (_optionalChain([tokens, 'access', _189 => _189[index + 1], 'optionalAccess', _190 => _190.value]) === "map" || _optionalChain([tokens, 'access', _191 => _191[index + 1], 'optionalAccess', _192 => _192.value]) === "flatMap") && _optionalChain([tokens, 'access', _193 => _193[index + 2], 'optionalAccess', _194 => _194.value]) === "(") {
3347
3381
  callStart = index + 2;
3348
- } else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access', _192 => _192[index + 1], 'optionalAccess', _193 => _193.value]) === "." && _optionalChain([tokens, 'access', _194 => _194[index + 2], 'optionalAccess', _195 => _195.value]) === "from" && _optionalChain([tokens, 'access', _196 => _196[index + 3], 'optionalAccess', _197 => _197.value]) === "(") {
3382
+ } else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access', _195 => _195[index + 1], 'optionalAccess', _196 => _196.value]) === "." && _optionalChain([tokens, 'access', _197 => _197[index + 2], 'optionalAccess', _198 => _198.value]) === "from" && _optionalChain([tokens, 'access', _199 => _199[index + 3], 'optionalAccess', _200 => _200.value]) === "(") {
3349
3383
  callStart = index + 3;
3350
3384
  }
3351
3385
  if (callStart !== -1) {
@@ -3354,10 +3388,10 @@ function hasDynamicJsxCardinality(content, localBindings) {
3354
3388
  index = callEnd;
3355
3389
  continue;
3356
3390
  }
3357
- if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access', _198 => _198[index + 1], 'optionalAccess', _199 => _199.value]) === "(") {
3391
+ if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access', _201 => _201[index + 1], 'optionalAccess', _202 => _202.value]) === "(") {
3358
3392
  const conditionEnd = findMatchingToken(tokens, index + 1, "(", ")");
3359
3393
  const bodyStart = conditionEnd + 1;
3360
- const bodyEnd = _optionalChain([tokens, 'access', _200 => _200[bodyStart], 'optionalAccess', _201 => _201.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : tokens.findIndex((token, tokenIndex) => tokenIndex > bodyStart && token.value === ";");
3394
+ const bodyEnd = _optionalChain([tokens, 'access', _203 => _203[bodyStart], 'optionalAccess', _204 => _204.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : tokens.findIndex((token, tokenIndex) => tokenIndex > bodyStart && token.value === ";");
3361
3395
  if (containsDynamicRenderer(bodyStart, bodyEnd === -1 ? tokens.length : bodyEnd)) return true;
3362
3396
  }
3363
3397
  }
@@ -3378,7 +3412,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
3378
3412
  if (cached !== void 0) return cached;
3379
3413
  if (visiting.has(moduleSourcePath)) return 0;
3380
3414
  visiting.add(moduleSourcePath);
3381
- const content = readIfExists(moduleSourcePath);
3415
+ const content = readModuleCode(moduleSourcePath);
3382
3416
  const parsed = parseClientModuleMetadata(content, false);
3383
3417
  if (parsed.isClientComponent) {
3384
3418
  if (!isIsolatableClientBoundarySource(content)) {
@@ -3401,7 +3435,14 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
3401
3435
  }
3402
3436
  const importedBindings = getStaticImportBindings(content);
3403
3437
  let estimatedBoundaryCount2 = 0;
3404
- for (const specifier of new Set(getImportSpecifiers(content))) {
3438
+ const specifiers = new Set(getImportSpecifiers(content));
3439
+ for (const specifier of getImportSpecifiers(content, { dynamic: true })) {
3440
+ if (specifiers.has(specifier)) continue;
3441
+ const imported = resolveImportedModule(moduleSourcePath, specifier, root);
3442
+ if (!imported.local || !imported.path || !MARKDOWN_MODULE.test(imported.path)) continue;
3443
+ estimatedBoundaryCount2 += visit(imported.path);
3444
+ }
3445
+ for (const specifier of specifiers) {
3405
3446
  const imported = resolveImportedModule(moduleSourcePath, specifier, root);
3406
3447
  const importedPath = imported.path;
3407
3448
  if (!importedPath) continue;
@@ -3469,7 +3510,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
3469
3510
  const localBindings = _nullishCoalesce(importedBindings.get(specifier), () => ( []));
3470
3511
  const staticUses = countStaticJsxUses(content, localBindings);
3471
3512
  if (staticUses > 0) {
3472
- const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call', _202 => _202(_nullishCoalesce(content, () => ( "")), moduleSourcePath, localBindings), 'optionalAccess', _203 => _203.length]), () => ( 0))) > 0;
3513
+ const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call', _205 => _205(_nullishCoalesce(content, () => ( "")), moduleSourcePath, localBindings), 'optionalAccess', _206 => _206.length]), () => ( 0))) > 0;
3473
3514
  if (grows) visit(ensureFarmIslandContainerReference(projectRoot));
3474
3515
  const container = grows ? void 0 : findParserSensitiveJsxContainer(content, localBindings);
3475
3516
  if (container) {
@@ -3517,7 +3558,7 @@ function inspectClientModuleMetadata(resolvedPath, root, visited, inspectIslandE
3517
3558
  const target = resolveDefaultReexport(resolvedPath, content, root);
3518
3559
  if (target) return inspectClientModuleMetadata(target, root, visited, true);
3519
3560
  }
3520
- const parsed = parseClientModuleMetadata(content, inspectIslandExport);
3561
+ const parsed = parseClientModuleMetadata(content, inspectIslandExport, resolvedPath);
3521
3562
  if (parsed.isClientComponent) {
3522
3563
  return {
3523
3564
  isClientComponent: true,
@@ -3595,7 +3636,7 @@ function inspectPackageClientBoundary(resolvedPath, root, visited) {
3595
3636
  }
3596
3637
  function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
3597
3638
  if (!resolvedPath || visited.has(resolvedPath)) {
3598
- if (resolvedPath) _optionalChain([trace2, 'optionalAccess', _204 => _204.stop, 'call', _205 => _205(resolvedPath)]);
3639
+ if (resolvedPath) _optionalChain([trace2, 'optionalAccess', _207 => _207.stop, 'call', _208 => _208(resolvedPath)]);
3599
3640
  return {
3600
3641
  isClientComponent: false,
3601
3642
  shouldHydrate: false,
@@ -3603,7 +3644,7 @@ function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
3603
3644
  };
3604
3645
  }
3605
3646
  visited.add(resolvedPath);
3606
- _optionalChain([trace2, 'optionalAccess', _206 => _206.visit, 'call', _207 => _207(resolvedPath)]);
3647
+ _optionalChain([trace2, 'optionalAccess', _209 => _209.visit, 'call', _210 => _210(resolvedPath)]);
3607
3648
  const content = readIfExists(resolvedPath);
3608
3649
  const parsed = parseClientModuleMetadata(content, false);
3609
3650
  let importsClientBoundary = false;
@@ -3661,7 +3702,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3661
3702
  braceDepth = Math.max(0, braceDepth - 1);
3662
3703
  continue;
3663
3704
  }
3664
- if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access', _208 => _208[index - 1], 'optionalAccess', _209 => _209.value]) !== "." && _optionalChain([tokens, 'access', _210 => _210[index + 1], 'optionalAccess', _211 => _211.value]) === "(" && _optionalChain([tokens, 'access', _212 => _212[index + 2], 'optionalAccess', _213 => _213.kind]) === "string") {
3705
+ if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access', _211 => _211[index - 1], 'optionalAccess', _212 => _212.value]) !== "." && _optionalChain([tokens, 'access', _213 => _213[index + 1], 'optionalAccess', _214 => _214.value]) === "(" && _optionalChain([tokens, 'access', _215 => _215[index + 2], 'optionalAccess', _216 => _216.kind]) === "string") {
3665
3706
  matches.add(tokens[index + 2].value);
3666
3707
  continue;
3667
3708
  }
@@ -3671,7 +3712,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3671
3712
  }
3672
3713
  if (reexportsOnly && keyword.value !== "export") continue;
3673
3714
  const previous = tokens[index - 1];
3674
- if (_optionalChain([previous, 'optionalAccess', _214 => _214.value]) === ".") continue;
3715
+ if (_optionalChain([previous, 'optionalAccess', _217 => _217.value]) === ".") continue;
3675
3716
  const first = tokens[index + 1];
3676
3717
  if (!first || first.value === "type" || first.value === "(" || first.value === ".") {
3677
3718
  continue;
@@ -3687,7 +3728,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3687
3728
  for (let cursor = index + 1; cursor < tokens.length; cursor++) {
3688
3729
  const token = tokens[cursor];
3689
3730
  if (token.value === ";") break;
3690
- if (token.value === "from" && _optionalChain([tokens, 'access', _215 => _215[cursor + 1], 'optionalAccess', _216 => _216.kind]) === "string") {
3731
+ if (token.value === "from" && _optionalChain([tokens, 'access', _218 => _218[cursor + 1], 'optionalAccess', _219 => _219.kind]) === "string") {
3691
3732
  fromIndex = cursor;
3692
3733
  break;
3693
3734
  }
@@ -3705,14 +3746,14 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3705
3746
  return Array.from(matches);
3706
3747
  }
3707
3748
  function isTypeOnlyNamedClause(tokens, startIndex, endIndex) {
3708
- if (_optionalChain([tokens, 'access', _217 => _217[startIndex], 'optionalAccess', _218 => _218.value]) !== "{") return false;
3749
+ if (_optionalChain([tokens, 'access', _220 => _220[startIndex], 'optionalAccess', _221 => _221.value]) !== "{") return false;
3709
3750
  const closingBraceIndex = tokens.findIndex(
3710
3751
  (token, index) => index > startIndex && index < endIndex && token.value === "}"
3711
3752
  );
3712
3753
  if (closingBraceIndex === -1) return false;
3713
3754
  let entryStartsAt = startIndex + 1;
3714
3755
  for (let index = entryStartsAt; index <= closingBraceIndex; index++) {
3715
- if (index !== closingBraceIndex && _optionalChain([tokens, 'access', _219 => _219[index], 'optionalAccess', _220 => _220.value]) !== ",") continue;
3756
+ if (index !== closingBraceIndex && _optionalChain([tokens, 'access', _222 => _222[index], 'optionalAccess', _223 => _223.value]) !== ",") continue;
3716
3757
  const entry = tokens.slice(entryStartsAt, index);
3717
3758
  if (entry.length > 0 && entry[0].value !== "type") return false;
3718
3759
  entryStartsAt = index + 1;
@@ -3752,7 +3793,7 @@ function warnUnresolvedAliasImport(importerPath, specifier, root) {
3752
3793
  if (!ALIAS_IMPORT.test(specifier) || warnedUnresolvedAliasImports.has(specifier)) return;
3753
3794
  warnedUnresolvedAliasImports.add(specifier);
3754
3795
  const importer = root ? _path2.default.relative(root, importerPath) : importerPath;
3755
- _chunkGC5ROI3Acjs.logger.warn(
3796
+ _chunk7U4XF76Rcjs.logger.warn(
3756
3797
  `Could not resolve "${specifier}" (imported by ${importer}) while checking which pages need client JavaScript. If it holds client components, they will not hydrate. Map the alias in tsconfig.json "paths" or package.json "imports".`
3757
3798
  );
3758
3799
  }
@@ -3793,7 +3834,7 @@ function getProjectImportAliases(projectRoot) {
3793
3834
  const sourceDir = _chunkRE5E2G5Scjs.getFarmProjectSourceDir.call(void 0, projectRoot);
3794
3835
  const cacheStamp = `${stamp}:${sourceDir}`;
3795
3836
  const cached = projectImportAliasCache.get(projectRoot);
3796
- if (_optionalChain([cached, 'optionalAccess', _221 => _221.stamp]) === cacheStamp) return cached.aliases;
3837
+ if (_optionalChain([cached, 'optionalAccess', _224 => _224.stamp]) === cacheStamp) return cached.aliases;
3797
3838
  const aliases = [
3798
3839
  ...readTsconfigPathAliases(projectRoot),
3799
3840
  ...readPackageImportAliases(projectRoot)
@@ -3814,7 +3855,7 @@ function readTsconfigPathAliases(projectRoot) {
3814
3855
  const configPath = _path2.default.join(projectRoot, name);
3815
3856
  if (!_fs2.default.existsSync(configPath)) continue;
3816
3857
  const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set());
3817
- if (!_optionalChain([resolved, 'optionalAccess', _222 => _222.paths])) return [];
3858
+ if (!_optionalChain([resolved, 'optionalAccess', _225 => _225.paths])) return [];
3818
3859
  const base2 = _nullishCoalesce(resolved.baseUrl, () => ( resolved.pathsDirectory));
3819
3860
  return Object.entries(resolved.paths).flatMap(([pattern, targets]) => {
3820
3861
  if (!Array.isArray(targets)) return [];
@@ -3849,18 +3890,18 @@ function readTsconfigPaths(configPath, visited) {
3849
3890
  inherited = _nullishCoalesce(readTsconfigPaths(parentPath, visited), () => ( inherited));
3850
3891
  }
3851
3892
  const options = _nullishCoalesce(config.compilerOptions, () => ( {}));
3852
- const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess', _223 => _223.baseUrl]);
3893
+ const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess', _226 => _226.baseUrl]);
3853
3894
  if (options.paths && typeof options.paths === "object") {
3854
3895
  return { paths: options.paths, pathsDirectory: directory, baseUrl };
3855
3896
  }
3856
3897
  return inherited ? { ...inherited, baseUrl } : { pathsDirectory: directory, baseUrl };
3857
3898
  }
3858
3899
  function readPackageImportAliases(projectRoot) {
3859
- const imports = _optionalChain([readPackageJson, 'call', _224 => _224(_path2.default.join(projectRoot, "package.json")), 'optionalAccess', _225 => _225.imports]);
3900
+ const imports = _optionalChain([readPackageJson, 'call', _227 => _227(_path2.default.join(projectRoot, "package.json")), 'optionalAccess', _228 => _228.imports]);
3860
3901
  if (!imports || typeof imports !== "object") return [];
3861
3902
  return Object.entries(imports).flatMap(([pattern, value]) => {
3862
3903
  const target = resolveConditionalExportTarget(value);
3863
- if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess', _226 => _226.startsWith, 'call', _227 => _227("./")])) return [];
3904
+ if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess', _229 => _229.startsWith, 'call', _230 => _230("./")])) return [];
3864
3905
  const wildcardIndex = pattern.indexOf("*");
3865
3906
  return [
3866
3907
  {
@@ -3926,15 +3967,15 @@ function resolvePackageModuleSourcePath(importerPath, specifier, root) {
3926
3967
  const packageJsonPath = _path2.default.join(packageDirectory, "package.json");
3927
3968
  const packageJson = readPackageJson(packageJsonPath);
3928
3969
  const exportKey = packageSubpath ? `./${packageSubpath}` : ".";
3929
- const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess', _228 => _228.exports]), exportKey);
3970
+ const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess', _231 => _231.exports]), exportKey);
3930
3971
  const candidates = /* @__PURE__ */ new Set();
3931
- if (_optionalChain([exportTarget, 'optionalAccess', _229 => _229.startsWith, 'call', _230 => _230("./")])) {
3972
+ if (_optionalChain([exportTarget, 'optionalAccess', _232 => _232.startsWith, 'call', _233 => _233("./")])) {
3932
3973
  candidates.add(_path2.default.resolve(packageDirectory, exportTarget));
3933
3974
  }
3934
3975
  if (packageSubpath) {
3935
3976
  candidates.add(_path2.default.join(packageDirectory, packageSubpath));
3936
3977
  } else {
3937
- for (const entry of [_optionalChain([packageJson, 'optionalAccess', _231 => _231.browser]), _optionalChain([packageJson, 'optionalAccess', _232 => _232.module]), _optionalChain([packageJson, 'optionalAccess', _233 => _233.main])]) {
3978
+ for (const entry of [_optionalChain([packageJson, 'optionalAccess', _234 => _234.browser]), _optionalChain([packageJson, 'optionalAccess', _235 => _235.module]), _optionalChain([packageJson, 'optionalAccess', _236 => _236.main])]) {
3938
3979
  if (typeof entry === "string") candidates.add(_path2.default.resolve(packageDirectory, entry));
3939
3980
  }
3940
3981
  candidates.add(_path2.default.join(packageDirectory, "index"));
@@ -3999,7 +4040,7 @@ function resolvePackageExport(exportsField, exportKey) {
3999
4040
  if (!exportKey.startsWith(prefix) || !exportKey.endsWith(suffix)) continue;
4000
4041
  const wildcard = exportKey.slice(prefix.length, exportKey.length - suffix.length);
4001
4042
  const target = resolveConditionalExportTarget(value);
4002
- return _nullishCoalesce(_optionalChain([target, 'optionalAccess', _234 => _234.replace, 'call', _235 => _235("*", wildcard)]), () => ( null));
4043
+ return _nullishCoalesce(_optionalChain([target, 'optionalAccess', _237 => _237.replace, 'call', _238 => _238("*", wildcard)]), () => ( null));
4003
4044
  }
4004
4045
  return null;
4005
4046
  }
@@ -4042,7 +4083,7 @@ function resolveSourceCandidatePath(candidate) {
4042
4083
  }
4043
4084
  for (const sourcePath of paths) {
4044
4085
  try {
4045
- if (_optionalChain([_fs2.default, 'access', _236 => _236.statSync, 'call', _237 => _237(sourcePath, { throwIfNoEntry: false }), 'optionalAccess', _238 => _238.isFile, 'call', _239 => _239()])) return sourcePath;
4086
+ if (_optionalChain([_fs2.default, 'access', _239 => _239.statSync, 'call', _240 => _240(sourcePath, { throwIfNoEntry: false }), 'optionalAccess', _241 => _241.isFile, 'call', _242 => _242()])) return sourcePath;
4046
4087
  } catch (e46) {
4047
4088
  }
4048
4089
  }
@@ -4223,7 +4264,7 @@ var ENVIRONMENT_FUNCTIONS = /* @__PURE__ */ new Set([
4223
4264
  ]);
4224
4265
  var MODULE_EXTENSION_RE2 = /\.[cm]?[jt]sx?$/;
4225
4266
  function transformEnvironmentFunctions(options) {
4226
- if (!isTransformableModule(options.id) || !containsEnvironmentFunction(options.code)) {
4267
+ if (!isTransformableModule(options.id, options.componentExtensions) || !containsEnvironmentFunction(options.code)) {
4227
4268
  return null;
4228
4269
  }
4229
4270
  let output = options.code;
@@ -4255,18 +4296,21 @@ function transformEnvironmentFunctions(options) {
4255
4296
  }
4256
4297
  function farmEnvironmentFunctionsPlugin(options = {}) {
4257
4298
  let routesFiles = /* @__PURE__ */ new Set();
4299
+ const componentExtensions = new Set(
4300
+ _chunkM6DAIE4Tcjs.getFarmRendererComponentExtensions.call(void 0, options.renderer || void 0)
4301
+ );
4258
4302
  let farmApi;
4259
4303
  let isBuild = false;
4260
4304
  let projectRoot = process.cwd();
4261
4305
  let sources;
4262
4306
  const routeSourceFiles = () => {
4263
- const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _240 => _240.getProgrammaticClientRoutes, 'call', _241 => _241()]);
4264
- if (_optionalChain([sources, 'optionalAccess', _242 => _242.for]) !== clientRoutes || !sources) {
4307
+ const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _243 => _243.getProgrammaticClientRoutes, 'call', _244 => _244()]);
4308
+ if (_optionalChain([sources, 'optionalAccess', _245 => _245.for]) !== clientRoutes || !sources) {
4265
4309
  sources = {
4266
4310
  for: clientRoutes,
4267
4311
  files: /* @__PURE__ */ new Set([
4268
4312
  ...routesFiles,
4269
- ...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _243 => _243.routeSourceFiles]), () => ( []))].map(resolvedFile)
4313
+ ...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _246 => _246.routeSourceFiles]), () => ( []))].map(resolvedFile)
4270
4314
  ])
4271
4315
  };
4272
4316
  }
@@ -4287,10 +4331,10 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4287
4331
  configResolved(config) {
4288
4332
  isBuild = config.command === "build";
4289
4333
  projectRoot = config.root;
4290
- farmApi = _optionalChain([config, 'access', _244 => _244.plugins, 'access', _245 => _245.find, 'call', _246 => _246((plugin) => plugin.name === "farm"), 'optionalAccess', _247 => _247.api]);
4334
+ farmApi = _optionalChain([config, 'access', _247 => _247.plugins, 'access', _248 => _248.find, 'call', _249 => _249((plugin) => plugin.name === "farm"), 'optionalAccess', _250 => _250.api]);
4291
4335
  sources = void 0;
4292
4336
  routesFiles = new Set(
4293
- _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
4337
+ _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
4294
4338
  (source) => _chunkYUCU6XB4cjs.PROGRAMMATIC_ROUTE_FILE_NAMES.map(
4295
4339
  (name) => resolvedFile(_path2.default.resolve(source.root, source.srcDir, name))
4296
4340
  )
@@ -4300,14 +4344,20 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4300
4344
  transform(code, id, transformOptions) {
4301
4345
  const environment = resolveBuildEnvironment(
4302
4346
  this,
4303
- _optionalChain([transformOptions, 'optionalAccess', _248 => _248.ssr])
4347
+ _optionalChain([transformOptions, 'optionalAccess', _251 => _251.ssr])
4304
4348
  );
4305
4349
  const parse3 = (source) => this.parse(source);
4306
- const result = transformEnvironmentFunctions({ code, id, environment, parse: parse3 });
4350
+ const result = transformEnvironmentFunctions({
4351
+ code,
4352
+ id,
4353
+ environment,
4354
+ parse: parse3,
4355
+ componentExtensions
4356
+ });
4307
4357
  if (environment === "client" && !isBuild && !_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
4308
4358
  this.error(routeSourceError(moduleFile(id)));
4309
4359
  }
4310
- if (environment === "server" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _249 => _249.experimental, 'optionalAccess', _250 => _250.serverComponents])) === "islands" && isApplicationScript(id)) {
4360
+ if (environment === "server" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _252 => _252.experimental, 'optionalAccess', _253 => _253.serverComponents])) === "islands" && isApplicationScript(id)) {
4311
4361
  const file = id.split("?", 1)[0];
4312
4362
  const root = _fs.realpathSync.call(void 0, _nullishCoalesce(options.root, () => ( projectRoot)));
4313
4363
  const clientCode = getFarmClientReachableModules(root, root).has(_path2.default.resolve(file)) || _fs.existsSync.call(void 0, file) && hasUseClientDirective(_fs.readFileSync.call(void 0, file, "utf8"));
@@ -4341,7 +4391,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4341
4391
  for (const id of this.getModuleIds()) {
4342
4392
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4343
4393
  const chain = findClientNodeBuiltinChain(id, (moduleId) => {
4344
- return _optionalChain([this, 'access', _251 => _251.getModuleInfo, 'call', _252 => _252(moduleId), 'optionalAccess', _253 => _253.importedIds]);
4394
+ return _optionalChain([this, 'access', _254 => _254.getModuleInfo, 'call', _255 => _255(moduleId), 'optionalAccess', _256 => _256.importedIds]);
4345
4395
  });
4346
4396
  if (chain) {
4347
4397
  this.error(
@@ -4359,8 +4409,8 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4359
4409
  }
4360
4410
  if (!forbidden.has(moduleFile(id))) continue;
4361
4411
  const info = this.getModuleInfo(id);
4362
- if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _254 => _254.code]))) continue;
4363
- this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _255 => _255.importers, 'access', _256 => _256.map, 'call', _257 => _257(moduleFile)])));
4412
+ if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _257 => _257.code]))) continue;
4413
+ this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _258 => _258.importers, 'access', _259 => _259.map, 'call', _260 => _260(moduleFile)])));
4364
4414
  }
4365
4415
  }
4366
4416
  };
@@ -4379,8 +4429,8 @@ function resolvedFile(filePath) {
4379
4429
  }
4380
4430
  }
4381
4431
  function resolveBuildEnvironment(context, ssr) {
4382
- if (_optionalChain([context, 'access', _258 => _258.environment, 'optionalAccess', _259 => _259.name]) === "client") return "client";
4383
- if (_optionalChain([context, 'access', _260 => _260.environment, 'optionalAccess', _261 => _261.name]) === "rsc" || _optionalChain([context, 'access', _262 => _262.environment, 'optionalAccess', _263 => _263.name]) === "ssr") {
4432
+ if (_optionalChain([context, 'access', _261 => _261.environment, 'optionalAccess', _262 => _262.name]) === "client") return "client";
4433
+ if (_optionalChain([context, 'access', _263 => _263.environment, 'optionalAccess', _264 => _264.name]) === "rsc" || _optionalChain([context, 'access', _265 => _265.environment, 'optionalAccess', _266 => _266.name]) === "ssr") {
4384
4434
  return "server";
4385
4435
  }
4386
4436
  return ssr ? "server" : "client";
@@ -4627,9 +4677,11 @@ function isEnvironmentFunctionKind(value) {
4627
4677
  function containsEnvironmentFunction(code) {
4628
4678
  return Array.from(ENVIRONMENT_FUNCTIONS).some((name) => code.includes(name));
4629
4679
  }
4630
- function isTransformableModule(id) {
4631
- const cleanId = id.split("?", 1)[0];
4632
- return MODULE_EXTENSION_RE2.test(cleanId) && !/\.d\.[cm]?ts$/.test(cleanId);
4680
+ function isTransformableModule(id, componentExtensions = /* @__PURE__ */ new Set()) {
4681
+ const [cleanId = id, query = ""] = id.split("?", 2);
4682
+ if (/\.d\.[cm]?ts$/.test(cleanId)) return false;
4683
+ if (MODULE_EXTENSION_RE2.test(cleanId)) return true;
4684
+ return componentExtensions.has(_path2.default.extname(cleanId).toLowerCase()) && !/(?:^|&)type=style\b/.test(query);
4633
4685
  }
4634
4686
  function transformError(id, message) {
4635
4687
  return new Error(`[Farm environment functions] ${message} in ${id.split("?", 1)[0]}`);