@farm.js/core 0.1.83 → 0.1.84

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 (95) hide show
  1. package/dist/{analyzer-Y6IY26HI.mjs → analyzer-7RNO3XKC.mjs} +2 -2
  2. package/dist/analyzer-PFKA5NI6.cjs +17 -0
  3. package/dist/{chunk-WCSBYQOT.cjs → chunk-22BTYPIX.cjs} +4 -4
  4. package/dist/{chunk-NGTZHWBG.cjs → chunk-3OKSEJ33.cjs} +31 -10
  5. package/dist/{chunk-VQ6IXALL.mjs → chunk-3WM7VBGW.mjs} +2 -2
  6. package/dist/{chunk-IABI62FH.cjs → chunk-57EEWWUS.cjs} +2 -2
  7. package/dist/{chunk-7X2CYE66.cjs → chunk-5I4ZGKP2.cjs} +255 -199
  8. package/dist/{chunk-RGTZAM6Y.mjs → chunk-BCCCPFHQ.mjs} +25 -4
  9. package/dist/{chunk-55UJGUBP.cjs → chunk-BOEDYXAX.cjs} +13 -13
  10. package/dist/{chunk-DPUZVGXH.mjs → chunk-BRDGINBB.mjs} +31 -28
  11. package/dist/{chunk-FFWSER54.mjs → chunk-BZY3SRRD.mjs} +1 -1
  12. package/dist/{chunk-3CZ4MJHW.cjs → chunk-CVZY4TLW.cjs} +1 -1
  13. package/dist/{chunk-IAIRQAHA.mjs → chunk-CWUQBECF.mjs} +1 -1
  14. package/dist/{chunk-WZV2G2A6.mjs → chunk-DFDQGHPU.mjs} +83 -27
  15. package/dist/{chunk-SLIXHUMS.cjs → chunk-DSWSDDP2.cjs} +230 -201
  16. package/dist/{chunk-EFI6QWBQ.cjs → chunk-EBSL5TW7.cjs} +15 -15
  17. package/dist/{chunk-U56Z3755.mjs → chunk-EDBIBO67.mjs} +9 -9
  18. package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
  19. package/dist/{chunk-5X5GJU5A.cjs → chunk-GLNVLCUH.cjs} +6 -6
  20. package/dist/{chunk-DZTWUEBB.cjs → chunk-HOQ2MYBJ.cjs} +10 -10
  21. package/dist/{chunk-NKVBWPXR.mjs → chunk-I5CVJ24H.mjs} +1 -1
  22. package/dist/{chunk-R3VLM2MW.mjs → chunk-INU4K4U4.mjs} +5 -5
  23. package/dist/{chunk-43N3X6OO.mjs → chunk-IRJSZAJB.mjs} +1 -1
  24. package/dist/{chunk-NDWI6FDH.mjs → chunk-KXVMWLTC.mjs} +59 -30
  25. package/dist/{chunk-HRH7OKBQ.cjs → chunk-L3BSHASB.cjs} +4 -4
  26. package/dist/{chunk-ELNRKD4V.mjs → chunk-L5HDCDFT.mjs} +1 -1
  27. package/dist/{chunk-RNJX3MD6.mjs → chunk-M5XU22PQ.mjs} +1 -1
  28. package/dist/chunk-MAPHNGTF.cjs +98 -0
  29. package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
  30. package/dist/{chunk-ORBBAA7B.mjs → chunk-MUUDHWQZ.mjs} +1 -1
  31. package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
  32. package/dist/{chunk-K3GHY7GY.mjs → chunk-NLHSKKTT.mjs} +1 -1
  33. package/dist/{chunk-JHRJ5V2F.cjs → chunk-OFVBMS6I.cjs} +165 -162
  34. package/dist/{chunk-3DAJXBSL.cjs → chunk-OP7BIEUW.cjs} +2 -2
  35. package/dist/chunk-RJBUI5AN.mjs +18 -0
  36. package/dist/chunk-RQ6XX5IN.mjs +98 -0
  37. package/dist/{chunk-LN6FAYNB.cjs → chunk-USMRAC72.cjs} +2 -2
  38. package/dist/{chunk-B5SJYXJK.mjs → chunk-XLULEFRW.mjs} +6 -6
  39. package/dist/{chunk-A5BHJHDF.cjs → chunk-YU6VL7H5.cjs} +3 -3
  40. package/dist/{chunk-OM6JIIJU.cjs → chunk-Z37PDUJR.cjs} +4 -4
  41. package/dist/{devtools-ZM2AR36W.cjs → devtools-4SVIRV4P.cjs} +6 -6
  42. package/dist/{devtools-OI52TCSD.mjs → devtools-MWQA5LVN.mjs} +4 -4
  43. package/dist/docs.cjs +6 -6
  44. package/dist/docs.mjs +5 -5
  45. package/dist/environment/vite.cjs +5 -5
  46. package/dist/environment/vite.mjs +4 -4
  47. package/dist/index.cjs +25 -24
  48. package/dist/index.mjs +24 -23
  49. package/dist/internal/build-runtime.cjs +26 -25
  50. package/dist/internal/build-runtime.mjs +25 -24
  51. package/dist/internal/cli-runtime.cjs +8 -8
  52. package/dist/internal/cli-runtime.mjs +7 -7
  53. package/dist/internal/client-error-overlay.cjs +4 -4
  54. package/dist/internal/client-error-overlay.mjs +1 -1
  55. package/dist/internal/client-runtime.d.mts +3 -37
  56. package/dist/internal/client-runtime.d.ts +3 -37
  57. package/dist/internal/config-runtime.cjs +6 -6
  58. package/dist/internal/config-runtime.mjs +5 -5
  59. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  60. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  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 +13 -13
  66. package/dist/internal/production-runtime.mjs +19 -19
  67. package/dist/internal/renderer-islands.cjs +47 -0
  68. package/dist/internal/renderer-islands.d.mts +32 -0
  69. package/dist/internal/renderer-islands.d.ts +32 -0
  70. package/dist/internal/renderer-islands.mjs +47 -0
  71. package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
  72. package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
  73. package/dist/plugin.cjs +20 -19
  74. package/dist/plugin.mjs +19 -18
  75. package/dist/renderer.cjs +8 -2
  76. package/dist/renderer.d.mts +81 -1
  77. package/dist/renderer.d.ts +81 -1
  78. package/dist/renderer.mjs +7 -1
  79. package/dist/{rsc-pipeline-MFJZGDPE.cjs → rsc-pipeline-OWBEZ7HB.cjs} +9 -9
  80. package/dist/{rsc-pipeline-TRZVFCBX.mjs → rsc-pipeline-UT3Z2GDO.mjs} +8 -8
  81. package/dist/{runtime-O4Y3Z6V3.mjs → runtime-F5I3WY3B.mjs} +10 -11
  82. package/dist/{runtime-MJUG2HGR.cjs → runtime-SRMQ46SK.cjs} +13 -14
  83. package/dist/server.cjs +50 -50
  84. package/dist/server.mjs +28 -28
  85. package/dist/version.cjs +2 -2
  86. package/dist/version.mjs +1 -1
  87. package/dist/vite.cjs +20 -19
  88. package/dist/vite.d.mts +6 -0
  89. package/dist/vite.d.ts +6 -0
  90. package/dist/vite.mjs +19 -18
  91. package/package.json +8 -3
  92. package/dist/analyzer-WGH6J2HN.cjs +0 -17
  93. package/dist/chunk-4QENVMG7.mjs +0 -34
  94. package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
  95. package/dist/{chunk-CA2HBLXP.mjs → chunk-4EEAPBNV.mjs} +3 -3
