@farm.js/core 0.1.67 → 0.1.69

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 (297) hide show
  1. package/dist/{agent-mcp.d-DWyWkTSy.d.mts → agent-mcp.d-DOfBMEzP.d.mts} +1 -1
  2. package/dist/{agent-mcp.d-BFu9xHAi.d.ts → agent-mcp.d-DnIgriX1.d.ts} +1 -1
  3. package/dist/agent-runtime.d.mts +5 -3
  4. package/dist/agent-runtime.d.ts +5 -3
  5. package/dist/{analyzer-TTIIXXMQ.mjs → analyzer-NAL5TJUP.mjs} +2 -2
  6. package/dist/analyzer-SAJSV6SP.cjs +16 -0
  7. package/dist/api/node.d.mts +7 -5
  8. package/dist/api/node.d.ts +7 -5
  9. package/dist/api/route-manager.d.mts +7 -5
  10. package/dist/api/route-manager.d.ts +7 -5
  11. package/dist/api/runtime.d.mts +6 -4
  12. package/dist/api/runtime.d.ts +6 -4
  13. package/dist/api.cjs +2 -2
  14. package/dist/api.d.mts +8 -23
  15. package/dist/api.d.ts +8 -23
  16. package/dist/api.mjs +1 -1
  17. package/dist/{app-manifest.d-CwfhGrVR.d.ts → app-manifest.d-CaAcaukR.d.ts} +1 -1
  18. package/dist/{app-manifest.d-CRmjN5j9.d.mts → app-manifest.d-_BVbI0xp.d.mts} +1 -1
  19. package/dist/app-markdown.cjs +3 -3
  20. package/dist/app-markdown.d.mts +10 -10
  21. package/dist/app-markdown.d.ts +10 -10
  22. package/dist/app-markdown.mjs +2 -2
  23. package/dist/{app.d-BX9LVTiP.d.ts → app.d-BWeDqOaF.d.ts} +6 -6
  24. package/dist/{app.d-uBBUxwyV.d.mts → app.d-CaPwtytN.d.mts} +6 -6
  25. package/dist/{base-path.d-BOUV5ozD.d.mts → base-path.d-CTDVF0Fc.d.mts} +2 -1
  26. package/dist/{base-path.d-BOUV5ozD.d.ts → base-path.d-CTDVF0Fc.d.ts} +2 -1
  27. package/dist/{chunk-HM7AGSKU.cjs → chunk-22LGTSBA.cjs} +1 -1
  28. package/dist/{chunk-4JX3M4C6.cjs → chunk-23VJEGKC.cjs} +2 -1
  29. package/dist/{chunk-V5MQMQ2P.mjs → chunk-2P7UYHZP.mjs} +1 -1
  30. package/dist/{chunk-Q37INCXG.cjs → chunk-3EEINK7G.cjs} +11 -2
  31. package/dist/{chunk-BRWIVOV4.cjs → chunk-3GNHJ3RN.cjs} +10 -8
  32. package/dist/{chunk-QJVW76JG.mjs → chunk-3Y52TWYU.mjs} +2 -2
  33. package/dist/{chunk-OB3IFUK6.cjs → chunk-437QZIC2.cjs} +4 -4
  34. package/dist/{chunk-DCXSIEFE.cjs → chunk-4JRAMCUP.cjs} +59 -38
  35. package/dist/{chunk-Q5UX55YA.cjs → chunk-4W4ZWSV2.cjs} +887 -485
  36. package/dist/{chunk-JWSI5WO4.mjs → chunk-4ZXKYCYK.mjs} +1 -1
  37. package/dist/{chunk-N35YPV4N.mjs → chunk-57QAQU4F.mjs} +9 -7
  38. package/dist/{chunk-AQDLVHNF.mjs → chunk-5FBZJJGA.mjs} +17 -0
  39. package/dist/{chunk-HP2DQGQH.mjs → chunk-5TOWKGV3.mjs} +1 -1
  40. package/dist/{chunk-556H7JCE.cjs → chunk-6GQJVY4E.cjs} +32 -27
  41. package/dist/{chunk-PL6RTBDE.cjs → chunk-ABIBASLJ.cjs} +2 -2
  42. package/dist/{chunk-H37MDCPR.mjs → chunk-ANMIR6US.mjs} +1 -1
  43. package/dist/{chunk-DQJ2CIH7.cjs → chunk-ASYOWPSR.cjs} +2 -1
  44. package/dist/{chunk-QGJ4FI2G.mjs → chunk-C6HGUTXB.mjs} +113 -29
  45. package/dist/{chunk-UHNSY2PQ.mjs → chunk-CKCKCUYO.mjs} +826 -424
  46. package/dist/{chunk-IRA2CZAY.mjs → chunk-CRVSYDHV.mjs} +2 -2
  47. package/dist/{chunk-2ZOYOYEE.mjs → chunk-D5F7RPZP.mjs} +71 -1
  48. package/dist/{chunk-N5DQMOAG.cjs → chunk-DHR2WDSL.cjs} +275 -92
  49. package/dist/{chunk-QGQP6QKO.cjs → chunk-DWLNLU55.cjs} +2 -2
  50. package/dist/{chunk-52Y3C3HG.mjs → chunk-E7VF3LQ5.mjs} +3 -2
  51. package/dist/{chunk-V5RTHYJB.cjs → chunk-F6YLXK5L.cjs} +93 -25
  52. package/dist/{chunk-HNVAZGQD.cjs → chunk-FJMC24KG.cjs} +2 -2
  53. package/dist/{chunk-KCY52OUQ.cjs → chunk-FSODPZRT.cjs} +1 -1
  54. package/dist/{chunk-PPX7UOFY.cjs → chunk-FVYBEMOD.cjs} +55 -38
  55. package/dist/{chunk-6YBYX4K4.mjs → chunk-G7NBPP7H.mjs} +1 -1
  56. package/dist/{chunk-HFHJJXSV.mjs → chunk-GFPS7MNE.mjs} +1 -1
  57. package/dist/{chunk-LPIZMU7D.cjs → chunk-GQ6QOH7T.cjs} +9 -5
  58. package/dist/{chunk-BZWTBELF.cjs → chunk-GTQOEEE7.cjs} +77 -7
  59. package/dist/{chunk-6V5YWI4W.cjs → chunk-GUMKIQJL.cjs} +2 -2
  60. package/dist/{chunk-3T5TLFCQ.mjs → chunk-HEJM46HQ.mjs} +11 -2
  61. package/dist/{chunk-F43OG25P.cjs → chunk-I7J5RLGO.cjs} +15 -1
  62. package/dist/chunk-ICFPTHXM.mjs +97 -0
  63. package/dist/{chunk-WGHY3OL5.mjs → chunk-IYLZZTP6.mjs} +233 -50
  64. package/dist/{chunk-WUTFJOV7.cjs → chunk-JFPKARWM.cjs} +16 -8
  65. package/dist/{chunk-TEG6HJVF.mjs → chunk-JL2YW5KX.mjs} +1 -0
  66. package/dist/{chunk-23PVOIPT.cjs → chunk-L5OZN6YW.cjs} +3 -3
  67. package/dist/{chunk-QITSS4TD.cjs → chunk-L6NWQ3DR.cjs} +537 -356
  68. package/dist/{chunk-3T7ALZJF.cjs → chunk-LR4KP3I7.cjs} +2 -2
  69. package/dist/{chunk-CO3YMZFD.mjs → chunk-MAGFDK4Q.mjs} +1 -1
  70. package/dist/{chunk-VFXE6NWR.mjs → chunk-MGKWYPE3.mjs} +2 -1
  71. package/dist/{chunk-5TA63JD3.mjs → chunk-MGZVDX4R.mjs} +1 -1
  72. package/dist/{chunk-6SQZXRJ2.cjs → chunk-MMDKYJ5V.cjs} +7 -7
  73. package/dist/{chunk-5Y2P454O.cjs → chunk-MTBDJ326.cjs} +6 -5
  74. package/dist/{chunk-XUES6OET.mjs → chunk-MV7NWU23.mjs} +1 -1
  75. package/dist/{chunk-4IHMHFQB.cjs → chunk-NG2EZ6QS.cjs} +28 -1
  76. package/dist/{chunk-F7JKVHU2.mjs → chunk-NVOMQLI2.mjs} +15 -1
  77. package/dist/{chunk-5IQ2ERQA.cjs → chunk-O47W53D3.cjs} +1 -1
  78. package/dist/{chunk-22IWL4YD.cjs → chunk-OCNV4CI2.cjs} +21 -2
  79. package/dist/{chunk-3TXKFRSO.mjs → chunk-OEL5EPOJ.mjs} +1 -1
  80. package/dist/{chunk-E6CD45JK.mjs → chunk-PDQ6EGPK.mjs} +26 -5
  81. package/dist/{chunk-VK54PDQ6.mjs → chunk-PEYDQMSA.mjs} +86 -18
  82. package/dist/{chunk-KSZK34HU.mjs → chunk-PJQ5W356.mjs} +16 -8
  83. package/dist/{chunk-72KCTHLV.cjs → chunk-PRL7FXG4.cjs} +113 -29
  84. package/dist/{chunk-JSOCDYER.cjs → chunk-Q4HH5Q6A.cjs} +15 -1
  85. package/dist/{chunk-YVTS3S3F.cjs → chunk-QOGIZKSO.cjs} +3 -3
  86. package/dist/{chunk-DB2HSHQA.cjs → chunk-QSUYB3RH.cjs} +14 -14
  87. package/dist/{chunk-724MGMIL.mjs → chunk-R2ZHU37O.mjs} +19 -0
  88. package/dist/{chunk-YQYTQJZN.mjs → chunk-RLH5AH2M.mjs} +1 -1
  89. package/dist/{chunk-WDD5CTZW.mjs → chunk-SZORL7EW.mjs} +24 -19
  90. package/dist/{chunk-6R53ZWX2.cjs → chunk-TKYOJ5G2.cjs} +3 -3
  91. package/dist/{chunk-XNZWMXCF.mjs → chunk-UHU4QALN.mjs} +330 -149
  92. package/dist/{chunk-J7JHVCWA.cjs → chunk-UKZ6AWKZ.cjs} +2 -1
  93. package/dist/{chunk-GTV2ABO7.mjs → chunk-ULMXZYOA.mjs} +162 -33
  94. package/dist/{chunk-4DRINDGN.cjs → chunk-VO65MYJD.cjs} +254 -125
  95. package/dist/chunk-W44X6IC2.cjs +97 -0
  96. package/dist/{chunk-UHE5JUKB.mjs → chunk-XCAQTCGK.mjs} +1 -1
  97. package/dist/{chunk-DGOFR7D5.cjs → chunk-Y6KHPJDB.cjs} +2 -2
  98. package/dist/{chunk-DXZ57EPE.mjs → chunk-YOHHL2UE.mjs} +14 -0
  99. package/dist/{chunk-KWFNUODD.mjs → chunk-YVPX5PI5.mjs} +1 -0
  100. package/dist/{chunk-HRPTMX5C.mjs → chunk-ZR2QB45W.mjs} +7 -3
  101. package/dist/{chunk-JVM3DKZE.mjs → chunk-ZYCEEE3V.mjs} +1 -1
  102. package/dist/{chunk-5FE5YT2N.mjs → chunk-ZZGQD3LL.mjs} +28 -1
  103. package/dist/{client-component.d-DWRKyAp5.d.ts → client-component.d-CfJxuXZl.d.ts} +2 -2
  104. package/dist/{client-component.d-CDRvRmbU.d.mts → client-component.d-CnEeVvGG.d.mts} +2 -2
  105. package/dist/{client-plugins.d-CrKZiNSN.d.ts → client-plugins.d-D7dHV1Nf.d.ts} +37 -236
  106. package/dist/{client-plugins.d-BNILjfX3.d.mts → client-plugins.d-Do5ULA0x.d.mts} +37 -236
  107. package/dist/client-plugins.d.mts +5 -3
  108. package/dist/client-plugins.d.ts +5 -3
  109. package/dist/client.cjs +6 -6
  110. package/dist/client.d.mts +10 -8
  111. package/dist/client.d.ts +10 -8
  112. package/dist/client.mjs +5 -5
  113. package/dist/config.d.mts +5 -3
  114. package/dist/config.d.ts +5 -3
  115. package/dist/deployment.cjs +4 -2
  116. package/dist/deployment.d.mts +15 -1
  117. package/dist/deployment.d.ts +15 -1
  118. package/dist/deployment.mjs +3 -1
  119. package/dist/desktop.d.mts +6 -4
  120. package/dist/desktop.d.ts +6 -4
  121. package/dist/{devtools-RZVT4JVN.cjs → devtools-7HNDS4SY.cjs} +7 -7
  122. package/dist/{devtools-UFQYT3VA.mjs → devtools-BP4EBTKQ.mjs} +6 -6
  123. package/dist/docs.cjs +11 -9
  124. package/dist/docs.d.mts +19 -5
  125. package/dist/docs.d.ts +19 -5
  126. package/dist/docs.mjs +11 -9
  127. package/dist/environment/vite.cjs +5 -5
  128. package/dist/environment/vite.d.mts +1 -1
  129. package/dist/environment/vite.d.ts +1 -1
  130. package/dist/environment/vite.mjs +4 -4
  131. package/dist/{generate-route-types.d-BL2pq6xC.d.ts → generate-route-types.d-B76M5R11.d.ts} +1 -1
  132. package/dist/{generate-route-types.d-BoVDU8qX.d.mts → generate-route-types.d-CaGMIaNI.d.mts} +1 -1
  133. package/dist/image/server.cjs +2 -2
  134. package/dist/image/server.mjs +1 -1
  135. package/dist/image/sharp.cjs +9 -9
  136. package/dist/image/sharp.mjs +1 -1
  137. package/dist/index.cjs +45 -39
  138. package/dist/{index.d-Bdm6866n.d.mts → index.d-B1MpEJAo.d.mts} +1 -1
  139. package/dist/{index.d-Dey5T14f.d.ts → index.d-CVFk37uX.d.ts} +1 -1
  140. package/dist/index.d.mts +26 -23
  141. package/dist/index.d.ts +26 -23
  142. package/dist/index.mjs +48 -42
  143. package/dist/instrumentation.cjs +3 -3
  144. package/dist/instrumentation.mjs +2 -2
  145. package/dist/integrations/orm.d.mts +5 -3
  146. package/dist/integrations/orm.d.ts +5 -3
  147. package/dist/integrations.d.mts +5 -3
  148. package/dist/integrations.d.ts +5 -3
  149. package/dist/internal/app-markdown-runtime.cjs +2 -2
  150. package/dist/internal/app-markdown-runtime.d.mts +12 -5
  151. package/dist/internal/app-markdown-runtime.d.ts +12 -5
  152. package/dist/internal/app-markdown-runtime.mjs +1 -1
  153. package/dist/internal/build-runtime.cjs +34 -32
  154. package/dist/internal/build-runtime.d.mts +7 -5
  155. package/dist/internal/build-runtime.d.ts +7 -5
  156. package/dist/internal/build-runtime.mjs +33 -31
  157. package/dist/internal/cli-runtime.cjs +10 -10
  158. package/dist/internal/cli-runtime.mjs +9 -9
  159. package/dist/internal/client-error-overlay.cjs +4 -4
  160. package/dist/internal/client-error-overlay.mjs +1 -1
  161. package/dist/internal/client-runtime.cjs +31 -36
  162. package/dist/internal/client-runtime.d.mts +9 -7
  163. package/dist/internal/client-runtime.d.ts +9 -7
  164. package/dist/internal/client-runtime.mjs +22 -27
  165. package/dist/internal/compression-runtime.d.mts +5 -3
  166. package/dist/internal/compression-runtime.d.ts +5 -3
  167. package/dist/internal/config-runtime.cjs +8 -8
  168. package/dist/internal/config-runtime.d.mts +9 -7
  169. package/dist/internal/config-runtime.d.ts +9 -7
  170. package/dist/internal/config-runtime.mjs +7 -7
  171. package/dist/internal/form-actions.cjs +7 -2
  172. package/dist/internal/form-actions.d.mts +10 -3
  173. package/dist/internal/form-actions.d.ts +10 -3
  174. package/dist/internal/form-actions.mjs +8 -3
  175. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  176. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  177. package/dist/internal/islands-boot.cjs +6 -1
  178. package/dist/internal/islands-boot.mjs +6 -1
  179. package/dist/internal/native-server-fns.cjs +4 -4
  180. package/dist/internal/native-server-fns.mjs +3 -3
  181. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  182. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  183. package/dist/internal/production-node-env.cjs +4 -2
  184. package/dist/internal/production-node-env.d.mts +22 -1
  185. package/dist/internal/production-node-env.d.ts +22 -1
  186. package/dist/internal/production-node-env.mjs +3 -1
  187. package/dist/internal/production-runtime.cjs +17 -9
  188. package/dist/internal/production-runtime.d.mts +31 -19
  189. package/dist/internal/production-runtime.d.ts +31 -19
  190. package/dist/internal/production-runtime.mjs +18 -10
  191. package/dist/internal/server-tree.cjs +2 -2
  192. package/dist/internal/server-tree.d.mts +0 -5
  193. package/dist/internal/server-tree.d.ts +0 -5
  194. package/dist/internal/server-tree.mjs +1 -1
  195. package/dist/internal/vercel-edge-middleware.cjs +87 -0
  196. package/dist/internal/vercel-edge-middleware.d.mts +39 -0
  197. package/dist/internal/vercel-edge-middleware.d.ts +39 -0
  198. package/dist/internal/vercel-edge-middleware.mjs +87 -0
  199. package/dist/layers-7P4RLKVX.cjs +20 -0
  200. package/dist/{layers-T55SA47E.mjs → layers-XQ7VFMWO.mjs} +4 -2
  201. package/dist/{layers.d-CcS42OGR.d.mts → layers.d-CH0bC4QL.d.mts} +2 -1
  202. package/dist/{layers.d-CcS42OGR.d.ts → layers.d-CH0bC4QL.d.ts} +2 -1
  203. package/dist/markdown.d.mts +5 -3
  204. package/dist/markdown.d.ts +5 -3
  205. package/dist/middleware.cjs +4 -4
  206. package/dist/middleware.d.mts +8 -5
  207. package/dist/middleware.d.ts +8 -5
  208. package/dist/middleware.mjs +6 -6
  209. package/dist/mobile.d.mts +4 -4
  210. package/dist/mobile.d.ts +4 -4
  211. package/dist/{mount.d-BP0nLYQO.d.mts → mount.d-CBqr-LfI.d.mts} +1 -1
  212. package/dist/{mount.d-CkiPky_F.d.ts → mount.d-CGzN61Kq.d.ts} +1 -1
  213. package/dist/{navigation-delegate.d-CdBP-hkZ.d.mts → navigation-delegate.d-BwCOhpj7.d.mts} +1 -1
  214. package/dist/{navigation-delegate.d-DchcGzAQ.d.ts → navigation-delegate.d-CLH2dXjy.d.ts} +1 -1
  215. package/dist/navigation.cjs +5 -5
  216. package/dist/navigation.d.mts +8 -6
  217. package/dist/navigation.d.ts +8 -6
  218. package/dist/navigation.mjs +4 -4
  219. package/dist/{nitro-55YOZWRA.mjs → nitro-NSTXT7LB.mjs} +2 -2
  220. package/dist/{nitro-EEX2J3KB.cjs → nitro-Y3LGITW3.cjs} +4 -4
  221. package/dist/node-module-bundle-LIZ2KMVW.cjs +13 -0
  222. package/dist/node-module-bundle-VR6NV6AI.mjs +13 -0
  223. package/dist/{plugin-WIU4GDD4.cjs → plugin-F2O4BFTK.cjs} +2 -2
  224. package/dist/{plugin-SAS22JL7.mjs → plugin-VEBRN7A3.mjs} +1 -1
  225. package/dist/plugin.cjs +23 -23
  226. package/dist/plugin.d.mts +7 -5
  227. package/dist/plugin.d.ts +7 -5
  228. package/dist/plugin.mjs +22 -22
  229. package/dist/{production-runtime.d-Dou_Htas.d.ts → production-runtime.d-BMyyLGBB.d.ts} +3 -57
  230. package/dist/{production-runtime.d-VwsBzIee.d.mts → production-runtime.d-DMZY3OgV.d.mts} +3 -57
  231. package/dist/query/client.cjs +6 -6
  232. package/dist/query/client.mjs +2 -2
  233. package/dist/{render-plan.d-LKymStDJ.d.mts → render-plan.d-CzGDjcT0.d.mts} +1 -1
  234. package/dist/{render-plan.d-D8UakAIk.d.ts → render-plan.d-W6LmjD6y.d.ts} +1 -1
  235. package/dist/renderer/react/server.cjs +2 -2
  236. package/dist/renderer/react/server.mjs +1 -1
  237. package/dist/renderer-client.cjs +5 -5
  238. package/dist/renderer-client.d.mts +8 -6
  239. package/dist/renderer-client.d.ts +8 -6
  240. package/dist/renderer-client.mjs +2 -2
  241. package/dist/renderer.d.mts +5 -0
  242. package/dist/renderer.d.ts +5 -0
  243. package/dist/{request.d-B928QjWy.d.ts → request.d-CTVRZiQv.d.ts} +1 -1
  244. package/dist/{request.d-KG-4d2eG.d.mts → request.d-CgNVderU.d.mts} +1 -1
  245. package/dist/request.d.mts +6 -4
  246. package/dist/request.d.ts +6 -4
  247. package/dist/{route-rendering.d-NIHQeb4m.d.mts → route-rendering.d-D0bmZVJA.d.mts} +1 -1
  248. package/dist/{route-rendering.d-DoEe_w9t.d.ts → route-rendering.d-FDSNtCMg.d.ts} +1 -1
  249. package/dist/{router.d-DYnRHQwz.d.ts → router.d-DZ3ldniI.d.ts} +1 -1
  250. package/dist/{router.d-B8PkJSGp.d.mts → router.d-GRKm_uAV.d.mts} +1 -1
  251. package/dist/{routes.d-uUBZyWoK.d.ts → routes.d-9GFFNioh.d.ts} +1 -1
  252. package/dist/{routes.d-DgZ_jgGG.d.mts → routes.d-CrEy0lJS.d.mts} +1 -1
  253. package/dist/routes.d.mts +5 -3
  254. package/dist/routes.d.ts +5 -3
  255. package/dist/{rsc-pipeline-7K5H2RPH.cjs → rsc-pipeline-J4KKBSCH.cjs} +10 -10
  256. package/dist/{rsc-pipeline-4OJ5ZQNZ.mjs → rsc-pipeline-PJZOVYSY.mjs} +9 -9
  257. package/dist/{runtime-X52Q7JFR.cjs → runtime-OLEO5NXF.cjs} +20 -20
  258. package/dist/{runtime-U7O3HZOZ.mjs → runtime-QDBSE4H6.mjs} +12 -12
  259. package/dist/{runtime.d-BxQIzwfy.d.mts → runtime.d-DqXihlxm.d.mts} +1 -1
  260. package/dist/{runtime.d-DP7mEkEF.d.ts → runtime.d-pqFQBU2N.d.ts} +1 -1
  261. package/dist/server-http.d-rAe7lAQc.d.mts +70 -0
  262. package/dist/server-http.d-rAe7lAQc.d.ts +70 -0
  263. package/dist/server-plugins.d.mts +6 -4
  264. package/dist/server-plugins.d.ts +6 -4
  265. package/dist/server.cjs +52 -50
  266. package/dist/server.d-C5FFrZAo.d.ts +57 -0
  267. package/dist/server.d-DgC8xew5.d.mts +57 -0
  268. package/dist/server.d.mts +13 -11
  269. package/dist/server.d.ts +13 -11
  270. package/dist/server.mjs +31 -29
  271. package/dist/{spa-router.d-DsFDHTsv.d.ts → spa-router.d-DhOhaQ-7.d.ts} +2 -2
  272. package/dist/{spa-router.d-BgHPVMhz.d.mts → spa-router.d-Dhvy60p4.d.mts} +2 -2
  273. package/dist/testing.d.mts +5 -3
  274. package/dist/testing.d.ts +5 -3
  275. package/dist/types.d-xCIhyjOq.d.mts +233 -0
  276. package/dist/types.d-xCIhyjOq.d.ts +233 -0
  277. package/dist/{utils.d-zxAVcf_V.d.ts → utils.d-BVCMRRau.d.ts} +1 -1
  278. package/dist/{utils.d-BKyKDBR1.d.mts → utils.d-Q8EHCpkF.d.mts} +1 -1
  279. package/dist/version.cjs +2 -2
  280. package/dist/version.mjs +1 -1
  281. package/dist/vite.cjs +23 -23
  282. package/dist/vite.d.mts +10 -8
  283. package/dist/vite.d.ts +10 -8
  284. package/dist/vite.mjs +22 -22
  285. package/dist/workflows.cjs +2 -2
  286. package/dist/workflows.d.mts +121 -1
  287. package/dist/workflows.d.ts +121 -1
  288. package/dist/workflows.mjs +1 -1
  289. package/package.json +7 -2
  290. package/dist/analyzer-KVZGVY5Q.cjs +0 -16
  291. package/dist/chunk-CLFEQGET.cjs +0 -60
  292. package/dist/chunk-MK5E44WP.mjs +0 -60
  293. package/dist/layers-DMRXRL7F.cjs +0 -18
  294. package/dist/node-module-bundle-7JHPPF6B.mjs +0 -11
  295. package/dist/node-module-bundle-YJGYBOGK.cjs +0 -11
  296. package/dist/workflows.d-CRMzQZ3k.d.mts +0 -188
  297. package/dist/workflows.d-CRMzQZ3k.d.ts +0 -188
