@farm.js/core 0.1.0-beta.95 → 0.1.0-beta.97

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 (317) hide show
  1. package/dist/after.cjs +1 -1
  2. package/dist/after.mjs +1 -1
  3. package/dist/agent-runtime.d.mts +3 -2
  4. package/dist/agent-runtime.d.ts +3 -2
  5. package/dist/api/route-manager.cjs +43 -4
  6. package/dist/api/route-manager.d.mts +4 -3
  7. package/dist/api/route-manager.d.ts +4 -3
  8. package/dist/api/route-manager.mjs +7 -7
  9. package/dist/api/runtime.cjs +43 -4
  10. package/dist/api/runtime.d.mts +1 -1
  11. package/dist/api/runtime.d.ts +1 -1
  12. package/dist/api/runtime.mjs +5 -5
  13. package/dist/api.cjs +352 -109
  14. package/dist/api.d.mts +7 -6
  15. package/dist/api.d.ts +7 -6
  16. package/dist/api.mjs +19 -12
  17. package/dist/{app-CIIEvA4r.d.ts → app-CIOx3LvY.d.ts} +4 -4
  18. package/dist/{app-O4AEC1OH.d.mts → app-DBd6437H.d.mts} +4 -4
  19. package/dist/app-markdown.d.mts +4 -3
  20. package/dist/app-markdown.d.ts +4 -3
  21. package/dist/cache.cjs +42 -4
  22. package/dist/cache.d.mts +68 -1
  23. package/dist/cache.d.ts +68 -1
  24. package/dist/cache.mjs +3 -3
  25. package/dist/{chunk-AXVJCMVF.mjs → chunk-2HDOV47R.mjs} +3 -3
  26. package/dist/chunk-2HDOV47R.mjs.map +1 -0
  27. package/dist/{chunk-RBRLLZL5.mjs → chunk-34IAPZBG.mjs} +16 -3
  28. package/dist/chunk-34IAPZBG.mjs.map +1 -0
  29. package/dist/{chunk-VV24CC42.mjs → chunk-35NPLKQJ.mjs} +2 -2
  30. package/dist/{chunk-D7QH7MDU.mjs → chunk-3TWQERDE.mjs} +5 -4
  31. package/dist/chunk-3TWQERDE.mjs.map +1 -0
  32. package/dist/{chunk-RWYRFCLG.mjs → chunk-4X57GXQA.mjs} +2 -2
  33. package/dist/{chunk-KOTSX5JH.mjs → chunk-52BR7LTX.mjs} +30 -21
  34. package/dist/chunk-52BR7LTX.mjs.map +1 -0
  35. package/dist/{chunk-SALMKQXH.mjs → chunk-6EJHNHH4.mjs} +80 -27
  36. package/dist/chunk-6EJHNHH4.mjs.map +1 -0
  37. package/dist/{chunk-ZFNK77WN.mjs → chunk-6JNGOC37.mjs} +2 -2
  38. package/dist/{after.cjs.map → chunk-6JNGOC37.mjs.map} +1 -1
  39. package/dist/{chunk-MOW47IF5.mjs → chunk-6UYVU46O.mjs} +2 -2
  40. package/dist/{chunk-7MABZJIM.mjs → chunk-7PYVLJ4J.mjs} +1 -1
  41. package/dist/chunk-7PYVLJ4J.mjs.map +1 -0
  42. package/dist/{chunk-FLHLPB57.mjs → chunk-D7F7YZ7L.mjs} +93 -67
  43. package/dist/chunk-D7F7YZ7L.mjs.map +1 -0
  44. package/dist/chunk-DU3PKDVQ.mjs +35 -0
  45. package/dist/chunk-DU3PKDVQ.mjs.map +1 -0
  46. package/dist/{chunk-SCFX4UTD.mjs → chunk-EHTUKVSW.mjs} +1 -1
  47. package/dist/chunk-EHTUKVSW.mjs.map +1 -0
  48. package/dist/{chunk-KWCNQUH5.mjs → chunk-EPDIF432.mjs} +526 -50
  49. package/dist/chunk-EPDIF432.mjs.map +1 -0
  50. package/dist/{chunk-A3636IHN.mjs → chunk-FP5Q67FO.mjs} +167 -96
  51. package/dist/chunk-FP5Q67FO.mjs.map +1 -0
  52. package/dist/{chunk-HHZAOTQD.mjs → chunk-GJ7W6LNK.mjs} +7 -6
  53. package/dist/chunk-GJ7W6LNK.mjs.map +1 -0
  54. package/dist/{chunk-RLGUZ3HS.mjs → chunk-I3OOUWO5.mjs} +3 -3
  55. package/dist/{chunk-75CGAL6E.mjs → chunk-IZBX2TEU.mjs} +217 -105
  56. package/dist/chunk-IZBX2TEU.mjs.map +1 -0
  57. package/dist/{chunk-22VG4DFJ.mjs → chunk-J3MPQ4MQ.mjs} +2 -2
  58. package/dist/{chunk-22VG4DFJ.mjs.map → chunk-J3MPQ4MQ.mjs.map} +1 -1
  59. package/dist/{chunk-2LS3KKE7.mjs → chunk-JV7JUD7Q.mjs} +4 -4
  60. package/dist/{chunk-Q3OX763A.mjs → chunk-LXDASSTE.mjs} +2 -2
  61. package/dist/{chunk-ZRBCBOEX.mjs → chunk-N2FY2QZ7.mjs} +28 -3
  62. package/dist/chunk-N2FY2QZ7.mjs.map +1 -0
  63. package/dist/{chunk-MRVJCLYQ.mjs → chunk-PSQ7N4XP.mjs} +4 -2
  64. package/dist/chunk-PSQ7N4XP.mjs.map +1 -0
  65. package/dist/{chunk-HVG3HLQZ.mjs → chunk-Q7WGOOAI.mjs} +3 -3
  66. package/dist/{chunk-WTYAPO5I.mjs → chunk-RCNWMEBT.mjs} +3 -2
  67. package/dist/{chunk-WTYAPO5I.mjs.map → chunk-RCNWMEBT.mjs.map} +1 -1
  68. package/dist/{chunk-3INDBMUU.mjs → chunk-TGDIACZT.mjs} +2 -2
  69. package/dist/{chunk-WB75GIX2.mjs → chunk-TQTB33JS.mjs} +14 -3
  70. package/dist/chunk-TQTB33JS.mjs.map +1 -0
  71. package/dist/{chunk-MH27UH72.mjs → chunk-TT3E2JOF.mjs} +3 -3
  72. package/dist/{chunk-UWRGX3J3.mjs → chunk-UMUWR5XA.mjs} +2 -2
  73. package/dist/{chunk-XTLLHCWU.mjs → chunk-V4VRLVLW.mjs} +52 -31
  74. package/dist/chunk-V4VRLVLW.mjs.map +1 -0
  75. package/dist/{chunk-EXCGBERG.mjs → chunk-WD2EBM3I.mjs} +79 -17
  76. package/dist/chunk-WD2EBM3I.mjs.map +1 -0
  77. package/dist/{chunk-DLBUAJTK.mjs → chunk-WMJGA32P.mjs} +74 -5
  78. package/dist/chunk-WMJGA32P.mjs.map +1 -0
  79. package/dist/{chunk-TKQCJMY7.mjs → chunk-X4SFHKFH.mjs} +7 -4
  80. package/dist/{chunk-TKQCJMY7.mjs.map → chunk-X4SFHKFH.mjs.map} +1 -1
  81. package/dist/{chunk-Q7GPJZCO.mjs → chunk-YIBV77KZ.mjs} +26 -7
  82. package/dist/chunk-YIBV77KZ.mjs.map +1 -0
  83. package/dist/client/lifecycle.mjs +2 -2
  84. package/dist/{client-mcMC334J.d.mts → client-DWoLZ3QU.d.mts} +52 -5
  85. package/dist/{client-d5ONQ-Pd.d.ts → client-DuQuQC1h.d.ts} +52 -5
  86. package/dist/client-cache-BMxuFqwH.d.ts +18 -0
  87. package/dist/client-cache-CCK-fCe0.d.mts +18 -0
  88. package/dist/{client-plugins-BvClItiL.d.mts → client-plugins-B6-07YmP.d.mts} +52 -99
  89. package/dist/{client-plugins-B9Sq-iMg.d.ts → client-plugins-By6MVUX-.d.ts} +52 -99
  90. package/dist/client-plugins.cjs +1 -1
  91. package/dist/client-plugins.d.mts +3 -2
  92. package/dist/client-plugins.d.ts +3 -2
  93. package/dist/client-plugins.mjs +2 -2
  94. package/dist/client.cjs +1046 -211
  95. package/dist/client.d.mts +136 -18
  96. package/dist/client.d.ts +136 -18
  97. package/dist/client.mjs +32 -15
  98. package/dist/config.d.mts +3 -2
  99. package/dist/config.d.ts +3 -2
  100. package/dist/{devtools-S52RRRMN.mjs → devtools-XWZX6CCL.mjs} +5 -5
  101. package/dist/{devtools-client-3XRTBND5.mjs → devtools-client-Z7QQA3Q2.mjs} +56 -17
  102. package/dist/devtools-client-Z7QQA3Q2.mjs.map +1 -0
  103. package/dist/{devtools-ui-NJKFORTG.mjs → devtools-ui-2HG5M4EL.mjs} +3 -1
  104. package/dist/devtools-ui-2HG5M4EL.mjs.map +1 -0
  105. package/dist/docs.cjs +24 -5
  106. package/dist/docs.mjs +5 -5
  107. package/dist/i18n/server.cjs +13 -2
  108. package/dist/i18n/server.d.mts +2 -2
  109. package/dist/i18n/server.d.ts +2 -2
  110. package/dist/i18n/server.mjs +1 -1
  111. package/dist/index.cjs +1928 -894
  112. package/dist/index.d.mts +139 -21
  113. package/dist/index.d.ts +139 -21
  114. package/dist/index.mjs +57 -34
  115. package/dist/index.mjs.map +1 -1
  116. package/dist/integration-api-BT024nuJ.d.mts +97 -0
  117. package/dist/integration-api-BT024nuJ.d.ts +97 -0
  118. package/dist/integrations.d.mts +3 -2
  119. package/dist/integrations.d.ts +3 -2
  120. package/dist/internal/build-runtime.cjs +764 -547
  121. package/dist/internal/build-runtime.d.mts +5 -4
  122. package/dist/internal/build-runtime.d.ts +5 -4
  123. package/dist/internal/build-runtime.mjs +16 -16
  124. package/dist/internal/client-runtime.cjs +1 -1
  125. package/dist/internal/client-runtime.mjs +2 -2
  126. package/dist/internal/config-runtime.cjs +4 -1
  127. package/dist/internal/config-runtime.d.mts +4 -3
  128. package/dist/internal/config-runtime.d.ts +4 -3
  129. package/dist/internal/config-runtime.mjs +4 -4
  130. package/dist/internal/product-telemetry-runtime.cjs +1 -1
  131. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  132. package/dist/internal/production-runtime.cjs +29 -3
  133. package/dist/internal/production-runtime.d.mts +8 -7
  134. package/dist/internal/production-runtime.d.ts +8 -7
  135. package/dist/internal/production-runtime.mjs +5 -5
  136. package/dist/{metadata-route-yV4U6X8h.d.ts → metadata-route-8_V3UonT.d.ts} +1 -1
  137. package/dist/{metadata-route-p4K1l92V.d.mts → metadata-route-CWP_HjGU.d.mts} +1 -1
  138. package/dist/middleware.cjs +28 -2
  139. package/dist/middleware.d.mts +5 -4
  140. package/dist/middleware.d.ts +5 -4
  141. package/dist/middleware.mjs +4 -4
  142. package/dist/navigation.cjs +3 -1
  143. package/dist/navigation.mjs +3 -3
  144. package/dist/observability.cjs +27 -2
  145. package/dist/observability.mjs +1 -1
  146. package/dist/plugin.cjs +528 -349
  147. package/dist/plugin.d.mts +3 -2
  148. package/dist/plugin.d.ts +3 -2
  149. package/dist/plugin.mjs +13 -13
  150. package/dist/{production-runtime-IkB0Qj4i.d.mts → production-runtime-BGRH1dKG.d.mts} +1 -1
  151. package/dist/{production-runtime-0JTch4_d.d.ts → production-runtime-CdmzsDax.d.ts} +1 -1
  152. package/dist/query/client.cjs +68 -29
  153. package/dist/query/client.mjs +69 -30
  154. package/dist/query/client.mjs.map +1 -1
  155. package/dist/{render-plan-Dc8CjNI7.d.ts → render-plan-0GeHiGVZ.d.ts} +1 -1
  156. package/dist/{render-plan-CU31j-Jk.d.mts → render-plan-DLxJYAA5.d.mts} +1 -1
  157. package/dist/renderer-client.cjs +169 -26
  158. package/dist/renderer-client.d.mts +7 -6
  159. package/dist/renderer-client.d.ts +7 -6
  160. package/dist/renderer-client.mjs +16 -19
  161. package/dist/renderer-client.mjs.map +1 -1
  162. package/dist/{request-BXa1KY8i.d.mts → request-BCNXSXLh.d.mts} +1 -1
  163. package/dist/{request-CUUBujZt.d.ts → request-BstWbZ6O.d.ts} +1 -1
  164. package/dist/request.d.mts +4 -3
  165. package/dist/request.d.ts +4 -3
  166. package/dist/{route-Y8lfz1wF.d.ts → route-4pd-EVtw.d.ts} +45 -50
  167. package/dist/{route-Cq3aObmj.d.mts → route-CvEr4Uc9.d.mts} +45 -50
  168. package/dist/routes.cjs +27 -2
  169. package/dist/routes.d.mts +3 -2
  170. package/dist/routes.d.ts +3 -2
  171. package/dist/routes.mjs +4 -4
  172. package/dist/{runtime-j1S3sDTh.d.ts → runtime-BgDQzBiu.d.ts} +1 -0
  173. package/dist/{runtime-DDwvDtS4.d.mts → runtime-CV2UCV-5.d.mts} +1 -0
  174. package/dist/server-action-security.mjs +2 -2
  175. package/dist/server-fn-client.cjs +102 -26
  176. package/dist/server-fn-client.d.mts +6 -0
  177. package/dist/server-fn-client.d.ts +6 -0
  178. package/dist/server-fn-client.mjs +2 -1
  179. package/dist/server-fn.cjs +42 -4
  180. package/dist/server-fn.mjs +5 -5
  181. package/dist/server-plugins.d.mts +4 -3
  182. package/dist/server-plugins.d.ts +4 -3
  183. package/dist/server-query-client.cjs +195 -34
  184. package/dist/server-query-client.d.mts +3 -3
  185. package/dist/server-query-client.d.ts +3 -3
  186. package/dist/server-query-client.mjs +7 -7
  187. package/dist/{server-query-runtime-3zAj77yv.d.ts → server-query-runtime-DXRNhX_3.d.ts} +2 -0
  188. package/dist/{server-query-runtime-B50KAcj5.d.mts → server-query-runtime-aP52iuL5.d.mts} +2 -0
  189. package/dist/server-query.cjs +44 -5
  190. package/dist/server-query.d.mts +4 -0
  191. package/dist/server-query.d.ts +4 -0
  192. package/dist/server-query.mjs +7 -7
  193. package/dist/server.cjs +553 -370
  194. package/dist/server.d.mts +11 -10
  195. package/dist/server.d.ts +11 -10
  196. package/dist/server.mjs +17 -17
  197. package/dist/{spa-router-CyLkwst6.d.mts → spa-router-BeyAVSc6.d.mts} +1 -1
  198. package/dist/{spa-router-BkqGXaV_.d.ts → spa-router-COgu4txb.d.ts} +1 -1
  199. package/dist/testing.cjs +27 -2
  200. package/dist/testing.d.mts +3 -2
  201. package/dist/testing.d.ts +3 -2
  202. package/dist/testing.mjs +9 -9
  203. package/dist/{utils-NKR6SoNv.d.mts → utils-DL2VwDQl.d.mts} +1 -1
  204. package/dist/{utils-B2OHrb9F.d.ts → utils-DkU2c_1B.d.ts} +1 -1
  205. package/dist/version.cjs +1 -1
  206. package/dist/version.mjs +1 -1
  207. package/dist/vite.cjs +536 -353
  208. package/dist/vite.d.mts +3 -2
  209. package/dist/vite.d.ts +3 -2
  210. package/dist/vite.mjs +17 -13
  211. package/package.json +17 -17
  212. package/types/client.d.ts +115 -10
  213. package/dist/agent-runtime.cjs.map +0 -1
  214. package/dist/api/route-manager.cjs.map +0 -1
  215. package/dist/api/runtime.cjs.map +0 -1
  216. package/dist/api.cjs.map +0 -1
  217. package/dist/app-markdown.cjs.map +0 -1
  218. package/dist/cache.cjs.map +0 -1
  219. package/dist/chunk-75CGAL6E.mjs.map +0 -1
  220. package/dist/chunk-7MABZJIM.mjs.map +0 -1
  221. package/dist/chunk-A3636IHN.mjs.map +0 -1
  222. package/dist/chunk-AXVJCMVF.mjs.map +0 -1
  223. package/dist/chunk-D7QH7MDU.mjs.map +0 -1
  224. package/dist/chunk-DLBUAJTK.mjs.map +0 -1
  225. package/dist/chunk-EXCGBERG.mjs.map +0 -1
  226. package/dist/chunk-FLHLPB57.mjs.map +0 -1
  227. package/dist/chunk-HHZAOTQD.mjs.map +0 -1
  228. package/dist/chunk-KOTSX5JH.mjs.map +0 -1
  229. package/dist/chunk-KWCNQUH5.mjs.map +0 -1
  230. package/dist/chunk-MRVJCLYQ.mjs.map +0 -1
  231. package/dist/chunk-Q7GPJZCO.mjs.map +0 -1
  232. package/dist/chunk-RBRLLZL5.mjs.map +0 -1
  233. package/dist/chunk-SALMKQXH.mjs.map +0 -1
  234. package/dist/chunk-SCFX4UTD.mjs.map +0 -1
  235. package/dist/chunk-WB75GIX2.mjs.map +0 -1
  236. package/dist/chunk-XTLLHCWU.mjs.map +0 -1
  237. package/dist/chunk-ZFNK77WN.mjs.map +0 -1
  238. package/dist/chunk-ZRBCBOEX.mjs.map +0 -1
  239. package/dist/client/lifecycle.cjs.map +0 -1
  240. package/dist/client-cache-CopR_MaI.d.mts +0 -6
  241. package/dist/client-cache-Djy_TlE8.d.ts +0 -6
  242. package/dist/client-plugins.cjs.map +0 -1
  243. package/dist/client.cjs.map +0 -1
  244. package/dist/config.cjs.map +0 -1
  245. package/dist/cron.cjs.map +0 -1
  246. package/dist/deferred.cjs.map +0 -1
  247. package/dist/deployment.cjs.map +0 -1
  248. package/dist/devtools-client-3XRTBND5.mjs.map +0 -1
  249. package/dist/devtools-ui-NJKFORTG.mjs.map +0 -1
  250. package/dist/docs.cjs.map +0 -1
  251. package/dist/env-types.cjs.map +0 -1
  252. package/dist/env.cjs.map +0 -1
  253. package/dist/environment/vite.cjs.map +0 -1
  254. package/dist/environment.cjs.map +0 -1
  255. package/dist/font.cjs.map +0 -1
  256. package/dist/headers.cjs.map +0 -1
  257. package/dist/i18n/client.cjs.map +0 -1
  258. package/dist/i18n/index.cjs.map +0 -1
  259. package/dist/i18n/server.cjs.map +0 -1
  260. package/dist/image/server.cjs.map +0 -1
  261. package/dist/image/sharp.cjs.map +0 -1
  262. package/dist/image.cjs.map +0 -1
  263. package/dist/index.cjs.map +0 -1
  264. package/dist/instrumentation.cjs.map +0 -1
  265. package/dist/integrations.cjs.map +0 -1
  266. package/dist/internal/build-runtime.cjs.map +0 -1
  267. package/dist/internal/client-runtime.cjs.map +0 -1
  268. package/dist/internal/config-runtime.cjs.map +0 -1
  269. package/dist/internal/isolated-boundary.cjs.map +0 -1
  270. package/dist/internal/metadata-image-runtime.cjs.map +0 -1
  271. package/dist/internal/product-telemetry-runtime.cjs.map +0 -1
  272. package/dist/internal/production-node-env.cjs.map +0 -1
  273. package/dist/internal/production-runtime.cjs.map +0 -1
  274. package/dist/markdown.cjs.map +0 -1
  275. package/dist/middleware.cjs.map +0 -1
  276. package/dist/navigation.cjs.map +0 -1
  277. package/dist/observability.cjs.map +0 -1
  278. package/dist/plugin.cjs.map +0 -1
  279. package/dist/query/client.cjs.map +0 -1
  280. package/dist/query/index.cjs.map +0 -1
  281. package/dist/query/parsers.cjs.map +0 -1
  282. package/dist/query/server.cjs.map +0 -1
  283. package/dist/renderer/react/client.cjs.map +0 -1
  284. package/dist/renderer/react/server.cjs.map +0 -1
  285. package/dist/renderer/react/vite.cjs.map +0 -1
  286. package/dist/renderer-client.cjs.map +0 -1
  287. package/dist/renderer.cjs.map +0 -1
  288. package/dist/request.cjs.map +0 -1
  289. package/dist/router.cjs.map +0 -1
  290. package/dist/routes.cjs.map +0 -1
  291. package/dist/server-action-security.cjs.map +0 -1
  292. package/dist/server-fn-client.cjs.map +0 -1
  293. package/dist/server-fn.cjs.map +0 -1
  294. package/dist/server-plugins.cjs.map +0 -1
  295. package/dist/server-query-client.cjs.map +0 -1
  296. package/dist/server-query.cjs.map +0 -1
  297. package/dist/server.cjs.map +0 -1
  298. package/dist/storage.cjs.map +0 -1
  299. package/dist/testing.cjs.map +0 -1
  300. package/dist/theme/client.cjs.map +0 -1
  301. package/dist/theme/index.cjs.map +0 -1
  302. package/dist/theme/runtime.cjs.map +0 -1
  303. package/dist/theme/server.cjs.map +0 -1
  304. package/dist/version.cjs.map +0 -1
  305. package/dist/vite.cjs.map +0 -1
  306. package/dist/workflows.cjs.map +0 -1
  307. /package/dist/{chunk-VV24CC42.mjs.map → chunk-35NPLKQJ.mjs.map} +0 -0
  308. /package/dist/{chunk-RWYRFCLG.mjs.map → chunk-4X57GXQA.mjs.map} +0 -0
  309. /package/dist/{chunk-MOW47IF5.mjs.map → chunk-6UYVU46O.mjs.map} +0 -0
  310. /package/dist/{chunk-RLGUZ3HS.mjs.map → chunk-I3OOUWO5.mjs.map} +0 -0
  311. /package/dist/{chunk-2LS3KKE7.mjs.map → chunk-JV7JUD7Q.mjs.map} +0 -0
  312. /package/dist/{chunk-Q3OX763A.mjs.map → chunk-LXDASSTE.mjs.map} +0 -0
  313. /package/dist/{chunk-HVG3HLQZ.mjs.map → chunk-Q7WGOOAI.mjs.map} +0 -0
  314. /package/dist/{chunk-3INDBMUU.mjs.map → chunk-TGDIACZT.mjs.map} +0 -0
  315. /package/dist/{chunk-MH27UH72.mjs.map → chunk-TT3E2JOF.mjs.map} +0 -0
  316. /package/dist/{chunk-UWRGX3J3.mjs.map → chunk-UMUWR5XA.mjs.map} +0 -0
  317. /package/dist/{devtools-S52RRRMN.mjs.map → devtools-XWZX6CCL.mjs.map} +0 -0
