@farm.js/core 0.1.82 → 0.1.84

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 (253) hide show
  1. package/dist/{agent-mcp.d-C2Su3x4D.d.ts → agent-mcp.d-7uKdOttc.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-Yak-LqRd.d.mts → agent-mcp.d-LChlR2au.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +2 -1
  4. package/dist/agent-runtime.d.ts +2 -1
  5. package/dist/{analyzer-RPU2KG4J.mjs → analyzer-7RNO3XKC.mjs} +2 -2
  6. package/dist/analyzer-PFKA5NI6.cjs +17 -0
  7. package/dist/api/node.d.mts +4 -3
  8. package/dist/api/node.d.ts +4 -3
  9. package/dist/api/route-manager.d.mts +4 -3
  10. package/dist/api/route-manager.d.ts +4 -3
  11. package/dist/api/runtime.d.mts +3 -2
  12. package/dist/api/runtime.d.ts +3 -2
  13. package/dist/api.d.mts +5 -4
  14. package/dist/api.d.ts +5 -4
  15. package/dist/{app-manifest.d-DZyXaICz.d.ts → app-manifest.d-CRp21oAz.d.ts} +1 -1
  16. package/dist/{app-manifest.d-BcyOFMrg.d.mts → app-manifest.d-QMdmqqCr.d.mts} +1 -1
  17. package/dist/app-markdown.d.mts +3 -2
  18. package/dist/app-markdown.d.ts +3 -2
  19. package/dist/{app.d-CIoXsAbN.d.ts → app.d-CVPu_hoD.d.ts} +34 -4
  20. package/dist/{app.d-C0ePpuaG.d.mts → app.d-eSm7jgoc.d.mts} +34 -4
  21. package/dist/{chunk-B2PGVHBG.cjs → chunk-22BTYPIX.cjs} +4 -4
  22. package/dist/{chunk-BCTHOQPP.cjs → chunk-3OKSEJ33.cjs} +98 -10
  23. package/dist/{chunk-QSMUMK7Y.mjs → chunk-3WM7VBGW.mjs} +2 -2
  24. package/dist/{chunk-XMHERKSE.mjs → chunk-42IBGQTN.mjs} +5 -12
  25. package/dist/{chunk-RMPUEH5T.cjs → chunk-57EEWWUS.cjs} +2 -2
  26. package/dist/{chunk-Q2VOT3K2.cjs → chunk-5I4ZGKP2.cjs} +395 -333
  27. package/dist/{chunk-TPA2PV5J.mjs → chunk-5V6HSJFG.mjs} +24 -1
  28. package/dist/{chunk-RMLR5RMH.mjs → chunk-BCCCPFHQ.mjs} +92 -4
  29. package/dist/{chunk-LM2ZDNDD.cjs → chunk-BOEDYXAX.cjs} +30 -25
  30. package/dist/{chunk-NRCKBDYP.mjs → chunk-BRDGINBB.mjs} +153 -47
  31. package/dist/chunk-BUQR7KKO.mjs +17 -0
  32. package/dist/{chunk-63ZE6B6M.mjs → chunk-BZY3SRRD.mjs} +1 -1
  33. package/dist/{chunk-724WT3NI.mjs → chunk-CRE642TW.mjs} +1 -1
  34. package/dist/{chunk-JK26IMT7.cjs → chunk-CVZY4TLW.cjs} +1 -1
  35. package/dist/{chunk-ZIZRIZLP.mjs → chunk-CWUQBECF.mjs} +3 -1
  36. package/dist/{chunk-DAXU2NBE.mjs → chunk-DFDQGHPU.mjs} +104 -42
  37. package/dist/{chunk-AIPZDBP6.cjs → chunk-DSWSDDP2.cjs} +844 -553
  38. package/dist/{chunk-DRO3NXA3.cjs → chunk-EBSL5TW7.cjs} +203 -93
  39. package/dist/{chunk-CJDBTTLB.mjs → chunk-EDBIBO67.mjs} +18 -13
  40. package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
  41. package/dist/chunk-FZ7OUN5M.cjs +30 -0
  42. package/dist/chunk-GLNVLCUH.cjs +426 -0
  43. package/dist/{chunk-5MMKNW7Q.cjs → chunk-H7REG7OX.cjs} +15 -8
  44. package/dist/{chunk-N2EFMN2K.cjs → chunk-HOQ2MYBJ.cjs} +10 -10
  45. package/dist/{chunk-OP5VI4TP.mjs → chunk-I5CVJ24H.mjs} +1 -1
  46. package/dist/{chunk-I4DR3HCH.mjs → chunk-INU4K4U4.mjs} +5 -5
  47. package/dist/{chunk-4X7LSGM6.mjs → chunk-IRJSZAJB.mjs} +1 -1
  48. package/dist/{chunk-EX6ZSN5P.cjs → chunk-IZYFP7IN.cjs} +17 -24
  49. package/dist/chunk-J6RFB324.cjs +17 -0
  50. package/dist/{chunk-47I2MYIR.mjs → chunk-KXVMWLTC.mjs} +484 -193
  51. package/dist/{chunk-UVV3I5QA.cjs → chunk-L2GUEYHR.cjs} +29 -6
  52. package/dist/{chunk-VMBIKDKW.cjs → chunk-L3BSHASB.cjs} +6 -4
  53. package/dist/chunk-L5HDCDFT.mjs +426 -0
  54. package/dist/{chunk-GXLNARPO.mjs → chunk-M5XU22PQ.mjs} +1 -1
  55. package/dist/chunk-M6AJZ4XR.mjs +30 -0
  56. package/dist/chunk-MAPHNGTF.cjs +98 -0
  57. package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
  58. package/dist/{chunk-C3VCYOU4.mjs → chunk-MUUDHWQZ.mjs} +1 -1
  59. package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
  60. package/dist/{chunk-OMB7UGVW.mjs → chunk-NLHSKKTT.mjs} +14 -9
  61. package/dist/{chunk-ARORZ3MH.cjs → chunk-OFVBMS6I.cjs} +439 -333
  62. package/dist/{chunk-5MUFW5UU.cjs → chunk-OP7BIEUW.cjs} +2 -2
  63. package/dist/{chunk-I4WZRG73.mjs → chunk-RB5IGN3N.mjs} +13 -6
  64. package/dist/chunk-RJBUI5AN.mjs +18 -0
  65. package/dist/chunk-RQ6XX5IN.mjs +98 -0
  66. package/dist/{chunk-EJCVG25Z.mjs → chunk-S3R4JDRO.mjs} +17 -9
  67. package/dist/{chunk-WFVSAT7Y.cjs → chunk-T7HGXF7D.cjs} +3 -3
  68. package/dist/{chunk-HHQEKLZL.cjs → chunk-USMRAC72.cjs} +36 -31
  69. package/dist/{chunk-SM2SYWAR.cjs → chunk-XJDB564A.cjs} +18 -10
  70. package/dist/{chunk-EL2Z6YFZ.mjs → chunk-XLULEFRW.mjs} +180 -70
  71. package/dist/{chunk-6BPFIYGY.cjs → chunk-YU6VL7H5.cjs} +3 -3
  72. package/dist/{chunk-CD5Z7RR5.cjs → chunk-Z37PDUJR.cjs} +4 -4
  73. package/dist/{cli-runtime.d-Hnvvadz7.d.mts → cli-runtime.d-C7aMfoTq.d.mts} +8 -6
  74. package/dist/{cli-runtime.d-I0MphTbc.d.ts → cli-runtime.d-DaElKjaL.d.ts} +8 -6
  75. package/dist/{client-component.d-DapRqtSC.d.mts → client-component.d-DLMCzmUx.d.mts} +1 -1
  76. package/dist/{client-component.d-5QEvtJsg.d.ts → client-component.d-DLknFP8l.d.ts} +1 -1
  77. package/dist/{client-plugins.d-DcmDzcSC.d.ts → client-plugins.d-BVXjyIkY.d.ts} +14 -0
  78. package/dist/{client-plugins.d-C1WM3ieD.d.mts → client-plugins.d-BwKwuO_0.d.mts} +14 -0
  79. package/dist/client-plugins.d.mts +2 -1
  80. package/dist/client-plugins.d.ts +2 -1
  81. package/dist/client.cjs +4 -3
  82. package/dist/client.d.mts +10 -9
  83. package/dist/client.d.ts +10 -9
  84. package/dist/client.mjs +3 -2
  85. package/dist/config.d.mts +2 -1
  86. package/dist/config.d.ts +2 -1
  87. package/dist/desktop.d.mts +3 -2
  88. package/dist/desktop.d.ts +3 -2
  89. package/dist/{devtools-5B7NZE6F.cjs → devtools-4SVIRV4P.cjs} +7 -7
  90. package/dist/{devtools-C5GXZZ7E.mjs → devtools-MWQA5LVN.mjs} +5 -5
  91. package/dist/docs.cjs +10 -9
  92. package/dist/docs.d.mts +15 -6
  93. package/dist/docs.d.ts +15 -6
  94. package/dist/docs.mjs +9 -8
  95. package/dist/environment/vite.cjs +5 -5
  96. package/dist/environment/vite.d.mts +1 -0
  97. package/dist/environment/vite.d.ts +1 -0
  98. package/dist/environment/vite.mjs +4 -4
  99. package/dist/{generate-route-types.d-CaGMIaNI.d.mts → generate-route-types.d-BFOMM8Ef.d.mts} +3 -0
  100. package/dist/{generate-route-types.d-B76M5R11.d.ts → generate-route-types.d-C2m8myHb.d.ts} +3 -0
  101. package/dist/{handler.d-B8bPCBzl.d.mts → handler.d-BKTWzzNA.d.mts} +1 -1
  102. package/dist/{handler.d-Cliwo6Nu.d.ts → handler.d-Dzpyg3-N.d.ts} +1 -1
  103. package/dist/{headers.d-CVwSpSGX.d.mts → headers.d-5opjyhXw.d.mts} +1 -1
  104. package/dist/{headers.d-C_btqjV6.d.ts → headers.d-PZyXcDAH.d.ts} +1 -1
  105. package/dist/index.cjs +32 -29
  106. package/dist/{index.d-DFuMZk9-.d.mts → index.d-C0Mie66f.d.mts} +1 -1
  107. package/dist/{index.d-hOEbMcLk.d.ts → index.d-DV2q-0mE.d.ts} +1 -1
  108. package/dist/index.d.mts +26 -25
  109. package/dist/index.d.ts +26 -25
  110. package/dist/index.mjs +32 -29
  111. package/dist/integrations/orm.d.mts +2 -1
  112. package/dist/integrations/orm.d.ts +2 -1
  113. package/dist/integrations.d.mts +2 -1
  114. package/dist/integrations.d.ts +2 -1
  115. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  116. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  117. package/dist/internal/build-runtime.cjs +28 -27
  118. package/dist/internal/build-runtime.d.mts +5 -4
  119. package/dist/internal/build-runtime.d.ts +5 -4
  120. package/dist/internal/build-runtime.mjs +27 -26
  121. package/dist/internal/cli-runtime.cjs +9 -9
  122. package/dist/internal/cli-runtime.d.mts +8 -7
  123. package/dist/internal/cli-runtime.d.ts +8 -7
  124. package/dist/internal/cli-runtime.mjs +8 -8
  125. package/dist/internal/client-error-overlay.cjs +4 -4
  126. package/dist/internal/client-error-overlay.mjs +1 -1
  127. package/dist/internal/client-runtime.d.mts +8 -42
  128. package/dist/internal/client-runtime.d.ts +8 -42
  129. package/dist/internal/compression-runtime.d.mts +2 -1
  130. package/dist/internal/compression-runtime.d.ts +2 -1
  131. package/dist/internal/config-runtime.cjs +7 -7
  132. package/dist/internal/config-runtime.d.mts +6 -5
  133. package/dist/internal/config-runtime.d.ts +6 -5
  134. package/dist/internal/config-runtime.mjs +6 -6
  135. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  136. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  137. package/dist/internal/islands-action-client.cjs +18 -0
  138. package/dist/internal/islands-action-client.d.mts +18 -0
  139. package/dist/internal/islands-action-client.d.ts +18 -0
  140. package/dist/internal/islands-action-client.mjs +18 -0
  141. package/dist/internal/islands-runtime.cjs +3 -8
  142. package/dist/internal/islands-runtime.mjs +4 -9
  143. package/dist/internal/islx-actions-client.cjs +4 -3
  144. package/dist/internal/islx-actions-client.mjs +3 -2
  145. package/dist/internal/islx-actions-server.d.mts +0 -2
  146. package/dist/internal/islx-actions-server.d.ts +0 -2
  147. package/dist/internal/islx-client.cjs +13 -1
  148. package/dist/internal/islx-client.d.mts +11 -0
  149. package/dist/internal/islx-client.d.ts +11 -0
  150. package/dist/internal/islx-client.mjs +14 -0
  151. package/dist/internal/metadata-image-runtime.d.mts +1 -0
  152. package/dist/internal/metadata-image-runtime.d.ts +1 -0
  153. package/dist/internal/native-server-fns.cjs +4 -4
  154. package/dist/internal/native-server-fns.mjs +3 -3
  155. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  156. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  157. package/dist/internal/production-runtime.cjs +13 -13
  158. package/dist/internal/production-runtime.d.mts +11 -11
  159. package/dist/internal/production-runtime.d.ts +11 -11
  160. package/dist/internal/production-runtime.mjs +19 -19
  161. package/dist/internal/renderer-islands.cjs +47 -0
  162. package/dist/internal/renderer-islands.d.mts +32 -0
  163. package/dist/internal/renderer-islands.d.ts +32 -0
  164. package/dist/internal/renderer-islands.mjs +47 -0
  165. package/dist/internal/spa-router.d.mts +3 -3
  166. package/dist/internal/spa-router.d.ts +3 -3
  167. package/dist/internal/start-manifest.d.mts +2 -1
  168. package/dist/internal/start-manifest.d.ts +2 -1
  169. package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
  170. package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
  171. package/dist/markdown.d.mts +2 -1
  172. package/dist/markdown.d.ts +2 -1
  173. package/dist/middleware.d.mts +2 -1
  174. package/dist/middleware.d.ts +2 -1
  175. package/dist/mobile.d.mts +6 -3
  176. package/dist/mobile.d.ts +6 -3
  177. package/dist/{mount.d-DLeYxeRR.d.mts → mount.d-CZ_qL1iS.d.mts} +1 -1
  178. package/dist/{mount.d-CAovYKfs.d.ts → mount.d-gWul1GA1.d.ts} +1 -1
  179. package/dist/{navigation-delegate.d-Chv93QS6.d.mts → navigation-delegate.d-BBTzhJLj.d.mts} +1 -1
  180. package/dist/{navigation-delegate.d-BLM-8Q3Z.d.ts → navigation-delegate.d-BZsYEAet.d.ts} +1 -1
  181. package/dist/navigation.d.mts +5 -5
  182. package/dist/navigation.d.ts +5 -5
  183. package/dist/plugin.cjs +23 -22
  184. package/dist/plugin.d.mts +6 -6
  185. package/dist/plugin.d.ts +6 -6
  186. package/dist/plugin.mjs +22 -21
  187. package/dist/{render-plan.d-BSTjTH8h.d.ts → render-plan.d-AaJsYPX-.d.ts} +1 -1
  188. package/dist/{render-plan.d-CK5Lggyb.d.mts → render-plan.d-bnWxS12w.d.mts} +1 -1
  189. package/dist/renderer-client.cjs +6 -5
  190. package/dist/renderer-client.d.mts +8 -7
  191. package/dist/renderer-client.d.ts +8 -7
  192. package/dist/renderer-client.mjs +2 -1
  193. package/dist/renderer.cjs +12 -2
  194. package/dist/renderer.d.mts +167 -4
  195. package/dist/renderer.d.ts +167 -4
  196. package/dist/renderer.mjs +11 -1
  197. package/dist/{request.d-BhggxQf3.d.mts → request.d-C2HOn3Hi.d.mts} +1 -1
  198. package/dist/{request.d-CyJS9bjm.d.ts → request.d-CAeitOG1.d.ts} +1 -1
  199. package/dist/request.d.mts +3 -2
  200. package/dist/request.d.ts +3 -2
  201. package/dist/{route-rendering.d-BLPPmI5I.d.ts → route-rendering.d-A1dIkUK5.d.ts} +1 -1
  202. package/dist/{route-rendering.d-CUpG2mZJ.d.mts → route-rendering.d-CYA-ulnX.d.mts} +1 -1
  203. package/dist/{router.d-2NQM1Kgw.d.mts → router.d-8lxnzlkr.d.mts} +1 -1
  204. package/dist/{router.d-0X2Ki6rf.d.ts → router.d-A_Yt6jYz.d.ts} +1 -1
  205. package/dist/{routes.d-CCccJRrp.d.mts → routes.d-BWvpUoYu.d.mts} +1 -1
  206. package/dist/{routes.d-b7khoRoU.d.ts → routes.d-D7RWvfqL.d.ts} +1 -1
  207. package/dist/routes.d.mts +2 -1
  208. package/dist/routes.d.ts +2 -1
  209. package/dist/{rsc-pipeline-5AOF64FL.cjs → rsc-pipeline-OWBEZ7HB.cjs} +10 -10
  210. package/dist/{rsc-pipeline-DNRLYOJ7.mjs → rsc-pipeline-UT3Z2GDO.mjs} +9 -9
  211. package/dist/{runtime-EHG2FRXZ.mjs → runtime-F5I3WY3B.mjs} +12 -12
  212. package/dist/{runtime-ZVHG5SRB.cjs → runtime-SRMQ46SK.cjs} +15 -15
  213. package/dist/{runtime.d-CXuwkUgr.d.ts → runtime.d-BPyvWrgQ.d.ts} +1 -1
  214. package/dist/{runtime.d-CaFXcu_Q.d.mts → runtime.d-C_rZ9_DD.d.mts} +1 -1
  215. package/dist/{server-components-status.d-Cp7zvBm5.d.mts → server-components-status.d-BpxiEMQE.d.mts} +1 -1
  216. package/dist/{server-components-status.d-BdeFD8ZH.d.ts → server-components-status.d-C2UEKJn7.d.ts} +1 -1
  217. package/dist/server-plugins.d.mts +4 -3
  218. package/dist/server-plugins.d.ts +4 -3
  219. package/dist/server-query-call.d-rVM_lsYk.d.mts +15 -0
  220. package/dist/server-query-call.d-rVM_lsYk.d.ts +15 -0
  221. package/dist/server-query-client.cjs +5 -3
  222. package/dist/server-query-client.d.mts +3 -2
  223. package/dist/server-query-client.d.ts +3 -2
  224. package/dist/server-query-client.mjs +5 -3
  225. package/dist/{server-query-runtime.d-DXRNhX_3.d.ts → server-query-runtime.d-BlHd90D0.d.ts} +2 -8
  226. package/dist/{server-query-runtime.d-aP52iuL5.d.mts → server-query-runtime.d-CCLGkQtE.d.mts} +2 -8
  227. package/dist/server.cjs +52 -52
  228. package/dist/server.d.mts +12 -12
  229. package/dist/server.d.ts +12 -12
  230. package/dist/server.mjs +30 -30
  231. package/dist/{spa-router.d-l3G38xHa.d.mts → spa-router.d-BD-6WX1R.d.mts} +2 -2
  232. package/dist/{spa-router.d-Bjgl-Osi.d.ts → spa-router.d-Cw5i_15e.d.ts} +2 -2
  233. package/dist/{ssg.d-DDca17Lc.d.ts → ssg.d-Bifiq0EL.d.ts} +2 -2
  234. package/dist/{ssg.d-RnlHOqUL.d.mts → ssg.d-CCE9aob5.d.mts} +2 -2
  235. package/dist/{store-core.d-BaOUOPf7.d.ts → store-core.d-5tVn5vi1.d.ts} +3 -3
  236. package/dist/{store-core.d-BZjuC6Zc.d.mts → store-core.d-BN2MxSG9.d.mts} +3 -3
  237. package/dist/testing.d.mts +2 -1
  238. package/dist/testing.d.ts +2 -1
  239. package/dist/{utils.d-D8TWmpWo.d.ts → utils.d-BUjpSNIO.d.ts} +1 -1
  240. package/dist/{utils.d-tdzw0_zQ.d.mts → utils.d-wGPLeVbq.d.mts} +1 -1
  241. package/dist/version.cjs +2 -2
  242. package/dist/version.mjs +1 -1
  243. package/dist/vite.cjs +23 -22
  244. package/dist/vite.d.mts +12 -6
  245. package/dist/vite.d.ts +12 -6
  246. package/dist/vite.mjs +22 -21
  247. package/package.json +13 -3
  248. package/dist/analyzer-LV23T6QN.cjs +0 -17
  249. package/dist/chunk-4QENVMG7.mjs +0 -34
  250. package/dist/chunk-AUFEM3FB.mjs +0 -229
  251. package/dist/chunk-S7WZUK3B.cjs +0 -229
  252. package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
  253. package/dist/{chunk-CA2HBLXP.mjs → chunk-4EEAPBNV.mjs} +3 -3
@@ -2,17 +2,24 @@ import {
2
2
  resolveFarmAppClientEntry,
3
3
  resolveFarmClientPlugins
4
4
  } from "./chunk-MO4UTDQ6.mjs";
5
+ import {
6
+ resolveFarmPlatform
7
+ } from "./chunk-SMUW7UST.mjs";
5
8
  import {
6
9
  collectSSGPages,
7
10
  matchSSGPage,
8
11
  resolveRouteRenderingConfigFromFile
9
- } from "./chunk-ZIZRIZLP.mjs";
12
+ } from "./chunk-CWUQBECF.mjs";
10
13
  import {
11
14
  findFarmAppPackageDir
12
- } from "./chunk-YSU3WCW6.mjs";
15
+ } from "./chunk-MYSH5Y4E.mjs";
13
16
  import {
14
- resolveFarmPlatform
15
- } from "./chunk-SMUW7UST.mjs";
17
+ resolveFarmRendererRoutes
18
+ } from "./chunk-L5HDCDFT.mjs";
19
+ import {
20
+ createFarmMetadataImageResponse,
21
+ resolveFarmMetadataImageValue
22
+ } from "./chunk-EZYKV24V.mjs";
16
23
  import {
17
24
  appendFarmHead,
18
25
  classifyFarmDocumentPrefix,
@@ -49,15 +56,10 @@ import {
49
56
  stripRouteGroups,
50
57
  takeFarmHoistedHead,
51
58
  takeFarmNavigationOutlet
52
- } from "./chunk-CA2HBLXP.mjs";
53
- import {
54
- getFarmFormState,
55
- handleFarmFormActionRequest,
56
- renderFarmFormStateScript
57
- } from "./chunk-V7HNYR76.mjs";
59
+ } from "./chunk-4EEAPBNV.mjs";
58
60
  import {
59
61
  listFarmMCPLlmsTxtLinks
60
- } from "./chunk-QSMUMK7Y.mjs";
62
+ } from "./chunk-3WM7VBGW.mjs";
61
63
  import {
62
64
  FARM_DEFAULT_MCP_PATH,
63
65
  collectFarmDefaultMCPPages,
@@ -67,9 +69,10 @@ import {
67
69
  resolveFarmDefaultMCPServer
68
70
  } from "./chunk-HR4N2K4V.mjs";
69
71
  import {
70
- createFarmMetadataImageResponse,
71
- resolveFarmMetadataImageValue
72
- } from "./chunk-EZYKV24V.mjs";
72
+ getFarmFormState,
73
+ handleFarmFormActionRequest,
74
+ renderFarmFormStateScript
75
+ } from "./chunk-V7HNYR76.mjs";
73
76
  import {
74
77
  installFarmIslandValues,
75
78
  uninstallFarmIslandValues
@@ -97,21 +100,22 @@ import {
97
100
  resolveProgrammaticClientRoutes,
98
101
  runWithLatestPackageClientBoundaryCache,
99
102
  runWithPackageClientBoundaryCacheFile,
103
+ setFarmRendererHydrationScope,
100
104
  traceFarmSourceReads,
101
105
  usesFarmServerTree,
102
106
  withFarmSourceSnapshot
103
- } from "./chunk-EL2Z6YFZ.mjs";
107
+ } from "./chunk-XLULEFRW.mjs";
104
108
  import {
105
109
  _setDefaultFarmThemeConfig,
106
110
  getTheme
107
111
  } from "./chunk-ZEWWZJPZ.mjs";
