@farm.js/core 0.1.51-beta.3 → 0.1.60

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 (320) hide show
  1. package/dist/{agent-mcp-handler-7JSKGSOW.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
  2. package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
  3. package/dist/{agent-mcp.d-BJKChOrO.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-BAR9njbJ.d.ts → agent-mcp.d-SIoCUP1I.d.ts} +1 -1
  5. package/dist/agent-runtime.cjs +5 -5
  6. package/dist/agent-runtime.d.mts +2 -2
  7. package/dist/agent-runtime.d.ts +2 -2
  8. package/dist/agent-runtime.mjs +4 -4
  9. package/dist/{analyzer-OTPEWH5W.mjs → analyzer-22BEYV7S.mjs} +116 -13
  10. package/dist/{analyzer-TSQXZCZN.cjs → analyzer-LCSI3NSH.cjs} +123 -20
  11. package/dist/api/client.cjs +5 -4
  12. package/dist/api/client.d.mts +1 -1
  13. package/dist/api/client.d.ts +1 -1
  14. package/dist/api/client.mjs +3 -2
  15. package/dist/api/client.native.cjs +45 -0
  16. package/dist/api/client.native.d.mts +23 -0
  17. package/dist/api/client.native.d.ts +23 -0
  18. package/dist/api/client.native.mjs +45 -0
  19. package/dist/api/route-manager.cjs +7 -7
  20. package/dist/api/route-manager.d.mts +4 -4
  21. package/dist/api/route-manager.d.ts +4 -4
  22. package/dist/api/route-manager.mjs +6 -6
  23. package/dist/api/runtime.cjs +5 -5
  24. package/dist/api/runtime.d.mts +3 -3
  25. package/dist/api/runtime.d.ts +3 -3
  26. package/dist/api/runtime.mjs +4 -4
  27. package/dist/{api-client.d-CeA6tNA6.d.mts → api-client.d-BNLXNCXJ.d.mts} +1 -1
  28. package/dist/{api-client.d-BWcqZciH.d.ts → api-client.d-ddQBNGtu.d.ts} +1 -1
  29. package/dist/api.cjs +11 -11
  30. package/dist/api.d.mts +5 -5
  31. package/dist/api.d.ts +5 -5
  32. package/dist/api.mjs +10 -10
  33. package/dist/{app-manifest.d-DEQNnNhV.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
  34. package/dist/{app-manifest.d-BLFbaqx8.d.ts → app-manifest.d-Tb3CJpL4.d.ts} +1 -1
  35. package/dist/app-markdown.cjs +7 -7
  36. package/dist/app-markdown.d.mts +3 -3
  37. package/dist/app-markdown.d.ts +3 -3
  38. package/dist/app-markdown.mjs +6 -6
  39. package/dist/{app.d-CNPaUYaa.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
  40. package/dist/{app.d-CT7xDkj2.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
  41. package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
  42. package/dist/{chunk-OAMUSC7H.cjs → chunk-2FRLSDBT.cjs} +1 -1
  43. package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
  44. package/dist/{chunk-ZD2VKAUI.mjs → chunk-2KTYMMWT.mjs} +1 -1
  45. package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
  46. package/dist/{chunk-UQF3OJVE.mjs → chunk-37PYUEK5.mjs} +173 -29
  47. package/dist/{chunk-VSLM6BHX.cjs → chunk-3OJNNCDL.cjs} +9 -9
  48. package/dist/{chunk-X3JNB2TB.mjs → chunk-3PX4AIXO.mjs} +36 -5
  49. package/dist/{chunk-UQHIWZZ6.cjs → chunk-3TL3AH25.cjs} +12 -6
  50. package/dist/chunk-3YMLUNL2.cjs +251 -0
  51. package/dist/chunk-4JTQPOKO.cjs +137 -0
  52. package/dist/{chunk-7MD37P5V.cjs → chunk-4P23B7DU.cjs} +5 -5
  53. package/dist/{chunk-3BLEXUGE.mjs → chunk-55U5QIXQ.mjs} +1 -1
  54. package/dist/{chunk-TWHXBMLJ.cjs → chunk-5JNUYGNF.cjs} +4 -4
  55. package/dist/{chunk-53SACYBY.cjs → chunk-6BJJYOFL.cjs} +7 -7
  56. package/dist/chunk-6UUH4N4J.mjs +251 -0
  57. package/dist/{chunk-2NHOYYUT.mjs → chunk-7H45IJWO.mjs} +2 -2
  58. package/dist/{chunk-NN3MOPSI.mjs → chunk-A2MN5PQJ.mjs} +7 -7
  59. package/dist/{chunk-KY32FWK7.mjs → chunk-BHJAYPYU.mjs} +2 -2
  60. package/dist/{chunk-VAHBCI6X.mjs → chunk-BQWBHWEW.mjs} +26 -1
  61. package/dist/{chunk-KJMWAUKE.mjs → chunk-C7GJDVN4.mjs} +1 -1
  62. package/dist/{chunk-OYNNA4DD.cjs → chunk-CBKRS3M4.cjs} +9 -9
  63. package/dist/{chunk-I2DQGS56.cjs → chunk-CBOEJ5Z4.cjs} +39 -41
  64. package/dist/{chunk-UJL4JOXV.cjs → chunk-CI4UNQHO.cjs} +2 -2
  65. package/dist/{chunk-S5AQ7CAC.cjs → chunk-CNNBFGL5.cjs} +39 -14
  66. package/dist/chunk-D2X5MUF5.cjs +1457 -0
  67. package/dist/{chunk-LEIXUFJN.cjs → chunk-D4MRNBVF.cjs} +10 -9
  68. package/dist/{chunk-2KVDHNQS.mjs → chunk-D7LTCK3U.mjs} +2 -2
  69. package/dist/{chunk-4SEHMBL4.cjs → chunk-DPJ66FSI.cjs} +22 -22
  70. package/dist/{chunk-FFE2EMF7.cjs → chunk-DZPR2W6U.cjs} +5 -5
  71. package/dist/{chunk-3Z63X45F.mjs → chunk-E72UD6ME.mjs} +1 -1
  72. package/dist/{chunk-XXXRRVY6.mjs → chunk-EGVC4LIG.mjs} +5 -5
  73. package/dist/{chunk-72NBDVWQ.mjs → chunk-EXUONJYV.mjs} +3 -3
  74. package/dist/{chunk-VS7EHLLW.mjs → chunk-EZ34EHQP.mjs} +1 -1
  75. package/dist/{chunk-5FXPJIOT.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
  76. package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
  77. package/dist/{chunk-3SMXQNFD.mjs → chunk-FORSVMEJ.mjs} +2 -2
  78. package/dist/{chunk-R4PHCZ3G.mjs → chunk-HPWB57PZ.mjs} +1 -1
  79. package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
  80. package/dist/{chunk-3XQ57EFI.cjs → chunk-IFXSBJPN.cjs} +16 -16
  81. package/dist/{chunk-3WSIYBMG.mjs → chunk-ILMTRGBG.mjs} +279 -48
  82. package/dist/{chunk-HLWOWZFX.cjs → chunk-JBK7UJOI.cjs} +14 -11
  83. package/dist/chunk-JI5D7MXY.mjs +137 -0
  84. package/dist/{chunk-QXJADAQB.cjs → chunk-JIBEFLQ7.cjs} +6 -2
  85. package/dist/{chunk-LZ4SB57H.mjs → chunk-JPIUGDK4.mjs} +1 -1
  86. package/dist/{chunk-Y3N5BFRJ.mjs → chunk-JSDV2NUN.mjs} +1 -1
  87. package/dist/{chunk-IRSS4HS4.mjs → chunk-K3RU5MOR.mjs} +1 -1
  88. package/dist/chunk-KPOMS5RO.cjs +237 -0
  89. package/dist/{chunk-YAJTD3ZG.mjs → chunk-KVW2M6PI.mjs} +1 -1
  90. package/dist/{chunk-5IONBVJY.cjs → chunk-LB3DPQP6.cjs} +22 -22
  91. package/dist/{chunk-CZ35L6PL.mjs → chunk-LJVNMGE3.mjs} +10 -4
  92. package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
  93. package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
  94. package/dist/{chunk-D7UQC4O6.cjs → chunk-LT4VAF5Z.cjs} +2 -2
  95. package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
  96. package/dist/{chunk-H33PJEXN.cjs → chunk-MEQN6DDA.cjs} +5 -5
  97. package/dist/{chunk-XLRLSTJ6.cjs → chunk-MGKW5XZE.cjs} +7 -7
  98. package/dist/{chunk-B3GZAQSC.cjs → chunk-MHLNWRCJ.cjs} +3 -3
  99. package/dist/{chunk-5ENW27SL.mjs → chunk-MMK4MZUN.mjs} +1 -1
  100. package/dist/{chunk-WGUHDWT5.cjs → chunk-MTWXOEI4.cjs} +527 -366
  101. package/dist/chunk-NHD7BAKD.mjs +1457 -0
  102. package/dist/{chunk-KLNFJDFM.cjs → chunk-NQJDO7K7.cjs} +31 -31
  103. package/dist/{chunk-TSFMFPRU.cjs → chunk-O27PLNQZ.cjs} +10 -10
  104. package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
  105. package/dist/{chunk-YUEYBL35.mjs → chunk-PCXIJKPM.mjs} +8 -8
  106. package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
  107. package/dist/{chunk-B3GM5I6N.cjs → chunk-PRFNLQSP.cjs} +4 -4
  108. package/dist/{chunk-46KXZBOG.cjs → chunk-QAS7KE7J.cjs} +7 -7
  109. package/dist/chunk-QGOZLGVP.mjs +0 -0
  110. package/dist/{chunk-VQJYGZNX.cjs → chunk-QMNWKQL4.cjs} +1 -1
  111. package/dist/{chunk-XB24LZWI.cjs → chunk-QRX4JRBO.cjs} +3 -3
  112. package/dist/{chunk-LNM57D3H.cjs → chunk-R53QDV6T.cjs} +4 -4
  113. package/dist/{chunk-SUV6YO4Q.cjs → chunk-RAWWCDCT.cjs} +5 -5
  114. package/dist/{chunk-LJDIFIJ2.mjs → chunk-RPUJHJHE.mjs} +4 -4
  115. package/dist/{chunk-G2KTRMWA.mjs → chunk-RSEAX5MW.mjs} +4 -0
  116. package/dist/chunk-SJRCWF4Z.mjs +237 -0
  117. package/dist/{chunk-4353ZRE5.mjs → chunk-SX7EECTS.mjs} +8 -5
  118. package/dist/{chunk-LDNSSHEG.mjs → chunk-T4TBK5NY.mjs} +2 -2
  119. package/dist/{chunk-NOTSHVRN.mjs → chunk-T7I62A4C.mjs} +293 -132
  120. package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
  121. package/dist/{chunk-4CGOMZP3.cjs → chunk-UDJY2ZGY.cjs} +487 -256
  122. package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
  123. package/dist/{chunk-TQMI6BYO.cjs → chunk-UYSTTPYJ.cjs} +1262 -936
  124. package/dist/{chunk-E5DXF5GE.mjs → chunk-UZZ6IEQP.mjs} +3 -3
  125. package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
  126. package/dist/{chunk-GAO7MS5O.mjs → chunk-VPTWKOCY.mjs} +19 -19
  127. package/dist/{chunk-UN6N623E.mjs → chunk-VQJHT2ND.mjs} +2 -2
  128. package/dist/{chunk-SJ23LJ3N.cjs → chunk-VVTJTMGQ.cjs} +3 -3
  129. package/dist/{chunk-KHXAJ2KA.cjs → chunk-W2RZ73IU.cjs} +12 -12
  130. package/dist/{chunk-JWI5PUO2.mjs → chunk-W2ZXMMHA.mjs} +2 -1
  131. package/dist/{chunk-BLD5GVCG.mjs → chunk-W6QLRQ3V.mjs} +1 -1
  132. package/dist/{chunk-AV26KHTG.mjs → chunk-X2CZTWQA.mjs} +2 -2
  133. package/dist/chunk-XPIPMWY3.cjs +1 -0
  134. package/dist/{chunk-JXEPLIXD.cjs → chunk-XTG73QZA.cjs} +183 -39
  135. package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
  136. package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
  137. package/dist/{chunk-LPDKG6RA.mjs → chunk-YSXTNSXS.mjs} +1 -1
  138. package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
  139. package/dist/{chunk-3TLKUBXG.mjs → chunk-ZFUKPWFC.mjs} +912 -586
  140. package/dist/{chunk-4TKAIO2F.mjs → chunk-ZMHAFH4R.mjs} +8 -8
  141. package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
  142. package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
  143. package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
  144. package/dist/{chunk-MRNDAJEV.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
  145. package/dist/{client-plugins.d-DllmH8eM.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +10 -2
  146. package/dist/{client-plugins.d-n3iWY1EJ.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +10 -2
  147. package/dist/client-plugins.d.mts +2 -2
  148. package/dist/client-plugins.d.ts +2 -2
  149. package/dist/client.cjs +9 -9
  150. package/dist/client.d.mts +9 -9
  151. package/dist/client.d.ts +9 -9
  152. package/dist/client.mjs +9 -9
  153. package/dist/{config.d-DqKaCr1r.d.ts → config.d-DqZkLwef.d.mts} +139 -1
  154. package/dist/{config.d-DqKaCr1r.d.mts → config.d-DqZkLwef.d.ts} +139 -1
  155. package/dist/config.d.mts +2 -2
  156. package/dist/config.d.ts +2 -2
  157. package/dist/cron.cjs +3 -3
  158. package/dist/cron.d.mts +10 -0
  159. package/dist/cron.d.ts +10 -0
  160. package/dist/cron.mjs +2 -2
  161. package/dist/desktop.d.mts +3 -3
  162. package/dist/desktop.d.ts +3 -3
  163. package/dist/{devtools-UESYARTF.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
  164. package/dist/{devtools-TO6TAO32.cjs → devtools-UF6JYHUN.cjs} +18 -18
  165. package/dist/docs.cjs +19 -19
  166. package/dist/docs.d.mts +3 -3
  167. package/dist/docs.d.ts +3 -3
  168. package/dist/docs.mjs +18 -18
  169. package/dist/index.cjs +96 -96
  170. package/dist/{index.d-BXsAXm1U.d.ts → index.d-DlCELfhf.d.ts} +1 -1
  171. package/dist/{index.d-BL7KKiwa.d.mts → index.d-Dmfb7Kb_.d.mts} +1 -1
  172. package/dist/index.d.mts +18 -18
  173. package/dist/index.d.ts +18 -18
  174. package/dist/index.mjs +139 -139
  175. package/dist/integrations.cjs +5 -5
  176. package/dist/integrations.d.mts +2 -2
  177. package/dist/integrations.d.ts +2 -2
  178. package/dist/integrations.mjs +4 -4
  179. package/dist/internal/app-markdown-runtime.cjs +6 -6
  180. package/dist/internal/app-markdown-runtime.d.mts +3 -3
  181. package/dist/internal/app-markdown-runtime.d.ts +3 -3
  182. package/dist/internal/app-markdown-runtime.mjs +5 -5
  183. package/dist/internal/build-runtime.cjs +50 -50
  184. package/dist/internal/build-runtime.d.mts +4 -4
  185. package/dist/internal/build-runtime.d.ts +4 -4
  186. package/dist/internal/build-runtime.mjs +49 -49
  187. package/dist/internal/cli-runtime.cjs +28 -28
  188. package/dist/internal/cli-runtime.mjs +28 -28
  189. package/dist/internal/client-error-overlay.cjs +4 -4
  190. package/dist/internal/client-error-overlay.mjs +1 -1
  191. package/dist/internal/client-runtime.cjs +20 -15
  192. package/dist/internal/client-runtime.d.mts +5 -5
  193. package/dist/internal/client-runtime.d.ts +5 -5
  194. package/dist/internal/client-runtime.mjs +8 -3
  195. package/dist/internal/compression-runtime.d.mts +2 -2
  196. package/dist/internal/compression-runtime.d.ts +2 -2
  197. package/dist/internal/config-runtime.cjs +18 -18
  198. package/dist/internal/config-runtime.d.mts +94 -6
  199. package/dist/internal/config-runtime.d.ts +94 -6
  200. package/dist/internal/config-runtime.mjs +17 -17
  201. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  202. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  203. package/dist/internal/islands-boot.cjs +211 -0
  204. package/dist/internal/islands-boot.d.mts +8 -0
  205. package/dist/internal/islands-boot.d.ts +8 -0
  206. package/dist/internal/islands-boot.mjs +211 -0
  207. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  208. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  209. package/dist/internal/production-runtime.cjs +37 -101
  210. package/dist/internal/production-runtime.d.mts +17 -11
  211. package/dist/internal/production-runtime.d.ts +17 -11
  212. package/dist/internal/production-runtime.mjs +47 -111
  213. package/dist/markdown.cjs +5 -5
  214. package/dist/markdown.d.mts +2 -2
  215. package/dist/markdown.d.ts +2 -2
  216. package/dist/markdown.mjs +4 -4
  217. package/dist/middleware.cjs +10 -10
  218. package/dist/middleware.d.mts +4 -4
  219. package/dist/middleware.d.ts +4 -4
  220. package/dist/middleware.mjs +9 -9
  221. package/dist/mobile.d.mts +27 -5
  222. package/dist/mobile.d.ts +27 -5
  223. package/dist/modules-VHD7BELU.mjs +13 -0
  224. package/dist/modules-WT5D3AWY.cjs +13 -0
  225. package/dist/native-specs-BD7HOTMJ.mjs +15 -0
  226. package/dist/native-specs-IQQRJOOW.cjs +15 -0
  227. package/dist/native-tree-6G5O53O3.cjs +27 -0
  228. package/dist/{native-tree-EBPDFTRW.mjs → native-tree-VWNW2MQ2.mjs} +10 -8
  229. package/dist/native.cjs +87 -0
  230. package/dist/native.d.mts +72 -0
  231. package/dist/native.d.ts +72 -0
  232. package/dist/native.mjs +87 -0
  233. package/dist/{navigation-delegate.d-C76gXTmO.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
  234. package/dist/{navigation-delegate.d-DIyDslxt.d.ts → navigation-delegate.d-JXx40JzR.d.ts} +1 -1
  235. package/dist/navigation.cjs +5 -5
  236. package/dist/navigation.d.mts +5 -5
  237. package/dist/navigation.d.ts +5 -5
  238. package/dist/navigation.mjs +4 -4
  239. package/dist/{nitro-R444AF3O.mjs → nitro-FLN6DRGJ.mjs} +7 -7
  240. package/dist/{nitro-CK7M4RMY.cjs → nitro-HXAZZQKY.cjs} +12 -12
  241. package/dist/plugin.cjs +42 -42
  242. package/dist/plugin.d.mts +4 -4
  243. package/dist/plugin.d.ts +4 -4
  244. package/dist/plugin.mjs +41 -41
  245. package/dist/port-C6GBH4C6.cjs +419 -0
  246. package/dist/port-WOOQ3V56.mjs +419 -0
  247. package/dist/{production-runtime.d-CDHztggO.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
  248. package/dist/{production-runtime.d-tyaGdbk6.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
  249. package/dist/{programmatic-routes-client.d-XfmIrCK1.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
  250. package/dist/{programmatic-routes-client.d-aAWiDd64.d.mts → programmatic-routes-client.d-CPbNqtIi.d.mts} +2 -2
  251. package/dist/query/client.cjs +6 -6
  252. package/dist/query/client.mjs +2 -2
  253. package/dist/{render-plan.d-Dr5WRjoV.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
  254. package/dist/{render-plan.d-Diwybxo8.d.mts → render-plan.d-DZ-qjjdG.d.mts} +1 -1
  255. package/dist/renderer/react/server.cjs +2 -2
  256. package/dist/renderer/react/server.mjs +3 -3
  257. package/dist/renderer-client.cjs +6 -6
  258. package/dist/renderer-client.d.mts +5 -5
  259. package/dist/renderer-client.d.ts +5 -5
  260. package/dist/renderer-client.mjs +2 -2
  261. package/dist/{request.d-D01fRn--.d.ts → request.d-BiicaNxb.d.ts} +1 -1
  262. package/dist/{request.d-Dd3AFR79.d.mts → request.d-DV0oeUit.d.mts} +1 -1
  263. package/dist/request.d.mts +3 -3
  264. package/dist/request.d.ts +3 -3
  265. package/dist/{route-rendering.d-BQ53lJ_D.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
  266. package/dist/{route-rendering.d-Bhx4QoJt.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
  267. package/dist/{router.d-DQ3k7EYn.d.ts → router.d-DjGn_al7.d.ts} +1 -1
  268. package/dist/{router.d-Bi23a6Xc.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
  269. package/dist/{routes.d-C7jMJFvP.d.ts → routes.d-BKSjHuH9.d.ts} +25 -2
  270. package/dist/{routes.d-BgTd7vI4.d.mts → routes.d-qd8Qf4LG.d.mts} +25 -2
  271. package/dist/routes.d.mts +2 -2
  272. package/dist/routes.d.ts +2 -2
  273. package/dist/{rsc-pipeline-OCZIT5OF.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
  274. package/dist/{rsc-pipeline-K3ER3Q4N.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
  275. package/dist/{runtime-DKNSIH7V.cjs → runtime-DGUOWSMF.cjs} +293 -41
  276. package/dist/{runtime-MKYDEUZT.mjs → runtime-HFZTVNFF.mjs} +283 -31
  277. package/dist/{runtime.d-B2Js6qZ2.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
  278. package/dist/{runtime.d-BL-CGwoi.d.ts → runtime.d-Bm_4hP5T.d.ts} +1 -1
  279. package/dist/{schema-dev-notice-F6QYSOAI.mjs → schema-dev-notice-JMXEQWIQ.mjs} +3 -3
  280. package/dist/{schema-dev-notice-UU7DMZEU.cjs → schema-dev-notice-PLBFDTOF.cjs} +6 -6
  281. package/dist/server-fn-client.d.mts +1 -1
  282. package/dist/server-fn-client.d.ts +1 -1
  283. package/dist/server-plugins.cjs +1 -1
  284. package/dist/server-plugins.d.mts +3 -3
  285. package/dist/server-plugins.d.ts +3 -3
  286. package/dist/server-plugins.mjs +1 -1
  287. package/dist/server.cjs +81 -81
  288. package/dist/server.d.mts +11 -11
  289. package/dist/server.d.ts +11 -11
  290. package/dist/server.mjs +64 -64
  291. package/dist/session-2Q72D4QV.cjs +23 -0
  292. package/dist/{session-IGEDQ5PY.mjs → session-QZXZOPR2.mjs} +2 -2
  293. package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
  294. package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
  295. package/dist/{spa-router.d-DqZ6Lfs0.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
  296. package/dist/{spa-router.d-B2rIFGs0.d.mts → spa-router.d-DHDoXxDE.d.mts} +11 -2
  297. package/dist/testing.cjs +7 -7
  298. package/dist/testing.d.mts +2 -2
  299. package/dist/testing.d.ts +2 -2
  300. package/dist/testing.mjs +6 -6
  301. package/dist/{utils.d-Bv2MPeLR.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
  302. package/dist/{utils.d-fqXe8lNc.d.mts → utils.d-uKZcKJk4.d.mts} +7 -1
  303. package/dist/version.cjs +2 -2
  304. package/dist/version.mjs +1 -1
  305. package/dist/vite.cjs +42 -42
  306. package/dist/vite.d.mts +10 -5
  307. package/dist/vite.d.ts +10 -5
  308. package/dist/vite.mjs +41 -41
  309. package/dist/workflows.cjs +3 -3
  310. package/dist/workflows.mjs +2 -2
  311. package/package.json +17 -3
  312. package/dist/agent-mcp-handler-YE4AGWHN.cjs +0 -18
  313. package/dist/chunk-MIGFX2FN.mjs +0 -758
  314. package/dist/chunk-P6MHI5O2.cjs +0 -758
  315. package/dist/native-tree-MMZS7S6W.cjs +0 -25
  316. package/dist/session-AAU7RNRO.cjs +0 -23
  317. package/dist/{chunk-7FVVQEVL.cjs → chunk-4BS3HSY7.cjs} +2 -2
  318. package/dist/{chunk-N7JQXQAV.cjs → chunk-5OJVKXFV.cjs} +2 -2
  319. package/dist/{chunk-WSDKXV4E.mjs → chunk-72KABRWN.mjs} +4 -4
  320. package/dist/{chunk-C3BOESDW.mjs → chunk-B4CWYGCG.mjs} +3 -3
@@ -24,14 +24,14 @@ import {
24
24
  } from "./chunk-KQH2COEJ.mjs";
25
25
  import {
26
26
  FARM_MOBILE_SESSION_PLUGIN
27
- } from "./chunk-C3BOESDW.mjs";
27
+ } from "./chunk-B4CWYGCG.mjs";
28
28
  import {
29
29
  assertFarmDocsAdapterServesNoGuardedPages,
30
30
  compileFarmDocsAdapterEdgeManifest,
31
31
  createFarmDocsAPIHandler,
32
32
  hasFarmDocsRuntimeAdapter,
33
33
  listFarmDocsAdapterPages
34
- } from "./chunk-5FXPJIOT.mjs";
34
+ } from "./chunk-F6Y7ZAPQ.mjs";
35
35
  import {
36
36
  FARM_DOCS_LAST_MODIFIED_MANIFEST,
37
37
  createFarmDocsHandler,
@@ -43,7 +43,7 @@ import {
43
43
  loadFarmDocsPage,
44
44
  resolveFarmDocsContentDir,
45
45
  toFarmDocsMarkdownPage
46
- } from "./chunk-ZD2VKAUI.mjs";
46
+ } from "./chunk-2KTYMMWT.mjs";
47
47
  import {
48
48
  generateFarmDocsSearchClientRuntime,
49
49
  isFarmDocsSearchEnabled,
@@ -51,13 +51,7 @@ import {
51
51
  } from "./chunk-ALEUMLJN.mjs";
52
52
  import {
53
53
  FARM_PRERENDER_ENV
54
- } from "./chunk-3SMXQNFD.mjs";
55
- import {
56
- resolveFarmInstrumentationFile
57
- } from "./chunk-N35YPV4N.mjs";
58
- import {
59
- resolveFarmInstrumentationRuntime
60
- } from "./chunk-WNDAISB7.mjs";
54
+ } from "./chunk-FORSVMEJ.mjs";
61
55
  import {
62
56
  loadFarmDocsEngine
63
57
  } from "./chunk-VE3FWJBO.mjs";
@@ -66,12 +60,21 @@ import {
66
60
  getDeployTargetForPreset,
67
61
  hasCustomFarmRouteContext,
68
62
  resolveDeployOutputPath
69
- } from "./chunk-GAO7MS5O.mjs";
63
+ } from "./chunk-VPTWKOCY.mjs";
64
+ import {
65
+ resolveFarmInstrumentationFile
66
+ } from "./chunk-N35YPV4N.mjs";
67
+ import {
68
+ resolveFarmInstrumentationRuntime
69
+ } from "./chunk-WNDAISB7.mjs";
70
70
  import {
71
71
  DEFAULT_NOT_FOUND_STYLES,
72
72
  FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
73
+ FARM_NAVIGATION_STREAM_READER_SOURCE,
73
74
  FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE,
74
75
  SHARP_INSTALL_HINT,
76
+ canBootFarmIslandsClient,
77
+ collectFarmServerStylesheets,
75
78
  collectFarmWebMCPTools,
76
79
  createFarmApp,
77
80
  createFarmSourceAlias,
@@ -97,13 +100,14 @@ import {
97
100
  resolveFarmImageServerRuntime,
98
101
  resolveFarmIsolatedClientHydrationMode,
99
102
  resolveFarmNotFoundComponentPath,
103
+ resolveFarmRouteRootStrategy,
100
104
  usePackageClientBoundaryCacheFile,
101
105
  usesFarmServerTree,
102
106
  withPackageClientBoundaryCache
103
- } from "./chunk-3TLKUBXG.mjs";
107
+ } from "./chunk-ZFUKPWFC.mjs";
104
108
  import {
105
109
  loadTailwindVitePlugin
106
- } from "./chunk-PIHKO25G.mjs";
110
+ } from "./chunk-OM7WILES.mjs";
107
111
  import {
108
112
  PluginManager
109
113
  } from "./chunk-GHNW564E.mjs";
@@ -111,7 +115,7 @@ import {
111
115
  generateFarmTypeArtifacts,
112
116
  readRouteRenderingDirectiveFromFile,
113
117
  resolveRouteRenderingConfigFromFile
114
- } from "./chunk-CZ35L6PL.mjs";
118
+ } from "./chunk-LJVNMGE3.mjs";
115
119
  import {
116
120
  HOISTED_HEAD_ELEMENT,
117
121
  appMiddlewareMayHandlePath,
@@ -124,7 +128,7 @@ import {
124
128
  layoutsCanCoverSamePage,
125
129
  routeBoundaryCoversDirectory,
126
130
  stripRouteGroups
127
- } from "./chunk-YUEYBL35.mjs";
131
+ } from "./chunk-PCXIJKPM.mjs";
128
132
  import {
129
133
  FARM_NATIVE_TREE_CONTENT_TYPE
130
134
  } from "./chunk-LLZSYFOM.mjs";
@@ -141,18 +145,15 @@ import {
141
145
  listFarmBuiltInRoutePaths,
142
146
  resolveFarmApiCatalogInput,
143
147
  resolveFarmAppManifestInput
144
- } from "./chunk-4TKAIO2F.mjs";
148
+ } from "./chunk-ZMHAFH4R.mjs";
145
149
  import {
146
150
  FARM_DEFAULT_MCP_PATH,
147
151
  createFarmDefaultMCPServer,
148
152
  farmConfigMountsMCP
149
- } from "./chunk-E5DXF5GE.mjs";
153
+ } from "./chunk-UZZ6IEQP.mjs";
150
154
  import {
151
155
  farmEnvironmentFunctionsPlugin
152
156
  } from "./chunk-ZQ5BDNKW.mjs";
153
- import {
154
- isFarmMarkdownPageFile
155
- } from "./chunk-3Z63X45F.mjs";
156
157
  import {
157
158
  generateFarmDocsAdapterClientRuntime,
158
159
  getFarmDocsAdapterConfigModule
@@ -180,50 +181,53 @@ import {
180
181
  applyFarmCspHashesToHtml,
181
182
  createFarmCspNonce
182
183
  } from "./chunk-22W4FNTG.mjs";
184
+ import {
185
+ getFarmAppDirectories
186
+ } from "./chunk-52Y3C3HG.mjs";
183
187
  import {
184
188
  createBundledEnv
185
189
  } from "./chunk-N33DLJBC.mjs";
186
190
  import {
187
- getFarmAppDirectories
188
- } from "./chunk-52Y3C3HG.mjs";
191
+ isFarmMarkdownPageFile
192
+ } from "./chunk-E72UD6ME.mjs";
189
193
  import {
190
194
  resolveFarmMdxComponentsModulePath,
191
195
  resolveMdxConfig
192
196
  } from "./chunk-UIJOLBUL.mjs";
197
+ import {
198
+ getFarmMarkdownAlternatePath
199
+ } from "./chunk-YSXTNSXS.mjs";
193
200
  import {
194
201
  applyFarmWorkflowVercelCrons,
195
202
  prepareFarmWorkflowsForNitro
196
- } from "./chunk-LZ4SB57H.mjs";
203
+ } from "./chunk-JPIUGDK4.mjs";
197
204
  import {
198
205
  applyFarmCronVercelCrons,
199
206
  createFarmCronCloudflareConfig,
200
207
  mergeScheduledTasks,
201
208
  prepareFarmCronForNitro
202
- } from "./chunk-X3JNB2TB.mjs";
209
+ } from "./chunk-3PX4AIXO.mjs";
203
210
  import {
204
211
  resolveServerActionsConfig
205
212
  } from "./chunk-FSQMN2MQ.mjs";
206
- import {
207
- getFarmMarkdownAlternatePath
208
- } from "./chunk-LPDKG6RA.mjs";
209
213
  import {
210
214
  _collectFarmStorageModules
211
215
  } from "./chunk-TJVUTGED.mjs";
212
216
  import {
213
217
  getFarmIntegrationPluginServerRuntime,
214
218
  getIntegrationProviders
215
- } from "./chunk-Y2G5SJFB.mjs";
219
+ } from "./chunk-IFHPDLIS.mjs";
216
220
  import {
217
221
  FARM_INTEGRATION_API_BASE_PATH_KEY
218
- } from "./chunk-F6TLUMH7.mjs";
222
+ } from "./chunk-M53MIIXY.mjs";
219
223
  import {
220
224
  appendMiddlewareDirectory,
221
225
  appendMiddlewareRoutePath,
222
226
  compareMiddlewareRouteLocations
223
- } from "./chunk-5ENW27SL.mjs";
227
+ } from "./chunk-MMK4MZUN.mjs";
224
228
  import {
225
229
  APIRouteManager
226
- } from "./chunk-KY32FWK7.mjs";
230
+ } from "./chunk-BHJAYPYU.mjs";
227
231
  import {
228
232
  readFarmI18nCatalogs
229
233
  } from "./chunk-DU4VHHPJ.mjs";
@@ -243,14 +247,14 @@ import {
243
247
  logger,
244
248
  toPosixPath,
245
249
  toViteModuleId
246
- } from "./chunk-Y3N5BFRJ.mjs";
250
+ } from "./chunk-JSDV2NUN.mjs";
247
251
  import {
248
252
  resolveFarmAPIServerBasePath,
249
253
  resolveFarmAPIServerRoutePath
250
- } from "./chunk-LM2YOGDK.mjs";
254
+ } from "./chunk-2I6PUKWJ.mjs";
251
255
  import {
252
256
  FARM_VERSION
253
- } from "./chunk-R4PHCZ3G.mjs";
257
+ } from "./chunk-HPWB57PZ.mjs";
254
258
  import {
255
259
  getFarmPresetRuntime
256
260
  } from "./chunk-UAQD67HM.mjs";
@@ -272,6 +276,7 @@ import { randomBytes } from "crypto";
272
276
  import path from "path";
273
277
  var FARM_CLIENT_CSS_HREF_PLACEHOLDER = "/__farm_client_css_href__";
274
278
  var FARM_CLIENT_JS_SRC_PLACEHOLDER = "/__farm_client_js_src__";
279
+ var FARM_CLIENT_BOOT_SRC_PLACEHOLDER = "/__farm_client_boot_src__";
275
280
  async function hashAndCopy(sourcePath, destinationDir, hashedName) {
276
281
  const fs4 = await import("fs/promises");
277
282
  try {
@@ -304,6 +309,16 @@ async function findFingerprintedClientEntry(clientOutputDir) {
304
309
  return null;
305
310
  }
306
311
  }
312
+ async function resolveClientBootSrc(clientOutputDir) {
313
+ const fs4 = await import("fs/promises");
314
+ try {
315
+ const entries = await fs4.readdir(clientOutputDir);
316
+ const name = entries.find((entry) => /^farm-client-boot-h[0-9a-f]+\.js$/.test(entry));
317
+ return name ? `/${name}` : null;
318
+ } catch {
319
+ return null;
320
+ }
321
+ }
307
322
  async function resolveHashedClientJsSrc(clientOutputDir) {
308
323
  const entryName = await findFingerprintedClientEntry(clientOutputDir);
309
324
  if (!entryName) return "/farm-client.js";
@@ -1169,6 +1184,20 @@ async function readMiddlewareFileConfig(filePath) {
1169
1184
  }
1170
1185
 
1171
1186
  // src/nitro/universal-build.ts
1187
+ var FARM_NATIVE_STYLESHEETS_PLACEHOLDER = "__FARM_NATIVE_STYLESHEETS__";
1188
+ async function readFarmNativeStylesheets(clientOutputDir, clientCssHref) {
1189
+ const fs4 = await import("fs/promises");
1190
+ try {
1191
+ return {
1192
+ [clientCssHref]: await fs4.readFile(
1193
+ path10.join(clientOutputDir, clientCssHref.slice(1)),
1194
+ "utf8"
1195
+ )
1196
+ };
1197
+ } catch {
1198
+ return {};
1199
+ }
1200
+ }
1172
1201
  function preloadFarmNitroBuilder() {
1173
1202
  return import("nitro/builder").then(
1174
1203
  (value) => ({ status: "fulfilled", value }),
@@ -2050,15 +2079,8 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2050
2079
  rendererBuild?.abort();
2051
2080
  }
2052
2081
  }
2053
- function shouldBuildFarmMobileClient(config, options = {}) {
2054
- if (!config.mobileClient || config.desktop) return false;
2055
- const mode = resolveFarmServerComponentsMode(config.experimental?.serverComponents);
2056
- if (mode === void 0) return true;
2057
- if (!options.quiet)
2058
- logger.info(
2059
- `\u{1F4F1} No mobile client for experimental.serverComponents (${mode}) yet; a mobile shell loads the web client.`
2060
- );
2061
- return false;
2082
+ function shouldBuildFarmMobileClient(config) {
2083
+ return Boolean(config.mobileClient) && !config.desktop;
2062
2084
  }
2063
2085
  function varyFarmNitroCacheRulesByShell(rules) {
2064
2086
  return Object.fromEntries(
@@ -2254,6 +2276,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2254
2276
  });
2255
2277
  const layoutAppliesToRoute = routeBoundaryCoversDirectory;
2256
2278
  const routeDirectory = (route) => route.directory ?? route.pattern;
2279
+ const islandsMode = resolveFarmServerComponentsMode(config.experimental?.serverComponents) === "islands";
2257
2280
  const adapterOwnsDocsRuntime = Boolean(
2258
2281
  isReactRenderer(config.renderer) && config.docs?.enabled && config.docs.adapter?.server && config.docs.adapter.react
2259
2282
  );
@@ -2309,7 +2332,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2309
2332
  }
2310
2333
  }))
2311
2334
  ],
2312
- layoutAppliesToRoute
2335
+ layoutAppliesToRoute,
2336
+ { serverOwners: islandsMode }
2313
2337
  );
2314
2338
  for (const layout of clientLayouts) {
2315
2339
  const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
@@ -2343,15 +2367,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2343
2367
  }
2344
2368
  if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0) {
2345
2369
  const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
2346
- const hydrationStrategies = [
2347
- ...metadata.islandStrategy ? [metadata.islandStrategy] : [],
2348
- ...applicableClientLayouts.flatMap(
2349
- (layout) => layout.islandStrategy ? [layout.islandStrategy] : []
2350
- )
2351
- ];
2352
- const islandStrategy = hydrationStrategies.every(
2353
- (strategy) => strategy === hydrationStrategies[0]
2354
- ) ? hydrationStrategies[0] ?? "load" : "load";
2370
+ const islandStrategy = resolveFarmRouteRootStrategy(
2371
+ route,
2372
+ metadata,
2373
+ clientLayouts,
2374
+ root,
2375
+ islandsMode
2376
+ );
2355
2377
  clientPages.push({
2356
2378
  ...route,
2357
2379
  relativePath,
@@ -2433,10 +2455,26 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2433
2455
  generateClientCachePersistenceCode(resolveFarmClientCacheAdapterEntry(root, config.cache)),
2434
2456
  adapterOwnsDocsRuntime ? getFarmDocsAdapterConfigModule(config.docs) : void 0,
2435
2457
  resolveFarmServerComponentsMode(config.experimental?.serverComponents) === "islands",
2436
- platform
2458
+ platform,
2459
+ islandsMode ? collectFarmServerStylesheets(
2460
+ [
2461
+ ...layoutRoutes.map((layout) => layout.modulePath),
2462
+ ...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
2463
+ ],
2464
+ root
2465
+ ) : []
2437
2466
  );
2438
2467
  const entryName = platform === "mobile" ? FARM_MOBILE_CLIENT_ENTRY_NAME : "farm-client";
2439
2468
  await fs4.writeFile(clientEntryPath, clientHydrationCode);
2469
+ const clientInput = { [entryName]: clientEntryPath };
2470
+ if (platform === "web" && canBootFarmIslandsClient(config)) {
2471
+ const clientBootPath = path10.join(clientEntryDir, "farm-client-boot.tsx");
2472
+ await fs4.writeFile(
2473
+ clientBootPath,
2474
+ 'import { startFarmIslandsBoot } from "@farm.js/core/internal/islands-boot";\nstartFarmIslandsBoot();\n'
2475
+ );
2476
+ clientInput[`${entryName}-boot`] = clientBootPath;
2477
+ }
2440
2478
  const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
2441
2479
  let postcssSearchPath;
2442
2480
  let tailwindVitePlugin = void 0;
@@ -2477,9 +2515,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2477
2515
  cssCodeSplit: false,
2478
2516
  // Bundle all CSS into one file
2479
2517
  rollupOptions: {
2480
- input: {
2481
- [entryName]: clientEntryPath
2482
- },
2518
+ input: clientInput,
2483
2519
  output: {
2484
2520
  entryFileNames: "[name]-h[hash].js",
2485
2521
  chunkFileNames: "chunks/[name]-h[hash].js",
@@ -2709,48 +2745,7 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
2709
2745
  return response;
2710
2746
  }
2711
2747
 
2712
- ${streamNavigations ? `// Reads a streamed navigation (F-Stream) up to the end of React's shell. \`next\` then resolves
2713
- // with each later flush as it ends, and null at the end; a document without a marker is all shell.
2714
- // The marker carries the random token the server sent in the F-Flush header, so page content
2715
- // cannot forge a boundary; a response without a valid token is all shell.
2716
- async function readFarmNavigationStream(body, flushToken) {
2717
- const reader = body.getReader();
2718
- const decoder = new TextDecoder();
2719
- const marker = typeof flushToken === "string" && /^[0-9a-f]{32}$/.test(flushToken)
2720
- ? "<!--farm-flush:" + flushToken + "-->"
2721
- : "";
2722
- let text = "";
2723
- let done = false;
2724
- const next = async function() {
2725
- for (;;) {
2726
- const at = marker ? text.indexOf(marker) : -1;
2727
- if (at !== -1) {
2728
- const flush = text.slice(0, at);
2729
- text = text.slice(at + marker.length);
2730
- return flush;
2731
- }
2732
- if (done) {
2733
- const flush = text;
2734
- text = "";
2735
- return flush ? flush : null;
2736
- }
2737
- const result = await reader.read();
2738
- if (result.done) {
2739
- done = true;
2740
- text += decoder.decode();
2741
- } else {
2742
- text += decoder.decode(result.value, { stream: true });
2743
- }
2744
- }
2745
- };
2746
- const shell = await next();
2747
- if (done && !text) return { shell: shell || "" };
2748
- return {
2749
- shell: shell,
2750
- next: next,
2751
- cancel: function() { reader.cancel().catch(function() {}); },
2752
- };
2753
- }` : ""}
2748
+ ${streamNavigations ? FARM_NAVIGATION_STREAM_READER_SOURCE : ""}
2754
2749
 
2755
2750
  function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
2756
2751
  if (error?.name === "FarmDeploymentMismatchError") {
@@ -3506,7 +3501,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
3506
3501
  secure: false
3507
3502
  },
3508
3503
  direction: {}
3509
- }, plugins = [], renderer = REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform) {
3504
+ }, plugins = [], renderer = REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
3510
3505
  const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
3511
3506
  const clientPluginEntry = generateFarmClientPluginEntryCode(
3512
3507
  plugins,
@@ -3526,7 +3521,20 @@ __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot
3526
3521
  renderer.componentExtensions ?? []
3527
3522
  );
3528
3523
  const globalsCssPath = path10.join(root, srcDir, "app", "globals.css");
3529
- const cssImport = existsSync2(globalsCssPath) ? `import ${JSON.stringify(toImportPath(globalsCssPath))};` : "";
3524
+ const serverStyleModules = [];
3525
+ const cssImport = [
3526
+ ...existsSync2(globalsCssPath) ? [globalsCssPath] : [],
3527
+ ...serverStylesheets.filter((stylesheet) => stylesheet !== globalsCssPath)
3528
+ ].map((stylesheet) => {
3529
+ if (!/\.module\.[a-z]+$/.test(stylesheet)) {
3530
+ return `import ${JSON.stringify(toImportPath(stylesheet))};`;
3531
+ }
3532
+ const binding = `__farmServerStyle${serverStyleModules.length}`;
3533
+ serverStyleModules.push(binding);
3534
+ return `import * as ${binding} from ${JSON.stringify(toImportPath(stylesheet))};`;
3535
+ }).concat(
3536
+ serverStyleModules.length > 0 ? [`globalThis.__FARM_SERVER_STYLES__ = [${serverStyleModules.join(", ")}];`] : []
3537
+ ).join("\n");
3530
3538
  const layoutImportStatements = [];
3531
3539
  const layoutRegistrations = [];
3532
3540
  const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
@@ -4466,9 +4474,9 @@ async function hydrate() {
4466
4474
  !matched.route.pageShouldHydrate &&
4467
4475
  !hasHydratableLayout(pathname)
4468
4476
  ) {
4469
- const hydrationController = new AbortController();
4470
- pendingPageHydrationController = hydrationController;
4471
- await hydrateFarmIsolatedClientBoundaries(document, hydrationController.signal);
4477
+ // Not cancelled by a navigation: an island it removes is disposed with its DOM, and one in a
4478
+ // layout it keeps still waits for its trigger, with any click it already holds.
4479
+ await hydrateFarmIsolatedClientBoundaries(document);
4472
4480
  return;
4473
4481
  }` : ""}
4474
4482
 
@@ -5303,6 +5311,10 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5303
5311
  modulePath: entry.modulePath
5304
5312
  })
5305
5313
  );
5314
+ const mobileShellLoadingRoutes = config.mobileShells ? Array.from(routeManager.getLoadings().values(), (entry) => ({
5315
+ pattern: entry.pattern,
5316
+ modulePath: entry.modulePath
5317
+ })) : [];
5306
5318
  const i18nCatalogs = config.i18n.enabled ? (await readFarmI18nCatalogs(config.i18n)).catalogs : {};
5307
5319
  const appDirs = getFarmAppDirectories(config);
5308
5320
  let openAPIReference = null;
@@ -5416,7 +5428,8 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5416
5428
  preset,
5417
5429
  i18nCatalogs,
5418
5430
  isolatedClientBoundaryModules,
5419
- hydrationPlanCache
5431
+ hydrationPlanCache,
5432
+ mobileShellLoadingRoutes
5420
5433
  );
5421
5434
  const virtualEntryId = "\0virtual:farm-ssr-entry";
5422
5435
  const useExternalMetadataImageRuntime = shouldUseExternalMetadataImageRuntime(preset, true);
@@ -6022,9 +6035,11 @@ if (typeof ReactDOMServer.configureApp !== "function") {
6022
6035
  }
6023
6036
  ReactDOMServer.configureApp(__farmAppSetup);`;
6024
6037
  }
6025
- function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache) {
6038
+ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache, mobileShellLoadingRoutes = []) {
6026
6039
  const farmIslandsMode = resolveFarmServerComponentsMode(config.experimental?.serverComponents) === "islands";
6027
- const farmMobileClient = shouldBuildFarmMobileClient(config, { quiet: true });
6040
+ const farmClientBoot = canBootFarmIslandsClient(config);
6041
+ const farmMobileClient = shouldBuildFarmMobileClient(config);
6042
+ const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
6028
6043
  const hasCompressionRuntime = config.compress && resolveFarmInstrumentationRuntime(preset) === "nodejs";
6029
6044
  const servesAgentRobotsTxt = Boolean(config.agent?.crawlers?.enabled) && !applicationMetadataRoutes.some(
6030
6045
  (metadata) => metadata.kind === "robots" && metadata.pattern === "/"
@@ -6175,7 +6190,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6175
6190
  depth: getRouteDirectoryDepth(route.directory ?? route.pattern),
6176
6191
  metadata: pageHydrationPlans.get(route.modulePath)
6177
6192
  })),