package/dist/api.d.mts CHANGED
@@ -1,14 +1,14 @@
1
- export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-Cq3aObmj.mjs';
1
+ export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-CvEr4Uc9.mjs';
2
2
  export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions, API_ROUTE_METHODS } from './api/route-manager.mjs';
3
- export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, B as APIRouteManifest, A as APIRouteRefMetadata, u as ApiClients, C as CacheKey, m as CacheOptions, k as CachePolicy, l as CacheScope, q as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, o as InvalidateOptions, I as InvalidateTarget, p as OptimisticOptions, O as OptimisticUpdate, R as RequestEvent, j as ResponseEvent, n as RetryOptions, r as RouteAPIClient, t as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, w as createAPIClient, v as createApiClients, z as createServerAPIClient, y as getAPIRouteRefMetadata, x as isAPIRouteRef } from './client-mcMC334J.mjs';
4
- import { ah as ResolvedFarmAPIConfig } from './client-plugins-BvClItiL.mjs';
5
- export { df as DEFAULT_FARM_API_BASE_PATH, di as FarmAPIConfig, dg as FarmAPIConfigResolverContext, dh as FarmAPIConfigValue, dm as getFarmAPIBaseURL, dl as normalizeFarmAPIBasePath, dk as normalizeFarmAPIConfig, dj as resolveFarmAPIConfig, dn as resolveFarmAPIRequestURL } from './client-plugins-BvClItiL.mjs';
3
+ export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, G as APIRouteManifest, A as APIRouteRefMetadata, u as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, q as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, o as InvalidateOptions, I as InvalidateTarget, p as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, R as RetryOptions, r as RouteAPIClient, t as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, B as applyServerFnOptimisticUpdates, w as createAPIClient, v as createApiClients, z as createServerAPIClient, y as getAPIRouteRefMetadata, x as isAPIRouteRef, E as resolveServerFnInvalidateTargets, D as settleServerFnOptimisticUpdates } from './client-DWoLZ3QU.mjs';
4
+ import { ah as ResolvedFarmAPIConfig } from './client-plugins-B6-07YmP.mjs';
5
+ export { d4 as DEFAULT_FARM_API_BASE_PATH, d7 as FarmAPIConfig, d5 as FarmAPIConfigResolverContext, d6 as FarmAPIConfigValue, db as getFarmAPIBaseURL, da as normalizeFarmAPIBasePath, d9 as normalizeFarmAPIConfig, d8 as resolveFarmAPIConfig, dc as resolveFarmAPIRequestURL } from './client-plugins-B6-07YmP.mjs';
6
6
  import { Plugin } from 'vite';
