@farm.js/core 0.2.0-beta.4 → 0.2.0

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 (218) hide show
  1. package/README.md +1 -3
  2. package/dist/{agent-mcp.d-BdFnjlAT.d.mts → agent-mcp.d-DhZf5-v0.d.mts} +1 -1
  3. package/dist/{agent-mcp.d-CAwDC9y4.d.ts → agent-mcp.d-xPua9Zdz.d.ts} +1 -1
  4. package/dist/agent-runtime.d.mts +1 -1
  5. package/dist/agent-runtime.d.ts +1 -1
  6. package/dist/{analyzer-K3S4YRAH.mjs → analyzer-LQ4LVDCW.mjs} +2 -2
  7. package/dist/analyzer-ZFC2L6NZ.cjs +17 -0
  8. package/dist/api/node.d.mts +3 -3
  9. package/dist/api/node.d.ts +3 -3
  10. package/dist/api/route-manager.cjs +3 -3
  11. package/dist/api/route-manager.d.mts +3 -3
  12. package/dist/api/route-manager.d.ts +3 -3
  13. package/dist/api/route-manager.mjs +2 -2
  14. package/dist/api/runtime.d.mts +2 -2
  15. package/dist/api/runtime.d.ts +2 -2
  16. package/dist/api.cjs +4 -4
  17. package/dist/api.d.mts +4 -4
  18. package/dist/api.d.ts +4 -4
  19. package/dist/api.mjs +3 -3
  20. package/dist/{app-manifest.d-COs1wBGz.d.mts → app-manifest.d-Bq9VWtpk.d.mts} +1 -1
  21. package/dist/{app-manifest.d-Dczk-fwt.d.ts → app-manifest.d-D6l1Wkn6.d.ts} +1 -1
  22. package/dist/app-markdown.d.mts +2 -2
  23. package/dist/app-markdown.d.ts +2 -2
  24. package/dist/{app.d-LepnxO-5.d.mts → app.d-Bn1bqBkf.d.mts} +4 -4
  25. package/dist/{app.d-DREl_yXh.d.ts → app.d-gnTrW72o.d.ts} +4 -4
  26. package/dist/{chunk-X2SMVPLH.mjs → chunk-2FBFJO2Z.mjs} +8 -5
  27. package/dist/{chunk-VQYGXWCS.cjs → chunk-2LHO4HTP.cjs} +2 -2
  28. package/dist/{chunk-QBCR2EHA.cjs → chunk-4ER5KYSC.cjs} +3 -3
  29. package/dist/{chunk-WLOIUPV2.mjs → chunk-54INSSWI.mjs} +25 -22
  30. package/dist/{chunk-Z3RM3VA2.mjs → chunk-5VXVRMXK.mjs} +11 -1
  31. package/dist/chunk-CYUTK4JP.cjs +52 -0
  32. package/dist/{chunk-AGEBFYHF.mjs → chunk-D7KBMJ7L.mjs} +1 -1
  33. package/dist/{chunk-FYVSAWJP.cjs → chunk-DNERKYN4.cjs} +11 -11
  34. package/dist/{chunk-2PSN2PUJ.cjs → chunk-EWPH5IOC.cjs} +19 -16
  35. package/dist/{chunk-5UMPMVNF.mjs → chunk-FFROR7QD.mjs} +1 -1
  36. package/dist/{chunk-HFOME6I2.mjs → chunk-GAD63TH7.mjs} +5 -5
  37. package/dist/{chunk-DFLCEMQ3.mjs → chunk-GK2RCRT2.mjs} +1 -1
  38. package/dist/{chunk-IU4YTFFQ.cjs → chunk-GUYGMTWA.cjs} +12 -9
  39. package/dist/{chunk-HV6CYSMF.mjs → chunk-HHZURH4U.mjs} +1 -17
  40. package/dist/{chunk-II4ENBE4.mjs → chunk-HYYOVRED.mjs} +1 -1
  41. package/dist/{chunk-VMIR4SUL.cjs → chunk-J6JAUJPC.cjs} +373 -370
  42. package/dist/{chunk-AGT633OM.cjs → chunk-JKNQMGZE.cjs} +11 -11
  43. package/dist/{chunk-ANKMAGFJ.mjs → chunk-KJW6KEOZ.mjs} +1 -1
  44. package/dist/{chunk-LOQVWATF.mjs → chunk-KKXGBQ2K.mjs} +2 -2
  45. package/dist/{chunk-TQCDN4DV.mjs → chunk-KQXYBJES.mjs} +14 -11
  46. package/dist/{chunk-HP7QYVST.cjs → chunk-LEZJZX4C.cjs} +1 -18
  47. package/dist/{chunk-E5AC7E25.cjs → chunk-LGL5QKUJ.cjs} +2 -2
  48. package/dist/{chunk-LWQ6IESX.mjs → chunk-MEIZIRMK.mjs} +1 -1
  49. package/dist/{chunk-T4NOMZTS.mjs → chunk-MLMDOIBY.mjs} +3 -3
  50. package/dist/{chunk-XJEOHDPN.cjs → chunk-MNBFSAWF.cjs} +1 -1
  51. package/dist/{chunk-NNHIV3O2.cjs → chunk-MUQP2APN.cjs} +2 -2
  52. package/dist/{chunk-VVIO7QGN.mjs → chunk-MX4G24YS.mjs} +29 -26
  53. package/dist/{chunk-C4DZAEVT.cjs → chunk-MZG5M4JS.cjs} +4 -4
  54. package/dist/{chunk-MBDDLYT5.cjs → chunk-O47IT4CS.cjs} +4 -4
  55. package/dist/{chunk-F5T55PYX.cjs → chunk-OAAVIFOJ.cjs} +26 -21
  56. package/dist/{chunk-GTHBWZUK.mjs → chunk-OZAVCLXY.mjs} +1 -1
  57. package/dist/{chunk-2UV765GT.cjs → chunk-PATIHHC7.cjs} +2 -2
  58. package/dist/{chunk-KBURN62Z.cjs → chunk-PFVNPOKN.cjs} +11 -1
  59. package/dist/chunk-PTG5BEMG.mjs +47 -0
  60. package/dist/{chunk-EBVKVDQA.mjs → chunk-PZ5ZJAAO.mjs} +1 -1
  61. package/dist/{chunk-D5OY5OKA.mjs → chunk-RDT2LJES.mjs} +23 -17
  62. package/dist/{chunk-APKULXZV.cjs → chunk-RMLXUVR5.cjs} +2 -2
  63. package/dist/{chunk-VGX75645.mjs → chunk-RP55BUJM.mjs} +8 -5
  64. package/dist/{chunk-P67RLOMO.mjs → chunk-SIHHYNX4.mjs} +1 -1
  65. package/dist/{chunk-KM7ZRKCH.cjs → chunk-T4VF6BYV.cjs} +10 -10
  66. package/dist/{chunk-IASZIYNM.cjs → chunk-VFZQXADS.cjs} +299 -296
  67. package/dist/{chunk-UBH2OARS.cjs → chunk-VWPGK6UV.cjs} +280 -274
  68. package/dist/{chunk-V5F6HN7E.mjs → chunk-WOPQQCP3.mjs} +1 -1
  69. package/dist/{chunk-DVXT7RLV.cjs → chunk-WXPY5FRF.cjs} +6 -6
  70. package/dist/{chunk-XPVS4HKU.cjs → chunk-Z7YIQ7AJ.cjs} +1 -1
  71. package/dist/{chunk-PSALMEHJ.cjs → chunk-ZCT6B5PQ.cjs} +23 -20
  72. package/dist/{chunk-2ORWY3SE.mjs → chunk-ZF7N222A.mjs} +2 -2
  73. package/dist/{chunk-MRDI6MTL.mjs → chunk-ZRTBDHO2.mjs} +15 -10
  74. package/dist/{chunk-5BZ7PR3T.cjs → chunk-ZTNU4XCC.cjs} +3 -3
  75. package/dist/{chunk-VS4ABIJJ.mjs → chunk-ZVEKOMZS.mjs} +1 -1
  76. package/dist/{cli-runtime.d-BGaFPum1.d.mts → cli-runtime.d-LwIb0swO.d.mts} +5 -5
  77. package/dist/{cli-runtime.d-Bvfxt4uo.d.ts → cli-runtime.d-Vvxf-Z8a.d.ts} +5 -5
  78. package/dist/{client-component.d-BA6kXI5L.d.mts → client-component.d-34DDMZcl.d.mts} +1 -1
  79. package/dist/{client-component.d-LSEmRhuI.d.ts → client-component.d-DT5OKBZu.d.ts} +1 -1
  80. package/dist/{client-plugins.d-CVUMc2ai.d.mts → client-plugins.d-D7k9t9Ge.d.mts} +17 -12
  81. package/dist/{client-plugins.d-CQ6AGHP0.d.ts → client-plugins.d-D9CnUvZ5.d.ts} +17 -12
  82. package/dist/client-plugins.d.mts +1 -1
  83. package/dist/client-plugins.d.ts +1 -1
  84. package/dist/client.d.mts +7 -7
  85. package/dist/client.d.ts +7 -7
  86. package/dist/config.d.mts +1 -1
  87. package/dist/config.d.ts +1 -1
  88. package/dist/desktop.d.mts +2 -2
  89. package/dist/desktop.d.ts +2 -2
  90. package/dist/{devtools-OBQY3XOY.cjs → devtools-IUU4SWQL.cjs} +12 -9
  91. package/dist/{devtools-RYTO2V7G.mjs → devtools-R77KAJA4.mjs} +8 -5
  92. package/dist/docs.cjs +7 -6
  93. package/dist/docs.d.mts +3 -3
  94. package/dist/docs.d.ts +3 -3
  95. package/dist/docs.mjs +6 -5
  96. package/dist/environment/vite.cjs +6 -5
  97. package/dist/environment/vite.d.mts +1 -0
  98. package/dist/environment/vite.d.ts +1 -0
  99. package/dist/environment/vite.mjs +5 -4
  100. package/dist/{handler.d-nkrNn_0M.d.ts → handler.d-DbZvbwNi.d.ts} +1 -1
  101. package/dist/{handler.d-DLKZDAYR.d.mts → handler.d-fxTjv3Nn.d.mts} +1 -1
  102. package/dist/{headers.d-C3k520Fc.d.mts → headers.d-OBHpGTF_.d.mts} +1 -1
  103. package/dist/{headers.d-DVBrYnqP.d.ts → headers.d-oeWybIk8.d.ts} +1 -1
  104. package/dist/index.cjs +28 -27
  105. package/dist/{index.d-e5WhoB07.d.ts → index.d-BM-dKdzH.d.ts} +1 -1
  106. package/dist/{index.d-5PDB032w.d.mts → index.d-CRrPQwlO.d.mts} +1 -1
  107. package/dist/index.d.mts +22 -22
  108. package/dist/index.d.ts +22 -22
  109. package/dist/index.mjs +23 -22
  110. package/dist/integrations/orm.d.mts +1 -1
  111. package/dist/integrations/orm.d.ts +1 -1
  112. package/dist/integrations.d.mts +1 -1
  113. package/dist/integrations.d.ts +1 -1
  114. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  115. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  116. package/dist/internal/build-runtime.cjs +23 -22
  117. package/dist/internal/build-runtime.d.mts +5 -5
  118. package/dist/internal/build-runtime.d.ts +5 -5
  119. package/dist/internal/build-runtime.mjs +22 -21
  120. package/dist/internal/cli-runtime.cjs +11 -10
  121. package/dist/internal/cli-runtime.d.mts +7 -7
  122. package/dist/internal/cli-runtime.d.ts +7 -7
  123. package/dist/internal/cli-runtime.mjs +10 -9
  124. package/dist/internal/client-error-overlay.cjs +4 -4
  125. package/dist/internal/client-error-overlay.mjs +1 -1
  126. package/dist/internal/client-runtime.d.mts +5 -5
  127. package/dist/internal/client-runtime.d.ts +5 -5
  128. package/dist/internal/compression-runtime.d.mts +1 -1
  129. package/dist/internal/compression-runtime.d.ts +1 -1
  130. package/dist/internal/config-runtime.cjs +7 -6
  131. package/dist/internal/config-runtime.d.mts +3 -3
  132. package/dist/internal/config-runtime.d.ts +3 -3
  133. package/dist/internal/config-runtime.mjs +6 -5
  134. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  135. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  136. package/dist/internal/native-server-fns.cjs +4 -4
  137. package/dist/internal/native-server-fns.mjs +3 -3
  138. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  139. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  140. package/dist/internal/production-runtime.cjs +4 -4
  141. package/dist/internal/production-runtime.d.mts +10 -10
  142. package/dist/internal/production-runtime.d.ts +10 -10
  143. package/dist/internal/production-runtime.mjs +3 -3
  144. package/dist/internal/spa-router.d.mts +3 -3
  145. package/dist/internal/spa-router.d.ts +3 -3
  146. package/dist/internal/start-manifest.d.mts +1 -1
  147. package/dist/internal/start-manifest.d.ts +1 -1
  148. package/dist/layers-6R55QDT5.cjs +26 -0
  149. package/dist/{layers-IMRXNZRB.mjs → layers-O6GUR6LT.mjs} +6 -1
  150. package/dist/{manager-GZUTAN5Q.mjs → manager-EFPBRS3U.mjs} +3 -3
  151. package/dist/{manager-3DFQDKJ6.cjs → manager-STAB5TVZ.cjs} +4 -4
  152. package/dist/markdown.d.mts +1 -1
  153. package/dist/markdown.d.ts +1 -1
  154. package/dist/middleware.d.mts +1 -1
  155. package/dist/middleware.d.ts +1 -1
  156. package/dist/{mount.d-COIrFH0i.d.mts → mount.d-B7RiwjiO.d.mts} +1 -1
  157. package/dist/{mount.d-Cbz8vsSZ.d.ts → mount.d-TnD-Mebk.d.ts} +1 -1
  158. package/dist/{navigation-delegate.d-yulG9Dp5.d.mts → navigation-delegate.d-Boz2511c.d.mts} +1 -1
  159. package/dist/{navigation-delegate.d-dlnYTX-Y.d.ts → navigation-delegate.d-VBCF0EeN.d.ts} +1 -1
  160. package/dist/navigation.d.mts +4 -4
  161. package/dist/navigation.d.ts +4 -4
  162. package/dist/plugin.cjs +18 -17
  163. package/dist/plugin.d.mts +5 -5
  164. package/dist/plugin.d.ts +5 -5
  165. package/dist/plugin.mjs +17 -16
  166. package/dist/{render-plan.d-Cz7bQmcf.d.ts → render-plan.d-BrumV_ZE.d.ts} +1 -1
  167. package/dist/{render-plan.d-BW56oxMP.d.mts → render-plan.d-BwnmyfNk.d.mts} +1 -1
  168. package/dist/renderer-client.d.mts +5 -5
  169. package/dist/renderer-client.d.ts +5 -5
  170. package/dist/renderer.cjs +4 -3
  171. package/dist/renderer.d.mts +1 -1
  172. package/dist/renderer.d.ts +1 -1
  173. package/dist/renderer.mjs +3 -2
  174. package/dist/{request.d-BwgX-7Wi.d.mts → request.d-Dd5nRTO5.d.mts} +1 -1
  175. package/dist/{request.d-BaFROByP.d.ts → request.d-NUi01-5e.d.ts} +1 -1
  176. package/dist/request.d.mts +2 -2
  177. package/dist/request.d.ts +2 -2
  178. package/dist/{route-rendering.d-BzeFPYGc.d.mts → route-rendering.d-BK0Pf7_k.d.mts} +1 -1
  179. package/dist/{route-rendering.d-D4kUuncg.d.ts → route-rendering.d-CJR5BPXV.d.ts} +1 -1
  180. package/dist/{router.d-B9qJdgjt.d.ts → router.d-C-JSFCPU.d.ts} +1 -1
  181. package/dist/{router.d-D-p8WElf.d.mts → router.d-CNUS3x1j.d.mts} +1 -1
  182. package/dist/routes.d.mts +1 -1
  183. package/dist/routes.d.ts +1 -1
  184. package/dist/{rsc-pipeline-Y6D6KBES.mjs → rsc-pipeline-DHISDFT7.mjs} +7 -6
  185. package/dist/{rsc-pipeline-YHVEHWTU.cjs → rsc-pipeline-UBWVU3NF.cjs} +8 -7
  186. package/dist/{runtime-62ZIEV6U.mjs → runtime-VUKMY44G.mjs} +11 -8
  187. package/dist/{runtime-LKEMFXHW.cjs → runtime-XKRQW3YT.cjs} +15 -12
  188. package/dist/{runtime.d-Du64AX3R.d.ts → runtime.d-B2T4bM5_.d.ts} +1 -1
  189. package/dist/{runtime.d-BUtDIrRJ.d.mts → runtime.d-CsOpO6yQ.d.mts} +1 -1
  190. package/dist/{server-components-status.d-CvFhb6-t.d.ts → server-components-status.d-Cc5rir0l.d.mts} +2 -2
  191. package/dist/{server-components-status.d-B0YP-m9A.d.mts → server-components-status.d-DOYt4E_Q.d.ts} +2 -2
  192. package/dist/server-plugins.d.mts +3 -3
  193. package/dist/server-plugins.d.ts +3 -3
  194. package/dist/server.cjs +56 -53
  195. package/dist/server.d.mts +12 -12
  196. package/dist/server.d.ts +12 -12
  197. package/dist/server.mjs +23 -20
  198. package/dist/{spa-router.d-D4ye2WFk.d.ts → spa-router.d-C7FcpLxU.d.ts} +2 -2
  199. package/dist/{spa-router.d-CkR14oGH.d.mts → spa-router.d-Cq5UFJvq.d.mts} +2 -2
  200. package/dist/{ssg.d-DFs97VTY.d.mts → ssg.d-BzNZemk7.d.mts} +2 -2
  201. package/dist/{ssg.d-BCJB_f7B.d.ts → ssg.d-DUhacIxj.d.ts} +2 -2
  202. package/dist/{store-core.d-0W2YScl8.d.ts → store-core.d-BX3yXrxA.d.ts} +2 -2
  203. package/dist/{store-core.d-Vk5UDKeC.d.mts → store-core.d-DbUAtSBK.d.mts} +2 -2
  204. package/dist/testing.cjs +2 -2
  205. package/dist/testing.d.mts +1 -1
  206. package/dist/testing.d.ts +1 -1
  207. package/dist/testing.mjs +2 -2
  208. package/dist/{utils.d-Ba3N28fk.d.ts → utils.d-BhJJEXzo.d.ts} +1 -1
  209. package/dist/{utils.d-Cloiko8d.d.mts → utils.d-NOMkLFpC.d.mts} +1 -1
  210. package/dist/version.cjs +2 -2
  211. package/dist/version.mjs +1 -1
  212. package/dist/vite.cjs +18 -17
  213. package/dist/vite.d.mts +6 -6
  214. package/dist/vite.d.ts +6 -6
  215. package/dist/vite.mjs +17 -16
  216. package/package.json +1 -1
  217. package/dist/analyzer-3AMJK27J.cjs +0 -17
  218. package/dist/layers-GP57TBE2.cjs +0 -21
