@farm.js/core 0.1.75 → 0.1.77

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 (233) hide show
  1. package/dist/{agent-mcp.d-Djvao5eV.d.ts → agent-mcp.d-B1h3RznZ.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-wA13pwmS.d.mts → agent-mcp.d-WFQotg8M.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +2 -2
  4. package/dist/agent-runtime.d.mts +7 -5
  5. package/dist/agent-runtime.d.ts +7 -5
  6. package/dist/agent-runtime.mjs +1 -1
  7. package/dist/{analyzer-LJHMFCDW.mjs → analyzer-64YS2OXQ.mjs} +2 -2
  8. package/dist/analyzer-HTNXLX6N.cjs +16 -0
  9. package/dist/api/node.d.mts +9 -7
  10. package/dist/api/node.d.ts +9 -7
  11. package/dist/api/route-manager.d.mts +9 -7
  12. package/dist/api/route-manager.d.ts +9 -7
  13. package/dist/api/runtime.d.mts +8 -6
  14. package/dist/api/runtime.d.ts +8 -6
  15. package/dist/api.d.mts +10 -8
  16. package/dist/api.d.ts +10 -8
  17. package/dist/{app-manifest.d-DIuqSi9k.d.mts → app-manifest.d-EZEYG-tD.d.mts} +1 -1
  18. package/dist/{app-manifest.d-BukcP_EV.d.ts → app-manifest.d-Ktsqsuk9.d.ts} +1 -1
  19. package/dist/app-markdown.d.mts +8 -6
  20. package/dist/app-markdown.d.ts +8 -6
  21. package/dist/{app.d-BQqmM6Gy.d.ts → app.d-CSh3y8w8.d.ts} +5 -4
  22. package/dist/{app.d-YVuFb10p.d.mts → app.d-DTkqYcIr.d.mts} +5 -4
  23. package/dist/{chunk-CL2ONP73.cjs → chunk-2PE5STAR.cjs} +36 -27
  24. package/dist/{chunk-HV2WZFUW.mjs → chunk-2QPTZMGK.mjs} +1 -1
  25. package/dist/{chunk-E7VF3LQ5.mjs → chunk-4STJ6LGR.mjs} +13 -1
  26. package/dist/{chunk-LQBV2Y37.mjs → chunk-65XXHTVJ.mjs} +38 -2
  27. package/dist/{chunk-XGDI4OUB.cjs → chunk-6ZFGWB75.cjs} +13 -1
  28. package/dist/{chunk-IDOUCM2X.mjs → chunk-7EXFAJST.mjs} +57 -44
  29. package/dist/{chunk-HVJ7IACB.cjs → chunk-7SAGHWWU.cjs} +2 -2
  30. package/dist/{chunk-GNY7BO7R.mjs → chunk-BTHNOAOF.mjs} +2 -2
  31. package/dist/{chunk-TJVUTGED.mjs → chunk-D2RLADWN.mjs} +285 -93
  32. package/dist/chunk-DS2KZ5BT.mjs +16 -0
  33. package/dist/{chunk-WHCNJVYU.cjs → chunk-DSRWQ4SJ.cjs} +3 -3
  34. package/dist/{chunk-ZPCZWEU3.cjs → chunk-FCHEO3LG.cjs} +2 -2
  35. package/dist/{chunk-75XSZIRE.mjs → chunk-FD6BMUA3.mjs} +35 -26
  36. package/dist/{chunk-4T2RB4JA.mjs → chunk-FNVGK72M.mjs} +5 -5
  37. package/dist/{chunk-TFEODQLG.mjs → chunk-FPGSIOWS.mjs} +2 -2
  38. package/dist/{chunk-4BS3HSY7.cjs → chunk-FTQUNBRN.cjs} +2 -2
  39. package/dist/{chunk-ZV76IQG7.cjs → chunk-FVVGEGQ2.cjs} +2 -2
  40. package/dist/{chunk-7564NP5Z.cjs → chunk-GC2BSXQS.cjs} +39 -3
  41. package/dist/{chunk-HT2SZKXG.mjs → chunk-H76C5AOU.mjs} +12 -0
  42. package/dist/{chunk-OFIFRB62.mjs → chunk-IHMSLS2O.mjs} +36 -20
  43. package/dist/{chunk-BUC3FDYC.cjs → chunk-IIVZTGGP.cjs} +2 -2
  44. package/dist/{chunk-6MATGOEF.mjs → chunk-IXC6WDMT.mjs} +1 -1
  45. package/dist/{chunk-KPYQ32BA.cjs → chunk-JD42G6BN.cjs} +2 -2
  46. package/dist/{chunk-WJ5CCQBM.cjs → chunk-LTDMJD2F.cjs} +4 -4
  47. package/dist/{chunk-XX6ZA2IO.cjs → chunk-MQW4LHJR.cjs} +1 -1
  48. package/dist/{chunk-BNTRXJL4.cjs → chunk-NQZWLIPT.cjs} +3 -3
  49. package/dist/{chunk-QGYHE6VJ.mjs → chunk-NTHAZLVS.mjs} +28 -27
  50. package/dist/{chunk-OCLCA3X3.mjs → chunk-OCKQ3YOH.mjs} +1 -1
  51. package/dist/{chunk-PBQGIA27.cjs → chunk-OQZF6H6G.cjs} +4 -4
  52. package/dist/{chunk-YSTKSZD2.mjs → chunk-ORWXJDUN.mjs} +1 -1
  53. package/dist/{chunk-JNZDTE75.cjs → chunk-PMKUTZGR.cjs} +8 -8
  54. package/dist/{chunk-4ZSZI6XL.cjs → chunk-PUEPDMWY.cjs} +16 -16
  55. package/dist/{chunk-MTBDJ326.cjs → chunk-QMR2TUVZ.cjs} +13 -1
  56. package/dist/{chunk-A5F55ZFA.mjs → chunk-QODXWUGQ.mjs} +2 -2
  57. package/dist/chunk-RFXEQYPH.cjs +723 -0
  58. package/dist/{chunk-IK33N2AN.cjs → chunk-SIYELCIX.cjs} +158 -142
  59. package/dist/{chunk-MFU7SXAB.mjs → chunk-SL2BSPDJ.mjs} +1 -1
  60. package/dist/{chunk-H7QY7ZE4.mjs → chunk-SMYDCZBW.mjs} +1 -1
  61. package/dist/{chunk-GLF44JKY.mjs → chunk-TQOYIPMQ.mjs} +1 -1
  62. package/dist/{chunk-IVBDRAOR.cjs → chunk-UYACD4SH.cjs} +1 -1
  63. package/dist/{chunk-B4CWYGCG.mjs → chunk-WHNNDFCJ.mjs} +1 -1
  64. package/dist/{chunk-4MU4QCX4.mjs → chunk-WXMR3OHY.mjs} +1 -1
  65. package/dist/{chunk-YL7BKHYE.cjs → chunk-WZVESREI.cjs} +291 -278
  66. package/dist/chunk-XRRHPBG2.cjs +16 -0
  67. package/dist/{chunk-NPGXX7HN.cjs → chunk-YROK6CJC.cjs} +7 -7
  68. package/dist/{chunk-OZARLCYQ.cjs → chunk-YRQ44JTF.cjs} +179 -178
  69. package/dist/{chunk-2NQ3S2SJ.mjs → chunk-YTGNMKRA.mjs} +1 -1
  70. package/dist/{chunk-YCNKS6SD.mjs → chunk-ZBE5EHVJ.mjs} +4 -4
  71. package/dist/cli-runtime.d-DljFfr8T.d.ts +537 -0
  72. package/dist/cli-runtime.d-HSkdfvoq.d.mts +537 -0
  73. package/dist/client/lifecycle.d.mts +1 -1
  74. package/dist/client/lifecycle.d.ts +1 -1
  75. package/dist/{client-component.d-BeqVuqy2.d.mts → client-component.d-B-1dIlsw.d.mts} +2 -137
  76. package/dist/{client-component.d-CZ1NpHAY.d.ts → client-component.d-_otXB__v.d.ts} +2 -137
  77. package/dist/{client-plugins.d-ChceYO9t.d.mts → client-plugins.d-BmBzvfSP.d.mts} +4 -4
  78. package/dist/{client-plugins.d-D9kWC0QB.d.ts → client-plugins.d-MjxlvbCK.d.ts} +4 -4
  79. package/dist/client-plugins.d.mts +7 -5
  80. package/dist/client-plugins.d.ts +7 -5
  81. package/dist/client.d.mts +12 -10
  82. package/dist/client.d.ts +12 -10
  83. package/dist/config.d.mts +7 -5
  84. package/dist/config.d.ts +7 -5
  85. package/dist/desktop.d.mts +8 -6
  86. package/dist/desktop.d.ts +8 -6
  87. package/dist/{devtools-B3W3DLPG.mjs → devtools-7LHXG2VS.mjs} +4 -3
  88. package/dist/{devtools-T5I2WHRX.cjs → devtools-NNQN66EZ.cjs} +5 -4
  89. package/dist/docs.cjs +6 -5
  90. package/dist/docs.d.mts +10 -65
  91. package/dist/docs.d.ts +10 -65
  92. package/dist/docs.mjs +5 -4
  93. package/dist/environment/vite.cjs +5 -4
  94. package/dist/environment/vite.mjs +4 -3
  95. package/dist/handler.d-C53zFDmp.d.ts +62 -0
  96. package/dist/handler.d-CaYopqaD.d.mts +62 -0
  97. package/dist/{headers.d-Aux4JVnm.d.ts → headers.d-BvtpC90T.d.ts} +1 -1
  98. package/dist/{headers.d-BawakaPv.d.mts → headers.d-MBkD9ZLf.d.mts} +1 -1
  99. package/dist/index.cjs +31 -24
  100. package/dist/index.d-2hQpPZ-P.d.ts +16 -0
  101. package/dist/index.d-Mikf-tdP.d.mts +16 -0
  102. package/dist/index.d.mts +39 -556
  103. package/dist/index.d.ts +39 -556
  104. package/dist/index.mjs +30 -23
  105. package/dist/integrations/orm.cjs +4 -3
  106. package/dist/integrations/orm.d.mts +6 -4
  107. package/dist/integrations/orm.d.ts +6 -4
  108. package/dist/integrations/orm.mjs +3 -2
  109. package/dist/integrations.cjs +2 -2
  110. package/dist/integrations.d.mts +7 -5
  111. package/dist/integrations.d.ts +7 -5
  112. package/dist/integrations.mjs +1 -1
  113. package/dist/internal/app-markdown-runtime.d.mts +8 -6
  114. package/dist/internal/app-markdown-runtime.d.ts +8 -6
  115. package/dist/internal/build-runtime.cjs +23 -22
  116. package/dist/internal/build-runtime.d.mts +10 -7
  117. package/dist/internal/build-runtime.d.ts +10 -7
  118. package/dist/internal/build-runtime.mjs +22 -21
  119. package/dist/internal/cli-runtime.cjs +17 -9
  120. package/dist/internal/cli-runtime.d.mts +46 -0
  121. package/dist/internal/cli-runtime.d.ts +46 -0
  122. package/dist/internal/cli-runtime.mjs +16 -8
  123. package/dist/internal/client-error-overlay.cjs +4 -4
  124. package/dist/internal/client-error-overlay.mjs +1 -1
  125. package/dist/internal/client-runtime.d.mts +11 -9
  126. package/dist/internal/client-runtime.d.ts +11 -9
  127. package/dist/internal/compression-runtime.cjs +2 -2
  128. package/dist/internal/compression-runtime.d.mts +11 -6
  129. package/dist/internal/compression-runtime.d.ts +11 -6
  130. package/dist/internal/compression-runtime.mjs +1 -1
  131. package/dist/internal/config-runtime.cjs +6 -5
  132. package/dist/internal/config-runtime.d.mts +9 -7
  133. package/dist/internal/config-runtime.d.ts +9 -7
  134. package/dist/internal/config-runtime.mjs +5 -4
  135. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  136. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  137. package/dist/internal/native-server-fns.cjs +4 -4
  138. package/dist/internal/native-server-fns.mjs +3 -3
  139. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  140. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  141. package/dist/internal/production-runtime.cjs +8 -7
  142. package/dist/internal/production-runtime.d.mts +16 -14
  143. package/dist/internal/production-runtime.d.ts +16 -14
  144. package/dist/internal/production-runtime.mjs +7 -6
  145. package/dist/internal/start-manifest.d.mts +7 -5
  146. package/dist/internal/start-manifest.d.ts +7 -5
  147. package/dist/{layers-XQ7VFMWO.mjs → layers-I7VE5Q2Y.mjs} +2 -1
  148. package/dist/layers-WP5K5F7W.cjs +21 -0
  149. package/dist/{lifecycle.d-OtGWAvJT.d.ts → lifecycle.d-VzcXyEyn.d.mts} +1 -1
  150. package/dist/{lifecycle.d-OtGWAvJT.d.mts → lifecycle.d-VzcXyEyn.d.ts} +1 -1
  151. package/dist/markdown.d.mts +7 -5
  152. package/dist/markdown.d.ts +7 -5
  153. package/dist/middleware.d.mts +7 -5
  154. package/dist/middleware.d.ts +7 -5
  155. package/dist/{mount.d-BomEt2kV.d.mts → mount.d-DsP46XCy.d.mts} +1 -1
  156. package/dist/{mount.d-Ca8eb9GB.d.ts → mount.d-GU-tNxbE.d.ts} +1 -1
  157. package/dist/{navigation-delegate.d-B1ujRkYo.d.mts → navigation-delegate.d-CUtNOYLi.d.mts} +1 -1
  158. package/dist/{navigation-delegate.d-DJCC2jXF.d.ts → navigation-delegate.d-DsxNPrLT.d.ts} +1 -1
  159. package/dist/navigation.d.mts +10 -8
  160. package/dist/navigation.d.ts +10 -8
  161. package/dist/{plugin-FD4S2QEJ.mjs → plugin-2KWR2X4B.mjs} +1 -1
  162. package/dist/{plugin-5BNPYCER.cjs → plugin-MW7IDV76.cjs} +2 -2
  163. package/dist/plugin.cjs +15 -14
  164. package/dist/plugin.d.mts +11 -8
  165. package/dist/plugin.d.ts +11 -8
  166. package/dist/plugin.mjs +14 -13
  167. package/dist/{render-plan.d-BxRbaxYA.d.ts → render-plan.d-8K6S0h0L.d.ts} +1 -1
  168. package/dist/{render-plan.d-CFod_Zf-.d.mts → render-plan.d-B7Xp-PPW.d.mts} +1 -1
  169. package/dist/renderer-client.d.mts +10 -8
  170. package/dist/renderer-client.d.ts +10 -8
  171. package/dist/{request.d-DRQgaXGG.d.ts → request.d-CuQxmOqX.d.ts} +1 -1
  172. package/dist/{request.d-DG4TeXMM.d.mts → request.d-nhqciCAz.d.mts} +1 -1
  173. package/dist/request.d.mts +8 -6
  174. package/dist/request.d.ts +8 -6
  175. package/dist/{route-rendering.d-Db07UNVG.d.ts → route-rendering.d-BSsdDYC1.d.ts} +1 -1
  176. package/dist/{route-rendering.d-BXtZKgqu.d.mts → route-rendering.d-CeF1FOnl.d.mts} +1 -1
  177. package/dist/{router.d-BC3hyjf0.d.ts → router.d-C7yGlhDL.d.ts} +1 -1
  178. package/dist/{router.d-B61kXqxJ.d.mts → router.d-D462OX24.d.mts} +1 -1
  179. package/dist/routes.d.mts +7 -5
  180. package/dist/routes.d.ts +7 -5
  181. package/dist/{rsc-pipeline-VENBFYXW.cjs → rsc-pipeline-7PV6ARDS.cjs} +8 -7
  182. package/dist/{rsc-pipeline-LJ7YCGY6.mjs → rsc-pipeline-EZU4W4RL.mjs} +7 -6
  183. package/dist/{runtime-UNDTYGQS.cjs → runtime-QOE3NRXF.cjs} +8 -7
  184. package/dist/{runtime-4DWUXZHS.mjs → runtime-RWLFEPS3.mjs} +5 -4
  185. package/dist/{runtime.d-Cl6EBGmC.d.mts → runtime.d-C-BHQMy5.d.mts} +1 -1
  186. package/dist/{runtime.d-SC95yDzr.d.ts → runtime.d-CORDJQMy.d.ts} +1 -1
  187. package/dist/{schema.d-Dny9pnrm.d.mts → schema.d-BM-uVGpx.d.mts} +1 -1
  188. package/dist/{schema.d-Dny9pnrm.d.ts → schema.d-BM-uVGpx.d.ts} +1 -1
  189. package/dist/schema.d.mts +1 -1
  190. package/dist/schema.d.ts +1 -1
  191. package/dist/{index.d-r1MLpgeE.d.ts → server-components-status.d-BJ6huueH.d.mts} +2 -15
  192. package/dist/{index.d-Ccq42CPU.d.mts → server-components-status.d-BbADqqjq.d.ts} +2 -15
  193. package/dist/server-plugins.cjs +2 -2
  194. package/dist/server-plugins.d.mts +9 -7
  195. package/dist/server-plugins.d.ts +9 -7
  196. package/dist/server-plugins.mjs +1 -1
  197. package/dist/server.cjs +46 -39
  198. package/dist/server.d.mts +17 -14
  199. package/dist/server.d.ts +17 -14
  200. package/dist/server.mjs +24 -17
  201. package/dist/session-OU7M4CIF.cjs +24 -0
  202. package/dist/{session-QZXZOPR2.mjs → session-WPAT6H76.mjs} +3 -2
  203. package/dist/{spa-router.d-DrlXgDqY.d.mts → spa-router.d-DfjafHyX.d.mts} +4 -4
  204. package/dist/{spa-router.d-DwM02Mwd.d.ts → spa-router.d-DyGJLQc_.d.ts} +4 -4
  205. package/dist/ssg.d-D11lz_wr.d.ts +138 -0
  206. package/dist/ssg.d-iiLTyLAO.d.mts +138 -0
  207. package/dist/storage.cjs +9 -2
  208. package/dist/storage.d.mts +266 -34
  209. package/dist/storage.d.ts +266 -34
  210. package/dist/storage.mjs +8 -1
  211. package/dist/testing.d.mts +7 -5
  212. package/dist/testing.d.ts +7 -5
  213. package/dist/types.d-DC97bnjj.d.mts +131 -0
  214. package/dist/types.d-DC97bnjj.d.ts +131 -0
  215. package/dist/{utils.d-C6KXz3uB.d.ts → utils.d-D-GQeEfa.d.ts} +1 -1
  216. package/dist/{utils.d-CHzxAshz.d.mts → utils.d-fW-95yEh.d.mts} +1 -1
  217. package/dist/version.cjs +2 -2
  218. package/dist/version.mjs +1 -1
  219. package/dist/vite.cjs +15 -14
  220. package/dist/vite.d.mts +12 -9
  221. package/dist/vite.d.ts +12 -9
  222. package/dist/vite.mjs +14 -13
  223. package/package.json +11 -4
  224. package/dist/analyzer-23GCBYFI.cjs +0 -16
  225. package/dist/chunk-JMYXO572.cjs +0 -531
  226. package/dist/layers-7P4RLKVX.cjs +0 -20
  227. package/dist/session-2Q72D4QV.cjs +0 -23
  228. package/dist/types.d-BnIqOn9w.d.mts +0 -73
  229. package/dist/types.d-BnIqOn9w.d.ts +0 -73
  230. /package/dist/{chunk-6DBBMQWT.cjs → chunk-AF3PNVVF.cjs} +0 -0
  231. /package/dist/{chunk-5O3SK3ZC.mjs → chunk-BEXH6BGH.mjs} +0 -0
  232. /package/dist/{chunk-PMU4U2W2.cjs → chunk-PC5OZ4YR.cjs} +0 -0
  233. /package/dist/{chunk-Z5ZZAGIH.mjs → chunk-RL47VZ6J.mjs} +0 -0
package/dist/vite.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  shouldEmitFarmClientRootHmr,
12
12
  transformIsolatedClientBoundaryModule,
13
13
  withFarmRequestTracing
14
- } from "./chunk-IDOUCM2X.mjs";
14
+ } from "./chunk-7EXFAJST.mjs";
15
15
  import "./chunk-QVBXTSIZ.mjs";