7
7
  export { getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './api/runtime.mjs';
8
8
  export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from './route-pattern-W-SsJGSp.mjs';
9
9
  import './cache.mjs';
10
10
  import './types-CnH8DOqo.mjs';
11
- import './runtime-DDwvDtS4.mjs';
11
+ import './runtime-CV2UCV-5.mjs';
12
12
  import './resolver-khasx3fU.mjs';
13
13
  import './lifecycle-De0vQG45.mjs';
14
14
  import './renderer.mjs';
@@ -17,6 +17,7 @@ import './types-Cc8l9IqS.mjs';
17
17
  import 'db0';
18
18
  import 'unstorage';
19
19
  import 'react';
20
+ import './integration-api-BT024nuJ.mjs';
20
21
  import '@farming-labs/orm';
21
22
  import './types-CKwggz9n.mjs';
22
23
  import '@farming-labs/docs';
@@ -36,7 +37,7 @@ import './font.mjs';
36
37
  import './after.mjs';
37
38
  import 'node:http';
38
39
  import './island-CfGru1MO.mjs';
39
- import './client-cache-CopR_MaI.mjs';
40
+ import './client-cache-CCK-fCe0.mjs';
40
41
 
41
42
  /** Return the same-origin path served by this Farm application. */
42
43
  declare function resolveFarmAPIServerBasePath(config: ResolvedFarmAPIConfig): string;
package/dist/api.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-Y8lfz1wF.js';
1
+ export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-4pd-EVtw.js';
2
2
  export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions, API_ROUTE_METHODS } from './api/route-manager.js';
