@farm.js/core 0.1.0-beta.96 → 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 (311) 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 +6 -6
  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 +4 -4
  13. package/dist/api.cjs +239 -70
  14. package/dist/api.d.mts +7 -6
  15. package/dist/api.d.ts +7 -6
  16. package/dist/api.mjs +17 -11
  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-MM46HTX6.mjs → chunk-3TWQERDE.mjs} +4 -3
  31. package/dist/chunk-3TWQERDE.mjs.map +1 -0
  32. package/dist/{chunk-RWYRFCLG.mjs → chunk-4X57GXQA.mjs} +2 -2
  33. package/dist/{chunk-3I55IGXU.mjs → chunk-52BR7LTX.mjs} +14 -15
  34. package/dist/chunk-52BR7LTX.mjs.map +1 -0
  35. package/dist/{chunk-RAGSHKDC.mjs → chunk-6EJHNHH4.mjs} +38 -3
  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-54XSGLKT.mjs → chunk-D7F7YZ7L.mjs} +93 -67
  43. package/dist/chunk-D7F7YZ7L.mjs.map +1 -0
  44. package/dist/{chunk-SCFX4UTD.mjs → chunk-EHTUKVSW.mjs} +1 -1
  45. package/dist/chunk-EHTUKVSW.mjs.map +1 -0
  46. package/dist/{chunk-LZTGDH3H.mjs → chunk-EPDIF432.mjs} +424 -10
  47. package/dist/chunk-EPDIF432.mjs.map +1 -0
  48. package/dist/{chunk-GZHKWHCH.mjs → chunk-FP5Q67FO.mjs} +167 -96
  49. package/dist/chunk-FP5Q67FO.mjs.map +1 -0
  50. package/dist/{chunk-HHZAOTQD.mjs → chunk-GJ7W6LNK.mjs} +7 -6
  51. package/dist/chunk-GJ7W6LNK.mjs.map +1 -0
  52. package/dist/{chunk-RLGUZ3HS.mjs → chunk-I3OOUWO5.mjs} +3 -3
  53. package/dist/{chunk-LKKMI7JG.mjs → chunk-IZBX2TEU.mjs} +153 -68
  54. package/dist/chunk-IZBX2TEU.mjs.map +1 -0
  55. package/dist/{chunk-74QPONAN.mjs → chunk-J3MPQ4MQ.mjs} +2 -2
  56. package/dist/{chunk-74QPONAN.mjs.map → chunk-J3MPQ4MQ.mjs.map} +1 -1
  57. package/dist/{chunk-ODJGAWDH.mjs → chunk-JV7JUD7Q.mjs} +4 -4
  58. package/dist/{chunk-Q3OX763A.mjs → chunk-LXDASSTE.mjs} +2 -2
  59. package/dist/{chunk-ZRBCBOEX.mjs → chunk-N2FY2QZ7.mjs} +28 -3
  60. package/dist/chunk-N2FY2QZ7.mjs.map +1 -0
  61. package/dist/{chunk-MRVJCLYQ.mjs → chunk-PSQ7N4XP.mjs} +4 -2
  62. package/dist/chunk-PSQ7N4XP.mjs.map +1 -0
  63. package/dist/{chunk-HVG3HLQZ.mjs → chunk-Q7WGOOAI.mjs} +3 -3
  64. package/dist/{chunk-WTYAPO5I.mjs → chunk-RCNWMEBT.mjs} +3 -2
  65. package/dist/{chunk-WTYAPO5I.mjs.map → chunk-RCNWMEBT.mjs.map} +1 -1
  66. package/dist/{chunk-3INDBMUU.mjs → chunk-TGDIACZT.mjs} +2 -2
  67. package/dist/{chunk-WB75GIX2.mjs → chunk-TQTB33JS.mjs} +14 -3
  68. package/dist/chunk-TQTB33JS.mjs.map +1 -0
  69. package/dist/{chunk-WMAYETRD.mjs → chunk-TT3E2JOF.mjs} +3 -3
  70. package/dist/{chunk-FVAM43KI.mjs → chunk-UMUWR5XA.mjs} +2 -2
  71. package/dist/{chunk-VOUJW4FL.mjs → chunk-WD2EBM3I.mjs} +70 -15
  72. package/dist/chunk-WD2EBM3I.mjs.map +1 -0
  73. package/dist/{chunk-ZPG6SNHH.mjs → chunk-WMJGA32P.mjs} +47 -5
  74. package/dist/chunk-WMJGA32P.mjs.map +1 -0
  75. package/dist/{chunk-TKQCJMY7.mjs → chunk-X4SFHKFH.mjs} +7 -4
  76. package/dist/{chunk-TKQCJMY7.mjs.map → chunk-X4SFHKFH.mjs.map} +1 -1
  77. package/dist/{chunk-Q7GPJZCO.mjs → chunk-YIBV77KZ.mjs} +26 -7
  78. package/dist/chunk-YIBV77KZ.mjs.map +1 -0
  79. package/dist/client/lifecycle.mjs +2 -2
  80. package/dist/{client-mcMC334J.d.mts → client-DWoLZ3QU.d.mts} +52 -5
  81. package/dist/{client-d5ONQ-Pd.d.ts → client-DuQuQC1h.d.ts} +52 -5
  82. package/dist/client-cache-BMxuFqwH.d.ts +18 -0
  83. package/dist/client-cache-CCK-fCe0.d.mts +18 -0
  84. package/dist/{client-plugins-BvClItiL.d.mts → client-plugins-B6-07YmP.d.mts} +52 -99
  85. package/dist/{client-plugins-B9Sq-iMg.d.ts → client-plugins-By6MVUX-.d.ts} +52 -99
  86. package/dist/client-plugins.cjs +1 -1
  87. package/dist/client-plugins.d.mts +3 -2
  88. package/dist/client-plugins.d.ts +3 -2
  89. package/dist/client-plugins.mjs +2 -2
  90. package/dist/client.cjs +757 -104
  91. package/dist/client.d.mts +124 -16
  92. package/dist/client.d.ts +124 -16
  93. package/dist/client.mjs +28 -14
  94. package/dist/config.d.mts +3 -2
  95. package/dist/config.d.ts +3 -2
  96. package/dist/{devtools-S52RRRMN.mjs → devtools-XWZX6CCL.mjs} +5 -5
  97. package/dist/{devtools-client-EOVDBPOI.mjs → devtools-client-Z7QQA3Q2.mjs} +2 -2
  98. package/dist/{devtools-ui-NJKFORTG.mjs → devtools-ui-2HG5M4EL.mjs} +3 -1
  99. package/dist/devtools-ui-2HG5M4EL.mjs.map +1 -0
  100. package/dist/docs.cjs +24 -5
  101. package/dist/docs.mjs +5 -5
  102. package/dist/i18n/server.cjs +13 -2
  103. package/dist/i18n/server.d.mts +2 -2
  104. package/dist/i18n/server.d.ts +2 -2
  105. package/dist/i18n/server.mjs +1 -1
  106. package/dist/index.cjs +1578 -772
  107. package/dist/index.d.mts +28 -20
  108. package/dist/index.d.ts +28 -20
  109. package/dist/index.mjs +53 -33
  110. package/dist/index.mjs.map +1 -1
  111. package/dist/integration-api-BT024nuJ.d.mts +97 -0
  112. package/dist/integration-api-BT024nuJ.d.ts +97 -0
  113. package/dist/integrations.d.mts +3 -2
  114. package/dist/integrations.d.ts +3 -2
  115. package/dist/internal/build-runtime.cjs +710 -532
  116. package/dist/internal/build-runtime.d.mts +5 -4
  117. package/dist/internal/build-runtime.d.ts +5 -4
  118. package/dist/internal/build-runtime.mjs +15 -15
  119. package/dist/internal/client-runtime.cjs +1 -1
  120. package/dist/internal/client-runtime.mjs +2 -2
  121. package/dist/internal/config-runtime.cjs +4 -1
  122. package/dist/internal/config-runtime.d.mts +4 -3
  123. package/dist/internal/config-runtime.d.ts +4 -3
  124. package/dist/internal/config-runtime.mjs +4 -4
  125. package/dist/internal/product-telemetry-runtime.cjs +1 -1
  126. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  127. package/dist/internal/production-runtime.cjs +29 -3
  128. package/dist/internal/production-runtime.d.mts +8 -7
  129. package/dist/internal/production-runtime.d.ts +8 -7
  130. package/dist/internal/production-runtime.mjs +5 -5
  131. package/dist/{metadata-route-yV4U6X8h.d.ts → metadata-route-8_V3UonT.d.ts} +1 -1
  132. package/dist/{metadata-route-p4K1l92V.d.mts → metadata-route-CWP_HjGU.d.mts} +1 -1
  133. package/dist/middleware.cjs +28 -2
  134. package/dist/middleware.d.mts +5 -4
  135. package/dist/middleware.d.ts +5 -4
  136. package/dist/middleware.mjs +4 -4
  137. package/dist/navigation.cjs +3 -1
  138. package/dist/navigation.mjs +3 -3
  139. package/dist/observability.cjs +27 -2
  140. package/dist/observability.mjs +1 -1
  141. package/dist/plugin.cjs +474 -334
  142. package/dist/plugin.d.mts +3 -2
  143. package/dist/plugin.d.ts +3 -2
  144. package/dist/plugin.mjs +12 -12
  145. package/dist/{production-runtime-IkB0Qj4i.d.mts → production-runtime-BGRH1dKG.d.mts} +1 -1
  146. package/dist/{production-runtime-0JTch4_d.d.ts → production-runtime-CdmzsDax.d.ts} +1 -1
  147. package/dist/query/client.cjs +11 -3
  148. package/dist/query/client.mjs +12 -4
  149. package/dist/query/client.mjs.map +1 -1
  150. package/dist/{render-plan-Dc8CjNI7.d.ts → render-plan-0GeHiGVZ.d.ts} +1 -1
  151. package/dist/{render-plan-CU31j-Jk.d.mts → render-plan-DLxJYAA5.d.mts} +1 -1
  152. package/dist/renderer-client.cjs +140 -26
  153. package/dist/renderer-client.d.mts +7 -6
  154. package/dist/renderer-client.d.ts +7 -6
  155. package/dist/renderer-client.mjs +16 -19
  156. package/dist/renderer-client.mjs.map +1 -1
  157. package/dist/{request-BXa1KY8i.d.mts → request-BCNXSXLh.d.mts} +1 -1
  158. package/dist/{request-CUUBujZt.d.ts → request-BstWbZ6O.d.ts} +1 -1
  159. package/dist/request.d.mts +4 -3
  160. package/dist/request.d.ts +4 -3
  161. package/dist/{route-Y8lfz1wF.d.ts → route-4pd-EVtw.d.ts} +45 -50
  162. package/dist/{route-Cq3aObmj.d.mts → route-CvEr4Uc9.d.mts} +45 -50
  163. package/dist/routes.cjs +27 -2
  164. package/dist/routes.d.mts +3 -2
  165. package/dist/routes.d.ts +3 -2
  166. package/dist/routes.mjs +4 -4
  167. package/dist/{runtime-j1S3sDTh.d.ts → runtime-BgDQzBiu.d.ts} +1 -0
  168. package/dist/{runtime-DDwvDtS4.d.mts → runtime-CV2UCV-5.d.mts} +1 -0
  169. package/dist/server-action-security.mjs +2 -2
  170. package/dist/server-fn-client.cjs +34 -2
  171. package/dist/server-fn-client.d.mts +6 -0
  172. package/dist/server-fn-client.d.ts +6 -0
  173. package/dist/server-fn-client.mjs +1 -1
  174. package/dist/server-fn.cjs +42 -4
  175. package/dist/server-fn.mjs +5 -5
  176. package/dist/server-plugins.d.mts +4 -3
  177. package/dist/server-plugins.d.ts +4 -3
  178. package/dist/server-query-client.cjs +146 -27
  179. package/dist/server-query-client.d.mts +3 -3
  180. package/dist/server-query-client.d.ts +3 -3
  181. package/dist/server-query-client.mjs +7 -7
  182. package/dist/{server-query-runtime-3zAj77yv.d.ts → server-query-runtime-DXRNhX_3.d.ts} +2 -0
  183. package/dist/{server-query-runtime-B50KAcj5.d.mts → server-query-runtime-aP52iuL5.d.mts} +2 -0
  184. package/dist/server-query.cjs +44 -5
  185. package/dist/server-query.d.mts +4 -0
  186. package/dist/server-query.d.ts +4 -0
  187. package/dist/server-query.mjs +7 -7
  188. package/dist/server.cjs +499 -355
  189. package/dist/server.d.mts +11 -10
  190. package/dist/server.d.ts +11 -10
  191. package/dist/server.mjs +16 -16
  192. package/dist/{spa-router-CyLkwst6.d.mts → spa-router-BeyAVSc6.d.mts} +1 -1
  193. package/dist/{spa-router-BkqGXaV_.d.ts → spa-router-COgu4txb.d.ts} +1 -1
  194. package/dist/testing.cjs +27 -2
  195. package/dist/testing.d.mts +3 -2
  196. package/dist/testing.d.ts +3 -2
  197. package/dist/testing.mjs +8 -8
  198. package/dist/{utils-NKR6SoNv.d.mts → utils-DL2VwDQl.d.mts} +1 -1
  199. package/dist/{utils-B2OHrb9F.d.ts → utils-DkU2c_1B.d.ts} +1 -1
  200. package/dist/version.cjs +1 -1
  201. package/dist/version.mjs +1 -1
  202. package/dist/vite.cjs +482 -338
  203. package/dist/vite.d.mts +3 -2
  204. package/dist/vite.d.ts +3 -2
  205. package/dist/vite.mjs +16 -12
  206. package/package.json +17 -17
  207. package/types/client.d.ts +87 -1
  208. package/dist/agent-runtime.cjs.map +0 -1
  209. package/dist/api/route-manager.cjs.map +0 -1
  210. package/dist/api/runtime.cjs.map +0 -1
  211. package/dist/api.cjs.map +0 -1
  212. package/dist/app-markdown.cjs.map +0 -1
  213. package/dist/cache.cjs.map +0 -1
  214. package/dist/chunk-3I55IGXU.mjs.map +0 -1
  215. package/dist/chunk-54XSGLKT.mjs.map +0 -1
  216. package/dist/chunk-7MABZJIM.mjs.map +0 -1
  217. package/dist/chunk-AXVJCMVF.mjs.map +0 -1
  218. package/dist/chunk-GZHKWHCH.mjs.map +0 -1
  219. package/dist/chunk-HHZAOTQD.mjs.map +0 -1
  220. package/dist/chunk-LKKMI7JG.mjs.map +0 -1
  221. package/dist/chunk-LZTGDH3H.mjs.map +0 -1
  222. package/dist/chunk-MM46HTX6.mjs.map +0 -1
  223. package/dist/chunk-MRVJCLYQ.mjs.map +0 -1
  224. package/dist/chunk-Q7GPJZCO.mjs.map +0 -1
  225. package/dist/chunk-RAGSHKDC.mjs.map +0 -1
  226. package/dist/chunk-RBRLLZL5.mjs.map +0 -1
  227. package/dist/chunk-SCFX4UTD.mjs.map +0 -1
  228. package/dist/chunk-VOUJW4FL.mjs.map +0 -1
  229. package/dist/chunk-WB75GIX2.mjs.map +0 -1
  230. package/dist/chunk-ZFNK77WN.mjs.map +0 -1
  231. package/dist/chunk-ZPG6SNHH.mjs.map +0 -1
  232. package/dist/chunk-ZRBCBOEX.mjs.map +0 -1
  233. package/dist/client/lifecycle.cjs.map +0 -1
  234. package/dist/client-cache-CopR_MaI.d.mts +0 -6
  235. package/dist/client-cache-Djy_TlE8.d.ts +0 -6
  236. package/dist/client-plugins.cjs.map +0 -1
  237. package/dist/client.cjs.map +0 -1
  238. package/dist/config.cjs.map +0 -1
  239. package/dist/cron.cjs.map +0 -1
  240. package/dist/deferred.cjs.map +0 -1
  241. package/dist/deployment.cjs.map +0 -1
  242. package/dist/devtools-ui-NJKFORTG.mjs.map +0 -1
  243. package/dist/docs.cjs.map +0 -1
  244. package/dist/env-types.cjs.map +0 -1
  245. package/dist/env.cjs.map +0 -1
  246. package/dist/environment/vite.cjs.map +0 -1
  247. package/dist/environment.cjs.map +0 -1
  248. package/dist/font.cjs.map +0 -1
  249. package/dist/headers.cjs.map +0 -1
  250. package/dist/i18n/client.cjs.map +0 -1
  251. package/dist/i18n/index.cjs.map +0 -1
  252. package/dist/i18n/server.cjs.map +0 -1
  253. package/dist/image/server.cjs.map +0 -1
  254. package/dist/image/sharp.cjs.map +0 -1
  255. package/dist/image.cjs.map +0 -1
  256. package/dist/index.cjs.map +0 -1
  257. package/dist/instrumentation.cjs.map +0 -1
  258. package/dist/integrations.cjs.map +0 -1
  259. package/dist/internal/build-runtime.cjs.map +0 -1
  260. package/dist/internal/client-runtime.cjs.map +0 -1
  261. package/dist/internal/config-runtime.cjs.map +0 -1
  262. package/dist/internal/isolated-boundary.cjs.map +0 -1
  263. package/dist/internal/metadata-image-runtime.cjs.map +0 -1
  264. package/dist/internal/product-telemetry-runtime.cjs.map +0 -1
  265. package/dist/internal/production-node-env.cjs.map +0 -1
  266. package/dist/internal/production-runtime.cjs.map +0 -1
  267. package/dist/markdown.cjs.map +0 -1
  268. package/dist/middleware.cjs.map +0 -1
  269. package/dist/navigation.cjs.map +0 -1
  270. package/dist/observability.cjs.map +0 -1
  271. package/dist/plugin.cjs.map +0 -1
  272. package/dist/query/client.cjs.map +0 -1
  273. package/dist/query/index.cjs.map +0 -1
  274. package/dist/query/parsers.cjs.map +0 -1
  275. package/dist/query/server.cjs.map +0 -1
  276. package/dist/renderer/react/client.cjs.map +0 -1
  277. package/dist/renderer/react/server.cjs.map +0 -1
  278. package/dist/renderer/react/vite.cjs.map +0 -1
  279. package/dist/renderer-client.cjs.map +0 -1
  280. package/dist/renderer.cjs.map +0 -1
  281. package/dist/request.cjs.map +0 -1
  282. package/dist/router.cjs.map +0 -1
  283. package/dist/routes.cjs.map +0 -1
  284. package/dist/server-action-security.cjs.map +0 -1
  285. package/dist/server-fn-client.cjs.map +0 -1
  286. package/dist/server-fn.cjs.map +0 -1
  287. package/dist/server-plugins.cjs.map +0 -1
  288. package/dist/server-query-client.cjs.map +0 -1
  289. package/dist/server-query.cjs.map +0 -1
  290. package/dist/server.cjs.map +0 -1
  291. package/dist/storage.cjs.map +0 -1
  292. package/dist/testing.cjs.map +0 -1
  293. package/dist/theme/client.cjs.map +0 -1
  294. package/dist/theme/index.cjs.map +0 -1
  295. package/dist/theme/runtime.cjs.map +0 -1
  296. package/dist/theme/server.cjs.map +0 -1
  297. package/dist/version.cjs.map +0 -1
  298. package/dist/vite.cjs.map +0 -1
  299. package/dist/workflows.cjs.map +0 -1
  300. /package/dist/{chunk-VV24CC42.mjs.map → chunk-35NPLKQJ.mjs.map} +0 -0
  301. /package/dist/{chunk-RWYRFCLG.mjs.map → chunk-4X57GXQA.mjs.map} +0 -0
  302. /package/dist/{chunk-MOW47IF5.mjs.map → chunk-6UYVU46O.mjs.map} +0 -0
  303. /package/dist/{chunk-RLGUZ3HS.mjs.map → chunk-I3OOUWO5.mjs.map} +0 -0
  304. /package/dist/{chunk-ODJGAWDH.mjs.map → chunk-JV7JUD7Q.mjs.map} +0 -0
  305. /package/dist/{chunk-Q3OX763A.mjs.map → chunk-LXDASSTE.mjs.map} +0 -0
  306. /package/dist/{chunk-HVG3HLQZ.mjs.map → chunk-Q7WGOOAI.mjs.map} +0 -0
  307. /package/dist/{chunk-3INDBMUU.mjs.map → chunk-TGDIACZT.mjs.map} +0 -0
  308. /package/dist/{chunk-WMAYETRD.mjs.map → chunk-TT3E2JOF.mjs.map} +0 -0
  309. /package/dist/{chunk-FVAM43KI.mjs.map → chunk-UMUWR5XA.mjs.map} +0 -0
  310. /package/dist/{devtools-S52RRRMN.mjs.map → devtools-XWZX6CCL.mjs.map} +0 -0
  311. /package/dist/{devtools-client-EOVDBPOI.mjs.map → devtools-client-Z7QQA3Q2.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-FSIXEIOB.mjs";
10
10
  import {
11
11
  build
12
- } from "./chunk-54XSGLKT.mjs";
12
+ } from "./chunk-D7F7YZ7L.mjs";
13
13
  import "./chunk-3UNYNJG3.mjs";
