@farm.js/core 0.1.72 → 0.1.73

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 (200) hide show
  1. package/dist/{agent-mcp-handler-VIT4GOSR.mjs → agent-mcp-handler-RK7LDYEL.mjs} +4 -4
  2. package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-VBCA3WZ6.cjs} +5 -5
  3. package/dist/{agent-mcp.d-BO3rZXEM.d.ts → agent-mcp.d-D_gHjCAE.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-Cwff7lcA.d.mts → agent-mcp.d-PvEf-1mi.d.mts} +1 -1
  5. package/dist/agent-runtime.d.mts +2 -2
  6. package/dist/agent-runtime.d.ts +2 -2
  7. package/dist/{analyzer-5Q75LTIL.mjs → analyzer-MFYCJT75.mjs} +2 -2
  8. package/dist/analyzer-V5ZMRIIY.cjs +16 -0
  9. package/dist/api/node.d.mts +4 -4
  10. package/dist/api/node.d.ts +4 -4
  11. package/dist/api/route-manager.d.mts +4 -4
  12. package/dist/api/route-manager.d.ts +4 -4
  13. package/dist/api/runtime.d.mts +3 -3
  14. package/dist/api/runtime.d.ts +3 -3
  15. package/dist/api.d.mts +5 -5
  16. package/dist/api.d.ts +5 -5
  17. package/dist/{app-manifest.d-DwjGkYlP.d.ts → app-manifest.d-BpVTg43i.d.ts} +1 -1
  18. package/dist/{app-manifest.d-USD_IbFd.d.mts → app-manifest.d-CN7cEWHX.d.mts} +1 -1
  19. package/dist/app-markdown.cjs +4 -4
  20. package/dist/app-markdown.d.mts +3 -3
  21. package/dist/app-markdown.d.ts +3 -3
  22. package/dist/app-markdown.mjs +3 -3
  23. package/dist/{app.d-fW06_h8h.d.mts → app.d-BFWzAdTe.d.mts} +10 -4
  24. package/dist/{app.d-DAmF2MAk.d.ts → app.d-DO4PTCWm.d.ts} +10 -4
  25. package/dist/{chunk-OSMUE5ST.mjs → chunk-462MUII7.mjs} +3 -3
  26. package/dist/{chunk-MWUDEYBI.mjs → chunk-4CTCSKAF.mjs} +1 -1
  27. package/dist/{chunk-FSSONJRV.cjs → chunk-4YHGQDTT.cjs} +12 -12
  28. package/dist/{chunk-YCNHUIPR.cjs → chunk-4Z3YLMSW.cjs} +10 -10
  29. package/dist/{chunk-O32QPFVV.cjs → chunk-5PDMBWAF.cjs} +5 -5
  30. package/dist/{chunk-E2V7RRFL.mjs → chunk-6O6PAZZR.mjs} +1 -1
  31. package/dist/{chunk-LXEJNWF5.mjs → chunk-73K53YPP.mjs} +2 -2
  32. package/dist/{chunk-WIJF3PBM.mjs → chunk-7GMBETHM.mjs} +1 -1
  33. package/dist/{chunk-DGNMXL2O.mjs → chunk-B67CW2LM.mjs} +1 -1
  34. package/dist/{chunk-E3LE6EZH.cjs → chunk-CLEWORVY.cjs} +2 -2
  35. package/dist/{chunk-KPJYBSHL.mjs → chunk-CPMME66W.mjs} +149 -22
  36. package/dist/{chunk-VAWDGGW3.mjs → chunk-CYRIIVD4.mjs} +26 -15
  37. package/dist/{chunk-RFWWXEIF.mjs → chunk-FRO4BB2T.mjs} +1 -1
  38. package/dist/{chunk-N3XO5AL5.cjs → chunk-GPO3LJDJ.cjs} +2 -2
  39. package/dist/{chunk-645ENY7W.mjs → chunk-GZOKWJIW.mjs} +4 -4
  40. package/dist/{chunk-NAXKOTPP.cjs → chunk-HFUOLILA.cjs} +21 -21
  41. package/dist/{chunk-C2JOS77Z.cjs → chunk-HGB4PM2C.cjs} +178 -51
  42. package/dist/{chunk-BE7AQXJB.cjs → chunk-HTXKSREF.cjs} +255 -89
  43. package/dist/{chunk-Z3GPAFIA.mjs → chunk-HY6IVQ54.mjs} +1 -1
  44. package/dist/{chunk-3JN5M3T5.mjs → chunk-IBVN7SW5.mjs} +247 -81
  45. package/dist/{chunk-OSEQL34Q.cjs → chunk-ILQ5DKYF.cjs} +2 -2
  46. package/dist/{chunk-AUAMXI6N.mjs → chunk-IXZSBO76.mjs} +1 -1
  47. package/dist/{chunk-77VNYVVX.mjs → chunk-JMOCMXTQ.mjs} +1 -1
  48. package/dist/{chunk-5R4Q5FN7.cjs → chunk-KDOZORJD.cjs} +52 -41
  49. package/dist/{chunk-7QCJDYZQ.cjs → chunk-KTDG4THT.cjs} +2 -2
  50. package/dist/{chunk-L6E4SHUB.cjs → chunk-LGR7565L.cjs} +6 -6
  51. package/dist/chunk-LRPPXKCX.mjs +58 -0
  52. package/dist/{chunk-5XFKWHZD.mjs → chunk-MJEKMT6B.mjs} +95 -106
  53. package/dist/chunk-NDOE76QC.cjs +58 -0
  54. package/dist/{chunk-REP6HWJN.mjs → chunk-OBYM5S5G.mjs} +2 -2
  55. package/dist/{chunk-ZUVAGMQ5.cjs → chunk-ODBM54RT.cjs} +7 -7
  56. package/dist/{chunk-J5ASGNKF.mjs → chunk-OIP62QEL.mjs} +1 -1
  57. package/dist/{chunk-3WG7GJQL.cjs → chunk-OXNZUCHN.cjs} +9 -9
  58. package/dist/{chunk-C5AM2XDN.cjs → chunk-PXAHSCR6.cjs} +4 -4
  59. package/dist/{chunk-BSXKZPFE.mjs → chunk-QGCSUC5O.mjs} +112 -70
  60. package/dist/{chunk-EXN4DTVF.cjs → chunk-QKEZLYON.cjs} +2 -2
  61. package/dist/{chunk-QUYAGU65.mjs → chunk-REK6HZSU.mjs} +267 -231
  62. package/dist/{chunk-5X6OHJEE.cjs → chunk-ROCF6UQD.cjs} +5 -8
  63. package/dist/{chunk-KQAB5LML.mjs → chunk-SUQACHER.mjs} +2 -2
  64. package/dist/{chunk-NV26EGMC.mjs → chunk-SVQX5HYW.mjs} +2 -2
  65. package/dist/{chunk-CBLRSZQL.cjs → chunk-TAU3OF5B.cjs} +223 -234
  66. package/dist/{chunk-IWCYRDRQ.cjs → chunk-TDCP3Z4T.cjs} +3 -3
  67. package/dist/{chunk-TP4RAV7Y.cjs → chunk-TU6VAH4V.cjs} +8 -8
  68. package/dist/{chunk-ZDZUFD67.cjs → chunk-UVQRMUAR.cjs} +1 -1
  69. package/dist/{chunk-JMFTKNBA.mjs → chunk-UVZMSRHF.mjs} +2 -2
  70. package/dist/{chunk-GF22VGMS.cjs → chunk-VPETSSWN.cjs} +2 -2
  71. package/dist/{chunk-AYVGD3PK.mjs → chunk-XI3OXOMK.mjs} +1 -1
  72. package/dist/{chunk-HLMUWKAP.cjs → chunk-XUSJVHHD.cjs} +408 -366
  73. package/dist/{chunk-ET6WW3FY.cjs → chunk-YZK64PZT.cjs} +433 -397
  74. package/dist/{chunk-DS7JGFW5.mjs → chunk-Z3IN6GEX.mjs} +4 -7
  75. package/dist/{client-component.d-ciHeCxr-.d.mts → client-component.d-C71rMuHF.d.mts} +2 -2
  76. package/dist/{client-component.d-9J7CkTWW.d.ts → client-component.d-sF-Znk0j.d.ts} +2 -2
  77. package/dist/{client-plugins.d-JnRz5a1o.d.mts → client-plugins.d-B-Gd9mWR.d.mts} +1 -1
  78. package/dist/{client-plugins.d-CUOhfapO.d.ts → client-plugins.d-MFibjgBg.d.ts} +1 -1
  79. package/dist/client-plugins.d.mts +2 -2
  80. package/dist/client-plugins.d.ts +2 -2
  81. package/dist/client.d.mts +7 -7
  82. package/dist/client.d.ts +7 -7
  83. package/dist/config.d.mts +2 -2
  84. package/dist/config.d.ts +2 -2
  85. package/dist/desktop.d.mts +3 -3
  86. package/dist/desktop.d.ts +3 -3
  87. package/dist/{devtools-IZFUYWPG.cjs → devtools-6K4QXFRL.cjs} +5 -5
  88. package/dist/{devtools-7JPQMSTQ.mjs → devtools-TDIJ6HVC.mjs} +4 -4
  89. package/dist/docs.cjs +8 -8
  90. package/dist/docs.d.mts +3 -3
  91. package/dist/docs.d.ts +3 -3
  92. package/dist/docs.mjs +7 -7
  93. package/dist/environment/vite.cjs +3 -3
  94. package/dist/environment/vite.mjs +2 -2
  95. package/dist/{headers.d-rbbTKGaN.d.mts → headers.d-BUxGJTsj.d.mts} +1 -1
  96. package/dist/{headers.d-CqpTL_fZ.d.ts → headers.d-uQ6BR59u.d.ts} +1 -1
  97. package/dist/index.cjs +24 -22
  98. package/dist/{index.d-CMKvzHLW.d.ts → index.d-BCGfxCXY.d.ts} +1 -1
  99. package/dist/{index.d-D_B2D9Il.d.mts → index.d-CuWOJ-un.d.mts} +1 -1
  100. package/dist/index.d.mts +18 -18
  101. package/dist/index.d.ts +18 -18
  102. package/dist/index.mjs +23 -21
  103. package/dist/integrations/orm.d.mts +2 -2
  104. package/dist/integrations/orm.d.ts +2 -2
  105. package/dist/integrations.d.mts +2 -2
  106. package/dist/integrations.d.ts +2 -2
  107. package/dist/internal/app-markdown-runtime.cjs +3 -3
  108. package/dist/internal/app-markdown-runtime.d.mts +3 -3
  109. package/dist/internal/app-markdown-runtime.d.ts +3 -3
  110. package/dist/internal/app-markdown-runtime.mjs +2 -2
  111. package/dist/internal/build-runtime.cjs +23 -23
  112. package/dist/internal/build-runtime.d.mts +4 -4
  113. package/dist/internal/build-runtime.d.ts +4 -4
  114. package/dist/internal/build-runtime.mjs +22 -22
  115. package/dist/internal/cli-runtime.cjs +9 -9
  116. package/dist/internal/cli-runtime.mjs +8 -8
  117. package/dist/internal/client-error-overlay.cjs +4 -4
  118. package/dist/internal/client-error-overlay.mjs +1 -1
  119. package/dist/internal/client-runtime.d.mts +5 -5
  120. package/dist/internal/client-runtime.d.ts +5 -5
  121. package/dist/internal/compression-runtime.d.mts +2 -2
  122. package/dist/internal/compression-runtime.d.ts +2 -2
  123. package/dist/internal/config-runtime.cjs +6 -6
  124. package/dist/internal/config-runtime.d.mts +4 -4
  125. package/dist/internal/config-runtime.d.ts +4 -4
  126. package/dist/internal/config-runtime.mjs +5 -5
  127. package/dist/internal/infra-analytics-runtime.cjs +9 -9
  128. package/dist/internal/infra-analytics-runtime.mjs +7 -7
  129. package/dist/internal/native-server-fns.cjs +4 -4
  130. package/dist/internal/native-server-fns.mjs +3 -3
  131. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  132. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  133. package/dist/internal/production-runtime.cjs +11 -11
  134. package/dist/internal/production-runtime.d.mts +10 -10
  135. package/dist/internal/production-runtime.d.ts +10 -10
  136. package/dist/internal/production-runtime.mjs +10 -10
  137. package/dist/markdown.cjs +2 -2
  138. package/dist/markdown.d.mts +2 -2
  139. package/dist/markdown.d.ts +2 -2
  140. package/dist/markdown.mjs +1 -1
  141. package/dist/middleware.d.mts +2 -2
  142. package/dist/middleware.d.ts +2 -2
  143. package/dist/{mount.d-ImEO7q8a.d.mts → mount.d-BIYmcGGg.d.mts} +1 -1
  144. package/dist/{mount.d-B0XMxDRh.d.ts → mount.d-q8k0cJV0.d.ts} +1 -1
  145. package/dist/{native-tree-L2IIEBXH.mjs → native-tree-OYGKP2NZ.mjs} +2 -2
  146. package/dist/{native-tree-GF4BH33L.cjs → native-tree-R6CQMDTI.cjs} +3 -3
  147. package/dist/{navigation-delegate.d-RRx1CSlb.d.ts → navigation-delegate.d-Btfs6Uoa.d.ts} +1 -1
  148. package/dist/{navigation-delegate.d-83Q7ksf7.d.mts → navigation-delegate.d-CYBUupsv.d.mts} +1 -1
  149. package/dist/navigation.d.mts +5 -5
  150. package/dist/navigation.d.ts +5 -5
  151. package/dist/{observability.d-B2363jB6.d.mts → observability.d-DdJRiaIX.d.mts} +27 -3
  152. package/dist/{observability.d-B2363jB6.d.ts → observability.d-DdJRiaIX.d.ts} +27 -3
  153. package/dist/observability.d.mts +1 -1
  154. package/dist/observability.d.ts +1 -1
  155. package/dist/plugin.cjs +15 -15
  156. package/dist/plugin.d.mts +5 -5
  157. package/dist/plugin.d.ts +5 -5
  158. package/dist/plugin.mjs +14 -14
  159. package/dist/{render-plan.d-Ds2sXJ5m.d.ts → render-plan.d-0FHusf1D.d.ts} +1 -1
  160. package/dist/{render-plan.d-wP8nTeRV.d.mts → render-plan.d-BlyxqKMu.d.mts} +1 -1
  161. package/dist/renderer-client.d.mts +5 -5
  162. package/dist/renderer-client.d.ts +5 -5
  163. package/dist/{request.d-zpSn6pu_.d.ts → request.d-CPdVjssg.d.ts} +1 -1
  164. package/dist/{request.d-F3h7K37m.d.mts → request.d-CX-gks1l.d.mts} +1 -1
  165. package/dist/request.d.mts +3 -3
  166. package/dist/request.d.ts +3 -3
  167. package/dist/{route-rendering.d-Mw0ZKG2e.d.mts → route-rendering.d-CcvZ_4N2.d.mts} +1 -1
  168. package/dist/{route-rendering.d-BL0_AdKj.d.ts → route-rendering.d-DcOoSNoG.d.ts} +1 -1
  169. package/dist/{router.d-NGVsU11T.d.mts → router.d-C8RHma4A.d.mts} +1 -1
  170. package/dist/{router.d-BwXigemZ.d.ts → router.d-D2QnK8cM.d.ts} +1 -1
  171. package/dist/routes.d.mts +2 -2
  172. package/dist/routes.d.ts +2 -2
  173. package/dist/{rsc-pipeline-DHYZLWSF.mjs → rsc-pipeline-LC2FBZAR.mjs} +5 -5
  174. package/dist/{rsc-pipeline-BNXYMG4G.cjs → rsc-pipeline-NTAM65NT.cjs} +6 -6
  175. package/dist/{runtime-XPYKUNL3.mjs → runtime-MWAC7NWR.mjs} +5 -5
  176. package/dist/{runtime-IWOT6ZVC.cjs → runtime-U4PAMTVH.cjs} +7 -7
  177. package/dist/{runtime.d-OBIZWpx1.d.ts → runtime.d-1l_1bLrL.d.ts} +1 -1
  178. package/dist/{runtime.d-BA3MzhXz.d.mts → runtime.d-BQUHHq8M.d.mts} +1 -1
  179. package/dist/server-plugins.d.mts +4 -4
  180. package/dist/server-plugins.d.ts +4 -4
  181. package/dist/server.cjs +37 -35
  182. package/dist/server.d.mts +11 -11
  183. package/dist/server.d.ts +11 -11
  184. package/dist/server.mjs +20 -18
  185. package/dist/{spa-router.d-DrYT944-.d.ts → spa-router.d-BJtXNeqo.d.ts} +2 -2
  186. package/dist/{spa-router.d-BG2XzE5p.d.mts → spa-router.d-BzPdi48R.d.mts} +2 -2
  187. package/dist/testing.d.mts +2 -2
  188. package/dist/testing.d.ts +2 -2
  189. package/dist/{utils.d-C1k9BJeD.d.mts → utils.d-B4ZW-6z6.d.mts} +1 -1
  190. package/dist/{utils.d-DcF4wxey.d.ts → utils.d-DquC6qxy.d.ts} +1 -1
  191. package/dist/version.cjs +2 -2
  192. package/dist/version.mjs +1 -1
  193. package/dist/vite.cjs +17 -15
  194. package/dist/vite.d.mts +16 -7
  195. package/dist/vite.d.ts +16 -7
  196. package/dist/vite.mjs +16 -14
  197. package/package.json +1 -1
  198. package/dist/analyzer-UJG4MIZW.cjs +0 -16
  199. package/dist/chunk-V3UOEWCB.cjs +0 -46
  200. package/dist/chunk-VE3FWJBO.mjs +0 -46
