@farm.js/core 0.1.38 → 0.1.40

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 (368) hide show
  1. package/dist/{agent-mcp-BwKlpnc7.d.mts → agent-mcp-DRlXq3lM.d.ts} +1 -1
  2. package/dist/{agent-mcp-De1imoMS.d.ts → agent-mcp-XNF4JqHw.d.mts} +1 -1
  3. package/dist/{agent-mcp-handler-OLRMZONF.mjs → agent-mcp-handler-HVV5LNXF.mjs} +6 -6
  4. package/dist/{agent-mcp-handler-MRGP3WJ3.cjs → agent-mcp-handler-YKG7KVCY.cjs} +7 -7
  5. package/dist/agent-runtime.cjs +10 -6
  6. package/dist/agent-runtime.d.mts +5 -7
  7. package/dist/agent-runtime.d.ts +5 -7
  8. package/dist/agent-runtime.mjs +9 -5
  9. package/dist/api/client.cjs +3 -3
  10. package/dist/api/client.d.mts +3 -3
  11. package/dist/api/client.d.ts +3 -3
  12. package/dist/api/client.mjs +2 -2
  13. package/dist/api/route-manager.cjs +15 -13
  14. package/dist/api/route-manager.d.mts +7 -9
  15. package/dist/api/route-manager.d.ts +7 -9
  16. package/dist/api/route-manager.mjs +14 -12
  17. package/dist/api/runtime.cjs +12 -10
  18. package/dist/api/runtime.d.mts +6 -8
  19. package/dist/api/runtime.d.ts +6 -8
  20. package/dist/api/runtime.mjs +11 -9
  21. package/dist/{api-client-CyFtZFJ4.d.ts → api-client-BJv9mTbO.d.ts} +2 -2
  22. package/dist/{api-client-BjMmY8OD.d.mts → api-client-Dk9QOLwr.d.mts} +2 -2
  23. package/dist/api.cjs +17 -15
  24. package/dist/api.d.mts +9 -11
  25. package/dist/api.d.ts +9 -11
  26. package/dist/api.mjs +16 -14
  27. package/dist/{app-kT_QXTdx.d.ts → app-CDJHPqZn.d.ts} +11 -4
  28. package/dist/{app-CFZt-srr.d.mts → app-CWjCklhF.d.mts} +11 -4
  29. package/dist/app-markdown.cjs +7 -6
  30. package/dist/app-markdown.d.mts +6 -8
  31. package/dist/app-markdown.d.ts +6 -8
  32. package/dist/app-markdown.mjs +6 -5
  33. package/dist/cache.cjs +6 -3
  34. package/dist/cache.d.mts +23 -2
  35. package/dist/cache.d.ts +23 -2
  36. package/dist/cache.mjs +5 -2
  37. package/dist/{chunk-3UEVPCGW.mjs → chunk-2DMWQWNJ.mjs} +6 -1
  38. package/dist/{chunk-ZXH4TS3F.cjs → chunk-2JG2LJDI.cjs} +3 -64
  39. package/dist/{chunk-QTXBII4Z.cjs → chunk-3TB5QGUW.cjs} +5 -5
  40. package/dist/chunk-45QJHGZM.cjs +1063 -0
  41. package/dist/{chunk-JCKYH4LG.mjs → chunk-45UZKX2J.mjs} +12 -44
  42. package/dist/{chunk-FUCSUGDM.cjs → chunk-4A3YUB4D.cjs} +3 -3
  43. package/dist/{chunk-FUZEBRP3.mjs → chunk-4GP3XZ4Z.mjs} +5 -3
  44. package/dist/chunk-4TLUFAIP.cjs +92 -0
  45. package/dist/chunk-4U5XZDLG.cjs +80 -0
  46. package/dist/{chunk-VXEEATVD.cjs → chunk-4XO5GSD6.cjs} +2 -2
  47. package/dist/{chunk-P664ZVTV.mjs → chunk-4ZZNPK25.mjs} +2 -2
  48. package/dist/{chunk-TGFQVLLF.cjs → chunk-54QWHSNR.cjs} +697 -422
  49. package/dist/{chunk-W36M2BQ4.mjs → chunk-5E65AL7P.mjs} +3 -3
  50. package/dist/{chunk-3LOLJTFV.cjs → chunk-5JEC43MQ.cjs} +11 -11
  51. package/dist/{chunk-INL3THCU.mjs → chunk-5LL6TKII.mjs} +1 -1
  52. package/dist/{chunk-KIIMAWOJ.cjs → chunk-5NAVKJCZ.cjs} +35 -105
  53. package/dist/{chunk-PGZDEPTM.cjs → chunk-5XS5NCVM.cjs} +10 -10
  54. package/dist/{chunk-HXRYZWTA.mjs → chunk-62DY5GKS.mjs} +3 -3
  55. package/dist/{chunk-LSKZMJMP.cjs → chunk-64SBBZDU.cjs} +38 -1
  56. package/dist/chunk-6BWKJ6QS.cjs +43 -0
  57. package/dist/{chunk-JSROZYYO.cjs → chunk-6D24SDKO.cjs} +1 -20
  58. package/dist/{chunk-EIPC3FDA.cjs → chunk-6ILGLCXF.cjs} +9 -5
  59. package/dist/chunk-6QOLZITB.cjs +22 -0
  60. package/dist/{chunk-CXEN47J3.mjs → chunk-73WX6PRY.mjs} +25 -0
  61. package/dist/{chunk-RW63BOV7.cjs → chunk-7FHZ3E6D.cjs} +2 -2
  62. package/dist/chunk-7GNWGLWB.mjs +14 -0
  63. package/dist/{chunk-34UCJRQO.cjs → chunk-7RNAKBWF.cjs} +2 -2
  64. package/dist/{chunk-MSSFIQGM.mjs → chunk-7VAJSSPG.mjs} +41 -10
  65. package/dist/{chunk-KHKLMNI5.mjs → chunk-ACLPN56I.mjs} +43 -25
  66. package/dist/{chunk-JCYYXBAJ.cjs → chunk-AGR7F3LA.cjs} +3 -3
  67. package/dist/{chunk-4GWRFP22.cjs → chunk-ALPWLT27.cjs} +35 -3
  68. package/dist/{chunk-IBUQWVYA.mjs → chunk-AX7S67YV.mjs} +43 -40
  69. package/dist/{chunk-CUM5NYL5.mjs → chunk-AXB5P7BK.mjs} +1 -1
  70. package/dist/{chunk-2ZYGC6SS.cjs → chunk-B6IMBBOS.cjs} +3 -3
  71. package/dist/{chunk-472NCAZ7.cjs → chunk-B77AUCBV.cjs} +3 -3
  72. package/dist/{chunk-FWE7LEQC.cjs → chunk-BD3D7EZV.cjs} +4 -4
  73. package/dist/{chunk-H5CLOUZS.cjs → chunk-BMOBTMDR.cjs} +5 -5
  74. package/dist/{chunk-CQMVIOYP.mjs → chunk-BPGO2IEP.mjs} +7 -7
  75. package/dist/{chunk-E2ROOWQC.cjs → chunk-BPOTSHDO.cjs} +24 -87
  76. package/dist/chunk-BRYPZIMB.mjs +6 -0
  77. package/dist/{chunk-WFRT7JPX.mjs → chunk-BYQVROIP.mjs} +2 -2
  78. package/dist/{chunk-HALDNTIV.mjs → chunk-BYR3RQPB.mjs} +10 -73
  79. package/dist/{chunk-IWZKTWHZ.cjs → chunk-CA62IQY3.cjs} +7 -2
  80. package/dist/chunk-CALY6QG6.mjs +963 -0
  81. package/dist/{chunk-WC5UV2HQ.cjs → chunk-CBXBGM72.cjs} +2 -2
  82. package/dist/{chunk-WW46B6HA.cjs → chunk-CGR525MJ.cjs} +84 -45
  83. package/dist/{chunk-6V4TDWEC.cjs → chunk-CGVPXIRN.cjs} +18 -1
  84. package/dist/{chunk-TYMMBFN2.mjs → chunk-CKFK3Z2V.mjs} +1 -1
  85. package/dist/chunk-CZS6OACQ.mjs +63 -0
  86. package/dist/{chunk-SGBJ247Q.cjs → chunk-D4ROBNTK.cjs} +2 -2
  87. package/dist/{chunk-WEW2JVA4.cjs → chunk-D5IHNDHI.cjs} +6 -6
  88. package/dist/{chunk-ULASELLA.cjs → chunk-DATEWH3W.cjs} +13 -1
  89. package/dist/{chunk-KKSTAEMY.cjs → chunk-DKU6NXRK.cjs} +1 -1
  90. package/dist/{chunk-NBBEQLOK.cjs → chunk-E55H6UKH.cjs} +9 -9
  91. package/dist/{chunk-YR2VBEMO.cjs → chunk-EGCT3AHF.cjs} +1455 -8187
  92. package/dist/{chunk-SDOTRX3V.cjs → chunk-EORXKFLR.cjs} +7 -7
  93. package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
  94. package/dist/{chunk-2DD4JMQC.cjs → chunk-EW4MEVLE.cjs} +30 -30
  95. package/dist/{chunk-TUBTR2OP.mjs → chunk-FCOLU5P6.mjs} +1173 -7905
  96. package/dist/chunk-FGH3ZXTP.mjs +1063 -0
  97. package/dist/{chunk-Q3NXS4MU.cjs → chunk-FLZ4H25A.cjs} +44 -32
  98. package/dist/chunk-FVPXT2JR.cjs +63 -0
  99. package/dist/{chunk-D2ULAULS.cjs → chunk-FXFKIJDA.cjs} +9 -7
  100. package/dist/chunk-GC3EM6H4.mjs +80 -0
  101. package/dist/chunk-GKQL726H.cjs +6096 -0
  102. package/dist/{chunk-5PWXMJOH.cjs → chunk-GNVEJUT5.cjs} +36 -36
  103. package/dist/{chunk-E3UK5IIB.cjs → chunk-GS3WR5HX.cjs} +5 -3
  104. package/dist/{chunk-QFW2IH5E.mjs → chunk-GZTUT75U.mjs} +5 -2
  105. package/dist/chunk-H3EGVQE5.mjs +22 -0
  106. package/dist/{chunk-KCQBAKIY.cjs → chunk-H44XGLFU.cjs} +36 -68
  107. package/dist/{chunk-LI2F57NI.mjs → chunk-H56MQYEG.mjs} +1 -1
  108. package/dist/chunk-HANGSYMB.mjs +67 -0
  109. package/dist/{chunk-5BWWFHR2.mjs → chunk-HBEBV7OZ.mjs} +3 -3
  110. package/dist/{chunk-RSOJ7DRT.mjs → chunk-HCSVR4YZ.mjs} +1 -58
  111. package/dist/{chunk-HZFM2LWQ.mjs → chunk-HKFBMHCD.mjs} +34 -2
  112. package/dist/{chunk-MLY2RP5R.mjs → chunk-I63UCMXW.mjs} +6 -2
  113. package/dist/{chunk-TO4GJ56K.cjs → chunk-I64GEPOB.cjs} +58 -18
  114. package/dist/{chunk-VNGH5MLF.mjs → chunk-I6UVKUYK.mjs} +1 -1
  115. package/dist/{chunk-EPYU2EBL.mjs → chunk-IF4NU2NG.mjs} +1 -1
  116. package/dist/{chunk-IVLZZZEI.mjs → chunk-IM7DY3ED.mjs} +1 -1
  117. package/dist/{chunk-A3EAIURZ.mjs → chunk-IMQO6ZUU.mjs} +2 -2
  118. package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
  119. package/dist/{chunk-XKVVMZP5.cjs → chunk-IRYK4Z5M.cjs} +4 -4
  120. package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
  121. package/dist/{chunk-7FPTZLKH.mjs → chunk-JIYYX7WU.mjs} +10 -8
  122. package/dist/{chunk-6MVFL3R5.cjs → chunk-JR4QCLJY.cjs} +1 -58
  123. package/dist/{chunk-Q2KB32T4.mjs → chunk-JXB6DVCO.mjs} +5 -5
  124. package/dist/{chunk-CGBDNNSM.cjs → chunk-KEXK442I.cjs} +44 -12
  125. package/dist/{chunk-5D2JIPLH.cjs → chunk-KK22JPQM.cjs} +10 -10
  126. package/dist/{chunk-EA5K5BKU.mjs → chunk-KNHBTJP6.mjs} +18 -1
  127. package/dist/{chunk-MVL2RAJW.mjs → chunk-KYN5ODF6.mjs} +1 -1
  128. package/dist/{chunk-TYJALEHQ.cjs → chunk-LDPKAYVS.cjs} +16 -16
  129. package/dist/chunk-LFHCG2DU.mjs +43 -0
  130. package/dist/{chunk-EK4QAEFZ.cjs → chunk-LZESP4IR.cjs} +25 -0
  131. package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
  132. package/dist/{chunk-EKF7KDFD.mjs → chunk-MNUSIXGS.mjs} +2 -2
  133. package/dist/{chunk-MYIZXDZA.mjs → chunk-MOSYH4CY.mjs} +1 -1
  134. package/dist/{chunk-4ZFL5GFN.cjs → chunk-OILHPMFX.cjs} +86 -26
  135. package/dist/{chunk-AJQTP4OO.mjs → chunk-OJ7JP7RJ.mjs} +1 -1
  136. package/dist/{chunk-7PEP3BUT.mjs → chunk-OLQ73ZO5.mjs} +2 -2
  137. package/dist/{chunk-5OKBARDN.cjs → chunk-OZN4XL6L.cjs} +10 -10
  138. package/dist/{chunk-T5OJPTVN.cjs → chunk-P4TYB4SF.cjs} +2 -2
  139. package/dist/chunk-P7XDC7UJ.mjs +92 -0
  140. package/dist/{chunk-4E5QXOCL.cjs → chunk-PGW7HZE2.cjs} +6 -6
  141. package/dist/{chunk-SHLXACIO.cjs → chunk-PJ42JESY.cjs} +1 -9
  142. package/dist/{chunk-U6QLDL3G.mjs → chunk-PNCM5MFD.mjs} +1 -1
  143. package/dist/{chunk-OAHTRMIC.mjs → chunk-PYQ3ZG4Z.mjs} +11 -11
  144. package/dist/{chunk-KMTGADN3.mjs → chunk-QCVIRVHE.mjs} +1 -9
  145. package/dist/{chunk-RWFLWR5J.cjs → chunk-QJM7A4CR.cjs} +17 -15
  146. package/dist/{chunk-VU6AAZVY.cjs → chunk-RHGK2JEN.cjs} +65 -62
  147. package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
  148. package/dist/{chunk-EMO6K4YY.cjs → chunk-SHFXCE5A.cjs} +7 -7
  149. package/dist/{chunk-EKN7NSZO.cjs → chunk-SZLNU3GJ.cjs} +8 -5
  150. package/dist/{chunk-WLL43JMO.mjs → chunk-T36UJS3X.mjs} +7 -5
  151. package/dist/{chunk-CNNOLE4O.mjs → chunk-T4II4MMW.mjs} +1 -1
  152. package/dist/{chunk-B6G5CKMC.mjs → chunk-T6DLMX5V.mjs} +11 -11
  153. package/dist/{chunk-4IE345DM.cjs → chunk-TAKG7ZCD.cjs} +14 -14
  154. package/dist/{chunk-SKVTP5PR.mjs → chunk-TFX4RTH2.mjs} +1 -62
  155. package/dist/chunk-TI7UANHI.cjs +77 -0
  156. package/dist/{chunk-ND2CWPOD.mjs → chunk-TS4JHGUJ.mjs} +1 -1
  157. package/dist/{chunk-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
  158. package/dist/{chunk-DRLKAXDM.mjs → chunk-UM3ZV5EP.mjs} +2 -2
  159. package/dist/{chunk-YWN746US.cjs → chunk-UMQAK3KP.cjs} +85 -54
  160. package/dist/chunk-UNJZGVPU.cjs +6 -0
  161. package/dist/{chunk-XKG2BLFN.cjs → chunk-UXMIFB44.cjs} +18 -35
  162. package/dist/{chunk-DMEPTZTI.mjs → chunk-VBN3UAPQ.mjs} +47 -7
  163. package/dist/chunk-VDRM36QB.cjs +963 -0
  164. package/dist/{chunk-RG4A6LB2.cjs → chunk-VNPXKF3G.cjs} +7 -7
  165. package/dist/chunk-VQDBNVOO.cjs +14 -0
  166. package/dist/chunk-VQGKD7RV.mjs +25 -0
  167. package/dist/{chunk-6HB6V3R7.mjs → chunk-WCWV25PG.mjs} +10 -27
  168. package/dist/{chunk-ZMSZZXOR.mjs → chunk-WDMIW6Q6.mjs} +0 -19
  169. package/dist/{chunk-4WVJLURN.mjs → chunk-WMHG64DA.mjs} +1 -1
  170. package/dist/{chunk-L4DD7ODZ.cjs → chunk-WSOBCAYO.cjs} +37 -35
  171. package/dist/{chunk-ARC7I3O2.mjs → chunk-WW374SGU.mjs} +1 -1
  172. package/dist/{chunk-J63ZH5OQ.cjs → chunk-X3GMHKO3.cjs} +2 -2
  173. package/dist/{chunk-VT4WFRHA.mjs → chunk-XJAEZCT6.mjs} +1 -1
  174. package/dist/{chunk-OCIEZME4.mjs → chunk-XKIUHXHW.mjs} +618 -343
  175. package/dist/{chunk-6XWDE2P2.cjs → chunk-XVIEGKTT.cjs} +30 -5
  176. package/dist/{chunk-N32CC42M.cjs → chunk-Y2GNNXGV.cjs} +72 -54
  177. package/dist/{chunk-ZJD2PN6Z.mjs → chunk-Y4QVEU67.mjs} +30 -18
  178. package/dist/chunk-Y5RG6B7S.mjs +77 -0
  179. package/dist/{chunk-QRKIMN7T.mjs → chunk-Y6LRPO2K.mjs} +13 -1
  180. package/dist/{chunk-BZHXGVMA.mjs → chunk-YJBWB6GF.mjs} +5 -3
  181. package/dist/{chunk-WXJLNP33.cjs → chunk-YR2P74F7.cjs} +9 -7
  182. package/dist/chunk-YZAKIXRL.cjs +67 -0
  183. package/dist/chunk-ZKVJYQPO.mjs +6095 -0
  184. package/dist/{chunk-POSPE3IO.mjs → chunk-ZOABCQGT.mjs} +27 -2
  185. package/dist/chunk-ZQRCSUSB.cjs +25 -0
  186. package/dist/{chunk-ZMMBIVQM.mjs → chunk-ZZGQD7A4.mjs} +16 -86
  187. package/dist/{client-plugins-DUrIYX9B.d.mts → client-plugins-B_5QbNrp.d.mts} +2551 -2653
  188. package/dist/{client-plugins-BvlNhGEB.d.ts → client-plugins-DgSfIWIF.d.ts} +2551 -2653
  189. package/dist/client-plugins.d.mts +5 -7
  190. package/dist/client-plugins.d.ts +5 -7
  191. package/dist/client.cjs +7 -7
  192. package/dist/client.d.mts +11 -12
  193. package/dist/client.d.ts +11 -12
  194. package/dist/client.mjs +6 -6
  195. package/dist/config.d.mts +5 -7
  196. package/dist/config.d.ts +5 -7
  197. package/dist/{devtools-VQWJANJV.cjs → devtools-ANJ7JAPQ.cjs} +21 -18
  198. package/dist/{devtools-JYJNOLPQ.mjs → devtools-VEQQDVHE.mjs} +20 -17
  199. package/dist/docs.cjs +23 -20
  200. package/dist/docs.d.mts +6 -8
  201. package/dist/docs.d.ts +6 -8
  202. package/dist/docs.mjs +22 -19
  203. package/dist/{endpoint-CA-TNX60.d.ts → endpoint-BOE0IAaG.d.ts} +6 -3
  204. package/dist/{endpoint-CCHFqyTE.d.mts → endpoint-DGZRZHux.d.mts} +6 -3
  205. package/dist/environment/vite.cjs +6 -2
  206. package/dist/environment/vite.d.mts +11 -2
  207. package/dist/environment/vite.d.ts +11 -2
  208. package/dist/environment/vite.mjs +5 -1
  209. package/dist/headers.cjs +4 -4
  210. package/dist/headers.mjs +3 -3
  211. package/dist/image/server.cjs +7 -3
  212. package/dist/image/server.d.mts +9 -1
  213. package/dist/image/server.d.ts +9 -1
  214. package/dist/image/server.mjs +6 -2
  215. package/dist/image/sharp.cjs +12 -10
  216. package/dist/image/sharp.mjs +4 -2
  217. package/dist/index.cjs +89 -69
  218. package/dist/index.d.mts +27 -24
  219. package/dist/index.d.ts +27 -24
  220. package/dist/index.mjs +102 -82
  221. package/dist/{integration-api-BPJo5oXb.d.ts → integration-api-BuPHMeKz.d.ts} +2 -2
  222. package/dist/{integration-api-0y4FXJpC.d.mts → integration-api-DWyMmvrR.d.mts} +2 -2
  223. package/dist/integration-orm-P2II2EBK.cjs +14 -0
  224. package/dist/{integration-orm-KV5B3BGZ.mjs → integration-orm-RBKCIQYZ.mjs} +4 -3
  225. package/dist/integrations.cjs +7 -5
  226. package/dist/integrations.d.mts +7 -9
  227. package/dist/integrations.d.ts +7 -9
  228. package/dist/integrations.mjs +6 -4
  229. package/dist/internal/app-markdown-runtime.cjs +6 -5
  230. package/dist/internal/app-markdown-runtime.d.mts +6 -8
  231. package/dist/internal/app-markdown-runtime.d.ts +6 -8
  232. package/dist/internal/app-markdown-runtime.mjs +5 -4
  233. package/dist/internal/build-runtime.cjs +57 -56
  234. package/dist/internal/build-runtime.d.mts +7 -9
  235. package/dist/internal/build-runtime.d.ts +7 -9
  236. package/dist/internal/build-runtime.mjs +56 -55
  237. package/dist/internal/cli-runtime.cjs +36 -30
  238. package/dist/internal/cli-runtime.mjs +36 -30
  239. package/dist/internal/client-error-overlay.cjs +4 -4
  240. package/dist/internal/client-error-overlay.mjs +1 -1
  241. package/dist/internal/compression-runtime.d.mts +5 -7
  242. package/dist/internal/compression-runtime.d.ts +5 -7
  243. package/dist/internal/config-runtime.cjs +21 -18
  244. package/dist/internal/config-runtime.d.mts +6 -8
  245. package/dist/internal/config-runtime.d.ts +6 -8
  246. package/dist/internal/config-runtime.mjs +20 -17
  247. package/dist/internal/docs-precompiled-runtime.cjs +3 -3
  248. package/dist/internal/docs-precompiled-runtime.mjs +2 -2
  249. package/dist/internal/infra-analytics-runtime.cjs +7 -7
  250. package/dist/internal/infra-analytics-runtime.mjs +5 -5
  251. package/dist/internal/metadata-image-runtime.cjs +4 -3
  252. package/dist/internal/metadata-image-runtime.mjs +3 -2
  253. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  254. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  255. package/dist/internal/production-node-env.cjs +2 -2
  256. package/dist/internal/production-node-env.mjs +1 -1
  257. package/dist/internal/production-runtime.cjs +47 -28
  258. package/dist/internal/production-runtime.d.mts +25 -14
  259. package/dist/internal/production-runtime.d.ts +25 -14
  260. package/dist/internal/production-runtime.mjs +50 -31
  261. package/dist/layers-CM5i6T7z.d.mts +55 -0
  262. package/dist/layers-CM5i6T7z.d.ts +55 -0
  263. package/dist/markdown.cjs +4 -4
  264. package/dist/markdown.d.mts +5 -7
  265. package/dist/markdown.d.ts +5 -7
  266. package/dist/markdown.mjs +3 -3
  267. package/dist/middleware.cjs +16 -10
  268. package/dist/middleware.d.mts +7 -9
  269. package/dist/middleware.d.ts +7 -9
  270. package/dist/middleware.mjs +19 -13
  271. package/dist/navigation.cjs +6 -6
  272. package/dist/navigation.d.mts +8 -9
  273. package/dist/navigation.d.ts +8 -9
  274. package/dist/navigation.mjs +5 -5
  275. package/dist/{nitro-MPZJGPXK.mjs → nitro-NFG2LBRC.mjs} +3 -2
  276. package/dist/{nitro-7F65EZZS.cjs → nitro-S2QABUFA.cjs} +4 -3
  277. package/dist/observability.cjs +2 -2
  278. package/dist/observability.mjs +1 -1
  279. package/dist/plugin-DBBZ4JI2.cjs +32 -0
  280. package/dist/plugin-SYMK7PQ2.mjs +32 -0
  281. package/dist/plugin.cjs +56 -43
  282. package/dist/plugin.d.mts +23 -7
  283. package/dist/plugin.d.ts +23 -7
  284. package/dist/plugin.mjs +57 -44
  285. package/dist/{production-runtime-D2aMyzjr.d.ts → production-runtime-DfknD3g_.d.ts} +17 -3
  286. package/dist/{production-runtime-BQ4_WLwQ.d.mts → production-runtime-j_WCfuwB.d.mts} +17 -3
  287. package/dist/programmatic-routes-client-DcoxEaLe.d.mts +55 -0
  288. package/dist/programmatic-routes-client-DcoxEaLe.d.ts +55 -0
  289. package/dist/query/client.cjs +8 -8
  290. package/dist/query/client.mjs +3 -3
  291. package/dist/{render-plan-25p4hrj4.d.ts → render-plan-CFIhcYYS.d.ts} +1 -1
  292. package/dist/{render-plan-DtkXMN8D.d.mts → render-plan-ChUtsymc.d.mts} +1 -1
  293. package/dist/renderer-client.cjs +5 -5
  294. package/dist/renderer-client.d.mts +7 -8
  295. package/dist/renderer-client.d.ts +7 -8
  296. package/dist/renderer-client.mjs +2 -2
  297. package/dist/{request-DgCkIdcn.d.mts → request-F4HRwzSd.d.mts} +1 -1
  298. package/dist/{request-jF4jwx8f.d.ts → request-RJvelT8L.d.ts} +1 -1
  299. package/dist/request.cjs +3 -3
  300. package/dist/request.d.mts +6 -8
  301. package/dist/request.d.ts +6 -8
  302. package/dist/request.mjs +2 -2
  303. package/dist/{route-rendering-Bji6S6a_.d.ts → route-rendering-3a4fbNyC.d.mts} +1 -1
  304. package/dist/{route-rendering-CSBF78Ya.d.mts → route-rendering-D4coJ-kw.d.ts} +1 -1
  305. package/dist/{router-B09Ui3Qm.d.mts → router-DqIssGRO.d.mts} +1 -1
  306. package/dist/{router-CPB9cXtG.d.ts → router-WLEW3Te1.d.ts} +1 -1
  307. package/dist/routes.cjs +6 -5
  308. package/dist/routes.d.mts +5 -7
  309. package/dist/routes.d.ts +5 -7
  310. package/dist/routes.mjs +5 -4
  311. package/dist/{runtime-EDMwLdjv.d.ts → runtime-BrNdLOq9.d.ts} +3 -3
  312. package/dist/{runtime-CM6E6yuI.d.mts → runtime-CmE_j-js.d.mts} +3 -3
  313. package/dist/{schema-dev-notice-Y7MQEFGN.cjs → schema-dev-notice-5JPE67AI.cjs} +6 -4
  314. package/dist/{schema-dev-notice-O67CPXJ6.mjs → schema-dev-notice-WLPZ6WKU.mjs} +4 -2
  315. package/dist/server-action-security.cjs +4 -3
  316. package/dist/server-action-security.mjs +3 -2
  317. package/dist/server-client-bridge-DKWDl5NB.d.mts +7 -0
  318. package/dist/server-client-bridge-DKWDl5NB.d.ts +7 -0
  319. package/dist/server-fn-client.d.mts +3 -3
  320. package/dist/server-fn-client.d.ts +3 -3
  321. package/dist/server-fn.cjs +8 -7
  322. package/dist/server-fn.d.mts +1 -1
  323. package/dist/server-fn.d.ts +1 -1
  324. package/dist/server-fn.mjs +7 -6
  325. package/dist/server-plugins.cjs +5 -5
  326. package/dist/server-plugins.d.mts +6 -8
  327. package/dist/server-plugins.d.ts +6 -8
  328. package/dist/server-plugins.mjs +4 -4
  329. package/dist/server-query-client.d.mts +1 -1
  330. package/dist/server-query-client.d.ts +1 -1
  331. package/dist/server-query.cjs +9 -8
  332. package/dist/server-query.d.mts +1 -1
  333. package/dist/server-query.d.ts +1 -1
  334. package/dist/server-query.mjs +8 -7
  335. package/dist/server.cjs +97 -73
  336. package/dist/server.d.mts +16 -12
  337. package/dist/server.d.ts +16 -12
  338. package/dist/server.mjs +82 -58
  339. package/dist/{spa-router-Cgimzfbi.d.mts → spa-router-C41zjnFl.d.mts} +2 -2
  340. package/dist/{spa-router-B_N8XgVu.d.ts → spa-router-D_0VXqPC.d.ts} +2 -2
  341. package/dist/storage.cjs +6 -2
  342. package/dist/storage.d.mts +9 -1
  343. package/dist/storage.d.ts +9 -1
  344. package/dist/storage.mjs +5 -1
  345. package/dist/testing.cjs +20 -18
  346. package/dist/testing.d.mts +6 -8
  347. package/dist/testing.d.ts +6 -8
  348. package/dist/testing.mjs +16 -14
  349. package/dist/theme/server.cjs +4 -4
  350. package/dist/theme/server.mjs +3 -3
  351. package/dist/{utils-DZciYXYl.d.mts → utils-BKWSe3S7.d.mts} +1 -1
  352. package/dist/{utils-BNxAKAuT.d.ts → utils-YYcWsOJp.d.ts} +1 -1
  353. package/dist/version.cjs +2 -2
  354. package/dist/version.mjs +1 -1
  355. package/dist/vite.cjs +58 -45
  356. package/dist/vite.d.mts +92 -10
  357. package/dist/vite.d.ts +92 -10
  358. package/dist/vite.mjs +59 -46
  359. package/dist/{workflows-jZ4BcdoZ.d.ts → workflows-IWP1ddBm.d.mts} +5 -2
  360. package/dist/{workflows-jZ4BcdoZ.d.mts → workflows-IWP1ddBm.d.ts} +5 -2
  361. package/dist/workflows.cjs +4 -3
  362. package/dist/workflows.d.mts +1 -1
  363. package/dist/workflows.d.ts +1 -1
  364. package/dist/workflows.mjs +3 -2
  365. package/package.json +2 -1
  366. package/dist/chunk-3SDFA7UF.cjs +0 -701
  367. package/dist/chunk-E5GNDG5F.mjs +0 -701
  368. package/dist/integration-orm-55F7CII5.cjs +0 -13
@@ -7,13 +7,13 @@ var _chunkSU7MH53Pcjs = require('./chunk-SU7MH53P.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkFWE7LEQCcjs = require('./chunk-FWE7LEQC.cjs');
10
+ var _chunkBD3D7EZVcjs = require('./chunk-BD3D7EZV.cjs');
11
11
 
12
12
 
13
13
  var _chunkS6FJO323cjs = require('./chunk-S6FJO323.cjs');
14
14
 
15
15
 
16
- var _chunkULASELLAcjs = require('./chunk-ULASELLA.cjs');
16
+ var _chunkDATEWH3Wcjs = require('./chunk-DATEWH3W.cjs');
17
17
 
18
18
 
19
19
  var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
@@ -52,7 +52,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, shouldBlockUnload, "shouldBlockUnload");
52
52
  function navigateViaRouter(href, basePath, replace, options = {}) {
53
53
  if (typeof window === "undefined") return;
54
54
  const url = _chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, href, basePath);
55
- const spaRouter = _chunkFWE7LEQCcjs.getInstalledFarmSPARouter.call(void 0, );
55
+ const spaRouter = _chunkBD3D7EZVcjs.getInstalledFarmSPARouter.call(void 0, );
56
56
  if (spaRouter) {
57
57
  void spaRouter.navigate(url, {
58
58
  replace,
@@ -65,7 +65,7 @@ function navigateViaRouter(href, basePath, replace, options = {}) {
65
65
  } else {
66
66
  window.history.pushState(null, "", url);
67
67
  }
68
- _chunkFWE7LEQCcjs.notifyHistoryChange.call(void 0, "url-search");
68
+ _chunkBD3D7EZVcjs.notifyHistoryChange.call(void 0, "url-search");
69
69
  }
70
70
  _chunkS3JO3N4Hcjs.__name.call(void 0, navigateViaRouter, "navigateViaRouter");
71
71
  function useRouter(options = {}) {
@@ -85,7 +85,7 @@ function useRouter(options = {}) {
85
85
  setState(readRouterState(basePath, routeMatcher));
86
86
  }, "handlePopState");
87
87
  handlePopState();
88
- const unsubscribe = _chunkFWE7LEQCcjs.subscribeHistoryChange.call(void 0, handlePopState);
88
+ const unsubscribe = _chunkBD3D7EZVcjs.subscribeHistoryChange.call(void 0, handlePopState);
89
89
  return unsubscribe;
90
90
  }, [basePath, routeMatcher]);
91
91
  const push = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (href, navigateOptions) => {
@@ -96,11 +96,11 @@ function useRouter(options = {}) {
96
96
  }, "replace");
97
97
  const pushState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pageState, href) => {
98
98
  if (typeof window === "undefined") return;
99
- _chunkFWE7LEQCcjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
99
+ _chunkBD3D7EZVcjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
100
100
  }, "pushState");
