@farm.js/core 0.2.0 → 0.2.3

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 (237) hide show
  1. package/dist/{agent-mcp.d-xPua9Zdz.d.ts → agent-mcp.d-DuZjglYX.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DhZf5-v0.d.mts → agent-mcp.d-gI3ahrF6.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +4 -4
  4. package/dist/agent-runtime.d.ts +4 -4
  5. package/dist/analyzer-5RSMYPWD.cjs +17 -0
  6. package/dist/{analyzer-LQ4LVDCW.mjs → analyzer-7TNBOI3J.mjs} +2 -2
  7. package/dist/api/node.d.mts +6 -6
  8. package/dist/api/node.d.ts +6 -6
  9. package/dist/api/route-manager.cjs +5 -5
  10. package/dist/api/route-manager.d.mts +6 -6
  11. package/dist/api/route-manager.d.ts +6 -6
  12. package/dist/api/route-manager.mjs +4 -4
  13. package/dist/api/runtime.d.mts +5 -5
  14. package/dist/api/runtime.d.ts +5 -5
  15. package/dist/api.cjs +6 -6
  16. package/dist/api.d.mts +7 -7
  17. package/dist/api.d.ts +7 -7
  18. package/dist/api.mjs +5 -5
  19. package/dist/{app-manifest.d-D6l1Wkn6.d.ts → app-manifest.d-B3h89j6a.d.ts} +1 -1
  20. package/dist/{app-manifest.d-Bq9VWtpk.d.mts → app-manifest.d-bHK9EGPI.d.mts} +1 -1
  21. package/dist/app-markdown.d.mts +5 -5
  22. package/dist/app-markdown.d.ts +5 -5
  23. package/dist/{app.d-gnTrW72o.d.ts → app.d-C3uyET_L.d.ts} +4 -4
  24. package/dist/{app.d-Bn1bqBkf.d.mts → app.d-Cr7fXGvJ.d.mts} +4 -4
  25. package/dist/{chunk-MEIZIRMK.mjs → chunk-2FKGY2ZS.mjs} +1 -1
  26. package/dist/{chunk-YOVSWY2E.mjs → chunk-2XDRRAAD.mjs} +1 -1
  27. package/dist/{chunk-GAD63TH7.mjs → chunk-4WCEWA22.mjs} +4 -4
  28. package/dist/{chunk-YQXLBYY2.cjs → chunk-5B2Y4EVS.cjs} +32 -8
  29. package/dist/{chunk-QCVP22KW.cjs → chunk-5RYBQKBY.cjs} +3 -3
  30. package/dist/{chunk-VFZQXADS.cjs → chunk-6QWBZGGP.cjs} +139 -137
  31. package/dist/{chunk-DVL3UVYT.mjs → chunk-6XABTMXR.mjs} +2 -2
  32. package/dist/{chunk-RDT2LJES.mjs → chunk-6YOMQ4GX.mjs} +9 -9
  33. package/dist/chunk-7QGA6UX6.cjs +26 -0
  34. package/dist/{chunk-LGL5QKUJ.cjs → chunk-A4WDDASS.cjs} +2 -2
  35. package/dist/{chunk-V36K4TSU.mjs → chunk-ADKPJZPP.mjs} +1 -1
  36. package/dist/{chunk-LQZXCSYG.mjs → chunk-B6K2ZM3C.mjs} +5 -3
  37. package/dist/{chunk-Z7YIQ7AJ.cjs → chunk-C2J5LMH6.cjs} +1 -1
  38. package/dist/{chunk-D7KBMJ7L.mjs → chunk-CIRC2LRP.mjs} +1 -1
  39. package/dist/{chunk-RMLXUVR5.cjs → chunk-CS6GXE42.cjs} +91 -21
  40. package/dist/{chunk-DNERKYN4.cjs → chunk-CSCORWIQ.cjs} +15 -15
  41. package/dist/{chunk-GK2RCRT2.mjs → chunk-CTHQE7DO.mjs} +1 -1
  42. package/dist/{chunk-PRKFECGT.cjs → chunk-DZWX7FDX.cjs} +6 -4
  43. package/dist/{chunk-ZVEKOMZS.mjs → chunk-ERY4VYUH.mjs} +1 -1
  44. package/dist/{chunk-4ER5KYSC.cjs → chunk-F6JSVP5C.cjs} +3 -3
  45. package/dist/chunk-G7LNCHTS.mjs +21 -0
  46. package/dist/{chunk-ZCT6B5PQ.cjs → chunk-GWFNJLDN.cjs} +11 -11
  47. package/dist/{chunk-O47IT4CS.cjs → chunk-H7DAFRYR.cjs} +4 -4
  48. package/dist/{chunk-MX4G24YS.mjs → chunk-HOBCEE5J.mjs} +17 -15
  49. package/dist/{chunk-ZF7N222A.mjs → chunk-IPKL7L6B.mjs} +2 -2
  50. package/dist/{chunk-54INSSWI.mjs → chunk-IQQ3SWH6.mjs} +99 -56
  51. package/dist/{chunk-MUQP2APN.cjs → chunk-JJUHUPRB.cjs} +2 -2
  52. package/dist/{chunk-2LHO4HTP.cjs → chunk-K7RXZ77U.cjs} +2 -2
  53. package/dist/{chunk-SIHHYNX4.mjs → chunk-KJMRW3IP.mjs} +1 -1
  54. package/dist/{chunk-PYPHM7AS.cjs → chunk-LH7S7FI3.cjs} +5 -1
  55. package/dist/chunk-O77EKGAS.mjs +36 -0
  56. package/dist/{chunk-WXPY5FRF.cjs → chunk-P2PF5FUW.cjs} +2 -2
  57. package/dist/{chunk-WOPQQCP3.mjs → chunk-P3UT3OLV.mjs} +3 -3
  58. package/dist/{chunk-PZ5ZJAAO.mjs → chunk-POCWXRXW.mjs} +1 -1
  59. package/dist/{chunk-Z23OCU33.cjs → chunk-RF3VCNV7.cjs} +6 -6
  60. package/dist/{chunk-MLMDOIBY.mjs → chunk-RS4QZOFK.mjs} +3 -3
  61. package/dist/{chunk-MZG5M4JS.cjs → chunk-SO4USIKL.cjs} +4 -4
  62. package/dist/{chunk-HYYOVRED.mjs → chunk-SPVXL37B.mjs} +1 -1
  63. package/dist/{chunk-VWPGK6UV.cjs → chunk-TAXZQNFZ.cjs} +74 -74
  64. package/dist/{chunk-KKXGBQ2K.mjs → chunk-UKGAP2OK.mjs} +4 -4
  65. package/dist/{chunk-DZXD6CYJ.mjs → chunk-V2RXBDV6.mjs} +4 -0
  66. package/dist/{chunk-FFROR7QD.mjs → chunk-VZRY3CL5.mjs} +1 -1
  67. package/dist/{chunk-LO5BNR6Y.mjs → chunk-W5T3ZAFU.mjs} +25 -1
  68. package/dist/{chunk-ADCVSTFV.cjs → chunk-WAQIO2VD.cjs} +2 -2
  69. package/dist/{chunk-JKNQMGZE.cjs → chunk-WFL7CD5C.cjs} +12 -12
  70. package/dist/{chunk-KJW6KEOZ.mjs → chunk-WRT775N6.mjs} +92 -22
  71. package/dist/{chunk-RP55BUJM.mjs → chunk-XGBDRC5B.mjs} +2 -2
  72. package/dist/{chunk-J6JAUJPC.cjs → chunk-XLJ2REOI.cjs} +385 -342
  73. package/dist/{chunk-ZTNU4XCC.cjs → chunk-Y3MTKPLN.cjs} +7 -7
  74. package/dist/{chunk-MNBFSAWF.cjs → chunk-YCGOQKVC.cjs} +20 -1
  75. package/dist/{chunk-T4VF6BYV.cjs → chunk-YPPAYYSX.cjs} +6 -6
  76. package/dist/{chunk-PATIHHC7.cjs → chunk-ZQOHL6TX.cjs} +2 -2
  77. package/dist/{client-component.d-DT5OKBZu.d.ts → client-component.d-BavTzqsn.d.ts} +1 -1
  78. package/dist/{client-component.d-34DDMZcl.d.mts → client-component.d-X3j9FOZ2.d.mts} +1 -1
  79. package/dist/{client-plugins.d-D9CnUvZ5.d.ts → client-plugins.d-CqTr5IrQ.d.ts} +64 -4
  80. package/dist/{client-plugins.d-D7k9t9Ge.d.mts → client-plugins.d-DnnAopKG.d.mts} +64 -4
  81. package/dist/client-plugins.d.mts +4 -4
  82. package/dist/client-plugins.d.ts +4 -4
  83. package/dist/client.d.mts +10 -10
  84. package/dist/client.d.ts +10 -10
  85. package/dist/config.d.mts +4 -4
  86. package/dist/config.d.ts +4 -4
  87. package/dist/desktop.cjs +5 -1
  88. package/dist/desktop.d.mts +11 -7
  89. package/dist/desktop.d.ts +11 -7
  90. package/dist/desktop.mjs +4 -0
  91. package/dist/{dev-guard-M3ZCDWCK.cjs → dev-guard-5NUIX6IZ.cjs} +4 -3
  92. package/dist/{dev-guard-TFVWJNIB.mjs → dev-guard-L42ZZRCZ.mjs} +2 -1
  93. package/dist/{devtools-R77KAJA4.mjs → devtools-VPFBH6I2.mjs} +1 -1
  94. package/dist/{devtools-IUU4SWQL.cjs → devtools-YTND2OWT.cjs} +2 -2
  95. package/dist/docs.cjs +3 -3
  96. package/dist/docs.d.mts +6 -6
  97. package/dist/docs.d.ts +6 -6
  98. package/dist/docs.mjs +2 -2
  99. package/dist/environment/vite.cjs +4 -4
  100. package/dist/environment/vite.d.mts +1 -1
  101. package/dist/environment/vite.d.ts +1 -1
  102. package/dist/environment/vite.mjs +3 -3
  103. package/dist/{generate-route-types.d-BFOMM8Ef.d.mts → generate-route-types.d-CAiRw4N0.d.mts} +1 -1
  104. package/dist/{generate-route-types.d-C2m8myHb.d.ts → generate-route-types.d-Dz8MOQ3u.d.ts} +1 -1
  105. package/dist/{handler.d-fxTjv3Nn.d.mts → handler.d-BSlpYCDB.d.mts} +2 -2
  106. package/dist/{handler.d-DbZvbwNi.d.ts → handler.d-DgX7gPO6.d.ts} +2 -2
  107. package/dist/{headers.d-OBHpGTF_.d.mts → headers.d-Cf8l5LMo.d.mts} +1 -1
  108. package/dist/{headers.d-oeWybIk8.d.ts → headers.d-CmxW42R2.d.ts} +1 -1
  109. package/dist/index.cjs +29 -28
  110. package/dist/{index.d-CRrPQwlO.d.mts → index.d-7xoJqKRZ.d.mts} +1 -1
  111. package/dist/{index.d-BM-dKdzH.d.ts → index.d-BZZt7kxO.d.ts} +1 -1
  112. package/dist/index.d.mts +27 -27
  113. package/dist/index.d.ts +27 -27
  114. package/dist/index.mjs +24 -23
  115. package/dist/integrations/orm.d.mts +4 -4
  116. package/dist/integrations/orm.d.ts +4 -4
  117. package/dist/integrations.d.mts +4 -4
  118. package/dist/integrations.d.ts +4 -4
  119. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  120. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  121. package/dist/internal/build-runtime.cjs +24 -23
  122. package/dist/internal/build-runtime.d.mts +7 -7
  123. package/dist/internal/build-runtime.d.ts +7 -7
  124. package/dist/internal/build-runtime.mjs +23 -22
  125. package/dist/internal/cli-runtime.cjs +12 -9
  126. package/dist/internal/cli-runtime.d.mts +20 -12
  127. package/dist/internal/cli-runtime.d.ts +20 -12
  128. package/dist/internal/cli-runtime.mjs +11 -8
  129. package/dist/internal/client-error-overlay.cjs +4 -4
  130. package/dist/internal/client-error-overlay.mjs +1 -1
  131. package/dist/internal/client-runtime.d.mts +8 -8
  132. package/dist/internal/client-runtime.d.ts +8 -8
  133. package/dist/internal/compression-runtime.d.mts +4 -4
  134. package/dist/internal/compression-runtime.d.ts +4 -4
  135. package/dist/internal/config-runtime.cjs +5 -4
  136. package/dist/internal/config-runtime.d.mts +8 -8
  137. package/dist/internal/config-runtime.d.ts +8 -8
  138. package/dist/internal/config-runtime.mjs +4 -3
  139. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  140. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  141. package/dist/internal/native-server-fns.cjs +4 -4
  142. package/dist/internal/native-server-fns.mjs +3 -3
  143. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  144. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  145. package/dist/internal/production-runtime.cjs +4 -4
  146. package/dist/internal/production-runtime.d.mts +13 -13
  147. package/dist/internal/production-runtime.d.ts +13 -13
  148. package/dist/internal/production-runtime.mjs +3 -3
  149. package/dist/internal/spa-router.d.mts +6 -6
  150. package/dist/internal/spa-router.d.ts +6 -6
  151. package/dist/internal/start-manifest.d.mts +4 -4
  152. package/dist/internal/start-manifest.d.ts +4 -4
  153. package/dist/{layers.d-CH0bC4QL.d.mts → layers.d-dNBkiNE9.d.mts} +1 -1
  154. package/dist/{layers.d-CH0bC4QL.d.ts → layers.d-dNBkiNE9.d.ts} +1 -1
  155. package/dist/{manager-STAB5TVZ.cjs → manager-YRIENS63.cjs} +4 -4
  156. package/dist/{manager-EFPBRS3U.mjs → manager-YTJOAHII.mjs} +3 -3
  157. package/dist/markdown.d.mts +4 -4
  158. package/dist/markdown.d.ts +4 -4
  159. package/dist/middleware.d.mts +4 -4
  160. package/dist/middleware.d.ts +4 -4
  161. package/dist/mobile.d.mts +4 -4
  162. package/dist/mobile.d.ts +4 -4
  163. package/dist/{mount.d-TnD-Mebk.d.ts → mount.d-CD-xVBu7.d.ts} +1 -1
  164. package/dist/{mount.d-B7RiwjiO.d.mts → mount.d-Dd0xeRMl.d.mts} +1 -1
  165. package/dist/{navigation-delegate.d-VBCF0EeN.d.ts → navigation-delegate.d-Bses_F-y.d.ts} +1 -1
  166. package/dist/{navigation-delegate.d-Boz2511c.d.mts → navigation-delegate.d-dBNg976E.d.mts} +1 -1
  167. package/dist/navigation.d.mts +7 -7
  168. package/dist/navigation.d.ts +7 -7
  169. package/dist/plugin.cjs +19 -18
  170. package/dist/plugin.d.mts +8 -8
  171. package/dist/plugin.d.ts +8 -8
  172. package/dist/plugin.mjs +18 -17
  173. package/dist/{render-plan.d-BrumV_ZE.d.ts → render-plan.d-DaIwnRK2.d.ts} +1 -1
  174. package/dist/{render-plan.d-BwnmyfNk.d.mts → render-plan.d-vOdZHHLI.d.mts} +1 -1
  175. package/dist/renderer-client.d.mts +8 -8
  176. package/dist/renderer-client.d.ts +8 -8
  177. package/dist/{request.d-Dd5nRTO5.d.mts → request.d-B8U4pVFP.d.mts} +1 -1
  178. package/dist/{request.d-NUi01-5e.d.ts → request.d-CgXp3EEc.d.ts} +1 -1
  179. package/dist/request.d.mts +5 -5
  180. package/dist/request.d.ts +5 -5
  181. package/dist/{route-rendering.d-BK0Pf7_k.d.mts → route-rendering.d-BQvNYQqu.d.mts} +1 -1
  182. package/dist/{route-rendering.d-CJR5BPXV.d.ts → route-rendering.d-Di0AxFix.d.ts} +1 -1
  183. package/dist/{router.d-C-JSFCPU.d.ts → router.d-BJVGhSAJ.d.ts} +1 -1
  184. package/dist/{router.d-CNUS3x1j.d.mts → router.d-hNedVdoB.d.mts} +1 -1
  185. package/dist/routes.cjs +3 -3
  186. package/dist/{routes.d-D7RWvfqL.d.ts → routes.d-CYe98R_8.d.ts} +1 -1
  187. package/dist/{routes.d-BWvpUoYu.d.mts → routes.d-DBGnKaUQ.d.mts} +1 -1
  188. package/dist/routes.d.mts +4 -4
  189. package/dist/routes.d.ts +4 -4
  190. package/dist/routes.mjs +2 -2
  191. package/dist/{rsc-pipeline-DHISDFT7.mjs → rsc-pipeline-2JSNRVIL.mjs} +6 -5
  192. package/dist/{rsc-pipeline-UBWVU3NF.cjs → rsc-pipeline-WTKDMTE2.cjs} +7 -6
  193. package/dist/{runtime-XKRQW3YT.cjs → runtime-I4GV4CDP.cjs} +8 -8
  194. package/dist/{runtime-VUKMY44G.mjs → runtime-RNSTQY27.mjs} +5 -5
  195. package/dist/{runtime.d-B2T4bM5_.d.ts → runtime.d-0R8nHCM6.d.ts} +1 -1
  196. package/dist/{runtime.d-CsOpO6yQ.d.mts → runtime.d-DpeuF_T-.d.mts} +1 -1
  197. package/dist/{cli-runtime.d-LwIb0swO.d.mts → schema-dependencies.d-_Wyey4Wv.d.mts} +21 -13
  198. package/dist/{cli-runtime.d-Vvxf-Z8a.d.ts → schema-dependencies.d-tkUHREqz.d.ts} +21 -13
  199. package/dist/{schema.d-BM-uVGpx.d.mts → schema.d-HlGSe1on.d.mts} +1 -1
  200. package/dist/{schema.d-BM-uVGpx.d.ts → schema.d-HlGSe1on.d.ts} +1 -1
  201. package/dist/schema.d.mts +1 -1
  202. package/dist/schema.d.ts +1 -1
  203. package/dist/{server-components-status.d-DOYt4E_Q.d.ts → server-components-status.d-B2Z5WvO5.d.ts} +2 -2
  204. package/dist/{server-components-status.d-Cc5rir0l.d.mts → server-components-status.d-sN7ju-ie.d.mts} +2 -2
  205. package/dist/server-plugins.d.mts +6 -6
  206. package/dist/server-plugins.d.ts +6 -6
  207. package/dist/server.cjs +46 -45
  208. package/dist/server.d.mts +14 -14
  209. package/dist/server.d.ts +14 -14
  210. package/dist/server.mjs +20 -19
  211. package/dist/{spa-router.d-Cq5UFJvq.d.mts → spa-router.d-D3AtR2Bc.d.mts} +2 -2
  212. package/dist/{spa-router.d-C7FcpLxU.d.ts → spa-router.d-MjT6sGb9.d.ts} +2 -2
  213. package/dist/{ssg.d-BzNZemk7.d.mts → ssg.d-B32Cp_XW.d.mts} +3 -3
  214. package/dist/{ssg.d-DUhacIxj.d.ts → ssg.d-C1SNuPz5.d.ts} +3 -3
  215. package/dist/storage.d.mts +2 -2
  216. package/dist/storage.d.ts +2 -2
  217. package/dist/{store-core.d-BX3yXrxA.d.ts → store-core.d-BZ3YXs70.d.ts} +2 -2
  218. package/dist/{store-core.d-DbUAtSBK.d.mts → store-core.d-BbVdaoA0.d.mts} +2 -2
  219. package/dist/testing.cjs +6 -6
  220. package/dist/testing.d.mts +4 -4
  221. package/dist/testing.d.ts +4 -4
  222. package/dist/testing.mjs +5 -5
  223. package/dist/{types.d-C5hlNbHa.d.mts → types.d-CRiwa0jj.d.mts} +1 -1
  224. package/dist/{types.d-C5hlNbHa.d.ts → types.d-CRiwa0jj.d.ts} +1 -1
  225. package/dist/{utils.d-BhJJEXzo.d.ts → utils.d-Bjbm44fP.d.ts} +1 -1
  226. package/dist/{utils.d-NOMkLFpC.d.mts → utils.d-CoLozp7-.d.mts} +1 -1
  227. package/dist/version.cjs +2 -2
  228. package/dist/version.mjs +1 -1
  229. package/dist/vite.cjs +19 -18
  230. package/dist/vite.d.mts +9 -9
  231. package/dist/vite.d.ts +9 -9
  232. package/dist/vite.mjs +18 -17
  233. package/package.json +1 -1
  234. package/dist/analyzer-ZFC2L6NZ.cjs +0 -17
  235. package/dist/chunk-OZAVCLXY.mjs +0 -17
  236. /package/dist/{chunk-OAAVIFOJ.cjs → chunk-2LGM5WIK.cjs} +0 -0
  237. /package/dist/{chunk-ZRTBDHO2.mjs → chunk-MVNIAD6O.mjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveFarmPlatform
3
- } from "./chunk-LO5BNR6Y.mjs";
3
+ } from "./chunk-W5T3ZAFU.mjs";
4
4
 
