@farm.js/core 0.1.48 → 0.1.50

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 (322) hide show
  1. package/dist/{agent-mcp-DAjB8Eyu.d.ts → agent-mcp-9BMbRgg_.d.ts} +1 -1
  2. package/dist/{agent-mcp-CXN3g0eX.d.mts → agent-mcp-CIMH324y.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +3 -3
  4. package/dist/agent-runtime.d.mts +6 -6
  5. package/dist/agent-runtime.d.ts +6 -6
  6. package/dist/agent-runtime.mjs +2 -2
  7. package/dist/analyzer-CN7C74WX.cjs +1066 -0
  8. package/dist/analyzer-DDW34OMC.mjs +1066 -0
  9. package/dist/api/client.d.mts +0 -1
  10. package/dist/api/client.d.ts +0 -1
  11. package/dist/api/route-manager.cjs +5 -5
  12. package/dist/api/route-manager.d.mts +10 -10
  13. package/dist/api/route-manager.d.ts +10 -10
  14. package/dist/api/route-manager.mjs +4 -4
  15. package/dist/api/runtime.cjs +3 -3
  16. package/dist/api/runtime.d.mts +7 -7
  17. package/dist/api/runtime.d.ts +7 -7
  18. package/dist/api/runtime.mjs +2 -2
  19. package/dist/api.cjs +6 -6
  20. package/dist/api.d.mts +10 -10
  21. package/dist/api.d.ts +10 -10
  22. package/dist/api.mjs +5 -5
  23. package/dist/{app-VK9sHDn5.d.ts → app-BWibTHVT.d.ts} +7 -7
  24. package/dist/{app-DytgRPjJ.d.mts → app-DVJ13FPA.d.mts} +7 -7
  25. package/dist/{app-manifest-DPgW5ke5.d.mts → app-manifest-CQDJOKL2.d.mts} +1 -1
  26. package/dist/{app-manifest-BUu7YGAx.d.ts → app-manifest-D0kaXdwu.d.ts} +1 -1
  27. package/dist/app-markdown.d.mts +7 -7
  28. package/dist/app-markdown.d.ts +7 -7
  29. package/dist/cache.d.mts +4 -3
  30. package/dist/cache.d.ts +4 -3
  31. package/dist/{chunk-VJXLUTBM.mjs → chunk-2DEPNLXK.mjs} +7 -7
  32. package/dist/chunk-2G63BIRL.mjs +227 -0
  33. package/dist/chunk-2GLQSIZD.mjs +55 -0
  34. package/dist/{chunk-HRLYO2XJ.mjs → chunk-2VCC3GVC.mjs} +1 -1
  35. package/dist/chunk-3ATXWZPH.cjs +227 -0
  36. package/dist/{chunk-YSPMY4B7.cjs → chunk-474FO3UE.cjs} +233 -157
  37. package/dist/{chunk-QNQEK3OF.cjs → chunk-4T25YCZ5.cjs} +14 -14
  38. package/dist/{chunk-ATHPRVP2.mjs → chunk-5V4KZOZO.mjs} +1 -1
  39. package/dist/{chunk-FGJQS4EC.cjs → chunk-6QA2SXVH.cjs} +2 -2
  40. package/dist/{chunk-XLYXG73A.mjs → chunk-75WWOZ5C.mjs} +22 -0
  41. package/dist/{chunk-QFQDRJKJ.mjs → chunk-76R5GJER.mjs} +2 -2
  42. package/dist/{chunk-NG44F7AH.mjs → chunk-7ONZDKVY.mjs} +2 -2
  43. package/dist/{chunk-MZZA6ZQV.mjs → chunk-7PZVXMWG.mjs} +4 -4
  44. package/dist/{chunk-4IICUBQX.cjs → chunk-A5BJKSZE.cjs} +2 -2
  45. package/dist/{chunk-TTYXOAB7.mjs → chunk-ANHZ6SUL.mjs} +1 -1
  46. package/dist/{chunk-ZBS3GOQZ.cjs → chunk-AQLHD6HZ.cjs} +35 -61
  47. package/dist/{chunk-Q2ZKQ6GD.cjs → chunk-B5S2JS6M.cjs} +127 -125
  48. package/dist/{chunk-AXRNEVCS.cjs → chunk-B6PREBN6.cjs} +8 -8
  49. package/dist/{chunk-JOHXK4BB.mjs → chunk-BW6SCVYX.mjs} +1 -1
  50. package/dist/{chunk-LZBM35DH.mjs → chunk-C73RIAEF.mjs} +4 -4
  51. package/dist/chunk-CGCJ2TJU.cjs +55 -0
  52. package/dist/{chunk-UYQOIPXE.mjs → chunk-CPXDDWGL.mjs} +1 -1
  53. package/dist/{chunk-JPAVNDZH.cjs → chunk-CY7H5KS4.cjs} +25 -25
  54. package/dist/{chunk-4S7M63WX.cjs → chunk-DGOLAZLV.cjs} +22 -1
  55. package/dist/{chunk-73XBJRZW.cjs → chunk-E2BMCNMJ.cjs} +2 -2
  56. package/dist/{chunk-WUEDTW6E.cjs → chunk-F5LERVY3.cjs} +23 -5
  57. package/dist/{chunk-A7DK663W.cjs → chunk-FACTMUPI.cjs} +27 -27
  58. package/dist/chunk-G2KTRMWA.mjs +40 -0
  59. package/dist/{chunk-C6U66WWF.mjs → chunk-GFT5AHAT.mjs} +13 -0
  60. package/dist/{chunk-ZGS3ZDF7.cjs → chunk-GOOK2J2W.cjs} +7 -7
  61. package/dist/{chunk-NW2BKDVT.mjs → chunk-HHFMECFO.mjs} +1 -1
  62. package/dist/{chunk-6M3HXUBQ.mjs → chunk-HWCHIBJZ.mjs} +21 -3
  63. package/dist/{chunk-HUL4LTC6.cjs → chunk-HYN3LLG7.cjs} +63 -20
  64. package/dist/{chunk-HELQXYVI.cjs → chunk-I2DQGS56.cjs} +11 -9
  65. package/dist/{chunk-SSNN55Q6.cjs → chunk-IQXGHGZF.cjs} +5 -5
  66. package/dist/{chunk-ZSIGEHSE.cjs → chunk-IUBDMDZZ.cjs} +21 -180
  67. package/dist/{chunk-TQWGOQ7O.mjs → chunk-IWJKJDNW.mjs} +116 -40
  68. package/dist/{chunk-NRFUVDTH.mjs → chunk-JJOWY3XD.mjs} +2 -2
  69. package/dist/{chunk-6XFGJBYX.cjs → chunk-JYNNIGQO.cjs} +16 -7
  70. package/dist/{chunk-XO6WL6NL.mjs → chunk-KGP76FSV.mjs} +1 -1
  71. package/dist/{chunk-GXSMF7UR.mjs → chunk-KO2NWUKN.mjs} +1 -1
  72. package/dist/{chunk-VDLF2DJA.cjs → chunk-KZH6YLND.cjs} +375 -162
  73. package/dist/{chunk-5566GNEG.cjs → chunk-LIFUPCXW.cjs} +13 -0
  74. package/dist/{chunk-I2SWKWO7.mjs → chunk-LJDIFIJ2.mjs} +1 -1
  75. package/dist/{chunk-KZT2VHRQ.cjs → chunk-LYWAGXXW.cjs} +11 -11
  76. package/dist/{chunk-N6SIQJEJ.mjs → chunk-M7LKA632.mjs} +54 -11
  77. package/dist/{chunk-6LH33DLL.cjs → chunk-NJVFPJ2Y.cjs} +2 -2
  78. package/dist/{chunk-JWP56HCP.mjs → chunk-OD6WM3I7.mjs} +2 -2
  79. package/dist/{chunk-MJ6IC4K2.mjs → chunk-OTOOJIUB.mjs} +1 -1
  80. package/dist/{chunk-TFA6BUAE.cjs → chunk-OY5XDG24.cjs} +4 -4
  81. package/dist/{chunk-R2SEZEBC.cjs → chunk-OYNNA4DD.cjs} +4 -4
  82. package/dist/{chunk-GBPDSUFE.mjs → chunk-OZK2DS44.mjs} +1 -1
  83. package/dist/chunk-QXJADAQB.cjs +40 -0
  84. package/dist/{chunk-JLS6ZLFM.cjs → chunk-RHOR2J6V.cjs} +1 -1
  85. package/dist/{chunk-YQGZLCT4.cjs → chunk-RWT2BTJT.cjs} +6 -6
  86. package/dist/{chunk-3HBFI373.cjs → chunk-S5AQ7CAC.cjs} +14 -14
  87. package/dist/{chunk-HNAUK3SC.mjs → chunk-SHJJM6OG.mjs} +40 -199
  88. package/dist/{chunk-LL7TDMOM.mjs → chunk-SMUW7UST.mjs} +33 -59
  89. package/dist/{chunk-VCFBQFOV.mjs → chunk-SN5VSO3Q.mjs} +9 -7
  90. package/dist/{chunk-DM3TFCC2.cjs → chunk-SUV6YO4Q.cjs} +5 -5
  91. package/dist/{chunk-JUMPFVMK.mjs → chunk-TUOO6IK3.mjs} +9 -0
  92. package/dist/chunk-UB7RVEMX.mjs +73 -0
  93. package/dist/{chunk-CDTIXBKN.mjs → chunk-UN6N623E.mjs} +2 -2
  94. package/dist/{chunk-BEXYFR2R.cjs → chunk-UY6HS5PF.cjs} +2 -2
  95. package/dist/{chunk-HAH4FBTA.mjs → chunk-VAHBCI6X.mjs} +1 -1
  96. package/dist/{chunk-C2R5RVLA.cjs → chunk-VCKGOXFI.cjs} +73 -1
  97. package/dist/{chunk-N25RPPO5.cjs → chunk-WAPQWAE6.cjs} +10 -10
  98. package/dist/{chunk-NE33FRQ5.mjs → chunk-WVBUXNBX.mjs} +274 -61
  99. package/dist/{chunk-ALD2WMLA.mjs → chunk-WXHDVXJE.mjs} +2 -2
  100. package/dist/{chunk-EVCQX243.cjs → chunk-X2EL3BLH.cjs} +2 -2
  101. package/dist/{chunk-EA5PMJDU.mjs → chunk-X3HOVNHI.mjs} +1 -1
  102. package/dist/{chunk-XXB37YET.cjs → chunk-XLRLSTJ6.cjs} +7 -7
  103. package/dist/{chunk-DRFADSKY.mjs → chunk-XXXRRVY6.mjs} +4 -4
  104. package/dist/{chunk-EXHEPWFJ.cjs → chunk-YAXOEAND.cjs} +10 -10
  105. package/dist/{chunk-PEHL3IZL.cjs → chunk-YB44NKC2.cjs} +2 -2
  106. package/dist/chunk-YKHRCY4T.cjs +73 -0
  107. package/dist/{chunk-NIPKC4DA.mjs → chunk-ZIBIE7AH.mjs} +72 -0
  108. package/dist/{chunk-N7SPZJLY.mjs → chunk-ZLOQQ2UF.mjs} +33 -31
  109. package/dist/client/lifecycle.d.mts +1 -1
  110. package/dist/client/lifecycle.d.ts +1 -1
  111. package/dist/{client-plugins-DqjCsKMN.d.ts → client-plugins-BPfltM5m.d.ts} +19 -10
  112. package/dist/{client-plugins-BlEzV5FO.d.mts → client-plugins-D4RO59f0.d.mts} +19 -10
  113. package/dist/client-plugins.d.mts +6 -6
  114. package/dist/client-plugins.d.ts +6 -6
  115. package/dist/client.cjs +11 -8
  116. package/dist/client.d.mts +11 -10
  117. package/dist/client.d.ts +11 -10
  118. package/dist/client.mjs +12 -9
  119. package/dist/client.react-server.mjs +1 -1
  120. package/dist/config-CnhyvvmT.d.mts +188 -0
  121. package/dist/config-CnhyvvmT.d.ts +188 -0
  122. package/dist/config.d.mts +6 -6
  123. package/dist/config.d.ts +6 -6
  124. package/dist/desktop.d.mts +7 -7
  125. package/dist/desktop.d.ts +7 -7
  126. package/dist/{dev-guard-MPZUJFIV.mjs → dev-guard-4PFQNXQX.mjs} +4 -2
  127. package/dist/{dev-guard-4NQ3LFO5.cjs → dev-guard-YLO5DE3H.cjs} +7 -5
  128. package/dist/{devtools-A37WWJZL.cjs → devtools-N5XTOECL.cjs} +8 -8
  129. package/dist/{devtools-BLKHPY3C.mjs → devtools-STG7HPRV.mjs} +7 -7
  130. package/dist/docs.cjs +10 -10
  131. package/dist/docs.d.mts +7 -7
  132. package/dist/docs.d.ts +7 -7
  133. package/dist/docs.mjs +9 -9
  134. package/dist/environment/vite.d.mts +1 -1
  135. package/dist/environment/vite.d.ts +1 -1
  136. package/dist/generate-route-types-DQP0cUzk.d.ts +33 -0
  137. package/dist/generate-route-types-TF5Wwtvz.d.mts +33 -0
  138. package/dist/i18n/client.d.mts +2 -2
  139. package/dist/i18n/client.d.ts +2 -2
  140. package/dist/i18n/index.d.mts +3 -3
  141. package/dist/i18n/index.d.ts +3 -3
  142. package/dist/i18n/server.d.mts +5 -5
  143. package/dist/i18n/server.d.ts +5 -5
  144. package/dist/image/server.cjs +3 -3
  145. package/dist/image/server.mjs +2 -2
  146. package/dist/image/sharp.cjs +10 -10
  147. package/dist/image/sharp.mjs +2 -2
  148. package/dist/{index-CMigAr9f.d.mts → index-C-N3Pwg-.d.ts} +2 -2
  149. package/dist/{index-MocnSP3a.d.ts → index-D3l4tREW.d.ts} +2 -2
  150. package/dist/{index-Cl3akY5U.d.mts → index-DPUAPho_.d.mts} +2 -2
  151. package/dist/{index-n3hjOvVC.d.ts → index-k8o8eUOd.d.mts} +2 -2
  152. package/dist/index.cjs +73 -66
  153. package/dist/index.d.mts +29 -45
  154. package/dist/index.d.ts +29 -45
  155. package/dist/index.mjs +78 -71
  156. package/dist/integrations.cjs +3 -3
  157. package/dist/integrations.d.mts +6 -6
  158. package/dist/integrations.d.ts +6 -6
  159. package/dist/integrations.mjs +2 -2
  160. package/dist/internal/app-markdown-runtime.d.mts +7 -7
  161. package/dist/internal/app-markdown-runtime.d.ts +7 -7
  162. package/dist/internal/build-runtime.cjs +36 -32
  163. package/dist/internal/build-runtime.d.mts +9 -9
  164. package/dist/internal/build-runtime.d.ts +9 -9
  165. package/dist/internal/build-runtime.mjs +35 -31
  166. package/dist/internal/cli-runtime.cjs +16 -15
  167. package/dist/internal/cli-runtime.mjs +16 -15
  168. package/dist/internal/client-error-overlay.cjs +4 -4
  169. package/dist/internal/client-error-overlay.mjs +1 -1
  170. package/dist/internal/client-runtime.cjs +19 -2
  171. package/dist/internal/client-runtime.d.mts +45 -3
  172. package/dist/internal/client-runtime.d.ts +45 -3
  173. package/dist/internal/client-runtime.mjs +19 -2
  174. package/dist/internal/compression-runtime.d.mts +6 -6
  175. package/dist/internal/compression-runtime.d.ts +6 -6
  176. package/dist/internal/config-runtime.cjs +17 -10
  177. package/dist/internal/config-runtime.d.mts +259 -18
  178. package/dist/internal/config-runtime.d.ts +259 -18
  179. package/dist/internal/config-runtime.mjs +15 -8
  180. package/dist/internal/desktop-guard.cjs +2 -2
  181. package/dist/internal/desktop-guard.d.mts +7 -0
  182. package/dist/internal/desktop-guard.d.ts +7 -0
  183. package/dist/internal/desktop-guard.mjs +1 -1
  184. package/dist/internal/form-actions.cjs +4 -4
  185. package/dist/internal/form-actions.mjs +3 -3
  186. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  187. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  188. package/dist/internal/islands-runtime.cjs +4 -1
  189. package/dist/internal/islands-runtime.d.mts +9 -12
  190. package/dist/internal/islands-runtime.d.ts +9 -12
  191. package/dist/internal/islands-runtime.mjs +5 -2
  192. package/dist/internal/metadata-image-runtime.cjs +3 -3
  193. package/dist/internal/metadata-image-runtime.mjs +2 -2
  194. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  195. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  196. package/dist/internal/production-runtime.cjs +13 -13
  197. package/dist/internal/production-runtime.d.mts +19 -19
  198. package/dist/internal/production-runtime.d.ts +19 -19
  199. package/dist/internal/production-runtime.mjs +15 -15
  200. package/dist/{layers-D9fbe-rz.d.ts → layers-CcS42OGR.d.mts} +1 -1
  201. package/dist/{layers-D9fbe-rz.d.mts → layers-CcS42OGR.d.ts} +1 -1
  202. package/dist/{lifecycle-DK06VuKP.d.ts → lifecycle-C2aLBOwu.d.mts} +1 -1
  203. package/dist/{lifecycle-DK06VuKP.d.mts → lifecycle-C2aLBOwu.d.ts} +1 -1
  204. package/dist/markdown.d.mts +6 -6
  205. package/dist/markdown.d.ts +6 -6
  206. package/dist/middleware.cjs +7 -7
  207. package/dist/middleware.d.mts +8 -8
  208. package/dist/middleware.d.ts +8 -8
  209. package/dist/middleware.mjs +6 -6
  210. package/dist/mobile.cjs +9 -0
  211. package/dist/mobile.d.mts +67 -0
  212. package/dist/mobile.d.ts +67 -0
  213. package/dist/mobile.mjs +9 -0
  214. package/dist/navigation-delegate-8xg3Zvp4.d.ts +29 -0
  215. package/dist/navigation-delegate-ji6elCKy.d.mts +29 -0
  216. package/dist/navigation.cjs +5 -5
  217. package/dist/navigation.d.mts +9 -9
  218. package/dist/navigation.d.ts +9 -9
  219. package/dist/navigation.mjs +4 -4
  220. package/dist/{nitro-UT2J5A5D.mjs → nitro-2Q5NVY7L.mjs} +2 -2
  221. package/dist/{nitro-BIXIKJZS.cjs → nitro-YPSZBYDK.cjs} +3 -3
  222. package/dist/platform.cjs +2 -1
  223. package/dist/platform.d.mts +4 -3
  224. package/dist/platform.d.ts +4 -3
  225. package/dist/platform.mjs +2 -1
  226. package/dist/{plugin-4KYXV7BB.mjs → plugin-53SY5YBS.mjs} +1 -1
  227. package/dist/{plugin-WBANOZQM.cjs → plugin-HZIBL3DW.cjs} +2 -2
  228. package/dist/plugin.cjs +31 -29
  229. package/dist/plugin.d.mts +13 -8
  230. package/dist/plugin.d.ts +13 -8
  231. package/dist/plugin.mjs +30 -28
  232. package/dist/{production-runtime-bWZJMcQb.d.mts → production-runtime-DXnQQkQf.d.mts} +3 -3
  233. package/dist/{production-runtime-YVDGYWBG.d.ts → production-runtime-TdKaYRj0.d.ts} +3 -3
  234. package/dist/production-vite-BQFAlG7n.d.mts +13 -0
  235. package/dist/production-vite-BQFAlG7n.d.ts +13 -0
  236. package/dist/{programmatic-routes-client-DviwGeAv.d.ts → programmatic-routes-client-BwiTndEC.d.ts} +2 -2
  237. package/dist/{programmatic-routes-client-BFKOTEXN.d.mts → programmatic-routes-client-Dh1SDLSM.d.mts} +2 -2
  238. package/dist/query/client.cjs +6 -6
  239. package/dist/query/client.mjs +2 -2
  240. package/dist/{render-plan-DqWXo3-B.d.ts → render-plan-BPbwRbuN.d.ts} +1 -1
  241. package/dist/{render-plan-CS8l0zaK.d.mts → render-plan-BvCGXF6K.d.mts} +1 -1
  242. package/dist/renderer-client.cjs +9 -6
  243. package/dist/renderer-client.d.mts +9 -8
  244. package/dist/renderer-client.d.ts +9 -8
  245. package/dist/renderer-client.mjs +6 -3
  246. package/dist/{request-CBrHpaCC.d.ts → request-B8PGTZNR.d.ts} +1 -1
  247. package/dist/{request-D4XqmnJF.d.mts → request-C_xTkJib.d.mts} +1 -1
  248. package/dist/request.d.mts +7 -7
  249. package/dist/request.d.ts +7 -7
  250. package/dist/{resolver-DC57A4vz.d.ts → resolver-CJ-D9nP-.d.ts} +1 -1
  251. package/dist/{resolver-C2G-3Tm6.d.mts → resolver-TDyZKgKI.d.mts} +1 -1
  252. package/dist/{route-rendering-3pRPtyO2.d.mts → route-rendering-DlddURL1.d.mts} +1 -1
  253. package/dist/{route-rendering-Bltnu8a3.d.ts → route-rendering-RNtcj607.d.ts} +1 -1
  254. package/dist/{router-BFSmKGtI.d.mts → router-B97eB0Mq.d.mts} +1 -1
  255. package/dist/{router-DDT7bkg7.d.ts → router-qUVaoEN8.d.ts} +1 -1
  256. package/dist/routes-8PT9cl60.d.ts +121 -0
  257. package/dist/routes-kEUsXHx3.d.mts +121 -0
  258. package/dist/routes.d.mts +6 -6
  259. package/dist/routes.d.ts +6 -6
  260. package/dist/{rsc-pipeline-4KOITP64.cjs → rsc-pipeline-L4XOZ2TE.cjs} +13 -10
  261. package/dist/{rsc-pipeline-ULFIB3UT.mjs → rsc-pipeline-T3775JUA.mjs} +12 -9
  262. package/dist/runtime-BIBGJO7V.cjs +1005 -0
  263. package/dist/{runtime-B9HmxiZc.d.ts → runtime-C4CmlOOh.d.ts} +2 -2
  264. package/dist/{runtime-C6yG64je.d.ts → runtime-C8GUnNeP.d.ts} +1 -1
  265. package/dist/{runtime-Cpylaypt.d.mts → runtime-CaDswfWi.d.mts} +1 -1
  266. package/dist/{runtime-CCxTmGuf.d.mts → runtime-CihDZ2Rn.d.mts} +2 -2
  267. package/dist/runtime-HRSFC4ZC.mjs +1005 -0
  268. package/dist/{schema-dev-notice-O3I5HLXK.mjs → schema-dev-notice-LZ5NXGLN.mjs} +2 -2
  269. package/dist/{schema-dev-notice-Z73J3NJ6.cjs → schema-dev-notice-XV7GZ3QJ.cjs} +4 -4
  270. package/dist/server-action-security.cjs +3 -3
  271. package/dist/server-action-security.mjs +2 -2
  272. package/dist/server-fn-client.d.mts +0 -1
  273. package/dist/server-fn-client.d.ts +0 -1
  274. package/dist/server-fn.cjs +4 -4
  275. package/dist/server-fn.d.mts +0 -1
  276. package/dist/server-fn.d.ts +0 -1
  277. package/dist/server-fn.mjs +3 -3
  278. package/dist/server-plugins.cjs +1 -1
  279. package/dist/server-plugins.d.mts +7 -7
  280. package/dist/server-plugins.d.ts +7 -7
  281. package/dist/server-plugins.mjs +1 -1
  282. package/dist/server-query-client.d.mts +0 -1
  283. package/dist/server-query-client.d.ts +0 -1
  284. package/dist/server-query.cjs +5 -5
  285. package/dist/server-query.d.mts +0 -1
  286. package/dist/server-query.d.ts +0 -1
  287. package/dist/server-query.mjs +4 -4
  288. package/dist/server.cjs +89 -66
  289. package/dist/server.d.mts +22 -17
  290. package/dist/server.d.ts +22 -17
  291. package/dist/server.mjs +64 -41
  292. package/dist/{spa-router-CkTPnA4L.d.mts → spa-router-Dlv5ofg0.d.mts} +4 -4
  293. package/dist/{spa-router-CKuS81mi.d.ts → spa-router-qapSboKz.d.ts} +4 -4
  294. package/dist/testing.cjs +7 -7
  295. package/dist/testing.d.mts +6 -6
  296. package/dist/testing.d.ts +6 -6
  297. package/dist/testing.mjs +5 -5
  298. package/dist/{types--Wh02r5_.d.mts → types-C41ePjvP.d.mts} +1 -1
  299. package/dist/{types--Wh02r5_.d.ts → types-C41ePjvP.d.ts} +1 -1
  300. package/dist/{utils-C0ORLYXc.d.ts → utils-A-cYF81u.d.ts} +1 -1
  301. package/dist/{utils-IA9wVkef.d.mts → utils-DyvlSxFk.d.mts} +1 -1
  302. package/dist/version.cjs +2 -2
  303. package/dist/version.mjs +1 -1
  304. package/dist/vite.cjs +31 -29
  305. package/dist/vite.d.mts +9 -9
  306. package/dist/vite.d.ts +9 -9
  307. package/dist/vite.mjs +30 -28
  308. package/dist/{workflows-Df1C_7OG.d.mts → workflows-CRMzQZ3k.d.mts} +2 -1
  309. package/dist/{workflows-Df1C_7OG.d.ts → workflows-CRMzQZ3k.d.ts} +2 -1
  310. package/dist/workflows.cjs +3 -3
  311. package/dist/workflows.d.mts +1 -1
  312. package/dist/workflows.d.ts +1 -1
  313. package/dist/workflows.mjs +2 -2
  314. package/package.json +10 -2
  315. package/dist/cache-invalidation-BD0z_lfu.d.mts +0 -4
  316. package/dist/cache-invalidation-BD0z_lfu.d.ts +0 -4
  317. package/dist/chunk-45EUIICW.mjs +0 -15
  318. package/dist/chunk-V7KTQR4C.cjs +0 -15
  319. package/dist/{chunk-BR5FSKZ5.cjs → chunk-EQWWOQTK.cjs} +0 -0
  320. package/dist/{chunk-5OJVKXFV.cjs → chunk-N7JQXQAV.cjs} +2 -2
  321. package/dist/{chunk-VR4SEDEM.mjs → chunk-VOZ5DI7D.mjs} +0 -0
  322. package/dist/{chunk-72KABRWN.mjs → chunk-WSDKXV4E.mjs} +4 -4
@@ -17,7 +17,7 @@ import {
17
17
  matchAPIRouteAtBasePath,
18
18
  mergePluginAPIRoutes,
19
19
  resolveAPIRouteEndpoint
20
- } from "./chunk-I2SWKWO7.mjs";
20
+ } from "./chunk-LJDIFIJ2.mjs";
21
21
  import {
22
22
  registerAPIRouteShape
23
23
  } from "./chunk-GWXZS7K5.mjs";
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-VHIXGZYH.mjs";
34
34
  import {
35
35
  loadFarmDevModule
36
- } from "./chunk-JUMPFVMK.mjs";
36
+ } from "./chunk-TUOO6IK3.mjs";
37
37
  import {
38
38
  logger
39
39
  } from "./chunk-2SVJGOAX.mjs";