@@ -44,7 +44,7 @@ import {
44
44
  resolveFarmIslxActionsMode,
45
45
  resolveFarmRouteRootStrategy,
46
46
  toBakedMarkdownSourcePath
47
- } from "./chunk-D5OY5OKA.mjs";
47
+ } from "./chunk-RDT2LJES.mjs";
48
48
  import {
49
49
  generateFarmClientPluginEntryCode,
50
50
  hasFarmServerRuntimePlugins,
@@ -59,10 +59,10 @@ import {
59
59
  import {
60
60
  generateFarmTypeArtifacts,
61
61
  resolveRouteRenderingConfig
62
- } from "./chunk-T4NOMZTS.mjs";
62
+ } from "./chunk-MLMDOIBY.mjs";
63
63
  import {
64
64
  _setFarmInfraAnalyticsWebMCPRoute
65
- } from "./chunk-AGEBFYHF.mjs";
65
+ } from "./chunk-D7KBMJ7L.mjs";
66
66
  import {
67
67
  createFarmRouteRenderPlan,
68
68
  farmPathGuardCoversEndpoint,
@@ -89,13 +89,13 @@ import {
89
89
  resolveFarmMCPRouteLabel,
90
90
  resolveFarmMarkdownRouteLabel,
91
91
  setFarmRouteLabel
92
- } from "./chunk-2ORWY3SE.mjs";
92
+ } from "./chunk-ZF7N222A.mjs";
93
93
  import {
94
94
  FARM_DEFAULT_MCP_PATH
95
95
  } from "./chunk-WABOJXAA.mjs";