@@ -7,8 +7,7 @@ var _chunkWMRGIQTAcjs = require('./chunk-WMRGIQTA.cjs');
7
7
  var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
8
8
 
9
9
 
10
-
11
- var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
10
+ var _chunkMNUYXZV7cjs = require('./chunk-MNUYXZV7.cjs');
12
11
 
13
12
 
14
13
  var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
@@ -17,7 +16,8 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
17
16
 
18
17
 
19
18
 
20
- var _chunkNGTZHWBGcjs = require('./chunk-NGTZHWBG.cjs');
19
+
20
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
21
21
 
22
22
 
23
23
 
@@ -28,7 +28,7 @@ var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
28
28
  var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
29
29
 
30
30
 
31
- var _chunk3CZ4MJHWcjs = require('./chunk-3CZ4MJHW.cjs');
31
+ var _chunkCVZY4TLWcjs = require('./chunk-CVZY4TLW.cjs');
32
32
 
33
33
  // src/environment-vite.ts
34
34
  var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
@@ -885,7 +885,7 @@ function usePackageScanCacheFile(file) {
885
885
  const stored = /* @__PURE__ */ new Map();
886
886
  try {
887
887
  const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
888
- if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunk3CZ4MJHWcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
888
+ if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkCVZY4TLWcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
889
889
  for (const [directory, scan] of Object.entries(value.scans)) {
890
890
  if (isStoredPackageScan(scan)) stored.set(directory, scan);
891
891
  }
@@ -914,7 +914,7 @@ function persistPackageScanCache() {
914
914
  _fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
915
915
  _fs2.default.writeFileSync(
916
916
  temporary,
917
- JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunk3CZ4MJHWcjs.FARM_VERSION, scans })
917
+ JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkCVZY4TLWcjs.FARM_VERSION, scans })
918
918
  );
919
919
  _fs2.default.renameSync(temporary, cache2.file);
920
920
  cache2.dirty = false;
@@ -2214,7 +2214,7 @@ var PackageClientBoundaryCache = class {
2214
2214
  }
2215
2215
  const contents = JSON.stringify({
2216
2216
  schema: SCHEMA_VERSION,
2217
- farm: _chunk3CZ4MJHWcjs.FARM_VERSION,
2217
+ farm: _chunkCVZY4TLWcjs.FARM_VERSION,
2218
2218
  paths,
2219
2219
  entries
2220
2220
  });
@@ -2254,7 +2254,7 @@ function readStoredCache(file) {
2254
2254
  } catch (e37) {
2255
2255
  return null;
2256
2256
  }
2257
- if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunk3CZ4MJHWcjs.FARM_VERSION) {
2257
+ if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkCVZY4TLWcjs.FARM_VERSION) {
2258
2258
  return null;
2259
2259
  }
2260
2260
  const { paths, entries } = value;
@@ -2265,7 +2265,7 @@ function readStoredCache(file) {
2265
2265
  const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
2266
2266
  if (usable.length > 0) valid[key] = usable;
2267
2267
  }
2268
- return { schema: SCHEMA_VERSION, farm: _chunk3CZ4MJHWcjs.FARM_VERSION, paths, entries: valid };
2268
+ return { schema: SCHEMA_VERSION, farm: _chunkCVZY4TLWcjs.FARM_VERSION, paths, entries: valid };
2269
2269
  }
