@farm.js/core 0.1.85 → 0.1.86

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 (80) hide show
  1. package/dist/{analyzer-R6KNJ6IO.mjs → analyzer-I5S5YKHM.mjs} +2 -2
  2. package/dist/analyzer-OEMQSLYT.cjs +17 -0
  3. package/dist/{chunk-3HWNYLQV.cjs → chunk-2NKNP4AH.cjs} +1 -1
  4. package/dist/{chunk-X7RSOEMQ.mjs → chunk-3TKGMIPX.mjs} +7 -7
  5. package/dist/{chunk-GFVPQ25Z.mjs → chunk-45ANSCTO.mjs} +12 -12
  6. package/dist/{chunk-MYSH5Y4E.mjs → chunk-4IE3YK7U.mjs} +1 -1
  7. package/dist/{chunk-CWUQBECF.mjs → chunk-4SJ22WTT.mjs} +1 -1
  8. package/dist/{chunk-PQR5A7R2.mjs → chunk-7UTRNV6R.mjs} +1 -1
  9. package/dist/{chunk-RVJQHQCG.cjs → chunk-BAD6T5NU.cjs} +4 -4
  10. package/dist/{chunk-HKJIUZS5.cjs → chunk-BLZCAFGJ.cjs} +2 -2
  11. package/dist/{chunk-YS647ASS.mjs → chunk-CFKAYV7B.mjs} +1 -1
  12. package/dist/{chunk-MAPHNGTF.cjs → chunk-CPSFDQKJ.cjs} +3 -3
  13. package/dist/{chunk-YX532KEF.mjs → chunk-CVKTYG4L.mjs} +2 -2
  14. package/dist/{chunk-BBX4RPOV.cjs → chunk-FDU4Q4QP.cjs} +7 -7
  15. package/dist/{chunk-UEQC4ZLP.cjs → chunk-FWLXYNWA.cjs} +164 -164
  16. package/dist/{chunk-XIXAUXV3.mjs → chunk-GWPANDW3.mjs} +1 -1
  17. package/dist/{chunk-BCCCPFHQ.mjs → chunk-HV6CYSMF.mjs} +3 -0
  18. package/dist/{chunk-WYTK7HQS.cjs → chunk-IAERD73G.cjs} +155 -155
  19. package/dist/{chunk-4QCMTIBM.mjs → chunk-KHIEGVG7.mjs} +1 -1
  20. package/dist/{chunk-7TPLDPNC.cjs → chunk-L2IULWKV.cjs} +9 -9
  21. package/dist/{chunk-BZN5HX7Y.cjs → chunk-NXOZRI3B.cjs} +2 -2
  22. package/dist/{chunk-H6C45DCF.cjs → chunk-P253SZJF.cjs} +93 -93
  23. package/dist/{chunk-Z3LOPHSO.mjs → chunk-PAENAKTC.mjs} +1 -1
  24. package/dist/{chunk-Q7GB3I4O.cjs → chunk-Q3YWQEUS.cjs} +2 -2
  25. package/dist/{chunk-OYM6VJEF.cjs → chunk-QYDGIXQ5.cjs} +137 -88
  26. package/dist/{chunk-U6HUVY5R.mjs → chunk-QYWP5KDY.mjs} +10 -10
  27. package/dist/{chunk-2DMOB6BH.mjs → chunk-RA5OUXOJ.mjs} +2 -2
  28. package/dist/{chunk-3TCFONUE.mjs → chunk-SB74WCKC.mjs} +57 -8
  29. package/dist/{chunk-3OKSEJ33.cjs → chunk-T7UC2ORA.cjs} +3 -0
  30. package/dist/{chunk-TOUC6BR3.cjs → chunk-TQJ35BBW.cjs} +4 -4
  31. package/dist/{chunk-CDZ55QRD.mjs → chunk-UAQQUQWE.mjs} +1 -1
  32. package/dist/{chunk-QUHDVJMR.cjs → chunk-UDWBTABT.cjs} +3 -3
  33. package/dist/{chunk-F7JVO3OZ.cjs → chunk-VGZIIOU6.cjs} +4 -4
  34. package/dist/{chunk-RQ6XX5IN.mjs → chunk-VTEAUQMT.mjs} +1 -1
  35. package/dist/{chunk-L3BSHASB.cjs → chunk-XMVZXZ32.cjs} +4 -4
  36. package/dist/{chunk-J7VIXTPQ.mjs → chunk-YMAE32O7.mjs} +1 -1
  37. package/dist/{chunk-L5HDCDFT.mjs → chunk-YNPVG2GG.mjs} +1 -1
  38. package/dist/{chunk-GLNVLCUH.cjs → chunk-ZSVFI7JM.cjs} +6 -6
  39. package/dist/{devtools-SXL5RFE5.cjs → devtools-A3L7WNTB.cjs} +4 -4
  40. package/dist/{devtools-34ZQWX3M.mjs → devtools-DGC2247E.mjs} +2 -2
  41. package/dist/docs.cjs +4 -4
  42. package/dist/docs.mjs +3 -3
  43. package/dist/environment/vite.cjs +4 -4
  44. package/dist/environment/vite.mjs +3 -3
  45. package/dist/index.cjs +17 -17
  46. package/dist/index.mjs +16 -16
  47. package/dist/internal/build-runtime.cjs +18 -18
  48. package/dist/internal/build-runtime.mjs +17 -17
  49. package/dist/internal/cli-runtime.cjs +6 -6
  50. package/dist/internal/cli-runtime.mjs +5 -5
  51. package/dist/internal/client-error-overlay.cjs +4 -4
  52. package/dist/internal/client-error-overlay.mjs +1 -1
  53. package/dist/internal/config-runtime.cjs +4 -4
  54. package/dist/internal/config-runtime.mjs +3 -3
  55. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  56. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  57. package/dist/internal/native-server-fns.cjs +4 -4
  58. package/dist/internal/native-server-fns.mjs +3 -3
  59. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  60. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  61. package/dist/internal/production-runtime.cjs +4 -4
  62. package/dist/internal/production-runtime.mjs +3 -3
  63. package/dist/plugin.cjs +13 -13
  64. package/dist/plugin.mjs +12 -12
  65. package/dist/renderer.cjs +3 -3
  66. package/dist/renderer.d.mts +10 -2
  67. package/dist/renderer.d.ts +10 -2
  68. package/dist/renderer.mjs +2 -2
  69. package/dist/{rsc-pipeline-MW2V3WEE.mjs → rsc-pipeline-BROS3NEB.mjs} +4 -4
  70. package/dist/{rsc-pipeline-ESPGX4VX.cjs → rsc-pipeline-SNGPAXGW.cjs} +5 -5
  71. package/dist/{runtime-FCMLEBTX.cjs → runtime-7T5TRAWL.cjs} +9 -9
  72. package/dist/{runtime-KGSOEMLT.mjs → runtime-SLJLW37A.mjs} +4 -4
  73. package/dist/server.cjs +38 -38
  74. package/dist/server.mjs +14 -14
  75. package/dist/version.cjs +2 -2
  76. package/dist/version.mjs +1 -1
  77. package/dist/vite.cjs +13 -13
  78. package/dist/vite.mjs +12 -12
  79. package/package.json +1 -1
  80. package/dist/analyzer-XVY76XMM.cjs +0 -17