16
16
  import "./chunk-4PWGLPL6.mjs";
17
17
  import "./chunk-UD6KTSJS.mjs";
@@ -23,25 +23,25 @@ import {
23
23
  resolveFarmClientCacheAdapterEntry,
24
24
  resolveFarmImageProviderForRuntime,
25
25
  resolveFarmImageServerRuntime
26
- } from "./chunk-OFIFRB62.mjs";
27
- import "./chunk-MFU7SXAB.mjs";
28
- import "./chunk-Z5ZZAGIH.mjs";
26
+ } from "./chunk-IHMSLS2O.mjs";
27
+ import "./chunk-SL2BSPDJ.mjs";
28
+ import "./chunk-RL47VZ6J.mjs";
29
29
  import "./chunk-SMUW7UST.mjs";
30
30
  import "./chunk-UB7RVEMX.mjs";
31
31
  import {
32
32
  readRouteRenderingDirectiveFromFile
33
- } from "./chunk-LQBV2Y37.mjs";
33
+ } from "./chunk-65XXHTVJ.mjs";
34
34
  import "./chunk-3GMD2E4Q.mjs";
35
35
  import "./chunk-ZJGFAW5U.mjs";
36
36
  import "./chunk-HQ2VAJLW.mjs";
37
37
  import "./chunk-UTUS6JUH.mjs";
