@farm.js/core 0.1.80 → 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 (358) hide show
  1. package/dist/{agent-mcp.d-BPa5n0ld.d.ts → agent-mcp.d-Cxi3214_.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-DMqOqnOA.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +2 -1
  4. package/dist/agent-runtime.d.ts +2 -1
  5. package/dist/analyzer-435DCIQ6.cjs +17 -0
  6. package/dist/{analyzer-F7CWE5VA.mjs → analyzer-IC66UJCU.mjs} +3 -2
  7. package/dist/api/client.cjs +1 -1
  8. package/dist/api/client.mjs +1 -1
  9. package/dist/api/client.native.cjs +1 -1
  10. package/dist/api/client.native.mjs +1 -1
  11. package/dist/api/node.cjs +1 -1
  12. package/dist/api/node.d.mts +4 -3
  13. package/dist/api/node.d.ts +4 -3
  14. package/dist/api/node.mjs +1 -1
  15. package/dist/api/route-manager.cjs +4 -4
  16. package/dist/api/route-manager.d.mts +4 -3
  17. package/dist/api/route-manager.d.ts +4 -3
  18. package/dist/api/route-manager.mjs +3 -3
  19. package/dist/api/runtime.cjs +1 -1
  20. package/dist/api/runtime.d.mts +3 -2
  21. package/dist/api/runtime.d.ts +3 -2
  22. package/dist/api/runtime.mjs +1 -1
  23. package/dist/api.cjs +5 -5
  24. package/dist/api.d.mts +5 -4
  25. package/dist/api.d.ts +5 -4
  26. package/dist/api.mjs +4 -4
  27. package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-Bbxp5kes.d.mts} +1 -1
  28. package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-C8Cswd31.d.ts} +1 -1
  29. package/dist/app-markdown.cjs +3 -3
  30. package/dist/app-markdown.d.mts +5 -4
  31. package/dist/app-markdown.d.ts +5 -4
  32. package/dist/app-markdown.mjs +2 -2
  33. package/dist/{app.d-DXeRWZK7.d.mts → app.d-BJuSurgy.d.mts} +13 -4
  34. package/dist/{app.d-DwX1ePhs.d.ts → app.d-DGIoFt5D.d.ts} +13 -4
  35. package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
  36. package/dist/{chunk-GCRT6GJG.mjs → chunk-2HMSSPCZ.mjs} +26 -0
  37. package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
  38. package/dist/chunk-2UYYXSUS.mjs +401 -0
  39. package/dist/{chunk-G4SZC2WH.cjs → chunk-2Y2HRZQY.cjs} +431 -332
  40. package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
  41. package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
  42. package/dist/{chunk-ZVSQN7NC.cjs → chunk-46UV2E7I.cjs} +40 -43
  43. package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
  44. package/dist/chunk-5MMKNW7Q.cjs +54 -0
  45. package/dist/{chunk-XZBBKZGW.mjs → chunk-5N526T7Q.mjs} +64 -33
  46. package/dist/{chunk-XY5OZQF6.cjs → chunk-ADQ2LATR.cjs} +2 -2
  47. package/dist/{chunk-7DD5TNPS.cjs → chunk-AHVF5GI2.cjs} +2 -2
  48. package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
  49. package/dist/chunk-B7L24VPX.cjs +401 -0
  50. package/dist/{chunk-5VDJEKGK.cjs → chunk-BBVLOEND.cjs} +1 -1
  51. package/dist/{chunk-XF7MJSUS.mjs → chunk-BCQIXH7L.mjs} +1 -1
  52. package/dist/{chunk-44G4XHEL.mjs → chunk-BJWJP5A4.mjs} +9 -9
  53. package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
  54. package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
  55. package/dist/chunk-C5QHZ626.cjs +85 -0
  56. package/dist/{chunk-X4TSMQWF.cjs → chunk-CL7BUGVB.cjs} +465 -360
  57. package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
  58. package/dist/{chunk-AXA2BSX3.cjs → chunk-CPZZBCPO.cjs} +22 -21
  59. package/dist/chunk-D2VAANBS.mjs +48 -0
  60. package/dist/{chunk-JGEN2FIT.mjs → chunk-D77OGI6X.mjs} +1 -1
  61. package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
  62. package/dist/{chunk-ZPEZXQTM.cjs → chunk-E3HBD2K3.cjs} +2 -2
  63. package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
  64. package/dist/chunk-EZYKV24V.mjs +385 -0
  65. package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
  66. package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
  67. package/dist/{chunk-5OAN7BG5.cjs → chunk-FYZD7DUS.cjs} +4 -4
  68. package/dist/{chunk-RQBGHHOQ.mjs → chunk-GY63XD6K.mjs} +1 -1
  69. package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
  70. package/dist/{chunk-MDEFTF63.mjs → chunk-HTNJ7A4D.mjs} +25 -28
  71. package/dist/chunk-I4WZRG73.mjs +54 -0
  72. package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
  73. package/dist/{chunk-V73Y4UBL.mjs → chunk-IM3UINTZ.mjs} +1 -1
  74. package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
  75. package/dist/{chunk-ZDYYZX73.mjs → chunk-IPG6B25T.mjs} +194 -89
  76. package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
  77. package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
  78. package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
  79. package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
  80. package/dist/{chunk-67MZTLTF.cjs → chunk-M6DAIE4T.cjs} +27 -1
  81. package/dist/{chunk-LVGB5PYK.cjs → chunk-MOGRRZMW.cjs} +17 -17
  82. package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
  83. package/dist/{chunk-GBW5DU7V.mjs → chunk-NOYKBGUK.mjs} +376 -277
  84. package/dist/{chunk-CCMP4JD2.cjs → chunk-NSLRK5DK.cjs} +1 -1
  85. package/dist/{chunk-WJ2O2MPP.cjs → chunk-OIWDEDUO.cjs} +394 -363
  86. package/dist/{chunk-K3XKEZR6.mjs → chunk-ONSZP5JK.mjs} +1 -1
  87. package/dist/{chunk-SDICLSQU.cjs → chunk-OUDNUFVR.cjs} +10 -10
  88. package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
  89. package/dist/{chunk-EG5YBYHO.mjs → chunk-POL5RCVU.mjs} +1 -1
  90. package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
  91. package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
  92. package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
  93. package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
  94. package/dist/{chunk-3JQBQG7K.mjs → chunk-RZ6XUEQS.mjs} +2 -2
  95. package/dist/{chunk-QHAISITM.mjs → chunk-S3IWDDQ3.mjs} +1 -1
  96. package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
  97. package/dist/{chunk-YN3YMSKD.mjs → chunk-TLSGRK7E.mjs} +3 -3
  98. package/dist/chunk-UDMBUTJD.mjs +85 -0
  99. package/dist/{chunk-NJ4OASLP.mjs → chunk-UF4BNKKJ.mjs} +1 -1
  100. package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
  101. package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
  102. package/dist/chunk-VS7HLH4S.cjs +385 -0
  103. package/dist/{chunk-ANZLZNNX.cjs → chunk-W6C3LEXX.cjs} +3 -3
  104. package/dist/chunk-WMRGIQTA.cjs +48 -0
  105. package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
  106. package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
  107. package/dist/{chunk-TS3ZHJN5.cjs → chunk-XOGCNKB7.cjs} +3 -3
  108. package/dist/{chunk-KEU55O2D.mjs → chunk-XOXCQGAF.mjs} +7 -6
  109. package/dist/{chunk-4MIDUSIX.mjs → chunk-YH7ENV3K.mjs} +14 -14
  110. package/dist/{chunk-2RRTOKRZ.mjs → chunk-YHM4PXJY.mjs} +1 -1
  111. package/dist/{chunk-A5D3UMLJ.mjs → chunk-YSU3WCW6.mjs} +1 -1
  112. package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
  113. package/dist/{chunk-DVHFIETW.cjs → chunk-ZIYJWJV2.cjs} +13 -13
  114. package/dist/{chunk-Z4SMFUZ7.cjs → chunk-ZKNXCRUQ.cjs} +7 -7
  115. package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-D8O1v2_X.d.mts} +5 -5
  116. package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-hf4L1MNP.d.ts} +5 -5
  117. package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-CX8UCQh-.d.ts} +1 -1
  118. package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DFwUHlOz.d.mts} +1 -1
  119. package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-BflSNO-b.d.mts} +2 -13
  120. package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-qWp8hNwd.d.ts} +2 -13
  121. package/dist/client-plugins.d.mts +2 -1
  122. package/dist/client-plugins.d.ts +2 -1
  123. package/dist/client.cjs +9 -8
  124. package/dist/client.d.mts +20 -151
  125. package/dist/client.d.ts +20 -151
  126. package/dist/client.mjs +8 -7
  127. package/dist/config.d.mts +2 -1
  128. package/dist/config.d.ts +2 -1
  129. package/dist/desktop.d.mts +3 -2
  130. package/dist/desktop.d.ts +3 -2
  131. package/dist/{devtools-JJOYTIMS.cjs → devtools-EI5N366Z.cjs} +9 -9
  132. package/dist/{devtools-F3FDFV26.mjs → devtools-XJHODO5H.mjs} +7 -7
  133. package/dist/docs.cjs +9 -9
  134. package/dist/docs.d.mts +4 -3
  135. package/dist/docs.d.ts +4 -3
  136. package/dist/docs.mjs +8 -8
  137. package/dist/environment/vite.cjs +7 -6
  138. package/dist/environment/vite.mjs +6 -5
  139. package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-C2oRihfa.d.ts} +1 -1
  140. package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-DoH5Krkq.d.mts} +1 -1
  141. package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-BrX53wFQ.d.mts} +1 -1
  142. package/dist/{headers.d-CAW4wPey.d.ts → headers.d-Dj0mfYpb.d.ts} +1 -1
  143. package/dist/index.cjs +58 -56
  144. package/dist/{index.d-ah2c89Wu.d.ts → index.d-Dhc2scRl.d.ts} +1 -1
  145. package/dist/{index.d-BEVK61zS.d.mts → index.d-DzDHOttz.d.mts} +1 -1
  146. package/dist/index.d.mts +25 -23
  147. package/dist/index.d.ts +25 -23
  148. package/dist/index.mjs +62 -60
  149. package/dist/instrumentation.cjs +3 -3
  150. package/dist/instrumentation.mjs +2 -2
  151. package/dist/integrations/orm.d.mts +2 -1
  152. package/dist/integrations/orm.d.ts +2 -1
  153. package/dist/integrations.d.mts +2 -1
  154. package/dist/integrations.d.ts +2 -1
  155. package/dist/internal/app-markdown-runtime.cjs +2 -2
  156. package/dist/internal/app-markdown-runtime.d.mts +12 -5
  157. package/dist/internal/app-markdown-runtime.d.ts +12 -5
  158. package/dist/internal/app-markdown-runtime.mjs +1 -1
  159. package/dist/internal/build-runtime.cjs +41 -40
  160. package/dist/internal/build-runtime.d.mts +5 -4
  161. package/dist/internal/build-runtime.d.ts +5 -4
  162. package/dist/internal/build-runtime.mjs +40 -39
  163. package/dist/internal/cli-runtime.cjs +19 -19
  164. package/dist/internal/cli-runtime.d.mts +8 -7
  165. package/dist/internal/cli-runtime.d.ts +8 -7
  166. package/dist/internal/cli-runtime.mjs +20 -20
  167. package/dist/internal/client-error-overlay.cjs +4 -4
  168. package/dist/internal/client-error-overlay.mjs +1 -1
  169. package/dist/internal/client-runtime.cjs +76 -15
  170. package/dist/internal/client-runtime.d.mts +18 -7
  171. package/dist/internal/client-runtime.d.ts +18 -7
  172. package/dist/internal/client-runtime.mjs +67 -6
  173. package/dist/internal/compression-runtime.d.mts +2 -1
  174. package/dist/internal/compression-runtime.d.ts +2 -1
  175. package/dist/internal/config-runtime.cjs +9 -9
  176. package/dist/internal/config-runtime.d.mts +4 -3
  177. package/dist/internal/config-runtime.d.ts +4 -3
  178. package/dist/internal/config-runtime.mjs +8 -8
  179. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  180. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  181. package/dist/internal/form-actions.cjs +3 -3
  182. package/dist/internal/form-actions.mjs +2 -2
  183. package/dist/internal/infra-analytics-runtime.cjs +7 -7
  184. package/dist/internal/infra-analytics-runtime.mjs +5 -5
  185. package/dist/internal/island-codec.cjs +3 -3
  186. package/dist/internal/island-codec.mjs +2 -2
  187. package/dist/internal/island-value-store.d.mts +1 -1
  188. package/dist/internal/island-value-store.d.ts +1 -1
  189. package/dist/internal/islands-boot.cjs +9 -3
  190. package/dist/internal/islands-boot.mjs +9 -3
  191. package/dist/internal/islands-runtime.cjs +10 -56
  192. package/dist/internal/islands-runtime.mjs +6 -52
  193. package/dist/internal/islands-server.cjs +4 -4
  194. package/dist/internal/islands-server.mjs +3 -3
  195. package/dist/internal/islx-actions-client.cjs +36 -0
  196. package/dist/internal/islx-actions-client.d.mts +13 -0
  197. package/dist/internal/islx-actions-client.d.ts +13 -0
  198. package/dist/internal/islx-actions-client.mjs +36 -0
  199. package/dist/internal/islx-actions-server.cjs +8 -0
  200. package/dist/internal/islx-actions-server.d.mts +6 -0
  201. package/dist/internal/islx-actions-server.d.ts +6 -0
  202. package/dist/internal/islx-actions-server.mjs +8 -0
  203. package/dist/internal/islx-client.d.mts +0 -4
  204. package/dist/internal/islx-client.d.ts +0 -4
  205. package/dist/internal/isolated-boundary.cjs +3 -3
  206. package/dist/internal/isolated-boundary.d.mts +1 -1
  207. package/dist/internal/isolated-boundary.d.ts +1 -1
  208. package/dist/internal/isolated-boundary.mjs +2 -2
  209. package/dist/internal/metadata-image-runtime.cjs +4 -2
  210. package/dist/internal/metadata-image-runtime.d.mts +18 -2
  211. package/dist/internal/metadata-image-runtime.d.ts +18 -2
  212. package/dist/internal/metadata-image-runtime.mjs +5 -3
  213. package/dist/internal/native-server-fns.cjs +5 -4
  214. package/dist/internal/native-server-fns.mjs +4 -3
  215. package/dist/internal/navigation-neutral.cjs +36 -0
  216. package/dist/internal/navigation-neutral.d.mts +14 -0
  217. package/dist/internal/navigation-neutral.d.ts +14 -0
  218. package/dist/internal/navigation-neutral.mjs +36 -0
  219. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  220. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  221. package/dist/internal/production-runtime.cjs +24 -24
  222. package/dist/internal/production-runtime.d.mts +11 -10
  223. package/dist/internal/production-runtime.d.ts +11 -10
  224. package/dist/internal/production-runtime.mjs +29 -29
  225. package/dist/internal/server-tree.cjs +5 -4
  226. package/dist/internal/server-tree.d.mts +3 -4
  227. package/dist/internal/server-tree.d.ts +3 -4
  228. package/dist/internal/server-tree.mjs +4 -3
  229. package/dist/internal/spa-router.cjs +3 -3
  230. package/dist/internal/spa-router.d.mts +4 -3
  231. package/dist/internal/spa-router.d.ts +4 -3
  232. package/dist/internal/spa-router.mjs +2 -2
  233. package/dist/internal/start-manifest.d.mts +2 -1
  234. package/dist/internal/start-manifest.d.ts +2 -1
  235. package/dist/internal/vercel-edge-middleware.cjs +1 -1
  236. package/dist/internal/vercel-edge-middleware.mjs +1 -1
  237. package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
  238. package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
  239. package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
  240. package/dist/layers-XLOMMQP7.cjs +21 -0
  241. package/dist/markdown.d.mts +2 -1
  242. package/dist/markdown.d.ts +2 -1
  243. package/dist/middleware.cjs +5 -5
  244. package/dist/middleware.d.mts +2 -1
  245. package/dist/middleware.d.ts +2 -1
  246. package/dist/middleware.mjs +4 -4
  247. package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DOaeUoWq.d.mts} +1 -1
  248. package/dist/{mount.d-DcoPFqv5.d.ts → mount.d-DwXjaOHY.d.ts} +1 -1
  249. package/dist/{native-server-fn-handler-TNVFEQW3.cjs → native-server-fn-handler-57TCQPSM.cjs} +4 -4
  250. package/dist/{native-server-fn-handler-OXFTI6V5.mjs → native-server-fn-handler-PYK65A46.mjs} +3 -3
  251. package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-BElGUMgt.d.mts} +1 -1
  252. package/dist/{navigation-delegate.d-2MK4YSlL.d.ts → navigation-delegate.d-o3pPd9VI.d.ts} +1 -1
  253. package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
  254. package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
  255. package/dist/navigation.cjs +6 -6
  256. package/dist/navigation.d.mts +7 -6
  257. package/dist/navigation.d.ts +7 -6
  258. package/dist/navigation.mjs +5 -5
  259. package/dist/{nitro-6UOJXJZ6.cjs → nitro-XGIO6EQN.cjs} +2 -2
  260. package/dist/{nitro-C3MYDX7V.mjs → nitro-YLTGVGK4.mjs} +1 -1
  261. package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
  262. package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
  263. package/dist/plugin.cjs +32 -30
  264. package/dist/plugin.d.mts +6 -5
  265. package/dist/plugin.d.ts +6 -5
  266. package/dist/plugin.mjs +31 -29
  267. package/dist/query/client.cjs +10 -10
  268. package/dist/query/client.mjs +5 -5
  269. package/dist/{render-plan.d-2o-AG-ot.d.ts → render-plan.d-BD06tqFA.d.ts} +1 -1
  270. package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-xWCRAJeR.d.mts} +1 -1
  271. package/dist/renderer/none/server.cjs +5 -1
  272. package/dist/renderer/none/server.d.mts +3 -1
  273. package/dist/renderer/none/server.d.ts +3 -1
  274. package/dist/renderer/none/server.mjs +4 -0
  275. package/dist/renderer/react/server.cjs +6 -6
  276. package/dist/renderer/react/server.mjs +3 -3
  277. package/dist/renderer-client.cjs +34 -15
  278. package/dist/renderer-client.d.mts +13 -97
  279. package/dist/renderer-client.d.ts +13 -97
  280. package/dist/renderer-client.mjs +23 -4
  281. package/dist/renderer.cjs +4 -2
  282. package/dist/renderer.d.mts +33 -5
  283. package/dist/renderer.d.ts +33 -5
  284. package/dist/renderer.mjs +3 -1
  285. package/dist/{request.d-CE0FIkiM.d.ts → request.d-DUMuWxSN.d.ts} +1 -1
  286. package/dist/{request.d-RCnCBuWq.d.mts → request.d-Dx82V8bz.d.mts} +1 -1
  287. package/dist/request.d.mts +3 -2
  288. package/dist/request.d.ts +3 -2
  289. package/dist/{route-rendering.d-BTPOM2nU.d.ts → route-rendering.d-BwBVpLtD.d.ts} +1 -1
  290. package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-DJh6GauM.d.mts} +1 -1
  291. package/dist/{router.d-D8Vvwl4i.d.mts → router.d-BtkKDxUB.d.mts} +1 -1
  292. package/dist/{router.d-BU_WE6Ol.d.ts → router.d-CJBSG5jr.d.ts} +1 -1
  293. package/dist/routes.cjs +1 -1
  294. package/dist/routes.d.mts +2 -1
  295. package/dist/routes.d.ts +2 -1
  296. package/dist/routes.mjs +1 -1
  297. package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-GD6KLOIG.mjs} +13 -13
  298. package/dist/{rsc-pipeline-A3R4U26C.cjs → rsc-pipeline-H5AXQA7A.cjs} +14 -14
  299. package/dist/{runtime-SQFRHRGJ.mjs → runtime-OJ7FXFUI.mjs} +13 -13
  300. package/dist/{runtime-WZ3CHHGJ.cjs → runtime-YWQVBC3V.cjs} +15 -15
  301. package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-BQnD0cfC.d.ts} +1 -1
  302. package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-C4SuZXf6.d.mts} +1 -1
  303. package/dist/server-action-security.cjs +1 -1
  304. package/dist/server-action-security.mjs +1 -1
  305. package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-9rH7ZoEq.d.mts} +1 -1
  306. package/dist/{server-components-status.d-BeqSXcjM.d.ts → server-components-status.d-rfKOcE0N.d.ts} +1 -1
  307. package/dist/server-fn.cjs +3 -3
  308. package/dist/server-fn.mjs +2 -2
  309. package/dist/server-plugins.cjs +1 -1
  310. package/dist/server-plugins.d.mts +4 -3
  311. package/dist/server-plugins.d.ts +4 -3
  312. package/dist/server-plugins.mjs +1 -1
  313. package/dist/server-query.cjs +4 -4
  314. package/dist/server-query.mjs +3 -3
  315. package/dist/server.cjs +64 -59
  316. package/dist/server.d.mts +12 -11
  317. package/dist/server.d.ts +12 -11
  318. package/dist/server.mjs +45 -40
  319. package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-DMKiBsHH.d.ts} +3 -3
  320. package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-V6XLSTCy.d.mts} +3 -3
  321. package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-BnCKPQL0.d.mts} +2 -2
  322. package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-MNedvvMB.d.ts} +2 -2
  323. package/dist/store-core.d-Ad5biajo.d.ts +301 -0
  324. package/dist/store-core.d-BqJI1-ix.d.mts +301 -0
  325. package/dist/testing.cjs +3 -3
  326. package/dist/testing.d.mts +2 -1
  327. package/dist/testing.d.ts +2 -1
  328. package/dist/testing.mjs +3 -3
  329. package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-BEKLWa0Z.d.mts} +1 -1
  330. package/dist/{utils.d-_dvevm5s.d.ts → utils.d-BdjHKDuT.d.ts} +1 -1
  331. package/dist/version.cjs +2 -2
  332. package/dist/version.mjs +1 -1
  333. package/dist/vite.cjs +34 -30
  334. package/dist/vite.d.mts +18 -7
  335. package/dist/vite.d.ts +18 -7
  336. package/dist/vite.mjs +33 -29
  337. package/dist/workflows.cjs +2 -2
  338. package/dist/workflows.mjs +1 -1
  339. package/package.json +17 -2
  340. package/dist/analyzer-I7RBBQ65.cjs +0 -16
  341. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  342. package/dist/chunk-HONTCUK6.mjs +0 -203
  343. package/dist/chunk-K6PGK7DC.cjs +0 -203
  344. package/dist/chunk-NBIVGHAT.mjs +0 -50
  345. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  346. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  347. package/dist/layers-HMEGUEXM.cjs +0 -21
  348. package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
  349. package/dist/{chunk-EY7ED5UW.mjs → chunk-3RVLJTFZ.mjs} +3 -3
  350. package/dist/{chunk-KKVRWNDH.mjs → chunk-6WVRVGKC.mjs} +3 -3
  351. package/dist/{chunk-UJPE75GF.mjs → chunk-J2VUPCCR.mjs} +3 -3
  352. package/dist/{chunk-MQOHYV6L.cjs → chunk-LKIG5SM6.cjs} +2 -2
  353. package/dist/{chunk-UWOCYINY.cjs → chunk-OFVCWV2D.cjs} +2 -2
  354. package/dist/{chunk-3K2E55BJ.mjs → chunk-OO4GVGM3.mjs} +3 -3
  355. package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
  356. package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
  357. package/dist/{chunk-2FK47RRZ.cjs → chunk-VGHDPEPQ.cjs} +2 -2
  358. package/dist/{chunk-CGIVCGH5.cjs → chunk-XOFJUSWC.cjs} +2 -2