108
112
  import {
109
113
  isSecretDocsConfigKey
110
- } from "./chunk-EJCVG25Z.mjs";
114
+ } from "./chunk-S3R4JDRO.mjs";
111
115
  import {
112
116
  resolveFarmAuthConfig,
113
117
  resolveFarmDevIndicatorsConfig
114
- } from "./chunk-TPA2PV5J.mjs";
118
+ } from "./chunk-5V6HSJFG.mjs";
115
119
  import {
116
120
  normalizeRouteRules
117
121
  } from "./chunk-YVVY276M.mjs";
@@ -125,14 +129,6 @@ import {
125
129
  resolveFarmAgentSitemap,
126
130
  resolveFarmPerformanceConfig
127
131
  } from "./chunk-NQ3Y6E2T.mjs";
128
- import {
129
- createFarmCspNonce,
130
- createFarmCspNonceRewriter,
131
- filterFarmCspNonces,
132
- getFarmSecurityHeader,
133
- resolveFarmSecurityConfig,
134
- stampFarmCspNonce
135
- } from "./chunk-22W4FNTG.mjs";
136
132
  import {
137
133
  collectFarmLlmsTxtPages,
138
134
  createFarmDefaultLlmsTxt,
@@ -144,8 +140,13 @@ import {
144
140
  resolveFarmLlmsTxtConfig
145
141
  } from "./chunk-XGL42MQ7.mjs";
146
142
  import {
147
- resolveFarmServerComponentsMode
148
- } from "./chunk-4QENVMG7.mjs";
143
+ createFarmCspNonce,
144
+ createFarmCspNonceRewriter,
145
+ filterFarmCspNonces,
146
+ getFarmSecurityHeader,
147
+ resolveFarmSecurityConfig,
148
+ stampFarmCspNonce
149
+ } from "./chunk-22W4FNTG.mjs";
149
150
  import {
150
151
  getFarmAppDirectories,
151
152
  getFarmSourceRoots
@@ -162,8 +163,9 @@ import {
162
163
  resolveFarmComponentExtensions,
163
164
  resolveFarmRenderer,
164
165
  resolveFarmRendererAppSetup,
165
- resolveFarmRendererModule
166
- } from "./chunk-RMLR5RMH.mjs";
166
+ resolveFarmRendererModule,
167
+ resolveFarmServerComponentsMode
168
+ } from "./chunk-BCCCPFHQ.mjs";
167
169
  import {
168
170
  resolveFarmImageConfig
169
171
  } from "./chunk-AOIUYHPH.mjs";
