@farm.js/core 0.1.50 → 0.1.51-beta.1

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 (388) hide show
  1. package/README.md +163 -3
  2. package/dist/{agent-mcp-CIMH324y.d.mts → agent-mcp.d-BPzpKBHQ.d.mts} +1 -1
  3. package/dist/{agent-mcp-9BMbRgg_.d.ts → agent-mcp.d-ZuuNgrkQ.d.ts} +1 -1
  4. package/dist/agent-runtime.cjs +3 -3
  5. package/dist/agent-runtime.d.mts +13 -13
  6. package/dist/agent-runtime.d.ts +13 -13
  7. package/dist/agent-runtime.mjs +2 -2
  8. package/dist/{analyzer-CN7C74WX.cjs → analyzer-AZULAOPL.cjs} +2 -2
  9. package/dist/{analyzer-DDW34OMC.mjs → analyzer-V74FTD2F.mjs} +1 -1
  10. package/dist/api/client.d.mts +4 -4
  11. package/dist/api/client.d.ts +4 -4
  12. package/dist/api/route-manager.cjs +5 -5
  13. package/dist/api/route-manager.d.mts +19 -19
  14. package/dist/api/route-manager.d.ts +19 -19
  15. package/dist/api/route-manager.mjs +4 -4
  16. package/dist/api/runtime.d.mts +15 -15
  17. package/dist/api/runtime.d.ts +15 -15
  18. package/dist/{api-client-CvI5oOBE.d.ts → api-client.d-BWcqZciH.d.ts} +3 -3
  19. package/dist/{api-client-CFdv-Xgh.d.mts → api-client.d-CeA6tNA6.d.mts} +3 -3
  20. package/dist/api.cjs +7 -7
  21. package/dist/api.d.mts +21 -21
  22. package/dist/api.d.ts +21 -21
  23. package/dist/api.mjs +6 -6
  24. package/dist/{app-manifest-D0kaXdwu.d.ts → app-manifest.d-BJDcZn3W.d.mts} +1 -1
  25. package/dist/{app-manifest-CQDJOKL2.d.mts → app-manifest.d-HWhqbP2X.d.ts} +1 -1
  26. package/dist/app-markdown.d.mts +14 -14
  27. package/dist/app-markdown.d.ts +14 -14
  28. package/dist/{app-BWibTHVT.d.ts → app.d-B5EWdob-.d.ts} +12 -10
  29. package/dist/{app-DVJ13FPA.d.mts → app.d-DOGW1KI8.d.mts} +12 -10
  30. package/dist/base-path.d-BOUV5ozD.d.mts +10 -0
  31. package/dist/base-path.d-BOUV5ozD.d.ts +10 -0
  32. package/dist/{chunk-B5S2JS6M.cjs → chunk-2756SHCI.cjs} +372 -305
  33. package/dist/{chunk-RWT2BTJT.cjs → chunk-2IAPKPEB.cjs} +6 -6
  34. package/dist/{chunk-2G63BIRL.mjs → chunk-2KVDHNQS.mjs} +8 -11
  35. package/dist/{chunk-NJVFPJ2Y.cjs → chunk-3OWVWZ6R.cjs} +28 -2
  36. package/dist/{chunk-WVBUXNBX.mjs → chunk-5A5GAZ75.mjs} +296 -106
  37. package/dist/{chunk-GERUXONA.cjs → chunk-5A77OEIG.cjs} +4 -1
  38. package/dist/{chunk-4HBKBHVP.mjs → chunk-5ENW27SL.mjs} +1 -1
  39. package/dist/{chunk-FACTMUPI.cjs → chunk-5IONBVJY.cjs} +33 -22
  40. package/dist/{chunk-X2EL3BLH.cjs → chunk-5N7QAGEA.cjs} +36 -9
  41. package/dist/{chunk-DGOLAZLV.cjs → chunk-65Y5SIBH.cjs} +1 -1
  42. package/dist/{chunk-MTB57GOK.mjs → chunk-724WT3NI.mjs} +4 -2
  43. package/dist/{chunk-C73RIAEF.mjs → chunk-72NBDVWQ.mjs} +18 -7
  44. package/dist/{chunk-VCKGOXFI.cjs → chunk-76GHW3WI.cjs} +7 -1
  45. package/dist/{chunk-ZIBIE7AH.mjs → chunk-7UPCJDB5.mjs} +7 -1
  46. package/dist/{chunk-CPXDDWGL.mjs → chunk-AER5I65K.mjs} +1 -1
  47. package/dist/{chunk-RHOR2J6V.cjs → chunk-AGR7VJH2.cjs} +1 -1
  48. package/dist/{chunk-WB6XES4V.mjs → chunk-ALEUMLJN.mjs} +34 -5
  49. package/dist/{chunk-OD6WM3I7.mjs → chunk-AV26KHTG.mjs} +1 -1
  50. package/dist/{chunk-L6QDME5Z.cjs → chunk-B3GZAQSC.cjs} +3 -3
  51. package/dist/{chunk-ZLOQQ2UF.mjs → chunk-BSEKNTMS.mjs} +107 -40
  52. package/dist/{chunk-WAPQWAE6.cjs → chunk-CECUDGXQ.cjs} +9 -8
  53. package/dist/chunk-CKPTIEDX.cjs +12 -0
  54. package/dist/{chunk-IUQLRTTO.mjs → chunk-CO6UYM2D.mjs} +14 -1
  55. package/dist/{chunk-SHJJM6OG.mjs → chunk-CZ35L6PL.mjs} +9 -2
  56. package/dist/{chunk-EQMTJBB7.cjs → chunk-DZZHTMWM.cjs} +35 -6
  57. package/dist/{chunk-3ATXWZPH.cjs → chunk-E36C43IX.cjs} +13 -16
  58. package/dist/{chunk-J2ZEVDEK.cjs → chunk-EHB77D5U.cjs} +3 -3
  59. package/dist/{chunk-KO2NWUKN.mjs → chunk-EIMK7D2D.mjs} +33 -6
  60. package/dist/{chunk-CY7H5KS4.cjs → chunk-EKJYE4Y7.cjs} +2 -2
  61. package/dist/{chunk-2VCC3GVC.mjs → chunk-EOSFVNXZ.mjs} +1 -1
  62. package/dist/{chunk-IWJKJDNW.mjs → chunk-EWC76P5D.mjs} +53 -32
  63. package/dist/{chunk-WQGRD5BJ.cjs → chunk-EX6ZSN5P.cjs} +1 -16
  64. package/dist/{chunk-6QA2SXVH.cjs → chunk-FK25QSVC.cjs} +2 -1
  65. package/dist/{chunk-BW6SCVYX.mjs → chunk-FSQMN2MQ.mjs} +1 -0
  66. package/dist/{chunk-2H3FJYY6.mjs → chunk-FSXSQQTV.mjs} +3 -2
  67. package/dist/chunk-GNZIAJGB.mjs +358 -0
  68. package/dist/{chunk-TXK4D46O.mjs → chunk-H3ASZDT7.mjs} +21 -1
  69. package/dist/{chunk-B6PREBN6.cjs → chunk-HASX6DC7.cjs} +8 -8
  70. package/dist/{chunk-76R5GJER.mjs → chunk-I3EFXUAR.mjs} +60 -13
  71. package/dist/{chunk-HYN3LLG7.cjs → chunk-IFBINMI4.cjs} +3 -3
  72. package/dist/{chunk-CBJKDB6F.mjs → chunk-IRSS4HS4.mjs} +1 -1
  73. package/dist/{chunk-4T25YCZ5.cjs → chunk-JVBNKWLV.cjs} +81 -34
  74. package/dist/{chunk-VOZ5DI7D.mjs → chunk-JWI5PUO2.mjs} +6 -2
  75. package/dist/{chunk-YAXOEAND.cjs → chunk-KHXAJ2KA.cjs} +6 -6
  76. package/dist/{chunk-2DEPNLXK.mjs → chunk-KMB5BMFX.mjs} +122 -12
  77. package/dist/{chunk-M7LKA632.mjs → chunk-KU7MBLDZ.mjs} +1 -1
  78. package/dist/{chunk-WXHDVXJE.mjs → chunk-KY32FWK7.mjs} +2 -2
  79. package/dist/{chunk-EQWWOQTK.cjs → chunk-LEIXUFJN.cjs} +6 -2
  80. package/dist/{chunk-2GLQSIZD.mjs → chunk-LMFJCXDD.mjs} +1 -1
  81. package/dist/{chunk-IXSMFKZ2.cjs → chunk-LNM57D3H.cjs} +4 -4
  82. package/dist/{chunk-5V4KZOZO.mjs → chunk-LZ4SB57H.mjs} +2 -2
  83. package/dist/chunk-N4AQNEXR.cjs +17 -0
  84. package/dist/{chunk-J37KTQIA.cjs → chunk-NK2VWS7P.cjs} +52 -3
  85. package/dist/{chunk-X3HOVNHI.mjs → chunk-NN3MOPSI.mjs} +7 -7
  86. package/dist/{chunk-JZMZKABS.cjs → chunk-NWUHS6GV.cjs} +3 -2
  87. package/dist/{chunk-XLLVWLWO.mjs → chunk-PIHKO25G.mjs} +1 -1
  88. package/dist/chunk-PIUTGRDI.cjs +358 -0
  89. package/dist/{chunk-JJOWY3XD.mjs → chunk-QAIAFCRZ.mjs} +8 -6
  90. package/dist/{chunk-Q3UU2KXC.mjs → chunk-QMDU6QHN.mjs} +4 -1
  91. package/dist/{chunk-75WWOZ5C.mjs → chunk-QOSDWGKT.mjs} +1 -1
  92. package/dist/{chunk-GOOK2J2W.cjs → chunk-RMPNYUGT.cjs} +9 -7
  93. package/dist/{chunk-HWCHIBJZ.mjs → chunk-SCRC5AMM.mjs} +5 -5
  94. package/dist/{chunk-PXEXOQ5R.mjs → chunk-SHS6KXOZ.mjs} +1 -1
  95. package/dist/{chunk-ETF5C6HR.cjs → chunk-SJ23LJ3N.cjs} +3 -3
  96. package/dist/{chunk-JHXJBNLY.cjs → chunk-SUCDVKUB.cjs} +21 -1
  97. package/dist/{chunk-7ONZDKVY.mjs → chunk-T4EW7AAD.mjs} +2 -2
  98. package/dist/{chunk-F5LERVY3.cjs → chunk-TT66CP3P.cjs} +13 -13
  99. package/dist/{chunk-IUBDMDZZ.cjs → chunk-UQHIWZZ6.cjs} +15 -8
  100. package/dist/{chunk-LYWAGXXW.cjs → chunk-VITZRYW3.cjs} +131 -21
  101. package/dist/{chunk-XN2MB4QZ.cjs → chunk-VQJYGZNX.cjs} +4 -4
  102. package/dist/{chunk-KGP76FSV.mjs → chunk-VS7EHLLW.mjs} +1 -1
  103. package/dist/{chunk-5PKDHKQP.cjs → chunk-WFVSAT7Y.cjs} +6 -4
  104. package/dist/{chunk-UY6HS5PF.cjs → chunk-X2AMN2WV.cjs} +10 -10
  105. package/dist/{chunk-474FO3UE.cjs → chunk-X2M4XN4V.cjs} +213 -192
  106. package/dist/chunk-X3EFRVXY.mjs +12 -0
  107. package/dist/{chunk-UCQ52TJY.mjs → chunk-X3JNB2TB.mjs} +1 -1
  108. package/dist/{chunk-IQXGHGZF.cjs → chunk-XB24LZWI.cjs} +5 -5
  109. package/dist/{chunk-BNMHXVLL.mjs → chunk-XMHERKSE.mjs} +0 -15
  110. package/dist/{chunk-CGCJ2TJU.cjs → chunk-XPMC4E2G.cjs} +3 -3
  111. package/dist/{chunk-KZH6YLND.cjs → chunk-XY4DYGSU.cjs} +603 -413
  112. package/dist/{chunk-C7425KDG.cjs → chunk-XYL4HSVC.cjs} +2 -2
  113. package/dist/{chunk-HHFMECFO.mjs → chunk-Y2G5SJFB.mjs} +2 -1
  114. package/dist/{chunk-2SVJGOAX.mjs → chunk-Y3N5BFRJ.mjs} +3 -3
  115. package/dist/{chunk-Z5MZDFX4.cjs → chunk-YIHRZBD7.cjs} +14 -1
  116. package/dist/chunk-Z5A6CNV2.mjs +60 -0
  117. package/dist/chunk-Z64V4WZI.mjs +17 -0
  118. package/dist/{chunk-E2BMCNMJ.cjs → chunk-ZOWNWHK6.cjs} +2 -2
  119. package/dist/{chunk-C5JXCUKR.mjs → chunk-ZQ5BDNKW.mjs} +51 -2
  120. package/dist/client/lifecycle.d.mts +1 -1
  121. package/dist/client/lifecycle.d.ts +1 -1
  122. package/dist/{client-plugins-BPfltM5m.d.ts → client-plugins.d-C0n8Yhh-.d.ts} +60 -14
  123. package/dist/{client-plugins-D4RO59f0.d.mts → client-plugins.d-C_3CdALC.d.mts} +60 -14
  124. package/dist/client-plugins.d.mts +13 -13
  125. package/dist/client-plugins.d.ts +13 -13
  126. package/dist/client.cjs +5 -4
  127. package/dist/client.d.mts +24 -24
  128. package/dist/client.d.ts +24 -24
  129. package/dist/client.mjs +4 -3
  130. package/dist/config.d.mts +13 -13
  131. package/dist/config.d.ts +13 -13
  132. package/dist/cron.cjs +4 -4
  133. package/dist/cron.mjs +3 -3
  134. package/dist/desktop.d.mts +14 -14
  135. package/dist/desktop.d.ts +14 -14
  136. package/dist/{dev-guard-YLO5DE3H.cjs → dev-guard-2UW2KERP.cjs} +2 -2
  137. package/dist/{dev-guard-4PFQNXQX.mjs → dev-guard-ONNMVQUN.mjs} +1 -1
  138. package/dist/{devtools-STG7HPRV.mjs → devtools-BU5IT2PD.mjs} +8 -8
  139. package/dist/{devtools-N5XTOECL.cjs → devtools-KJFUE5FO.cjs} +10 -10
  140. package/dist/docs.cjs +14 -12
  141. package/dist/docs.d.mts +23 -15
  142. package/dist/docs.d.ts +23 -15
  143. package/dist/docs.mjs +13 -11
  144. package/dist/environment/vite.cjs +2 -2
  145. package/dist/environment/vite.d.mts +1 -1
  146. package/dist/environment/vite.d.ts +1 -1
  147. package/dist/environment/vite.mjs +1 -1
  148. package/dist/{generate-route-types-TF5Wwtvz.d.mts → generate-route-types.d-BL2pq6xC.d.ts} +1 -1
  149. package/dist/{generate-route-types-DQP0cUzk.d.ts → generate-route-types.d-BoVDU8qX.d.mts} +1 -1
  150. package/dist/i18n/client.d.mts +2 -2
  151. package/dist/i18n/client.d.ts +2 -2
  152. package/dist/i18n/index.d.mts +3 -3
  153. package/dist/i18n/index.d.ts +3 -3
  154. package/dist/i18n/server.d.mts +5 -5
  155. package/dist/i18n/server.d.ts +5 -5
  156. package/dist/image/server.d.mts +1 -1
  157. package/dist/image/server.d.ts +1 -1
  158. package/dist/image/sharp.d.mts +1 -1
  159. package/dist/image/sharp.d.ts +1 -1
  160. package/dist/image.d.mts +1 -1
  161. package/dist/image.d.ts +1 -1
  162. package/dist/index.cjs +48 -44
  163. package/dist/{index-C-N3Pwg-.d.ts → index.d-B6M_8kmo.d.ts} +2 -2
  164. package/dist/{index-D3l4tREW.d.ts → index.d-BNNDpql4.d.ts} +2 -2
  165. package/dist/{index-DPUAPho_.d.mts → index.d-BqcfqJvt.d.mts} +2 -2
  166. package/dist/{index-k8o8eUOd.d.mts → index.d-CsGxS-hZ.d.mts} +2 -2
  167. package/dist/index.d.mts +42 -42
  168. package/dist/index.d.ts +42 -42
  169. package/dist/index.mjs +47 -43
  170. package/dist/instrumentation.d.mts +2 -2
  171. package/dist/instrumentation.d.ts +2 -2
  172. package/dist/integrations.cjs +3 -3
  173. package/dist/integrations.d.mts +13 -13
  174. package/dist/integrations.d.ts +13 -13
  175. package/dist/integrations.mjs +2 -2
  176. package/dist/internal/app-markdown-runtime.d.mts +14 -14
  177. package/dist/internal/app-markdown-runtime.d.ts +14 -14
  178. package/dist/internal/build-runtime.cjs +36 -35
  179. package/dist/internal/build-runtime.d.mts +16 -16
  180. package/dist/internal/build-runtime.d.ts +16 -16
  181. package/dist/internal/build-runtime.mjs +35 -34
  182. package/dist/internal/cli-runtime.cjs +18 -18
  183. package/dist/internal/cli-runtime.mjs +17 -17
  184. package/dist/internal/client-error-overlay.cjs +4 -4
  185. package/dist/internal/client-error-overlay.mjs +1 -1
  186. package/dist/internal/client-runtime.cjs +4 -2
  187. package/dist/internal/client-runtime.d.mts +21 -21
  188. package/dist/internal/client-runtime.d.ts +21 -21
  189. package/dist/internal/client-runtime.mjs +3 -1
  190. package/dist/internal/compression-runtime.d.mts +13 -13
  191. package/dist/internal/compression-runtime.d.ts +13 -13
  192. package/dist/internal/config-runtime.cjs +10 -10
  193. package/dist/internal/config-runtime.d.mts +18 -18
  194. package/dist/internal/config-runtime.d.ts +18 -18
  195. package/dist/internal/config-runtime.mjs +9 -9
  196. package/dist/internal/form-actions.cjs +4 -3
  197. package/dist/internal/form-actions.d.mts +1 -1
  198. package/dist/internal/form-actions.d.ts +1 -1
  199. package/dist/internal/form-actions.mjs +3 -2
  200. package/dist/internal/infra-analytics-runtime.cjs +5 -5
  201. package/dist/internal/infra-analytics-runtime.mjs +3 -3
  202. package/dist/internal/island-value-store.d.mts +1 -1
  203. package/dist/internal/island-value-store.d.ts +1 -1
  204. package/dist/internal/islands-runtime.cjs +56 -0
  205. package/dist/internal/islands-runtime.d.mts +1 -1
  206. package/dist/internal/islands-runtime.d.ts +1 -1
  207. package/dist/internal/islands-runtime.mjs +57 -1
  208. package/dist/internal/isolated-boundary.d.mts +2 -2
  209. package/dist/internal/isolated-boundary.d.ts +2 -2
  210. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  211. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  212. package/dist/internal/production-runtime.cjs +15 -8
  213. package/dist/internal/production-runtime.d.mts +46 -30
  214. package/dist/internal/production-runtime.d.ts +46 -30
  215. package/dist/internal/production-runtime.mjs +14 -7
  216. package/dist/internal/server-fn-transform.cjs +13 -0
  217. package/dist/internal/server-fn-transform.d.mts +24 -0
  218. package/dist/internal/server-fn-transform.d.ts +24 -0
  219. package/dist/internal/server-fn-transform.mjs +13 -0
  220. package/dist/internal/server-tree.d.mts +1 -1
  221. package/dist/internal/server-tree.d.ts +1 -1
  222. package/dist/markdown.d.mts +13 -13
  223. package/dist/markdown.d.ts +13 -13
  224. package/dist/middleware.cjs +8 -8
  225. package/dist/middleware.d.mts +15 -15
  226. package/dist/middleware.d.ts +15 -15
  227. package/dist/middleware.mjs +7 -7
  228. package/dist/mobile.d.mts +37 -10
  229. package/dist/mobile.d.ts +37 -10
  230. package/dist/{navigation-delegate-8xg3Zvp4.d.ts → navigation-delegate.d-C0BbdUgN.d.mts} +1 -1
  231. package/dist/{navigation-delegate-ji6elCKy.d.mts → navigation-delegate.d-jArRF0ZP.d.ts} +1 -1
  232. package/dist/navigation.d.mts +17 -17
  233. package/dist/navigation.d.ts +17 -17
  234. package/dist/{nitro-YPSZBYDK.cjs → nitro-CK7M4RMY.cjs} +11 -11
  235. package/dist/{nitro-2Q5NVY7L.mjs → nitro-R444AF3O.mjs} +7 -7
  236. package/dist/observability.d.mts +1 -1
  237. package/dist/observability.d.ts +1 -1
  238. package/dist/plugin.cjs +29 -27
  239. package/dist/plugin.d.mts +17 -17
  240. package/dist/plugin.d.ts +17 -17
  241. package/dist/plugin.mjs +28 -26
  242. package/dist/{production-runtime-TdKaYRj0.d.ts → production-runtime.d-DFaQ1qaV.d.mts} +3 -3
  243. package/dist/{production-runtime-DXnQQkQf.d.mts → production-runtime.d-UnXmSS_S.d.ts} +3 -3
  244. package/dist/{programmatic-routes-client-Dh1SDLSM.d.mts → programmatic-routes-client.d-BIowUXQC.d.mts} +10 -2
  245. package/dist/{programmatic-routes-client-BwiTndEC.d.ts → programmatic-routes-client.d-VZ0qcbH4.d.ts} +10 -2
  246. package/dist/query/client.d.mts +1 -1
  247. package/dist/query/client.d.ts +1 -1
  248. package/dist/query/index.d.mts +1 -1
  249. package/dist/query/index.d.ts +1 -1
  250. package/dist/query/server.d.mts +1 -1
  251. package/dist/query/server.d.ts +1 -1
  252. package/dist/{render-plan-BPbwRbuN.d.ts → render-plan.d-BB6KrYjP.d.ts} +2 -2
  253. package/dist/{render-plan-BvCGXF6K.d.mts → render-plan.d-BNeqyPyJ.d.mts} +2 -2
  254. package/dist/renderer-client.cjs +8 -6
  255. package/dist/renderer-client.d.mts +19 -19
  256. package/dist/renderer-client.d.ts +19 -19
  257. package/dist/renderer-client.mjs +4 -2
  258. package/dist/{request-C_xTkJib.d.mts → request.d-BV1munmx.d.mts} +1 -1
  259. package/dist/{request-B8PGTZNR.d.ts → request.d-Bxhghm76.d.ts} +1 -1
  260. package/dist/request.d.mts +14 -14
  261. package/dist/request.d.ts +14 -14
  262. package/dist/{resolver-CJ-D9nP-.d.ts → resolver.d-BHyZgpa7.d.ts} +1 -1
  263. package/dist/{resolver-TDyZKgKI.d.mts → resolver.d-JnZKKsc5.d.mts} +1 -1
  264. package/dist/response.d-BolW0Vx_.d.mts +10 -0
  265. package/dist/response.d-BolW0Vx_.d.ts +10 -0
  266. package/dist/{route-rendering-DlddURL1.d.mts → route-rendering.d-BIf7zE9d.d.ts} +1 -1
  267. package/dist/{route-rendering-RNtcj607.d.ts → route-rendering.d-DShqKlgK.d.mts} +1 -1
  268. package/dist/{route-DFhZj6jN.d.ts → route.d-BaVH3V0w.d.mts} +1 -1
  269. package/dist/{route-2_yXC6gv.d.mts → route.d-DBTEqifW.d.ts} +1 -1
  270. package/dist/{router-B97eB0Mq.d.mts → router.d-BE7i84fb.d.mts} +1 -1
  271. package/dist/{router-qUVaoEN8.d.ts → router.d-Bw3K3b0a.d.ts} +1 -1
  272. package/dist/routes.cjs +3 -2
  273. package/dist/{routes-8PT9cl60.d.ts → routes.d-DVZQL0-H.d.ts} +3 -3
  274. package/dist/{routes-kEUsXHx3.d.mts → routes.d-_5tBQexL.d.mts} +3 -3
  275. package/dist/routes.d.mts +14 -14
  276. package/dist/routes.d.ts +14 -14
  277. package/dist/routes.mjs +2 -1
  278. package/dist/{rsc-pipeline-T3775JUA.mjs → rsc-pipeline-FBM6NFYY.mjs} +13 -13
  279. package/dist/{rsc-pipeline-L4XOZ2TE.cjs → rsc-pipeline-IQI5XQLS.cjs} +14 -14
  280. package/dist/{runtime-HRSFC4ZC.mjs → runtime-2JYIDUON.mjs} +14 -14
  281. package/dist/{runtime-BIBGJO7V.cjs → runtime-DXEVFYLE.cjs} +16 -16
  282. package/dist/{runtime-CihDZ2Rn.d.mts → runtime.d-3iJAKptR.d.mts} +2 -2
  283. package/dist/{runtime-C4CmlOOh.d.ts → runtime.d-BtL3PCL3.d.ts} +2 -2
  284. package/dist/{runtime-C8GUnNeP.d.ts → runtime.d-CQgoYR0Q.d.mts} +4 -4
  285. package/dist/{runtime-CaDswfWi.d.mts → runtime.d-CfhaLPl-.d.ts} +4 -4
  286. package/dist/{schema-dev-notice-LZ5NXGLN.mjs → schema-dev-notice-F6QYSOAI.mjs} +2 -2
  287. package/dist/{schema-dev-notice-XV7GZ3QJ.cjs → schema-dev-notice-UU7DMZEU.cjs} +3 -3
  288. package/dist/{search-client-BTXL5XWD.mjs → search-client-OXH6GBNO.mjs} +5 -3
  289. package/dist/search-client-ZZLKVO5R.cjs +15 -0
  290. package/dist/server-action-security.cjs +2 -2
  291. package/dist/server-action-security.d.mts +1 -1
  292. package/dist/server-action-security.d.ts +1 -1
  293. package/dist/server-action-security.mjs +1 -1
  294. package/dist/server-fn-client.d.mts +5 -5
  295. package/dist/server-fn-client.d.ts +5 -5
  296. package/dist/server-fn.cjs +3 -3
  297. package/dist/server-fn.d.mts +3 -3
  298. package/dist/server-fn.d.ts +3 -3
  299. package/dist/server-fn.mjs +2 -2
  300. package/dist/server-plugins.d.mts +14 -14
  301. package/dist/server-plugins.d.ts +14 -14
  302. package/dist/server-query-client.cjs +4 -3
  303. package/dist/server-query-client.d.mts +5 -5
  304. package/dist/server-query-client.d.ts +5 -5
  305. package/dist/server-query-client.mjs +3 -2
  306. package/dist/server-query.cjs +4 -4
  307. package/dist/server-query.d.mts +2 -2
  308. package/dist/server-query.d.ts +2 -2
  309. package/dist/server-query.mjs +3 -3
  310. package/dist/server.cjs +64 -62
  311. package/dist/server.d.mts +28 -29
  312. package/dist/server.d.ts +28 -29
  313. package/dist/server.mjs +38 -36
  314. package/dist/{spa-router-Dlv5ofg0.d.mts → spa-router.d-C5opIgXg.d.ts} +5 -5
  315. package/dist/{spa-router-qapSboKz.d.ts → spa-router.d-D63jb6nX.d.mts} +5 -5
  316. package/dist/storage.d.mts +2 -2
  317. package/dist/storage.d.ts +2 -2
  318. package/dist/testing.cjs +12 -11
  319. package/dist/testing.d.mts +14 -14
  320. package/dist/testing.d.ts +14 -14
  321. package/dist/testing.mjs +9 -8
  322. package/dist/theme/client.d.mts +1 -1
  323. package/dist/theme/client.d.ts +1 -1
  324. package/dist/theme/index.d.mts +2 -2
  325. package/dist/theme/index.d.ts +2 -2
  326. package/dist/theme/runtime.d.mts +1 -1
  327. package/dist/theme/runtime.d.ts +1 -1
  328. package/dist/theme/server.d.mts +1 -1
  329. package/dist/theme/server.d.ts +1 -1
  330. package/dist/{utils-DyvlSxFk.d.mts → utils.d-CO-U4OVZ.d.mts} +1 -1
  331. package/dist/{utils-A-cYF81u.d.ts → utils.d-CkpTqTsC.d.ts} +1 -1
  332. package/dist/version.cjs +2 -2
  333. package/dist/version.mjs +1 -1
  334. package/dist/vite.cjs +29 -27
  335. package/dist/vite.d.mts +20 -19
  336. package/dist/vite.d.ts +20 -19
  337. package/dist/vite.mjs +28 -26
  338. package/dist/workflows.cjs +4 -4
  339. package/dist/workflows.d.mts +1 -1
  340. package/dist/workflows.d.ts +1 -1
  341. package/dist/workflows.mjs +3 -3
  342. package/package.json +10 -5
  343. package/dist/base-path-leyrqXbX.d.mts +0 -19
  344. package/dist/base-path-leyrqXbX.d.ts +0 -19
  345. package/dist/chunk-OTOOJIUB.mjs +0 -34
  346. package/dist/search-client-QCYAL6AY.cjs +0 -13
  347. /package/dist/{chunk-recovery-lnQFzcQP.d.mts → chunk-recovery.d-lnQFzcQP.d.mts} +0 -0
  348. /package/dist/{chunk-recovery-lnQFzcQP.d.ts → chunk-recovery.d-lnQFzcQP.d.ts} +0 -0
  349. /package/dist/{client-cache-Deoqq-nM.d.ts → client-cache.d-Deoqq-nM.d.ts} +0 -0
  350. /package/dist/{client-cache-di_Nasxa.d.mts → client-cache.d-di_Nasxa.d.mts} +0 -0
  351. /package/dist/{config-CnhyvvmT.d.mts → config.d-CnhyvvmT.d.mts} +0 -0
  352. /package/dist/{config-CnhyvvmT.d.ts → config.d-CnhyvvmT.d.ts} +0 -0
  353. /package/dist/{endpoint-BgHn0lhl.d.ts → endpoint.d-BgHn0lhl.d.ts} +0 -0
  354. /package/dist/{endpoint-BkMSCRf6.d.mts → endpoint.d-BkMSCRf6.d.mts} +0 -0
  355. /package/dist/{image-config-CeDgNyX4.d.mts → image-config.d-CeDgNyX4.d.mts} +0 -0
  356. /package/dist/{image-config-CeDgNyX4.d.ts → image-config.d-CeDgNyX4.d.ts} +0 -0
  357. /package/dist/{instrumentation-runtime-CX9Zh-16.d.mts → instrumentation-runtime.d-CX9Zh-16.d.mts} +0 -0
  358. /package/dist/{instrumentation-runtime-CX9Zh-16.d.ts → instrumentation-runtime.d-CX9Zh-16.d.ts} +0 -0
  359. /package/dist/{island-value-protocol-BRayRghM.d.mts → island-value-protocol.d-BRayRghM.d.mts} +0 -0
  360. /package/dist/{island-value-protocol-BRayRghM.d.ts → island-value-protocol.d-BRayRghM.d.ts} +0 -0
  361. /package/dist/{island-CfGru1MO.d.mts → island.d-CfGru1MO.d.mts} +0 -0
  362. /package/dist/{island-CfGru1MO.d.ts → island.d-CfGru1MO.d.ts} +0 -0
  363. /package/dist/{layers-CcS42OGR.d.mts → layers.d-CcS42OGR.d.mts} +0 -0
  364. /package/dist/{layers-CcS42OGR.d.ts → layers.d-CcS42OGR.d.ts} +0 -0
  365. /package/dist/{lifecycle-C2aLBOwu.d.mts → lifecycle.d-C2aLBOwu.d.mts} +0 -0
  366. /package/dist/{lifecycle-C2aLBOwu.d.ts → lifecycle.d-C2aLBOwu.d.ts} +0 -0
  367. /package/dist/{observability-B2363jB6.d.mts → observability.d-B2363jB6.d.mts} +0 -0
  368. /package/dist/{observability-B2363jB6.d.ts → observability.d-B2363jB6.d.ts} +0 -0
  369. /package/dist/{params-BALtrRim.d.ts → params.d-BALtrRim.d.ts} +0 -0
  370. /package/dist/{params-ry-lxqmy.d.mts → params.d-ry-lxqmy.d.mts} +0 -0
  371. /package/dist/{production-vite-BQFAlG7n.d.mts → production-vite.d-BQFAlG7n.d.mts} +0 -0
  372. /package/dist/{production-vite-BQFAlG7n.d.ts → production-vite.d-BQFAlG7n.d.ts} +0 -0
  373. /package/dist/{route-pattern-CVsVbq5n.d.mts → route-pattern.d-CVsVbq5n.d.mts} +0 -0
  374. /package/dist/{route-pattern-CVsVbq5n.d.ts → route-pattern.d-CVsVbq5n.d.ts} +0 -0
  375. /package/dist/{server-client-bridge-DKWDl5NB.d.mts → server-client-bridge.d-DKWDl5NB.d.mts} +0 -0
  376. /package/dist/{server-client-bridge-DKWDl5NB.d.ts → server-client-bridge.d-DKWDl5NB.d.ts} +0 -0
  377. /package/dist/{server-fn-error-DrcH9cc1.d.mts → server-fn-error.d-DrcH9cc1.d.mts} +0 -0
  378. /package/dist/{server-fn-error-DrcH9cc1.d.ts → server-fn-error.d-DrcH9cc1.d.ts} +0 -0
  379. /package/dist/{server-query-runtime-DXRNhX_3.d.ts → server-query-runtime.d-DXRNhX_3.d.ts} +0 -0
  380. /package/dist/{server-query-runtime-aP52iuL5.d.mts → server-query-runtime.d-aP52iuL5.d.mts} +0 -0
  381. /package/dist/{types-BnIqOn9w.d.mts → types.d-BnIqOn9w.d.mts} +0 -0
  382. /package/dist/{types-BnIqOn9w.d.ts → types.d-BnIqOn9w.d.ts} +0 -0
  383. /package/dist/{types-C41ePjvP.d.mts → types.d-C41ePjvP.d.mts} +0 -0
  384. /package/dist/{types-C41ePjvP.d.ts → types.d-C41ePjvP.d.ts} +0 -0
  385. /package/dist/{types-DQnyD3VD.d.mts → types.d-DQnyD3VD.d.mts} +0 -0
  386. /package/dist/{types-DQnyD3VD.d.ts → types.d-DQnyD3VD.d.ts} +0 -0
  387. /package/dist/{workflows-CRMzQZ3k.d.mts → workflows.d-CRMzQZ3k.d.mts} +0 -0
  388. /package/dist/{workflows-CRMzQZ3k.d.ts → workflows.d-CRMzQZ3k.d.ts} +0 -0
