@farm.js/core 0.1.84 → 0.1.85

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 (88) hide show
  1. package/dist/{analyzer-7RNO3XKC.mjs → analyzer-R6KNJ6IO.mjs} +2 -2
  2. package/dist/analyzer-XVY76XMM.cjs +17 -0
  3. package/dist/{app.d-eSm7jgoc.d.mts → app.d-Bvpc2eJq.d.mts} +1 -1
  4. package/dist/{app.d-CVPu_hoD.d.ts → app.d-DEKpJEp4.d.ts} +1 -1
  5. package/dist/{chunk-INU4K4U4.mjs → chunk-2DMOB6BH.mjs} +1 -1
  6. package/dist/{chunk-CVZY4TLW.cjs → chunk-3HWNYLQV.cjs} +1 -1
  7. package/dist/{chunk-XLULEFRW.mjs → chunk-3TCFONUE.mjs} +11 -2
  8. package/dist/{chunk-HOQ2MYBJ.cjs → chunk-7TPLDPNC.cjs} +2 -2
  9. package/dist/{chunk-57EEWWUS.cjs → chunk-BZN5HX7Y.cjs} +2 -2
  10. package/dist/{chunk-BZY3SRRD.mjs → chunk-CDZ55QRD.mjs} +1 -1
  11. package/dist/{chunk-KXVMWLTC.mjs → chunk-GFVPQ25Z.mjs} +82 -12
  12. package/dist/{chunk-OFVBMS6I.cjs → chunk-H6C45DCF.cjs} +48 -48
  13. package/dist/{chunk-USMRAC72.cjs → chunk-HKJIUZS5.cjs} +2 -2
  14. package/dist/{chunk-MUUDHWQZ.mjs → chunk-J7VIXTPQ.mjs} +1 -1
  15. package/dist/{chunk-EBSL5TW7.cjs → chunk-OYM6VJEF.cjs} +27 -18
  16. package/dist/{chunk-IRJSZAJB.mjs → chunk-PQR5A7R2.mjs} +1 -1
  17. package/dist/{chunk-OP7BIEUW.cjs → chunk-Q7GB3I4O.cjs} +2 -2
  18. package/dist/{chunk-YU6VL7H5.cjs → chunk-QUHDVJMR.cjs} +3 -3
  19. package/dist/{chunk-Z37PDUJR.cjs → chunk-RVJQHQCG.cjs} +4 -4
  20. package/dist/{chunk-22BTYPIX.cjs → chunk-TOUC6BR3.cjs} +4 -4
  21. package/dist/{chunk-DFDQGHPU.mjs → chunk-U6HUVY5R.mjs} +14 -9
  22. package/dist/{chunk-DSWSDDP2.cjs → chunk-UEQC4ZLP.cjs} +339 -269
  23. package/dist/{chunk-5I4ZGKP2.cjs → chunk-WYTK7HQS.cjs} +129 -124
  24. package/dist/{chunk-BRDGINBB.mjs → chunk-X7RSOEMQ.mjs} +6 -6
  25. package/dist/{chunk-I5CVJ24H.mjs → chunk-XIXAUXV3.mjs} +1 -1
  26. package/dist/{chunk-M5XU22PQ.mjs → chunk-YS647ASS.mjs} +1 -1
  27. package/dist/{chunk-3WM7VBGW.mjs → chunk-YX532KEF.mjs} +2 -2
  28. package/dist/{chunk-NLHSKKTT.mjs → chunk-Z3LOPHSO.mjs} +1 -1
  29. package/dist/{client-component.d-DLknFP8l.d.ts → client-component.d-CZG02pIh.d.ts} +2 -1
  30. package/dist/{client-component.d-DLMCzmUx.d.mts → client-component.d-miqIXyQv.d.mts} +2 -1
  31. package/dist/{devtools-MWQA5LVN.mjs → devtools-34ZQWX3M.mjs} +1 -1
  32. package/dist/{devtools-4SVIRV4P.cjs → devtools-SXL5RFE5.cjs} +2 -2
  33. package/dist/docs.cjs +3 -3
  34. package/dist/docs.mjs +2 -2
  35. package/dist/environment/vite.cjs +3 -3
  36. package/dist/environment/vite.mjs +2 -2
  37. package/dist/index.cjs +15 -15
  38. package/dist/index.d.mts +2 -2
  39. package/dist/index.d.ts +2 -2
  40. package/dist/index.mjs +14 -14
  41. package/dist/internal/build-runtime.cjs +14 -14
  42. package/dist/internal/build-runtime.mjs +13 -13
  43. package/dist/internal/cli-runtime.cjs +3 -3
  44. package/dist/internal/cli-runtime.mjs +2 -2
  45. package/dist/internal/client-error-overlay.cjs +4 -4
  46. package/dist/internal/client-error-overlay.mjs +1 -1
  47. package/dist/internal/config-runtime.cjs +3 -3
  48. package/dist/internal/config-runtime.mjs +2 -2
  49. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  50. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  51. package/dist/internal/islands-runtime.cjs +15 -8
  52. package/dist/internal/islands-runtime.d.mts +2 -3
  53. package/dist/internal/islands-runtime.d.ts +2 -3
  54. package/dist/internal/islands-runtime.mjs +15 -8
  55. package/dist/internal/islands-server-tree.cjs +8 -0
  56. package/dist/internal/islands-server-tree.d.mts +5 -0
  57. package/dist/internal/islands-server-tree.d.ts +5 -0
  58. package/dist/internal/islands-server-tree.mjs +8 -0
  59. package/dist/internal/islx-actions-server.d.mts +0 -3
  60. package/dist/internal/islx-actions-server.d.ts +0 -3
  61. package/dist/internal/native-server-fns.cjs +4 -4
  62. package/dist/internal/native-server-fns.mjs +3 -3
  63. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  64. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  65. package/dist/internal/production-runtime.cjs +7 -7
  66. package/dist/internal/production-runtime.mjs +8 -8
  67. package/dist/plugin.cjs +9 -9
  68. package/dist/plugin.d.mts +1 -1
  69. package/dist/plugin.d.ts +1 -1
  70. package/dist/plugin.mjs +8 -8
  71. package/dist/{rsc-pipeline-OWBEZ7HB.cjs → rsc-pipeline-ESPGX4VX.cjs} +3 -3
  72. package/dist/{rsc-pipeline-UT3Z2GDO.mjs → rsc-pipeline-MW2V3WEE.mjs} +2 -2
  73. package/dist/{runtime-SRMQ46SK.cjs → runtime-FCMLEBTX.cjs} +4 -4
  74. package/dist/{runtime-F5I3WY3B.mjs → runtime-KGSOEMLT.mjs} +2 -2
  75. package/dist/server.cjs +30 -30
  76. package/dist/server.d.mts +2 -2
  77. package/dist/server.d.ts +2 -2
  78. package/dist/server.mjs +10 -10
  79. package/dist/version.cjs +2 -2
  80. package/dist/version.mjs +1 -1
  81. package/dist/vite.cjs +9 -9
  82. package/dist/vite.d.mts +2 -2
  83. package/dist/vite.d.ts +2 -2
  84. package/dist/vite.mjs +8 -8
  85. package/package.json +6 -1
  86. package/dist/analyzer-PFKA5NI6.cjs +0 -17
  87. /package/dist/{chunk-EDBIBO67.mjs → chunk-4QCMTIBM.mjs} +0 -0
  88. /package/dist/{chunk-BOEDYXAX.cjs → chunk-BBX4RPOV.cjs} +0 -0