96
96
  import {
97
97
  isFarmPreviewDeploymentEnvironment
98
- } from "./chunk-DFLCEMQ3.mjs";
98
+ } from "./chunk-GK2RCRT2.mjs";
99
99
  import {
100
100
  createFarmServerFnBoundaryModule,
101
101
  isFarmServerFnBoundaryId,
@@ -148,7 +148,7 @@ import {
148
148
  usePackageScanCacheFile,
149
149
  withFarmSourceSnapshotOf,
150
150
  wrapFarmIslandContainers
151
- } from "./chunk-VGX75645.mjs";
151
+ } from "./chunk-RP55BUJM.mjs";
152
152
  import {
153
153
  generateFarmDocsAdapterClientRuntime,
154
154
  getFarmDocsAdapterConfigModule
@@ -172,7 +172,7 @@ import {
172
172
  } from "./chunk-CU5SYTJG.mjs";
173
173
  import {
174
174
  usesFarmRendererIslands
175
- } from "./chunk-X2SMVPLH.mjs";
175
+ } from "./chunk-2FBFJO2Z.mjs";
176
176
  import {
177
177
  FARM_PREVIEW_ROBOTS_TAG,
178
178
  resolveFarmAgentCrawlers,
@@ -185,7 +185,7 @@ import {
185
185
  getFarmAppDirectories,
186
186
  getFarmLayerAliases,
187
187
  getFarmSourceRoots
188
- } from "./chunk-Z3RM3VA2.mjs";
188
+ } from "./chunk-5VXVRMXK.mjs";
189
189
  import {
190
190
  REACT_RENDERER,
191
191
  getFarmRendererCapabilities,
@@ -194,9 +194,12 @@ import {
194
194
  loadFarmRendererVitePlugins,
195
195
  resolveFarmComponentExtensions,
196
196
  resolveFarmRenderer,
197
- resolveFarmRendererAppSetup,
197
+ resolveFarmRendererAppSetup
198
+ } from "./chunk-HHZURH4U.mjs";
199
+ import {
200
+ readFarmServerComponentsConfig,
198
201
  resolveFarmServerComponentsMode
199
- } from "./chunk-HV6CYSMF.mjs";
202
+ } from "./chunk-PTG5BEMG.mjs";
200
203
  import {
201
204
  FARM_PREVIEW_REQUEST_HEADER
202
205
  } from "./chunk-7VJXYB6S.mjs";