@@ -2,7 +2,12 @@ import {
2
2
  createFarmReactRefreshPlugins,
3
3
  farmDesktopDevGuardPlugin,
4
4
  isFarmReactRefreshActive
5
- } from "./chunk-75WWOZ5C.mjs";
5
+ } from "./chunk-QOSDWGKT.mjs";
6
+ import {
7
+ createFarmServerFnBoundaryModule,
8
+ isFarmServerFnBoundaryId,
9
+ transformFarmServerFns
10
+ } from "./chunk-GNZIAJGB.mjs";
6
11
  import {
7
12
  createFarmImageHandler
8
13
  } from "./chunk-ANHZ6SUL.mjs";
@@ -32,20 +37,20 @@ import {
32
37
  resolveFarmIsolatedClientHydrationMode,
33
38
  resolveModuleSourcePath,
34
39
  stripUseClientDirective
35
- } from "./chunk-IWJKJDNW.mjs";
40
+ } from "./chunk-EWC76P5D.mjs";
36
41
  import {
37
42
  loadTailwindVitePlugin
38
- } from "./chunk-XLLVWLWO.mjs";
43
+ } from "./chunk-PIHKO25G.mjs";
39
44
  import {
40
45
  FARM_NODE_RESPONSE_END_PENDING
41
46
  } from "./chunk-GHNW564E.mjs";