5
5
  // src/desktop/dev-guard-plugin.ts
6
6
  function farmDesktopDevGuardPlugin(basePath) {
@@ -12,7 +12,7 @@ function farmDesktopDevGuardPlugin(basePath) {
12
12
  order: "pre",
13
13
  async handler(server) {
14
14
  if (resolveFarmPlatform() !== "desktop") return;
15
- const { createFarmDesktopDevGuard } = await import("./dev-guard-TFVWJNIB.mjs");
15
+ const { createFarmDesktopDevGuard } = await import("./dev-guard-L42ZZRCZ.mjs");
16
16
  server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
17
17
  }
18
18
  }
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  resolveFarmAppClientEntry,
3
3
  resolveFarmClientPlugins
4
- } from "./chunk-V36K4TSU.mjs";
4
+ } from "./chunk-ADKPJZPP.mjs";
5
5
  import {
6
6
  resolveFarmPlatform
7
- } from "./chunk-LO5BNR6Y.mjs";
7
+ } from "./chunk-W5T3ZAFU.mjs";
8
8
  import {
9
9
  collectSSGPages,
10
10
  matchSSGPage,
11
11
  resolveRouteRenderingConfigFromFile
12
- } from "./chunk-MLMDOIBY.mjs";
12
+ } from "./chunk-RS4QZOFK.mjs";
13
13
  import {
14
14
  resolveFarmRendererRoutes
15
- } from "./chunk-PZ5ZJAAO.mjs";
15
+ } from "./chunk-POCWXRXW.mjs";
16
16
  import {
17
17
  findFarmAppPackageDir
18
18
  } from "./chunk-KQXYBJES.mjs";