14
14
  import "./chunk-4S3ORGFA.mjs";
15
15
  import {
@@ -25,13 +25,13 @@ import {
25
25
  isFarmDocsRequest,
26
26
  loadFarmDocsPage,
27
27
  resolveFarmDocsContentDir
28
- } from "./chunk-Q7GPJZCO.mjs";
28
+ } from "./chunk-YIBV77KZ.mjs";
29
29
  import "./chunk-V7RBCSDJ.mjs";
30
30
  import "./chunk-GTU5AB4E.mjs";
31
31
  import {
32
32
  usePathname,
33
33
  useSearchParams
34
- } from "./chunk-HVG3HLQZ.mjs";
34
+ } from "./chunk-Q7WGOOAI.mjs";
35
35
  import {
36
36
  cookies,
37
37
  headers
@@ -52,7 +52,7 @@ import {
52
52
  parseProgrammaticRoutePath,
53
53
  routesBuilder,
54
54
  scanProgrammaticPagePaths
55
- } from "./chunk-Q3OX763A.mjs";
55
+ } from "./chunk-LXDASSTE.mjs";
56
56
  import "./chunk-5BY76U2M.mjs";
57
57
  import {
58
58
  loadRouteParams,
@@ -78,18 +78,18 @@ import {
78
78
  memoryRateLimitStorage,
79
79
  middleware,
80
80
  unwrapMiddleware
81
- } from "./chunk-3INDBMUU.mjs";
81
+ } from "./chunk-TGDIACZT.mjs";
82
82
  import {
83
83
  applyProductionMiddlewareHeaders,
84
84
  createProductionMiddlewareRunner
85
- } from "./chunk-WTYAPO5I.mjs";
85
+ } from "./chunk-RCNWMEBT.mjs";
86
86
  import {
87
87
  farmApiPlugin
88
- } from "./chunk-ODJGAWDH.mjs";
88
+ } from "./chunk-JV7JUD7Q.mjs";
89
89
  import {
90
90
  FARM_SERVER_QUERY_SYMBOL,
91
91
  createServerQuery
92
- } from "./chunk-HHZAOTQD.mjs";
92
+ } from "./chunk-GJ7W6LNK.mjs";
93
93
  import {
94
94
  FarmEnvironmentError,
95
95
  createClientOnlyFn,
@@ -105,7 +105,7 @@ import {
105
105
  resolveDeployConfig,
106
106
  resolveDeployOutputPath,
107
107
  resolveMigrationsConfig
108
- } from "./chunk-TKQCJMY7.mjs";
108
+ } from "./chunk-X4SFHKFH.mjs";
109
109
  import {
110
110
  defineConfig,
111
111
  defineFarmConfig
@@ -117,29 +117,36 @@ import {
117
117
  _parseServerFnSchema,
118
118
  createServerFn,
119
119
  createServerMiddleware
120
- } from "./chunk-RLGUZ3HS.mjs";
120
+ } from "./chunk-I3OOUWO5.mjs";
121
121
  import {
122
+ FARM_CACHE_INVALIDATION_CHANNEL,
123
+ FARM_CLIENT_CACHE_PERSIST_VERSION,
122
124
  FarmProvider,
123
125
  FetcherInputError,
124
126
  Link,
127
+ clearPersistedCache,
125
128
  createStore,
129
+ defineClientCacheAdapter,
130
+ enableCrossTabCacheInvalidation,
131
+ initPersistedClientCache,
132
+ storageClientCacheAdapter,
126
133
  useFetcher,
127
134
  useMutation
128
- } from "./chunk-LZTGDH3H.mjs";
135
+ } from "./chunk-EPDIF432.mjs";
129
136
  import {
130
137
  useAction,
131
138
  useServerFn
132
- } from "./chunk-RAGSHKDC.mjs";
139
+ } from "./chunk-6EJHNHH4.mjs";
133
140
  import {
134
141
  useServerQuery
135
- } from "./chunk-3I55IGXU.mjs";
142
+ } from "./chunk-52BR7LTX.mjs";
136
143
  import {
137
144
  useBlocker,
138
145
  useNavigation,
139
146
  usePageState,
140
147
  useRouter,
141
148
  useScrollRestoration
142
- } from "./chunk-MOW47IF5.mjs";
149
+ } from "./chunk-6UYVU46O.mjs";
143
150
  import {
144
151
  useTheme
145
152
  } from "./chunk-CHITERV2.mjs";