42
- import {
43
- generateFarmTypeArtifacts,
44
- resolveRouteRenderingConfig
45
- } from "./chunk-SHJJM6OG.mjs";
46
47
  import {
47
48
  resolveFarmPlatform
48
49
  } from "./chunk-SMUW7UST.mjs";
50
+ import {
51
+ generateFarmTypeArtifacts,
52
+ resolveRouteRenderingConfig
53
+ } from "./chunk-CZ35L6PL.mjs";
49
54
  import {
50
55
  createFarmRouteRenderPlan,
51
56
  farmPathGuardCoversEndpoint,
@@ -56,7 +61,7 @@ import {
56
61
  parseFarmLayoutChainHeader,
57
62
  renderFarmLocaleAlternateLinks,
58
63
  stripRouteGroups
59
- } from "./chunk-ZIBIE7AH.mjs";
64
+ } from "./chunk-7UPCJDB5.mjs";
60
65
  import {
61
66
  isFarmPreviewDeploymentEnvironment
62
67
  } from "./chunk-CSLUBKGG.mjs";
@@ -74,7 +79,7 @@ import {
74
79
  resolveFarmMCPRouteLabel,
75
80
  resolveFarmMarkdownRouteLabel,
76
81
  setFarmRouteLabel
77
- } from "./chunk-JJOWY3XD.mjs";
82
+ } from "./chunk-QAIAFCRZ.mjs";
78
83
  import {
79
84
  FARM_DEFAULT_MCP_PATH
80
85
  } from "./chunk-KRRZJ77U.mjs";