@@ -59,7 +59,7 @@ import {
59
59
  } from "./chunk-LP6DIYGA.mjs";
60
60
  import {
61
61
  listFarmMCPLlmsTxtLinks
62
- } from "./chunk-ZF7N222A.mjs";
62
+ } from "./chunk-IPKL7L6B.mjs";
63
63
  import {
64
64
  FARM_DEFAULT_MCP_PATH,
65
65
  collectFarmDefaultMCPPages,
@@ -108,7 +108,7 @@ import {
108
108
  usesFarmServerTree,
109
109
  withFarmSourceSnapshot,
110
110
  withFarmSourceSnapshotAside
111
- } from "./chunk-RP55BUJM.mjs";
111
+ } from "./chunk-XGBDRC5B.mjs";
112
112
  import {
113
113
  _setDefaultFarmThemeConfig,
114
114
  getTheme
@@ -234,7 +234,7 @@ import {
234
234
  import {
235
235
  findProgrammaticRouteFiles,
236
236
  loadProgrammaticRouteManifests
237
- } from "./chunk-LQZXCSYG.mjs";
237
+ } from "./chunk-B6K2ZM3C.mjs";
238
238
  import {
239
239
  _runWithFarmI18nRequest,
240
240
  _setDefaultFarmI18nRuntime,
@@ -251,7 +251,7 @@ import {
251
251
  normalizeProgrammaticRoutePath,
252
252
  parseProgrammaticRoutePath,
253
253
  trackProgrammaticRouteSources
254
- } from "./chunk-DZXD6CYJ.mjs";
254
+ } from "./chunk-V2RXBDV6.mjs";
255
255
  import {
256
256
  getFarmRouteRuntimeConfig,
257
257
  mergeFarmRouteRuntimeConfigs,
@@ -312,7 +312,7 @@ import {
312
312
  } from "./chunk-EILUVBKS.mjs";
313
313
  import {
314
314
  FARM_VERSION
315
- } from "./chunk-MEIZIRMK.mjs";
315
+ } from "./chunk-2FKGY2ZS.mjs";
316
316
  import {
317
317
  normalizeFarmAPIConfig
318
318
  } from "./chunk-W6QLRQ3V.mjs";
@@ -0,0 +1,26 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
4
+
5
+ // src/desktop/permissions.ts
6
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
7
+ var FARM_DESKTOP_PERMISSIONS = [
8
+ "microphone",
9
+ "camera",
10
+ "location",
11
+ "speechRecognition",
12
+ "bluetooth",
13
+ "contacts",
14
+ "calendars",
15
+ "reminders",
16
+ "photos",
17
+ "music",
18
+ "motion",
19
+ "documents",
20
+ "downloads",
21
+ "desktop"
22
+ ];
23
+
24
+
25
+
26
+ exports.FARM_DESKTOP_PERMISSIONS = FARM_DESKTOP_PERMISSIONS;
@@ -18,7 +18,7 @@ var _chunkBRWSQDKOcjs = require('./chunk-BRWSQDKO.cjs');
18
18
  var _chunkJ3RIMCBDcjs = require('./chunk-J3RIMCBD.cjs');
19
19
 
20
20
 
21
- var _chunkZ7YIQ7AJcjs = require('./chunk-Z7YIQ7AJ.cjs');
21
+ var _chunkC2J5LMH6cjs = require('./chunk-C2J5LMH6.cjs');
22
22
 
23
23
 
24
24
  var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
@@ -29,7 +29,7 @@ var _crypto = require('crypto');
29
29
  var _fs = require('fs');
30
30
  var _promises = require('fs/promises');
31
31
  var _path = require('path'); var path = _interopRequireWildcard(_path);
32
- var ANALYZER_VERSION = `8:${_chunkZ7YIQ7AJcjs.FARM_VERSION}`;
32
+ var ANALYZER_VERSION = `8:${_chunkC2J5LMH6cjs.FARM_VERSION}`;
33
33
  var INTRINSIC_KINDS = {};
34
34
  for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
35
35
  INTRINSIC_KINDS[tag] = "View";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveFarmPlatform
3
- } from "./chunk-LO5BNR6Y.mjs";
3
+ } from "./chunk-W5T3ZAFU.mjs";
4
4
  import {
5
5
  getFarmIntegrationPluginServerRuntime
6
6
  } from "./chunk-HDZ2AMDD.mjs";
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  PROGRAMMATIC_ROUTE_FILE_NAMES,
3
+ isTestSourceFile,
3
4
  scanProgrammaticPagePaths