@@ -250,11 +253,11 @@ import {
250
253
  } from "./chunk-IYEY3JWJ.mjs";
251
254
  import {
252
255
  APIRouteManager
253
- } from "./chunk-V5F6HN7E.mjs";
256
+ } from "./chunk-WOPQQCP3.mjs";
254
257
  import {
255
258
  hasPolyroutePlugin,
256
259
  isFarmAPIRouteFileName
257
- } from "./chunk-GTHBWZUK.mjs";
260
+ } from "./chunk-OZAVCLXY.mjs";
258
261
  import {
259
262
  getFarmI18nClientSnapshot
260
263
  } from "./chunk-O7JEFGUV.mjs";
@@ -317,7 +320,7 @@ import {
317
320
  } from "./chunk-EILUVBKS.mjs";
318
321
  import {
319
322
  FARM_VERSION
320
- } from "./chunk-LWQ6IESX.mjs";
323
+ } from "./chunk-MEIZIRMK.mjs";
321
324
  import {
322
325
  DEFAULT_FARM_API_BASE_PATH
323
326
  } from "./chunk-W6QLRQ3V.mjs";
@@ -1293,13 +1296,13 @@ function loadFarmDocsSearchDevRuntime() {
1293
1296
  return import("./search-client-HN3ZY6AK.mjs");
1294
1297
  }
1295
1298
  function loadFarmOpenAPIDevRuntime() {
1296
- return import("./manager-GZUTAN5Q.mjs");
1299
+ return import("./manager-EFPBRS3U.mjs");
1297
1300
  }
1298
1301
  function loadFarmWorkflowsDevRuntime() {
1299
1302
  return import("./workflows.mjs");
1300
1303
  }
1301
1304
  function loadFarmDevtoolsSnapshotRuntime() {
1302
- return import("./devtools-RYTO2V7G.mjs");
1305
+ return import("./devtools-R77KAJA4.mjs");
1303
1306
  }