@@ -82,10 +87,13 @@ import {
82
87
  resolveFarmLayoutFonts
83
88
  } from "./chunk-HZOMT5DY.mjs";
84
89
  import {
90
+ farmBrowserBuiltinsOptimizerPlugin,
85
91
  farmEnvironmentFunctionsPlugin,
86
92
  generateProgrammaticClientRouteModule,
87
- programmaticClientRouteKey
88
- } from "./chunk-C5JXCUKR.mjs";
93
+ loadFarmBrowserBuiltin,
94
+ programmaticClientRouteKey,
95
+ resolveFarmBrowserBuiltin
96
+ } from "./chunk-ZQ5BDNKW.mjs";
89
97
  import {
90
98
  createFarmMarkdownSourceResponse,
91
99
  isFarmMarkdownPageFile,
@@ -156,10 +164,10 @@ import {
156
164
  getIntegrationDocumentNavigationMatchers,
157
165
  getIntegrationProviders,
158
166
  matchIntegrationRoute
159
- } from "./chunk-HHFMECFO.mjs";
167
+ } from "./chunk-Y2G5SJFB.mjs";
160
168
  import {
161
169
  MiddlewareManager
162
- } from "./chunk-X3HOVNHI.mjs";
170
+ } from "./chunk-NN3MOPSI.mjs";
163
171
  import {
164
172
  _runWithMiddlewareContext,
165
173
  _runWithMiddlewareData
@@ -175,7 +183,7 @@ import {
175
183
  } from "./chunk-IYEY3JWJ.mjs";
176
184
  import {
177
185
  APIRouteManager
178
- } from "./chunk-WXHDVXJE.mjs";
186
+ } from "./chunk-KY32FWK7.mjs";
179
187
  import {
180
188
  getFarmI18nClientSnapshot
181
189
  } from "./chunk-CV6MFQ4Y.mjs";