@@ -148,6 +155,7 @@ import {
148
155
  FARM_API_ROUTE_META_SYMBOL,
149
156
  FARM_API_ROUTE_REF_SYMBOL,
150
157
  IntegrationClientError,
158
+ applyServerFnOptimisticUpdates,
151
159
  createAPIClient,
152
160
  createApiClients,
153
161
  createIntegrationApi,
@@ -161,8 +169,10 @@ import {
161
169
  integrationClients,
162
170
  integrationsClient,
163
171
  integrationsServer,
164
- isAPIRouteRef
165
- } from "./chunk-LKKMI7JG.mjs";
172
+ isAPIRouteRef,
173
+ resolveServerFnInvalidateTargets,
174
+ settleServerFnOptimisticUpdates
175
+ } from "./chunk-IZBX2TEU.mjs";
166
176
  import "./chunk-DU3PKDVQ.mjs";
167
177
  import {
168
178
  beginFarmServerQueryAction,
@@ -170,7 +180,7 @@ import {
170
180
  fetchServerQuery,
171
181
  prefetchServerQuery,
172
182
  shouldApplyFarmServerQueryActionResult
173
- } from "./chunk-VOUJW4FL.mjs";
183
+ } from "./chunk-WD2EBM3I.mjs";
174
184
  import {
175
185
  getTheme,
176
186
  setTheme,
@@ -190,17 +200,17 @@ import {
190
200
  pushState,
191
201
  readPageState,
192
202
  replaceState
193
- } from "./chunk-MRVJCLYQ.mjs";
203
+ } from "./chunk-PSQ7N4XP.mjs";
194
204
  import "./chunk-ULD4ENAH.mjs";
195
205
  import "./chunk-JIT7GXDP.mjs";
196
- import "./chunk-ZPG6SNHH.mjs";
197
- import "./chunk-SCFX4UTD.mjs";
206
+ import "./chunk-WMJGA32P.mjs";
207
+ import "./chunk-EHTUKVSW.mjs";
198
208
  import {
199
209
  FarmClientPluginManager,
200
210
  createClientPluginManager,
201
211
  installChunkErrorRecovery,
202
212
  isChunkLoadError
203
- } from "./chunk-FVAM43KI.mjs";
213
+ } from "./chunk-UMUWR5XA.mjs";
204
214
  import {
205
215
  FarmRuntimeShutdownError,
206
216
  PluginManager,
@@ -222,7 +232,7 @@ import {
222
232
  parseRouteRenderingDirective,
223
233
  resolveRouteRenderingConfig,
224
234
  resolveRouteRenderingConfigFromFile
225
- } from "./chunk-GZHKWHCH.mjs";
235
+ } from "./chunk-FP5Q67FO.mjs";
226
236
  import {
227
237
  APITypeGenerator
228
238
  } from "./chunk-YVPFZ2TK.mjs";
@@ -257,7 +267,7 @@ import {
257
267
  FARM_DEVTOOLS_LAUNCH_PARAM,
258
268
  FARM_DEVTOOLS_PATH,
259
269
  resolveFarmDevtoolsConfig
260
- } from "./chunk-7MABZJIM.mjs";
270
+ } from "./chunk-7PYVLJ4J.mjs";
261
271
  import {
262
272
  normalizeRouteRules,
263
273
  routeRulesToHeaders,
@@ -348,7 +358,7 @@ import {
348
358
  runWithServerActionRequest,
349
359
  sanitizeServerActionError,
350
360
  validateServerActionRequest
351
- } from "./chunk-VV24CC42.mjs";
361
+ } from "./chunk-35NPLKQJ.mjs";
352
362
  import "./chunk-N2KC75H7.mjs";