2270
2270
  function isRecord(value) {
2271
2271
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -2413,7 +2413,7 @@ function readOwnHydration(scope, content, file) {
2413
2413
  try {
2414
2414
  value = scope.renderer.hydration.resolve(content, file);
2415
2415
  } catch (error) {
2416
- throw _chunkNGTZHWBGcjs.createFarmRendererHookError.call(void 0,
2416
+ throw _chunk3OKSEJ33cjs.createFarmRendererHookError.call(void 0,
2417
2417
  `${where} threw: ${error instanceof Error ? error.message : String(error)}`,
2418
2418
  error
2419
2419
  );
@@ -2424,7 +2424,7 @@ function readOwnHydration(scope, content, file) {
2424
2424
  `${where} returned ${JSON.stringify(value)}. Return \`{ hydrate?, strategy? }\`, or nothing to leave the file to Farm.`
2425
2425
  );
2426
2426
  }
2427
- return _chunkNGTZHWBGcjs.readFarmRendererHydration.call(void 0, value, where);
2427
+ return _chunk3OKSEJ33cjs.readFarmRendererHydration.call(void 0, value, where);
2428
2428
  }
2429
2429
 
2430
2430
  // src/utils/client-component.ts
@@ -2524,7 +2524,7 @@ function resolveModuleSourcePath(modulePath, root) {
2524
2524
  return null;
2525
2525
  }
2526
2526
  function getFarmClientHydrationPlanOptions(renderer, hasUnsupportedIntegrationProvider) {
2527
- return { asyncOwnerIslands: _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) && !hasUnsupportedIntegrationProvider };
2527
+ return { asyncOwnerIslands: _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && !hasUnsupportedIntegrationProvider };
2528
2528
  }
2529
2529
  function describeSuppressedAsyncHydration(subject, reason) {
2530
2530
  const remediation = reason ? "Fix the reason above, or render the interactive UI from a synchronous owner." : 'Move the interactive UI into an eligible "use client" boundary, or render it from a synchronous owner.';
@@ -3940,7 +3940,7 @@ function getProjectImportAliases(projectRoot) {
3940
3940
  return "-";
3941
3941
  }
3942
3942
  }).join(":");
3943
- const sourceDir = _chunkRE5E2G5Scjs.getFarmProjectSourceDir.call(void 0, projectRoot);
3943
+ const sourceDir = _chunkMNUYXZV7cjs.getFarmProjectSourceDir.call(void 0, projectRoot);
3944
3944
  const cacheStamp = `${stamp}:${sourceDir}`;
3945
3945
  const cached = projectImportAliasCache.get(projectRoot);
3946
3946
  if (_optionalChain([cached, 'optionalAccess', _241 => _241.stamp]) === cacheStamp) return cached.aliases;
@@ -4406,7 +4406,7 @@ function transformEnvironmentFunctions(options) {
4406
4406
  function farmEnvironmentFunctionsPlugin(options = {}) {
4407
4407
  let routesFiles = /* @__PURE__ */ new Set();
4408
4408
  const componentExtensions = new Set(
4409
- _chunkNGTZHWBGcjs.getFarmRendererComponentExtensions.call(void 0, options.renderer || void 0)
4409
+ _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions.call(void 0, options.renderer || void 0)
4410
4410
  );
4411
4411
  let farmApi;
4412
4412
  let isBuild = false;
@@ -4466,7 +4466,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4466
4466
  if (environment === "client" && !isBuild && !_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
4467
4467
  this.error(routeSourceError(moduleFile(id)));
4468
4468
  }
4469
- if (environment === "server" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _269 => _269.experimental, 'optionalAccess', _270 => _270.serverComponents])) === "islands" && isApplicationScript(id)) {
4469
+ if (environment === "server" && _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _269 => _269.experimental, 'optionalAccess', _270 => _270.serverComponents])) === "islands" && isApplicationScript(id)) {
4470
4470
  const file = id.split("?", 1)[0];
4471
4471
  const root = _fs.realpathSync.call(void 0, _nullishCoalesce(options.root, () => ( projectRoot)));
4472
4472
  const clientCode = getFarmClientReachableModules(root, root).has(_path2.default.resolve(file)) || _fs.existsSync.call(void 0, file) && hasUseClientDirective(_fs.readFileSync.call(void 0, file, "utf8"));
@@ -22,11 +22,6 @@ import {
22
22
  resolveFarmNoindexPreviews,
23
23
  resolveFarmPerformanceConfig
24
24
  } from "./chunk-NQ3Y6E2T.mjs";
25
- import {
26
- farmCspBlocksFrameworkInlineScripts,
27
- getFarmSecurityHeader,
28
- resolveFarmSecurityConfig
29
- } from "./chunk-22W4FNTG.mjs";
30
25
  import {
31
26
  resolveFarmAppManifestConfig
32
27
  } from "./chunk-SQ5O7I3L.mjs";
@@ -34,9 +29,13 @@ import {
34
29
  resolveFarmLlmsTxtConfig
35
30
  } from "./chunk-XGL42MQ7.mjs";
36
31
  import {
37
- resolveFarmServerComponentsMode,
32
+ farmCspBlocksFrameworkInlineScripts,
33
+ getFarmSecurityHeader,
34
+ resolveFarmSecurityConfig
35
+ } from "./chunk-22W4FNTG.mjs";
36
+ import {
38
37
  setFarmProjectSourceDir
39
- } from "./chunk-4QENVMG7.mjs";
38
+ } from "./chunk-RJBUI5AN.mjs";
40
39
  import {
41
40
  loadFarmConfigFile,
42
41
  resolveFarmLayers
@@ -44,8 +43,9 @@ import {
44
43
  import {
45
44
  isFarmRendererDisabled,
46
45
  isReactRenderer,
47
- resolveFarmRenderer
48
- } from "./chunk-RGTZAM6Y.mjs";
46
+ resolveFarmRenderer,
47
+ resolveFarmServerComponentsMode
48
+ } from "./chunk-BCCCPFHQ.mjs";
49
49
  import {
50
50
  resolveFarmImageConfig
51
51
  } from "./chunk-AOIUYHPH.mjs";
@@ -1,7 +1,7 @@
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 _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
4
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
5
5
 
6
6
 
7
7
  var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
@@ -34,7 +34,7 @@ var FARM_RSC_IGNORED_KEYS = [
34
34
  "observability"
35
35
  ];
36
36
  function farmConfigUsesServerComponents(config) {
37
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'optionalAccess', _ => _.experimental, 'optionalAccess', _2 => _2.serverComponents])) === "rsc";
37
+ return _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'optionalAccess', _ => _.experimental, 'optionalAccess', _2 => _2.serverComponents])) === "rsc";
38
38
  }
