@farm.js/core 0.1.51-beta.0 → 0.1.51-beta.1

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 (295) hide show
  1. package/dist/{agent-mcp-D44ip11f.d.mts → agent-mcp.d-BPzpKBHQ.d.mts} +1 -1
  2. package/dist/{agent-mcp-BBMfNpsC.d.ts → agent-mcp.d-ZuuNgrkQ.d.ts} +1 -1
  3. package/dist/agent-runtime.cjs +3 -3
  4. package/dist/agent-runtime.d.mts +13 -13
  5. package/dist/agent-runtime.d.ts +13 -13
  6. package/dist/agent-runtime.mjs +2 -2
  7. package/dist/{analyzer-VKUDHNDF.cjs → analyzer-AZULAOPL.cjs} +2 -2
  8. package/dist/{analyzer-HOUCQR3K.mjs → analyzer-V74FTD2F.mjs} +1 -1
  9. package/dist/api/client.d.mts +4 -4
  10. package/dist/api/client.d.ts +4 -4
  11. package/dist/api/route-manager.d.mts +19 -19
  12. package/dist/api/route-manager.d.ts +19 -19
  13. package/dist/api/runtime.d.mts +15 -15
  14. package/dist/api/runtime.d.ts +15 -15
  15. package/dist/{api-client-CvI5oOBE.d.ts → api-client.d-BWcqZciH.d.ts} +3 -3
  16. package/dist/{api-client-CFdv-Xgh.d.mts → api-client.d-CeA6tNA6.d.mts} +3 -3
  17. package/dist/api.cjs +3 -3
  18. package/dist/api.d.mts +21 -21
  19. package/dist/api.d.ts +21 -21
  20. package/dist/api.mjs +2 -2
  21. package/dist/{app-manifest-LzjoNPeq.d.ts → app-manifest.d-BJDcZn3W.d.mts} +1 -1
  22. package/dist/{app-manifest-BC6mFn5A.d.mts → app-manifest.d-HWhqbP2X.d.ts} +1 -1
  23. package/dist/app-markdown.d.mts +14 -14
  24. package/dist/app-markdown.d.ts +14 -14
  25. package/dist/{app-CourU3rQ.d.ts → app.d-B5EWdob-.d.ts} +12 -10
  26. package/dist/{app-aeD4s_mg.d.mts → app.d-DOGW1KI8.d.mts} +12 -10
  27. package/dist/{chunk-DWW3AMJX.cjs → chunk-2756SHCI.cjs} +282 -248
  28. package/dist/{chunk-AMRK3P6W.mjs → chunk-5A5GAZ75.mjs} +182 -68
  29. package/dist/{chunk-PDJSL7PL.cjs → chunk-5IONBVJY.cjs} +3 -3
  30. package/dist/{chunk-IOUOGRDX.cjs → chunk-5N7QAGEA.cjs} +25 -6
  31. package/dist/{chunk-DGOLAZLV.cjs → chunk-65Y5SIBH.cjs} +1 -1
  32. package/dist/{chunk-QI5AQMEE.mjs → chunk-72NBDVWQ.mjs} +1 -1
  33. package/dist/{chunk-X5BCMLGP.cjs → chunk-AGR7VJH2.cjs} +1 -1
  34. package/dist/{chunk-OD6WM3I7.mjs → chunk-AV26KHTG.mjs} +1 -1
  35. package/dist/{chunk-I2ZA5SXS.mjs → chunk-BSEKNTMS.mjs} +53 -19
  36. package/dist/{chunk-WAPQWAE6.cjs → chunk-CECUDGXQ.cjs} +9 -8
  37. package/dist/{chunk-IUQLRTTO.mjs → chunk-CO6UYM2D.mjs} +14 -1
  38. package/dist/{chunk-WVX3BUNJ.mjs → chunk-CZ35L6PL.mjs} +8 -1
  39. package/dist/{chunk-4GJJ65RB.mjs → chunk-EIMK7D2D.mjs} +24 -5
  40. package/dist/{chunk-CY7H5KS4.cjs → chunk-EKJYE4Y7.cjs} +2 -2
  41. package/dist/{chunk-ZF3GX4O7.mjs → chunk-EOSFVNXZ.mjs} +1 -1
  42. package/dist/{chunk-S5ZA2T2W.mjs → chunk-EWC76P5D.mjs} +21 -7
  43. package/dist/{chunk-3HA7PP72.mjs → chunk-I3EFXUAR.mjs} +60 -13
  44. package/dist/{chunk-VO6NLTV4.cjs → chunk-IFBINMI4.cjs} +3 -3
  45. package/dist/{chunk-VIFPE5RG.cjs → chunk-JVBNKWLV.cjs} +81 -34
  46. package/dist/{chunk-JF5CNHHF.mjs → chunk-KMB5BMFX.mjs} +118 -8
  47. package/dist/{chunk-YLNBWUVS.mjs → chunk-KU7MBLDZ.mjs} +1 -1
  48. package/dist/{chunk-J37KTQIA.cjs → chunk-NK2VWS7P.cjs} +52 -3
  49. package/dist/{chunk-WSY2JD7O.mjs → chunk-NN3MOPSI.mjs} +1 -1
  50. package/dist/{chunk-R5P4KFPM.mjs → chunk-QAIAFCRZ.mjs} +8 -6
  51. package/dist/{chunk-75WWOZ5C.mjs → chunk-QOSDWGKT.mjs} +1 -1
  52. package/dist/{chunk-J22JD5YJ.cjs → chunk-RMPNYUGT.cjs} +9 -7
  53. package/dist/{chunk-XWC5NAHV.mjs → chunk-SCRC5AMM.mjs} +2 -2
  54. package/dist/{chunk-QK3HBOTG.cjs → chunk-TT66CP3P.cjs} +5 -5
  55. package/dist/{chunk-Y7TLL65B.cjs → chunk-UQHIWZZ6.cjs} +11 -4
  56. package/dist/{chunk-O3MMJPC2.cjs → chunk-VITZRYW3.cjs} +119 -9
  57. package/dist/{chunk-PPDHCRTC.mjs → chunk-VS7EHLLW.mjs} +1 -1
  58. package/dist/{chunk-USL2ANCB.cjs → chunk-X2AMN2WV.cjs} +2 -2
  59. package/dist/{chunk-F42U3R4F.cjs → chunk-X2M4XN4V.cjs} +55 -41
  60. package/dist/{chunk-SO3T6T4I.cjs → chunk-XY4DYGSU.cjs} +358 -244
  61. package/dist/{chunk-HHFMECFO.mjs → chunk-Y2G5SJFB.mjs} +2 -1
  62. package/dist/{chunk-Z5MZDFX4.cjs → chunk-YIHRZBD7.cjs} +14 -1
  63. package/dist/{chunk-MMEEXMUQ.cjs → chunk-ZOWNWHK6.cjs} +2 -2
  64. package/dist/{chunk-C5JXCUKR.mjs → chunk-ZQ5BDNKW.mjs} +51 -2
  65. package/dist/client/lifecycle.d.mts +1 -1
  66. package/dist/client/lifecycle.d.ts +1 -1
  67. package/dist/{client-plugins-CFBEfVPO.d.ts → client-plugins.d-C0n8Yhh-.d.ts} +41 -12
  68. package/dist/{client-plugins-cqy_dQd0.d.mts → client-plugins.d-C_3CdALC.d.mts} +41 -12
  69. package/dist/client-plugins.d.mts +13 -13
  70. package/dist/client-plugins.d.ts +13 -13
  71. package/dist/client.d.mts +24 -24
  72. package/dist/client.d.ts +24 -24
  73. package/dist/config.d.mts +13 -13
  74. package/dist/config.d.ts +13 -13
  75. package/dist/desktop.d.mts +14 -14
  76. package/dist/desktop.d.ts +14 -14
  77. package/dist/{dev-guard-YLO5DE3H.cjs → dev-guard-2UW2KERP.cjs} +2 -2
  78. package/dist/{dev-guard-4PFQNXQX.mjs → dev-guard-ONNMVQUN.mjs} +1 -1
  79. package/dist/{devtools-4MLL3RAL.mjs → devtools-BU5IT2PD.mjs} +3 -3
  80. package/dist/{devtools-4ZLMD454.cjs → devtools-KJFUE5FO.cjs} +4 -4
  81. package/dist/docs.cjs +8 -6
  82. package/dist/docs.d.mts +23 -15
  83. package/dist/docs.d.ts +23 -15
  84. package/dist/docs.mjs +7 -5
  85. package/dist/environment/vite.cjs +2 -2
  86. package/dist/environment/vite.d.mts +1 -1
  87. package/dist/environment/vite.d.ts +1 -1
  88. package/dist/environment/vite.mjs +1 -1
  89. package/dist/{generate-route-types-TF5Wwtvz.d.mts → generate-route-types.d-BL2pq6xC.d.ts} +1 -1
  90. package/dist/{generate-route-types-DQP0cUzk.d.ts → generate-route-types.d-BoVDU8qX.d.mts} +1 -1
  91. package/dist/i18n/client.d.mts +2 -2
  92. package/dist/i18n/client.d.ts +2 -2
  93. package/dist/i18n/index.d.mts +3 -3
  94. package/dist/i18n/index.d.ts +3 -3
  95. package/dist/i18n/server.d.mts +5 -5
  96. package/dist/i18n/server.d.ts +5 -5
  97. package/dist/image/server.d.mts +1 -1
  98. package/dist/image/server.d.ts +1 -1
  99. package/dist/image/sharp.d.mts +1 -1
  100. package/dist/image/sharp.d.ts +1 -1
  101. package/dist/image.d.mts +1 -1
  102. package/dist/image.d.ts +1 -1
  103. package/dist/index.cjs +19 -17
  104. package/dist/{index-BYkNbeQV.d.mts → index.d-B6M_8kmo.d.ts} +2 -2
  105. package/dist/{index-D3l4tREW.d.ts → index.d-BNNDpql4.d.ts} +2 -2
  106. package/dist/{index-DPUAPho_.d.mts → index.d-BqcfqJvt.d.mts} +2 -2
  107. package/dist/{index-BxjN_UDZ.d.ts → index.d-CsGxS-hZ.d.mts} +2 -2
  108. package/dist/index.d.mts +42 -42
  109. package/dist/index.d.ts +42 -42
  110. package/dist/index.mjs +18 -16
  111. package/dist/instrumentation.d.mts +2 -2
  112. package/dist/instrumentation.d.ts +2 -2
  113. package/dist/integrations.cjs +3 -3
  114. package/dist/integrations.d.mts +13 -13
  115. package/dist/integrations.d.ts +13 -13
  116. package/dist/integrations.mjs +2 -2
  117. package/dist/internal/app-markdown-runtime.d.mts +14 -14
  118. package/dist/internal/app-markdown-runtime.d.ts +14 -14
  119. package/dist/internal/build-runtime.cjs +15 -15
  120. package/dist/internal/build-runtime.d.mts +16 -16
  121. package/dist/internal/build-runtime.d.ts +16 -16
  122. package/dist/internal/build-runtime.mjs +14 -14
  123. package/dist/internal/cli-runtime.cjs +7 -7
  124. package/dist/internal/cli-runtime.mjs +6 -6
  125. package/dist/internal/client-error-overlay.cjs +4 -4
  126. package/dist/internal/client-error-overlay.mjs +1 -1
  127. package/dist/internal/client-runtime.d.mts +21 -21
  128. package/dist/internal/client-runtime.d.ts +21 -21
  129. package/dist/internal/compression-runtime.d.mts +13 -13
  130. package/dist/internal/compression-runtime.d.ts +13 -13
  131. package/dist/internal/config-runtime.cjs +5 -5
  132. package/dist/internal/config-runtime.d.mts +18 -18
  133. package/dist/internal/config-runtime.d.ts +18 -18
  134. package/dist/internal/config-runtime.mjs +4 -4
  135. package/dist/internal/form-actions.d.mts +1 -1
  136. package/dist/internal/form-actions.d.ts +1 -1
  137. package/dist/internal/infra-analytics-runtime.cjs +5 -5
  138. package/dist/internal/infra-analytics-runtime.mjs +3 -3
  139. package/dist/internal/island-value-store.d.mts +1 -1
  140. package/dist/internal/island-value-store.d.ts +1 -1
  141. package/dist/internal/islands-runtime.d.mts +1 -1
  142. package/dist/internal/islands-runtime.d.ts +1 -1
  143. package/dist/internal/isolated-boundary.d.mts +2 -2
  144. package/dist/internal/isolated-boundary.d.ts +2 -2
  145. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  146. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  147. package/dist/internal/production-runtime.cjs +7 -3
  148. package/dist/internal/production-runtime.d.mts +33 -30
  149. package/dist/internal/production-runtime.d.ts +33 -30
  150. package/dist/internal/production-runtime.mjs +6 -2
  151. package/dist/internal/server-tree.d.mts +1 -1
  152. package/dist/internal/server-tree.d.ts +1 -1
  153. package/dist/markdown.d.mts +13 -13
  154. package/dist/markdown.d.ts +13 -13
  155. package/dist/middleware.cjs +4 -4
  156. package/dist/middleware.d.mts +15 -15
  157. package/dist/middleware.d.ts +15 -15
  158. package/dist/middleware.mjs +3 -3
  159. package/dist/mobile.d.mts +7 -7
  160. package/dist/mobile.d.ts +7 -7
  161. package/dist/{navigation-delegate-DLhbfEN4.d.mts → navigation-delegate.d-C0BbdUgN.d.mts} +1 -1
  162. package/dist/{navigation-delegate-BU4xqdnw.d.ts → navigation-delegate.d-jArRF0ZP.d.ts} +1 -1
  163. package/dist/navigation.d.mts +17 -17
  164. package/dist/navigation.d.ts +17 -17
  165. package/dist/observability.d.mts +1 -1
  166. package/dist/observability.d.ts +1 -1
  167. package/dist/plugin.cjs +11 -11
  168. package/dist/plugin.d.mts +17 -17
  169. package/dist/plugin.d.ts +17 -17
  170. package/dist/plugin.mjs +10 -10
  171. package/dist/{production-runtime-DLA4J5WG.d.mts → production-runtime.d-DFaQ1qaV.d.mts} +3 -3
  172. package/dist/{production-runtime-C78A8YgK.d.ts → production-runtime.d-UnXmSS_S.d.ts} +3 -3
  173. package/dist/{programmatic-routes-client-NpqGBn-i.d.mts → programmatic-routes-client.d-BIowUXQC.d.mts} +10 -2
  174. package/dist/{programmatic-routes-client-CBqkNhBy.d.ts → programmatic-routes-client.d-VZ0qcbH4.d.ts} +10 -2
  175. package/dist/query/client.d.mts +1 -1
  176. package/dist/query/client.d.ts +1 -1
  177. package/dist/query/index.d.mts +1 -1
  178. package/dist/query/index.d.ts +1 -1
  179. package/dist/query/server.d.mts +1 -1
  180. package/dist/query/server.d.ts +1 -1
  181. package/dist/{render-plan-C9sWvDTv.d.mts → render-plan.d-BB6KrYjP.d.ts} +2 -2
  182. package/dist/{render-plan-CrqcBbnV.d.ts → render-plan.d-BNeqyPyJ.d.mts} +2 -2
  183. package/dist/renderer-client.d.mts +19 -19
  184. package/dist/renderer-client.d.ts +19 -19
  185. package/dist/{request-WwB1-Uim.d.mts → request.d-BV1munmx.d.mts} +1 -1
  186. package/dist/{request-BizeuqD7.d.ts → request.d-Bxhghm76.d.ts} +1 -1
  187. package/dist/request.d.mts +14 -14
  188. package/dist/request.d.ts +14 -14
  189. package/dist/{resolver-CJ-D9nP-.d.ts → resolver.d-BHyZgpa7.d.ts} +1 -1
  190. package/dist/{resolver-TDyZKgKI.d.mts → resolver.d-JnZKKsc5.d.mts} +1 -1
  191. package/dist/response.d-BolW0Vx_.d.mts +10 -0
  192. package/dist/response.d-BolW0Vx_.d.ts +10 -0
  193. package/dist/{route-rendering-BGhJN64l.d.ts → route-rendering.d-BIf7zE9d.d.ts} +1 -1
  194. package/dist/{route-rendering-S6NFjnx4.d.mts → route-rendering.d-DShqKlgK.d.mts} +1 -1
  195. package/dist/{route-2_yXC6gv.d.mts → route.d-BaVH3V0w.d.mts} +1 -1
  196. package/dist/{route-DFhZj6jN.d.ts → route.d-DBTEqifW.d.ts} +1 -1
  197. package/dist/{router-BIheIy9G.d.mts → router.d-BE7i84fb.d.mts} +1 -1
  198. package/dist/{router-BUD_j2EL.d.ts → router.d-Bw3K3b0a.d.ts} +1 -1
  199. package/dist/{routes-8PT9cl60.d.ts → routes.d-DVZQL0-H.d.ts} +3 -3
  200. package/dist/{routes-kEUsXHx3.d.mts → routes.d-_5tBQexL.d.mts} +3 -3
  201. package/dist/routes.d.mts +13 -13
  202. package/dist/routes.d.ts +13 -13
  203. package/dist/{rsc-pipeline-OLAVIKI3.mjs → rsc-pipeline-FBM6NFYY.mjs} +5 -5
  204. package/dist/{rsc-pipeline-JRGUZBYM.cjs → rsc-pipeline-IQI5XQLS.cjs} +6 -6
  205. package/dist/{runtime-OGCHDACZ.mjs → runtime-2JYIDUON.mjs} +4 -4
  206. package/dist/{runtime-G23RSLEK.cjs → runtime-DXEVFYLE.cjs} +6 -6
  207. package/dist/{runtime-CihDZ2Rn.d.mts → runtime.d-3iJAKptR.d.mts} +2 -2
  208. package/dist/{runtime-C4CmlOOh.d.ts → runtime.d-BtL3PCL3.d.ts} +2 -2
  209. package/dist/{runtime-CWP-21hP.d.ts → runtime.d-CQgoYR0Q.d.mts} +4 -4
  210. package/dist/{runtime-CgJwe6H_.d.mts → runtime.d-CfhaLPl-.d.ts} +4 -4
  211. package/dist/server-action-security.d.mts +1 -1
  212. package/dist/server-action-security.d.ts +1 -1
  213. package/dist/server-fn-client.d.mts +5 -5
  214. package/dist/server-fn-client.d.ts +5 -5
  215. package/dist/server-fn.d.mts +3 -3
  216. package/dist/server-fn.d.ts +3 -3
  217. package/dist/server-plugins.d.mts +14 -14
  218. package/dist/server-plugins.d.ts +14 -14
  219. package/dist/server-query-client.d.mts +5 -5
  220. package/dist/server-query-client.d.ts +5 -5
  221. package/dist/server-query.d.mts +2 -2
  222. package/dist/server-query.d.ts +2 -2
  223. package/dist/server.cjs +31 -31
  224. package/dist/server.d.mts +28 -29
  225. package/dist/server.d.ts +28 -29
  226. package/dist/server.mjs +13 -13
  227. package/dist/{spa-router-CVOL0Vrq.d.mts → spa-router.d-C5opIgXg.d.ts} +5 -5
  228. package/dist/{spa-router-Kytv4jSB.d.ts → spa-router.d-D63jb6nX.d.mts} +5 -5
  229. package/dist/storage.d.mts +2 -2
  230. package/dist/storage.d.ts +2 -2
  231. package/dist/testing.d.mts +14 -14
  232. package/dist/testing.d.ts +14 -14
  233. package/dist/theme/client.d.mts +1 -1
  234. package/dist/theme/client.d.ts +1 -1
  235. package/dist/theme/index.d.mts +2 -2
  236. package/dist/theme/index.d.ts +2 -2
  237. package/dist/theme/runtime.d.mts +1 -1
  238. package/dist/theme/runtime.d.ts +1 -1
  239. package/dist/theme/server.d.mts +1 -1
  240. package/dist/theme/server.d.ts +1 -1
  241. package/dist/{utils-Dsa1HZ7X.d.mts → utils.d-CO-U4OVZ.d.mts} +1 -1
  242. package/dist/{utils-DbyXlzaj.d.ts → utils.d-CkpTqTsC.d.ts} +1 -1
  243. package/dist/version.cjs +2 -2
  244. package/dist/version.mjs +1 -1
  245. package/dist/vite.cjs +11 -11
  246. package/dist/vite.d.mts +20 -19
  247. package/dist/vite.d.ts +20 -19
  248. package/dist/vite.mjs +10 -10
  249. package/dist/workflows.d.mts +1 -1
  250. package/dist/workflows.d.ts +1 -1
  251. package/package.json +3 -3
  252. /package/dist/{base-path-BOUV5ozD.d.mts → base-path.d-BOUV5ozD.d.mts} +0 -0
  253. /package/dist/{base-path-BOUV5ozD.d.ts → base-path.d-BOUV5ozD.d.ts} +0 -0
  254. /package/dist/{chunk-recovery-lnQFzcQP.d.mts → chunk-recovery.d-lnQFzcQP.d.mts} +0 -0
  255. /package/dist/{chunk-recovery-lnQFzcQP.d.ts → chunk-recovery.d-lnQFzcQP.d.ts} +0 -0
  256. /package/dist/{client-cache-Deoqq-nM.d.ts → client-cache.d-Deoqq-nM.d.ts} +0 -0
  257. /package/dist/{client-cache-di_Nasxa.d.mts → client-cache.d-di_Nasxa.d.mts} +0 -0
  258. /package/dist/{config-CnhyvvmT.d.mts → config.d-CnhyvvmT.d.mts} +0 -0
  259. /package/dist/{config-CnhyvvmT.d.ts → config.d-CnhyvvmT.d.ts} +0 -0
  260. /package/dist/{endpoint-BgHn0lhl.d.ts → endpoint.d-BgHn0lhl.d.ts} +0 -0
  261. /package/dist/{endpoint-BkMSCRf6.d.mts → endpoint.d-BkMSCRf6.d.mts} +0 -0
  262. /package/dist/{image-config-CeDgNyX4.d.mts → image-config.d-CeDgNyX4.d.mts} +0 -0
  263. /package/dist/{image-config-CeDgNyX4.d.ts → image-config.d-CeDgNyX4.d.ts} +0 -0
  264. /package/dist/{instrumentation-runtime-CX9Zh-16.d.mts → instrumentation-runtime.d-CX9Zh-16.d.mts} +0 -0
  265. /package/dist/{instrumentation-runtime-CX9Zh-16.d.ts → instrumentation-runtime.d-CX9Zh-16.d.ts} +0 -0
  266. /package/dist/{island-value-protocol-BRayRghM.d.mts → island-value-protocol.d-BRayRghM.d.mts} +0 -0
  267. /package/dist/{island-value-protocol-BRayRghM.d.ts → island-value-protocol.d-BRayRghM.d.ts} +0 -0
  268. /package/dist/{island-CfGru1MO.d.mts → island.d-CfGru1MO.d.mts} +0 -0
  269. /package/dist/{island-CfGru1MO.d.ts → island.d-CfGru1MO.d.ts} +0 -0
  270. /package/dist/{layers-CcS42OGR.d.mts → layers.d-CcS42OGR.d.mts} +0 -0
  271. /package/dist/{layers-CcS42OGR.d.ts → layers.d-CcS42OGR.d.ts} +0 -0
  272. /package/dist/{lifecycle-C2aLBOwu.d.mts → lifecycle.d-C2aLBOwu.d.mts} +0 -0
  273. /package/dist/{lifecycle-C2aLBOwu.d.ts → lifecycle.d-C2aLBOwu.d.ts} +0 -0
  274. /package/dist/{observability-B2363jB6.d.mts → observability.d-B2363jB6.d.mts} +0 -0
  275. /package/dist/{observability-B2363jB6.d.ts → observability.d-B2363jB6.d.ts} +0 -0
  276. /package/dist/{params-BALtrRim.d.ts → params.d-BALtrRim.d.ts} +0 -0
  277. /package/dist/{params-ry-lxqmy.d.mts → params.d-ry-lxqmy.d.mts} +0 -0
  278. /package/dist/{production-vite-BQFAlG7n.d.mts → production-vite.d-BQFAlG7n.d.mts} +0 -0
  279. /package/dist/{production-vite-BQFAlG7n.d.ts → production-vite.d-BQFAlG7n.d.ts} +0 -0
  280. /package/dist/{route-pattern-CVsVbq5n.d.mts → route-pattern.d-CVsVbq5n.d.mts} +0 -0
  281. /package/dist/{route-pattern-CVsVbq5n.d.ts → route-pattern.d-CVsVbq5n.d.ts} +0 -0
  282. /package/dist/{server-client-bridge-DKWDl5NB.d.mts → server-client-bridge.d-DKWDl5NB.d.mts} +0 -0
  283. /package/dist/{server-client-bridge-DKWDl5NB.d.ts → server-client-bridge.d-DKWDl5NB.d.ts} +0 -0
  284. /package/dist/{server-fn-error-DrcH9cc1.d.mts → server-fn-error.d-DrcH9cc1.d.mts} +0 -0
  285. /package/dist/{server-fn-error-DrcH9cc1.d.ts → server-fn-error.d-DrcH9cc1.d.ts} +0 -0
  286. /package/dist/{server-query-runtime-DXRNhX_3.d.ts → server-query-runtime.d-DXRNhX_3.d.ts} +0 -0
  287. /package/dist/{server-query-runtime-aP52iuL5.d.mts → server-query-runtime.d-aP52iuL5.d.mts} +0 -0
  288. /package/dist/{types-BnIqOn9w.d.mts → types.d-BnIqOn9w.d.mts} +0 -0
  289. /package/dist/{types-BnIqOn9w.d.ts → types.d-BnIqOn9w.d.ts} +0 -0
  290. /package/dist/{types-C41ePjvP.d.mts → types.d-C41ePjvP.d.mts} +0 -0
  291. /package/dist/{types-C41ePjvP.d.ts → types.d-C41ePjvP.d.ts} +0 -0
  292. /package/dist/{types-DQnyD3VD.d.mts → types.d-DQnyD3VD.d.mts} +0 -0
  293. /package/dist/{types-DQnyD3VD.d.ts → types.d-DQnyD3VD.d.ts} +0 -0
  294. /package/dist/{workflows-CRMzQZ3k.d.mts → workflows.d-CRMzQZ3k.d.mts} +0 -0
  295. /package/dist/{workflows-CRMzQZ3k.d.ts → workflows.d-CRMzQZ3k.d.ts} +0 -0