@@ -12,10 +12,10 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
12
12
  var _chunkL3BSHASBcjs = require('./chunk-L3BSHASB.cjs');
13
13
 
14
14
 
15
- var _chunkF7JVO3OZcjs = require('./chunk-F7JVO3OZ.cjs');
15
+ var _chunkGLNVLCUHcjs = require('./chunk-GLNVLCUH.cjs');
16
16
 
17
17
 
18
- var _chunkGLNVLCUHcjs = require('./chunk-GLNVLCUH.cjs');
18
+ var _chunkF7JVO3OZcjs = require('./chunk-F7JVO3OZ.cjs');
19
19
 
20
20
 
21
21
 
@@ -59,7 +59,7 @@ var _chunkVS7HLH4Scjs = require('./chunk-VS7HLH4S.cjs');
59
59
  var _chunk4B6YJ5DScjs = require('./chunk-4B6YJ5DS.cjs');
60
60
 
61
61
 
62
- var _chunk22BTYPIXcjs = require('./chunk-22BTYPIX.cjs');
62
+ var _chunkTOUC6BR3cjs = require('./chunk-TOUC6BR3.cjs');
63
63
 
64
64
 
65
65
 
@@ -104,7 +104,7 @@ var _chunkWOAXQ5MZcjs = require('./chunk-WOAXQ5MZ.cjs');
104
104
 
105
105
 
106
106
 
107
- var _chunkEBSL5TW7cjs = require('./chunk-EBSL5TW7.cjs');
107
+ var _chunkOYM6VJEFcjs = require('./chunk-OYM6VJEF.cjs');
108
108
 
109
109
 
110
110
 
@@ -306,7 +306,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
306
306
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
307
307
 
308
308
 
309
- var _chunkCVZY4TLWcjs = require('./chunk-CVZY4TLW.cjs');
309
+ var _chunk3HWNYLQVcjs = require('./chunk-3HWNYLQV.cjs');
310
310
 
311
311
 
312
312
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -507,7 +507,7 @@ var RouteManager = class _RouteManager {
507
507
  this.redirects = /* @__PURE__ */ new Map();
508
508
  this.programmaticPages = /* @__PURE__ */ new Map();
509
509
  this.programmaticLayouts = /* @__PURE__ */ new Map();
510
- this.programmaticClientRoutes = _chunkEBSL5TW7cjs.mergeProgrammaticClientRoutes.call(void 0, []);
510
+ this.programmaticClientRoutes = _chunkOYM6VJEFcjs.mergeProgrammaticClientRoutes.call(void 0, []);
511
511
  // The hydration settings each route rule returned, by file.
512
512
  this.rendererRouteHydration = /* @__PURE__ */ new Map();
513
513
  this.disposeRendererHydration = () => {
@@ -596,7 +596,7 @@ var RouteManager = class _RouteManager {
596
596
  });
597
597
  }
598
598
  }
599
- this.disposeRendererHydration = _chunkEBSL5TW7cjs.setFarmRendererHydrationScope.call(void 0,
599
+ this.disposeRendererHydration = _chunkOYM6VJEFcjs.setFarmRendererHydrationScope.call(void 0,
600
600
  _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, this.config).map((source) => source.root),
601
601
  renderer,
602
602
  routeModules
@@ -632,7 +632,7 @@ var RouteManager = class _RouteManager {
632
632
  await this.discoverFileRoutes(source);
633
633
  await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
634
634
  }
635
- this.programmaticClientRoutes = _chunkEBSL5TW7cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
635
+ this.programmaticClientRoutes = _chunkOYM6VJEFcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
636
636
  for (const slot of this.routeSlots.values()) {
637
637
  if (slot.interception && !this.pageRouteShapes.has(_chunkML4TOUZPcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
638
638
  throw new (0, _chunkML4TOUZPcjs.AmbiguousRouteError)(
@@ -925,11 +925,11 @@ var RouteManager = class _RouteManager {
925
925
  return this.clientManifestCache.manifest;
926
926
  }
927
927
  const cacheFile = this.packageClientBoundaryCacheFile;
928
- const compute = () => _chunkEBSL5TW7cjs.withFarmSourceSnapshot.call(void 0,
928
+ const compute = () => _chunkOYM6VJEFcjs.withFarmSourceSnapshot.call(void 0,
929
929
  () => this.computeClientManifest(normalizedProjectRoot),
930
930
  this.sourceSnapshot
931
931
  );
932
- return cacheFile ? _chunkEBSL5TW7cjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
932
+ return cacheFile ? _chunkOYM6VJEFcjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
933
933
  }
934
934
  /**
935
935
  * @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
@@ -938,7 +938,7 @@ var RouteManager = class _RouteManager {
938
938
  */
939
939
  trackSourceChanges() {
940
940
  this.sourceChangeTracking = true;
941
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkEBSL5TW7cjs.FarmSourceSnapshotStore)())));
941
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkOYM6VJEFcjs.FarmSourceSnapshotStore)())));
942
942
  }