6178
- routeBoundaryCoversDirectory
6193
+ routeBoundaryCoversDirectory,
6194
+ { serverOwners: pageHydrationPlanOptions.serverOwners }
6179
6195
  );
6180
6196
  const providerServerImports = [
6181
6197
  providerServerModules.hasClerkProvider ? `import { ClerkProvider as FarmClerkProvider } from "@clerk/react";` : "",
@@ -6237,7 +6253,17 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6237
6253
  module: ${varName},
6238
6254
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
6239
6255
  clientModule: ${JSON.stringify(toViteModuleId(route.modulePath, config.root))},` : ""}
6240
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${usesFarmServerTree(clientMetadata) ? "\n serverTree: true," : ""}${renderingDirective ? `
6256
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${usesFarmServerTree(clientMetadata) ? "\n serverTree: true," : ""}${(() => {
6257
+ const rootStrategy = resolveFarmRouteRootStrategy(
6258
+ route,
6259
+ clientMetadata,
6260
+ layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
6261
+ config.root,
6262
+ pageHydrationPlanOptions.serverOwners
6263
+ );
6264
+ return rootStrategy === "load" ? "" : `
6265
+ rootStrategy: ${JSON.stringify(rootStrategy)},`;
6266
+ })()}${renderingDirective ? `
6241
6267
  rendering: ${JSON.stringify(renderingDirective)},` : ""}
6242
6268
  ${route.source !== void 0 ? `markdownSource: {
6243
6269
  source: ${JSON.stringify(route.source)},
@@ -6310,6 +6336,24 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6310
6336
  module: ${varName},
6311
6337
  }`);
6312
6338
  });