@@ -18,8 +18,8 @@ var _chunkVM57CK74cjs = require('./chunk-VM57CK74.cjs');
18
18
 
19
19
 
20
20
 
21
- var _chunkVIFPE5RGcjs = require('./chunk-VIFPE5RG.cjs');
22
21
 
22
+ var _chunkJVBNKWLVcjs = require('./chunk-JVBNKWLV.cjs');
23
23
 
24
24
 
25
25
 
@@ -29,7 +29,9 @@ var _chunkVIFPE5RGcjs = require('./chunk-VIFPE5RG.cjs');
29
29
 
30
30
 
31
31
 
32
- var _chunkIOUOGRDXcjs = require('./chunk-IOUOGRDX.cjs');
32
+
33
+
34
+ var _chunk5N7QAGEAcjs = require('./chunk-5N7QAGEA.cjs');
33
35
 
34
36
 
35
37
 
@@ -37,7 +39,7 @@ var _chunkIOUOGRDXcjs = require('./chunk-IOUOGRDX.cjs');
37
39
  var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
38
40
 
39
41
 
40
- var _chunkVO6NLTV4cjs = require('./chunk-VO6NLTV4.cjs');
42
+ var _chunkIFBINMI4cjs = require('./chunk-IFBINMI4.cjs');
41
43
 
42
44
 
43
45
  var _chunkBRWIVOV4cjs = require('./chunk-BRWIVOV4.cjs');
@@ -52,7 +54,7 @@ var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
52
54
 
53
55
 
54
56
 
55
- var _chunkO3MMJPC2cjs = require('./chunk-O3MMJPC2.cjs');
57
+ var _chunkVITZRYW3cjs = require('./chunk-VITZRYW3.cjs');
56
58
 
57
59
 
58
60
 
@@ -84,7 +86,7 @@ var _chunkO3MMJPC2cjs = require('./chunk-O3MMJPC2.cjs');
84
86
 
85
87
 
86
88
 
87
- var _chunkF42U3R4Fcjs = require('./chunk-F42U3R4F.cjs');
89
+ var _chunkX2M4XN4Vcjs = require('./chunk-X2M4XN4V.cjs');
88
90
 
89
91
 
90
92
  var _chunkLNM57D3Hcjs = require('./chunk-LNM57D3H.cjs');
@@ -95,7 +97,7 @@ var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
95
97
 
96
98
 
97
99
 
98
- var _chunkY7TLL65Bcjs = require('./chunk-Y7TLL65B.cjs');
100
+ var _chunkUQHIWZZ6cjs = require('./chunk-UQHIWZZ6.cjs');
99
101
 
100
102
 
101
103
 
@@ -122,7 +124,7 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
122
124
 
123
125
 
124
126
 
125
- var _chunkJ22JD5YJcjs = require('./chunk-J22JD5YJ.cjs');
127
+ var _chunkRMPNYUGTcjs = require('./chunk-RMPNYUGT.cjs');
126
128
 
127
129
 
128
130
 
@@ -130,7 +132,7 @@ var _chunkJ22JD5YJcjs = require('./chunk-J22JD5YJ.cjs');
130
132
  var _chunkSBABQKPTcjs = require('./chunk-SBABQKPT.cjs');
131
133
 
132
134
 
133
- var _chunkJ37KTQIAcjs = require('./chunk-J37KTQIA.cjs');
135
+ var _chunkNK2VWS7Pcjs = require('./chunk-NK2VWS7P.cjs');
134
136
 
135
137
 
136
138
  var _chunkJATTVAHAcjs = require('./chunk-JATTVAHA.cjs');
@@ -193,7 +195,7 @@ var _chunkJMYXO572cjs = require('./chunk-JMYXO572.cjs');
193
195
 
194
196
 
195
197
 
196
- var _chunkWAPQWAE6cjs = require('./chunk-WAPQWAE6.cjs');
198
+ var _chunkCECUDGXQcjs = require('./chunk-CECUDGXQ.cjs');
197
199
 
198
200
 
199
201
  var _chunkPFV2KPDZcjs = require('./chunk-PFV2KPDZ.cjs');
@@ -231,7 +233,7 @@ var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
231
233
  var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
232
234
 
233
235
 
234
- var _chunkX5BCMLGPcjs = require('./chunk-X5BCMLGP.cjs');
236
+ var _chunkAGR7VJH2cjs = require('./chunk-AGR7VJH2.cjs');
235
237
 
236
238
 
237
239
  var _chunkE552H232cjs = require('./chunk-E552H232.cjs');
@@ -338,7 +340,7 @@ function getDocsTitle(docs) {
338
340
  return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
339
341
  }
340
342
  function loadPages(contentDir, docs) {
341
- return _chunkIOUOGRDXcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkIOUOGRDXcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
343
+ return _chunk5N7QAGEAcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunk5N7QAGEAcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
342
344
  }