@@ -210,18 +218,20 @@ import {
210
218
  logger,
211
219
  toPosixPath,
212
220
  toViteModuleId
213
- } from "./chunk-2SVJGOAX.mjs";
221
+ } from "./chunk-Y3N5BFRJ.mjs";
214
222
  import {
223
+ createFarmSearchParams,
215
224
  searchParamsToObject
216
- } from "./chunk-TXK4D46O.mjs";
225
+ } from "./chunk-H3ASZDT7.mjs";
217
226
  import {
218
227
  emitFarmEvent,
219
228
  runWithFarmRequestSpan
220
229
  } from "./chunk-2DA7CLY7.mjs";
221
230
  import {
222
231
  applyWebResponseHeaders,
232
+ fetchFarmExternalRewrite,
223
233
  sendWebResponse
224
- } from "./chunk-IUQLRTTO.mjs";
234
+ } from "./chunk-CO6UYM2D.mjs";
225
235
  import {
226
236
  createFarmNodeRequestAbortSignal,
227
237
  createFarmNodeRequestBodyStream,
@@ -234,7 +244,7 @@ import {
234
244
  } from "./chunk-LM2YOGDK.mjs";
235
245
  import {
236
246
  FARM_VERSION
237
- } from "./chunk-2VCC3GVC.mjs";
247
+ } from "./chunk-EOSFVNXZ.mjs";
238
248
  import {
239
249
  DEFAULT_FARM_API_BASE_PATH
240
250
  } from "./chunk-BLD5GVCG.mjs";
