@farm.js/core 0.1.0-beta.6 → 0.1.0-beta.8

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 (447) hide show
  1. package/dist/after.cjs +227 -0
  2. package/dist/after.cjs.map +1 -0
  3. package/dist/after.d.mts +25 -0
  4. package/dist/after.d.ts +25 -0
  5. package/dist/after.mjs +14 -0
  6. package/dist/after.mjs.map +1 -0
  7. package/dist/agent-runtime.cjs +2379 -0
  8. package/dist/agent-runtime.cjs.map +1 -0
  9. package/dist/agent-runtime.d.mts +94 -0
  10. package/dist/agent-runtime.d.ts +94 -0
  11. package/dist/agent-runtime.mjs +479 -0
  12. package/dist/agent-runtime.mjs.map +1 -0
  13. package/dist/api/route-manager.d.mts +66 -0
  14. package/dist/api/route-manager.d.ts +66 -0
  15. package/dist/api/runtime.d.mts +3 -0
  16. package/dist/api/runtime.d.ts +3 -0
  17. package/dist/api.cjs +4100 -0
  18. package/dist/api.cjs.map +1 -0
  19. package/dist/api.d.mts +48 -0
  20. package/dist/api.d.ts +48 -0
  21. package/dist/api.mjs +93 -0
  22. package/dist/api.mjs.map +1 -0
  23. package/dist/app-BWtqQu3R.d.mts +302 -0
  24. package/dist/app-markdown.cjs +244 -0
  25. package/dist/app-markdown.cjs.map +1 -0
  26. package/dist/app-markdown.d.mts +22 -0
  27. package/dist/app-markdown.d.ts +22 -0
  28. package/dist/app-markdown.mjs +27 -0
  29. package/dist/app-markdown.mjs.map +1 -0
  30. package/dist/app-xltejvLY.d.ts +302 -0
  31. package/dist/cache.cjs +945 -0
  32. package/dist/cache.cjs.map +1 -0
  33. package/dist/cache.d.mts +192 -0
  34. package/dist/cache.d.ts +192 -0
  35. package/dist/cache.mjs +46 -0
  36. package/dist/cache.mjs.map +1 -0
  37. package/dist/chunk-2ED5Q2GH.mjs +422 -0
  38. package/dist/chunk-2ED5Q2GH.mjs.map +1 -0
  39. package/dist/chunk-32W4QEJP.mjs +158 -0
  40. package/dist/chunk-32W4QEJP.mjs.map +1 -0
  41. package/dist/chunk-3XNTL3FQ.mjs +452 -0
  42. package/dist/chunk-3XNTL3FQ.mjs.map +1 -0
  43. package/dist/chunk-44ZCFSKE.mjs +84 -0
  44. package/dist/chunk-44ZCFSKE.mjs.map +1 -0
  45. package/dist/chunk-4MGVSBRP.mjs +7787 -0
  46. package/dist/chunk-4MGVSBRP.mjs.map +1 -0
  47. package/dist/chunk-4S3ORGFA.mjs +44 -0
  48. package/dist/chunk-4S3ORGFA.mjs.map +1 -0
  49. package/dist/chunk-5BY76U2M.mjs +1 -0
  50. package/dist/chunk-5BY76U2M.mjs.map +1 -0
  51. package/dist/chunk-5ZGPRGWV.mjs +136 -0
  52. package/dist/chunk-5ZGPRGWV.mjs.map +1 -0
  53. package/dist/chunk-65A7QIKI.mjs +142 -0
  54. package/dist/chunk-65A7QIKI.mjs.map +1 -0
  55. package/dist/chunk-74YTBPTY.mjs +450 -0
  56. package/dist/chunk-74YTBPTY.mjs.map +1 -0
  57. package/dist/chunk-7FBJLMQH.mjs +338 -0
  58. package/dist/chunk-7FBJLMQH.mjs.map +1 -0
  59. package/dist/chunk-7HO6AEOP.mjs +74 -0
  60. package/dist/chunk-7HO6AEOP.mjs.map +1 -0
  61. package/dist/chunk-7MABZJIM.mjs +29 -0
  62. package/dist/chunk-7MABZJIM.mjs.map +1 -0
  63. package/dist/chunk-7N62DNSO.mjs +41 -0
  64. package/dist/chunk-7N62DNSO.mjs.map +1 -0
  65. package/dist/chunk-7ZY5AIJO.mjs +161 -0
  66. package/dist/chunk-7ZY5AIJO.mjs.map +1 -0
  67. package/dist/chunk-ALCLXXTY.mjs +187 -0
  68. package/dist/chunk-ALCLXXTY.mjs.map +1 -0
  69. package/dist/chunk-AZ7YUVNR.mjs +65 -0
  70. package/dist/chunk-AZ7YUVNR.mjs.map +1 -0
  71. package/dist/chunk-B232I2GP.mjs +163 -0
  72. package/dist/chunk-B232I2GP.mjs.map +1 -0
  73. package/dist/chunk-B4W3BNTL.mjs +483 -0
  74. package/dist/chunk-B4W3BNTL.mjs.map +1 -0
  75. package/dist/chunk-C2ROET2V.mjs +718 -0
  76. package/dist/chunk-C2ROET2V.mjs.map +1 -0
  77. package/dist/chunk-CGILA3WO.mjs +14 -0
  78. package/dist/chunk-CGILA3WO.mjs.map +1 -0
  79. package/dist/chunk-CGIXMLSY.mjs +184 -0
  80. package/dist/chunk-CGIXMLSY.mjs.map +1 -0
  81. package/dist/chunk-DJSGLHCN.mjs +597 -0
  82. package/dist/chunk-DJSGLHCN.mjs.map +1 -0
  83. package/dist/chunk-E2MPIBRE.mjs +149 -0
  84. package/dist/chunk-E2MPIBRE.mjs.map +1 -0
  85. package/dist/chunk-E6EPN5BT.mjs +203 -0
  86. package/dist/chunk-E6EPN5BT.mjs.map +1 -0
  87. package/dist/chunk-EI43C4RA.mjs +6277 -0
  88. package/dist/chunk-EI43C4RA.mjs.map +1 -0
  89. package/dist/chunk-EJ7T4TPB.mjs +622 -0
  90. package/dist/chunk-EJ7T4TPB.mjs.map +1 -0
  91. package/dist/chunk-FQYDHKKU.mjs +128 -0
  92. package/dist/chunk-FQYDHKKU.mjs.map +1 -0
  93. package/dist/chunk-FRPWCMMG.mjs +299 -0
  94. package/dist/chunk-FRPWCMMG.mjs.map +1 -0
  95. package/dist/chunk-GN72QAIH.mjs +146 -0
  96. package/dist/chunk-GN72QAIH.mjs.map +1 -0
  97. package/dist/chunk-GQVGIUSN.mjs +149 -0
  98. package/dist/chunk-GQVGIUSN.mjs.map +1 -0
  99. package/dist/chunk-GS6K5OCM.mjs +407 -0
  100. package/dist/chunk-GS6K5OCM.mjs.map +1 -0
  101. package/dist/chunk-GXASWWJU.mjs +364 -0
  102. package/dist/chunk-GXASWWJU.mjs.map +1 -0
  103. package/dist/chunk-GY2STC2S.mjs +180 -0
  104. package/dist/chunk-GY2STC2S.mjs.map +1 -0
  105. package/dist/chunk-H2FA2SBS.mjs +51 -0
  106. package/dist/chunk-H2FA2SBS.mjs.map +1 -0
  107. package/dist/chunk-I4CUBGVF.mjs +93 -0
  108. package/dist/chunk-I4CUBGVF.mjs.map +1 -0
  109. package/dist/chunk-ITN462YM.mjs +98 -0
  110. package/dist/chunk-ITN462YM.mjs.map +1 -0
  111. package/dist/chunk-J23HNLFY.mjs +72 -0
  112. package/dist/chunk-J23HNLFY.mjs.map +1 -0
  113. package/dist/chunk-J4FNJ5IU.mjs +179 -0
  114. package/dist/chunk-J4FNJ5IU.mjs.map +1 -0
  115. package/dist/chunk-J5YWQVI5.mjs +211 -0
  116. package/dist/chunk-J5YWQVI5.mjs.map +1 -0
  117. package/dist/chunk-JDEOUK5V.mjs +427 -0
  118. package/dist/chunk-JDEOUK5V.mjs.map +1 -0
  119. package/dist/chunk-JK25YEN6.mjs +219 -0
  120. package/dist/chunk-JK25YEN6.mjs.map +1 -0
  121. package/dist/chunk-K4667E2Q.mjs +1916 -0
  122. package/dist/chunk-K4667E2Q.mjs.map +1 -0
  123. package/dist/chunk-LGHEOHBU.mjs +218 -0
  124. package/dist/chunk-LGHEOHBU.mjs.map +1 -0
  125. package/dist/chunk-LM2YNO4U.mjs +24 -0
  126. package/dist/chunk-LM2YNO4U.mjs.map +1 -0
  127. package/dist/chunk-ME4MO2RJ.mjs +3540 -0
  128. package/dist/chunk-ME4MO2RJ.mjs.map +1 -0
  129. package/dist/chunk-MIUW47JX.mjs +639 -0
  130. package/dist/chunk-MIUW47JX.mjs.map +1 -0
  131. package/dist/chunk-NNLCAVB6.mjs +391 -0
  132. package/dist/chunk-NNLCAVB6.mjs.map +1 -0
  133. package/dist/chunk-P7QDS5AT.mjs +191 -0
  134. package/dist/chunk-P7QDS5AT.mjs.map +1 -0
  135. package/dist/chunk-PFE6GMNE.mjs +603 -0
  136. package/dist/chunk-PFE6GMNE.mjs.map +1 -0
  137. package/dist/chunk-QGOHVJ6J.mjs +63 -0
  138. package/dist/chunk-QGOHVJ6J.mjs.map +1 -0
  139. package/dist/chunk-QKVUNGAH.mjs +39 -0
  140. package/dist/chunk-QKVUNGAH.mjs.map +1 -0
  141. package/dist/chunk-QM746KUO.mjs +56 -0
  142. package/dist/chunk-QM746KUO.mjs.map +1 -0
  143. package/dist/chunk-QTZZ2ISQ.mjs +753 -0
  144. package/dist/chunk-QTZZ2ISQ.mjs.map +1 -0
  145. package/dist/chunk-RBRLLZL5.mjs +81 -0
  146. package/dist/chunk-RBRLLZL5.mjs.map +1 -0
  147. package/dist/chunk-RHIFZZUI.mjs +69 -0
  148. package/dist/chunk-RHIFZZUI.mjs.map +1 -0
  149. package/dist/chunk-RQ633A5I.mjs +187 -0
  150. package/dist/chunk-RQ633A5I.mjs.map +1 -0
  151. package/dist/chunk-SCFX4UTD.mjs +28 -0
  152. package/dist/chunk-SCFX4UTD.mjs.map +1 -0
  153. package/dist/chunk-SL6HTIOK.mjs +66 -0
  154. package/dist/chunk-SL6HTIOK.mjs.map +1 -0
  155. package/dist/chunk-SPBBQLXI.mjs +207 -0
  156. package/dist/chunk-SPBBQLXI.mjs.map +1 -0
  157. package/dist/chunk-SSA7THPX.mjs +10 -0
  158. package/dist/chunk-SSA7THPX.mjs.map +1 -0
  159. package/dist/chunk-T4QJQK76.mjs +459 -0
  160. package/dist/chunk-T4QJQK76.mjs.map +1 -0
  161. package/dist/chunk-TQAEEJB4.mjs +157 -0
  162. package/dist/chunk-TQAEEJB4.mjs.map +1 -0
  163. package/dist/chunk-UB5UOSHB.mjs +458 -0
  164. package/dist/chunk-UB5UOSHB.mjs.map +1 -0
  165. package/dist/chunk-USWZZUEH.mjs +25 -0
  166. package/dist/chunk-USWZZUEH.mjs.map +1 -0
  167. package/dist/chunk-UVCIEUJC.mjs +16 -0
  168. package/dist/chunk-UVCIEUJC.mjs.map +1 -0
  169. package/dist/chunk-UXUAWNO5.mjs +396 -0
  170. package/dist/chunk-UXUAWNO5.mjs.map +1 -0
  171. package/dist/chunk-V3XURYJO.mjs +756 -0
  172. package/dist/chunk-V3XURYJO.mjs.map +1 -0
  173. package/dist/chunk-V6WE6JSZ.mjs +352 -0
  174. package/dist/chunk-V6WE6JSZ.mjs.map +1 -0
  175. package/dist/chunk-V7RBCSDJ.mjs +170 -0
  176. package/dist/chunk-V7RBCSDJ.mjs.map +1 -0
  177. package/dist/chunk-VCANOYFI.mjs +588 -0
  178. package/dist/chunk-VCANOYFI.mjs.map +1 -0
  179. package/dist/chunk-VY2UYN5R.mjs +224 -0
  180. package/dist/chunk-VY2UYN5R.mjs.map +1 -0
  181. package/dist/chunk-W2CRQFF6.mjs +1352 -0
  182. package/dist/chunk-W2CRQFF6.mjs.map +1 -0
  183. package/dist/chunk-WDU6QXNK.mjs +872 -0
  184. package/dist/chunk-WDU6QXNK.mjs.map +1 -0
  185. package/dist/chunk-WZ5QFROO.mjs +23 -0
  186. package/dist/chunk-WZ5QFROO.mjs.map +1 -0
  187. package/dist/chunk-XIVV5IWN.mjs +541 -0
  188. package/dist/chunk-XIVV5IWN.mjs.map +1 -0
  189. package/dist/chunk-YW7OBE6Q.mjs +119 -0
  190. package/dist/chunk-YW7OBE6Q.mjs.map +1 -0
  191. package/dist/chunk-Z5CQMP54.mjs +365 -0
  192. package/dist/chunk-Z5CQMP54.mjs.map +1 -0
  193. package/dist/chunk-ZBE6MLHL.mjs +230 -0
  194. package/dist/chunk-ZBE6MLHL.mjs.map +1 -0
  195. package/dist/chunk-ZVWA4ZQ3.mjs +189 -0
  196. package/dist/chunk-ZVWA4ZQ3.mjs.map +1 -0
  197. package/dist/chunk-ZZ57EH5Z.mjs +173 -0
  198. package/dist/chunk-ZZ57EH5Z.mjs.map +1 -0
  199. package/dist/client-BT1mFQas.d.mts +447 -0
  200. package/dist/client-Nn0q4eO4.d.ts +447 -0
  201. package/dist/client-cache-CIlyBlmx.d.ts +6 -0
  202. package/dist/client-cache-D-EZ7XVW.d.mts +6 -0
  203. package/dist/client-plugins-BI2R6Eae.d.mts +1926 -0
  204. package/dist/client-plugins-DU9oMspX.d.ts +1926 -0
  205. package/dist/client-plugins.cjs +415 -0
  206. package/dist/client-plugins.cjs.map +1 -0
  207. package/dist/client-plugins.d.mts +22 -0
  208. package/dist/client-plugins.d.ts +22 -0
  209. package/dist/client-plugins.mjs +10 -0
  210. package/dist/client-plugins.mjs.map +1 -0
  211. package/dist/client.cjs +5402 -0
  212. package/dist/client.cjs.map +1 -0
  213. package/dist/client.d.mts +447 -0
  214. package/dist/client.d.ts +447 -0
  215. package/dist/client.mjs +110 -0
  216. package/dist/client.mjs.map +1 -0
  217. package/dist/config.cjs +38 -0
  218. package/dist/config.cjs.map +1 -0
  219. package/dist/config.d.mts +29 -0
  220. package/dist/config.d.ts +29 -0
  221. package/dist/config.mjs +10 -0
  222. package/dist/config.mjs.map +1 -0
  223. package/dist/cron.cjs +406 -0
  224. package/dist/cron.cjs.map +1 -0
  225. package/dist/cron.d.mts +78 -0
  226. package/dist/cron.d.ts +78 -0
  227. package/dist/cron.mjs +30 -0
  228. package/dist/cron.mjs.map +1 -0
  229. package/dist/deferred.cjs +438 -0
  230. package/dist/deferred.cjs.map +1 -0
  231. package/dist/deferred.d.mts +42 -0
  232. package/dist/deferred.d.ts +42 -0
  233. package/dist/deferred.mjs +28 -0
  234. package/dist/deferred.mjs.map +1 -0
  235. package/dist/deployment.cjs +199 -0
  236. package/dist/deployment.cjs.map +1 -0
  237. package/dist/deployment.d.mts +34 -0
  238. package/dist/deployment.d.ts +34 -0
  239. package/dist/deployment.mjs +38 -0
  240. package/dist/deployment.mjs.map +1 -0
  241. package/dist/devtools-REQTS3I7.mjs +371 -0
  242. package/dist/devtools-REQTS3I7.mjs.map +1 -0
  243. package/dist/devtools-client-3XRTBND5.mjs +216 -0
  244. package/dist/devtools-client-3XRTBND5.mjs.map +1 -0
  245. package/dist/devtools-ui-NJKFORTG.mjs +1349 -0
  246. package/dist/devtools-ui-NJKFORTG.mjs.map +1 -0
  247. package/dist/docs.cjs +5548 -0
  248. package/dist/docs.cjs.map +1 -0
  249. package/dist/docs.d.mts +69 -0
  250. package/dist/docs.d.ts +69 -0
  251. package/dist/docs.mjs +47 -0
  252. package/dist/docs.mjs.map +1 -0
  253. package/dist/env-types.cjs +232 -0
  254. package/dist/env-types.cjs.map +1 -0
  255. package/dist/env-types.d.mts +12 -0
  256. package/dist/env-types.d.ts +12 -0
  257. package/dist/env-types.mjs +11 -0
  258. package/dist/env-types.mjs.map +1 -0
  259. package/dist/env.cjs +215 -0
  260. package/dist/env.cjs.map +1 -0
  261. package/dist/env.d.mts +45 -0
  262. package/dist/env.d.ts +45 -0
  263. package/dist/env.mjs +22 -0
  264. package/dist/env.mjs.map +1 -0
  265. package/dist/environment/vite.d.mts +22 -0
  266. package/dist/environment/vite.d.ts +22 -0
  267. package/dist/environment.cjs +96 -0
  268. package/dist/environment.cjs.map +1 -0
  269. package/dist/environment.d.mts +18 -0
  270. package/dist/environment.d.ts +18 -0
  271. package/dist/environment.mjs +14 -0
  272. package/dist/environment.mjs.map +1 -0
  273. package/dist/headers.cjs +126 -0
  274. package/dist/headers.cjs.map +1 -0
  275. package/dist/headers.d.mts +22 -0
  276. package/dist/headers.d.ts +22 -0
  277. package/dist/headers.mjs +12 -0
  278. package/dist/headers.mjs.map +1 -0
  279. package/dist/i18n/client.d.mts +32 -0
  280. package/dist/i18n/client.d.ts +32 -0
  281. package/dist/i18n/index.d.mts +20 -0
  282. package/dist/i18n/index.d.ts +20 -0
  283. package/dist/i18n/server.d.mts +30 -0
  284. package/dist/i18n/server.d.ts +30 -0
  285. package/dist/image/server.d.mts +37 -0
  286. package/dist/image/server.d.ts +37 -0
  287. package/dist/image/sharp.d.mts +7 -0
  288. package/dist/image/sharp.d.ts +7 -0
  289. package/dist/image-config-Duob7wER.d.mts +50 -0
  290. package/dist/image-config-Duob7wER.d.ts +50 -0
  291. package/dist/image.cjs +209 -0
  292. package/dist/image.cjs.map +1 -0
  293. package/dist/image.d.mts +39 -0
  294. package/dist/image.d.ts +39 -0
  295. package/dist/image.mjs +165 -0
  296. package/dist/image.mjs.map +1 -0
  297. package/dist/index.cjs +42186 -0
  298. package/dist/index.cjs.map +1 -0
  299. package/dist/index.d.mts +454 -0
  300. package/dist/index.d.ts +454 -0
  301. package/dist/index.mjs +980 -0
  302. package/dist/index.mjs.map +1 -0
  303. package/dist/integration-api-CHT2OKAf.d.mts +93 -0
  304. package/dist/integration-api-CHT2OKAf.d.ts +93 -0
  305. package/dist/integration-orm-GQLGU66X.mjs +13 -0
  306. package/dist/integration-orm-GQLGU66X.mjs.map +1 -0
  307. package/dist/integrations.cjs +2820 -0
  308. package/dist/integrations.cjs.map +1 -0
  309. package/dist/integrations.d.mts +22 -0
  310. package/dist/integrations.d.ts +22 -0
  311. package/dist/integrations.mjs +51 -0
  312. package/dist/integrations.mjs.map +1 -0
  313. package/dist/internal/build-runtime.cjs +643 -322
  314. package/dist/internal/build-runtime.cjs.map +1 -1
  315. package/dist/internal/build-runtime.d.mts +39 -0
  316. package/dist/internal/build-runtime.d.ts +39 -0
  317. package/dist/internal/build-runtime.mjs +11 -10
  318. package/dist/internal/client-runtime.d.mts +2 -0
  319. package/dist/internal/client-runtime.d.ts +2 -0
  320. package/dist/internal/config-runtime.cjs +135 -39
  321. package/dist/internal/config-runtime.cjs.map +1 -1
  322. package/dist/internal/config-runtime.d.mts +39 -0
  323. package/dist/internal/config-runtime.d.ts +39 -0
  324. package/dist/internal/config-runtime.mjs +5 -4
  325. package/dist/internal/production-node-env.d.mts +12 -0
  326. package/dist/internal/production-node-env.d.ts +12 -0
  327. package/dist/internal/production-runtime.d.mts +39 -0
  328. package/dist/internal/production-runtime.d.ts +39 -0
  329. package/dist/layers-VWVDTPUZ.mjs +16 -0
  330. package/dist/layers-VWVDTPUZ.mjs.map +1 -0
  331. package/dist/manager-THKFTOFE.mjs +10 -0
  332. package/dist/manager-THKFTOFE.mjs.map +1 -0
  333. package/dist/markdown.cjs +364 -0
  334. package/dist/markdown.cjs.map +1 -0
  335. package/dist/markdown.d.mts +60 -0
  336. package/dist/markdown.d.ts +60 -0
  337. package/dist/markdown.mjs +18 -0
  338. package/dist/markdown.mjs.map +1 -0
  339. package/dist/metadata-Cm9ujH4I.d.ts +22 -0
  340. package/dist/metadata-DacXbnLA.d.mts +22 -0
  341. package/dist/middleware.cjs +2148 -0
  342. package/dist/middleware.cjs.map +1 -0
  343. package/dist/middleware.d.mts +164 -0
  344. package/dist/middleware.d.ts +164 -0
  345. package/dist/middleware.mjs +49 -0
  346. package/dist/middleware.mjs.map +1 -0
  347. package/dist/navigation-errors-Dvwpzaer.d.mts +13 -0
  348. package/dist/navigation-errors-Dvwpzaer.d.ts +13 -0
  349. package/dist/navigation.cjs +1329 -0
  350. package/dist/navigation.cjs.map +1 -0
  351. package/dist/navigation.d.mts +14 -0
  352. package/dist/navigation.d.ts +14 -0
  353. package/dist/navigation.mjs +33 -0
  354. package/dist/navigation.mjs.map +1 -0
  355. package/dist/nitro-QO5LV6QK.mjs +689 -0
  356. package/dist/nitro-QO5LV6QK.mjs.map +1 -0
  357. package/dist/observability.cjs +186 -0
  358. package/dist/observability.cjs.map +1 -0
  359. package/dist/observability.d.mts +335 -0
  360. package/dist/observability.d.ts +335 -0
  361. package/dist/observability.mjs +16 -0
  362. package/dist/observability.mjs.map +1 -0
  363. package/dist/params-BALtrRim.d.ts +15 -0
  364. package/dist/params-ry-lxqmy.d.mts +15 -0
  365. package/dist/plugin-BJDf43dc.d.mts +165 -0
  366. package/dist/plugin-BJDf43dc.d.ts +165 -0
  367. package/dist/plugin.cjs +23470 -0
  368. package/dist/plugin.cjs.map +1 -1
  369. package/dist/plugin.d.mts +22 -0
  370. package/dist/plugin.d.ts +22 -0
  371. package/dist/plugin.mjs +8 -7
  372. package/dist/production-runtime-4KKq1AVC.d.mts +79 -0
  373. package/dist/production-runtime-C_B79w2P.d.mts +28 -0
  374. package/dist/production-runtime-DDEM1D2q.d.ts +28 -0
  375. package/dist/production-runtime-DRsWDN2x.d.ts +79 -0
  376. package/dist/query/client.d.mts +61 -0
  377. package/dist/query/client.d.ts +61 -0
  378. package/dist/query/index.d.mts +90 -0
  379. package/dist/query/index.d.ts +90 -0
  380. package/dist/query/parsers.d.mts +25 -0
  381. package/dist/query/parsers.d.ts +25 -0
  382. package/dist/query/server.d.mts +55 -0
  383. package/dist/query/server.d.ts +55 -0
  384. package/dist/request-Dsq4kGW0.d.mts +6 -0
  385. package/dist/request-udtobOLv.d.ts +6 -0
  386. package/dist/request.d.mts +2 -0
  387. package/dist/request.d.ts +2 -0
  388. package/dist/resolver-DJqjLMg_.d.mts +14 -0
  389. package/dist/resolver-IH4RmPEl.d.ts +14 -0
  390. package/dist/route-runtime-DoOHzCAD.d.mts +38 -0
  391. package/dist/route-runtime-DoOHzCAD.d.ts +38 -0
  392. package/dist/router.d.mts +36 -0
  393. package/dist/router.d.ts +36 -0
  394. package/dist/routes.d.mts +224 -0
  395. package/dist/routes.d.ts +224 -0
  396. package/dist/runtime-9nQjVM7X.d.mts +206 -0
  397. package/dist/runtime-Cxpq6xZN.d.mts +27 -0
  398. package/dist/runtime-DgeS2skB.d.ts +206 -0
  399. package/dist/runtime-bv63eUiO.d.ts +27 -0
  400. package/dist/server-action-security.d.mts +43 -0
  401. package/dist/server-action-security.d.ts +43 -0
  402. package/dist/server-fn-client.d.mts +32 -0
  403. package/dist/server-fn-client.d.ts +32 -0
  404. package/dist/server-fn.d.mts +93 -0
  405. package/dist/server-fn.d.ts +93 -0
  406. package/dist/server-plugins.d.mts +55 -0
  407. package/dist/server-plugins.d.ts +55 -0
  408. package/dist/server-query-client.d.mts +50 -0
  409. package/dist/server-query-client.d.ts +50 -0
  410. package/dist/server-query.d.mts +36 -0
  411. package/dist/server-query.d.ts +36 -0
  412. package/dist/server.cjs +731 -447
  413. package/dist/server.cjs.map +1 -1
  414. package/dist/server.d.mts +48 -0
  415. package/dist/server.d.ts +48 -0
  416. package/dist/server.mjs +9 -8
  417. package/dist/server.mjs.map +1 -1
  418. package/dist/storage.d.mts +52 -0
  419. package/dist/storage.d.ts +52 -0
  420. package/dist/testing.d.mts +101 -0
  421. package/dist/testing.d.ts +101 -0
  422. package/dist/transport-BmbGTXA5.d.mts +49 -0
  423. package/dist/transport-BmbGTXA5.d.ts +49 -0
  424. package/dist/types-BMxWr97v.d.mts +81 -0
  425. package/dist/types-BMxWr97v.d.ts +81 -0
  426. package/dist/types-C9N-nk5R.d.mts +53 -0
  427. package/dist/types-C9N-nk5R.d.ts +53 -0
  428. package/dist/types-D1A6-XvH.d.mts +73 -0
  429. package/dist/types-D1A6-XvH.d.ts +73 -0
  430. package/dist/utils-B-cUHwoK.d.ts +23 -0
  431. package/dist/utils-Cm41AefV.d.mts +23 -0
  432. package/dist/version.cjs +1 -1
  433. package/dist/version.cjs.map +1 -1
  434. package/dist/version.d.mts +3 -0
  435. package/dist/version.d.ts +3 -0
  436. package/dist/version.mjs +1 -1
  437. package/dist/vite.cjs +682 -437
  438. package/dist/vite.cjs.map +1 -1
  439. package/dist/vite.d.mts +22 -0
  440. package/dist/vite.d.ts +22 -0
  441. package/dist/vite.mjs +6 -5
  442. package/dist/workflows.d.mts +110 -0
  443. package/dist/workflows.d.ts +110 -0
  444. package/package.json +3 -2
  445. package/types/client.d.ts +1 -1
  446. package/types/image.d.ts +4 -0
  447. package/types/images.d.ts +59 -0