101
101
  const replaceState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pageState, href) => {
102
102
  if (typeof window === "undefined") return;
103
- _chunkFWE7LEQCcjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
103
+ _chunkBD3D7EZVcjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
104
104
  }, "replaceState");
105
105
  const back = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
106
106
  if (typeof window !== "undefined") {
@@ -124,25 +124,25 @@ function useRouter(options = {}) {
124
124
  }
125
125
  _chunkS3JO3N4Hcjs.__name.call(void 0, useRouter, "useRouter");
126
126
  function usePageState() {
127
- const [state, setState] = _react.useState.call(void 0, () => _chunkFWE7LEQCcjs.readPageState.call(void 0, ));
127
+ const [state, setState] = _react.useState.call(void 0, () => _chunkBD3D7EZVcjs.readPageState.call(void 0, ));
128
128
  _react.useEffect.call(void 0, () => {
129
129
  if (typeof window === "undefined") return;
130
130
  const handlePopState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
131
- setState(_chunkFWE7LEQCcjs.readPageState.call(void 0, ));
131
+ setState(_chunkBD3D7EZVcjs.readPageState.call(void 0, ));
132
132
  }, "handlePopState");
133
133
  handlePopState();
134
- return _chunkFWE7LEQCcjs.subscribeHistoryChange.call(void 0, handlePopState);
134
+ return _chunkBD3D7EZVcjs.subscribeHistoryChange.call(void 0, handlePopState);
135
135
  }, []);