@@ -43,7 +43,7 @@ import {
43
43
  resolveFarmIslxActionsMode,
44
44
  resolveFarmRouteRootStrategy,
45
45
  toBakedMarkdownSourcePath
46
- } from "./chunk-X7RSOEMQ.mjs";
46
+ } from "./chunk-3TKGMIPX.mjs";
47
47
  import {
48
48
  generateFarmClientPluginEntryCode,
49
49
  hasFarmServerRuntimePlugins,
@@ -58,13 +58,13 @@ import {
58
58
  import {
59
59
  generateFarmTypeArtifacts,
60
60
  resolveRouteRenderingConfig
61
- } from "./chunk-CWUQBECF.mjs";
61
+ } from "./chunk-4SJ22WTT.mjs";
62
62
  import {
63
63
  usesFarmRendererIslands
64
- } from "./chunk-RQ6XX5IN.mjs";
64
+ } from "./chunk-VTEAUQMT.mjs";
65
65
  import {
66
66
  _setFarmInfraAnalyticsWebMCPRoute
67
- } from "./chunk-YS647ASS.mjs";
67
+ } from "./chunk-CFKAYV7B.mjs";
68
68
  import {
69
69
  createFarmRouteRenderPlan,
70
70
  farmPathGuardCoversEndpoint,
@@ -91,13 +91,13 @@ import {
91
91
  resolveFarmMCPRouteLabel,
92
92
  resolveFarmMarkdownRouteLabel,
93
93
  setFarmRouteLabel
94
- } from "./chunk-YX532KEF.mjs";
94
+ } from "./chunk-CVKTYG4L.mjs";
95
95
  import {
96
96
  FARM_DEFAULT_MCP_PATH
97
97
  } from "./chunk-HR4N2K4V.mjs";