@@ -0,0 +1,39 @@
1
+ import { aU as ResolvedFarmConfig } from '../client-plugins-BI2R6Eae.mjs';
2
+ export { a5 as loadConfig, a4 as resolveConfig, a6 as resolveDeployConfig } from '../client-plugins-BI2R6Eae.mjs';
3
+ import { FarmProductionViteRuntime } from './config-runtime.mjs';
4
+ export { l as logger } from '../utils-Cm41AefV.mjs';
5
+ import '../plugin-BJDf43dc.mjs';
6
+ import 'react';
7
+ import 'http';
8
+ import '../types-D1A6-XvH.mjs';
9
+ import 'db0';
10
+ import 'unstorage';
11
+ import '../integration-api-CHT2OKAf.mjs';
12
+ import '@farming-labs/orm';
13
+ import '../types-C9N-nk5R.mjs';
14
+ import '@farming-labs/docs';
15
+ import '../markdown.mjs';
16
+ import '../observability.mjs';
17
+ import 'vite';
18
+ import '../workflows.mjs';
19
+ import '../cron.mjs';
20
+ import '../env.mjs';
21
+ import '../server-action-security.mjs';
22
+ import '../image-config-Duob7wER.mjs';
23
+ import '../types-BMxWr97v.mjs';
24
+ import '../cache.mjs';
25
+ import '../route-runtime-DoOHzCAD.mjs';
26
+
27
+ interface BuildOptions {
28
+ preset?: string;
29
+ root?: string;
30
+ universal?: boolean;
31
+ /** @internal Production Vite preload started by the CLI. */
32
+ productionVite?: FarmProductionViteRuntime | Promise<FarmProductionViteRuntime>;
33
+ }
34
+ /**
35
+ * Build Farm.js application for production
36
+ */
37
+ declare function build(config: ResolvedFarmConfig, options?: BuildOptions): Promise<void>;
38
+
39
+ export { build };
@@ -0,0 +1,39 @@
1
+ import { aU as ResolvedFarmConfig } from '../client-plugins-DU9oMspX.js';
2
+ export { a5 as loadConfig, a4 as resolveConfig, a6 as resolveDeployConfig } from '../client-plugins-DU9oMspX.js';
3
+ import { FarmProductionViteRuntime } from './config-runtime.js';
4
+ export { l as logger } from '../utils-B-cUHwoK.js';
5
+ import '../plugin-BJDf43dc.js';
6
+ import 'react';
7
+ import 'http';
8
+ import '../types-D1A6-XvH.js';
9
+ import 'db0';
10
+ import 'unstorage';
11
+ import '../integration-api-CHT2OKAf.js';
12
+ import '@farming-labs/orm';
13
+ import '../types-C9N-nk5R.js';
14
+ import '@farming-labs/docs';
15
+ import '../markdown.js';
16
+ import '../observability.js';
17
+ import 'vite';
18
+ import '../workflows.js';
19
+ import '../cron.js';
20
+ import '../env.js';
21
+ import '../server-action-security.js';
22
+ import '../image-config-Duob7wER.js';
23
+ import '../types-BMxWr97v.js';
24
+ import '../cache.js';
25
+ import '../route-runtime-DoOHzCAD.js';
26
+
27
+ interface BuildOptions {
28
+ preset?: string;
29
+ root?: string;
30
+ universal?: boolean;
31
+ /** @internal Production Vite preload started by the CLI. */
32
+ productionVite?: FarmProductionViteRuntime | Promise<FarmProductionViteRuntime>;
33
+ }
34
+ /**
35
+ * Build Farm.js application for production
36
+ */
37
+ declare function build(config: ResolvedFarmConfig, options?: BuildOptions): Promise<void>;
38
+
39
+ export { build };
@@ -1,35 +1,36 @@
1
1
  import {
2
2
  build
3
- } from "../chunk-2NHCNRF6.mjs";
3
+ } from "../chunk-EI43C4RA.mjs";
4
4
  import "../chunk-SL6HTIOK.mjs";