136
136
  return state;
137
137
  }
138
138
  _chunkS3JO3N4Hcjs.__name.call(void 0, usePageState, "usePageState");
139
139
  function useNavigation() {
140
140
  const [state, setState] = _react.useState.call(void 0,
141
- () => _chunkFWE7LEQCcjs.getRouter.call(void 0, ).getNavigationState()
141
+ () => _chunkBD3D7EZVcjs.getRouter.call(void 0, ).getNavigationState()
142
142
  );
143
143
  _react.useEffect.call(void 0, () => {
144
144
  if (typeof window === "undefined") return;
145
- return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).subscribeNavigation(setState);
145
+ return _chunkBD3D7EZVcjs.getRouter.call(void 0, ).subscribeNavigation(setState);
146
146
  }, []);
147
147
  return state;
148
148
  }
@@ -155,7 +155,7 @@ function useBlocker(options) {
155
155
  if (typeof window === "undefined" || !active) {
156
156
  return;
157
157
  }
158
- return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).addBlocker(
158
+ return _chunkBD3D7EZVcjs.getRouter.call(void 0, ).addBlocker(
159
159
  async (context) => {
160
160
  const current = optionsRef.current;
161
161
  const when = typeof current.when === "function" ? current.when(context) : current.when;
@@ -179,7 +179,7 @@ function useScrollRestoration(key) {
179
179
  _react.useEffect.call(void 0, () => {
180
180
  const element = ref.current;
181
181
  if (!element) return;
182
- return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).registerScrollElement(key, element);
182
+ return _chunkBD3D7EZVcjs.getRouter.call(void 0, ).registerScrollElement(key, element);
183
183
  }, [key]);
184
184
  return ref;
185
185
  }
@@ -201,7 +201,7 @@ function readRouterState(basePath, routeMatcher) {
201
201
  pathname,
202
202
  searchParams: url.searchParams,
203
203
  params: _optionalChain([routeMatcher, 'optionalAccess', _5 => _5.match, 'call', _6 => _6(routePathname), 'optionalAccess', _7 => _7.params]) || {},
204
- pageState: typeof window === "undefined" ? null : _chunkFWE7LEQCcjs.readPageState.call(void 0, )
204
+ pageState: typeof window === "undefined" ? null : _chunkBD3D7EZVcjs.readPageState.call(void 0, )
205
205
  };
206
206
  }
207
207
  _chunkS3JO3N4Hcjs.__name.call(void 0, readRouterState, "readRouterState");
@@ -213,7 +213,7 @@ function readCurrentUrl() {
213
213
  return void 0;
214
214
  }
215
215
  }