3
- export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, B as APIRouteManifest, A as APIRouteRefMetadata, u as ApiClients, C as CacheKey, m as CacheOptions, k as CachePolicy, l as CacheScope, q as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, o as InvalidateOptions, I as InvalidateTarget, p as OptimisticOptions, O as OptimisticUpdate, R as RequestEvent, j as ResponseEvent, n as RetryOptions, r as RouteAPIClient, t as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, w as createAPIClient, v as createApiClients, z as createServerAPIClient, y as getAPIRouteRefMetadata, x as isAPIRouteRef } from './client-d5ONQ-Pd.js';
4
- import { ah as ResolvedFarmAPIConfig } from './client-plugins-B9Sq-iMg.js';
5
- export { df as DEFAULT_FARM_API_BASE_PATH, di as FarmAPIConfig, dg as FarmAPIConfigResolverContext, dh as FarmAPIConfigValue, dm as getFarmAPIBaseURL, dl as normalizeFarmAPIBasePath, dk as normalizeFarmAPIConfig, dj as resolveFarmAPIConfig, dn as resolveFarmAPIRequestURL } from './client-plugins-B9Sq-iMg.js';
3
+ export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, G as APIRouteManifest, A as APIRouteRefMetadata, u as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, q as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, o as InvalidateOptions, I as InvalidateTarget, p as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, R as RetryOptions, r as RouteAPIClient, t as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, B as applyServerFnOptimisticUpdates, w as createAPIClient, v as createApiClients, z as createServerAPIClient, y as getAPIRouteRefMetadata, x as isAPIRouteRef, E as resolveServerFnInvalidateTargets, D as settleServerFnOptimisticUpdates } from './client-DuQuQC1h.js';
4
+ import { ah as ResolvedFarmAPIConfig } from './client-plugins-By6MVUX-.js';
5
+ export { d4 as DEFAULT_FARM_API_BASE_PATH, d7 as FarmAPIConfig, d5 as FarmAPIConfigResolverContext, d6 as FarmAPIConfigValue, db as getFarmAPIBaseURL, da as normalizeFarmAPIBasePath, d9 as normalizeFarmAPIConfig, d8 as resolveFarmAPIConfig, dc as resolveFarmAPIRequestURL } from './client-plugins-By6MVUX-.js';
6
6
  import { Plugin } from 'vite';