1304
1307
  function loadFarmDevtoolsUIRuntime() {
1305
1308
  return import("./devtools-ui-UYEVDADD.mjs");
@@ -1397,7 +1400,7 @@ function farmIslandContainersPlugin(config) {
1397
1400
  code: FARM_ISLAND_CONTAINER_TAG
1398
1401
  },
1399
1402
  handler(code, id) {
1400
- if (resolveFarmServerComponentsMode(config.experimental?.serverComponents) !== "islands") {
1403
+ if (resolveFarmServerComponentsMode(readFarmServerComponentsConfig(config)) !== "islands") {
1401
1404
  return null;
1402
1405
  }
1403
1406
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
@@ -4449,7 +4452,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4449
4452
  )
4450
4453
  ];
4451
4454
  const hydrationIslandStrategy = resolveFarmServerComponentsMode(
4452
- (farmApp?.getConfig() ?? options).experimental?.serverComponents
4455
+ readFarmServerComponentsConfig(farmApp?.getConfig() ?? options)
4453
4456
  ) === "islands" ? resolveFarmRouteRootStrategy(
4454
4457
  route,
4455
4458
  { shouldHydrate, islandStrategy: moduleMetadata.islandStrategy ?? null },
@@ -4977,7 +4980,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4977
4980
  const isolatedHydrationMode = resolveFarmIsolatedClientHydrationMode(
4978
4981
  resolvedConfig?.experimental?.isolatedClientHydration,
4979
4982
  {
4980
- serverComponents: resolveFarmServerComponentsMode(resolvedConfig?.experimental?.serverComponents) === "rsc",
4983
+ serverComponents: resolveFarmServerComponentsMode(readFarmServerComponentsConfig(resolvedConfig)) === "rsc",
4981
4984
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !providerSupportsIslands(provider))
4982
4985
  }
4983
4986
  );
@@ -5003,7 +5006,7 @@ ${generatedDevIndicatorsClientRuntime}`,
5003
5006
  resolveFarmClientCacheAdapterEntry(root, resolvedConfig?.cache)
5004
5007
  ),
5005
5008
  adapterOwnsDocsRuntime ? getFarmDocsAdapterConfigModule(docs) : void 0,
5006
- resolveFarmServerComponentsMode(resolvedConfig?.experimental?.serverComponents) === "islands"
5009
+ resolveFarmServerComponentsMode(readFarmServerComponentsConfig(resolvedConfig)) === "islands"
5007
5010
  );
5008
5011
  }
5009
5012
  if (id === "/@farm/server") {
@@ -5048,7 +5051,7 @@ export { manifest };
5048
5051
  const runtimeModule = !isBuild && transformOptions?.ssr === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5049
5052
  const actionConfig = farmApp?.getConfig() ?? options;
5050
5053
  let rewrotePackageImports = false;
5051
- if (resolveFarmServerComponentsMode(actionConfig.experimental?.serverComponents) === "islands" && (!id.includes("/node_modules/") || transformOptions?.ssr === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !hasUseClientDirective(code)) {
5054
+ if (resolveFarmServerComponentsMode(readFarmServerComponentsConfig(actionConfig)) === "islands" && (!id.includes("/node_modules/") || transformOptions?.ssr === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !hasUseClientDirective(code)) {
5052
5055
  const file = id.split("?", 1)[0];
5053
5056
  const projectRoot = actionConfig.root || server?.config.root || process.cwd();
5054
5057
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
@@ -5207,7 +5210,7 @@ export { manifest };
5207
5210
  if (isReactRenderer(resolveFarmRenderer(currentConfig.renderer)) && selectedForIsolatedHydration && (isIsolatableClientBoundarySource(clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5208
5211
  cleanId.replace(/\\/g, "/").includes(FARM_CLIENT_REFERENCE_DIRECTORY))) {
5209
5212
  isolatedModuleReference = toViteModuleId(cleanId, root);
5210
- const islandsMode = resolveFarmServerComponentsMode(currentConfig.experimental?.serverComponents) === "islands";
5213
+ const islandsMode = resolveFarmServerComponentsMode(readFarmServerComponentsConfig(currentConfig)) === "islands";
5211
5214
  const explicitStrategy = getIslandStrategyExport(clientBoundarySource);
5212
5215
  const inference = islandsMode && explicitStrategy === null ? inferFarmIslandStrategy(cleanId, root) : null;
5213
5216
  if (inference) {
@@ -8204,7 +8207,7 @@ async function defineConfig(config = {}) {
8204
8207
  const tailwindVitePlugin = await loadTailwindVitePlugin();
8205
8208
  const appRoot = path6.resolve(config.root || process.cwd());
8206
8209
  if (config.extends?.length) {
8207
- const { config: layeredConfig } = await import("./layers-IMRXNZRB.mjs").then(
8210
+ const { config: layeredConfig } = await import("./layers-O6GUR6LT.mjs").then(
8208
8211
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8209
8212
  root: appRoot,
8210
8213
  mode: process.env.NODE_ENV === "production" ? "production" : "development"
@@ -1,3 +1,6 @@
1
+ import {
2
+ normalizeFarmServerComponentsConfig
3
+ } from "./chunk-PTG5BEMG.mjs";
1
4
  import {
2
5
  bundleNodeModule,
3
6
  isDeclarationFile,
@@ -6,6 +9,9 @@ import {
6
9
  import {
7
10
  hasManagedMountSchema
8
11
  } from "./chunk-DS2KZ5BT.mjs";
12
+ import {
13
+ logger
14
+ } from "./chunk-U6GMCDRS.mjs";
9
15
 
10
16
  // src/layers.ts
11
17
  import { existsSync, readFileSync, realpathSync, statSync } from "fs";
@@ -104,7 +110,11 @@ async function resolveFarmLayers(projectConfig, options) {
104
110
  }
105
111
  let mergedConfig = {};
106
112
  for (const layer of loadedLayers) {
107
- mergedConfig = mergeFarmLayerConfig(mergedConfig, getLayerDefaults(layer.config));
113
+ const config = normalizeFarmServerComponentsConfig(
114
+ layer.config,
115
+ (message) => logger.warn(message)
116
+ );
117
+ mergedConfig = mergeFarmLayerConfig(mergedConfig, getLayerDefaults(config));
108
118
  }
109
119
  mergedConfig = mergeFarmLayerConfig(mergedConfig, projectConfig);
110
120
  const layers = loadedLayers.map(({ config: _config, ...layer }) => layer);
@@ -0,0 +1,52 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
4
+
5
+ // src/server-components-mode.ts
6
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
7
+ var CONFLICTING_SPELLINGS = "`serverComponents` and the deprecated `experimental.serverComponents` ask for different engines. Remove `experimental.serverComponents` and keep `serverComponents`.";
8
+ function readFarmServerComponentsConfig(config) {
9
+ const source = config;
10
+ const value = _optionalChain([source, 'optionalAccess', _ => _.serverComponents]);
11
+ const legacy = _optionalChain([source, 'optionalAccess', _2 => _2.experimental, 'optionalAccess', _3 => _3.serverComponents]);
12
+ if (value === void 0) return legacy;
13
+ if (legacy !== void 0 && resolveFarmServerComponentsMode(value) !== resolveFarmServerComponentsMode(legacy)) {
14
+ throw new TypeError(CONFLICTING_SPELLINGS);
15
+ }
16
+ return value;
17
+ }
18
+ var warnedDeprecatedSpelling = false;
19
+ function normalizeFarmServerComponentsConfig(config, warn) {
20
+ const source = config;
21
+ const legacy = _optionalChain([source, 'access', _4 => _4.experimental, 'optionalAccess', _5 => _5.serverComponents]);
22
+ if (legacy === void 0) return config;
23
+ resolveFarmServerComponentsMode(legacy);
24
+ const value = readFarmServerComponentsConfig(config);
25
+ if (source.serverComponents === void 0 && warn && !warnedDeprecatedSpelling) {
26
+ warnedDeprecatedSpelling = true;
27
+ warn(
28
+ "`experimental.serverComponents` is deprecated. Move the same value to the top-level `serverComponents` in farm.config."
29
+ );
30
+ }
31
+ const { serverComponents: _moved, ...experimental } = _nullishCoalesce(source.experimental, () => ( {}));
32
+ return { ...config, serverComponents: value, experimental };
33
+ }
34
+ function resolveFarmServerComponentsMode(value) {
35
+ if (value === void 0 || value === null || value === false) return void 0;
36
+ if (value === true) return "islands";
37
+ const mode = typeof value === "object" ? value.mode : void 0;
38
+ if (mode === "rsc" || mode === "islands") return mode;
39
+ throw new TypeError(
40
+ '`serverComponents` must be true, false, { mode: "rsc" } or { mode: "islands" }.'
41
+ );
42
+ }
43
+ function isExplicitFarmServerComponentsMode(value) {
44
+ return typeof value === "object" && value !== null;
45
+ }
46
+
47
+
48
+
49
+
50
+
51
+
52
+ exports.readFarmServerComponentsConfig = readFarmServerComponentsConfig; exports.normalizeFarmServerComponentsConfig = normalizeFarmServerComponentsConfig; exports.resolveFarmServerComponentsMode = resolveFarmServerComponentsMode; exports.isExplicitFarmServerComponentsMode = isExplicitFarmServerComponentsMode;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getFarmRouteLabel
3
- } from "./chunk-2ORWY3SE.mjs";
3
+ } from "./chunk-ZF7N222A.mjs";
4
4
  import {
5
5
  _classifyFarmMCPClient,
6
6
  _farmMCPClientSession,
@@ -9,14 +9,14 @@ var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
9
9
  var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
10
10
 
11
11
 
12
- var _chunk5BZ7PR3Tcjs = require('./chunk-5BZ7PR3T.cjs');
12
+ var _chunkZTNU4XCCcjs = require('./chunk-ZTNU4XCC.cjs');
13
13
 
14
14
 
15
15
  var _chunkPRKFECGTcjs = require('./chunk-PRKFECGT.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkXJEOHDPNcjs = require('./chunk-XJEOHDPN.cjs');
19
+ var _chunkMNBFSAWFcjs = require('./chunk-MNBFSAWF.cjs');
20
20
 
21
21
 
22
22
 
@@ -156,7 +156,7 @@ function farmApiPlugin(options = {}) {
156
156
  const existing = apiRoutesCache.get(routePath);
157
157
  const existingFile = _optionalChain([endpointSources, 'access', _4 => _4.get, 'call', _5 => _5(routePath), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(normalizedMethod)]);
158
158
  if (existingFile) {
159
- throw new (0, _chunk5BZ7PR3Tcjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
159
+ throw new (0, _chunkZTNU4XCCcjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
160
160
  }
161
161
  if (existing) {
162
162
  if (!existing.methods.includes(normalizedMethod)) {
@@ -284,7 +284,7 @@ function farmApiPlugin(options = {}) {
284
284
  name: "@farm.js/core:api",
285
285
  enforce: "pre",
286
286
  configureServer(server) {
287
- const polyroute = _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
287
+ const polyroute = _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
288
288
  projectRoot = server.config.root;
289
289
  devServer = server;
290
290
  const discoverFileRoutes = async (apiDir) => {
@@ -302,7 +302,7 @@ function farmApiPlugin(options = {}) {
302
302
  const fullPath = path.join(dir, entry.name);
303
303
  if (entry.isDirectory()) {
304
304
  files.push(...findRouteFiles(fullPath));
305
- } else if (_chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0, entry.name, polyroute)) {
305
+ } else if (_chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0, entry.name, polyroute)) {
306
306
  files.push(fullPath);
307
307
  }
308
308
  }
@@ -332,7 +332,7 @@ function farmApiPlugin(options = {}) {
332
332
  log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
333
333
  }
334
334
  } catch (e) {
335
- if (e instanceof _chunk5BZ7PR3Tcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
335
+ if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
336
336
  log(`API route load failed at ${filePath}: ${e.message}`);
337
337
  }
338
338
  }
@@ -359,7 +359,7 @@ function farmApiPlugin(options = {}) {
359
359
  }
360
360
  }
361
361
  } catch (e) {
362
- if (e instanceof _chunk5BZ7PR3Tcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
362
+ if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
363
363
  log(`Root routes.ts load failed: ${e.message}`);
364
364
  }
365
365
  break;
@@ -390,7 +390,7 @@ function farmApiPlugin(options = {}) {
390
390
  }
391
391
  }
392
392
  } catch (e) {
393
- if (e instanceof _chunk5BZ7PR3Tcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
393
+ if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
394
394
  log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
395
395
  }
396
396
  }
@@ -615,12 +615,12 @@ function farmApiPlugin(options = {}) {
615
615
  log(`API router recreated`);
616
616
  } catch (e) {
617
617
  restoreRouteState(previousState);
618
- if (e instanceof _chunk5BZ7PR3Tcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
618
+ if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
619
619
  log(`Root routes.ts HMR failed: ${e.message}`);
620
620
  }
621
621
  return [];
622
622
  }
623
- if (normalizedFile.includes("/api/") && _chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0, fileName, _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server.config.plugins))) {
623
+ if (normalizedFile.includes("/api/") && _chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0, fileName, _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server.config.plugins))) {
624
624
  const shortPath = normalizedFile.split("/api/")[1] || normalizedFile;
625
625
  log(`API route updated: ${shortPath}`);
626
626
  for (const mod of modules) {
@@ -653,7 +653,7 @@ function farmApiPlugin(options = {}) {
653
653
  log(`API router recreated`);
654
654
  } catch (e) {
655
655
  restoreRouteState(previousState);
656
- if (e instanceof _chunk5BZ7PR3Tcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
656
+ if (e instanceof _chunkZTNU4XCCcjs.APIRouteConflictError || e instanceof _chunkT4YCWRCJcjs.AmbiguousRouteError) throw e;
657
657
  log(`API route HMR failed: ${e.message}`);
658
658
  }
659
659
  return [];
@@ -1,7 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
4
+
5
+
6
+ var _chunkCYUTK4JPcjs = require('./chunk-CYUTK4JP.cjs');
5
7
 
6
8
 
7
9
  var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
@@ -38,7 +40,7 @@ var FARM_RSC_IGNORED_KEYS = [
38
40
  "observability"
39
41
  ];
40
42
  function farmConfigUsesServerComponents(config) {
41
- return _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'optionalAccess', _ => _.experimental, 'optionalAccess', _2 => _2.serverComponents])) === "rsc";
43
+ return _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "rsc";
42
44
  }
43
45
  function findFarmAppPackageDir(root, packageName) {
44
46
  for (let dir = _path2.default.resolve(root); ; dir = _path2.default.dirname(dir)) {
@@ -49,7 +51,7 @@ function findFarmAppPackageDir(root, packageName) {
49
51
  }
50
52
  function isSet(value, key) {
51
53
  if (key === "security") {
52
- const csp = _optionalChain([value, 'optionalAccess', _3 => _3.csp]);
54
+ const csp = _optionalChain([value, 'optionalAccess', _ => _.csp]);
53
55
  return csp !== void 0 && csp !== false && csp !== null;
54
56
  }
55
57
  if (value === void 0 || value === false || value === null) return false;
@@ -57,10 +59,10 @@ function isSet(value, key) {
57
59
  return typeof value !== "object" || Object.keys(value).length > 0;
58
60
  }
59
61
  function inspectFarmServerComponents(config, root) {
60
- const value = _optionalChain([config, 'optionalAccess', _4 => _4.experimental, 'optionalAccess', _5 => _5.serverComponents]);
61
- const mode = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, value);
62
+ const value = _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config);
63
+ const mode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, value);
62
64
  const enabled = mode === "rsc";
63
- const explicit = enabled && _chunkHP7QYVSTcjs.isExplicitFarmServerComponentsMode.call(void 0, value);
65
+ const explicit = enabled && _chunkCYUTK4JPcjs.isExplicitFarmServerComponentsMode.call(void 0, value);
64
66
  const missingPackages = enabled ? FARM_RSC_PACKAGES.filter((name) => !findFarmAppPackageDir(root, name)) : [];
65
67
  return {
66
68
  mode,
@@ -69,10 +71,10 @@ function inspectFarmServerComponents(config, root) {
69
71
  missingPackages,
70
72
  // `true` predates the pipeline; `{ mode: "rsc" }` is new and fails with the install command.
71
73
  fallback: enabled && !explicit && missingPackages.length > 0,
72
- blockingKeys: enabled ? FARM_RSC_BLOCKING_KEYS.filter((key) => isSet(_optionalChain([config, 'optionalAccess', _6 => _6[key]]), key)).map(
74
+ blockingKeys: enabled ? FARM_RSC_BLOCKING_KEYS.filter((key) => isSet(_optionalChain([config, 'optionalAccess', _2 => _2[key]]), key)).map(
73
75
  (key) => key === "security" ? "security.csp" : key
74
76
  ) : [],
75
- ignoredKeys: enabled ? FARM_RSC_IGNORED_KEYS.filter((key) => isSet(_optionalChain([config, 'optionalAccess', _7 => _7[key]]))) : []
77
+ ignoredKeys: enabled ? FARM_RSC_IGNORED_KEYS.filter((key) => isSet(_optionalChain([config, 'optionalAccess', _3 => _3[key]]))) : []
76
78
  };
77
79
  }
78
80
  function formatKeys(keys) {
@@ -80,22 +82,23 @@ function formatKeys(keys) {
80
82
  }
81
83
  function formatFarmRscFallbackMessage(missingPackages, blockingKeys = []) {
82
84
  if (blockingKeys.length > 0) {
83
- return `experimental.serverComponents is true, but this app uses ${formatKeys(
85
+ return `serverComponents is true, but this app uses ${formatKeys(
84
86
  blockingKeys
85
87
  )}, which the RSC pipeline does not run yet, so it runs without React Server Components. Remove the flag, or move ${blockingKeys.length === 1 ? "that feature" : "those features"} out of farm.config to turn RSC on.`;
86
88
  }
87
- return `experimental.serverComponents is true, but ${missingPackages.join(", ")} ${missingPackages.length === 1 ? "is" : "are"} not installed, so the app runs without React Server Components. \`farm dev\` and \`farm build\` install them outside CI; in CI or with another tool, run ${FARM_RSC_INSTALL_HINT}.`;
89
+ return `serverComponents is true, but ${missingPackages.join(", ")} ${missingPackages.length === 1 ? "is" : "are"} not installed, so the app runs without React Server Components. \`farm dev\` and \`farm build\` install them outside CI; in CI or with another tool, run ${FARM_RSC_INSTALL_HINT}.`;
88
90
  }
89
91
  function formatFarmRscBlockingMessage(blockingKeys) {
90
- return `experimental.serverComponents runs on the RSC pipeline, which does not run ${formatKeys(
92
+ return `serverComponents runs on the RSC pipeline, which does not run ${formatKeys(
91
93
  blockingKeys
92
- )} yet. Serving the app without ${blockingKeys.length === 1 ? "it" : "them"} could expose what ${blockingKeys.length === 1 ? "it protects" : "they protect"}, so RSC does not start. Remove experimental.serverComponents to keep ${blockingKeys.length === 1 ? "it" : "them"}.`;
94
+ )} yet. Serving the app without ${blockingKeys.length === 1 ? "it" : "them"} could expose what ${blockingKeys.length === 1 ? "it protects" : "they protect"}, so RSC does not start. Remove serverComponents (or experimental.serverComponents) to keep ${blockingKeys.length === 1 ? "it" : "them"}.`;
93
95
  }
94
96
  var warnedFallback = false;
95
97
  async function resolveFarmRscCheckConfig(config, root, mode) {
96
- if (!_optionalChain([config, 'optionalAccess', _8 => _8.extends])) return config;
97
- const { resolveFarmLayers } = await import("./layers-GP57TBE2.cjs");
98
- return (await resolveFarmLayers(config, { root, mode })).config;
98
+ const project = config && _chunkCYUTK4JPcjs.normalizeFarmServerComponentsConfig.call(void 0, config, (message) => _chunk7ZDLE77Pcjs.logger.warn(message));
99
+ if (!_optionalChain([project, 'optionalAccess', _4 => _4.extends])) return project;
100
+ const { resolveFarmLayers } = await import("./layers-6R55QDT5.cjs");
101
+ return (await resolveFarmLayers(project, { root, mode })).config;
99
102
  }
100
103
  function farmAppUsesRscPipeline(config, root) {
101
104
  const status = inspectFarmServerComponents(config, root);
@@ -131,7 +134,7 @@ function formatFarmRscIgnoredMessage(ignoredKeys) {
131
134
  "runs only the `configure` and browser `client` hooks of `plugins` and ignores their other hooks."
132
135
  );
133
136
  }
134
- return `experimental.serverComponents runs on the RSC pipeline, which ${clauses.join(" It also ")}`;
137
+ return `serverComponents runs on the RSC pipeline, which ${clauses.join(" It also ")}`;
135
138
  }