98
98
  import {
99
99
  isFarmPreviewDeploymentEnvironment
100
- } from "./chunk-PQR5A7R2.mjs";
100
+ } from "./chunk-7UTRNV6R.mjs";
101
101
  import {
102
102
  createFarmServerFnBoundaryModule,
103
103
  isFarmServerFnBoundaryId,
@@ -148,7 +148,7 @@ import {
148
148
  usePackageScanCacheFile,
149
149
  withFarmSourceSnapshotOf,
150
150
  wrapFarmIslandContainers
151
- } from "./chunk-3TCFONUE.mjs";
151
+ } from "./chunk-SB74WCKC.mjs";
152
152
  import {
153
153
  generateFarmDocsAdapterClientRuntime,
154
154
  getFarmDocsAdapterConfigModule
@@ -193,7 +193,7 @@ import {
193
193
  resolveFarmRenderer,
194
194
  resolveFarmRendererAppSetup,
195
195
  resolveFarmServerComponentsMode
196
- } from "./chunk-BCCCPFHQ.mjs";
196
+ } from "./chunk-HV6CYSMF.mjs";
197
197
  import {
198
198
  getPublicFarmImageConfig,
199
199
  resolveFarmImageConfig
@@ -313,7 +313,7 @@ import {
313
313
  } from "./chunk-EILUVBKS.mjs";
314
314
  import {
315
315
  FARM_VERSION
316
- } from "./chunk-XIXAUXV3.mjs";
316
+ } from "./chunk-GWPANDW3.mjs";
317
317
  import {
318
318
  DEFAULT_FARM_API_BASE_PATH
319
319
  } from "./chunk-W6QLRQ3V.mjs";
@@ -1288,7 +1288,7 @@ function loadFarmWorkflowsDevRuntime() {
1288
1288
  return import("./workflows.mjs");
1289
1289
  }
1290
1290
  function loadFarmDevtoolsSnapshotRuntime() {
1291
- return import("./devtools-34ZQWX3M.mjs");
1291
+ return import("./devtools-DGC2247E.mjs");
1292
1292
  }
1293
1293
  function loadFarmDevtoolsUIRuntime() {
1294
1294
  return import("./devtools-ui-BOG33MT5.mjs");
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RLEAVG6G.mjs";
4
4
  import {
5
5
  resolveDeployOutputPath
6
- } from "./chunk-4QCMTIBM.mjs";
6
+ } from "./chunk-KHIEGVG7.mjs";
7
7
  import {
8
8
  farmDesktopDevGuardPlugin,
9
9
  loadFarmReactPlugin
@@ -22,7 +22,7 @@ import {
22
22
  formatFarmRscBlockingMessage,
23
23
  inspectFarmServerComponents,
24
24
  resolveFarmRscCheckConfig
25
- } from "./chunk-MYSH5Y4E.mjs";
25
+ } from "./chunk-4IE3YK7U.mjs";
26
26
 
27
27
  // src/rsc-pipeline.ts
28
28
  import { readFileSync } from "fs";
@@ -17,7 +17,7 @@ import {
17
17
  isReactRenderer,
18
18
  readFarmRendererHydration,
19
19
  resolveFarmServerComponentsMode
20
- } from "./chunk-BCCCPFHQ.mjs";
20
+ } from "./chunk-HV6CYSMF.mjs";
21
21
  import {
22
22
  PROGRAMMATIC_ROUTE_FILE_NAMES,
23
23
  getProgrammaticRouteDefinitionSource,
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-U6GMCDRS.mjs";
29
29
  import {
30
30
  FARM_VERSION
31
- } from "./chunk-XIXAUXV3.mjs";
31
+ } from "./chunk-GWPANDW3.mjs";
32
32
 
33
33
  // src/environment-vite.ts
34
34
  import { existsSync, readFileSync, realpathSync } from "fs";