216
- const request = _chunkULASELLAcjs._resolveCurrentRequest.call(void 0, );
216
+ const request = _chunkDATEWH3Wcjs._resolveCurrentRequest.call(void 0, );
217
217
  if (!request) return void 0;
218
218
  try {
219
219
  return new URL(request.url);
@@ -0,0 +1,43 @@
1
+ import {
2
+ isRouteSlotSegment,
3
+ parseInterceptionMarker
4
+ } from "./chunk-RHAZ22ZN.mjs";
5
+ import {
6
+ __name
7
+ } from "./chunk-LPEX4YW6.mjs";
8
+
9
+ // src/middleware/path.ts
10
+ function appendMiddlewareRoutePath(routePath, directoryName) {
11
+ const marker = parseInterceptionMarker(directoryName);
12
+ if (marker) {
13
+ const owner = routePath.split("/").filter(Boolean);
14
+ const parts = [
15
+ ...marker.root ? [] : owner.slice(0, Math.max(0, owner.length - marker.up)),
16
+ ...marker.remainder ? [marker.remainder] : []
17
+ ];
18
+ return `/${parts.join("/")}`;
19
+ }
20
+ if (directoryName.startsWith("(") && directoryName.endsWith(")") || isRouteSlotSegment(directoryName)) {
21
+ return routePath;
22
+ }
23
+ return routePath === "/" ? `/${directoryName}` : `${routePath}/${directoryName}`;
24
+ }
25
+ __name(appendMiddlewareRoutePath, "appendMiddlewareRoutePath");
26
+ function appendMiddlewareDirectory(directory, directoryName) {
27
+ return directory === "" ? directoryName : `${directory}/${directoryName}`;
28
+ }
29
+ __name(appendMiddlewareDirectory, "appendMiddlewareDirectory");
30
+ function countSegments(value) {
31
+ return value.split("/").filter(Boolean).length;
32
+ }
33
+ __name(countSegments, "countSegments");
34
+ function compareMiddlewareRouteLocations(left, right) {
35
+ return countSegments(left.path) - countSegments(right.path) || left.path.localeCompare(right.path) || countSegments(left.directory) - countSegments(right.directory) || left.directory.localeCompare(right.directory);
36
+ }
37
+ __name(compareMiddlewareRouteLocations, "compareMiddlewareRouteLocations");
38
+
39
+ export {
40
+ appendMiddlewareRoutePath,
41
+ appendMiddlewareDirectory,
42
+ compareMiddlewareRouteLocations
43
+ };
@@ -304,6 +304,13 @@ function appendOpenGraph(tags, input, metadataBase, page) {
304
304
  appendMetaProperty(tags, "og:image:alt", image.alt);
305
305
  appendMetaProperty(tags, "og:image:type", image.type);
306
306
  }
307
+ for (const video of normalizeMetadataVideos(openGraph.videos, metadataBase)) {
308
+ appendMetaProperty(tags, "og:video", video.url);
309
+ appendMetaProperty(tags, "og:video:secure_url", video.secureUrl);
310
+ appendMetaProperty(tags, "og:video:type", video.type);
311
+ appendMetaProperty(tags, "og:video:width", video.width);
312
+ appendMetaProperty(tags, "og:video:height", video.height);
313
+ }
307
314
  if (openGraph.type === "article") {
308
315
  appendMetaProperty(tags, "article:published_time", normalizeDate(openGraph.publishedTime));
309
316
  appendMetaProperty(tags, "article:modified_time", normalizeDate(openGraph.modifiedTime));
@@ -432,6 +439,24 @@ function normalizeMetadataImages(value, metadataBase) {
432
439
  }).filter((item) => item !== null);
433
440
  }