943
943
  /**
944
944
  * @internal A production build edits no source while it runs, so what the plan reads, parses and
@@ -947,7 +947,7 @@ var RouteManager = class _RouteManager {
947
947
  */
948
948
  keepBuildSourceSnapshot() {
949
949
  if (this.sourceChangeTracking) return;
950
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkEBSL5TW7cjs.FarmSourceSnapshotStore)(false))));
950
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkOYM6VJEFcjs.FarmSourceSnapshotStore)(false))));
951
951
  }
952
952
  /**
953
953
  * @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
@@ -990,7 +990,7 @@ var RouteManager = class _RouteManager {
990
990
  return false;
991
991
  }
992
992
  const previous = _optionalChain([this, 'access', _18 => _18.sourceSnapshot, 'optionalAccess', _19 => _19.peekSource, 'call', _20 => _20(path4.default.resolve(file))]);
993
- return previous !== void 0 && _chunkEBSL5TW7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
993
+ return previous !== void 0 && _chunkOYM6VJEFcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
994
994
  }
995
995
  /**
996
996
  * A route module's plan: the last one when it read none of `edited`, recomputed otherwise.
@@ -1001,7 +1001,7 @@ var RouteManager = class _RouteManager {
1001
1001
  if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
1002
1002
  return { ...previous.plan };
1003
1003
  }
1004
- const { result, files } = _chunkEBSL5TW7cjs.traceFarmSourceReads.call(void 0, compute);
1004
+ const { result, files } = _chunkOYM6VJEFcjs.traceFarmSourceReads.call(void 0, compute);
1005
1005
  const sources = /* @__PURE__ */ new Set();
1006
1006
  for (const file of files) {
1007
1007
  const source = this.planSourcePath(file);
@@ -1009,7 +1009,7 @@ var RouteManager = class _RouteManager {
1009
1009
  }
1010
1010
  if (!this.sourceChangeTracking) {
1011
1011
  for (const source of sources) {
1012
- if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, source));
1012
+ if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkOYM6VJEFcjs.getFarmSourceStamp.call(void 0, source));
1013
1013
  }
1014
1014
  }
1015
1015
  this.ownerPlans.set(key, { plan: result, files: sources, planKey });
@@ -1029,7 +1029,7 @@ var RouteManager = class _RouteManager {
1029
1029
  const isUnchanged = (file) => {
1030
1030
  let result = unchanged.get(file);
1031
1031
  if (result === void 0) {
1032
- result = this.planStamps.get(file) === _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, file);
1032
+ result = this.planStamps.get(file) === _chunkOYM6VJEFcjs.getFarmSourceStamp.call(void 0, file);
1033
1033
  unchanged.set(file, result);
1034
1034
  }
1035
1035
  return result;
@@ -1076,7 +1076,7 @@ var RouteManager = class _RouteManager {
1076
1076
  */
1077
1077
  inspectPackages(operation) {
1078
1078
  const file = this.packageClientBoundaryCacheFile;
1079
- return file ? _chunkEBSL5TW7cjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1079
+ return file ? _chunkOYM6VJEFcjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1080
1080
  }
1081
1081
  computeClientManifest(normalizedProjectRoot) {
1082
1082
  const toUrlPath = (absolutePath) => {
@@ -1099,14 +1099,14 @@ var RouteManager = class _RouteManager {
1099
1099
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
1100
1100
  );
1101
1101
  }
1102
- const isolatedMode = _chunkEBSL5TW7cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1102
+ const isolatedMode = _chunkOYM6VJEFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1103
1103
  _optionalChain([this, 'access', _27 => _27.config, 'access', _28 => _28.experimental, 'optionalAccess', _29 => _29.isolatedClientHydration]),
1104
1104
  {
1105
1105
  serverComponents: _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _30 => _30.config, 'access', _31 => _31.experimental, 'optionalAccess', _32 => _32.serverComponents])) === "rsc",
1106
1106
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
1107
1107
  }
1108
1108
  );