4
- } from "./chunk-DZXD6CYJ.mjs";
5
+ } from "./chunk-V2RXBDV6.mjs";
5
6
 
6
7
  // src/routes.server.ts
7
8
  import { existsSync, readFileSync } from "fs";
8
- import { join } from "path";
9
+ import { join, relative } from "path";
9
10
  async function loadProgrammaticRouteManifests(options) {
10
11
  const manifests = [];
11
12
  const routeFiles = findProgrammaticRouteFiles(options.root, options.srcDir);
@@ -53,7 +54,7 @@ async function findProgrammaticRouteSourceFiles(srcRoot) {
53
54
  }
54
55
  try {
55
56
  const { glob } = await import("tinyglobby");
56
- return await glob("**/*.{ts,tsx,js,jsx}", {
57
+ const files = await glob("**/*.{ts,tsx,js,jsx}", {
57
58
  cwd: srcRoot,
58
59
  absolute: true,
59
60
  expandDirectories: false,
@@ -66,6 +67,7 @@ async function findProgrammaticRouteSourceFiles(srcRoot) {
66
67
  "lib/api.generated.ts"
67
68
  ]
68
69
  });
70
+ return files.filter((file) => !isTestSourceFile(relative(srcRoot, file)));
69
71
  } catch {
70
72
  return [];
71
73
  }
@@ -6,7 +6,7 @@ var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
6
6
  _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
7
7
 
8
8
  // package.json
9
- var version = "0.2.0";
9
+ var version = "0.2.3";
10
10
 
11
11
  // src/version.ts
12
12
  var FARM_VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getFarmRouteLabel
3
- } from "./chunk-ZF7N222A.mjs";
3
+ } from "./chunk-IPKL7L6B.mjs";
4
4
  import {
5
5
  _classifyFarmMCPClient,
6
6
  _farmMCPClientSession,
@@ -3,7 +3,9 @@
3
3
  var _chunkB6JPBPBQcjs = require('./chunk-B6JPBPBQ.cjs');
4
4
 
5
5
 
6
- var _chunkMNBFSAWFcjs = require('./chunk-MNBFSAWF.cjs');
6
+
7
+
8
+ var _chunkYCGOQKVCcjs = require('./chunk-YCGOQKVC.cjs');
7
9
 
8
10
 
9
11
  var _chunkSGBEJBBBcjs = require('./chunk-SGBEJBBB.cjs');
@@ -19,16 +21,45 @@ var _module = require('module');
19
21
  var _path = require('path');
20
22
  var _esmodulelexer = require('es-module-lexer');
21
23
  var moduleLexerInitialized = false;
24
+ var HTTP_METHODS = ["GET", "HEAD", "QUERY", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
22
25
  var JSX_ROUTE_LANGS = { ".jsx": "jsx", ".tsx": "tsx" };
23
- var oxcTransformSync;
24
- function transformJSXRoute(content, lang, filePath) {
25
- _nullishCoalesce(oxcTransformSync, () => ( (oxcTransformSync = _module.createRequire.call(void 0, typeof __filename === "string" ? __filename : _chunkUGL4BDNBcjs.define_import_meta_default.url)(
26
+ var oxcUtils;
27
+ function loadOxcUtils() {
28
+ return _nullishCoalesce(oxcUtils, () => ( (oxcUtils = _module.createRequire.call(void 0, typeof __filename === "string" ? __filename : _chunkUGL4BDNBcjs.define_import_meta_default.url)(
26
29
  "rolldown/utils"
27
- ).transformSync)));
28
- const result = oxcTransformSync(filePath, content, { lang, sourceType: "module" });
30
+ ))));
31
+ }
32
+ function transformJSXRoute(content, lang, filePath) {
33
+ const result = loadOxcUtils().transformSync(filePath, content, { lang, sourceType: "module" });
29
34
  if (result.errors.length > 0) throw result.errors[0];
30
35
  return result.code;
31
36
  }
37
+ function extractDeclaredMethods(content, filePath) {
38
+ const { program, errors } = loadOxcUtils().parseSync(filePath, content, { lang: "dts" });
39
+ if (errors.length > 0) throw new Error(`${filePath}: ${errors[0].message}`);
40
+ const names = /* @__PURE__ */ new Set();
41
+ for (const statement of program.body) {
42
+ if (statement.type !== "ExportNamedDeclaration") continue;
43
+ const declaration = statement.declaration;
44
+ if (_optionalChain([declaration, 'optionalAccess', _ => _.type]) === "VariableDeclaration") {
45
+ for (const declarator of declaration.declarations) {
46
+ if (declarator.id.type === "Identifier") names.add(declarator.id.name);
47
+ }
48
+ } else if ((_optionalChain([declaration, 'optionalAccess', _2 => _2.type]) === "FunctionDeclaration" || _optionalChain([declaration, 'optionalAccess', _3 => _3.type]) === "TSDeclareFunction") && declaration.id) {
49
+ names.add(declaration.id.name);
50
+ } else if (!declaration && statement.exportKind !== "type") {
51
+ for (const specifier of statement.specifiers) {
52
+ if (specifier.exportKind === "type") continue;
53
+ const exported = specifier.exported;
54
+ names.add(exported.type === "Literal" ? String(exported.value) : exported.name);
55
+ }
56
+ }
57
+ }
58
+ return HTTP_METHODS.filter((method) => names.has(method));
59
+ }
60
+ function isFile(filePath) {
61
+ return _optionalChain([_fs.statSync.call(void 0, filePath, { throwIfNoEntry: false }), 'optionalAccess', _4 => _4.isFile, 'call', _5 => _5()]) === true;
62
+ }
32
63
  var API_CLIENT_METHOD_SEGMENTS = /* @__PURE__ */ new Set([
33
64
  "get",
34
65
  "head",
@@ -40,8 +71,9 @@ var API_CLIENT_METHOD_SEGMENTS = /* @__PURE__ */ new Set([
40
71
  "options"
41
72
  ]);
42
73
  var APITypeGenerator = class {
43
- constructor(appDir) {
74
+ constructor(appDir, options = {}) {
44
75
  this.appDirs = Array.isArray(appDir) ? [...appDir] : [appDir];
76
+ this.polyroute = options.polyroute === true;
45
77
  }
46
78
  /**
47
79
  * Scan all API route files and extract route information
@@ -89,7 +121,7 @@ var APITypeGenerator = class {
89
121
  if (item.isDirectory()) {
90
122
  const newBasePath = basePath ? `${basePath}/${item.name}` : item.name;
91
123
  this.scanDirectory(fullPath, appDir, routes, newBasePath);
92
- } else if (_chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0, item.name)) {
124
+ } else if (_chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, item.name, this.polyroute)) {
93
125
  const routeInfo = this.extractRouteInfo(fullPath, appDir, basePath);
94
126
  if (routeInfo) {
95
127
  routes.push(routeInfo);
@@ -98,14 +130,44 @@ var APITypeGenerator = class {
98
130
  }
99
131
  }
100
132
  extractRouteInfo(filePath, appDir, basePath) {
133
+ const relativePath = _path.relative.call(void 0, appDir, filePath);
134
+ const apiPath = basePath ? `/api/${basePath}` : "/api";
135
+ const fileName = _path.basename.call(void 0, filePath);
136
+ if (_chunkYCGOQKVCcjs.isPolyrouteRouteFileName.call(void 0, fileName)) {
137
+ const declarationPath = _path.join.call(void 0,
138
+ _path.dirname.call(void 0, filePath),
139
+ _chunkYCGOQKVCcjs.getPolyrouteRouteDeclarationFileName.call(void 0, fileName)
140
+ );
141
+ if (!isFile(declarationPath)) {
142
+ return { path: apiPath, methods: [...HTTP_METHODS], filePath, relativePath };
143
+ }
144
+ try {
145
+ const methods = extractDeclaredMethods(
146
+ _fs.readFileSync.call(void 0, declarationPath, "utf-8"),
147
+ declarationPath
148
+ );
149
+ if (methods.length === 0) return null;
150
+ return {
151
+ path: apiPath,
152
+ methods,
153
+ filePath,
154
+ relativePath,
155
+ declaration: {
156
+ filePath: declarationPath,
157
+ relativePath: _path.relative.call(void 0, appDir, declarationPath)
158
+ }
159
+ };
160
+ } catch (error) {
161
+ console.warn(`Failed to read route declaration ${declarationPath}:`, error);
162
+ return null;
163
+ }
164
+ }
101
165
  try {
102
166
  const content = _fs.readFileSync.call(void 0, filePath, "utf-8");
103
167
  const methods = this.extractExportedMethods(content, filePath);
104
168
  if (methods.length === 0) {
105
169
  return null;
106
170
  }
107
- const relativePath = _path.relative.call(void 0, appDir, filePath);
108
- const apiPath = basePath ? `/api/${basePath}` : "/api";
109
171
  return {
110
172
  path: apiPath,
111
173
  methods,
@@ -122,7 +184,7 @@ var APITypeGenerator = class {
122
184
  _esmodulelexer.initSync.call(void 0, );
123
185
  moduleLexerInitialized = true;
124
186
  }
125
- const httpMethods = ["GET", "HEAD", "QUERY", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
187
+ const httpMethods = HTTP_METHODS;
126
188
  const lang = JSX_ROUTE_LANGS[_path.extname.call(void 0, filePath)];
127
189
  const source = lang ? transformJSXRoute(content, lang, filePath) : content;
128
190
  const [, exports] = _esmodulelexer.parse.call(void 0, source);
@@ -159,9 +221,10 @@ var APITypeGenerator = class {
159
221
  */
160
222
  generateAPIRouter(routes, options = {}) {
161
223
  const imports = [];
224
+ const coreAPITypes = [];
162
225
  const pluginTypes = [];
163
- if (_optionalChain([options, 'access', _ => _.pluginConfigs, 'optionalAccess', _2 => _2.length])) {
164
- imports.push('import type { PluginAPIRouter } from "@farm.js/core/api";');
226
+ if (_optionalChain([options, 'access', _6 => _6.pluginConfigs, 'optionalAccess', _7 => _7.length])) {
227
+ coreAPITypes.push("PluginAPIRouter");
165
228
  options.pluginConfigs.forEach((filePath, index) => {
166
229
  const importPath = this.getRouteImportPath({ filePath }, options.outFile);
167
230
  imports.push(`import type FarmPluginConfig${index} from ${JSON.stringify(importPath)};`);
@@ -202,25 +265,31 @@ var APITypeGenerator = class {
202
265
  for (const method of route.methods) methodSources.set(method, route);
203
266
  }
204
267
  const allMethods = [...methodSources.keys()];
268
+ const methodTypes = /* @__PURE__ */ new Map();
205
269
  for (const method of allMethods) {
206
- const importPath = this.getRouteImportPath(methodSources.get(method), options.outFile);
270
+ const source = methodSources.get(method);
271
+ if (!source.declaration && _chunkYCGOQKVCcjs.isPolyrouteRouteFileName.call(void 0, _path.basename.call(void 0, source.filePath))) {
272
+ if (!coreAPITypes.includes("TypedEndpoint")) coreAPITypes.push("TypedEndpoint");
273
+ methodTypes.set(method, "TypedEndpoint<any, any>");
274
+ continue;
275
+ }
276
+ const importPath = this.getRouteImportPath(_nullishCoalesce(source.declaration, () => ( source)), options.outFile);
207
277
  const importName = `${method}_${routeName}`;
208
278
  imports.push(
209
279
  `import type { ${method} as ${importName} } from ${JSON.stringify(importPath)};`
210
280
  );
281
+ methodTypes.set(method, `typeof ${importName}`);
211
282
  }
212
283
  if (parts.length === 0) {
213
284
  for (const method of allMethods) {
214
- const importName = `${method}_${routeName}`;
215
- const methodName = method.toLowerCase();
216
- nestedStructure[methodName] = `typeof ${importName}`;
285
+ nestedStructure[method.toLowerCase()] = methodTypes.get(method);
217
286
  }
218
287
  } else {
219
288
  const hasMethodCollision = parts.some((part, index) => {
220
289
  if (part === "$params" || index === 0 && part === "integrations") return true;
221
290
  if (!API_CLIENT_METHOD_SEGMENTS.has(part)) return false;
222
291
  const parentPath = parts.slice(0, index).join("/");
223
- return _optionalChain([routeMethodsByPath, 'access', _3 => _3.get, 'call', _4 => _4(parentPath), 'optionalAccess', _5 => _5.has, 'call', _6 => _6(part)]) === true;
292
+ return _optionalChain([routeMethodsByPath, 'access', _8 => _8.get, 'call', _9 => _9(parentPath), 'optionalAccess', _10 => _10.has, 'call', _11 => _11(part)]) === true;
224
293
  });
225
294
  const typePath = hasMethodCollision ? [`/${cleanPath}`] : parts;
226
295
  let current = nestedStructure;
@@ -229,9 +298,7 @@ var APITypeGenerator = class {
229
298
  if (i === typePath.length - 1) {
230
299
  current[part] = createRouteTreeNode();
231
300
  for (const method of allMethods) {
232
- const importName = `${method}_${routeName}`;
233
- const methodName = method.toLowerCase();
234
- current[part][methodName] = `typeof ${importName}`;
301
+ current[part][method.toLowerCase()] = methodTypes.get(method);
235
302
  }
236
303
  } else {
237
304
  if (!Object.prototype.hasOwnProperty.call(current, part)) {
@@ -268,6 +335,9 @@ ${routeManifest.map(
268
335
  },`
269
336
  ).join("\n")}
270
337
  ]` : "[]";
338
+ if (coreAPITypes.length) {
339
+ imports.unshift(`import type { ${coreAPITypes.join(", ")} } from "@farm.js/core/api";`);
340
+ }
271
341
  return `/**
272
342
  * Auto-generated API router types
273
343
  * This file is automatically generated - do not edit manually
@@ -9,14 +9,14 @@ var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
9
9
  var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
10
10
 
11
11
 
12
- var _chunkZTNU4XCCcjs = require('./chunk-ZTNU4XCC.cjs');
12
+ var _chunkY3MTKPLNcjs = require('./chunk-Y3MTKPLN.cjs');
13
13
 
14
14
 
15
- var _chunkPRKFECGTcjs = require('./chunk-PRKFECGT.cjs');
15
+ var _chunkDZWX7FDXcjs = require('./chunk-DZWX7FDX.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkMNBFSAWFcjs = require('./chunk-MNBFSAWF.cjs');
19
+ var _chunkYCGOQKVCcjs = require('./chunk-YCGOQKVC.cjs');
20
20
 
21
21
 
22
22
 
@@ -30,7 +30,7 @@ var _chunkMNBFSAWFcjs = require('./chunk-MNBFSAWF.cjs');
30
30
  var _chunk5P3TZGS3cjs = require('./chunk-5P3TZGS3.cjs');
31
31
 
32
32
 
33
- var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
33
+ var _chunkLH7S7FI3cjs = require('./chunk-LH7S7FI3.cjs');
34
34
 
35
35
 
36
36
  var _chunkCH2JX3CMcjs = require('./chunk-CH2JX3CM.cjs');
@@ -156,7 +156,7 @@ function farmApiPlugin(options = {}) {
156
156
  const existing = apiRoutesCache.get(routePath);
157
157
  const existingFile = _optionalChain([endpointSources, 'access', _4 => _4.get, 'call', _5 => _5(routePath), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(normalizedMethod)]);
158
158
  if (existingFile) {
159
- throw new (0, _chunkZTNU4XCCcjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
159
+ throw new (0, _chunkY3MTKPLNcjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
160
160
  }
161
161
  if (existing) {
162
162
  if (!existing.methods.includes(normalizedMethod)) {
@@ -284,7 +284,7 @@ function farmApiPlugin(options = {}) {
284
284
  name: "@farm.js/core:api",
285
285
  enforce: "pre",
286
286
  configureServer(server) {
287
- const polyroute = _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
287
+ const polyroute = _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
288
288
  projectRoot = server.config.root;
289
289
  devServer = server;
290
290
  const discoverFileRoutes = async (apiDir) => {
@@ -302,7 +302,7 @@ function farmApiPlugin(options = {}) {
302
302
  const fullPath = path.join(dir, entry.name);
303
303
  if (entry.isDirectory()) {
304
304
  files.push(...findRouteFiles(fullPath));
305
- } else if (_chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0, entry.name, polyroute)) {
305
+ } else if (_chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, entry.name, polyroute)) {
306
306
  files.push(fullPath);
307
307
  }
308
308
  }
@@ -332,7 +332,7 @@ function farmApiPlugin(options = {}) {
332
332
  log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
333
333
  }
334
334
  } catch (e) {
335
- if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
335
+ if (e instanceof _chunkY3MTKPLNcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
336
336
  log(`API route load failed at ${filePath}: ${e.message}`);
337
337
  }
338
338
  }
@@ -359,7 +359,7 @@ function farmApiPlugin(options = {}) {
359
359
  }
360
360
  }
361
361
  } catch (e) {
362
- if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
362
+ if (e instanceof _chunkY3MTKPLNcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
363
363
  log(`Root routes.ts load failed: ${e.message}`);
364
364
  }
365
365
  break;
@@ -369,7 +369,7 @@ function farmApiPlugin(options = {}) {
369
369
  const discoverProgrammaticRoutes = async () => {
370
370
  const path = await import("path");
371
371
  const srcRoot = path.join(server.config.root, srcDir);
372
- const routeFiles = _chunkPRKFECGTcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot);
372
+ const routeFiles = _chunkDZWX7FDXcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot);
373
373
  if (routeFiles.length === 0) return;
374
374
  const { getProgrammaticRouteManifest } = await import("./routes.cjs");
375
375
  for (const routeFile of routeFiles) {
@@ -390,7 +390,7 @@ function farmApiPlugin(options = {}) {
390
390
  }
391
391
  }
392
392
  } catch (e) {
393
- if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
393
+ if (e instanceof _chunkY3MTKPLNcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
394
394
  log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
395
395
  }
396
396
  }
@@ -579,7 +579,7 @@ function farmApiPlugin(options = {}) {
579
579
  async handleHotUpdate({ file, server, modules }) {
580
580
  const normalizedFile = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, file);
581
581
  const fileName = normalizedFile.split("/").pop() || "";
582
- if (fileName === "routes.ts" || fileName === "routes.tsx" || fileName === "routes.js" || _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, fileName)) {
582
+ if (fileName === "routes.ts" || fileName === "routes.tsx" || fileName === "routes.js" || _chunkLH7S7FI3cjs.isProgrammaticRoutesFileName.call(void 0, fileName)) {
583
583
  log(`Root routes file updated: ${fileName}`);
584
584
  for (const mod of modules) {
585
585
  server.moduleGraph.invalidateModule(mod);
@@ -615,12 +615,12 @@ function farmApiPlugin(options = {}) {
615
615
  log(`API router recreated`);
616
616
  } catch (e) {
617
617
  restoreRouteState(previousState);
618
- if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
618
+ if (e instanceof _chunkY3MTKPLNcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
619
619
  log(`Root routes.ts HMR failed: ${e.message}`);
620
620
  }
621
621
  return [];
622
622
  }
623
- if (normalizedFile.includes("/api/") && _chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0, fileName, _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server.config.plugins))) {
623
+ if (normalizedFile.includes("/api/") && _chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, fileName, _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server.config.plugins))) {
624
624
  const shortPath = normalizedFile.split("/api/")[1] || normalizedFile;
625
625
  log(`API route updated: ${shortPath}`);
626
626
  for (const mod of modules) {
@@ -653,7 +653,7 @@ function farmApiPlugin(options = {}) {
653
653
  log(`API router recreated`);
654
654
  } catch (e) {
655
655
  restoreRouteState(previousState);
656
- if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
656
+ if (e instanceof _chunkY3MTKPLNcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
657
657
  log(`API route HMR failed: ${e.message}`);
658
658
  }
659
659
  return [];
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FARM_VERSION
3
- } from "./chunk-MEIZIRMK.mjs";
3
+ } from "./chunk-2FKGY2ZS.mjs";
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -1,7 +1,8 @@
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; } }
2
2
 
3
3
 
4
- var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
4
+
5
+ var _chunkLH7S7FI3cjs = require('./chunk-LH7S7FI3.cjs');
5
6
 
6
7
 
7
8
  var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
@@ -29,7 +30,7 @@ function findProgrammaticRouteFiles(root, srcDir = "src") {
29
30
  }
30
31
  function findProgrammaticRouteFilesInDir(srcRoot) {
31
32
  const files = [];
32
- for (const fileName of _chunkPYPHM7AScjs.PROGRAMMATIC_ROUTE_FILE_NAMES) {
33
+ for (const fileName of _chunkLH7S7FI3cjs.PROGRAMMATIC_ROUTE_FILE_NAMES) {
33
34
  const filePath = _path.join.call(void 0, srcRoot, fileName);
34
35
  if (_fs.existsSync.call(void 0, filePath)) {
35
36
  files.push(filePath);
@@ -45,7 +46,7 @@ async function discoverProgrammaticRoutePaths(root, srcDir = "src") {
45
46
  ]);
46
47
  for (const filePath of files) {
47
48
  const source = _fs.readFileSync.call(void 0, filePath, "utf8");
48
- for (const routePath of _chunkPYPHM7AScjs.scanProgrammaticPagePaths.call(void 0, source)) {
49
+ for (const routePath of _chunkLH7S7FI3cjs.scanProgrammaticPagePaths.call(void 0, source)) {
49
50
  paths.add(routePath);
50
51
  }
51
52
  }
@@ -57,7 +58,7 @@ async function findProgrammaticRouteSourceFiles(srcRoot) {
57
58
  }
58
59
  try {
59
60
  const { glob } = await import("tinyglobby");
60
- return await glob("**/*.{ts,tsx,js,jsx}", {
61
+ const files = await glob("**/*.{ts,tsx,js,jsx}", {
61
62
  cwd: srcRoot,
62
63
  absolute: true,
63
64
  expandDirectories: false,
@@ -70,6 +71,7 @@ async function findProgrammaticRouteSourceFiles(srcRoot) {
70
71
  "lib/api.generated.ts"
71
72
  ]
72
73
  });
74
+ return files.filter((file) => !_chunkLH7S7FI3cjs.isTestSourceFile.call(void 0, _path.relative.call(void 0, srcRoot, file)));
73
75
  } catch (e) {
74
76
  return [];
75
77
  }
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-D2VAANBS.mjs";
19
19
  import {
20
20
  FARM_VERSION
21
- } from "./chunk-MEIZIRMK.mjs";
21
+ } from "./chunk-2FKGY2ZS.mjs";
22
22
 
23
23
  // src/mobile/analyzer.ts
24
24
  import { createHash } from "crypto";
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkLGL5QKUJcjs = require('./chunk-LGL5QKUJ.cjs');
4
+ var _chunkA4WDDASScjs = require('./chunk-A4WDDASS.cjs');
5
5
 
6
6
 
7
7
  var _chunk7O3YJ6NPcjs = require('./chunk-7O3YJ6NP.cjs');
@@ -68,7 +68,7 @@ function findFarmNativeScreenFiles(appDirs) {
68
68
  }
69
69
  function collectFarmNativeServerFns(options) {
70
70
  const { root, srcDir } = options;
71
- const aliases = _chunkLGL5QKUJcjs.readAliases.call(void 0, root, srcDir);
71
+ const aliases = _chunkA4WDDASScjs.readAliases.call(void 0, root, srcDir);
72
72
  const seen = /* @__PURE__ */ new Set();
73
73
  const found = /* @__PURE__ */ new Map();
74
74
  const queue = [...options.entries];
@@ -102,7 +102,7 @@ function collectFarmNativeServerFns(options) {
102
102
  }
103
103
  }
104
104
  for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
105
- const resolved = _chunkLGL5QKUJcjs.resolveFile.call(void 0, candidate);
105
+ const resolved = _chunkA4WDDASScjs.resolveFile.call(void 0, candidate);
106
106
  if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
107
107
  queue.push(resolved);
108
108
  break;
@@ -0,0 +1,21 @@
1
+ // src/desktop/permissions.ts
2
+ var FARM_DESKTOP_PERMISSIONS = [
3
+ "microphone",
4
+ "camera",
5
+ "location",
6
+ "speechRecognition",
7
+ "bluetooth",
8
+ "contacts",
9
+ "calendars",
10
+ "reminders",
11
+ "photos",
12
+ "music",
13
+ "motion",
14
+ "documents",
15
+ "downloads",
16
+ "desktop"
17
+ ];
18
+
19
+ export {
20
+ FARM_DESKTOP_PERMISSIONS
21
+ };