@@ -2,14 +2,17 @@ import {
2
2
  resolveFarmAppClientEntry,
3
3
  resolveFarmClientPlugins
4
4
  } from "./chunk-RPA45OQS.mjs";
5
- import {
6
- resolveFarmPlatform
7
- } from "./chunk-SMUW7UST.mjs";
8
5
  import {
9
6
  collectSSGPages,
10
7
  matchSSGPage,
11
8
  resolveRouteRenderingConfigFromFile
12
- } from "./chunk-YN3YMSKD.mjs";
9
+ } from "./chunk-TLSGRK7E.mjs";
10
+ import {
11
+ findFarmAppPackageDir
12
+ } from "./chunk-YSU3WCW6.mjs";
13
+ import {
14
+ resolveFarmPlatform
15
+ } from "./chunk-SMUW7UST.mjs";
13
16
  import {
14
17
  appendFarmHead,
15
18
  classifyFarmDocumentPrefix,
@@ -45,10 +48,15 @@ import {
45
48
  stripRouteGroups,
46
49
  takeFarmHoistedHead,
47
50
  takeFarmNavigationOutlet
48
- } from "./chunk-3K2E55BJ.mjs";
51
+ } from "./chunk-OO4GVGM3.mjs";
52
+ import {
53
+ getFarmFormState,
54
+ handleFarmFormActionRequest,
55
+ renderFarmFormStateScript
56
+ } from "./chunk-V7HNYR76.mjs";
49
57
  import {
50
58
  listFarmMCPLlmsTxtLinks
51
- } from "./chunk-3JQBQG7K.mjs";
59
+ } from "./chunk-RZ6XUEQS.mjs";
52
60
  import {
53
61
  FARM_DEFAULT_MCP_PATH,
54
62
  collectFarmDefaultMCPPages,
@@ -58,17 +66,13 @@ import {
58
66
  resolveFarmDefaultMCPServer
59
67
  } from "./chunk-HR4N2K4V.mjs";
60
68
  import {
61
- createFarmMetadataImageResponse
62
- } from "./chunk-HONTCUK6.mjs";
69
+ createFarmMetadataImageResponse,
70
+ resolveFarmMetadataImageValue
71
+ } from "./chunk-EZYKV24V.mjs";
63
72
  import {
64
73
  installFarmIslandValues,
65
74
  uninstallFarmIslandValues
66
- } from "./chunk-7KDCVSTR.mjs";
67
- import {
68
- getFarmFormState,
69
- handleFarmFormActionRequest,
70
- renderFarmFormStateScript
71
- } from "./chunk-7FQFK3OA.mjs";
75
+ } from "./chunk-2PFGA6PB.mjs";
72
76
  import {
73
77
  FarmSourceSnapshotStore,
74
78
  collectFarmRenderedClientModules,
@@ -95,7 +99,7 @@ import {
95
99
  traceFarmSourceReads,
96
100
  usesFarmServerTree,
97
101
  withFarmSourceSnapshot
98
- } from "./chunk-MDEFTF63.mjs";
102
+ } from "./chunk-HTNJ7A4D.mjs";
99
103
  import {
100
104
  FARM_ISLAND_REPLAYABLE_SELECTOR
101
105
  } from "./chunk-S32PDOLO.mjs";