@@ -304,7 +306,7 @@ import {
304
306
  } from "./chunk-EILUVBKS.mjs";
305
307
  import {
306
308
  FARM_VERSION
307
- } from "./chunk-OP5VI4TP.mjs";
309
+ } from "./chunk-I5CVJ24H.mjs";
308
310
  import {
309
311
  normalizeFarmAPIConfig
310
312
  } from "./chunk-W6QLRQ3V.mjs";
@@ -503,6 +505,14 @@ var RouteManager = class _RouteManager {
503
505
  this.programmaticPages = /* @__PURE__ */ new Map();
504
506
  this.programmaticLayouts = /* @__PURE__ */ new Map();
505
507
  this.programmaticClientRoutes = mergeProgrammaticClientRoutes([]);
508
+ // The hydration settings each route rule returned, by file.
509
+ this.rendererRouteHydration = /* @__PURE__ */ new Map();
510
+ this.disposeRendererHydration = () => {
511
+ };
512
+ // The directories a renderer's route rules scan, and the files they mapped, absolute with `/`
513
+ // separators.
514
+ this.rendererRouteDirs = [];
515
+ this.rendererRouteModules = /* @__PURE__ */ new Set();
506
516
  this.discovery = Promise.resolve();
507
517
  this.reportedIslandsErrors = /* @__PURE__ */ new Set();
508
518
  // Each route module's hydration plan from the last plan, with the source files it read, so a dev
@@ -553,10 +563,65 @@ var RouteManager = class _RouteManager {
553
563
  this.programmaticPages = next.programmaticPages;
554
564
  this.programmaticLayouts = next.programmaticLayouts;
555
565
  this.programmaticClientRoutes = next.programmaticClientRoutes;
566
+ this.rendererNotFoundPath = next.rendererNotFoundPath;
567
+ this.rendererRouteHydration = next.rendererRouteHydration;
568
+ this.rendererRouteDirs = next.rendererRouteDirs;
569
+ this.rendererRouteModules = next.rendererRouteModules;
570
+ this.recordRendererHydration();
556
571
  });