@@ -16,6 +16,7 @@ import {
16
16
  collectFarmWebMCPTools,
17
17
  createFarmClientOptimizeDepsConfig,
18
18
  createFarmClientOptimizeDepsEntries,
19
+ createFarmDevClientManifest,
19
20
  createFarmSourceAlias,
20
21
  createFarmThemeCssPlugin,
21
22
  exactIdPattern,
@@ -32,7 +33,7 @@ import {
32
33
  resolveFarmClientCacheAdapterEntry,
33
34
  resolveFarmImageProviderForRuntime,
34
35
  resolveFarmRouteRootStrategy
35
- } from "./chunk-5XFKWHZD.mjs";
36
+ } from "./chunk-MJEKMT6B.mjs";
36
37
  import {
37
38
  generateFarmClientPluginEntryCode,
38
39
  hasFarmServerRuntimePlugins,
@@ -47,7 +48,7 @@ import {
47
48
  import {
48
49
  generateFarmTypeArtifacts,
49
50
  resolveRouteRenderingConfig
50
- } from "./chunk-DGNMXL2O.mjs";
51
+ } from "./chunk-B67CW2LM.mjs";
51
52
  import {
52
53
  createFarmServerFnBoundaryModule,
53
54
  isFarmServerFnBoundaryId,
@@ -58,12 +59,10 @@ import {
58
59
  farmPathGuardCoversEndpoint,
59
60
  farmPathGuardCoversPage,
60
61
  getFarmFragmentCacheControl,
61
- getRouteGroupScope,
62
62
  getSharedLayoutPrefixLength,
63
63
  parseFarmLayoutChainHeader,
64
- renderFarmLocaleAlternateLinks,
65
- stripRouteGroups
66
- } from "./chunk-NV26EGMC.mjs";
64
+ renderFarmLocaleAlternateLinks
65
+ } from "./chunk-SVQX5HYW.mjs";
67
66
  import {
68
67
  FARM_NATIVE_TREE_CONTENT_TYPE
69
68
  } from "./chunk-LLZSYFOM.mjs";
@@ -81,13 +80,13 @@ import {
81
80
  resolveFarmMCPRouteLabel,
82
81
  resolveFarmMarkdownRouteLabel,
83
82
  setFarmRouteLabel
84
- } from "./chunk-645ENY7W.mjs";
83
+ } from "./chunk-GZOKWJIW.mjs";
85
84
  import {
86
85
  FARM_DEFAULT_MCP_PATH
87
- } from "./chunk-JMFTKNBA.mjs";
86
+ } from "./chunk-UVZMSRHF.mjs";
88
87
  import {
89
88
  isFarmPreviewDeploymentEnvironment
90
- } from "./chunk-AUAMXI6N.mjs";
89
+ } from "./chunk-IXZSBO76.mjs";
91
90
  import {
92
91
  resolveFarmLayoutFonts
93
92
  } from "./chunk-HZOMT5DY.mjs";