@@ -123,6 +127,14 @@ import {
123
127
  resolveFarmAgentSitemap,
124
128
  resolveFarmPerformanceConfig
125
129
  } from "./chunk-SLEHAGGV.mjs";
130
+ import {
131
+ createFarmCspNonce,
132
+ createFarmCspNonceRewriter,
133
+ filterFarmCspNonces,
134
+ getFarmSecurityHeader,
135
+ resolveFarmSecurityConfig,
136
+ stampFarmCspNonce
137
+ } from "./chunk-22W4FNTG.mjs";
126
138
  import {
127
139
  collectFarmLlmsTxtPages,
128
140
  createFarmDefaultLlmsTxt,
@@ -133,18 +145,15 @@ import {
133
145
  resolveFarmAgentOrigin,
134
146
  resolveFarmLlmsTxtConfig
135
147
  } from "./chunk-XGL42MQ7.mjs";
136
- import {
137
- createFarmCspNonce,
138
- createFarmCspNonceRewriter,
139
- filterFarmCspNonces,
140
- getFarmSecurityHeader,
141
- resolveFarmSecurityConfig,
142
- stampFarmCspNonce
143
- } from "./chunk-22W4FNTG.mjs";
144
148
  import {
145
149
  resolveFarmServerComponentsMode
146
150
  } from "./chunk-4QENVMG7.mjs";
147
151
  import {
152
+ getFarmAppDirectories,
153
+ getFarmSourceRoots
154
+ } from "./chunk-Z3RM3VA2.mjs";
155
+ import {
156
+ assertFarmRendererServerModule,
148
157
  assertFarmRendererStreamingRuntime,
149
158
  getFarmRendererCapabilities,
150
159
  getFarmRendererComponentExtensions,
@@ -156,11 +165,7 @@ import {
156
165
  resolveFarmRenderer,
157
166
  resolveFarmRendererAppSetup,
158
167
  resolveFarmRendererModule
159
- } from "./chunk-GCRT6GJG.mjs";
160
- import {
161
- getFarmAppDirectories,
162
- getFarmSourceRoots
163
- } from "./chunk-4STJ6LGR.mjs";
168
+ } from "./chunk-2HMSSPCZ.mjs";
164
169
  import {
165
170
  resolveFarmImageConfig
166
171
  } from "./chunk-AOIUYHPH.mjs";
@@ -173,10 +178,10 @@ import {
173
178
  import {
174
179
  createFarmMarkdownRouteModuleFromFile,
175
180
  loadFarmMdxComponents
176
- } from "./chunk-Q4YEAWUK.mjs";
181
+ } from "./chunk-ECVSRE4Y.mjs";
177
182
  import {
178
183
  isFarmMarkdownPageFile
179
- } from "./chunk-MUZHULW2.mjs";
184
+ } from "./chunk-ICOJ2BC6.mjs";
180
185
  import {
181
186
  resolveFarmMdxComponentsModulePath,
182
187
  resolveMdxConfig
@@ -190,9 +195,12 @@ import {
190
195
  getFarmMarkdownAlternatePath,
191
196
  resolveMarkdownConfig
192
197
  } from "./chunk-YU2MNIIY.mjs";
198
+ import {
199
+ isPackageSpecifier
200
+ } from "./chunk-AYDVUCXD.mjs";
193
201
  import {
194
202
  resolveWorkflowsConfig
195
- } from "./chunk-COTFX4GT.mjs";
203
+ } from "./chunk-LTOT5KVJ.mjs";
196
204
  import {
197
205
  resolveFarmThemeConfig
198
206
  } from "./chunk-YWPNIYUP.mjs";