557
572
  this.discovery = discovery;
558
573
  return discovery;
559
574
  }
575
+ /**
576
+ * Hands the client-module reader the renderer's hydration levels for this scan's pages and
577
+ * layouts (`hydration` and route rules on the renderer descriptor).
578
+ */
579
+ recordRendererHydration() {
580
+ this.disposeRendererHydration();
581
+ const renderer = this.config.renderer;
582
+ const routeModules = [];
583
+ for (const [kind, entries] of [
584
+ ["page", this.routes.values()],
585
+ ["layout", this.layouts.values()]
586
+ ]) {
587
+ for (const entry of entries) {
588
+ if (entry.source === "programmatic") continue;
589
+ routeModules.push({
590
+ modulePath: entry.modulePath,
591
+ kind,
592
+ hydration: this.rendererRouteHydration.get(entry.modulePath)
593
+ });
594
+ }
595
+ }
596
+ this.disposeRendererHydration = setFarmRendererHydrationScope(
597
+ getFarmSourceRoots(this.config).map((source) => source.root),
598
+ renderer,
599
+ routeModules
600
+ );
601
+ }
602
+ /**
603
+ * The not-found page a renderer's `routes()` mapped, null when it mapped none, or undefined when
604
+ * the renderer has no route rules and Farm looks for `src/app/not-found.*` itself.
605
+ */
606
+ getRendererNotFoundPath() {
607
+ return this.rendererNotFoundPath;
608
+ }
609
+ /**
610
+ * Whether `file` is under a directory a renderer's route rules scan, where adding or removing a
611
+ * file can change the routes.
612
+ */
613
+ isRendererRouteFile(file) {
614
+ if (this.rendererRouteDirs.length === 0) return false;
615
+ const normalized = file.replace(/\\/g, "/");
616
+ return this.rendererRouteDirs.some((dir) => normalized.startsWith(`${dir}/`));
617
+ }
618
+ /**
619
+ * Whether `file` is a page, layout, loading, error or not-found file a renderer's route rules
620
+ * mapped, where an edit can change what the route renders or whether it hydrates.
621
+ */
622
+ isRendererRouteModule(file) {
623
+ return this.rendererRouteModules.size > 0 && this.rendererRouteModules.has(file.replace(/\\/g, "/"));
624
+ }
560
625
  /** Fill this manager's empty route tables. Only a fresh manager made by discoverRoutes runs it. */
