@farm.js/core 0.1.81 → 0.1.83

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 (290) hide show
  1. package/dist/{agent-mcp.d-Cxi3214_.d.ts → agent-mcp.d-7uKdOttc.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DMqOqnOA.d.mts → agent-mcp.d-LChlR2au.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +4 -3
  4. package/dist/agent-runtime.d.mts +2 -1
  5. package/dist/agent-runtime.d.ts +2 -1
  6. package/dist/agent-runtime.mjs +3 -2
  7. package/dist/analyzer-WGH6J2HN.cjs +17 -0
  8. package/dist/{analyzer-IC66UJCU.mjs → analyzer-Y6IY26HI.mjs} +2 -2
  9. package/dist/api/node.cjs +5 -4
  10. package/dist/api/node.d.mts +4 -3
  11. package/dist/api/node.d.ts +4 -3
  12. package/dist/api/node.mjs +4 -3
  13. package/dist/api/route-manager.cjs +5 -4
  14. package/dist/api/route-manager.d.mts +4 -3
  15. package/dist/api/route-manager.d.ts +4 -3
  16. package/dist/api/route-manager.mjs +4 -3
  17. package/dist/api/runtime.cjs +4 -3
  18. package/dist/api/runtime.d.mts +3 -2
  19. package/dist/api/runtime.d.ts +3 -2
  20. package/dist/api/runtime.mjs +3 -2
  21. package/dist/api.cjs +7 -6
  22. package/dist/api.d.mts +5 -4
  23. package/dist/api.d.ts +5 -4
  24. package/dist/api.mjs +6 -5
  25. package/dist/{app-manifest.d-C8Cswd31.d.ts → app-manifest.d-CRp21oAz.d.ts} +1 -1
  26. package/dist/{app-manifest.d-Bbxp5kes.d.mts → app-manifest.d-QMdmqqCr.d.mts} +1 -1
  27. package/dist/app-markdown.d.mts +3 -2
  28. package/dist/app-markdown.d.ts +3 -2
  29. package/dist/{app.d-DGIoFt5D.d.ts → app.d-CVPu_hoD.d.ts} +51 -4
  30. package/dist/{app.d-BJuSurgy.d.mts → app.d-eSm7jgoc.d.mts} +51 -4
  31. package/dist/{chunk-NSLRK5DK.cjs → chunk-3CZ4MJHW.cjs} +1 -1
  32. package/dist/{chunk-CPZZBCPO.cjs → chunk-3DAJXBSL.cjs} +2 -2
  33. package/dist/chunk-3DE6RK7K.cjs +36 -0
  34. package/dist/{chunk-XMHERKSE.mjs → chunk-42IBGQTN.mjs} +5 -12
  35. package/dist/{chunk-GY63XD6K.mjs → chunk-43N3X6OO.mjs} +1 -1
  36. package/dist/{chunk-MOGRRZMW.cjs → chunk-55UJGUBP.cjs} +35 -30
  37. package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
  38. package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
  39. package/dist/{chunk-LKIG5SM6.cjs → chunk-5P65LXGU.cjs} +9 -9
  40. package/dist/{chunk-TPA2PV5J.mjs → chunk-5V6HSJFG.mjs} +24 -1
  41. package/dist/chunk-5X5GJU5A.cjs +426 -0
  42. package/dist/{chunk-UF4BNKKJ.mjs → chunk-6QYPP5KC.mjs} +2 -2
  43. package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
  44. package/dist/{chunk-OIWDEDUO.cjs → chunk-7X2CYE66.cjs} +419 -357
  45. package/dist/{chunk-XOGCNKB7.cjs → chunk-A5BHJHDF.cjs} +3 -3
  46. package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
  47. package/dist/{chunk-HTNJ7A4D.mjs → chunk-B5SJYXJK.mjs} +177 -67
  48. package/dist/chunk-BUQR7KKO.mjs +17 -0
  49. package/dist/{chunk-OO4GVGM3.mjs → chunk-CA2HBLXP.mjs} +11 -1
  50. package/dist/{chunk-724WT3NI.mjs → chunk-CRE642TW.mjs} +1 -1
  51. package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
  52. package/dist/{chunk-IPG6B25T.mjs → chunk-DPUZVGXH.mjs} +203 -54
  53. package/dist/{chunk-ZIYJWJV2.cjs → chunk-DZTWUEBB.cjs} +8 -8
  54. package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
  55. package/dist/{chunk-46UV2E7I.cjs → chunk-EFI6QWBQ.cjs} +200 -90
  56. package/dist/chunk-ELNRKD4V.mjs +426 -0
  57. package/dist/{chunk-XOXCQGAF.mjs → chunk-FFWSER54.mjs} +1 -1
  58. package/dist/chunk-FZ7OUN5M.cjs +30 -0
  59. package/dist/{chunk-5MMKNW7Q.cjs → chunk-H7REG7OX.cjs} +15 -8
  60. package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
  61. package/dist/{chunk-OUDNUFVR.cjs → chunk-HRH7OKBQ.cjs} +6 -4
  62. package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
  63. package/dist/{chunk-ADQ2LATR.cjs → chunk-IABI62FH.cjs} +2 -2
  64. package/dist/{chunk-TLSGRK7E.mjs → chunk-IAIRQAHA.mjs} +3 -1
  65. package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
  66. package/dist/{chunk-EX6ZSN5P.cjs → chunk-IZYFP7IN.cjs} +17 -24
  67. package/dist/chunk-J6RFB324.cjs +17 -0
  68. package/dist/{chunk-CL7BUGVB.cjs → chunk-JHRJ5V2F.cjs} +509 -360
  69. package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
  70. package/dist/{chunk-POL5RCVU.mjs → chunk-K3GHY7GY.mjs} +14 -9
  71. package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
  72. package/dist/{chunk-UVV3I5QA.cjs → chunk-L2GUEYHR.cjs} +29 -6
  73. package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
  74. package/dist/{chunk-E3HBD2K3.cjs → chunk-LN6FAYNB.cjs} +36 -31
  75. package/dist/chunk-M6AJZ4XR.mjs +30 -0
  76. package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
  77. package/dist/{chunk-6WVRVGKC.mjs → chunk-NAHDG6UX.mjs} +1 -1
  78. package/dist/{chunk-NOYKBGUK.mjs → chunk-NDWI6FDH.mjs} +558 -212
  79. package/dist/{chunk-OFVCWV2D.cjs → chunk-NEKO3HM2.cjs} +11 -1
  80. package/dist/{chunk-M6DAIE4T.cjs → chunk-NGTZHWBG.cjs} +78 -9
  81. package/dist/{chunk-D77OGI6X.mjs → chunk-NKVBWPXR.mjs} +1 -1
  82. package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
  83. package/dist/{chunk-W6C3LEXX.cjs → chunk-OM6JIIJU.cjs} +155 -20
  84. package/dist/{chunk-S3IWDDQ3.mjs → chunk-ORBBAA7B.mjs} +1 -1
  85. package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
  86. package/dist/{chunk-BJWJP5A4.mjs → chunk-R3VLM2MW.mjs} +3 -3
  87. package/dist/{chunk-I4WZRG73.mjs → chunk-RB5IGN3N.mjs} +13 -6
  88. package/dist/{chunk-2HMSSPCZ.mjs → chunk-RGTZAM6Y.mjs} +71 -2
  89. package/dist/{chunk-IM3UINTZ.mjs → chunk-RNJX3MD6.mjs} +151 -16
  90. package/dist/{chunk-EJCVG25Z.mjs → chunk-S3R4JDRO.mjs} +17 -9
  91. package/dist/{chunk-2Y2HRZQY.cjs → chunk-SLIXHUMS.cjs} +931 -585
  92. package/dist/{chunk-WFVSAT7Y.cjs → chunk-T7HGXF7D.cjs} +3 -3
  93. package/dist/{chunk-ZKNXCRUQ.cjs → chunk-U54REWMJ.cjs} +23 -23
  94. package/dist/{chunk-YH7ENV3K.mjs → chunk-U56Z3755.mjs} +13 -8
  95. package/dist/chunk-U6XYBTUT.mjs +36 -0
  96. package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
  97. package/dist/{chunk-RZ6XUEQS.mjs → chunk-VQ6IXALL.mjs} +2 -2
  98. package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
  99. package/dist/{chunk-FYZD7DUS.cjs → chunk-WCSBYQOT.cjs} +4 -4
  100. package/dist/{chunk-5N526T7Q.mjs → chunk-WZV2G2A6.mjs} +95 -33
  101. package/dist/{chunk-SM2SYWAR.cjs → chunk-XJDB564A.cjs} +18 -10
  102. package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
  103. package/dist/{cli-runtime.d-D8O1v2_X.d.mts → cli-runtime.d-C7aMfoTq.d.mts} +8 -6
  104. package/dist/{cli-runtime.d-hf4L1MNP.d.ts → cli-runtime.d-DaElKjaL.d.ts} +8 -6
  105. package/dist/{client-component.d-DFwUHlOz.d.mts → client-component.d-DLMCzmUx.d.mts} +1 -1
  106. package/dist/{client-component.d-CX8UCQh-.d.ts → client-component.d-DLknFP8l.d.ts} +1 -1
  107. package/dist/{client-plugins.d-qWp8hNwd.d.ts → client-plugins.d-BVXjyIkY.d.ts} +20 -1
  108. package/dist/{client-plugins.d-BflSNO-b.d.mts → client-plugins.d-BwKwuO_0.d.mts} +20 -1
  109. package/dist/client-plugins.d.mts +2 -1
  110. package/dist/client-plugins.d.ts +2 -1
  111. package/dist/client.cjs +4 -3
  112. package/dist/client.d.mts +10 -9
  113. package/dist/client.d.ts +10 -9
  114. package/dist/client.mjs +3 -2
  115. package/dist/config.d.mts +2 -1
  116. package/dist/config.d.ts +2 -1
  117. package/dist/cron.cjs +2 -2
  118. package/dist/cron.mjs +1 -1
  119. package/dist/desktop.d.mts +3 -2
  120. package/dist/desktop.d.ts +3 -2
  121. package/dist/{devtools-XJHODO5H.mjs → devtools-OI52TCSD.mjs} +8 -7
  122. package/dist/{devtools-EI5N366Z.cjs → devtools-ZM2AR36W.cjs} +11 -10
  123. package/dist/docs.cjs +13 -11
  124. package/dist/docs.d.mts +15 -6
  125. package/dist/docs.d.ts +15 -6
  126. package/dist/docs.mjs +12 -10
  127. package/dist/environment/vite.cjs +4 -4
  128. package/dist/environment/vite.d.mts +1 -0
  129. package/dist/environment/vite.d.ts +1 -0
  130. package/dist/environment/vite.mjs +3 -3
  131. package/dist/{generate-route-types.d-CaGMIaNI.d.mts → generate-route-types.d-BFOMM8Ef.d.mts} +3 -0
  132. package/dist/{generate-route-types.d-B76M5R11.d.ts → generate-route-types.d-C2m8myHb.d.ts} +3 -0
  133. package/dist/{handler.d-DoH5Krkq.d.mts → handler.d-BKTWzzNA.d.mts} +1 -1
  134. package/dist/{handler.d-C2oRihfa.d.ts → handler.d-Dzpyg3-N.d.ts} +1 -1
  135. package/dist/{headers.d-BrX53wFQ.d.mts → headers.d-5opjyhXw.d.mts} +1 -1
  136. package/dist/{headers.d-Dj0mfYpb.d.ts → headers.d-PZyXcDAH.d.ts} +1 -1
  137. package/dist/index.cjs +38 -35
  138. package/dist/{index.d-DzDHOttz.d.mts → index.d-C0Mie66f.d.mts} +1 -1
  139. package/dist/{index.d-Dhc2scRl.d.ts → index.d-DV2q-0mE.d.ts} +1 -1
  140. package/dist/index.d.mts +26 -25
  141. package/dist/index.d.ts +26 -25
  142. package/dist/index.mjs +38 -35
  143. package/dist/integrations/orm.d.mts +2 -1
  144. package/dist/integrations/orm.d.ts +2 -1
  145. package/dist/integrations.cjs +4 -3
  146. package/dist/integrations.d.mts +2 -1
  147. package/dist/integrations.d.ts +2 -1
  148. package/dist/integrations.mjs +3 -2
  149. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  150. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  151. package/dist/internal/build-runtime.cjs +31 -30
  152. package/dist/internal/build-runtime.d.mts +5 -4
  153. package/dist/internal/build-runtime.d.ts +5 -4
  154. package/dist/internal/build-runtime.mjs +30 -29
  155. package/dist/internal/cli-runtime.cjs +12 -11
  156. package/dist/internal/cli-runtime.d.mts +8 -7
  157. package/dist/internal/cli-runtime.d.ts +8 -7
  158. package/dist/internal/cli-runtime.mjs +11 -10
  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.d.mts +5 -5
  162. package/dist/internal/client-runtime.d.ts +5 -5
  163. package/dist/internal/compression-runtime.d.mts +2 -1
  164. package/dist/internal/compression-runtime.d.ts +2 -1
  165. package/dist/internal/config-runtime.cjs +10 -9
  166. package/dist/internal/config-runtime.d.mts +6 -5
  167. package/dist/internal/config-runtime.d.ts +6 -5
  168. package/dist/internal/config-runtime.mjs +9 -8
  169. package/dist/internal/infra-analytics-runtime.cjs +8 -6
  170. package/dist/internal/infra-analytics-runtime.d.mts +8 -2
  171. package/dist/internal/infra-analytics-runtime.d.ts +8 -2
  172. package/dist/internal/infra-analytics-runtime.mjs +8 -6
  173. package/dist/internal/islands-action-client.cjs +18 -0
  174. package/dist/internal/islands-action-client.d.mts +18 -0
  175. package/dist/internal/islands-action-client.d.ts +18 -0
  176. package/dist/internal/islands-action-client.mjs +18 -0
  177. package/dist/internal/islands-boot.cjs +54 -20
  178. package/dist/internal/islands-boot.d.mts +5 -3
  179. package/dist/internal/islands-boot.d.ts +5 -3
  180. package/dist/internal/islands-boot.mjs +49 -15
  181. package/dist/internal/islands-runtime.cjs +3 -8
  182. package/dist/internal/islands-runtime.mjs +4 -9
  183. package/dist/internal/islx-actions-client.cjs +4 -3
  184. package/dist/internal/islx-actions-client.mjs +3 -2
  185. package/dist/internal/islx-actions-server.d.mts +0 -2
  186. package/dist/internal/islx-actions-server.d.ts +0 -2
  187. package/dist/internal/islx-client.cjs +13 -1
  188. package/dist/internal/islx-client.d.mts +11 -0
  189. package/dist/internal/islx-client.d.ts +11 -0
  190. package/dist/internal/islx-client.mjs +14 -0
  191. package/dist/internal/metadata-image-runtime.d.mts +1 -0
  192. package/dist/internal/metadata-image-runtime.d.ts +1 -0
  193. package/dist/internal/native-server-fns.cjs +4 -4
  194. package/dist/internal/native-server-fns.mjs +3 -3
  195. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  196. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  197. package/dist/internal/production-runtime.cjs +12 -7
  198. package/dist/internal/production-runtime.d.mts +14 -12
  199. package/dist/internal/production-runtime.d.ts +14 -12
  200. package/dist/internal/production-runtime.mjs +11 -6
  201. package/dist/internal/spa-router.d.mts +3 -3
  202. package/dist/internal/spa-router.d.ts +3 -3
  203. package/dist/internal/start-manifest.d.mts +2 -1
  204. package/dist/internal/start-manifest.d.ts +2 -1
  205. package/dist/markdown.d.mts +2 -1
  206. package/dist/markdown.d.ts +2 -1
  207. package/dist/middleware.d.mts +2 -1
  208. package/dist/middleware.d.ts +2 -1
  209. package/dist/mobile.d.mts +6 -3
  210. package/dist/mobile.d.ts +6 -3
  211. package/dist/{mount.d-DOaeUoWq.d.mts → mount.d-CZ_qL1iS.d.mts} +1 -1
  212. package/dist/{mount.d-DwXjaOHY.d.ts → mount.d-gWul1GA1.d.ts} +1 -1
  213. package/dist/{navigation-delegate.d-BElGUMgt.d.mts → navigation-delegate.d-BBTzhJLj.d.mts} +1 -1
  214. package/dist/{navigation-delegate.d-o3pPd9VI.d.ts → navigation-delegate.d-BZsYEAet.d.ts} +1 -1
  215. package/dist/navigation.d.mts +5 -5
  216. package/dist/navigation.d.ts +5 -5
  217. package/dist/{nitro-YLTGVGK4.mjs → nitro-FK3SZM4H.mjs} +1 -1
  218. package/dist/{nitro-XGIO6EQN.cjs → nitro-YDFMH5PY.cjs} +4 -4
  219. package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
  220. package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
  221. package/dist/plugin.cjs +25 -23
  222. package/dist/plugin.d.mts +6 -6
  223. package/dist/plugin.d.ts +6 -6
  224. package/dist/plugin.mjs +24 -22
  225. package/dist/{render-plan.d-BD06tqFA.d.ts → render-plan.d-AaJsYPX-.d.ts} +1 -1
  226. package/dist/{render-plan.d-xWCRAJeR.d.mts → render-plan.d-bnWxS12w.d.mts} +1 -1
  227. package/dist/renderer-client.cjs +54 -10
  228. package/dist/renderer-client.d.mts +8 -7
  229. package/dist/renderer-client.d.ts +8 -7
  230. package/dist/renderer-client.mjs +50 -6
  231. package/dist/renderer.cjs +6 -2
  232. package/dist/renderer.d.mts +97 -4
  233. package/dist/renderer.d.ts +97 -4
  234. package/dist/renderer.mjs +5 -1
  235. package/dist/{request.d-Dx82V8bz.d.mts → request.d-C2HOn3Hi.d.mts} +1 -1
  236. package/dist/{request.d-DUMuWxSN.d.ts → request.d-CAeitOG1.d.ts} +1 -1
  237. package/dist/request.d.mts +3 -2
  238. package/dist/request.d.ts +3 -2
  239. package/dist/{route-rendering.d-BwBVpLtD.d.ts → route-rendering.d-A1dIkUK5.d.ts} +1 -1
  240. package/dist/{route-rendering.d-DJh6GauM.d.mts → route-rendering.d-CYA-ulnX.d.mts} +1 -1
  241. package/dist/{router.d-BtkKDxUB.d.mts → router.d-8lxnzlkr.d.mts} +1 -1
  242. package/dist/{router.d-CJBSG5jr.d.ts → router.d-A_Yt6jYz.d.ts} +1 -1
  243. package/dist/{routes.d-CCccJRrp.d.mts → routes.d-BWvpUoYu.d.mts} +1 -1
  244. package/dist/{routes.d-b7khoRoU.d.ts → routes.d-D7RWvfqL.d.ts} +1 -1
  245. package/dist/routes.d.mts +2 -1
  246. package/dist/routes.d.ts +2 -1
  247. package/dist/{rsc-pipeline-H5AXQA7A.cjs → rsc-pipeline-MFJZGDPE.cjs} +11 -10
  248. package/dist/{rsc-pipeline-GD6KLOIG.mjs → rsc-pipeline-TRZVFCBX.mjs} +10 -9
  249. package/dist/{runtime-YWQVBC3V.cjs → runtime-MJUG2HGR.cjs} +15 -13
  250. package/dist/{runtime-OJ7FXFUI.mjs → runtime-O4Y3Z6V3.mjs} +11 -9
  251. package/dist/{runtime.d-BQnD0cfC.d.ts → runtime.d-BPyvWrgQ.d.ts} +1 -1
  252. package/dist/{runtime.d-C4SuZXf6.d.mts → runtime.d-C_rZ9_DD.d.mts} +1 -1
  253. package/dist/{server-components-status.d-9rH7ZoEq.d.mts → server-components-status.d-BpxiEMQE.d.mts} +1 -1
  254. package/dist/{server-components-status.d-rfKOcE0N.d.ts → server-components-status.d-C2UEKJn7.d.ts} +1 -1
  255. package/dist/server-plugins.d.mts +4 -3
  256. package/dist/server-plugins.d.ts +4 -3
  257. package/dist/server-query-call.d-rVM_lsYk.d.mts +15 -0
  258. package/dist/server-query-call.d-rVM_lsYk.d.ts +15 -0
  259. package/dist/server-query-client.cjs +5 -3
  260. package/dist/server-query-client.d.mts +3 -2
  261. package/dist/server-query-client.d.ts +3 -2
  262. package/dist/server-query-client.mjs +5 -3
  263. package/dist/{server-query-runtime.d-DXRNhX_3.d.ts → server-query-runtime.d-BlHd90D0.d.ts} +2 -8
  264. package/dist/{server-query-runtime.d-aP52iuL5.d.mts → server-query-runtime.d-CCLGkQtE.d.mts} +2 -8
  265. package/dist/server.cjs +58 -52
  266. package/dist/server.d.mts +12 -12
  267. package/dist/server.d.ts +12 -12
  268. package/dist/server.mjs +34 -28
  269. package/dist/{spa-router.d-V6XLSTCy.d.mts → spa-router.d-BD-6WX1R.d.mts} +2 -2
  270. package/dist/{spa-router.d-DMKiBsHH.d.ts → spa-router.d-Cw5i_15e.d.ts} +2 -2
  271. package/dist/{ssg.d-MNedvvMB.d.ts → ssg.d-Bifiq0EL.d.ts} +2 -2
  272. package/dist/{ssg.d-BnCKPQL0.d.mts → ssg.d-CCE9aob5.d.mts} +2 -2
  273. package/dist/{store-core.d-Ad5biajo.d.ts → store-core.d-5tVn5vi1.d.ts} +12 -4
  274. package/dist/{store-core.d-BqJI1-ix.d.mts → store-core.d-BN2MxSG9.d.mts} +12 -4
  275. package/dist/testing.cjs +5 -4
  276. package/dist/testing.d.mts +2 -1
  277. package/dist/testing.d.ts +2 -1
  278. package/dist/testing.mjs +4 -3
  279. package/dist/{utils.d-BdjHKDuT.d.ts → utils.d-BUjpSNIO.d.ts} +1 -1
  280. package/dist/{utils.d-BEKLWa0Z.d.mts → utils.d-wGPLeVbq.d.mts} +1 -1
  281. package/dist/version.cjs +2 -2
  282. package/dist/version.mjs +1 -1
  283. package/dist/vite.cjs +25 -23
  284. package/dist/vite.d.mts +6 -6
  285. package/dist/vite.d.ts +6 -6
  286. package/dist/vite.mjs +24 -22
  287. package/package.json +7 -2
  288. package/dist/analyzer-435DCIQ6.cjs +0 -17
  289. package/dist/chunk-AHVF5GI2.cjs +0 -229
  290. package/dist/chunk-ONSZP5JK.mjs +0 -229
@@ -0,0 +1,426 @@
1
+ import {
2
+ writeFileIfChanged
3
+ } from "./chunk-YFTGIHNC.mjs";
4
+ import {
5
+ createFarmRendererHookError,
6
+ readFarmRendererHydration,
7
+ resolveFarmComponentExtensions
8
+ } from "./chunk-RGTZAM6Y.mjs";
9
+ import {
10
+ parseRouteSlotFile
11
+ } from "./chunk-CYRO3WP4.mjs";
12
+ import {
13
+ discoverProgrammaticRoutePaths
14
+ } from "./chunk-URBP6DLH.mjs";
15
+ import {
16
+ parseRoutePath
17
+ } from "./chunk-U6GMCDRS.mjs";
18
+
19
+ // src/routing/generate-route-types.ts
20
+ import * as path2 from "path";
21
+ import * as fs2 from "fs";
22
+
23
+ // src/routing/renderer-routes.ts
24
+ import fs from "fs";
25
+ import path from "path";
26
+ var ROUTE_KINDS = /* @__PURE__ */ new Set([
27
+ "page",
28
+ "layout",
29
+ "loading",
30
+ "error",
31
+ "not-found"
32
+ ]);
33
+ var FARM_OWNED_FILES = /* @__PURE__ */ new Set([
34
+ "route",
35
+ "middleware",
36
+ "instrumentation",
37
+ "sitemap",
38
+ "robots",
39
+ "manifest",
40
+ "llms",
41
+ "llms-full",
42
+ "opengraph-image",
43
+ "twitter-image"
44
+ ]);
45
+ function createFarmFolderRoutes(dir) {
46
+ return {
47
+ ...dir === void 0 ? {} : { dir },
48
+ resolve(file) {
49
+ if (!ROUTE_KINDS.has(file.name)) return null;
50
+ const kind = file.name;
51
+ if (kind === "not-found" && file.segments.length > 0) return null;
52
+ return { kind, pattern: `/${file.segments.join("/")}` };
53
+ }
54
+ };
55
+ }
56
+ async function resolveFarmRendererRoutes(options) {
57
+ const { renderer } = options;
58
+ if (typeof renderer?.routes !== "function") return null;
59
+ const root = path.resolve(options.root);
60
+ const defaultDir = path.join(options.srcDir ?? "src", "app");
61
+ const where = `Renderer \`${renderer.name}\` routes()`;
62
+ const rules = await renderer.routes({
63
+ root,
64
+ defaults: createFarmFolderRoutes(defaultDir)
65
+ });
66
+ if (!rules || typeof rules !== "object" || typeof rules.resolve !== "function") {
67
+ throw new TypeError(`${where} must return an object with a \`resolve(file)\` method.`);
68
+ }
69
+ const { dir: configuredDir, resolve: resolve2 } = rules;
70
+ if (configuredDir !== void 0 && (typeof configuredDir !== "string" || !configuredDir.trim())) {
71
+ throw new TypeError(
72
+ `${where} returned \`dir: ${JSON.stringify(configuredDir)}\`. Return a directory relative to ${root}, or leave it out for ${defaultDir}.`
73
+ );
74
+ }
75
+ const dir = path.resolve(root, configuredDir ?? defaultDir);
76
+ const relativeDir = path.relative(root, dir);
77
+ if (relativeDir.startsWith("..") || path.isAbsolute(relativeDir)) {
78
+ throw new Error(
79
+ `${where} returned \`dir: ${JSON.stringify(configuredDir)}\`, which is outside ${root}. Keep route files inside the project.`
80
+ );
81
+ }
82
+ const extensions = [
83
+ ...resolveFarmComponentExtensions(renderer.componentExtensions),
84
+ ".md",
85
+ ".mdx"
86
+ ];
87
+ const files = await listRouteCandidates(dir, extensions);
88
+ const entries = [];
89
+ const claimed = /* @__PURE__ */ new Map();
90
+ for (const relative2 of files) {
91
+ const extension = path.extname(relative2).toLowerCase();
92
+ const parts = relative2.split("/");
93
+ const fileName = parts.pop();
94
+ const name = fileName.slice(0, fileName.length - extension.length);
95
+ if (FARM_OWNED_FILES.has(name) || parts.some((part) => part.startsWith("@"))) continue;
96
+ if (fileName.endsWith(".d.ts")) continue;
97
+ const modulePath = path.join(dir, ...relative2.split("/"));
98
+ const file = Object.freeze({
99
+ path: relative2,
100
+ segments: Object.freeze(parts),
101
+ name,
102
+ extension
103
+ });
104
+ let rule;
105
+ try {
106
+ rule = resolve2.call(rules, file);
107
+ } catch (error) {
108
+ throw createFarmRendererHookError(
109
+ `${where} threw while resolving ${modulePath}: ${error instanceof Error ? error.message : String(error)}`,
110
+ error
111
+ );
112
+ }
113
+ if (rule === null || rule === void 0) continue;
114
+ const entry = readRouteRule(rule, `${where} for ${modulePath}`, extension, modulePath);
115
+ const key = `${entry.kind}:${entry.pattern}${extension === ".md" || extension === ".mdx" ? ":markdown" : ""}`;
116
+ const existing = claimed.get(key);
117
+ if (existing) {
118
+ throw new Error(
119
+ `${where} maps two files to the ${entry.kind} "${entry.pattern}": ${existing} and ${modulePath}. Return null for one of them, or give it another pattern.`
120
+ );
121
+ }
122
+ claimed.set(key, modulePath);
123
+ entries.push(entry);
124
+ }
125
+ return { dir, entries };
126
+ }
127
+ function readRouteRule(rule, where, extension, modulePath) {
128
+ if (typeof rule !== "object" || Array.isArray(rule)) {
129
+ throw new TypeError(
130
+ `${where} returned ${JSON.stringify(rule)}. Return \`{ kind, pattern }\`, or null when the file isn't a route.`
131
+ );
132
+ }
133
+ const value = rule;
134
+ const kind = value.kind;
135
+ if (typeof kind !== "string" || !ROUTE_KINDS.has(kind)) {
136
+ throw new TypeError(
137
+ `${where} returned \`kind: ${JSON.stringify(kind)}\`. Use "page", "layout", "loading", "error", or "not-found".`
138
+ );
139
+ }
140
+ const pattern = value.pattern;
141
+ if (typeof pattern !== "string") {
142
+ throw new TypeError(
143
+ `${where} returned \`pattern: ${JSON.stringify(pattern)}\`. Return a URL pattern such as "/blog/[slug]".`
144
+ );
145
+ }
146
+ const segments = readPatternSegments(pattern, where);
147
+ if (kind === "not-found" && segments.length > 0) {
148
+ throw new Error(
149
+ `${where} returned a not-found route for "${pattern}". Farm renders one not-found page: return \`pattern: "/"\`.`
150
+ );
151
+ }
152
+ const routeFile = [...segments, `${kind}${extension}`].join("/");
153
+ try {
154
+ parseRoutePath(routeFile);
155
+ } catch (error) {
156
+ throw createFarmRendererHookError(
157
+ `${where} returned \`pattern: ${JSON.stringify(pattern)}\`: ${error instanceof Error ? error.message : String(error)}`,
158
+ error
159
+ );
160
+ }
161
+ return {
162
+ kind,
163
+ pattern,
164
+ routeFile,
165
+ modulePath,
166
+ hydration: readFarmRendererHydration(value, where)
167
+ };
168
+ }
169
+ function readPatternSegments(pattern, where) {
170
+ const fix = 'Write it as src/app folders do: "/", "/blog/[slug]", "/docs/[...path]".';
171
+ if (!pattern.startsWith("/")) {
172
+ throw new Error(
173
+ `${where} returned \`pattern: ${JSON.stringify(pattern)}\`, which doesn't start with "/". ${fix}`
174
+ );
175
+ }
176
+ if (pattern === "/") return [];
177
+ const segments = pattern.slice(1).split("/");
178
+ for (const segment of segments) {
179
+ if (segment === "" || segment === "." || segment === ".." || segment.startsWith("@") || /[\\?#]/.test(segment)) {
180
+ throw new Error(
181
+ `${where} returned \`pattern: ${JSON.stringify(pattern)}\`, which has the segment ${JSON.stringify(segment)}. ${fix} Named slots (@name) stay in src/app.`
182
+ );
183
+ }
184
+ }
185
+ return segments;
186
+ }
187
+ async function listRouteCandidates(dir, extensions) {
188
+ if (!fs.existsSync(dir)) return [];
189
+ const { glob } = await import("tinyglobby");
190
+ const names = extensions.map((extension) => extension.slice(1)).join(",");
191
+ const files = await glob(`**/*.{${names}}`, {
192
+ cwd: dir,
193
+ expandDirectories: false,
194
+ ignore: ["**/node_modules/**"]
195
+ });
196
+ return files.map((file) => file.replace(/\\/g, "/")).sort();
197
+ }
198
+
199
+ // src/routing/generate-route-types.ts
200
+ function routeSegmentsToTsTypeLiteral(segments) {
201
+ if (segments.length === 0) return '"/"';
202
+ const hasDynamic = segments.some((s) => s.startsWith("["));
203
+ if (!hasDynamic) return JSON.stringify("/" + segments.join("/"));
204
+ const parts = segments.map((s) => {
205
+ if (s.startsWith("[[...") || s.startsWith("[...")) return "${string}";
206
+ if (s.startsWith("[")) return "${string}";
207
+ return s;
208
+ });
209
+ return "`/" + parts.join("/") + "`";
210
+ }
211
+ function routePatternToTsTypeLiterals(pattern) {
212
+ if (pattern === "/") return ['"/"'];
213
+ let variants = [[]];
214
+ for (const segment of pattern.slice(1).split("/").filter(Boolean)) {
215
+ if (segment.startsWith("[[...") && segment.endsWith("]]")) {
216
+ variants = variants.flatMap((parts) => [parts, [...parts, segment]]);
217
+ } else {
218
+ variants = variants.map((parts) => [...parts, segment]);
219
+ }
220
+ }
221
+ return variants.map(routeSegmentsToTsTypeLiteral);
222
+ }
223
+ function routePatternToRouteLiteral(pattern) {
224
+ return JSON.stringify(pattern);
225
+ }
226
+ function renderTypeUnion(values) {
227
+ return values.length <= 1 ? values[0] || "never" : `
228
+ | ${values.join("\n | ")}`;
229
+ }
230
+ function renderTypeAlias(name, value) {
231
+ return `export type ${name} =${value.startsWith("\n") ? "" : " "}${value};`;
232
+ }
233
+ function createRoutePattern(route) {
234
+ if (route.segments.length === 0) return "/";
235
+ return "/" + route.segments.map((seg) => {
236
+ if (!seg.isDynamic) return seg.segment;
237
+ if (seg.isCatchAll) return seg.isOptional ? `[[...${seg.segment}]]` : `[...${seg.segment}]`;
238
+ return `[${seg.segment}]`;
239
+ }).join("/");
240
+ }
241
+ var DEFAULT_OUT_FILE = "farm-routes.d.ts";
242
+ async function generateRouteTypes(options) {
243
+ const root = path2.resolve(options.root);
244
+ const srcDir = options.srcDir || "src";
245
+ const outFile = options.outFile || DEFAULT_OUT_FILE;
246
+ const outPath = path2.isAbsolute(outFile) ? outFile : path2.join(root, srcDir, outFile);
247
+ const content = await createRouteTypeDeclarations(options, outPath);
248
+ fs2.mkdirSync(path2.dirname(outPath), { recursive: true });
249
+ writeFileIfChanged(outPath, content);
250
+ return outPath;
251
+ }
252
+ async function createRouteTypeDeclarations(options, outPath) {
253
+ const { extraRoutes = [], suppressLintOnLink = false } = options;
254
+ const { pages: patterns, modules: routeModulePatterns } = await scanRoutePatterns(options);
255
+ for (const route of extraRoutes) {
256
+ if (route.startsWith("/")) {
257
+ patterns.add(route);
258
+ routeModulePatterns.add(route);
259
+ }
260
+ }
261
+ const sortedPatterns = Array.from(patterns).sort();
262
+ const typeLiterals = Array.from(new Set(sortedPatterns.flatMap(routePatternToTsTypeLiterals)));
263
+ const patternLiterals = sortedPatterns.map(routePatternToRouteLiteral);
264
+ const routeModulePatternLiterals = Array.from(routeModulePatterns).sort().map(routePatternToRouteLiteral);
265
+ const routePathType = suppressLintOnLink ? "string" : renderTypeUnion(typeLiterals);
266
+ const routePatternType = suppressLintOnLink ? "string" : renderTypeUnion(patternLiterals);
267
+ const routeModulePatternType = renderTypeUnion(routeModulePatternLiterals);
268
+ const routeTypesImportPath = `./${path2.basename(outPath).replace(/\.d\.ts$/, "")}`;
269
+ const linkAugmentationBlock = suppressLintOnLink ? "" : `
270
+ declare module "@farm.js/core/client" {
271
+ interface LinkDefaultRoute {
272
+ _: import(${JSON.stringify(routeTypesImportPath)}).RoutePath;
273
+ pattern: import(${JSON.stringify(routeTypesImportPath)}).RoutePattern;
274
+ }
275
+ }
276
+
277
+ declare module "@farm.js/core" {
278
+ interface LinkDefaultRoute {
279
+ _: import(${JSON.stringify(routeTypesImportPath)}).RoutePath;
280
+ pattern: import(${JSON.stringify(routeTypesImportPath)}).RoutePattern;
281
+ }
282
+ // Ensure root import ("@farm.js/core") uses the same typed Link signature as client entry.
283
+ const Link: typeof import("@farm.js/core/client").Link;
284
+ }
285
+
286
+ // Internal declaration path used by @farm.js/core root type re-exports.
287
+ declare module "@farm.js/core/dist/client.js" {
288
+ interface LinkDefaultRoute {
289
+ _: import(${JSON.stringify(routeTypesImportPath)}).RoutePath;
290
+ pattern: import(${JSON.stringify(routeTypesImportPath)}).RoutePattern;
291
+ }
292
+ }
293
+ `;
294
+ const routeModuleAugmentationBlock = `
295
+ declare global {
296
+ namespace FarmJS {
297
+ interface RouteRegistry {
298
+ pattern: import(${JSON.stringify(routeTypesImportPath)}).RouteModulePattern;
299
+ }
300
+ }
301
+ }
302
+ `;
303
+ const content = `/**
304
+ * Auto-generated route types from src/app.
305
+ * Link href and route component props are typed automatically from generated declarations.
306
+ * Regenerated on dev start and when routes change.
307
+ * Set suppressLintOnLink: true in farm.config.ts to accept any string on Link href.
308
+ */
309
+ ${renderTypeAlias("RoutePath", routePathType)}
310
+ ${renderTypeAlias("RoutePattern", routePatternType)}
311
+ ${renderTypeAlias("RouteModulePattern", routeModulePatternType)}${linkAugmentationBlock}${routeModuleAugmentationBlock}
312
+ `;
313
+ return content;
314
+ }
315
+ var PLATFORM_FILE = /^(?:(page|layout)\.(native|ios|android)\.(?:tsx|ts|jsx|js)|page\.(kt|swift))$/;
316
+ async function scanRoutePatterns(options) {
317
+ const { root, srcDir = "src" } = options;
318
+ const sourceRoots = options.sourceRoots ?? [{ name: "project", root, srcDir, layer: false }];
319
+ const componentExtensions = resolveFarmComponentExtensions(options.componentExtensions).map(
320
+ (extension) => extension.slice(1)
321
+ );
322
+ const pages = /* @__PURE__ */ new Set();
323
+ const modules = /* @__PURE__ */ new Set();
324
+ const pageFiles = /* @__PURE__ */ new Map();
325
+ const nativePages = /* @__PURE__ */ new Map();
326
+ const nativeLayouts = /* @__PURE__ */ new Map();
327
+ const { glob } = await import("tinyglobby");
328
+ for (const source of sourceRoots) {
329
+ const appDir = path2.join(source.root, source.srcDir, "app");
330
+ const rendererRoutes = options.renderer ? await resolveFarmRendererRoutes({
331
+ renderer: options.renderer,
332
+ root: source.root,
333
+ srcDir: source.srcDir
334
+ }) : null;
335
+ if (rendererRoutes) {
336
+ for (const entry of rendererRoutes.entries) {
337
+ if (entry.kind === "not-found") continue;
338
+ const pattern = createRoutePattern(parseRoutePath(entry.routeFile));
339
+ modules.add(pattern);
340
+ if (entry.kind === "page") {
341
+ pages.add(pattern);
342
+ if (options.platformFiles) pageFiles.set(pattern, entry.modulePath);
343
+ }
344
+ }
345
+ }
346
+ if (fs2.existsSync(appDir)) {
347
+ const routeModuleFiles = rendererRoutes ? [] : await glob(`**/{page,layout,loading,error}.{${componentExtensions.join(",")},md,mdx}`, {
348
+ cwd: appDir,
349
+ expandDirectories: false
350
+ });
351
+ for (const file of routeModuleFiles) {
352
+ if (parseRouteSlotFile(file)) continue;
353
+ const route = parseRoutePath(file);
354
+ const pattern = createRoutePattern(route);
355
+ modules.add(pattern);
356
+ if (route.type === "page") {
357
+ pages.add(pattern);
358
+ if (options.platformFiles) pageFiles.set(pattern, path2.join(appDir, file));
359
+ }
360
+ }
361
+ if (options.platformFiles) {
362
+ scanPlatformRouteFiles(
363
+ appDir,
364
+ await glob(
365
+ ["**/{page,layout}.{native,ios,android}.{tsx,ts,jsx,js}", "**/page.{kt,swift}"],
366
+ { cwd: appDir, expandDirectories: false }
367
+ ),
368
+ nativePages,
369
+ nativeLayouts
370
+ );
371
+ }
372
+ }
373
+ for (const route of await discoverProgrammaticRoutePaths(source.root, source.srcDir)) {
374
+ pages.add(route);
375
+ modules.add(route);
376
+ }
377
+ }
378
+ if (!options.platformFiles) return { pages, modules };
379
+ const nativeOnlyPages = /* @__PURE__ */ new Set();
380
+ for (const [pattern, files] of nativePages) {
381
+ if (pages.has(pattern)) continue;
382
+ if (files.native) {
383
+ nativeOnlyPages.add(pattern);
384
+ continue;
385
+ }
386
+ const file = path2.relative(root, Object.values(files)[0]);
387
+ const dir = path2.dirname(file);
388
+ throw new Error(
389
+ `${file.replace(/\\/g, "/")} has no web page next to it. Add ${path2.join(dir, "page.tsx").replace(/\\/g, "/")} (the route's web screen and fallback), or ${path2.join(dir, "page.native.tsx").replace(/\\/g, "/")} to make the route native-only on both OSes.`
390
+ );
391
+ }
392
+ return { pages, modules, pageFiles, nativePages, nativeLayouts, nativeOnlyPages };
393
+ }
394
+ function scanPlatformRouteFiles(appDir, files, nativePages, nativeLayouts) {
395
+ const seen = /* @__PURE__ */ new Map();
396
+ for (const file of [...files].sort()) {
397
+ const normalized = file.replace(/\\/g, "/");
398
+ const match = PLATFORM_FILE.exec(path2.posix.basename(normalized));
399
+ if (!match) continue;
400
+ const kind = match[1] ?? "page";
401
+ const platform = match[2] ?? match[3];
402
+ const twin = path2.posix.join(path2.posix.dirname(normalized), `${kind}.tsx`);
403
+ if (kind === "page" && parseRouteSlotFile(twin)) continue;
404
+ const dir = path2.posix.dirname(normalized);
405
+ const pattern = kind === "page" ? createRoutePattern(parseRoutePath(twin)) : dir === "." ? "/" : `/${dir}`;
406
+ const key = `${kind}\0${pattern}\0${platform}`;
407
+ const previous = seen.get(key);
408
+ if (previous) {
409
+ throw new Error(
410
+ `Duplicate ${platform} ${kind} for "${pattern}": found ${previous} and ${normalized} in ${appDir}. Keep one.`
411
+ );
412
+ }
413
+ seen.set(key, normalized);
414
+ const target = kind === "page" ? nativePages : nativeLayouts;
415
+ const entry = { ...target.get(pattern) };
416
+ entry[platform] = path2.join(appDir, normalized);
417
+ target.set(pattern, entry);
418
+ }
419
+ }
420
+
421
+ export {
422
+ resolveFarmRendererRoutes,
423
+ generateRouteTypes,
424
+ createRouteTypeDeclarations,
425
+ scanRoutePatterns
426
+ };
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-D2VAANBS.mjs";
19
19
  import {
20
20
  FARM_VERSION
21
- } from "./chunk-D77OGI6X.mjs";
21
+ } from "./chunk-NKVBWPXR.mjs";
22
22
 
23
23
  // src/mobile/analyzer.ts
24
24
  import { createHash } from "crypto";
@@ -0,0 +1,30 @@
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; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkJ6RFB324cjs = require('./chunk-J6RFB324.cjs');
4
+
5
+ // src/islands-action-call.ts
6
+ var actionClient;
7
+ function loadFarmIslandsActionClient() {
8
+ return _nullishCoalesce(actionClient, () => ( (actionClient = import("./internal/islands-action-client.cjs").catch((error) => {
9
+ actionClient = void 0;
10
+ throw error;
11
+ }))));
12
+ }
13
+ function preloadFarmIslandsActionClient() {
14
+ loadFarmIslandsActionClient().catch(() => {
15
+ });
16
+ }
17
+ var farmIslandsLazyActionInterceptor = (call, next) => {
18
+ const invocation = _chunkJ6RFB324cjs.beginFarmServerQueryAction.call(void 0, call.id, call.args);
19
+ const response = next();
20
+ response.catch(() => {
21
+ });
22
+ return loadFarmIslandsActionClient().then(
23
+ (client) => client.completeFarmIslandsAction(invocation, response)
24
+ );
25
+ };
26
+
27
+
28
+
29
+
30
+ exports.preloadFarmIslandsActionClient = preloadFarmIslandsActionClient; exports.farmIslandsLazyActionInterceptor = farmIslandsLazyActionInterceptor;
@@ -1,8 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
+ var _chunkIZYFP7INcjs = require('./chunk-IZYFP7IN.cjs');
4
5
 
5
- var _chunkEX6ZSN5Pcjs = require('./chunk-EX6ZSN5P.cjs');
6
+
7
+ var _chunkJ6RFB324cjs = require('./chunk-J6RFB324.cjs');
6
8
 
7
9
 
8
10
  var _chunkCKPTIEDXcjs = require('./chunk-CKPTIEDX.cjs');
@@ -30,11 +32,10 @@ function createFarmServerFnTransportError(value) {
30
32
  error.name = "ServerActionError";
31
33
  return error;
32
34
  }
33
- var farmIslandsActionInterceptor = async (call, next) => {
34
- const invocation = _chunkEX6ZSN5Pcjs.beginFarmServerQueryAction.call(void 0, call.id, call.args);
35
+ async function completeFarmIslandsAction(invocation, response) {
35
36
  let result;
36
37
  try {
37
- result = await next();
38
+ result = await response;
38
39
  } catch (error2) {
39
40
  if (error2 instanceof Error && error2.message.startsWith("Server action failed")) {
40
41
  throw createFarmServerFnTransportError(void 0);
@@ -43,12 +44,18 @@ var farmIslandsActionInterceptor = async (call, next) => {
43
44
  }
44
45
  if (!_chunkCKPTIEDXcjs.isFarmIslandsActionResult.call(void 0, result)) return result;
45
46
  const { invalidations, error } = result.__farmAction;
46
- if (_chunkEX6ZSN5Pcjs.shouldApplyFarmServerQueryActionResult.call(void 0, invocation))
47
+ if (_chunkIZYFP7INcjs.shouldApplyFarmServerQueryActionResult.call(void 0, invocation))
47
48
  _chunkUZCMMJJTcjs.applyFarmCacheInvalidations.call(void 0, invalidations);
48
49
  if (error) throw createFarmServerFnTransportError(error);
49
- return _chunkEX6ZSN5Pcjs.completeFarmServerQueryAction.call(void 0, invocation, result.value);
50
- };
50
+ return _chunkIZYFP7INcjs.completeFarmServerQueryAction.call(void 0, invocation, result.value);
51
+ }
52
+ var farmIslandsActionInterceptor = (call, next) => (
53
+ // Taken when the call is made: a server query reads the call it is making at that moment.
54
+ completeFarmIslandsAction(_chunkJ6RFB324cjs.beginFarmServerQueryAction.call(void 0, call.id, call.args), next())
55
+ );
56
+
57
+
51
58
 
52
59
 
53
60
 
54
- exports.farmIslandsActionInterceptor = farmIslandsActionInterceptor;
61
+ exports.createFarmServerFnTransportError = createFarmServerFnTransportError; exports.completeFarmIslandsAction = completeFarmIslandsAction; exports.farmIslandsActionInterceptor = farmIslandsActionInterceptor;
@@ -9,6 +9,9 @@ var _chunkSHIWRBFIcjs = require('./chunk-SHIWRBFI.cjs');
9
9
 
10
10
  var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
11
11
 
12
+ // src/preview-request.ts
13
+ var FARM_PREVIEW_REQUEST_HEADER = "x-farm-preview";
14
+
12
15
  // src/cron.ts
13
16
  var DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
14
17
  var FARM_CRON_MANIFEST = "cron-manifest.json";
@@ -200,7 +203,9 @@ function isCronRequestAuthorized(request, options = {}) {
200
203
  const secretEnv = options.secretEnv || DEFAULT_FARM_CRON_SECRET_ENV;
201
204
  const secret = options.secret || _chunk2KMIJDY6cjs.readFarmEnvironmentValue.call(void 0, secretEnv);
202
205
  if (!secret) {
203
- return options.allowUnsecured === true || !_chunk2KMIJDY6cjs.getFarmRuntimeBindings.call(void 0, ) && isExplicitDevelopmentEnv();
206
+ return options.allowUnsecured === true || !_chunk2KMIJDY6cjs.getFarmRuntimeBindings.call(void 0, ) && isExplicitDevelopmentEnv() && // Development stays open for the developer's own machine, not for visitors to a
207
+ // `farm preview` URL. The preview marks every request it tunnels in.
208
+ !request.headers.get(FARM_PREVIEW_REQUEST_HEADER);
204
209
  }
205
210
  const authorization = request.headers.get("authorization") || "";
206
211
  const bearer = _optionalChain([/^Bearer (.*)$/i, 'access', _ => _.exec, 'call', _2 => _2(authorization), 'optionalAccess', _3 => _3[1]]) || "";
@@ -677,4 +682,5 @@ function safeFileName(value) {
677
682
 
678
683
 
679
684
 
680
- exports.DEFAULT_FARM_CRON_SECRET_ENV = DEFAULT_FARM_CRON_SECRET_ENV; exports.FARM_CRON_MANIFEST = FARM_CRON_MANIFEST; exports.resolveCronConfig = resolveCronConfig; exports.prepareFarmCronForNitro = prepareFarmCronForNitro; exports.createFarmCronManifest = createFarmCronManifest; exports.createFarmCronVercelCrons = createFarmCronVercelCrons; exports.applyFarmCronVercelCrons = applyFarmCronVercelCrons; exports.createFarmCronCloudflareTriggers = createFarmCronCloudflareTriggers; exports.toFarmCronCloudflareSchedule = toFarmCronCloudflareSchedule; exports.toFarmCronCloudflareScheduledTasks = toFarmCronCloudflareScheduledTasks; exports.createFarmCronCloudflareConfig = createFarmCronCloudflareConfig; exports.mergeScheduledTasks = mergeScheduledTasks; exports.isCronRequestAuthorized = isCronRequestAuthorized; exports.FARM_CRON_SIGNATURE_HEADER = FARM_CRON_SIGNATURE_HEADER; exports.farmCronSignature = farmCronSignature; exports.authorizeCronRequest = authorizeCronRequest; exports.cronRoute = cronRoute; exports.FARM_CRON_NAME_SEGMENT_PATTERN = FARM_CRON_NAME_SEGMENT_PATTERN; exports.normalizeCronExpression = normalizeCronExpression;
685
+
686
+ exports.FARM_PREVIEW_REQUEST_HEADER = FARM_PREVIEW_REQUEST_HEADER; exports.DEFAULT_FARM_CRON_SECRET_ENV = DEFAULT_FARM_CRON_SECRET_ENV; exports.FARM_CRON_MANIFEST = FARM_CRON_MANIFEST; exports.resolveCronConfig = resolveCronConfig; exports.prepareFarmCronForNitro = prepareFarmCronForNitro; exports.createFarmCronManifest = createFarmCronManifest; exports.createFarmCronVercelCrons = createFarmCronVercelCrons; exports.applyFarmCronVercelCrons = applyFarmCronVercelCrons; exports.createFarmCronCloudflareTriggers = createFarmCronCloudflareTriggers; exports.toFarmCronCloudflareSchedule = toFarmCronCloudflareSchedule; exports.toFarmCronCloudflareScheduledTasks = toFarmCronCloudflareScheduledTasks; exports.createFarmCronCloudflareConfig = createFarmCronCloudflareConfig; exports.mergeScheduledTasks = mergeScheduledTasks; exports.isCronRequestAuthorized = isCronRequestAuthorized; exports.FARM_CRON_SIGNATURE_HEADER = FARM_CRON_SIGNATURE_HEADER; exports.farmCronSignature = farmCronSignature; exports.authorizeCronRequest = authorizeCronRequest; exports.cronRoute = cronRoute; exports.FARM_CRON_NAME_SEGMENT_PATTERN = FARM_CRON_NAME_SEGMENT_PATTERN; exports.normalizeCronExpression = normalizeCronExpression;
@@ -1,7 +1,7 @@
1
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; } } 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
3
 
4
- var _chunkAHVF5GI2cjs = require('./chunk-AHVF5GI2.cjs');
4
+ var _chunk5X5GJU5Acjs = require('./chunk-5X5GJU5A.cjs');
5
5
 
6
6
 
7
7
  var _chunkA4WWKG2Bcjs = require('./chunk-A4WWKG2B.cjs');
@@ -812,9 +812,10 @@ async function generateFarmTypeArtifacts(options) {
812
812
  extraRoutes: options.extraRoutes || [],
813
813
  suppressLintOnLink: options.suppressLintOnLink,
814
814
  componentExtensions: options.componentExtensions,
815
+ renderer: options.renderer,
815
816
  sourceRoots
816
817
  };
817
- unifiedSections.push(await _chunkAHVF5GI2cjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
818
+ unifiedSections.push(await _chunk5X5GJU5Acjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
818
819
  result.routeTypesPath = unifiedTypesPath;
819
820
  } else if (shouldGenerateRoutes) {
820
821
  const routeOptions = {
@@ -824,15 +825,16 @@ async function generateFarmTypeArtifacts(options) {
824
825
  extraRoutes: options.extraRoutes || [],
825
826
  suppressLintOnLink: options.suppressLintOnLink,
826
827
  componentExtensions: options.componentExtensions,
828
+ renderer: options.renderer,
827
829
  sourceRoots
828
830
  };
829
831
  if (options.check) {
830
832
  const routeTypesPath = resolveGeneratedPath(root, srcDir, options.routeTypesOutFile);
831
- const content = await _chunkAHVF5GI2cjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
833
+ const content = await _chunk5X5GJU5Acjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
832
834
  checkGeneratedFile(routeTypesPath, content, result.stalePaths);
833
835
  result.routeTypesPath = routeTypesPath;
834
836
  } else {
835
- result.routeTypesPath = await _chunkAHVF5GI2cjs.generateRouteTypes.call(void 0, routeOptions);
837
+ result.routeTypesPath = await _chunk5X5GJU5Acjs.generateRouteTypes.call(void 0, routeOptions);
836
838
  }
837
839
  }
838
840
  if (shouldGenerateApi) {
@@ -62,43 +62,9 @@ function describeIntegrationOriginRejection(reason) {
62
62
  }
63
63
  }
64
64
 
65
- // src/api/route-schema.ts
66
- async function parseRouteSchema(schema, value) {
67
- if (schema.parseAsync) return schema.parseAsync(value);
68
- if (schema["~standard"]) {
69
- const result = await schema["~standard"].validate(value);
70
- if (result.issues)
71
- throw Object.assign(new Error("Validation failed"), { issues: result.issues });
72
- return result.value;
73
- }
74
- if (schema.parse) return schema.parse(value);
75
- throw new TypeError("Route validators must implement Standard Schema or parse().");
76
- }
77
- var PUBLIC_MESSAGE_CODES = /* @__PURE__ */ new Set(["custom", "invalid_type"]);
78
- function toPublicValidationIssues(error) {
79
- const issues = _optionalChain([error, 'optionalAccess', _18 => _18.issues]);
80
- const list = Array.isArray(issues) ? issues : Array.isArray(_optionalChain([error, 'optionalAccess', _19 => _19.errors])) ? error.errors : [];
81
- return list.map((issue) => {
82
- const { path, code, message } = _nullishCoalesce(issue, () => ( {}));
83
- return {
84
- path: Array.isArray(path) ? path.map(toPublicPathSegment) : [],
85
- ...typeof code === "string" ? { code } : {},
86
- message: PUBLIC_MESSAGE_CODES.has(code) && typeof message === "string" && message ? message : "Invalid value"
87
- };
88
- });
89
- }
90
- function toPublicPathSegment(segment) {
91
- const key = segment && typeof segment === "object" && "key" in segment ? segment.key : segment;
92
- if (typeof key === "number") return key;
93
- if (typeof key === "symbol") return key.description || key.toString();
94
- return String(key);
95
- }
96
-
97
-
98
-
99
65
 
100
66
 
101
67
 
102
68
 
103
69
 
104
- exports.resolveIntegrationAllowedOrigins = resolveIntegrationAllowedOrigins; exports.validateIntegrationRequestOrigin = validateIntegrationRequestOrigin; exports.rejectCrossSiteNonJSONBody = rejectCrossSiteNonJSONBody; exports.describeIntegrationOriginRejection = describeIntegrationOriginRejection; exports.parseRouteSchema = parseRouteSchema; exports.toPublicValidationIssues = toPublicValidationIssues;
70
+ exports.resolveIntegrationAllowedOrigins = resolveIntegrationAllowedOrigins; exports.validateIntegrationRequestOrigin = validateIntegrationRequestOrigin; exports.rejectCrossSiteNonJSONBody = rejectCrossSiteNonJSONBody; exports.describeIntegrationOriginRejection = describeIntegrationOriginRejection;
@@ -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 _chunkNSLRK5DKcjs = require('./chunk-NSLRK5DK.cjs');
3
+ var _chunk3CZ4MJHWcjs = require('./chunk-3CZ4MJHW.cjs');
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -90,7 +90,7 @@ function createFarmProductionSiteReporter(options) {
90
90
  schemaVersion: FARM_PRODUCTION_SITE_TELEMETRY_SCHEMA_VERSION,
91
91
  eventType: FARM_PRODUCTION_SITE_ATTESTATION_EVENT_TYPE,
92
92
  packageName: FARM_PRODUCTION_SITE_TELEMETRY_PACKAGE_NAME,
93
- packageVersion: sanitizeDetail(_chunkNSLRK5DKcjs.FARM_VERSION, "unknown"),
93
+ packageVersion: sanitizeDetail(_chunk3CZ4MJHWcjs.FARM_VERSION, "unknown"),
94
94
  renderer: sanitizeDetail(options.renderer, "custom"),
95
95
  deployTarget: sanitizeDetail(options.deployTarget, "custom")
96
96
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRouteTypeDeclarations,
3
3
  generateRouteTypes
4
- } from "./chunk-ONSZP5JK.mjs";
4
+ } from "./chunk-ELNRKD4V.mjs";
5
5
  import {
6
6
  APITypeGenerator
7
7
  } from "./chunk-HQ2VAJLW.mjs";
@@ -812,6 +812,7 @@ async function generateFarmTypeArtifacts(options) {
812
812
  extraRoutes: options.extraRoutes || [],
813
813
  suppressLintOnLink: options.suppressLintOnLink,
814
814
  componentExtensions: options.componentExtensions,
815
+ renderer: options.renderer,
815
816
  sourceRoots
816
817
  };
817
818
  unifiedSections.push(await createRouteTypeDeclarations(routeOptions, unifiedTypesPath));
@@ -824,6 +825,7 @@ async function generateFarmTypeArtifacts(options) {
824
825
  extraRoutes: options.extraRoutes || [],
825
826
  suppressLintOnLink: options.suppressLintOnLink,
826
827
  componentExtensions: options.componentExtensions,
828
+ renderer: options.renderer,
827
829
  sourceRoots
828
830
  };
829
831
  if (options.check) {