@@ -254,12 +262,12 @@ import {
254
262
  import {
255
263
  sendWebResponse
256
264
  } from "./chunk-O5QUJEWT.mjs";
257
- import {
258
- loadFarmDevModule
259
- } from "./chunk-7H2TXT2K.mjs";
260
265
  import {
261
266
  toFileModuleUrl
262
267
  } from "./chunk-VHIXGZYH.mjs";
268
+ import {
269
+ loadFarmDevModule
270
+ } from "./chunk-7H2TXT2K.mjs";
263
271
  import {
264
272
  resolveFarmI18nConfig
265
273
  } from "./chunk-VJSXPN3W.mjs";
@@ -298,13 +306,13 @@ import {
298
306
  } from "./chunk-EILUVBKS.mjs";
299
307
  import {
300
308
  FARM_VERSION
301
- } from "./chunk-JGEN2FIT.mjs";
302
- import {
303
- _setFarmSearchPreserveRoutes
304
- } from "./chunk-VDQZV6BX.mjs";
309
+ } from "./chunk-D77OGI6X.mjs";
305
310
  import {
306
311
  normalizeFarmAPIConfig
307
312
  } from "./chunk-W6QLRQ3V.mjs";
313
+ import {
314
+ _setFarmSearchPreserveRoutes
315
+ } from "./chunk-VDQZV6BX.mjs";
308
316
  import {
309
317
  getFarmPageDataRedirect
310
318
  } from "./chunk-SD6JGJOM.mjs";
