@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
@@ -1,14 +1,16 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
4
 
5
- var _chunkP6MHI5O2cjs = require('./chunk-P6MHI5O2.cjs');
5
+
6
+
7
+ var _chunkD2X5MUF5cjs = require('./chunk-D2X5MUF5.cjs');
6
8
 
7
9
 
8
10
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
9
11
 
10
12
 
11
- var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
13
+ var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
12
14
 
13
15
  // src/mobile/native-tree.ts
14
16
  var VIEW_TAGS = new Set(
@@ -68,11 +70,26 @@ function parseHtml(html) {
68
70
  _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(attribute[2], () => ( attribute[3])), () => ( attribute[4])), () => ( ""))
69
71
  );
70
72
  }
71
- const element = { tag: name, attributes, children: [] };
72
- stack.at(-1).children.push(element);
73
+ const parent = stack.at(-1);
74
+ let previous;
75
+ for (let index = parent.children.length - 1; index >= 0 && !previous; index -= 1) {
76
+ const child = parent.children[index];
77
+ if (typeof child !== "string") previous = child;
78
+ }
79
+ const element = { tag: name, attributes, children: [], parent, previous };
80
+ parent.children.push(element);
73
81
  if (!match[4] && !VOID_TAGS.has(name)) stack.push(element);
74
82
  }
75
83
  if (cursor < html.length) stack.at(-1).children.push(decode(html.slice(cursor)));
84
+ const markLast = (element) => {
85
+ const elements = element.children.filter(
86
+ (child) => typeof child !== "string"
87
+ );
88
+ const last = elements[elements.length - 1];
89
+ if (last) last.last = true;
90
+ elements.forEach(markLast);
91
+ };
92
+ markLast(root);
76
93
  return root;
77
94
  }
78
95
  function find(element, test) {
@@ -86,11 +103,11 @@ function find(element, test) {
86
103
  }
87
104
  function textOnly(style) {
88
105
  return Object.fromEntries(
89
- Object.entries(style).filter(([key]) => _chunkP6MHI5O2cjs.FARM_NATIVE_TEXT_KEYS.has(key))
106
+ Object.entries(style).filter(([key]) => _chunkD2X5MUF5cjs.FARM_NATIVE_TEXT_KEYS.has(key))
90
107
  );
91
108
  }
92
109
  function withoutText(style) {
93
- const rest = Object.entries(style).filter(([key]) => !_chunkP6MHI5O2cjs.FARM_NATIVE_TEXT_KEYS.has(key));
110
+ const rest = Object.entries(style).filter(([key]) => !_chunkD2X5MUF5cjs.FARM_NATIVE_TEXT_KEYS.has(key));
94
111
  return rest.length > 0 ? Object.fromEntries(rest) : void 0;
95
112
  }
96
113
  function settleLineHeight(style) {
@@ -102,24 +119,49 @@ function settleLineHeight(style) {
102
119
  return rest;
103
120
  }
104
121
  var Converter = class {
105
- constructor(pageUrl) {
122
+ /**
123
+ * `sheets`: the page's stylesheets. Without them, a class the Tailwind table does not know is
124
+ * reported; with them, only one a layered (Tailwind) rule styles is, since a class no rule
125
+ * styles has no effect in a browser either.
126
+ */
127
+ constructor(pageUrl, sheets) {
106
128
  this.pageUrl = pageUrl;
129
+ this.sheets = sheets;
107
130
  this.unsupported = [];
131
+ /** Off while reading the ancestors above the page, which pass down text styles only. */
132
+ this.reporting = true;
108
133
  }
109
134
  problem(message) {
110
- if (!this.unsupported.includes(message)) this.unsupported.push(message);
135
+ if (this.reporting && !this.unsupported.includes(message)) this.unsupported.push(message);
111
136
  }
112
137
  stylesOf(element) {
113
- const classes = _chunkP6MHI5O2cjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( "")));
114
- for (const token of classes.unsupported) this.problem(`<${element.tag}> class "${token}"`);
115
- const inline = _chunkP6MHI5O2cjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( "")));
138
+ const classes = _chunkD2X5MUF5cjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( "")));
139
+ const cascade = this.sheets ? _chunkD2X5MUF5cjs.cascadeFarmNativeStylesheets.call(void 0, this.sheets, element) : void 0;
140
+ for (const token of classes.unsupported) {
141
+ if (!cascade || cascade.layered.includes(token.split(":").pop())) {
142
+ this.problem(`<${element.tag}> class "${token}"`);
143
+ }
144
+ }
145
+ for (const problem of _nullishCoalesce(_optionalChain([cascade, 'optionalAccess', _ => _.unsupported]), () => ( []))) {
146
+ this.problem(`<${element.tag}> ${problem}`);
147
+ }
148
+ const inline = _chunkD2X5MUF5cjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( "")));
116
149
  for (const declaration of inline.unsupported) {
117
150
  this.problem(`<${element.tag}> style "${declaration}"`);
118
151
  }