136
139
 
137
140
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readAliases,
3
3
  resolveFile
4
- } from "./chunk-VS4ABIJJ.mjs";
4
+ } from "./chunk-ZVEKOMZS.mjs";
5
5
  import {
6
6
  transformFarmServerFns
7
7
  } from "./chunk-GNZIAJGB.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RLEAVG6G.mjs";
4
4
  import {
5
5
  resolveDeployOutputPath
6
- } from "./chunk-MRDI6MTL.mjs";
6
+ } from "./chunk-ZRTBDHO2.mjs";
7
7
  import {
8
8
  farmDesktopDevGuardPlugin,
9
9
  loadFarmReactPlugin
@@ -22,7 +22,7 @@ import {
22
22
  formatFarmRscBlockingMessage,
23
23
  inspectFarmServerComponents,
24
24
  resolveFarmRscCheckConfig
25
- } from "./chunk-TQCDN4DV.mjs";
25
+ } from "./chunk-KQXYBJES.mjs";
26
26
 
27
27
  // src/rsc-pipeline.ts
28
28
  import { readFileSync } from "fs";
@@ -86,7 +86,7 @@ async function createFarmRscViteConfig(userConfig, options) {
86
86
  const renderer = userConfig.renderer;
87
87
  if (renderer && typeof renderer === "object" && renderer.name && renderer.name !== "react") {
88
88
  throw new Error(
89
- `[Farm.js] experimental.serverComponents needs the React renderer; this app uses "${renderer.name}".`
89
+ `[Farm.js] serverComponents needs the React renderer; this app uses "${renderer.name}".`
90
90
  );
91
91
  }
92
92
  const [pluginRsc, viteRsc, viteReact] = await Promise.all([
@@ -96,7 +96,7 @@ async function createFarmRscViteConfig(userConfig, options) {
96
96
  ]);
97
97
  if (!pluginRsc || !viteRsc || !findFarmAppPackageDir(root, "react-server-dom-webpack")) {
98
98
  throw new Error(
99
- `[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${FARM_RSC_INSTALL_HINT}`
99
+ `[Farm.js] serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${FARM_RSC_INSTALL_HINT}`
100
100
  );
101
101
  }
102
102
  const layered = await resolveFarmRscCheckConfig(
@@ -190,7 +190,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
190
190
  const candidate = plugin;
191
191
  return !!candidate && names.has(candidate.name) && hasFarmServerRuntimePlugins([candidate]);
192
192
  };
193
- const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-IMRXNZRB.mjs");
193
+ const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-O6GUR6LT.mjs");
194
194
  const files = [];
195
195
  if (userConfig.extends) {
196
196
  const { layers } = await resolveFarmLayers(userConfig, { root, mode: "production" });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FARM_VERSION
3
- } from "./chunk-LWQ6IESX.mjs";
3
+ } from "./chunk-MEIZIRMK.mjs";
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -3,8 +3,11 @@
3
3
 
4
4
 
5
5
 
6
+ var _chunkLEZJZX4Ccjs = require('./chunk-LEZJZX4C.cjs');
6
7
 
7
- var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
8
+
9
+
10
+ var _chunkCYUTK4JPcjs = require('./chunk-CYUTK4JP.cjs');
8
11
 
9
12
 
10
13
  var _chunk32HGOX3Mcjs = require('./chunk-32HGOX3M.cjs');
@@ -93,22 +96,22 @@ function resolveFarmIsland(props, reference) {
93
96
  }
94
97
  }