561
626
  async discoverInto() {
562
627
  const programmaticClientRoutes = [];
@@ -1407,11 +1472,38 @@ var RouteManager = class _RouteManager {
1407
1472
  (extension) => extension.slice(1)
1408
1473
  );
1409
1474
  const componentGlob = componentExtensions.join(",");
1410
- const pageFiles = await safeGlobFiles(`**/page.{${componentGlob},md,mdx}`, appDir);
1475
+ const rendererRoutes = await resolveFarmRendererRoutes({
1476
+ renderer: this.config.renderer,
1477
+ root: source.root,
1478
+ srcDir: source.srcDir
1479
+ });
1480
+ const routeModulePaths = /* @__PURE__ */ new Map();
1481
+ const modulePathOf = (file) => routeModulePaths.get(file) ?? path2.join(appDir, file);
1482
+ const rendererFiles = (kind) => (rendererRoutes?.entries ?? []).filter((entry) => entry.kind === kind).map((entry) => {
1483
+ routeModulePaths.set(entry.routeFile, entry.modulePath);
1484
+ if (entry.hydration.hydrate !== void 0 || entry.hydration.strategy !== void 0) {
1485
+ this.rendererRouteHydration.set(entry.modulePath, entry.hydration);
1486
+ }
1487
+ return entry.routeFile;
1488
+ });
1489
+ if (rendererRoutes) {
1490
+ this.rendererRouteDirs.push(rendererRoutes.dir.replace(/\\/g, "/"));
1491
+ for (const entry of rendererRoutes.entries) {
1492
+ this.rendererRouteModules.add(entry.modulePath.replace(/\\/g, "/"));
1493
+ }
1494
+ const notFound = rendererRoutes.entries.find((entry) => entry.kind === "not-found");
1495
+ if (notFound || this.rendererNotFoundPath === void 0) {
1496
+ this.rendererNotFoundPath = notFound?.modulePath ?? null;
1497
+ }
1498
+ }
1499
+ const pageFiles = rendererRoutes ? [
1500
+ ...rendererFiles("page"),
1501
+ ...await safeGlobFiles(`**/@*/**/page.{${componentGlob},md,mdx}`, appDir)
1502
+ ] : await safeGlobFiles(`**/page.{${componentGlob},md,mdx}`, appDir);
1411
1503
  const slotDefaultFiles = await safeGlobFiles(`**/@*/**/default.{${componentGlob}}`, appDir);
1412
- const layoutFiles = await safeGlobFiles(`**/layout.{${componentGlob}}`, appDir);
1413
- const loadingFiles = await safeGlobFiles(`**/loading.{${componentGlob}}`, appDir);
1414
- const errorFiles = await safeGlobFiles(`**/error.{${componentGlob}}`, appDir);
1504
+ const layoutFiles = rendererRoutes ? rendererFiles("layout") : await safeGlobFiles(`**/layout.{${componentGlob}}`, appDir);
1505
+ const loadingFiles = rendererRoutes ? rendererFiles("loading") : await safeGlobFiles(`**/loading.{${componentGlob}}`, appDir);
1506
+ const errorFiles = rendererRoutes ? rendererFiles("error") : await safeGlobFiles(`**/error.{${componentGlob}}`, appDir);
1415
1507
  const metadataImageFiles = await safeGlobFiles(
1416
1508
  `**/{opengraph-image,twitter-image}.{${componentGlob},png,jpg,jpeg,gif,webp}`,
1417
1509
  appDir
@@ -1439,19 +1531,19 @@ var RouteManager = class _RouteManager {
1439
1531
  const markdownFiles = group.files.filter(isFarmMarkdownPageFile);
1440
1532
  if (componentFiles.length > 1) {
1441
1533
  throw new Error(
1442
- `Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path2.join(appDir, file)).join(" and ")}.`
1534
+ `Duplicate page route "${pattern}". Found ${componentFiles.map(modulePathOf).join(" and ")}.`
1443
1535
  );
1444
1536
  }
1445
1537
  if (markdownFiles.length > 1) {
1446
1538
  throw new Error(
1447
- `Duplicate markdown representation for page route "${pattern}". Found ${markdownFiles.map((file) => path2.join(appDir, file)).join(" and ")}.`
1539
+ `Duplicate markdown representation for page route "${pattern}". Found ${markdownFiles.map(modulePathOf).join(" and ")}.`
1448
1540
  );
1449
1541
  }
1450
1542
  const componentFile = componentFiles[0];
1451
1543
  const markdownFile = markdownFiles[0];
1452
1544
  const primaryFile = componentFile || markdownFile;
1453
1545
  if (!primaryFile) continue;
1454
- const modulePath = path2.join(appDir, primaryFile);
1546
+ const modulePath = modulePathOf(primaryFile);
1455
1547
  const existing = this.routes.get(pattern);
1456
1548
  if (existing?.sourceRoot === source.root) {
1457
1549
  throw new Error(
@@ -1462,7 +1554,7 @@ var RouteManager = class _RouteManager {
1462
1554
  route: group.route,
1463
1555
  modulePath,
1464
1556
  ...markdownFile ? {
1465
- markdownSourcePath: path2.join(appDir, markdownFile)
1557
+ markdownSourcePath: modulePathOf(markdownFile)
1466
1558
  } : {},
1467
1559
  pattern,
1468
1560
  ...getPageDirectoryField(group.route, pattern),
@@ -1477,7 +1569,7 @@ var RouteManager = class _RouteManager {
1477
1569
  ]) {
1478
1570
  for (const file of files) {
1479
1571
  const route = parseRoutePath(file);
1480
- const modulePath = path2.join(appDir, file);
1572
+ const modulePath = modulePathOf(file);
1481
1573
  const pattern = createRouteDirectoryPattern(route);
1482
1574
  const existing = target.get(pattern);
1483
1575
  if (existing?.sourceRoot === source.root) {
@@ -1779,8 +1871,6 @@ var RouteManager = class _RouteManager {
1779
1871
  getDocsAdapterRoutes() {
1780
1872
  const docs = this.config.docs;
1781
1873
  if (!docs || typeof docs !== "object" || !docs.enabled) return void 0;
1782
- const usesAdapter = Boolean(docs.adapter && docs.adapter.server && docs.adapter.react);
1783
- if (usesAdapter && !isReactRenderer(this.config.renderer)) return void 0;
1784
1874
  const entry = `/${String(docs.entry || "docs").replace(/^\/+|\/+$/g, "")}`;
1785
1875
  return {
1786
1876
  owns: (routePath) => entry === "/" || routePath === entry || routePath.startsWith(`${entry}/`),
@@ -3320,7 +3410,7 @@ import { Readable, Writable } from "stream";
3320
3410
  // src/not-found.ts
3321
3411
  import fs4 from "fs";
3322
3412
  import path7 from "path";
3323
- function resolveFarmNotFoundComponentPath(config, appDirs) {
3413
+ function resolveFarmNotFoundComponentPath(config, appDirs, discovered) {
3324
3414
  const extensions = getFarmRendererComponentExtensions(config.renderer);
3325
3415
  const configuredPath = config.notFound?.component?.trim();
3326
3416
  if (configuredPath) {
@@ -3335,6 +3425,7 @@ function resolveFarmNotFoundComponentPath(config, appDirs) {
3335
3425
  }
3336
3426
  return componentPath;
3337
3427
  }
3428
+ if (discovered !== void 0) return discovered;
3338
3429
  let discoveredPath = null;
3339
3430
  for (const appDir of appDirs) {
3340
3431
  for (const extension of extensions) {
@@ -7079,11 +7170,19 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
7079
7170
  const snapshot = getFarmI18nClientSnapshot();
7080
7171
  return snapshot && url.startsWith("/") && !url.startsWith("//") ? localizeFarmHref(url, snapshot.locale, snapshot) : url;
7081
7172
  }
7173
+ /**
7174
+ * The not-found page the renderer's `routes()` mapped, or undefined when the renderer has no route
7175
+ * rules and the not-found lookup scans `src/app` as before.
7176
+ */
7177
+ getRendererNotFoundPath() {
7178
+ return this.config.renderer?.routes ? this.routeManager.getRendererNotFoundPath() : void 0;
7179
+ }
7082
7180
  /** The app's not-found component, or null when it relies on the built-in page. */
7083
7181
  async loadNotFoundModule() {
7084
7182
  const notFoundPath = resolveFarmNotFoundComponentPath(
7085
7183
  this.config,
7086
- getFarmAppDirectories(this.config)
7184
+ getFarmAppDirectories(this.config),
7185
+ this.getRendererNotFoundPath()
7087
7186
  );
7088
7187
  if (!notFoundPath) return null;
7089
7188
  return await this.routeManager.loadRouteModule(notFoundPath);
@@ -7165,9 +7264,9 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
7165
7264
  const appDir = path10.join(this.config.root, this.config.srcDir, "app");
7166
7265
  const notFoundExtensions = getFarmRendererComponentExtensions(this.config.renderer);
7167
7266
  let layoutModule = null;
7267
+ const rendererRootLayout = this.config.renderer?.routes ? this.routeManager.getLayouts().get("/")?.modulePath : void 0;
7168
7268
  try {
7169
- for (const ext of notFoundExtensions) {
7170
- const layoutPath = path10.join(appDir, `layout${ext}`);
7269
+ for (const layoutPath of rendererRootLayout ? [rendererRootLayout] : notFoundExtensions.map((ext) => path10.join(appDir, `layout${ext}`))) {
7171
7270
  if (fs7.existsSync(layoutPath)) {
7172
7271
  layoutModule = await this.routeManager.loadLayoutModule(layoutPath);
7173
7272
  break;
@@ -7175,7 +7274,8 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
7175
7274
  }
7176
7275
  const notFoundPath = resolveFarmNotFoundComponentPath(
7177
7276
  this.config,
7178
- getFarmAppDirectories(this.config)
7277
+ getFarmAppDirectories(this.config),
7278
+ this.getRendererNotFoundPath()
7179
7279
  );
7180
7280
  if (notFoundPath) {
7181
7281
  const notFoundModule = await this.loadNotFoundModule();
@@ -7527,6 +7627,7 @@ var FarmApp = class {
7527
7627
  );
7528
7628
  }
7529
7629
  async verifyAppStructure() {
7630
+ if (typeof this.config.renderer?.routes === "function") return;
7530
7631
  const appDirs = getFarmAppDirectories(this.config);
7531
7632
  const hasAppDirectory = (await Promise.all(appDirs.map((appDir) => fileExists(appDir)))).some(
7532
7633
  Boolean
@@ -8474,7 +8575,12 @@ function getFarmClientOptimizeDepsInclude(renderer, root) {
8474
8575
  // React entry imports `react-dom/client` instead, which is already listed. A linked
8475
8576
  // renderer stays source: pre-bundling it would copy the packages it shares with the app's
8476
8577
  // components into the bundle, so a hook would read a different copy than the renderer set.
8477
- ...renderer && root && !isReactRenderer(renderer) && isPackageSpecifier(renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : []
8578
+ ...renderer && root && !isReactRenderer(renderer) && isPackageSpecifier(renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : [],
8579
+ // The islands runtime of a renderer that declares `islands`, which only Farm's entry imports.
8580
+ ...renderer && !isReactRenderer(renderer) && getFarmRendererCapabilities(renderer).islands ? [
8581
+ "@farm.js/core/internal/renderer-islands",
8582
+ "@farm.js/core > @farm.js/islx/islands/client"
8583
+ ] : []
8478
8584
  ])
8479
8585
  );
8480
8586
  }
@@ -0,0 +1,17 @@
1
+ // src/server-query-call.ts
2
+ var FARM_SERVER_QUERY_CLIENT_STATE = /* @__PURE__ */ Symbol.for("farm.serverQueryClientState");
3
+ function beginFarmServerQueryAction(actionId, args) {
4
+ const state = globalThis[FARM_SERVER_QUERY_CLIENT_STATE];
5
+ const active = state?.active?.at(-1);
6
+ return {
7
+ actionId,
8
+ args,
9
+ provisionalKey: active?.provisionalKey,
10
+ owner: active?.owner
11
+ };
12
+ }
13
+
14
+ export {
15
+ FARM_SERVER_QUERY_CLIENT_STATE,
16
+ beginFarmServerQueryAction
17
+ };
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-D2VAANBS.mjs";
19
19
  import {
20
20
  FARM_VERSION
21
- } from "./chunk-OP5VI4TP.mjs";
21
+ } from "./chunk-I5CVJ24H.mjs";
22
22
 
23
23
  // src/mobile/analyzer.ts
24
24
  import { createHash } from "crypto";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createServerQueryCallKey,
6
6
  fetchServerQuery
7
- } from "./chunk-XMHERKSE.mjs";
7
+ } from "./chunk-42IBGQTN.mjs";
8
8
  import {
9
9
  getFarmClientDataCache
10
10
  } from "./chunk-C64XOPBZ.mjs";
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// package.json
2
- var version = "0.1.82";
2
+ var version = "0.1.84";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRouteTypeDeclarations,
3
3
  generateRouteTypes
4
- } from "./chunk-AUFEM3FB.mjs";
4
+ } from "./chunk-L5HDCDFT.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) {