353
363
  import {
354
364
  resolveFarmThemeConfig
@@ -407,7 +417,7 @@ import {
407
417
  import {
408
418
  MiddlewareManager,
409
419
  createContext
410
- } from "./chunk-RWYRFCLG.mjs";
420
+ } from "./chunk-4X57GXQA.mjs";
411
421
  import {
412
422
  _runWithMiddlewareContext,
413
423
  _runWithMiddlewareData,
@@ -421,14 +431,14 @@ import {
421
431
  _runWithAfterRequest,
422
432
  _withAfterNodeMiddleware,
423
433
  after
424
- } from "./chunk-ZFNK77WN.mjs";
434
+ } from "./chunk-6JNGOC37.mjs";
425
435
  import {
426
436
  APIRouteConflictError,
427
437
  APIRouteManager,
428
438
  API_ROUTE_METHODS
429
- } from "./chunk-WMAYETRD.mjs";
439
+ } from "./chunk-TT3E2JOF.mjs";
430
440
  import "./chunk-NXV52RNX.mjs";
431
- import "./chunk-WB75GIX2.mjs";
441
+ import "./chunk-TQTB33JS.mjs";
432
442
  import "./chunk-STV7A2LH.mjs";
433
443
  import "./chunk-XNWHZQ6A.mjs";
434
444
  import {
@@ -478,7 +488,7 @@ import {
478
488
  normalizeRouteResponse,
479
489
  resolveAPIRouteEndpoint,
480
490
  resolvePluginRoutes
481
- } from "./chunk-MM46HTX6.mjs";
491
+ } from "./chunk-3TWQERDE.mjs";
482
492
  import "./chunk-4OAR7CTF.mjs";
483
493
  import {
484
494
  resolveFarmAPIServerBasePath
@@ -563,10 +573,10 @@ import {
563
573
  storageCacheAdapter,
564
574
  unstable_cache,
565
575
  updateTag
566
- } from "./chunk-AXVJCMVF.mjs";
576
+ } from "./chunk-2HDOV47R.mjs";
567
577
  import {
568
578
  applyFarmCacheInvalidations
569
- } from "./chunk-RBRLLZL5.mjs";
579
+ } from "./chunk-34IAPZBG.mjs";
570
580
  import "./chunk-WZ5QFROO.mjs";
571
581
  import {
572
582
  configureFarmObservability,
@@ -579,9 +589,9 @@ import {
579
589
  resetFarmObservability,
580
590
  runWithFarmRequestSpan,
581
591
  runWithFarmSpan
582
- } from "./chunk-ZRBCBOEX.mjs";
592
+ } from "./chunk-N2FY2QZ7.mjs";
583
593
  import "./chunk-FXG2PS27.mjs";