434
441
  _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMetadataImages, "normalizeMetadataImages");
442
+ function normalizeMetadataVideos(value, metadataBase) {
443
+ return normalizeArray(value).map((item) => {
444
+ if (typeof item === "string") {
445
+ return { url: resolveMetadataUrl(item, metadataBase) || item };
446
+ }
447
+ if (!isRecord(item)) return null;
448
+ const url = resolveMetadataUrl(item.url, metadataBase);
449
+ if (!url) return null;
450
+ return {
451
+ url,
452
+ secureUrl: resolveMetadataUrl(item.secureUrl, metadataBase) || void 0,
453
+ width: normalizeNumber(item.width),
454
+ height: normalizeNumber(item.height),
455
+ type: typeof item.type === "string" ? item.type : void 0
456
+ };
457
+ }).filter((item) => item !== null);
458
+ }
459
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMetadataVideos, "normalizeMetadataVideos");
435
460
  function normalizeArray(value) {
436
461
  if (value == null) return [];
437
462
  return Array.isArray(value) ? value : [value];
@@ -58,8 +58,45 @@ function describeIntegrationOriginRejection(reason) {
58
58
  }
59
59
  __name(describeIntegrationOriginRejection, "describeIntegrationOriginRejection");
60
60
 
61
+ // src/api/route-schema.ts
62
+ async function parseRouteSchema(schema, value) {
63
+ if (schema.parseAsync) return schema.parseAsync(value);
64
+ if (schema["~standard"]) {
65
+ const result = await schema["~standard"].validate(value);
66
+ if (result.issues)
67
+ throw Object.assign(new Error("Validation failed"), { issues: result.issues });
68
+ return result.value;
69
+ }
70
+ if (schema.parse) return schema.parse(value);
71
+ throw new TypeError("Route validators must implement Standard Schema or parse().");
72
+ }
73
+ __name(parseRouteSchema, "parseRouteSchema");
74
+ var PUBLIC_MESSAGE_CODES = /* @__PURE__ */ new Set(["custom", "invalid_type"]);
75
+ function toPublicValidationIssues(error) {
76
+ const issues = error?.issues;
77
+ const list = Array.isArray(issues) ? issues : Array.isArray(error?.errors) ? error.errors : [];
78
+ return list.map((issue) => {
79
+ const { path, code, message } = issue ?? {};
80
+ return {
81
+ path: Array.isArray(path) ? path.map(toPublicPathSegment) : [],
82
+ ...typeof code === "string" ? { code } : {},
83
+ message: PUBLIC_MESSAGE_CODES.has(code) && typeof message === "string" && message ? message : "Invalid value"
84
+ };
85
+ });
86
+ }
87
+ __name(toPublicValidationIssues, "toPublicValidationIssues");
88
+ function toPublicPathSegment(segment) {
89
+ const key = segment && typeof segment === "object" && "key" in segment ? segment.key : segment;
90
+ if (typeof key === "number") return key;
91
+ if (typeof key === "symbol") return key.description || key.toString();
92
+ return String(key);
93
+ }
94
+ __name(toPublicPathSegment, "toPublicPathSegment");
95
+
61
96
  export {
62
97
  resolveIntegrationAllowedOrigins,
63
98
  validateIntegrationRequestOrigin,
64
- describeIntegrationOriginRejection
99
+ describeIntegrationOriginRejection,
100
+ parseRouteSchema,
101
+ toPublicValidationIssues
65
102
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  MiddlewareManager
3
- } from "./chunk-JCKYH4LG.mjs";
3
+ } from "./chunk-45UZKX2J.mjs";
4
4
  import {
5
5
  matchesMiddlewarePredicate
6
- } from "./chunk-HZFM2LWQ.mjs";
6
+ } from "./chunk-HKFBMHCD.mjs";
7
7
  import {
8
8
  resolveFarmI18nConfig
9
9
  } from "./chunk-BCMSYSN2.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PROGRAMMATIC_ROUTE_FILE_NAMES,