39
39
  function findFarmAppPackageDir(root, packageName) {
40
40
  for (let dir = _path2.default.resolve(root); ; dir = _path2.default.dirname(dir)) {
@@ -54,9 +54,9 @@ function isSet(value, key) {
54
54
  }
55
55
  function inspectFarmServerComponents(config, root) {
56
56
  const value = _optionalChain([config, 'optionalAccess', _4 => _4.experimental, 'optionalAccess', _5 => _5.serverComponents]);
57
- const mode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, value);
57
+ const mode = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, value);
58
58
  const enabled = mode === "rsc";
59
- const explicit = enabled && _chunkRE5E2G5Scjs.isExplicitFarmServerComponentsMode.call(void 0, value);
59
+ const explicit = enabled && _chunk3OKSEJ33cjs.isExplicitFarmServerComponentsMode.call(void 0, value);
60
60
  const missingPackages = enabled ? FARM_RSC_PACKAGES.filter((name) => !findFarmAppPackageDir(root, name)) : [];
61
61
  return {
62
62
  mode,
@@ -5,7 +5,7 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunkNGTZHWBGcjs = require('./chunk-NGTZHWBG.cjs');
8
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
9
9
 
10
10
 
11
11
  var _chunk2BEGVSDFcjs = require('./chunk-2BEGVSDF.cjs');
@@ -80,7 +80,7 @@ async function resolveFarmRendererRoutes(options) {
80
80
  );
81
81
  }
82
82
  const extensions = [
83
- ..._chunkNGTZHWBGcjs.resolveFarmComponentExtensions.call(void 0, renderer.componentExtensions),
83
+ ..._chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, renderer.componentExtensions),
84
84
  ".md",
85
85
  ".mdx"
86
86
  ];