@@ -289,6 +299,7 @@ function transformFarmFormActionModule(options) {
289
299
 
290
300
  // src/vite.ts
291
301
  import { parseSync } from "vite";
302
+ import { isBuiltin } from "module";
292
303
 
293
304
  // src/dev-preview-guard.ts
294
305
  import { promises as fsp } from "fs";
@@ -589,7 +600,7 @@ function formatClientBoundaryWarning(id, findings) {
589
600
  }
590
601
  if (builtinImports.length > 0) {
591
602
  lines.push(
592
- `- import of ${builtinImports.join(", ")} \u2014 stubbed with an empty object in the browser. Move the import into server-only code.`
603
+ `- import of ${builtinImports.join(", ")} \u2014 stubbed in the browser, where exports without a Web API equivalent are undefined. Move the import into server-only code.`
593
604
  );
594
605
  }
595
606
  return lines.join("\n");
@@ -745,7 +756,7 @@ function loadFarmDocsDevRuntime() {
745
756
  return import("./docs.mjs");
746
757
  }
747
758
  function loadFarmDocsSearchDevRuntime() {
748
- return import("./search-client-BTXL5XWD.mjs");
759
+ return import("./search-client-OXH6GBNO.mjs");
749
760
  }
750
761
  function loadFarmOpenAPIDevRuntime() {
751
762
  return import("./manager-H5ZM3HAM.mjs");
@@ -754,7 +765,7 @@ function loadFarmWorkflowsDevRuntime() {
754
765
  return import("./workflows.mjs");
755
766
  }
756
767
  function loadFarmDevtoolsSnapshotRuntime() {
757
- return import("./devtools-STG7HPRV.mjs");
768
+ return import("./devtools-BU5IT2PD.mjs");
758
769
  }
759
770
  function loadFarmDevtoolsUIRuntime() {
760
771
  return import("./devtools-ui-CYBVFLPH.mjs");
@@ -794,11 +805,19 @@ function farmServerOnlyEntriesPlugin() {
794
805
  return {
795
806
  name: "farm:server-only-entries",
796
807
  enforce: "pre",
808
+ config() {
809
+ return {
810
+ optimizeDeps: { rolldownOptions: { plugins: [farmBrowserBuiltinsOptimizerPlugin()] } }
811
+ };
812
+ },
797
813
  configResolved(config) {
798
814
  root = config.root;
799
815
  },
800
816
  resolveId(id, importer, options) {
801
817
  if (id === FARM_PLATFORM_ENTRY) return options?.ssr ? null : FARM_PLATFORM_CLIENT_ID;
818
+ if (!options?.ssr && isBuiltin(id)) {
819
+ return resolveFarmBrowserBuiltin(this, id, importer, options);
820
+ }
802
821
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
803
822
  const importedBy = importer ? ` (imported by ${importer})` : "";
804
823
  if (!options?.ssr) {
@@ -815,7 +834,8 @@ function farmServerOnlyEntriesPlugin() {
815
834
  return null;
816
835
  },
817
836
  load(id) {
818
- return id === FARM_PLATFORM_CLIENT_ID ? createFarmPlatformClientModule() : null;
837
+ if (id === FARM_PLATFORM_CLIENT_ID) return createFarmPlatformClientModule();
838
+ return loadFarmBrowserBuiltin(id) ?? null;
819
839
  }
820
840
  };
821
841
  }
@@ -898,6 +918,17 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
898
918
  });
899
919
  };
900
920
  }
921
+ async function proxyFarmExternalRewrite(req, res, bodySizeLimit) {
922
+ const destination = req.url;
923
+ if (!destination || !/^https?:\/\//i.test(destination)) return false;
924
+ let request = createRequestFromNodeRequest(req, new URL(destination));
925
+ if (request.method !== "GET" && request.method !== "HEAD") {
926
+ const body = await readNodeRequestBody(req, bodySizeLimit);
927
+ request = new Request(request, { body: toRequestBody(body) });
928
+ }
929
+ await sendWebResponse(res, await fetchFarmExternalRewrite(request));
930
+ return true;
931
+ }
901
932
  function toRequestBody(body) {
902
933
  if (!body) return void 0;
903
934
  const copy = new Uint8Array(body.byteLength);
@@ -1187,10 +1218,12 @@ function rewriteEarlySsrRelativeImports(options) {
1187
1218
  const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
1188
1219
  const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
1189
1220
  const resolvedPath = path5.resolve(path5.dirname(cleanId), sourcePath);
1221
+ const moduleId = toViteModuleId(resolvedPath, options.root);
1222
+ const specifier = moduleId.startsWith("/@fs/") ? toPosixPath(resolvedPath) : moduleId;
1190
1223
  replacements.push({
1191
1224
  start: source.start,
1192
1225
  end: source.end,
1193
- code: JSON.stringify(`${toViteModuleId(resolvedPath, options.root)}${suffix}`)
1226
+ code: JSON.stringify(`${specifier}${suffix}`)
1194
1227
  });
1195
1228
  });
1196
1229
  if (replacements.length === 0) return null;
@@ -1375,6 +1408,10 @@ function farmPlugin(options = {}, initialPluginManager) {
1375
1408
  });
1376
1409
  let farmApp;
1377
1410
  let serverFnTransformActive = false;
1411
+ const islandsServerFns = () => {
1412
+ const config = farmApp?.getConfig() ?? options;
1413
+ return config.experimental?.serverActions === true && resolveFarmServerComponentsMode(config.experimental?.serverComponents) === "islands";
1414
+ };
1378
1415
  let reactRefreshActive = false;
1379
1416
  let server;
1380
1417
  let apiRouteManager;
@@ -1434,7 +1471,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1434
1471
  (plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
1435
1472
  );
1436
1473
  reactRefreshActive = isFarmReactRefreshActive(config);
1437
- if (options.experimental?.serverActions === true && !serverFnTransformActive) {
1474
+ if (options.experimental?.serverActions === true && !serverFnTransformActive && !islandsServerFns()) {
1438
1475
  logger.warn(
1439
1476
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
1440
1477
  );
@@ -2285,7 +2322,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2285
2322
  computed: docsResponse,
2286
2323
  label: resolveFarmDocsEngineRouteLabel(
2287
2324
  stripFarmBasePath(requestPathname, farmConfig.basePath),
2288
- { path: farmConfig.docs?.entry || "/docs" }
2325
+ {
2326
+ path: farmConfig.docs?.entry || "/docs",
2327
+ roots: farmConfig.docs?.roots?.map((root) => root.entry)
2328
+ }
2289
2329
  )
2290
2330
  }
2291
2331
  );
@@ -2543,9 +2583,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2543
2583
  const pathname2 = resolveFarmRequestURL(req, {
2544
2584
  trustProxy: currentServerConfig.trustProxy
2545
2585
  }).pathname;
2586
+ const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
2587
+ farmDocsAPIHandler && farmDocsDevRuntime?.isFarmDocsAPIRequest(requestPathname)
2588
+ );
2546
2589
  try {
2547
2590
  if (pm) {
2548
- if (hasMatchedApiRoute) {
2591
+ if (servesLocalApiRoute) {
2549
2592
  await pm.runHookParallelFiltered(
2550
2593
  "beforeRequest",
2551
2594
  (plugin) => plugin.name !== FARM_CONFIG_REWRITES_PLUGIN_NAME,
@@ -2556,7 +2599,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2556
2599
  await pm.runHookParallel("beforeRequest", req, res);
2557
2600
  }
2558
2601
  }
2559
- if (res.writableEnded) {
2602
+ if (res.writableEnded || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
2560
2603
  const duration2 = Date.now() - startTime2;
2561
2604
  logResponse(method2, urlPath2, res.statusCode || 200, duration2, "API");
2562
2605
  return;
@@ -2578,9 +2621,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2578
2621
  return;
2579
2622
  }
2580
2623
  const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
2581
- const hasExplicitAPIRoute = hasMatchedApiRoute || Boolean(apiRouteManager.matchRoute(pathname2));
2624
+ const routedPathname = resolveFarmRequestURL(req, {
2625
+ trustProxy: currentServerConfig.trustProxy
2626
+ }).pathname;
2627
+ const rewritten = routedPathname !== pathname2;
2628
+ const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
2629
+ const hasExplicitAPIRoute = Boolean(routedApiRoute);
2582
2630
  if (apiHandler && hasExplicitAPIRoute) {
2583
- const apiRoutePattern = matchedApiRoute?.route.path || apiRouteManager.matchRoute(pathname2)?.route.path || urlPath2;
2631
+ const apiRoutePattern = routedApiRoute?.route.path || urlPath2;
2584
2632
  emitFarmEvent({
2585
2633
  type: "route.matched",
2586
2634
  pathname: pathname2,
@@ -2711,7 +2759,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2711
2759
  route: setFarmRouteLabel(
2712
2760
  { pathname: pathname2, pattern: apiLifecyclePayload.routePath },
2713
2761
  resolveFarmDocsRouteLabel(pathname2, {
2714
- path: farmConfig.docs?.entry || "/docs"
2762
+ path: farmConfig.docs?.entry || "/docs",
2763
+ roots: farmConfig.docs?.roots?.map((root) => root.entry)
2715
2764
  })
2716
2765
  )
2717
2766
  }) : await invokeDocsAPIHandler(request);
@@ -2872,7 +2921,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2872
2921
  props: withFarmRouteContext(
2873
2922
  {
2874
2923
  params,
2875
- searchParams: Promise.resolve(searchParams),
2924
+ searchParams: createFarmSearchParams(searchParams),
2876
2925
  path: targetUrl.pathname,
2877
2926
  middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
2878
2927
  },
@@ -2921,7 +2970,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2921
2970
  props: withFarmRouteContext(
2922
2971
  {
2923
2972
  params: slot.params,
2924
- searchParams: Promise.resolve(searchParams),
2973
+ searchParams: createFarmSearchParams(searchParams),
2925
2974
  path: targetUrl.pathname
2926
2975
  },
2927
2976
  slotContext
@@ -3229,7 +3278,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3229
3278
  }
3230
3279
  }
3231
3280
  }
3232
- if (res.writableEnded || responseInterceptor?.isEnded()) {
3281
+ if (res.writableEnded || responseInterceptor?.isEnded() || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
3233
3282
  if (!responseInterceptor?.isEnded()) {
3234
3283
  const duration = Date.now() - startTime;
3235
3284
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
@@ -3279,6 +3328,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3279
3328
  }
3280
3329
  },
3281
3330
  async load(id, loadOptions) {
3331
+ if (isFarmServerFnBoundaryId(id) && islandsServerFns()) {
3332
+ const file = id.split("?", 1)[0];
3333
+ this.addWatchFile(file);
3334
+ const source = await fs2.promises.readFile(file, "utf8");
3335
+ return createFarmServerFnBoundaryModule(source, file) ?? "export {};\n";
3336
+ }
3282
3337
  if (typeof fontImports.load === "function") {
3283
3338
  const fontModule = await fontImports.load.call(this, id);
3284
3339
  if (fontModule) return fontModule;
@@ -3432,6 +3487,15 @@ export const manifest = getManifest();
3432
3487
  },
3433
3488
  async transform(code, id, transformOptions) {
3434
3489
  const actionConfig = farmApp?.getConfig() ?? options;
3490
+ if (islandsServerFns() && !isFarmServerFnBoundaryId(id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3491
+ const serverFns = transformFarmServerFns(code, id, {
3492
+ environment: transformOptions?.ssr === true ? "rsc" : "client"
3493
+ });
3494
+ if (serverFns) {
3495
+ if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
3496
+ code = serverFns.code;
3497
+ }
3498
+ }
3435
3499
  if (resolveFarmServerComponentsMode(actionConfig.experimental?.serverComponents) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3436
3500
  const file = id.split("?", 1)[0];
3437
3501
  const actionModule = transformFarmFormActionModule({
@@ -3453,7 +3517,7 @@ export const manifest = getManifest();
3453
3517
  }
3454
3518
  if (!transformOptions?.ssr) {
3455
3519
  const currentConfig = farmApp?.getConfig() ?? options;
3456
- if (currentConfig.experimental?.serverActions !== true || !serverFnTransformActive) {
3520
+ if ((currentConfig.experimental?.serverActions !== true || !serverFnTransformActive) && !islandsServerFns()) {
3457
3521
  const violation = findClientServerFnViolation(code, id);
3458
3522
  if (violation) {
3459
3523
  this.error(formatServerFnBoundaryError(violation, id));
@@ -3617,7 +3681,7 @@ if (import.meta.hot) {
3617
3681
  const PageComponent = mod.default;
3618
3682
  const pageProps = {
3619
3683
  params: page.params,
3620
- searchParams: Promise.resolve({}),
3684
+ searchParams: createFarmSearchParams({}),
3621
3685
  path: page.urlPath
3622
3686
  };
3623
3687
  let pageElement = React.createElement(
@@ -4206,7 +4270,7 @@ async function parseRouteModuleProps(routeModule, input) {
4206
4270
  ...input.props,
4207
4271
  params,
4208
4272
  search,
4209
- searchParams: Promise.resolve(search)
4273
+ searchParams: createFarmSearchParams(search)
4210
4274
  };
4211
4275
  }
4212
4276
  function parseRouteModuleSchema(schema, value, label, routePath) {
@@ -4294,7 +4358,7 @@ ${isolatedHydrationImport}
4294
4358
  import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
4295
4359
  import { createClientPluginManager } from '@farm.js/core/plugin/client'
4296
4360
  import { isFarmRouteActive } from '@farm.js/core/router'
4297
- import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
4361
+ import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
4298
4362
  import { reviveDeferredData } from '@farm.js/core/deferred'
4299
4363
  import {
4300
4364
  createFarmDeploymentMismatchError,
@@ -5119,7 +5183,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
5119
5183
  window.__FARM_PROPS__ = revivedProps;
5120
5184
  return {
5121
5185
  ...revivedProps,
5122
- searchParams: Promise.resolve(revivedProps.search ?? revivedProps.searchParams ?? {}),
5186
+ searchParams: createFarmSearchParams(revivedProps.search ?? revivedProps.searchParams ?? {}),
5123
5187
  path: revivedProps.path || path,
5124
5188
  };
5125
5189
  }
@@ -5128,7 +5192,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
5128
5192
  const rawProps = {
5129
5193
  ...(existingProps || {}),
5130
5194
  params,
5131
- searchParams: Promise.resolve(searchParams),
5195
+ searchParams: createFarmSearchParams(searchParams),
5132
5196
  path,
5133
5197
  };
5134
5198
  // Keep top-level route errors inside the router's navigation transaction.
@@ -5678,7 +5742,10 @@ function farmIslandsOnlyDocument() {
5678
5742
  const rootContainer = document.getElementById('root')
5679
5743
 
5680
5744
  if (!rootContainer) {
5681
- console.error('[Farm.js] Root container not found')
5745
+ // A document Farm did not render as a page (the docs renderer's) has nothing to hydrate.
5746
+ if (window.__FARM_PAGE_MODULE__ !== undefined) {
5747
+ console.error('[Farm.js] Root container not found')
5748
+ }
5682
5749
  return
5683
5750
  }
5684
5751
 
@@ -19,7 +19,7 @@ var _chunkITV4QQL2cjs = require('./chunk-ITV4QQL2.cjs');
19
19
 
20
20
 
21
21
 
22
- var _chunkZ5MZDFX4cjs = require('./chunk-Z5MZDFX4.cjs');
22
+ var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
23
23
 
24
24
 
25
25
 
@@ -776,6 +776,7 @@ function createIntegrationPlugin(integrationKey, integration) {
776
776
  }
777
777
  },
778
778
  async beforeRequest(req, res, context) {
779
+ if (req.url && !req.url.startsWith("/")) return;
779
780
  const fullUrl = `http://${req.headers.host || "localhost"}${req.url || "/"}`;
780
781
  const url = new URL(fullUrl);
781
782
  const pathname = url.pathname;
@@ -806,7 +807,7 @@ function createIntegrationPlugin(integrationKey, integration) {
806
807
  } catch (error) {
807
808
  const response = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
808
809
  if (!response) throw error;
809
- await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, response);
810
+ await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
810
811
  return null;
811
812
  }
812
813
  };
@@ -854,10 +855,10 @@ function createIntegrationPlugin(integrationKey, integration) {
854
855
  for (const cookie of forwardedCookies) {
855
856
  setCookieHeaders.append("set-cookie", cookie);
856
857
  }
857
- _chunkZ5MZDFX4cjs.applyWebResponseHeaders.call(void 0, res, setCookieHeaders, { appendSetCookie: true });
858
+ _chunkYIHRZBD7cjs.applyWebResponseHeaders.call(void 0, res, setCookieHeaders, { appendSetCookie: true });
858
859
  }
859
860
  if (response) {
860
- await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, response);
861
+ await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
861
862
  await emitIntegrationLog(integration, {
862
863
  category: integration.category,
863
864
  slot: integration.category,
@@ -950,7 +951,7 @@ function createIntegrationPlugin(integrationKey, integration) {
950
951
  try {
951
952
  const validation = await validateIntegrationRouteInput(route, request, url);
952
953
  if (!validation.success) {
953
- await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, validation.response);
954
+ await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, validation.response);
954
955
  await emitIntegrationLog(integration, {
955
956
  category: integration.category,
956
957
  slot: integration.category,
@@ -973,7 +974,7 @@ function createIntegrationPlugin(integrationKey, integration) {
973
974
  for (const middlewareEntry of route.middleware || []) {
974
975
  const middlewareResponse = await middlewareEntry.handler(request, handlerContext);
975
976
  if (middlewareResponse) {
976
- await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, middlewareResponse);
977
+ await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, middlewareResponse);
977
978
  await emitIntegrationLog(integration, {
978
979
  category: integration.category,
979
980
  slot: integration.category,
@@ -1005,7 +1006,7 @@ function createIntegrationPlugin(integrationKey, integration) {
1005
1006
  handlerContext,
1006
1007
  beforeResponse
1007
1008
  );
1008
- await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, response2);
1009
+ await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response2);
1009
1010
  await emitIntegrationLog(integration, {
1010
1011
  category: integration.category,
1011
1012
  slot: integration.category,
@@ -1031,7 +1032,7 @@ function createIntegrationPlugin(integrationKey, integration) {
1031
1032
  handlerContext,
1032
1033
  handlerResponse
1033
1034
  );
1034
- await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, response);
1035
+ await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
1035
1036
  await emitIntegrationLog(integration, {
1036
1037
  category: integration.category,
1037
1038
  slot: integration.category,
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/islands-action-protocol.ts
2
+ var FARM_ACTION_RESULT_KEY = "__farmAction";
3
+ function isFarmIslandsActionResult(value) {
4
+ if (!value || typeof value !== "object") return false;
5
+ const meta = value[FARM_ACTION_RESULT_KEY];
6
+ return !!meta && typeof meta === "object" && Array.isArray(meta.invalidations);
7
+ }
8
+
9
+
10
+
11
+
12
+ exports.FARM_ACTION_RESULT_KEY = FARM_ACTION_RESULT_KEY; exports.isFarmIslandsActionResult = isFarmIslandsActionResult;
@@ -152,8 +152,21 @@ async function sendWebResponse(res, response) {
152
152
  }
153
153
  }
154
154
  }
155
+ async function fetchFarmExternalRewrite(request) {
156
+ const response = await fetch(request);
157
+ if (!response.headers.has("content-encoding")) return response;
158
+ const headers = new Headers(response.headers);
159
+ headers.delete("content-encoding");
160
+ headers.delete("content-length");
161
+ return new Response(response.body, {
162
+ status: response.status,
163
+ statusText: response.statusText,
164
+ headers
165
+ });
166
+ }
155
167
 
156
168
  export {
157
169
  applyWebResponseHeaders,
158
- sendWebResponse
170
+ sendWebResponse,
171
+ fetchFarmExternalRewrite
159
172
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRouteTypeDeclarations,
3
3
  generateRouteTypes
4
- } from "./chunk-2G63BIRL.mjs";
4
+ } from "./chunk-2KVDHNQS.mjs";
5
5
  import {
6
6
  readSchemaTables
7
7
  } from "./chunk-2DLGV2ZG.mjs";
@@ -407,6 +407,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
407
407
  const ssgPages = [];
408
408
  const ssrRoutes = [];
409
409
  const staticCandidateRoutes = [];
410
+ let staticCandidateDocsPages = 0;
410
411
  for (const route of routes) {
411
412
  try {
412
413
  const mod = await loadModule(route.filePath);
@@ -453,7 +454,8 @@ async function collectSSGPages(routes, loadModule, options = {}) {
453
454
  } else {
454
455
  ssrRoutes.push(route.path);
455
456
  if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(mod, source, { isDynamic: route.isDynamic }).candidate) {
456
- staticCandidateRoutes.push(route.path);
457
+ if (options.docsAdapterRoutes?.owns(route.path)) staticCandidateDocsPages += 1;
458
+ else staticCandidateRoutes.push(route.path);
457
459
  }
458
460
  }
459
461
  } catch (error) {
@@ -472,6 +474,11 @@ async function collectSSGPages(routes, loadModule, options = {}) {
472
474
  Add \`export const dynamic = "force-static";\` after verifying that imported code does not read cookies, headers, authentication, or other request data.`
473
475
  );
474
476
  }
477
+ if (staticCandidateDocsPages > 0 && !options.docsAdapterRoutes?.prerender) {
478
+ console.warn(
479
+ `[Farm.js] ${staticCandidateDocsPages} docs page${staticCandidateDocsPages === 1 ? " renders" : "s render"} on each request. Set \`docs.prerender: true\` in farm.config.ts to prerender docs pages on Node and serverless targets.`
480
+ );
481
+ }
475
482
  return { ssg: ssgPages, ssr: ssrRoutes };
476
483
  }
477
484
  function isSSGModule(mod) {
@@ -18,10 +18,17 @@ function resolveFarmDocsSearchClientModule(root) {
18
18
  }
19
19
  return void 0;
20
20
  }
21
+ function resolveFarmDocsSearchFrameworkModule(searchModule) {
22
+ try {
23
+ return _module.createRequire.call(void 0, searchModule).resolve("fumadocs-core/framework");
24
+ } catch (e2) {
25
+ return void 0;
26
+ }
27
+ }
21
28
  function generateFarmDocsSearchBootstrapRuntime() {
22
29
  return `(()=>{if(window.__farmDocsSearchBootstrap)return;window.__farmDocsSearchBootstrap=true;const queue=(trigger,event)=>{if(window.__FARM_DOCS_SEARCH_BRIDGE_ACTIVE__)return;event.preventDefault();event.stopPropagation();event.stopImmediatePropagation();window.__FARM_DOCS_SEARCH_PENDING__=trigger;window.__FARM_MOUNT_DOCS_SEARCH__?.()};document.addEventListener("click",(event)=>{const target=event.target instanceof Element?event.target.closest("[data-search-full]"):null;if(target)queue("button",event)},true);document.addEventListener("keydown",(event)=>{if((event.metaKey||event.ctrlKey)&&event.key.toLowerCase()==="k")queue("keyboard",event)},true)})();`;
23
30
  }
24
- function generateFarmDocsSearchClientRuntime(enabled, moduleId) {
31
+ function generateFarmDocsSearchClientRuntime(enabled, moduleId, frameworkModuleId = moduleId ? resolveFarmDocsSearchFrameworkModule(moduleId) : void 0) {
25
32
  if (!enabled || !moduleId) {
26
33
  return `
27
34
  function isFarmDocsSearchPage() {
@@ -71,7 +78,21 @@ function replayFarmDocsSearchOpen() {
71
78
  });
72
79
  }
73
80
 
74
- function FarmDocsSearchBridge({ component, api }) {
81
+ const farmDocsSearchRouter = {
82
+ push(url) {
83
+ window.location.assign(url);
84
+ },
85
+ refresh() {
86
+ window.location.reload();
87
+ },
88
+ };
89
+ const farmDocsSearchFramework = {
90
+ usePathname: () => window.location.pathname,
91
+ useParams: () => ({}),
92
+ useRouter: () => farmDocsSearchRouter,
93
+ };
94
+
95
+ function FarmDocsSearchBridge({ component, api, FrameworkProvider }) {
75
96
  React.useEffect(() => {
76
97
  farmDocsSearchReady = true;
77
98
  replayFarmDocsSearchOpen();
@@ -80,7 +101,10 @@ function FarmDocsSearchBridge({ component, api }) {
80
101
  };
81
102
  }, []);
82
103
 
83
- return React.createElement(component, { api });
104
+ const search = React.createElement(component, { api });
105
+ return FrameworkProvider
106
+ ? React.createElement(FrameworkProvider, farmDocsSearchFramework, search)
107
+ : search;
84
108
  }
85
109
 
86
110
  function queueFarmDocsSearchOpen(trigger, event) {
@@ -122,8 +146,11 @@ async function mountFarmDocsSearch() {
122
146
  if (farmDocsSearchContainer === container && farmDocsSearchRoot) return true;
123
147
 
124
148
  try {
125
- farmDocsSearchModulePromise ||= import(${JSON.stringify(moduleId)});
126
- const { DocsCommandSearch } = await farmDocsSearchModulePromise;
149
+ farmDocsSearchModulePromise ||= Promise.all([
150
+ import(${JSON.stringify(moduleId)}),
151
+ ${frameworkModuleId ? `import(${JSON.stringify(frameworkModuleId)})` : "null"},
152
+ ]);
153
+ const [{ DocsCommandSearch }, framework] = await farmDocsSearchModulePromise;
127
154
  if (!container.isConnected) return false;
128
155
 
129
156
  if (farmDocsSearchRoot) {
@@ -139,6 +166,7 @@ async function mountFarmDocsSearch() {
139
166
  React.createElement(FarmDocsSearchBridge, {
140
167
  component: DocsCommandSearch,
141
168
  api: container.dataset.api || '/api/docs',
169
+ FrameworkProvider: framework?.FrameworkProvider,
142
170
  }),
143
171
  );
144
172
  return true;
@@ -158,4 +186,5 @@ window.__FARM_MOUNT_DOCS_SEARCH__ = mountFarmDocsSearch;
158
186
 
159
187
 
160
188
 
161
- exports.isFarmDocsSearchEnabled = isFarmDocsSearchEnabled; exports.resolveFarmDocsSearchClientModule = resolveFarmDocsSearchClientModule; exports.generateFarmDocsSearchBootstrapRuntime = generateFarmDocsSearchBootstrapRuntime; exports.generateFarmDocsSearchClientRuntime = generateFarmDocsSearchClientRuntime;
189
+
190
+ exports.isFarmDocsSearchEnabled = isFarmDocsSearchEnabled; exports.resolveFarmDocsSearchClientModule = resolveFarmDocsSearchClientModule; exports.resolveFarmDocsSearchFrameworkModule = resolveFarmDocsSearchFrameworkModule; exports.generateFarmDocsSearchBootstrapRuntime = generateFarmDocsSearchBootstrapRuntime; exports.generateFarmDocsSearchClientRuntime = generateFarmDocsSearchClientRuntime;