@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
|
@@ -28,7 +28,7 @@ var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
|
28
28
|
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkV3Y3R3JJcjs = require('./chunk-V3Y3R3JJ.cjs');
|
|
32
32
|
|
|
33
33
|
// src/environment-vite.ts
|
|
34
34
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -886,7 +886,7 @@ function usePackageScanCacheFile(file) {
|
|
|
886
886
|
const stored = /* @__PURE__ */ new Map();
|
|
887
887
|
try {
|
|
888
888
|
const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
|
|
889
|
-
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm ===
|
|
889
|
+
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkV3Y3R3JJcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
|
|
890
890
|
for (const [directory, scan] of Object.entries(value.scans)) {
|
|
891
891
|
if (isStoredPackageScan(scan)) stored.set(directory, scan);
|
|
892
892
|
}
|
|
@@ -915,7 +915,7 @@ function persistPackageScanCache() {
|
|
|
915
915
|
_fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
|
|
916
916
|
_fs2.default.writeFileSync(
|
|
917
917
|
temporary,
|
|
918
|
-
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm:
|
|
918
|
+
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkV3Y3R3JJcjs.FARM_VERSION, scans })
|
|
919
919
|
);
|
|
920
920
|
_fs2.default.renameSync(temporary, cache2.file);
|
|
921
921
|
cache2.dirty = false;
|
|
@@ -1769,16 +1769,23 @@ function specifierPackage(specifier) {
|
|
|
1769
1769
|
return specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
|
|
1770
1770
|
}
|
|
1771
1771
|
function packageLookup(directory, packageName) {
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1772
|
+
return memoizeInFarmSourceSnapshot(
|
|
1773
|
+
"package-lookup",
|
|
1774
|
+
`${farmSourceSnapshotPathKey(directory)}\0${packageName}`,
|
|
1775
|
+
() => {
|
|
1776
|
+
for (let current = directory; ; current = _path2.default.dirname(current)) {
|
|
1777
|
+
if (_path2.default.basename(current) !== "node_modules") {
|
|
1778
|
+
const candidate = _path2.default.join(current, "node_modules", packageName);
|
|
1779
|
+
try {
|
|
1780
|
+
return { from: current, real: _fs2.default.realpathSync(candidate) };
|
|
1781
|
+
} catch (e26) {
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
if (_path2.default.dirname(current) === current) return null;
|
|
1778
1785
|
}
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1786
|
+
},
|
|
1787
|
+
(result) => result !== null
|
|
1788
|
+
);
|
|
1782
1789
|
}
|
|
1783
1790
|
function referenceResolveFrom(root, specifier, importer) {
|
|
1784
1791
|
const packageName = specifierPackage(specifier);
|
|
@@ -2218,7 +2225,7 @@ var PackageClientBoundaryCache = class {
|
|
|
2218
2225
|
}
|
|
2219
2226
|
const contents = JSON.stringify({
|
|
2220
2227
|
schema: SCHEMA_VERSION,
|
|
2221
|
-
farm:
|
|
2228
|
+
farm: _chunkV3Y3R3JJcjs.FARM_VERSION,
|
|
2222
2229
|
paths,
|
|
2223
2230
|
entries
|
|
2224
2231
|
});
|
|
@@ -2258,7 +2265,7 @@ function readStoredCache(file) {
|
|
|
2258
2265
|
} catch (e37) {
|
|
2259
2266
|
return null;
|
|
2260
2267
|
}
|
|
2261
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
2268
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkV3Y3R3JJcjs.FARM_VERSION) {
|
|
2262
2269
|
return null;
|
|
2263
2270
|
}
|
|
2264
2271
|
const { paths, entries } = value;
|
|
@@ -2269,7 +2276,7 @@ function readStoredCache(file) {
|
|
|
2269
2276
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
2270
2277
|
if (usable.length > 0) valid[key] = usable;
|
|
2271
2278
|
}
|
|
2272
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
2279
|
+
return { schema: SCHEMA_VERSION, farm: _chunkV3Y3R3JJcjs.FARM_VERSION, paths, entries: valid };
|
|
2273
2280
|
}
|
|
2274
2281
|
function isRecord(value) {
|
|
2275
2282
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -3909,9 +3916,12 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3909
3916
|
}
|
|
3910
3917
|
function isTypeOnlyNamedClause(tokens, startIndex, endIndex) {
|
|
3911
3918
|
if (_optionalChain([tokens, 'access', _240 => _240[startIndex], 'optionalAccess', _241 => _241.value]) !== "{") return false;
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3919
|
+
let closingBraceIndex = -1;
|
|
3920
|
+
for (let index = startIndex + 1; index < endIndex; index++) {
|
|
3921
|
+
if (tokens[index].value !== "}") continue;
|
|
3922
|
+
closingBraceIndex = index;
|
|
3923
|
+
break;
|
|
3924
|
+
}
|
|
3915
3925
|
if (closingBraceIndex === -1) return false;
|
|
3916
3926
|
let entryStartsAt = startIndex + 1;
|
|
3917
3927
|
for (let index = entryStartsAt; index <= closingBraceIndex; index++) {
|
|
@@ -3986,19 +3996,22 @@ function matchProjectImportAlias(alias, specifier) {
|
|
|
3986
3996
|
return specifier.slice(alias.prefix.length, specifier.length - alias.suffix.length);
|
|
3987
3997
|
}
|
|
3988
3998
|
function getProjectImportAliases(projectRoot) {
|
|
3989
|
-
const stamp = PROJECT_ALIAS_FILES.map((file) => {
|
|
3990
|
-
try {
|
|
3991
|
-
return String(_fs2.default.statSync(_path2.default.join(projectRoot, file)).mtimeMs);
|
|
3992
|
-
} catch (e43) {
|
|
3993
|
-
return "-";
|
|
3994
|
-
}
|
|
3995
|
-
}).join(":");
|
|
3996
3999
|
const sourceDir = _chunkMNUYXZV7cjs.getFarmProjectSourceDir.call(void 0, projectRoot);
|
|
3997
|
-
const cacheStamp = `${stamp}:${sourceDir}`;
|
|
3998
4000
|
const cached = projectImportAliasCache.get(projectRoot);
|
|
3999
|
-
|
|
4001
|
+
const dependencies = new Set(
|
|
4002
|
+
_nullishCoalesce(_optionalChain([cached, 'optionalAccess', _244 => _244.stamps, 'access', _245 => _245.keys, 'call', _246 => _246()]), () => ( PROJECT_ALIAS_FILES.map((file) => _path2.default.join(projectRoot, file))))
|
|
4003
|
+
);
|
|
4004
|
+
const stamps = /* @__PURE__ */ new Map();
|
|
4005
|
+
for (const file of dependencies) {
|
|
4006
|
+
noteFarmSourceRead(file);
|
|
4007
|
+
stamps.set(file, getFarmSourceStamp(file));
|
|
4008
|
+
}
|
|
4009
|
+
if (_optionalChain([cached, 'optionalAccess', _247 => _247.sourceDir]) === sourceDir && [...stamps].every(([file, stamp]) => cached.stamps.get(file) === stamp))
|
|
4010
|
+
return cached.aliases;
|
|
4011
|
+
dependencies.clear();
|
|
4012
|
+
for (const file of PROJECT_ALIAS_FILES) dependencies.add(_path2.default.join(projectRoot, file));
|
|
4000
4013
|
const aliases = [
|
|
4001
|
-
...readTsconfigPathAliases(projectRoot),
|
|
4014
|
+
...readTsconfigPathAliases(projectRoot, dependencies),
|
|
4002
4015
|
...readPackageImportAliases(projectRoot)
|
|
4003
4016
|
];
|
|
4004
4017
|
if (!aliases.some((alias) => alias.prefix === "@/")) {
|
|
@@ -4009,15 +4022,20 @@ function getProjectImportAliases(projectRoot) {
|
|
|
4009
4022
|
targets: [_path2.default.join(projectRoot, sourceDir, "*")]
|
|
4010
4023
|
});
|
|
4011
4024
|
}
|
|
4012
|
-
|
|
4025
|
+
stamps.clear();
|
|
4026
|
+
for (const file of dependencies) {
|
|
4027
|
+
noteFarmSourceRead(file);
|
|
4028
|
+
stamps.set(file, getFarmSourceStamp(file));
|
|
4029
|
+
}
|
|
4030
|
+
projectImportAliasCache.set(projectRoot, { sourceDir, stamps, aliases });
|
|
4013
4031
|
return aliases;
|
|
4014
4032
|
}
|
|
4015
|
-
function readTsconfigPathAliases(projectRoot) {
|
|
4033
|
+
function readTsconfigPathAliases(projectRoot, dependencies) {
|
|
4016
4034
|
for (const name of ["tsconfig.json", "jsconfig.json"]) {
|
|
4017
4035
|
const configPath = _path2.default.join(projectRoot, name);
|
|
4018
4036
|
if (!_fs2.default.existsSync(configPath)) continue;
|
|
4019
|
-
const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set());
|
|
4020
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
4037
|
+
const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set(), dependencies);
|
|
4038
|
+
if (!_optionalChain([resolved, 'optionalAccess', _248 => _248.paths])) return [];
|
|
4021
4039
|
const base2 = _nullishCoalesce(resolved.baseUrl, () => ( resolved.pathsDirectory));
|
|
4022
4040
|
return Object.entries(resolved.paths).flatMap(([pattern, targets]) => {
|
|
4023
4041
|
if (!Array.isArray(targets)) return [];
|
|
@@ -4034,9 +4052,10 @@ function readTsconfigPathAliases(projectRoot) {
|
|
|
4034
4052
|
}
|
|
4035
4053
|
return [];
|
|
4036
4054
|
}
|
|
4037
|
-
function readTsconfigPaths(configPath, visited) {
|
|
4055
|
+
function readTsconfigPaths(configPath, visited, dependencies) {
|
|
4038
4056
|
if (visited.has(configPath)) return null;
|
|
4039
4057
|
visited.add(configPath);
|
|
4058
|
+
dependencies.add(configPath);
|
|
4040
4059
|
const config = readJsonWithComments(configPath);
|
|
4041
4060
|
if (!config) return null;
|
|
4042
4061
|
const directory = _path2.default.dirname(configPath);
|
|
@@ -4049,21 +4068,21 @@ function readTsconfigPaths(configPath, visited) {
|
|
|
4049
4068
|
directory,
|
|
4050
4069
|
parent.endsWith(".json") ? parent : `${parent}.json`
|
|
4051
4070
|
);
|
|
4052
|
-
inherited = _nullishCoalesce(readTsconfigPaths(parentPath, visited), () => ( inherited));
|
|
4071
|
+
inherited = _nullishCoalesce(readTsconfigPaths(parentPath, visited, dependencies), () => ( inherited));
|
|
4053
4072
|
}
|
|
4054
4073
|
const options = _nullishCoalesce(config.compilerOptions, () => ( {}));
|
|
4055
|
-
const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess',
|
|
4074
|
+
const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess', _249 => _249.baseUrl]);
|
|
4056
4075
|
if (options.paths && typeof options.paths === "object") {
|
|
4057
4076
|
return { paths: options.paths, pathsDirectory: directory, baseUrl };
|
|
4058
4077
|
}
|
|
4059
4078
|
return inherited ? { ...inherited, baseUrl } : { pathsDirectory: directory, baseUrl };
|
|
4060
4079
|
}
|
|
4061
4080
|
function readPackageImportAliases(projectRoot) {
|
|
4062
|
-
const imports = _optionalChain([readPackageJson, 'call',
|
|
4081
|
+
const imports = _optionalChain([readPackageJson, 'call', _250 => _250(_path2.default.join(projectRoot, "package.json")), 'optionalAccess', _251 => _251.imports]);
|
|
4063
4082
|
if (!imports || typeof imports !== "object") return [];
|
|
4064
4083
|
return Object.entries(imports).flatMap(([pattern, value]) => {
|
|
4065
4084
|
const target = resolveConditionalExportTarget(value);
|
|
4066
|
-
if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess',
|
|
4085
|
+
if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess', _252 => _252.startsWith, 'call', _253 => _253("./")])) return [];
|
|
4067
4086
|
const wildcardIndex = pattern.indexOf("*");
|
|
4068
4087
|
return [
|
|
4069
4088
|
{
|
|
@@ -4079,7 +4098,7 @@ function readJsonWithComments(filePath) {
|
|
|
4079
4098
|
let source;
|
|
4080
4099
|
try {
|
|
4081
4100
|
source = _fs2.default.readFileSync(filePath, "utf8");
|
|
4082
|
-
} catch (
|
|
4101
|
+
} catch (e43) {
|
|
4083
4102
|
return null;
|
|
4084
4103
|
}
|
|
4085
4104
|
let output = "";
|
|
@@ -4107,7 +4126,7 @@ function readJsonWithComments(filePath) {
|
|
|
4107
4126
|
}
|
|
4108
4127
|
try {
|
|
4109
4128
|
return JSON.parse(output.replace(/,(\s*[}\]])/g, "$1"));
|
|
4110
|
-
} catch (
|
|
4129
|
+
} catch (e44) {
|
|
4111
4130
|
return null;
|
|
4112
4131
|
}
|
|
4113
4132
|
}
|
|
@@ -4129,15 +4148,15 @@ function resolvePackageModuleSourcePath(importerPath, specifier, root) {
|
|
|
4129
4148
|
const packageJsonPath = _path2.default.join(packageDirectory, "package.json");
|
|
4130
4149
|
const packageJson = readPackageJson(packageJsonPath);
|
|
4131
4150
|
const exportKey = packageSubpath ? `./${packageSubpath}` : ".";
|
|
4132
|
-
const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess',
|
|
4151
|
+
const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess', _254 => _254.exports]), exportKey);
|
|
4133
4152
|
const candidates = /* @__PURE__ */ new Set();
|
|
4134
|
-
if (_optionalChain([exportTarget, 'optionalAccess',
|
|
4153
|
+
if (_optionalChain([exportTarget, 'optionalAccess', _255 => _255.startsWith, 'call', _256 => _256("./")])) {
|
|
4135
4154
|
candidates.add(_path2.default.resolve(packageDirectory, exportTarget));
|
|
4136
4155
|
}
|
|
4137
4156
|
if (packageSubpath) {
|
|
4138
4157
|
candidates.add(_path2.default.join(packageDirectory, packageSubpath));
|
|
4139
4158
|
} else {
|
|
4140
|
-
for (const entry of [_optionalChain([packageJson, 'optionalAccess',
|
|
4159
|
+
for (const entry of [_optionalChain([packageJson, 'optionalAccess', _257 => _257.browser]), _optionalChain([packageJson, 'optionalAccess', _258 => _258.module]), _optionalChain([packageJson, 'optionalAccess', _259 => _259.main])]) {
|
|
4141
4160
|
if (typeof entry === "string") candidates.add(_path2.default.resolve(packageDirectory, entry));
|
|
4142
4161
|
}
|
|
4143
4162
|
candidates.add(_path2.default.join(packageDirectory, "index"));
|
|
@@ -4173,7 +4192,7 @@ function findPackageDirectory2(importerPath, packageName, root) {
|
|
|
4173
4192
|
function readPackageJson(packageJsonPath) {
|
|
4174
4193
|
try {
|
|
4175
4194
|
return JSON.parse(_fs2.default.readFileSync(packageJsonPath, "utf8"));
|
|
4176
|
-
} catch (
|
|
4195
|
+
} catch (e45) {
|
|
4177
4196
|
return null;
|
|
4178
4197
|
}
|
|
4179
4198
|
}
|
|
@@ -4202,7 +4221,7 @@ function resolvePackageExport(exportsField, exportKey) {
|
|
|
4202
4221
|
if (!exportKey.startsWith(prefix) || !exportKey.endsWith(suffix)) continue;
|
|
4203
4222
|
const wildcard = exportKey.slice(prefix.length, exportKey.length - suffix.length);
|
|
4204
4223
|
const target = resolveConditionalExportTarget(value);
|
|
4205
|
-
return _nullishCoalesce(_optionalChain([target, 'optionalAccess',
|
|
4224
|
+
return _nullishCoalesce(_optionalChain([target, 'optionalAccess', _260 => _260.replace, 'call', _261 => _261("*", wildcard)]), () => ( null));
|
|
4206
4225
|
}
|
|
4207
4226
|
return null;
|
|
4208
4227
|
}
|
|
@@ -4245,8 +4264,8 @@ function resolveSourceCandidatePath(candidate) {
|
|
|
4245
4264
|
}
|
|
4246
4265
|
for (const sourcePath of paths) {
|
|
4247
4266
|
try {
|
|
4248
|
-
if (_optionalChain([_fs2.default, 'access',
|
|
4249
|
-
} catch (
|
|
4267
|
+
if (_optionalChain([_fs2.default, 'access', _262 => _262.statSync, 'call', _263 => _263(sourcePath, { throwIfNoEntry: false }), 'optionalAccess', _264 => _264.isFile, 'call', _265 => _265()])) return sourcePath;
|
|
4268
|
+
} catch (e46) {
|
|
4250
4269
|
}
|
|
4251
4270
|
}
|
|
4252
4271
|
return null;
|
|
@@ -4288,7 +4307,7 @@ function scanFarmPackageImports(directory, root) {
|
|
|
4288
4307
|
let entries;
|
|
4289
4308
|
try {
|
|
4290
4309
|
entries = _fs2.default.readdirSync(current, { withFileTypes: true });
|
|
4291
|
-
} catch (
|
|
4310
|
+
} catch (e47) {
|
|
4292
4311
|
return;
|
|
4293
4312
|
}
|
|
4294
4313
|
for (const entry of entries) {
|
|
@@ -4321,7 +4340,7 @@ function collectFarmServerBundledPackageInfo(directory) {
|
|
|
4321
4340
|
let entries;
|
|
4322
4341
|
try {
|
|
4323
4342
|
entries = _fs2.default.readdirSync(current, { withFileTypes: true });
|
|
4324
|
-
} catch (
|
|
4343
|
+
} catch (e48) {
|
|
4325
4344
|
return;
|
|
4326
4345
|
}
|
|
4327
4346
|
for (const entry of entries) {
|
|
@@ -4360,7 +4379,7 @@ function getFarmClientReachableModules(directory, root) {
|
|
|
4360
4379
|
let entries;
|
|
4361
4380
|
try {
|
|
4362
4381
|
entries = _fs2.default.readdirSync(current, { withFileTypes: true });
|
|
4363
|
-
} catch (
|
|
4382
|
+
} catch (e49) {
|
|
4364
4383
|
return;
|
|
4365
4384
|
}
|
|
4366
4385
|
for (const entry of entries) {
|
|
@@ -4395,7 +4414,7 @@ function resolveFarmClientOptimizeDeps(directory, root) {
|
|
|
4395
4414
|
const imports = scanFarmPackageImports(directory, root);
|
|
4396
4415
|
for (const specifier of imports.client) {
|
|
4397
4416
|
const fonts = findFarmServerBundledPackage(importer, specifier);
|
|
4398
|
-
if (_optionalChain([fonts, 'optionalAccess',
|
|
4417
|
+
if (_optionalChain([fonts, 'optionalAccess', _266 => _266.fonts])) {
|
|
4399
4418
|
exclude.add(fonts.name);
|
|
4400
4419
|
continue;
|
|
4401
4420
|
}
|
|
@@ -4471,13 +4490,13 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4471
4490
|
let projectRoot = process.cwd();
|
|
4472
4491
|
let sources;
|
|
4473
4492
|
const routeSourceFiles = () => {
|
|
4474
|
-
const clientRoutes = _optionalChain([farmApi, 'optionalAccess',
|
|
4475
|
-
if (_optionalChain([sources, 'optionalAccess',
|
|
4493
|
+
const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _267 => _267.getProgrammaticClientRoutes, 'call', _268 => _268()]);
|
|
4494
|
+
if (_optionalChain([sources, 'optionalAccess', _269 => _269.for]) !== clientRoutes || !sources) {
|
|
4476
4495
|
sources = {
|
|
4477
4496
|
for: clientRoutes,
|
|
4478
4497
|
files: /* @__PURE__ */ new Set([
|
|
4479
4498
|
...routesFiles,
|
|
4480
|
-
...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess',
|
|
4499
|
+
...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _270 => _270.routeSourceFiles]), () => ( []))].map(resolvedFile)
|
|
4481
4500
|
])
|
|
4482
4501
|
};
|
|
4483
4502
|
}
|
|
@@ -4498,7 +4517,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4498
4517
|
configResolved(config) {
|
|
4499
4518
|
isBuild = config.command === "build";
|
|
4500
4519
|
projectRoot = config.root;
|
|
4501
|
-
farmApi = _optionalChain([config, 'access',
|
|
4520
|
+
farmApi = _optionalChain([config, 'access', _271 => _271.plugins, 'access', _272 => _272.find, 'call', _273 => _273((plugin) => plugin.name === "farm"), 'optionalAccess', _274 => _274.api]);
|
|
4502
4521
|
sources = void 0;
|
|
4503
4522
|
routesFiles = new Set(
|
|
4504
4523
|
_chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
|
|
@@ -4511,7 +4530,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4511
4530
|
transform(code, id, transformOptions) {
|
|
4512
4531
|
const environment = resolveBuildEnvironment(
|
|
4513
4532
|
this,
|
|
4514
|
-
_optionalChain([transformOptions, 'optionalAccess',
|
|
4533
|
+
_optionalChain([transformOptions, 'optionalAccess', _275 => _275.ssr])
|
|
4515
4534
|
);
|
|
4516
4535
|
const parse3 = (source) => this.parse(source);
|
|
4517
4536
|
const result = transformEnvironmentFunctions({
|
|
@@ -4524,7 +4543,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4524
4543
|
if (environment === "client" && !isBuild && !_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
|
|
4525
4544
|
this.error(routeSourceError(moduleFile(id)));
|
|
4526
4545
|
}
|
|
4527
|
-
if (environment === "server" && _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access',
|
|
4546
|
+
if (environment === "server" && _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _276 => _276.experimental, 'optionalAccess', _277 => _277.serverComponents])) === "islands" && isApplicationScript(id)) {
|
|
4528
4547
|
const file = id.split("?", 1)[0];
|
|
4529
4548
|
const root = _fs.realpathSync.call(void 0, _nullishCoalesce(options.root, () => ( projectRoot)));
|
|
4530
4549
|
const clientCode = getFarmClientReachableModules(root, root).has(_path2.default.resolve(file)) || _fs.existsSync.call(void 0, file) && hasUseClientDirective(_fs.readFileSync.call(void 0, file, "utf8"));
|
|
@@ -4558,7 +4577,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4558
4577
|
for (const id of this.getModuleIds()) {
|
|
4559
4578
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4560
4579
|
const chain = findClientNodeBuiltinChain(id, (moduleId) => {
|
|
4561
|
-
return _optionalChain([this, 'access',
|
|
4580
|
+
return _optionalChain([this, 'access', _278 => _278.getModuleInfo, 'call', _279 => _279(moduleId), 'optionalAccess', _280 => _280.importedIds]);
|
|
4562
4581
|
});
|
|
4563
4582
|
if (chain) {
|
|
4564
4583
|
this.error(
|
|
@@ -4576,8 +4595,8 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4576
4595
|
}
|
|
4577
4596
|
if (!forbidden.has(moduleFile(id))) continue;
|
|
4578
4597
|
const info = this.getModuleInfo(id);
|
|
4579
|
-
if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess',
|
|
4580
|
-
this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess',
|
|
4598
|
+
if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _281 => _281.code]))) continue;
|
|
4599
|
+
this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _282 => _282.importers, 'access', _283 => _283.map, 'call', _284 => _284(moduleFile)])));
|
|
4581
4600
|
}
|
|
4582
4601
|
}
|
|
4583
4602
|
};
|
|
@@ -4591,13 +4610,13 @@ function moduleFile(id) {
|
|
|
4591
4610
|
function resolvedFile(filePath) {
|
|
4592
4611
|
try {
|
|
4593
4612
|
return moduleFile(_fs.realpathSync.call(void 0, filePath));
|
|
4594
|
-
} catch (
|
|
4613
|
+
} catch (e50) {
|
|
4595
4614
|
return moduleFile(filePath);
|
|
4596
4615
|
}
|
|
4597
4616
|
}
|
|
4598
4617
|
function resolveBuildEnvironment(context, ssr) {
|
|
4599
|
-
if (_optionalChain([context, 'access',
|
|
4600
|
-
if (_optionalChain([context, 'access',
|
|
4618
|
+
if (_optionalChain([context, 'access', _285 => _285.environment, 'optionalAccess', _286 => _286.name]) === "client") return "client";
|
|
4619
|
+
if (_optionalChain([context, 'access', _287 => _287.environment, 'optionalAccess', _288 => _288.name]) === "rsc" || _optionalChain([context, 'access', _289 => _289.environment, 'optionalAccess', _290 => _290.name]) === "ssr") {
|
|
4601
4620
|
return "server";
|
|
4602
4621
|
}
|
|
4603
4622
|
return ssr ? "server" : "client";
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
function hasPolyroutePlugin(plugins) {
|
|
3
3
|
return _optionalChain([plugins, 'optionalAccess', _ => _.some, 'call', _2 => _2((plugin) => plugin.name === "polyroute")]) === true;
|
|
4
4
|
}
|
|
5
|
+
function isPolyrouteRouteFileName(fileName) {
|
|
6
|
+
return fileName === "route.rs" || fileName === "route.go";
|
|
7
|
+
}
|
|
5
8
|
function isFarmAPIRouteFileName(fileName, polyroute = false) {
|
|
6
|
-
if (polyroute && fileName
|
|
9
|
+
if (polyroute && isPolyrouteRouteFileName(fileName)) return true;
|
|
7
10
|
return /^route\.(?:ts|tsx|js|jsx)$/.test(fileName);
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
|
|
17
|
+
exports.hasPolyroutePlugin = hasPolyroutePlugin; exports.isPolyrouteRouteFileName = isPolyrouteRouteFileName; exports.isFarmAPIRouteFileName = isFarmAPIRouteFileName;
|
|
@@ -7,7 +7,7 @@ var _chunkHS4JPIGRcjs = require('./chunk-HS4JPIGR.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkSIECKBNKcjs = require('./chunk-SIECKBNK.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
|
|
@@ -138,7 +138,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
138
138
|
/**
|
|
139
139
|
* Recursively find all route.ts files
|
|
140
140
|
*/
|
|
141
|
-
findRouteFiles(dir, polyroute =
|
|
141
|
+
findRouteFiles(dir, polyroute = _chunkSIECKBNKcjs.hasPolyroutePlugin.call(void 0, _optionalChain([this, 'access', _ => _.viteServer, 'optionalAccess', _2 => _2.config, 'optionalAccess', _3 => _3.plugins]))) {
|
|
142
142
|
const files = [];
|
|
143
143
|
if (!fs.existsSync(dir)) {
|
|
144
144
|
return files;
|
|
@@ -148,7 +148,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
148
148
|
const fullPath = path.join(dir, entry.name);
|
|
149
149
|
if (entry.isDirectory()) {
|
|
150
150
|
files.push(...this.findRouteFiles(fullPath, polyroute));
|
|
151
|
-
} else if (
|
|
151
|
+
} else if (_chunkSIECKBNKcjs.isFarmAPIRouteFileName.call(void 0, entry.name, polyroute)) {
|
|
152
152
|
files.push(fullPath);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkSIECKBNKcjs = require('./chunk-SIECKBNK.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkGCJ4GNMCcjs = require('./chunk-GCJ4GNMC.cjs');
|
|
@@ -87,7 +87,7 @@ var APITypeGenerator = class {
|
|
|
87
87
|
if (item.isDirectory()) {
|
|
88
88
|
const newBasePath = basePath ? `${basePath}/${item.name}` : item.name;
|
|
89
89
|
this.scanDirectory(fullPath, appDir, routes, newBasePath);
|
|
90
|
-
} else if (
|
|
90
|
+
} else if (_chunkSIECKBNKcjs.isFarmAPIRouteFileName.call(void 0, item.name)) {
|
|
91
91
|
const routeInfo = this.extractRouteInfo(fullPath, appDir, basePath);
|
|
92
92
|
if (routeInfo) {
|
|
93
93
|
routes.push(routeInfo);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-HR4N2K4V.mjs";
|
|
5
5
|
import {
|
|
6
6
|
normalizeFarmProductionSiteOrigin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PKV3JGMS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveFarmAppManifestConfig
|
|
10
10
|
} from "./chunk-SQ5O7I3L.mjs";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-YT2ZMLXK.mjs";
|
|
30
30
|
import {
|
|
31
31
|
FARM_VERSION
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-EBKYRP2P.mjs";
|
|
33
33
|
import {
|
|
34
34
|
applyFarmBasePath
|
|
35
35
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
resolveFarmIslxActionsMode,
|
|
45
45
|
resolveFarmRouteRootStrategy,
|
|
46
46
|
toBakedMarkdownSourcePath
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-DZC2XGK4.mjs";
|
|
48
48
|
import {
|
|
49
49
|
generateFarmClientPluginEntryCode,
|
|
50
50
|
hasFarmServerRuntimePlugins,
|
|
@@ -59,10 +59,10 @@ import {
|
|
|
59
59
|
import {
|
|
60
60
|
generateFarmTypeArtifacts,
|
|
61
61
|
resolveRouteRenderingConfig
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-23BZ7ZH6.mjs";
|
|
63
63
|
import {
|
|
64
64
|
_setFarmInfraAnalyticsWebMCPRoute
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-ISSFWEPY.mjs";
|
|
66
66
|
import {
|
|
67
67
|
createFarmRouteRenderPlan,
|
|
68
68
|
farmPathGuardCoversEndpoint,
|
|
@@ -89,13 +89,13 @@ import {
|
|
|
89
89
|
resolveFarmMCPRouteLabel,
|
|
90
90
|
resolveFarmMarkdownRouteLabel,
|
|
91
91
|
setFarmRouteLabel
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-YPAOC3FO.mjs";
|
|
93
93
|
import {
|
|
94
94
|
FARM_DEFAULT_MCP_PATH
|
|
95
95
|
} from "./chunk-HR4N2K4V.mjs";
|
|
96
96
|
import {
|
|
97
97
|
isFarmPreviewDeploymentEnvironment
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-PKV3JGMS.mjs";
|
|
99
99
|
import {
|
|
100
100
|
createFarmServerFnBoundaryModule,
|
|
101
101
|
isFarmServerFnBoundaryId,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
usePackageScanCacheFile,
|
|
147
147
|
withFarmSourceSnapshotOf,
|
|
148
148
|
wrapFarmIslandContainers
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-NVXU5BEG.mjs";
|
|
150
150
|
import {
|
|
151
151
|
generateFarmDocsAdapterClientRuntime,
|
|
152
152
|
getFarmDocsAdapterConfigModule
|
|
@@ -247,11 +247,11 @@ import {
|
|
|
247
247
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
248
248
|
import {
|
|
249
249
|
APIRouteManager
|
|
250
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-SPKZCFPH.mjs";
|
|
251
251
|
import {
|
|
252
252
|
hasPolyroutePlugin,
|
|
253
253
|
isFarmAPIRouteFileName
|
|
254
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-GTHBWZUK.mjs";
|
|
255
255
|
import {
|
|
256
256
|
getFarmI18nClientSnapshot
|
|
257
257
|
} from "./chunk-O7JEFGUV.mjs";
|
|
@@ -314,7 +314,7 @@ import {
|
|
|
314
314
|
} from "./chunk-EILUVBKS.mjs";
|
|
315
315
|
import {
|
|
316
316
|
FARM_VERSION
|
|
317
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-EBKYRP2P.mjs";
|
|
318
318
|
import {
|
|
319
319
|
DEFAULT_FARM_API_BASE_PATH
|
|
320
320
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -1287,13 +1287,13 @@ function loadFarmDocsSearchDevRuntime() {
|
|
|
1287
1287
|
return import("./search-client-GIXIEU75.mjs");
|
|
1288
1288
|
}
|
|
1289
1289
|
function loadFarmOpenAPIDevRuntime() {
|
|
1290
|
-
return import("./manager-
|
|
1290
|
+
return import("./manager-7BNSJKME.mjs");
|
|
1291
1291
|
}
|
|
1292
1292
|
function loadFarmWorkflowsDevRuntime() {
|
|
1293
1293
|
return import("./workflows.mjs");
|
|
1294
1294
|
}
|
|
1295
1295
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1296
|
-
return import("./devtools-
|
|
1296
|
+
return import("./devtools-5DBTT2DI.mjs");
|
|
1297
1297
|
}
|
|
1298
1298
|
function loadFarmDevtoolsUIRuntime() {
|
|
1299
1299
|
return import("./devtools-ui-BOG33MT5.mjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkM3JYBZO2cjs = require('./chunk-M3JYBZO2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
@@ -64,7 +64,7 @@ function findFarmNativeScreenFiles(appDirs) {
|
|
|
64
64
|
}
|
|
65
65
|
function collectFarmNativeServerFns(options) {
|
|
66
66
|
const { root, srcDir } = options;
|
|
67
|
-
const aliases =
|
|
67
|
+
const aliases = _chunkM3JYBZO2cjs.readAliases.call(void 0, root, srcDir);
|
|
68
68
|
const seen = /* @__PURE__ */ new Set();
|
|
69
69
|
const found = /* @__PURE__ */ new Map();
|
|
70
70
|
const queue = [...options.entries];
|
|
@@ -98,7 +98,7 @@ function collectFarmNativeServerFns(options) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
|
|
101
|
-
const resolved =
|
|
101
|
+
const resolved = _chunkM3JYBZO2cjs.resolveFile.call(void 0, candidate);
|
|
102
102
|
if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
|
|
103
103
|
queue.push(resolved);
|
|
104
104
|
break;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFLKG2PYHcjs = require('./chunk-FLKG2PYH.cjs');
|
|
4
4
|
require('./chunk-OZC2JPW6.cjs');
|
|
5
5
|
require('./chunk-L2GUEYHR.cjs');
|
|
6
6
|
require('./chunk-IIHZ2BEE.cjs');
|
|
@@ -357,7 +357,7 @@ async function createFarmDevtoolsSnapshot(input) {
|
|
|
357
357
|
}));
|
|
358
358
|
const deploymentPreset = String(_optionalChain([config, 'access', _13 => _13.deploy, 'optionalAccess', _14 => _14.preset]) || config.preset || "node-server");
|
|
359
359
|
const deploymentTarget = String(
|
|
360
|
-
_optionalChain([config, 'access', _15 => _15.deploy, 'optionalAccess', _16 => _16.target]) ||
|
|
360
|
+
_optionalChain([config, 'access', _15 => _15.deploy, 'optionalAccess', _16 => _16.target]) || _chunkFLKG2PYHcjs.getDeployTargetForPreset.call(void 0, deploymentPreset) || "node"
|
|
361
361
|
);
|
|
362
362
|
const env = input.env || process.env;
|
|
363
363
|
const servesPages = !_chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, config.renderer);
|