@@ -354,10 +362,6 @@ import {
354
362
  getCurrentRequestOrNull,
355
363
  resolveFarmRequestURL
356
364
  } from "./chunk-FCAYYLAE.mjs";
357
- import {
358
- _peekCurrentRequest,
359
- _resolveCurrentCspNonce
360
- } from "./chunk-VIXTAVEA.mjs";
361
365
  import {
362
366
  getFarmRedirectError,
363
367
  isFarmNotFoundError,
@@ -381,6 +385,10 @@ import {
381
385
  compareRouteSpecificity,
382
386
  getRoutePatternShape
383
387
  } from "./chunk-5KAEGBIL.mjs";
388
+ import {
389
+ _peekCurrentRequest,
390
+ _resolveCurrentCspNonce
391
+ } from "./chunk-VIXTAVEA.mjs";
384
392
 
385
393
  // src/static-metadata-image.ts
386
394
  import { createHash } from "crypto";
@@ -1329,7 +1337,8 @@ var RouteManager = class _RouteManager {
1329
1337
  root: this.config.root,
1330
1338
  loadModule: viteServer ? (componentModulePath) => loadFarmDevModule(viteServer, componentModulePath) : void 0
1331
1339
  }),
1332
- config: mdxConfig
1340
+ config: mdxConfig,
1341
+ renderer: isReactRenderer(this.config.renderer) ? void 0 : this.rendererRuntime
1333
1342
  });
1334
1343
  }