@@ -21,7 +21,7 @@ var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
21
21
  var _chunkWJFFPXCVcjs = require('./chunk-WJFFPXCV.cjs');
22
22
 
23
23
 
24
- var _chunk5566GNEGcjs = require('./chunk-5566GNEG.cjs');
24
+ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
25
25
 
26
26
  // src/docs/handler.ts
27
27
 
@@ -1834,7 +1834,7 @@ function createFarmDocsHandler(docs, options) {
1834
1834
  ETag: etag,
1835
1835
  "X-Content-Type-Options": "nosniff"
1836
1836
  });
1837
- if (_chunk5566GNEGcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
1837
+ if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
1838
1838
  return new Response(null, { status: 304, headers });
1839
1839
  }
1840
1840
  if (request.method === "HEAD") return new Response(null, { status: 200, headers });
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-VHIXGZYH.mjs";
25
25
  import {
26
26
  loadFarmDevModule
27
- } from "./chunk-JUMPFVMK.mjs";
27
+ } from "./chunk-TUOO6IK3.mjs";
28
28
  import {
29
29
  logger
30
30
  } from "./chunk-2SVJGOAX.mjs";
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk3HBFI373cjs = require('./chunk-3HBFI373.cjs');
3
+ var _chunkS5AQ7CACcjs = require('./chunk-S5AQ7CAC.cjs');
4
4
 