@@ -105,7 +105,7 @@ async function resolveFarmRendererRoutes(options) {
105
105
  try {
106
106
  rule = resolve2.call(rules, file);
107
107
  } catch (error) {
108
- throw _chunkNGTZHWBGcjs.createFarmRendererHookError.call(void 0,
108
+ throw _chunk3OKSEJ33cjs.createFarmRendererHookError.call(void 0,
109
109
  `${where} threw while resolving ${modulePath}: ${error instanceof Error ? error.message : String(error)}`,
110
110
  error
111
111
  );
@@ -153,7 +153,7 @@ function readRouteRule(rule, where, extension, modulePath) {
153
153
  try {
154
154
  _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, routeFile);
155
155
  } catch (error) {
156
- throw _chunkNGTZHWBGcjs.createFarmRendererHookError.call(void 0,
156
+ throw _chunk3OKSEJ33cjs.createFarmRendererHookError.call(void 0,
157
157
  `${where} returned \`pattern: ${JSON.stringify(pattern)}\`: ${error instanceof Error ? error.message : String(error)}`,
158
158
  error
159
159
  );
@@ -163,7 +163,7 @@ function readRouteRule(rule, where, extension, modulePath) {
163
163
  pattern,
164
164
  routeFile,
165
165
  modulePath,
166
- hydration: _chunkNGTZHWBGcjs.readFarmRendererHydration.call(void 0, value, where)
166
+ hydration: _chunk3OKSEJ33cjs.readFarmRendererHydration.call(void 0, value, where)
167
167
  };
168
168
  }
169
169
  function readPatternSegments(pattern, where) {
@@ -316,7 +316,7 @@ var PLATFORM_FILE = /^(?:(page|layout)\.(native|ios|android)\.(?:tsx|ts|jsx|js)|
316
316
  async function scanRoutePatterns(options) {
317
317
  const { root, srcDir = "src" } = options;
318
318
  const sourceRoots = _nullishCoalesce(options.sourceRoots, () => ( [{ name: "project", root, srcDir, layer: false }]));
319
- const componentExtensions = _chunkNGTZHWBGcjs.resolveFarmComponentExtensions.call(void 0, options.componentExtensions).map(
319
+ const componentExtensions = _chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, options.componentExtensions).map(
320
320
  (extension) => extension.slice(1)
321
321
  );
322
322
  const pages = /* @__PURE__ */ new Set();
@@ -3,7 +3,7 @@
3
3
  var _chunkPWMJBCANcjs = require('./chunk-PWMJBCAN.cjs');
4
4
 
5
5
 
6
- var _chunk55UJGUBPcjs = require('./chunk-55UJGUBP.cjs');
6
+ var _chunkBOEDYXAXcjs = require('./chunk-BOEDYXAX.cjs');
7
7
 
8
8
 
9
9
 
@@ -15,14 +15,14 @@ var _chunkY2FEFQAYcjs = require('./chunk-Y2FEFQAY.cjs');
15
15
  var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
16
16
 
17
17
 
18
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
18
19
 
19
20
 
20
21
 
21
22
 
22
- var _chunkBBVLOENDcjs = require('./chunk-BBVLOEND.cjs');
23
23
 
24
24
 
25
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
25
+ var _chunkF7JVO3OZcjs = require('./chunk-F7JVO3OZ.cjs');
26
26
 
27
27
  // src/rsc-pipeline.ts
28
28
  var _fs = require('fs');
@@ -67,7 +67,7 @@ function pickImportTarget(entry) {
67
67
  return void 0;
68
68
  }
69
69
  async function importFromApp(root, packageName, subpath = ".") {
70
- const packageDir = _chunkBBVLOENDcjs.findFarmAppPackageDir.call(void 0, root, packageName);
70
+ const packageDir = _chunkF7JVO3OZcjs.findFarmAppPackageDir.call(void 0, root, packageName);
71
71
  if (!packageDir) return void 0;
72
72
  const manifest = JSON.parse(_fs.readFileSync.call(void 0, _path2.default.join(packageDir, "package.json"), "utf8"));
73
73
  const exportsMap = manifest.exports;
@@ -94,12 +94,12 @@ async function createFarmRscViteConfig(userConfig, options) {
94
94
  importFromApp(root, "@vitejs/plugin-rsc"),
95
95
  importFromApp(root, "@vitejs/plugin-react")
96
96
  ]);
97
- if (!pluginRsc || !viteRsc || !_chunkBBVLOENDcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
97
+ if (!pluginRsc || !viteRsc || !_chunkF7JVO3OZcjs.findFarmAppPackageDir.call(void 0, 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: ${_chunkBBVLOENDcjs.FARM_RSC_INSTALL_HINT}`
99
+ `[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${_chunkF7JVO3OZcjs.FARM_RSC_INSTALL_HINT}`
100
100
  );
101
101
  }
102
- const layered = await _chunkBBVLOENDcjs.resolveFarmRscCheckConfig.call(void 0,
102
+ const layered = await _chunkF7JVO3OZcjs.resolveFarmRscCheckConfig.call(void 0,
103
103
  userConfig,
104
104
  root,
105
105
  options.command === "build" ? "production" : "development"
@@ -113,9 +113,9 @@ async function createFarmRscViteConfig(userConfig, options) {
113
113
  },
114
114
  options.command
115
115
  );
116
- const blockingKeys = _chunkBBVLOENDcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
116
+ const blockingKeys = _chunkF7JVO3OZcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
117
117
  if (blockingKeys.length > 0) {
118
- throw new Error(`[Farm.js] ${_chunkBBVLOENDcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
118
+ throw new Error(`[Farm.js] ${_chunkF7JVO3OZcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
119
119
  }
120
120
  const { plugins: vitePlugins = [], ...viteOptions } = _nullishCoalesce(config.vite, () => ( {}));
121
121
  const rscConfig = {};
@@ -163,7 +163,7 @@ async function createFarmRscViteConfig(userConfig, options) {
163
163
  server: { environmentName: "rsc" },
164
164
  config: {
165
165
  preset: options.preset,
166
- outputDir: options.outputDir && _chunk55UJGUBPcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
166
+ outputDir: options.outputDir && _chunkBOEDYXAXcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
167
167
  }
168
168
  })
169
169
  ]
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.1.83";
2
+ var version = "0.1.84";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RLEAVG6G.mjs";
4
4
  import {
5
5
  resolveDeployOutputPath
6
- } from "./chunk-U56Z3755.mjs";
6
+ } from "./chunk-EDBIBO67.mjs";
7
7
  import {
8
8
  farmDesktopDevGuardPlugin,
9
9
  loadFarmReactPlugin
@@ -13,16 +13,16 @@ import {
13
13
  hasFarmServerRuntimePlugins,
14
14
  loadTailwindVitePlugin
15
15
  } from "./chunk-MO4UTDQ6.mjs";
16
+ import {
17
+ resolveFarmPlatform
18
+ } from "./chunk-SMUW7UST.mjs";
16
19
  import {
17
20
  FARM_RSC_INSTALL_HINT,
18
21
  findFarmAppPackageDir,
19
22
  formatFarmRscBlockingMessage,
20
23
  inspectFarmServerComponents,
21
24
  resolveFarmRscCheckConfig
22
- } from "./chunk-YSU3WCW6.mjs";
23
- import {
24
- resolveFarmPlatform
25
- } from "./chunk-SMUW7UST.mjs";
25
+ } from "./chunk-MYSH5Y4E.mjs";
26
26
 
27
27
  // src/rsc-pipeline.ts
28
28
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FARM_VERSION
3
- } from "./chunk-NKVBWPXR.mjs";
3
+ } from "./chunk-I5CVJ24H.mjs";
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -7,6 +7,9 @@ import {
7
7
  hasFarmMobileClientEntry,
8
8
  removeFarmMobileClientManifest
9
9
  } from "./chunk-TM2E623I.mjs";
10
+ import {
11
+ loadFarmProductionVite
12
+ } from "./chunk-PSUYE5HR.mjs";
10
13
  import {
11
14
  FARM_COMPILE_CACHE_DIR,
12
15
  FARM_DESKTOP_ENV_MODULE_FILE,
@@ -20,9 +23,6 @@ import {
20
23
  createReactProductionModePlugin,
21
24
  withProductionNodeEnv
22
25
  } from "./chunk-ZZGQD3LL.mjs";
23
- import {
24
- loadFarmProductionVite
25
- } from "./chunk-PSUYE5HR.mjs";
26
26
  import {
27
27
  generateNativeMCPPluginSource
28
28
  } from "./chunk-KQH2COEJ.mjs";
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  collectFarmNativeServerFns,
34
34
  findFarmNativeScreenFiles
35
- } from "./chunk-ORBBAA7B.mjs";
35
+ } from "./chunk-MUUDHWQZ.mjs";
36
36
  import {
37
37
  assertFarmDocsAdapterServesNoGuardedPages,
38
38
  compileFarmDocsAdapterEdgeManifest,
@@ -40,7 +40,7 @@ import {
40
40
  farmDocsAdapterServesGuardedPages,
41
41
  listFarmDocsAdapterPages,
42
42
  listFarmDocsPagePaths
43
- } from "./chunk-K3GHY7GY.mjs";
43
+ } from "./chunk-NLHSKKTT.mjs";
44
44
  import {
45
45
  FARM_DOCS_LAST_MODIFIED_MANIFEST,
46
46
  createFarmDocsHandler,
@@ -70,7 +70,7 @@ import {
70
70
  getDeployTargetForPreset,
71
71
  hasCustomFarmRouteContext,
72
72
  resolveDeployOutputPath
73
- } from "./chunk-U56Z3755.mjs";
73
+ } from "./chunk-EDBIBO67.mjs";
74
74
  import {
75
75
  resolveFarmInstrumentationFile
76
76
  } from "./chunk-QRNYSISP.mjs";
@@ -115,7 +115,7 @@ import {
115
115
  resolveFarmNotFoundComponentPath,
116
116
  resolveFarmRouteRootStrategy,
117
117
  toBakedMarkdownSourcePath
118
- } from "./chunk-DPUZVGXH.mjs";
118
+ } from "./chunk-BRDGINBB.mjs";
119
119
  import {
120
120
  TAILWIND_CSS_BROWSER_TARGET,
121
121
  generateFarmClientPluginEntryCode,
@@ -131,7 +131,14 @@ import {
131
131
  readRouteRenderingDirectiveFromFile,
132
132
  resolveRouteRenderingConfig,
133
133
  resolveRouteRenderingConfigFromFile
134
- } from "./chunk-IAIRQAHA.mjs";
134
+ } from "./chunk-CWUQBECF.mjs";
135
+ import {
136
+ usesFarmRendererIslands
137
+ } from "./chunk-RQ6XX5IN.mjs";
138
+ import {
139
+ FARM_PRERENDER_ENV,
140
+ _farmWebMCPReportsEnabled
141
+ } from "./chunk-M5XU22PQ.mjs";
135
142
  import {
136
143
  HOISTED_HEAD_ELEMENT,
137
144
  appMiddlewareMayHandlePath,
@@ -144,17 +151,13 @@ import {
144
151
  layoutsCanCoverSamePage,
145
152
  routeBoundaryCoversDirectory,
146
153
  stripRouteGroups
147
- } from "./chunk-CA2HBLXP.mjs";
154
+ } from "./chunk-4EEAPBNV.mjs";
148
155
  import {
149
156
  FARM_NATIVE_TREE_CONTENT_TYPE
150
157
  } from "./chunk-LLZSYFOM.mjs";
151
158
  import {
152
159
  farmPluginMayAffectRuntimePath
153
160
  } from "./chunk-UUMKLGUU.mjs";
154
- import {
155
- FARM_PRERENDER_ENV,
156
- _farmWebMCPReportsEnabled
157
- } from "./chunk-RNJX3MD6.mjs";
158
161
  import {
159
162
  FARM_API_CATALOG_PATH,
160
163
  FARM_APP_MANIFEST_LEGACY_PATH,
@@ -162,7 +165,7 @@ import {
162
165
  listFarmBuiltInRoutePaths,
163
166
  resolveFarmApiCatalogInput,
164
167
  resolveFarmAppManifestInput
165
- } from "./chunk-VQ6IXALL.mjs";
168
+ } from "./chunk-3WM7VBGW.mjs";
166
169
  import {
167
170
  FARM_DEFAULT_MCP_PATH,
168
171
  createFarmDefaultMCPServer,
@@ -170,7 +173,7 @@ import {
170
173
  } from "./chunk-HR4N2K4V.mjs";
171
174
  import {
172
175
  isFarmPreviewDeploymentEnvironment
173
- } from "./chunk-43N3X6OO.mjs";
176
+ } from "./chunk-IRJSZAJB.mjs";
174
177
  import {
175
178
  FARM_NATIVE_SERVER_FN_PLUGIN
176
179
  } from "./chunk-L4RTTTVE.mjs";
@@ -191,7 +194,7 @@ import {
191
194
  withFarmSourceSnapshot,
192
195
  withFarmSourceSnapshotOf,
193
196
  withPackageClientBoundaryCache
194
- } from "./chunk-B5SJYXJK.mjs";
197
+ } from "./chunk-XLULEFRW.mjs";
195
198
  import {
196
199
  generateFarmDocsAdapterClientRuntime,
197
200
  getFarmDocsAdapterConfigModule
@@ -213,9 +216,6 @@ import {
213
216
  applyFarmCspHashesToHtml,
214
217
  createFarmCspNonce
215
218
  } from "./chunk-22W4FNTG.mjs";
216
- import {
217
- resolveFarmServerComponentsMode
218
- } from "./chunk-4QENVMG7.mjs";
219
219
  import {
220
220
  getFarmAppDirectories
221
221
  } from "./chunk-Z3RM3VA2.mjs";
@@ -227,8 +227,9 @@ import {
227
227
  isFarmRendererDisabled,
228
228
  isReactRenderer,
229
229
  loadFarmRendererVitePlugins,
230
- resolveFarmRendererAppSetup
231
- } from "./chunk-RGTZAM6Y.mjs";
230
+ resolveFarmRendererAppSetup,
231
+ resolveFarmServerComponentsMode
232
+ } from "./chunk-BCCCPFHQ.mjs";
232
233
  import {
233
234
  applyFarmCronVercelCrons,
234
235
  createFarmCronCloudflareConfig,
@@ -307,7 +308,7 @@ import {
307
308
  } from "./chunk-2I6PUKWJ.mjs";
308
309
  import {
309
310
  FARM_VERSION
310
- } from "./chunk-NKVBWPXR.mjs";
311
+ } from "./chunk-I5CVJ24H.mjs";
311
312
  import {
312
313
  FARM_VIDEO_PLAYER_PATH
313
314
  } from "./chunk-AG27TI6Q.mjs";
@@ -5571,6 +5572,7 @@ installFarmLinkPrefetch();
5571
5572
  }
5572
5573
  });
5573
5574
  const isolatedHydrationEnabled = isolatedBoundaryModules.size > 0;
5575
+ const rendererIslands = isolatedHydrationEnabled && !islandValues && !isReactRenderer(renderer) && getFarmRendererCapabilities(renderer).islands;
5574
5576
  const serverTreeEnabled = isolatedHydrationEnabled && clientPages.some((page) => page.serverTree);
5575
5577
  const islandsRuntimeExports = [
5576
5578
  "createFarmIsolatedHydrationRuntime",
@@ -5610,7 +5612,7 @@ function loadFarmRenderer() {
5610
5612
  }));
5611
5613
  }
5612
5614
  ` : "";
5613
- const isolatedHydrationImport = lazyRenderer ? "" : isolatedHydrationEnabled ? `${islandValues ? `import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement${hasServerTreeLayouts ? ", createFarmServerTreeLayout" : ""} } from "@farm.js/core/internal/islands-runtime";` : 'import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";'}${serverTreeEnabled && !islandValues ? '\nimport { createFarmServerTreeElement } from "@farm.js/core/internal/server-tree";' : ""}` : "";
5615
+ const isolatedHydrationImport = lazyRenderer ? "" : rendererIslands ? 'import { createFarmRendererIslandRuntime } from "@farm.js/core/internal/renderer-islands";' : isolatedHydrationEnabled ? `${islandValues ? `import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement${hasServerTreeLayouts ? ", createFarmServerTreeLayout" : ""} } from "@farm.js/core/internal/islands-runtime";` : 'import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";'}${serverTreeEnabled && !islandValues ? '\nimport { createFarmServerTreeElement } from "@farm.js/core/internal/server-tree";' : ""}` : "";
5614
5616
  const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedBoundaryLoaders = {
5615
5617
  ${Array.from(isolatedBoundaryModules.entries()).map(
5616
5618
  ([reference, modulePath]) => ` ${JSON.stringify(reference)}: () => import(${JSON.stringify(modulePath)}),`
@@ -5686,7 +5688,15 @@ const farmIsolatedHydrationRuntime = {
5686
5688
  endStream: function(root) {
5687
5689
  whenFarmIslandsRuntime(root, function(runtime) { runtime.endStream(root); });
5688
5690
  },
5689
- };` : `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5691
+ };` : rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
5692
+ renderer: React,
5693
+ load: loadFarmIsolatedBoundary,
5694
+ schedule: scheduleFarmIslandHydration,
5695
+ });
5696
+
5697
+ // A hydrating layout keeps a page that doesn't hydrate as server HTML in a plain element. The
5698
+ // renderer's root never renders the page's islands, so the runtime starts them after each render.
5699
+ const FarmServerPage = "div";` : `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5690
5700
  ReactRuntime: React,
5691
5701
  hydrateRoot,
5692
5702
  load: loadFarmIsolatedBoundary,
@@ -5704,7 +5714,14 @@ function disposeFarmIsolatedClientBoundaries(scope) {
5704
5714
  async function hydrateFarmIsolatedClientBoundaries(scope = document, signal) {
5705
5715
  await farmIsolatedHydrationRuntime.hydrate(scope, signal);
5706
5716
  }
5707
- ${serverTreeEnabled ? `
5717
+ ${rendererIslands ? `
5718
+ // After a hydrating layout renders another page: release the islands whose markup it replaced,
5719
+ // and start the new page's.
5720
+ async function hydrateFarmLayoutPageIslands(container) {
5721
+ farmIsolatedHydrationRuntime.prune();
5722
+ await hydrateFarmIsolatedClientBoundaries(container);
5723
+ }
5724
+ ` : ""}${serverTreeEnabled ? `
5708
5725
  /*farm-root-start*/
5709
5726
  // A server-tree page (an async page below a hydrating layout) rebuilds in the layout's root.
5710
5727
  async function createFarmServerTreePageElement(source, pathname) {
@@ -5723,7 +5740,7 @@ async function createFarmServerTreePageElement(source, pathname) {
5723
5740
  /*farm-root-end*/` : "\n/*farm-root-start*/\nasync function createFarmServerTreePageElement() { return null; }\n/*farm-root-end*/"}` : `/*farm-root-start*/
5724
5741
  async function createFarmServerTreePageElement() { return null; }
5725
5742
  /*farm-root-end*/`;
5726
- const routeClientGraphRuntime = isolatedHydrationEnabled ? `function wrapFarmRouteClientGraph(element) {
5743
+ const routeClientGraphRuntime = isolatedHydrationEnabled && !rendererIslands ? `function wrapFarmRouteClientGraph(element) {
5727
5744
  return wrapFarmIsolatedClientGraph(React, element);
5728
5745
  }` : `function wrapFarmRouteClientGraph(element) { return element; }`;
5729
5746
  clientRouteSlots.forEach((slot, index) => {
@@ -6341,8 +6358,7 @@ ${lazyRenderer ? ` // React DOM and islx load with what first renders or hydrat
6341
6358
  ${isolatedHydrationEnabled ? `// Not cancelled with the page: a navigation disposes the islands it removes, and one in a
6342
6359
  // layout it keeps still waits for its trigger, as on a page of islands only.
6343
6360
  const isolatedHydration =
6344
- !hasHydratableLayout(pathname) &&
6345
- document.querySelector('f-island[src]')
6361
+ ${rendererIslands ? "" : "!hasHydratableLayout(pathname) &&\n "}document.querySelector('f-island[src]')
6346
6362
  ? hydrateFarmIsolatedClientBoundaries(document)
6347
6363
  : Promise.resolve();
6348
6364
  await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
@@ -7011,7 +7027,7 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
7011
7027
  if (routeState) {
7012
7028
  farmRoot.renderFarmRoute(reactRoot, routeState);
7013
7029
  window.__FARM_ROUTE_SLOTS__ = nextRouteSlots;
7014
- setFarmHydrated();
7030
+ setFarmHydrated();${rendererIslands ? "\n await hydrateFarmLayoutPageIslands(currentRoot);" : ""}
7015
7031
  return true;
7016
7032
  }
7017
7033
  }
@@ -7088,7 +7104,7 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
7088
7104
  console.error("[Farm.js] Hydrating the page's islands failed:", error);
7089
7105
  });
7090
7106
  }
7091
- }` : `if (matched.route.hasIsolatedClientBoundaries && !hydrateLayouts) {
7107
+ }` : `if (matched.route.hasIsolatedClientBoundaries${rendererIslands ? "" : " && !hydrateLayouts"}) {
7092
7108
  await hydrateFarmIsolatedClientBoundaries(
7093
7109
  isolatedHydrationScope,
7094
7110
  navigation.controller.signal,
@@ -8160,6 +8176,7 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
8160
8176
  const docsConfigModulePath = adapterOwnsDocsRuntime && !hasPrecompiledDocs && config.docs.configPath && !config.docs.configPath.endsWith(".json") ? config.docs.configPath : void 0;
8161
8177
  const adapterHandler = generateFarmDocsAdapterHandlerArguments(config.docs, docsConfigModulePath);
8162
8178
  const hasIsolatedClientGraphRuntime = isReactRenderer(config.renderer) && isolatedClientBoundaryModules.size > 0;
8179
+ const hasRendererIslandsGraph = isolatedClientBoundaryModules.size > 0 && usesFarmRendererIslands(config);
8163
8180
  const rendererStreamingCapabilities = getFarmRendererStreamingCapabilitiesForRuntime(
8164
8181
  config.renderer,
8165
8182
  getFarmPresetRuntime(preset)
@@ -8198,6 +8215,18 @@ function renderFarmRouteServerTree(element, extra) {
8198
8215
  isolate: isolateFarmRouteServerPage,${farmIslandsMode ? "\n values: true," : ""}
8199
8216
  ...extra,
8200
8217
  });
8218
+ }` : hasRendererIslandsGraph ? `function wrapFarmRouteClientGraph(element) {
8219
+ return typeof ReactDOMServer.wrapClientGraph === "function" ? ReactDOMServer.wrapClientGraph(element) : element;
8220
+ }
8221
+
8222
+ function isolateFarmRouteServerPage(element) {
8223
+ return typeof ReactDOMServer.isolateServerPageGraph === "function" ? ReactDOMServer.isolateServerPageGraph(element) : element;
8224
+ }
8225
+
8226
+ function renderFarmRouteServerTree(element, extra) { return element; }
8227
+
8228
+ function renderFarmServerTreeLayout(Layout, props, outlets) {
8229
+ return React.createElement(Layout, { ...props, ...outlets });
8201
8230
  }` : `function wrapFarmRouteClientGraph(element) { return element; }
8202
8231
 
8203
8232
  function isolateFarmRouteServerPage(element) { return element; }
@@ -1,7 +1,7 @@
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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunk5X5GJU5Acjs = require('./chunk-5X5GJU5A.cjs');
4
+ var _chunkGLNVLCUHcjs = require('./chunk-GLNVLCUH.cjs');
5
5
 
6
6
 
7
7
  var _chunkA4WWKG2Bcjs = require('./chunk-A4WWKG2B.cjs');
@@ -815,7 +815,7 @@ async function generateFarmTypeArtifacts(options) {
815
815
  renderer: options.renderer,
816
816
  sourceRoots
817
817
  };
818
- unifiedSections.push(await _chunk5X5GJU5Acjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
818
+ unifiedSections.push(await _chunkGLNVLCUHcjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
819
819
  result.routeTypesPath = unifiedTypesPath;
820
820
  } else if (shouldGenerateRoutes) {
821
821
  const routeOptions = {
@@ -830,11 +830,11 @@ async function generateFarmTypeArtifacts(options) {
830
830
  };
831
831
  if (options.check) {
832
832
  const routeTypesPath = resolveGeneratedPath(root, srcDir, options.routeTypesOutFile);
833
- const content = await _chunk5X5GJU5Acjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
833
+ const content = await _chunkGLNVLCUHcjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
834
834
  checkGeneratedFile(routeTypesPath, content, result.stalePaths);
835
835
  result.routeTypesPath = routeTypesPath;
836
836
  } else {
837
- result.routeTypesPath = await _chunk5X5GJU5Acjs.generateRouteTypes.call(void 0, routeOptions);
837
+ result.routeTypesPath = await _chunkGLNVLCUHcjs.generateRouteTypes.call(void 0, routeOptions);
838
838
  }
839
839
  }
840
840
  if (shouldGenerateApi) {