95
98
  function resolveFarmRendererServerComponentsIslands(config) {
96
- if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _2 => _2.experimental, 'optionalAccess', _3 => _3.serverComponents])) !== "islands") {
99
+ if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "islands") {
97
100
  return false;
98
101
  }
99
- if (config.renderer === void 0 || _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer)) return false;
100
- const renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, config.renderer);
101
- if (_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer)) return false;
102
- if (!_chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).islands) {
102
+ if (config.renderer === void 0 || _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, config.renderer)) return false;
103
+ const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
104
+ if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer)) return false;
105
+ if (!_chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, renderer).islands) {
103
106
  throw new Error(
104
- `[Farm.js] \`experimental.serverComponents: { mode: "islands" }\` needs a renderer that supports islands, and \`${renderer.name}\` doesn't declare \`capabilities.islands\`. Remove \`experimental.serverComponents\` to hydrate each route whole, or add islands to the renderer: https://farmjs.dev/docs/renderers/custom#islands`
107
+ `[Farm.js] \`serverComponents: { mode: "islands" }\` needs a renderer that supports islands, and \`${renderer.name}\` doesn't declare \`capabilities.islands\`. Remove \`serverComponents\` to hydrate each route whole, or add islands to the renderer: https://farmjs.dev/docs/renderers/custom#islands`
105
108
  );
106
109
  }