38
- import "./chunk-HT2SZKXG.mjs";
38
+ import "./chunk-H76C5AOU.mjs";
39
39
  import "./chunk-LLZSYFOM.mjs";
40
40
  import "./chunk-UUMKLGUU.mjs";
41
41
  import "./chunk-ZXDX7VYZ.mjs";
42
- import "./chunk-GNY7BO7R.mjs";
42
+ import "./chunk-BTHNOAOF.mjs";
43
43
  import "./chunk-JA6RML7C.mjs";
44
- import "./chunk-YSTKSZD2.mjs";
44
+ import "./chunk-ORWXJDUN.mjs";
45
45
  import "./chunk-HONTCUK6.mjs";
46
46
  import "./chunk-L4RTTTVE.mjs";
47
47
  import "./chunk-GNZIAJGB.mjs";
@@ -56,7 +56,7 @@ import "./chunk-HZOMT5DY.mjs";
56
56
  import {
57
57
  collectFarmClientPackageImports,
58
58
  resolveFarmClientOptimizeDeps
59
- } from "./chunk-A5F55ZFA.mjs";
59
+ } from "./chunk-QODXWUGQ.mjs";
60
60
  import "./chunk-S32PDOLO.mjs";
61
61
  import "./chunk-ZEWWZJPZ.mjs";
