@farm.js/core 0.1.35 → 0.1.37

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 (285) hide show
  1. package/dist/{metadata-BnLDsUOS.d.ts → agent-mcp-BC0bAGVF.d.mts} +45 -2
  2. package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
  3. package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
  4. package/dist/{metadata-WGpBYcGn.d.mts → agent-mcp-jyDHbQKe.d.ts} +45 -2
  5. package/dist/agent-runtime.cjs +6 -4
  6. package/dist/agent-runtime.d.mts +1 -1
  7. package/dist/agent-runtime.d.ts +1 -1
  8. package/dist/agent-runtime.mjs +5 -3
  9. package/dist/api/client.cjs +3 -3
  10. package/dist/api/client.mjs +2 -2
  11. package/dist/api/route-manager.cjs +9 -9
  12. package/dist/api/route-manager.d.mts +10 -4
  13. package/dist/api/route-manager.d.ts +10 -4
  14. package/dist/api/route-manager.mjs +8 -8
  15. package/dist/api/runtime.cjs +6 -6
  16. package/dist/api/runtime.d.mts +4 -62
  17. package/dist/api/runtime.d.ts +4 -62
  18. package/dist/api/runtime.mjs +5 -5
  19. package/dist/api.cjs +13 -12
  20. package/dist/api.d.mts +3 -3
  21. package/dist/api.d.ts +3 -3
  22. package/dist/api.mjs +12 -11
  23. package/dist/{app-BXB3JZYc.d.ts → app-CKO3iN1c.d.ts} +17 -3
  24. package/dist/{app-D_j9AAVL.d.mts → app-Cbkj9ufe.d.mts} +17 -3
  25. package/dist/app-markdown.cjs +6 -4
  26. package/dist/app-markdown.d.mts +3 -3
  27. package/dist/app-markdown.d.ts +3 -3
  28. package/dist/app-markdown.mjs +5 -3
  29. package/dist/{chunk-F7JZENPF.cjs → chunk-3A4KGQYI.cjs} +38 -30
  30. package/dist/{chunk-4MMGO7YW.cjs → chunk-3IP27TCG.cjs} +43 -32
  31. package/dist/{chunk-FDR64H6B.mjs → chunk-3KGDJLJK.mjs} +41 -2
  32. package/dist/{chunk-UJD4PHYB.mjs → chunk-4E5WBPEG.mjs} +72 -354
  33. package/dist/{chunk-KXWRO25S.cjs → chunk-4GPOC4LN.cjs} +3 -3
  34. package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
  35. package/dist/{chunk-4KU5Q7C2.mjs → chunk-4P6ULFMD.mjs} +253 -67
  36. package/dist/chunk-4WQ6PGSJ.cjs +367 -0
  37. package/dist/{chunk-SMHH4VDG.mjs → chunk-4WVJLURN.mjs} +1 -1
  38. package/dist/{chunk-2F2ER724.cjs → chunk-5BXGGEC7.cjs} +27 -22
  39. package/dist/{chunk-3BHT4WMP.cjs → chunk-5D2JIPLH.cjs} +8 -8
  40. package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
  41. package/dist/{chunk-GFHLGIYC.cjs → chunk-6LGFV2CQ.cjs} +8 -8
  42. package/dist/chunk-6SJ2KJTA.mjs +314 -0
  43. package/dist/{chunk-PFQKNERH.cjs → chunk-6TJITR2B.cjs} +457 -218
  44. package/dist/{chunk-73MC7ZL6.cjs → chunk-75X755YZ.cjs} +2 -2
  45. package/dist/{chunk-3UH7MRCP.cjs → chunk-7DWNJI73.cjs} +13 -13
  46. package/dist/{chunk-7L5V3KQO.cjs → chunk-7O5M4UKW.cjs} +2 -2
  47. package/dist/{chunk-BJPBQNIE.cjs → chunk-7SQ5SGYZ.cjs} +2 -2
  48. package/dist/{chunk-27ZWSI3W.cjs → chunk-ADOAUDQ6.cjs} +2 -2
  49. package/dist/{chunk-CP6X4AEU.mjs → chunk-AJQTP4OO.mjs} +1 -1
  50. package/dist/{chunk-YKX5BK66.cjs → chunk-ATWHHSY2.cjs} +7 -7
  51. package/dist/{chunk-EFCQPQMG.cjs → chunk-B5PFZLKV.cjs} +89 -8
  52. package/dist/{chunk-FNO7A7CM.cjs → chunk-BHY547NB.cjs} +34 -16
  53. package/dist/{chunk-JHWOVJ3M.mjs → chunk-BUGNQIHC.mjs} +5 -0
  54. package/dist/{chunk-7GLPRTTF.cjs → chunk-CGBDNNSM.cjs} +2 -2
  55. package/dist/chunk-CI6E3UOH.cjs +314 -0
  56. package/dist/{chunk-2G2NNLE2.mjs → chunk-CQMVIOYP.mjs} +5 -5
  57. package/dist/{chunk-X6W5FFH6.cjs → chunk-CVH2BXPY.cjs} +8 -8
  58. package/dist/{chunk-TKSCR644.cjs → chunk-D3C5LBQY.cjs} +2 -2
  59. package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
  60. package/dist/chunk-DTSROJ5J.mjs +367 -0
  61. package/dist/{chunk-DBNKI4NF.cjs → chunk-ECKF2BAM.cjs} +6 -2
  62. package/dist/{chunk-GQ3Z3IZI.cjs → chunk-EMMQ64QW.cjs} +18 -18
  63. package/dist/{chunk-6DU6UFUE.mjs → chunk-EXG5LD6B.mjs} +16 -8
  64. package/dist/{chunk-HUMR6LSU.mjs → chunk-F5QO4FNE.mjs} +1 -1
  65. package/dist/{chunk-YULD7ICZ.mjs → chunk-FBOJ55OM.mjs} +1 -1
  66. package/dist/{chunk-IHNMMXHV.mjs → chunk-FGRYBX5X.mjs} +15 -10
  67. package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
  68. package/dist/{chunk-3BU22U3M.cjs → chunk-G2TEB74S.cjs} +5 -2
  69. package/dist/{chunk-G5RT7EXW.mjs → chunk-HEVMCTSR.mjs} +21 -6
  70. package/dist/{chunk-W7LF2J2S.mjs → chunk-HMRSWN47.mjs} +1 -1
  71. package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
  72. package/dist/{chunk-UAORZ7QA.mjs → chunk-IAIYV4RZ.mjs} +2 -2
  73. package/dist/{chunk-F2SE2VDO.mjs → chunk-IHQIOZLC.mjs} +1 -1
  74. package/dist/{chunk-2NNMOPDN.mjs → chunk-J3ANCZKA.mjs} +4 -1
  75. package/dist/{chunk-C4SPBWFM.cjs → chunk-JEZO6VUR.cjs} +10 -1
  76. package/dist/{chunk-SC2WYWPF.mjs → chunk-JPNFPAZ4.mjs} +3 -3
  77. package/dist/{chunk-F6Z3Y5KL.mjs → chunk-K3SAEIM3.mjs} +5 -2
  78. package/dist/{chunk-QAU5JD57.mjs → chunk-K4I4O5TS.mjs} +289 -50
  79. package/dist/{chunk-KN7K4VQN.mjs → chunk-KDTBF3UU.mjs} +1 -1
  80. package/dist/{chunk-OMVAU7NT.cjs → chunk-KIIMAWOJ.cjs} +11 -1
  81. package/dist/{chunk-43FMW62B.mjs → chunk-KMTGADN3.mjs} +28 -0
  82. package/dist/{chunk-QORUJDIV.mjs → chunk-KPFKMDM7.mjs} +2 -2
  83. package/dist/{chunk-YSCV4SJF.cjs → chunk-L5H2GSUC.cjs} +4 -4
  84. package/dist/{chunk-YDQZGSDS.mjs → chunk-LBDP3YT3.mjs} +1 -1
  85. package/dist/{chunk-6ETPZTJI.mjs → chunk-LBGILORX.mjs} +116 -55
  86. package/dist/{chunk-IPXLADVO.cjs → chunk-LOFKRKO7.cjs} +122 -61
  87. package/dist/{chunk-ULAWS2PA.cjs → chunk-LPFV45AY.cjs} +29 -26
  88. package/dist/{chunk-3KZS4SUS.mjs → chunk-MCIZVNOQ.mjs} +1 -1
  89. package/dist/{chunk-RU3M2FIK.cjs → chunk-MRMI32SN.cjs} +87 -369
  90. package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
  91. package/dist/{chunk-XCACDAZZ.cjs → chunk-NDILNQ4L.cjs} +25 -10
  92. package/dist/{chunk-6TJOML4E.mjs → chunk-NFMDCAOS.mjs} +14 -11
  93. package/dist/{chunk-UXFQ3UDA.cjs → chunk-NICDYKBS.cjs} +42 -3
  94. package/dist/{chunk-EZDQRNQ7.mjs → chunk-NNSAQX3U.mjs} +23 -5
  95. package/dist/{chunk-YC6V7PWE.cjs → chunk-NQ6QFZWD.cjs} +1 -1
  96. package/dist/{chunk-PDOCJ6RY.mjs → chunk-O6WAEAX3.mjs} +1 -1
  97. package/dist/{chunk-U4KT7QP3.cjs → chunk-OW67PDDS.cjs} +14 -1
  98. package/dist/{chunk-77GNHH2Z.cjs → chunk-PMQHMWZU.cjs} +3 -3
  99. package/dist/chunk-PTZ2TVNE.cjs +178 -0
  100. package/dist/{chunk-6WCPV6G2.mjs → chunk-Q2KB32T4.mjs} +1 -1
  101. package/dist/{chunk-ICUQICNC.cjs → chunk-Q5FYSK45.cjs} +718 -532
  102. package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
  103. package/dist/{chunk-Q3VLETLE.mjs → chunk-RRMVL6CJ.mjs} +4 -4
  104. package/dist/{chunk-IZY3V5XW.mjs → chunk-S3VWVTVA.mjs} +14 -1
  105. package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
  106. package/dist/{chunk-VFQT3LAO.cjs → chunk-SDOTRX3V.cjs} +5 -5
  107. package/dist/chunk-SGBZPZUW.mjs +75 -0
  108. package/dist/{chunk-BMWDEBXO.cjs → chunk-SHLXACIO.cjs} +31 -3
  109. package/dist/{chunk-ZXGAFZDO.cjs → chunk-T5OJPTVN.cjs} +2 -2
  110. package/dist/{chunk-2ELDTQRN.mjs → chunk-TDNWPAVR.mjs} +1 -1
  111. package/dist/{chunk-VZJR7UTG.cjs → chunk-TE2G5ION.cjs} +2 -2
  112. package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
  113. package/dist/{chunk-4JHOT46A.mjs → chunk-TPLJVC7E.mjs} +86 -5
  114. package/dist/{chunk-NRSN7G7E.mjs → chunk-TW4GYDBJ.mjs} +1 -1
  115. package/dist/{chunk-XBML5KMG.cjs → chunk-U6MPZ35Q.cjs} +24 -14
  116. package/dist/chunk-UH6QN5NL.mjs +178 -0
  117. package/dist/{chunk-FTFYRMQQ.cjs → chunk-UJZLSXUB.cjs} +53 -28
  118. package/dist/chunk-UXHS27O6.cjs +75 -0
  119. package/dist/{chunk-DQQOKWYA.cjs → chunk-VR4GD5I3.cjs} +3 -3
  120. package/dist/{chunk-22LTEMGQ.mjs → chunk-VXAWRDK7.mjs} +14 -4
  121. package/dist/{chunk-62XKI4Z3.cjs → chunk-W2YDNK66.cjs} +6 -3
  122. package/dist/{chunk-VPTDD5XF.cjs → chunk-WBKEZXWE.cjs} +5 -0
  123. package/dist/{chunk-EJQT6KZN.cjs → chunk-WC5UV2HQ.cjs} +2 -2
  124. package/dist/{chunk-SAZVVAJH.mjs → chunk-WQ7T2263.mjs} +18 -7
  125. package/dist/chunk-WRPHYQVY.mjs +109 -0
  126. package/dist/chunk-WT4TGLXT.cjs +109 -0
  127. package/dist/{chunk-SOMHP6GF.mjs → chunk-XOPOIFTJ.mjs} +2 -2
  128. package/dist/{chunk-3PXS2MHU.mjs → chunk-YCKO6FRS.mjs} +1 -1
  129. package/dist/{chunk-C35ZBVRD.mjs → chunk-YWMZUGIS.mjs} +6 -2
  130. package/dist/{chunk-HMIJDL7S.mjs → chunk-Z5BEWYVO.mjs} +31 -6
  131. package/dist/{chunk-OKZUAXHF.mjs → chunk-Z7LA7MHQ.mjs} +1 -1
  132. package/dist/{chunk-Y7RKTKYI.mjs → chunk-ZMMBIVQM.mjs} +10 -0
  133. package/dist/{client-plugins-HIyulDym.d.ts → client-plugins-C8DjftDF.d.ts} +112 -5
  134. package/dist/{client-plugins-CvIslxWi.d.mts → client-plugins-CV4eJ9De.d.mts} +112 -5
  135. package/dist/client-plugins.d.mts +1 -1
  136. package/dist/client-plugins.d.ts +1 -1
  137. package/dist/client.cjs +8 -8
  138. package/dist/client.d.mts +5 -5
  139. package/dist/client.d.ts +5 -5
  140. package/dist/client.mjs +7 -7
  141. package/dist/config.d.mts +1 -1
  142. package/dist/config.d.ts +1 -1
  143. package/dist/{devtools-EAUY43BS.cjs → devtools-JXFQNWSH.cjs} +11 -10
  144. package/dist/{devtools-EE5RIBTH.mjs → devtools-KVOY2TCZ.mjs} +10 -9
  145. package/dist/docs.cjs +13 -12
  146. package/dist/docs.d.mts +2 -2
  147. package/dist/docs.d.ts +2 -2
  148. package/dist/docs.mjs +12 -11
  149. package/dist/headers.cjs +4 -4
  150. package/dist/headers.mjs +3 -3
  151. package/dist/i18n/client.cjs +11 -11
  152. package/dist/i18n/client.mjs +3 -3
  153. package/dist/image/server.cjs +3 -3
  154. package/dist/image/server.mjs +2 -2
  155. package/dist/image/sharp.cjs +10 -10
  156. package/dist/image/sharp.mjs +2 -2
  157. package/dist/index.cjs +61 -54
  158. package/dist/index.d.mts +14 -14
  159. package/dist/index.d.ts +14 -14
  160. package/dist/index.mjs +60 -53
  161. package/dist/integrations.cjs +8 -4
  162. package/dist/integrations.d.mts +1 -1
  163. package/dist/integrations.d.ts +1 -1
  164. package/dist/integrations.mjs +7 -3
  165. package/dist/internal/app-markdown-runtime.cjs +5 -3
  166. package/dist/internal/app-markdown-runtime.d.mts +19 -5
  167. package/dist/internal/app-markdown-runtime.d.ts +19 -5
  168. package/dist/internal/app-markdown-runtime.mjs +4 -2
  169. package/dist/internal/build-runtime.cjs +38 -34
  170. package/dist/internal/build-runtime.d.mts +3 -3
  171. package/dist/internal/build-runtime.d.ts +3 -3
  172. package/dist/internal/build-runtime.mjs +37 -33
  173. package/dist/internal/cli-runtime.cjs +17 -16
  174. package/dist/internal/cli-runtime.mjs +16 -15
  175. package/dist/internal/client-error-overlay.cjs +4 -4
  176. package/dist/internal/client-error-overlay.mjs +1 -1
  177. package/dist/internal/client-runtime.cjs +2 -2
  178. package/dist/internal/client-runtime.mjs +1 -1
  179. package/dist/internal/compression-runtime.d.mts +1 -1
  180. package/dist/internal/compression-runtime.d.ts +1 -1
  181. package/dist/internal/config-runtime.cjs +11 -10
  182. package/dist/internal/config-runtime.d.mts +2 -2
  183. package/dist/internal/config-runtime.d.ts +2 -2
  184. package/dist/internal/config-runtime.mjs +10 -9
  185. package/dist/internal/infra-analytics-runtime.cjs +5 -5
  186. package/dist/internal/infra-analytics-runtime.mjs +3 -3
  187. package/dist/internal/isolated-boundary.cjs +2 -2
  188. package/dist/internal/isolated-boundary.d.mts +0 -1
  189. package/dist/internal/isolated-boundary.d.ts +0 -1
  190. package/dist/internal/isolated-boundary.mjs +1 -1
  191. package/dist/internal/metadata-image-runtime.cjs +3 -3
  192. package/dist/internal/metadata-image-runtime.mjs +2 -2
  193. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  194. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  195. package/dist/internal/production-runtime.cjs +27 -48
  196. package/dist/internal/production-runtime.d.mts +67 -27
  197. package/dist/internal/production-runtime.d.ts +67 -27
  198. package/dist/internal/production-runtime.mjs +34 -55
  199. package/dist/{layers-BRQF5ETU.mjs → layers-UTB43B7A.mjs} +1 -1
  200. package/dist/layers-VUWIOFEO.cjs +18 -0
  201. package/dist/markdown.cjs +1 -1
  202. package/dist/markdown.d.mts +1 -1
  203. package/dist/markdown.d.ts +1 -1
  204. package/dist/markdown.mjs +1 -1
  205. package/dist/middleware.cjs +10 -10
  206. package/dist/middleware.d.mts +6 -4
  207. package/dist/middleware.d.ts +6 -4
  208. package/dist/middleware.mjs +9 -9
  209. package/dist/navigation.cjs +7 -7
  210. package/dist/navigation.d.mts +4 -4
  211. package/dist/navigation.d.ts +4 -4
  212. package/dist/navigation.mjs +6 -6
  213. package/dist/{nitro-OVPLKPE2.cjs → nitro-7F65EZZS.cjs} +3 -3
  214. package/dist/{nitro-MXRDCXWZ.mjs → nitro-MPZJGPXK.mjs} +2 -2
  215. package/dist/plugin.cjs +31 -28
  216. package/dist/plugin.d.mts +1 -1
  217. package/dist/plugin.d.ts +1 -1
  218. package/dist/plugin.mjs +30 -27
  219. package/dist/{production-runtime-Crq6CJ-2.d.ts → production-runtime-C2kkrPVZ.d.ts} +1 -1
  220. package/dist/{production-runtime-0sRnuYc-.d.mts → production-runtime-Du_FHb2-.d.mts} +1 -1
  221. package/dist/query/client.cjs +9 -9
  222. package/dist/query/client.mjs +4 -4
  223. package/dist/{render-plan-8ozZh2Qv.d.ts → render-plan-BnnPTpus.d.ts} +1 -1
  224. package/dist/{render-plan-gs9GGPzw.d.mts → render-plan-Cgx7v8tJ.d.mts} +1 -1
  225. package/dist/renderer/react/server.cjs +3 -3
  226. package/dist/renderer/react/server.mjs +1 -1
  227. package/dist/renderer-client.cjs +12 -12
  228. package/dist/renderer-client.d.mts +3 -3
  229. package/dist/renderer-client.d.ts +3 -3
  230. package/dist/renderer-client.mjs +4 -4
  231. package/dist/{request-B5G8rLBH.d.ts → request-BNWr7r5e.d.ts} +1 -1
  232. package/dist/{request-fkhiynXe.d.mts → request-sKayKcop.d.mts} +1 -1
  233. package/dist/request.cjs +3 -3
  234. package/dist/request.d.mts +2 -2
  235. package/dist/request.d.ts +2 -2
  236. package/dist/request.mjs +2 -2
  237. package/dist/{route-rendering-lS5nUMua.d.ts → route-rendering-Bx4Auw6Q.d.ts} +1 -1
  238. package/dist/{route-rendering-CLnS7AZj.d.mts → route-rendering-DWFp3Yq4.d.mts} +1 -1
  239. package/dist/{router-ifU8Dui1.d.mts → router-BK6K42Ij.d.mts} +1 -1
  240. package/dist/{router-4iuiYnOW.d.ts → router-DnW_2tQi.d.ts} +1 -1
  241. package/dist/routes.cjs +2 -2
  242. package/dist/routes.d.mts +1 -1
  243. package/dist/routes.d.ts +1 -1
  244. package/dist/routes.mjs +1 -1
  245. package/dist/runtime-CA3Ei5k_.d.ts +69 -0
  246. package/dist/runtime-DJDaCMd_.d.mts +69 -0
  247. package/dist/server-action-security.cjs +3 -3
  248. package/dist/server-action-security.mjs +2 -2
  249. package/dist/server-fn.cjs +5 -5
  250. package/dist/server-fn.mjs +4 -4
  251. package/dist/server-plugins.cjs +5 -5
  252. package/dist/server-plugins.d.mts +2 -2
  253. package/dist/server-plugins.d.ts +2 -2
  254. package/dist/server-plugins.mjs +4 -4
  255. package/dist/server-query.cjs +6 -6
  256. package/dist/server-query.mjs +5 -5
  257. package/dist/server.cjs +57 -54
  258. package/dist/server.d.mts +7 -7
  259. package/dist/server.d.ts +7 -7
  260. package/dist/server.mjs +35 -32
  261. package/dist/{spa-router-Bq7VCOwx.d.mts → spa-router-D6fUA4Rn.d.mts} +2 -2
  262. package/dist/{spa-router-DaJk5Re4.d.ts → spa-router-Mwbd7g2L.d.ts} +2 -2
  263. package/dist/testing.cjs +13 -13
  264. package/dist/testing.d.mts +1 -1
  265. package/dist/testing.d.ts +1 -1
  266. package/dist/testing.mjs +10 -10
  267. package/dist/theme/server.cjs +4 -4
  268. package/dist/theme/server.mjs +3 -3
  269. package/dist/{utils-BXLmFsVR.d.ts → utils-BwVcAfUR.d.ts} +1 -1
  270. package/dist/{utils-XJn0c9bj.d.mts → utils-p9Hs-jCc.d.mts} +1 -1
  271. package/dist/version.cjs +2 -2
  272. package/dist/version.mjs +1 -1
  273. package/dist/vite.cjs +31 -28
  274. package/dist/vite.d.mts +1 -1
  275. package/dist/vite.d.ts +1 -1
  276. package/dist/vite.mjs +30 -27
  277. package/dist/workflows.cjs +3 -3
  278. package/dist/workflows.mjs +2 -2
  279. package/package.json +1 -1
  280. package/types/middleware.d.ts +5 -1
  281. package/dist/chunk-FXEF4PPL.mjs +0 -47
  282. package/dist/chunk-XD32KALF.cjs +0 -47
  283. package/dist/layers-4PNE2HOY.cjs +0 -18
  284. /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
  285. /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
