@farm.js/core 0.1.87 → 0.2.0-beta.0
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-B2TRJT3B.cjs +17 -0
- package/dist/{analyzer-W4EB7DHL.mjs → analyzer-PWHYGER6.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/{chunk-B7L24VPX.cjs → chunk-22KXTL3I.cjs} +6 -4
- package/dist/{chunk-FULX5RYX.cjs → chunk-2OR5WAD5.cjs} +19 -13
- package/dist/{chunk-WSQ3S3NV.cjs → chunk-3MY6TNNE.cjs} +13 -12
- package/dist/{chunk-A4WWKG2B.cjs → chunk-5ZWXTIGE.cjs} +2 -2
- package/dist/{chunk-HYL372GW.cjs → chunk-6266WH6X.cjs} +1 -1
- package/dist/chunk-65LZRVCZ.mjs +18 -0
- package/dist/{chunk-ZCX2XJPY.cjs → chunk-7LBNWL3L.cjs} +2 -2
- package/dist/{chunk-4FGTNYHE.mjs → chunk-BJHXFEAF.mjs} +2 -2
- package/dist/chunk-BQHIJOZM.cjs +13 -0
- package/dist/{chunk-VCZ4EM5K.cjs → chunk-CFLRUCN7.cjs} +143 -136
- package/dist/{chunk-IM422XKU.cjs → chunk-CNGGEHXY.cjs} +2 -2
- package/dist/{chunk-B5QRNCIE.mjs → chunk-DATICPTO.mjs} +1 -1
- package/dist/{chunk-XMVZXZ32.cjs → chunk-ERV422FO.cjs} +2 -2
- package/dist/{chunk-33WR5XV5.cjs → chunk-FEWCWBOF.cjs} +4 -4
- package/dist/{chunk-FLMALEY2.mjs → chunk-GGD57DJA.mjs} +3 -25
- package/dist/{chunk-HQ2VAJLW.mjs → chunk-GV5D5EM6.mjs} +1 -1
- package/dist/{chunk-6MZSTPD2.mjs → chunk-H47EH24T.mjs} +1 -1
- package/dist/{chunk-OBVBII5K.cjs → chunk-HU4R2PPW.cjs} +2 -2
- package/dist/{chunk-N3VMHPIY.mjs → chunk-HZY63K5C.mjs} +2 -2
- package/dist/{chunk-HFRG2IQS.mjs → chunk-JDO3X7RB.mjs} +5 -4
- package/dist/{chunk-XFUPWRKT.cjs → chunk-JGUMFTZT.cjs} +4 -4
- package/dist/chunk-JIGWHFA5.mjs +32 -0
- package/dist/{chunk-YBXIVQCE.cjs → chunk-JP5TWUK2.cjs} +4 -4
- package/dist/{chunk-UGD53SNO.cjs → chunk-KQ6TYQU7.cjs} +16 -12
- package/dist/{chunk-K5FLQJW5.mjs → chunk-L6ZL35ZJ.mjs} +6 -4
- package/dist/{chunk-Q73LRKLP.mjs → chunk-LUGQUU4S.mjs} +1 -1
- package/dist/{chunk-LIWVPE72.mjs → chunk-M4CNAZMS.mjs} +23 -16
- package/dist/{chunk-QLRI2BX5.mjs → chunk-MM4U2NNI.mjs} +4 -4
- package/dist/{chunk-5D73SKF3.mjs → chunk-MRULVIH3.mjs} +1 -1
- package/dist/{chunk-LBJOHMTB.mjs → chunk-MZPPT5NA.mjs} +1 -1
- package/dist/{chunk-2UYYXSUS.mjs → chunk-N5NRXLCX.mjs} +4 -2
- package/dist/{chunk-U3A46QFD.cjs → chunk-PA3VZNWU.cjs} +6 -6
- package/dist/{chunk-2PJVEL56.cjs → chunk-PCAEJNQF.cjs} +5 -27
- package/dist/{chunk-TI4BZV6M.cjs → chunk-PQ6DBVJ2.cjs} +53 -53
- package/dist/chunk-PTAGDZ7I.mjs +13 -0
- package/dist/{chunk-3AV4DCXY.mjs → chunk-PWTBXYJY.mjs} +12 -6
- package/dist/{chunk-PO5MZIWK.mjs → chunk-QBXS4TNG.mjs} +6 -2
- package/dist/chunk-QZUCVJZJ.cjs +18 -0
- package/dist/{chunk-EZYNIADW.mjs → chunk-SCOKBXHS.mjs} +45 -29
- package/dist/{chunk-CXHVRHM2.cjs → chunk-SG5RFGV6.cjs} +2 -2
- package/dist/{chunk-VCI776NG.cjs → chunk-SUACCCZG.cjs} +12 -10
- package/dist/{chunk-CN2JOTRO.cjs → chunk-THGSPDFD.cjs} +7 -7
- package/dist/{chunk-SDNYULFS.cjs → chunk-TQFIZRON.cjs} +157 -141
- package/dist/{chunk-7BNVUIGL.cjs → chunk-VMGQOP7X.cjs} +2 -2
- package/dist/{chunk-4SJ22WTT.mjs → chunk-W3ZBLFLU.mjs} +1 -1
- package/dist/{chunk-26HESRBL.mjs → chunk-WOTAU3BN.mjs} +1 -1
- package/dist/{chunk-JB4BHRFK.cjs → chunk-WP77JDKI.cjs} +16 -16
- package/dist/{chunk-3F55K4MC.mjs → chunk-WPB6HJC7.mjs} +1 -1
- package/dist/{chunk-VPGEYX5Y.mjs → chunk-WX752VMN.mjs} +2 -2
- package/dist/{chunk-O7K4HMAQ.mjs → chunk-XJJQAFZX.mjs} +1 -1
- package/dist/{chunk-RGYS5OPL.cjs → chunk-XRYLMTYF.cjs} +3 -3
- package/dist/{chunk-QSDIJ45N.mjs → chunk-YCHIR3X6.mjs} +1 -1
- package/dist/chunk-YIGUFJMR.cjs +32 -0
- package/dist/{chunk-A2PPQ5LB.mjs → chunk-ZOD6EYWE.mjs} +1 -1
- package/dist/client.cjs +8 -6
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +7 -5
- package/dist/{devtools-GWJZPWIW.mjs → devtools-2CRVXV7E.mjs} +1 -1
- package/dist/{devtools-GPIKZ5AV.cjs → devtools-RL4AU5KD.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/i18n/client.cjs +11 -10
- package/dist/i18n/client.mjs +3 -2
- package/dist/index.cjs +30 -28
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +25 -23
- 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/client-runtime.cjs +11 -12
- package/dist/internal/client-runtime.d.mts +6 -4
- package/dist/internal/client-runtime.d.ts +6 -4
- package/dist/internal/client-runtime.mjs +11 -12
- 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/islands-boot.cjs +20 -15
- package/dist/internal/islands-boot.mjs +6 -1
- 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/internal/spa-router.cjs +4 -3
- package/dist/internal/spa-router.d.mts +1 -1
- package/dist/internal/spa-router.d.ts +1 -1
- package/dist/internal/spa-router.mjs +3 -2
- package/dist/{manager-PX4QN4HK.cjs → manager-D4DZRBRS.cjs} +4 -4
- package/dist/{manager-OMTC5FOJ.mjs → manager-PKPQGBAE.mjs} +3 -3
- package/dist/{navigation-delegate.d-ChfinbWB.d.mts → navigation-delegate.d-B9GjWbov.d.mts} +1 -1
- package/dist/{navigation-delegate.d-fMgELdAe.d.ts → navigation-delegate.d-BbW1_pf_.d.ts} +1 -1
- package/dist/navigation.cjs +6 -5
- package/dist/navigation.d.mts +2 -2
- package/dist/navigation.d.ts +2 -2
- package/dist/navigation.mjs +5 -4
- package/dist/plugin.cjs +12 -12
- package/dist/plugin.mjs +11 -11
- package/dist/query/client.cjs +8 -7
- package/dist/query/client.mjs +3 -2
- package/dist/renderer-client.cjs +14 -13
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/renderer-client.mjs +5 -4
- package/dist/{router.d-D5Mp7bpO.d.ts → router.d-Bm9FNSu3.d.ts} +1 -1
- package/dist/{router.d-DrQ1QDFk.d.mts → router.d-YKVirmj4.d.mts} +1 -1
- package/dist/{rsc-pipeline-TQOSDWOU.cjs → rsc-pipeline-3DYC5ZXW.cjs} +3 -3
- package/dist/{rsc-pipeline-KLMQU3YP.mjs → rsc-pipeline-LRB4ZG6I.mjs} +2 -2
- package/dist/{runtime-BDPBO65S.mjs → runtime-3WJNNAAR.mjs} +2 -2
- package/dist/{runtime-CQSCRVZ7.cjs → runtime-CRFF32H6.cjs} +4 -4
- package/dist/server.cjs +47 -33
- package/dist/server.mjs +27 -13
- package/dist/{spa-router.d-CXgvy-7L.d.mts → spa-router.d-DGmropfK.d.mts} +3 -1
- package/dist/{spa-router.d-BXxoU3Cv.d.ts → spa-router.d-nE1jHNGt.d.ts} +3 -1
- package/dist/{store-core.d-D00BsbnO.d.ts → store-core.d-B5cwOd8g.d.ts} +2 -2
- package/dist/{store-core.d-CDbVAbTn.d.mts → store-core.d-C-gATBwd.d.mts} +2 -2
- 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 +3 -3
- package/dist/analyzer-LLU2Z6I4.cjs +0 -17
- package/dist/chunk-SBDWCDS6.cjs +0 -8
- package/dist/chunk-YX6AFPXC.mjs +0 -8
- /package/dist/{chunk-ALOFMAFA.mjs → chunk-BGEA4K7C.mjs} +0 -0
- /package/dist/{chunk-MZR22RAC.cjs → chunk-IRPXOTEN.cjs} +0 -0
|
@@ -44,7 +44,7 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkPQ6DBVJ2cjs = require('./chunk-PQ6DBVJ2.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 _chunkERV422FOcjs = require('./chunk-ERV422FO.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunkFEWCWBOFcjs = require('./chunk-FEWCWBOF.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 _chunkJGUMFTZTcjs = require('./chunk-JGUMFTZT.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkCNGGEHXYcjs = require('./chunk-CNGGEHXY.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 _chunkPA3VZNWUcjs = require('./chunk-PA3VZNWU.cjs');
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
|
|
@@ -247,7 +247,11 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
247
247
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
248
248
|
|
|
249
249
|
|
|
250
|
-
var
|
|
250
|
+
var _chunk3MY6TNNEcjs = require('./chunk-3MY6TNNE.cjs');
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
var _chunkBQHIJOZMcjs = require('./chunk-BQHIJOZM.cjs');
|
|
251
255
|
|
|
252
256
|
|
|
253
257
|
var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
|
|
@@ -310,7 +314,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
310
314
|
var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
|
|
311
315
|
|
|
312
316
|
|
|
313
|
-
var
|
|
317
|
+
var _chunk6266WH6Xcjs = require('./chunk-6266WH6X.cjs');
|
|
314
318
|
|
|
315
319
|
|
|
316
320
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -715,7 +719,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
715
719
|
return null;
|
|
716
720
|
}
|
|
717
721
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
718
|
-
return
|
|
722
|
+
return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
|
|
719
723
|
"CLIENT_SERVER_FUNCTION",
|
|
720
724
|
id,
|
|
721
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.`,
|
|
@@ -974,21 +978,21 @@ function readPropertyKey(property) {
|
|
|
974
978
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
975
979
|
switch (finding.kind) {
|
|
976
980
|
case "server-env":
|
|
977
|
-
return
|
|
981
|
+
return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
|
|
978
982
|
"CLIENT_SERVER_ENV",
|
|
979
983
|
file,
|
|
980
984
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
981
985
|
location
|
|
982
986
|
);
|
|
983
987
|
case "public-env":
|
|
984
|
-
return
|
|
988
|
+
return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
|
|
985
989
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
986
990
|
file,
|
|
987
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.`,
|
|
988
992
|
location
|
|
989
993
|
);
|
|
990
994
|
case "builtin":
|
|
991
|
-
return
|
|
995
|
+
return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
|
|
992
996
|
"CLIENT_NODE_BUILTIN",
|
|
993
997
|
file,
|
|
994
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.`,
|
|
@@ -1284,13 +1288,13 @@ function loadFarmDocsSearchDevRuntime() {
|
|
|
1284
1288
|
return import("./search-client-A7YJT7JZ.cjs");
|
|
1285
1289
|
}
|
|
1286
1290
|
function loadFarmOpenAPIDevRuntime() {
|
|
1287
|
-
return import("./manager-
|
|
1291
|
+
return import("./manager-D4DZRBRS.cjs");
|
|
1288
1292
|
}
|
|
1289
1293
|
function loadFarmWorkflowsDevRuntime() {
|
|
1290
1294
|
return import("./workflows.cjs");
|
|
1291
1295
|
}
|
|
1292
1296
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1293
|
-
return import("./devtools-
|
|
1297
|
+
return import("./devtools-RL4AU5KD.cjs");
|
|
1294
1298
|
}
|
|
1295
1299
|
function loadFarmDevtoolsUIRuntime() {
|
|
1296
1300
|
return import("./devtools-ui-C2EMF2SO.cjs");
|
|
@@ -1340,16 +1344,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1340
1344
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1341
1345
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1342
1346
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1343
|
-
|
|
1344
|
-
new RegExp(`^${
|
|
1347
|
+
_chunkPQ6DBVJ2cjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1348
|
+
new RegExp(`^${_chunkPA3VZNWUcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1345
1349
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1346
1350
|
// included.
|
|
1347
1351
|
/^node:/,
|
|
1348
|
-
|
|
1352
|
+
_chunkPQ6DBVJ2cjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1349
1353
|
];
|
|
1350
1354
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1351
|
-
|
|
1352
|
-
new RegExp(`^${
|
|
1355
|
+
_chunkPQ6DBVJ2cjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1356
|
+
new RegExp(`^${_chunkPA3VZNWUcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1353
1357
|
];
|
|
1354
1358
|
function createFarmPlatformClientModule(platform) {
|
|
1355
1359
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1385,18 +1389,18 @@ function farmIslandContainersPlugin(config) {
|
|
|
1385
1389
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1386
1390
|
return null;
|
|
1387
1391
|
}
|
|
1388
|
-
if (
|
|
1392
|
+
if (_chunkPA3VZNWUcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1389
1393
|
const file = id.split("?", 1)[0];
|
|
1390
|
-
const bindings =
|
|
1394
|
+
const bindings = _chunkPA3VZNWUcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1391
1395
|
if (bindings.length === 0) return null;
|
|
1392
|
-
const grown =
|
|
1396
|
+
const grown = _chunkPA3VZNWUcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1393
1397
|
code,
|
|
1394
1398
|
file,
|
|
1395
1399
|
bindings,
|
|
1396
|
-
reference:
|
|
1400
|
+
reference: _chunkPA3VZNWUcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1397
1401
|
});
|
|
1398
1402
|
if (grown === null) return null;
|
|
1399
|
-
|
|
1403
|
+
_chunkPA3VZNWUcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1400
1404
|
return { code: grown, map: null };
|
|
1401
1405
|
}
|
|
1402
1406
|
};
|
|
@@ -1410,18 +1414,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1410
1414
|
config(config) {
|
|
1411
1415
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1412
1416
|
if (options.distDir) {
|
|
1413
|
-
|
|
1417
|
+
_chunkPA3VZNWUcjs.usePackageScanCacheFile.call(void 0,
|
|
1414
1418
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1415
1419
|
);
|
|
1416
1420
|
}
|
|
1417
|
-
const bundledPackages =
|
|
1421
|
+
const bundledPackages = _chunkPA3VZNWUcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1418
1422
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1419
|
-
|
|
1423
|
+
_chunkPA3VZNWUcjs.persistPackageScanCache.call(void 0, );
|
|
1420
1424
|
return {
|
|
1421
1425
|
optimizeDeps: {
|
|
1422
1426
|
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1423
1427
|
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1424
|
-
rolldownOptions: { plugins: [
|
|
1428
|
+
rolldownOptions: { plugins: [_chunkPA3VZNWUcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1425
1429
|
},
|
|
1426
1430
|
ssr: {
|
|
1427
1431
|
noExternal: [
|
|
@@ -1447,8 +1451,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1447
1451
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1448
1452
|
}
|
|
1449
1453
|
this.error(
|
|
1450
|
-
|
|
1451
|
-
|
|
1454
|
+
_chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
|
|
1455
|
+
_chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
|
|
1452
1456
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1453
1457
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1454
1458
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1458,9 +1462,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1458
1462
|
);
|
|
1459
1463
|
}
|
|
1460
1464
|
if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1461
|
-
return
|
|
1465
|
+
return _chunkPA3VZNWUcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1462
1466
|
}
|
|
1463
|
-
const resolveFrom = importer ?
|
|
1467
|
+
const resolveFrom = importer ? _chunkPA3VZNWUcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1464
1468
|
if (resolveFrom) {
|
|
1465
1469
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1466
1470
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1477,8 +1481,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1477
1481
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1478
1482
|
if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
|
|
1479
1483
|
this.error(
|
|
1480
|
-
|
|
1481
|
-
|
|
1484
|
+
_chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
|
|
1485
|
+
_chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
|
|
1482
1486
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1483
1487
|
_nullishCoalesce(importer, () => ( id)),
|
|
1484
1488
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1503,7 +1507,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1503
1507
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1504
1508
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1505
1509
|
}
|
|
1506
|
-
return _nullishCoalesce(
|
|
1510
|
+
return _nullishCoalesce(_chunkPA3VZNWUcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1507
1511
|
}
|
|
1508
1512
|
}
|
|
1509
1513
|
};
|
|
@@ -2117,7 +2121,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2117
2121
|
return null;
|
|
2118
2122
|
}
|
|
2119
2123
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2120
|
-
const everyExportIsComponent = options.code.includes(
|
|
2124
|
+
const everyExportIsComponent = options.code.includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2121
2125
|
const replacements = [];
|
|
2122
2126
|
const wrapperStatements = [];
|
|
2123
2127
|
const originalEntries = [];
|
|
@@ -2272,16 +2276,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2272
2276
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2273
2277
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2274
2278
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2275
|
-
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(_chunkPA3VZNWUcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2276
2280
|
}
|
|
2277
2281
|
findings.push(finding);
|
|
2278
2282
|
}
|
|
2279
2283
|
if (findings.length === 0) return;
|
|
2280
2284
|
warnedClientBoundaryIds.add(id);
|
|
2281
|
-
const locate =
|
|
2285
|
+
const locate = _chunkPA3VZNWUcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2282
2286
|
_chunk7U4XF76Rcjs.logger.warn(
|
|
2283
2287
|
findings.map(
|
|
2284
|
-
(finding) =>
|
|
2288
|
+
(finding) => _chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
|
|
2285
2289
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2286
2290
|
config.root
|
|
2287
2291
|
)
|
|
@@ -2347,12 +2351,12 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2347
2351
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2348
2352
|
const rendererDisabled = _chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2349
2353
|
const imageImports = farmImageImportsPlugin();
|
|
2350
|
-
const fontImports =
|
|
2354
|
+
const fontImports = _chunkPQ6DBVJ2cjs.farmFontImportsPlugin.call(void 0, {
|
|
2351
2355
|
root: options.root,
|
|
2352
2356
|
basePath: options.basePath,
|
|
2353
2357
|
publicDir: options.publicDir,
|
|
2354
2358
|
// A production build never starts the app, so it reads the directories from these options.
|
|
2355
|
-
isLayoutModule: (id) =>
|
|
2359
|
+
isLayoutModule: (id) => _chunkPQ6DBVJ2cjs.isFarmLayoutModule.call(void 0, id, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _108 => _108.getConfig, 'call', _109 => _109()]), () => ( options))))
|
|
2356
2360
|
});
|
|
2357
2361
|
let farmApp;
|
|
2358
2362
|
const isFarmGeneratedOutput = (file) => {
|
|
@@ -2383,8 +2387,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2383
2387
|
if (mdxComponents) files.add(mdxComponents);
|
|
2384
2388
|
return files;
|
|
2385
2389
|
};
|
|
2386
|
-
const islxActionsMode = () =>
|
|
2387
|
-
const islandsServerFns = () =>
|
|
2390
|
+
const islxActionsMode = () => _chunkPQ6DBVJ2cjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _115 => _115.getConfig, 'call', _116 => _116()]), () => ( options)));
|
|
2391
|
+
const islandsServerFns = () => _chunkPQ6DBVJ2cjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
|
|
2388
2392
|
let reactRefreshActive = false;
|
|
2389
2393
|
let server;
|
|
2390
2394
|
let deferredGates;
|
|
@@ -2427,11 +2431,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2427
2431
|
isBuild = configEnv.command === "build";
|
|
2428
2432
|
const farmAliases = {
|
|
2429
2433
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2430
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _128 => _128.resolve, 'optionalAccess', _129 => _129.alias])) ? {} :
|
|
2434
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _128 => _128.resolve, 'optionalAccess', _129 => _129.alias])) ? {} : _chunkPQ6DBVJ2cjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2431
2435
|
};
|
|
2432
2436
|
if (Object.keys(farmAliases).length > 0) {
|
|
2433
2437
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2434
|
-
userConfig.resolve.alias =
|
|
2438
|
+
userConfig.resolve.alias = _chunkPQ6DBVJ2cjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2435
2439
|
}
|
|
2436
2440
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2437
2441
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _130 => _130.server, 'optionalAccess', _131 => _131.cors]) === void 0;
|
|
@@ -2505,7 +2509,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2505
2509
|
} catch (e21) {
|
|
2506
2510
|
}
|
|
2507
2511
|
};
|
|
2508
|
-
farmApp = new (0,
|
|
2512
|
+
farmApp = new (0, _chunkPQ6DBVJ2cjs.FarmApp)(
|
|
2509
2513
|
{
|
|
2510
2514
|
...options,
|
|
2511
2515
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2513,7 +2517,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2513
2517
|
server
|
|
2514
2518
|
);
|
|
2515
2519
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2516
|
-
|
|
2520
|
+
_chunkPA3VZNWUcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2517
2521
|
farmApp.getConfig().root,
|
|
2518
2522
|
options.distDir || ".farm"
|
|
2519
2523
|
)
|
|
@@ -2524,7 +2528,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2524
2528
|
let farmAppPackages;
|
|
2525
2529
|
if (_optionalChain([farmConfig, 'access', _153 => _153.agent, 'optionalAccess', _154 => _154.noindexPreviews])) {
|
|
2526
2530
|
farmMiddlewares.use((_req, res, next) => {
|
|
2527
|
-
if (
|
|
2531
|
+
if (_chunkCNGGEHXYcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2528
2532
|
res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2529
2533
|
}
|
|
2530
2534
|
next();
|
|
@@ -2532,7 +2536,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2532
2536
|
}
|
|
2533
2537
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2534
2538
|
const devBuiltInRoutePaths = new Set(
|
|
2535
|
-
|
|
2539
|
+
_chunkJGUMFTZTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2536
2540
|
agent: {
|
|
2537
2541
|
apiCatalog: true,
|
|
2538
2542
|
mcp: true,
|
|
@@ -2582,7 +2586,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2582
2586
|
);
|
|
2583
2587
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2584
2588
|
try {
|
|
2585
|
-
const result = await
|
|
2589
|
+
const result = await _chunkERV422FOcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2586
2590
|
root: farmConfig.root,
|
|
2587
2591
|
srcDir: farmConfig.srcDir,
|
|
2588
2592
|
layers: farmConfig.layers,
|
|
@@ -2636,9 +2640,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2636
2640
|
const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
|
|
2637
2641
|
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
|
|
2638
2642
|
};
|
|
2643
|
+
const polyroute = _chunkBQHIJOZMcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2639
2644
|
const isApiRouteFile = (file) => {
|
|
2640
2645
|
const normalized = file.replace(/\\/g, "/");
|
|
2641
|
-
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) &&
|
|
2646
|
+
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkBQHIJOZMcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
|
|
2642
2647
|
};
|
|
2643
2648
|
const isProgrammaticRouteFile = (file) => {
|
|
2644
2649
|
const normalized = file.replace(/\\/g, "/");
|
|
@@ -2700,7 +2705,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2700
2705
|
if (isI18nCatalogFile(file)) {
|
|
2701
2706
|
_optionalChain([farmApp, 'optionalAccess', _169 => _169.getI18nRuntime, 'call', _170 => _170(), 'access', _171 => _171.reload, 'call', _172 => _172(), 'access', _173 => _173.then, 'call', _174 => _174(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _175 => _175.catch, 'call', _176 => _176((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
2702
2707
|
}
|
|
2703
|
-
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2708
|
+
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || polyroute && isApiRouteFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2704
2709
|
if (isRouteRefreshEvent) {
|
|
2705
2710
|
if (!queuedRouteFiles) {
|
|
2706
2711
|
const files = /* @__PURE__ */ new Set();
|
|
@@ -2767,7 +2772,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2767
2772
|
}
|
|
2768
2773
|
})]);
|
|
2769
2774
|
}
|
|
2770
|
-
apiRouteManager = new (0,
|
|
2775
|
+
apiRouteManager = new (0, _chunk3MY6TNNEcjs.APIRouteManager)(appDirs, server, {
|
|
2771
2776
|
plugins: farmConfig.plugins,
|
|
2772
2777
|
i18n: farmApp.getI18nRuntime(),
|
|
2773
2778
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2883,7 +2888,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2883
2888
|
rendererServer: farmConfig.renderer.server,
|
|
2884
2889
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2885
2890
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2886
|
-
globalStylesheetHref:
|
|
2891
|
+
globalStylesheetHref: _chunkPQ6DBVJ2cjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2887
2892
|
farmConfig.root,
|
|
2888
2893
|
farmConfig.srcDir
|
|
2889
2894
|
),
|
|
@@ -2914,7 +2919,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2914
2919
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2915
2920
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2916
2921
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2917
|
-
globalStylesheetHref:
|
|
2922
|
+
globalStylesheetHref: _chunkPQ6DBVJ2cjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2918
2923
|
farmConfig.root,
|
|
2919
2924
|
farmConfig.srcDir
|
|
2920
2925
|
),
|
|
@@ -2951,9 +2956,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2951
2956
|
}
|
|
2952
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")]);
|
|
2953
2958
|
if (farmInfraAnalyticsPlugin) {
|
|
2954
|
-
|
|
2959
|
+
_chunkFEWCWBOFcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
2955
2960
|
if (farmDocsDevRuntime) {
|
|
2956
|
-
const label =
|
|
2961
|
+
const label = _chunkJGUMFTZTcjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
2957
2962
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
2958
2963
|
{
|
|
2959
2964
|
path: _optionalChain([farmConfig, 'access', _200 => _200.docs, 'optionalAccess', _201 => _201.entry]) || "/docs",
|
|
@@ -2961,7 +2966,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2961
2966
|
pages: await getFarmDocsPagePaths()
|
|
2962
2967
|
}
|
|
2963
2968
|
);
|
|
2964
|
-
if (label) return
|
|
2969
|
+
if (label) return _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
2965
2970
|
}
|
|
2966
2971
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
2967
2972
|
return { pathname, pattern: _optionalChain([match, 'access', _206 => _206.route, 'optionalAccess', _207 => _207.pattern]) || null };
|
|
@@ -3125,7 +3130,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3125
3130
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3126
3131
|
res.statusCode = 200;
|
|
3127
3132
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3128
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3133
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkPQ6DBVJ2cjs.FARM_VIDEO_PLAYER_HTML);
|
|
3129
3134
|
return;
|
|
3130
3135
|
}
|
|
3131
3136
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3405,9 +3410,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3405
3410
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3406
3411
|
try {
|
|
3407
3412
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3408
|
-
const route =
|
|
3413
|
+
const route = _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0,
|
|
3409
3414
|
{ pathname: requestPathname },
|
|
3410
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3415
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkJGUMFTZTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3411
3416
|
);
|
|
3412
3417
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3413
3418
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3496,7 +3501,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3496
3501
|
);
|
|
3497
3502
|
return;
|
|
3498
3503
|
}
|
|
3499
|
-
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 && _chunkJGUMFTZTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3500
3505
|
const manifestGuardCoversPath = (path7) => _chunk4ZVKDHS6cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3501
3506
|
{
|
|
3502
3507
|
config: farmConfig,
|
|
@@ -3506,18 +3511,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3506
3511
|
apiServerBasePath
|
|
3507
3512
|
);
|
|
3508
3513
|
await serveBuiltInRoute(async () => {
|
|
3509
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3510
|
-
const manifest = await
|
|
3514
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkPQ6DBVJ2cjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3515
|
+
const manifest = await _chunkJGUMFTZTcjs.createFarmAppManifestResponse.call(void 0,
|
|
3511
3516
|
new Request(parsedRequestUrl, {
|
|
3512
3517
|
method: requestMethod,
|
|
3513
3518
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3514
3519
|
}),
|
|
3515
3520
|
{
|
|
3516
|
-
...
|
|
3521
|
+
..._chunkJGUMFTZTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3517
3522
|
build: "development",
|
|
3518
3523
|
packages: farmAppPackages,
|
|
3519
3524
|
// Read again on each request; unchanged files come from a cache.
|
|
3520
|
-
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")]) ? _chunkPQ6DBVJ2cjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3521
3526
|
}),
|
|
3522
3527
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3523
3528
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3535,11 +3540,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3535
3540
|
});
|
|
3536
3541
|
return;
|
|
3537
3542
|
}
|
|
3538
|
-
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) === _chunkJGUMFTZTcjs.FARM_API_CATALOG_PATH) {
|
|
3539
3544
|
await serveBuiltInRoute(
|
|
3540
|
-
() =>
|
|
3545
|
+
() => _chunkJGUMFTZTcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3541
3546
|
requestMethod,
|
|
3542
|
-
|
|
3547
|
+
_chunkJGUMFTZTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3543
3548
|
new Request(parsedRequestUrl, {
|
|
3544
3549
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3545
3550
|
})
|
|
@@ -3548,7 +3553,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3548
3553
|
return;
|
|
3549
3554
|
}
|
|
3550
3555
|
if (_optionalChain([options, 'access', _249 => _249.agent, 'optionalAccess', _250 => _250.aiCatalog]) !== false) {
|
|
3551
|
-
const aiCatalog =
|
|
3556
|
+
const aiCatalog = _chunkJGUMFTZTcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3552
3557
|
new Request(parsedRequestUrl, {
|
|
3553
3558
|
method: requestMethod,
|
|
3554
3559
|
headers: {
|
|
@@ -3630,7 +3635,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3630
3635
|
{
|
|
3631
3636
|
kind: "docs",
|
|
3632
3637
|
computed: docsResponse,
|
|
3633
|
-
label:
|
|
3638
|
+
label: _chunkJGUMFTZTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3634
3639
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3635
3640
|
{
|
|
3636
3641
|
path: _optionalChain([farmConfig, 'access', _261 => _261.docs, 'optionalAccess', _262 => _262.entry]) || "/docs",
|
|
@@ -3667,7 +3672,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3667
3672
|
}
|
|
3668
3673
|
const markdownRouteLabel = () => (
|
|
3669
3674
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3670
|
-
|
|
3675
|
+
_chunkJGUMFTZTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3671
3676
|
toRoutePathname(requestPathname),
|
|
3672
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])
|
|
3673
3678
|
)
|
|
@@ -3688,7 +3693,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3688
3693
|
return {
|
|
3689
3694
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3690
3695
|
// Project-relative, as production sends it: never the machine's path.
|
|
3691
|
-
filePath:
|
|
3696
|
+
filePath: _chunkPQ6DBVJ2cjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3692
3697
|
};
|
|
3693
3698
|
},
|
|
3694
3699
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -4031,9 +4036,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4031
4036
|
);
|
|
4032
4037
|
const docsRuntimeOptions = () => ({
|
|
4033
4038
|
kind: "docs",
|
|
4034
|
-
route:
|
|
4039
|
+
route: _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0,
|
|
4035
4040
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4036
|
-
|
|
4041
|
+
_chunkJGUMFTZTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4037
4042
|
path: _optionalChain([farmConfig, 'access', _294 => _294.docs, 'optionalAccess', _295 => _295.entry]) || "/docs",
|
|
4038
4043
|
roots: _optionalChain([farmConfig, 'access', _296 => _296.docs, 'optionalAccess', _297 => _297.roots, 'optionalAccess', _298 => _298.map, 'call', _299 => _299((root) => root.entry)])
|
|
4039
4044
|
})
|
|
@@ -4387,7 +4392,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4387
4392
|
);
|
|
4388
4393
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4389
4394
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4390
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4395
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkPA3VZNWUcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4391
4396
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4392
4397
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4393
4398
|
let mergedMetadata = {};
|
|
@@ -4398,7 +4403,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4398
4403
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4399
4404
|
(entry) => entry.pattern === layout.pattern
|
|
4400
4405
|
), () => ( {
|
|
4401
|
-
...
|
|
4406
|
+
..._chunkPA3VZNWUcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4402
4407
|
serverTree: false
|
|
4403
4408
|
}))
|
|
4404
4409
|
);
|
|
@@ -4413,7 +4418,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4413
4418
|
];
|
|
4414
4419
|
const hydrationIslandStrategy = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4415
4420
|
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _322 => _322.getConfig, 'call', _323 => _323()]), () => ( options))), 'access', _324 => _324.experimental, 'optionalAccess', _325 => _325.serverComponents])
|
|
4416
|
-
) === "islands" ?
|
|
4421
|
+
) === "islands" ? _chunkPQ6DBVJ2cjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4417
4422
|
route,
|
|
4418
4423
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4419
4424
|
layouts.map((layout, index) => ({
|
|
@@ -4479,7 +4484,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4479
4484
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4480
4485
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4481
4486
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4482
|
-
), () => (
|
|
4487
|
+
), () => ( _chunkPA3VZNWUcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4483
4488
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4484
4489
|
request: targetRequest,
|
|
4485
4490
|
params: slot.params,
|
|
@@ -4529,7 +4534,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4529
4534
|
pageShouldHydrate: shouldHydrate,
|
|
4530
4535
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4531
4536
|
islandStrategy: hydrationIslandStrategy,
|
|
4532
|
-
rendering:
|
|
4537
|
+
rendering: _chunkERV422FOcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4533
4538
|
});
|
|
4534
4539
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4535
4540
|
const layoutStartIndex = _chunk4ZVKDHS6cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
@@ -4664,7 +4669,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4664
4669
|
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasRuntimeHook, 'call', _344 => _344("after")]), () => ( false));
|
|
4665
4670
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4666
4671
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4667
|
-
const mcpLabel =
|
|
4672
|
+
const mcpLabel = _chunkJGUMFTZTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4668
4673
|
if (mcpLabel) return mcpLabel;
|
|
4669
4674
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4670
4675
|
return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4673,7 +4678,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4673
4678
|
const match = routeManager2.matchRoute(pathname2);
|
|
4674
4679
|
return {
|
|
4675
4680
|
kind: "page",
|
|
4676
|
-
route:
|
|
4681
|
+
route: _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0,
|
|
4677
4682
|
{
|
|
4678
4683
|
pathname: pathname2,
|
|
4679
4684
|
pattern: _optionalChain([match, 'optionalAccess', _345 => _345.route, 'optionalAccess', _346 => _346.pattern]) || null,
|
|
@@ -4937,7 +4942,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4937
4942
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4938
4943
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4939
4944
|
const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
|
|
4940
|
-
const isolatedHydrationMode =
|
|
4945
|
+
const isolatedHydrationMode = _chunkPA3VZNWUcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4941
4946
|
_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.experimental, 'optionalAccess', _390 => _390.isolatedClientHydration]),
|
|
4942
4947
|
{
|
|
4943
4948
|
serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "rsc",
|
|
@@ -4962,8 +4967,8 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
4962
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,
|
|
4963
4968
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
|
|
4964
4969
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
|
|
4965
|
-
|
|
4966
|
-
|
|
4970
|
+
_chunkPQ6DBVJ2cjs.generateClientCachePersistenceCode.call(void 0,
|
|
4971
|
+
_chunkPQ6DBVJ2cjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
|
|
4967
4972
|
),
|
|
4968
4973
|
adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4969
4974
|
_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _407 => _407.experimental, 'optionalAccess', _408 => _408.serverComponents])) === "islands"
|
|
@@ -4985,11 +4990,11 @@ export const getManifest = () => ({
|
|
|
4985
4990
|
});
|
|
4986
4991
|
`;
|
|
4987
4992
|
}
|
|
4988
|
-
const globalStylesheetHref =
|
|
4993
|
+
const globalStylesheetHref = _chunkPQ6DBVJ2cjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4989
4994
|
server.config.root,
|
|
4990
4995
|
_optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412(), 'access', _413 => _413.srcDir])
|
|
4991
4996
|
);
|
|
4992
|
-
const fullManifest =
|
|
4997
|
+
const fullManifest = _chunkPQ6DBVJ2cjs.createFarmDevClientManifest.call(void 0,
|
|
4993
4998
|
routeManager.generateClientManifest(server.config.root),
|
|
4994
4999
|
{
|
|
4995
5000
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -5011,45 +5016,45 @@ export { manifest };
|
|
|
5011
5016
|
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
5012
5017
|
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417()]), () => ( options));
|
|
5013
5018
|
let rewrotePackageImports = false;
|
|
5014
|
-
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) && !_chunkPA3VZNWUcjs.hasUseClientDirective.call(void 0, code)) {
|
|
5015
5020
|
const file = id.split("?", 1)[0];
|
|
5016
5021
|
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _421 => _421.config, 'access', _422 => _422.root]) || process.cwd();
|
|
5017
5022
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
5018
5023
|
const rewrite = () => {
|
|
5019
5024
|
if (_optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) === true) {
|
|
5020
5025
|
if (farmReactServerFiles.has(file)) {
|
|
5021
|
-
for (const child of
|
|
5026
|
+
for (const child of _chunkPA3VZNWUcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
5022
5027
|
farmReactServerFiles.add(child);
|
|
5023
5028
|
}
|
|
5024
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5029
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkPA3VZNWUcjs.getFarmClientReachableModules.call(void 0,
|
|
5025
5030
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5026
5031
|
projectRoot
|
|
5027
5032
|
).has(path6.resolve(file));
|
|
5028
|
-
const reactServer = !serverModule ? null :
|
|
5033
|
+
const reactServer = !serverModule ? null : _chunkPA3VZNWUcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5029
5034
|
code,
|
|
5030
5035
|
file,
|
|
5031
|
-
reference: (specifier, exportName) =>
|
|
5036
|
+
reference: (specifier, exportName) => _chunkPA3VZNWUcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5032
5037
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5033
5038
|
});
|
|
5034
5039
|
if (reactServer !== null) {
|
|
5035
5040
|
code = reactServer;
|
|
5036
5041
|
rewrotePackageImports = true;
|
|
5037
5042
|
}
|
|
5038
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5043
|
+
const internal = farmReactServerFiles.has(file) ? _chunkPA3VZNWUcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5039
5044
|
code,
|
|
5040
5045
|
file,
|
|
5041
|
-
reference: (clientFile) =>
|
|
5046
|
+
reference: (clientFile) => _chunkPA3VZNWUcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5042
5047
|
}) : null;
|
|
5043
5048
|
if (internal !== null) {
|
|
5044
5049
|
code = internal;
|
|
5045
5050
|
rewrotePackageImports = true;
|
|
5046
5051
|
}
|
|
5047
5052
|
}
|
|
5048
|
-
const rewritePackageImports = (source2) =>
|
|
5053
|
+
const rewritePackageImports = (source2) => _chunkPA3VZNWUcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5049
5054
|
code: source2,
|
|
5050
5055
|
file,
|
|
5051
5056
|
root: projectRoot,
|
|
5052
|
-
isClientPackage: (specifier) =>
|
|
5057
|
+
isClientPackage: (specifier) => _chunkPA3VZNWUcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5053
5058
|
});
|
|
5054
5059
|
const routeManager = _optionalChain([farmApp, 'optionalAccess', _424 => _424.getRouteManager, 'call', _425 => _425()]);
|
|
5055
5060
|
const source = code;
|
|
@@ -5070,7 +5075,7 @@ export { manifest };
|
|
|
5070
5075
|
}
|
|
5071
5076
|
}
|
|
5072
5077
|
};
|
|
5073
|
-
if (buildSnapshot)
|
|
5078
|
+
if (buildSnapshot) _chunkPA3VZNWUcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5074
5079
|
else rewrite();
|
|
5075
5080
|
}
|
|
5076
5081
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
@@ -5099,8 +5104,8 @@ export { manifest };
|
|
|
5099
5104
|
}
|
|
5100
5105
|
if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
|
|
5101
5106
|
const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434(), 'optionalAccess', _435 => _435.docs]));
|
|
5102
|
-
if (
|
|
5103
|
-
const redacted =
|
|
5107
|
+
if (_chunkPQ6DBVJ2cjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5108
|
+
const redacted = _chunkPQ6DBVJ2cjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5104
5109
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5105
5110
|
}
|
|
5106
5111
|
}
|
|
@@ -5109,9 +5114,9 @@ export { manifest };
|
|
|
5109
5114
|
if ((_optionalChain([currentConfig, 'access', _439 => _439.experimental, 'optionalAccess', _440 => _440.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5110
5115
|
const violation = findClientServerFnViolation(code, id);
|
|
5111
5116
|
if (violation) {
|
|
5112
|
-
const locate =
|
|
5117
|
+
const locate = _chunkPA3VZNWUcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5113
5118
|
this.error(
|
|
5114
|
-
|
|
5119
|
+
_chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
|
|
5115
5120
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5116
5121
|
currentConfig.root
|
|
5117
5122
|
)
|
|
@@ -5153,13 +5158,13 @@ export { manifest };
|
|
|
5153
5158
|
transformed = true;
|
|
5154
5159
|
}
|
|
5155
5160
|
}
|
|
5156
|
-
if (
|
|
5161
|
+
if (_chunkPA3VZNWUcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5157
5162
|
const clientBoundarySource = transformedCode;
|
|
5158
5163
|
const moduleInfo = this.getModuleInfo(id);
|
|
5159
5164
|
if (moduleInfo) {
|
|
5160
5165
|
moduleInfo.isClientComponent = true;
|
|
5161
5166
|
}
|
|
5162
|
-
transformedCode =
|
|
5167
|
+
transformedCode = _chunkPA3VZNWUcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5163
5168
|
transformed = true;
|
|
5164
5169
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _448 => _448.getConfig, 'call', _449 => _449()]), () => ( options));
|
|
5165
5170
|
let isolatedModuleReference = null;
|
|
@@ -5168,12 +5173,12 @@ export { manifest };
|
|
|
5168
5173
|
const cleanId = id.split("?", 1)[0];
|
|
5169
5174
|
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _452 => _452.getRouteManager, 'call', _453 => _453(), 'access', _454 => _454.getIsolatedClientBoundaryModules, 'call', _455 => _455(root)])));
|
|
5170
5175
|
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _456 => _456.has, 'call', _457 => _457(path6.resolve(cleanId))]) === true;
|
|
5171
|
-
if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
5172
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5176
|
+
if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkPA3VZNWUcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5177
|
+
cleanId.replace(/\\/g, "/").includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5173
5178
|
isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5174
5179
|
const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _458 => _458.experimental, 'optionalAccess', _459 => _459.serverComponents])) === "islands";
|
|
5175
|
-
const explicitStrategy =
|
|
5176
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5180
|
+
const explicitStrategy = _chunkPA3VZNWUcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5181
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkPQ6DBVJ2cjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5177
5182
|
if (inference) {
|
|
5178
5183
|
for (const file of inference.files) {
|
|
5179
5184
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5196,14 +5201,14 @@ export { manifest };
|
|
|
5196
5201
|
);
|
|
5197
5202
|
}
|
|
5198
5203
|
transformedCode = transformedBoundary;
|
|
5199
|
-
} else if (selectedForIsolatedHydration && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (
|
|
5204
|
+
} else if (selectedForIsolatedHydration && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkPA3VZNWUcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5200
5205
|
rendererIslandModule = true;
|
|
5201
5206
|
if (_optionalChain([transformOptions, 'optionalAccess', _462 => _462.ssr]) === true) {
|
|
5202
5207
|
const renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5203
5208
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5204
5209
|
code: transformedCode,
|
|
5205
5210
|
moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5206
|
-
islandStrategy: _nullishCoalesce(
|
|
5211
|
+
islandStrategy: _nullishCoalesce(_chunkPA3VZNWUcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5207
5212
|
parse: (source) => this.parse(source),
|
|
5208
5213
|
withIsland: renderer.server
|
|
5209
5214
|
});
|
|
@@ -5388,10 +5393,10 @@ if (import.meta.hot) {
|
|
|
5388
5393
|
if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
|
|
5389
5394
|
_optionalChain([farmApp, 'optionalAccess', _469 => _469.getRouteManager, 'call', _470 => _470(), 'access', _471 => _471.noteSourceChange, 'call', _472 => _472(id, change.event)]);
|
|
5390
5395
|
}
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5396
|
+
_chunkPA3VZNWUcjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
5397
|
+
_chunkPA3VZNWUcjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
5398
|
+
_chunkPQ6DBVJ2cjs.invalidateFarmRouteRootInferences.call(void 0, );
|
|
5399
|
+
_chunkPA3VZNWUcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5395
5400
|
},
|
|
5396
5401
|
async handleHotUpdate(ctx) {
|
|
5397
5402
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5424,14 +5429,17 @@ if (import.meta.hot) {
|
|
|
5424
5429
|
}
|
|
5425
5430
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5426
5431
|
};
|
|
5427
|
-
if (normalizedFile.includes(
|
|
5432
|
+
if (normalizedFile.includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5428
5433
|
path6.posix.join(
|
|
5429
5434
|
_chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.root]) || options.root || server2.config.root),
|
|
5430
|
-
|
|
5435
|
+
_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5431
5436
|
)
|
|
5432
5437
|
))
|
|
5433
5438
|
return modules;
|
|
5434
|
-
if (currentFarmConfig &&
|
|
5439
|
+
if (currentFarmConfig && _chunkBQHIJOZMcjs.isFarmAPIRouteFileName.call(void 0,
|
|
5440
|
+
path6.posix.basename(normalizedFile),
|
|
5441
|
+
_chunkBQHIJOZMcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
|
|
5442
|
+
) && _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5435
5443
|
(appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5436
5444
|
)) {
|
|
5437
5445
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
@@ -5732,12 +5740,12 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5732
5740
|
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5733
5741
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5734
5742
|
watchFile(routesFile);
|
|
5735
|
-
return
|
|
5743
|
+
return _chunkPA3VZNWUcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5736
5744
|
kind: parsed.kind,
|
|
5737
5745
|
routePath: parsed.routePath,
|
|
5738
5746
|
routesFile,
|
|
5739
5747
|
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _514 => _514.routes, 'access', _515 => _515.get, 'call', _516 => _516(
|
|
5740
|
-
|
|
5748
|
+
_chunkPA3VZNWUcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5741
5749
|
)]),
|
|
5742
5750
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5743
5751
|
rendererClient: _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
@@ -5745,7 +5753,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5745
5753
|
});
|
|
5746
5754
|
}
|
|
5747
5755
|
function resolveRealModuleFile(filePath, root) {
|
|
5748
|
-
const resolved = _nullishCoalesce(
|
|
5756
|
+
const resolved = _nullishCoalesce(_chunkPA3VZNWUcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5749
5757
|
try {
|
|
5750
5758
|
return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5751
5759
|
} catch (e29) {
|
|
@@ -6084,7 +6092,7 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6084
6092
|
}
|
|
6085
6093
|
}
|
|
6086
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) {
|
|
6087
|
-
const providerClientCode =
|
|
6095
|
+
const providerClientCode = _chunkPQ6DBVJ2cjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6088
6096
|
integrationProviders,
|
|
6089
6097
|
root,
|
|
6090
6098
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -6182,7 +6190,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6182
6190
|
return null;
|
|
6183
6191
|
}
|
|
6184
6192
|
}
|
|
6185
|
-
${islandValues ? `${
|
|
6193
|
+
${islandValues ? `${_chunkPQ6DBVJ2cjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6186
6194
|
let farmLastRouteState = null;
|
|
6187
6195
|
|
|
6188
6196
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -6203,7 +6211,7 @@ import { createClientPluginManager } from '@farm.js/core/plugin/client'
|
|
|
6203
6211
|
// Not @farm.js/core/client: that module's graph imports react, which other renderers' apps lack.
|
|
6204
6212
|
import { SPARouter } from '@farm.js/core/internal/spa-router'
|
|
6205
6213
|
import { isFarmRouteActive } from '@farm.js/core/router'
|
|
6206
|
-
import { installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
6214
|
+
import { installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, targetsCurrentContext, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
6207
6215
|
import { reviveDeferredData } from '@farm.js/core/deferred'
|
|
6208
6216
|
import {
|
|
6209
6217
|
createFarmDeploymentMismatchError,
|
|
@@ -7023,7 +7031,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
7023
7031
|
return loadedLayouts;
|
|
7024
7032
|
}
|
|
7025
7033
|
|
|
7026
|
-
${
|
|
7034
|
+
${_chunkPQ6DBVJ2cjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
7027
7035
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
7028
7036
|
let wrapped = element;
|
|
7029
7037
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7323,7 +7331,7 @@ function readActiveLayoutPatterns() {
|
|
|
7323
7331
|
);
|
|
7324
7332
|
}
|
|
7325
7333
|
|
|
7326
|
-
${
|
|
7334
|
+
${_chunkPQ6DBVJ2cjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7327
7335
|
|
|
7328
7336
|
function activateFragmentScripts(root) {
|
|
7329
7337
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7382,7 +7390,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7382
7390
|
return shell.innerHTML;
|
|
7383
7391
|
}
|
|
7384
7392
|
|
|
7385
|
-
${islandValues ?
|
|
7393
|
+
${islandValues ? _chunkPQ6DBVJ2cjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7386
7394
|
container,
|
|
7387
7395
|
fragment,
|
|
7388
7396
|
currentPatterns,
|
|
@@ -7457,9 +7465,9 @@ ${islandValues ? `
|
|
|
7457
7465
|
return nextTarget;
|
|
7458
7466
|
}
|
|
7459
7467
|
|
|
7460
|
-
${islandValues ? `${
|
|
7468
|
+
${islandValues ? `${_chunkPQ6DBVJ2cjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7461
7469
|
|
|
7462
|
-
${
|
|
7470
|
+
${_chunkPQ6DBVJ2cjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7463
7471
|
|
|
7464
7472
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7465
7473
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8113,8 +8121,7 @@ document.addEventListener('click', function(event) {
|
|
|
8113
8121
|
if (href.startsWith('#')) return;
|
|
8114
8122
|
|
|
8115
8123
|
// Don't intercept if target is set to open in new window
|
|
8116
|
-
|
|
8117
|
-
if (linkTarget && linkTarget !== '_self') return;
|
|
8124
|
+
if (!targetsCurrentContext(target)) return;
|
|
8118
8125
|
|
|
8119
8126
|
// Don't intercept modifier clicks (Ctrl+Click = new tab)
|
|
8120
8127
|
if (isModifierEvent(event)) return;
|
|
@@ -8176,7 +8183,7 @@ async function defineConfig(config = {}) {
|
|
|
8176
8183
|
config = layeredConfig;
|
|
8177
8184
|
}
|
|
8178
8185
|
config.renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8179
|
-
config.images =
|
|
8186
|
+
config.images = _chunkPQ6DBVJ2cjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8180
8187
|
const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8181
8188
|
ssr: true
|
|
8182
8189
|
});
|
|
@@ -8274,7 +8281,7 @@ async function defineConfig(config = {}) {
|
|
|
8274
8281
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8275
8282
|
console.log("");
|
|
8276
8283
|
console.log(
|
|
8277
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8284
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk6266WH6Xcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8278
8285
|
);
|
|
8279
8286
|
console.log("");
|
|
8280
8287
|
console.log(
|
|
@@ -8308,7 +8315,7 @@ async function defineConfig(config = {}) {
|
|
|
8308
8315
|
plugins: [
|
|
8309
8316
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8310
8317
|
_chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8311
|
-
|
|
8318
|
+
_chunkPQ6DBVJ2cjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8312
8319
|
tailwindVitePlugin,
|
|
8313
8320
|
...rendererVitePlugins,
|
|
8314
8321
|
...reactRefreshPlugins,
|
|
@@ -8318,14 +8325,14 @@ async function defineConfig(config = {}) {
|
|
|
8318
8325
|
farmNavigationPlugin(config.renderer),
|
|
8319
8326
|
farmIslandContainersPlugin(config),
|
|
8320
8327
|
farmPlugin(config),
|
|
8321
|
-
|
|
8328
|
+
_chunkPA3VZNWUcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8322
8329
|
farmBrandingPlugin
|
|
8323
8330
|
],
|
|
8324
8331
|
customLogger: farmLogger,
|
|
8325
8332
|
clearScreen: false,
|
|
8326
8333
|
optimizeDeps: {
|
|
8327
|
-
...
|
|
8328
|
-
|
|
8334
|
+
..._chunkPQ6DBVJ2cjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8335
|
+
_chunkPQ6DBVJ2cjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8329
8336
|
appRoot,
|
|
8330
8337
|
_chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8331
8338
|
),
|
|
@@ -8369,7 +8376,7 @@ async function defineConfig(config = {}) {
|
|
|
8369
8376
|
// Stub out problematic server-only modules during dev mode
|
|
8370
8377
|
alias: {
|
|
8371
8378
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8372
|
-
...
|
|
8379
|
+
..._chunkPQ6DBVJ2cjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8373
8380
|
// Nitro internals that should not be resolved in browser
|
|
8374
8381
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8375
8382
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|