7
7
  export { getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './api/runtime.js';
8
8
  export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from './route-pattern-W-SsJGSp.js';
9
9
  import './cache.js';
10
10
  import './types-CnH8DOqo.js';
11
- import './runtime-j1S3sDTh.js';
11
+ import './runtime-BgDQzBiu.js';
12
12
  import './resolver-DadfRL6F.js';
13
13
  import './lifecycle-De0vQG45.js';
14
14
  import './renderer.js';
@@ -17,6 +17,7 @@ import './types-Cc8l9IqS.js';
17
17
  import 'db0';
18
18
  import 'unstorage';
19
19
  import 'react';
20
+ import './integration-api-BT024nuJ.js';
20
21
  import '@farming-labs/orm';
21
22
  import './types-CKwggz9n.js';
22
23
  import '@farming-labs/docs';
@@ -36,7 +37,7 @@ import './font.js';
36
37
  import './after.js';
37
38
  import 'node:http';
38
39
  import './island-CfGru1MO.js';
39
- import './client-cache-Djy_TlE8.js';
40
+ import './client-cache-BMxuFqwH.js';
40
41
 
41
42
  /** Return the same-origin path served by this Farm application. */
42
43
  declare function resolveFarmAPIServerBasePath(config: ResolvedFarmAPIConfig): string;
package/dist/api.mjs CHANGED
@@ -1,26 +1,30 @@
1
1
  import {
2
2
  farmApiPlugin
3
- } from "./chunk-2LS3KKE7.mjs";
3
+ } from "./chunk-JV7JUD7Q.mjs";
4
4
  import {
5
5
  APIClientError,
6
6
  FARM_API_ROUTE_META_SYMBOL,
7
7
  FARM_API_ROUTE_REF_SYMBOL,
8
+ applyServerFnOptimisticUpdates,
8
9
  createAPIClient,
9
10
  createApiClients,
10
11
  createServerAPIClient,
11
12
  getAPIRouteRefMetadata,
12
- isAPIRouteRef
13
- } from "./chunk-75CGAL6E.mjs";
14
- import "./chunk-DLBUAJTK.mjs";
13
+ isAPIRouteRef,
14
+ resolveServerFnInvalidateTargets,
15
+ settleServerFnOptimisticUpdates
16
+ } from "./chunk-IZBX2TEU.mjs";
17
+ import "./chunk-DU3PKDVQ.mjs";
18
+ import "./chunk-WMJGA32P.mjs";
15
19
  import "./chunk-YUE4CJNB.mjs";
16
- import "./chunk-ZFNK77WN.mjs";
20
+ import "./chunk-6JNGOC37.mjs";
17
21
  import {
18
22
  APIRouteConflictError,
19
23
  APIRouteManager,
20
24
  API_ROUTE_METHODS
21
- } from "./chunk-MH27UH72.mjs";
25
+ } from "./chunk-TT3E2JOF.mjs";
22
26
  import "./chunk-NXV52RNX.mjs";
23
- import "./chunk-WB75GIX2.mjs";
27
+ import "./chunk-TQTB33JS.mjs";
24
28
  import "./chunk-STV7A2LH.mjs";
25
29
  import "./chunk-XNWHZQ6A.mjs";
26
30
  import "./chunk-SXWF4QRU.mjs";
@@ -48,7 +52,7 @@ import {
48
52
  normalizeRouteResponse,
49
53
  resolveAPIRouteEndpoint,
50
54
  resolvePluginRoutes
51
- } from "./chunk-D7QH7MDU.mjs";
55
+ } from "./chunk-3TWQERDE.mjs";
52
56
  import "./chunk-4OAR7CTF.mjs";