@@ -1,3 +1,6 @@
1
+ import {
2
+ createFarmDevServerDispatch
3
+ } from "./chunk-SGBZPZUW.mjs";
1
4
  import {
2
5
  _runWithAPIRequestRuntime
3
6
  } from "./chunk-R3DS7A2T.mjs";
@@ -6,10 +9,10 @@ import {
6
9
  } from "./chunk-IOEH4VWN.mjs";
7
10
  import {
8
11
  APIRouteConflictError
9
- } from "./chunk-22LTEMGQ.mjs";
12
+ } from "./chunk-VXAWRDK7.mjs";
10
13
  import {
11
14
  findProgrammaticRouteFilesInDir
12
- } from "./chunk-UDNPLXW7.mjs";
15
+ } from "./chunk-MYIZXDZA.mjs";
13
16
  import {
14
17
  isFarmAPIRouteFileName
15
18
  } from "./chunk-CU625VAY.mjs";
@@ -20,7 +23,7 @@ import {
20
23
  matchAPIRouteAtBasePath,
21
24
  mergePluginAPIRoutes,
22
25
  resolveAPIRouteEndpoint
23
- } from "./chunk-G5RT7EXW.mjs";
26
+ } from "./chunk-HEVMCTSR.mjs";
24
27
  import {
25
28
  isProgrammaticRoutesFileName
26
29
  } from "./chunk-EA5K5BKU.mjs";