62
62
  import "./chunk-EJCVG25Z.mjs";
@@ -70,7 +70,7 @@ import "./chunk-SQ5O7I3L.mjs";
70
70
  import "./chunk-S7QEQCVV.mjs";
71
71
  import "./chunk-22W4FNTG.mjs";
72
72
  import "./chunk-4QENVMG7.mjs";
73
- import "./chunk-E7VF3LQ5.mjs";
73
+ import "./chunk-4STJ6LGR.mjs";
74
74
  import "./chunk-GCRT6GJG.mjs";
75
75
  import {
76
76
  getPublicFarmImageConfig,
@@ -89,14 +89,15 @@ import "./chunk-3AJQFVWW.mjs";
89
89
  import "./chunk-WXFY5JIY.mjs";
90
90
  import "./chunk-YP7YO3S3.mjs";
91
91
  import "./chunk-YWPNIYUP.mjs";
92
- import "./chunk-5O3SK3ZC.mjs";
92
+ import "./chunk-BEXH6BGH.mjs";
93
93
  import "./chunk-H4WUWLQR.mjs";
94
94
  import "./chunk-CZOXZ6WQ.mjs";
95
95
  import "./chunk-WNLPQW7W.mjs";
96
96
  import "./chunk-F3N52U7S.mjs";
97
97
  import "./chunk-VZBAW44S.mjs";
98
98
  import "./chunk-K63OWRY2.mjs";
99
- import "./chunk-TJVUTGED.mjs";
99
+ import "./chunk-D2RLADWN.mjs";
100
+ import "./chunk-DS2KZ5BT.mjs";
100
101
  import "./chunk-BMQAPZXD.mjs";
101
102
  import "./chunk-GAAK3HDZ.mjs";
102
103
  import "./chunk-PKXGFQZS.mjs";
@@ -138,7 +139,7 @@ import {
138
139
  import "./chunk-D2LCAV6L.mjs";
139
140
  import "./chunk-H3ASZDT7.mjs";
140
141
  import "./chunk-2DA7CLY7.mjs";
141
- import "./chunk-H7QY7ZE4.mjs";
142
+ import "./chunk-SMYDCZBW.mjs";
142
143
  import "./chunk-VDQZV6BX.mjs";
143
144
  import "./chunk-QPNVDSFZ.mjs";
144
145
  import "./chunk-GYMGK467.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm.js/core",
3
- "version": "0.1.75",
3
+ "version": "0.1.77",
4
4
  "description": "The core of Farm.js, the framework for the web and agents",
5
5
  "keywords": [
6
6
  "@farm.js/core",
@@ -230,7 +230,7 @@
230
230
  "./dist/internal/production-node-env.d.ts"
231
231
  ],
232
232
  "internal/cli-runtime": [
233
- "./dist/index.d.ts"
233
+ "./dist/internal/cli-runtime.d.ts"
234
234
  ],
235
235
  "internal/request-cookies": [
236
236
  "./dist/internal/request-cookies.d.ts"
@@ -820,7 +820,7 @@
820
820
  "require": "./dist/internal/production-node-env.cjs"
821
821
  },
822
822
  "./internal/cli-runtime": {
823
- "types": "./dist/index.d.ts",
823
+ "types": "./dist/internal/cli-runtime.d.ts",
824
824
  "import": "./dist/internal/cli-runtime.mjs",
825
825
  "require": "./dist/internal/cli-runtime.cjs"
826
826
  },
@@ -834,11 +834,13 @@
834
834
  "access": "public"
835
835
  },
836
836
  "dependencies": {
837
- "@farm.js/islx": "0.0.23",
837
+ "@farm.js/islx": "0.0.25",
838
838
  "@farming-labs/orm": "0.0.66",
839
839
  "@farming-labs/orm-runtime": "0.0.66",
840
+ "@farming-labs/orm-sql": "0.0.66",
840
841
  "@formatjs/icu-messageformat-parser": "3.5.15",
841
842
  "@jridgewell/trace-mapping": "0.3.31",
843
+ "@libsql/core": "0.17.4",
842
844
  "@mdx-js/mdx": "^3.1.1",
843
845
  "@opentelemetry/api": "1.9.1",
844
846
  "@vitejs/plugin-react": "6.1.2",
@@ -864,6 +866,7 @@
864
866
  "devDependencies": {
865
867
  "@clerk/react": "^6.4.3",
866
868
  "@farming-labs/docs": "^0.2.143",
869
+ "@libsql/client": "0.17.4",
867
870
  "@nestjs/common": "11.2.8",
868
871
  "@nestjs/core": "11.2.8",
869
872
  "@nestjs/platform-express": "11.2.8",
@@ -897,6 +900,7 @@
897
900
  },
898
901
  "peerDependencies": {
899
902
  "@farming-labs/docs": "^0.2.118",
903
+ "@libsql/client": "^0.17.4",
900
904
  "@tailwindcss/vite": "^4.3.3",
901
905
  "@vercel/og": "^1.0.1",
902
906
  "react": "^18.2.0 || ^19.0.0",
@@ -907,6 +911,9 @@
907
911
  "@farming-labs/docs": {
908
912
  "optional": true
909
913
  },
914
+ "@libsql/client": {
915
+ "optional": true
916
+ },
910
917
  "@tailwindcss/vite": {
911
918
  "optional": true
912
919
  },
@@ -1,16 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
- var _chunkZV76IQG7cjs = require('./chunk-ZV76IQG7.cjs');
7
- require('./chunk-WBTHHTBO.cjs');
8
- require('./chunk-CCAUIBIS.cjs');
9
- require('./chunk-IVBDRAOR.cjs');
10
- require('./chunk-BTZ5O6VM.cjs');
11
-
12
-
13
-
14
-
15
-
16
- exports.CORE_PORTABLE = _chunkZV76IQG7cjs.CORE_PORTABLE; exports.analyzeFarmMobileRoutes = _chunkZV76IQG7cjs.analyzeFarmMobileRoutes; exports.readAliases = _chunkZV76IQG7cjs.readAliases; exports.resolveFile = _chunkZV76IQG7cjs.resolveFile;
@@ -1,531 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/storage/index.ts
2
- var _unstorage = require('unstorage');
3
- var _memory = require('unstorage/drivers/memory'); var _memory2 = _interopRequireDefault(_memory);
4
- var STORAGE_MODULES_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.modules");
5
- function getRegisteredStorageModules() {
6
- return globalThis[STORAGE_MODULES_KEY];
7
- }
8
- var loadModule = (specifier) => {
9
- const registered = _optionalChain([getRegisteredStorageModules, 'call', _ => _(), 'optionalAccess', _2 => _2[specifier]]);
10
- return registered ? registered() : import(
11
- /* @vite-ignore */
12
- specifier
13
- );
14
- };
15
- function _registerFarmStorageModules(loaders) {
16
- globalThis[STORAGE_MODULES_KEY] = {
17
- ...getRegisteredStorageModules(),
18
- ...loaders
19
- };
20
- }
21
- var DATABASE_CONNECTORS = {
22
- sqlite: {
23
- connector: "node-sqlite",
24
- module: "db0/connectors/node-sqlite"
25
- },
26
- "node-sqlite": {
27
- connector: "node-sqlite",
28
- module: "db0/connectors/node-sqlite"
29
- },
30
- sqlite3: {
31
- connector: "sqlite3",
32
- module: "db0/connectors/sqlite3"
33
- },
34
- "better-sqlite3": {
35
- connector: "better-sqlite3",
36
- module: "db0/connectors/better-sqlite3"
37
- },
38
- postgres: {
39
- connector: "postgresql",
40
- module: "db0/connectors/postgresql"
41
- },
42
- postgresql: {
43
- connector: "postgresql",
44
- module: "db0/connectors/postgresql"
45
- },
46
- pg: {
47
- connector: "postgresql",
48
- module: "db0/connectors/postgresql"
49
- },
50
- mysql: {
51
- connector: "mysql2",
52
- module: "db0/connectors/mysql2"
53
- },
54
- mysql2: {
55
- connector: "mysql2",
56
- module: "db0/connectors/mysql2"
57
- },
58
- pglite: {
59
- connector: "pglite",
60
- module: "db0/connectors/pglite"
61
- },
62
- planetscale: {
63
- connector: "planetscale",
64
- module: "db0/connectors/planetscale"
65
- },
66
- libsql: {
67
- connector: "libsql",
68
- module: "db0/connectors/libsql/node"
69
- },
70
- "libsql-node": {
71
- connector: "libsql-node",
72
- module: "db0/connectors/libsql/node"
73
- },
74
- "libsql-http": {
75
- connector: "libsql-http",
76
- module: "db0/connectors/libsql/http"
77
- }
78
- };
79
- function createMemoryStorage() {
80
- return _unstorage.createStorage.call(void 0, {
81
- driver: _memory2.default.call(void 0, )
82
- });
83
- }
84
- var GLOBAL_STORAGE_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.global");
85
- function readGlobalStorage() {
86
- return globalThis[GLOBAL_STORAGE_KEY];
87
- }
88
- function writeGlobalStorage(storage) {
89
- globalThis[GLOBAL_STORAGE_KEY] = storage;
90
- return storage;
91
- }
92
- function getActiveGlobalStorage() {
93
- const existing = readGlobalStorage();
94
- if (existing) {
95
- return existing;
96
- }
97
- return writeGlobalStorage(createMemoryStorage());
98
- }
99
- var globalStorage = getActiveGlobalStorage();
100
- function normalizeMountKey(base) {
101
- return (base || "").trim().replace(/^[:/\\]+|[:/\\]+$/g, "").replace(/[\\/]+/g, ":");
102
- }
103
- function isDriverInstance(value) {
104
- return !!value && typeof value === "object" && typeof value.getItem === "function" && typeof value.getKeys === "function";
105
- }
106
- function isStorageInstance(value) {
107
- return !!value && typeof value === "object" && typeof value.mount === "function" && typeof value.getMount === "function";
108
- }
109
- function isStorageClient(value) {
110
- return !!value && typeof value === "object" && value.kind === "farm-storage-client" && typeof value.resolveDriver === "function" && typeof value.createStorage === "function";
111
- }
112
- function isDatabaseDriverName(name) {
113
- return name in DATABASE_CONNECTORS;
114
- }
115
- function extractDriverOptions(config) {
116
- const source = config;
117
- const {
118
- client: _client,
119
- driver: _driver,
120
- mounts: _mounts,
121
- options,
122
- tableName: _tableName,
123
- ...inlineOptions
124
- } = source;
125
- const hasInlineOptions = Object.keys(inlineOptions).length > 0;
126
- if (options && typeof options === "object" && !Array.isArray(options)) {
127
- return hasInlineOptions ? { ...inlineOptions, ...options } : options;
128
- }
129
- if (hasInlineOptions) {
130
- return inlineOptions;
131
- }
132
- return options;
133
- }
134
- async function loadBuiltinDriver(name, options) {
135
- if (name === "memory") return _memory2.default.call(void 0, );
136
- const modulePath = _unstorage.builtinDrivers[name];
137
- if (!modulePath) {
138
- throw new Error(`Unsupported storage driver "${name}".`);
139
- }
140
- const module = await loadModule(modulePath);
141
- return module.default(options);
142
- }
143
- async function loadDatabaseDriver(config) {
144
- const connectorEntry = DATABASE_CONNECTORS[config.driver];
145
- const [{ createDatabase }, connectorModule, db0DriverModule] = await Promise.all([
146
- loadModule("db0"),
147
- loadModule(connectorEntry.module),
148
- loadModule("unstorage/drivers/db0")
149
- ]);
150
- const database = createDatabase(connectorModule.default(extractDriverOptions(config) || {}));
151
- const driver = db0DriverModule.default({
152
- database,
153
- tableName: config.tableName
154
- });
155
- return {
156
- ...driver,
157
- async dispose() {
158
- await database.dispose();
159
- }
160
- };
161
- }
162
- async function resolveDriver(config) {
163
- if (config && isStorageClient(config)) {
164
- return config.resolveDriver();
165
- }
166
- const driverInput = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _3 => _3.driver]), () => ( "memory"));
167
- if (typeof driverInput === "function") {
168
- return await driverInput();
169
- }
170
- if (isDriverInstance(driverInput)) {
171
- return driverInput;
172
- }
173
- if (isDatabaseDriverName(driverInput)) {
174
- return loadDatabaseDriver(config);
175
- }
176
- if (driverInput === "local") {
177
- return loadBuiltinDriver("fs-lite", extractDriverOptions(config));
178
- }
179
- return loadBuiltinDriver(
180
- driverInput,
181
- extractDriverOptions(config)
182
- );
183
- }
184
- var STORAGE_CLIENT_MODULES_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.clientModules");
185
- function createStorageClientFromResolver(resolveDriver2, modules = []) {
186
- let driverPromise;
187
- let storagePromise;
188
- const ensureDriver = () => {
189
- if (driverPromise) return driverPromise;
190
- const pending = Promise.resolve().then(resolveDriver2);
191
- driverPromise = pending;
192
- void pending.catch(() => {
193
- if (driverPromise === pending) {
194
- driverPromise = void 0;
195
- storagePromise = void 0;
196
- }
197
- });
198
- return pending;
199
- };
200
- const ensureStorage = () => {
201
- if (storagePromise) return storagePromise;
202
- const pending = ensureDriver().then(
203
- (driver) => _unstorage.createStorage.call(void 0, {
204
- driver
205
- })
206
- );
207
- storagePromise = pending;
208
- void pending.catch(() => {
209
- if (storagePromise === pending) storagePromise = void 0;
210
- });
211
- return pending;
212
- };
213
- const target = {
214
- kind: "farm-storage-client",
215
- ready: ensureStorage,
216
- createStorage: ensureStorage,
217
- resolveDriver: ensureDriver,
218
- [STORAGE_CLIENT_MODULES_KEY]: modules
219
- };
220
- return new Proxy(target, {
221
- get(currentTarget, prop, receiver) {
222
- if (prop === "then") {
223
- return void 0;
224
- }
225
- if (Reflect.has(currentTarget, prop)) {
226
- return Reflect.get(currentTarget, prop, receiver);
227
- }
228
- return (...args) => ensureStorage().then(async (storage) => {
229
- const member = Reflect.get(storage, prop);
230
- if (typeof member !== "function") {
231
- return member;
232
- }
233
- const result = Reflect.apply(member, storage, args);
234
- if (prop === "dispose") {
235
- return Promise.resolve(result).finally(() => {
236
- storagePromise = void 0;
237
- driverPromise = void 0;
238
- });
239
- }
240
- return result;
241
- });
242
- }
243
- });
244
- }
245
- function defineStorageClient(resolveDriver2) {
246
- return createStorageClientFromResolver(resolveDriver2);
247
- }
248
- function createStorageClient(config) {
249
- return createStorageClientFromResolver(
250
- () => resolveDriver(config),
251
- _collectFarmStorageModules(config)
252
- );
253
- }
254
- function driverStorage(driver) {
255
- return defineStorageClient(() => typeof driver === "function" ? driver() : driver);
256
- }
257
- function databaseStorage(database, options = {}) {
258
- return createStorageClientFromResolver(async () => {
259
- const db0DriverModule = await loadModule("unstorage/drivers/db0");
260
- const { dispose: _dispose, ...driver } = db0DriverModule.default({
261
- database,
262
- tableName: options.tableName
263
- });
264
- return driver;
265
- }, ["unstorage/drivers/db0"]);
266
- }
267
- function memoryStorage() {
268
- return createStorageClient({ driver: "memory" });
269
- }
270
- function localStorage(options = {}) {
271
- return createStorageClient({
272
- driver: "local",
273
- ...options
274
- });
275
- }
276
- function sqliteStorage(options) {
277
- return createStorageClient({
278
- driver: "sqlite",
279
- ...options
280
- });
281
- }
282
- function mysqlStorage(options) {
283
- return createStorageClient({
284
- driver: "mysql",
285
- ...options
286
- });
287
- }
288
- function mysql2Storage(options) {
289
- return mysqlStorage(options);
290
- }
291
- function postgresStorage(options) {
292
- return createStorageClient({
293
- driver: "postgres",
294
- ...options
295
- });
296
- }
297
- function pgStorage(options) {
298
- return postgresStorage(options);
299
- }
300
- function pgliteStorage(options) {
301
- return createStorageClient({
302
- driver: "pglite",
303
- ...options
304
- });
305
- }
306
- function planetscaleStorage(options) {
307
- return createStorageClient({
308
- driver: "planetscale",
309
- ...options
310
- });
311
- }
312
- function libsqlStorage(options) {
313
- return createStorageClient({
314
- driver: "libsql",
315
- ...options
316
- });
317
- }
318
- function redisStorage(options) {
319
- return createStorageClient({
320
- driver: "redis",
321
- ...options
322
- });
323
- }
324
- function s3Storage(options) {
325
- return createStorageClient({
326
- driver: "s3",
327
- ...options
328
- });
329
- }
330
- function mongodbStorage(options) {
331
- return createStorageClient({
332
- driver: "mongodb",
333
- ...options
334
- });
335
- }
336
- function upstashStorage(options) {
337
- return createStorageClient({
338
- driver: "upstash",
339
- ...options
340
- });
341
- }
342
- function netlifyBlobsStorage(options) {
343
- return createStorageClient({
344
- driver: "netlify-blobs",
345
- ...options
346
- });
347
- }
348
- function vercelKVStorage(options) {
349
- return createStorageClient({
350
- driver: "vercel-kv",
351
- ...options
352
- });
353
- }
354
- function vercelBlobStorage(options) {
355
- return createStorageClient({
356
- driver: "vercel-blob",
357
- ...options
358
- });
359
- }
360
- function collectDriverModules(config, modules) {
361
- if (!config || typeof config !== "object") return;
362
- if (isStorageClient(config)) {
363
- const clientModules = config[STORAGE_CLIENT_MODULES_KEY];
364
- if (Array.isArray(clientModules)) for (const module of clientModules) modules.add(module);
365
- return;
366
- }
367
- if (isStorageInstance(config)) return;
368
- const source = config;
369
- const driver = source.driver;
370
- if (typeof driver === "string") {
371
- if (isDatabaseDriverName(driver)) {
372
- modules.add("db0");
373
- modules.add(DATABASE_CONNECTORS[driver].module);
374
- modules.add("unstorage/drivers/db0");
375
- } else if (driver !== "memory") {
376
- const module = _unstorage.builtinDrivers[driver === "local" ? "fs-lite" : driver];
377
- if (module) modules.add(module);
378
- }
379
- }
380
- collectDriverModules(source.client, modules);
381
- if (source.mounts && typeof source.mounts === "object") {
382
- for (const mount of Object.values(source.mounts)) collectDriverModules(mount, modules);
383
- }
384
- }
385
- function _collectFarmStorageModules(config) {
386
- const modules = /* @__PURE__ */ new Set();
387
- collectDriverModules(config, modules);
388
- return [...modules];
389
- }
390
- async function mountNamespaces(storage, mounts) {
391
- if (!mounts) {
392
- return;
393
- }
394
- for (const [base, config] of Object.entries(mounts)) {
395
- storage.mount(normalizeMountKey(base), await resolveDriver(config));
396
- }
397
- }
398
- async function createFarmStorage(config = {}) {
399
- if (isStorageInstance(config)) {
400
- return config;
401
- }
402
- if (isStorageClient(config)) {
403
- return config.createStorage();
404
- }
405
- const rootConfig = isStorageClient(config.client) ? config.client : config;
406
- const storage = _unstorage.createStorage.call(void 0, {
407
- driver: await resolveDriver(rootConfig)
408
- });
409
- try {
410
- await mountNamespaces(storage, config.mounts);
411
- } catch (error) {
412
- await storage.dispose().catch(() => {
413
- });
414
- throw error;
415
- }
416
- return storage;
417
- }
418
- async function resolveStorageRuntimeClient(config) {
419
- if (!config || isStorageInstance(config) || isStorageClient(config)) {
420
- return void 0;
421
- }
422
- const client = config.client;
423
- if (!client || isStorageInstance(client) || isStorageClient(client)) {
424
- return void 0;
425
- }
426
- return typeof client === "function" ? await client() : client;
427
- }
428
- async function initStorage(config = {}) {
429
- globalStorage = getActiveGlobalStorage();
430
- const nextStorage = await createFarmStorage(config);
431
- const previousStorage = globalStorage;
432
- globalStorage = writeGlobalStorage(nextStorage);
433
- if (previousStorage !== nextStorage) {
434
- await previousStorage.dispose().catch(() => {
435
- });
436
- }
437
- return globalStorage;
438
- }
439
- function getStorage(namespace) {
440
- globalStorage = getActiveGlobalStorage();
441
- const base = normalizeMountKey(namespace);
442
- if (!base) {
443
- if (namespace) {
444
- throw new TypeError(
445
- `getStorage(${JSON.stringify(namespace)}) names no namespace. Pass a non-empty name, or call getStorage() for the root store.`
446
- );
447
- }
448
- return globalStorage;
449
- }
450
- const namespaced = _unstorage.prefixStorage.call(void 0, globalStorage, base);
451
- const store = globalStorage;
452
- const prefix = `${base}:`;
453
- const stripPrefix = (key) => key.startsWith(prefix) ? key.slice(prefix.length) : key;
454
- const viewUnwatchers = /* @__PURE__ */ new Set();
455
- const releaseViewWatchers = async () => {
456
- const current = [...viewUnwatchers];
457
- viewUnwatchers.clear();
458
- await Promise.all(current.map((unwatch) => unwatch()));
459
- };
460
- return {
461
- ...namespaced,
462
- // Scope the wipe to the namespace instead of the whole storage, and keep
463
- // the caller's base so `clear("sessions")` cannot take unrelated keys with
464
- // it. Dropping the argument silently widens a targeted clear into a
465
- // namespace-wide delete.
466
- async clear(base2, opts) {
467
- const keys = await namespaced.getKeys(base2);
468
- await Promise.all(keys.map((key) => namespaced.removeItem(key, opts)));
469
- },
470
- async watch(callback) {
471
- const unwatch = await store.watch((event, key) => {
472
- if (key.startsWith(prefix)) callback(event, stripPrefix(key));
473
- });
474
- viewUnwatchers.add(unwatch);
475
- return async () => {
476
- viewUnwatchers.delete(unwatch);
477
- await unwatch();
478
- };
479
- },
480
- async unwatch() {
481
- await releaseViewWatchers();
482
- },
483
- async dispose() {
484
- await releaseViewWatchers();
485
- },
486
- getMount(key = "") {
487
- return store.getMount(prefix + key);
488
- },
489
- getMounts(base2 = "", options) {
490
- return store.getMounts(prefix + base2, options).map((mount) => ({ ...mount, base: stripPrefix(mount.base) }));
491
- }
492
- };
493
- }
494
- async function disposeStorage() {
495
- globalStorage = getActiveGlobalStorage();
496
- const previousStorage = globalStorage;
497
- globalStorage = writeGlobalStorage(createMemoryStorage());
498
- await previousStorage.dispose().catch(() => {
499
- });
500
- }
501
-
502
-
503
-
504
-
505
-
506
-
507
-
508
-
509
-
510
-
511
-
512
-
513
-
514
-
515
-
516
-
517
-
518
-
519
-
520
-
521
-
522
-
523
-
524
-
525
-
526
-
527
-
528
-
529
-
530
-
531
- 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;