3
3
  scanProgrammaticPagePaths
4
- } from "./chunk-EA5K5BKU.mjs";
4
+ } from "./chunk-KNHBTJP6.mjs";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-LPEX4YW6.mjs";
@@ -5,66 +5,81 @@ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
5
5
  // src/storage/index.ts
6
6
  var _unstorage = require('unstorage');
7
7
  var _memory = require('unstorage/drivers/memory'); var _memory2 = _interopRequireDefault(_memory);
8
- var loadModule = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (specifier) => import(
9
- /* @vite-ignore */
10
- specifier
11
- ), "loadModule");
8
+ var STORAGE_MODULES_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.modules");
9
+ function getRegisteredStorageModules() {
10
+ return globalThis[STORAGE_MODULES_KEY];
11
+ }
12
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getRegisteredStorageModules, "getRegisteredStorageModules");
13
+ var loadModule = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (specifier) => {
14
+ const registered = _optionalChain([getRegisteredStorageModules, 'call', _ => _(), 'optionalAccess', _2 => _2[specifier]]);
15
+ return registered ? registered() : import(
16
+ /* @vite-ignore */
17
+ specifier
18
+ );
19
+ }, "loadModule");
20
+ function _registerFarmStorageModules(loaders) {
21
+ globalThis[STORAGE_MODULES_KEY] = {
22
+ ...getRegisteredStorageModules(),
23
+ ...loaders
24
+ };
25
+ }
26
+ _chunkS3JO3N4Hcjs.__name.call(void 0, _registerFarmStorageModules, "_registerFarmStorageModules");
12
27
  var DATABASE_CONNECTORS = {
13
28
  sqlite: {
14
29
  connector: "node-sqlite",
15
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/node-sqlite"), "load")
30
+ module: "db0/connectors/node-sqlite"
16
31
  },
17
32
  "node-sqlite": {
18
33
  connector: "node-sqlite",
19
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/node-sqlite"), "load")
34
+ module: "db0/connectors/node-sqlite"
20
35
  },
21
36
  sqlite3: {
22
37
  connector: "sqlite3",
23
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/sqlite3"), "load")
38
+ module: "db0/connectors/sqlite3"
24
39
  },
25
40
  "better-sqlite3": {
26
41
  connector: "better-sqlite3",
27
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/better-sqlite3"), "load")
42
+ module: "db0/connectors/better-sqlite3"
28
43
  },
29
44
  postgres: {
30
45
  connector: "postgresql",
31
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/postgresql"), "load")
46
+ module: "db0/connectors/postgresql"
32
47
  },
33
48
  postgresql: {
34
49
  connector: "postgresql",
35
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/postgresql"), "load")
50
+ module: "db0/connectors/postgresql"
36
51
  },
37
52
  pg: {
38
53
  connector: "postgresql",
39
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/postgresql"), "load")
54
+ module: "db0/connectors/postgresql"
40
55
  },
41
56
  mysql: {
42
57
  connector: "mysql2",
43
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/mysql2"), "load")
58
+ module: "db0/connectors/mysql2"
44
59
  },
45
60
  mysql2: {
46
61
  connector: "mysql2",
47
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/mysql2"), "load")
62
+ module: "db0/connectors/mysql2"
48
63
  },
49
64
  pglite: {
50
65
  connector: "pglite",
51
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/pglite"), "load")
66
+ module: "db0/connectors/pglite"
52
67
  },
53
68
  planetscale: {
54
69
  connector: "planetscale",
55
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/planetscale"), "load")
70
+ module: "db0/connectors/planetscale"
56
71
  },
57
72
  libsql: {
58
73
  connector: "libsql",
59
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/libsql/node"), "load")
74
+ module: "db0/connectors/libsql/node"
60
75
  },
61
76
  "libsql-node": {
62
77
  connector: "libsql-node",
63
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/libsql/node"), "load")
78
+ module: "db0/connectors/libsql/node"
64
79
  },
65
80
  "libsql-http": {
66
81
  connector: "libsql-http",
67
- load: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => loadModule("db0/connectors/libsql/http"), "load")
82
+ module: "db0/connectors/libsql/http"
68
83
  }