@@ -28,13 +31,13 @@ import {
28
31
  createFarmRequestBodyErrorResponse,
29
32
  readNodeRequestBody,
30
33
  resolveFarmServerConfig
31
- } from "./chunk-Y7RKTKYI.mjs";
34
+ } from "./chunk-ZMMBIVQM.mjs";
32
35
  import {
33
36
  createCliColors
34
37
  } from "./chunk-I2BHUNBU.mjs";
35
38
  import {
36
39
  loadFarmDevModule
37
- } from "./chunk-43FMW62B.mjs";
40
+ } from "./chunk-KMTGADN3.mjs";
38
41
  import {
39
42
  toPosixPath,
40
43
  toViteModuleId
@@ -44,7 +47,7 @@ import {
44
47
  } from "./chunk-Z2RZJZIZ.mjs";
45
48
  import {
46
49
  resolveFarmRequestURL
47
- } from "./chunk-FDR64H6B.mjs";
50
+ } from "./chunk-3KGDJLJK.mjs";
48
51
  import {
49
52
  AmbiguousRouteError,
50
53
  assertUniqueRouteParameters,
@@ -65,6 +68,7 @@ function farmApiPlugin(options = {}) {
65
68
  let apiRoutesCache = /* @__PURE__ */ new Map();
66
69
  let apiRouterHandler = null;
67
70
  let projectRoot = process.cwd();
71
+ let devServer;
68
72
  let pluginMergedRoutes = null;
69
73
  const servedRoutes = /* @__PURE__ */ __name(() => pluginMergedRoutes ?? apiRoutesCache, "servedRoutes");
70
74
  let routePlugins;
@@ -187,7 +191,13 @@ function farmApiPlugin(options = {}) {
187
191
  const plugins = options.plugins ? await (routePlugins ?? (routePlugins = Promise.resolve(options.plugins({ root: projectRoot })))) : [];
188
192
  pluginMergedRoutes = plugins.length ? new Map(
189
193
  mergePluginAPIRoutes([...apiRoutesCache.values()], plugins, void 0, {
190
- bodySizeLimit
194
+ bodySizeLimit,
195
+ // A plugin calling an app endpoint (an MCP tool, say) goes back through this server,
196
+ // so the middleware that guards the endpoint's path runs for it.
197
+ dispatch: /* @__PURE__ */ __name((request) => {
198
+ if (!devServer) throw new Error("The Farm API dev server is not running.");
199
+ return createFarmDevServerDispatch(devServer)(request);
200
+ }, "dispatch")
191
201
  }).map((route) => [route.path, route])
192
202
  ) : null;
193
203
  const totalEndpoints = Array.from(servedRoutes().values()).reduce(
@@ -235,6 +245,7 @@ function farmApiPlugin(options = {}) {
235
245
  enforce: "pre",
236
246
  configureServer(server) {
237
247
  projectRoot = server.config.root;
248
+ devServer = server;
238
249
  const discoverFileRoutes = /* @__PURE__ */ __name(async (apiDir) => {
239
250
  const fs = await import("fs");
240
251
  const path = await import("path");
@@ -0,0 +1,109 @@
1
+ import {
2
+ matchSegmentParts,
3
+ normalizePathname,
4
+ parseRoutePattern,
5
+ splitNormalizedPathname
6
+ } from "./chunk-OT6ZEW74.mjs";
7
+ import {
8
+ getRouteGroupScope,
9
+ isInRouteGroupScope
10
+ } from "./chunk-LBGILORX.mjs";
11
+ import {
12
+ __name
13
+ } from "./chunk-LPEX4YW6.mjs";
14
+
15
+ // src/nitro/native-mcp-source.ts
16
+ function generateNativeMCPPluginSource(mcp) {
17
+ if (mcp?.enabled !== true) {
18
+ return { importSource: "", registerSource: "", pluginSource: "" };
19
+ }
20
+ return {
21
+ importSource: `import { createFarmMCPPlugin as __farmCreateMCPPlugin } from "@farm.js/mcp/internal";`,
22
+ registerSource: `function __farmMCPIsPlainObject(value) {
23
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
24
+ const prototype = Object.getPrototypeOf(value);
25
+ return prototype === Object.prototype || prototype === null;
26
+ }
27
+
28
+ function __farmMergeMCPConfig(base, override) {
29
+ const output = { ...base };
30
+ for (const [key, value] of Object.entries(override)) {
31
+ if (value === undefined) continue;
32
+ output[key] =
33
+ __farmMCPIsPlainObject(output[key]) && __farmMCPIsPlainObject(value)
34
+ ? __farmMergeMCPConfig(output[key], value)
35
+ : value;
36
+ }
37
+ return output;
38
+ }
39
+
40
+ const farmNativeMCPConfig = farmRuntimeConfigs.reduce((merged, runtimeConfig) => {
41
+ const value = runtimeConfig?.mcp;
42
+ if (value === undefined) return merged;
43
+ if (value === false) return false;
44
+ return __farmMergeMCPConfig(merged && merged !== false ? merged : {}, value);
45
+ }, undefined);
46
+ const farmNativeMCPPlugin =
47
+ farmNativeMCPConfig && farmNativeMCPConfig.enabled !== false
48
+ ? __farmCreateMCPPlugin(farmNativeMCPConfig)
49
+ : null;`,
50
+ pluginSource: `...(farmNativeMCPPlugin ? [farmNativeMCPPlugin] : []),`
51
+ };
52
+ }
53
+ __name(generateNativeMCPPluginSource, "generateNativeMCPPluginSource");
54
+
55
+ // src/routing/layout-selector.ts
56
+ function createFarmLayoutSelector(layouts, resolveRouteDirectory) {
57
+ const prepared = layouts.map((layout) => {
58
+ const segments = layout.pattern === "/" ? [] : parseRoutePattern(layout.pattern);
59
+ return {
60
+ layout,
61
+ segments: segments.length === 0 ? null : segments,
62
+ groupScope: getRouteGroupScope(layout.pattern)
63
+ };
64
+ });
65
+ return (pathname, routeDirectory) => {
66
+ const applicable = [];
67
+ let parts;
68
+ let directory = routeDirectory;
69
+ for (const { layout, segments, groupScope } of prepared) {
70
+ if (segments !== null) {
71
+ parts ?? (parts = splitNormalizedPathname(normalizePathname(pathname.replace(/\/$/, "") || "/")));
72
+ if (matchSegmentParts(segments, parts, true) === null) continue;
73
+ }
74
+ if (groupScope !== null) {
75
+ if (directory === void 0) directory = resolveRouteDirectory?.(pathname) ?? null;
76
+ if (!isInRouteGroupScope(directory, groupScope)) continue;
77
+ }
78
+ applicable.push(layout);
79
+ }
80
+ return applicable;
81
+ };
82
+ }
83
+ __name(createFarmLayoutSelector, "createFarmLayoutSelector");
84
+ function layoutsCanCoverSamePage(a, b) {
85
+ const scopeA = getRouteGroupScope(a);
86
+ const scopeB = getRouteGroupScope(b);
87
+ if (scopeA !== null && scopeB !== null && !isInRouteGroupScope(scopeA, scopeB) && !isInRouteGroupScope(scopeB, scopeA)) {
88
+ return false;
89
+ }
90
+ const segmentsA = a === "/" ? [] : parseRoutePattern(a);
91
+ const segmentsB = b === "/" ? [] : parseRoutePattern(b);
92
+ const length = Math.min(segmentsA.length, segmentsB.length);
93
+ for (let index = 0; index < length; index++) {
94
+ const segmentA = segmentsA[index];
95
+ const segmentB = segmentsB[index];
96
+ if (segmentA.type === "dynamic" && segmentA.catchAll) return true;
97
+ if (segmentB.type === "dynamic" && segmentB.catchAll) return true;
98
+ if (segmentA.type === "dynamic" || segmentB.type === "dynamic") continue;
99
+ if (segmentA.value !== segmentB.value) return false;
100
+ }
101
+ return true;
102
+ }
103
+ __name(layoutsCanCoverSamePage, "layoutsCanCoverSamePage");
104
+
105
+ export {
106
+ generateNativeMCPPluginSource,
107
+ createFarmLayoutSelector,
108
+ layoutsCanCoverSamePage
109
+ };
@@ -0,0 +1,109 @@
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
+
3
+
4
+
5
+
6
+ var _chunkPCOTGFSMcjs = require('./chunk-PCOTGFSM.cjs');
7
+
8
+
9
+
10
+ var _chunkLOFKRKO7cjs = require('./chunk-LOFKRKO7.cjs');
11
+
12
+
13
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
14
+
15
+ // src/nitro/native-mcp-source.ts
16
+ function generateNativeMCPPluginSource(mcp) {
17
+ if (_optionalChain([mcp, 'optionalAccess', _ => _.enabled]) !== true) {
18
+ return { importSource: "", registerSource: "", pluginSource: "" };
19
+ }
20
+ return {
21
+ importSource: `import { createFarmMCPPlugin as __farmCreateMCPPlugin } from "@farm.js/mcp/internal";`,
22
+ registerSource: `function __farmMCPIsPlainObject(value) {
23
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
24
+ const prototype = Object.getPrototypeOf(value);
25
+ return prototype === Object.prototype || prototype === null;
26
+ }
27
+
28
+ function __farmMergeMCPConfig(base, override) {
29
+ const output = { ...base };
30
+ for (const [key, value] of Object.entries(override)) {
31
+ if (value === undefined) continue;
32
+ output[key] =
33
+ __farmMCPIsPlainObject(output[key]) && __farmMCPIsPlainObject(value)
34
+ ? __farmMergeMCPConfig(output[key], value)
35
+ : value;
36
+ }
37
+ return output;
38
+ }
39
+
40
+ const farmNativeMCPConfig = farmRuntimeConfigs.reduce((merged, runtimeConfig) => {
41
+ const value = runtimeConfig?.mcp;
42
+ if (value === undefined) return merged;
43
+ if (value === false) return false;
44
+ return __farmMergeMCPConfig(merged && merged !== false ? merged : {}, value);
45
+ }, undefined);
46
+ const farmNativeMCPPlugin =
47
+ farmNativeMCPConfig && farmNativeMCPConfig.enabled !== false
48
+ ? __farmCreateMCPPlugin(farmNativeMCPConfig)
49
+ : null;`,
50
+ pluginSource: `...(farmNativeMCPPlugin ? [farmNativeMCPPlugin] : []),`
51
+ };
52
+ }
53
+ _chunkS3JO3N4Hcjs.__name.call(void 0, generateNativeMCPPluginSource, "generateNativeMCPPluginSource");
54
+
55
+ // src/routing/layout-selector.ts
56
+ function createFarmLayoutSelector(layouts, resolveRouteDirectory) {
57
+ const prepared = layouts.map((layout) => {
58
+ const segments = layout.pattern === "/" ? [] : _chunkPCOTGFSMcjs.parseRoutePattern.call(void 0, layout.pattern);
59
+ return {
60
+ layout,
61
+ segments: segments.length === 0 ? null : segments,
62
+ groupScope: _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, layout.pattern)
63
+ };
64
+ });
65
+ return (pathname, routeDirectory) => {
66
+ const applicable = [];
67
+ let parts;
68
+ let directory = routeDirectory;
69
+ for (const { layout, segments, groupScope } of prepared) {
70
+ if (segments !== null) {
71
+ _nullishCoalesce(parts, () => ( (parts = _chunkPCOTGFSMcjs.splitNormalizedPathname.call(void 0, _chunkPCOTGFSMcjs.normalizePathname.call(void 0, pathname.replace(/\/$/, "") || "/")))));
72
+ if (_chunkPCOTGFSMcjs.matchSegmentParts.call(void 0, segments, parts, true) === null) continue;
73
+ }
74
+ if (groupScope !== null) {
75
+ if (directory === void 0) directory = _nullishCoalesce(_optionalChain([resolveRouteDirectory, 'optionalCall', _2 => _2(pathname)]), () => ( null));
76
+ if (!_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, directory, groupScope)) continue;
77
+ }
78
+ applicable.push(layout);
79
+ }
80
+ return applicable;
81
+ };
82
+ }
83
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmLayoutSelector, "createFarmLayoutSelector");
84
+ function layoutsCanCoverSamePage(a, b) {
85
+ const scopeA = _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, a);
86
+ const scopeB = _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, b);
87
+ if (scopeA !== null && scopeB !== null && !_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, scopeA, scopeB) && !_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, scopeB, scopeA)) {
88
+ return false;
89
+ }
90
+ const segmentsA = a === "/" ? [] : _chunkPCOTGFSMcjs.parseRoutePattern.call(void 0, a);
91
+ const segmentsB = b === "/" ? [] : _chunkPCOTGFSMcjs.parseRoutePattern.call(void 0, b);
92
+ const length = Math.min(segmentsA.length, segmentsB.length);
93
+ for (let index = 0; index < length; index++) {
94
+ const segmentA = segmentsA[index];
95
+ const segmentB = segmentsB[index];
96
+ if (segmentA.type === "dynamic" && segmentA.catchAll) return true;
97
+ if (segmentB.type === "dynamic" && segmentB.catchAll) return true;
98
+ if (segmentA.type === "dynamic" || segmentB.type === "dynamic") continue;
99
+ if (segmentA.value !== segmentB.value) return false;
100
+ }
101
+ return true;
102
+ }
103
+ _chunkS3JO3N4Hcjs.__name.call(void 0, layoutsCanCoverSamePage, "layoutsCanCoverSamePage");
104
+
105
+
106
+
107
+
108
+
109
+ exports.generateNativeMCPPluginSource = generateNativeMCPPluginSource; exports.createFarmLayoutSelector = createFarmLayoutSelector; exports.layoutsCanCoverSamePage = layoutsCanCoverSamePage;
@@ -3,14 +3,14 @@ import {
3
3
  loadFarmDocsPage,
4
4
  resolveFarmDocsContentDir,
5
5
  toFarmDocsMarkdownPage
6
- } from "./chunk-PDOCJ6RY.mjs";
6
+ } from "./chunk-O6WAEAX3.mjs";
7
7
  import {
8
8
  docsEngine,
9
9
  loadFarmDocsEngine
10
10
  } from "./chunk-2VQKKQ6D.mjs";