5
5
 
6
- var _chunkHELQXYVIcjs = require('./chunk-HELQXYVI.cjs');
6
+ var _chunkI2DQGS56cjs = require('./chunk-I2DQGS56.cjs');
7
7
 
8
8
 
9
9
  var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
10
10
 
11
11
  // src/navigation.ts
12
12
  function useRouter2() {
13
- const router = _chunk3HBFI373cjs.useRouter.call(void 0, );
13
+ const router = _chunkS5AQ7CACcjs.useRouter.call(void 0, );
14
14
  return {
15
15
  push: router.push,
16
16
  replace: router.replace,
@@ -18,19 +18,19 @@ function useRouter2() {
18
18
  forward: router.forward,
19
19
  refresh() {
20
20
  if (typeof window === "undefined") return Promise.resolve();
21
- return _chunkHELQXYVIcjs.getRouter.call(void 0, ).refresh();
21
+ return _chunkI2DQGS56cjs.getRouter.call(void 0, ).refresh();
22
22
  },
23
23
  prefetch(href) {
24
24
  if (typeof window === "undefined") return Promise.resolve();
25
- return _chunkHELQXYVIcjs.getRouter.call(void 0, ).prefetch(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, href));
25
+ return _chunkI2DQGS56cjs.getRouter.call(void 0, ).prefetch(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, href));
26
26
  }
27
27
  };