119
- return {
120
- style: { ...INLINE_DEFAULTS[element.tag], ...classes.style, ...inline.style },
121
- dark: _nullishCoalesce(classes.dark, () => ( {}))
152
+ const style = {
153
+ ...INLINE_DEFAULTS[element.tag],
154
+ ...classes.style,
155
+ ..._optionalChain([cascade, 'optionalAccess', _2 => _2.style]),
156
+ ...inline.style
122
157
  };
158
+ const dark = { ...classes.dark, ..._optionalChain([cascade, 'optionalAccess', _3 => _3.dark]) };
159
+ for (const target of [style, dark]) {
160
+ if (target.display === "flex" && target.flexDirection === void 0 && !style.flexDirection) {
161
+ target.flexDirection = "row";
162
+ }
163
+ }
164
+ return { style, dark };
123
165
  }
124
166
  url(value) {
125
167
  if (!value) return void 0;
@@ -131,11 +173,12 @@ var Converter = class {
131
173
  }
132
174
  }
133
175
  node(type, element, style, dark) {
176
+ const changed = dark && Object.fromEntries(Object.entries(dark).filter(([key, value]) => _optionalChain([style, 'optionalAccess', _4 => _4[key]]) !== value));
134
177
  return {
135
178
  type,
136
179
  tag: element.tag,
137
180
  ...style && Object.keys(style).length > 0 ? { style } : {},
138
- ...dark && Object.keys(dark).length > 0 ? { dark } : {}
181
+ ...changed && Object.keys(changed).length > 0 ? { dark: changed } : {}
139
182
  };
140
183
  }
141
184
  /** Inline content: runs of text, nested inline elements, and line breaks. */
@@ -176,12 +219,28 @@ var Converter = class {
176
219
  const runs = this.inline(content, inherited);
177
220
  const trimmed = collapse(runs);
178
221
  if (trimmed.length === 0) return void 0;
179
- const style = settleLineHeight({ ...inherited.style, ..._optionalChain([box, 'optionalAccess', _ => _.style]) });
180
- const dark = { ...inherited.dark, ..._optionalChain([box, 'optionalAccess', _2 => _2.dark]) };
222
+ const style = settleLineHeight({ ...inherited.style, ..._optionalChain([box, 'optionalAccess', _5 => _5.style]) });
223
+ const dark = {
224
+ ...inherited.dark,
225
+ ...box ? textOnly(box.style) : {},
226
+ ..._optionalChain([box, 'optionalAccess', _6 => _6.dark])
227
+ };
181
228
  const node = this.node("Text", element, style, dark);
182
229
  node.children = trimmed;
183
230
  return node;
184
231
  }