53
57
  import {
54
58
  resolveFarmAPIServerBasePath
@@ -65,7 +69,7 @@ import {
65
69
  multipart,
66
70
  readJSONStream,
67
71
  toFormData
68
- } from "./chunk-XTLLHCWU.mjs";
72
+ } from "./chunk-V4VRLVLW.mjs";
69
73
  import {
70
74
  DEFAULT_FARM_API_BASE_PATH,
71
75
  getFarmAPIBaseURL,
@@ -75,10 +79,10 @@ import {
75
79
  resolveFarmAPIRequestURL
76
80
  } from "./chunk-6YPPIPKR.mjs";
77
81
  import "./chunk-776TTMU3.mjs";
78
- import "./chunk-AXVJCMVF.mjs";
79
- import "./chunk-RBRLLZL5.mjs";
82
+ import "./chunk-2HDOV47R.mjs";
83
+ import "./chunk-34IAPZBG.mjs";
80
84
  import "./chunk-WZ5QFROO.mjs";
81
- import "./chunk-ZRBCBOEX.mjs";
85
+ import "./chunk-N2FY2QZ7.mjs";
82
86
  import "./chunk-EDWCT2JF.mjs";
83
87
  import "./chunk-LM2YNO4U.mjs";
84
88
  import "./chunk-W4ZNS76E.mjs";
@@ -102,6 +106,7 @@ export {
102
106
  POST,
103
107
  PUT,
104
108
  QUERY,
109
+ applyServerFnOptimisticUpdates,
105
110
  createAPIClient,
106
111
  createApiClients,
107
112
  createEndpoint,
@@ -130,6 +135,8 @@ export {
130
135
  resolveFarmAPIRequestURL,
131
136
  resolveFarmAPIServerBasePath,
132
137
  resolvePluginRoutes,
138
+ resolveServerFnInvalidateTargets,
139
+ settleServerFnOptimisticUpdates,
133
140
  toFormData
134
141
  };
135
142
  //# sourceMappingURL=api.mjs.map
@@ -1,4 +1,4 @@
1
- import { q as FarmConfig, P as ParsedRoute, ag as ResolvedFarmRouteRuntimeConfig, h as RouteModule, X as LayoutModule, a1 as SSGCollectionResult, Y as FarmRequest, Z as FarmResponse, ah as ResolvedFarmAPIConfig, j as FarmMdxResolvedConfig, ai as ResolvedFarmDevtoolsConfig, aj as ResolvedFarmDevIndicatorsConfig, ak as ResolvedFarmAuthConfig, al as ResolvedFarmPerformanceConfig, am as ResolvedFarmSecurityConfig } from './client-plugins-B9Sq-iMg.js';
1
+ import { q as FarmConfig, P as ParsedRoute, ag as ResolvedFarmRouteRuntimeConfig, h as RouteModule, X as LayoutModule, a1 as SSGCollectionResult, Y as FarmRequest, Z as FarmResponse, ah as ResolvedFarmAPIConfig, j as FarmMdxResolvedConfig, ai as ResolvedFarmDevtoolsConfig, aj as ResolvedFarmDevIndicatorsConfig, ak as ResolvedFarmAuthConfig, al as ResolvedFarmPerformanceConfig, am as ResolvedFarmSecurityConfig } from './client-plugins-By6MVUX-.js';
2
2
  import { F as FarmDocsResolvedConfig } from './types-CKwggz9n.js';
3
3
  import { FarmMarkdownResolvedConfig } from './markdown.js';
4
4
  import { F as FarmWorkflowsResolvedConfig } from './workflows-ChyK_oTu.js';
@@ -7,11 +7,11 @@ import { R as ResolvedFarmImageConfig } from './image-config-Duob7wER.js';
7
7
  import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.js';
8
8
  import { ViteDevServer } from 'vite';
9
9
  import { F as FarmIslandStrategy } from './island-CfGru1MO.js';
10
- import { M as MetadataImageKind, A as ApplicationMetadataRouteKind } from './metadata-route-yV4U6X8h.js';
10
+ import { M as MetadataImageKind, A as ApplicationMetadataRouteKind } from './metadata-route-8_V3UonT.js';
11
11
  import { FarmServerRendererRuntime, FarmRenderer } from './renderer.js';
12
- import { F as FarmRouteRenderPlan } from './render-plan-Dc8CjNI7.js';
12
+ import { F as FarmRouteRenderPlan } from './render-plan-0GeHiGVZ.js';
13
13
  import { R as ResolvedFarmI18nConfig } from './types-CnH8DOqo.js';
14
- import { F as FarmI18nRuntime } from './runtime-j1S3sDTh.js';
14
+ import { F as FarmI18nRuntime } from './runtime-BgDQzBiu.js';
15
15
  import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.js';
16
16
 
17
17
  interface IsolatedClientBoundaryReference {
@@ -1,4 +1,4 @@
1
- import { q as FarmConfig, P as ParsedRoute, ag as ResolvedFarmRouteRuntimeConfig, h as RouteModule, X as LayoutModule, a1 as SSGCollectionResult, Y as FarmRequest, Z as FarmResponse, ah as ResolvedFarmAPIConfig, j as FarmMdxResolvedConfig, ai as ResolvedFarmDevtoolsConfig, aj as ResolvedFarmDevIndicatorsConfig, ak as ResolvedFarmAuthConfig, al as ResolvedFarmPerformanceConfig, am as ResolvedFarmSecurityConfig } from './client-plugins-BvClItiL.mjs';
1
+ import { q as FarmConfig, P as ParsedRoute, ag as ResolvedFarmRouteRuntimeConfig, h as RouteModule, X as LayoutModule, a1 as SSGCollectionResult, Y as FarmRequest, Z as FarmResponse, ah as ResolvedFarmAPIConfig, j as FarmMdxResolvedConfig, ai as ResolvedFarmDevtoolsConfig, aj as ResolvedFarmDevIndicatorsConfig, ak as ResolvedFarmAuthConfig, al as ResolvedFarmPerformanceConfig, am as ResolvedFarmSecurityConfig } from './client-plugins-B6-07YmP.mjs';
2
2
  import { F as FarmDocsResolvedConfig } from './types-CKwggz9n.mjs';
3
3
  import { FarmMarkdownResolvedConfig } from './markdown.mjs';
4
4
  import { F as FarmWorkflowsResolvedConfig } from './workflows-ChyK_oTu.mjs';
@@ -7,11 +7,11 @@ import { R as ResolvedFarmImageConfig } from './image-config-Duob7wER.mjs';
7
7
  import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
8
8
  import { ViteDevServer } from 'vite';
9
9
  import { F as FarmIslandStrategy } from './island-CfGru1MO.mjs';
10
- import { M as MetadataImageKind, A as ApplicationMetadataRouteKind } from './metadata-route-p4K1l92V.mjs';
10
+ import { M as MetadataImageKind, A as ApplicationMetadataRouteKind } from './metadata-route-CWP_HjGU.mjs';
11
11
  import { FarmServerRendererRuntime, FarmRenderer } from './renderer.mjs';
12
- import { F as FarmRouteRenderPlan } from './render-plan-CU31j-Jk.mjs';
12
+ import { F as FarmRouteRenderPlan } from './render-plan-DLxJYAA5.mjs';
13
13
  import { R as ResolvedFarmI18nConfig } from './types-CnH8DOqo.mjs';
14
- import { F as FarmI18nRuntime } from './runtime-DDwvDtS4.mjs';
14
+ import { F as FarmI18nRuntime } from './runtime-CV2UCV-5.mjs';
15
15
  import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.mjs';
16
16
 
17
17
  interface IsolatedClientBoundaryReference {
@@ -1,7 +1,7 @@
1
- import { i as FarmMdxComponents, j as FarmMdxResolvedConfig, M as Metadata, h as RouteModule } from './client-plugins-BvClItiL.mjs';
2
- export { k as FarmMdxComponent, l as FarmMdxUserConfig, r as resolveMdxConfig } from './client-plugins-BvClItiL.mjs';
1
+ import { i as FarmMdxComponents, j as FarmMdxResolvedConfig, M as Metadata, h as RouteModule } from './client-plugins-B6-07YmP.mjs';
2
+ export { k as FarmMdxComponent, l as FarmMdxUserConfig, r as resolveMdxConfig } from './client-plugins-B6-07YmP.mjs';
3
3
  import './lifecycle-De0vQG45.mjs';
4
- import './route-Cq3aObmj.mjs';
4
+ import './route-CvEr4Uc9.mjs';
5
5
  import './cache.mjs';
6
6
  import './renderer.mjs';
7
7
  import 'http';
@@ -9,6 +9,7 @@ import './types-Cc8l9IqS.mjs';
9
9
  import 'db0';
10
10
  import 'unstorage';
11
11
  import 'react';
12
+ import './integration-api-BT024nuJ.mjs';
12
13
  import '@farming-labs/orm';
13
14
  import './types-CKwggz9n.mjs';
14
15
  import '@farming-labs/docs';
@@ -1,7 +1,7 @@
1
- import { i as FarmMdxComponents, j as FarmMdxResolvedConfig, M as Metadata, h as RouteModule } from './client-plugins-B9Sq-iMg.js';
2
- export { k as FarmMdxComponent, l as FarmMdxUserConfig, r as resolveMdxConfig } from './client-plugins-B9Sq-iMg.js';
1
+ import { i as FarmMdxComponents, j as FarmMdxResolvedConfig, M as Metadata, h as RouteModule } from './client-plugins-By6MVUX-.js';
2
+ export { k as FarmMdxComponent, l as FarmMdxUserConfig, r as resolveMdxConfig } from './client-plugins-By6MVUX-.js';
3
3
  import './lifecycle-De0vQG45.js';
4
- import './route-Y8lfz1wF.js';
4
+ import './route-4pd-EVtw.js';
5
5
  import './cache.js';
6
6
  import './renderer.js';
7
7
  import 'http';
@@ -9,6 +9,7 @@ import './types-Cc8l9IqS.js';
9
9
  import 'db0';
10
10
  import 'unstorage';
11
11
  import 'react';
12
+ import './integration-api-BT024nuJ.js';
12
13
  import '@farming-labs/orm';
13
14
  import './types-CKwggz9n.js';
14
15
  import '@farming-labs/docs';
package/dist/cache.cjs CHANGED
@@ -111,7 +111,13 @@ function recordFarmEventTrace(event) {
111
111
  activeSpan.addEvent(event.type, toEventAttributes(event), event.timestamp);
112
112
  }
113
113
  const error = event.type === "request.error" ? void 0 : getEventError(event);
114
- if (error !== void 0) recordSpanError(activeSpan, error);
114
+ if (error !== void 0) {
115
+ if (event.type === "render.error") {
116
+ recordSpanException(activeSpan, error);
117
+ } else {
118
+ recordSpanError(activeSpan, error);
119
+ }
120
+ }
115
121
  }
116
122
  const completedTraceContext = recordCompletedEventSpan(event, activeContext);
117
123
  return traceContext ?? completedTraceContext;
@@ -208,12 +214,26 @@ function getCompletedSpanDescriptor(event) {
208
214
  }
209
215
  }
210
216
  __name(getCompletedSpanDescriptor, "getCompletedSpanDescriptor");
217
+ function hashFarmCacheKey(value) {
218
+ let hash = 2166136261;
219
+ for (let index = 0; index < value.length; index++) {
220
+ hash ^= value.charCodeAt(index);
221
+ hash = Math.imul(hash, 16777619);
222
+ }
223
+ return (hash >>> 0).toString(16).padStart(8, "0");
224
+ }
225
+ __name(hashFarmCacheKey, "hashFarmCacheKey");
211
226
  function toEventAttributes(event) {
212
227
  const attributes = {};
228
+ const redactKey = typeof event.type === "string" && event.type.startsWith("cache.");
213
229
  for (const [key, value] of Object.entries(event)) {
214
230
  if (key === "timestamp" || key === "level" || key === "error" || key === "traceId" || key === "spanId" || key === "traceSampled" || value === void 0) {
215
231
  continue;
216
232
  }
233
+ if (redactKey && key === "key" && typeof value === "string") {
234
+ attributes["farm.key_hash"] = hashFarmCacheKey(value);
235
+ continue;
236
+ }
217
237
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
218
238
  attributes[`farm.${key}`] = value;
219
239
  } else if (Array.isArray(value)) {
@@ -233,9 +253,14 @@ function getEventError(event) {
233
253
  return "error" in event ? event.error : void 0;
234
254
  }
235
255
  __name(getEventError, "getEventError");
236
- function recordSpanError(span, error) {
256
+ function recordSpanException(span, error) {
237
257
  const normalized = error instanceof Error ? error : new Error(String(error));
238
258
  span.recordException(normalized);
259
+ return normalized;
260
+ }
261
+ __name(recordSpanException, "recordSpanException");
262
+ function recordSpanError(span, error) {
263
+ const normalized = recordSpanException(span, error);
239
264
  span.setStatus({ code: import_api.SpanStatusCode.ERROR, message: normalized.message });
240
265
  }
241
266
  __name(recordSpanError, "recordSpanError");
@@ -394,16 +419,29 @@ function getFarmCacheInvalidationState() {
394
419
  });
395
420
  }
396
421
  __name(getFarmCacheInvalidationState, "getFarmCacheInvalidationState");
422
+ function warnFarmCacheListenerError(scope, error) {
423
+ const detail = error instanceof Error ? error.stack ?? error.message : String(error);
424
+ console.warn(`[farm:cache] ${scope} listener failed: ${detail}`);
425
+ }
426
+ __name(warnFarmCacheListenerError, "warnFarmCacheListenerError");
397
427
  function notifyFarmCacheInvalidation(key) {
398
428
  if (typeof key !== "string" || key.length === 0) return;
399
429
  for (const listener of getFarmCacheInvalidationState().listeners) {
400
- listener(key);
430
+ try {
431
+ listener(key);
432
+ } catch (error) {
433
+ warnFarmCacheListenerError("invalidation", error);
434
+ }
401
435
  }
402
436
  }
403
437
  __name(notifyFarmCacheInvalidation, "notifyFarmCacheInvalidation");
404
438
  function notifyFarmCacheTask(task) {
405
439
  for (const listener of getFarmCacheInvalidationState().taskListeners) {
406
- listener(task);
440
+ try {
441
+ listener(task);
442
+ } catch (error) {
443
+ warnFarmCacheListenerError("task", error);
444
+ }
407
445
  }
408
446
  }
409
447
  __name(notifyFarmCacheTask, "notifyFarmCacheTask");
package/dist/cache.d.mts CHANGED
@@ -80,11 +80,25 @@ interface FarmCacheAdapter {
80
80
  /** Release the lease only when the supplied ownership token still matches. */
81
81
  releaseLease?(key: string, token: string): Promise<void>;
82
82
  }
83
+ interface FarmClientCacheUserConfig {
84
+ /**
85
+ * Module path, relative to the project root, whose default export is a
86
+ * client cache adapter (`defineClientCacheAdapter`). The module is bundled
87
+ * into the browser entry; the server never imports it.
88
+ */
89
+ adapter?: string;
90
+ /** Extra version salt, typically a build or deploy id; entries persisted under another salt are dropped. */
91
+ version?: string;
92
+ /** Debounce for persisted write-behind flushes, in milliseconds. */
93
+ flushDelayMs?: number;
94
+ }
83
95
  interface FarmCacheUserConfig {
84
96
  /** Shared cache implementation, for example a Redis-backed adapter. */
85
97
  adapter?: FarmCacheAdapter;
86
98
  /** Prefix isolating applications and deployments sharing one adapter. */
87
99
  namespace?: string;
100
+ /** Browser cache persistence; see the client cache adapter documentation. */
101
+ client?: FarmClientCacheUserConfig;
88
102
  /**
89
103
  * Coordinate cache fills across processes when the adapter implements
90
104
  * acquireLease/releaseLease. Set false to disable.
@@ -174,9 +188,62 @@ declare class FarmDataCache {
174
188
  }
175
189
  declare function getFarmDataCache(): FarmDataCache;
176
190
  declare function configureFarmCache(config: FarmCacheUserConfig | undefined): void;
191
+ /**
192
+ * Wrap an async function so its results are cached and shared across requests,
193
+ * processes, and restarts.
194
+ *
195
+ * The cache key is built from the wrapped function's identity (its name and a
196
+ * hash of its source), the active locale, `keyParts`, and the call arguments.
197
+ * Deriving identity from the source — rather than the closure instance — is
198
+ * deliberate: it keeps the key stable across processes and restarts so a
199
+ * distributed cache adapter can share entries between server instances.
200
+ *
201
+ * The consequence is that two closures with **identical source text but
202
+ * different captured variables** produce the same identity. Pass those captured
203
+ * values in `keyParts` so they take part in the key; otherwise the closures
204
+ * share a cache entry and return each other's data:
205
+ *
206
+ * ```ts
207
+ * // Collides: both closures have identical source, and `table` is captured,
208
+ * // not an argument, so it never reaches the key.
209
+ * const makeLoader = (table: string) =>
210
+ * unstable_cache(async (id: number) => db.get(table, id));
211
+ *
212
+ * // Correct: the captured value disambiguates the two closures.
213
+ * const makeLoader = (table: string) =>
214
+ * unstable_cache(async (id: number) => db.get(table, id), [table]);
215
+ * ```
216
+ *
217
+ * Values passed as call arguments already participate in the key and do not
218
+ * need to be repeated in `keyParts`.
219
+ *
220
+ * @param fn The async function to memoize.
221
+ * @param keyParts Extra values that identify this call site. Include every
222
+ * variable the function closes over that is not one of its arguments.
223
+ * @param options Tags, paths, and revalidation settings for the cached entry.
224
+ */
177
225
  declare function unstable_cache<Args extends unknown[], Result>(fn: (...args: Args) => Result | Promise<Result>, keyParts?: readonly unknown[], options?: FarmCacheOptions): (...args: Args) => Promise<Result>;
226
+ /**
227
+ * Invalidate every cache entry carrying `tag`.
228
+ *
229
+ * Observability note: the `count` on the emitted `cache.revalidateTag` event is
230
+ * derived from Farm's process-local entry tracking. With a shared `cache.adapter`
231
+ * configured, entries live in the adapter rather than in local memory, so the
232
+ * count can read as `0` even though the invalidation is still propagated to the
233
+ * adapter and applied. Treat it as a best-effort signal, not a distributed count.
234
+ */
178
235
  declare function revalidateTag(_tag: string, _profile?: RevalidateTagProfile): void | Promise<void>;
179
236
  declare function updateTag(tag: string): void | Promise<void>;
237
+ /**
238
+ * Invalidate cached data for a route path (and its PPR shell, if any).
239
+ *
240
+ * Observability note: the `count` on the emitted `cache.revalidatePath` event and
241
+ * the `ppr.shell.invalidated` event are derived from process-local entry tracking.
242
+ * With a shared `cache.adapter`, PPR shells live in the adapter rather than in
243
+ * local memory, so the count can read as `0` and `ppr.shell.invalidated` may not
244
+ * be emitted even though the invalidation is still propagated to the adapter and
245
+ * applied.
246
+ */
180
247
  declare function revalidatePath(routePath: string): void | Promise<void>;
181
248
  declare function invalidate(key: RouteDataCacheKey): void | Promise<void>;
182
249
  declare function invalidateRouteData(key: RouteDataCacheKey): void | Promise<void>;
@@ -191,4 +258,4 @@ declare function createRouteDataCacheKey(key: RouteDataCacheKey): string;
191
258
  declare function normalizeRevalidatePath(routePath: string): string;
192
259
  declare function createFarmCacheKey(parts: readonly unknown[]): string;
193
260
 
194
- export { type CacheKeyFactory, type DefinedCacheKey, type FarmCacheAdapter, type FarmCacheEntry, type FarmCacheInvalidationTarget, type FarmCacheOptions, type FarmCacheSetOptions, type FarmCacheStorage, type FarmCacheUserConfig, FarmDataCache, type GetFarmCacheEntryOptions, type InferCacheKeyData, type RevalidateTagProfile, type RouteDataCacheKey, type StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag };
261
+ export { type CacheKeyFactory, type DefinedCacheKey, type FarmCacheAdapter, type FarmCacheEntry, type FarmCacheInvalidationTarget, type FarmCacheOptions, type FarmCacheSetOptions, type FarmCacheStorage, type FarmCacheUserConfig, type FarmClientCacheUserConfig, FarmDataCache, type GetFarmCacheEntryOptions, type InferCacheKeyData, type RevalidateTagProfile, type RouteDataCacheKey, type StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag };
package/dist/cache.d.ts CHANGED
@@ -80,11 +80,25 @@ interface FarmCacheAdapter {
80
80
  /** Release the lease only when the supplied ownership token still matches. */
81
81
  releaseLease?(key: string, token: string): Promise<void>;
82
82
  }
83
+ interface FarmClientCacheUserConfig {
84
+ /**
85
+ * Module path, relative to the project root, whose default export is a
86
+ * client cache adapter (`defineClientCacheAdapter`). The module is bundled
87
+ * into the browser entry; the server never imports it.
88
+ */
89
+ adapter?: string;
90
+ /** Extra version salt, typically a build or deploy id; entries persisted under another salt are dropped. */
91
+ version?: string;
92
+ /** Debounce for persisted write-behind flushes, in milliseconds. */
93
+ flushDelayMs?: number;
94
+ }
83
95
  interface FarmCacheUserConfig {
84
96
  /** Shared cache implementation, for example a Redis-backed adapter. */
85
97
  adapter?: FarmCacheAdapter;
86
98
  /** Prefix isolating applications and deployments sharing one adapter. */
87
99
  namespace?: string;
100
+ /** Browser cache persistence; see the client cache adapter documentation. */
101
+ client?: FarmClientCacheUserConfig;
88
102
  /**
89
103
  * Coordinate cache fills across processes when the adapter implements
90
104
  * acquireLease/releaseLease. Set false to disable.
@@ -174,9 +188,62 @@ declare class FarmDataCache {
174
188
  }
175
189
  declare function getFarmDataCache(): FarmDataCache;
176
190
  declare function configureFarmCache(config: FarmCacheUserConfig | undefined): void;
191
+ /**
192
+ * Wrap an async function so its results are cached and shared across requests,
193
+ * processes, and restarts.
194
+ *
195
+ * The cache key is built from the wrapped function's identity (its name and a
196
+ * hash of its source), the active locale, `keyParts`, and the call arguments.
197
+ * Deriving identity from the source — rather than the closure instance — is
198
+ * deliberate: it keeps the key stable across processes and restarts so a
199
+ * distributed cache adapter can share entries between server instances.
200
+ *
201
+ * The consequence is that two closures with **identical source text but
202
+ * different captured variables** produce the same identity. Pass those captured
203
+ * values in `keyParts` so they take part in the key; otherwise the closures
204
+ * share a cache entry and return each other's data:
205
+ *
206
+ * ```ts
207
+ * // Collides: both closures have identical source, and `table` is captured,
208
+ * // not an argument, so it never reaches the key.
209
+ * const makeLoader = (table: string) =>
210
+ * unstable_cache(async (id: number) => db.get(table, id));
211
+ *
212
+ * // Correct: the captured value disambiguates the two closures.
213
+ * const makeLoader = (table: string) =>
214
+ * unstable_cache(async (id: number) => db.get(table, id), [table]);
215
+ * ```
216
+ *
217
+ * Values passed as call arguments already participate in the key and do not
218
+ * need to be repeated in `keyParts`.
219
+ *
220
+ * @param fn The async function to memoize.
221
+ * @param keyParts Extra values that identify this call site. Include every
222
+ * variable the function closes over that is not one of its arguments.
223
+ * @param options Tags, paths, and revalidation settings for the cached entry.
224
+ */
177
225
  declare function unstable_cache<Args extends unknown[], Result>(fn: (...args: Args) => Result | Promise<Result>, keyParts?: readonly unknown[], options?: FarmCacheOptions): (...args: Args) => Promise<Result>;
226
+ /**
227
+ * Invalidate every cache entry carrying `tag`.
228
+ *
229
+ * Observability note: the `count` on the emitted `cache.revalidateTag` event is
230
+ * derived from Farm's process-local entry tracking. With a shared `cache.adapter`
231
+ * configured, entries live in the adapter rather than in local memory, so the
232
+ * count can read as `0` even though the invalidation is still propagated to the
233
+ * adapter and applied. Treat it as a best-effort signal, not a distributed count.
234
+ */
178
235
  declare function revalidateTag(_tag: string, _profile?: RevalidateTagProfile): void | Promise<void>;
179
236
  declare function updateTag(tag: string): void | Promise<void>;
237
+ /**
238
+ * Invalidate cached data for a route path (and its PPR shell, if any).
239
+ *
240
+ * Observability note: the `count` on the emitted `cache.revalidatePath` event and
241
+ * the `ppr.shell.invalidated` event are derived from process-local entry tracking.
242
+ * With a shared `cache.adapter`, PPR shells live in the adapter rather than in
243
+ * local memory, so the count can read as `0` and `ppr.shell.invalidated` may not
244
+ * be emitted even though the invalidation is still propagated to the adapter and
245
+ * applied.
246
+ */
180
247
  declare function revalidatePath(routePath: string): void | Promise<void>;
181
248
  declare function invalidate(key: RouteDataCacheKey): void | Promise<void>;
182
249
  declare function invalidateRouteData(key: RouteDataCacheKey): void | Promise<void>;
@@ -191,4 +258,4 @@ declare function createRouteDataCacheKey(key: RouteDataCacheKey): string;
191
258
  declare function normalizeRevalidatePath(routePath: string): string;
192
259
  declare function createFarmCacheKey(parts: readonly unknown[]): string;
193
260
 
194
- export { type CacheKeyFactory, type DefinedCacheKey, type FarmCacheAdapter, type FarmCacheEntry, type FarmCacheInvalidationTarget, type FarmCacheOptions, type FarmCacheSetOptions, type FarmCacheStorage, type FarmCacheUserConfig, FarmDataCache, type GetFarmCacheEntryOptions, type InferCacheKeyData, type RevalidateTagProfile, type RouteDataCacheKey, type StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag };
261
+ export { type CacheKeyFactory, type DefinedCacheKey, type FarmCacheAdapter, type FarmCacheEntry, type FarmCacheInvalidationTarget, type FarmCacheOptions, type FarmCacheSetOptions, type FarmCacheStorage, type FarmCacheUserConfig, type FarmClientCacheUserConfig, FarmDataCache, type GetFarmCacheEntryOptions, type InferCacheKeyData, type RevalidateTagProfile, type RouteDataCacheKey, type StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag };
package/dist/cache.mjs CHANGED
@@ -16,12 +16,12 @@ import {
16
16
  storageCacheAdapter,
17
17
  unstable_cache,
18
18
  updateTag
19
- } from "./chunk-AXVJCMVF.mjs";
19
+ } from "./chunk-2HDOV47R.mjs";
20
20
  import {
21
21
  applyFarmCacheInvalidations
22
- } from "./chunk-RBRLLZL5.mjs";
22
+ } from "./chunk-34IAPZBG.mjs";
23
23
  import "./chunk-WZ5QFROO.mjs";
24
- import "./chunk-ZRBCBOEX.mjs";
24
+ import "./chunk-N2FY2QZ7.mjs";
25
25
  import "./chunk-CGILA3WO.mjs";
26
26
  export {
27
27
  FarmDataCache,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  notifyFarmCacheInvalidation,
3
3
  notifyFarmCacheTask
4
- } from "./chunk-RBRLLZL5.mjs";
4
+ } from "./chunk-34IAPZBG.mjs";
5
5
  import {
6
6
  getActiveFarmI18nSnapshot
7
7
  } from "./chunk-WZ5QFROO.mjs";
8
8
  import {
9
9
  emitFarmEvent
10
- } from "./chunk-ZRBCBOEX.mjs";
10
+ } from "./chunk-N2FY2QZ7.mjs";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-CGILA3WO.mjs";
@@ -844,4 +844,4 @@ export {
844
844
  normalizeRevalidatePath,
845
845
  createFarmCacheKey
846
846
  };
847
- //# sourceMappingURL=chunk-AXVJCMVF.mjs.map
847
+ //# sourceMappingURL=chunk-2HDOV47R.mjs.map