28
28
  }
29
29
  function usePathname() {
30
- return _chunk3HBFI373cjs.useRouter.call(void 0, ).pathname;
30
+ return _chunkS5AQ7CACcjs.useRouter.call(void 0, ).pathname;
31
31
  }
32
32
  function useSearchParams() {
33
- return _chunk3HBFI373cjs.useRouter.call(void 0, ).searchParams;
33
+ return _chunkS5AQ7CACcjs.useRouter.call(void 0, ).searchParams;
34
34
  }
35
35
 
36
36
 
@@ -17,18 +17,18 @@ import {
17
17
  } from "./chunk-2DA7CLY7.mjs";
18
18
  import {
19
19
  withFarmRequestClientAddress
20
- } from "./chunk-C6U66WWF.mjs";
20
+ } from "./chunk-GFT5AHAT.mjs";
21
21
  import {
22
22
  createFarmAPIMiddlewarePathnames
23
23
  } from "./chunk-LM2YOGDK.mjs";
24
- import {
25
- _withFarmResponseHeaders
26
- } from "./chunk-LM55GS4R.mjs";
27
24
  import {
28
25
  getFarmRedirectError,
29
26
  isFarmNotFoundError,
30
27
  isFarmRedirectError
31
28
  } from "./chunk-JNYFXL7X.mjs";