1109
- const planOptions = _chunkEBSL5TW7cjs.getFarmClientHydrationPlanOptions.call(void 0,
1109
+ const planOptions = _chunkOYM6VJEFcjs.getFarmClientHydrationPlanOptions.call(void 0,
1110
1110
  this.config.renderer,
1111
1111
  Boolean(unsupportedIntegrationProvider)
1112
1112
  );
@@ -1116,7 +1116,7 @@ var RouteManager = class _RouteManager {
1116
1116
  if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
1117
1117
  edited = /* @__PURE__ */ new Set();
1118
1118
  for (const [file, previous] of _nullishCoalesce(changed, () => ( []))) {
1119
- if (_chunkEBSL5TW7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
1119
+ if (_chunkOYM6VJEFcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
1120
1120
  const source = this.planSourcePath(file);
1121
1121
  if (source) edited.add(source);
1122
1122
  }
@@ -1131,13 +1131,13 @@ var RouteManager = class _RouteManager {
1131
1131
  metadata: this.planRouteModule(
1132
1132
  `layout:${entry.modulePath}`,
1133
1133
  edited,
1134
- () => _chunkEBSL5TW7cjs.getClientModuleHydrationPlan.call(void 0,
1134
+ () => _chunkOYM6VJEFcjs.getClientModuleHydrationPlan.call(void 0,
1135
1135
  entry.modulePath,
1136
1136
  normalizedProjectRoot,
1137
1137
  isolatedMode,
1138
1138
  layoutPlanOptions
1139
1139
  ),
1140
- _chunkEBSL5TW7cjs.getClientModuleHydrationPlanKey.call(void 0,
1140
+ _chunkOYM6VJEFcjs.getClientModuleHydrationPlanKey.call(void 0,
1141
1141
  entry.modulePath,
1142
1142
  normalizedProjectRoot,
1143
1143
  isolatedMode,
@@ -1145,7 +1145,7 @@ var RouteManager = class _RouteManager {
1145
1145
  )
1146
1146
  )
1147
1147
  }));
1148
- const markdownComponentsPlan = _chunkEBSL5TW7cjs.createMarkdownPageHydrationPlanner.call(void 0,
1148
+ const markdownComponentsPlan = _chunkOYM6VJEFcjs.createMarkdownPageHydrationPlanner.call(void 0,
1149
1149
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
1150
1150
  normalizedProjectRoot,
1151
1151
  isolatedMode,
@@ -1161,13 +1161,13 @@ var RouteManager = class _RouteManager {
1161
1161
  metadata: _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
1162
1162
  `page:${entry.modulePath}`,
1163
1163
  edited,
1164
- () => _chunkEBSL5TW7cjs.getClientModuleHydrationPlan.call(void 0,
1164
+ () => _chunkOYM6VJEFcjs.getClientModuleHydrationPlan.call(void 0,
1165
1165
  entry.modulePath,
1166
1166
  normalizedProjectRoot,
1167
1167
  isolatedMode,
1168
1168
  pagePlanOptions
1169
1169
  ),
1170
- _chunkEBSL5TW7cjs.getClientModuleHydrationPlanKey.call(void 0,
1170
+ _chunkOYM6VJEFcjs.getClientModuleHydrationPlanKey.call(void 0,
1171
1171
  entry.modulePath,
1172
1172
  normalizedProjectRoot,
1173
1173
  isolatedMode,
@@ -1197,7 +1197,7 @@ var RouteManager = class _RouteManager {
1197
1197
  `[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
1198
1198
  );
1199
1199
  }
1200
- _chunkEBSL5TW7cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1200
+ _chunkOYM6VJEFcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1201
1201
  layoutEntries.map(({ entry, metadata }) => ({
1202
1202
  pattern: entry.pattern,
1203
1203
  depth: _chunk4B6YJ5DScjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
@@ -1244,7 +1244,7 @@ var RouteManager = class _RouteManager {
1244
1244
  modulePath: toUrlPath(boundary.modulePath)
1245
1245
  }))
1246
1246
  } : {},
1247
- ..._chunkEBSL5TW7cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1247
+ ..._chunkOYM6VJEFcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1248
1248
  renderPlan: _chunk4B6YJ5DScjs.createFarmRouteRenderPlan.call(void 0, {
1249
1249
  pageShouldHydrate: metadata.shouldHydrate,
1250
1250
  layoutShouldHydrate,
@@ -1286,7 +1286,7 @@ var RouteManager = class _RouteManager {
1286
1286
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
1287
1287
  }));
1288
1288
  const slots = Array.from(this.routeSlots.values()).map((entry) => {
1289
- const metadata = _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1289
+ const metadata = _chunkOYM6VJEFcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1290
1290
  return {
1291
1291
  name: entry.name,
1292
1292
  ownerPattern: entry.ownerPattern,
@@ -1302,7 +1302,7 @@ var RouteManager = class _RouteManager {
1302
1302
  };
1303
1303
  });
1304
1304
  const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
1305
- metadata: _chunkEBSL5TW7cjs.getClientModuleHydrationPlan.call(void 0,
1305
+ metadata: _chunkOYM6VJEFcjs.getClientModuleHydrationPlan.call(void 0,
1306
1306
  entry.modulePath,
1307
1307
  normalizedProjectRoot,
1308
1308
  isolatedMode,
@@ -1677,11 +1677,11 @@ var RouteManager = class _RouteManager {
1677
1677
  srcDir: source.srcDir,
1678
1678
  loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
1679
1679
  });
1680
- const graph = this.viteServer ? _chunkEBSL5TW7cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1680
+ const graph = this.viteServer ? _chunkOYM6VJEFcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1681
1681
  for (const { filePath, manifest } of manifests) {
1682
1682
  if (graph) {
1683
1683
  clientRoutes.push(
1684
- _chunkEBSL5TW7cjs.resolveProgrammaticClientRoutes.call(void 0, {
1684
+ _chunkOYM6VJEFcjs.resolveProgrammaticClientRoutes.call(void 0, {
1685
1685
  graph,
1686
1686
  routesFile: toRealPath(filePath),
1687
1687
  routes: manifest.routes,
@@ -3317,7 +3317,7 @@ function inferFarmIslandStrategy(filePath, root) {
3317
3317
  const result = _compiler.inferStrategy.call(void 0, file, code, {
3318
3318
  parse: parseFarmIslandSource,
3319
3319
  resolve: (specifier, importer) => {
3320
- const resolved = _chunkEBSL5TW7cjs.resolveImportedModule.call(void 0, importer, specifier, root);
3320
+ const resolved = _chunkOYM6VJEFcjs.resolveImportedModule.call(void 0, importer, specifier, root);
3321
3321
  return resolved.local ? resolved.path : null;
3322
3322
  }
3323
3323
  });
@@ -3337,7 +3337,7 @@ function inferFarmRouteRootStrategy(owners, root) {
3337
3337
  if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
3338
3338
  return cached.result;
3339
3339
  }
3340
- const { result, files } = _chunkEBSL5TW7cjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3340
+ const { result, files } = _chunkOYM6VJEFcjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3341
3341
  const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
3342
3342
  routeRootInferences.set(key, {
3343
3343
  stamps: [...read].map((file) => [file, modifiedAt(file)]),
@@ -3354,7 +3354,7 @@ function inferRouteRoot(owners, root) {
3354
3354
  const files = [];
3355
3355
  const modules = [];
3356
3356
  for (const owner of owners) {
3357
- const rendered = _chunkEBSL5TW7cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3357
+ const rendered = _chunkOYM6VJEFcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3358
3358
  if (!rendered) {
3359
3359
  return {
3360
3360
  strategy: null,
@@ -3370,7 +3370,7 @@ function inferRouteRoot(owners, root) {
3370
3370
  source = fs2.default.readFileSync(module, "utf8");
3371
3371
  } catch (e11) {
3372
3372
  }
3373
- if (_chunkEBSL5TW7cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3373
+ if (_chunkOYM6VJEFcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3374
3374
  }
3375
3375
  for (const module of modules) {
3376
3376
  const result = inferFarmIslandStrategy(module, root);
@@ -3761,7 +3761,7 @@ var DECLARATION_STATEMENTS = /* @__PURE__ */ new Set([
3761
3761
  function parse(code, file) {
3762
3762
  const extension = path4.default.extname(file).slice(1);
3763
3763
  const lang = extension === "ts" || extension === "mts" || extension === "cts" ? "ts" : extension === "js" || extension === "mjs" || extension === "cjs" || extension === "jsx" ? "jsx" : "tsx";
3764
- return _chunkEBSL5TW7cjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3764
+ return _chunkOYM6VJEFcjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3765
3765
  try {
3766
3766
  return _parseAst.parseAst.call(void 0, code, { lang });
3767
3767
  } catch (e14) {
@@ -3896,14 +3896,14 @@ function isReference(node, parent, key) {
3896
3896
  }
3897
3897
  function readSource(file) {
3898
3898
  try {
3899
- _chunkEBSL5TW7cjs.noteFarmSourceRead.call(void 0, file);
3899
+ _chunkOYM6VJEFcjs.noteFarmSourceRead.call(void 0, file);
3900
3900
  return fs2.default.readFileSync(file, "utf8");
3901
3901
  } catch (e15) {
3902
3902
  return null;
3903
3903
  }
3904
3904
  }
3905
3905
  function explainFarmKeptLayoutRender(modulePath, root) {
3906
- const entry = _chunkEBSL5TW7cjs.resolveModuleSourcePath.call(void 0, modulePath, root);
3906
+ const entry = _chunkOYM6VJEFcjs.resolveModuleSourcePath.call(void 0, modulePath, root);
3907
3907
  if (!entry) return `${modulePath} does not resolve`;
3908
3908
  const visited = /* @__PURE__ */ new Set();
3909
3909
  const check = (file) => {
@@ -3913,7 +3913,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
3913
3913
  if (!SCRIPT_SOURCE.test(file)) return `${path4.default.relative(root, file)} is not a script`;
3914
3914
  const code = readSource(file);
3915
3915
  if (code === null) return `${path4.default.relative(root, file)} cannot be read`;
3916
- const { reason, imports } = _chunkEBSL5TW7cjs.memoizeInFarmSourceSnapshot.call(void 0,
3916
+ const { reason, imports } = _chunkOYM6VJEFcjs.memoizeInFarmSourceSnapshot.call(void 0,
3917
3917
  "kept-layout-module",
3918
3918
  code,
3919
3919
  () => findFarmRequestDecidingConstruct(code, file)
@@ -3926,7 +3926,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
3926
3926
  return `${path4.default.relative(root, file)} imports ${imported.names.join(", ")} from ${imported.source}`;
3927
3927
  }
3928
3928
  if (ASSET_SOURCE.test(imported.source.split("?")[0])) continue;
3929
- const resolved = _chunkEBSL5TW7cjs.resolveImportedModule.call(void 0, file, imported.source, root);
3929
+ const resolved = _chunkOYM6VJEFcjs.resolveImportedModule.call(void 0, file, imported.source, root);
3930
3930
  if (!resolved.path || !resolved.local) {
3931
3931
  return `${path4.default.relative(root, file)} imports ${imported.source}`;
3932
3932
  }
@@ -3941,15 +3941,15 @@ var answers = /* @__PURE__ */ new Map();
3941
3941
  function canFarmSkipKeptLayoutRender(modulePath, root) {
3942
3942
  const key = `${root}\0${modulePath}`;
3943
3943
  const known = answers.get(key);
3944
- if (known && known.stamps.every(([file, stamp]) => _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
3944
+ if (known && known.stamps.every(([file, stamp]) => _chunkOYM6VJEFcjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
3945
3945
  return known.skip;
3946
3946
  }
3947
- const { result, files } = _chunkEBSL5TW7cjs.traceFarmSourceReads.call(void 0,
3947
+ const { result, files } = _chunkOYM6VJEFcjs.traceFarmSourceReads.call(void 0,
3948
3948
  () => explainFarmKeptLayoutRender(modulePath, root) === null
3949
3949
  );
3950
3950
  answers.set(key, {
3951
3951
  skip: result,
3952
- stamps: files.map((file) => [file, _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, file)])
3952
+ stamps: files.map((file) => [file, _chunkOYM6VJEFcjs.getFarmSourceStamp.call(void 0, file)])
3953
3953
  });
3954
3954
  return result;
3955
3955
  }
@@ -4077,7 +4077,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
4077
4077
  function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
4078
4078
  if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
4079
4079
  warnedSuppressedAsyncHydrationModules.add(modulePath);
4080
- _chunk7U4XF76Rcjs.logger.warn(_chunkEBSL5TW7cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
4080
+ _chunk7U4XF76Rcjs.logger.warn(_chunkOYM6VJEFcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
4081
4081
  }
4082
4082
  var fullDocumentRoutes = /* @__PURE__ */ new Set();
4083
4083
  var documentLayouts = /* @__PURE__ */ new WeakMap();
@@ -5393,7 +5393,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5393
5393
  const routeManifestEntry = routeManifest.routes.find(
5394
5394
  (entry) => entry.pattern === route.pattern
5395
5395
  );
5396
- const moduleMetadata = routeManifestEntry || _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5396
+ const moduleMetadata = routeManifestEntry || _chunkOYM6VJEFcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5397
5397
  const isClientComponent = moduleMetadata.isClientComponent;
5398
5398
  const renderedRouteSlots = await Promise.all(
5399
5399
  routeSlots.map(async (slot) => {
@@ -6215,7 +6215,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6215
6215
  if (this.routeManager.matchRoute(_chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
6216
6216
  _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkW53Z4WDIcjs.createFarmDefaultMCPServer.call(void 0,
6217
6217
  readAppPackageIdentity(this.config.root),
6218
- _chunkCVZY4TLWcjs.FARM_VERSION
6218
+ _chunk3HWNYLQVcjs.FARM_VERSION
6219
6219
  ))));
6220
6220
  return _chunkW53Z4WDIcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
6221
6221
  }
@@ -6309,7 +6309,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6309
6309
  pages,
6310
6310
  config,
6311
6311
  rootMetadata,
6312
- mcp: _optionalChain([this, 'access', _242 => _242.config, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.aiCatalog]) === false ? [] : _chunk22BTYPIXcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6312
+ mcp: _optionalChain([this, 'access', _242 => _242.config, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.aiCatalog]) === false ? [] : _chunkTOUC6BR3cjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6313
6313
  basePath: this.config.basePath,
6314
6314
  apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
6315
6315
  _chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
@@ -7337,7 +7337,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7337
7337
  stack: _optionalChain([diagnostics, 'optionalAccess', _325 => _325.stack]),
7338
7338
  sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _326 => _326.sourceFrame]),
7339
7339
  development: isDev,
7340
- farmVersion: _chunkCVZY4TLWcjs.FARM_VERSION,
7340
+ farmVersion: _chunk3HWNYLQVcjs.FARM_VERSION,
7341
7341
  nodeVersion: process.version,
7342
7342
  mode: isDev ? "development" : "production"
7343
7343
  })
@@ -18,7 +18,7 @@ var _chunkHR5GU4UUcjs = require('./chunk-HR5GU4UU.cjs');
18
18
  var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
19
19
 
20
20
 
21
- var _chunkBOEDYXAXcjs = require('./chunk-BOEDYXAX.cjs');
21
+ var _chunkBBX4RPOVcjs = require('./chunk-BBX4RPOV.cjs');
22
22
 
23
23
 
24
24
 
@@ -599,7 +599,7 @@ async function resolveAPIContext(options) {
599
599
  config: options.config,
600
600
  configPath: options.configPath
601
601
  }));
602
- const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkBOEDYXAXcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
602
+ const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkBBX4RPOVcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
603
603
  const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _25 => _25.guardedPaths]), () => ( [])));
604
604
  return {
605
605
  root,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readAliases,
3
3
  resolveFile
4
- } from "./chunk-BZY3SRRD.mjs";
4
+ } from "./chunk-CDZ55QRD.mjs";
5
5
  import {
6
6
  transformFarmServerFns
7
7
  } from "./chunk-GNZIAJGB.mjs";
@@ -28,7 +28,7 @@ var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
28
28
  var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
29
29
 
30
30
 
31
- var _chunkCVZY4TLWcjs = require('./chunk-CVZY4TLW.cjs');
31
+ var _chunk3HWNYLQVcjs = require('./chunk-3HWNYLQV.cjs');
32
32
 
33
33
  // src/environment-vite.ts
34
34
  var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
@@ -863,6 +863,7 @@ function farmReactServerBuildReachesClientModules(importer, specifier, serverImp
863
863
  var IMPORT_SPECIFIER = /(?:\bfrom\s*|\bimport\s*\(?\s*)["']([^"'./][^"']*)["']/g;
864
864
  var STYLESHEET_IMPORT = /(?:\bfrom\s*|\bimport\s*\(?\s*|\brequire\s*\(\s*)["'][^"']+\.(?:css|scss|sass|less|styl)["']/;
865
865
  var MAX_SCANNED_FILES = 2e3;
866
+ var FARM_FONT_MODULE = "@farm.js/core/font";
866
867
  var packageScans = /* @__PURE__ */ new Map();
867
868
  var PACKAGE_SCAN_CACHE_SCHEMA = 1;
868
869
  var packageScanStamps = /* @__PURE__ */ new Map();
@@ -885,7 +886,7 @@ function usePackageScanCacheFile(file) {
885
886
  const stored = /* @__PURE__ */ new Map();
886
887
  try {
887
888
  const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
888
- if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkCVZY4TLWcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
889
+ if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunk3HWNYLQVcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
889
890
  for (const [directory, scan] of Object.entries(value.scans)) {
890
891
  if (isStoredPackageScan(scan)) stored.set(directory, scan);
891
892
  }
@@ -914,7 +915,7 @@ function persistPackageScanCache() {
914
915
  _fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
915
916
  _fs2.default.writeFileSync(
916
917
  temporary,
917
- JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkCVZY4TLWcjs.FARM_VERSION, scans })
918
+ JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunk3HWNYLQVcjs.FARM_VERSION, scans })
918
919
  );
919
920
  _fs2.default.renameSync(temporary, cache2.file);
920
921
  cache2.dirty = false;
@@ -987,7 +988,10 @@ function findFarmServerBundledPackage(importer, specifier) {
987
988
  } catch (e17) {
988
989
  return null;
989
990
  }
990
- return scanPackage(directory).stylesheets ? { name: parsed.name, prebundle: false } : null;
991
+ const scan = scanPackage(directory);
992
+ if (scan.imports.has(FARM_FONT_MODULE))
993
+ return { name: parsed.name, prebundle: false, fonts: true };
994
+ return scan.stylesheets ? { name: parsed.name, prebundle: false } : null;
991
995
  }
992
996
  function isSelfContainedPackage(manifest, importer) {
993
997
  if (Object.keys(_nullishCoalesce(manifest.dependencies, () => ( {}))).length > 0) return false;
@@ -2214,7 +2218,7 @@ var PackageClientBoundaryCache = class {
2214
2218
  }
2215
2219
  const contents = JSON.stringify({
2216
2220
  schema: SCHEMA_VERSION,
2217
- farm: _chunkCVZY4TLWcjs.FARM_VERSION,
2221
+ farm: _chunk3HWNYLQVcjs.FARM_VERSION,
2218
2222
  paths,
2219
2223
  entries
2220
2224
  });
@@ -2254,7 +2258,7 @@ function readStoredCache(file) {
2254
2258
  } catch (e37) {
2255
2259
  return null;
2256
2260
  }
2257
- if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkCVZY4TLWcjs.FARM_VERSION) {
2261
+ if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunk3HWNYLQVcjs.FARM_VERSION) {
2258
2262
  return null;
2259
2263
  }
2260
2264
  const { paths, entries } = value;
@@ -2265,7 +2269,7 @@ function readStoredCache(file) {
2265
2269
  const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
2266
2270
  if (usable.length > 0) valid[key] = usable;
2267
2271
  }
2268
- return { schema: SCHEMA_VERSION, farm: _chunkCVZY4TLWcjs.FARM_VERSION, paths, entries: valid };
2272
+ return { schema: SCHEMA_VERSION, farm: _chunk3HWNYLQVcjs.FARM_VERSION, paths, entries: valid };
2269
2273
  }
2270
2274
  function isRecord(value) {
2271
2275
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -4341,6 +4345,11 @@ function resolveFarmClientOptimizeDeps(directory, root) {
4341
4345
  const exclude = /* @__PURE__ */ new Set();
4342
4346
  const imports = scanFarmPackageImports(directory, root);
4343
4347
  for (const specifier of imports.client) {
4348
+ const fonts = findFarmServerBundledPackage(importer, specifier);
4349
+ if (_optionalChain([fonts, 'optionalAccess', _260 => _260.fonts])) {
4350
+ exclude.add(fonts.name);
4351
+ continue;
4352
+ }
4344
4353
  const manifest = findFarmPackageManifest(importer, specifier);
4345
4354
  if (manifest && farmReactServerBuildReachesClientModules(importer, specifier, imports.server.has(specifier))) {
4346
4355
  exclude.add(manifest.name);
@@ -4413,13 +4422,13 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4413
4422
  let projectRoot = process.cwd();
4414
4423
  let sources;
4415
4424
  const routeSourceFiles = () => {
4416
- const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _260 => _260.getProgrammaticClientRoutes, 'call', _261 => _261()]);
4417
- if (_optionalChain([sources, 'optionalAccess', _262 => _262.for]) !== clientRoutes || !sources) {
4425
+ const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _261 => _261.getProgrammaticClientRoutes, 'call', _262 => _262()]);
4426
+ if (_optionalChain([sources, 'optionalAccess', _263 => _263.for]) !== clientRoutes || !sources) {
4418
4427
  sources = {
4419
4428
  for: clientRoutes,
4420
4429
  files: /* @__PURE__ */ new Set([
4421
4430
  ...routesFiles,
4422
- ...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _263 => _263.routeSourceFiles]), () => ( []))].map(resolvedFile)
4431
+ ...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _264 => _264.routeSourceFiles]), () => ( []))].map(resolvedFile)
4423
4432
  ])
4424
4433
  };
4425
4434
  }
@@ -4440,7 +4449,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4440
4449
  configResolved(config) {
4441
4450
  isBuild = config.command === "build";
4442
4451
  projectRoot = config.root;
4443
- farmApi = _optionalChain([config, 'access', _264 => _264.plugins, 'access', _265 => _265.find, 'call', _266 => _266((plugin) => plugin.name === "farm"), 'optionalAccess', _267 => _267.api]);
4452
+ farmApi = _optionalChain([config, 'access', _265 => _265.plugins, 'access', _266 => _266.find, 'call', _267 => _267((plugin) => plugin.name === "farm"), 'optionalAccess', _268 => _268.api]);
4444
4453
  sources = void 0;
4445
4454
  routesFiles = new Set(
4446
4455
  _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
@@ -4453,7 +4462,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4453
4462
  transform(code, id, transformOptions) {
4454
4463
  const environment = resolveBuildEnvironment(
4455
4464
  this,
4456
- _optionalChain([transformOptions, 'optionalAccess', _268 => _268.ssr])
4465
+ _optionalChain([transformOptions, 'optionalAccess', _269 => _269.ssr])
4457
4466
  );
4458
4467
  const parse3 = (source) => this.parse(source);
4459
4468
  const result = transformEnvironmentFunctions({
@@ -4466,7 +4475,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4466
4475
  if (environment === "client" && !isBuild && !_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
4467
4476
  this.error(routeSourceError(moduleFile(id)));
4468
4477
  }
4469
- if (environment === "server" && _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _269 => _269.experimental, 'optionalAccess', _270 => _270.serverComponents])) === "islands" && isApplicationScript(id)) {
4478
+ if (environment === "server" && _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _270 => _270.experimental, 'optionalAccess', _271 => _271.serverComponents])) === "islands" && isApplicationScript(id)) {
4470
4479
  const file = id.split("?", 1)[0];
4471
4480
  const root = _fs.realpathSync.call(void 0, _nullishCoalesce(options.root, () => ( projectRoot)));
4472
4481
  const clientCode = getFarmClientReachableModules(root, root).has(_path2.default.resolve(file)) || _fs.existsSync.call(void 0, file) && hasUseClientDirective(_fs.readFileSync.call(void 0, file, "utf8"));
@@ -4500,7 +4509,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4500
4509
  for (const id of this.getModuleIds()) {
4501
4510
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4502
4511
  const chain = findClientNodeBuiltinChain(id, (moduleId) => {
4503
- return _optionalChain([this, 'access', _271 => _271.getModuleInfo, 'call', _272 => _272(moduleId), 'optionalAccess', _273 => _273.importedIds]);
4512
+ return _optionalChain([this, 'access', _272 => _272.getModuleInfo, 'call', _273 => _273(moduleId), 'optionalAccess', _274 => _274.importedIds]);
4504
4513
  });
4505
4514
  if (chain) {
4506
4515
  this.error(
@@ -4518,8 +4527,8 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4518
4527
  }
4519
4528
  if (!forbidden.has(moduleFile(id))) continue;
4520
4529
  const info = this.getModuleInfo(id);
4521
- if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _274 => _274.code]))) continue;
4522
- this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _275 => _275.importers, 'access', _276 => _276.map, 'call', _277 => _277(moduleFile)])));
4530
+ if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _275 => _275.code]))) continue;
4531
+ this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _276 => _276.importers, 'access', _277 => _277.map, 'call', _278 => _278(moduleFile)])));
4523
4532
  }
4524
4533
  }
4525
4534
  };
@@ -4538,8 +4547,8 @@ function resolvedFile(filePath) {
4538
4547
  }
4539
4548
  }
4540
4549
  function resolveBuildEnvironment(context, ssr) {
4541
- if (_optionalChain([context, 'access', _278 => _278.environment, 'optionalAccess', _279 => _279.name]) === "client") return "client";
4542
- if (_optionalChain([context, 'access', _280 => _280.environment, 'optionalAccess', _281 => _281.name]) === "rsc" || _optionalChain([context, 'access', _282 => _282.environment, 'optionalAccess', _283 => _283.name]) === "ssr") {
4550
+ if (_optionalChain([context, 'access', _279 => _279.environment, 'optionalAccess', _280 => _280.name]) === "client") return "client";
4551
+ if (_optionalChain([context, 'access', _281 => _281.environment, 'optionalAccess', _282 => _282.name]) === "rsc" || _optionalChain([context, 'access', _283 => _283.environment, 'optionalAccess', _284 => _284.name]) === "ssr") {
4543
4552
  return "server";
4544
4553
  }
4545
4554
  return ssr ? "server" : "client";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FARM_VERSION
3
- } from "./chunk-I5CVJ24H.mjs";
3
+ } from "./chunk-XIXAUXV3.mjs";
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -18,14 +18,14 @@ var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
18
18
  var _chunkWMRGIQTAcjs = require('./chunk-WMRGIQTA.cjs');
19
19
 
20
20
 
21
- var _chunkCVZY4TLWcjs = require('./chunk-CVZY4TLW.cjs');
21
+ var _chunk3HWNYLQVcjs = require('./chunk-3HWNYLQV.cjs');
22
22
 
23
23
  // src/mobile/analyzer.ts
24
24
  var _crypto = require('crypto');
25
25
  var _fs = require('fs');
26
26
  var _promises = require('fs/promises');
27
27
  var _path = require('path'); var path = _interopRequireWildcard(_path);
28
- var ANALYZER_VERSION = `8:${_chunkCVZY4TLWcjs.FARM_VERSION}`;
28
+ var ANALYZER_VERSION = `8:${_chunk3HWNYLQVcjs.FARM_VERSION}`;
29
29
  var INTRINSIC_KINDS = {};
30
30
  for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
31
31
  INTRINSIC_KINDS[tag] = "View";
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkOP7BIEUWcjs = require('./chunk-OP7BIEUW.cjs');
4
+ var _chunkQ7GB3I4Ocjs = require('./chunk-Q7GB3I4O.cjs');
5
5
 
6
6
 
7
7
  var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
@@ -64,7 +64,7 @@ function findFarmNativeScreenFiles(appDirs) {
64
64
  }
65
65
  function collectFarmNativeServerFns(options) {
66
66
  const { root, srcDir } = options;
67
- const aliases = _chunkOP7BIEUWcjs.readAliases.call(void 0, root, srcDir);
67
+ const aliases = _chunkQ7GB3I4Ocjs.readAliases.call(void 0, root, srcDir);
68
68
  const seen = /* @__PURE__ */ new Set();
69
69
  const found = /* @__PURE__ */ new Map();
70
70
  const queue = [...options.entries];
@@ -98,7 +98,7 @@ function collectFarmNativeServerFns(options) {
98
98
  }
99
99
  }
100
100
  for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
101
- const resolved = _chunkOP7BIEUWcjs.resolveFile.call(void 0, candidate);
101
+ const resolved = _chunkQ7GB3I4Ocjs.resolveFile.call(void 0, candidate);
102
102
  if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
103
103
  queue.push(resolved);
104
104
  break;