@@ -99,13 +98,16 @@ import {
99
98
  collectFarmServerBundledPackageInfo,
100
99
  dropLatestPackageClientBoundaryCache,
101
100
  ensureFarmInternalClientReference,
101
+ ensureFarmIslandContainerReference,
102
102
  ensureFarmPackageClientReference,
103
103
  farmBrowserBuiltinsOptimizerPlugin,
104
104
  farmEnvironmentFunctionsPlugin,
105
+ farmIslandContainerReferencePath,
105
106
  farmRelativeImportFiles,
106
107
  generateProgrammaticClientRouteModule,
107
108
  getClientModuleMetadata,
108
109
  getFarmClientReachableModules,
110
+ getFarmClientRenderingBindings,
109
111
  getIslandStrategyExport,
110
112
  hasUseClientDirective,
111
113
  invalidateFarmClientOnlyScan,
@@ -122,8 +124,9 @@ import {
122
124
  rewriteFarmPackageClientImports,
123
125
  rewriteFarmReactServerClientModuleImports,
124
126
  rewriteFarmReactServerImports,
125
- stripUseClientDirective
126
- } from "./chunk-3JN5M3T5.mjs";
127
+ stripUseClientDirective,
128
+ wrapFarmIslandContainers
129
+ } from "./chunk-IBVN7SW5.mjs";
127
130
  import {
128
131
  generateFarmDocsAdapterClientRuntime,
129
132
  getFarmDocsAdapterConfigModule
@@ -147,10 +150,10 @@ import {
147
150
  FARM_PREVIEW_ROBOTS_TAG,
148
151
  resolveFarmAgentCrawlers,
149
152
  resolveFarmAgentSitemap
150
- } from "./chunk-REP6HWJN.mjs";
153
+ } from "./chunk-OBYM5S5G.mjs";
151
154
  import {
152
155
  resolveFarmLlmsTxtConfig
153
- } from "./chunk-Z3GPAFIA.mjs";
156
+ } from "./chunk-HY6IVQ54.mjs";
154
157
  import {
155
158
  resolveFarmServerComponentsMode
156
159
  } from "./chunk-4QENVMG7.mjs";