69
84
  };
70
85
  function createMemoryStorage() {
@@ -133,6 +148,7 @@ function extractDriverOptions(config) {
133
148
  }
134
149
  _chunkS3JO3N4Hcjs.__name.call(void 0, extractDriverOptions, "extractDriverOptions");
135
150
  async function loadBuiltinDriver(name, options) {
151
+ if (name === "memory") return _memory2.default.call(void 0, );
136
152
  const modulePath = _unstorage.builtinDrivers[name];
137
153
  if (!modulePath) {
138
154
  throw new Error(`Unsupported storage driver "${name}".`);
@@ -145,7 +161,7 @@ async function loadDatabaseDriver(config) {
145
161
  const connectorEntry = DATABASE_CONNECTORS[config.driver];
146
162
  const [{ createDatabase }, connectorModule, db0DriverModule] = await Promise.all([
147
163
  loadModule("db0"),
148
- connectorEntry.load(),
164
+ loadModule(connectorEntry.module),
149
165
  loadModule("unstorage/drivers/db0")
150
166
  ]);
151
167
  const database = createDatabase(connectorModule.default(extractDriverOptions(config) || {}));
@@ -165,7 +181,7 @@ async function resolveDriver(config) {
165
181
  if (config && isStorageClient(config)) {
166
182
  return config.resolveDriver();
167
183
  }
168
- const driverInput = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _ => _.driver]), () => ( "memory"));
184
+ const driverInput = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _3 => _3.driver]), () => ( "memory"));
169
185
  if (typeof driverInput === "function") {
170
186
  return await driverInput();
171
187
  }
@@ -184,7 +200,8 @@ async function resolveDriver(config) {
184
200
  );
185
201
  }
186
202
  _chunkS3JO3N4Hcjs.__name.call(void 0, resolveDriver, "resolveDriver");