11
11
  import {
12
12
  resolveDocsConfig
13
- } from "./chunk-6DU6UFUE.mjs";
13
+ } from "./chunk-EXG5LD6B.mjs";
14
14
  import {
15
15
  getFarmDocsAdapterConfigModule,
16
16
  isSecretDocsConfigKey
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.1.35";
2
+ var version = "0.1.37";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -67,6 +67,7 @@ function isolateFarmServerPageGraph(ReactRuntime, element) {
67
67
  return ReactRuntime.createElement(Context.Provider, { value: false }, element);
68
68
  }
69
69
  __name(isolateFarmServerPageGraph, "isolateFarmServerPageGraph");
70
+ var warnedUnserializableBoundaries = /* @__PURE__ */ new Set();
70
71
  function createFarmIsolatedClientBoundary(ReactRuntime, Component, moduleReference, exportName, islandStrategy) {
71
72
  function FarmIsolatedClientBoundary(props) {
72
73
  const Context = getBoundaryGraphContext(ReactRuntime);
@@ -79,9 +80,12 @@ function createFarmIsolatedClientBoundary(ReactRuntime, Component, moduleReferen
79
80
  try {
80
81
  serializedProps = serializeBoundaryPayload(props);
81
82
  } catch (error) {
82
- if (typeof window === "undefined") {
83
+ const message = error instanceof Error ? error.message : String(error);
84
+ const warningKey = `${moduleReference}#${exportName}:${message}`;
85
+ if (typeof window === "undefined" && !warnedUnserializableBoundaries.has(warningKey)) {
86
+ warnedUnserializableBoundaries.add(warningKey);
83
87
  console.warn(
84
- `[Farm.js] Could not isolate ${moduleReference}#${exportName}: ${error instanceof Error ? error.message : String(error)}. The server-rendered component was preserved without client hydration.`
88
+ `[Farm.js] Could not isolate ${moduleReference}#${exportName}: ${message}. The server-rendered component was preserved without client hydration.`
85
89
  );
86
90
  }
87
91
  return ReactRuntime.createElement(Component, props);
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  compileMiddlewareConfig,
6
6
  matchesCompiledMiddlewareConfig
7
- } from "./chunk-JG6DJF5A.mjs";
7
+ } from "./chunk-HZFM2LWQ.mjs";
8
8
  import {
9
9
  bufferFarmRequestBody,
10
10
  clearRequestContext,
@@ -16,11 +16,15 @@ import {
16
16
  readNodeRequestBody,
17
17
  resolveFarmServerConfig,
18
18
  setRequestContext
19
- } from "./chunk-Y7RKTKYI.mjs";
19
+ } from "./chunk-ZMMBIVQM.mjs";
20
20
  import {
21
21
  applyWebResponseHeaders,
22
22
  sendWebResponse
23
23
  } from "./chunk-Z2RZJZIZ.mjs";
24
+ import {
25
+ createFarmAPIMiddlewarePathnames,
26
+ resolveFarmAPIServerBasePath
27
+ } from "./chunk-BTHHUD7Q.mjs";
24
28
  import {
25
29
  api,
26
30
  defineIntegrationAPIOperation
@@ -1577,10 +1581,12 @@ async function dispatchIntegrationRequest(runtime, request, options = {}) {
1577
1581
  const middleware = [...integration.middleware || []];
1578
1582
  const forwardedSetCookies = [];
1579
1583
  for (const entry of middleware) {
1584
+ if (options.ranMiddleware?.has(entry)) continue;
1580
1585
  const params = resolveIntegrationMiddlewareParams(entry, pathname, runtime.config);
1581
1586
  if (!params) {
1582
1587
  continue;
1583
1588
  }
1589
+ options.ranMiddleware?.add(entry);
1584
1590
  const handlerContext = createServerIntegrationHandlerContext({
1585
1591
  runtime,
1586
1592
  route: {
@@ -1845,6 +1851,7 @@ async function dispatchIntegrationRequests(integrations, runtime, request, optio
1845
1851
  request.clone(),
1846
1852
  {
1847
1853
  currentRequest: options.currentRequest,
1854
+ ranMiddleware: options.ranMiddleware,
1848
1855
  onForwardedCookies: /* @__PURE__ */ __name((cookies) => setCookies.push(...cookies), "onForwardedCookies")
1849
1856
  }
1850
1857
  );
@@ -2006,8 +2013,10 @@ function resolveIntegrationMiddlewareParams(entry, pathname, config) {
2006
2013
  const params = resolveMatcherParams(entry.matcher, pathname);
2007
2014
  if (params || !entry.matcher) return params;
2008
2015
  const routePathname = resolveIntegrationRoutePathname(pathname, config);
2009
- if (routePathname !== pathname) {
2010
- const routeParams = resolveMatcherParams(entry.matcher, routePathname);
2016
+ const candidates = [.../* @__PURE__ */ new Set([pathname, ...getIntegrationAPIPathnames(config)(routePathname)])];
2017
+ for (const candidate of candidates) {
2018
+ if (candidate === pathname) continue;
2019
+ const routeParams = resolveMatcherParams(entry.matcher, candidate);
2011
2020
  if (routeParams) return routeParams;
2012
2021
  }
2013
2022
  let compiled = compiledIntegrationGuards.get(entry);
@@ -2017,13 +2026,28 @@ function resolveIntegrationMiddlewareParams(entry, pathname, config) {
2017
2026
  });
2018
2027
  compiledIntegrationGuards.set(entry, compiled);
2019
2028
  }
2020
- for (const candidate of routePathname === pathname ? [pathname] : [pathname, routePathname]) {
2029
+ for (const candidate of candidates) {
2021
2030
  const result = matchesCompiledMiddlewareConfig(candidate, compiled, noMiddlewareContext);
2022
2031
  if (result.matched) return result.params ?? {};
2023
2032
  }
2024
2033
  return null;
2025
2034
  }
2026
2035
  __name(resolveIntegrationMiddlewareParams, "resolveIntegrationMiddlewareParams");
2036
+ var FARM_INTEGRATION_API_BASE_PATH_KEY = "__farmAPIServerBasePath";
2037
+ var integrationAPIPathnames = /* @__PURE__ */ new WeakMap();
2038
+ function getIntegrationAPIPathnames(config) {
2039
+ if (!config) return (pathname) => [pathname];
2040
+ let toPathnames = integrationAPIPathnames.get(config);
2041
+ if (!toPathnames) {
2042
+ const recorded = config[FARM_INTEGRATION_API_BASE_PATH_KEY];
2043
+ const api2 = config.api;
2044
+ const serverBasePath = typeof recorded === "string" ? recorded : typeof api2?.baseURL === "string" && typeof api2.basePath === "string" ? resolveFarmAPIServerBasePath(api2) : void 0;
2045
+ toPathnames = createFarmAPIMiddlewarePathnames(serverBasePath);
2046
+ integrationAPIPathnames.set(config, toPathnames);
2047
+ }
2048
+ return toPathnames;
2049
+ }
2050
+ __name(getIntegrationAPIPathnames, "getIntegrationAPIPathnames");
2027
2051
  function resolveIntegrationRoutePathname(pathname, config) {
2028
2052
  const basePath = typeof config?.basePath === "string" ? config.basePath : void 0;
2029
2053
  let routePathname = basePath ? stripFarmBasePath(pathname, basePath) : pathname;
@@ -2158,5 +2182,6 @@ export {
2158
2182
  matchRegisteredIntegrationRoute,
2159
2183
  getRegisteredIntegrationAPIManifest,
2160
2184
  dispatchIntegrationRequest,
2161
- dispatchIntegrationRequests
2185
+ dispatchIntegrationRequests,
2186
+ FARM_INTEGRATION_API_BASE_PATH_KEY
2162
2187
  };
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-ZMSZZXOR.mjs";
28
28
  import {
29
29
  getIntegrationSchemas
30
- } from "./chunk-HMIJDL7S.mjs";
30
+ } from "./chunk-Z5BEWYVO.mjs";
31
31
  import {
32
32
  __name
33
33
  } from "./chunk-LPEX4YW6.mjs";
@@ -118,6 +118,15 @@ var DEFAULT_FARM_SERVER_REQUEST_TIMEOUT = 3e5;
118
118
  var DEFAULT_FARM_SERVER_KEEP_ALIVE_TIMEOUT = 5e3;
119
119
  var DEFAULT_FARM_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT = 3e4;
120
120
  var MAX_FARM_SERVER_TIMEOUT = 2147483647;
121
+ function createFarmWeakETag(body) {
122
+ let hash = 2166136261;
123
+ for (let index = 0; index < body.length; index++) {
124
+ hash ^= body.charCodeAt(index);
125
+ hash = Math.imul(hash, 16777619);
126
+ }
127
+ return `W/"${(hash >>> 0).toString(16).padStart(8, "0")}"`;
128
+ }
129
+ __name(createFarmWeakETag, "createFarmWeakETag");
121
130
  function matchesFarmIfNoneMatch(value, etag) {
122
131
  const expected = parseEntityTag(trimOptionalWhitespace(etag));
123
132
  if (!expected) return false;
@@ -483,6 +492,7 @@ export {
483
492
  copyRequestContext,
484
493
  createFarmNodeRequestAbortSignal,
485
494
  DEFAULT_FARM_SERVER_BODY_SIZE_LIMIT,
495
+ createFarmWeakETag,
486
496
  matchesFarmIfNoneMatch,
487
497
  resolveFarmServerConfig,
488
498
  parseBodySizeLimit,