@@ -2352,7 +2352,7 @@ function setFarmRendererHydrationScope(roots, renderer, routeModules) {
2352
2352
  const ruleSetsHydration = routeModules.some(
2353
2353
  (entry) => entry.hydration?.hydrate !== void 0 || entry.hydration?.strategy !== void 0
2354
2354
  );
2355
- if (!renderer?.hydration && !ruleSetsHydration) {
2355
+ if (!renderer?.hydration && !renderer?.compile && !ruleSetsHydration) {
2356
2356
  for (const key of keys) scopes.delete(key);
2357
2357
  return () => {
2358
2358
  };
@@ -2430,9 +2430,51 @@ function readOwnHydration(scope, content, file) {
2430
2430
  }
2431
2431
  return readFarmRendererHydration(value, where);
2432
2432
  }
2433
+ function mayCompileFarmRendererSource(file) {
2434
+ if (scopes.size === 0) return false;
2435
+ const extension = path7.extname(file).toLowerCase();
2436
+ for (const scope of scopes.values()) {
2437
+ if (scope.renderer.compile && scope.extensions.has(extension)) return true;
2438
+ }
2439
+ return false;
2440
+ }
2441
+ function compileFarmRendererSource(content, sourcePath) {
2442
+ if (scopes.size === 0) return content;
2443
+ const file = realPath(sourcePath);
2444
+ const scope = findScope(file);
2445
+ const compile = scope?.renderer.compile;
2446
+ if (!scope || !compile || !scope.extensions.has(path7.extname(file).toLowerCase())) {
2447
+ return content;
2448
+ }
2449
+ const where = `Renderer \`${scope.renderer.name}\` compile() for ${file}`;
2450
+ let value;
2451
+ try {
2452
+ value = compile.call(scope.renderer, content, file);
2453
+ } catch (error) {
2454
+ throw createFarmRendererHookError(
2455
+ `${where} threw: ${error instanceof Error ? error.message : String(error)}`,
2456
+ error
2457
+ );
2458
+ }
2459
+ if (typeof value !== "string") {
2460
+ throw new TypeError(
2461
+ `${where} returned ${value === null ? "null" : typeof value}. Return the module the file compiles to, as JavaScript or TSX source.`
2462
+ );
2463
+ }
2464
+ return value;
2465
+ }
2433
2466
 
2434
2467
  // src/utils/client-component.ts
2435
2468
  function readIfExists(filePath) {
2469
+ const source = readSourceIfExists(filePath);
2470
+ if (source === null || !mayCompileFarmRendererSource(filePath)) return source;
2471
+ return memoizeInFarmSourceSnapshot(
2472
+ "compiled-source",
2473
+ `${filePath}\0${source}`,
2474
+ () => compileFarmRendererSource(source, filePath)
2475
+ );
2476
+ }
2477
+ function readSourceIfExists(filePath) {
2436
2478
  if (filePath.replace(/\\/g, "/").includes(FARM_CLIENT_REFERENCE_DIRECTORY)) {
2437
2479
  return readSourceFile(filePath);
2438
2480
  }
@@ -2852,11 +2894,18 @@ function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
2852
2894
  if (inspectIslandExport && hydrate && hydrate.value === null) {
2853
2895
  throw new Error(formatFarmHydrateExportError(hydrate, sourcePath));
2854
2896
  }
2855
- const rendererHydration = inspectIslandExport && sourcePath ? resolveFarmRendererModuleHydration(content, sourcePath, () => ({
2856
- hydrate: typeof hydrate?.value === "boolean" ? hydrate.value : void 0,
2857
- strategy: getIslandStrategyExport(content),
2858
- clientDirective: isClientComponent
2859
- })) : null;
2897
+ const rendererHydration = inspectIslandExport && sourcePath ? (
2898
+ // The renderer's own syntax is read from the file as written, before its `compile()`.
2899
+ resolveFarmRendererModuleHydration(
2900
+ mayCompileFarmRendererSource(sourcePath) && readSourceIfExists(sourcePath) || content,
2901
+ sourcePath,
2902
+ () => ({
2903
+ hydrate: typeof hydrate?.value === "boolean" ? hydrate.value : void 0,
2904
+ strategy: getIslandStrategyExport(content),
2905
+ clientDirective: isClientComponent
2906
+ })
2907
+ )
2908
+ ) : null;
2860
2909
  if (rendererHydration) {
2861
2910
  return {
2862
2911
  isClientComponent,
@@ -203,6 +203,9 @@ function resolveFarmRenderer(renderer) {
203
203
  }
204
204
  }
205
205
  }
206
+ if (resolved.compile !== void 0 && typeof resolved.compile !== "function") {
207
+ issues.push("`compile` must be a method that returns a file's JavaScript or TSX.");
208
+ }
206
209
  if (issues.length > 0) {
207
210
  throw new TypeError(
208
211
  `Farm renderer \`${resolved.name}\` is invalid:
@@ -4,7 +4,7 @@
4
4
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
5
5
 
6
6
 
7
- var _chunkBZN5HX7Ycjs = require('./chunk-BZN5HX7Y.cjs');
7
+ var _chunkNXOZRI3Bcjs = require('./chunk-NXOZRI3B.cjs');
8
8
 
9
9
 
10
10
  var _chunkBTVDYS4Bcjs = require('./chunk-BTVDYS4B.cjs');
@@ -29,7 +29,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
29
29
  var _chunk7Q7UB4TLcjs = require('./chunk-7Q7UB4TL.cjs');
30
30
 
31
31
 
32
- var _chunk3HWNYLQVcjs = require('./chunk-3HWNYLQV.cjs');
32
+ var _chunk2NKNP4AHcjs = require('./chunk-2NKNP4AH.cjs');
33
33
 
34
34
 
35
35
  var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
@@ -288,7 +288,7 @@ function createFarmAppManifest(input, registered = []) {
288
288
  return {
289
289
  schemaVersion: 1,
290
290
  app: app ? {
291
- ...app.version ? { farm: _chunk3HWNYLQVcjs.FARM_VERSION } : {},
291
+ ...app.version ? { farm: _chunk2NKNP4AHcjs.FARM_VERSION } : {},
292
292
  ...app.renderer ? { renderer: input.renderer } : {},
293
293
  basePath: input.basePath,
294
294
  ...app.build ? { build: input.build } : {}
@@ -319,7 +319,7 @@ function resolveFarmSiteUrl() {
319
319
  asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
320
320
  ];
321
321
  for (const candidate of candidates) {
322
- const origin = candidate ? _chunkBZN5HX7Ycjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
322
+ const origin = candidate ? _chunkNXOZRI3Bcjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
323
323
  if (origin) return origin;
324
324
  }
325
325
  return null;
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-D2VAANBS.mjs";
19
19
  import {
20
20
  FARM_VERSION
21
- } from "./chunk-XIXAUXV3.mjs";
21
+ } from "./chunk-GWPANDW3.mjs";
22
22
 
23
23
  // src/mobile/analyzer.ts
24
24
  import { createHash } from "crypto";
@@ -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 _chunkQ7GB3I4Ocjs = require('./chunk-Q7GB3I4O.cjs');
4
+ var _chunkQ3YWQEUScjs = require('./chunk-Q3YWQEUS.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 = _chunkQ7GB3I4Ocjs.readAliases.call(void 0, root, srcDir);
67
+ const aliases = _chunkQ3YWQEUScjs.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 = _chunkQ7GB3I4Ocjs.resolveFile.call(void 0, candidate);
101
+ const resolved = _chunkQ3YWQEUScjs.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;
@@ -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 _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
4
+ var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.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 _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'optionalAccess', _ => _.experimental, 'optionalAccess', _2 => _2.serverComponents])) === "rsc";
37
+ return _chunkT7UC2ORAcjs.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 = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, value);
57
+ const mode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, value);
58
58
  const enabled = mode === "rsc";
59
- const explicit = enabled && _chunk3OKSEJ33cjs.isExplicitFarmServerComponentsMode.call(void 0, value);
59
+ const explicit = enabled && _chunkT7UC2ORAcjs.isExplicitFarmServerComponentsMode.call(void 0, value);
60
60
  const missingPackages = enabled ? FARM_RSC_PACKAGES.filter((name) => !findFarmAppPackageDir(root, name)) : [];
61
61
  return {
62
62
  mode,
@@ -6,7 +6,7 @@ import {
6
6
  isReactRenderer,
7
7
  resolveFarmRenderer,
8
8
  resolveFarmServerComponentsMode
9
- } from "./chunk-BCCCPFHQ.mjs";
9
+ } from "./chunk-HV6CYSMF.mjs";
10
10
  import {
11
11
  _peekCurrentRequest
12
12
  } from "./chunk-VIXTAVEA.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 _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 _chunkGLNVLCUHcjs = require('./chunk-GLNVLCUH.cjs');
4
+ var _chunkZSVFI7JMcjs = require('./chunk-ZSVFI7JM.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 _chunkGLNVLCUHcjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
818
+ unifiedSections.push(await _chunkZSVFI7JMcjs.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 _chunkGLNVLCUHcjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
833
+ const content = await _chunkZSVFI7JMcjs.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 _chunkGLNVLCUHcjs.generateRouteTypes.call(void 0, routeOptions);
837
+ result.routeTypesPath = await _chunkZSVFI7JMcjs.generateRouteTypes.call(void 0, routeOptions);
838
838
  }
839
839
  }
840
840
  if (shouldGenerateApi) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readAliases,
3
3
  resolveFile
4
- } from "./chunk-CDZ55QRD.mjs";
4
+ } from "./chunk-UAQQUQWE.mjs";
5
5
  import {
6
6
  transformFarmServerFns
7
7
  } from "./chunk-GNZIAJGB.mjs";
@@ -5,7 +5,7 @@ import {
5
5
  createFarmRendererHookError,
6
6
  readFarmRendererHydration,
7
7
  resolveFarmComponentExtensions
8
- } from "./chunk-BCCCPFHQ.mjs";
8
+ } from "./chunk-HV6CYSMF.mjs";
9
9
  import {
10
10
  parseRouteSlotFile
11
11
  } from "./chunk-CYRO3WP4.mjs";
@@ -5,7 +5,7 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
8
+ var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.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
- ..._chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, renderer.componentExtensions),
83
+ ..._chunkT7UC2ORAcjs.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 _chunk3OKSEJ33cjs.createFarmRendererHookError.call(void 0,
108
+ throw _chunkT7UC2ORAcjs.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 _chunk3OKSEJ33cjs.createFarmRendererHookError.call(void 0,
156
+ throw _chunkT7UC2ORAcjs.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: _chunk3OKSEJ33cjs.readFarmRendererHydration.call(void 0, value, where)
166
+ hydration: _chunkT7UC2ORAcjs.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 = _chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, options.componentExtensions).map(
319
+ const componentExtensions = _chunkT7UC2ORAcjs.resolveFarmComponentExtensions.call(void 0, options.componentExtensions).map(
320
320
  (extension) => extension.slice(1)
321
321
  );
322
322
  const pages = /* @__PURE__ */ new Set();
@@ -1,6 +1,6 @@
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(); } } 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
- var _chunkBBX4RPOVcjs = require('./chunk-BBX4RPOV.cjs');
3
+ var _chunkFDU4Q4QPcjs = require('./chunk-FDU4Q4QP.cjs');
4
4
  require('./chunk-OZC2JPW6.cjs');
5
5
  require('./chunk-L2GUEYHR.cjs');
6
6
  require('./chunk-IIHZ2BEE.cjs');
@@ -14,7 +14,7 @@ require('./chunk-MNUYXZV7.cjs');
14
14
  require('./chunk-52Q4OB4A.cjs');
15
15
 
16
16
 
17
- var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
17
+ var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.cjs');
18
18
  require('./chunk-MCSRMEQV.cjs');
19
19
 
20
20
 
@@ -355,10 +355,10 @@ async function createFarmDevtoolsSnapshot(input) {
355
355
  }));
356
356
  const deploymentPreset = String(_optionalChain([config, 'access', _13 => _13.deploy, 'optionalAccess', _14 => _14.preset]) || config.preset || "node-server");
357
357
  const deploymentTarget = String(
358
- _optionalChain([config, 'access', _15 => _15.deploy, 'optionalAccess', _16 => _16.target]) || _chunkBBX4RPOVcjs.getDeployTargetForPreset.call(void 0, deploymentPreset) || "node"
358
+ _optionalChain([config, 'access', _15 => _15.deploy, 'optionalAccess', _16 => _16.target]) || _chunkFDU4Q4QPcjs.getDeployTargetForPreset.call(void 0, deploymentPreset) || "node"
359
359
  );
360
360
  const env = input.env || process.env;
361
- const servesPages = !_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, config.renderer);
361
+ const servesPages = !_chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, config.renderer);
362
362
  if (servesPages && pageRoutes.length === 0) {
363
363
  diagnostics.push({
364
364
  severity: "warning",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDeployTargetForPreset
3
- } from "./chunk-4QCMTIBM.mjs";
3
+ } from "./chunk-KHIEGVG7.mjs";
4
4
  import "./chunk-VISQDC6W.mjs";
5
5
  import "./chunk-5V6HSJFG.mjs";
6
6
  import "./chunk-YVVY276M.mjs";
@@ -14,7 +14,7 @@ import "./chunk-RJBUI5AN.mjs";
14
14
  import "./chunk-Z3RM3VA2.mjs";
15
15
  import {
16
16
  isFarmRendererDisabled
17
- } from "./chunk-BCCCPFHQ.mjs";
17
+ } from "./chunk-HV6CYSMF.mjs";
18
18
  import "./chunk-AOIUYHPH.mjs";
19
19
  import {
20
20
  resolveCronConfig
package/dist/docs.cjs CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkHKJIUZS5cjs = require('./chunk-HKJIUZS5.cjs');
8
+ var _chunkBLZCAFGJcjs = require('./chunk-BLZCAFGJ.cjs');
9
9
 
10
10
 
11
11
 
@@ -21,7 +21,7 @@ var _chunkHR5GU4UUcjs = require('./chunk-HR5GU4UU.cjs');
21
21
  require('./chunk-N3H7UPBM.cjs');
22
22
  require('./chunk-GVYZCJZH.cjs');
23
23
  require('./chunk-NDOE76QC.cjs');
24
- require('./chunk-BBX4RPOV.cjs');
24
+ require('./chunk-FDU4Q4QP.cjs');
25
25
  require('./chunk-OZC2JPW6.cjs');
26
26
  require('./chunk-XJDB564A.cjs');
27
27
  require('./chunk-ERMUL73L.cjs');
@@ -37,7 +37,7 @@ require('./chunk-OLKYHTLN.cjs');
37
37
  require('./chunk-6JHZPB52.cjs');
38
38
  require('./chunk-MNUYXZV7.cjs');
39
39
  require('./chunk-52Q4OB4A.cjs');
40
- require('./chunk-3OKSEJ33.cjs');
40
+ require('./chunk-T7UC2ORA.cjs');
41
41
  require('./chunk-MCSRMEQV.cjs');
42
42
  require('./chunk-HQKCSJEH.cjs');
43
43
  require('./chunk-XRFGOYXG.cjs');
@@ -105,4 +105,4 @@ require('./chunk-UZM3PDKK.cjs');
105
105
 
106
106
 
107
107
 
108
- exports.createDocsAPI = _chunkHKJIUZS5cjs.createDocsAPI; exports.createFarmDocsAPIHandler = _chunkHKJIUZS5cjs.createFarmDocsAPIHandler; exports.createFarmDocsAdapterHandler = _chunkHKJIUZS5cjs.createFarmDocsAdapterHandler; exports.createFarmDocsHandler = _chunkHR5GU4UUcjs.createFarmDocsHandler; exports.discoverFarmDocsPages = _chunkHR5GU4UUcjs.discoverFarmDocsPages; exports.getFarmDocsConfigModuleRoot = _chunkHKJIUZS5cjs.getFarmDocsConfigModuleRoot; exports.getFarmDocsContentDirs = _chunkHR5GU4UUcjs.getFarmDocsContentDirs; exports.getFarmDocsDocumentNavigationMatchers = _chunkHR5GU4UUcjs.getFarmDocsDocumentNavigationMatchers; exports.getFarmDocsRouteTypeEntries = _chunkHR5GU4UUcjs.getFarmDocsRouteTypeEntries; exports.hasFarmDocsRuntimeAdapter = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter; exports.invalidateFarmDocsLastModified = _chunkHR5GU4UUcjs.invalidateFarmDocsLastModified; exports.isFarmDocsAPIRequest = _chunkHKJIUZS5cjs.isFarmDocsAPIRequest; exports.isFarmDocsContentFile = _chunkHR5GU4UUcjs.isFarmDocsContentFile; exports.isFarmDocsRequest = _chunkHR5GU4UUcjs.isFarmDocsRequest; exports.listFarmDocsPagePaths = _chunkHKJIUZS5cjs.listFarmDocsPagePaths; exports.loadFarmDocsPage = _chunkHR5GU4UUcjs.loadFarmDocsPage; exports.resolveFarmDocsContentDir = _chunkHR5GU4UUcjs.resolveFarmDocsContentDir;
108
+ exports.createDocsAPI = _chunkBLZCAFGJcjs.createDocsAPI; exports.createFarmDocsAPIHandler = _chunkBLZCAFGJcjs.createFarmDocsAPIHandler; exports.createFarmDocsAdapterHandler = _chunkBLZCAFGJcjs.createFarmDocsAdapterHandler; exports.createFarmDocsHandler = _chunkHR5GU4UUcjs.createFarmDocsHandler; exports.discoverFarmDocsPages = _chunkHR5GU4UUcjs.discoverFarmDocsPages; exports.getFarmDocsConfigModuleRoot = _chunkBLZCAFGJcjs.getFarmDocsConfigModuleRoot; exports.getFarmDocsContentDirs = _chunkHR5GU4UUcjs.getFarmDocsContentDirs; exports.getFarmDocsDocumentNavigationMatchers = _chunkHR5GU4UUcjs.getFarmDocsDocumentNavigationMatchers; exports.getFarmDocsRouteTypeEntries = _chunkHR5GU4UUcjs.getFarmDocsRouteTypeEntries; exports.hasFarmDocsRuntimeAdapter = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter; exports.invalidateFarmDocsLastModified = _chunkHR5GU4UUcjs.invalidateFarmDocsLastModified; exports.isFarmDocsAPIRequest = _chunkBLZCAFGJcjs.isFarmDocsAPIRequest; exports.isFarmDocsContentFile = _chunkHR5GU4UUcjs.isFarmDocsContentFile; exports.isFarmDocsRequest = _chunkHR5GU4UUcjs.isFarmDocsRequest; exports.listFarmDocsPagePaths = _chunkBLZCAFGJcjs.listFarmDocsPagePaths; exports.loadFarmDocsPage = _chunkHR5GU4UUcjs.loadFarmDocsPage; exports.resolveFarmDocsContentDir = _chunkHR5GU4UUcjs.resolveFarmDocsContentDir;
package/dist/docs.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  getFarmDocsConfigModuleRoot,
6
6
  isFarmDocsAPIRequest,
7
7
  listFarmDocsPagePaths
8
- } from "./chunk-Z3LOPHSO.mjs";
8
+ } from "./chunk-PAENAKTC.mjs";
9
9
  import {
10
10
  createFarmDocsHandler,
11
11
  discoverFarmDocsPages,
@@ -21,7 +21,7 @@ import {
21
21
  import "./chunk-67JTJCAS.mjs";
22
22
  import "./chunk-SE7HPBYK.mjs";
23
23
  import "./chunk-LRPPXKCX.mjs";
24
- import "./chunk-4QCMTIBM.mjs";
24
+ import "./chunk-KHIEGVG7.mjs";
25
25
  import "./chunk-VISQDC6W.mjs";
26
26
  import "./chunk-S3R4JDRO.mjs";
27
27
  import "./chunk-NRNAHZ57.mjs";
@@ -37,7 +37,7 @@ import "./chunk-XGL42MQ7.mjs";
37
37
  import "./chunk-22W4FNTG.mjs";
38
38
  import "./chunk-RJBUI5AN.mjs";
39
39
  import "./chunk-Z3RM3VA2.mjs";
40
- import "./chunk-BCCCPFHQ.mjs";
40
+ import "./chunk-HV6CYSMF.mjs";
41
41
  import "./chunk-AOIUYHPH.mjs";
42
42
  import "./chunk-7VJXYB6S.mjs";
43
43
  import "./chunk-NLATR3T3.mjs";
@@ -1,22 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkOYM6VJEFcjs = require('../chunk-OYM6VJEF.cjs');
4
+ var _chunkQYDGIXQ5cjs = require('../chunk-QYDGIXQ5.cjs');
5
5
  require('../chunk-WMRGIQTA.cjs');
6
6
  require('../chunk-7KJJ4SBS.cjs');
7
7
  require('../chunk-MNUYXZV7.cjs');
8
8
  require('../chunk-52Q4OB4A.cjs');
9
- require('../chunk-3OKSEJ33.cjs');
9
+ require('../chunk-T7UC2ORA.cjs');
10
10
  require('../chunk-PWDBWXQI.cjs');
11
11
  require('../chunk-XRRHPBG2.cjs');
12
12
  require('../chunk-YUCU6XB4.cjs');
13
13
  require('../chunk-7U4XF76R.cjs');
14
14
  require('../chunk-SUCDVKUB.cjs');
15
- require('../chunk-3HWNYLQV.cjs');
15
+ require('../chunk-2NKNP4AH.cjs');
16
16
  require('../chunk-6CTFVBAT.cjs');
17
17
  require('../chunk-ML4TOUZP.cjs');
18
18
  require('../chunk-UZM3PDKK.cjs');
19
19
 
20
20
 
21
21
 
22
- exports.farmEnvironmentFunctionsPlugin = _chunkOYM6VJEFcjs.farmEnvironmentFunctionsPlugin; exports.transformEnvironmentFunctions = _chunkOYM6VJEFcjs.transformEnvironmentFunctions;
22
+ exports.farmEnvironmentFunctionsPlugin = _chunkQYDGIXQ5cjs.farmEnvironmentFunctionsPlugin; exports.transformEnvironmentFunctions = _chunkQYDGIXQ5cjs.transformEnvironmentFunctions;
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  farmEnvironmentFunctionsPlugin,
3
3
  transformEnvironmentFunctions
4
- } from "../chunk-3TCFONUE.mjs";
4
+ } from "../chunk-SB74WCKC.mjs";
5
5
  import "../chunk-D2VAANBS.mjs";
6
6
  import "../chunk-S32PDOLO.mjs";
7
7
  import "../chunk-RJBUI5AN.mjs";
8
8
  import "../chunk-Z3RM3VA2.mjs";
9
- import "../chunk-BCCCPFHQ.mjs";
9
+ import "../chunk-HV6CYSMF.mjs";
10
10
  import "../chunk-AYDVUCXD.mjs";
11
11
  import "../chunk-DS2KZ5BT.mjs";
12
12
  import "../chunk-DZXD6CYJ.mjs";
13
13
  import "../chunk-U6GMCDRS.mjs";
14
14
  import "../chunk-H3ASZDT7.mjs";
15
- import "../chunk-XIXAUXV3.mjs";
15
+ import "../chunk-GWPANDW3.mjs";
16
16
  import "../chunk-OHWM2VI4.mjs";
17
17
  import "../chunk-5KAEGBIL.mjs";
18
18
  import "../chunk-TIZJYHB7.mjs";