187
- function createStorageClientFromResolver(resolveDriver2) {
203
+ var STORAGE_CLIENT_MODULES_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.clientModules");
204
+ function createStorageClientFromResolver(resolveDriver2, modules = []) {
188
205
  let driverPromise;
189
206
  let storagePromise;
190
207
  const ensureDriver = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
@@ -216,7 +233,8 @@ function createStorageClientFromResolver(resolveDriver2) {
216
233
  kind: "farm-storage-client",
217
234
  ready: ensureStorage,
218
235
  createStorage: ensureStorage,
219
- resolveDriver: ensureDriver
236
+ resolveDriver: ensureDriver,
237
+ [STORAGE_CLIENT_MODULES_KEY]: modules
220
238
  };
221
239
  return new Proxy(target, {
222
240
  get(currentTarget, prop, receiver) {
@@ -249,7 +267,10 @@ function defineStorageClient(resolveDriver2) {
249
267
  }
250
268
  _chunkS3JO3N4Hcjs.__name.call(void 0, defineStorageClient, "defineStorageClient");
251
269
  function createStorageClient(config) {
252
- return defineStorageClient(() => resolveDriver(config));
270
+ return createStorageClientFromResolver(
271
+ () => resolveDriver(config),
272
+ _collectFarmStorageModules(config)
273
+ );
253
274
  }
254
275
  _chunkS3JO3N4Hcjs.__name.call(void 0, createStorageClient, "createStorageClient");
255
276
  function driverStorage(driver) {
@@ -257,14 +278,14 @@ function driverStorage(driver) {
257
278
  }
258
279
  _chunkS3JO3N4Hcjs.__name.call(void 0, driverStorage, "driverStorage");
259
280
  function databaseStorage(database, options = {}) {
260
- return defineStorageClient(async () => {
281
+ return createStorageClientFromResolver(async () => {
261
282
  const db0DriverModule = await loadModule("unstorage/drivers/db0");
262
283
  const { dispose: _dispose, ...driver } = db0DriverModule.default({
263
284
  database,
264
285
  tableName: options.tableName
265
286
  });
266
287
  return driver;
267
- });
288
+ }, ["unstorage/drivers/db0"]);
268
289
  }
269
290
  _chunkS3JO3N4Hcjs.__name.call(void 0, databaseStorage, "databaseStorage");
270
291
  function memoryStorage() {
@@ -377,6 +398,38 @@ function vercelBlobStorage(options) {
377
398
  });
378
399
  }
379
400
  _chunkS3JO3N4Hcjs.__name.call(void 0, vercelBlobStorage, "vercelBlobStorage");
401
+ function collectDriverModules(config, modules) {
402
+ if (!config || typeof config !== "object") return;
403
+ if (isStorageClient(config)) {
404
+ const clientModules = config[STORAGE_CLIENT_MODULES_KEY];
405
+ if (Array.isArray(clientModules)) for (const module of clientModules) modules.add(module);
406
+ return;
407
+ }
408
+ if (isStorageInstance(config)) return;
409
+ const source = config;
410
+ const driver = source.driver;
411
+ if (typeof driver === "string") {
412
+ if (isDatabaseDriverName(driver)) {
413
+ modules.add("db0");
414
+ modules.add(DATABASE_CONNECTORS[driver].module);
415
+ modules.add("unstorage/drivers/db0");
416
+ } else if (driver !== "memory") {
417
+ const module = _unstorage.builtinDrivers[driver === "local" ? "fs-lite" : driver];
418
+ if (module) modules.add(module);
419
+ }
420
+ }
421
+ collectDriverModules(source.client, modules);
422
+ if (source.mounts && typeof source.mounts === "object") {
423
+ for (const mount of Object.values(source.mounts)) collectDriverModules(mount, modules);
424
+ }
425
+ }
426
+ _chunkS3JO3N4Hcjs.__name.call(void 0, collectDriverModules, "collectDriverModules");
427
+ function _collectFarmStorageModules(config) {
428
+ const modules = /* @__PURE__ */ new Set();
429
+ collectDriverModules(config, modules);
430
+ return [...modules];
431
+ }
432
+ _chunkS3JO3N4Hcjs.__name.call(void 0, _collectFarmStorageModules, "_collectFarmStorageModules");
380
433
  async function mountNamespaces(storage, mounts) {
381
434
  if (!mounts) {
382
435
  return;
@@ -434,6 +487,11 @@ function getStorage(namespace) {
434
487
  globalStorage = getActiveGlobalStorage();
435
488
  const base = normalizeMountKey(namespace);
436
489
  if (!base) {
490
+ if (namespace) {
491
+ throw new TypeError(
492
+ `getStorage(${JSON.stringify(namespace)}) names no namespace. Pass a non-empty name, or call getStorage() for the root store.`
493
+ );
494
+ }
437
495
  return globalStorage;
438
496
  }
439
497
  const namespaced = _unstorage.prefixStorage.call(void 0, globalStorage, base);
@@ -517,4 +575,6 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, disposeStorage, "disposeStorage");
517
575
 
518
576
 
519
577
 
520
- exports.defineStorageClient = defineStorageClient; exports.createStorageClient = createStorageClient; exports.driverStorage = driverStorage; exports.databaseStorage = databaseStorage; exports.memoryStorage = memoryStorage; exports.localStorage = localStorage; exports.sqliteStorage = sqliteStorage; exports.mysqlStorage = mysqlStorage; exports.mysql2Storage = mysql2Storage; exports.postgresStorage = postgresStorage; exports.pgStorage = pgStorage; exports.pgliteStorage = pgliteStorage; exports.planetscaleStorage = planetscaleStorage; exports.libsqlStorage = libsqlStorage; exports.redisStorage = redisStorage; exports.s3Storage = s3Storage; exports.mongodbStorage = mongodbStorage; exports.upstashStorage = upstashStorage; exports.netlifyBlobsStorage = netlifyBlobsStorage; exports.vercelKVStorage = vercelKVStorage; exports.vercelBlobStorage = vercelBlobStorage; exports.createFarmStorage = createFarmStorage; exports.resolveStorageRuntimeClient = resolveStorageRuntimeClient; exports.initStorage = initStorage; exports.getStorage = getStorage; exports.disposeStorage = disposeStorage;
578
+
579
+
580
+ exports._registerFarmStorageModules = _registerFarmStorageModules; exports.defineStorageClient = defineStorageClient; exports.createStorageClient = createStorageClient; exports.driverStorage = driverStorage; exports.databaseStorage = databaseStorage; exports.memoryStorage = memoryStorage; exports.localStorage = localStorage; exports.sqliteStorage = sqliteStorage; exports.mysqlStorage = mysqlStorage; exports.mysql2Storage = mysql2Storage; exports.postgresStorage = postgresStorage; exports.pgStorage = pgStorage; exports.pgliteStorage = pgliteStorage; exports.planetscaleStorage = planetscaleStorage; exports.libsqlStorage = libsqlStorage; exports.redisStorage = redisStorage; exports.s3Storage = s3Storage; exports.mongodbStorage = mongodbStorage; exports.upstashStorage = upstashStorage; exports.netlifyBlobsStorage = netlifyBlobsStorage; exports.vercelKVStorage = vercelKVStorage; exports.vercelBlobStorage = vercelBlobStorage; exports._collectFarmStorageModules = _collectFarmStorageModules; exports.createFarmStorage = createFarmStorage; exports.resolveStorageRuntimeClient = resolveStorageRuntimeClient; exports.initStorage = initStorage; exports.getStorage = getStorage; exports.disposeStorage = disposeStorage;
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-5WI2S4CO.mjs";
9
9
  import {
10
10
  matchesFarmIfNoneMatch
11
- } from "./chunk-ZMMBIVQM.mjs";
11
+ } from "./chunk-ZZGQD7A4.mjs";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-LPEX4YW6.mjs";
@@ -7,13 +7,13 @@ import {
7
7
  notifyHistoryChange,
8
8
  readPageState,
9
9
  subscribeHistoryChange
10
- } from "./chunk-ND2CWPOD.mjs";
10
+ } from "./chunk-TS4JHGUJ.mjs";
11
11
  import {
12
12
  getFarmI18nClientState
13
13
  } from "./chunk-IHQIOZLC.mjs";
14
14
  import {
15
15
  _resolveCurrentRequest
16
- } from "./chunk-QRKIMN7T.mjs";
16
+ } from "./chunk-Y6LRPO2K.mjs";
17
17
  import {
18
18
  stripFarmLocaleFromPathname
19
19
  } from "./chunk-L3KT7IXV.mjs";
@@ -4,16 +4,16 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkT5OJPTVNcjs = require('./chunk-T5OJPTVN.cjs');
7
+ var _chunkP4TYB4SFcjs = require('./chunk-P4TYB4SF.cjs');
8
8
 
9
9
 
10
- var _chunkYWN746UScjs = require('./chunk-YWN746US.cjs');
10
+ var _chunkUMQAK3KPcjs = require('./chunk-UMQAK3KP.cjs');
11
11
 
12
12
 
13
13
  var _chunkOX6O6WVAcjs = require('./chunk-OX6O6WVA.cjs');
14
14
 
15
15
 
16
- var _chunkULASELLAcjs = require('./chunk-ULASELLA.cjs');
16
+ var _chunkDATEWH3Wcjs = require('./chunk-DATEWH3W.cjs');
17
17
 
18
18
 
19
19
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -70,13 +70,13 @@ async function _invokeServerFunction(value, input, request) {
70
70
  throw new TypeError("Expected a function created with createServerFn or createServerQuery");
71
71
  }
72
72
  try {
73
- const data = await _chunkT5OJPTVNcjs.runWithServerActionRequest.call(void 0, request, () => runner.run(input));
73
+ const data = await _chunkP4TYB4SFcjs.runWithServerActionRequest.call(void 0, request, () => runner.run(input));
74
74
  return { ok: true, data };
75
75
  } catch (error) {
76
76
  if (error instanceof ServerFnInputError) {
77
77
  return { ok: false, reason: "input", error: error.cause };
78
78
  }
79
- if (_chunkT5OJPTVNcjs.isServerFnFailure.call(void 0, error)) return { ok: false, reason: "failure", failure: error };
79
+ if (_chunkP4TYB4SFcjs.isServerFnFailure.call(void 0, error)) return { ok: false, reason: "failure", failure: error };
80
80
  const redirect = _chunkOX6O6WVAcjs.getFarmRedirectError.call(void 0, error);
81
81
  if (redirect) {
82
82
  return { ok: false, reason: "redirect", url: redirect.url, status: redirect.status };
@@ -117,9 +117,9 @@ function createServerFn(options) {
117
117
  } catch (cause) {
118
118
  throw labelInputErrors && isSchemaValidationFailure(cause) ? new ServerFnInputError(cause) : cause;
119
119
  }
120
- const executionContext = _chunkT5OJPTVNcjs.getServerActionExecutionContext.call(void 0, );
121
- const request = _nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.request]), () => ( _chunkULASELLAcjs._resolveCurrentRequestForApp.call(void 0, )));
122
- const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _2 => _2.signal]), () => ( _optionalChain([request, 'optionalAccess', _3 => _3.signal]))), () => ( _chunkT5OJPTVNcjs.getServerActionSignal.call(void 0, )));
120
+ const executionContext = _chunkP4TYB4SFcjs.getServerActionExecutionContext.call(void 0, );
121
+ const request = _nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.request]), () => ( _chunkDATEWH3Wcjs._resolveCurrentRequestForApp.call(void 0, )));
122
+ const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _2 => _2.signal]), () => ( _optionalChain([request, 'optionalAccess', _3 => _3.signal]))), () => ( _chunkP4TYB4SFcjs.getServerActionSignal.call(void 0, )));
123
123
  const handlerContext = {
124
124
  input,
125
125
  rawInput,
@@ -139,7 +139,7 @@ function createServerFn(options) {
139
139
  context: resolvedContext,
140
140
  result: parsedResult
141
141
  }) : options.invalidates;
142
- await _chunkYWN746UScjs.applyFarmCacheInvalidationTargets.call(void 0, declaration);
142
+ await _chunkUMQAK3KPcjs.applyFarmCacheInvalidationTargets.call(void 0, declaration);
143
143
  }
144
144
  return parsedResult;
145
145
  }, "run");
@@ -245,7 +245,7 @@ function createServerFnErrorHandler(definitions) {
245
245
  throw new TypeError(`Server function error "${code}" is not declared`);
246
246
  }
247
247
  const parsed = parseServerFnFailureData(code, definition.data, data);
248
- throw new (0, _chunkT5OJPTVNcjs.ServerFnFailure)(code, parsed, {
248
+ throw new (0, _chunkP4TYB4SFcjs.ServerFnFailure)(code, parsed, {
249
249
  status: definition.status,
250
250
  message: _nullishCoalesce(definition.message, () => ( "Server function failed"))
251
251
  });
@@ -6,7 +6,7 @@
6
6
  var _chunkSVRTJOUFcjs = require('./chunk-SVRTJOUF.cjs');
7
7
 
8
8
 
9
- var _chunkKIIMAWOJcjs = require('./chunk-KIIMAWOJ.cjs');
9
+ var _chunk5NAVKJCZcjs = require('./chunk-5NAVKJCZ.cjs');
10
10
 
11
11
 
12
12
 
@@ -107,7 +107,7 @@ function resolveServerActionsConfig(config) {
107
107
  const allowedOrigins = (_nullishCoalesce(_optionalChain([config, 'optionalAccess', _ => _.allowedOrigins]), () => ( []))).map(
108
108
  (value) => _chunkSVRTJOUFcjs.normalizeAllowedOriginPattern.call(void 0, value, SERVER_ACTION_ALLOWED_ORIGINS_LABEL)
109
109
  );
110
- const bodySizeLimit = _chunkKIIMAWOJcjs.parseBodySizeLimit.call(void 0,
110
+ const bodySizeLimit = _chunk5NAVKJCZcjs.parseBodySizeLimit.call(void 0,
111
111
  _nullishCoalesce(_optionalChain([config, 'optionalAccess', _2 => _2.bodySizeLimit]), () => ( DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT)),
112
112
  "serverActions.bodySizeLimit"
113
113
  );