29
+ import {
30
+ _withFarmResponseHeaders
31
+ } from "./chunk-LM55GS4R.mjs";
32
32
  import {
33
33
  stripFarmLocaleFromPathname
34
34
  } from "./chunk-7S7AAK2D.mjs";
@@ -17,7 +17,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
17
17
 
18
18
 
19
19
 
20
- var _chunkR2SEZEBCcjs = require('./chunk-R2SEZEBC.cjs');
20
+ var _chunkOYNNA4DDcjs = require('./chunk-OYNNA4DD.cjs');
21
21
 
22
22
 
23
23
  var _chunkJXIYH2NOcjs = require('./chunk-JXIYH2NO.cjs');
@@ -33,7 +33,7 @@ var _chunkOYZXVBZPcjs = require('./chunk-OYZXVBZP.cjs');
33
33
  var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
34
34
 
35
35
 
36
- var _chunk6XFGJBYXcjs = require('./chunk-6XFGJBYX.cjs');
36
+ var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
37
37
 
38
38
 
39
39
  var _chunkXN2MB4QZcjs = require('./chunk-XN2MB4QZ.cjs');
@@ -99,7 +99,7 @@ var APIRouteManager = class {
99
99
  await this.loadProgrammaticApiRoutes(appDir);
100
100
  }
