@farm.js/core 0.1.84 → 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.
- package/dist/{analyzer-7RNO3XKC.mjs → analyzer-I5S5YKHM.mjs} +2 -2
- package/dist/analyzer-OEMQSLYT.cjs +17 -0
- package/dist/{app.d-eSm7jgoc.d.mts → app.d-Bvpc2eJq.d.mts} +1 -1
- package/dist/{app.d-CVPu_hoD.d.ts → app.d-DEKpJEp4.d.ts} +1 -1
- package/dist/{chunk-CVZY4TLW.cjs → chunk-2NKNP4AH.cjs} +1 -1
- package/dist/{chunk-BRDGINBB.mjs → chunk-3TKGMIPX.mjs} +9 -9
- package/dist/{chunk-KXVMWLTC.mjs → chunk-45ANSCTO.mjs} +85 -15
- package/dist/{chunk-MYSH5Y4E.mjs → chunk-4IE3YK7U.mjs} +1 -1
- package/dist/{chunk-CWUQBECF.mjs → chunk-4SJ22WTT.mjs} +1 -1
- package/dist/{chunk-IRJSZAJB.mjs → chunk-7UTRNV6R.mjs} +1 -1
- package/dist/{chunk-Z37PDUJR.cjs → chunk-BAD6T5NU.cjs} +4 -4
- package/dist/{chunk-USMRAC72.cjs → chunk-BLZCAFGJ.cjs} +2 -2
- package/dist/{chunk-M5XU22PQ.mjs → chunk-CFKAYV7B.mjs} +1 -1
- package/dist/{chunk-MAPHNGTF.cjs → chunk-CPSFDQKJ.cjs} +3 -3
- package/dist/{chunk-3WM7VBGW.mjs → chunk-CVKTYG4L.mjs} +2 -2
- package/dist/{chunk-BOEDYXAX.cjs → chunk-FDU4Q4QP.cjs} +7 -7
- package/dist/{chunk-DSWSDDP2.cjs → chunk-FWLXYNWA.cjs} +379 -309
- package/dist/{chunk-I5CVJ24H.mjs → chunk-GWPANDW3.mjs} +1 -1
- package/dist/{chunk-BCCCPFHQ.mjs → chunk-HV6CYSMF.mjs} +3 -0
- package/dist/{chunk-5I4ZGKP2.cjs → chunk-IAERD73G.cjs} +161 -156
- package/dist/{chunk-EDBIBO67.mjs → chunk-KHIEGVG7.mjs} +1 -1
- package/dist/{chunk-HOQ2MYBJ.cjs → chunk-L2IULWKV.cjs} +9 -9
- package/dist/{chunk-57EEWWUS.cjs → chunk-NXOZRI3B.cjs} +2 -2
- package/dist/{chunk-OFVBMS6I.cjs → chunk-P253SZJF.cjs} +93 -93
- package/dist/{chunk-NLHSKKTT.mjs → chunk-PAENAKTC.mjs} +1 -1
- package/dist/{chunk-OP7BIEUW.cjs → chunk-Q3YWQEUS.cjs} +2 -2
- package/dist/{chunk-EBSL5TW7.cjs → chunk-QYDGIXQ5.cjs} +146 -88
- package/dist/{chunk-DFDQGHPU.mjs → chunk-QYWP5KDY.mjs} +17 -12
- package/dist/{chunk-INU4K4U4.mjs → chunk-RA5OUXOJ.mjs} +2 -2
- package/dist/{chunk-XLULEFRW.mjs → chunk-SB74WCKC.mjs} +67 -9
- package/dist/{chunk-3OKSEJ33.cjs → chunk-T7UC2ORA.cjs} +3 -0
- package/dist/{chunk-22BTYPIX.cjs → chunk-TQJ35BBW.cjs} +4 -4
- package/dist/{chunk-BZY3SRRD.mjs → chunk-UAQQUQWE.mjs} +1 -1
- package/dist/{chunk-YU6VL7H5.cjs → chunk-UDWBTABT.cjs} +3 -3
- package/dist/{chunk-F7JVO3OZ.cjs → chunk-VGZIIOU6.cjs} +4 -4
- package/dist/{chunk-RQ6XX5IN.mjs → chunk-VTEAUQMT.mjs} +1 -1
- package/dist/{chunk-L3BSHASB.cjs → chunk-XMVZXZ32.cjs} +4 -4
- package/dist/{chunk-MUUDHWQZ.mjs → chunk-YMAE32O7.mjs} +1 -1
- package/dist/{chunk-L5HDCDFT.mjs → chunk-YNPVG2GG.mjs} +1 -1
- package/dist/{chunk-GLNVLCUH.cjs → chunk-ZSVFI7JM.cjs} +6 -6
- package/dist/{client-component.d-DLknFP8l.d.ts → client-component.d-CZG02pIh.d.ts} +2 -1
- package/dist/{client-component.d-DLMCzmUx.d.mts → client-component.d-miqIXyQv.d.mts} +2 -1
- package/dist/{devtools-4SVIRV4P.cjs → devtools-A3L7WNTB.cjs} +4 -4
- package/dist/{devtools-MWQA5LVN.mjs → devtools-DGC2247E.mjs} +2 -2
- package/dist/docs.cjs +4 -4
- package/dist/docs.mjs +3 -3
- package/dist/environment/vite.cjs +4 -4
- package/dist/environment/vite.mjs +3 -3
- package/dist/index.cjs +18 -18
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +18 -18
- package/dist/internal/build-runtime.cjs +18 -18
- package/dist/internal/build-runtime.mjs +17 -17
- package/dist/internal/cli-runtime.cjs +6 -6
- package/dist/internal/cli-runtime.mjs +5 -5
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/config-runtime.cjs +4 -4
- package/dist/internal/config-runtime.mjs +3 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/islands-runtime.cjs +15 -8
- package/dist/internal/islands-runtime.d.mts +2 -3
- package/dist/internal/islands-runtime.d.ts +2 -3
- package/dist/internal/islands-runtime.mjs +15 -8
- package/dist/internal/islands-server-tree.cjs +8 -0
- package/dist/internal/islands-server-tree.d.mts +5 -0
- package/dist/internal/islands-server-tree.d.ts +5 -0
- package/dist/internal/islands-server-tree.mjs +8 -0
- package/dist/internal/islx-actions-server.d.mts +0 -3
- package/dist/internal/islx-actions-server.d.ts +0 -3
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +7 -7
- package/dist/internal/production-runtime.mjs +8 -8
- package/dist/plugin.cjs +13 -13
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +12 -12
- package/dist/renderer.cjs +3 -3
- package/dist/renderer.d.mts +10 -2
- package/dist/renderer.d.ts +10 -2
- package/dist/renderer.mjs +2 -2
- package/dist/{rsc-pipeline-UT3Z2GDO.mjs → rsc-pipeline-BROS3NEB.mjs} +4 -4
- package/dist/{rsc-pipeline-OWBEZ7HB.cjs → rsc-pipeline-SNGPAXGW.cjs} +5 -5
- package/dist/{runtime-SRMQ46SK.cjs → runtime-7T5TRAWL.cjs} +9 -9
- package/dist/{runtime-F5I3WY3B.mjs → runtime-SLJLW37A.mjs} +4 -4
- package/dist/server.cjs +38 -38
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.mjs +14 -14
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +13 -13
- package/dist/vite.d.mts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.mjs +12 -12
- package/package.json +6 -1
- package/dist/analyzer-PFKA5NI6.cjs +0 -17
|
@@ -43,7 +43,7 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
var
|
|
46
|
+
var _chunkP253SZJFcjs = require('./chunk-P253SZJF.cjs');
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
@@ -58,13 +58,13 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
var
|
|
61
|
+
var _chunkXMVZXZ32cjs = require('./chunk-XMVZXZ32.cjs');
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunkCPSFDQKJcjs = require('./chunk-CPSFDQKJ.cjs');
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkBAD6T5NUcjs = require('./chunk-BAD6T5NU.cjs');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
@@ -91,13 +91,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
var
|
|
94
|
+
var _chunkTQJ35BBWcjs = require('./chunk-TQJ35BBW.cjs');
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
var
|
|
100
|
+
var _chunkNXOZRI3Bcjs = require('./chunk-NXOZRI3B.cjs');
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
|
|
@@ -148,7 +148,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
var
|
|
151
|
+
var _chunkQYDGIXQ5cjs = require('./chunk-QYDGIXQ5.cjs');
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
|
|
@@ -193,7 +193,7 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
|
193
193
|
|
|
194
194
|
|
|
195
195
|
|
|
196
|
-
var
|
|
196
|
+
var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.cjs');
|
|
197
197
|
|
|
198
198
|
|
|
199
199
|
|
|
@@ -313,7 +313,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
313
313
|
var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
|
|
314
314
|
|
|
315
315
|
|
|
316
|
-
var
|
|
316
|
+
var _chunk2NKNP4AHcjs = require('./chunk-2NKNP4AH.cjs');
|
|
317
317
|
|
|
318
318
|
|
|
319
319
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -714,7 +714,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
714
714
|
return null;
|
|
715
715
|
}
|
|
716
716
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
717
|
-
return
|
|
717
|
+
return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
|
|
718
718
|
"CLIENT_SERVER_FUNCTION",
|
|
719
719
|
id,
|
|
720
720
|
`${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
|
|
@@ -973,21 +973,21 @@ function readPropertyKey(property) {
|
|
|
973
973
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
974
974
|
switch (finding.kind) {
|
|
975
975
|
case "server-env":
|
|
976
|
-
return
|
|
976
|
+
return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
|
|
977
977
|
"CLIENT_SERVER_ENV",
|
|
978
978
|
file,
|
|
979
979
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
980
980
|
location
|
|
981
981
|
);
|
|
982
982
|
case "public-env":
|
|
983
|
-
return
|
|
983
|
+
return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
|
|
984
984
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
985
985
|
file,
|
|
986
986
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
987
987
|
location
|
|
988
988
|
);
|
|
989
989
|
case "builtin":
|
|
990
|
-
return
|
|
990
|
+
return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
|
|
991
991
|
"CLIENT_NODE_BUILTIN",
|
|
992
992
|
file,
|
|
993
993
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1289,7 +1289,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1289
1289
|
return import("./workflows.cjs");
|
|
1290
1290
|
}
|
|
1291
1291
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1292
|
-
return import("./devtools-
|
|
1292
|
+
return import("./devtools-A3L7WNTB.cjs");
|
|
1293
1293
|
}
|
|
1294
1294
|
function loadFarmDevtoolsUIRuntime() {
|
|
1295
1295
|
return import("./devtools-ui-C2EMF2SO.cjs");
|
|
@@ -1314,7 +1314,7 @@ function farmI18nClientBridgePlugin() {
|
|
|
1314
1314
|
};
|
|
1315
1315
|
}
|
|
1316
1316
|
function farmNavigationPlugin(renderer) {
|
|
1317
|
-
const otherRenderer = !
|
|
1317
|
+
const otherRenderer = !_chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
|
|
1318
1318
|
return {
|
|
1319
1319
|
name: "farm:navigation",
|
|
1320
1320
|
config() {
|
|
@@ -1339,16 +1339,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1339
1339
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1340
1340
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1341
1341
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1342
|
-
|
|
1343
|
-
new RegExp(`^${
|
|
1342
|
+
_chunkP253SZJFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1343
|
+
new RegExp(`^${_chunkQYDGIXQ5cjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1344
1344
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1345
1345
|
// included.
|
|
1346
1346
|
/^node:/,
|
|
1347
|
-
|
|
1347
|
+
_chunkP253SZJFcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1348
1348
|
];
|
|
1349
1349
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1350
|
-
|
|
1351
|
-
new RegExp(`^${
|
|
1350
|
+
_chunkP253SZJFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1351
|
+
new RegExp(`^${_chunkQYDGIXQ5cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1352
1352
|
];
|
|
1353
1353
|
function createFarmPlatformClientModule(platform) {
|
|
1354
1354
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1378,24 +1378,24 @@ function farmIslandContainersPlugin(config) {
|
|
|
1378
1378
|
root = config.root || resolved.root;
|
|
1379
1379
|
},
|
|
1380
1380
|
transform(code, id) {
|
|
1381
|
-
if (
|
|
1381
|
+
if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
|
|
1382
1382
|
return null;
|
|
1383
1383
|
}
|
|
1384
1384
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1385
1385
|
return null;
|
|
1386
1386
|
}
|
|
1387
|
-
if (
|
|
1387
|
+
if (_chunkQYDGIXQ5cjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1388
1388
|
const file = id.split("?", 1)[0];
|
|
1389
|
-
const bindings =
|
|
1389
|
+
const bindings = _chunkQYDGIXQ5cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1390
1390
|
if (bindings.length === 0) return null;
|
|
1391
|
-
const grown =
|
|
1391
|
+
const grown = _chunkQYDGIXQ5cjs.wrapFarmIslandContainers.call(void 0, {
|
|
1392
1392
|
code,
|
|
1393
1393
|
file,
|
|
1394
1394
|
bindings,
|
|
1395
|
-
reference:
|
|
1395
|
+
reference: _chunkQYDGIXQ5cjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1396
1396
|
});
|
|
1397
1397
|
if (grown === null) return null;
|
|
1398
|
-
|
|
1398
|
+
_chunkQYDGIXQ5cjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1399
1399
|
return { code: grown, map: null };
|
|
1400
1400
|
}
|
|
1401
1401
|
};
|
|
@@ -1409,20 +1409,25 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1409
1409
|
config(config) {
|
|
1410
1410
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1411
1411
|
if (options.distDir) {
|
|
1412
|
-
|
|
1412
|
+
_chunkQYDGIXQ5cjs.usePackageScanCacheFile.call(void 0,
|
|
1413
1413
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1414
1414
|
);
|
|
1415
1415
|
}
|
|
1416
|
-
const bundledPackages =
|
|
1416
|
+
const bundledPackages = _chunkQYDGIXQ5cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1417
1417
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1418
|
-
|
|
1418
|
+
_chunkQYDGIXQ5cjs.persistPackageScanCache.call(void 0, );
|
|
1419
1419
|
return {
|
|
1420
|
-
optimizeDeps: {
|
|
1420
|
+
optimizeDeps: {
|
|
1421
|
+
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1422
|
+
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1423
|
+
rolldownOptions: { plugins: [_chunkQYDGIXQ5cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1424
|
+
},
|
|
1421
1425
|
ssr: {
|
|
1422
1426
|
noExternal: [
|
|
1423
1427
|
// Resolve `server-only` here rather than in Node, which would load its throwing build.
|
|
1424
1428
|
SERVER_ONLY_PACKAGE,
|
|
1425
|
-
// Packages Node cannot load as a bundler does (stylesheet imports, `module`-only ESM
|
|
1429
|
+
// Packages Node cannot load as a bundler does (stylesheet imports, `module`-only ESM,
|
|
1430
|
+
// fonts that only Farm's font compiler can build).
|
|
1426
1431
|
...bundledPackages.map(({ name }) => name)
|
|
1427
1432
|
],
|
|
1428
1433
|
...prebundle
|
|
@@ -1441,8 +1446,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1441
1446
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1442
1447
|
}
|
|
1443
1448
|
this.error(
|
|
1444
|
-
|
|
1445
|
-
|
|
1449
|
+
_chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
|
|
1450
|
+
_chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
|
|
1446
1451
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1447
1452
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1448
1453
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1452,9 +1457,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1452
1457
|
);
|
|
1453
1458
|
}
|
|
1454
1459
|
if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1455
|
-
return
|
|
1460
|
+
return _chunkQYDGIXQ5cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1456
1461
|
}
|
|
1457
|
-
const resolveFrom = importer ?
|
|
1462
|
+
const resolveFrom = importer ? _chunkQYDGIXQ5cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1458
1463
|
if (resolveFrom) {
|
|
1459
1464
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1460
1465
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1471,8 +1476,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1471
1476
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1472
1477
|
if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
|
|
1473
1478
|
this.error(
|
|
1474
|
-
|
|
1475
|
-
|
|
1479
|
+
_chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
|
|
1480
|
+
_chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
|
|
1476
1481
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1477
1482
|
_nullishCoalesce(importer, () => ( id)),
|
|
1478
1483
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1497,7 +1502,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1497
1502
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1498
1503
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1499
1504
|
}
|
|
1500
|
-
return _nullishCoalesce(
|
|
1505
|
+
return _nullishCoalesce(_chunkQYDGIXQ5cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1501
1506
|
}
|
|
1502
1507
|
}
|
|
1503
1508
|
};
|
|
@@ -1978,7 +1983,7 @@ function getEnvDefines(config, configEnv) {
|
|
|
1978
1983
|
_chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
|
|
1979
1984
|
_chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
|
|
1980
1985
|
config.images,
|
|
1981
|
-
|
|
1986
|
+
_chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
|
|
1982
1987
|
)
|
|
1983
1988
|
)
|
|
1984
1989
|
)
|
|
@@ -2111,7 +2116,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2111
2116
|
return null;
|
|
2112
2117
|
}
|
|
2113
2118
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2114
|
-
const everyExportIsComponent = options.code.includes(
|
|
2119
|
+
const everyExportIsComponent = options.code.includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2115
2120
|
const replacements = [];
|
|
2116
2121
|
const wrapperStatements = [];
|
|
2117
2122
|
const originalEntries = [];
|
|
@@ -2266,16 +2271,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2266
2271
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2267
2272
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2268
2273
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2269
|
-
if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(
|
|
2274
|
+
if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkQYDGIXQ5cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2270
2275
|
}
|
|
2271
2276
|
findings.push(finding);
|
|
2272
2277
|
}
|
|
2273
2278
|
if (findings.length === 0) return;
|
|
2274
2279
|
warnedClientBoundaryIds.add(id);
|
|
2275
|
-
const locate =
|
|
2280
|
+
const locate = _chunkQYDGIXQ5cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2276
2281
|
_chunk7U4XF76Rcjs.logger.warn(
|
|
2277
2282
|
findings.map(
|
|
2278
|
-
(finding) =>
|
|
2283
|
+
(finding) => _chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
|
|
2279
2284
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2280
2285
|
config.root
|
|
2281
2286
|
)
|
|
@@ -2292,7 +2297,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
|
|
|
2292
2297
|
);
|
|
2293
2298
|
}
|
|
2294
2299
|
function shouldEmitFarmClientRootHmr(renderer) {
|
|
2295
|
-
return
|
|
2300
|
+
return _chunkT7UC2ORAcjs.getFarmRendererCapabilities.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
|
|
2296
2301
|
}
|
|
2297
2302
|
var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
|
|
2298
2303
|
function toFarmRuntimeModuleId(specifier) {
|
|
@@ -2323,9 +2328,9 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2323
2328
|
);
|
|
2324
2329
|
}
|
|
2325
2330
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2326
|
-
const rendererDisabled =
|
|
2331
|
+
const rendererDisabled = _chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2327
2332
|
const imageImports = farmImageImportsPlugin();
|
|
2328
|
-
const fontImports =
|
|
2333
|
+
const fontImports = _chunkP253SZJFcjs.farmFontImportsPlugin.call(void 0, {
|
|
2329
2334
|
root: options.root,
|
|
2330
2335
|
basePath: options.basePath,
|
|
2331
2336
|
publicDir: options.publicDir
|
|
@@ -2359,8 +2364,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2359
2364
|
if (mdxComponents) files.add(mdxComponents);
|
|
2360
2365
|
return files;
|
|
2361
2366
|
};
|
|
2362
|
-
const islxActionsMode = () =>
|
|
2363
|
-
const islandsServerFns = () =>
|
|
2367
|
+
const islxActionsMode = () => _chunkP253SZJFcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
|
|
2368
|
+
const islandsServerFns = () => _chunkP253SZJFcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
|
|
2364
2369
|
let reactRefreshActive = false;
|
|
2365
2370
|
let server;
|
|
2366
2371
|
let deferredGates;
|
|
@@ -2403,11 +2408,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2403
2408
|
isBuild = configEnv.command === "build";
|
|
2404
2409
|
const farmAliases = {
|
|
2405
2410
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2406
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} :
|
|
2411
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkP253SZJFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2407
2412
|
};
|
|
2408
2413
|
if (Object.keys(farmAliases).length > 0) {
|
|
2409
2414
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2410
|
-
userConfig.resolve.alias =
|
|
2415
|
+
userConfig.resolve.alias = _chunkP253SZJFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2411
2416
|
}
|
|
2412
2417
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2413
2418
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
|
|
@@ -2481,7 +2486,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2481
2486
|
} catch (e21) {
|
|
2482
2487
|
}
|
|
2483
2488
|
};
|
|
2484
|
-
farmApp = new (0,
|
|
2489
|
+
farmApp = new (0, _chunkP253SZJFcjs.FarmApp)(
|
|
2485
2490
|
{
|
|
2486
2491
|
...options,
|
|
2487
2492
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2489,7 +2494,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2489
2494
|
server
|
|
2490
2495
|
);
|
|
2491
2496
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2492
|
-
|
|
2497
|
+
_chunkQYDGIXQ5cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2493
2498
|
farmApp.getConfig().root,
|
|
2494
2499
|
options.distDir || ".farm"
|
|
2495
2500
|
)
|
|
@@ -2500,7 +2505,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2500
2505
|
let farmAppPackages;
|
|
2501
2506
|
if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
|
|
2502
2507
|
farmMiddlewares.use((_req, res, next) => {
|
|
2503
|
-
if (
|
|
2508
|
+
if (_chunkNXOZRI3Bcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2504
2509
|
res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2505
2510
|
}
|
|
2506
2511
|
next();
|
|
@@ -2508,7 +2513,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2508
2513
|
}
|
|
2509
2514
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2510
2515
|
const devBuiltInRoutePaths = new Set(
|
|
2511
|
-
|
|
2516
|
+
_chunkTQJ35BBWcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2512
2517
|
agent: {
|
|
2513
2518
|
apiCatalog: true,
|
|
2514
2519
|
mcp: true,
|
|
@@ -2558,7 +2563,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2558
2563
|
);
|
|
2559
2564
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2560
2565
|
try {
|
|
2561
|
-
const result = await
|
|
2566
|
+
const result = await _chunkXMVZXZ32cjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2562
2567
|
root: farmConfig.root,
|
|
2563
2568
|
srcDir: farmConfig.srcDir,
|
|
2564
2569
|
layers: farmConfig.layers,
|
|
@@ -2603,7 +2608,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2603
2608
|
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
2604
2609
|
);
|
|
2605
2610
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
2606
|
-
...
|
|
2611
|
+
..._chunkT7UC2ORAcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
2607
2612
|
".md",
|
|
2608
2613
|
".mdx"
|
|
2609
2614
|
]);
|
|
@@ -2859,7 +2864,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2859
2864
|
rendererServer: farmConfig.renderer.server,
|
|
2860
2865
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2861
2866
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2862
|
-
globalStylesheetHref:
|
|
2867
|
+
globalStylesheetHref: _chunkP253SZJFcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2863
2868
|
farmConfig.root,
|
|
2864
2869
|
farmConfig.srcDir
|
|
2865
2870
|
),
|
|
@@ -2890,7 +2895,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2890
2895
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2891
2896
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2892
2897
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2893
|
-
globalStylesheetHref:
|
|
2898
|
+
globalStylesheetHref: _chunkP253SZJFcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2894
2899
|
farmConfig.root,
|
|
2895
2900
|
farmConfig.srcDir
|
|
2896
2901
|
),
|
|
@@ -2927,9 +2932,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2927
2932
|
}
|
|
2928
2933
|
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.find, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
2929
2934
|
if (farmInfraAnalyticsPlugin) {
|
|
2930
|
-
|
|
2935
|
+
_chunkBAD6T5NUcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
2931
2936
|
if (farmDocsDevRuntime) {
|
|
2932
|
-
const label =
|
|
2937
|
+
const label = _chunkTQJ35BBWcjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
2933
2938
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
2934
2939
|
{
|
|
2935
2940
|
path: _optionalChain([farmConfig, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.entry]) || "/docs",
|
|
@@ -2937,7 +2942,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2937
2942
|
pages: await getFarmDocsPagePaths()
|
|
2938
2943
|
}
|
|
2939
2944
|
);
|
|
2940
|
-
if (label) return
|
|
2945
|
+
if (label) return _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
2941
2946
|
}
|
|
2942
2947
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
2943
2948
|
return { pathname, pattern: _optionalChain([match, 'access', _202 => _202.route, 'optionalAccess', _203 => _203.pattern]) || null };
|
|
@@ -3101,7 +3106,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3101
3106
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3102
3107
|
res.statusCode = 200;
|
|
3103
3108
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3104
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3109
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkP253SZJFcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3105
3110
|
return;
|
|
3106
3111
|
}
|
|
3107
3112
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3381,9 +3386,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3381
3386
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3382
3387
|
try {
|
|
3383
3388
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3384
|
-
const route =
|
|
3389
|
+
const route = _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0,
|
|
3385
3390
|
{ pathname: requestPathname },
|
|
3386
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3391
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkTQJ35BBWcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3387
3392
|
);
|
|
3388
3393
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3389
3394
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3472,7 +3477,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3472
3477
|
);
|
|
3473
3478
|
return;
|
|
3474
3479
|
}
|
|
3475
|
-
if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false &&
|
|
3480
|
+
if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunkTQJ35BBWcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3476
3481
|
const manifestGuardCoversPath = (path7) => _chunk4B6YJ5DScjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3477
3482
|
{
|
|
3478
3483
|
config: farmConfig,
|
|
@@ -3482,18 +3487,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3482
3487
|
apiServerBasePath
|
|
3483
3488
|
);
|
|
3484
3489
|
await serveBuiltInRoute(async () => {
|
|
3485
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3486
|
-
const manifest = await
|
|
3490
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkP253SZJFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3491
|
+
const manifest = await _chunkTQJ35BBWcjs.createFarmAppManifestResponse.call(void 0,
|
|
3487
3492
|
new Request(parsedRequestUrl, {
|
|
3488
3493
|
method: requestMethod,
|
|
3489
3494
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3490
3495
|
}),
|
|
3491
3496
|
{
|
|
3492
|
-
...
|
|
3497
|
+
..._chunkTQJ35BBWcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3493
3498
|
build: "development",
|
|
3494
3499
|
packages: farmAppPackages,
|
|
3495
3500
|
// Read again on each request; unchanged files come from a cache.
|
|
3496
|
-
webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ?
|
|
3501
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkP253SZJFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3497
3502
|
}),
|
|
3498
3503
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3499
3504
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3511,11 +3516,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3511
3516
|
});
|
|
3512
3517
|
return;
|
|
3513
3518
|
}
|
|
3514
|
-
if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
3519
|
+
if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkTQJ35BBWcjs.FARM_API_CATALOG_PATH) {
|
|
3515
3520
|
await serveBuiltInRoute(
|
|
3516
|
-
() =>
|
|
3521
|
+
() => _chunkTQJ35BBWcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3517
3522
|
requestMethod,
|
|
3518
|
-
|
|
3523
|
+
_chunkTQJ35BBWcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3519
3524
|
new Request(parsedRequestUrl, {
|
|
3520
3525
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3521
3526
|
})
|
|
@@ -3524,7 +3529,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3524
3529
|
return;
|
|
3525
3530
|
}
|
|
3526
3531
|
if (_optionalChain([options, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) !== false) {
|
|
3527
|
-
const aiCatalog =
|
|
3532
|
+
const aiCatalog = _chunkTQJ35BBWcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3528
3533
|
new Request(parsedRequestUrl, {
|
|
3529
3534
|
method: requestMethod,
|
|
3530
3535
|
headers: {
|
|
@@ -3606,7 +3611,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3606
3611
|
{
|
|
3607
3612
|
kind: "docs",
|
|
3608
3613
|
computed: docsResponse,
|
|
3609
|
-
label:
|
|
3614
|
+
label: _chunkTQJ35BBWcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3610
3615
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3611
3616
|
{
|
|
3612
3617
|
path: _optionalChain([farmConfig, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.entry]) || "/docs",
|
|
@@ -3643,7 +3648,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3643
3648
|
}
|
|
3644
3649
|
const markdownRouteLabel = () => (
|
|
3645
3650
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3646
|
-
|
|
3651
|
+
_chunkTQJ35BBWcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3647
3652
|
toRoutePathname(requestPathname),
|
|
3648
3653
|
(page) => _optionalChain([farmApp, 'access', _273 => _273.getRouteManager, 'call', _274 => _274(), 'access', _275 => _275.matchRoute, 'call', _276 => _276(page), 'access', _277 => _277.route, 'optionalAccess', _278 => _278.pattern])
|
|
3649
3654
|
)
|
|
@@ -3664,7 +3669,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3664
3669
|
return {
|
|
3665
3670
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3666
3671
|
// Project-relative, as production sends it: never the machine's path.
|
|
3667
|
-
filePath:
|
|
3672
|
+
filePath: _chunkP253SZJFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3668
3673
|
};
|
|
3669
3674
|
},
|
|
3670
3675
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -4007,9 +4012,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4007
4012
|
);
|
|
4008
4013
|
const docsRuntimeOptions = () => ({
|
|
4009
4014
|
kind: "docs",
|
|
4010
|
-
route:
|
|
4015
|
+
route: _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0,
|
|
4011
4016
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4012
|
-
|
|
4017
|
+
_chunkTQJ35BBWcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4013
4018
|
path: _optionalChain([farmConfig, 'access', _290 => _290.docs, 'optionalAccess', _291 => _291.entry]) || "/docs",
|
|
4014
4019
|
roots: _optionalChain([farmConfig, 'access', _292 => _292.docs, 'optionalAccess', _293 => _293.roots, 'optionalAccess', _294 => _294.map, 'call', _295 => _295((root) => root.entry)])
|
|
4015
4020
|
})
|
|
@@ -4363,7 +4368,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4363
4368
|
);
|
|
4364
4369
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4365
4370
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4366
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4371
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkQYDGIXQ5cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4367
4372
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4368
4373
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4369
4374
|
let mergedMetadata = {};
|
|
@@ -4374,7 +4379,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4374
4379
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4375
4380
|
(entry) => entry.pattern === layout.pattern
|
|
4376
4381
|
), () => ( {
|
|
4377
|
-
...
|
|
4382
|
+
..._chunkQYDGIXQ5cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4378
4383
|
serverTree: false
|
|
4379
4384
|
}))
|
|
4380
4385
|
);
|
|
@@ -4387,9 +4392,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4387
4392
|
(metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
|
|
4388
4393
|
)
|
|
4389
4394
|
];
|
|
4390
|
-
const hydrationIslandStrategy =
|
|
4395
|
+
const hydrationIslandStrategy = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4391
4396
|
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options))), 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverComponents])
|
|
4392
|
-
) === "islands" ?
|
|
4397
|
+
) === "islands" ? _chunkP253SZJFcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4393
4398
|
route,
|
|
4394
4399
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4395
4400
|
layouts.map((layout, index) => ({
|
|
@@ -4455,7 +4460,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4455
4460
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4456
4461
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4457
4462
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4458
|
-
), () => (
|
|
4463
|
+
), () => ( _chunkQYDGIXQ5cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4459
4464
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4460
4465
|
request: targetRequest,
|
|
4461
4466
|
params: slot.params,
|
|
@@ -4505,7 +4510,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4505
4510
|
pageShouldHydrate: shouldHydrate,
|
|
4506
4511
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4507
4512
|
islandStrategy: hydrationIslandStrategy,
|
|
4508
|
-
rendering:
|
|
4513
|
+
rendering: _chunkXMVZXZ32cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4509
4514
|
});
|
|
4510
4515
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4511
4516
|
const layoutStartIndex = _chunk4B6YJ5DScjs.getSharedLayoutPrefixLength.call(void 0,
|
|
@@ -4640,7 +4645,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4640
4645
|
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasRuntimeHook, 'call', _340 => _340("after")]), () => ( false));
|
|
4641
4646
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4642
4647
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4643
|
-
const mcpLabel =
|
|
4648
|
+
const mcpLabel = _chunkTQJ35BBWcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4644
4649
|
if (mcpLabel) return mcpLabel;
|
|
4645
4650
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4646
4651
|
return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4649,7 +4654,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4649
4654
|
const match = routeManager2.matchRoute(pathname2);
|
|
4650
4655
|
return {
|
|
4651
4656
|
kind: "page",
|
|
4652
|
-
route:
|
|
4657
|
+
route: _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0,
|
|
4653
4658
|
{
|
|
4654
4659
|
pathname: pathname2,
|
|
4655
4660
|
pattern: _optionalChain([match, 'optionalAccess', _341 => _341.route, 'optionalAccess', _342 => _342.pattern]) || null,
|
|
@@ -4876,7 +4881,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4876
4881
|
if (imageModule) return imageModule;
|
|
4877
4882
|
}
|
|
4878
4883
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4879
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) ||
|
|
4884
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4880
4885
|
const root = _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
|
|
4881
4886
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4882
4887
|
return generateProgrammaticClientRouteModuleForId(
|
|
@@ -4894,7 +4899,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4894
4899
|
}
|
|
4895
4900
|
if (isFarmClientVirtualId(id)) {
|
|
4896
4901
|
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _372 => _372.getConfig, 'call', _373 => _373()]);
|
|
4897
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) ||
|
|
4902
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4898
4903
|
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.integrations]) || options.integrations;
|
|
4899
4904
|
const root = _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.root]) || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
|
|
4900
4905
|
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.docs]);
|
|
@@ -4913,10 +4918,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4913
4918
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4914
4919
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4915
4920
|
const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
|
|
4916
|
-
const isolatedHydrationMode =
|
|
4921
|
+
const isolatedHydrationMode = _chunkQYDGIXQ5cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4917
4922
|
_optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.isolatedClientHydration]),
|
|
4918
4923
|
{
|
|
4919
|
-
serverComponents:
|
|
4924
|
+
serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
|
|
4920
4925
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
4921
4926
|
}
|
|
4922
4927
|
);
|
|
@@ -4935,14 +4940,14 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
4935
4940
|
_optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
4936
4941
|
adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _394 => _394.adapter])) : void 0,
|
|
4937
4942
|
renderer,
|
|
4938
|
-
isolatedHydrationMode === "enabled" ||
|
|
4943
|
+
isolatedHydrationMode === "enabled" || _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _395 => _395.getRouteManager, 'call', _396 => _396(), 'access', _397 => _397.getIsolatedClientBoundaryModules, 'call', _398 => _398(root)])))), 'optionalAccess', _399 => _399.size]) > 0,
|
|
4939
4944
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.trailingSlash]), () => ( false)),
|
|
4940
4945
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.basePath]), () => ( "/")),
|
|
4941
|
-
|
|
4942
|
-
|
|
4946
|
+
_chunkP253SZJFcjs.generateClientCachePersistenceCode.call(void 0,
|
|
4947
|
+
_chunkP253SZJFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
|
|
4943
4948
|
),
|
|
4944
4949
|
adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4945
|
-
|
|
4950
|
+
_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
|
|
4946
4951
|
);
|
|
4947
4952
|
}
|
|
4948
4953
|
if (id === "/@farm/server") {
|
|
@@ -4961,11 +4966,11 @@ export const getManifest = () => ({
|
|
|
4961
4966
|
});
|
|
4962
4967
|
`;
|
|
4963
4968
|
}
|
|
4964
|
-
const globalStylesheetHref =
|
|
4969
|
+
const globalStylesheetHref = _chunkP253SZJFcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4965
4970
|
server.config.root,
|
|
4966
4971
|
_optionalChain([farmApp, 'optionalAccess', _407 => _407.getConfig, 'call', _408 => _408(), 'access', _409 => _409.srcDir])
|
|
4967
4972
|
);
|
|
4968
|
-
const fullManifest =
|
|
4973
|
+
const fullManifest = _chunkP253SZJFcjs.createFarmDevClientManifest.call(void 0,
|
|
4969
4974
|
routeManager.generateClientManifest(server.config.root),
|
|
4970
4975
|
{
|
|
4971
4976
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -4987,45 +4992,45 @@ export { manifest };
|
|
|
4987
4992
|
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
4988
4993
|
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _412 => _412.getConfig, 'call', _413 => _413()]), () => ( options));
|
|
4989
4994
|
let rewrotePackageImports = false;
|
|
4990
|
-
if (
|
|
4995
|
+
if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkQYDGIXQ5cjs.hasUseClientDirective.call(void 0, code)) {
|
|
4991
4996
|
const file = id.split("?", 1)[0];
|
|
4992
4997
|
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
|
|
4993
4998
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
4994
4999
|
const rewrite = () => {
|
|
4995
5000
|
if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
|
|
4996
5001
|
if (farmReactServerFiles.has(file)) {
|
|
4997
|
-
for (const child of
|
|
5002
|
+
for (const child of _chunkQYDGIXQ5cjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
4998
5003
|
farmReactServerFiles.add(child);
|
|
4999
5004
|
}
|
|
5000
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5005
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkQYDGIXQ5cjs.getFarmClientReachableModules.call(void 0,
|
|
5001
5006
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5002
5007
|
projectRoot
|
|
5003
5008
|
).has(path6.resolve(file));
|
|
5004
|
-
const reactServer = !serverModule ? null :
|
|
5009
|
+
const reactServer = !serverModule ? null : _chunkQYDGIXQ5cjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5005
5010
|
code,
|
|
5006
5011
|
file,
|
|
5007
|
-
reference: (specifier, exportName) =>
|
|
5012
|
+
reference: (specifier, exportName) => _chunkQYDGIXQ5cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5008
5013
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5009
5014
|
});
|
|
5010
5015
|
if (reactServer !== null) {
|
|
5011
5016
|
code = reactServer;
|
|
5012
5017
|
rewrotePackageImports = true;
|
|
5013
5018
|
}
|
|
5014
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5019
|
+
const internal = farmReactServerFiles.has(file) ? _chunkQYDGIXQ5cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5015
5020
|
code,
|
|
5016
5021
|
file,
|
|
5017
|
-
reference: (clientFile) =>
|
|
5022
|
+
reference: (clientFile) => _chunkQYDGIXQ5cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5018
5023
|
}) : null;
|
|
5019
5024
|
if (internal !== null) {
|
|
5020
5025
|
code = internal;
|
|
5021
5026
|
rewrotePackageImports = true;
|
|
5022
5027
|
}
|
|
5023
5028
|
}
|
|
5024
|
-
const rewritePackageImports = (source2) =>
|
|
5029
|
+
const rewritePackageImports = (source2) => _chunkQYDGIXQ5cjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5025
5030
|
code: source2,
|
|
5026
5031
|
file,
|
|
5027
5032
|
root: projectRoot,
|
|
5028
|
-
isClientPackage: (specifier) =>
|
|
5033
|
+
isClientPackage: (specifier) => _chunkQYDGIXQ5cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5029
5034
|
});
|
|
5030
5035
|
const routeManager = _optionalChain([farmApp, 'optionalAccess', _420 => _420.getRouteManager, 'call', _421 => _421()]);
|
|
5031
5036
|
const source = code;
|
|
@@ -5046,7 +5051,7 @@ export { manifest };
|
|
|
5046
5051
|
}
|
|
5047
5052
|
}
|
|
5048
5053
|
};
|
|
5049
|
-
if (buildSnapshot)
|
|
5054
|
+
if (buildSnapshot) _chunkQYDGIXQ5cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5050
5055
|
else rewrite();
|
|
5051
5056
|
}
|
|
5052
5057
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
@@ -5075,8 +5080,8 @@ export { manifest };
|
|
|
5075
5080
|
}
|
|
5076
5081
|
if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
|
|
5077
5082
|
const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
|
|
5078
|
-
if (
|
|
5079
|
-
const redacted =
|
|
5083
|
+
if (_chunkP253SZJFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5084
|
+
const redacted = _chunkP253SZJFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5080
5085
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5081
5086
|
}
|
|
5082
5087
|
}
|
|
@@ -5085,9 +5090,9 @@ export { manifest };
|
|
|
5085
5090
|
if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5086
5091
|
const violation = findClientServerFnViolation(code, id);
|
|
5087
5092
|
if (violation) {
|
|
5088
|
-
const locate =
|
|
5093
|
+
const locate = _chunkQYDGIXQ5cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5089
5094
|
this.error(
|
|
5090
|
-
|
|
5095
|
+
_chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
|
|
5091
5096
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5092
5097
|
currentConfig.root
|
|
5093
5098
|
)
|
|
@@ -5129,13 +5134,13 @@ export { manifest };
|
|
|
5129
5134
|
transformed = true;
|
|
5130
5135
|
}
|
|
5131
5136
|
}
|
|
5132
|
-
if (
|
|
5137
|
+
if (_chunkQYDGIXQ5cjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5133
5138
|
const clientBoundarySource = transformedCode;
|
|
5134
5139
|
const moduleInfo = this.getModuleInfo(id);
|
|
5135
5140
|
if (moduleInfo) {
|
|
5136
5141
|
moduleInfo.isClientComponent = true;
|
|
5137
5142
|
}
|
|
5138
|
-
transformedCode =
|
|
5143
|
+
transformedCode = _chunkQYDGIXQ5cjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5139
5144
|
transformed = true;
|
|
5140
5145
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
|
|
5141
5146
|
let isolatedModuleReference = null;
|
|
@@ -5144,12 +5149,12 @@ export { manifest };
|
|
|
5144
5149
|
const cleanId = id.split("?", 1)[0];
|
|
5145
5150
|
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
|
|
5146
5151
|
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
|
|
5147
|
-
if (
|
|
5148
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5152
|
+
if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkQYDGIXQ5cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5153
|
+
cleanId.replace(/\\/g, "/").includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5149
5154
|
isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5150
|
-
const islandsMode =
|
|
5151
|
-
const explicitStrategy =
|
|
5152
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5155
|
+
const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
|
|
5156
|
+
const explicitStrategy = _chunkQYDGIXQ5cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5157
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkP253SZJFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5153
5158
|
if (inference) {
|
|
5154
5159
|
for (const file of inference.files) {
|
|
5155
5160
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5172,14 +5177,14 @@ export { manifest };
|
|
|
5172
5177
|
);
|
|
5173
5178
|
}
|
|
5174
5179
|
transformedCode = transformedBoundary;
|
|
5175
|
-
} else if (selectedForIsolatedHydration &&
|
|
5180
|
+
} else if (selectedForIsolatedHydration && _chunkCPSFDQKJcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkQYDGIXQ5cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5176
5181
|
rendererIslandModule = true;
|
|
5177
5182
|
if (_optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) === true) {
|
|
5178
|
-
const renderer =
|
|
5183
|
+
const renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5179
5184
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5180
5185
|
code: transformedCode,
|
|
5181
5186
|
moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5182
|
-
islandStrategy: _nullishCoalesce(
|
|
5187
|
+
islandStrategy: _nullishCoalesce(_chunkQYDGIXQ5cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5183
5188
|
parse: (source) => this.parse(source),
|
|
5184
5189
|
withIsland: renderer.server
|
|
5185
5190
|
});
|
|
@@ -5354,10 +5359,10 @@ if (import.meta.hot) {
|
|
|
5354
5359
|
if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
|
|
5355
5360
|
_optionalChain([farmApp, 'optionalAccess', _464 => _464.getRouteManager, 'call', _465 => _465(), 'access', _466 => _466.noteSourceChange, 'call', _467 => _467(id, change.event)]);
|
|
5356
5361
|
}
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5362
|
+
_chunkQYDGIXQ5cjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
5363
|
+
_chunkQYDGIXQ5cjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
5364
|
+
_chunkP253SZJFcjs.invalidateFarmRouteRootInferences.call(void 0, );
|
|
5365
|
+
_chunkQYDGIXQ5cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5361
5366
|
},
|
|
5362
5367
|
async handleHotUpdate(ctx) {
|
|
5363
5368
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5390,10 +5395,10 @@ if (import.meta.hot) {
|
|
|
5390
5395
|
}
|
|
5391
5396
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5392
5397
|
};
|
|
5393
|
-
if (normalizedFile.includes(
|
|
5398
|
+
if (normalizedFile.includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5394
5399
|
path6.posix.join(
|
|
5395
5400
|
_chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _470 => _470.root]) || options.root || server2.config.root),
|
|
5396
|
-
|
|
5401
|
+
_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5397
5402
|
)
|
|
5398
5403
|
))
|
|
5399
5404
|
return modules;
|
|
@@ -5431,7 +5436,7 @@ if (import.meta.hot) {
|
|
|
5431
5436
|
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.experimental, 'optionalAccess', _476 => _476.isolatedClientHydration]);
|
|
5432
5437
|
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getRouteManager, 'call', _478 => _478()]);
|
|
5433
5438
|
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5434
|
-
const tracksAsyncOwnerIslands =
|
|
5439
|
+
const tracksAsyncOwnerIslands = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.renderer])) && planRouteManager !== void 0;
|
|
5435
5440
|
let clientPlanCurrent = false;
|
|
5436
5441
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5437
5442
|
const routeManager = planRouteManager;
|
|
@@ -5690,27 +5695,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5690
5695
|
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5691
5696
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5692
5697
|
watchFile(routesFile);
|
|
5693
|
-
return
|
|
5698
|
+
return _chunkQYDGIXQ5cjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5694
5699
|
kind: parsed.kind,
|
|
5695
5700
|
routePath: parsed.routePath,
|
|
5696
5701
|
routesFile,
|
|
5697
5702
|
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
|
|
5698
|
-
|
|
5703
|
+
_chunkQYDGIXQ5cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5699
5704
|
)]),
|
|
5700
5705
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5701
|
-
rendererClient:
|
|
5706
|
+
rendererClient: _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
5702
5707
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5703
5708
|
});
|
|
5704
5709
|
}
|
|
5705
5710
|
function resolveRealModuleFile(filePath, root) {
|
|
5706
|
-
const resolved = _nullishCoalesce(
|
|
5711
|
+
const resolved = _nullishCoalesce(_chunkQYDGIXQ5cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5707
5712
|
try {
|
|
5708
5713
|
return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5709
5714
|
} catch (e29) {
|
|
5710
5715
|
return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
|
|
5711
5716
|
}
|
|
5712
5717
|
}
|
|
5713
|
-
function generateProgrammaticRouteModule(moduleId, root, renderer =
|
|
5718
|
+
function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkT7UC2ORAcjs.REACT_RENDERER) {
|
|
5714
5719
|
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5715
5720
|
if (!parsed) {
|
|
5716
5721
|
return "";
|
|
@@ -6041,8 +6046,8 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6041
6046
|
throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
|
|
6042
6047
|
}
|
|
6043
6048
|
}
|
|
6044
|
-
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer =
|
|
6045
|
-
const providerClientCode =
|
|
6049
|
+
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkT7UC2ORAcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
6050
|
+
const providerClientCode = _chunkP253SZJFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6046
6051
|
integrationProviders,
|
|
6047
6052
|
root,
|
|
6048
6053
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -6053,8 +6058,8 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
|
|
|
6053
6058
|
srcDir,
|
|
6054
6059
|
publicRuntimeConfig
|
|
6055
6060
|
);
|
|
6056
|
-
const appSetupPath =
|
|
6057
|
-
const rendererClientImports =
|
|
6061
|
+
const appSetupPath = _chunkT7UC2ORAcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
6062
|
+
const rendererClientImports = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
|
|
6058
6063
|
import { hydrateRoot, createRoot } from 'react-dom/client'
|
|
6059
6064
|
import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
|
|
6060
6065
|
// Named exports only: a renderer's client module needs no default export. `React` is a
|
|
@@ -6068,13 +6073,13 @@ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${J
|
|
|
6068
6073
|
import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
|
|
6069
6074
|
const React = { ...__farmRendererClient }`
|
|
6070
6075
|
);
|
|
6071
|
-
const rendererIslands = isolatedHydrationEnabled && !islandValues && !
|
|
6076
|
+
const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _chunkT7UC2ORAcjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
|
|
6072
6077
|
const isolatedHydrationImport = rendererIslands ? "import { createFarmRendererIslandRuntime } from '@farm.js/core/internal/renderer-islands'" : isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
|
|
6073
6078
|
const docsAdapterImportBlock = _chunkXJDB564Acjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
6074
6079
|
docsAdapterUI,
|
|
6075
6080
|
docsConfigModule,
|
|
6076
6081
|
// Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
|
|
6077
|
-
|
|
6082
|
+
_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
|
|
6078
6083
|
);
|
|
6079
6084
|
const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
|
|
6080
6085
|
renderer: React,
|
|
@@ -6140,7 +6145,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6140
6145
|
return null;
|
|
6141
6146
|
}
|
|
6142
6147
|
}
|
|
6143
|
-
${islandValues ? `${
|
|
6148
|
+
${islandValues ? `${_chunkP253SZJFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6144
6149
|
let farmLastRouteState = null;
|
|
6145
6150
|
|
|
6146
6151
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -6981,7 +6986,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
6981
6986
|
return loadedLayouts;
|
|
6982
6987
|
}
|
|
6983
6988
|
|
|
6984
|
-
${
|
|
6989
|
+
${_chunkP253SZJFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
6985
6990
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
6986
6991
|
let wrapped = element;
|
|
6987
6992
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7060,7 +7065,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
|
|
|
7060
7065
|
|
|
7061
7066
|
function hydrateFarmRoute(container, route) {
|
|
7062
7067
|
farmLastRouteState = route;
|
|
7063
|
-
${
|
|
7068
|
+
${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
|
|
7064
7069
|
}
|
|
7065
7070
|
|
|
7066
7071
|
function renderFarmRoute(root, route) {
|
|
@@ -7204,7 +7209,7 @@ async function tryHydrateImportedPage(
|
|
|
7204
7209
|
wrap: wrapFarmClientRouteGraph,
|
|
7205
7210
|
};
|
|
7206
7211
|
} else if (useHydrate && container?.id === '__farm_page__') {
|
|
7207
|
-
wrappedElement = wrapFarmClientRouteGraph(${
|
|
7212
|
+
wrappedElement = wrapFarmClientRouteGraph(${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
|
|
7208
7213
|
} else {
|
|
7209
7214
|
wrappedElement = await buildWrappedHydrationElement(
|
|
7210
7215
|
currentPageComponent,
|
|
@@ -7281,7 +7286,7 @@ function readActiveLayoutPatterns() {
|
|
|
7281
7286
|
);
|
|
7282
7287
|
}
|
|
7283
7288
|
|
|
7284
|
-
${
|
|
7289
|
+
${_chunkP253SZJFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7285
7290
|
|
|
7286
7291
|
function activateFragmentScripts(root) {
|
|
7287
7292
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7340,7 +7345,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7340
7345
|
return shell.innerHTML;
|
|
7341
7346
|
}
|
|
7342
7347
|
|
|
7343
|
-
${islandValues ?
|
|
7348
|
+
${islandValues ? _chunkP253SZJFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7344
7349
|
container,
|
|
7345
7350
|
fragment,
|
|
7346
7351
|
currentPatterns,
|
|
@@ -7415,9 +7420,9 @@ ${islandValues ? `
|
|
|
7415
7420
|
return nextTarget;
|
|
7416
7421
|
}
|
|
7417
7422
|
|
|
7418
|
-
${islandValues ? `${
|
|
7423
|
+
${islandValues ? `${_chunkP253SZJFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7419
7424
|
|
|
7420
|
-
${
|
|
7425
|
+
${_chunkP253SZJFcjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7421
7426
|
|
|
7422
7427
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7423
7428
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8133,12 +8138,12 @@ async function defineConfig(config = {}) {
|
|
|
8133
8138
|
);
|
|
8134
8139
|
config = layeredConfig;
|
|
8135
8140
|
}
|
|
8136
|
-
config.renderer =
|
|
8137
|
-
config.images =
|
|
8138
|
-
const rendererVitePlugins = await
|
|
8141
|
+
config.renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8142
|
+
config.images = _chunkP253SZJFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8143
|
+
const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8139
8144
|
ssr: true
|
|
8140
8145
|
});
|
|
8141
|
-
const reactRefreshPlugins =
|
|
8146
|
+
const reactRefreshPlugins = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
8142
8147
|
const nodeBuiltinStubs = {
|
|
8143
8148
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
8144
8149
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -8232,7 +8237,7 @@ async function defineConfig(config = {}) {
|
|
|
8232
8237
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8233
8238
|
console.log("");
|
|
8234
8239
|
console.log(
|
|
8235
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8240
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk2NKNP4AHcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8236
8241
|
);
|
|
8237
8242
|
console.log("");
|
|
8238
8243
|
console.log(
|
|
@@ -8266,7 +8271,7 @@ async function defineConfig(config = {}) {
|
|
|
8266
8271
|
plugins: [
|
|
8267
8272
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8268
8273
|
_chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8269
|
-
|
|
8274
|
+
_chunkP253SZJFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8270
8275
|
tailwindVitePlugin,
|
|
8271
8276
|
...rendererVitePlugins,
|
|
8272
8277
|
...reactRefreshPlugins,
|
|
@@ -8276,14 +8281,14 @@ async function defineConfig(config = {}) {
|
|
|
8276
8281
|
farmNavigationPlugin(config.renderer),
|
|
8277
8282
|
farmIslandContainersPlugin(config),
|
|
8278
8283
|
farmPlugin(config),
|
|
8279
|
-
|
|
8284
|
+
_chunkQYDGIXQ5cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8280
8285
|
farmBrandingPlugin
|
|
8281
8286
|
],
|
|
8282
8287
|
customLogger: farmLogger,
|
|
8283
8288
|
clearScreen: false,
|
|
8284
8289
|
optimizeDeps: {
|
|
8285
|
-
...
|
|
8286
|
-
|
|
8290
|
+
..._chunkP253SZJFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8291
|
+
_chunkP253SZJFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8287
8292
|
appRoot,
|
|
8288
8293
|
_chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8289
8294
|
),
|
|
@@ -8327,7 +8332,7 @@ async function defineConfig(config = {}) {
|
|
|
8327
8332
|
// Stub out problematic server-only modules during dev mode
|
|
8328
8333
|
alias: {
|
|
8329
8334
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8330
|
-
...
|
|
8335
|
+
..._chunkP253SZJFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8331
8336
|
// Nitro internals that should not be resolved in browser
|
|
8332
8337
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8333
8338
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|