5
5
  import "../chunk-4S3ORGFA.mjs";
6
- import "../chunk-HNIQFZKB.mjs";
6
+ import "../chunk-ME4MO2RJ.mjs";
7
7
  import "../chunk-V7RBCSDJ.mjs";
8
8
  import "../chunk-QM746KUO.mjs";
9
9
  import {
10
10
  loadConfig,
11
11
  resolveConfig,
12
12
  resolveDeployConfig
13
- } from "../chunk-NM3CRAAL.mjs";
13
+ } from "../chunk-B4W3BNTL.mjs";
14
14
  import "../chunk-UVCIEUJC.mjs";
15
- import "../chunk-C3DLZMBU.mjs";
16
- import "../chunk-RSKVYESE.mjs";
17
- import "../chunk-A2LUXHD2.mjs";
15
+ import "../chunk-DJSGLHCN.mjs";
16
+ import "../chunk-RQ633A5I.mjs";
17
+ import "../chunk-4MGVSBRP.mjs";
18
18
  import "../chunk-LGHEOHBU.mjs";
19
19
  import "../chunk-FRPWCMMG.mjs";
20
20
  import "../chunk-V6WE6JSZ.mjs";
21
21
  import "../chunk-3XNTL3FQ.mjs";
22
- import "../chunk-BHG3LVHH.mjs";
22
+ import "../chunk-CGIXMLSY.mjs";
23
23
  import "../chunk-USWZZUEH.mjs";