584
- import "./chunk-74QPONAN.mjs";
594
+ import "./chunk-J3MPQ4MQ.mjs";
585
595
  import {
586
596
  createCompressionPlugin,
587
597
  createEnvPlugin,
@@ -781,6 +791,8 @@ export {
781
791
  EndpointFailure,
782
792
  FARM_API_ROUTE_META_SYMBOL,
783
793
  FARM_API_ROUTE_REF_SYMBOL,
794
+ FARM_CACHE_INVALIDATION_CHANNEL,
795
+ FARM_CLIENT_CACHE_PERSIST_VERSION,
784
796
  FARM_CRON_MANIFEST,
785
797
  FARM_DEFERRED_BRAND,
786
798
  FARM_DEFERRED_CONTENT_TYPE,
@@ -839,6 +851,7 @@ export {
839
851
  applyFarmWorkflowVercelCrons,
840
852
  applyMarkdownNegotiationHeaders,
841
853
  applyProductionMiddlewareHeaders,
854
+ applyServerFnOptimisticUpdates,
842
855
  asArrayOf,
843
856
  asBoolean,
844
857
  asFloat,
@@ -850,6 +863,7 @@ export {
850
863
  beginFarmServerQueryAction,
851
864
  build,
852
865
  buildFarmRoutePath,
866
+ clearPersistedCache,
853
867
  collectSSGPages,
854
868
  completeFarmServerQueryAction,
855
869
  configureFarmCache,
@@ -926,6 +940,7 @@ export {
926
940
  databaseStorage,
927
941
  defer,
928
942
  defineCacheKey,
943
+ defineClientCacheAdapter,
929
944
  defineConfig,
930
945
  defineCron,
931
946
  defineFarmConfig,
@@ -946,6 +961,7 @@ export {
946
961
  disposeStorage,
947
962
  driverStorage,
948
963
  emitFarmEvent,
964
+ enableCrossTabCacheInvalidation,
949
965
  endpoint,
950
966
  env,
951
967
  farmApiPlugin,
@@ -1014,6 +1030,7 @@ export {
1014
1030
  hasPPR,
1015
1031
  headers,
1016
1032
  htmlToMarkdown,
1033
+ initPersistedClientCache,
1017
1034
  initStorage,
1018
1035
  installChunkErrorRecovery,
1019
1036
  integrationClients,
@@ -1144,6 +1161,7 @@ export {
1144
1161
  resolveRouteRenderingConfig,
1145
1162
  resolveRouteRenderingConfigFromFile,
1146
1163
  resolveServerActionsConfig,
1164
+ resolveServerFnInvalidateTargets,
1147
1165
  resolveStorageRuntimeClient,
1148
1166
  resolveWorkflowsConfig,
1149
1167
  revalidatePath,
@@ -1164,10 +1182,12 @@ export {
1164
1182
  serverEnv,
1165
1183
  setEnv,
1166
1184
  setTheme,
1185
+ settleServerFnOptimisticUpdates,
1167
1186
  shouldApplyFarmServerQueryActionResult,
1168
1187
  snapshotDeferredData,
1169
1188
  sqliteStorage,
1170
1189
  storageCacheAdapter,
1190
+ storageClientCacheAdapter,
1171
1191
  titleFromMarkdown,
1172
1192
  toFormData,
1173
1193
  toPosixPath,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hmr.ts","../src/openapi/scalar-component.tsx","../src/openapi/docs-route.tsx"],"sourcesContent":["import type { ViteDevServer, ModuleNode } from \"vite\";\nimport { toPosixPath } from \"./utils\";\n\nexport class HMRManager {\n private server: ViteDevServer;\n\n constructor(server: ViteDevServer) {\n this.server = server;\n }\n\n /**\n * Send HMR update to client\n */\n async send(payload: any) {\n this.server.ws.send(payload);\n }\n\n /**\n * Trigger full page reload\n */\n async reloadPage() {\n this.server.ws.send({\n type: \"full-reload\",\n path: \"*\",\n });\n }\n\n /**\n * Handle file change and trigger HMR\n */\n async handleFileChange(file: string) {\n const module = await this.server.moduleGraph.getModuleByUrl(file);\n const normalizedFile = toPosixPath(file);\n\n if (!module) {\n return;\n }\n\n // Invalidate module\n this.server.moduleGraph.invalidateModule(module);\n\n // Get affected modules\n const affectedModules = this.getAffectedModules(module);\n\n if (affectedModules.size === 0) {\n return;\n }\n\n if (\n normalizedFile.includes(\"/app/\") &&\n /\\/page\\.(?:tsx?|jsx?|vue|svelte)$/.test(normalizedFile)\n ) {\n await this.reloadPage();\n return;\n }\n\n if (\n normalizedFile.includes(\"/app/\") &&\n /\\/layout\\.(?:tsx?|jsx?|vue|svelte)$/.test(normalizedFile)\n ) {\n await this.reloadPage();\n return;\n }\n // Send update for other files\n this.send({\n type: \"update\",\n updates: Array.from(affectedModules).map((m) => ({\n type: m.type === \"css\" ? \"css-update\" : \"js-update\",\n path: m.url,\n acceptedPath: m.url,\n timestamp: Date.now(),\n })),\n });\n }\n\n /**\n * Get all affected modules in the dependency graph\n */\n private getAffectedModules(module: ModuleNode): Set<ModuleNode> {\n const affected = new Set<ModuleNode>();\n const seen = new Set<ModuleNode>();\n\n const traverse = (mod: ModuleNode) => {\n if (seen.has(mod)) return;\n seen.add(mod);\n affected.add(mod);\n\n // A self-accepting module is the HMR boundary: it re-runs with the\n // update, so nothing above it is affected.\n if (mod.isSelfAccepting) return;\n\n for (const importer of mod.importers) {\n // An importer that accepts this dependency is likewise a boundary:\n // it receives the update, but its own importers do not. Accepting is\n // per-edge, so the importer stays traversable via other dependencies.\n if (importer.acceptedHmrDeps?.has(mod)) {\n affected.add(importer);\n continue;\n }\n traverse(importer);\n }\n };\n\n traverse(module);\n return affected;\n }\n\n /**\n * Handle custom HMR events from client\n */\n onClientMessage(event: string, callback: (data: any) => void) {\n // Vite handles this via ws.on\n }\n}\n\n/**\n * Create HMR client code for injection\n */\nexport function createHMRClientCode(): string {\n return `\n// Farm.js HMR Client\nif (import.meta.hot) {\n // Accept HMR updates for this module\n import.meta.hot.accept((newModule) => {\n if (newModule) {\n // Module updated, trigger re-render\n window.location.reload();\n }\n });\n\n // Listen for custom Farm.js events\n import.meta.hot.on('farm:route-update', (data) => {\n console.log('Route updated:', data.path);\n window.location.reload();\n });\n\n // Handle CSS updates\n import.meta.hot.on('vite:beforeUpdate', () => {\n console.log('[Farm.js] HMR update incoming...');\n });\n\n import.meta.hot.on('vite:afterUpdate', () => {\n console.log('[Farm.js] HMR update applied ✓');\n });\n\n // Handle errors\n import.meta.hot.on('vite:error', (err) => {\n console.error('[Farm.js] HMR error:', err);\n });\n}\n`;\n}\n","import React from \"react\";\n\ninterface ScalarAPIDocumentationProps {\n spec: any;\n config?: {\n theme?: \"default\" | \"purple\" | \"blue\" | \"green\" | \"red\" | \"yellow\";\n layout?: \"modern\" | \"classic\";\n showSidebar?: boolean;\n hideDownloadButton?: boolean;\n hideTryItPanel?: boolean;\n };\n}\n\nexport function ScalarAPIDocumentation({ spec, config = {} }: ScalarAPIDocumentationProps) {\n const [isLoaded, setIsLoaded] = React.useState(false);\n\n React.useEffect(() => {\n // Dynamically import Scalar components\n const loadScalar = async () => {\n try {\n // Load Scalar CSS\n const cssLink = document.createElement(\"link\");\n cssLink.rel = \"stylesheet\";\n cssLink.href = \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/style.css\";\n document.head.appendChild(cssLink);\n\n // Load Scalar JS\n const script = document.createElement(\"script\");\n script.src =\n \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/browser/standalone.js\";\n script.onload = () => setIsLoaded(true);\n document.head.appendChild(script);\n } catch (error) {\n console.error(\"Failed to load Scalar:\", error);\n }\n };\n\n loadScalar();\n }, []);\n\n React.useEffect(() => {\n if (isLoaded && window.ScalarApiReference) {\n // Initialize Scalar\n const container = document.getElementById(\"scalar-api-reference\");\n if (container) {\n window.ScalarApiReference({\n spec,\n theme: config.theme || \"default\",\n layout: config.layout || \"modern\",\n showSidebar: config.showSidebar !== false,\n hideDownloadButton: config.hideDownloadButton || false,\n hideTryItPanel: config.hideTryItPanel || false,\n });\n }\n }\n }, [isLoaded, spec, config]);\n\n return (\n <div className=\"scalar-container\">\n <div id=\"scalar-api-reference\" style={{ height: \"100vh\", width: \"100%\" }} />\n </div>\n );\n}\n\n// Extend window type for Scalar\ndeclare global {\n interface Window {\n ScalarApiReference: (config: any) => void;\n }\n}\n","import React from \"react\";\nimport { ScalarAPIDocumentation } from \"./scalar-component\";\n\ninterface DocsRouteProps {\n spec: any;\n config?: any;\n}\n\nexport function DocsRoute({ spec, config }: DocsRouteProps) {\n return (\n <html lang=\"en\">\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" href=\"data:,\" />\n <title>{config?.title || \"API Documentation\"}</title>\n <style>{`\n body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n }\n .scalar-container {\n height: 100vh;\n width: 100%;\n }\n `}</style>\n </head>\n <body>\n <ScalarAPIDocumentation spec={spec} config={config} />\n </body>\n </html>\n );\n}\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AA,KAAC,UAAK,MAAK,YAAW,SAAQ,uCAAsC;AAAA,MACpE,gBAAAA,KAAC,UAAK,KAAI,QAAO,MAAK,UAAS;AAAA,MAC/B,gBAAAA,KAAC,WAAO,kBAAQ,SAAS,qBAAoB;AAAA,MAC7C,gBAAAA,KAAC,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAUN;AAAA,OACJ;AAAA,IACA,gBAAAA,KAAC,UACC,0BAAAA,KAAC,0BAAuB,MAAY,QAAgB,GACtD;AAAA,KACF;AAEJ;AAzBgB;","names":["jsx"]}
1
+ {"version":3,"sources":["../src/hmr.ts","../src/openapi/scalar-component.tsx","../src/openapi/docs-route.tsx"],"sourcesContent":["import type { ViteDevServer, ModuleNode } from \"vite\";\nimport { toPosixPath } from \"./utils\";\n\nexport class HMRManager {\n private server: ViteDevServer;\n\n constructor(server: ViteDevServer) {\n this.server = server;\n }\n\n /**\n * Send HMR update to client\n */\n async send(payload: any) {\n this.server.ws.send(payload);\n }\n\n /**\n * Trigger full page reload\n */\n async reloadPage() {\n this.server.ws.send({\n type: \"full-reload\",\n path: \"*\",\n });\n }\n\n /**\n * Handle file change and trigger HMR\n */\n async handleFileChange(file: string) {\n const module = await this.server.moduleGraph.getModuleByUrl(file);\n const normalizedFile = toPosixPath(file);\n\n if (!module) {\n return;\n }\n\n // Invalidate module\n this.server.moduleGraph.invalidateModule(module);\n\n // Get affected modules\n const affectedModules = this.getAffectedModules(module);\n\n if (affectedModules.size === 0) {\n return;\n }\n\n if (\n normalizedFile.includes(\"/app/\") &&\n /\\/page\\.(?:tsx?|jsx?|vue|svelte)$/.test(normalizedFile)\n ) {\n await this.reloadPage();\n return;\n }\n\n if (\n normalizedFile.includes(\"/app/\") &&\n /\\/layout\\.(?:tsx?|jsx?|vue|svelte)$/.test(normalizedFile)\n ) {\n await this.reloadPage();\n return;\n }\n // Send update for other files\n this.send({\n type: \"update\",\n updates: Array.from(affectedModules).map((m) => ({\n type: m.type === \"css\" ? \"css-update\" : \"js-update\",\n path: m.url,\n acceptedPath: m.url,\n timestamp: Date.now(),\n })),\n });\n }\n\n /**\n * Get all affected modules in the dependency graph\n */\n private getAffectedModules(module: ModuleNode): Set<ModuleNode> {\n const affected = new Set<ModuleNode>();\n const seen = new Set<ModuleNode>();\n\n const traverse = (mod: ModuleNode) => {\n if (seen.has(mod)) return;\n seen.add(mod);\n affected.add(mod);\n\n // A self-accepting module is the HMR boundary: it re-runs with the\n // update, so nothing above it is affected.\n if (mod.isSelfAccepting) return;\n\n for (const importer of mod.importers) {\n // An importer that accepts this dependency is likewise a boundary:\n // it receives the update, but its own importers do not. Accepting is\n // per-edge, so the importer stays traversable via other dependencies.\n if (importer.acceptedHmrDeps?.has(mod)) {\n affected.add(importer);\n continue;\n }\n traverse(importer);\n }\n };\n\n traverse(module);\n return affected;\n }\n\n /**\n * Handle custom HMR events from client\n */\n onClientMessage(event: string, callback: (data: any) => void) {\n // Vite handles this via ws.on\n }\n}\n\n/**\n * Create HMR client code for injection\n */\nexport function createHMRClientCode(): string {\n return `\n// Farm.js HMR Client\nif (import.meta.hot) {\n // Accept HMR updates for this module\n import.meta.hot.accept((newModule) => {\n if (newModule) {\n // Module updated, trigger re-render\n window.location.reload();\n }\n });\n\n // Listen for custom Farm.js events\n import.meta.hot.on('farm:route-update', (data) => {\n console.log('Route updated:', data.path);\n window.location.reload();\n });\n\n // Handle CSS updates\n import.meta.hot.on('vite:beforeUpdate', () => {\n console.log('[Farm.js] HMR update incoming...');\n });\n\n import.meta.hot.on('vite:afterUpdate', () => {\n console.log('[Farm.js] HMR update applied ✓');\n });\n\n // Handle errors\n import.meta.hot.on('vite:error', (err) => {\n console.error('[Farm.js] HMR error:', err);\n });\n}\n`;\n}\n","import React from \"react\";\n\ninterface ScalarAPIDocumentationProps {\n spec: any;\n config?: {\n theme?: \"default\" | \"purple\" | \"blue\" | \"green\" | \"red\" | \"yellow\";\n layout?: \"modern\" | \"classic\";\n showSidebar?: boolean;\n hideDownloadButton?: boolean;\n hideTryItPanel?: boolean;\n };\n}\n\nexport function ScalarAPIDocumentation({ spec, config = {} }: ScalarAPIDocumentationProps) {\n const [isLoaded, setIsLoaded] = React.useState(false);\n\n React.useEffect(() => {\n // Dynamically import Scalar components\n const loadScalar = async () => {\n try {\n // Load Scalar CSS\n const cssLink = document.createElement(\"link\");\n cssLink.rel = \"stylesheet\";\n cssLink.href = \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/style.css\";\n document.head.appendChild(cssLink);\n\n // Load Scalar JS\n const script = document.createElement(\"script\");\n script.src =\n \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/browser/standalone.js\";\n script.onload = () => setIsLoaded(true);\n document.head.appendChild(script);\n } catch (error) {\n console.error(\"Failed to load Scalar:\", error);\n }\n };\n\n loadScalar();\n }, []);\n\n React.useEffect(() => {\n if (isLoaded && window.ScalarApiReference) {\n // Initialize Scalar\n const container = document.getElementById(\"scalar-api-reference\");\n if (container) {\n window.ScalarApiReference({\n spec,\n theme: config.theme || \"default\",\n layout: config.layout || \"modern\",\n showSidebar: config.showSidebar !== false,\n hideDownloadButton: config.hideDownloadButton || false,\n hideTryItPanel: config.hideTryItPanel || false,\n });\n }\n }\n }, [isLoaded, spec, config]);\n\n return (\n <div className=\"scalar-container\">\n <div id=\"scalar-api-reference\" style={{ height: \"100vh\", width: \"100%\" }} />\n </div>\n );\n}\n\n// Extend window type for Scalar\ndeclare global {\n interface Window {\n ScalarApiReference: (config: any) => void;\n }\n}\n","import React from \"react\";\nimport { ScalarAPIDocumentation } from \"./scalar-component\";\n\ninterface DocsRouteProps {\n spec: any;\n config?: any;\n}\n\nexport function DocsRoute({ spec, config }: DocsRouteProps) {\n return (\n <html lang=\"en\">\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" href=\"data:,\" />\n <title>{config?.title || \"API Documentation\"}</title>\n <style>{`\n body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n }\n .scalar-container {\n height: 100vh;\n width: 100%;\n }\n `}</style>\n </head>\n <body>\n <ScalarAPIDocumentation spec={spec} config={config} />\n </body>\n </html>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,cAAN,MAAM,YAAW;AAAA,EAGtB,YAAY,QAAuB;AACjC,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,KAAK,SAAc;AACvB,SAAK,OAAO,GAAG,KAAK,OAAO;AAAA,EAC7B;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AACjB,SAAK,OAAO,GAAG,KAAK;AAAA,MAClB,MAAM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AAG,GAC5E;AAEJ;AAjDgB;;;ACFV,SACE,OAAAA,MADF;AAHC,SAAS,UAAU,EAAE,MAAM,OAAO,GAAmB;AAC1D,SACE,qBAAC,UAAK,MAAK,MACT;AAAA,yBAAC,UACC;AAAA,sBAAAA,KAAC,UAAK,SAAQ,SAAQ;AAAA,MACtB,gBAAAA,KAAC,UAAK,MAAK,YAAW,SAAQ,uCAAsC;AAAA,MACpE,gBAAAA,KAAC,UAAK,KAAI,QAAO,MAAK,UAAS;AAAA,MAC/B,gBAAAA,KAAC,WAAO,kBAAQ,SAAS,qBAAoB;AAAA,MAC7C,gBAAAA,KAAC,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAUN;AAAA,OACJ;AAAA,IACA,gBAAAA,KAAC,UACC,0BAAAA,KAAC,0BAAuB,MAAY,QAAgB,GACtD;AAAA,KACF;AAEJ;AAzBgB;","names":["jsx"]}
@@ -0,0 +1,97 @@
1
+ type FarmIntegrationAPIMethod = "GET" | "QUERY" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
2
+ type FarmIntegrationAPIBodyFormat = "json" | "form" | "none";
3
+ type FarmIntegrationAPIResponseFormat = "json" | "text" | "response";
4
+ interface FarmIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod> {
5
+ readonly kind: "farm-integration-api-operation";
6
+ path: string;
7
+ method: TMethod;
8
+ bodyFormat?: FarmIntegrationAPIBodyFormat;
9
+ responseFormat?: FarmIntegrationAPIResponseFormat;
10
+ headers?: Record<string, string>;
11
+ credentials?: RequestCredentials;
12
+ isServer?: TServer;
13
+ __pathless?: boolean;
14
+ __types?: {
15
+ body: TBody;
16
+ query: TQuery;
17
+ response: TResponse;
18
+ };
19
+ }
20
+ type FarmIntegrationAPI = {
21
+ [key: string]: FarmIntegrationAPI | FarmIntegrationAPIOperation<any, any, any, any, any>;
22
+ };
23
+ type FarmIntegrationRouteOperationCarrier<TPath extends string = string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any> = FarmIntegrationAPIOperation<any, any, any, any, any>> = {
24
+ path: TPath;
25
+ __operation: TOperation;
26
+ };
27
+ type IntegrationAPIBuilderOptions<TServer extends boolean = false> = Omit<FarmIntegrationAPIOperation<any, any, any, TServer>, "kind" | "method" | "path" | "__pathless" | "__types">;
28
+ declare function defineIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod>(operation: Omit<FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>, "kind" | "__types">): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>;
29
+ declare function defineIntegrationAPI<TAPI extends FarmIntegrationAPI>(api: TAPI): TAPI;
30
+ declare function get<TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
31
+ declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
32
+ declare function get<TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
33
+ declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
34
+ type RouteOperationsToAPI<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]> = {
35
+ [TMethod in Lowercase<TOperations[number]["method"] & string>]: Extract<TOperations[number], {
36
+ method: Uppercase<TMethod>;
37
+ }>;
38
+ };
39
+ type StripRouteClientPrefix<TPath extends string> = TPath extends `/api/${string}/${infer TRest}` ? TRest : TPath extends `/${string}/${infer TRest}` ? TRest : TPath extends `/${infer TRest}` ? TRest : TPath;
40
+ type NormalizeRouteSegment<TSegment extends string> = TSegment extends `[...${infer TName}]` ? TName : TSegment extends `[${infer TName}]` ? TName : TSegment extends `${infer TName}(${string}` ? TName : CamelCaseRouteSegment<TSegment>;
41
+ type CamelCaseRouteSegment<TSegment extends string> = TSegment extends `${infer THead}-${infer TTail}` ? `${THead}${Capitalize<CamelCaseRouteSegment<TTail>>}` : TSegment;
42
+ type RouteNamespaceFromPath<TPath extends string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any>> = TPath extends `${infer THead}/${infer TTail}` ? {
43
+ [TKey in NormalizeRouteSegment<THead>]: RouteNamespaceFromPath<TTail, TOperation>;
44
+ } : {
45
+ [TKey in NormalizeRouteSegment<TPath>]: {
46
+ [TMethod in Lowercase<TOperation["method"] & string>]: TOperation;
47
+ };
48
+ };
49
+ type UnionToIntersection<TUnion> = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
50
+ type ExpandRecursively<TValue> = TValue extends (...args: any[]) => any ? TValue : TValue extends object ? {
51
+ [TKey in keyof TValue]: ExpandRecursively<TValue[TKey]>;
52
+ } : TValue;
53
+ type RoutesToAPI<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = ExpandRecursively<UnionToIntersection<TRoutes[number] extends FarmIntegrationRouteOperationCarrier<infer TPath, infer TOperation> ? RouteNamespaceFromPath<StripRouteClientPrefix<TPath>, TOperation> : never>>;
54
+ type InferIntegrationAPIFromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = RoutesToAPI<TRoutes>;
55
+ declare function route<TAPI extends FarmIntegrationAPI>(path: string, definition: TAPI): TAPI;
56
+ declare function route<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]>(path: string, ...operations: TOperations): RouteOperationsToAPI<TOperations>;
57
+ declare function fromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]>(routes: TRoutes): RoutesToAPI<TRoutes>;
58
+ declare const api: {
59
+ get: typeof get;
60
+ route: typeof route;
61
+ fromRoutes: typeof fromRoutes;
62
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
63
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
64
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
65
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
66
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
67
+ options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
68
+ head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
69
+ form: {
70
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
71
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
72
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
73
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
74
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
75
+ };
76
+ };
77
+ declare const endpoint: {
78
+ get: typeof get;
79
+ route: typeof route;
80
+ fromRoutes: typeof fromRoutes;
81
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
82
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
83
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
84
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
85
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
86
+ options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
87
+ head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
88
+ form: {
89
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
90
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
91
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
92
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
93
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
94
+ };
95
+ };
96
+
97
+ export { type FarmIntegrationAPI as F, type InferIntegrationAPIFromRoutes as I, type FarmIntegrationAPIOperation as a, api as b, defineIntegrationAPIOperation as c, defineIntegrationAPI as d, type FarmIntegrationAPIBodyFormat as e, type FarmIntegrationAPIMethod as f, type FarmIntegrationAPIResponseFormat as g, type FarmIntegrationRouteOperationCarrier as h, endpoint as i };
@@ -0,0 +1,97 @@
1
+ type FarmIntegrationAPIMethod = "GET" | "QUERY" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
2
+ type FarmIntegrationAPIBodyFormat = "json" | "form" | "none";
3
+ type FarmIntegrationAPIResponseFormat = "json" | "text" | "response";
4
+ interface FarmIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod> {
5
+ readonly kind: "farm-integration-api-operation";
6
+ path: string;
7
+ method: TMethod;
8
+ bodyFormat?: FarmIntegrationAPIBodyFormat;
9
+ responseFormat?: FarmIntegrationAPIResponseFormat;
10
+ headers?: Record<string, string>;
11
+ credentials?: RequestCredentials;
12
+ isServer?: TServer;
13
+ __pathless?: boolean;
14
+ __types?: {
15
+ body: TBody;
16
+ query: TQuery;
17
+ response: TResponse;
18
+ };
19
+ }
20
+ type FarmIntegrationAPI = {
21
+ [key: string]: FarmIntegrationAPI | FarmIntegrationAPIOperation<any, any, any, any, any>;
22
+ };
23
+ type FarmIntegrationRouteOperationCarrier<TPath extends string = string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any> = FarmIntegrationAPIOperation<any, any, any, any, any>> = {
24
+ path: TPath;
25
+ __operation: TOperation;
26
+ };
27
+ type IntegrationAPIBuilderOptions<TServer extends boolean = false> = Omit<FarmIntegrationAPIOperation<any, any, any, TServer>, "kind" | "method" | "path" | "__pathless" | "__types">;
28
+ declare function defineIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod>(operation: Omit<FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>, "kind" | "__types">): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>;
29
+ declare function defineIntegrationAPI<TAPI extends FarmIntegrationAPI>(api: TAPI): TAPI;
30
+ declare function get<TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
31
+ declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
32
+ declare function get<TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
33
+ declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
34
+ type RouteOperationsToAPI<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]> = {
35
+ [TMethod in Lowercase<TOperations[number]["method"] & string>]: Extract<TOperations[number], {
36
+ method: Uppercase<TMethod>;
37
+ }>;
38
+ };
39
+ type StripRouteClientPrefix<TPath extends string> = TPath extends `/api/${string}/${infer TRest}` ? TRest : TPath extends `/${string}/${infer TRest}` ? TRest : TPath extends `/${infer TRest}` ? TRest : TPath;
40
+ type NormalizeRouteSegment<TSegment extends string> = TSegment extends `[...${infer TName}]` ? TName : TSegment extends `[${infer TName}]` ? TName : TSegment extends `${infer TName}(${string}` ? TName : CamelCaseRouteSegment<TSegment>;
41
+ type CamelCaseRouteSegment<TSegment extends string> = TSegment extends `${infer THead}-${infer TTail}` ? `${THead}${Capitalize<CamelCaseRouteSegment<TTail>>}` : TSegment;
42
+ type RouteNamespaceFromPath<TPath extends string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any>> = TPath extends `${infer THead}/${infer TTail}` ? {
43
+ [TKey in NormalizeRouteSegment<THead>]: RouteNamespaceFromPath<TTail, TOperation>;
44
+ } : {
45
+ [TKey in NormalizeRouteSegment<TPath>]: {
46
+ [TMethod in Lowercase<TOperation["method"] & string>]: TOperation;
47
+ };
48
+ };
49
+ type UnionToIntersection<TUnion> = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
50
+ type ExpandRecursively<TValue> = TValue extends (...args: any[]) => any ? TValue : TValue extends object ? {
51
+ [TKey in keyof TValue]: ExpandRecursively<TValue[TKey]>;
52
+ } : TValue;
53
+ type RoutesToAPI<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = ExpandRecursively<UnionToIntersection<TRoutes[number] extends FarmIntegrationRouteOperationCarrier<infer TPath, infer TOperation> ? RouteNamespaceFromPath<StripRouteClientPrefix<TPath>, TOperation> : never>>;
54
+ type InferIntegrationAPIFromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = RoutesToAPI<TRoutes>;
55
+ declare function route<TAPI extends FarmIntegrationAPI>(path: string, definition: TAPI): TAPI;
56
+ declare function route<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]>(path: string, ...operations: TOperations): RouteOperationsToAPI<TOperations>;
57
+ declare function fromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]>(routes: TRoutes): RoutesToAPI<TRoutes>;
58
+ declare const api: {
59
+ get: typeof get;
60
+ route: typeof route;
61
+ fromRoutes: typeof fromRoutes;
62
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
63
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
64
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
65
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
66
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
67
+ options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
68
+ head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
69
+ form: {
70
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
71
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
72
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
73
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
74
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
75
+ };
76
+ };
77
+ declare const endpoint: {
78
+ get: typeof get;
79
+ route: typeof route;
80
+ fromRoutes: typeof fromRoutes;
81
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
82
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
83
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
84
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
85
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
86
+ options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
87
+ head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
88
+ form: {
89
+ query<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "QUERY">;
90
+ post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
91
+ put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
92
+ patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
93
+ delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
94
+ };
95
+ };
96
+
97
+ export { type FarmIntegrationAPI as F, type InferIntegrationAPIFromRoutes as I, type FarmIntegrationAPIOperation as a, api as b, defineIntegrationAPIOperation as c, defineIntegrationAPI as d, type FarmIntegrationAPIBodyFormat as e, type FarmIntegrationAPIMethod as f, type FarmIntegrationAPIResponseFormat as g, type FarmIntegrationRouteOperationCarrier as h, endpoint as i };
@@ -1,7 +1,8 @@
1
1
  import 'react';
2
- export { cI as DefinedIntegration, bX as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, p as FarmIntegration, an as FarmIntegrationAPI, c_ as FarmIntegrationAPIBodyFormat, c$ as FarmIntegrationAPIMethod, ao as FarmIntegrationAPIOperation, d0 as FarmIntegrationAPIResponseFormat, bI as FarmIntegrationCategory, b$ as FarmIntegrationConfigContext, c0 as FarmIntegrationConfigDefinition, c1 as FarmIntegrationConfigInput, cv as FarmIntegrationContributedPlugin, c6 as FarmIntegrationData, ch as FarmIntegrationDocumentNavigation, cC as FarmIntegrationEndpointValue, cD as FarmIntegrationEndpoints, cF as FarmIntegrationEndpointsFactory, cE as FarmIntegrationEndpointsFactoryContext, c7 as FarmIntegrationHandlerContext, bU as FarmIntegrationInputSchema, c4 as FarmIntegrationLifecycleContext, c5 as FarmIntegrationLifecycleHook, c2 as FarmIntegrationLifecycleLogLevel, c3 as FarmIntegrationLifecycleLogger, cs as FarmIntegrationLogEvent, cr as FarmIntegrationLogPhase, ct as FarmIntegrationLogger, cd as FarmIntegrationMiddleware, cu as FarmIntegrationPluginOwner, cg as FarmIntegrationProvider, cf as FarmIntegrationProviderComponentReference, ce as FarmIntegrationProviderProps, bW as FarmIntegrationRequestContextStore, ca as FarmIntegrationRoute, b_ as FarmIntegrationRouteArgs, bY as FarmIntegrationRouteDb, cz as FarmIntegrationRouteFactory, c9 as FarmIntegrationRouteHook, c8 as FarmIntegrationRouteHookContext, bP as FarmIntegrationRouteInput, bV as FarmIntegrationRouteInputSchemas, bN as FarmIntegrationRouteInputSource, bM as FarmIntegrationRouteMethod, cc as FarmIntegrationRouteMiddleware, bK as FarmIntegrationRouteParamValue, bL as FarmIntegrationRouteParams, bZ as FarmIntegrationRouteStorageArgs, cB as FarmIntegrationRoutesFactory, cA as FarmIntegrationRoutesFactoryContext, cp as FarmIntegrationSchema, cl as FarmIntegrationSchemaConstraint, ck as FarmIntegrationSchemaField, ci as FarmIntegrationSchemaFieldType, cm as FarmIntegrationSchemaModel, cn as FarmIntegrationSchemaModelExtension, co as FarmIntegrationSchemaModelOverride, cj as FarmIntegrationSchemaReference, bJ as FarmIntegrationSlot, bT as FarmIntegrationStandardValidationResult, bR as FarmIntegrationValidationErrorLike, bQ as FarmIntegrationValidationIssue, bO as FarmIntegrationValidationPathSegment, bS as FarmIntegrationValidationResult, cw as FarmIntegrationsUserConfig, cb as FarmTypedIntegrationRoute, cX as api, cG as createIntegrationRoute, cJ as defineIntegration, cY as defineIntegrationAPI, cZ as defineIntegrationAPIOperation, cq as defineIntegrationSchema, cW as dispatchIntegrationRequest, cy as getFarmIntegrationPluginOwner, cx as getFarmIntegrationPluginServerRuntime, cO as getIntegrationDocumentNavigationMatchers, cM as getIntegrationProviders, cP as getIntegrationSchemas, cV as getRegisteredIntegrationAPIManifest, cQ as getRegisteredIntegrationRuntime, cS as getRegisteredIntegrationSchemas, cR as getRegisteredIntegrations, cH as integrationRoute, cK as isFarmIntegration, cN as isFarmIntegrationProviderComponentReference, cT as matchIntegrationRoute, cU as matchRegisteredIntegrationRoute, cL as resolveIntegrationPlugins } from './client-plugins-BvClItiL.mjs';
2
+ export { F as FarmIntegrationAPI, e as FarmIntegrationAPIBodyFormat, f as FarmIntegrationAPIMethod, a as FarmIntegrationAPIOperation, g as FarmIntegrationAPIResponseFormat, b as api, d as defineIntegrationAPI, c as defineIntegrationAPIOperation } from './integration-api-BT024nuJ.mjs';
3
+ export { cG as DefinedIntegration, bV as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, p as FarmIntegration, bG as FarmIntegrationCategory, bZ as FarmIntegrationConfigContext, b_ as FarmIntegrationConfigDefinition, b$ as FarmIntegrationConfigInput, ct as FarmIntegrationContributedPlugin, c4 as FarmIntegrationData, cf as FarmIntegrationDocumentNavigation, cA as FarmIntegrationEndpointValue, cB as FarmIntegrationEndpoints, cD as FarmIntegrationEndpointsFactory, cC as FarmIntegrationEndpointsFactoryContext, c5 as FarmIntegrationHandlerContext, bS as FarmIntegrationInputSchema, c2 as FarmIntegrationLifecycleContext, c3 as FarmIntegrationLifecycleHook, c0 as FarmIntegrationLifecycleLogLevel, c1 as FarmIntegrationLifecycleLogger, cq as FarmIntegrationLogEvent, cp as FarmIntegrationLogPhase, cr as FarmIntegrationLogger, cb as FarmIntegrationMiddleware, cs as FarmIntegrationPluginOwner, ce as FarmIntegrationProvider, cd as FarmIntegrationProviderComponentReference, cc as FarmIntegrationProviderProps, bU as FarmIntegrationRequestContextStore, c8 as FarmIntegrationRoute, bY as FarmIntegrationRouteArgs, bW as FarmIntegrationRouteDb, cx as FarmIntegrationRouteFactory, c7 as FarmIntegrationRouteHook, c6 as FarmIntegrationRouteHookContext, bN as FarmIntegrationRouteInput, bT as FarmIntegrationRouteInputSchemas, bL as FarmIntegrationRouteInputSource, bK as FarmIntegrationRouteMethod, ca as FarmIntegrationRouteMiddleware, bI as FarmIntegrationRouteParamValue, bJ as FarmIntegrationRouteParams, bX as FarmIntegrationRouteStorageArgs, cz as FarmIntegrationRoutesFactory, cy as FarmIntegrationRoutesFactoryContext, cn as FarmIntegrationSchema, cj as FarmIntegrationSchemaConstraint, ci as FarmIntegrationSchemaField, cg as FarmIntegrationSchemaFieldType, ck as FarmIntegrationSchemaModel, cl as FarmIntegrationSchemaModelExtension, cm as FarmIntegrationSchemaModelOverride, ch as FarmIntegrationSchemaReference, bH as FarmIntegrationSlot, bR as FarmIntegrationStandardValidationResult, bP as FarmIntegrationValidationErrorLike, bO as FarmIntegrationValidationIssue, bM as FarmIntegrationValidationPathSegment, bQ as FarmIntegrationValidationResult, cu as FarmIntegrationsUserConfig, c9 as FarmTypedIntegrationRoute, cE as createIntegrationRoute, cH as defineIntegration, co as defineIntegrationSchema, cU as dispatchIntegrationRequest, cw as getFarmIntegrationPluginOwner, cv as getFarmIntegrationPluginServerRuntime, cM as getIntegrationDocumentNavigationMatchers, cK as getIntegrationProviders, cN as getIntegrationSchemas, cT as getRegisteredIntegrationAPIManifest, cO as getRegisteredIntegrationRuntime, cQ as getRegisteredIntegrationSchemas, cP as getRegisteredIntegrations, cF as integrationRoute, cI as isFarmIntegration, cL as isFarmIntegrationProviderComponentReference, cR as matchIntegrationRoute, cS as matchRegisteredIntegrationRoute, cJ as resolveIntegrationPlugins } from './client-plugins-B6-07YmP.mjs';
3
4
  import './lifecycle-De0vQG45.mjs';
4
- import './route-Cq3aObmj.mjs';
5
+ import './route-CvEr4Uc9.mjs';
5
6
  import './cache.mjs';
6
7
  import './renderer.mjs';
7
8
  import 'http';
@@ -1,7 +1,8 @@
1
1
  import 'react';
2
- export { cI as DefinedIntegration, bX as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, p as FarmIntegration, an as FarmIntegrationAPI, c_ as FarmIntegrationAPIBodyFormat, c$ as FarmIntegrationAPIMethod, ao as FarmIntegrationAPIOperation, d0 as FarmIntegrationAPIResponseFormat, bI as FarmIntegrationCategory, b$ as FarmIntegrationConfigContext, c0 as FarmIntegrationConfigDefinition, c1 as FarmIntegrationConfigInput, cv as FarmIntegrationContributedPlugin, c6 as FarmIntegrationData, ch as FarmIntegrationDocumentNavigation, cC as FarmIntegrationEndpointValue, cD as FarmIntegrationEndpoints, cF as FarmIntegrationEndpointsFactory, cE as FarmIntegrationEndpointsFactoryContext, c7 as FarmIntegrationHandlerContext, bU as FarmIntegrationInputSchema, c4 as FarmIntegrationLifecycleContext, c5 as FarmIntegrationLifecycleHook, c2 as FarmIntegrationLifecycleLogLevel, c3 as FarmIntegrationLifecycleLogger, cs as FarmIntegrationLogEvent, cr as FarmIntegrationLogPhase, ct as FarmIntegrationLogger, cd as FarmIntegrationMiddleware, cu as FarmIntegrationPluginOwner, cg as FarmIntegrationProvider, cf as FarmIntegrationProviderComponentReference, ce as FarmIntegrationProviderProps, bW as FarmIntegrationRequestContextStore, ca as FarmIntegrationRoute, b_ as FarmIntegrationRouteArgs, bY as FarmIntegrationRouteDb, cz as FarmIntegrationRouteFactory, c9 as FarmIntegrationRouteHook, c8 as FarmIntegrationRouteHookContext, bP as FarmIntegrationRouteInput, bV as FarmIntegrationRouteInputSchemas, bN as FarmIntegrationRouteInputSource, bM as FarmIntegrationRouteMethod, cc as FarmIntegrationRouteMiddleware, bK as FarmIntegrationRouteParamValue, bL as FarmIntegrationRouteParams, bZ as FarmIntegrationRouteStorageArgs, cB as FarmIntegrationRoutesFactory, cA as FarmIntegrationRoutesFactoryContext, cp as FarmIntegrationSchema, cl as FarmIntegrationSchemaConstraint, ck as FarmIntegrationSchemaField, ci as FarmIntegrationSchemaFieldType, cm as FarmIntegrationSchemaModel, cn as FarmIntegrationSchemaModelExtension, co as FarmIntegrationSchemaModelOverride, cj as FarmIntegrationSchemaReference, bJ as FarmIntegrationSlot, bT as FarmIntegrationStandardValidationResult, bR as FarmIntegrationValidationErrorLike, bQ as FarmIntegrationValidationIssue, bO as FarmIntegrationValidationPathSegment, bS as FarmIntegrationValidationResult, cw as FarmIntegrationsUserConfig, cb as FarmTypedIntegrationRoute, cX as api, cG as createIntegrationRoute, cJ as defineIntegration, cY as defineIntegrationAPI, cZ as defineIntegrationAPIOperation, cq as defineIntegrationSchema, cW as dispatchIntegrationRequest, cy as getFarmIntegrationPluginOwner, cx as getFarmIntegrationPluginServerRuntime, cO as getIntegrationDocumentNavigationMatchers, cM as getIntegrationProviders, cP as getIntegrationSchemas, cV as getRegisteredIntegrationAPIManifest, cQ as getRegisteredIntegrationRuntime, cS as getRegisteredIntegrationSchemas, cR as getRegisteredIntegrations, cH as integrationRoute, cK as isFarmIntegration, cN as isFarmIntegrationProviderComponentReference, cT as matchIntegrationRoute, cU as matchRegisteredIntegrationRoute, cL as resolveIntegrationPlugins } from './client-plugins-B9Sq-iMg.js';
2
+ export { F as FarmIntegrationAPI, e as FarmIntegrationAPIBodyFormat, f as FarmIntegrationAPIMethod, a as FarmIntegrationAPIOperation, g as FarmIntegrationAPIResponseFormat, b as api, d as defineIntegrationAPI, c as defineIntegrationAPIOperation } from './integration-api-BT024nuJ.js';
3
+ export { cG as DefinedIntegration, bV as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, p as FarmIntegration, bG as FarmIntegrationCategory, bZ as FarmIntegrationConfigContext, b_ as FarmIntegrationConfigDefinition, b$ as FarmIntegrationConfigInput, ct as FarmIntegrationContributedPlugin, c4 as FarmIntegrationData, cf as FarmIntegrationDocumentNavigation, cA as FarmIntegrationEndpointValue, cB as FarmIntegrationEndpoints, cD as FarmIntegrationEndpointsFactory, cC as FarmIntegrationEndpointsFactoryContext, c5 as FarmIntegrationHandlerContext, bS as FarmIntegrationInputSchema, c2 as FarmIntegrationLifecycleContext, c3 as FarmIntegrationLifecycleHook, c0 as FarmIntegrationLifecycleLogLevel, c1 as FarmIntegrationLifecycleLogger, cq as FarmIntegrationLogEvent, cp as FarmIntegrationLogPhase, cr as FarmIntegrationLogger, cb as FarmIntegrationMiddleware, cs as FarmIntegrationPluginOwner, ce as FarmIntegrationProvider, cd as FarmIntegrationProviderComponentReference, cc as FarmIntegrationProviderProps, bU as FarmIntegrationRequestContextStore, c8 as FarmIntegrationRoute, bY as FarmIntegrationRouteArgs, bW as FarmIntegrationRouteDb, cx as FarmIntegrationRouteFactory, c7 as FarmIntegrationRouteHook, c6 as FarmIntegrationRouteHookContext, bN as FarmIntegrationRouteInput, bT as FarmIntegrationRouteInputSchemas, bL as FarmIntegrationRouteInputSource, bK as FarmIntegrationRouteMethod, ca as FarmIntegrationRouteMiddleware, bI as FarmIntegrationRouteParamValue, bJ as FarmIntegrationRouteParams, bX as FarmIntegrationRouteStorageArgs, cz as FarmIntegrationRoutesFactory, cy as FarmIntegrationRoutesFactoryContext, cn as FarmIntegrationSchema, cj as FarmIntegrationSchemaConstraint, ci as FarmIntegrationSchemaField, cg as FarmIntegrationSchemaFieldType, ck as FarmIntegrationSchemaModel, cl as FarmIntegrationSchemaModelExtension, cm as FarmIntegrationSchemaModelOverride, ch as FarmIntegrationSchemaReference, bH as FarmIntegrationSlot, bR as FarmIntegrationStandardValidationResult, bP as FarmIntegrationValidationErrorLike, bO as FarmIntegrationValidationIssue, bM as FarmIntegrationValidationPathSegment, bQ as FarmIntegrationValidationResult, cu as FarmIntegrationsUserConfig, c9 as FarmTypedIntegrationRoute, cE as createIntegrationRoute, cH as defineIntegration, co as defineIntegrationSchema, cU as dispatchIntegrationRequest, cw as getFarmIntegrationPluginOwner, cv as getFarmIntegrationPluginServerRuntime, cM as getIntegrationDocumentNavigationMatchers, cK as getIntegrationProviders, cN as getIntegrationSchemas, cT as getRegisteredIntegrationAPIManifest, cO as getRegisteredIntegrationRuntime, cQ as getRegisteredIntegrationSchemas, cP as getRegisteredIntegrations, cF as integrationRoute, cI as isFarmIntegration, cL as isFarmIntegrationProviderComponentReference, cR as matchIntegrationRoute, cS as matchRegisteredIntegrationRoute, cJ as resolveIntegrationPlugins } from './client-plugins-By6MVUX-.js';
3
4
  import './lifecycle-De0vQG45.js';
4
- import './route-Y8lfz1wF.js';
5
+ import './route-4pd-EVtw.js';
5
6
  import './cache.js';
6
7
  import './renderer.js';
7
8
  import 'http';