@@ -180,7 +183,7 @@ import {
180
183
  createFarmMarkdownSourceResponse,
181
184
  isFarmMarkdownPageFile,
182
185
  normalizeFarmMarkdownRoutePath
183
- } from "./chunk-J5ASGNKF.mjs";
186
+ } from "./chunk-OIP62QEL.mjs";
184
187
  import {
185
188
  resolveFarmMdxComponentsModulePath,
186
189
  resolveMdxConfig
@@ -192,7 +195,7 @@ import {
192
195
  farmRequestWantsMarkdown,
193
196
  getFarmMarkdownAlternatePath,
194
197
  resolveMarkdownMirrorTarget
195
- } from "./chunk-KPJYBSHL.mjs";
198
+ } from "./chunk-CPMME66W.mjs";
196
199
  import {
197
200
  dispatchIntegrationRequest,
198
201
  getFarmIntegrationPluginOwner,
@@ -285,7 +288,7 @@ import {
285
288
  } from "./chunk-2DA7CLY7.mjs";
286
289
  import {
287
290
  FARM_VERSION
288
- } from "./chunk-77VNYVVX.mjs";
291
+ } from "./chunk-JMOCMXTQ.mjs";
289
292
  import {
290
293
  DEFAULT_FARM_API_BASE_PATH
291
294
  } from "./chunk-W6QLRQ3V.mjs";