232
+ /** A link drawn as a box: it holds blocks, or has a box style such as a background. */
233
+ isBlockLink(element) {
234
+ if (element.tag !== "a") return false;
235
+ if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
236
+ return true;
237
+ }
238
+ const reporting = this.reporting;
239
+ this.reporting = false;
240
+ const { style } = this.stylesOf(element);
241
+ this.reporting = reporting;
242
+ return withoutText(style) !== void 0;
243
+ }
185
244
  /**
186
245
  * Block content: each element a view, and each run of inline content a text block. In a flex
187
246
  * container every child is its own item, as CSS blockifies them: a `<span>` pill there is a box.
@@ -203,7 +262,7 @@ var Converter = class {
203
262
  pending = [];
204
263
  };
205
264
  for (const child of content) {
206
- if (typeof child === "string" || INLINE_TAGS.has(child.tag) && !isBlockLink(child)) {
265
+ if (typeof child === "string" || INLINE_TAGS.has(child.tag) && !this.isBlockLink(child)) {
207
266
  pending.push(child);
208
267
  continue;
209
268
  }
@@ -220,7 +279,9 @@ var Converter = class {
220
279
  if (own.style.display === "none") return void 0;
221
280
  const passed = {
222
281
  style: { ...inherited.style, ...textOnly(own.style) },
223
- dark: { ...inherited.dark, ...textOnly(own.dark) }
282
+ // An element's own text style holds in both themes unless it sets a dark one: it overrides
283
+ // what the dark theme passes down, as CSS does.
284
+ dark: { ...inherited.dark, ...textOnly(own.style), ...textOnly(own.dark) }
224
285
  };
225
286
  const current = (style, color) => style && Object.fromEntries(
226
287
  Object.entries(style).map(([key, value]) => [
@@ -289,15 +350,6 @@ var Converter = class {
289
350
  return void 0;
290
351
  }
291
352
  };
292
- function isBlockLink(element) {
293
- if (element.tag !== "a") return false;
294
- if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
295
- return true;
296
- }
297
- const classes = _chunkP6MHI5O2cjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( ""))).style;
298
- const inline = _chunkP6MHI5O2cjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( ""))).style;
299
- return withoutText({ ...classes, ...inline }) !== void 0;
300
- }
301
353
  function textContent(element) {
302
354
  return element.children.map((child) => typeof child === "string" ? child : textContent(child)).join("");
303
355
  }
@@ -338,21 +390,83 @@ function collapse(runs) {
338
390
  }
339
391
  return out;
340
392
  }
341
- function createFarmNativeTree(html, pageUrl) {
342
- const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access', _3 => _3.exec, 'call', _4 => _4(html), 'optionalAccess', _5 => _5[1]]);
343
- const document = parseHtml(_chunkD7UQC4O6cjs._readFarmRenderedHtml.call(void 0, html));
393
+ function firstHeading(node) {
394
+ if (node.tag === "h1") {
395
+ const text = (_nullishCoalesce(node.children, () => ( []))).map(function flatten(child) {
396
+ return typeof child === "string" ? child : (_nullishCoalesce(child.children, () => ( []))).map(flatten).join("");
397
+ }).join("").trim();
398
+ return text || void 0;
399
+ }
400
+ for (const child of _nullishCoalesce(node.children, () => ( []))) {
401
+ if (typeof child === "string") continue;
402
+ const found = firstHeading(child);
403
+ if (found) return found;
404
+ }
405
+ return void 0;
406
+ }
407
+ var parsedSheets = /* @__PURE__ */ new Map();
408
+ function parsedStylesheet(css) {
409
+ let sheet = parsedSheets.get(css);
410
+ if (!sheet) {
411
+ sheet = _chunkD2X5MUF5cjs.parseFarmNativeStylesheet.call(void 0, css);
412
+ if (parsedSheets.size >= 16) parsedSheets.delete(parsedSheets.keys().next().value);
413
+ parsedSheets.set(css, sheet);
414
+ }
415
+ return sheet;
416
+ }
417
+ function createFarmNativeTree(html, pageUrl, stylesheets) {
418
+ const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access', _7 => _7.exec, 'call', _8 => _8(html), 'optionalAccess', _9 => _9[1]]);
419
+ const document = parseHtml(_chunkLT4VAF5Zcjs._readFarmRenderedHtml.call(void 0, html));
344
420
  const page = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(find(document, (element) => element.attributes.id === "__farm_page__"), () => ( find(document, (element) => element.attributes.id === "root"))), () => ( find(document, (element) => element.tag === "body"))), () => ( document));
345
- const converter = new Converter(pageUrl);
346
- const root = { type: "View", tag: page.tag };
347
- const children = converter.blocks(page.children, { style: {}, dark: {} });
421
+ const converter = new Converter(pageUrl, _optionalChain([stylesheets, 'optionalAccess', _10 => _10.map, 'call', _11 => _11(parsedStylesheet)]));
422
+ const ancestors = [];
423
+ for (let element = page.parent; element; element = element.parent) ancestors.unshift(element);
424
+ const inherited = { style: {}, dark: {} };
425
+ let background = {};
426
+ converter.reporting = false;
427
+ for (const element of [...ancestors, page]) {
428
+ if (element.tag === "#root") continue;
429
+ const own = converter.stylesOf(element);
430
+ Object.assign(inherited.style, textOnly(own.style));
431
+ Object.assign(inherited.dark, textOnly(own.dark));
432
+ if (own.style.backgroundColor) background = { backgroundColor: own.style.backgroundColor };
433
+ if (own.dark.backgroundColor)
434
+ background = { ...background, darkBackground: own.dark.backgroundColor };
435
+ }
436
+ converter.reporting = true;
437
+ const { darkBackground, ...light } = background;
438
+ const root = {
439
+ type: "View",
440
+ tag: page.tag,
441
+ ...Object.keys(light).length > 0 ? { style: light } : {},
442
+ ...darkBackground ? { dark: { backgroundColor: darkBackground } } : {}
443
+ };
444
+ const children = converter.blocks(page.children, inherited);
348
445
  if (children.length > 0) root.children = children;
