@farm.js/core 0.2.0-beta.0 → 0.2.0-beta.1
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-IIWSUXSQ.cjs +17 -0
- package/dist/{analyzer-PWHYGER6.mjs → analyzer-RYSF2BM3.mjs} +2 -2
- package/dist/api/route-manager.cjs +3 -3
- package/dist/api/route-manager.mjs +2 -2
- package/dist/api.cjs +4 -4
- package/dist/api.mjs +3 -3
- package/dist/{app.d-b3A4cca5.d.ts → app.d-CoY-zsJt.d.ts} +1 -1
- package/dist/{app.d-AVZXCfcO.d.mts → app.d-DE5KNbmf.d.mts} +1 -1
- package/dist/{chunk-W3ZBLFLU.mjs → chunk-23BZ7ZH6.mjs} +1 -1
- package/dist/{chunk-FEWCWBOF.cjs → chunk-27ESPHQA.cjs} +4 -4
- package/dist/{chunk-WPB6HJC7.mjs → chunk-2U2GRXP5.mjs} +1 -1
- package/dist/{chunk-L6ZL35ZJ.mjs → chunk-4A6A6P4T.mjs} +2 -2
- package/dist/{chunk-JGUMFTZT.cjs → chunk-6BMAGVDI.cjs} +4 -4
- package/dist/{chunk-CFLRUCN7.cjs → chunk-6ETHVRFO.cjs} +135 -135
- package/dist/{chunk-MZPPT5NA.mjs → chunk-AMMFRXFW.mjs} +1 -1
- package/dist/{chunk-GV5D5EM6.mjs → chunk-ANKMAGFJ.mjs} +1 -1
- package/dist/{chunk-SCOKBXHS.mjs → chunk-CIQCJ72N.mjs} +13 -13
- package/dist/{chunk-ZOD6EYWE.mjs → chunk-CPMK7EFR.mjs} +1 -1
- package/dist/{chunk-MM4U2NNI.mjs → chunk-DZC2XGK4.mjs} +24 -18
- package/dist/{chunk-XJJQAFZX.mjs → chunk-EBKYRP2P.mjs} +1 -1
- package/dist/{chunk-CNGGEHXY.cjs → chunk-FJGA3XWL.cjs} +2 -2
- package/dist/{chunk-PTAGDZ7I.mjs → chunk-GTHBWZUK.mjs} +5 -1
- package/dist/{chunk-SG5RFGV6.cjs → chunk-HENPVGZC.cjs} +2 -2
- package/dist/{chunk-MRULVIH3.mjs → chunk-ISSFWEPY.mjs} +1 -1
- package/dist/{chunk-PQ6DBVJ2.cjs → chunk-KBIM7PFQ.cjs} +73 -67
- package/dist/{chunk-ERV422FO.cjs → chunk-KRU3XPOW.cjs} +2 -2
- package/dist/{chunk-TQFIZRON.cjs → chunk-L4B7PB3H.cjs} +126 -126
- package/dist/{chunk-VMGQOP7X.cjs → chunk-M3JYBZO2.cjs} +2 -2
- package/dist/{chunk-SUACCCZG.cjs → chunk-N2ZMSSPP.cjs} +11 -11
- package/dist/{chunk-7LBNWL3L.cjs → chunk-ND65INFS.cjs} +2 -2
- package/dist/{chunk-WOTAU3BN.mjs → chunk-NVXU5BEG.mjs} +47 -28
- package/dist/{chunk-HU4R2PPW.cjs → chunk-NZRAUCUL.cjs} +2 -2
- package/dist/{chunk-PA3VZNWU.cjs → chunk-OIPPISQ6.cjs} +81 -62
- package/dist/{chunk-H47EH24T.mjs → chunk-OQOII62L.mjs} +1 -1
- package/dist/{chunk-LUGQUU4S.mjs → chunk-PKV3JGMS.mjs} +1 -1
- package/dist/{chunk-BQHIJOZM.cjs → chunk-SIECKBNK.cjs} +6 -2
- package/dist/{chunk-JDO3X7RB.mjs → chunk-SPKZCFPH.mjs} +1 -1
- package/dist/{chunk-3MY6TNNE.cjs → chunk-TWFJJPE7.cjs} +3 -3
- package/dist/{chunk-6266WH6X.cjs → chunk-V3Y3R3JJ.cjs} +1 -1
- package/dist/{chunk-YCHIR3X6.mjs → chunk-VZWAXQME.mjs} +1 -1
- package/dist/{chunk-5ZWXTIGE.cjs → chunk-WEZTGM7N.cjs} +2 -2
- package/dist/{chunk-BJHXFEAF.mjs → chunk-YPAOC3FO.mjs} +2 -2
- package/dist/{chunk-M4CNAZMS.mjs → chunk-Z7ZRBCAB.mjs} +11 -11
- package/dist/{chunk-XRYLMTYF.cjs → chunk-ZPQY7O64.cjs} +3 -3
- package/dist/{devtools-2CRVXV7E.mjs → devtools-5DBTT2DI.mjs} +1 -1
- package/dist/{devtools-RL4AU5KD.cjs → devtools-JTJA2KIZ.cjs} +2 -2
- package/dist/docs.cjs +3 -3
- package/dist/docs.mjs +2 -2
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/index.cjs +22 -22
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +17 -17
- package/dist/internal/build-runtime.cjs +17 -17
- package/dist/internal/build-runtime.mjs +16 -16
- package/dist/internal/cli-runtime.cjs +5 -5
- package/dist/internal/cli-runtime.mjs +4 -4
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/config-runtime.cjs +3 -3
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- 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 +4 -4
- package/dist/internal/production-runtime.mjs +3 -3
- package/dist/{manager-D4DZRBRS.cjs → manager-37UJPUN4.cjs} +4 -4
- package/dist/{manager-PKPQGBAE.mjs → manager-7BNSJKME.mjs} +3 -3
- package/dist/plugin.cjs +12 -12
- package/dist/plugin.mjs +11 -11
- package/dist/{rsc-pipeline-3DYC5ZXW.cjs → rsc-pipeline-LGXJGGMW.cjs} +3 -3
- package/dist/{rsc-pipeline-LRB4ZG6I.mjs → rsc-pipeline-W5DSWDHD.mjs} +2 -2
- package/dist/{runtime-3WJNNAAR.mjs → runtime-UOZKSM5S.mjs} +2 -2
- package/dist/{runtime-CRFF32H6.cjs → runtime-YV4X5FAK.cjs} +4 -4
- package/dist/server.cjs +36 -35
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +16 -15
- package/dist/testing.cjs +2 -2
- package/dist/testing.mjs +2 -2
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +12 -12
- package/dist/vite.mjs +11 -11
- package/package.json +1 -1
- package/dist/analyzer-B2TRJT3B.cjs +0 -17
- /package/dist/{chunk-IRPXOTEN.cjs → chunk-FLKG2PYH.cjs} +0 -0
- /package/dist/{chunk-BGEA4K7C.mjs → chunk-OOOUYA6L.mjs} +0 -0
|
@@ -44,7 +44,7 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkKBIM7PFQcjs = require('./chunk-KBIM7PFQ.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
@@ -59,10 +59,10 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkKRU3XPOWcjs = require('./chunk-KRU3XPOW.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunk27ESPHQAcjs = require('./chunk-27ESPHQA.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -89,13 +89,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunk6BMAGVDIcjs = require('./chunk-6BMAGVDI.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkFJGA3XWLcjs = require('./chunk-FJGA3XWL.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
@@ -146,7 +146,7 @@ var _chunkNDMPGFKLcjs = require('./chunk-NDMPGFKL.cjs');
|
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
var
|
|
149
|
+
var _chunkOIPPISQ6cjs = require('./chunk-OIPPISQ6.cjs');
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
|
|
@@ -247,11 +247,11 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
247
247
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
248
248
|
|
|
249
249
|
|
|
250
|
-
var
|
|
250
|
+
var _chunkTWFJJPE7cjs = require('./chunk-TWFJJPE7.cjs');
|
|
251
251
|
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
var
|
|
254
|
+
var _chunkSIECKBNKcjs = require('./chunk-SIECKBNK.cjs');
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
|
|
@@ -314,7 +314,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
314
314
|
var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
|
|
315
315
|
|
|
316
316
|
|
|
317
|
-
var
|
|
317
|
+
var _chunkV3Y3R3JJcjs = require('./chunk-V3Y3R3JJ.cjs');
|
|
318
318
|
|
|
319
319
|
|
|
320
320
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -719,7 +719,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
719
719
|
return null;
|
|
720
720
|
}
|
|
721
721
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
722
|
-
return
|
|
722
|
+
return _chunkOIPPISQ6cjs.createFarmDiagnostic.call(void 0,
|
|
723
723
|
"CLIENT_SERVER_FUNCTION",
|
|
724
724
|
id,
|
|
725
725
|
`${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.`,
|
|
@@ -978,21 +978,21 @@ function readPropertyKey(property) {
|
|
|
978
978
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
979
979
|
switch (finding.kind) {
|
|
980
980
|
case "server-env":
|
|
981
|
-
return
|
|
981
|
+
return _chunkOIPPISQ6cjs.createFarmDiagnostic.call(void 0,
|
|
982
982
|
"CLIENT_SERVER_ENV",
|
|
983
983
|
file,
|
|
984
984
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
985
985
|
location
|
|
986
986
|
);
|
|
987
987
|
case "public-env":
|
|
988
|
-
return
|
|
988
|
+
return _chunkOIPPISQ6cjs.createFarmDiagnostic.call(void 0,
|
|
989
989
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
990
990
|
file,
|
|
991
991
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
992
992
|
location
|
|
993
993
|
);
|
|
994
994
|
case "builtin":
|
|
995
|
-
return
|
|
995
|
+
return _chunkOIPPISQ6cjs.createFarmDiagnostic.call(void 0,
|
|
996
996
|
"CLIENT_NODE_BUILTIN",
|
|
997
997
|
file,
|
|
998
998
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1288,13 +1288,13 @@ function loadFarmDocsSearchDevRuntime() {
|
|
|
1288
1288
|
return import("./search-client-A7YJT7JZ.cjs");
|
|
1289
1289
|
}
|
|
1290
1290
|
function loadFarmOpenAPIDevRuntime() {
|
|
1291
|
-
return import("./manager-
|
|
1291
|
+
return import("./manager-37UJPUN4.cjs");
|
|
1292
1292
|
}
|
|
1293
1293
|
function loadFarmWorkflowsDevRuntime() {
|
|
1294
1294
|
return import("./workflows.cjs");
|
|
1295
1295
|
}
|
|
1296
1296
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1297
|
-
return import("./devtools-
|
|
1297
|
+
return import("./devtools-JTJA2KIZ.cjs");
|
|
1298
1298
|
}
|
|
1299
1299
|
function loadFarmDevtoolsUIRuntime() {
|
|
1300
1300
|
return import("./devtools-ui-C2EMF2SO.cjs");
|
|
@@ -1344,16 +1344,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1344
1344
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1345
1345
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1346
1346
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1347
|
-
|
|
1348
|
-
new RegExp(`^${
|
|
1347
|
+
_chunkKBIM7PFQcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1348
|
+
new RegExp(`^${_chunkOIPPISQ6cjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1349
1349
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1350
1350
|
// included.
|
|
1351
1351
|
/^node:/,
|
|
1352
|
-
|
|
1352
|
+
_chunkKBIM7PFQcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1353
1353
|
];
|
|
1354
1354
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1355
|
-
|
|
1356
|
-
new RegExp(`^${
|
|
1355
|
+
_chunkKBIM7PFQcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1356
|
+
new RegExp(`^${_chunkOIPPISQ6cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1357
1357
|
];
|
|
1358
1358
|
function createFarmPlatformClientModule(platform) {
|
|
1359
1359
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1389,18 +1389,18 @@ function farmIslandContainersPlugin(config) {
|
|
|
1389
1389
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1390
1390
|
return null;
|
|
1391
1391
|
}
|
|
1392
|
-
if (
|
|
1392
|
+
if (_chunkOIPPISQ6cjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1393
1393
|
const file = id.split("?", 1)[0];
|
|
1394
|
-
const bindings =
|
|
1394
|
+
const bindings = _chunkOIPPISQ6cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1395
1395
|
if (bindings.length === 0) return null;
|
|
1396
|
-
const grown =
|
|
1396
|
+
const grown = _chunkOIPPISQ6cjs.wrapFarmIslandContainers.call(void 0, {
|
|
1397
1397
|
code,
|
|
1398
1398
|
file,
|
|
1399
1399
|
bindings,
|
|
1400
|
-
reference:
|
|
1400
|
+
reference: _chunkOIPPISQ6cjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1401
1401
|
});
|
|
1402
1402
|
if (grown === null) return null;
|
|
1403
|
-
|
|
1403
|
+
_chunkOIPPISQ6cjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1404
1404
|
return { code: grown, map: null };
|
|
1405
1405
|
}
|
|
1406
1406
|
};
|
|
@@ -1414,18 +1414,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1414
1414
|
config(config) {
|
|
1415
1415
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1416
1416
|
if (options.distDir) {
|
|
1417
|
-
|
|
1417
|
+
_chunkOIPPISQ6cjs.usePackageScanCacheFile.call(void 0,
|
|
1418
1418
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1419
1419
|
);
|
|
1420
1420
|
}
|
|
1421
|
-
const bundledPackages =
|
|
1421
|
+
const bundledPackages = _chunkOIPPISQ6cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1422
1422
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1423
|
-
|
|
1423
|
+
_chunkOIPPISQ6cjs.persistPackageScanCache.call(void 0, );
|
|
1424
1424
|
return {
|
|
1425
1425
|
optimizeDeps: {
|
|
1426
1426
|
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1427
1427
|
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1428
|
-
rolldownOptions: { plugins: [
|
|
1428
|
+
rolldownOptions: { plugins: [_chunkOIPPISQ6cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1429
1429
|
},
|
|
1430
1430
|
ssr: {
|
|
1431
1431
|
noExternal: [
|
|
@@ -1451,8 +1451,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1451
1451
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1452
1452
|
}
|
|
1453
1453
|
this.error(
|
|
1454
|
-
|
|
1455
|
-
|
|
1454
|
+
_chunkOIPPISQ6cjs.formatFarmDiagnostic.call(void 0,
|
|
1455
|
+
_chunkOIPPISQ6cjs.createFarmDiagnostic.call(void 0,
|
|
1456
1456
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1457
1457
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1458
1458
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1462,9 +1462,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1462
1462
|
);
|
|
1463
1463
|
}
|
|
1464
1464
|
if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1465
|
-
return
|
|
1465
|
+
return _chunkOIPPISQ6cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1466
1466
|
}
|
|
1467
|
-
const resolveFrom = importer ?
|
|
1467
|
+
const resolveFrom = importer ? _chunkOIPPISQ6cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1468
1468
|
if (resolveFrom) {
|
|
1469
1469
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1470
1470
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1481,8 +1481,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1481
1481
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1482
1482
|
if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
|
|
1483
1483
|
this.error(
|
|
1484
|
-
|
|
1485
|
-
|
|
1484
|
+
_chunkOIPPISQ6cjs.formatFarmDiagnostic.call(void 0,
|
|
1485
|
+
_chunkOIPPISQ6cjs.createFarmDiagnostic.call(void 0,
|
|
1486
1486
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1487
1487
|
_nullishCoalesce(importer, () => ( id)),
|
|
1488
1488
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1507,7 +1507,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1507
1507
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1508
1508
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1509
1509
|
}
|
|
1510
|
-
return _nullishCoalesce(
|
|
1510
|
+
return _nullishCoalesce(_chunkOIPPISQ6cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
};
|
|
@@ -2121,7 +2121,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2121
2121
|
return null;
|
|
2122
2122
|
}
|
|
2123
2123
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2124
|
-
const everyExportIsComponent = options.code.includes(
|
|
2124
|
+
const everyExportIsComponent = options.code.includes(_chunkOIPPISQ6cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkOIPPISQ6cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2125
2125
|
const replacements = [];
|
|
2126
2126
|
const wrapperStatements = [];
|
|
2127
2127
|
const originalEntries = [];
|
|
@@ -2276,16 +2276,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2276
2276
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2277
2277
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2278
2278
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2279
|
-
if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(
|
|
2279
|
+
if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkOIPPISQ6cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2280
2280
|
}
|
|
2281
2281
|
findings.push(finding);
|
|
2282
2282
|
}
|
|
2283
2283
|
if (findings.length === 0) return;
|
|
2284
2284
|
warnedClientBoundaryIds.add(id);
|
|
2285
|
-
const locate =
|
|
2285
|
+
const locate = _chunkOIPPISQ6cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2286
2286
|
_chunk7U4XF76Rcjs.logger.warn(
|
|
2287
2287
|
findings.map(
|
|
2288
|
-
(finding) =>
|
|
2288
|
+
(finding) => _chunkOIPPISQ6cjs.formatFarmDiagnostic.call(void 0,
|
|
2289
2289
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2290
2290
|
config.root
|
|
2291
2291
|
)
|
|
@@ -2351,12 +2351,12 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2351
2351
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2352
2352
|
const rendererDisabled = _chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2353
2353
|
const imageImports = farmImageImportsPlugin();
|
|
2354
|
-
const fontImports =
|
|
2354
|
+
const fontImports = _chunkKBIM7PFQcjs.farmFontImportsPlugin.call(void 0, {
|
|
2355
2355
|
root: options.root,
|
|
2356
2356
|
basePath: options.basePath,
|
|
2357
2357
|
publicDir: options.publicDir,
|
|
2358
2358
|
// A production build never starts the app, so it reads the directories from these options.
|
|
2359
|
-
isLayoutModule: (id) =>
|
|
2359
|
+
isLayoutModule: (id) => _chunkKBIM7PFQcjs.isFarmLayoutModule.call(void 0, id, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _108 => _108.getConfig, 'call', _109 => _109()]), () => ( options))))
|
|
2360
2360
|
});
|
|
2361
2361
|
let farmApp;
|
|
2362
2362
|
const isFarmGeneratedOutput = (file) => {
|
|
@@ -2387,8 +2387,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2387
2387
|
if (mdxComponents) files.add(mdxComponents);
|
|
2388
2388
|
return files;
|
|
2389
2389
|
};
|
|
2390
|
-
const islxActionsMode = () =>
|
|
2391
|
-
const islandsServerFns = () =>
|
|
2390
|
+
const islxActionsMode = () => _chunkKBIM7PFQcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _115 => _115.getConfig, 'call', _116 => _116()]), () => ( options)));
|
|
2391
|
+
const islandsServerFns = () => _chunkKBIM7PFQcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
|
|
2392
2392
|
let reactRefreshActive = false;
|
|
2393
2393
|
let server;
|
|
2394
2394
|
let deferredGates;
|
|
@@ -2431,11 +2431,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2431
2431
|
isBuild = configEnv.command === "build";
|
|
2432
2432
|
const farmAliases = {
|
|
2433
2433
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2434
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _128 => _128.resolve, 'optionalAccess', _129 => _129.alias])) ? {} :
|
|
2434
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _128 => _128.resolve, 'optionalAccess', _129 => _129.alias])) ? {} : _chunkKBIM7PFQcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2435
2435
|
};
|
|
2436
2436
|
if (Object.keys(farmAliases).length > 0) {
|
|
2437
2437
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2438
|
-
userConfig.resolve.alias =
|
|
2438
|
+
userConfig.resolve.alias = _chunkKBIM7PFQcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2439
2439
|
}
|
|
2440
2440
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2441
2441
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _130 => _130.server, 'optionalAccess', _131 => _131.cors]) === void 0;
|
|
@@ -2509,7 +2509,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2509
2509
|
} catch (e21) {
|
|
2510
2510
|
}
|
|
2511
2511
|
};
|
|
2512
|
-
farmApp = new (0,
|
|
2512
|
+
farmApp = new (0, _chunkKBIM7PFQcjs.FarmApp)(
|
|
2513
2513
|
{
|
|
2514
2514
|
...options,
|
|
2515
2515
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2517,7 +2517,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2517
2517
|
server
|
|
2518
2518
|
);
|
|
2519
2519
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2520
|
-
|
|
2520
|
+
_chunkOIPPISQ6cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2521
2521
|
farmApp.getConfig().root,
|
|
2522
2522
|
options.distDir || ".farm"
|
|
2523
2523
|
)
|
|
@@ -2528,7 +2528,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2528
2528
|
let farmAppPackages;
|
|
2529
2529
|
if (_optionalChain([farmConfig, 'access', _153 => _153.agent, 'optionalAccess', _154 => _154.noindexPreviews])) {
|
|
2530
2530
|
farmMiddlewares.use((_req, res, next) => {
|
|
2531
|
-
if (
|
|
2531
|
+
if (_chunkFJGA3XWLcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2532
2532
|
res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2533
2533
|
}
|
|
2534
2534
|
next();
|
|
@@ -2536,7 +2536,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2536
2536
|
}
|
|
2537
2537
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2538
2538
|
const devBuiltInRoutePaths = new Set(
|
|
2539
|
-
|
|
2539
|
+
_chunk6BMAGVDIcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2540
2540
|
agent: {
|
|
2541
2541
|
apiCatalog: true,
|
|
2542
2542
|
mcp: true,
|
|
@@ -2586,7 +2586,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2586
2586
|
);
|
|
2587
2587
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2588
2588
|
try {
|
|
2589
|
-
const result = await
|
|
2589
|
+
const result = await _chunkKRU3XPOWcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2590
2590
|
root: farmConfig.root,
|
|
2591
2591
|
srcDir: farmConfig.srcDir,
|
|
2592
2592
|
layers: farmConfig.layers,
|
|
@@ -2640,10 +2640,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2640
2640
|
const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
|
|
2641
2641
|
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
|
|
2642
2642
|
};
|
|
2643
|
-
const polyroute =
|
|
2643
|
+
const polyroute = _chunkSIECKBNKcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2644
2644
|
const isApiRouteFile = (file) => {
|
|
2645
2645
|
const normalized = file.replace(/\\/g, "/");
|
|
2646
|
-
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) &&
|
|
2646
|
+
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkSIECKBNKcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
|
|
2647
2647
|
};
|
|
2648
2648
|
const isProgrammaticRouteFile = (file) => {
|
|
2649
2649
|
const normalized = file.replace(/\\/g, "/");
|
|
@@ -2772,7 +2772,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2772
2772
|
}
|
|
2773
2773
|
})]);
|
|
2774
2774
|
}
|
|
2775
|
-
apiRouteManager = new (0,
|
|
2775
|
+
apiRouteManager = new (0, _chunkTWFJJPE7cjs.APIRouteManager)(appDirs, server, {
|
|
2776
2776
|
plugins: farmConfig.plugins,
|
|
2777
2777
|
i18n: farmApp.getI18nRuntime(),
|
|
2778
2778
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2888,7 +2888,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2888
2888
|
rendererServer: farmConfig.renderer.server,
|
|
2889
2889
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2890
2890
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2891
|
-
globalStylesheetHref:
|
|
2891
|
+
globalStylesheetHref: _chunkKBIM7PFQcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2892
2892
|
farmConfig.root,
|
|
2893
2893
|
farmConfig.srcDir
|
|
2894
2894
|
),
|
|
@@ -2919,7 +2919,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2919
2919
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2920
2920
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2921
2921
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2922
|
-
globalStylesheetHref:
|
|
2922
|
+
globalStylesheetHref: _chunkKBIM7PFQcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2923
2923
|
farmConfig.root,
|
|
2924
2924
|
farmConfig.srcDir
|
|
2925
2925
|
),
|
|
@@ -2956,9 +2956,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2956
2956
|
}
|
|
2957
2957
|
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _196 => _196.getPlugins, 'call', _197 => _197(), 'access', _198 => _198.find, 'call', _199 => _199((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
2958
2958
|
if (farmInfraAnalyticsPlugin) {
|
|
2959
|
-
|
|
2959
|
+
_chunk27ESPHQAcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
2960
2960
|
if (farmDocsDevRuntime) {
|
|
2961
|
-
const label =
|
|
2961
|
+
const label = _chunk6BMAGVDIcjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
2962
2962
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
2963
2963
|
{
|
|
2964
2964
|
path: _optionalChain([farmConfig, 'access', _200 => _200.docs, 'optionalAccess', _201 => _201.entry]) || "/docs",
|
|
@@ -2966,7 +2966,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2966
2966
|
pages: await getFarmDocsPagePaths()
|
|
2967
2967
|
}
|
|
2968
2968
|
);
|
|
2969
|
-
if (label) return
|
|
2969
|
+
if (label) return _chunk6BMAGVDIcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
2970
2970
|
}
|
|
2971
2971
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
2972
2972
|
return { pathname, pattern: _optionalChain([match, 'access', _206 => _206.route, 'optionalAccess', _207 => _207.pattern]) || null };
|
|
@@ -3130,7 +3130,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3130
3130
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3131
3131
|
res.statusCode = 200;
|
|
3132
3132
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3133
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3133
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkKBIM7PFQcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3134
3134
|
return;
|
|
3135
3135
|
}
|
|
3136
3136
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3410,9 +3410,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3410
3410
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3411
3411
|
try {
|
|
3412
3412
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3413
|
-
const route =
|
|
3413
|
+
const route = _chunk6BMAGVDIcjs.setFarmRouteLabel.call(void 0,
|
|
3414
3414
|
{ pathname: requestPathname },
|
|
3415
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3415
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk6BMAGVDIcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3416
3416
|
);
|
|
3417
3417
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3418
3418
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3501,7 +3501,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3501
3501
|
);
|
|
3502
3502
|
return;
|
|
3503
3503
|
}
|
|
3504
|
-
if (_optionalChain([options, 'access', _242 => _242.agent, 'optionalAccess', _243 => _243.manifest]) !== false &&
|
|
3504
|
+
if (_optionalChain([options, 'access', _242 => _242.agent, 'optionalAccess', _243 => _243.manifest]) !== false && _chunk6BMAGVDIcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3505
3505
|
const manifestGuardCoversPath = (path7) => _chunk4ZVKDHS6cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3506
3506
|
{
|
|
3507
3507
|
config: farmConfig,
|
|
@@ -3511,18 +3511,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3511
3511
|
apiServerBasePath
|
|
3512
3512
|
);
|
|
3513
3513
|
await serveBuiltInRoute(async () => {
|
|
3514
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3515
|
-
const manifest = await
|
|
3514
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkKBIM7PFQcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3515
|
+
const manifest = await _chunk6BMAGVDIcjs.createFarmAppManifestResponse.call(void 0,
|
|
3516
3516
|
new Request(parsedRequestUrl, {
|
|
3517
3517
|
method: requestMethod,
|
|
3518
3518
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3519
3519
|
}),
|
|
3520
3520
|
{
|
|
3521
|
-
...
|
|
3521
|
+
..._chunk6BMAGVDIcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3522
3522
|
build: "development",
|
|
3523
3523
|
packages: farmAppPackages,
|
|
3524
3524
|
// Read again on each request; unchanged files come from a cache.
|
|
3525
|
-
webmcpTools: _optionalChain([farmConfig, 'access', _244 => _244.plugins, 'optionalAccess', _245 => _245.some, 'call', _246 => _246(({ name }) => name === "farm:webmcp")]) ?
|
|
3525
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _244 => _244.plugins, 'optionalAccess', _245 => _245.some, 'call', _246 => _246(({ name }) => name === "farm:webmcp")]) ? _chunkKBIM7PFQcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3526
3526
|
}),
|
|
3527
3527
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3528
3528
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3540,11 +3540,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3540
3540
|
});
|
|
3541
3541
|
return;
|
|
3542
3542
|
}
|
|
3543
|
-
if (_optionalChain([options, 'access', _247 => _247.agent, 'optionalAccess', _248 => _248.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
3543
|
+
if (_optionalChain([options, 'access', _247 => _247.agent, 'optionalAccess', _248 => _248.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk6BMAGVDIcjs.FARM_API_CATALOG_PATH) {
|
|
3544
3544
|
await serveBuiltInRoute(
|
|
3545
|
-
() =>
|
|
3545
|
+
() => _chunk6BMAGVDIcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3546
3546
|
requestMethod,
|
|
3547
|
-
|
|
3547
|
+
_chunk6BMAGVDIcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3548
3548
|
new Request(parsedRequestUrl, {
|
|
3549
3549
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3550
3550
|
})
|
|
@@ -3553,7 +3553,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3553
3553
|
return;
|
|
3554
3554
|
}
|
|
3555
3555
|
if (_optionalChain([options, 'access', _249 => _249.agent, 'optionalAccess', _250 => _250.aiCatalog]) !== false) {
|
|
3556
|
-
const aiCatalog =
|
|
3556
|
+
const aiCatalog = _chunk6BMAGVDIcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3557
3557
|
new Request(parsedRequestUrl, {
|
|
3558
3558
|
method: requestMethod,
|
|
3559
3559
|
headers: {
|
|
@@ -3635,7 +3635,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3635
3635
|
{
|
|
3636
3636
|
kind: "docs",
|
|
3637
3637
|
computed: docsResponse,
|
|
3638
|
-
label:
|
|
3638
|
+
label: _chunk6BMAGVDIcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3639
3639
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3640
3640
|
{
|
|
3641
3641
|
path: _optionalChain([farmConfig, 'access', _261 => _261.docs, 'optionalAccess', _262 => _262.entry]) || "/docs",
|
|
@@ -3672,7 +3672,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3672
3672
|
}
|
|
3673
3673
|
const markdownRouteLabel = () => (
|
|
3674
3674
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3675
|
-
|
|
3675
|
+
_chunk6BMAGVDIcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3676
3676
|
toRoutePathname(requestPathname),
|
|
3677
3677
|
(page) => _optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(page), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern])
|
|
3678
3678
|
)
|
|
@@ -3693,7 +3693,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3693
3693
|
return {
|
|
3694
3694
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3695
3695
|
// Project-relative, as production sends it: never the machine's path.
|
|
3696
|
-
filePath:
|
|
3696
|
+
filePath: _chunkKBIM7PFQcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3697
3697
|
};
|
|
3698
3698
|
},
|
|
3699
3699
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -4036,9 +4036,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4036
4036
|
);
|
|
4037
4037
|
const docsRuntimeOptions = () => ({
|
|
4038
4038
|
kind: "docs",
|
|
4039
|
-
route:
|
|
4039
|
+
route: _chunk6BMAGVDIcjs.setFarmRouteLabel.call(void 0,
|
|
4040
4040
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4041
|
-
|
|
4041
|
+
_chunk6BMAGVDIcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4042
4042
|
path: _optionalChain([farmConfig, 'access', _294 => _294.docs, 'optionalAccess', _295 => _295.entry]) || "/docs",
|
|
4043
4043
|
roots: _optionalChain([farmConfig, 'access', _296 => _296.docs, 'optionalAccess', _297 => _297.roots, 'optionalAccess', _298 => _298.map, 'call', _299 => _299((root) => root.entry)])
|
|
4044
4044
|
})
|
|
@@ -4392,7 +4392,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4392
4392
|
);
|
|
4393
4393
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4394
4394
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4395
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4395
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkOIPPISQ6cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4396
4396
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4397
4397
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4398
4398
|
let mergedMetadata = {};
|
|
@@ -4403,7 +4403,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4403
4403
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4404
4404
|
(entry) => entry.pattern === layout.pattern
|
|
4405
4405
|
), () => ( {
|
|
4406
|
-
...
|
|
4406
|
+
..._chunkOIPPISQ6cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4407
4407
|
serverTree: false
|
|
4408
4408
|
}))
|
|
4409
4409
|
);
|
|
@@ -4418,7 +4418,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4418
4418
|
];
|
|
4419
4419
|
const hydrationIslandStrategy = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4420
4420
|
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _322 => _322.getConfig, 'call', _323 => _323()]), () => ( options))), 'access', _324 => _324.experimental, 'optionalAccess', _325 => _325.serverComponents])
|
|
4421
|
-
) === "islands" ?
|
|
4421
|
+
) === "islands" ? _chunkKBIM7PFQcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4422
4422
|
route,
|
|
4423
4423
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4424
4424
|
layouts.map((layout, index) => ({
|
|
@@ -4484,7 +4484,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4484
4484
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4485
4485
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4486
4486
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4487
|
-
), () => (
|
|
4487
|
+
), () => ( _chunkOIPPISQ6cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4488
4488
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4489
4489
|
request: targetRequest,
|
|
4490
4490
|
params: slot.params,
|
|
@@ -4534,7 +4534,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4534
4534
|
pageShouldHydrate: shouldHydrate,
|
|
4535
4535
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4536
4536
|
islandStrategy: hydrationIslandStrategy,
|
|
4537
|
-
rendering:
|
|
4537
|
+
rendering: _chunkKRU3XPOWcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4538
4538
|
});
|
|
4539
4539
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4540
4540
|
const layoutStartIndex = _chunk4ZVKDHS6cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
@@ -4669,7 +4669,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4669
4669
|
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasRuntimeHook, 'call', _344 => _344("after")]), () => ( false));
|
|
4670
4670
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4671
4671
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4672
|
-
const mcpLabel =
|
|
4672
|
+
const mcpLabel = _chunk6BMAGVDIcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4673
4673
|
if (mcpLabel) return mcpLabel;
|
|
4674
4674
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4675
4675
|
return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4678,7 +4678,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4678
4678
|
const match = routeManager2.matchRoute(pathname2);
|
|
4679
4679
|
return {
|
|
4680
4680
|
kind: "page",
|
|
4681
|
-
route:
|
|
4681
|
+
route: _chunk6BMAGVDIcjs.setFarmRouteLabel.call(void 0,
|
|
4682
4682
|
{
|
|
4683
4683
|
pathname: pathname2,
|
|
4684
4684
|
pattern: _optionalChain([match, 'optionalAccess', _345 => _345.route, 'optionalAccess', _346 => _346.pattern]) || null,
|
|
@@ -4942,7 +4942,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4942
4942
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4943
4943
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4944
4944
|
const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
|
|
4945
|
-
const isolatedHydrationMode =
|
|
4945
|
+
const isolatedHydrationMode = _chunkOIPPISQ6cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4946
4946
|
_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.experimental, 'optionalAccess', _390 => _390.isolatedClientHydration]),
|
|
4947
4947
|
{
|
|
4948
4948
|
serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "rsc",
|
|
@@ -4967,8 +4967,8 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
4967
4967
|
isolatedHydrationMode === "enabled" || _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _399 => _399.getRouteManager, 'call', _400 => _400(), 'access', _401 => _401.getIsolatedClientBoundaryModules, 'call', _402 => _402(root)])))), 'optionalAccess', _403 => _403.size]) > 0,
|
|
4968
4968
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
|
|
4969
4969
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
|
|
4970
|
-
|
|
4971
|
-
|
|
4970
|
+
_chunkKBIM7PFQcjs.generateClientCachePersistenceCode.call(void 0,
|
|
4971
|
+
_chunkKBIM7PFQcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
|
|
4972
4972
|
),
|
|
4973
4973
|
adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4974
4974
|
_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _407 => _407.experimental, 'optionalAccess', _408 => _408.serverComponents])) === "islands"
|
|
@@ -4990,11 +4990,11 @@ export const getManifest = () => ({
|
|
|
4990
4990
|
});
|
|
4991
4991
|
`;
|
|
4992
4992
|
}
|
|
4993
|
-
const globalStylesheetHref =
|
|
4993
|
+
const globalStylesheetHref = _chunkKBIM7PFQcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4994
4994
|
server.config.root,
|
|
4995
4995
|
_optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412(), 'access', _413 => _413.srcDir])
|
|
4996
4996
|
);
|
|
4997
|
-
const fullManifest =
|
|
4997
|
+
const fullManifest = _chunkKBIM7PFQcjs.createFarmDevClientManifest.call(void 0,
|
|
4998
4998
|
routeManager.generateClientManifest(server.config.root),
|
|
4999
4999
|
{
|
|
5000
5000
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -5016,45 +5016,45 @@ export { manifest };
|
|
|
5016
5016
|
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
5017
5017
|
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417()]), () => ( options));
|
|
5018
5018
|
let rewrotePackageImports = false;
|
|
5019
|
-
if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _418 => _418.experimental, 'optionalAccess', _419 => _419.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !
|
|
5019
|
+
if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _418 => _418.experimental, 'optionalAccess', _419 => _419.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkOIPPISQ6cjs.hasUseClientDirective.call(void 0, code)) {
|
|
5020
5020
|
const file = id.split("?", 1)[0];
|
|
5021
5021
|
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _421 => _421.config, 'access', _422 => _422.root]) || process.cwd();
|
|
5022
5022
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
5023
5023
|
const rewrite = () => {
|
|
5024
5024
|
if (_optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) === true) {
|
|
5025
5025
|
if (farmReactServerFiles.has(file)) {
|
|
5026
|
-
for (const child of
|
|
5026
|
+
for (const child of _chunkOIPPISQ6cjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
5027
5027
|
farmReactServerFiles.add(child);
|
|
5028
5028
|
}
|
|
5029
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5029
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkOIPPISQ6cjs.getFarmClientReachableModules.call(void 0,
|
|
5030
5030
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5031
5031
|
projectRoot
|
|
5032
5032
|
).has(path6.resolve(file));
|
|
5033
|
-
const reactServer = !serverModule ? null :
|
|
5033
|
+
const reactServer = !serverModule ? null : _chunkOIPPISQ6cjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5034
5034
|
code,
|
|
5035
5035
|
file,
|
|
5036
|
-
reference: (specifier, exportName) =>
|
|
5036
|
+
reference: (specifier, exportName) => _chunkOIPPISQ6cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5037
5037
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5038
5038
|
});
|
|
5039
5039
|
if (reactServer !== null) {
|
|
5040
5040
|
code = reactServer;
|
|
5041
5041
|
rewrotePackageImports = true;
|
|
5042
5042
|
}
|
|
5043
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5043
|
+
const internal = farmReactServerFiles.has(file) ? _chunkOIPPISQ6cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5044
5044
|
code,
|
|
5045
5045
|
file,
|
|
5046
|
-
reference: (clientFile) =>
|
|
5046
|
+
reference: (clientFile) => _chunkOIPPISQ6cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5047
5047
|
}) : null;
|
|
5048
5048
|
if (internal !== null) {
|
|
5049
5049
|
code = internal;
|
|
5050
5050
|
rewrotePackageImports = true;
|
|
5051
5051
|
}
|
|
5052
5052
|
}
|
|
5053
|
-
const rewritePackageImports = (source2) =>
|
|
5053
|
+
const rewritePackageImports = (source2) => _chunkOIPPISQ6cjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5054
5054
|
code: source2,
|
|
5055
5055
|
file,
|
|
5056
5056
|
root: projectRoot,
|
|
5057
|
-
isClientPackage: (specifier) =>
|
|
5057
|
+
isClientPackage: (specifier) => _chunkOIPPISQ6cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5058
5058
|
});
|
|
5059
5059
|
const routeManager = _optionalChain([farmApp, 'optionalAccess', _424 => _424.getRouteManager, 'call', _425 => _425()]);
|
|
5060
5060
|
const source = code;
|
|
@@ -5075,7 +5075,7 @@ export { manifest };
|
|
|
5075
5075
|
}
|
|
5076
5076
|
}
|
|
5077
5077
|
};
|
|
5078
|
-
if (buildSnapshot)
|
|
5078
|
+
if (buildSnapshot) _chunkOIPPISQ6cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5079
5079
|
else rewrite();
|
|
5080
5080
|
}
|
|
5081
5081
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
@@ -5104,8 +5104,8 @@ export { manifest };
|
|
|
5104
5104
|
}
|
|
5105
5105
|
if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
|
|
5106
5106
|
const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434(), 'optionalAccess', _435 => _435.docs]));
|
|
5107
|
-
if (
|
|
5108
|
-
const redacted =
|
|
5107
|
+
if (_chunkKBIM7PFQcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5108
|
+
const redacted = _chunkKBIM7PFQcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5109
5109
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
@@ -5114,9 +5114,9 @@ export { manifest };
|
|
|
5114
5114
|
if ((_optionalChain([currentConfig, 'access', _439 => _439.experimental, 'optionalAccess', _440 => _440.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5115
5115
|
const violation = findClientServerFnViolation(code, id);
|
|
5116
5116
|
if (violation) {
|
|
5117
|
-
const locate =
|
|
5117
|
+
const locate = _chunkOIPPISQ6cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5118
5118
|
this.error(
|
|
5119
|
-
|
|
5119
|
+
_chunkOIPPISQ6cjs.formatFarmDiagnostic.call(void 0,
|
|
5120
5120
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5121
5121
|
currentConfig.root
|
|
5122
5122
|
)
|
|
@@ -5158,13 +5158,13 @@ export { manifest };
|
|
|
5158
5158
|
transformed = true;
|
|
5159
5159
|
}
|
|
5160
5160
|
}
|
|
5161
|
-
if (
|
|
5161
|
+
if (_chunkOIPPISQ6cjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5162
5162
|
const clientBoundarySource = transformedCode;
|
|
5163
5163
|
const moduleInfo = this.getModuleInfo(id);
|
|
5164
5164
|
if (moduleInfo) {
|
|
5165
5165
|
moduleInfo.isClientComponent = true;
|
|
5166
5166
|
}
|
|
5167
|
-
transformedCode =
|
|
5167
|
+
transformedCode = _chunkOIPPISQ6cjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5168
5168
|
transformed = true;
|
|
5169
5169
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _448 => _448.getConfig, 'call', _449 => _449()]), () => ( options));
|
|
5170
5170
|
let isolatedModuleReference = null;
|
|
@@ -5173,12 +5173,12 @@ export { manifest };
|
|
|
5173
5173
|
const cleanId = id.split("?", 1)[0];
|
|
5174
5174
|
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _452 => _452.getRouteManager, 'call', _453 => _453(), 'access', _454 => _454.getIsolatedClientBoundaryModules, 'call', _455 => _455(root)])));
|
|
5175
5175
|
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _456 => _456.has, 'call', _457 => _457(path6.resolve(cleanId))]) === true;
|
|
5176
|
-
if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
5177
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5176
|
+
if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkOIPPISQ6cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5177
|
+
cleanId.replace(/\\/g, "/").includes(_chunkOIPPISQ6cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5178
5178
|
isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5179
5179
|
const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _458 => _458.experimental, 'optionalAccess', _459 => _459.serverComponents])) === "islands";
|
|
5180
|
-
const explicitStrategy =
|
|
5181
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5180
|
+
const explicitStrategy = _chunkOIPPISQ6cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5181
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkKBIM7PFQcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5182
5182
|
if (inference) {
|
|
5183
5183
|
for (const file of inference.files) {
|
|
5184
5184
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5201,14 +5201,14 @@ export { manifest };
|
|
|
5201
5201
|
);
|
|
5202
5202
|
}
|
|
5203
5203
|
transformedCode = transformedBoundary;
|
|
5204
|
-
} else if (selectedForIsolatedHydration && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (
|
|
5204
|
+
} else if (selectedForIsolatedHydration && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkOIPPISQ6cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkOIPPISQ6cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5205
5205
|
rendererIslandModule = true;
|
|
5206
5206
|
if (_optionalChain([transformOptions, 'optionalAccess', _462 => _462.ssr]) === true) {
|
|
5207
5207
|
const renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5208
5208
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5209
5209
|
code: transformedCode,
|
|
5210
5210
|
moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5211
|
-
islandStrategy: _nullishCoalesce(
|
|
5211
|
+
islandStrategy: _nullishCoalesce(_chunkOIPPISQ6cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5212
5212
|
parse: (source) => this.parse(source),
|
|
5213
5213
|
withIsland: renderer.server
|
|
5214
5214
|
});
|
|
@@ -5393,10 +5393,10 @@ if (import.meta.hot) {
|
|
|
5393
5393
|
if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
|
|
5394
5394
|
_optionalChain([farmApp, 'optionalAccess', _469 => _469.getRouteManager, 'call', _470 => _470(), 'access', _471 => _471.noteSourceChange, 'call', _472 => _472(id, change.event)]);
|
|
5395
5395
|
}
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5396
|
+
_chunkOIPPISQ6cjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
5397
|
+
_chunkOIPPISQ6cjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
5398
|
+
_chunkKBIM7PFQcjs.invalidateFarmRouteRootInferences.call(void 0, );
|
|
5399
|
+
_chunkOIPPISQ6cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5400
5400
|
},
|
|
5401
5401
|
async handleHotUpdate(ctx) {
|
|
5402
5402
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5429,16 +5429,16 @@ if (import.meta.hot) {
|
|
|
5429
5429
|
}
|
|
5430
5430
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5431
5431
|
};
|
|
5432
|
-
if (normalizedFile.includes(
|
|
5432
|
+
if (normalizedFile.includes(_chunkOIPPISQ6cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5433
5433
|
path6.posix.join(
|
|
5434
5434
|
_chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.root]) || options.root || server2.config.root),
|
|
5435
|
-
|
|
5435
|
+
_chunkOIPPISQ6cjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5436
5436
|
)
|
|
5437
5437
|
))
|
|
5438
5438
|
return modules;
|
|
5439
|
-
if (currentFarmConfig &&
|
|
5439
|
+
if (currentFarmConfig && _chunkSIECKBNKcjs.isFarmAPIRouteFileName.call(void 0,
|
|
5440
5440
|
path6.posix.basename(normalizedFile),
|
|
5441
|
-
|
|
5441
|
+
_chunkSIECKBNKcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
|
|
5442
5442
|
) && _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5443
5443
|
(appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5444
5444
|
)) {
|
|
@@ -5740,12 +5740,12 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5740
5740
|
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5741
5741
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5742
5742
|
watchFile(routesFile);
|
|
5743
|
-
return
|
|
5743
|
+
return _chunkOIPPISQ6cjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5744
5744
|
kind: parsed.kind,
|
|
5745
5745
|
routePath: parsed.routePath,
|
|
5746
5746
|
routesFile,
|
|
5747
5747
|
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _514 => _514.routes, 'access', _515 => _515.get, 'call', _516 => _516(
|
|
5748
|
-
|
|
5748
|
+
_chunkOIPPISQ6cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5749
5749
|
)]),
|
|
5750
5750
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5751
5751
|
rendererClient: _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
@@ -5753,7 +5753,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5753
5753
|
});
|
|
5754
5754
|
}
|
|
5755
5755
|
function resolveRealModuleFile(filePath, root) {
|
|
5756
|
-
const resolved = _nullishCoalesce(
|
|
5756
|
+
const resolved = _nullishCoalesce(_chunkOIPPISQ6cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5757
5757
|
try {
|
|
5758
5758
|
return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5759
5759
|
} catch (e29) {
|
|
@@ -6092,7 +6092,7 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6092
6092
|
}
|
|
6093
6093
|
}
|
|
6094
6094
|
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) {
|
|
6095
|
-
const providerClientCode =
|
|
6095
|
+
const providerClientCode = _chunkKBIM7PFQcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6096
6096
|
integrationProviders,
|
|
6097
6097
|
root,
|
|
6098
6098
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -6190,7 +6190,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6190
6190
|
return null;
|
|
6191
6191
|
}
|
|
6192
6192
|
}
|
|
6193
|
-
${islandValues ? `${
|
|
6193
|
+
${islandValues ? `${_chunkKBIM7PFQcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6194
6194
|
let farmLastRouteState = null;
|
|
6195
6195
|
|
|
6196
6196
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -7031,7 +7031,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
7031
7031
|
return loadedLayouts;
|
|
7032
7032
|
}
|
|
7033
7033
|
|
|
7034
|
-
${
|
|
7034
|
+
${_chunkKBIM7PFQcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
7035
7035
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
7036
7036
|
let wrapped = element;
|
|
7037
7037
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7331,7 +7331,7 @@ function readActiveLayoutPatterns() {
|
|
|
7331
7331
|
);
|
|
7332
7332
|
}
|
|
7333
7333
|
|
|
7334
|
-
${
|
|
7334
|
+
${_chunkKBIM7PFQcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7335
7335
|
|
|
7336
7336
|
function activateFragmentScripts(root) {
|
|
7337
7337
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7390,7 +7390,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7390
7390
|
return shell.innerHTML;
|
|
7391
7391
|
}
|
|
7392
7392
|
|
|
7393
|
-
${islandValues ?
|
|
7393
|
+
${islandValues ? _chunkKBIM7PFQcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7394
7394
|
container,
|
|
7395
7395
|
fragment,
|
|
7396
7396
|
currentPatterns,
|
|
@@ -7465,9 +7465,9 @@ ${islandValues ? `
|
|
|
7465
7465
|
return nextTarget;
|
|
7466
7466
|
}
|
|
7467
7467
|
|
|
7468
|
-
${islandValues ? `${
|
|
7468
|
+
${islandValues ? `${_chunkKBIM7PFQcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7469
7469
|
|
|
7470
|
-
${
|
|
7470
|
+
${_chunkKBIM7PFQcjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7471
7471
|
|
|
7472
7472
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7473
7473
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8183,7 +8183,7 @@ async function defineConfig(config = {}) {
|
|
|
8183
8183
|
config = layeredConfig;
|
|
8184
8184
|
}
|
|
8185
8185
|
config.renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8186
|
-
config.images =
|
|
8186
|
+
config.images = _chunkKBIM7PFQcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8187
8187
|
const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8188
8188
|
ssr: true
|
|
8189
8189
|
});
|
|
@@ -8281,7 +8281,7 @@ async function defineConfig(config = {}) {
|
|
|
8281
8281
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8282
8282
|
console.log("");
|
|
8283
8283
|
console.log(
|
|
8284
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8284
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkV3Y3R3JJcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8285
8285
|
);
|
|
8286
8286
|
console.log("");
|
|
8287
8287
|
console.log(
|
|
@@ -8315,7 +8315,7 @@ async function defineConfig(config = {}) {
|
|
|
8315
8315
|
plugins: [
|
|
8316
8316
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8317
8317
|
_chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8318
|
-
|
|
8318
|
+
_chunkKBIM7PFQcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8319
8319
|
tailwindVitePlugin,
|
|
8320
8320
|
...rendererVitePlugins,
|
|
8321
8321
|
...reactRefreshPlugins,
|
|
@@ -8325,14 +8325,14 @@ async function defineConfig(config = {}) {
|
|
|
8325
8325
|
farmNavigationPlugin(config.renderer),
|
|
8326
8326
|
farmIslandContainersPlugin(config),
|
|
8327
8327
|
farmPlugin(config),
|
|
8328
|
-
|
|
8328
|
+
_chunkOIPPISQ6cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8329
8329
|
farmBrandingPlugin
|
|
8330
8330
|
],
|
|
8331
8331
|
customLogger: farmLogger,
|
|
8332
8332
|
clearScreen: false,
|
|
8333
8333
|
optimizeDeps: {
|
|
8334
|
-
...
|
|
8335
|
-
|
|
8334
|
+
..._chunkKBIM7PFQcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8335
|
+
_chunkKBIM7PFQcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8336
8336
|
appRoot,
|
|
8337
8337
|
_chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8338
8338
|
),
|
|
@@ -8376,7 +8376,7 @@ async function defineConfig(config = {}) {
|
|
|
8376
8376
|
// Stub out problematic server-only modules during dev mode
|
|
8377
8377
|
alias: {
|
|
8378
8378
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8379
|
-
...
|
|
8379
|
+
..._chunkKBIM7PFQcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8380
8380
|
// Nitro internals that should not be resolved in browser
|
|
8381
8381
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8382
8382
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|