@@ -14,6 +14,7 @@ var _chunkCQL5ZGFUcjs = require('./chunk-CQL5ZGFU.cjs');
14
14
  var MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
15
15
  var FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
16
16
  var SERVER_HTML_TAG = "f-html";
17
+ var SERVER_HTML_TEMPLATE_TAG = "template";
17
18
  var FARM_SERVER_TREE_SCRIPT_TYPE = "f/tree";
18
19
  var FARM_NOT_A_MARKER = /* @__PURE__ */ Symbol.for("farm.codec.not-a-marker");
19
20
  var SERVER_TREE_CHUNK_SCRIPT_TYPE = "f/chunk";
@@ -312,52 +313,79 @@ function fulfilledThenable(value) {
312
313
  promise.value = value;
313
314
  return promise;
314
315
  }
315
- function createTreeChildren(ReactRuntime, children, resolver) {
316
+ function createTreeChildren(ReactRuntime, children, resolver, inClient) {
316
317
  if (children === void 0) return [];
317
- const node = createTreeValue(ReactRuntime, children, resolver);
318
+ const node = createTreeValue(ReactRuntime, children, resolver, inClient);
318
319
  return Array.isArray(children) ? node : [node];
319
320
  }
320
- function createTreeProps(ReactRuntime, props, resolver, key) {
321
+ function createTreeProps(ReactRuntime, props, resolver, key, inClient) {
321
322
  const { children, ...rest } = props;
322
323
  const created = {};
323
324
  for (const [name, value] of Object.entries(rest)) {
324
- created[name] = createTreeValue(ReactRuntime, value, resolver);
325
+ created[name] = createTreeValue(ReactRuntime, value, resolver, inClient);
325
326
  }
326
327
  if (typeof key === "string") created.key = key;
327
- return { props: created, children: createTreeChildren(ReactRuntime, children, resolver) };
328
+ return {
329
+ props: created,
330
+ children: createTreeChildren(ReactRuntime, children, resolver, inClient)
331
+ };
332
+ }
333
+ function collectServerHtml(value, ids) {
334
+ if (value === null || typeof value !== "object") return ids;
335
+ if (Array.isArray(value)) {
336
+ for (const entry of value) collectServerHtml(entry, ids);
337
+ return ids;
338
+ }
339
+ if (value.$ === "x") {
340
+ ids.push(value.i);
341
+ return ids;
342
+ }
343
+ const object = value.$ === "o" ? value.v : value;
344
+ for (const entry of Object.values(object)) collectServerHtml(entry, ids);
345
+ return ids;
328
346
  }
329
- function createTreeValue(ReactRuntime, value, resolver) {
347
+ function createTreeValue(ReactRuntime, value, resolver, inClient = false) {
330
348
  if (value === null || typeof value !== "object") return value;
331
349
  if (Array.isArray(value))
332
- return value.map((entry) => createTreeValue(ReactRuntime, entry, resolver));
350
+ return value.map((entry) => createTreeValue(ReactRuntime, entry, resolver, inClient));
333
351
  switch (value.$) {
334
352
  case "h": {
335
353
  const { props, children } = createTreeProps(
336
354
  ReactRuntime,
337
355
  value.p,
338
356
  resolver,
339
- value.k
357
+ value.k,
358
+ inClient
340
359
  );
341
360
  return ReactRuntime.createElement(value.t, props, ...children);
342
361
  }
343
362
  case "c": {
363
+ const ids = inClient ? [] : collectServerHtml(value.p, []);
344
364
  const { props, children } = createTreeProps(
345
365
  ReactRuntime,
346
366
  value.p,
347
367
  resolver,
348
- value.k
368
+ ids.length > 0 ? void 0 : value.k,
369
+ true
349
370
  );
350
- return ReactRuntime.createElement(
371
+ const element = ReactRuntime.createElement(
351
372
  resolver.component(value.r, value.e),
352
373
  props,
353
374
  ...children
354
375
  );
376
+ if (ids.length === 0) return element;
377
+ return ReactRuntime.createElement(
378
+ ReactRuntime.Fragment,
379
+ typeof value.k === "string" ? { key: value.k } : null,
380
+ element,
381
+ resolver.unrendered(ids)
382
+ );
355
383
  }
356
384
  case "f":
357
385
  return ReactRuntime.createElement(
358
386
  ReactRuntime.Fragment,
359
387
  typeof value.k === "string" ? { key: value.k } : null,
360
- ...createTreeChildren(ReactRuntime, value.c, resolver)
388
+ ...createTreeChildren(ReactRuntime, value.c, resolver, inClient)
361
389
  );
362
390
  case "p":
363
391
  return ReactRuntime.createElement(
@@ -367,7 +395,8 @@ function createTreeValue(ReactRuntime, value, resolver) {
367
395
  fallback: createTreeValue(
368
396
  ReactRuntime,
369
397
  value.f,
370
- resolver
398
+ resolver,
399
+ inClient
371
400
  )
372
401
  },
373
402
  ReactRuntime.createElement(getChunkComponent(ReactRuntime), {
@@ -381,13 +410,15 @@ function createTreeValue(ReactRuntime, value, resolver) {
381
410
  case "a":
382
411
  return resolver.action(value.v);
383
412
  case "P":
384
- return fulfilledThenable(createTreeValue(ReactRuntime, value.v, resolver));
413
+ return fulfilledThenable(
414
+ createTreeValue(ReactRuntime, value.v, resolver, inClient)
415
+ );
385
416
  case "o": {
386
417
  const object = value.v;
387
418
  return Object.fromEntries(
388
419
  Object.entries(object).map(([name, entry]) => [
389
420
  name,
390
- createTreeValue(ReactRuntime, entry, resolver)
421
+ createTreeValue(ReactRuntime, entry, resolver, inClient)
391
422
  ])
392
423
  );
393
424
  }
@@ -396,14 +427,14 @@ function createTreeValue(ReactRuntime, value, resolver) {
396
427
  if (!resolver.decode) throw new Error("typed props need islands mode");
397
428
  const decoded = resolver.decode(
398
429
  value,
399
- (child) => createTreeValue(ReactRuntime, child, resolver)
430
+ (child) => createTreeValue(ReactRuntime, child, resolver, inClient)
400
431
  );
401
432
  if (decoded !== FARM_NOT_A_MARKER) return decoded;
402
433
  }
403
434
  return Object.fromEntries(
404
435
  Object.entries(value).map(([name, entry]) => [
405
436
  name,
406
- createTreeValue(ReactRuntime, entry, resolver)
437
+ createTreeValue(ReactRuntime, entry, resolver, inClient)
407
438
  ])
408
439
  );
409
440
  }
@@ -493,6 +524,49 @@ async function createPayloadOnlyPage(state, payload, encode, resolver) {
493
524
  })
494
525
  );
495
526
  }
527
+ function RenderedServerHtml({
528
+ id,
529
+ rendered,
530
+ children
531
+ }) {
532
+ rendered.add(id);
533
+ return children;
534
+ }
535
+ function UnrenderedServerHtml({
536
+ ReactRuntime,
537
+ ids,
538
+ rendered,
539
+ part
540
+ }) {
541
+ const unrendered = ids.filter((id) => !rendered.has(id));
542
+ if (unrendered.length === 0) return null;
543
+ return ReactRuntime.createElement(
544
+ SERVER_HTML_TEMPLATE_TAG,
545
+ { [SERVER_HTML_ATTRIBUTE]: String(unrendered[0]) },
546
+ unrendered.map((id) => part(id, `h${id}`))
547
+ );
548
+ }
549
+ function createServerHtmlParts(state, isolate) {
550
+ const ReactRuntime = state.ReactRuntime;
551
+ const rendered = /* @__PURE__ */ new Set();
552
+ const part = (id, key) => ReactRuntime.createElement(
553
+ SERVER_HTML_TAG,
554
+ {
555
+ ...key === null ? {} : { key },
556
+ [SERVER_HTML_ATTRIBUTE]: String(id),
557
+ style: { display: "contents" }
558
+ },
559
+ isolate(state.serverHtml.get(id))
560
+ );
561
+ return {
562
+ serverHtml: (id, key) => ReactRuntime.createElement(
563
+ RenderedServerHtml,
564
+ { ...key === null ? {} : { key }, id, rendered },
565
+ part(id, null)
566
+ ),
567
+ unrendered: (ids) => ReactRuntime.createElement(UnrenderedServerHtml, { ReactRuntime, ids, rendered, part })
568
+ };
569
+ }
496
570
  async function renderFarmServerTreePage(ReactRuntime, element, options) {
497
571
  const state = {
498
572
  ReactRuntime,
@@ -558,17 +632,7 @@ async function renderFarmServerTreePage(ReactRuntime, element, options) {
558
632
  entry.chunk = chunk;
559
633
  return chunk;
560
634
  },
561
- serverHtml(id, key) {
562
- return ReactRuntime.createElement(
563
- SERVER_HTML_TAG,
564
- {
565
- ...key === null ? {} : { key },
566
- [SERVER_HTML_ATTRIBUTE]: String(id),
567
- style: { display: "contents" }
568
- },
569
- options.isolate(state.serverHtml.get(id))
570
- );
571
- },
635
+ ...createServerHtmlParts(state, options.isolate),
572
636
  action(id) {
573
637
  return state.actions.get(id);
574
638
  },
@@ -645,8 +709,19 @@ async function createFarmServerTreeElement(ReactRuntime, source, options) {
645
709
  })
646
710
  );
647
711
  const serverHtml = /* @__PURE__ */ new Map();
648
- for (const container of root.querySelectorAll(`${SERVER_HTML_TAG}[${SERVER_HTML_ATTRIBUTE}]`)) {
649
- serverHtml.set(Number(container.getAttribute(SERVER_HTML_ATTRIBUTE)), container.innerHTML);
712
+ const readParts = (parts) => {
713
+ for (const container of parts) {
714
+ if (container.localName !== SERVER_HTML_TAG) continue;
715
+ serverHtml.set(Number(container.getAttribute(SERVER_HTML_ATTRIBUTE)), container.innerHTML);
716
+ }
717
+ };
718
+ readParts(root.querySelectorAll(`${SERVER_HTML_TAG}[${SERVER_HTML_ATTRIBUTE}]`));
719
+ const templates = /* @__PURE__ */ new Map();
720
+ for (const template of root.querySelectorAll(
721
+ `${SERVER_HTML_TEMPLATE_TAG}[${SERVER_HTML_ATTRIBUTE}]`
722
+ )) {
723
+ templates.set(Number(template.getAttribute(SERVER_HTML_ATTRIBUTE)), template.innerHTML);
724
+ readParts(template.content.children);
650
725
  }
651
726
  const resolver = {
652
727
  component(reference, exportName) {
@@ -683,6 +758,15 @@ async function createFarmServerTreeElement(ReactRuntime, source, options) {
683
758
  dangerouslySetInnerHTML: { __html: html }
684
759
  });
685
760
  },
761
+ unrendered(ids) {
762
+ const id = ids.find((candidate) => templates.has(candidate));
763
+ if (id === void 0) return null;
764
+ return ReactRuntime.createElement(SERVER_HTML_TEMPLATE_TAG, {
765
+ [SERVER_HTML_ATTRIBUTE]: String(id),
766
+ suppressHydrationWarning: true,
767
+ dangerouslySetInnerHTML: { __html: templates.get(id) }
768
+ });
769
+ },
686
770
  action(id) {
687
771
  if (!options.actions) throw new Error("server action props need islands mode");
688
772
  return options.actions(id);
@@ -3,6 +3,9 @@
3
3
  var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
4
4
 
5
5
 
6
+ var _chunkBDYM2TN3cjs = require('./chunk-BDYM2TN3.cjs');
7
+
8
+
6
9
 
7
10
  var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
8
11
 
@@ -278,6 +281,16 @@ function isArrayIndex(key) {
278
281
  return Number.isInteger(value) && value >= 0 && value < 4294967295 && String(value) === key;
279
282
  }
280
283
 
284
+ // src/plugin-server-runtime.ts
285
+ function hasFarmServerRuntimePlugins(plugins) {
286
+ return (plugins || []).some((plugin) => {
287
+ if (_chunkBDYM2TN3cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
288
+ return Boolean(
289
+ plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
290
+ );
291
+ });
292
+ }
293
+
281
294
  // src/build/tailwind.ts
282
295
 
283
296
 
@@ -372,4 +385,5 @@ function createMissingTailwindPlugin() {
372
385
 
373
386
 
374
387
 
375
- exports.resolveFarmAppClientEntry = resolveFarmAppClientEntry; exports.resolveFarmClientPlugins = resolveFarmClientPlugins; exports.generateFarmClientPluginEntryCode = generateFarmClientPluginEntryCode; exports.loadTailwindVitePlugin = loadTailwindVitePlugin;
388
+
389
+ exports.resolveFarmAppClientEntry = resolveFarmAppClientEntry; exports.resolveFarmClientPlugins = resolveFarmClientPlugins; exports.generateFarmClientPluginEntryCode = generateFarmClientPluginEntryCode; exports.hasFarmServerRuntimePlugins = hasFarmServerRuntimePlugins; exports.loadTailwindVitePlugin = loadTailwindVitePlugin;
@@ -25,7 +25,7 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
25
25
 
26
26
 
27
27
 
28
- var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
28
+ var _chunkMTBDJ326cjs = require('./chunk-MTBDJ326.cjs');
29
29
 
30
30
 
31
31
  var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
@@ -785,8 +785,8 @@ async function generateFarmTypeArtifacts(options) {
785
785
  const shouldGenerateEnv = options.env !== false;
786
786
  const shouldGenerateImages = options.images !== false;
787
787
  const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access', _48 => _48.i18nConfig, 'optionalAccess', _49 => _49.enabled]);
788
- const sourceRoots = _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
789
- const appDirs = _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
788
+ const sourceRoots = _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
789
+ const appDirs = _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
790
790
  const result = {
791
791
  apiRoutes: [],
792
792
  stalePaths: []
@@ -7,7 +7,7 @@ var _chunk53EHWHT2cjs = require('./chunk-53EHWHT2.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkOB3IFUK6cjs = require('./chunk-OB3IFUK6.cjs');
10
+ var _chunk437QZIC2cjs = require('./chunk-437QZIC2.cjs');
11
11
 
12
12
 
13
13
  var _chunkRI3EVPKDcjs = require('./chunk-RI3EVPKD.cjs');
@@ -52,7 +52,7 @@ function shouldBlockUnload(options) {
52
52
  function navigateViaRouter(href, basePath, replace, options = {}) {
53
53
  if (typeof window === "undefined") return;
54
54
  const url = _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, href, basePath);
55
- const spaRouter = _chunkOB3IFUK6cjs.getInstalledFarmSPARouter.call(void 0, );
55
+ const spaRouter = _chunk437QZIC2cjs.getInstalledFarmSPARouter.call(void 0, );
56
56
  if (spaRouter) {
57
57
  void spaRouter.navigate(url, {
58
58
  replace,
@@ -72,7 +72,7 @@ function writeHistory(url, replace) {
72
72
  } else {
73
73
  window.history.pushState(null, "", url);
74
74
  }
75
- _chunkOB3IFUK6cjs.notifyHistoryChange.call(void 0, "url-search");
75
+ _chunk437QZIC2cjs.notifyHistoryChange.call(void 0, "url-search");
76
76
  }
77
77
  async function writeHistoryUnlessDelegated(url, replace) {
78
78
  const target = new URL(url, window.location.href);
@@ -105,7 +105,7 @@ function useRouter(options = {}) {
105
105
  setState(readRouterState(basePath, routeMatcher));
106
106
  };
107
107
  handlePopState();
108
- const unsubscribe = _chunkOB3IFUK6cjs.subscribeHistoryChange.call(void 0, handlePopState);
108
+ const unsubscribe = _chunk437QZIC2cjs.subscribeHistoryChange.call(void 0, handlePopState);
109
109
  return unsubscribe;
110
110
  }, [basePath, routeMatcher]);
111
111
  const push = (href, navigateOptions) => {
@@ -116,11 +116,11 @@ function useRouter(options = {}) {
116
116
  };
117
117
  const pushState = (pageState, href) => {
118
118
  if (typeof window === "undefined") return;
119
- _chunkOB3IFUK6cjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
119
+ _chunk437QZIC2cjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
120
120
  };
121
121
  const replaceState = (pageState, href) => {
122
122
  if (typeof window === "undefined") return;
123
- _chunkOB3IFUK6cjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
123
+ _chunk437QZIC2cjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
124
124
  };
125
125
  const back = () => {
126
126
  if (typeof window !== "undefined") {
@@ -143,24 +143,24 @@ function useRouter(options = {}) {
143
143
  };
144
144
  }
145
145
  function usePageState() {
146
- const [state, setState] = _react.useState.call(void 0, () => _chunkOB3IFUK6cjs.readPageState.call(void 0, ));
146
+ const [state, setState] = _react.useState.call(void 0, () => _chunk437QZIC2cjs.readPageState.call(void 0, ));
147
147
  _react.useEffect.call(void 0, () => {
148
148
  if (typeof window === "undefined") return;
149
149
  const handlePopState = () => {
150
- setState(_chunkOB3IFUK6cjs.readPageState.call(void 0, ));
150
+ setState(_chunk437QZIC2cjs.readPageState.call(void 0, ));
151
151
  };
152
152
  handlePopState();
153
- return _chunkOB3IFUK6cjs.subscribeHistoryChange.call(void 0, handlePopState);
153
+ return _chunk437QZIC2cjs.subscribeHistoryChange.call(void 0, handlePopState);
154
154
  }, []);
155
155
  return state;
156
156
  }
157
157
  function useNavigation() {
158
158
  const [state, setState] = _react.useState.call(void 0,
159
- () => _chunkOB3IFUK6cjs.getRouter.call(void 0, ).getNavigationState()
159
+ () => _chunk437QZIC2cjs.getRouter.call(void 0, ).getNavigationState()
160
160
  );
161
161
  _react.useEffect.call(void 0, () => {
162
162
  if (typeof window === "undefined") return;
163
- return _chunkOB3IFUK6cjs.getRouter.call(void 0, ).subscribeNavigation(setState);
163
+ return _chunk437QZIC2cjs.getRouter.call(void 0, ).subscribeNavigation(setState);
164
164
  }, []);
165
165
  return state;
166
166
  }
@@ -172,7 +172,7 @@ function useBlocker(options) {
172
172
  if (typeof window === "undefined" || !active) {
173
173
  return;
174
174
  }
175
- return _chunkOB3IFUK6cjs.getRouter.call(void 0, ).addBlocker(
175
+ return _chunk437QZIC2cjs.getRouter.call(void 0, ).addBlocker(
176
176
  async (context) => {
177
177
  const current = optionsRef.current;
178
178
  const when = typeof current.when === "function" ? current.when(context) : current.when;
@@ -195,7 +195,7 @@ function useScrollRestoration(key) {
195
195
  _react.useEffect.call(void 0, () => {
196
196
  const element = ref.current;
197
197
  if (!element) return;
198
- return _chunkOB3IFUK6cjs.getRouter.call(void 0, ).registerScrollElement(key, element);
198
+ return _chunk437QZIC2cjs.getRouter.call(void 0, ).registerScrollElement(key, element);
199
199
  }, [key]);
200
200
  return ref;
201
201
  }
@@ -216,7 +216,7 @@ function readRouterState(basePath, routeMatcher) {
216
216
  pathname,
217
217
  searchParams: url.searchParams,
218
218
  params: _optionalChain([routeMatcher, 'optionalAccess', _5 => _5.match, 'call', _6 => _6(routePathname), 'optionalAccess', _7 => _7.params]) || {},
219
- pageState: typeof window === "undefined" ? null : _chunkOB3IFUK6cjs.readPageState.call(void 0, )
219
+ pageState: typeof window === "undefined" ? null : _chunk437QZIC2cjs.readPageState.call(void 0, )
220
220
  };
221
221
  }
222
222
  function readCurrentUrl() {
@@ -9,6 +9,10 @@ import {
9
9
  import {
10
10
  isFarmRedirectStatus
11
11
  } from "./chunk-JNYFXL7X.mjs";
12
+ import {
13
+ applyFarmBasePath,
14
+ normalizeFarmBasePath
15
+ } from "./chunk-SF3JB56B.mjs";
12
16
 
13
17
  // src/route-rules.ts
14
18
  function normalizeRouteRules(routeRules) {
@@ -102,6 +106,20 @@ function routeRulesToNitroRouteRules(routeRules) {
102
106
  }
103
107
  return nitroRules;
104
108
  }
109
+ function nitroRouteRulesBelowBasePath(nitroRules, basePath, apiServerBasePath) {
110
+ const prefix = normalizeFarmBasePath(basePath);
111
+ if (!prefix) return nitroRules;
112
+ const isAPISource = (source) => source === apiServerBasePath || source.startsWith(`${apiServerBasePath}/`);
113
+ const rules = { ...nitroRules };
114
+ for (const [source, rule] of Object.entries(nitroRules)) {
115
+ if (isAPISource(source)) continue;
116
+ const publicSource = applyFarmBasePath(source, prefix);
117
+ if (publicSource in nitroRules) continue;
118
+ const to = rule.redirect?.to;
119
+ rules[publicSource] = typeof to === "string" && to.startsWith("/") && !to.startsWith("//") ? { ...rule, redirect: { ...rule.redirect, to: applyFarmBasePath(to, prefix) } } : rule;
120
+ }
121
+ return rules;
122
+ }
105
123
  function resolveRouteRuleCorsPreflightHeaders(routeRules, pathname) {
106
124
  if (!routeRules) return void 0;
107
125
  let cors;
@@ -151,5 +169,6 @@ export {
151
169
  routeRulesToRedirects,
152
170
  routeRulesToHeaders,
153
171
  routeRulesToNitroRouteRules,
172
+ nitroRouteRulesBelowBasePath,
154
173
  resolveRouteRuleCorsPreflightHeaders
155
174
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  _withFarmGuardedResponseCache
3
- } from "./chunk-TEG6HJVF.mjs";
3
+ } from "./chunk-JL2YW5KX.mjs";
4
4
  import {
5
5
  _markFarmOwnedResponse,
6
6
  _withFarmResponseHeaders
@@ -7,7 +7,7 @@ import {
7
7
  normalizeRouteRules,
8
8
  routeRulesToHeaders,
9
9
  routeRulesToRedirects
10
- } from "./chunk-724MGMIL.mjs";
10
+ } from "./chunk-R2ZHU37O.mjs";
11
11
  import {
12
12
  assertPluginDependencies
13
13
  } from "./chunk-XR2ZIBQK.mjs";
@@ -38,7 +38,7 @@ import {
38
38
  import {
39
39
  loadFarmConfigFile,
40
40
  resolveFarmLayers
41
- } from "./chunk-52Y3C3HG.mjs";
41
+ } from "./chunk-E7VF3LQ5.mjs";
42
42
  import {
43
43
  isFarmRendererDisabled,
44
44
  isReactRenderer,
@@ -67,10 +67,10 @@ import {
67
67
  } from "./chunk-IFR74W6S.mjs";
68
68
  import {
69
69
  bundleNodeModule
70
- } from "./chunk-VFXE6NWR.mjs";
70
+ } from "./chunk-MGKWYPE3.mjs";
71
71
  import {
72
72
  resolveWorkflowsConfig
73
- } from "./chunk-5TA63JD3.mjs";
73
+ } from "./chunk-MGZVDX4R.mjs";
74
74
  import {
75
75
  resolveFarmThemeConfig
76
76
  } from "./chunk-YWPNIYUP.mjs";
@@ -94,7 +94,7 @@ import {
94
94
  } from "./chunk-W6QLRQ3V.mjs";
95
95
  import {
96
96
  normalizeFarmDeploymentId
97
- } from "./chunk-F7JKVHU2.mjs";
97
+ } from "./chunk-NVOMQLI2.mjs";
98
98
  import {
99
99
  validateConfigRouteSource
100
100
  } from "./chunk-JZGL2PIH.mjs";
@@ -547,6 +547,12 @@ async function applyFarmDocsFrameworkAutoDetection(userConfig, options) {
547
547
 
548
548
  // src/config.ts
549
549
  var FARM_RESOLVED_CUSTOM_CONTEXT = /* @__PURE__ */ Symbol.for("farm.resolvedCustomContext");
550
+ var FARM_DEPLOY_TARGET_PRESETS = {
551
+ vercel: "vercel",
552
+ cloudflare: "cloudflare-pages",
553
+ netlify: "netlify",
554
+ node: "node-server"
555
+ };
550
556
  function resolveSchemaConfig(config) {
551
557
  if (config === void 0) return {};
552
558
  if (!config || typeof config !== "object" || Array.isArray(config)) {
@@ -583,18 +589,8 @@ function normalizeDeployTarget(target) {
583
589
  return target;
584
590
  }
585
591
  function getPresetForDeployTarget(target) {
586
- switch (normalizeDeployTarget(target)) {
587
- case "vercel":
588
- return "vercel";
589
- case "cloudflare":
590
- return "cloudflare-pages";
591
- case "netlify":
592
- return "netlify";
593
- case "node":
594
- return "node-server";
595
- default:
596
- return void 0;
597
- }
592
+ const normalized = normalizeDeployTarget(target);
593
+ return normalized && Object.prototype.hasOwnProperty.call(FARM_DEPLOY_TARGET_PRESETS, normalized) ? FARM_DEPLOY_TARGET_PRESETS[normalized] : void 0;
598
594
  }
599
595
  function getDeployTargetForPreset(preset) {
600
596
  if (!preset) return void 0;
@@ -637,8 +633,18 @@ function assertFarmDeployNameSupported(kind, name) {
637
633
  `Deploy ${kind} "vercel-edge" is not supported: Farm's Nitro version has no vercel-edge preset. Use the "vercel" ${kind} instead, which deploys Vercel Functions on Fluid compute.`
638
634
  );
639
635
  }
636
+ function assertFarmDeployTargetSupported(target) {
637
+ if (!target || getPresetForDeployTarget(target)) return;
638
+ assertFarmDeployNameSupported("target", target);
639
+ const targets = Object.keys(FARM_DEPLOY_TARGET_PRESETS).map((name) => `"${name}"`).join(", ");
640
+ throw new Error(
641
+ `Unknown deploy target "${String(target)}". Farm's deploy targets are ${targets}. To build with another Nitro preset, set deploy.preset instead.`
642
+ );
643
+ }
640
644
  function resolveDeployConfig(config, overrides = {}) {
641
645
  const deploy = config.deploy || {};
646
+ assertFarmDeployTargetSupported(deploy.target);
647
+ assertFarmDeployTargetSupported(overrides.target);
642
648
  const distDir = config.distDir || ".farm";
643
649
  const overrideTarget = normalizeDeployTarget(overrides.target);
644
650
  let target = overrideTarget ? overrideTarget : overrides.preset ? getDeployTargetForPreset(overrides.preset) : normalizeDeployTarget(deploy.target);
@@ -662,7 +668,6 @@ function resolveDeployConfig(config, overrides = {}) {
662
668
  const preset = overrides.preset || overrideTargetPreset || configuredPreset || getPresetForDeployTarget(target) || "node-server";
663
669
  const resolvedTarget = target || getDeployTargetForPreset(preset);
664
670
  assertFarmDeployNameSupported("preset", preset);
665
- assertFarmDeployNameSupported("target", resolvedTarget);
666
671
  if (detectedTarget && resolvedTarget !== detectedTarget) {
667
672
  const mismatchKey = `mismatch:${resolvedTarget}:${detectedTarget}`;
668
673
  if (!warnedPlatformMismatches.has(mismatchKey)) {
@@ -1223,7 +1228,7 @@ async function resolveConfig(userConfig, mode) {
1223
1228
  };
1224
1229
  assertPluginDependencies(resolved.plugins, resolved.integrations);
1225
1230
  if (nativeServerFnPlugin) {
1226
- nativeServerFnAppDirs = (await import("./layers-T55SA47E.mjs")).getFarmAppDirectories(resolved);
1231
+ nativeServerFnAppDirs = (await import("./layers-XQ7VFMWO.mjs")).getFarmAppDirectories(resolved);
1227
1232
  }
1228
1233
  return resolved;
1229
1234
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkLPIZMU7Dcjs = require('./chunk-LPIZMU7D.cjs');
3
+ var _chunkGQ6QOH7Tcjs = require('./chunk-GQ6QOH7T.cjs');
4
4
 
5
5
 
6
6
  var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
@@ -273,7 +273,7 @@ function requestEvent(metadata, method, status, durationMs) {
273
273
  id: uuid(),
274
274
  requestId: metadata.id,
275
275
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
276
- route: routeTemplate(_chunkLPIZMU7Dcjs.getFarmRouteLabel.call(void 0, metadata.route)),
276
+ route: routeTemplate(_chunkGQ6QOH7Tcjs.getFarmRouteLabel.call(void 0, metadata.route)),
277
277
  agent: metadata.agent,
278
278
  kind: "request",
279
279
  method,
@@ -286,7 +286,7 @@ function toolEvent(metadata, event) {
286
286
  id: uuid(),
287
287
  requestId: metadata.id,
288
288
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
289
- route: routeTemplate(_chunkLPIZMU7Dcjs.getFarmRouteLabel.call(void 0, metadata.route)),
289
+ route: routeTemplate(_chunkGQ6QOH7Tcjs.getFarmRouteLabel.call(void 0, metadata.route)),
290
290
  agent: metadata.agent,
291
291
  kind: "mcp.tool",
292
292
  tool: event.tool,