107
110
  return true;
108
111
  }
109
112
  function usesFarmRendererIslands(config) {
110
- const renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, config.renderer);
111
- return !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).islands && _optionalChain([config, 'access', _4 => _4.experimental, 'optionalAccess', _5 => _5.isolatedClientHydration]) === "enabled" && _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _6 => _6.experimental, 'optionalAccess', _7 => _7.serverComponents])) === void 0;
113
+ const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
114
+ return !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, renderer).islands && _optionalChain([config, 'access', _2 => _2.experimental, 'optionalAccess', _3 => _3.isolatedClientHydration]) === "enabled" && _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === void 0;
112
115
  }
113
116
 
114
117
 
@@ -301,20 +301,6 @@ async function loadFarmRendererVitePlugins(renderer, root, options = {}) {
301
301
  return Array.isArray(created) ? [...created] : [created];
302
302
  }
303
303
 
304
- // src/server-components-mode.ts
305
- function resolveFarmServerComponentsMode(value) {
306
- if (value === void 0 || value === null || value === false) return void 0;
307
- if (value === true) return "islands";
308
- const mode = typeof value === "object" ? value.mode : void 0;
309
- if (mode === "rsc" || mode === "islands") return mode;
310
- throw new TypeError(
311
- 'experimental.serverComponents must be true, false, { mode: "rsc" } or { mode: "islands" }.'
312
- );
313
- }
314
- function isExplicitFarmServerComponentsMode(value) {
315
- return typeof value === "object" && value !== null;
316
- }
317
-
318
304
  export {
319
305
  getFarmRendererCapabilities,
320
306
  getFarmRendererStreamingCapabilitiesForRuntime,
@@ -334,7 +320,5 @@ export {
334
320
  isReactRenderer,
335
321
  resolveFarmRendererAppSetup,
336
322
  resolveFarmRendererModule,
337
- loadFarmRendererVitePlugins,
338
- resolveFarmServerComponentsMode,
339
- isExplicitFarmServerComponentsMode
323
+ loadFarmRendererVitePlugins
340
324
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  APITypeGenerator
3
- } from "./chunk-ANKMAGFJ.mjs";
3
+ } from "./chunk-KJW6KEOZ.mjs";
4
4
  import {
5
5
  resolveRouteOpenAPIConfig
6
6
  } from "./chunk-NRWEY2CM.mjs";