1335
1344
  if (this.viteServer) {
@@ -3162,6 +3171,21 @@ function resolveProviderModule(moduleId, root) {
3162
3171
  return toViteModuleId(path5.resolve(root, moduleId), root);
3163
3172
  }
3164
3173
 
3174
+ // src/server-actions-mode.ts
3175
+ function resolveFarmIslxActionsMode(config) {
3176
+ if (resolveFarmServerComponentsMode(config.experimental?.serverComponents) === "islands") {
3177
+ return "islands";
3178
+ }
3179
+ if (config.experimental?.serverActions !== true) return null;
3180
+ const renderer = config.renderer;
3181
+ if (renderer === void 0 || renderer === false) return null;
3182
+ if (isFarmRendererDisabled(renderer) || isReactRenderer(renderer)) return null;
3183
+ return "renderer";
3184
+ }
3185
+ function farmBrowserServerFnsEnabled(config) {
3186
+ return config.experimental?.serverActions === true && resolveFarmIslxActionsMode(config) !== null;
3187
+ }
3188
+
3165
3189
  // src/island-inference.ts
3166
3190
  import fs3 from "fs";
3167
3191
  import path6 from "path";
@@ -3839,6 +3863,53 @@ function canFarmSkipKeptLayoutRender(modulePath, root) {
3839
3863
  }
3840
3864
 
3841
3865
  // src/server/renderer.ts
3866
+ function pipeFarmRendererWebStream(runtime) {
3867
+ return (element, callbacks) => {
3868
+ let source;
3869
+ let destination;
3870
+ let aborted = false;
3871
+ let shellSettled = false;
3872
+ const settleShell = (error) => {
3873
+ if (shellSettled) return false;
3874
+ shellSettled = true;
3875
+ if (error === void 0) callbacks.onShellReady();
3876
+ else callbacks.onShellError(error);
3877
+ return true;
3878
+ };
3879
+ Promise.resolve().then(
3880
+ () => runtime.renderToReadableStream(element, {
3881
+ ...callbacks.nonce ? { nonce: callbacks.nonce } : {},
3882
+ onError: callbacks.onError
3883
+ })
3884
+ ).then(
3885
+ (stream) => {
3886
+ source = Readable.fromWeb(stream);
3887
+ if (aborted) {
3888
+ source.destroy();
3889
+ return;
3890
+ }
3891
+ source.once("readable", () => settleShell());
3892
+ source.once("error", (error) => {
3893
+ if (settleShell(error)) return;
3894
+ callbacks.onError(error);
3895
+ destination?.end();
3896
+ });
3897
+ },
3898
+ (error) => settleShell(error)
3899
+ );
3900
+ return {
3901
+ pipe(target) {
3902
+ destination = target;
3903
+ source?.pipe(target);
3904
+ },
3905
+ abort() {
3906
+ aborted = true;
3907
+ source?.destroy();
3908
+ destination?.end();
3909
+ }
3910
+ };
3911
+ };
3912
+ }
3842
3913
  var islands;
3843
3914
  function withFarmIslandsRenders(runtime, islandsRuntime) {
3844
3915
  const wrap = (element) => islandsRuntime.withFarmIslandsRender(
@@ -4134,14 +4205,7 @@ var ServerRenderer = class {
4134
4205
  )
4135
4206
  ).href);
4136
4207
  const runtime = loaded;
4137
- const required = ["createElement", "isValidElement", "renderToString"];
4138
- for (const key of required) {
4139
- if (typeof runtime[key] !== "function") {
4140
- throw new Error(
4141
- `Renderer \`${this.config.renderer.name}\` server module must export ${key}().`
4142
- );
4143
- }
4144
- }
4208
+ assertFarmRendererServerModule(runtime, this.config.renderer);
4145
4209
  assertFarmRendererStreamingRuntime(
4146
4210
  this.config.renderer.name,
4147
4211
  this.config.renderer,
@@ -4364,6 +4428,19 @@ var ServerRenderer = class {
4364
4428
  islandValues() {
4365
4429
  return resolveFarmServerComponentsMode(this.config.experimental?.serverComponents) === "islands";
4366
4430
  }
4431
+ /**
4432
+ * The page's element. Only React renders an async component, so for any other renderer Farm
4433
+ * awaits an async page itself and hands the renderer what it returned, as the production
4434
+ * server does. A `page.md` page is one: it compiles its Markdown on first render.
4435
+ */
4436
+ async createPageElement(PageComponent, pageProps) {
4437
+ const runtime = this.rendererRuntime;
4438
+ if (isReactRenderer(this.config.renderer) || typeof PageComponent !== "function" || PageComponent.constructor?.name !== "AsyncFunction") {
4439
+ return runtime.createElement(PageComponent, pageProps);
4440
+ }
4441
+ const result = await PageComponent(pageProps);
4442
+ return runtime.isValidElement(result) ? result : runtime.createElement(runtime.Fragment, null, result);
4443
+ }
4367
4444
  /**
4368
4445
  * Render the route tree used by client navigation without producing a second
4369
4446
  * document response. Layout markers let the browser preserve the longest
@@ -4375,7 +4452,7 @@ var ServerRenderer = class {
4375
4452
  setFarmBasePath(this.config.basePath);
4376
4453
  this.publishSearchPreserveRoutes();
4377
4454
  setFarmTrailingSlashPreference(this.config.trailingSlash);
4378
- let element = this.rendererRuntime.createElement(input.PageComponent, input.pageProps);
4455
+ let element = await this.createPageElement(input.PageComponent, input.pageProps);
4379
4456
  if (input.LoadingComponent) {
4380
4457
  element = this.rendererRuntime.createElement(
4381
4458
  this.rendererRuntime.Suspense,
@@ -4750,7 +4827,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4750
4827
  searchParams: createFarmSearchParams({}),
4751
4828
  path: page.urlPath
4752
4829
  };
4753
- let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
4830
+ let pageElement = await this.createPageElement(PageComponent, pageProps);
4754
4831
  const pageMetadata = routeManifest.routes.find(
4755
4832
  (entry) => entry.pattern === route?.pattern
4756
4833
  ) ?? {
@@ -5031,7 +5108,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5031
5108
  params
5032
5109
  });
5033
5110
  let actionRequest;
5034
- if (req.method === "POST" && resolveFarmServerComponentsMode(this.config.experimental?.serverComponents) === "islands") {
5111
+ if (req.method === "POST" && resolveFarmIslxActionsMode(this.config) !== null) {
5035
5112
  await Promise.all([
5036
5113
  this.routeManager.loadRouteModule(route.modulePath),
5037
5114
  ...layouts.map((layout) => this.routeManager.loadLayoutModule(layout.modulePath))
@@ -5207,13 +5284,6 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5207
5284
  LoadingFallbackComponent = loadingModule.default;
5208
5285
  }
5209
5286
  }
5210
- let ErrorFallbackComponent = null;
5211
- if (errorBoundaryEntry) {
5212
- const errorModule = await this.routeManager.loadRouteModule(errorBoundaryEntry.modulePath);
5213
- if (errorModule.default) {
5214
- ErrorFallbackComponent = errorModule.default;
5215
- }
5216
- }
5217
5287
  const routeManifest = this.routeManager.generateClientManifest(this.config.root);
5218
5288
  const routeManifestEntry = routeManifest.routes.find(
5219
5289
  (entry) => entry.pattern === route.pattern
@@ -5395,7 +5465,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5395
5465
  await _runWithMiddlewareData(middlewareDataForContext, async () => {
5396
5466
  await _runWithMiddlewareContext(middlewareContext, async () => {
5397
5467
  await _runWithCurrentRequest(currentRequest, async () => {
5398
- let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
5468
+ let pageElement = await this.createPageElement(PageComponent, pageProps);
5399
5469
  if (LoadingFallbackComponent && !islandsNavigationRequest) {
5400
5470
  const loadingFallback = this.rendererRuntime.createElement(LoadingFallbackComponent, {
5401
5471
  ...createRouteStateProps({
@@ -5500,24 +5570,6 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5500
5570
  if (shouldHydrateLayout) {
5501
5571
  wrappedElement = this.wrapClientGraph(wrappedElement);
5502
5572
  }
5503
- if (ErrorFallbackComponent && this.rendererRuntime.ErrorBoundary) {
5504
- wrappedElement = this.rendererRuntime.createElement(
5505
- this.rendererRuntime.ErrorBoundary,
5506
- {
5507
- Fallback: ErrorFallbackComponent,
5508
- fallbackProps: {
5509
- ...createRouteStateProps({
5510
- params,
5511
- searchParamsObject,
5512
- path: pathname,
5513
- middlewareMap,
5514
- pluginExposedContext
5515
- })
5516
- }
5517
- },
5518
- wrappedElement
5519
- );
5520
- }
5521
5573
  if ((isClientComponent || shouldHydrate) && !shouldHydrateLayout && this.reactRenderer) {
5522
5574
  wrappedElement = this.reactRenderer.markLayoutPosition(wrappedElement);
5523
5575
  }
@@ -6235,7 +6287,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6235
6287
  searchParams: createFarmSearchParams(options.searchParamsObject),
6236
6288
  path: options.pagePath
6237
6289
  };
6238
- const handlerResult = typeof imageModule.default === "function" ? await imageModule.default(imageProps) : imageModule.default;
6290
+ const handlerResult = await resolveFarmMetadataImageValue(imageModule, imageProps, {
6291
+ renderer: this.getMetadataImageRenderer(),
6292
+ component: isRendererCompiledComponent(
6293
+ options.image.modulePath,
6294
+ this.config.renderer?.componentExtensions ?? []
6295
+ )
6296
+ });
6239
6297
  await this.writeMetadataImageResponse(req, res, handlerResult, imageModule);
6240
6298
  }
6241
6299
  async writeMetadataImageResponse(req, res, value, imageModule) {
@@ -6243,10 +6301,14 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6243
6301
  const response = await createFarmMetadataImageResponse(value, imageModule, {
6244
6302
  method: req.method,
6245
6303
  ifNoneMatch: Array.isArray(ifNoneMatch) ? ifNoneMatch[0] : ifNoneMatch,
6246
- renderer: isReactRenderer(this.config.renderer) ? void 0 : this.rendererRuntime
6304
+ renderer: this.getMetadataImageRenderer()
6247
6305
  });
6248
6306
  await sendWebResponse(res, response);
6249
6307
  }
6308
+ /** The renderer that draws a metadata image: none for React, whose elements Satori reads directly. */
6309
+ getMetadataImageRenderer() {
6310
+ return isReactRenderer(this.config.renderer) ? void 0 : this.rendererRuntime;
6311
+ }
6250
6312
  async writeStaticMetadataImageResponse(req, res, image) {
6251
6313
  const method = (req.method || "GET").toUpperCase();
6252
6314
  if (method !== "GET" && method !== "HEAD") {
@@ -6544,7 +6606,8 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
6544
6606
  }
6545
6607
  }
6546
6608
  async renderWithSSR(element, req, res, clearMiddlewareData, options = {}) {
6547
- const renderToPipeableStream = this.rendererRuntime.renderToPipeableStream;
6609
+ const runtime = this.rendererRuntime;
6610
+ const renderToPipeableStream = runtime.renderToPipeableStream ?? (getFarmRendererStreamingCapabilitiesForRuntime(this.config.renderer, "node").web && runtime.renderToReadableStream ? pipeFarmRendererWebStream(runtime) : void 0);
6548
6611
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
6549
6612
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument(req);
6550
6613
  if (!renderToPipeableStream || _isFarmMarkdownPageCheck(req.headers?.[FARM_MARKDOWN_PAGE_CHECK_HEADER]) || streamDocument && (options.captureStaticShell || !isReactRenderer(this.config.renderer))) {
@@ -8330,14 +8393,43 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
8330
8393
  "@farm.js/core/query/client",
8331
8394
  "@farm.js/core/server-fn/client",
8332
8395
  "@farm.js/core/server-query/client",
8396
+ // Farm's browser entry imports these and no app file does, so Vite's scan cannot see them. In an
8397
+ // app that installs Farm from the registry, Vite found them on the first page request, bundled
8398
+ // again, and reloaded the page while it loaded.
8399
+ "@farm.js/core/internal/client-runtime",
8400
+ "@farm.js/core/internal/spa-router",
8401
+ "@farm.js/core/router",
8402
+ // The typed API client. The development server excludes the server-only `@farm.js/core/api`,
8403
+ // and Vite's scan skips every subpath of an excluded package, so an app's import of the client
8404
+ // was also found only on the first request.
8405
+ "@farm.js/core/api/client",
8333
8406
  // Islands mode's browser runtime: Farm imports islx, which the app reaches only through Farm.
8334
8407
  "@farm.js/core > @farm.js/islx/client",
8335
8408
  "@farm.js/core > @farm.js/islx/react",
8336
- "@farm.js/core > @farm.js/islx/react/client"
8409
+ "@farm.js/core > @farm.js/islx/react/client",
8410
+ // What a browser module's import of a server function compiles to on other renderers (see
8411
+ // `resolveFarmIslxActionsMode`). Found only when that module is first requested, it made Vite
8412
+ // bundle again and reload the page while it loaded.
8413
+ "@farm.js/core/internal/islx-actions-client"
8337
8414
  ];
8338
- function getFarmClientOptimizeDepsInclude(renderer) {
8415
+ function isInstalledPackage(root, specifier) {
8416
+ const parts = specifier.split("/");
8417
+ const name = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
8418
+ const directory = findFarmAppPackageDir(root, name);
8419
+ return directory !== void 0 && directory.split(path18.sep).includes("node_modules");
8420
+ }
8421
+ function getFarmClientOptimizeDepsInclude(renderer, root) {
8339
8422
  return Array.from(
8340
- /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ...renderer?.optimizeDeps || []])
8423
+ /* @__PURE__ */ new Set([
8424
+ ...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE,
8425
+ ...renderer?.optimizeDeps || [],
8426
+ // Farm's browser entry imports a renderer's client module, and no app file does, so Vite's
8427
+ // scan never sees it and finds it only on the first page request, then bundles again. The
8428
+ // React entry imports `react-dom/client` instead, which is already listed. A linked
8429
+ // renderer stays source: pre-bundling it would copy the packages it shares with the app's
8430
+ // components into the bundle, so a hook would read a different copy than the renderer set.
8431
+ ...renderer && root && !isReactRenderer(renderer) && isPackageSpecifier(renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : []
8432
+ ])
8341
8433
  );
8342
8434
  }
8343
8435
  function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
@@ -8348,8 +8440,9 @@ function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
8348
8440
  return `${prefix}/${FARM_CLIENT_ENTRY_PATTERN}`;
8349
8441
  });
8350
8442
  }
8351
- function createFarmClientOptimizeDepsConfig(entries, renderer) {
8443
+ function createFarmClientOptimizeDepsConfig(entries, renderer, root) {
8352
8444
  if (isFarmRendererDisabled(renderer)) return { noDiscovery: true, include: [] };
8445
+ const jsxImportSource = renderer ? renderer.jsxImportSource : void 0;
8353
8446
  return {
8354
8447
  // Keep normal application dependency discovery for CJS-only packages, but
8355
8448
  // seed every Farm browser runtime so React is present in the first crawl.
@@ -8357,11 +8450,20 @@ function createFarmClientOptimizeDepsConfig(entries, renderer) {
8357
8450
  // Waiting for the crawl avoids serving a partial optimizer generation and
8358
8451
  // then changing browser hashes while hydration is already in progress.
8359
8452
  holdUntilCrawlEnd: true,
8360
- include: getFarmClientOptimizeDepsInclude(renderer || void 0),
8453
+ include: getFarmClientOptimizeDepsInclude(renderer || void 0, root),
8361
8454
  // Farm's HTML boots through a virtual module and imports route UI lazily.
8362
8455
  // Explicit entries let Vite finish that crawl before a navigation can
8363
8456
  // rotate the optimizer hash underneath a hydrated React runtime.
8364
- ...entries?.length ? { entries: [...entries] } : {}
8457
+ ...entries?.length ? { entries: [...entries] } : {},
8458
+ // Vite's dependency scan compiles JSX on its own: with the app tsconfig's `jsxImportSource`
8459
+ // when there is one, otherwise as React, whatever the renderer's plugin set for its own
8460
+ // transforms. React is the default already, and naming it here would override a tsconfig
8461
+ // source such as Emotion's. A renderer plugin's own scan setting is merged over this one.
8462
+ ...jsxImportSource && jsxImportSource !== "react" ? {
8463
+ rolldownOptions: {
8464
+ transform: { jsx: { runtime: "automatic", importSource: jsxImportSource } }
8465
+ }
8466
+ } : {}
8365
8467
  };
8366
8468
  }
8367
8469
  function createFarmSourceAlias(projectRoot, srcDir = "src") {
@@ -8562,8 +8664,11 @@ export {
8562
8664
  farmDevServerStylesheetsPlugin,
8563
8665
  resolveFarmNotFoundComponentPath,
8564
8666
  DEFAULT_NOT_FOUND_STYLES,
8667
+ isRendererCompiledComponent,
8565
8668
  generateFarmIntegrationProviderClientCode,
8566
8669
  generateFarmIntegrationProviderServerModules,
8670
+ resolveFarmIslxActionsMode,
8671
+ farmBrowserServerFnsEnabled,
8567
8672
  inferFarmIslandStrategy,
8568
8673
  invalidateFarmRouteRootInferences,
8569
8674
  resolveFarmRouteRootStrategy,
@@ -7,7 +7,7 @@ var _chunkO4JYMU5Ncjs = require('./chunk-O4JYMU5N.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkWHEQJN4Gcjs = require('./chunk-WHEQJN4G.cjs');
10
+ var _chunkUGD53SNOcjs = require('./chunk-UGD53SNO.cjs');
11
11
 
12
12
 
13
13
 
@@ -17,9 +17,6 @@ var _chunkJIBEFLQ7cjs = require('./chunk-JIBEFLQ7.cjs');
17
17
  var _chunk2PJVEL56cjs = require('./chunk-2PJVEL56.cjs');
18
18
 
19
19
 
20
- var _chunk3BIASUGRcjs = require('./chunk-3BIASUGR.cjs');
21
-
22
-
23
20
  var _chunkGYJT2U7Jcjs = require('./chunk-GYJT2U7J.cjs');
24
21
 
25
22
 
@@ -28,6 +25,9 @@ var _chunkGYJT2U7Jcjs = require('./chunk-GYJT2U7J.cjs');
28
25
 
29
26
  var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
30
27
 
28
+
29
+ var _chunk3BIASUGRcjs = require('./chunk-3BIASUGR.cjs');
30
+
31
31
  // src/client/router.ts
32
32
  var _react = require('react');
33
33
  function shouldBlockUnload(options) {
@@ -52,7 +52,7 @@ function shouldBlockUnload(options) {
52
52
  function navigateViaRouter(href, basePath, replace, options = {}) {
53
53
  if (typeof window === "undefined") return;
54
54
  const url = _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, href, basePath);
55
- const spaRouter = _chunkWHEQJN4Gcjs.getInstalledFarmSPARouter.call(void 0, );
55
+ const spaRouter = _chunkUGD53SNOcjs.getInstalledFarmSPARouter.call(void 0, );
56
56
  if (spaRouter) {
57
57
  void spaRouter.navigate(url, {
58
58
  replace,
@@ -72,7 +72,7 @@ function writeHistory(url, replace) {
72
72
  } else {
73
73
  window.history.pushState(null, "", url);
74
74
  }
75
- _chunkWHEQJN4Gcjs.notifyHistoryChange.call(void 0, "url-search");
75
+ _chunkUGD53SNOcjs.notifyHistoryChange.call(void 0, "url-search");
76
76
  }
77
77
  async function writeHistoryUnlessDelegated(url, replace) {
78
78
  const target = new URL(url, window.location.href);
@@ -105,7 +105,7 @@ function useRouter(options = {}) {
105
105
  setState(readRouterState(basePath, routeMatcher));
106
106
  };
107
107
  handlePopState();
108
- const unsubscribe = _chunkWHEQJN4Gcjs.subscribeHistoryChange.call(void 0, handlePopState);
108
+ const unsubscribe = _chunkUGD53SNOcjs.subscribeHistoryChange.call(void 0, handlePopState);
109
109
  return unsubscribe;
110
110
  }, [basePath, routeMatcher]);
111
111
  const push = (href, navigateOptions) => {
@@ -116,11 +116,11 @@ function useRouter(options = {}) {
116
116
  };
117
117
  const pushState = (pageState, href) => {
118
118
  if (typeof window === "undefined") return;
119
- _chunkWHEQJN4Gcjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
119
+ _chunkUGD53SNOcjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
120
120
  };
121
121
  const replaceState = (pageState, href) => {
122
122
  if (typeof window === "undefined") return;
123
- _chunkWHEQJN4Gcjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
123
+ _chunkUGD53SNOcjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
124
124
  };
125
125
  const back = () => {
126
126
  if (typeof window !== "undefined") {
@@ -143,24 +143,24 @@ function useRouter(options = {}) {
143
143
  };
144
144
  }
145
145
  function usePageState() {
146
- const [state, setState] = _react.useState.call(void 0, () => _chunkWHEQJN4Gcjs.readPageState.call(void 0, ));
146
+ const [state, setState] = _react.useState.call(void 0, () => _chunkUGD53SNOcjs.readPageState.call(void 0, ));
147
147
  _react.useEffect.call(void 0, () => {
148
148
  if (typeof window === "undefined") return;
149
149
  const handlePopState = () => {
150
- setState(_chunkWHEQJN4Gcjs.readPageState.call(void 0, ));
150
+ setState(_chunkUGD53SNOcjs.readPageState.call(void 0, ));
151
151
  };
152
152
  handlePopState();
153
- return _chunkWHEQJN4Gcjs.subscribeHistoryChange.call(void 0, handlePopState);
153
+ return _chunkUGD53SNOcjs.subscribeHistoryChange.call(void 0, handlePopState);
154
154
  }, []);
155
155
  return state;
156
156
  }
157
157
  function useNavigation() {
158
158
  const [state, setState] = _react.useState.call(void 0,
159
- () => _chunkWHEQJN4Gcjs.getRouter.call(void 0, ).getNavigationState()
159
+ () => _chunkUGD53SNOcjs.getRouter.call(void 0, ).getNavigationState()
160
160
  );
161
161
  _react.useEffect.call(void 0, () => {
162
162
  if (typeof window === "undefined") return;
163
- return _chunkWHEQJN4Gcjs.getRouter.call(void 0, ).subscribeNavigation(setState);
163
+ return _chunkUGD53SNOcjs.getRouter.call(void 0, ).subscribeNavigation(setState);
164
164
  }, []);
165
165
  return state;
166
166
  }
@@ -172,7 +172,7 @@ function useBlocker(options) {
172
172
  if (typeof window === "undefined" || !active) {
173
173
  return;
174
174
  }
175
- return _chunkWHEQJN4Gcjs.getRouter.call(void 0, ).addBlocker(
175
+ return _chunkUGD53SNOcjs.getRouter.call(void 0, ).addBlocker(
176
176
  async (context) => {
177
177
  const current = optionsRef.current;
178
178
  const when = typeof current.when === "function" ? current.when(context) : current.when;
@@ -195,7 +195,7 @@ function useScrollRestoration(key) {
195
195
  _react.useEffect.call(void 0, () => {
196
196
  const element = ref.current;
197
197
  if (!element) return;
198
- return _chunkWHEQJN4Gcjs.getRouter.call(void 0, ).registerScrollElement(key, element);
198
+ return _chunkUGD53SNOcjs.getRouter.call(void 0, ).registerScrollElement(key, element);
199
199
  }, [key]);
200
200
  return ref;
201
201
  }
@@ -216,7 +216,7 @@ function readRouterState(basePath, routeMatcher) {
216
216
  pathname,
217
217
  searchParams: url.searchParams,
218
218
  params: _optionalChain([routeMatcher, 'optionalAccess', _5 => _5.match, 'call', _6 => _6(routePathname), 'optionalAccess', _7 => _7.params]) || {},
219
- pageState: typeof window === "undefined" ? null : _chunkWHEQJN4Gcjs.readPageState.call(void 0, )
219
+ pageState: typeof window === "undefined" ? null : _chunkUGD53SNOcjs.readPageState.call(void 0, )
220
220
  };
221
221
  }
222
222
  function readCurrentUrl() {
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkCGIVCGH5cjs = require('./chunk-CGIVCGH5.cjs');
4
+ var _chunkXOFJUSWCcjs = require('./chunk-XOFJUSWC.cjs');
5
5
 
6
6
 
7
7
 
@@ -64,14 +64,14 @@ async function handleFarmNativeServerFnRequest(request, options, parsed) {
64
64
  return refuse(400, "invalid_body", "The input has a key that is not allowed.");
65
65
  }
66
66
  const fn = await options.resolve(call.id);
67
- if (fn === void 0 || _chunkCGIVCGH5cjs._describeServerFunction.call(void 0, fn) === void 0) {
67
+ if (fn === void 0 || _chunkXOFJUSWCcjs._describeServerFunction.call(void 0, fn) === void 0) {
68
68
  return refuse(
69
69
  404,
70
70
  "unknown_function",
71
71
  "No server function with this id is open to native screens."
72
72
  );
73
73
  }
74
- const outcome = await _chunkCGIVCGH5cjs._invokeServerFunction.call(void 0, fn, call.input, request);
74
+ const outcome = await _chunkXOFJUSWCcjs._invokeServerFunction.call(void 0, fn, call.input, request);
75
75
  if (outcome.ok) {
76
76
  try {
77
77
  return json(200, { data: _nullishCoalesce(outcome.data, () => ( null)) });