343
345
  function findSocialImagePath(html) {
344
346
  const match = /<meta\s+property=["']og:image["']\s+content=["']([^"']+)["']/i.exec(html) || /<meta\s+content=["']([^"']+)["']\s+property=["']og:image["']/i.exec(html);
@@ -356,14 +358,14 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
356
358
  return response;
357
359
  }
358
360
  async function compileFarmDocsManifest(docs, options) {
359
- const contentDir = _chunkIOUOGRDXcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
361
+ const contentDir = _chunk5N7QAGEAcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
360
362
  const pages = loadPages(contentDir, docs);
361
363
  const absolutePaths = [
362
364
  _path2.default.resolve(options.root),
363
365
  _path2.default.resolve(contentDir),
364
366
  docs.configPath || ""
365
367
  ];
366
- const handler = _chunkIOUOGRDXcjs.createFarmDocsHandler.call(void 0, docs, {
368
+ const handler = _chunk5N7QAGEAcjs.createFarmDocsHandler.call(void 0, docs, {
367
369
  root: options.root,
368
370
  srcDir: options.srcDir,
369
371
  clientEntry: options.clientEntry,
@@ -372,7 +374,7 @@ async function compileFarmDocsManifest(docs, options) {
372
374
  globalStylesheetHref: options.globalStylesheetHref,
373
375
  isPathGuarded: options.isPathGuarded
374
376
  });
375
- const apiHandler = _chunkVIFPE5RGcjs.createFarmDocsAPIHandler.call(void 0, {
377
+ const apiHandler = _chunkJVBNKWLVcjs.createFarmDocsAPIHandler.call(void 0, {
376
378
  rootDir: options.root,
377
379
  srcDir: options.srcDir,
378
380
  docs,
@@ -383,7 +385,7 @@ async function compileFarmDocsManifest(docs, options) {
383
385
  const apiMarkdown = {};
384
386
  for (const page of pages) {
385
387
  const htmlResponse = await addHandlerRoute(routes, page.href, handler, absolutePaths);
386
- const markdownPath = _chunkIOUOGRDXcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
388
+ const markdownPath = _chunk5N7QAGEAcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
387
389
  await addHandlerRoute(routes, markdownPath, handler, absolutePaths);
388
390
  if (htmlResponse) {
389
391
  const socialImagePath = findSocialImagePath(await htmlResponse.text());
@@ -467,7 +469,7 @@ async function compileFarmDocsManifest(docs, options) {
467
469
  post: await compileResponse(postResponse, absolutePaths),
468
470
  search: {
469
471
  pages: publicPages.map((page) => ({
470
- ..._chunkIOUOGRDXcjs.toFarmDocsMarkdownPage.call(void 0, page),
472
+ ..._chunk5N7QAGEAcjs.toFarmDocsMarkdownPage.call(void 0, page),
471
473
  sourcePath: `farm-docs:${page.slug || "index"}`
472
474
  })),
473
475
  search: _nullishCoalesce(searchConfig, () => ( true)),
@@ -645,7 +647,7 @@ async function createFarmRouteRuntimeManifest(options) {
645
647
  const routes = [];
646
648
  for (const [pattern, entry] of options.routeManager.getRoutes()) {
647
649
  const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
648
- const rendering = await _chunkY7TLL65Bcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
650
+ const rendering = await _chunkUQHIWZZ6cjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
649
651
  const runtimeConfig = await options.routeManager.resolveRouteRuntimeConfig(pattern);
650
652
  routes.push({
651
653
  kind: "page",
@@ -1685,15 +1687,14 @@ function createServerChunkMinifyPlugin(options) {
1685
1687
  function trimSlashes(value) {
1686
1688
  return value.replace(/^\/+|\/+$/g, "");
1687
1689
  }
1688
- function resolveBuildDocsContentDir(config, root) {
1689
- if (!_optionalChain([config, 'access', _48 => _48.docs, 'optionalAccess', _49 => _49.enabled])) return null;
1690
- const configuredContentDir = config.docs.contentDir || config.docs.config.contentDir;
1690
+ function resolveBuildDocsContentDir(docs, root, srcDir) {
1691
+ const configuredContentDir = docs.contentDir || docs.config.contentDir;
1691
1692
  if (typeof configuredContentDir === "string" && configuredContentDir.trim()) {
1692
1693
  const contentDir = _path2.default.isAbsolute(configuredContentDir) ? configuredContentDir : _path2.default.join(root, configuredContentDir);
1693
1694
  return _fs.existsSync.call(void 0, contentDir) ? contentDir : null;
1694
1695
  }
1695
- const entryDir = config.docs.config.entry || trimSlashes(config.docs.entry) || "docs";
1696
- const appDocsDir = _path2.default.join(root, config.srcDir || "src", "app", entryDir);
1696
+ const entryDir = docs.config.entry || trimSlashes(docs.entry) || "docs";
1697
+ const appDocsDir = _path2.default.join(root, srcDir || "src", "app", entryDir);
1697
1698
  if (_fs.existsSync.call(void 0, appDocsDir)) return appDocsDir;
1698
1699
  const rootDocsDir = _path2.default.join(root, entryDir);
1699
1700
  return _fs.existsSync.call(void 0, rootDocsDir) ? rootDocsDir : null;
@@ -1746,7 +1747,7 @@ async function findFarmConfigPath(root) {
1746
1747
  }
1747
1748
  function hasFarmServerRuntimePlugins(config) {
1748
1749
  return (config.plugins || []).some((plugin) => {
1749
- if (_chunkWAPQWAE6cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
1750
+ if (_chunkCECUDGXQcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
1750
1751
  return Boolean(
1751
1752
  plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
1752
1753
  );
@@ -1757,7 +1758,7 @@ function hasFarmPluginRoutes(config) {
1757
1758
  }
1758
1759
  function farmServerRuntimePluginsMayHandlePath(config, pathname) {
1759
1760
  return (config.plugins || []).some(
1760
- (plugin) => _chunkWAPQWAE6cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && _chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
1761
+ (plugin) => _chunkCECUDGXQcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && _chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
1761
1762
  );
1762
1763
  }
1763
1764
  async function discoverMiddlewareRoutes(appDir) {
@@ -1803,7 +1804,7 @@ async function discoverMiddlewareRoutes(appDir) {
1803
1804
  return Array.from(routes.values()).sort(_chunkB3GZAQSCcjs.compareMiddlewareRouteLocations).map(({ path: routePath, filePath }) => ({ path: routePath, filePath }));
1804
1805
  }
1805
1806
  function assertFarmDocsRuntimeSupported(config, preset) {
1806
- if (!_optionalChain([config, 'access', _50 => _50.docs, 'optionalAccess', _51 => _51.enabled]) || !_optionalChain([config, 'access', _52 => _52.docs, 'access', _53 => _53.adapter, 'optionalAccess', _54 => _54.server]) || _chunkE552H232cjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" || Boolean(config.docs.adapter.edgeCompiler)) {
1807
+ if (!_optionalChain([config, 'access', _48 => _48.docs, 'optionalAccess', _49 => _49.enabled]) || !_optionalChain([config, 'access', _50 => _50.docs, 'access', _51 => _51.adapter, 'optionalAccess', _52 => _52.server]) || _chunkE552H232cjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" || Boolean(config.docs.adapter.edgeCompiler)) {
1807
1808
  return;
1808
1809
  }
1809
1810
  throw new Error(
@@ -1816,7 +1817,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
1816
1817
  assertFarmDocsRuntimeSupported(config, preset);
1817
1818
  const srcDir = config.srcDir || "src";
1818
1819
  const distDir = config.distDir || ".farm";
1819
- const deployOutputDir = _chunkO3MMJPC2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
1820
+ const deployOutputDir = _chunkVITZRYW3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
1820
1821
  const lifecyclePluginManager = options.pluginManager;
1821
1822
  const productionViteResultPromise = Promise.allSettled([
1822
1823
  Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))
@@ -2027,7 +2028,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2027
2028
  _chunkVQJYGZNXcjs.logger.error(`\u274C Build failed: ${error}`);
2028
2029
  throw error;
2029
2030
  } finally {
2030
- _optionalChain([rendererBuild, 'optionalAccess', _55 => _55.abort, 'call', _56 => _56()]);
2031
+ _optionalChain([rendererBuild, 'optionalAccess', _53 => _53.abort, 'call', _54 => _54()]);
2031
2032
  }
2032
2033
  }
2033
2034
  async function writeSSRAssetsToClient(bundle, outputDir) {
@@ -2072,7 +2073,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
2072
2073
  }
2073
2074
  const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
2074
2075
  await fs4.writeFile(fontCssPath, normalizedFontCss);
2075
- await fs4.writeFile(clientCssPath, _chunkF42U3R4Fcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
2076
+ await fs4.writeFile(clientCssPath, _chunkX2M4XN4Vcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
2076
2077
  }
2077
2078
  var IncompleteClientBuildOutputError = class extends Error {
2078
2079
  constructor(detail) {
@@ -2118,7 +2119,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
2118
2119
  const key = `${_path2.default.resolve(root)}\0${mode}\0${options.asyncOwnerIslands === true}\0${options.serverOwners === true}\0${options.serverTreeLayouts === true}\0${_path2.default.resolve(modulePath)}`;
2119
2120
  let plan = cache.get(key);
2120
2121
  if (!plan) {
2121
- plan = _chunkF42U3R4Fcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
2122
+ plan = _chunkX2M4XN4Vcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
2122
2123
  cache.set(key, plan);
2123
2124
  }
2124
2125
  return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
@@ -2135,31 +2136,31 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2135
2136
  });
2136
2137
  pluginManager.addPlugins(config.plugins || []);
2137
2138
  const clientPages = [];
2138
- const integrationProviders = _chunkWAPQWAE6cjs.getIntegrationProviders.call(void 0, config.integrations).filter(
2139
+ const integrationProviders = _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, config.integrations).filter(
2139
2140
  (provider) => provider.component || provider.type === "clerk"
2140
2141
  );
2141
2142
  const unsupportedIntegrationProvider = integrationProviders.find(
2142
2143
  (provider) => provider.supportsIsolatedHydration !== true
2143
2144
  );
2144
- if (_optionalChain([config, 'access', _57 => _57.experimental, 'optionalAccess', _58 => _58.isolatedClientHydration]) === "enabled" && _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _59 => _59.experimental, 'optionalAccess', _60 => _60.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
2145
+ if (_optionalChain([config, 'access', _55 => _55.experimental, 'optionalAccess', _56 => _56.isolatedClientHydration]) === "enabled" && _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _57 => _57.experimental, 'optionalAccess', _58 => _58.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
2145
2146
  _chunkVQJYGZNXcjs.logger.warn(
2146
2147
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
2147
2148
  );
2148
2149
  }
2149
- const isolatedMode = _chunkF42U3R4Fcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
2150
- _optionalChain([config, 'access', _61 => _61.experimental, 'optionalAccess', _62 => _62.isolatedClientHydration]),
2150
+ const isolatedMode = _chunkX2M4XN4Vcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
2151
+ _optionalChain([config, 'access', _59 => _59.experimental, 'optionalAccess', _60 => _60.isolatedClientHydration]),
2151
2152
  {
2152
- serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _63 => _63.experimental, 'optionalAccess', _64 => _64.serverComponents])) === "rsc",
2153
+ serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _61 => _61.experimental, 'optionalAccess', _62 => _62.serverComponents])) === "rsc",
2153
2154
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
2154
2155
  }
2155
2156
  );
2156
- const planOptions = _chunkF42U3R4Fcjs.getFarmClientHydrationPlanOptions.call(void 0,
2157
+ const planOptions = _chunkX2M4XN4Vcjs.getFarmClientHydrationPlanOptions.call(void 0,
2157
2158
  config.renderer,
2158
2159
  Boolean(unsupportedIntegrationProvider)
2159
2160
  );
2160
2161
  const pagePlanOptions = {
2161
2162
  ...planOptions,
2162
- serverOwners: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _65 => _65.experimental, 'optionalAccess', _66 => _66.serverComponents])) === "islands"
2163
+ serverOwners: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _63 => _63.experimental, 'optionalAccess', _64 => _64.serverComponents])) === "islands"
2163
2164
  };
2164
2165
  const layoutPlanOptions = {
2165
2166
  ...planOptions,
@@ -2213,15 +2214,18 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2213
2214
  const layoutAppliesToRoute = _chunk76GHW3WIcjs.routeBoundaryCoversDirectory;
2214
2215
  const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
2215
2216
  const adapterOwnsDocsRuntime = Boolean(
2216
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _67 => _67.docs, 'optionalAccess', _68 => _68.enabled]) && _optionalChain([config, 'access', _69 => _69.docs, 'access', _70 => _70.adapter, 'optionalAccess', _71 => _71.server]) && config.docs.adapter.react
2217
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _65 => _65.docs, 'optionalAccess', _66 => _66.enabled]) && _optionalChain([config, 'access', _67 => _67.docs, 'access', _68 => _68.adapter, 'optionalAccess', _69 => _69.server]) && config.docs.adapter.react
2217
2218
  );
2218
- const adapterDocsEntry = _optionalChain([config, 'access', _72 => _72.docs, 'optionalAccess', _73 => _73.enabled]) ? `/${config.docs.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/" : null;
2219
- const isAdapterDocsRoute = (routePattern) => Boolean(
2220
- adapterOwnsDocsRuntime && adapterDocsEntry && (adapterDocsEntry === "/" || routePattern === adapterDocsEntry || routePattern.startsWith(`${adapterDocsEntry}/`))
2219
+ const docsEntries = _optionalChain([config, 'access', _70 => _70.docs, 'optionalAccess', _71 => _71.enabled]) ? _chunk5N7QAGEAcjs.getFarmDocsRoots.call(void 0, config.docs).map(
2220
+ (docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
2221
+ ) : [];
2222
+ const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
2223
+ const isAdapterDocsRoute = (routePattern) => adapterOwnsDocsRuntime && docsEntries.some(
2224
+ (docsEntry) => docsEntry === "/" || routePattern === docsEntry || routePattern.startsWith(`${docsEntry}/`)
2221
2225
  );
2222
- const syntheticDocsEntry = _optionalChain([config, 'access', _74 => _74.docs, 'optionalAccess', _75 => _75.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
2226
+ const syntheticDocsEntry = _optionalChain([config, 'access', _72 => _72.docs, 'optionalAccess', _73 => _73.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
2223
2227
  const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
2224
- const markdownPagePlan = _chunkF42U3R4Fcjs.createMarkdownPageHydrationPlanner.call(void 0,
2228
+ const markdownPagePlan = _chunkX2M4XN4Vcjs.createMarkdownPageHydrationPlanner.call(void 0,
2225
2229
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), root),
2226
2230
  root,
2227
2231
  isolatedMode,
@@ -2237,7 +2241,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2237
2241
  pagePlanOptions
2238
2242
  )
2239
2243
  }));
2240
- _chunkF42U3R4Fcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
2244
+ _chunkX2M4XN4Vcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
2241
2245
  clientLayouts.map((layout) => ({
2242
2246
  pattern: layout.pattern,
2243
2247
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -2267,9 +2271,9 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2267
2271
  layoutAppliesToRoute
2268
2272
  );
2269
2273
  for (const layout of clientLayouts) {
2270
- const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || Boolean(adapterDocsEntry && layoutAppliesToRoute(layout.pattern, adapterDocsEntry));
2274
+ const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
2271
2275
  if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
2272
- _chunkVQJYGZNXcjs.logger.warn(`\u26A0\uFE0F ${_chunkF42U3R4Fcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
2276
+ _chunkVQJYGZNXcjs.logger.warn(`\u26A0\uFE0F ${_chunkX2M4XN4Vcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
2273
2277
  }
2274
2278
  }
2275
2279
  if (isolatedMode === "analyze") {
@@ -2293,7 +2297,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2293
2297
  );
2294
2298
  if (metadata.suppressedAsyncHydration) {
2295
2299
  _chunkVQJYGZNXcjs.logger.warn(
2296
- `\u26A0\uFE0F ${_chunkF42U3R4Fcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
2300
+ `\u26A0\uFE0F ${_chunkX2M4XN4Vcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
2297
2301
  );
2298
2302
  }
2299
2303
  if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0) {
@@ -2318,7 +2322,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2318
2322
  ...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
2319
2323
  ],
2320
2324
  // The server renders a server tree only below a hydrating layout.
2321
- ..._chunkF42U3R4Fcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
2325
+ ..._chunkX2M4XN4Vcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
2322
2326
  });
2323
2327
  _chunkVQJYGZNXcjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
2324
2328
  }
@@ -2354,7 +2358,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2354
2358
  }
2355
2359
  const clientRouteSlots = routeSlots.filter((slot) => {
2356
2360
  try {
2357
- return _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root).shouldHydrate;
2361
+ return _chunkX2M4XN4Vcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root).shouldHydrate;
2358
2362
  } catch (error) {
2359
2363
  _chunkVQJYGZNXcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
2360
2364
  return false;
@@ -2375,18 +2379,18 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2375
2379
  srcDir,
2376
2380
  adapterOwnsDocsRuntime ? false : _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
2377
2381
  adapterOwnsDocsRuntime ? void 0 : _chunkDZZHTMWMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
2378
- _optionalChain([config, 'access', _76 => _76.docs, 'optionalAccess', _77 => _77.enabled]) ? config.docs.entry : void 0,
2379
- adapterOwnsDocsRuntime ? _optionalChain([config, 'access', _78 => _78.docs, 'access', _79 => _79.adapter, 'optionalAccess', _80 => _80.react]) : void 0,
2382
+ _optionalChain([config, 'access', _74 => _74.docs, 'optionalAccess', _75 => _75.enabled]) ? _chunk5N7QAGEAcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
2383
+ adapterOwnsDocsRuntime ? _optionalChain([config, 'access', _76 => _76.docs, 'access', _77 => _77.adapter, 'optionalAccess', _78 => _78.react]) : void 0,
2380
2384
  config.i18n,
2381
2385
  config.plugins,
2382
2386
  config.renderer,
2383
2387
  config.publicRuntimeConfig,
2384
2388
  config.trailingSlash,
2385
- _chunkWAPQWAE6cjs.getIntegrationProviders.call(void 0, config.integrations),
2389
+ _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, config.integrations),
2386
2390
  config.basePath,
2387
- _chunkF42U3R4Fcjs.generateClientCachePersistenceCode.call(void 0, _chunkF42U3R4Fcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
2391
+ _chunkX2M4XN4Vcjs.generateClientCachePersistenceCode.call(void 0, _chunkX2M4XN4Vcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
2388
2392
  adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
2389
- _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _81 => _81.experimental, 'optionalAccess', _82 => _82.serverComponents])) === "islands"
2393
+ _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _79 => _79.experimental, 'optionalAccess', _80 => _80.serverComponents])) === "islands"
2390
2394
  );
2391
2395
  await fs4.writeFile(clientEntryPath, clientHydrationCode);
2392
2396
  const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
@@ -2423,7 +2427,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2423
2427
  outDir: outputDir,
2424
2428
  emptyOutDir: true,
2425
2429
  // Never public: see resolveFarmClientSourcemap.
2426
- sourcemap: resolveFarmClientSourcemap(_optionalChain([config, 'access', _83 => _83.vite, 'optionalAccess', _84 => _84.build, 'optionalAccess', _85 => _85.sourcemap])),
2430
+ sourcemap: resolveFarmClientSourcemap(_optionalChain([config, 'access', _81 => _81.vite, 'optionalAccess', _82 => _82.build, 'optionalAccess', _83 => _83.sourcemap])),
2427
2431
  assetsInlineLimit: 0,
2428
2432
  cssCodeSplit: false,
2429
2433
  // Bundle all CSS into one file
@@ -2437,34 +2441,15 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2437
2441
  hashCharacters: "hex",
2438
2442
  // Use predictable name for CSS so we can reference it in SSR HTML
2439
2443
  assetFileNames: (assetInfo) => {
2440
- if (_optionalChain([assetInfo, 'access', _86 => _86.name, 'optionalAccess', _87 => _87.endsWith, 'call', _88 => _88(".css")])) {
2444
+ if (_optionalChain([assetInfo, 'access', _84 => _84.name, 'optionalAccess', _85 => _85.endsWith, 'call', _86 => _86(".css")])) {
2441
2445
  return "farm-client.css";
2442
2446
  }
2443
2447
  return "assets/[name]-h[hash][extname]";
2444
2448
  }
2445
2449
  },
2446
- // Externalize Node.js built-ins and server-side modules for client build
2450
+ // A browser cannot load a Node builtin: farmServerOnlyEntriesPlugin
2451
+ // resolves one to Farm's browser module for it instead.
2447
2452
  external: (id) => {
2448
- if (id.startsWith("node:") || [
2449
- "path",
2450
- "url",
2451
- "fs",
2452
- "fs/promises",
2453
- "os",
2454
- "crypto",
2455
- "http",
2456
- "https",
2457
- "net",
2458
- "stream",
2459
- "util",
2460
- "events",
2461
- "child_process",
2462
- "module",
2463
- "tty",
2464
- "dns"
2465
- ].includes(id)) {
2466
- return true;
2467
- }
2468
2453
  if (id === "fsevents" || id.includes("fsevents") || id.endsWith(".node")) {
2469
2454
  return true;
2470
2455
  }
@@ -2473,7 +2458,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2473
2458
  }
2474
2459
  },
2475
2460
  plugins: [
2476
- _chunkF42U3R4Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
2461
+ _chunkX2M4XN4Vcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
2477
2462
  createFarmPrivateClientSourcemapsPlugin({
2478
2463
  outDir: _path2.default.join(_path2.default.dirname(outputDir), FARM_CLIENT_SOURCEMAPS_DIR)
2479
2464
  }),
@@ -2498,7 +2483,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2498
2483
  ...rendererVitePlugins,
2499
2484
  ...config.vite.plugins || [],
2500
2485
  farmServerOnlyEntriesPlugin(),
2501
- _chunkF42U3R4Fcjs.farmDocsClientConfigPlugin.call(void 0,
2486
+ _chunkX2M4XN4Vcjs.farmDocsClientConfigPlugin.call(void 0,
2502
2487
  adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
2503
2488
  ),
2504
2489
  // Plugin to redirect @farm.js/core imports to client-only exports
@@ -2552,7 +2537,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2552
2537
  { ...config, isolatedClientBoundaryModules, programmaticClientRoutes },
2553
2538
  pluginManager
2554
2539
  ),
2555
- _chunkJ37KTQIAcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
2540
+ _chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
2556
2541
  ],
2557
2542
  mode: "production",
2558
2543
  css: postcssSearchPath ? {
@@ -2560,7 +2545,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2560
2545
  } : void 0,
2561
2546
  // Ensure React is bundled for client
2562
2547
  resolve: {
2563
- alias: _chunkF42U3R4Fcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
2548
+ alias: _chunkX2M4XN4Vcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
2564
2549
  dedupe: [...config.renderer.dedupe || []]
2565
2550
  },
2566
2551
  // Optimize dependencies - exclude server-side code from client bundle
@@ -2573,7 +2558,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2573
2558
  ]
2574
2559
  }
2575
2560
  };
2576
- await viteBuild(_chunkF42U3R4Fcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
2561
+ await viteBuild(_chunkX2M4XN4Vcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
2577
2562
  await mergeBuiltFontCss(outputDir);
2578
2563
  await validateClientBuildOutput(root, srcDir, outputDir);
2579
2564
  } finally {
@@ -3456,7 +3441,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
3456
3441
  direction: {}
3457
3442
  }, plugins = [], renderer = _chunkRD623KW4cjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
3458
3443
  const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
3459
- const clientPluginEntry = _chunkF42U3R4Fcjs.generateFarmClientPluginEntryCode.call(void 0,
3444
+ const clientPluginEntry = _chunkX2M4XN4Vcjs.generateFarmClientPluginEntryCode.call(void 0,
3460
3445
  plugins,
3461
3446
  root,
3462
3447
  srcDir,
@@ -3467,7 +3452,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
3467
3452
  import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
3468
3453
  import __farmAppSetup from ${JSON.stringify(_chunkVQJYGZNXcjs.toPosixPath.call(void 0, appSetupPath))};
3469
3454
  __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
3470
- const providerClientCode = _chunkF42U3R4Fcjs.generateFarmIntegrationProviderClientCode.call(void 0,
3455
+ const providerClientCode = _chunkX2M4XN4Vcjs.generateFarmIntegrationProviderClientCode.call(void 0,
3471
3456
  integrationProviders,
3472
3457
  root,
3473
3458
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -3527,8 +3512,18 @@ function isFarmLocaleDocumentChange() {
3527
3512
  return false;
3528
3513
  }
3529
3514
  `;
3530
- const docsNavigationRuntime = docsEntryPath ? `
3531
- const farmDocsEntryPath = ${JSON.stringify(docsEntryPath)};
3515
+ const docsEntryPaths = typeof docsEntryPath === "string" ? [docsEntryPath] : _nullishCoalesce(docsEntryPath, () => ( []));
3516
+ const docsNavigationRuntime = docsEntryPaths.length > 1 ? `
3517
+ const farmDocsEntryPaths = ${JSON.stringify(docsEntryPaths)};
3518
+ function isFarmDocsPath(pathname) {
3519
+ const routePathname = getFarmRoutePathname(pathname);
3520
+ const normalizedPath = routePathname.length > 1 ? routePathname.replace(/\\/+$/, "") : routePathname;
3521
+ return farmDocsEntryPaths.some(
3522
+ (entryPath) => normalizedPath === entryPath || normalizedPath.startsWith(entryPath + "/"),
3523
+ );
3524
+ }
3525
+ ` : docsEntryPaths[0] ? `
3526
+ const farmDocsEntryPath = ${JSON.stringify(docsEntryPaths[0])};
3532
3527
  function isFarmDocsPath(pathname) {
3533
3528
  const routePathname = getFarmRoutePathname(pathname);
3534
3529
  const normalizedPath = routePathname.length > 1 ? routePathname.replace(/\\/+$/, "") : routePathname;
@@ -4001,7 +3996,7 @@ function hasHydratableLayout(pathname) {
4001
3996
  });
4002
3997
  }
4003
3998
 
4004
- ${_chunkF42U3R4Fcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
3999
+ ${_chunkX2M4XN4Vcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
4005
4000
  // Wrap a page element with applicable layouts
4006
4001
  function wrapWithLayouts(pageElement, pathname, params) {
4007
4002
  const layouts = getApplicableLayouts(pathname);
@@ -4036,7 +4031,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
4036
4031
  return React.createElement("div", props, pageElement);
4037
4032
  }
4038
4033
  let farmLastRouteState = null;
4039
- ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkF42U3R4Fcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4034
+ ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkX2M4XN4Vcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4040
4035
  function farmTreeLayoutsOf(pathname) {
4041
4036
  return getApplicableLayouts(pathname).filter(function(layout) {
4042
4037
  return layout.serverTree === true;
@@ -5262,7 +5257,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5262
5257
  }
5263
5258
  const middlewareRoutes = await discoverMiddlewareRoutes(appDirs);
5264
5259
  const instrumentationPath = _chunkBRWIVOV4cjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
5265
- const notFoundPath = _chunkF42U3R4Fcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
5260
+ const notFoundPath = _chunkX2M4XN4Vcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
5266
5261
  if (notFoundPath) _chunkVQJYGZNXcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
5267
5262
  layoutRoutes.sort((a, b) => {
5268
5263
  const depthA = a.pattern.split("/").filter(Boolean).length;
@@ -5279,13 +5274,13 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5279
5274
  const hasServerRuntimeIntegrations = configuredIntegrationValues.some(
5280
5275
  (integration) => typeof integration === "object" && integration !== null && (!("serverRuntime" in integration) || integration.serverRuntime !== false)
5281
5276
  );
5282
- const hasIntegrationProviders = _chunkWAPQWAE6cjs.getIntegrationProviders.call(void 0, config.integrations).some(
5277
+ const hasIntegrationProviders = _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, config.integrations).some(
5283
5278
  (provider) => provider.component || provider.type === "clerk"
5284
5279
  );
5285
5280
  const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
5286
- const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _89 => _89.mdx, 'optionalAccess', _90 => _90.components]));
5281
+ const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _87 => _87.mdx, 'optionalAccess', _88 => _88.components]));
5287
5282
  const hasMiddlewareConfig = _chunk76GHW3WIcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
5288
- const hasRouteContextConfig = _chunkO3MMJPC2cjs.hasCustomFarmRouteContext.call(void 0, config);
5283
+ const hasRouteContextConfig = _chunkVITZRYW3cjs.hasCustomFarmRouteContext.call(void 0, config);
5289
5284
  const hasServerRuntimePlugins = hasFarmServerRuntimePlugins(config);
5290
5285
  const hasPluginRoutes = hasFarmPluginRoutes(config);
5291
5286
  const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
@@ -5295,18 +5290,18 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5295
5290
  const hasConfiguredRuntimePlugins = Boolean(
5296
5291
  hasRuntimeConfigModule && (config.plugins || []).length > 0
5297
5292
  );
5298
- if (_chunkVIFPE5RGcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
5293
+ if (_chunkJVBNKWLVcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
5299
5294
  const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
5300
- _chunkVIFPE5RGcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
5295
+ _chunkJVBNKWLVcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
5301
5296
  config.docs,
5302
5297
  { root, srcDir: config.srcDir },
5303
5298
  (pathname) => adapterGuardedPaths.has(pathname)
5304
5299
  );
5305
5300
  }
5306
5301
  const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
5307
- const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _91 => _91.docs, 'optionalAccess', _92 => _92.enabled]) && _chunkE552H232cjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunkHNAISJFDcjs._runWithFarmCspNonce.call(void 0,
5302
+ const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _89 => _89.docs, 'optionalAccess', _90 => _90.enabled]) && _chunkE552H232cjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunkHNAISJFDcjs._runWithFarmCspNonce.call(void 0,
5308
5303
  farmDocsCspNonceMarker,
5309
- async () => _optionalChain([config, 'access', _93 => _93.docs, 'access', _94 => _94.adapter, 'optionalAccess', _95 => _95.server]) ? await _chunkVIFPE5RGcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
5304
+ async () => _optionalChain([config, 'access', _91 => _91.docs, 'access', _92 => _92.adapter, 'optionalAccess', _93 => _93.server]) ? await _chunkJVBNKWLVcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
5310
5305
  root,
5311
5306
  srcDir: config.srcDir,
5312
5307
  clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
@@ -5415,7 +5410,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5415
5410
  // Adapters can render provider scripts by serializing function source.
5416
5411
  // keepNames injects helper calls into those functions; after Nitro
5417
5412
  // minifies the server chunk the helper is no longer in script scope.
5418
- keepNames: !(_optionalChain([config, 'access', _96 => _96.docs, 'optionalAccess', _97 => _97.enabled]) && _optionalChain([config, 'access', _98 => _98.docs, 'access', _99 => _99.adapter, 'optionalAccess', _100 => _100.server])),
5413
+ keepNames: !(_optionalChain([config, 'access', _94 => _94.docs, 'optionalAccess', _95 => _95.enabled]) && _optionalChain([config, 'access', _96 => _96.docs, 'access', _97 => _97.adapter, 'optionalAccess', _98 => _98.server])),
5419
5414
  jsxDev: false
5420
5415
  },
5421
5416
  // SSR configuration to externalize problematic modules
@@ -5465,10 +5460,10 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5465
5460
  define: {
5466
5461
  __FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
5467
5462
  __FARM_ENV__: JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env)),
5468
- __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _101 => _101.env, 'optionalAccess', _102 => _102.public]) || {})
5463
+ __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _99 => _99.env, 'optionalAccess', _100 => _100.public]) || {})
5469
5464
  },
5470
5465
  plugins: [
5471
- _chunkF42U3R4Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
5466
+ _chunkX2M4XN4Vcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
5472
5467
  ...tailwindVitePlugin ? [tailwindVitePlugin] : [],
5473
5468
  ...rendererVitePlugins,
5474
5469
  ...config.vite.plugins || [],
@@ -5482,7 +5477,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5482
5477
  { ...createReactProductionModePlugin(), enforce: "pre" },
5483
5478
  farmServerOnlyEntriesPlugin(),
5484
5479
  farmPlugin({ ...config, isolatedClientBoundaryModules }, pluginManager),
5485
- _chunkJ37KTQIAcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
5480
+ _chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
5486
5481
  ...hasRuntimeConfigModule ? [
5487
5482
  farmStripPlatformConfigPlugin(
5488
5483
  [
@@ -5529,7 +5524,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5529
5524
  resolve: {
5530
5525
  alias: [
5531
5526
  ...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
5532
- ...Object.entries(_chunkF42U3R4Fcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
5527
+ ...Object.entries(_chunkX2M4XN4Vcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
5533
5528
  ([find, replacement]) => ({ find, replacement })
5534
5529
  )
5535
5530
  ],
@@ -5537,7 +5532,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
5537
5532
  dedupe: [...config.renderer.dedupe || []]
5538
5533
  }
5539
5534
  };
5540
- await viteBuild(_chunkF42U3R4Fcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
5535
+ await viteBuild(_chunkX2M4XN4Vcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
5541
5536
  } finally {
5542
5537
  if (postcssConfigDir) {
5543
5538
  try {
@@ -5573,33 +5568,56 @@ function readFarmPageLastModified(pageRoutes) {
5573
5568
  return lastModified;
5574
5569
  }
5575
5570
  function getFarmDocsGuardedPaths(config, middlewareRoutes) {
5576
- if (!_optionalChain([config, 'access', _103 => _103.docs, 'optionalAccess', _104 => _104.enabled])) return [];
5577
- const contentDir = _chunkIOUOGRDXcjs.resolveFarmDocsContentDir.call(void 0, config.docs, {
5578
- root: config.root,
5579
- srcDir: config.srcDir
5580
- });
5571
+ if (!_optionalChain([config, 'access', _101 => _101.docs, 'optionalAccess', _102 => _102.enabled])) return [];
5572
+ const options = { root: config.root, srcDir: config.srcDir };
5581
5573
  const guards = {
5582
5574
  config: { middleware: config.middleware, integrations: config.integrations },
5583
5575
  middlewareRoutes
5584
5576
  };
5585
- return _chunkIOUOGRDXcjs.discoverFarmDocsPages.call(void 0, contentDir, config.docs).flatMap((page) => [page.href, _chunkIOUOGRDXcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunk76GHW3WIcjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
5577
+ return _chunk5N7QAGEAcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
5578
+ (docsRoot) => _chunk5N7QAGEAcjs.discoverFarmDocsPages.call(void 0, _chunk5N7QAGEAcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
5579
+ ).flatMap((page) => [page.href, _chunk5N7QAGEAcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunk76GHW3WIcjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
5586
5580
  }
5587
5581
  function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
5588
- const llmsTxt = _optionalChain([agent, 'optionalAccess', _105 => _105.llmsTxt]);
5582
+ const llmsTxt = _optionalChain([agent, 'optionalAccess', _103 => _103.llmsTxt]);
5589
5583
  const ownedByFile = (kind) => applicationMetadataRoutes.some(
5590
5584
  (metadata) => metadata.kind === kind && metadata.pattern === "/"
5591
5585
  );
5592
5586
  return [
5593
- ..._optionalChain([llmsTxt, 'optionalAccess', _106 => _106.enabled]) || ownedByFile("llms") ? ["/llms.txt"] : [],
5594
- ..._optionalChain([llmsTxt, 'optionalAccess', _107 => _107.enabled]) && llmsTxt.full || ownedByFile("llms-full") ? ["/llms-full.txt"] : [],
5595
- ..._optionalChain([agent, 'optionalAccess', _108 => _108.sitemap, 'optionalAccess', _109 => _109.enabled]) || ownedByFile("sitemap") ? ["/sitemap.xml"] : [],
5596
- ..._optionalChain([agent, 'optionalAccess', _110 => _110.crawlers, 'optionalAccess', _111 => _111.enabled]) || ownedByFile("robots") ? ["/robots.txt"] : []
5587
+ ..._optionalChain([llmsTxt, 'optionalAccess', _104 => _104.enabled]) || ownedByFile("llms") ? ["/llms.txt"] : [],
5588
+ ..._optionalChain([llmsTxt, 'optionalAccess', _105 => _105.enabled]) && llmsTxt.full || ownedByFile("llms-full") ? ["/llms-full.txt"] : [],
5589
+ ..._optionalChain([agent, 'optionalAccess', _106 => _106.sitemap, 'optionalAccess', _107 => _107.enabled]) || ownedByFile("sitemap") ? ["/sitemap.xml"] : [],
5590
+ ..._optionalChain([agent, 'optionalAccess', _108 => _108.crawlers, 'optionalAccess', _109 => _109.enabled]) || ownedByFile("robots") ? ["/robots.txt"] : []
5597
5591
  ];
5598
5592
  }
5593
+ function generateFarmDocsAdapterHandlerArguments(docs, docsConfigModulePath) {
5594
+ const runtimeConfig = (root) => `{
5595
+ ${docsConfigModulePath ? `...getFarmDocsConfigModuleRoot(farmDocsConfigModule.default || farmDocsConfigModule, ${root}.entry),
5596
+ ...${root}.configOverrides,` : `...${root}.config,`}
5597
+ entry: ${root}.config?.entry || String(${root}.entry || "/docs").replace(/^\\/+|\\/+$/g, "") || "docs",
5598
+ docsPath: ${root}.entry,
5599
+ contentDir: ${root}.contentDir || ${root}.config?.contentDir,
5600
+ }`;
5601
+ if (_optionalChain([docs, 'optionalAccess', _110 => _110.roots, 'optionalAccess', _111 => _111.length])) {
5602
+ return {
5603
+ factory: "createFarmDocsAdapterMultiRuntimeHandler",
5604
+ config: `[farmDocsResolvedConfig, ...farmDocsResolvedConfig.roots].map((farmDocsRoot) => (${runtimeConfig("farmDocsRoot")}))`
5605
+ };
5606
+ }
5607
+ return {
5608
+ factory: "createFarmDocsAdapterRuntimeHandler",
5609
+ config: runtimeConfig("farmDocsResolvedConfig")
5610
+ };
5611
+ }
5599
5612
  function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
5600
5613
  if (!docs.enabled) return "null";
5601
- const baseConfig = {
5614
+ const serializableDocs = _optionalChain([docs, 'access', _112 => _112.roots, 'optionalAccess', _113 => _113.length]) ? {
5602
5615
  ...docs,
5616
+ // React elements and functions do not survive JSON; see runtimeConfig below.
5617
+ roots: docs.roots.map((docsRoot) => ({ ...docsRoot, runtimeConfig: void 0 }))
5618
+ } : docs;
5619
+ const baseConfig = {
5620
+ ...serializableDocs,
5603
5621
  contentDir: void 0,
5604
5622
  ...precompiled ? { configPath: void 0 } : {},
5605
5623
  config: void 0,
@@ -5617,7 +5635,7 @@ function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
5617
5635
  config: nestedConfig
5618
5636
  });
5619
5637
  }
5620
- return `farmDocsBundledContentDir
5638
+ const expression = `farmDocsBundledContentDir
5621
5639
  ? {
5622
5640
  ...${JSON.stringify(baseConfig)},
5623
5641
  contentDir: farmDocsBundledContentDir,
@@ -5626,13 +5644,25 @@ function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
5626
5644
  contentDir: farmDocsBundledContentDir,
5627
5645
  },
5628
5646
  }
5629
- : ${JSON.stringify({ ...docs, runtimeConfig: void 0 })}`;
5647
+ : ${JSON.stringify({ ...serializableDocs, runtimeConfig: void 0 })}`;
5648
+ if (!_optionalChain([docs, 'access', _114 => _114.roots, 'optionalAccess', _115 => _115.length])) return expression;
5649
+ return `((farmDocs) => ({
5650
+ ...farmDocs,
5651
+ roots: farmDocs.roots.map((farmDocsRoot, index) => {
5652
+ const contentDir = farmDocsBundledRootsDir
5653
+ ? farmDocsJoin(farmDocsBundledRootsDir, String(index))
5654
+ : null;
5655
+ return contentDir && farmDocsExistsSync(contentDir)
5656
+ ? { ...farmDocsRoot, contentDir, config: { ...farmDocsRoot.config, contentDir } }
5657
+ : farmDocsRoot;
5658
+ }),
5659
+ }))(${expression})`;
5630
5660
  }
5631
5661
  function toVirtualEntryImportSpecifier(modulePath) {
5632
5662
  return JSON.stringify(modulePath.replace(/\\/g, "/"));
5633
5663
  }
5634
5664
  function generateNativeAuthIntegrationSource(auth) {
5635
- if (_optionalChain([auth, 'optionalAccess', _112 => _112.enabled]) !== true) {
5665
+ if (_optionalChain([auth, 'optionalAccess', _116 => _116.enabled]) !== true) {
5636
5666
  return { importSource: "", registerSource: "" };
5637
5667
  }
5638
5668
  return {
@@ -5925,23 +5955,29 @@ if (typeof ReactDOMServer.configureApp !== "function") {
5925
5955
  ReactDOMServer.configureApp(__farmAppSetup);`;
5926
5956
  }
5927
5957
  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) {
5928
- const farmIslandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _113 => _113.experimental, 'optionalAccess', _114 => _114.serverComponents])) === "islands";
5958
+ const farmIslandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _117 => _117.experimental, 'optionalAccess', _118 => _118.serverComponents])) === "islands";
5929
5959
  const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
5930
- const servesAgentRobotsTxt = Boolean(_optionalChain([config, 'access', _115 => _115.agent, 'optionalAccess', _116 => _116.crawlers, 'optionalAccess', _117 => _117.enabled])) && !applicationMetadataRoutes.some(
5960
+ const servesAgentRobotsTxt = Boolean(_optionalChain([config, 'access', _119 => _119.agent, 'optionalAccess', _120 => _120.crawlers, 'optionalAccess', _121 => _121.enabled])) && !applicationMetadataRoutes.some(
5931
5961
  (metadata) => metadata.kind === "robots" && metadata.pattern === "/"
5932
5962
  );
5933
- const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _118 => _118.agent, 'optionalAccess', _119 => _119.sitemap, 'optionalAccess', _120 => _120.enabled])) && !applicationMetadataRoutes.some(
5963
+ const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _122 => _122.agent, 'optionalAccess', _123 => _123.sitemap, 'optionalAccess', _124 => _124.enabled])) && !applicationMetadataRoutes.some(
5934
5964
  (metadata) => metadata.kind === "sitemap" && metadata.pattern === "/"
5935
5965
  );
5936
- const servesDefaultMCP = _optionalChain([config, 'access', _121 => _121.agent, 'optionalAccess', _122 => _122.mcp]) === true && !_chunkSBABQKPTcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
5937
- const servesAiCatalog = _optionalChain([config, 'access', _123 => _123.agent, 'optionalAccess', _124 => _124.aiCatalog]) !== false;
5966
+ const servesDefaultMCP = _optionalChain([config, 'access', _125 => _125.agent, 'optionalAccess', _126 => _126.mcp]) === true && !_chunkSBABQKPTcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
5967
+ const servesAiCatalog = _optionalChain([config, 'access', _127 => _127.agent, 'optionalAccess', _128 => _128.aiCatalog]) !== false;
5938
5968
  const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
5939
5969
  const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
5940
5970
  const hasPrecompiledDocs = Boolean(farmDocsPrecompiledManifest);
5941
5971
  const adapterOwnsDocsRuntime = Boolean(
5942
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _125 => _125.docs, 'optionalAccess', _126 => _126.enabled]) && _optionalChain([config, 'access', _127 => _127.docs, 'access', _128 => _128.adapter, 'optionalAccess', _129 => _129.server]) && config.docs.adapter.react
5972
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _129 => _129.docs, 'optionalAccess', _130 => _130.enabled]) && _optionalChain([config, 'access', _131 => _131.docs, 'access', _132 => _132.adapter, 'optionalAccess', _133 => _133.server]) && config.docs.adapter.react
5943
5973
  );
5974
+ if (_optionalChain([config, 'access', _134 => _134.docs, 'optionalAccess', _135 => _135.enabled]) && _optionalChain([config, 'access', _136 => _136.docs, 'access', _137 => _137.roots, 'optionalAccess', _138 => _138.length]) && !adapterOwnsDocsRuntime) {
5975
+ throw new Error(
5976
+ "Several docs roots need the docs adapter, which serves the React renderer only; Farm's built-in docs renderer serves a single docs root."
5977
+ );
5978
+ }
5944
5979
  const docsConfigModulePath = adapterOwnsDocsRuntime && !hasPrecompiledDocs && config.docs.configPath && !config.docs.configPath.endsWith(".json") ? config.docs.configPath : void 0;
5980
+ const adapterHandler = generateFarmDocsAdapterHandlerArguments(config.docs, docsConfigModulePath);
5945
5981
  const hasIsolatedClientGraphRuntime = _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && isolatedClientBoundaryModules.size > 0;
5946
5982
  const rendererStreamingCapabilities = _chunkRD623KW4cjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0,
5947
5983
  config.renderer,
@@ -5985,8 +6021,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
5985
6021
  (image) => image.sourceType === "module"
5986
6022
  );
5987
6023
  const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunk76GHW3WIcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
5988
- const farmDocsFontAssets = _optionalChain([config, 'access', _130 => _130.docs, 'optionalAccess', _131 => _131.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
5989
- const integrationProviders = _chunkWAPQWAE6cjs.getIntegrationProviders.call(void 0, config.integrations);
6024
+ const farmDocsFontAssets = _optionalChain([config, 'access', _139 => _139.docs, 'optionalAccess', _140 => _140.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
6025
+ const integrationProviders = _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, config.integrations);
5990
6026
  const renderedIntegrationProviders = integrationProviders.filter(
5991
6027
  (provider) => provider.component || provider.type === "clerk"
5992
6028
  );
@@ -5995,16 +6031,16 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
5995
6031
  `Integration provider components are not supported by the "${config.renderer.name}" renderer.`
5996
6032
  );
5997
6033
  }
5998
- const providerServerModules = _chunkF42U3R4Fcjs.generateFarmIntegrationProviderServerModules.call(void 0,
6034
+ const providerServerModules = _chunkX2M4XN4Vcjs.generateFarmIntegrationProviderServerModules.call(void 0,
5999
6035
  renderedIntegrationProviders,
6000
6036
  config.root,
6001
6037
  _nullishCoalesce(config.renderer.componentExtensions, () => ( []))
6002
6038
  );
6003
6039
  const resolvedIntegrationProviderFallback = Object.fromEntries(
6004
6040
  Object.entries(config.integrations).flatMap(([name, integration]) => {
6005
- const configuredProviders = _optionalChain([integration, 'optionalAccess', _132 => _132.providers]);
6041
+ const configuredProviders = _optionalChain([integration, 'optionalAccess', _141 => _141.providers]);
6006
6042
  const providers = Array.isArray(configuredProviders) ? configuredProviders : [];
6007
- if (providers.some((provider) => typeof _optionalChain([provider, 'optionalAccess', _133 => _133.component]) === "function")) {
6043
+ if (providers.some((provider) => typeof _optionalChain([provider, 'optionalAccess', _142 => _142.component]) === "function")) {
6008
6044
  throw new Error(
6009
6045
  `Integration provider components in production must use an importable component reference, for example component: { module: "@/components/provider" }.`
6010
6046
  );
@@ -6015,20 +6051,20 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6015
6051
  const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
6016
6052
  (provider) => provider.supportsIsolatedHydration !== true
6017
6053
  );
6018
- const isolatedHydrationMode = _chunkF42U3R4Fcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
6019
- _optionalChain([config, 'access', _134 => _134.experimental, 'optionalAccess', _135 => _135.isolatedClientHydration]),
6054
+ const isolatedHydrationMode = _chunkX2M4XN4Vcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
6055
+ _optionalChain([config, 'access', _143 => _143.experimental, 'optionalAccess', _144 => _144.isolatedClientHydration]),
6020
6056
  {
6021
- serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _136 => _136.experimental, 'optionalAccess', _137 => _137.serverComponents])) === "rsc",
6057
+ serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _145 => _145.experimental, 'optionalAccess', _146 => _146.serverComponents])) === "rsc",
6022
6058
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
6023
6059
  }
6024
6060
  );
6025
- const hydrationPlanOptions = _chunkF42U3R4Fcjs.getFarmClientHydrationPlanOptions.call(void 0,
6061
+ const hydrationPlanOptions = _chunkX2M4XN4Vcjs.getFarmClientHydrationPlanOptions.call(void 0,
6026
6062
  config.renderer,
6027
6063
  Boolean(unsupportedIntegrationProvider)
6028
6064
  );
6029
6065
  const pageHydrationPlanOptions = {
6030
6066
  ...hydrationPlanOptions,
6031
- serverOwners: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _138 => _138.experimental, 'optionalAccess', _139 => _139.serverComponents])) === "islands"
6067
+ serverOwners: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _147 => _147.experimental, 'optionalAccess', _148 => _148.serverComponents])) === "islands"
6032
6068
  };
6033
6069
  const layoutHydrationPlans = layoutRoutes.map((layout) => ({
6034
6070
  ...layout,
@@ -6040,7 +6076,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6040
6076
  { ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
6041
6077
  )
6042
6078
  }));
6043
- const markdownPagePlan = _chunkF42U3R4Fcjs.createMarkdownPageHydrationPlanner.call(void 0,
6079
+ const markdownPagePlan = _chunkX2M4XN4Vcjs.createMarkdownPageHydrationPlanner.call(void 0,
6044
6080
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
6045
6081
  config.root,
6046
6082
  isolatedHydrationMode,
@@ -6058,7 +6094,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6058
6094
  )
6059
6095
  ])
6060
6096
  );
6061
- _chunkF42U3R4Fcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
6097
+ _chunkX2M4XN4Vcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
6062
6098
  layoutHydrationPlans.map((layout) => ({
6063
6099
  pattern: layout.pattern,
6064
6100
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -6087,7 +6123,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6087
6123
  apiRegistrations.push(`
6088
6124
  {
6089
6125
  path: ${JSON.stringify(route.path)},
6090
- methods: ${JSON.stringify(route.methods.filter((method) => !_optionalChain([route, 'access', _140 => _140.pluginMethods, 'optionalAccess', _141 => _141.includes, 'call', _142 => _142(method)])))},
6126
+ methods: ${JSON.stringify(route.methods.filter((method) => !_optionalChain([route, 'access', _149 => _149.pluginMethods, 'optionalAccess', _150 => _150.includes, 'call', _151 => _151(method)])))},
6091
6127
  endpoints: ${varName},
6092
6128
  }`);
6093
6129
  });
@@ -6124,7 +6160,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6124
6160
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
6125
6161
  );
6126
6162
  const clientMetadata = pageHydrationPlans.get(route.modulePath);
6127
- const renderingDirective = _chunkY7TLL65Bcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
6163
+ const renderingDirective = _chunkUQHIWZZ6cjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
6128
6164
  pageRegistrations.push(`
6129
6165
  {
6130
6166
  pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
@@ -6132,7 +6168,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6132
6168
  module: ${varName},
6133
6169
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
6134
6170
  clientModule: ${JSON.stringify(_chunkVQJYGZNXcjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
6135
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkF42U3R4Fcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${renderingDirective ? `
6171
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkX2M4XN4Vcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${renderingDirective ? `
6136
6172
  rendering: ${JSON.stringify(renderingDirective)},` : ""}
6137
6173
  ${route.source !== void 0 ? `markdownSource: {
6138
6174
  source: ${JSON.stringify(route.source)},
@@ -6338,6 +6374,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
6338
6374
  resolveFarmInstrumentationRuntime,
6339
6375
  resolveFarmPreviewDeployment,
6340
6376
  resolveFarmWebRequestOrigin,
6377
+ fetchFarmExternalRewrite,
6341
6378
  runWithFarmRequestSpan,
6342
6379
  createFarmSearchParams,
6343
6380
  searchParamsToObject,
@@ -6362,25 +6399,25 @@ ${FARM_SEGMENT_NAVIGATION_SERVER_RUNTIME}` : ""}`;
6362
6399
  const infraAnalyticsImport = hasInfraAnalyticsRuntime ? `import { ${hasPluginRuntime ? "createFarmInfraAnalyticsPlugin" : "createFarmInfraAnalyticsRecorder"} } from "@farm.js/core/internal/infra-analytics-runtime";` : "";
6363
6400
  const compressionRuntimeImport = hasCompressionRuntime ? `import { compressFarmResponse${hasPluginRuntime ? ", createCompressionPlugin" : ""} } from "@farm.js/core/internal/compression-runtime";` : "";
6364
6401
  const i18nServerImport = config.i18n.enabled ? `import { _runWithFarmI18nRequest, _setDefaultFarmI18nRuntime, createFarmI18nRuntime, getFarmI18nClientSnapshot } from "@farm.js/core/i18n/server";` : "";
6365
- const docsHandlerImport = _optionalChain([config, 'access', _143 => _143.docs, 'optionalAccess', _144 => _144.enabled]) ? hasPrecompiledDocs ? `import { createFarmDocsPrecompiledRuntime } from "@farm.js/core/internal/docs-precompiled-runtime";
6402
+ const docsHandlerImport = _optionalChain([config, 'access', _152 => _152.docs, 'optionalAccess', _153 => _153.enabled]) ? hasPrecompiledDocs ? `import { createFarmDocsPrecompiledRuntime } from "@farm.js/core/internal/docs-precompiled-runtime";
6366
6403
  const isFarmDocsAPIRequest = (requestOrPathname) => {
6367
6404
  const pathname = typeof requestOrPathname === "string"
6368
6405
  ? requestOrPathname
6369
6406
  : new URL(requestOrPathname.url).pathname;
6370
- const apiPath = ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _145 => _145.apiPath]) || "/api/docs")};
6407
+ const apiPath = ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _154 => _154.apiPath]) || "/api/docs")};
6371
6408
  return pathname === apiPath || pathname.startsWith(apiPath + "/");
6372
- };` : adapterOwnsDocsRuntime ? `import { isFarmDocsAPIRequest } from "@farm.js/core/docs";
6373
- import { createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler } from ${JSON.stringify(config.docs.adapter.server)};
6409
+ };` : adapterOwnsDocsRuntime ? `import { ${docsConfigModulePath ? "getFarmDocsConfigModuleRoot, " : ""}isFarmDocsAPIRequest } from "@farm.js/core/docs";
6410
+ import { ${_optionalChain([config, 'access', _155 => _155.docs, 'access', _156 => _156.roots, 'optionalAccess', _157 => _157.length]) ? "createFarmDocsMultiRuntimeHandler as createFarmDocsAdapterMultiRuntimeHandler" : "createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler"} } from ${JSON.stringify(config.docs.adapter.server)};
6374
6411
  import * as FarmDocsAdapterReact from ${JSON.stringify(config.docs.adapter.react)};${docsConfigModulePath ? `
6375
6412
  import * as farmDocsConfigModule from ${toVirtualEntryImportSpecifier(docsConfigModulePath)};` : ""}` : `import { createFarmDocsAPIHandler, createFarmDocsHandler, isFarmDocsAPIRequest } from "@farm.js/core/docs";` : "";
6376
- const docsFontImport = _optionalChain([config, 'access', _146 => _146.docs, 'optionalAccess', _147 => _147.enabled]) && !hasPrecompiledDocs ? `import { resolveFarmLayoutFonts } from "@farm.js/core/font";` : "";
6377
- const docsRuntimeImport = _optionalChain([config, 'access', _148 => _148.docs, 'optionalAccess', _149 => _149.enabled]) && !hasPrecompiledDocs ? `import { existsSync as farmDocsExistsSync } from "node:fs";
6413
+ const docsFontImport = _optionalChain([config, 'access', _158 => _158.docs, 'optionalAccess', _159 => _159.enabled]) && !hasPrecompiledDocs ? `import { resolveFarmLayoutFonts } from "@farm.js/core/font";` : "";
6414
+ const docsRuntimeImport = _optionalChain([config, 'access', _160 => _160.docs, 'optionalAccess', _161 => _161.enabled]) && !hasPrecompiledDocs ? `import { existsSync as farmDocsExistsSync } from "node:fs";
6378
6415
  import { dirname as farmDocsDirname, join as farmDocsJoin } from "node:path";
6379
6416
  import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
6380
- const markdownHandlerImport = _optionalChain([config, 'access', _150 => _150.md, 'optionalAccess', _151 => _151.enabled]) ? `import { applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, getFarmMarkdownAlternatePath } from "@farm.js/core/markdown";` : "";
6417
+ const markdownHandlerImport = _optionalChain([config, 'access', _162 => _162.md, 'optionalAccess', _163 => _163.enabled]) ? `import { applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, getFarmMarkdownAlternatePath } from "@farm.js/core/markdown";` : "";
6381
6418
  const appMarkdownImport = hasMarkdownPages ? `import { FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, isFarmMarkdownPublicSourceResponse } from "@farm.js/core/internal/app-markdown-runtime";` : "const createFarmMarkdownSourceResponse = null;\nconst isFarmMarkdownPublicSourceResponse = null;";
6382
6419
  const markdownErrorImport = `import { FARM_MARKDOWN_CONTENT_TYPE, FARM_MARKDOWN_PAGE_CHECK_HEADER, _isFarmMarkdownPageCheck, createFarmMarkdownErrorBody, farmRequestWantsMarkdown } from "@farm.js/core/markdown";`;
6383
- const mdxComponentsPath = typeof _optionalChain([config, 'access', _152 => _152.mdx, 'optionalAccess', _153 => _153.components]) === "string" ? _path2.default.isAbsolute(config.mdx.components) ? config.mdx.components : _path2.default.join(config.root, config.mdx.components) : null;
6420
+ const mdxComponentsPath = typeof _optionalChain([config, 'access', _164 => _164.mdx, 'optionalAccess', _165 => _165.components]) === "string" ? _path2.default.isAbsolute(config.mdx.components) ? config.mdx.components : _path2.default.join(config.root, config.mdx.components) : null;
6384
6421
  const mdxComponentsImport = mdxComponentsPath ? `import * as FarmMdxComponentsModule from ${toVirtualEntryImportSpecifier(mdxComponentsPath)};` : "";
6385
6422
  const layerConfigPaths = (config.layers || []).map((layer) => layer.configFile).filter((configFile) => Boolean(configFile)).filter((configFile) => configFile !== configModulePath);
6386
6423
  const layerConfigImports = layerConfigPaths.map(
@@ -6406,7 +6443,7 @@ ${integrationRuntimeImport}
6406
6443
  ${nativeAuth.importSource}
6407
6444
  ${nativeMCP.importSource}
6408
6445
  `;
6409
- const imageRuntime = _chunkF42U3R4Fcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
6446
+ const imageRuntime = _chunkX2M4XN4Vcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
6410
6447
  const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
6411
6448
  const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
6412
6449
  const apiHandlerCode = apiRoutes.length > 0 ? `
@@ -6585,7 +6622,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
6585
6622
 
6586
6623
  function FarmDefault404Page() {
6587
6624
  return React.createElement(React.Fragment, null,
6588
- React.createElement("style", null, ${JSON.stringify(_chunkF42U3R4Fcjs.DEFAULT_NOT_FOUND_STYLES)}),
6625
+ React.createElement("style", null, ${JSON.stringify(_chunkX2M4XN4Vcjs.DEFAULT_NOT_FOUND_STYLES)}),
6589
6626
  React.createElement("main", {
6590
6627
  className: "farm-default-not-found",
6591
6628
  "aria-labelledby": "farm-default-not-found-title",
@@ -6718,14 +6755,14 @@ const farmImageHandler = ${imageRuntime === "none" ? "null" : imageRuntime === "
6718
6755
  onError(error) { console.error("[Farm Image]", error); },
6719
6756
  })`};
6720
6757
  const farmMarkdownConfig = ${JSON.stringify(config.md)};
6721
- const farmLlmsTxtConfig = ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _154 => _154.agent, 'optionalAccess', _155 => _155.llmsTxt]), () => ( { enabled: false, include: [], exclude: [] })))};
6722
- ${_optionalChain([config, 'access', _156 => _156.agent, 'optionalAccess', _157 => _157.llmsTxt, 'optionalAccess', _158 => _158.enabled]) ? "const farmLlmsFullRenderer = createFarmLlmsFullRenderer({ revalidate: farmLlmsTxtConfig.revalidate });\n" : ""}${servesAgentRobotsTxt ? `const farmAgentCrawlers = ${JSON.stringify(config.agent.crawlers)};` : ""}
6758
+ const farmLlmsTxtConfig = ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _166 => _166.agent, 'optionalAccess', _167 => _167.llmsTxt]), () => ( { enabled: false, include: [], exclude: [] })))};
6759
+ ${_optionalChain([config, 'access', _168 => _168.agent, 'optionalAccess', _169 => _169.llmsTxt, 'optionalAccess', _170 => _170.enabled]) ? "const farmLlmsFullRenderer = createFarmLlmsFullRenderer({ revalidate: farmLlmsTxtConfig.revalidate });\n" : ""}${servesAgentRobotsTxt ? `const farmAgentCrawlers = ${JSON.stringify(config.agent.crawlers)};` : ""}
6723
6760
  const farmMdxConfig = ${JSON.stringify({
6724
6761
  ...config.mdx,
6725
- components: typeof _optionalChain([config, 'access', _159 => _159.mdx, 'optionalAccess', _160 => _160.components]) === "string" ? config.mdx.components : void 0
6762
+ components: typeof _optionalChain([config, 'access', _171 => _171.mdx, 'optionalAccess', _172 => _172.components]) === "string" ? config.mdx.components : void 0
6726
6763
  })};
6727
6764
  const configuredFarmMdxComponents = farmUserConfig?.mdx?.components;
6728
- ${_optionalChain([config, 'access', _161 => _161.agent, 'optionalAccess', _162 => _162.noindexPreviews]) ? `// agent.noindexPreviews: the runtime environment decides, falling back to the
6765
+ ${_optionalChain([config, 'access', _173 => _173.agent, 'optionalAccess', _174 => _174.noindexPreviews]) ? `// agent.noindexPreviews: the runtime environment decides, falling back to the
6729
6766
  // environment this was built in, since Netlify exposes its deploy context only
6730
6767
  // to the build.
6731
6768
  const farmNoindexPreview = resolveFarmPreviewDeployment(
@@ -6776,7 +6813,7 @@ export const farmProductionLifecycle = createFarmProductionLifecycle({
6776
6813
  });
6777
6814
  const farmI18nRuntime = ${config.i18n.enabled ? `createFarmI18nRuntime(farmI18nConfig, ${JSON.stringify(i18nCatalogs)})` : "null"};
6778
6815
  ${config.i18n.enabled ? "_setDefaultFarmI18nRuntime(farmI18nRuntime);" : ""}
6779
- const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _163 => _163.docs, 'optionalAccess', _164 => _164.enabled]) && !hasPrecompiledDocs ? `(() => {
6816
+ const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _175 => _175.docs, 'optionalAccess', _176 => _176.enabled]) && !hasPrecompiledDocs ? `(() => {
6780
6817
  try {
6781
6818
  const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
6782
6819
  const candidates = [
@@ -6788,7 +6825,20 @@ const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _163 => _1
6788
6825
  } catch {
6789
6826
  return null;
6790
6827
  }
6791
- })()` : "null"};
6828
+ })()` : "null"};${_optionalChain([config, 'access', _177 => _177.docs, 'optionalAccess', _178 => _178.enabled]) && !hasPrecompiledDocs && _optionalChain([config, 'access', _179 => _179.docs, 'access', _180 => _180.roots, 'optionalAccess', _181 => _181.length]) ? `
6829
+ const farmDocsBundledRootsDir = (() => {
6830
+ try {
6831
+ const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
6832
+ const candidates = [
6833
+ farmDocsJoin(currentDir, "farm-docs-roots"),
6834
+ farmDocsJoin(currentDir, "..", "farm-docs-roots"),
6835
+ farmDocsJoin(currentDir, "..", "..", "farm-docs-roots"),
6836
+ ];
6837
+ return candidates.find((candidate) => farmDocsExistsSync(candidate)) || null;
6838
+ } catch {
6839
+ return null;
6840
+ }
6841
+ })();` : ""}
6792
6842
  const farmDocsResolvedConfig = ${generateFarmDocsRuntimeConfigExpression(config.docs, hasPrecompiledDocs)};
6793
6843
  const farmDocsRuntimeRoot = ${hasPrecompiledDocs ? '"."' : `farmDocsBundledContentDir || ${JSON.stringify(config.root)}`};
6794
6844
  // Docs pages a path-specific guard covers, decided at build time. The docs API and the
@@ -6826,12 +6876,7 @@ const farmDocsModulePreloadPaths = farmDocsModulePreloads
6826
6876
  ),
6827
6877
  }
6828
6878
  : undefined;
6829
- const farmDocsHandler = ${_optionalChain([config, 'access', _165 => _165.docs, 'optionalAccess', _166 => _166.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `createFarmDocsAdapterRuntimeHandler({
6830
- ${docsConfigModulePath ? "...(farmDocsConfigModule.default || farmDocsConfigModule),\n ...farmDocsResolvedConfig.configOverrides," : "...farmDocsResolvedConfig.config,"}
6831
- entry: farmDocsResolvedConfig.config?.entry || String(farmDocsResolvedConfig.entry || "/docs").replace(/^\\/+|\\/+$/g, "") || "docs",
6832
- docsPath: farmDocsResolvedConfig.entry,
6833
- contentDir: farmDocsResolvedConfig.contentDir || farmDocsResolvedConfig.config?.contentDir,
6834
- }, {
6879
+ const farmDocsHandler = ${_optionalChain([config, 'access', _182 => _182.docs, 'optionalAccess', _183 => _183.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `${adapterHandler.factory}(${adapterHandler.config}, {
6835
6880
  rootDir: farmDocsRuntimeRoot,
6836
6881
  // A production build's content cannot change, so the adapter reads its
6837
6882
  // navigation once instead of scanning the content directory per request.
@@ -6864,7 +6909,7 @@ const farmDocsHandler = ${_optionalChain([config, 'access', _165 => _165.docs, '
6864
6909
  globalStylesheetHref: ${JSON.stringify(FARM_CLIENT_CSS_HREF_PLACEHOLDER)},
6865
6910
  isPathGuarded: isFarmDocsPathGuarded,
6866
6911
  })` : "null"};
6867
- const farmDocsAPIHandler = ${_optionalChain([config, 'access', _167 => _167.docs, 'optionalAccess', _168 => _168.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleAPIRequest" : adapterOwnsDocsRuntime ? "null" : `createFarmDocsAPIHandler({ rootDir: farmDocsRuntimeRoot, srcDir: ${JSON.stringify(config.srcDir)}, docs: farmDocsResolvedConfig, isPathGuarded: isFarmDocsPathGuarded })` : "null"};
6912
+ const farmDocsAPIHandler = ${_optionalChain([config, 'access', _184 => _184.docs, 'optionalAccess', _185 => _185.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleAPIRequest" : adapterOwnsDocsRuntime ? "null" : `createFarmDocsAPIHandler({ rootDir: farmDocsRuntimeRoot, srcDir: ${JSON.stringify(config.srcDir)}, docs: farmDocsResolvedConfig, isPathGuarded: isFarmDocsPathGuarded })` : "null"};
6868
6913
 
6869
6914
  // API routes bundled at build time
6870
6915
  const apiRoutes = ${apiRoutes.length > 0 ? "mergePluginAPIRoutes(" : ""}[${apiRegistrations.join(",")}
@@ -6889,12 +6934,12 @@ function fetchFarmInnerRequest(request, context) {
6889
6934
  }
6890
6935
  const farmLocalAPIBasePath = ${JSON.stringify(_chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
6891
6936
  const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
6892
- ${_optionalChain([config, 'access', _169 => _169.agent, 'optionalAccess', _170 => _170.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkJ22JD5YJcjs.resolveFarmApiCatalogInput.call(void 0, config))};
6893
- ` : ""}${_optionalChain([config, 'access', _171 => _171.agent, 'optionalAccess', _172 => _172.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
6894
- _chunkJ22JD5YJcjs.resolveFarmAppManifestInput.call(void 0, config, {
6937
+ ${_optionalChain([config, 'access', _186 => _186.agent, 'optionalAccess', _187 => _187.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkRMPNYUGTcjs.resolveFarmApiCatalogInput.call(void 0, config))};
6938
+ ` : ""}${_optionalChain([config, 'access', _188 => _188.agent, 'optionalAccess', _189 => _189.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
6939
+ _chunkRMPNYUGTcjs.resolveFarmAppManifestInput.call(void 0, config, {
6895
6940
  build: config.deploymentId,
6896
- packages: _chunkF42U3R4Fcjs.resolveFarmAppPackages.call(void 0, config.root),
6897
- webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkF42U3R4Fcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
6941
+ packages: _chunkX2M4XN4Vcjs.resolveFarmAppPackages.call(void 0, config.root),
6942
+ webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkX2M4XN4Vcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
6898
6943
  })
6899
6944
  )};
6900
6945
  ${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
@@ -8060,7 +8105,7 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
8060
8105
  // aside for a page route that answers /mcp and for any MCP server published or
8061
8106
  // registered at runtime, such as the docs engine's.
8062
8107
  const farmDefaultMCPServer = ${JSON.stringify(
8063
- _chunkSBABQKPTcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkX5BCMLGPcjs.FARM_VERSION)
8108
+ _chunkSBABQKPTcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkAGR7VJH2cjs.FARM_VERSION)
8064
8109
  )};
8065
8110
  let farmDefaultMCPRouteFree;
8066
8111
  function getFarmDefaultMCPServer() {
@@ -8360,7 +8405,7 @@ function hasLocalRequestRoute(request, routePathname) {
8360
8405
  if (${imageRuntime === "none" ? "false" : `pathname === ${JSON.stringify(config.images.path)}`}) {
8361
8406
  return true;
8362
8407
  }
8363
- ${_optionalChain([config, 'access', _173 => _173.docs, 'optionalAccess', _174 => _174.enabled]) ? `const docsPath = normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs");
8408
+ ${_optionalChain([config, 'access', _190 => _190.docs, 'optionalAccess', _191 => _191.enabled]) ? `const docsPath = normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs");
8364
8409
  if (
8365
8410
  isFarmDocsAPIRequest(pathname) ||
8366
8411
  docsPath === "/" ||
@@ -8386,7 +8431,7 @@ function getFarmPluginRequestOptions(request) {
8386
8431
  route: { ...route, pattern: normalizeRuntimePath(farmOpenAPIReference.route) },
8387
8432
  };
8388
8433
  }
8389
- const isDocsAPIRequest = ${_optionalChain([config, 'access', _175 => _175.docs, 'optionalAccess', _176 => _176.enabled]) ? "isFarmDocsAPIRequest(pathname)" : "false"};
8434
+ const isDocsAPIRequest = ${_optionalChain([config, 'access', _192 => _192.docs, 'optionalAccess', _193 => _193.enabled]) ? "isFarmDocsAPIRequest(pathname)" : "false"};
8390
8435
  const integrationMatch = ${hasServerRuntimeIntegrations ? `matchIntegrationRoute(serverRuntimeIntegrations, {
8391
8436
  pathname,
8392
8437
  method: request.method,
@@ -8470,7 +8515,7 @@ ${hasInfraAnalyticsRuntime ? `
8470
8515
  // endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
8471
8516
  // labeled here; route.pattern keeps meaning the matched app route for plugins.
8472
8517
  const farmBuiltInRoutePaths = new Set(${JSON.stringify(
8473
- _chunkJ22JD5YJcjs.listFarmBuiltInRoutePaths.call(void 0, {
8518
+ _chunkRMPNYUGTcjs.listFarmBuiltInRoutePaths.call(void 0, {
8474
8519
  agent: {
8475
8520
  ...config.agent,
8476
8521
  aiCatalog: servesAiCatalog,
@@ -8481,9 +8526,9 @@ const farmBuiltInRoutePaths = new Set(${JSON.stringify(
8481
8526
  openapi: openAPIReference
8482
8527
  })
8483
8528
  )});
8484
- ${_optionalChain([config, 'access', _177 => _177.docs, 'optionalAccess', _178 => _178.enabled]) ? `const farmDocsRouteLabelInput = {
8529
+ ${_optionalChain([config, 'access', _194 => _194.docs, 'optionalAccess', _195 => _195.enabled]) ? `const farmDocsRouteLabelInput = {
8485
8530
  path: normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs"),
8486
- apiPath: ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _179 => _179.apiPath]) || "/api/docs")},
8531
+ apiPath: ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _196 => _196.apiPath]) || "/api/docs")},${_optionalChain([config, 'access', _197 => _197.docs, 'access', _198 => _198.roots, 'optionalAccess', _199 => _199.length]) ? "\n roots: farmDocsResolvedConfig.roots.map((farmDocsRoot) => farmDocsRoot.entry)," : ""}
8487
8532
  };
8488
8533
  ` : ""}// The request's route payload, for a handler that learns what answered while it handles.
8489
8534
  const farmRouteLabelSlot = Symbol("farm.route.label.slot");
@@ -8498,11 +8543,11 @@ function labelFarmRequestOptions(options) {
8498
8543
  setFarmRouteLabel(options.route, mcpLabel);
8499
8544
  return options;
8500
8545
  }
8501
- ${_optionalChain([config, 'access', _180 => _180.docs, 'optionalAccess', _181 => _181.enabled]) ? `if (options.kind === "docs") {
8546
+ ${_optionalChain([config, 'access', _200 => _200.docs, 'optionalAccess', _201 => _201.enabled]) ? `if (options.kind === "docs") {
8502
8547
  setFarmRouteLabel(options.route, resolveFarmDocsRouteLabel(routePathname, farmDocsRouteLabelInput));
8503
8548
  return options;
8504
8549
  }` : ""}
8505
- ${_optionalChain([config, 'access', _182 => _182.md, 'optionalAccess', _183 => _183.enabled]) || hasMarkdownPages ? `const markdownLabel = resolveFarmMarkdownRouteLabel(
8550
+ ${_optionalChain([config, 'access', _202 => _202.md, 'optionalAccess', _203 => _203.enabled]) || hasMarkdownPages ? `const markdownLabel = resolveFarmMarkdownRouteLabel(
8506
8551
  routePathname,
8507
8552
  (page) => matchPageRoute(page)?.route.pattern,
8508
8553
  );
@@ -8537,7 +8582,7 @@ function getApplicableLayouts(pathname, directory) {
8537
8582
  return applicable;
8538
8583
  }
8539
8584
 
8540
- ${_optionalChain([config, 'access', _184 => _184.docs, 'optionalAccess', _185 => _185.enabled]) ? `async function wrapFarmDocsResponseWithLayouts(request, response) {
8585
+ ${_optionalChain([config, 'access', _204 => _204.docs, 'optionalAccess', _205 => _205.enabled]) ? `async function wrapFarmDocsResponseWithLayouts(request, response) {
8541
8586
  if (request.method === "HEAD") return response;
8542
8587
  if (response.headers.get("x-farm-docs-adapter")) return response;
8543
8588
 
@@ -8645,7 +8690,7 @@ ${_optionalChain([config, 'access', _184 => _184.docs, 'optionalAccess', _185 =>
8645
8690
 
8646
8691
  // Shells keep their own LRU so query-string variants never evict app cache entries.
8647
8692
  const pprShellCache = getFarmDataCache().pprShellCache;
8648
- const experimentalPPREnabled = ${JSON.stringify(_optionalChain([config, 'access', _186 => _186.experimental, 'optionalAccess', _187 => _187.ppr]) === true)};
8693
+ const experimentalPPREnabled = ${JSON.stringify(_optionalChain([config, 'access', _206 => _206.experimental, 'optionalAccess', _207 => _207.ppr]) === true)};
8649
8694
 
8650
8695
  function resolveRouteRenderingView(route) {
8651
8696
  // The same merge development uses: baked directive config under the
@@ -8777,7 +8822,7 @@ async function handleFarmRequest(request, adapterContext) {
8777
8822
  },
8778
8823
  { redirect: !isFarmLocalAPIPathname(requestUrl.pathname) }
8779
8824
  )` : "handleFarmRequestInContext(request, null, false, Date.now(), adapterContext, requestUrl)"};
8780
- ${_optionalChain([config, 'access', _188 => _188.md, 'optionalAccess', _189 => _189.enabled]) ? `const pathname = getFarmRoutePathname(requestUrl.pathname);
8825
+ ${_optionalChain([config, 'access', _208 => _208.md, 'optionalAccess', _209 => _209.enabled]) ? `const pathname = getFarmRoutePathname(requestUrl.pathname);
8781
8826
  if (matchPageRoute(pathname)) {
8782
8827
  // The Link header advertises the public .md URL, like the head alternate.
8783
8828
  return applyMarkdownNegotiationHeaders(response, {
@@ -8858,7 +8903,7 @@ async function resolveFarmRequestInContext(
8858
8903
  if (rewriteDestination) {
8859
8904
  let rewrittenRequest = createRewrittenRequest(request, rewriteDestination);
8860
8905
  if (new URL(rewrittenRequest.url).origin !== url.origin) {
8861
- return globalThis.fetch(rewrittenRequest);
8906
+ return fetchFarmExternalRewrite(rewrittenRequest);
8862
8907
  }
8863
8908
  if (farmPluginRuntime) {
8864
8909
  // Plugin guards ran on the requested URL. Re-run only runtime.before
@@ -8987,7 +9032,7 @@ ${hasServerRuntimeIntegrations ? `
8987
9032
  }
8988
9033
  ` : ""}
8989
9034
 
8990
- ${_optionalChain([config, 'access', _190 => _190.docs, 'optionalAccess', _191 => _191.enabled]) ? `
9035
+ ${_optionalChain([config, 'access', _210 => _210.docs, 'optionalAccess', _211 => _211.enabled]) ? `
8991
9036
  // Docs responses are served after app middleware so route guards and
8992
9037
  // middleware headers apply to the docs engine like any other page content.
8993
9038
  // An app's own llms.txt, llms-full.txt, sitemap.xml, and robots.txt take
@@ -9055,7 +9100,7 @@ ${hasServerRuntimeIntegrations ? `
9055
9100
  }
9056
9101
  ` : ""}
9057
9102
 
9058
- ${_optionalChain([config, 'access', _192 => _192.md, 'optionalAccess', _193 => _193.enabled]) ? `
9103
+ ${_optionalChain([config, 'access', _212 => _212.md, 'optionalAccess', _213 => _213.enabled]) ? `
9059
9104
  if (farmMarkdownConfig?.enabled) {
9060
9105
  const markdownResponse = await createMarkdownMirrorResponse({
9061
9106
  // The mirror helper only reads metadata and creates its own GET request.
@@ -9154,11 +9199,11 @@ ${hasServerRuntimeIntegrations ? `
9154
9199
  return applyProductionMiddlewareHeaders(applicationMetadataResponse, middlewareHeaders);
9155
9200
  }
9156
9201
  ` : ""}
9157
- ${_optionalChain([config, 'access', _194 => _194.agent, 'optionalAccess', _195 => _195.manifest]) !== false ? `
9202
+ ${_optionalChain([config, 'access', _214 => _214.agent, 'optionalAccess', _215 => _215.manifest]) !== false ? `
9158
9203
  // agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
9159
9204
  // public manifest, the same document for every request.
9160
9205
  if (
9161
- [${JSON.stringify(_chunkJ22JD5YJcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkJ22JD5YJcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
9206
+ [${JSON.stringify(_chunkRMPNYUGTcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkRMPNYUGTcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
9162
9207
  normalizeRuntimePath(routePathname),
9163
9208
  )
9164
9209
  ) {
@@ -9168,9 +9213,9 @@ ${hasServerRuntimeIntegrations ? `
9168
9213
  );
9169
9214
  }
9170
9215
  ` : ""}
9171
- ${_optionalChain([config, 'access', _196 => _196.agent, 'optionalAccess', _197 => _197.apiCatalog]) ? `
9216
+ ${_optionalChain([config, 'access', _216 => _216.agent, 'optionalAccess', _217 => _217.apiCatalog]) ? `
9172
9217
  // agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
9173
- if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkJ22JD5YJcjs.FARM_API_CATALOG_PATH)}) {
9218
+ if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkRMPNYUGTcjs.FARM_API_CATALOG_PATH)}) {
9174
9219
  return applyProductionMiddlewareHeaders(
9175
9220
  createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
9176
9221
  middlewareHeaders,
@@ -9195,11 +9240,11 @@ ${hasServerRuntimeIntegrations ? `
9195
9240
  );
9196
9241
  }
9197
9242
  ` : ""}
9198
- ${_optionalChain([config, 'access', _198 => _198.agent, 'optionalAccess', _199 => _199.llmsTxt, 'optionalAccess', _200 => _200.enabled]) ? `
9243
+ ${_optionalChain([config, 'access', _218 => _218.agent, 'optionalAccess', _219 => _219.llmsTxt, 'optionalAccess', _220 => _220.enabled]) ? `
9199
9244
  // agent.llmsTxt with no llms.ts or llms-full.ts: serve the generated files.
9200
9245
  const farmGeneratedLlmsKind = normalizeRuntimePath(routePathname) === "/llms.txt"
9201
9246
  ? "llms"
9202
- : ${_optionalChain([config, 'access', _201 => _201.agent, 'optionalAccess', _202 => _202.llmsTxt, 'optionalAccess', _203 => _203.full]) ? `normalizeRuntimePath(routePathname) === "/llms-full.txt" ? "llms-full" : ` : ""}null;
9247
+ : ${_optionalChain([config, 'access', _221 => _221.agent, 'optionalAccess', _222 => _222.llmsTxt, 'optionalAccess', _223 => _223.full]) ? `normalizeRuntimePath(routePathname) === "/llms-full.txt" ? "llms-full" : ` : ""}null;
9203
9248
  if (farmGeneratedLlmsKind) {
9204
9249
  const llmsContext = createFarmLlmsTxtContext(request, farmGeneratedLlmsKind === "llms-full");
9205
9250
  const llmsOrigin = new URL(request.url).origin;
@@ -9234,7 +9279,7 @@ ${hasServerRuntimeIntegrations ? `
9234
9279
  }
9235
9280
  ` : ""}
9236
9281
 
9237
- ${_optionalChain([config, 'access', _204 => _204.docs, 'optionalAccess', _205 => _205.enabled]) ? `if (farmDocsAPIHandler && isFarmDocsAPIRequest(pathname)) {
9282
+ ${_optionalChain([config, 'access', _224 => _224.docs, 'optionalAccess', _225 => _225.enabled]) ? `if (farmDocsAPIHandler && isFarmDocsAPIRequest(pathname)) {
9238
9283
  const docsAPIResponse = await farmDocsAPIHandler(cloneFarmRequestWithContext(request));
9239
9284
  if (docsAPIResponse) {
9240
9285
  return applyProductionMiddlewareHeaders(
@@ -9770,7 +9815,7 @@ ${hasServerRuntimeIntegrations ? `
9770
9815
  );
9771
9816
  }
9772
9817
  }
9773
- ${_optionalChain([config, 'access', _206 => _206.md, 'optionalAccess', _207 => _207.enabled]) ? `
9818
+ ${_optionalChain([config, 'access', _226 => _226.md, 'optionalAccess', _227 => _227.enabled]) ? `
9774
9819
  // Advertise the Markdown mirror in the head as well as the Link header,
9775
9820
  // using the public path the .md request will be resolved against.
9776
9821
  mergedMetadata = addMetadataMarkdownAlternate(
@@ -9789,7 +9834,7 @@ ${hasServerRuntimeIntegrations ? `
9789
9834
  emitFarmEvent({ type: "cache.bypass", route: pathname, reason: "request-read" });
9790
9835
  }
9791
9836
 
9792
- const renderedMetadata = renderMetadataHead(mergedMetadata, { pathname, jsonLd: ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _208 => _208.agent, 'optionalAccess', _209 => _209.jsonLd]), () => ( false)))} });
9837
+ const renderedMetadata = renderMetadataHead(mergedMetadata, { pathname, jsonLd: ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.jsonLd]), () => ( false)))} });
9793
9838
  const title = renderedMetadata.title;
9794
9839
  const metaTags = renderedMetadata.tags;
9795
9840
  const hasFavicon = renderedMetadata.hasFavicon;
@@ -10479,11 +10524,11 @@ ${generatePreloadResponseRuntimeSource()}
10479
10524
  export async function fetch(request, context) {${imageRuntime === "none" ? "" : `
10480
10525
  // The image optimizer's fetch of a local source is not a loopback visitor.
10481
10526
  context = _withFarmImageSourceClientAddress(request, context);`}
10482
- ${_optionalChain([config, 'access', _210 => _210.agent, 'optionalAccess', _211 => _211.noindexPreviews]) ? "const response = await" : "return"} _runWithAPIRequestRuntime({
10527
+ ${_optionalChain([config, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.noindexPreviews]) ? "const response = await" : "return"} _runWithAPIRequestRuntime({
10483
10528
  basePath: farmLocalAPIBasePath,
10484
10529
  dispatch: async (localRequest) =>
10485
10530
  (await handleAPIRequest(localRequest)) ?? Response.json({ error: "Not Found" }, { status: 404 }),
10486
- }, () => handleFarmFetch(request, context));${_optionalChain([config, 'access', _212 => _212.agent, 'optionalAccess', _213 => _213.noindexPreviews]) ? `
10531
+ }, () => handleFarmFetch(request, context));${_optionalChain([config, 'access', _232 => _232.agent, 'optionalAccess', _233 => _233.noindexPreviews]) ? `
10487
10532
  // Keep every response of a preview deployment out of search indexes.
10488
10533
  return farmNoindexPreview ? applyFarmPreviewRobotsTag(response) : response;` : ""}
10489
10534
  }
@@ -10676,11 +10721,11 @@ function getPhysicalPrerenderBypassReason(options) {
10676
10721
  }
10677
10722
  if (_chunk76GHW3WIcjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
10678
10723
  if (_chunk76GHW3WIcjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
10679
- if (_chunkO3MMJPC2cjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
10724
+ if (_chunkVITZRYW3cjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
10680
10725
  if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
10681
10726
  const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
10682
- if (_optionalChain([manifestEntry, 'optionalAccess', _214 => _214.rendering]) === "dynamic") return "dynamic runtime manifest";
10683
- if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access', _215 => _215.regions, 'optionalAccess', _216 => _216.length])) || manifestEntry.maxDuration !== void 0)) {
10727
+ if (_optionalChain([manifestEntry, 'optionalAccess', _234 => _234.rendering]) === "dynamic") return "dynamic runtime manifest";
10728
+ if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access', _235 => _235.regions, 'optionalAccess', _236 => _236.length])) || manifestEntry.maxDuration !== void 0)) {
10684
10729
  return "route runtime controls";
10685
10730
  }
10686
10731
  const routeRule = getEffectiveRouteRule(config, pathname);
@@ -10692,11 +10737,34 @@ function getPhysicalPrerenderBypassReason(options) {
10692
10737
  }
10693
10738
  return void 0;
10694
10739
  }
10740
+ async function getFarmDocsPrerenderPages(config, root, preset) {
10741
+ if (!_optionalChain([config, 'access', _237 => _237.docs, 'optionalAccess', _238 => _238.enabled]) || !config.docs.prerender) return [];
10742
+ if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !_chunkJVBNKWLVcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
10743
+ _chunkVQJYGZNXcjs.logger.warn(
10744
+ "docs.prerender needs a docs adapter such as @farming-labs/farmjs; Farm's built-in docs renderer keeps rendering docs pages on request."
10745
+ );
10746
+ return [];
10747
+ }
10748
+ if (_chunkE552H232cjs.getFarmPresetRuntime.call(void 0, preset) === "edge") {
10749
+ _chunkVQJYGZNXcjs.logger.info(
10750
+ `\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
10751
+ );
10752
+ return [];
10753
+ }
10754
+ const pages = await _chunkJVBNKWLVcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
10755
+ if (!pages) {
10756
+ _chunkVQJYGZNXcjs.logger.warn(
10757
+ `The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
10758
+ );
10759
+ return [];
10760
+ }
10761
+ return pages;
10762
+ }
10695
10763
  function hasFarmNitroCacheRouteRule(routeRules) {
10696
10764
  return Object.values(routeRules || {}).some((rule) => {
10697
- const swr = _optionalChain([rule, 'optionalAccess', _217 => _217.swr]);
10698
- const cache = _optionalChain([rule, 'optionalAccess', _218 => _218.cache]);
10699
- const headers = _optionalChain([rule, 'optionalAccess', _219 => _219.headers]);
10765
+ const swr = _optionalChain([rule, 'optionalAccess', _239 => _239.swr]);
10766
+ const cache = _optionalChain([rule, 'optionalAccess', _240 => _240.cache]);
10767
+ const headers = _optionalChain([rule, 'optionalAccess', _241 => _241.headers]);
10700
10768
  return swr !== void 0 && swr !== false || cache !== void 0 && cache !== false || !!headers && typeof headers === "object" && Object.keys(headers).length > 0;
10701
10769
  });
10702
10770
  }
@@ -10709,10 +10777,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
10709
10777
  const nitroBuilder = nitroBuilderResult.value;
10710
10778
  const isVercel = preset === "vercel" || preset === "vercel-edge";
10711
10779
  const isCloudflareWorker = preset === "cloudflare-module";
10712
- const outputDir = _chunkO3MMJPC2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
10780
+ const outputDir = _chunkVITZRYW3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
10713
10781
  const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
10714
10782
  const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
10715
- const imageRuntime = _chunkF42U3R4Fcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
10783
+ const imageRuntime = _chunkX2M4XN4Vcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
10716
10784
  const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
10717
10785
  (image) => image.sourceType === "module"
10718
10786
  );
@@ -10733,12 +10801,19 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
10733
10801
  const ssgCollectionPromise = routeManager.collectSSGPages();
10734
10802
  const middlewareRoutesPromise = discoverMiddlewareRoutes(_chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, config));
10735
10803
  const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
10804
+ const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
10736
10805
  const farmWorkflows = await _chunkXB24LZWIcjs.prepareFarmWorkflowsForNitro.call(void 0, config);
10737
10806
  const farmCron = await _chunkXYL4HSVCcjs.prepareFarmCronForNitro.call(void 0, config);
10738
- const [{ ssg: ssgPages }, middlewareRoutes, [configuredRedirects, configuredRewrites]] = await Promise.all([
10807
+ const [
10808
+ { ssg: ssgPages },
10809
+ middlewareRoutes,
10810
+ [configuredRedirects, configuredRewrites],
10811
+ docsPrerenderPages
10812
+ ] = await Promise.all([
10739
10813
  ssgCollectionPromise,
10740
10814
  middlewareRoutesPromise,
10741
- configuredResponseRoutesPromise
10815
+ configuredResponseRoutesPromise,
10816
+ docsPrerenderPagesPromise
10742
10817
  ]);
10743
10818
  const redirectSources = [
10744
10819
  ...routeManager.getRedirects().map((route) => route.source),
@@ -10747,7 +10822,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
10747
10822
  const rewriteSources = configuredRewrites.map((route) => route.source);
10748
10823
  const prerenderRoutes = [];
10749
10824
  const skippedPrerenderRoutes = [];
10750
- const middlewareRoutesWithConfig = ssgPages.length > 0 ? await Promise.all(
10825
+ const middlewareRoutesWithConfig = ssgPages.length > 0 || docsPrerenderPages.length > 0 ? await Promise.all(
10751
10826
  middlewareRoutes.map(async (route) => ({
10752
10827
  ...route,
10753
10828
  config: await readMiddlewareFileConfig(route.filePath)
@@ -10770,6 +10845,26 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
10770
10845
  }
10771
10846
  prerenderRoutes.push(page.urlPath);
10772
10847
  }
10848
+ const docsRouteRuntimeManifest = {
10849
+ ...routeRuntimeManifest,
10850
+ routes: routeRuntimeManifest.routes.filter((entry) => entry.kind !== "page")
10851
+ };
10852
+ for (const pathname of docsPrerenderPages) {
10853
+ if (prerenderRoutes.includes(pathname)) continue;
10854
+ const reason = getPhysicalPrerenderBypassReason({
10855
+ config,
10856
+ middlewareRoutes: middlewareRoutesWithConfig,
10857
+ routeRuntimeManifest: docsRouteRuntimeManifest,
10858
+ redirectSources,
10859
+ rewriteSources,
10860
+ pathname
10861
+ });
10862
+ if (reason) {
10863
+ skippedPrerenderRoutes.push({ pathname, reason });
10864
+ continue;
10865
+ }
10866
+ prerenderRoutes.push(pathname);
10867
+ }
10773
10868
  for (const skipped of skippedPrerenderRoutes) {
10774
10869
  _chunkVQJYGZNXcjs.logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
10775
10870
  }
@@ -11195,20 +11290,20 @@ function toFarmNodeResponse(request, response) {
11195
11290
  snapshotSSRRebundleOptions(nitroConfig)
11196
11291
  );
11197
11292
  const requestedBuilder = _nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER));
11198
- const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset === "node-server" && (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access', _220 => _220.rollupConfig, 'optionalAccess', _221 => _221.external]) === nitroRollupExternal && !hasRollupPlugins(_optionalChain([nitroConfig, 'access', _222 => _222.rollupConfig, 'optionalAccess', _223 => _223.plugins])) && customRollupKeys.length === 0 && _path2.default.resolve(_optionalChain([nitroConfig, 'access', _224 => _224.output, 'optionalAccess', _225 => _225.serverDir]) || "") === _path2.default.resolve(expectedServerDir) && Boolean(
11199
- _optionalChain([nitroConfig, 'access', _226 => _226.handlers, 'optionalAccess', _227 => _227.some, 'call', _228 => _228(
11200
- (handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess', _229 => _229.handler]) || "") === nitroEntryPath
11293
+ const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset === "node-server" && (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access', _242 => _242.rollupConfig, 'optionalAccess', _243 => _243.external]) === nitroRollupExternal && !hasRollupPlugins(_optionalChain([nitroConfig, 'access', _244 => _244.rollupConfig, 'optionalAccess', _245 => _245.plugins])) && customRollupKeys.length === 0 && _path2.default.resolve(_optionalChain([nitroConfig, 'access', _246 => _246.output, 'optionalAccess', _247 => _247.serverDir]) || "") === _path2.default.resolve(expectedServerDir) && Boolean(
11294
+ _optionalChain([nitroConfig, 'access', _248 => _248.handlers, 'optionalAccess', _249 => _249.some, 'call', _250 => _250(
11295
+ (handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess', _251 => _251.handler]) || "") === nitroEntryPath
11201
11296
  )])
11202
11297
  );
11203
11298
  const selectRolldownBuilder = canReusePrebuiltSSR && requestedBuilder === void 0 && await canUseRolldownBuilder();
11204
11299
  if (selectRolldownBuilder) nitroConfig.builder = "rolldown";
11205
11300
  const useRolldownBuilder = canReusePrebuiltSSR && (_nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER))) === "rolldown";
11206
11301
  const shouldMinify = nitroConfig.minify !== false;
11207
- const keepServerNames = !(_optionalChain([config, 'access', _230 => _230.docs, 'optionalAccess', _231 => _231.enabled]) && _optionalChain([config, 'access', _232 => _232.docs, 'access', _233 => _233.adapter, 'optionalAccess', _234 => _234.server]));
11302
+ const keepServerNames = !(_optionalChain([config, 'access', _252 => _252.docs, 'optionalAccess', _253 => _253.enabled]) && _optionalChain([config, 'access', _254 => _254.docs, 'access', _255 => _255.adapter, 'optionalAccess', _256 => _256.server]));
11208
11303
  const useFarmServerMinifier = shouldMinify && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig;
11209
11304
  const serverChunkMinifier = useFarmServerMinifier ? createServerChunkMinifyPlugin({ keepNames: keepServerNames, target: "esnext" }) : null;
11210
11305
  if (canReusePrebuiltSSR) {
11211
- const configuredRollupPlugins = _optionalChain([nitroConfig, 'access', _235 => _235.rollupConfig, 'optionalAccess', _236 => _236.plugins]);
11306
+ const configuredRollupPlugins = _optionalChain([nitroConfig, 'access', _257 => _257.rollupConfig, 'optionalAccess', _258 => _258.plugins]);
11212
11307
  nitroConfig.rollupConfig = {
11213
11308
  ...nitroConfig.rollupConfig,
11214
11309
  plugins: [
@@ -11219,9 +11314,9 @@ function toFarmNodeResponse(request, response) {
11219
11314
  }
11220
11315
  nitroConfig.minify = useFarmServerMinifier ? false : shouldMinify;
11221
11316
  const nitroInstance = await nitroBuilder.createNitro(nitroConfig);
11222
- if (_optionalChain([config, 'access', _237 => _237.md, 'optionalAccess', _238 => _238.enabled])) {
11317
+ if (_optionalChain([config, 'access', _259 => _259.md, 'optionalAccess', _260 => _260.enabled])) {
11223
11318
  nitroInstance.hooks.hook("prerender:generate", (route) => {
11224
- if (!route.contents || !_optionalChain([route, 'access', _239 => _239.contentType, 'optionalAccess', _240 => _240.toLowerCase, 'call', _241 => _241(), 'access', _242 => _242.includes, 'call', _243 => _243("html")])) return;
11319
+ if (!route.contents || !_optionalChain([route, 'access', _261 => _261.contentType, 'optionalAccess', _262 => _262.toLowerCase, 'call', _263 => _263(), 'access', _264 => _264.includes, 'call', _265 => _265("html")])) return;
11225
11320
  const alternatePath = _chunkWJFFPXCVcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route);
11226
11321
  if (!alternatePath) return;
11227
11322
  const routeRule = nitroInstance.options.routeRules[route.route] || {};
@@ -11242,7 +11337,7 @@ function toFarmNodeResponse(request, response) {
11242
11337
  }
11243
11338
  if (config.security.csp && config.security.csp.nonce) {
11244
11339
  nitroInstance.hooks.hook("prerender:generate", async (route) => {
11245
- if (!route.contents || !_optionalChain([route, 'access', _244 => _244.contentType, 'optionalAccess', _245 => _245.toLowerCase, 'call', _246 => _246(), 'access', _247 => _247.includes, 'call', _248 => _248("html")])) return;
11340
+ if (!route.contents || !_optionalChain([route, 'access', _266 => _266.contentType, 'optionalAccess', _267 => _267.toLowerCase, 'call', _268 => _268(), 'access', _269 => _269.includes, 'call', _270 => _270("html")])) return;
11246
11341
  const staticCsp = await _chunk6JHZPB52cjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
11247
11342
  if (!staticCsp) return;
11248
11343
  route.contents = staticCsp.html;
@@ -11317,13 +11412,13 @@ function toFarmNodeResponse(request, response) {
11317
11412
  }
11318
11413
  if (prerenderRoutes.length > 0) {
11319
11414
  _chunkVQJYGZNXcjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
11320
- const previousPrerender = process.env[_chunkVO6NLTV4cjs.FARM_PRERENDER_ENV];
11321
- process.env[_chunkVO6NLTV4cjs.FARM_PRERENDER_ENV] = "1";
11415
+ const previousPrerender = process.env[_chunkIFBINMI4cjs.FARM_PRERENDER_ENV];
11416
+ process.env[_chunkIFBINMI4cjs.FARM_PRERENDER_ENV] = "1";
11322
11417
  try {
11323
11418
  await nitroBuilder.prerender(nitroInstance);
11324
11419
  } finally {
11325
- if (previousPrerender === void 0) delete process.env[_chunkVO6NLTV4cjs.FARM_PRERENDER_ENV];
11326
- else process.env[_chunkVO6NLTV4cjs.FARM_PRERENDER_ENV] = previousPrerender;
11420
+ if (previousPrerender === void 0) delete process.env[_chunkIFBINMI4cjs.FARM_PRERENDER_ENV];
11421
+ else process.env[_chunkIFBINMI4cjs.FARM_PRERENDER_ENV] = previousPrerender;
11327
11422
  }
11328
11423
  }
11329
11424
  const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs4, preset) : Promise.resolve(null);
@@ -11448,7 +11543,7 @@ async function moveVercelOutputPath(src, dest, fs4) {
11448
11543
  await fs4.rename(src, dest);
11449
11544
  return;
11450
11545
  } catch (error) {
11451
- const code = _optionalChain([error, 'optionalAccess', _249 => _249.code]);
11546
+ const code = _optionalChain([error, 'optionalAccess', _271 => _271.code]);
11452
11547
  if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY") {
11453
11548
  throw error;
11454
11549
  }
@@ -11474,7 +11569,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
11474
11569
  try {
11475
11570
  await moveVercelOutputPath(publicDir, staticDir, fs4);
11476
11571
  } catch (error) {
11477
- if (_optionalChain([error, 'optionalAccess', _250 => _250.code]) !== "ENOENT") throw error;
11572
+ if (_optionalChain([error, 'optionalAccess', _272 => _272.code]) !== "ENOENT") throw error;
11478
11573
  }
11479
11574
  await copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4);
11480
11575
  await copyPrismaClientForVercel(root, nitroFuncDir, fs4);
@@ -11503,10 +11598,29 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
11503
11598
  _chunkVQJYGZNXcjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
11504
11599
  }
11505
11600
  async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
11506
- const docsContentDir = resolveBuildDocsContentDir(config, root);
11601
+ if (!_optionalChain([config, 'access', _273 => _273.docs, 'optionalAccess', _274 => _274.enabled])) return;
11602
+ const [mainRoot, ...extraRoots] = _chunk5N7QAGEAcjs.getFarmDocsRoots.call(void 0, config.docs);
11603
+ await copyFarmDocsRootContent(
11604
+ mainRoot,
11605
+ root,
11606
+ config.srcDir,
11607
+ _path2.default.join(nitroFuncDir, "farm-docs-content"),
11608
+ fs4
11609
+ );
11610
+ for (const [index, docsRoot] of extraRoots.entries()) {
11611
+ await copyFarmDocsRootContent(
11612
+ docsRoot,
11613
+ root,
11614
+ config.srcDir,
11615
+ _path2.default.join(nitroFuncDir, "farm-docs-roots", String(index)),
11616
+ fs4
11617
+ );
11618
+ }
11619
+ }
11620
+ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs4) {
11621
+ const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
11507
11622
  if (!docsContentDir) return;
11508
- const bundledContentDir = _path2.default.join(nitroFuncDir, "farm-docs-content");
11509
- const lastModifiedManifest = _chunkIOUOGRDXcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
11623
+ const lastModifiedManifest = _chunk5N7QAGEAcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
11510
11624
  fallback: "now"
11511
11625
  });
11512
11626
  await fs4.rm(bundledContentDir, { recursive: true, force: true });
@@ -11516,7 +11630,7 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
11516
11630
  force: true
11517
11631
  });
11518
11632
  await fs4.writeFile(
11519
- _path2.default.join(bundledContentDir, _chunkIOUOGRDXcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
11633
+ _path2.default.join(bundledContentDir, _chunk5N7QAGEAcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
11520
11634
  `${JSON.stringify(lastModifiedManifest, null, 2)}
11521
11635
  `
11522
11636
  );
@@ -11587,7 +11701,7 @@ async function stageSharpRuntime(config, root, distDir, fs4, preset) {
11587
11701
  try {
11588
11702
  await copyPackage("sharp", sharpRequire);
11589
11703
  if (!copiedPackages.has("sharp")) {
11590
- throw new Error(`Farm image optimization requires sharp. ${_chunkF42U3R4Fcjs.SHARP_INSTALL_HINT}`);
11704
+ throw new Error(`Farm image optimization requires sharp. ${_chunkX2M4XN4Vcjs.SHARP_INSTALL_HINT}`);
11591
11705
  }
11592
11706
  } catch (error) {
11593
11707
  await fs4.rm(stageDir, { recursive: true, force: true });
@@ -11817,7 +11931,7 @@ function createBuildTargetBaseline(config) {
11817
11931
  preset,
11818
11932
  distDir,
11819
11933
  outputDir,
11820
- outputWasDerived: outputDir === _chunkO3MMJPC2cjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
11934
+ outputWasDerived: outputDir === _chunkVITZRYW3cjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
11821
11935
  };
11822
11936
  }
11823
11937
  function resolveBuildTargets(config, options, baseline) {
@@ -11826,8 +11940,8 @@ function resolveBuildTargets(config, options, baseline) {
11826
11940
  const distDir = config.distDir || ".farm";
11827
11941
  const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
11828
11942
  const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
11829
- const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkO3MMJPC2cjs.getDeployTargetForPreset.call(void 0, preset);
11830
- const outputDir = shouldRefreshDerivedOutput ? _chunkO3MMJPC2cjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
11943
+ const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkVITZRYW3cjs.getDeployTargetForPreset.call(void 0, preset);
11944
+ const outputDir = shouldRefreshDerivedOutput ? _chunkVITZRYW3cjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
11831
11945
  return {
11832
11946
  root,
11833
11947
  preset,
@@ -11835,7 +11949,7 @@ function resolveBuildTargets(config, options, baseline) {
11835
11949
  distDir,
11836
11950
  deployTarget,
11837
11951
  outputDir,
11838
- deployOutputDir: _chunkO3MMJPC2cjs.resolveDeployOutputPath.call(void 0, root, outputDir)
11952
+ deployOutputDir: _chunkVITZRYW3cjs.resolveDeployOutputPath.call(void 0, root, outputDir)
11839
11953
  };
11840
11954
  }
11841
11955
  async function buildWithProductionNodeEnv(inputConfig, options) {
@@ -11872,12 +11986,12 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
11872
11986
  };
11873
11987
  config = {
11874
11988
  ...config,
11875
- images: _chunkF42U3R4Fcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
11989
+ images: _chunkX2M4XN4Vcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
11876
11990
  root: targets.root,
11877
11991
  preset: targets.preset
11878
11992
  })
11879
11993
  };
11880
- if (_optionalChain([config, 'access', _251 => _251.docs, 'optionalAccess', _252 => _252.enabled])) await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
11994
+ if (_optionalChain([config, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.enabled])) await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
11881
11995
  pluginManager.updateContext({ config });
11882
11996
  const { root, preset, srcDir, distDir, deployOutputDir } = targets;
11883
11997
  _chunkVQJYGZNXcjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
@@ -11891,8 +12005,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
11891
12005
  });
11892
12006
  _chunkVQJYGZNXcjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
11893
12007
  const productionViteResult = productionViteResultPromise ? (await productionViteResultPromise)[0] : void 0;
11894
- if (_optionalChain([productionViteResult, 'optionalAccess', _253 => _253.status]) === "rejected") throw productionViteResult.reason;
11895
- const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _254 => _254.value]);
12008
+ if (_optionalChain([productionViteResult, 'optionalAccess', _277 => _277.status]) === "rejected") throw productionViteResult.reason;
12009
+ const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _278 => _278.value]);
11896
12010
  const createViteServer = productionVite ? productionVite.createServer : (await import("vite")).createServer;
11897
12011
  projectModuleServer = await createProjectModuleServer(
11898
12012
  createViteServer,
@@ -11900,18 +12014,18 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
11900
12014
  root,
11901
12015
  rendererBuild.signal
11902
12016
  );
11903
- const farmApp = _chunkF42U3R4Fcjs.createFarmApp.call(void 0, config, projectModuleServer);
12017
+ const farmApp = _chunkX2M4XN4Vcjs.createFarmApp.call(void 0, config, projectModuleServer);
11904
12018
  await farmApp.initialize();
11905
12019
  const routeManager = farmApp.getRouteManager();
11906
12020
  const serverRenderer = farmApp.getServerRenderer();
11907
- const typeArtifacts = _chunkY7TLL65Bcjs.generateFarmTypeArtifacts.call(void 0, {
12021
+ const typeArtifacts = _chunkUQHIWZZ6cjs.generateFarmTypeArtifacts.call(void 0, {
11908
12022
  root,
11909
12023
  srcDir,
11910
12024
  layers: config.layers,
11911
12025
  plugins: config.plugins,
11912
12026
  extraRoutes: [
11913
- ..._optionalChain([config, 'access', _255 => _255.openapi, 'optionalAccess', _256 => _256.enabled]) && config.openapi.route ? [config.openapi.route] : [],
11914
- ..._chunkIOUOGRDXcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
12027
+ ..._optionalChain([config, 'access', _279 => _279.openapi, 'optionalAccess', _280 => _280.enabled]) && config.openapi.route ? [config.openapi.route] : [],
12028
+ ..._chunk5N7QAGEAcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
11915
12029
  ],
11916
12030
  suppressLintOnLink: config.suppressLintOnLink,
11917
12031
  componentExtensions: config.renderer.componentExtensions,
@@ -11995,7 +12109,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
11995
12109
  throw error;
11996
12110
  } finally {
11997
12111
  try {
11998
- await _optionalChain([projectModuleServer, 'optionalAccess', _257 => _257.close, 'call', _258 => _258()]);
12112
+ await _optionalChain([projectModuleServer, 'optionalAccess', _281 => _281.close, 'call', _282 => _282()]);
11999
12113
  } finally {
12000
12114
  rendererBuild.abort();
12001
12115
  }
@@ -12006,7 +12120,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
12006
12120
  ssr: true,
12007
12121
  buildLifetime
12008
12122
  });
12009
- const viteConfig = _chunkF42U3R4Fcjs.mergeFarmViteConfig.call(void 0,
12123
+ const viteConfig = _chunkX2M4XN4Vcjs.mergeFarmViteConfig.call(void 0,
12010
12124
  {
12011
12125
  root,
12012
12126
  appType: "custom",
@@ -12018,19 +12132,19 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
12018
12132
  },
12019
12133
  plugins: [
12020
12134
  ...rendererVitePlugins,
12021
- _chunkF42U3R4Fcjs.farmFontImportsPlugin.call(void 0, {
12135
+ _chunkX2M4XN4Vcjs.farmFontImportsPlugin.call(void 0, {
12022
12136
  root,
12023
12137
  basePath: config.basePath,
12024
12138
  publicDir: config.publicDir
12025
12139
  }),
12026
- _chunkJ37KTQIAcjs.farmEnvironmentFunctionsPlugin.call(void 0, )
12140
+ _chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, )
12027
12141
  ],
12028
12142
  server: {
12029
12143
  middlewareMode: true,
12030
12144
  hmr: false
12031
12145
  },
12032
12146
  resolve: {
12033
- alias: _chunkF42U3R4Fcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
12147
+ alias: _chunkX2M4XN4Vcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
12034
12148
  dedupe: [...config.renderer.dedupe || []]
12035
12149
  },
12036
12150
  optimizeDeps: {
@@ -12063,10 +12177,10 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
12063
12177
  noDiscovery: true
12064
12178
  },
12065
12179
  // An app or plugin that brings its own SSR environment keeps it.
12066
- environments: _optionalChain([viteConfig, 'access', _259 => _259.environments, 'optionalAccess', _260 => _260.ssr, 'optionalAccess', _261 => _261.dev, 'optionalAccess', _262 => _262.createEnvironment]) ? viteConfig.environments : {
12180
+ environments: _optionalChain([viteConfig, 'access', _283 => _283.environments, 'optionalAccess', _284 => _284.ssr, 'optionalAccess', _285 => _285.dev, 'optionalAccess', _286 => _286.createEnvironment]) ? viteConfig.environments : {
12067
12181
  ...viteConfig.environments,
12068
12182
  ssr: {
12069
- ..._optionalChain([viteConfig, 'access', _263 => _263.environments, 'optionalAccess', _264 => _264.ssr]),
12183
+ ..._optionalChain([viteConfig, 'access', _287 => _287.environments, 'optionalAccess', _288 => _288.ssr]),
12070
12184
  ...await createFarmProjectModuleSsrEnvironment()
12071
12185
  }
12072
12186
  }
@@ -12094,7 +12208,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
12094
12208
  farmI18nClientBridgePlugin(),
12095
12209
  farmServerOnlyEntriesPlugin(),
12096
12210
  farmPlugin(config, pluginManager),
12097
- _chunkJ37KTQIAcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
12211
+ _chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
12098
12212
  ],
12099
12213
  mode: "production"
12100
12214
  });
@@ -12122,12 +12236,12 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
12122
12236
  define: {
12123
12237
  __FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
12124
12238
  __FARM_ENV__: JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env)),
12125
- __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _265 => _265.env, 'optionalAccess', _266 => _266.public]) || {})
12239
+ __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _289 => _289.env, 'optionalAccess', _290 => _290.public]) || {})
12126
12240
  },
12127
12241
  plugins: [
12128
12242
  farmI18nClientBridgePlugin(),
12129
12243
  farmPlugin(config, pluginManager),
12130
- _chunkJ37KTQIAcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
12244
+ _chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
12131
12245
  ],
12132
12246
  mode: "production"
12133
12247
  });
@@ -12155,7 +12269,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
12155
12269
  if (pluginManager) {
12156
12270
  nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
12157
12271
  }
12158
- const outputDir = _chunkO3MMJPC2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
12272
+ const outputDir = _chunkVITZRYW3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
12159
12273
  const serverOutputDir = _path2.default.join(outputDir, "server");
12160
12274
  const publicOutputDir = _path2.default.join(outputDir, "public");
12161
12275
  const { mkdir, cp } = await import("fs/promises");
@@ -12226,7 +12340,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
12226
12340
  root,
12227
12341
  preset,
12228
12342
  distDir,
12229
- outputDir: _chunkO3MMJPC2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
12343
+ outputDir: _chunkVITZRYW3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
12230
12344
  });
12231
12345
  }
12232
12346
  }