@@ -352,7 +355,7 @@ function transformFarmFormActionModule(options) {
352
355
  }
353
356
 
354
357
  // src/vite.ts
355
- import { parseSync } from "vite";
358
+ import { createRunnableDevEnvironment, parseSync } from "vite";
356
359
  import { initSync as initModuleLexer, parse as lexModule } from "es-module-lexer";
357
360
  import { AsyncLocalStorage } from "async_hooks";
358
361
  import { builtinModules, isBuiltin } from "module";
@@ -1079,7 +1082,7 @@ function loadFarmWorkflowsDevRuntime() {
1079
1082
  return import("./workflows.mjs");
1080
1083
  }
1081
1084
  function loadFarmDevtoolsSnapshotRuntime() {
1082
- return import("./devtools-7JPQMSTQ.mjs");
1085
+ return import("./devtools-TDIJ6HVC.mjs");
1083
1086
  }
1084
1087
  function loadFarmDevtoolsUIRuntime() {
1085
1088
  return import("./devtools-ui-CYBVFLPH.mjs");
@@ -1140,6 +1143,37 @@ function createFarmServerPrebundleConfig(bundledPackages) {
1140
1143
  }
1141
1144
  };
1142
1145
  }
1146
+ function farmIslandContainersPlugin(config) {
1147
+ let root = config.root ?? process.cwd();
1148
+ return {
1149
+ name: "farm:island-containers",
1150
+ enforce: "pre",
1151
+ configResolved(resolved) {
1152
+ root = config.root || resolved.root;
1153
+ },
1154
+ transform(code, id) {
1155
+ if (resolveFarmServerComponentsMode(config.experimental?.serverComponents) !== "islands") {
1156
+ return null;
1157
+ }
1158
+ if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1159
+ return null;
1160
+ }
1161
+ if (hasUseClientDirective(code)) return null;
1162
+ const file = id.split("?", 1)[0];
1163
+ const bindings = getFarmClientRenderingBindings(code, file, root);
1164
+ if (bindings.length === 0) return null;
1165
+ const grown = wrapFarmIslandContainers({
1166
+ code,
1167
+ file,
1168
+ bindings,
1169
+ reference: farmIslandContainerReferencePath(root)
1170
+ });
1171
+ if (grown === null) return null;
1172
+ ensureFarmIslandContainerReference(root);
1173
+ return { code: grown, map: null };
1174
+ }
1175
+ };
1176
+ }
1143
1177
  function farmServerOnlyEntriesPlugin(options = {}) {
1144
1178
  let root = process.cwd();
1145
1179
  let vercelOgInstalled = false;
@@ -2123,6 +2157,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2123
2157
  }