349
446
  return {
350
447
  version: 1,
351
- ...title ? { title: decode(title.trim()) } : {},
448
+ ..._optionalChain([title, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]) ? { title: decode(title.trim()) } : firstHeading(root) ? { title: firstHeading(root) } : {},
352
449
  root,
353
450
  unsupported: converter.unsupported
354
451
  };
355
452
  }
453
+ function readFarmPageStylesheets(html, pageUrl) {
454
+ const out = [];
455
+ const head = _nullishCoalesce(_optionalChain([/<head\b[^>]*>([\s\S]*?)<\/head>/i, 'access', _14 => _14.exec, 'call', _15 => _15(html), 'optionalAccess', _16 => _16[1]]), () => ( html));
456
+ for (const match of head.matchAll(/<link\b([^>]*)>|<style\b[^>]*>([\s\S]*?)<\/style>/gi)) {
457
+ if (match[2] !== void 0) {
458
+ out.push({ inline: match[2] });
459
+ continue;
460
+ }
461
+ const attributes = match[1];
462
+ if (!/\brel\s*=\s*["']?stylesheet\b/i.test(attributes)) continue;
463
+ const href = _optionalChain([/\bhref\s*=\s*["']([^"']+)["']/i, 'access', _17 => _17.exec, 'call', _18 => _18(attributes), 'optionalAccess', _19 => _19[1]]);
464
+ if (!href) continue;
465
+ const resolved = new URL(decode(href), pageUrl);
466
+ if (resolved.origin === pageUrl.origin) out.push({ href: resolved.pathname + resolved.search });
467
+ }
468
+ return out;
469
+ }
356
470
  function farmRequestWantsNativeTree(request) {
357
471
  return (_nullishCoalesce(request.headers.get("accept"), () => ( ""))).includes(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE);
358
472
  }
@@ -369,13 +483,42 @@ async function createFarmNativeTreeResponse(options) {
369
483
  );
370
484
  const type = _nullishCoalesce(page.headers.get("content-type"), () => ( ""));
371
485
  if (page.status !== 200 || !type.includes("text/html")) return page;
372
- const tree = createFarmNativeTree(await page.text(), new URL(options.request.url));
486
+ const html = await page.text();
487
+ const pageUrl = new URL(options.request.url);
488
+ const load = _nullishCoalesce(options.loadStylesheet, () => ( (async (href) => {
489
+ const response = await options.renderPage(
490
+ new Request(new URL(href, pageUrl), {
491
+ headers: { accept: "text/css,*/*;q=0.1", cookie: _nullishCoalesce(headers.get("cookie"), () => ( "")) },
492
+ signal: options.request.signal
493
+ })
494
+ );
495
+ return response.status === 200 && _optionalChain([response, 'access', _20 => _20.headers, 'access', _21 => _21.get, 'call', _22 => _22("content-type"), 'optionalAccess', _23 => _23.includes, 'call', _24 => _24("text/css")]) ? response.text() : void 0;
496
+ })));
497
+ const stylesheets = [];
498
+ for (const source of readFarmPageStylesheets(html, pageUrl)) {
499
+ const css = await _asyncNullishCoalesce(source.inline, async () => ( await load(source.href)));
500
+ if (css === void 0) {
501
+ const tree2 = {
502
+ version: 1,
503
+ root: { type: "View", tag: "#root" },
504
+ unsupported: [`stylesheet "${source.href}" could not be read`]
505
+ };
506
+ return new Response(JSON.stringify(tree2), {
507
+ headers: {
508
+ "Content-Type": `${_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE}; charset=utf-8`,
509
+ Vary: "Accept"
510
+ }
511
+ });
512
+ }
513
+ stylesheets.push(css);
514
+ }
515
+ const tree = createFarmNativeTree(html, pageUrl, stylesheets);
373
516
  const out = new Headers({
374
517
  "Content-Type": `${_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE}; charset=utf-8`,
375
518
  Vary: "Accept",
376
519
  "Cache-Control": _nullishCoalesce(page.headers.get("cache-control"), () => ( "no-store"))
377
520
  });
378
- for (const cookie of _nullishCoalesce(_optionalChain([page, 'access', _6 => _6.headers, 'access', _7 => _7.getSetCookie, 'optionalCall', _8 => _8()]), () => ( []))) out.append("Set-Cookie", cookie);
521
+ for (const cookie of _nullishCoalesce(_optionalChain([page, 'access', _25 => _25.headers, 'access', _26 => _26.getSetCookie, 'optionalCall', _27 => _27()]), () => ( []))) out.append("Set-Cookie", cookie);
379
522
  return new Response(options.request.method === "HEAD" ? null : JSON.stringify(tree), {
380
523
  status: 200,
381
524
  headers: out
@@ -386,4 +529,5 @@ async function createFarmNativeTreeResponse(options) {
386
529
 
387
530
 
388
531
 
389
- exports.createFarmNativeTree = createFarmNativeTree; exports.farmRequestWantsNativeTree = farmRequestWantsNativeTree; exports.createFarmNativeTreeResponse = createFarmNativeTreeResponse;
532
+
533
+ exports.createFarmNativeTree = createFarmNativeTree; exports.readFarmPageStylesheets = readFarmPageStylesheets; exports.farmRequestWantsNativeTree = farmRequestWantsNativeTree; exports.createFarmNativeTreeResponse = createFarmNativeTreeResponse;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
3
+ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
4
4
 
5
5
  // src/server/dev-loopback.ts
6
6
  var _net = require('net'); var _net2 = _interopRequireDefault(_net);
@@ -30,7 +30,7 @@ async function listenOnOtherLoopback(server) {
30
30
  const listening = await new Promise((resolve) => {
31
31
  const onError = (error) => {
32
32
  if (error.code === "EADDRINUSE") {
33
- _chunkVQJYGZNXcjs.logger.warn(
33
+ _chunkQMNWKQL4cjs.logger.warn(
34
34
  `Another process is listening on ${formatHost(other)}:${address.port}; the dev server answers on ${formatHost(address.address)}:${address.port} only.`
35
35
  );
36
36
  }
@@ -43,7 +43,7 @@ async function listenOnOtherLoopback(server) {
43
43
  });
44
44
  });
45
45
  if (!listening) return;
46
- loopback.on("error", (error) => _chunkVQJYGZNXcjs.logger.warn(`Dev loopback listener failed: ${String(error)}`));
46
+ loopback.on("error", (error) => _chunkQMNWKQL4cjs.logger.warn(`Dev loopback listener failed: ${String(error)}`));
47
47
  httpServer.once("close", () => loopback.close());
48
48
  }
49
49
  function formatHost(address) {
@@ -7,7 +7,7 @@ var _chunk2KMIJDY6cjs = require('./chunk-2KMIJDY6.cjs');
7
7
  var _chunkSHIWRBFIcjs = require('./chunk-SHIWRBFI.cjs');
8
8
 
9
9
 
10
- var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
10
+ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
11
11
 
12
12
  // src/cron.ts
13
13
  var DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
@@ -67,7 +67,7 @@ async function prepareFarmCronForNitro(config) {
67
67
  const wrapperNames = resolveCronWrapperFileNames(cron.jobs.map((job) => job.name));
68
68
  for (const job of cron.jobs) {
69
69
  const taskName = getFarmCronTaskName(job.name);
70
- const wrapperPath = _chunkVQJYGZNXcjs.toPosixPath.call(void 0, path.join(generatedDir, `${wrapperNames.get(job.name)}.mjs`));
70
+ const wrapperPath = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, path.join(generatedDir, `${wrapperNames.get(job.name)}.mjs`));
71
71
  await fs.writeFile(wrapperPath, createNitroCronTaskWrapper(job, cron.secretEnv), "utf8");
72
72
  tasks[taskName] = {
73
73
  handler: wrapperPath,
@@ -164,14 +164,45 @@ function isCronRequestAuthorized(request, options = {}) {
164
164
  return _chunkSHIWRBFIcjs.farmSecretsMatch.call(void 0, bearer, secret) || _chunkSHIWRBFIcjs.farmSecretsMatch.call(void 0, headerSecret, secret);
165
165
  }
166
166
  function cronRoute(handler, options = {}) {
167
+ if (isFarmEndpoint(handler)) return guardCronEndpoint(handler, options);
168
+ const route = handler;
167
169
  return (request, ...args) => {
168
170
  if (!isCronRequestAuthorized(request, options)) {
169
- return Promise.resolve(
170
- Response.json({ error: "Unauthorized cron request." }, { status: 401 })
171
- );
171
+ return Promise.resolve(unauthorizedCronResponse());
172
172
  }
173
- return handler(request, ...args);
173
+ return route(request, ...args);
174
+ };
175
+ }
176
+ function unauthorizedCronResponse() {
177
+ return Response.json({ error: "Unauthorized cron request." }, { status: 401 });
178
+ }
179
+ function isFarmEndpoint(value) {
180
+ return typeof value === "function" && typeof value.__handler === "function";
181
+ }
182
+ var FUNCTION_OWN_KEYS = /* @__PURE__ */ new Set(["length", "name", "prototype", "arguments", "caller"]);
183
+ function guardCronEndpoint(endpoint, options) {
184
+ const allowed = (context) => {
185
+ const request = _optionalChain([context, 'optionalAccess', _4 => _4.request]);
186
+ return typeof _optionalChain([request, 'optionalAccess', _5 => _5.headers, 'optionalAccess', _6 => _6.get]) === "function" && isCronRequestAuthorized(request, options);
174
187
  };
188
+ const guarded = function(context) {
189
+ return allowed(context) ? endpoint.call(this, context) : Promise.resolve(unauthorizedCronResponse());
190
+ };
191
+ for (const key of Reflect.ownKeys(endpoint)) {
192
+ if (typeof key === "string" && FUNCTION_OWN_KEYS.has(key)) continue;
193
+ Object.defineProperty(guarded, key, Object.getOwnPropertyDescriptor(endpoint, key));
194
+ }
195
+ guarded.__handler = (context) => allowed(context) ? endpoint.__handler(context) : unauthorizedCronResponse();
196
+ const invoke = endpoint.__farmInvoke;
197
+ if (invoke) {
198
+ guarded.__farmInvoke = (context) => allowed(context) ? invoke(context) : {
199
+ result: unauthorizedCronResponse(),
200
+ context: context.context,
201
+ handlerExecuted: false,
202
+ invalidations: []
203
+ };
204
+ }
205
+ return guarded;
175
206
  }
176
207
  function normalizeCronJob(name, job) {
177
208
  if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(name)) {
@@ -192,7 +223,7 @@ function normalizeCronJob(name, job) {
192
223
  name,
193
224
  schedule,
194
225
  path,
195
- description: _optionalChain([job, 'access', _4 => _4.description, 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]) || void 0
226
+ description: _optionalChain([job, 'access', _7 => _7.description, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]) || void 0
196
227
  };
197
228
  }
198
229
  function normalizeCronPath(name, value) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  _findFarmMCPEndpointTool
3
- } from "./chunk-KJMWAUKE.mjs";
3
+ } from "./chunk-C7GJDVN4.mjs";
4
4
  import {
5
5
  emitFarmEvent
6
6
  } from "./chunk-2DA7CLY7.mjs";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
3
+ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
4
4
 
5
5
  // src/routing/route-slots.ts
6
6
  var SLOT_SEGMENT = /^@([A-Za-z][A-Za-z0-9_-]*)$/;
@@ -38,8 +38,8 @@ function parseRouteSlotFile(filePath) {
38
38
  ].join("/");
39
39
  return {
40
40
  name,
41
- ownerRoute: _chunkVQJYGZNXcjs.parseRoutePath.call(void 0, ownerFile || "layout.tsx"),
42
- route: _chunkVQJYGZNXcjs.parseRoutePath.call(void 0, routeFile || "page.tsx"),
41
+ ownerRoute: _chunkQMNWKQL4cjs.parseRoutePath.call(void 0, ownerFile || "layout.tsx"),
42
+ route: _chunkQMNWKQL4cjs.parseRoutePath.call(void 0, routeFile || "page.tsx"),
43
43
  interception: marker !== null,
44
44
  fallback: baseName === "default"
45
45
  };