101
101
  this.routes = new Map(
102
- _chunkR2SEZEBCcjs.mergePluginAPIRoutes.call(void 0, [...this.routes.values()], this.plugins, void 0, {
102
+ _chunkOYNNA4DDcjs.mergePluginAPIRoutes.call(void 0, [...this.routes.values()], this.plugins, void 0, {
103
103
  bodySizeLimit: this.bodySizeLimit,
104
104
  dispatch: this.dispatch
105
105
  }).map((route) => [route.path, route])
@@ -147,7 +147,7 @@ var APIRouteManager = class {
147
147
  const routeModule = await this.loadModule(filePath);
148
148
  const endpoints = {};
149
149
  const availableMethods = [];
150
- for (const method of _chunkR2SEZEBCcjs.API_ROUTE_METHODS) {
150
+ for (const method of _chunkOYNNA4DDcjs.API_ROUTE_METHODS) {
151
151
  if (routeModule[method]) {
152
152
  endpoints[method] = routeModule[method];
153
153
  availableMethods.push(method);
@@ -263,7 +263,7 @@ var APIRouteManager = class {
263
263
  }
264
264
  async loadModule(filePath) {
265
265
  if (this.viteServer) {
266
- return await _chunk6XFGJBYXcjs.loadFarmDevModule.call(void 0, this.viteServer, filePath);
266
+ return await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, filePath);
267
267
  }
268
268
  return await import(
269
269
  /* @vite-ignore */
@@ -329,7 +329,7 @@ var APIRouteManager = class {
329
329
  const url = new URL(request.url);
330
330
  const pathname = url.pathname;
331
331
  const method = request.method.toUpperCase();
332
- const match = _chunkR2SEZEBCcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
332
+ const match = _chunkOYNNA4DDcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
333
333
  if (!match) {
334
334
  return new Response(JSON.stringify({ error: "Not Found" }), {
335
335
  status: 404,
@@ -337,19 +337,19 @@ var APIRouteManager = class {
337
337
  });
338
338
  }
339
339
  const { route, params } = match;
340
- const endpoint = _chunkR2SEZEBCcjs.resolveAPIRouteEndpoint.call(void 0, route, method);
340
+ const endpoint = _chunkOYNNA4DDcjs.resolveAPIRouteEndpoint.call(void 0, route, method);
341
341
  if (!endpoint) {
342
342
  return new Response(JSON.stringify({ error: "Method Not Allowed" }), {
343
343
  status: 405,
344
344
  headers: {
345
- Allow: _chunkR2SEZEBCcjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
345
+ Allow: _chunkOYNNA4DDcjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
346
346
  "Content-Type": "application/json"
347
347
  }
348
348
  });
349
349
  }
350
350
  const invoke = async () => {
351
351
  try {
352
- return await _chunkR2SEZEBCcjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, this.bodySizeLimit);
352
+ return await _chunkOYNNA4DDcjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, this.bodySizeLimit);
353
353
  } catch (error) {
354
354
  if (options.throwOnError) throw error;
355
355
  console.error(`[API Error] ${pathname}:`, error);
@@ -371,7 +371,7 @@ var APIRouteManager = class {
371
371
  return Boolean(this.matchRoute(pathname));
372
372
  }
373
373
  matchRoute(pathname) {
374
- return _chunkR2SEZEBCcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
374
+ return _chunkOYNNA4DDcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
375
375
  }
376
376
  /**
377
377
  * Get all routes for client type generation
@@ -8,7 +8,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
8
8
  var _chunk4DCWVSL2cjs = require('./chunk-4DCWVSL2.cjs');
9
9
 
10
10
 
11
- var _chunk5566GNEGcjs = require('./chunk-5566GNEG.cjs');
11
+ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
12
12
 
13
13
  // src/metadata-image.ts
14
14
  var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
@@ -129,7 +129,7 @@ async function finalizeMetadataImageResponse(body, headers, options) {
129
129
  responseHeaders.set("ETag", etag);
130
130
  responseHeaders.set("Content-Length", String(body.byteLength));
131
131
  responseHeaders.set("X-Content-Type-Options", "nosniff");
132
- if (_chunk5566GNEGcjs.matchesFarmIfNoneMatch.call(void 0, options.ifNoneMatch, etag)) {
132
+ if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, options.ifNoneMatch, etag)) {
133
133
  return new Response(null, { status: 304, headers: responseHeaders });
134
134
  }
135
135
  return new Response(_optionalChain([options, 'access', _5 => _5.method, 'optionalAccess', _6 => _6.toUpperCase, 'call', _7 => _7()]) === "HEAD" ? null : body, {
@@ -0,0 +1,73 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }// src/platform-blocks.ts
2
+ var _fs = require('fs');
3
+ var _path = require('path'); var path = _interopRequireWildcard(_path);
4
+ function isPlainObject(value) {
5
+ return !!value && typeof value === "object" && !Array.isArray(value);
6
+ }
7
+ function createPlatformBlockChecker(prefix) {
8
+ const fail = (message) => {
9
+ throw new TypeError(`${prefix}: ${message}`);
10
+ };
11
+ return {
12
+ fail,
13
+ checkKeys(value, allowed, where) {
14
+ for (const key of Object.keys(value)) {
15
+ if (!allowed.has(key)) {
16
+ fail(`unknown option ${where}${key}. Supported: ${[...allowed].join(", ")}.`);
17
+ }
18
+ }
19
+ },
20
+ optionalString(value, key) {
21
+ if (value === void 0) return void 0;
22
+ if (typeof value !== "string" || !value.trim()) fail(`${key} must be a non-empty string.`);
23
+ return value.trim();
24
+ }
25
+ };
26
+ }
27
+ function readAppPackageJson(root) {
28
+ try {
29
+ const parsed = JSON.parse(_fs.readFileSync.call(void 0, path.join(root, "package.json"), "utf8"));
30
+ return isPlainObject(parsed) ? parsed : {};
31
+ } catch (e) {
32
+ return {};
33
+ }
34
+ }
35
+ function resolveAppPackageName(root, pkg) {
36
+ return typeof pkg.productName === "string" && pkg.productName.trim() || typeof pkg.name === "string" && pkg.name.replace(/^@[^/]+\//, "").trim() || path.basename(root);
37
+ }
38
+ function resolvePlatformProfile(profile = "production") {
39
+ if (typeof profile !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(profile)) {
40
+ throw new TypeError(`--profile must be a name such as "beta", got "${String(profile)}".`);
41
+ }
42
+ return profile;
43
+ }
44
+ async function resolvePlatformBlock(input, context, validate, cache) {
45
+ if (typeof input !== "function") return validate(input, context);
46
+ const fn = input;
47
+ const call = () => Promise.resolve().then(() => fn(context)).then((value) => validate(value, context));
48
+ if (!cache) return call();
49
+ const key = [
50
+ context.os,
51
+ context.mode,
52
+ context.command,
53
+ context.profile,
54
+ context.root,
55
+ String(fn)
56
+ ].join("\0");
57
+ let resolved = cache.get(key);
58
+ if (!resolved) {
59
+ resolved = call();
60
+ cache.set(key, resolved);
61
+ resolved.catch(() => cache.delete(key));
62
+ }
63
+ return resolved;
64
+ }
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+ exports.isPlainObject = isPlainObject; exports.createPlatformBlockChecker = createPlatformBlockChecker; exports.readAppPackageJson = readAppPackageJson; exports.resolveAppPackageName = resolveAppPackageName; exports.resolvePlatformProfile = resolvePlatformProfile; exports.resolvePlatformBlock = resolvePlatformBlock;
@@ -300,6 +300,76 @@ function composeFarmFullDocument(documentHtml, assets) {
300
300
  return /^\s*<!doctype/i.test(html) ? html : `<!DOCTYPE html>
301
301
  ${html}`;
302
302
  }
303
+ var STREAMED_BODY_MARK = "<!--farm-streamed-body-->";
304
+ function openFarmStreamedDocument(opening, assets) {
305
+ const { hoisted } = peelDocumentPrefix(opening);
306
+ const start = opening.search(/<!doctype|<html[\s>]/i);
307
+ const document = restoreHoistedHead(opening.slice(Math.max(start, 0)), hoisted);
308
+ const rootOpened = !/<body\b[^>]*>\s*<div\b[^>]*\sid=["']root["']/i.test(document);
309
+ const composed = composeFarmFullDocument(
310
+ `${document}${STREAMED_BODY_MARK}</body></html>`,
311
+ assets
312
+ );
313
+ return { html: composed.slice(0, composed.indexOf(STREAMED_BODY_MARK)), rootOpened };
314
+ }
315
+ function createFarmStreamedDocumentTransform(open, fragmentShell) {
316
+ let opening = "";
317
+ let mode = "pending";
318
+ let opened = false;
319
+ let closed = false;
320
+ let rootOpened = false;
321
+ const write = (text) => {
322
+ if (mode === "fragment") return text;
323
+ if (!opened) {
324
+ opening += text;
325
+ if (mode === "pending") {
326
+ const prefix = classifyFarmDocumentPrefix(opening);
327
+ if (prefix === "pending") return "";
328
+ if (prefix === "fragment") {
329
+ mode = "fragment";
330
+ const held = opening;
331
+ opening = "";
332
+ return fragmentShell + held;
333
+ }
334
+ mode = "document";
335
+ }
336
+ if (!/<body\b[^>]*>/i.test(opening)) return "";
337
+ opened = true;
338
+ text = opening;
339
+ opening = "";
340
+ const closeAt = text.search(/<\/body>/i);
341
+ const head = closeAt >= 0 ? text.slice(0, closeAt) : text;
342
+ const document = open(head);
343
+ rootOpened = document.rootOpened;
344
+ text = document.html + (closeAt >= 0 ? text.slice(closeAt) : "");
345
+ }
346
+ if (!closed) {
347
+ const closeAt = text.search(/<\/body>/i);
348
+ if (closeAt >= 0) {
349
+ closed = true;
350
+ text = text.slice(0, closeAt) + text.slice(closeAt).replace(/^<\/body>\s*(?:<\/html>)?(?:\s*<\/div>)*/i, "");
351
+ }
352
+ }
353
+ return text;
354
+ };
355
+ return {
356
+ write,
357
+ end() {
358
+ if (mode === "pending") {
359
+ mode = "fragment";
360
+ const held2 = opening;
361
+ opening = "";
362
+ return { text: fragmentShell + held2, document: false, rootOpened: false };
363
+ }
364
+ if (mode === "fragment") return { text: "", document: false, rootOpened: false };
365
+ if (opened) return { text: "", document: true, rootOpened };
366
+ const held = opening;
367
+ opening = "";
368
+ const text = write(`${held}<body>`);
369
+ return { text, document: true, rootOpened };
370
+ }
371
+ };
372
+ }
303
373
 
304
374
  // src/middleware/may-handle.ts
305
375
  function hasFarmMiddlewareConfig(config) {
@@ -783,6 +853,8 @@ export {
783
853
  removeFarmDocumentTitles,
784
854
  ensureFarmDocumentMeta,
785
855
  composeFarmFullDocument,
856
+ openFarmStreamedDocument,
857
+ createFarmStreamedDocumentTransform,
786
858
  hasFarmMiddlewareConfig,
787
859
  configMiddlewareMayHandlePath,
788
860
  appMiddlewareMayHandlePath,
@@ -1,13 +1,11 @@
1
1
  import {
2
2
  createFarmReactRefreshPlugins,
3
+ farmDesktopDevGuardPlugin,
3
4
  isFarmReactRefreshActive
4
- } from "./chunk-XLYXG73A.mjs";
5
- import {
6
- resolveFarmPlatform
7
- } from "./chunk-LL7TDMOM.mjs";
5
+ } from "./chunk-75WWOZ5C.mjs";
8
6
  import {
9
7
  createFarmImageHandler
10
- } from "./chunk-TTYXOAB7.mjs";
8
+ } from "./chunk-ANHZ6SUL.mjs";
11
9
  import {
12
10
  FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
13
11
  FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE,
@@ -34,7 +32,7 @@ import {
34
32
  resolveFarmIsolatedClientHydrationMode,
35
33
  resolveModuleSourcePath,
36
34
  stripUseClientDirective
37
- } from "./chunk-TQWGOQ7O.mjs";
35
+ } from "./chunk-IWJKJDNW.mjs";
38
36
  import {
39
37
  loadTailwindVitePlugin
40
38
  } from "./chunk-XLLVWLWO.mjs";
@@ -44,7 +42,10 @@ import {
44
42
  import {
45
43
  generateFarmTypeArtifacts,
46
44
  resolveRouteRenderingConfig
47
- } from "./chunk-HNAUK3SC.mjs";
45
+ } from "./chunk-SHJJM6OG.mjs";
46
+ import {
47
+ resolveFarmPlatform
48
+ } from "./chunk-SMUW7UST.mjs";
48
49
  import {
49
50
  createFarmRouteRenderPlan,
50
51
  farmPathGuardCoversEndpoint,
@@ -55,7 +56,10 @@ import {
55
56
  parseFarmLayoutChainHeader,
56
57
  renderFarmLocaleAlternateLinks,
57
58
  stripRouteGroups
58
- } from "./chunk-NIPKC4DA.mjs";
59
+ } from "./chunk-ZIBIE7AH.mjs";
60
+ import {
61
+ isFarmPreviewDeploymentEnvironment
62
+ } from "./chunk-CSLUBKGG.mjs";
59
63
  import {
60
64
  FARM_API_CATALOG_PATH,
61
65
  createFarmAiCatalogResponse,
@@ -70,13 +74,10 @@ import {
70
74
  resolveFarmMCPRouteLabel,
71
75
  resolveFarmMarkdownRouteLabel,
72
76
  setFarmRouteLabel
73
- } from "./chunk-NRFUVDTH.mjs";
77
+ } from "./chunk-JJOWY3XD.mjs";
74
78
  import {
75
79
  FARM_DEFAULT_MCP_PATH
76
80
  } from "./chunk-KRRZJ77U.mjs";
77
- import {
78
- isFarmPreviewDeploymentEnvironment
79
- } from "./chunk-CSLUBKGG.mjs";
80
81
  import {
81
82
  resolveFarmLayoutFonts
82
83
  } from "./chunk-HZOMT5DY.mjs";
@@ -85,6 +86,11 @@ import {
85
86
  generateProgrammaticClientRouteModule,
86
87
  programmaticClientRouteKey
87
88
  } from "./chunk-C5JXCUKR.mjs";
89
+ import {
90
+ createFarmMarkdownSourceResponse,
91
+ isFarmMarkdownPageFile,
92
+ normalizeFarmMarkdownRoutePath
93
+ } from "./chunk-GW4YUIHW.mjs";
88
94
  import {
89
95
  generateFarmDocsAdapterClientRuntime,
90
96
  getFarmDocsAdapterConfigModule
@@ -131,11 +137,6 @@ import {
131
137
  getFarmLayerAliases,
132
138
  getFarmSourceRoots
133
139
  } from "./chunk-52Y3C3HG.mjs";
134
- import {
135
- createFarmMarkdownSourceResponse,
136
- isFarmMarkdownPageFile,
137
- normalizeFarmMarkdownRoutePath
138
- } from "./chunk-GW4YUIHW.mjs";
139
140
  import {
140
141
  FARM_MARKDOWN_CONTENT_TYPE,
141
142
  createFarmMarkdownErrorBody,
@@ -155,10 +156,10 @@ import {
155
156
  getIntegrationDocumentNavigationMatchers,
156
157
  getIntegrationProviders,
157
158
  matchIntegrationRoute
158
- } from "./chunk-NW2BKDVT.mjs";
159
+ } from "./chunk-HHFMECFO.mjs";
159
160
  import {
160
161
  MiddlewareManager
161
- } from "./chunk-EA5PMJDU.mjs";
162
+ } from "./chunk-X3HOVNHI.mjs";
162
163
  import {
163
164
  _runWithMiddlewareContext,
164
165
  _runWithMiddlewareData
@@ -174,7 +175,7 @@ import {
174
175
  } from "./chunk-IYEY3JWJ.mjs";
175
176
  import {
176
177
  APIRouteManager
177
- } from "./chunk-ALD2WMLA.mjs";
178
+ } from "./chunk-WXHDVXJE.mjs";
178
179
  import {
179
180
  getFarmI18nClientSnapshot
180
181
  } from "./chunk-CV6MFQ4Y.mjs";
@@ -184,7 +185,7 @@ import {
184
185
  } from "./chunk-NR63PD3P.mjs";
185
186
  import {
186
187
  isFarmAPIPathname
187
- } from "./chunk-I2SWKWO7.mjs";
188
+ } from "./chunk-LJDIFIJ2.mjs";
188
189
  import {
189
190
  registerFarmMCPServer
190
191
  } from "./chunk-KJMWAUKE.mjs";
@@ -200,7 +201,7 @@ import {
200
201
  invalidateFailedFarmDevModules,
201
202
  invalidateFarmDevDependents,
202
203
  loadFarmDevModule
203
- } from "./chunk-JUMPFVMK.mjs";
204
+ } from "./chunk-TUOO6IK3.mjs";
204
205
  import {
205
206
  isFarmI18nCatalogFile,
206
207
  resolveFarmI18nMessagePath
@@ -227,13 +228,13 @@ import {
227
228
  createFarmRequestBodyErrorResponse,
228
229
  readNodeRequestBody,
229
230
  resolveFarmServerConfig
230
- } from "./chunk-C6U66WWF.mjs";
231
+ } from "./chunk-GFT5AHAT.mjs";
231
232
  import {
232
233
  resolveFarmAPIServerBasePath
233
234
  } from "./chunk-LM2YOGDK.mjs";
234
235
  import {
235
236
  FARM_VERSION
236
- } from "./chunk-HRLYO2XJ.mjs";
237
+ } from "./chunk-2VCC3GVC.mjs";
237
238
  import {
238
239
  DEFAULT_FARM_API_BASE_PATH
239
240
  } from "./chunk-BLD5GVCG.mjs";
@@ -753,7 +754,7 @@ function loadFarmWorkflowsDevRuntime() {
753
754
  return import("./workflows.mjs");
754
755
  }
755
756
  function loadFarmDevtoolsSnapshotRuntime() {
756
- return import("./devtools-BLKHPY3C.mjs");
757
+ return import("./devtools-STG7HPRV.mjs");
757
758
  }
758
759
  function loadFarmDevtoolsUIRuntime() {
759
760
  return import("./devtools-ui-CYBVFLPH.mjs");
@@ -1440,12 +1441,6 @@ function farmPlugin(options = {}, initialPluginManager) {
1440
1441
  }
1441
1442
  },
1442
1443
  async configureServer(viteServer) {
1443
- if (resolveFarmPlatform() === "desktop") {
1444
- const { createFarmDesktopDevGuard } = await import("./dev-guard-MPZUJFIV.mjs");
1445
- viteServer.middlewares.use(
1446
- createFarmDesktopDevGuard(viteServer, { basePath: options.basePath || "" })
1447
- );
1448
- }
1449
1444
  viteServer.middlewares.use(
1450
1445
  createFarmDevPreviewGuard(viteServer, {
1451
1446
  getSourceRoots: () => getFarmSourceRoots(farmApp?.getConfig() ?? options)
@@ -2577,6 +2572,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2577
2572
  res.end(JSON.stringify({ error: "Internal server error" }));
2578
2573
  return;
2579
2574
  }
2575
+ if (await runAppMiddlewareForContentRoute()) {
2576
+ const duration2 = Date.now() - startTime2;
2577
+ logResponse(method2, urlPath2, res.statusCode || 200, duration2, "API");
2578
+ return;
2579
+ }
2580
2580
  const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
2581
2581
  const hasExplicitAPIRoute = hasMatchedApiRoute || Boolean(apiRouteManager.matchRoute(pathname2));
2582
2582
  if (apiHandler && hasExplicitAPIRoute) {
@@ -6076,6 +6076,8 @@ async function defineConfig(config = {}) {
6076
6076
  };
6077
6077
  return {
6078
6078
  plugins: [
6079
+ // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
6080
+ farmDesktopDevGuardPlugin(config.basePath),
6079
6081
  createFarmThemeCssPlugin(config.theme, config.basePath),
6080
6082
  tailwindVitePlugin,
6081
6083
  ...rendererVitePlugins,
@@ -1 +1 @@
1
- export { g as FarmClientNavigationAction, h as FarmClientNavigationErrorEvent, i as FarmClientNavigationEvent, j as FarmClientNavigationLoadedEvent, k as FarmClientNavigationResolvedEvent, l as FarmClientNavigationSession, n as FarmClientPlugin, o as FarmClientPluginCloseEvent, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, y as defineClient } from '../lifecycle-DK06VuKP.mjs';
1
+ export { h as FarmClientNavigationAction, i as FarmClientNavigationErrorEvent, j as FarmClientNavigationEvent, k as FarmClientNavigationLoadedEvent, l as FarmClientNavigationResolvedEvent, m as FarmClientNavigationSession, a as FarmClientPlugin, o as FarmClientPluginCloseEvent, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, y as defineClient } from '../lifecycle-C2aLBOwu.mjs';
@@ -1 +1 @@
1
- export { g as FarmClientNavigationAction, h as FarmClientNavigationErrorEvent, i as FarmClientNavigationEvent, j as FarmClientNavigationLoadedEvent, k as FarmClientNavigationResolvedEvent, l as FarmClientNavigationSession, n as FarmClientPlugin, o as FarmClientPluginCloseEvent, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, y as defineClient } from '../lifecycle-DK06VuKP.js';
1
+ export { h as FarmClientNavigationAction, i as FarmClientNavigationErrorEvent, j as FarmClientNavigationEvent, k as FarmClientNavigationLoadedEvent, l as FarmClientNavigationResolvedEvent, m as FarmClientNavigationSession, a as FarmClientPlugin, o as FarmClientPluginCloseEvent, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, y as defineClient } from '../lifecycle-C2aLBOwu.js';