2124
2158
  };
2125
2159
  },
2160
+ configEnvironment(name, environmentConfig, env) {
2161
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || environmentConfig.dev?.createEnvironment) {
2162
+ return;
2163
+ }
2164
+ return {
2165
+ dev: {
2166
+ createEnvironment: (environmentName, config) => createRunnableDevEnvironment(environmentName, config, {
2167
+ runnerOptions: { sourcemapInterceptor: "prepareStackTrace" }
2168
+ })
2169
+ }
2170
+ };
2171
+ },
2126
2172
  async configResolved(config) {
2127
2173
  if (typeof fontImports.configResolved === "function") {
2128
2174
  await fontImports.configResolved.call(this, config);
@@ -3300,7 +3346,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3300
3346
  }
3301
3347
  }
3302
3348
  if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && req.headers.accept?.includes(FARM_NATIVE_TREE_CONTENT_TYPE)) {
3303
- const { createFarmNativeTreeResponse } = await import("./native-tree-L2IIEBXH.mjs");
3349
+ const { createFarmNativeTreeResponse } = await import("./native-tree-OYGKP2NZ.mjs");
3304
3350
  const treeBodyInit = requestMethod === "POST" ? { body: createFarmNodeRequestBodyStream(req), duplex: "half" } : {};
3305
3351
  const treeResponse = await createFarmNativeTreeResponse({
3306
3352
  request: new Request(fullUrl, {
@@ -4619,62 +4665,23 @@ export const getManifest = () => ({
4619
4665
  });
4620
4666
  `;
4621
4667
  }
4622
- const manifest = routeManager.generateClientManifest(server.config.root);
4623
4668
  const globalStylesheetHref = resolveDevGlobalStylesheetHref(
4624
4669
  server.config.root,
4625
4670
  farmApp?.getConfig().srcDir
4626
4671
  );
4627
- const fullManifest = {
4628
- clientEntry: "/@farm/client.js",
4629
- routes: {},
4630
- layouts: {},
4631
- slots: [],
4632
- sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
4672
+ const fullManifest = createFarmDevClientManifest(
4673
+ routeManager.generateClientManifest(server.config.root),
4674
+ {
4675
+ sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
4676
+ }
4677
+ );
4678
+ return {
4679
+ code: `const manifest = JSON.parse(${JSON.stringify(JSON.stringify(fullManifest))});
4680
+ export const getManifest = () => manifest;
4681
+ export { manifest };
4682
+ `,
4683
+ map: { mappings: "" }
4633
4684
  };
4634
- for (const route of manifest.routes) {
4635
- fullManifest.routes[route.pattern] = {
4636
- modulePath: route.modulePath,
4637
- pattern: route.pattern,
4638
- ...route.directory ? { directory: route.directory } : {},
4639
- segments: route.segments,
4640
- search: route.search,
4641
- isClientComponent: route.isClientComponent,
4642
- shouldHydrate: route.shouldHydrate,
4643
- islandStrategy: route.islandStrategy,
4644
- renderPlan: route.renderPlan,
4645
- preloads: [route.modulePath],
4646
- // In dev, preload is just the module
4647
- assets: []
4648
- };
4649
- }
4650
- for (const layout of manifest.layouts) {
4651
- const groupScope = getRouteGroupScope(layout.pattern);
4652
- fullManifest.layouts[layout.pattern] = {
4653
- modulePath: layout.modulePath,
4654
- pattern: layout.pattern,
4655
- ...groupScope ? { urlPattern: stripRouteGroups(layout.pattern), groupScope } : {},
4656
- shouldHydrate: layout.shouldHydrate,
4657
- islandStrategy: layout.islandStrategy,
4658
- // Islands mode: rebuilt from its server tree, so its module is never preloaded.
4659
- ...layout.serverTree ? { serverTree: true } : {},
4660
- preloads: layout.serverTree ? [] : [layout.modulePath],
4661
- assets: []
4662
- };
4663
- }
4664
- for (const slot of manifest.slots) {
4665
- fullManifest.slots.push({
4666
- ...slot,
4667
- preloads: [slot.modulePath],
4668
- assets: []
4669
- });
4670
- }
4671
- return `
4672
- // Auto-generated manifest for SPA navigation (TanStack Start pattern)
4673
- // This manifest is inlined in the server bundle - no file on disk
4674
- // Client receives this via window.__FARM_MANIFEST__ in HTML
4675
- export const getManifest = () => (${JSON.stringify(fullManifest, null, 2)});
4676
- export const manifest = getManifest();
4677
- `;
4678
4685
  }
4679
4686
  },
4680
4687
  async transform(code, id, transformOptions) {
@@ -5845,6 +5852,35 @@ function wrapFarmClientRouteGraph(element) {
5845
5852
  // Fallback to empty manifest if not available yet
5846
5853
  const getManifest = () => window.__FARM_MANIFEST__ || { routes: {}, layouts: {}, slots: [], clientEntry: '', sharedAssets: [] };
5847
5854
 
5855
+ // A document inlines only the entries its page boots with and names the module that has the
5856
+ // whole manifest (manifest.module), as production keeps its route table out of the HTML. Code
5857
+ // that matches another route awaits this first; it imports the module once. A failed import
5858
+ // keeps the inlined entries, so the router treats other routes as it treats an unknown one.
5859
+ let farmManifestLoad = null;
5860
+ function ensureFarmManifest() {
5861
+ const inlined = window.__FARM_MANIFEST__;
5862
+ if (!inlined || typeof inlined.module !== 'string') return Promise.resolve();
5863
+ if (!farmManifestLoad) {
5864
+ farmManifestLoad = import(/* @vite-ignore */ new URL(inlined.module, location.origin).href)
5865
+ .then((loaded) => {
5866
+ const manifest = loaded.getManifest();
5867
+ if (window.__FARM_MANIFEST__ !== inlined) return;
5868
+ const { module: _module, ...boot } = inlined;
5869
+ window.__FARM_MANIFEST__ = {
5870
+ ...boot,
5871
+ routes: manifest.routes,
5872
+ layouts: manifest.layouts,
5873
+ slots: manifest.slots,
5874
+ };
5875
+ })
5876
+ .catch((error) => {
5877
+ farmManifestLoad = null;
5878
+ console.warn('[Farm.js] Could not load the route manifest: ' + inlined.module, error);
5879
+ });
5880
+ }
5881
+ return farmManifestLoad;
5882
+ }
5883
+
5848
5884
  // ====== CLIENT-SIDE ROUTE MATCHING ======
5849
5885
  // Matches URL to route using manifest (no server request!)
5850
5886
 
@@ -7043,6 +7079,7 @@ async function fetchFarmNavigationDocument(path, context) {
7043
7079
  // A prefetch reads the page whole for the router's cache, and leaves a page that streams alone.
7044
7080
  if (!context.prefetch) farmNavigationStreamGeneration++;
7045
7081
  const url = new URL(path, window.location.href);
7082
+ await ensureFarmManifest();
7046
7083
  const match = farmDocumentNavigationRoute(url.pathname);
7047
7084
  const container = document.getElementById('root');
7048
7085
  if (!match || !container) return null;
@@ -7189,6 +7226,9 @@ async function renderPage(pageData, info) {
7189
7226
  return;
7190
7227
  }
7191
7228
 
7229
+ // Page data carries the route's render plan, which the manifest entry only backs up. Islands
7230
+ // mode also reads which layouts render as server trees (loadLayoutComponents).
7231
+ if (${islandValues ? "true" : "!pageData.renderPlan"}) await ensureFarmManifest();
7192
7232
  const manifestRoute = findRoute(window.location.pathname)?.route;
7193
7233
  const renderPlan = pageData.renderPlan || manifestRoute?.renderPlan;
7194
7234
  const hydrationMode = renderPlan?.hydration;
@@ -7828,6 +7868,7 @@ async function defineConfig(config = {}) {
7828
7868
  viteBrowserExternalPlugin,
7829
7869
  farmI18nClientBridgePlugin(),
7830
7870
  farmServerOnlyEntriesPlugin(),
7871
+ farmIslandContainersPlugin(config),
7831
7872
  farmPlugin(config),
7832
7873
  farmEnvironmentFunctionsPlugin(config),
7833
7874
  farmBrandingPlugin
@@ -7903,6 +7944,7 @@ export {
7903
7944
  isViteDevClientRequest,
7904
7945
  farmImageImportsPlugin,
7905
7946
  farmI18nClientBridgePlugin,
7947
+ farmIslandContainersPlugin,
7906
7948
  farmServerOnlyEntriesPlugin,
7907
7949
  withFarmRequestTracing,
7908
7950
  rewriteEarlySsrRelativeImports,
@@ -15,14 +15,14 @@ var _chunkWBTHHTBOcjs = require('./chunk-WBTHHTBO.cjs');
15
15
  var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
16
16
 
17
17
 
18
- var _chunkZDZUFD67cjs = require('./chunk-ZDZUFD67.cjs');
18
+ var _chunkUVQRMUARcjs = require('./chunk-UVQRMUAR.cjs');
19
19
 
20
20
  // src/mobile/analyzer.ts
21
21
  var _crypto = require('crypto');
22
22
  var _fs = require('fs');
23
23
  var _promises = require('fs/promises');
24
24
  var _path = require('path'); var path = _interopRequireWildcard(_path);
25
- var ANALYZER_VERSION = `7:${_chunkZDZUFD67cjs.FARM_VERSION}`;
25
+ var ANALYZER_VERSION = `7:${_chunkUVQRMUARcjs.FARM_VERSION}`;
26
26
  var INTRINSIC_KINDS = {};
27
27
  for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
28
28
  INTRINSIC_KINDS[tag] = "View";