24
24
  import "../chunk-7N62DNSO.mjs";
25
25
  import "../chunk-7HO6AEOP.mjs";
26
+ import "../chunk-I4CUBGVF.mjs";
26
27
  import "../chunk-74YTBPTY.mjs";
27
28
  import "../chunk-7MABZJIM.mjs";
28
29
  import "../chunk-YW7OBE6Q.mjs";
29
30
  import "../chunk-GY2STC2S.mjs";
30
31
  import "../chunk-UB5UOSHB.mjs";
31
- import "../chunk-LLC7BNXW.mjs";
32
- import "../chunk-QGQX7SFC.mjs";
32
+ import "../chunk-ZVWA4ZQ3.mjs";
33
+ import "../chunk-7FBJLMQH.mjs";
33
34
  import "../chunk-XIVV5IWN.mjs";
34
35
  import "../chunk-GXASWWJU.mjs";
35
36
  import "../chunk-K4667E2Q.mjs";
@@ -51,7 +52,7 @@ import {
51
52
  import "../chunk-PFE6GMNE.mjs";
52
53
  import "../chunk-RHIFZZUI.mjs";
53
54
  import "../chunk-LM2YNO4U.mjs";
54
- import "../chunk-EEABSBKK.mjs";
55
+ import "../chunk-SSA7THPX.mjs";
55
56
  import "../chunk-QTZZ2ISQ.mjs";
56
57
  import "../chunk-ITN462YM.mjs";
57
58
  import "../chunk-B232I2GP.mjs";
@@ -0,0 +1,2 @@
1
+ export { i as installChunkErrorRecovery } from '../production-runtime-C_B79w2P.mjs';
2
+ export { c as createClientPluginManager } from '../plugin-BJDf43dc.mjs';
@@ -0,0 +1,2 @@
1
+ export { i as installChunkErrorRecovery } from '../production-runtime-DDEM1D2q.js';
2
+ export { c as createClientPluginManager } from '../plugin-BJDf43dc.js';
@@ -778,9 +778,9 @@ var FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY = "farm.integration.internalD
778
778
  var FARM_INTEGRATION_PLUGIN_SERVER_RUNTIME = /* @__PURE__ */ Symbol.for(
779
779
  "@farm.js/core/integration-plugin-server-runtime"
780
780
  );
781
- function defineTypedIntegrationRoute(method, path4, input) {
781
+ function defineTypedIntegrationRoute(method, path5, input) {
782
782
  return {
783
- path: path4,
783
+ path: path5,
784
784
  method,
785
785
  middleware: input.middleware,
786
786
  before: input.before,
@@ -790,7 +790,7 @@ function defineTypedIntegrationRoute(method, path4, input) {
790
790
  input: normalizeIntegrationRouteInputSchemas(input),
791
791
  handler: input.handler,
792
792
  __operation: defineIntegrationAPIOperation({
793
- path: path4,
793
+ path: path5,
794
794
  method,
795
795
  bodyFormat: input.bodyFormat,
796
796
  responseFormat: input.responseFormat,
@@ -803,52 +803,52 @@ function defineTypedIntegrationRoute(method, path4, input) {
803
803
  __name(defineTypedIntegrationRoute, "defineTypedIntegrationRoute");
804
804
  function createIntegrationRouteFactory() {
805
805
  return {
806
- get(path4, input) {
806
+ get(path5, input) {
807
807
  return defineTypedIntegrationRoute(
808
808
  "GET",
809
- path4,
809
+ path5,
810
810
  input
811
811
  );
812
812
  },
813
- post(path4, input) {
813
+ post(path5, input) {
814
814
  return defineTypedIntegrationRoute(
815
815
  "POST",
816
- path4,
816
+ path5,
817
817
  {
818
818
  bodyFormat: "json",
819
819
  ...input
820
820
  }
821
821
  );
822
822
  },
823
- put(path4, input) {
823
+ put(path5, input) {
824
824
  return defineTypedIntegrationRoute(
825
825
  "PUT",
826
- path4,
826
+ path5,
827
827
  {
828
828
  bodyFormat: "json",
829
829
  ...input
830
830
  }
831
831
  );
832
832
  },
833
- patch(path4, input) {
834
- return defineTypedIntegrationRoute("PATCH", path4, {
833
+ patch(path5, input) {
834
+ return defineTypedIntegrationRoute("PATCH", path5, {
835
835
  bodyFormat: "json",
836
836
  ...input
837
837
  });
838
838
  },
839
- delete(path4, input) {
840
- return defineTypedIntegrationRoute("DELETE", path4, {
839
+ delete(path5, input) {
840
+ return defineTypedIntegrationRoute("DELETE", path5, {
841
841
  bodyFormat: "json",
842
842
  ...input
843
843
  });
844
844
  },
845
- options(path4, input) {
846
- return defineTypedIntegrationRoute("OPTIONS", path4, input);
845
+ options(path5, input) {
846
+ return defineTypedIntegrationRoute("OPTIONS", path5, input);
847
847
  },
848
- head(path4, input) {
848
+ head(path5, input) {
849
849
  return defineTypedIntegrationRoute(
850
850
  "HEAD",
851
- path4,
851
+ path5,
852
852
  input
853
853
  );
854
854
  }
@@ -971,8 +971,8 @@ __name(parseIntegrationConfigSchema, "parseIntegrationConfigSchema");
971
971
  function createIntegrationConfigValidationError(integration, error) {
972
972
  const issues = Array.isArray(error.issues) && error.issues.length > 0 ? error.issues.map((issue) => {
973
973
  const normalizedPath = normalizeIntegrationValidationPath(issue.path);
974
- const path4 = normalizedPath.length ? `${normalizedPath.join(".")}: ` : "";
975
- return `${path4}${issue.message || "Invalid config"}`;
974
+ const path5 = normalizedPath.length ? `${normalizedPath.join(".")}: ` : "";
975
+ return `${path5}${issue.message || "Invalid config"}`;
976
976
  }).join("; ") : error.message || "Invalid config";
977
977
  return new Error(`Integration "${integration.type}" config validation failed: ${issues}`);
978
978
  }
@@ -1679,8 +1679,8 @@ function normalizeIntegrationValidationIssues(source, error) {
1679
1679
  ];
1680
1680
  }
1681
1681
  __name(normalizeIntegrationValidationIssues, "normalizeIntegrationValidationIssues");
1682
- function normalizeIntegrationValidationPath(path4) {
1683
- return (path4 || []).map((segment) => {
1682
+ function normalizeIntegrationValidationPath(path5) {
1683
+ return (path5 || []).map((segment) => {
1684
1684
  const key = typeof segment === "object" && segment !== null && "key" in segment ? segment.key : segment;
1685
1685
  return typeof key === "symbol" ? key.description || key.toString() : key;
1686
1686
  });
@@ -2378,7 +2378,7 @@ __name(normalizeMatcher, "normalizeMatcher");
2378
2378
 
2379
2379
  // src/markdown.ts
2380
2380
  function resolveMarkdownConfig(config) {
2381
- if (config === false || config === void 0) {
2381
+ if (config === false) {
2382
2382
  return {
2383
2383
  enabled: false,
2384
2384
  expose: [],
@@ -2386,7 +2386,7 @@ function resolveMarkdownConfig(config) {
2386
2386
  includeMetadata: true
2387
2387
  };
2388
2388
  }
2389
- if (config === true) {
2389
+ if (config === true || config === void 0) {
2390
2390
  return {
2391
2391
  enabled: true,
2392
2392
  expose: true,
@@ -2394,7 +2394,7 @@ function resolveMarkdownConfig(config) {
2394
2394
  includeMetadata: true
2395
2395
  };
2396
2396
  }
2397
- const exposeInput = config.expose ?? config.routes ?? [];
2397
+ const exposeInput = config.expose ?? config.routes ?? true;
2398
2398
  const expose = exposeInput === true ? true : Array.isArray(exposeInput) ? exposeInput.map(normalizeMarkdownRouteInput) : [];
2399
2399
  return {
2400
2400
  enabled: config.enabled !== false && (expose === true || expose.length > 0),
@@ -2417,7 +2417,7 @@ function normalizeMarkdownRouteInput(input) {
2417
2417
  }
2418
2418
  __name(normalizeMarkdownRouteInput, "normalizeMarkdownRouteInput");
2419
2419
  function normalizeMarkdownRoute(route) {
2420
- const withoutMarkdownExtension = route.endsWith(".md") ? route.slice(0, -3) : route;
2420
+ const withoutMarkdownExtension = route.toLowerCase().endsWith(".md") ? route.slice(0, -3) : route;
2421
2421
  const withSlash = withoutMarkdownExtension.startsWith("/") ? withoutMarkdownExtension : `/${withoutMarkdownExtension}`;
2422
2422
  const normalized = withSlash.replace(/\/+/g, "/").replace(/\/$/g, "");
2423
2423
  return normalized === "" || normalized === "/index" ? "/" : normalized;
@@ -2507,7 +2507,7 @@ function normalizeCronJob(name, job) {
2507
2507
  if (!job || typeof job !== "object" || Array.isArray(job)) {
2508
2508
  throw new TypeError(`Farm cron ${JSON.stringify(name)} must be a configuration object.`);
2509
2509
  }
2510
- const path4 = normalizeCronPath(name, job.path);
2510
+ const path5 = normalizeCronPath(name, job.path);
2511
2511
  const rawSchedule = Array.isArray(job.schedule) ? job.schedule : [job.schedule];
2512
2512
  const schedule = [...new Set(rawSchedule.map((value) => normalizeCronExpression(name, value)))];
2513
2513
  if (schedule.length === 0) {
@@ -2516,7 +2516,7 @@ function normalizeCronJob(name, job) {
2516
2516
  return {
2517
2517
  name,
2518
2518
  schedule,
2519
- path: path4,
2519
+ path: path5,
2520
2520
  description: job.description?.trim() || void 0
2521
2521
  };
2522
2522
  }
@@ -2525,13 +2525,13 @@ function normalizeCronPath(name, value) {
2525
2525
  if (typeof value !== "string" || !value.trim().startsWith("/")) {
2526
2526
  throw new TypeError(`Farm cron ${JSON.stringify(name)} path must start with "/".`);
2527
2527
  }
2528
- const path4 = value.trim();
2529
- if (path4.startsWith("//") || path4.includes("?") || path4.includes("#")) {
2528
+ const path5 = value.trim();
2529
+ if (path5.startsWith("//") || path5.includes("?") || path5.includes("#")) {
2530
2530
  throw new TypeError(
2531
2531
  `Farm cron ${JSON.stringify(name)} path must be an application pathname without a host, query, or hash.`
2532
2532
  );
2533
2533
  }
2534
- return path4.length > 1 ? path4.replace(/\/+$/, "") : path4;
2534
+ return path5.length > 1 ? path5.replace(/\/+$/, "") : path5;
2535
2535
  }
2536
2536
  __name(normalizeCronPath, "normalizeCronPath");
2537
2537
  function normalizeCronExpression(name, value) {
@@ -3467,7 +3467,7 @@ var SIZE_UNITS = {
3467
3467
  gib: 1073741824
3468
3468
  };
3469
3469
  function resolveFarmImageConfig(config) {
3470
- const path4 = normalizeImagePath(config?.path ?? DEFAULT_FARM_IMAGE_PATH);
3470
+ const path5 = normalizeImagePath(config?.path ?? DEFAULT_FARM_IMAGE_PATH);
3471
3471
  const deviceSizes = normalizeIntegerList(
3472
3472
  config?.deviceSizes ?? DEFAULT_FARM_IMAGE_DEVICE_SIZES,
3473
3473
  "images.deviceSizes"
@@ -3495,7 +3495,7 @@ function resolveFarmImageConfig(config) {
3495
3495
  );
3496
3496
  return Object.freeze({
3497
3497
  provider: config?.provider ?? "auto",
3498
- path: path4,
3498
+ path: path5,
3499
3499
  domains: Object.freeze([
3500
3500
  ...new Set(
3501
3501
  (config?.domains ?? []).map((domain) => domain.trim().toLowerCase()).filter(Boolean)
@@ -3525,11 +3525,11 @@ function resolveFarmImageConfig(config) {
3525
3525
  }
3526
3526
  __name(resolveFarmImageConfig, "resolveFarmImageConfig");
3527
3527
  function normalizeImagePath(value) {
3528
- const path4 = value.trim().replace(/\/+$/, "") || "/";
3529
- if (!path4.startsWith("/") || path4.includes("?") || path4.includes("#")) {
3528
+ const path5 = value.trim().replace(/\/+$/, "") || "/";
3529
+ if (!path5.startsWith("/") || path5.includes("?") || path5.includes("#")) {
3530
3530
  throw new TypeError("images.path must be an absolute pathname without a query or hash");
3531
3531
  }
3532
- return path4;
3532
+ return path5;
3533
3533
  }
3534
3534
  __name(normalizeImagePath, "normalizeImagePath");
3535
3535
  function normalizeIntegerList(values, name, max) {
@@ -3712,6 +3712,90 @@ function normalizePositiveInteger(value, fallback, name) {
3712
3712
  }
3713
3713
  __name(normalizePositiveInteger, "normalizePositiveInteger");
3714
3714
 
3715
+ // src/auth-config.ts
3716
+ var import_node_module2 = require("module");
3717
+ var import_node_path3 = __toESM(require("path"));
3718
+ var import_node_url2 = require("url");
3719
+ function resolveFarmAuthConfig(input) {
3720
+ const config = input === true ? {} : input && typeof input === "object" ? input : {};
3721
+ const passwordConfig = typeof config.emailAndPassword === "object" ? config.emailAndPassword : {};
3722
+ const resolved = {
3723
+ enabled: input !== void 0 && input !== false && config.enabled !== false,
3724
+ appName: config.appName,
3725
+ basePath: normalizeBasePath(config.basePath),
3726
+ emailAndPassword: {
3727
+ enabled: config.emailAndPassword !== false,
3728
+ requireEmailVerification: passwordConfig.requireEmailVerification ?? false,
3729
+ minPasswordLength: passwordConfig.minPasswordLength ?? 8,
3730
+ maxPasswordLength: passwordConfig.maxPasswordLength ?? 128
3731
+ },
3732
+ session: {
3733
+ expiresIn: config.session?.expiresIn ?? 60 * 60 * 24 * 7,
3734
+ updateAge: config.session?.updateAge ?? 60 * 60 * 24
3735
+ },
3736
+ database: {
3737
+ url: config.database?.url,
3738
+ path: config.database?.path || ".farm/auth.sqlite",
3739
+ migrateInDevelopment: config.database?.migrateInDevelopment ?? true
3740
+ }
3741
+ };
3742
+ validateFarmAuthConfig(resolved);
3743
+ return resolved;
3744
+ }
3745
+ __name(resolveFarmAuthConfig, "resolveFarmAuthConfig");
3746
+ async function resolveFarmAuthIntegration(config, options) {
3747
+ if (!config.enabled) return void 0;
3748
+ const root = import_node_path3.default.resolve(options.root);
3749
+ let modulePath;
3750
+ try {
3751
+ const resolveFromApp = (0, import_node_module2.createRequire)(import_node_path3.default.join(root, "package.json"));
3752
+ modulePath = resolveFromApp.resolve("@farm.js/auth/internal");
3753
+ } catch {
3754
+ throw new Error(
3755
+ "The `auth` config requires @farm.js/auth. Install it with `pnpm add @farm.js/auth` and try again."
3756
+ );
3757
+ }
3758
+ const runtime = await import(
3759
+ /* @vite-ignore */
3760
+ (0, import_node_url2.pathToFileURL)(modulePath).href
3761
+ );
3762
+ if (typeof runtime.createFarmAuthIntegration !== "function") {
3763
+ throw new Error(
3764
+ "The installed @farm.js/auth package is incompatible with this version of @farm.js/core."
3765
+ );
3766
+ }
3767
+ return runtime.createFarmAuthIntegration(config, {
3768
+ ...options,
3769
+ root
3770
+ });
3771
+ }
3772
+ __name(resolveFarmAuthIntegration, "resolveFarmAuthIntegration");
3773
+ function normalizeBasePath(value) {
3774
+ const route = (value || "/api/auth").trim();
3775
+ const withLeadingSlash = route.startsWith("/") ? route : `/${route}`;
3776
+ const normalized = withLeadingSlash.replace(/\/+/g, "/").replace(/\/+$/, "");
3777
+ return normalized || "/api/auth";
3778
+ }
3779
+ __name(normalizeBasePath, "normalizeBasePath");
3780
+ function validateFarmAuthConfig(config) {
3781
+ const { minPasswordLength, maxPasswordLength } = config.emailAndPassword;
3782
+ if (!Number.isInteger(minPasswordLength) || minPasswordLength < 1) {
3783
+ throw new Error("auth.emailAndPassword.minPasswordLength must be a positive integer.");
3784
+ }
3785
+ if (!Number.isInteger(maxPasswordLength) || maxPasswordLength < minPasswordLength) {
3786
+ throw new Error(
3787
+ "auth.emailAndPassword.maxPasswordLength must be an integer greater than or equal to minPasswordLength."
3788
+ );
3789
+ }
3790
+ if (!Number.isInteger(config.session.expiresIn) || config.session.expiresIn < 1) {
3791
+ throw new Error("auth.session.expiresIn must be a positive integer.");
3792
+ }
3793
+ if (!Number.isInteger(config.session.updateAge) || config.session.updateAge < 0) {
3794
+ throw new Error("auth.session.updateAge must be a non-negative integer.");
3795
+ }
3796
+ }
3797
+ __name(validateFarmAuthConfig, "validateFarmAuthConfig");
3798
+
3715
3799
  // src/config.ts
3716
3800
  var FARM_RESOLVED_CUSTOM_CONTEXT = /* @__PURE__ */ Symbol.for("farm.resolvedCustomContext");
3717
3801
  function normalizeDeployTarget(target) {
@@ -3863,7 +3947,7 @@ async function findDocsConfigPath(rootDir, configPath) {
3863
3947
  __name(findDocsConfigPath, "findDocsConfigPath");
3864
3948
  async function loadDocsConfig(rootDir, configPath) {
3865
3949
  const fs = await import("fs/promises");
3866
- const { pathToFileURL: pathToFileURL2 } = await import("url");
3950
+ const { pathToFileURL: pathToFileURL3 } = await import("url");
3867
3951
  const root = import_path.default.resolve(rootDir || process.cwd());
3868
3952
  const resolvedPath = await findDocsConfigPath(root, configPath);
3869
3953
  if (!resolvedPath) return void 0;
@@ -3892,7 +3976,7 @@ async function loadDocsConfig(rootDir, configPath) {
3892
3976
  logLevel: "silent",
3893
3977
  sourcemap: "inline"
3894
3978
  });
3895
- const moduleUrl = pathToFileURL2(modulePath).href + `?t=${Date.now()}`;
3979
+ const moduleUrl = pathToFileURL3(modulePath).href + `?t=${Date.now()}`;
3896
3980
  let importedConfig;
3897
3981
  try {
3898
3982
  importedConfig = await import(
@@ -3995,6 +4079,17 @@ async function resolveConfig(userConfig, mode) {
3995
4079
  const mdx = resolveMdxConfig(userConfig.mdx);
3996
4080
  const env2 = resolveEnv(userConfig.env, process.env);
3997
4081
  setEnv(env2);
4082
+ const auth = resolveFarmAuthConfig(userConfig.auth);
4083
+ if (auth.enabled && userConfig.integrations?.auth) {
4084
+ throw new Error(
4085
+ "Choose either the top-level `auth` config or `integrations.auth`; they cannot both own the auth route."
4086
+ );
4087
+ }
4088
+ const nativeAuthIntegration = await resolveFarmAuthIntegration(auth, {
4089
+ root,
4090
+ mode
4091
+ });
4092
+ const integrations = nativeAuthIntegration ? { ...userConfig.integrations, auth: nativeAuthIntegration } : userConfig.integrations || {};
3998
4093
  const generateBuildId = userConfig.generateBuildId || (() => `build-${Date.now()}`);
3999
4094
  const deploymentId = normalizeFarmDeploymentId(
4000
4095
  userConfig.deploymentId || process.env.FARM_DEPLOYMENT_ID || process.env.VERCEL_GIT_COMMIT_SHA || process.env.CF_PAGES_COMMIT_SHA || (mode === "production" ? await generateBuildId() : "development")
@@ -4019,14 +4114,15 @@ async function resolveConfig(userConfig, mode) {
4019
4114
  devtools: resolveFarmDevtoolsConfig(userConfig.devtools, mode),
4020
4115
  storage: userConfig.storage || {},
4021
4116
  cache: userConfig.cache || {},
4117
+ auth,
4022
4118
  suppressLintOnLink: userConfig.suppressLintOnLink ?? false,
4023
4119
  experimental: {
4024
4120
  serverComponents: false,
4025
4121
  serverActions: false,
4026
4122
  ...userConfig.experimental
4027
4123
  },
4028
- plugins: [...resolveIntegrationPlugins(userConfig.integrations), ...userConfig.plugins || []],
4029
- integrations: userConfig.integrations || {},
4124
+ plugins: [...resolveIntegrationPlugins(integrations), ...userConfig.plugins || []],
4125
+ integrations,
4030
4126
  trailingSlash: userConfig.trailingSlash ?? false,
4031
4127
  redirects: /* @__PURE__ */ __name(() => [...redirects, ...routeRuleRedirects], "redirects"),
4032
4128
  rewrites: /* @__PURE__ */ __name(() => rewrites, "rewrites"),