6339
+ const loadingImports = [];
6340
+ const loadingRegistrations = [];
6341
+ if (farmMobileShells) {
6342
+ mobileShellLoadingRoutes.forEach((loadingRoute, index) => {
6343
+ const varName = `loadingRoute${index}`;
6344
+ loadingImports.push(
6345
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
6346
+ );
6347
+ const groupScope = getRouteGroupScope(loadingRoute.pattern);
6348
+ loadingRegistrations.push(`
6349
+ {
6350
+ pattern: ${JSON.stringify(stripRouteGroups(loadingRoute.pattern))},${groupScope ? `
6351
+ groupScope: ${JSON.stringify(groupScope)},
6352
+ directoryDepth: ${getRouteDirectoryDepth(loadingRoute.pattern)},` : ""}
6353
+ module: ${varName},
6354
+ }`);
6355
+ });
6356
+ }
6313
6357
  const metadataImageImports = [];
6314
6358
  const metadataImageRegistrations = [];
6315
6359
  metadataImageRoutes.forEach((image, index) => {
@@ -6468,7 +6512,45 @@ function applyFarmMobileShellResponse(request, response, context) {
6468
6512
  // No mobile block: no mobile client, and documents ignore X-Farm-Shell.
6469
6513
  function applyFarmMobileShellResponse(request, response) {
6470
6514
  return response;
6471
- }`}${farmIslandsMode ? `
6515
+ }`}${farmMobileShells ? `
6516
+ import {
6517
+ _checkFarmMobileShellRoute,
6518
+ _isFarmMobileShellRenderRequest,
6519
+ } from "@farm.js/core/internal/production-runtime";
6520
+ // farm build --mobile with mobile.shells (RFC 0004, 7.2): this server renders a page shell, the
6521
+ // route's layouts around its loading file, for requests that carry this build's token. A web
6522
+ // build has no token and none of this.
6523
+ const farmMobileShellToken = ${JSON.stringify(farmMobileShells.token)};
6524
+ const loadingRoutes = [${loadingRegistrations.join(",")}
6525
+ ];
6526
+
6527
+ /**
6528
+ * A request for a page shell: the loading component it renders in place of the page, or a
6529
+ * Response saying why the route has none. Null for every other request.
6530
+ */
6531
+ function resolveFarmMobileShellRender(request, route, routePathname) {
6532
+ if (!_isFarmMobileShellRenderRequest(request, farmMobileShellToken)) return null;
6533
+ const loading = getMatchingErrorBoundary(routePathname, loadingRoutes);
6534
+ const reason = _checkFarmMobileShellRoute({
6535
+ requested: request.headers.get("x-farm-shell-route"),
6536
+ route: route.pattern,
6537
+ layouts: getApplicableLayouts(routePathname, route.directory || route.pattern).map(
6538
+ (layout) => layout.pattern,
6539
+ ),
6540
+ loading: loading && loading.route.module.default ? loading.route.pattern : null,
6541
+ });
6542
+ if (reason) {
6543
+ return farmOwnedResponse(reason, {
6544
+ status: 404,
6545
+ headers: {
6546
+ "Content-Type": "text/plain; charset=utf-8",
6547
+ "Cache-Control": "private, no-store",
6548
+ "X-Farm-Shell-Render": "none",
6549
+ },
6550
+ });
6551
+ }
6552
+ return loading.route.module.default;
6553
+ }` : ""}${farmIslandsMode ? `
6472
6554
  import { getSharedLayoutPrefixLength, handleFarmFormActionRequest, ignoreFarmHeldValues, installFarmIslandValues, parseFarmLayoutChainHeader } from "@farm.js/core/internal/production-runtime";
6473
6555
  import { installFarmIslandsServer } from "@farm.js/core/internal/islands-server";
6474
6556
  installFarmIslandsServer();
@@ -6630,7 +6712,8 @@ ${apiImports.join("\n")}
6630
6712
  ${pageImports.join("\n")}
6631
6713
  ${layoutImports.join("\n")}
6632
6714
  ${routeSlotImports.join("\n")}
6633
- ${errorImports.join("\n")}
6715
+ ${errorImports.join("\n")}${loadingImports.length > 0 ? `
6716
+ ${loadingImports.join("\n")}` : ""}
6634
6717
  ${metadataImageImports.join("\n")}
6635
6718
  ${applicationMetadataImports.join("\n")}
6636
6719
  ${middlewareImports.join("\n")}
@@ -7157,6 +7240,32 @@ function renderFarmClientEntryScript(early) {
7157
7240
  return stampFarmCspNonce('<script type="module"' + (early ? ' async' : '') + ' src="/__farm_client_js_src__"></script>');
7158
7241
  }
7159
7242
 
7243
+ // Islands mode: a whole document in which nothing hydrates at load (no island with \`load\`, and no
7244
+ // page, layout or route slot hydrating as a root) starts with the boot entry, which loads the
7245
+ // client runtime on an island's own trigger, a link or a form (RFC 0003, section 10).
7246
+ const FARM_CLIENT_BOOT = ${JSON.stringify(farmClientBoot)};
7247
+ const FARM_ISLAND_OPENING_TAG = /<f-island\\b[^>]*>/g;
7248
+ const FARM_DEFERRED_ISLAND_STRATEGY = /\\sstrategy="(?:interaction|visible|idle)"/;
7249
+
7250
+ function farmDocumentBootsClient(markup, hydratesAtLoad, routeSlots) {
7251
+ if (!FARM_CLIENT_BOOT || hydratesAtLoad || typeof markup !== "string") return false;
7252
+ if (routeSlots && routeSlots.length > 0) return false;
7253
+ // A Suspense boundary the server gave up on, which the browser renders.
7254
+ if (markup.includes("<!--$!-->") || markup.includes("<!--$?-->")) return false;
7255
+ for (const match of markup.matchAll(FARM_ISLAND_OPENING_TAG)) {
7256
+ if (!FARM_DEFERRED_ISLAND_STRATEGY.test(match[0])) return false;
7257
+ }
7258
+ return true;
7259
+ }
7260
+
7261
+ // The boot entry runs the client entry from the URL on its script. A root that waits (the element
7262
+ // a hydrating layout or client page hydrates) is named with its strategy, for the boot to watch.
7263
+ function renderFarmClientBootScript(root, rootStrategy) {
7264
+ return stampFarmCspNonce('<script type="module" src="${farmClientBoot ? FARM_CLIENT_BOOT_SRC_PLACEHOLDER : ""}" data-farm-runtime="/__farm_client_js_src__"' +
7265
+ (root ? ' data-farm-root="' + root + '" data-farm-root-strategy="' + rootStrategy + '"' : '') +
7266
+ '></script>');
7267
+ }
7268
+
7160
7269
  // Renderer options for the response being rendered: its CSP nonce, which the
7161
7270
  // renderer puts on the inline scripts it emits.
7162
7271
  function getFarmRendererRenderOptions() {
@@ -7927,12 +8036,13 @@ function withFarmDocsRequestCache(response, request, farmLocaleResolution, middl
7927
8036
 
7928
8037
  ${generateRuntimePathMatcherSource()}
7929
8038
 
7930
- function getMatchingErrorBoundary(pathname) {
8039
+ // The nearest boundary file for a page path. Page shells pass their loading files.
8040
+ function getMatchingErrorBoundary(pathname, boundaries = errorRoutes) {
7931
8041
  const pathSegments = splitRuntimePath(pathname);
7932
8042
  let bestMatch = null;
7933
8043
  let directory;
7934
8044
 
7935
- for (const errorRoute of errorRoutes) {
8045
+ for (const errorRoute of boundaries) {
7936
8046
  const patternDepth = splitRuntimePath(errorRoute.pattern).length;
7937
8047
  if (patternDepth > pathSegments.length) continue;
7938
8048
  const candidatePath = patternDepth === 0
@@ -9206,6 +9316,7 @@ ${hasServerRuntimeIntegrations ? `
9206
9316
  ${config.mobileClient ? `
9207
9317
  // The mobile app's native-tier screens: the page, rendered as for a browser, read into a
9208
9318
  // tree of native views.
9319
+ const farmNativeStylesheets = JSON.parse(${JSON.stringify(FARM_NATIVE_STYLESHEETS_PLACEHOLDER)});
9209
9320
  if (
9210
9321
  (request.method === "GET" || request.method === "HEAD") &&
9211
9322
  request.headers.get("accept")?.includes(${JSON.stringify(FARM_NATIVE_TREE_CONTENT_TYPE)})
@@ -9213,6 +9324,8 @@ ${hasServerRuntimeIntegrations ? `
9213
9324
  const treeResponse = await createFarmNativeTreeResponse({
9214
9325
  request,
9215
9326
  renderPage: (targetRequest) => fetchFarmInnerRequest(targetRequest, adapterContext),
9327
+ // The client CSS this build emitted, embedded once it settled (FARM_NATIVE_STYLESHEETS).
9328
+ loadStylesheet: (href) => farmNativeStylesheets[href],
9216
9329
  });
9217
9330
  return applyProductionMiddlewareHeaders(treeResponse, middlewareHeaders);
9218
9331
  }
@@ -9423,8 +9536,12 @@ ${hasServerRuntimeIntegrations ? `
9423
9536
  const actionResponse = await handleFarmFormActionRequest(request, farmFormActionsConfig);
9424
9537
  if (actionResponse) return applyProductionMiddlewareHeaders(actionResponse, middlewareHeaders);
9425
9538
  }` : ""}
9426
- if (matchedRoute) {
9427
- const trailingSlashLocation = resolveFarmTrailingSlashRedirect(
9539
+ if (matchedRoute) {${farmMobileShells ? `
9540
+ // A page shell request renders the route's loading file in place of its page, with no params,
9541
+ // data, slots, or page metadata; a route without a shell answers why.
9542
+ const farmShellLoading = resolveFarmMobileShellRender(request, matchedRoute.route, routePathname);
9543
+ if (farmShellLoading instanceof Response) return farmShellLoading;` : ""}
9544
+ const trailingSlashLocation = ${farmMobileShells ? "farmShellLoading ? null : " : ""}resolveFarmTrailingSlashRedirect(
9428
9545
  url,
9429
9546
  ${JSON.stringify(config.trailingSlash)}
9430
9547
  );
@@ -9437,7 +9554,19 @@ ${hasServerRuntimeIntegrations ? `
9437
9554
  middlewareHeaders
9438
9555
  );
9439
9556
  }
9440
- const { route, params } = matchedRoute;
9557
+ const { route, params } = ${farmMobileShells ? `farmShellLoading
9558
+ ? {
9559
+ route: {
9560
+ ...matchedRoute.route,
9561
+ module: { default: farmShellLoading, viewport: matchedRoute.route.module.viewport },
9562
+ shouldHydrate: false,
9563
+ serverTree: false,
9564
+ rendering: undefined,
9565
+ markdownSource: undefined,
9566
+ },
9567
+ params: {},
9568
+ }
9569
+ : matchedRoute` : "matchedRoute"};
9441
9570
  emitFarmEvent({ type: "route.matched", pathname, route: route.pattern, params });
9442
9571
 
9443
9572
  try {
@@ -9456,7 +9585,7 @@ ${hasServerRuntimeIntegrations ? `
9456
9585
  : countFarmKeptLayouts(request, farmSegmentLayouts, params);
9457
9586
  // The root layout always renders, so keeping one layout keeps nothing.
9458
9587
  const farmKeptLayouts = farmKeptLayoutCount > 1 ? farmKeptLayoutCount : 0;` : `const farmKeptLayouts = 0;`}
9459
- const pprConfig = resolvePPRConfig(route);
9588
+ ${farmMobileShells ? "const pprConfig = farmShellLoading ? { enabled: false } : resolvePPRConfig(route);" : "const pprConfig = resolvePPRConfig(route);"}
9460
9589
  const pprBypassReason = pprConfig.enabled
9461
9590
  ? getPPRShellBypassReason(request, middlewareData, middlewareContext)
9462
9591
  : undefined;
@@ -9527,12 +9656,13 @@ ${hasServerRuntimeIntegrations ? `
9527
9656
  layout.shouldHydrate && layout.islandStrategy ? [layout.islandStrategy] : [],
9528
9657
  ),
9529
9658
  ];
9530
- const hydrationIslandStrategy = hydrationStrategies.every(
9659
+ // A root that waits carries its resolved strategy, inferred ones included.
9660
+ const hydrationIslandStrategy = route.rootStrategy || (hydrationStrategies.every(
9531
9661
  (strategy) => strategy === hydrationStrategies[0],
9532
9662
  )
9533
9663
  ? (hydrationStrategies[0] || "load")
9534
- : "load";
9535
- const selectedRouteSlots = matchRouteSlots(
9664
+ : "load");
9665
+ const selectedRouteSlots = ${farmMobileShells ? "farmShellLoading ? [] : " : ""}matchRouteSlots(
9536
9666
  routePathname,
9537
9667
  request.headers.get("x-farm-intercept-from"),
9538
9668
  );
@@ -9853,9 +9983,12 @@ ${hasServerRuntimeIntegrations ? `
9853
9983
  {
9854
9984
  "data-farm-layout-boundary": "true",
9855
9985
  "data-farm-layout-pattern": layout.pattern,
9856
- "data-farm-layout-key": farmLayoutKeyOf
9857
- ? farmLayoutKeyOf(layout.pattern, params)
9858
- : undefined,
9986
+ // A layout chain that hydrates is drawn by React in the browser
9987
+ // (document-layout-client.ts), without a key; it renders whole anyway.
9988
+ "data-farm-layout-key":
9989
+ farmLayoutKeyOf && !shouldHydrateLayout
9990
+ ? farmLayoutKeyOf(layout.pattern, params)
9991
+ : undefined,
9859
9992
  style: { display: "contents" },
9860
9993
  },
9861
9994
  wrappedElement,
@@ -10004,6 +10137,9 @@ ${hasServerRuntimeIntegrations ? `
10004
10137
  // renderer-emitted one; explicit metadata titles still come first.
10005
10138
  const suppressDefaultTitle =
10006
10139
  !renderedMetadata.hasExplicitTitle && rendererHasTitle;
10140
+ // Set once the whole document is rendered: whether it starts with the boot entry, which
10141
+ // preloads nothing.
10142
+ let farmBootsClient = false;
10007
10143
  // A layout's own <html> document with Farm's head assets merged in and the #root the client
10008
10144
  // hydrates opening its body: the whole document, or a streamed one's opening.
10009
10145
  const composeFarmFullDocument = function(markup) {
@@ -10013,7 +10149,7 @@ ${hasServerRuntimeIntegrations ? `
10013
10149
  );
10014
10150
  composed = composed
10015
10151
  // Inject CSS link after opening head tag or first meta tag
10016
- .replace(/<head([^>]*)>/i, function(match, attrs) { return '<head' + attrs + '>\\n <link rel="stylesheet" href="/__farm_client_css_href__">' + renderFarmClientModulePreloads(composed, route.clientModule); })
10152
+ .replace(/<head([^>]*)>/i, function(match, attrs) { return '<head' + attrs + '>\\n <link rel="stylesheet" href="/__farm_client_css_href__">' + (farmBootsClient ? "" : renderFarmClientModulePreloads(composed, route.clientModule)); })
10017
10153
  .replace(/<\\/head>/i, () => renderFarmRendererHydrationScript() + '\\n</head>')
10018
10154
  // Explicit metadata wins over renderer and layout titles. Without
10019
10155
  // explicit metadata, a renderer title wins over the layout title.
@@ -10189,7 +10325,20 @@ ${hasServerRuntimeIntegrations ? `
10189
10325
  throw renderedPage.streamErrors[0];
10190
10326
  }
10191
10327
  }
10192
-
10328
+ // A route that hydrates as one root starts with the boot entry only when that root waits.
10329
+ const farmHydratesRoot = route.shouldHydrate || shouldHydrateLayout;
10330
+ farmBootsClient = farmDocumentBootsClient(
10331
+ html,
10332
+ (farmHydratesRoot && !route.rootStrategy) || Boolean(pprCacheKey),
10333
+ routeSlotPayload
10334
+ );
10335
+ const farmEntryScript = farmBootsClient
10336
+ ? renderFarmClientBootScript(
10337
+ farmHydratesRoot ? (shouldHydrateLayout ? "root" : "__farm_page__") : "",
10338
+ route.rootStrategy
10339
+ )
10340
+ : renderFarmClientEntryScript();
10341
+
10193
10342
  let fullHtml;
10194
10343
  if (hasFullDocument) {
10195
10344
  // Layout provides full HTML structure - inject CSS and client script
@@ -10205,7 +10354,7 @@ ${hasServerRuntimeIntegrations ? `
10205
10354
  routeSlotPayload,
10206
10355
  clientPageProps
10207
10356
  ) + '\\n' +
10208
- ' ' + renderFarmClientEntryScript() + '\\n</body>',
10357
+ ' ' + farmEntryScript + '\\n</body>',
10209
10358
  );
10210
10359
  } else {
10211
10360
  // No layout with full document - wrap in HTML structure
@@ -10216,13 +10365,13 @@ ${hasServerRuntimeIntegrations ? `
10216
10365
  \${viewportTags}
10217
10366
  \${hasFavicon ? "" : '<link rel="icon" href="data:,">'}
10218
10367
  \${suppressDefaultTitle ? "" : "<title>" + title + "</title>"}\${metaTags}\${rendererHead ? "\\n " + rendererHead : ""}
10219
- <link rel="stylesheet" href="/__farm_client_css_href__">\${renderFarmClientModulePreloads(html, route.clientModule)}
10368
+ <link rel="stylesheet" href="/__farm_client_css_href__">\${farmBootsClient ? "" : renderFarmClientModulePreloads(html, route.clientModule)}
10220
10369
  \${renderFarmRendererHydrationScript()}
10221
10370
  </head>
10222
10371
  <body>
10223
10372
  <div id="root">\${html}</div>
10224
10373
  \${renderFarmClientBootstrapScript(pageProps.__farmCanonicalPath, routeSlotPayload, clientPageProps)}
10225
- \${renderFarmClientEntryScript()}
10374
+ \${farmEntryScript}
10226
10375
  </body>
10227
10376
  </html>\`;
10228
10377
  }
@@ -11007,15 +11156,17 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
11007
11156
  }
11008
11157
  const scheduledTasks = mergeScheduledTasks(farmWorkflows.scheduledTasks, farmCron.scheduledTasks);
11009
11158
  const cloudflareCronConfig = createFarmCronCloudflareConfig(farmCron.jobs);
11010
- const [clientCssHref, clientJsSrc, docsModulePreloads, clientModulePreloads] = await Promise.all([
11159
+ const [clientCssHref, clientJsSrc, clientBootSrc, docsModulePreloads, clientModulePreloads] = await Promise.all([
11011
11160
  resolveHashedClientCssHref(clientOutputDir),
11012
11161
  resolveHashedClientJsSrc(clientOutputDir),
11162
+ resolveClientBootSrc(clientOutputDir),
11013
11163
  readFarmDocsModulePreloads(path10.join(root, distDir)),
11014
11164
  readFarmClientModulePreloads(path10.join(root, distDir))
11015
11165
  ]);
11166
+ let nativeStylesheets;
11016
11167
  const encodedDocsModulePreloads = encodeFarmDocsModulePreloads(docsModulePreloads);
11017
11168
  const encodedClientModulePreloads = encodeFarmClientModulePreloads(clientModulePreloads);
11018
- const encodedMobileShellClient = shouldBuildFarmMobileClient(config, { quiet: true }) ? encodeFarmMobileShellClient(
11169
+ const encodedMobileShellClient = shouldBuildFarmMobileClient(config) ? encodeFarmMobileShellClient(
11019
11170
  await finalizeFarmMobileClient({
11020
11171
  buildDir: path10.join(root, distDir),
11021
11172
  clientOutputDir,
@@ -11041,6 +11192,16 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
11041
11192
  if (output.code.includes(FARM_CLIENT_JS_SRC_PLACEHOLDER)) {
11042
11193
  output.code = output.code.split(FARM_CLIENT_JS_SRC_PLACEHOLDER).join(clientJsSrc);
11043
11194
  }
11195
+ if (output.code.includes(FARM_CLIENT_BOOT_SRC_PLACEHOLDER)) {
11196
+ if (!clientBootSrc) {
11197
+ throw new IncompleteClientBuildOutputError("farm-client-boot is missing");
11198
+ }
11199
+ output.code = output.code.split(FARM_CLIENT_BOOT_SRC_PLACEHOLDER).join(clientBootSrc);
11200
+ }
11201
+ if (config.mobileClient && output.code.includes(JSON.stringify(FARM_NATIVE_STYLESHEETS_PLACEHOLDER))) {
11202
+ nativeStylesheets ?? (nativeStylesheets = await readFarmNativeStylesheets(clientOutputDir, clientCssHref));
11203
+ output.code = output.code.split(JSON.stringify(FARM_NATIVE_STYLESHEETS_PLACEHOLDER)).join(JSON.stringify(JSON.stringify(nativeStylesheets)));
11204
+ }
11044
11205
  }
11045
11206
  await fs4.mkdir(ssrOutputDir, { recursive: true });
11046
11207
  await Promise.all(
@@ -11306,7 +11467,7 @@ function toFarmNodeResponse(request, response) {
11306
11467
  ssrOutputDir,
11307
11468
  ssrEntryFile
11308
11469
  );
11309
- const configuredNitroRouteRules = shouldBuildFarmMobileClient(config, { quiet: true }) ? varyFarmNitroCacheRulesByShell(routeRulesToNitroRouteRules(config.routeRules)) : routeRulesToNitroRouteRules(config.routeRules);
11470
+ const configuredNitroRouteRules = shouldBuildFarmMobileClient(config) ? varyFarmNitroCacheRulesByShell(routeRulesToNitroRouteRules(config.routeRules)) : routeRulesToNitroRouteRules(config.routeRules);
11310
11471
  const prerenderNitroRouteRules = Object.fromEntries(
11311
11472
  prerenderRoutes.map((route) => {
11312
11473
  const configuredRule = configuredNitroRouteRules[route] || {};
@@ -12425,7 +12586,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
12425
12586
  }
12426
12587
  async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
12427
12588
  const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
12428
- import("./nitro-R444AF3O.mjs"),
12589
+ import("./nitro-FLN6DRGJ.mjs"),
12429
12590
  import("nitro/builder")
12430
12591
  ]);
12431
12592
  let nitroConfig = await createNitroConfig(