vite 7.3.6 → 7.3.7
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/node/chunks/config.js +637 -466
- package/package.json +2 -2
|
@@ -84,16 +84,16 @@ const postfixRE = /[?#].*$/;
|
|
|
84
84
|
function cleanUrl(url$3) {
|
|
85
85
|
return url$3.replace(postfixRE, "");
|
|
86
86
|
}
|
|
87
|
-
function splitFileAndPostfix(path$
|
|
88
|
-
const file = cleanUrl(path$
|
|
87
|
+
function splitFileAndPostfix(path$14) {
|
|
88
|
+
const file = cleanUrl(path$14);
|
|
89
89
|
return {
|
|
90
90
|
file,
|
|
91
|
-
postfix: path$
|
|
91
|
+
postfix: path$14.slice(file.length)
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function withTrailingSlash(path$
|
|
95
|
-
if (path$
|
|
96
|
-
return path$
|
|
94
|
+
function withTrailingSlash(path$14) {
|
|
95
|
+
if (path$14[path$14.length - 1] !== "/") return `${path$14}/`;
|
|
96
|
+
return path$14;
|
|
97
97
|
}
|
|
98
98
|
function promiseWithResolvers() {
|
|
99
99
|
let resolve$4;
|
|
@@ -381,16 +381,16 @@ function parseAbsoluteUrl(input) {
|
|
|
381
381
|
}
|
|
382
382
|
function parseFileUrl(input) {
|
|
383
383
|
const match = fileRegex.exec(input);
|
|
384
|
-
const path$
|
|
385
|
-
return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path$
|
|
384
|
+
const path$14 = match[2];
|
|
385
|
+
return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path$14) ? path$14 : "/" + path$14, match[3] || "", match[4] || "");
|
|
386
386
|
}
|
|
387
|
-
function makeUrl(scheme, user, host, port, path$
|
|
387
|
+
function makeUrl(scheme, user, host, port, path$14, query, hash$1) {
|
|
388
388
|
return {
|
|
389
389
|
scheme,
|
|
390
390
|
user,
|
|
391
391
|
host,
|
|
392
392
|
port,
|
|
393
|
-
path: path$
|
|
393
|
+
path: path$14,
|
|
394
394
|
query,
|
|
395
395
|
hash: hash$1,
|
|
396
396
|
type: 7
|
|
@@ -418,10 +418,10 @@ function parseUrl$3(input) {
|
|
|
418
418
|
url$3.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
|
|
419
419
|
return url$3;
|
|
420
420
|
}
|
|
421
|
-
function stripPathFilename(path$
|
|
422
|
-
if (path$
|
|
423
|
-
const index = path$
|
|
424
|
-
return path$
|
|
421
|
+
function stripPathFilename(path$14) {
|
|
422
|
+
if (path$14.endsWith("/..")) return path$14;
|
|
423
|
+
const index = path$14.lastIndexOf("/");
|
|
424
|
+
return path$14.slice(0, index + 1);
|
|
425
425
|
}
|
|
426
426
|
function mergePaths(url$3, base) {
|
|
427
427
|
normalizePath$4(base, base.type);
|
|
@@ -457,10 +457,10 @@ function normalizePath$4(url$3, type) {
|
|
|
457
457
|
pieces[pointer++] = piece;
|
|
458
458
|
positive++;
|
|
459
459
|
}
|
|
460
|
-
let path$
|
|
461
|
-
for (let i$1 = 1; i$1 < pointer; i$1++) path$
|
|
462
|
-
if (!path$
|
|
463
|
-
url$3.path = path$
|
|
460
|
+
let path$14 = "";
|
|
461
|
+
for (let i$1 = 1; i$1 < pointer; i$1++) path$14 += "/" + pieces[i$1];
|
|
462
|
+
if (!path$14 || addTrailingSlash && !path$14.endsWith("/..")) path$14 += "/";
|
|
463
|
+
url$3.path = path$14;
|
|
464
464
|
}
|
|
465
465
|
/**
|
|
466
466
|
* Attempts to resolve `input` URL/path relative to `base`.
|
|
@@ -491,10 +491,10 @@ function resolve$3(input, base) {
|
|
|
491
491
|
case 2:
|
|
492
492
|
case 3: return queryHash;
|
|
493
493
|
case 4: {
|
|
494
|
-
const path$
|
|
495
|
-
if (!path$
|
|
496
|
-
if (isRelative(base || input) && !isRelative(path$
|
|
497
|
-
return path$
|
|
494
|
+
const path$14 = url$3.path.slice(1);
|
|
495
|
+
if (!path$14) return queryHash || ".";
|
|
496
|
+
if (isRelative(base || input) && !isRelative(path$14)) return "./" + path$14 + queryHash;
|
|
497
|
+
return path$14 + queryHash;
|
|
498
498
|
}
|
|
499
499
|
case 5: return url$3.path + queryHash;
|
|
500
500
|
default: return url$3.scheme + "//" + url$3.user + url$3.host + url$3.port + url$3.path + queryHash;
|
|
@@ -503,10 +503,10 @@ function resolve$3(input, base) {
|
|
|
503
503
|
|
|
504
504
|
//#endregion
|
|
505
505
|
//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
506
|
-
function stripFilename(path$
|
|
507
|
-
if (!path$
|
|
508
|
-
const index = path$
|
|
509
|
-
return path$
|
|
506
|
+
function stripFilename(path$14) {
|
|
507
|
+
if (!path$14) return "";
|
|
508
|
+
const index = path$14.lastIndexOf("/");
|
|
509
|
+
return path$14.slice(0, index + 1);
|
|
510
510
|
}
|
|
511
511
|
function resolver(mapUrl, sourceRoot) {
|
|
512
512
|
const from = stripFilename(mapUrl);
|
|
@@ -2202,8 +2202,8 @@ async function recursiveReaddir(dir) {
|
|
|
2202
2202
|
}
|
|
2203
2203
|
let safeRealpathSync = isWindows ? windowsSafeRealPathSync : fs.realpathSync.native;
|
|
2204
2204
|
const windowsNetworkMap = /* @__PURE__ */ new Map();
|
|
2205
|
-
function windowsMappedRealpathSync(path$
|
|
2206
|
-
const realPath = fs.realpathSync.native(path$
|
|
2205
|
+
function windowsMappedRealpathSync(path$14) {
|
|
2206
|
+
const realPath = fs.realpathSync.native(path$14);
|
|
2207
2207
|
if (realPath.startsWith("\\\\")) {
|
|
2208
2208
|
for (const [network, volume] of windowsNetworkMap) if (realPath.startsWith(network)) return realPath.replace(network, volume);
|
|
2209
2209
|
}
|
|
@@ -2211,12 +2211,12 @@ function windowsMappedRealpathSync(path$13) {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
const parseNetUseRE = /^\w* +(\w:) +([^ ]+)\s/;
|
|
2213
2213
|
let firstSafeRealPathSyncRun = false;
|
|
2214
|
-
function windowsSafeRealPathSync(path$
|
|
2214
|
+
function windowsSafeRealPathSync(path$14) {
|
|
2215
2215
|
if (!firstSafeRealPathSyncRun) {
|
|
2216
2216
|
optimizeSafeRealPathSync();
|
|
2217
2217
|
firstSafeRealPathSyncRun = true;
|
|
2218
2218
|
}
|
|
2219
|
-
return fs.realpathSync(path$
|
|
2219
|
+
return fs.realpathSync(path$14);
|
|
2220
2220
|
}
|
|
2221
2221
|
function optimizeSafeRealPathSync() {
|
|
2222
2222
|
try {
|
|
@@ -2287,16 +2287,16 @@ function processSrcSetSync(srcs, replacer) {
|
|
|
2287
2287
|
const windowsDriveRE$1 = /^[A-Z]:/;
|
|
2288
2288
|
const replaceWindowsDriveRE = /^([A-Z]):\//;
|
|
2289
2289
|
const linuxAbsolutePathRE = /^\/[^/]/;
|
|
2290
|
-
function escapeToLinuxLikePath(path$
|
|
2291
|
-
if (windowsDriveRE$1.test(path$
|
|
2292
|
-
if (linuxAbsolutePathRE.test(path$
|
|
2293
|
-
return path$
|
|
2290
|
+
function escapeToLinuxLikePath(path$14) {
|
|
2291
|
+
if (windowsDriveRE$1.test(path$14)) return path$14.replace(replaceWindowsDriveRE, "/windows/$1/");
|
|
2292
|
+
if (linuxAbsolutePathRE.test(path$14)) return `/linux${path$14}`;
|
|
2293
|
+
return path$14;
|
|
2294
2294
|
}
|
|
2295
2295
|
const revertWindowsDriveRE = /^\/windows\/([A-Z])\//;
|
|
2296
|
-
function unescapeToLinuxLikePath(path$
|
|
2297
|
-
if (path$
|
|
2298
|
-
if (path$
|
|
2299
|
-
return path$
|
|
2296
|
+
function unescapeToLinuxLikePath(path$14) {
|
|
2297
|
+
if (path$14.startsWith("/linux/")) return path$14.slice(6);
|
|
2298
|
+
if (path$14.startsWith("/windows/")) return path$14.replace(revertWindowsDriveRE, "$1:/");
|
|
2299
|
+
return path$14;
|
|
2300
2300
|
}
|
|
2301
2301
|
const nullSourceMap = {
|
|
2302
2302
|
names: [],
|
|
@@ -2615,10 +2615,10 @@ function joinUrlSegments(a, b) {
|
|
|
2615
2615
|
function removeLeadingSlash(str) {
|
|
2616
2616
|
return str[0] === "/" ? str.slice(1) : str;
|
|
2617
2617
|
}
|
|
2618
|
-
function stripBase(path$
|
|
2619
|
-
if (path$
|
|
2618
|
+
function stripBase(path$14, base) {
|
|
2619
|
+
if (path$14 === base) return "/";
|
|
2620
2620
|
const devBase = withTrailingSlash(base);
|
|
2621
|
-
return path$
|
|
2621
|
+
return path$14.startsWith(devBase) ? path$14.slice(devBase.length - 1) : path$14;
|
|
2622
2622
|
}
|
|
2623
2623
|
function arrayEqual(a, b) {
|
|
2624
2624
|
if (a === b) return true;
|
|
@@ -2783,10 +2783,10 @@ function perEnvironmentPlugin(name, applyToEnvironment) {
|
|
|
2783
2783
|
//#endregion
|
|
2784
2784
|
//#region ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
|
|
2785
2785
|
var require_commondir = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2786
|
-
var path$
|
|
2786
|
+
var path$13 = __require("path");
|
|
2787
2787
|
module.exports = function(basedir, relfiles) {
|
|
2788
2788
|
if (relfiles) var files = relfiles.map(function(r$1) {
|
|
2789
|
-
return path$
|
|
2789
|
+
return path$13.resolve(basedir, r$1);
|
|
2790
2790
|
});
|
|
2791
2791
|
else var files = basedir;
|
|
2792
2792
|
var res = files.slice(1).reduce(function(ps, file) {
|
|
@@ -3832,10 +3832,10 @@ function getName(id) {
|
|
|
3832
3832
|
if (name !== "index") return name;
|
|
3833
3833
|
return makeLegalIdentifier(basename$1(dirname$1(id)));
|
|
3834
3834
|
}
|
|
3835
|
-
function normalizePathSlashes(path$
|
|
3836
|
-
return path$
|
|
3835
|
+
function normalizePathSlashes(path$14) {
|
|
3836
|
+
return path$14.replace(/\\/g, "/");
|
|
3837
3837
|
}
|
|
3838
|
-
const getVirtualPathForDynamicRequirePath = (path$
|
|
3838
|
+
const getVirtualPathForDynamicRequirePath = (path$14, commonDir) => `/${normalizePathSlashes(relative$1(commonDir, path$14))}`;
|
|
3839
3839
|
function capitalize(name) {
|
|
3840
3840
|
return name[0].toUpperCase() + name.slice(1);
|
|
3841
3841
|
}
|
|
@@ -3871,9 +3871,9 @@ function getPackageEntryPoint(dirPath) {
|
|
|
3871
3871
|
} catch (ignored) {}
|
|
3872
3872
|
return entryPoint;
|
|
3873
3873
|
}
|
|
3874
|
-
function isDirectory$1(path$
|
|
3874
|
+
function isDirectory$1(path$14) {
|
|
3875
3875
|
try {
|
|
3876
|
-
if (statSync(path$
|
|
3876
|
+
if (statSync(path$14).isDirectory()) return true;
|
|
3877
3877
|
} catch (ignored) {}
|
|
3878
3878
|
return false;
|
|
3879
3879
|
}
|
|
@@ -3883,12 +3883,12 @@ function getDynamicRequireModules(patterns, dynamicRequireRoot) {
|
|
|
3883
3883
|
for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {
|
|
3884
3884
|
const isNegated = pattern.startsWith("!");
|
|
3885
3885
|
const modifyMap = (targetPath, resolvedPath) => isNegated ? dynamicRequireModules.delete(targetPath) : dynamicRequireModules.set(targetPath, resolvedPath);
|
|
3886
|
-
for (const path$
|
|
3887
|
-
const resolvedPath = resolve$1(path$
|
|
3886
|
+
for (const path$14 of new fdir().withBasePath().withDirs().glob(isNegated ? pattern.substr(1) : pattern).crawl(relative$1(".", dynamicRequireRoot)).sync().sort((a, b) => a.localeCompare(b, "en"))) {
|
|
3887
|
+
const resolvedPath = resolve$1(path$14);
|
|
3888
3888
|
const requirePath = normalizePathSlashes(resolvedPath);
|
|
3889
3889
|
if (isDirectory$1(resolvedPath)) {
|
|
3890
3890
|
dirNames.add(resolvedPath);
|
|
3891
|
-
const modulePath = resolve$1(join$1(resolvedPath, getPackageEntryPoint(path$
|
|
3891
|
+
const modulePath = resolve$1(join$1(resolvedPath, getPackageEntryPoint(path$14)));
|
|
3892
3892
|
modifyMap(requirePath, modulePath);
|
|
3893
3893
|
modifyMap(normalizePathSlashes(modulePath), modulePath);
|
|
3894
3894
|
} else {
|
|
@@ -6025,8 +6025,8 @@ var TSConfckCache = class {
|
|
|
6025
6025
|
setConfigPath(dir, configPath, configName = "tsconfig.json") {
|
|
6026
6026
|
const key = `${dir}/${configName}`;
|
|
6027
6027
|
this.#configPaths.set(key, configPath);
|
|
6028
|
-
configPath.then((path$
|
|
6029
|
-
if (this.#configPaths.get(key) === configPath) this.#configPaths.set(key, path$
|
|
6028
|
+
configPath.then((path$14) => {
|
|
6029
|
+
if (this.#configPaths.get(key) === configPath) this.#configPaths.set(key, path$14);
|
|
6030
6030
|
}).catch((e$1) => {
|
|
6031
6031
|
if (this.#configPaths.get(key) === configPath) this.#configPaths.set(key, e$1);
|
|
6032
6032
|
});
|
|
@@ -6873,8 +6873,8 @@ codes$1.ERR_INVALID_PACKAGE_CONFIG = createError(
|
|
|
6873
6873
|
* @param {string} [base]
|
|
6874
6874
|
* @param {string} [message]
|
|
6875
6875
|
*/
|
|
6876
|
-
(path$
|
|
6877
|
-
return `Invalid package config ${path$
|
|
6876
|
+
(path$14, base, message) => {
|
|
6877
|
+
return `Invalid package config ${path$14}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
6878
6878
|
},
|
|
6879
6879
|
Error
|
|
6880
6880
|
);
|
|
@@ -6904,8 +6904,8 @@ codes$1.ERR_MODULE_NOT_FOUND = createError(
|
|
|
6904
6904
|
* @param {string} base
|
|
6905
6905
|
* @param {boolean} [exactUrl]
|
|
6906
6906
|
*/
|
|
6907
|
-
(path$
|
|
6908
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path$
|
|
6907
|
+
(path$14, base, exactUrl = false) => {
|
|
6908
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path$14}' imported from ${base}`;
|
|
6909
6909
|
},
|
|
6910
6910
|
Error
|
|
6911
6911
|
);
|
|
@@ -6943,8 +6943,8 @@ codes$1.ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
|
6943
6943
|
* @param {string} extension
|
|
6944
6944
|
* @param {string} path
|
|
6945
6945
|
*/
|
|
6946
|
-
(extension$1, path$
|
|
6947
|
-
return `Unknown file extension "${extension$1}" for ${path$
|
|
6946
|
+
(extension$1, path$14) => {
|
|
6947
|
+
return `Unknown file extension "${extension$1}" for ${path$14}`;
|
|
6948
6948
|
},
|
|
6949
6949
|
TypeError
|
|
6950
6950
|
);
|
|
@@ -7242,7 +7242,7 @@ const init = WebAssembly.compile(E()).then(WebAssembly.instantiate).then((({ exp
|
|
|
7242
7242
|
//#endregion
|
|
7243
7243
|
//#region ../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js
|
|
7244
7244
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7245
|
-
const path$
|
|
7245
|
+
const path$12 = __require("path");
|
|
7246
7246
|
const fs$11 = __require("fs");
|
|
7247
7247
|
const os$4 = __require("os");
|
|
7248
7248
|
const url$2 = __require("url");
|
|
@@ -7275,7 +7275,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7275
7275
|
* And on Windows, this will never happen. ('C:\build' -> 'C:')
|
|
7276
7276
|
*/
|
|
7277
7277
|
function parentDir(p) {
|
|
7278
|
-
return path$
|
|
7278
|
+
return path$12.dirname(p) || path$12.sep;
|
|
7279
7279
|
}
|
|
7280
7280
|
/** @type {import('./index').LoaderSync} */
|
|
7281
7281
|
const jsonLoader = (_, content) => JSON.parse(content);
|
|
@@ -7332,7 +7332,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7332
7332
|
}
|
|
7333
7333
|
};
|
|
7334
7334
|
conf.searchPlaces.forEach((place) => {
|
|
7335
|
-
const key = path$
|
|
7335
|
+
const key = path$12.extname(place) || "noExt";
|
|
7336
7336
|
const loader$1 = conf.loaders[key];
|
|
7337
7337
|
if (!loader$1) throw new Error(`Missing loader for extension "${place}"`);
|
|
7338
7338
|
if (typeof loader$1 !== "function") throw new Error(`Loader for extension "${place}" is not a function: Received ${typeof loader$1}.`);
|
|
@@ -7384,14 +7384,14 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7384
7384
|
visited.add(dir);
|
|
7385
7385
|
}
|
|
7386
7386
|
for (const searchPlace of searchPlaces) {
|
|
7387
|
-
const filepath = path$
|
|
7387
|
+
const filepath = path$12.join(dir, searchPlace);
|
|
7388
7388
|
try {
|
|
7389
7389
|
await fs$11.promises.access(filepath);
|
|
7390
7390
|
} catch {
|
|
7391
7391
|
continue;
|
|
7392
7392
|
}
|
|
7393
7393
|
const content = String(await fsReadFileAsync(filepath));
|
|
7394
|
-
const loaderKey = path$
|
|
7394
|
+
const loaderKey = path$12.extname(searchPlace) || "noExt";
|
|
7395
7395
|
const loader$1 = loaders[loaderKey];
|
|
7396
7396
|
if (searchPlace === "package.json") {
|
|
7397
7397
|
const maybeConfig = getPackageProp(packageProp, await loader$1(filepath, content));
|
|
@@ -7423,9 +7423,9 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7423
7423
|
},
|
|
7424
7424
|
async load(filepath) {
|
|
7425
7425
|
validateFilePath(filepath);
|
|
7426
|
-
const absPath = path$
|
|
7426
|
+
const absPath = path$12.resolve(process.cwd(), filepath);
|
|
7427
7427
|
if (cache$1 && loadCache.has(absPath)) return loadCache.get(absPath);
|
|
7428
|
-
const { base, ext } = path$
|
|
7428
|
+
const { base, ext } = path$12.parse(absPath);
|
|
7429
7429
|
const loaderKey = ext || "noExt";
|
|
7430
7430
|
const loader$1 = loaders[loaderKey];
|
|
7431
7431
|
validateLoader(loader$1, loaderKey);
|
|
@@ -7492,13 +7492,13 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7492
7492
|
visited.add(dir);
|
|
7493
7493
|
}
|
|
7494
7494
|
for (const searchPlace of searchPlaces) {
|
|
7495
|
-
const filepath = path$
|
|
7495
|
+
const filepath = path$12.join(dir, searchPlace);
|
|
7496
7496
|
try {
|
|
7497
7497
|
fs$11.accessSync(filepath);
|
|
7498
7498
|
} catch {
|
|
7499
7499
|
continue;
|
|
7500
7500
|
}
|
|
7501
|
-
const loaderKey = path$
|
|
7501
|
+
const loaderKey = path$12.extname(searchPlace) || "noExt";
|
|
7502
7502
|
const loader$1 = loaders[loaderKey];
|
|
7503
7503
|
const content = String(fs$11.readFileSync(filepath));
|
|
7504
7504
|
if (searchPlace === "package.json") {
|
|
@@ -7531,9 +7531,9 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7531
7531
|
},
|
|
7532
7532
|
load(filepath) {
|
|
7533
7533
|
validateFilePath(filepath);
|
|
7534
|
-
const absPath = path$
|
|
7534
|
+
const absPath = path$12.resolve(process.cwd(), filepath);
|
|
7535
7535
|
if (cache$1 && loadCache.has(absPath)) return loadCache.get(absPath);
|
|
7536
|
-
const { base, ext } = path$
|
|
7536
|
+
const { base, ext } = path$12.parse(absPath);
|
|
7537
7537
|
const loaderKey = ext || "noExt";
|
|
7538
7538
|
const loader$1 = loaders[loaderKey];
|
|
7539
7539
|
validateLoader(loader$1, loaderKey);
|
|
@@ -7822,7 +7822,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7822
7822
|
*
|
|
7823
7823
|
* @return {Promise} config PostCSS Config
|
|
7824
7824
|
*/
|
|
7825
|
-
function rc(ctx, path$
|
|
7825
|
+
function rc(ctx, path$14, options$1) {
|
|
7826
7826
|
/**
|
|
7827
7827
|
* @type {Object} The full Config Context
|
|
7828
7828
|
*/
|
|
@@ -7830,9 +7830,9 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7830
7830
|
/**
|
|
7831
7831
|
* @type {String} `process.cwd()`
|
|
7832
7832
|
*/
|
|
7833
|
-
path$
|
|
7834
|
-
return config$1.lilconfig("postcss", withLoaders(options$1)).search(path$
|
|
7835
|
-
if (!result) throw new Error(`No PostCSS Config found in: ${path$
|
|
7833
|
+
path$14 = path$14 ? resolve$2(path$14) : process.cwd();
|
|
7834
|
+
return config$1.lilconfig("postcss", withLoaders(options$1)).search(path$14).then((result) => {
|
|
7835
|
+
if (!result) throw new Error(`No PostCSS Config found in: ${path$14}`);
|
|
7836
7836
|
return processResult(ctx, result);
|
|
7837
7837
|
});
|
|
7838
7838
|
}
|
|
@@ -9049,7 +9049,7 @@ var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9049
9049
|
//#region ../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js
|
|
9050
9050
|
var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9051
9051
|
const fs$10 = __require("fs");
|
|
9052
|
-
const path$
|
|
9052
|
+
const path$11 = __require("path");
|
|
9053
9053
|
const os$3 = __require("os");
|
|
9054
9054
|
const crypto$2 = __require("crypto");
|
|
9055
9055
|
const version = require_package().version;
|
|
@@ -9187,12 +9187,12 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9187
9187
|
if (options$1 && options$1.path && options$1.path.length > 0) if (Array.isArray(options$1.path)) {
|
|
9188
9188
|
for (const filepath of options$1.path) if (fs$10.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
9189
9189
|
} else possibleVaultPath = options$1.path.endsWith(".vault") ? options$1.path : `${options$1.path}.vault`;
|
|
9190
|
-
else possibleVaultPath = path$
|
|
9190
|
+
else possibleVaultPath = path$11.resolve(process.cwd(), ".env.vault");
|
|
9191
9191
|
if (fs$10.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
9192
9192
|
return null;
|
|
9193
9193
|
}
|
|
9194
9194
|
function _resolveHome(envPath) {
|
|
9195
|
-
return envPath[0] === "~" ? path$
|
|
9195
|
+
return envPath[0] === "~" ? path$11.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
9196
9196
|
}
|
|
9197
9197
|
function _configVault(options$1) {
|
|
9198
9198
|
const debug$18 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug);
|
|
@@ -9205,7 +9205,7 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9205
9205
|
return { parsed };
|
|
9206
9206
|
}
|
|
9207
9207
|
function configDotenv(options$1) {
|
|
9208
|
-
const dotenvPath = path$
|
|
9208
|
+
const dotenvPath = path$11.resolve(process.cwd(), ".env");
|
|
9209
9209
|
let encoding = "utf8";
|
|
9210
9210
|
let processEnv = process.env;
|
|
9211
9211
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
|
@@ -9221,11 +9221,11 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9221
9221
|
}
|
|
9222
9222
|
let lastError;
|
|
9223
9223
|
const parsedAll = {};
|
|
9224
|
-
for (const path$
|
|
9225
|
-
const parsed = DotenvModule.parse(fs$10.readFileSync(path$
|
|
9224
|
+
for (const path$14 of optionPaths) try {
|
|
9225
|
+
const parsed = DotenvModule.parse(fs$10.readFileSync(path$14, { encoding }));
|
|
9226
9226
|
DotenvModule.populate(parsedAll, parsed, options$1);
|
|
9227
9227
|
} catch (e$1) {
|
|
9228
|
-
if (debug$18) _debug(`Failed to load ${path$
|
|
9228
|
+
if (debug$18) _debug(`Failed to load ${path$14} ${e$1.message}`);
|
|
9229
9229
|
lastError = e$1;
|
|
9230
9230
|
}
|
|
9231
9231
|
const populated = DotenvModule.populate(processEnv, parsedAll, options$1);
|
|
@@ -9235,7 +9235,7 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9235
9235
|
const keysCount = Object.keys(populated).length;
|
|
9236
9236
|
const shortPaths = [];
|
|
9237
9237
|
for (const filePath of optionPaths) try {
|
|
9238
|
-
const relative$3 = path$
|
|
9238
|
+
const relative$3 = path$11.relative(process.cwd(), filePath);
|
|
9239
9239
|
shortPaths.push(relative$3);
|
|
9240
9240
|
} catch (e$1) {
|
|
9241
9241
|
if (debug$18) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
|
@@ -10506,23 +10506,23 @@ var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10506
10506
|
*/
|
|
10507
10507
|
proto.use = function use(route, fn) {
|
|
10508
10508
|
var handle = fn;
|
|
10509
|
-
var path$
|
|
10509
|
+
var path$14 = route;
|
|
10510
10510
|
if (typeof route !== "string") {
|
|
10511
10511
|
handle = route;
|
|
10512
|
-
path$
|
|
10512
|
+
path$14 = "/";
|
|
10513
10513
|
}
|
|
10514
10514
|
if (typeof handle.handle === "function") {
|
|
10515
10515
|
var server = handle;
|
|
10516
|
-
server.route = path$
|
|
10516
|
+
server.route = path$14;
|
|
10517
10517
|
handle = function(req$4, res, next) {
|
|
10518
10518
|
server.handle(req$4, res, next);
|
|
10519
10519
|
};
|
|
10520
10520
|
}
|
|
10521
10521
|
if (handle instanceof http$6.Server) handle = handle.listeners("request")[0];
|
|
10522
|
-
if (path$
|
|
10523
|
-
debug$12("use %s %s", path$
|
|
10522
|
+
if (path$14[path$14.length - 1] === "/") path$14 = path$14.slice(0, -1);
|
|
10523
|
+
debug$12("use %s %s", path$14 || "/", handle.name || "anonymous");
|
|
10524
10524
|
this.stack.push({
|
|
10525
|
-
route: path$
|
|
10525
|
+
route: path$14,
|
|
10526
10526
|
handle
|
|
10527
10527
|
});
|
|
10528
10528
|
return this;
|
|
@@ -10558,10 +10558,10 @@ var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10558
10558
|
defer(done, err$2);
|
|
10559
10559
|
return;
|
|
10560
10560
|
}
|
|
10561
|
-
var path$
|
|
10561
|
+
var path$14 = parseUrl$1(req$4).pathname || "/";
|
|
10562
10562
|
var route = layer.route;
|
|
10563
|
-
if (path$
|
|
10564
|
-
var c = path$
|
|
10563
|
+
if (path$14.toLowerCase().substr(0, route.length) !== route.toLowerCase()) return next(err$2);
|
|
10564
|
+
var c = path$14.length > route.length && path$14[route.length];
|
|
10565
10565
|
if (c && c !== "/" && c !== ".") return next(err$2);
|
|
10566
10566
|
if (route.length !== 0 && route !== "/") {
|
|
10567
10567
|
removed = route;
|
|
@@ -11025,8 +11025,8 @@ var require_readdirp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11025
11025
|
static get defaultOptions() {
|
|
11026
11026
|
return {
|
|
11027
11027
|
root: ".",
|
|
11028
|
-
fileFilter: (path$
|
|
11029
|
-
directoryFilter: (path$
|
|
11028
|
+
fileFilter: (path$14) => true,
|
|
11029
|
+
directoryFilter: (path$14) => true,
|
|
11030
11030
|
type: FILE_TYPE,
|
|
11031
11031
|
lstat: false,
|
|
11032
11032
|
depth: 2147483648,
|
|
@@ -11047,7 +11047,7 @@ var require_readdirp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11047
11047
|
this._fileFilter = normalizeFilter$1(opts.fileFilter);
|
|
11048
11048
|
this._directoryFilter = normalizeFilter$1(opts.directoryFilter);
|
|
11049
11049
|
const statMethod = opts.lstat ? lstat$2 : stat$3;
|
|
11050
|
-
if (wantBigintFsStats) this._stat = (path$
|
|
11050
|
+
if (wantBigintFsStats) this._stat = (path$14) => statMethod(path$14, { bigint: true });
|
|
11051
11051
|
else this._stat = statMethod;
|
|
11052
11052
|
this._maxDepth = opts.depth;
|
|
11053
11053
|
this._wantsDir = [
|
|
@@ -11077,9 +11077,9 @@ var require_readdirp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11077
11077
|
this.reading = true;
|
|
11078
11078
|
try {
|
|
11079
11079
|
while (!this.destroyed && batch > 0) {
|
|
11080
|
-
const { path: path$
|
|
11080
|
+
const { path: path$14, depth, files = [] } = this.parent || {};
|
|
11081
11081
|
if (files.length > 0) {
|
|
11082
|
-
const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent, path$
|
|
11082
|
+
const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent, path$14));
|
|
11083
11083
|
for (const entry of await Promise.all(slice)) {
|
|
11084
11084
|
if (this.destroyed) return;
|
|
11085
11085
|
const entryType = await this._getEntryType(entry);
|
|
@@ -11112,24 +11112,24 @@ var require_readdirp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11112
11112
|
this.reading = false;
|
|
11113
11113
|
}
|
|
11114
11114
|
}
|
|
11115
|
-
async _exploreDir(path$
|
|
11115
|
+
async _exploreDir(path$14, depth) {
|
|
11116
11116
|
let files;
|
|
11117
11117
|
try {
|
|
11118
|
-
files = await readdir$1(path$
|
|
11118
|
+
files = await readdir$1(path$14, this._rdOptions);
|
|
11119
11119
|
} catch (error$1) {
|
|
11120
11120
|
this._onError(error$1);
|
|
11121
11121
|
}
|
|
11122
11122
|
return {
|
|
11123
11123
|
files,
|
|
11124
11124
|
depth,
|
|
11125
|
-
path: path$
|
|
11125
|
+
path: path$14
|
|
11126
11126
|
};
|
|
11127
11127
|
}
|
|
11128
|
-
async _formatEntry(dirent, path$
|
|
11128
|
+
async _formatEntry(dirent, path$14) {
|
|
11129
11129
|
let entry;
|
|
11130
11130
|
try {
|
|
11131
11131
|
const basename$3 = this._isDirent ? dirent.name : dirent;
|
|
11132
|
-
const fullPath = sysPath$3.resolve(sysPath$3.join(path$
|
|
11132
|
+
const fullPath = sysPath$3.resolve(sysPath$3.join(path$14, basename$3));
|
|
11133
11133
|
entry = {
|
|
11134
11134
|
path: sysPath$3.relative(this._root, fullPath),
|
|
11135
11135
|
fullPath,
|
|
@@ -11221,20 +11221,20 @@ var require_normalize_path = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
11221
11221
|
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
11222
11222
|
* Released under the MIT License.
|
|
11223
11223
|
*/
|
|
11224
|
-
module.exports = function(path$
|
|
11225
|
-
if (typeof path$
|
|
11226
|
-
if (path$
|
|
11227
|
-
var len = path$
|
|
11228
|
-
if (len <= 1) return path$
|
|
11224
|
+
module.exports = function(path$14, stripTrailing) {
|
|
11225
|
+
if (typeof path$14 !== "string") throw new TypeError("expected path to be a string");
|
|
11226
|
+
if (path$14 === "\\" || path$14 === "/") return "/";
|
|
11227
|
+
var len = path$14.length;
|
|
11228
|
+
if (len <= 1) return path$14;
|
|
11229
11229
|
var prefix = "";
|
|
11230
|
-
if (len > 4 && path$
|
|
11231
|
-
var ch = path$
|
|
11232
|
-
if ((ch === "?" || ch === ".") && path$
|
|
11233
|
-
path$
|
|
11230
|
+
if (len > 4 && path$14[3] === "\\") {
|
|
11231
|
+
var ch = path$14[2];
|
|
11232
|
+
if ((ch === "?" || ch === ".") && path$14.slice(0, 2) === "\\\\") {
|
|
11233
|
+
path$14 = path$14.slice(2);
|
|
11234
11234
|
prefix = "//";
|
|
11235
11235
|
}
|
|
11236
11236
|
}
|
|
11237
|
-
var segs = path$
|
|
11237
|
+
var segs = path$14.split(/[/\\]+/);
|
|
11238
11238
|
if (stripTrailing !== false && segs[segs.length - 1] === "") segs.pop();
|
|
11239
11239
|
return prefix + segs.join("/");
|
|
11240
11240
|
};
|
|
@@ -11279,15 +11279,15 @@ var require_anymatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11279
11279
|
const isList = Array.isArray(args);
|
|
11280
11280
|
const _path = isList ? args[0] : args;
|
|
11281
11281
|
if (!isList && typeof _path !== "string") throw new TypeError("anymatch: second argument must be a string: got " + Object.prototype.toString.call(_path));
|
|
11282
|
-
const path$
|
|
11282
|
+
const path$14 = normalizePath$2(_path, false);
|
|
11283
11283
|
for (let index = 0; index < negPatterns.length; index++) {
|
|
11284
11284
|
const nglob = negPatterns[index];
|
|
11285
|
-
if (nglob(path$
|
|
11285
|
+
if (nglob(path$14)) return returnIndex ? -1 : false;
|
|
11286
11286
|
}
|
|
11287
|
-
const applied = isList && [path$
|
|
11287
|
+
const applied = isList && [path$14].concat(args.slice(1));
|
|
11288
11288
|
for (let index = 0; index < patterns.length; index++) {
|
|
11289
11289
|
const pattern = patterns[index];
|
|
11290
|
-
if (isList ? pattern(...applied) : pattern(path$
|
|
11290
|
+
if (isList ? pattern(...applied) : pattern(path$14)) return returnIndex ? index : true;
|
|
11291
11291
|
}
|
|
11292
11292
|
return returnIndex ? -1 : false;
|
|
11293
11293
|
};
|
|
@@ -12815,10 +12815,10 @@ var require_binary_extensions = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
12815
12815
|
//#endregion
|
|
12816
12816
|
//#region ../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js
|
|
12817
12817
|
var require_is_binary_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12818
|
-
const path$
|
|
12818
|
+
const path$10 = __require("path");
|
|
12819
12819
|
const binaryExtensions = require_binary_extensions();
|
|
12820
12820
|
const extensions = new Set(binaryExtensions);
|
|
12821
|
-
module.exports = (filePath) => extensions.has(path$
|
|
12821
|
+
module.exports = (filePath) => extensions.has(path$10.extname(filePath).slice(1).toLowerCase());
|
|
12822
12822
|
}));
|
|
12823
12823
|
|
|
12824
12824
|
//#endregion
|
|
@@ -12948,14 +12948,14 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
12948
12948
|
* @param {Function} emitRaw emits raw event data
|
|
12949
12949
|
* @returns {fs.FSWatcher} new fsevents instance
|
|
12950
12950
|
*/
|
|
12951
|
-
function createFsWatchInstance(path$
|
|
12951
|
+
function createFsWatchInstance(path$14, options$1, listener$1, errHandler, emitRaw) {
|
|
12952
12952
|
const handleEvent = (rawEvent, evPath) => {
|
|
12953
|
-
listener$1(path$
|
|
12954
|
-
emitRaw(rawEvent, evPath, { watchedPath: path$
|
|
12955
|
-
if (evPath && path$
|
|
12953
|
+
listener$1(path$14);
|
|
12954
|
+
emitRaw(rawEvent, evPath, { watchedPath: path$14 });
|
|
12955
|
+
if (evPath && path$14 !== evPath) fsWatchBroadcast(sysPath$2.resolve(path$14, evPath), KEY_LISTENERS, sysPath$2.join(path$14, evPath));
|
|
12956
12956
|
};
|
|
12957
12957
|
try {
|
|
12958
|
-
return fs$8.watch(path$
|
|
12958
|
+
return fs$8.watch(path$14, options$1, handleEvent);
|
|
12959
12959
|
} catch (error$1) {
|
|
12960
12960
|
errHandler(error$1);
|
|
12961
12961
|
}
|
|
@@ -12983,13 +12983,13 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
12983
12983
|
* @param {Object} options to be passed to fs_watch
|
|
12984
12984
|
* @param {Object} handlers container for event listener functions
|
|
12985
12985
|
*/
|
|
12986
|
-
const setFsWatchListener = (path$
|
|
12986
|
+
const setFsWatchListener = (path$14, fullPath, options$1, handlers) => {
|
|
12987
12987
|
const { listener: listener$1, errHandler, rawEmitter } = handlers;
|
|
12988
12988
|
let cont = FsWatchInstances.get(fullPath);
|
|
12989
12989
|
/** @type {fs.FSWatcher=} */
|
|
12990
12990
|
let watcher;
|
|
12991
12991
|
if (!options$1.persistent) {
|
|
12992
|
-
watcher = createFsWatchInstance(path$
|
|
12992
|
+
watcher = createFsWatchInstance(path$14, options$1, listener$1, errHandler, rawEmitter);
|
|
12993
12993
|
return watcher.close.bind(watcher);
|
|
12994
12994
|
}
|
|
12995
12995
|
if (cont) {
|
|
@@ -12997,13 +12997,13 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
12997
12997
|
addAndConvert(cont, KEY_ERR, errHandler);
|
|
12998
12998
|
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
12999
12999
|
} else {
|
|
13000
|
-
watcher = createFsWatchInstance(path$
|
|
13000
|
+
watcher = createFsWatchInstance(path$14, options$1, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
|
|
13001
13001
|
if (!watcher) return;
|
|
13002
13002
|
watcher.on(EV_ERROR$2, async (error$1) => {
|
|
13003
13003
|
const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
|
|
13004
13004
|
cont.watcherUnusable = true;
|
|
13005
13005
|
if (isWindows$3 && error$1.code === "EPERM") try {
|
|
13006
|
-
await close(await open$1(path$
|
|
13006
|
+
await close(await open$1(path$14, "r"));
|
|
13007
13007
|
broadcastErr(error$1);
|
|
13008
13008
|
} catch (err$2) {}
|
|
13009
13009
|
else broadcastErr(error$1);
|
|
@@ -13039,7 +13039,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13039
13039
|
* @param {Object} handlers container for event listener functions
|
|
13040
13040
|
* @returns {Function} closer
|
|
13041
13041
|
*/
|
|
13042
|
-
const setFsWatchFileListener = (path$
|
|
13042
|
+
const setFsWatchFileListener = (path$14, fullPath, options$1, handlers) => {
|
|
13043
13043
|
const { listener: listener$1, rawEmitter } = handlers;
|
|
13044
13044
|
let cont = FsWatchFileInstances.get(fullPath);
|
|
13045
13045
|
const copts = cont && cont.options;
|
|
@@ -13063,7 +13063,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13063
13063
|
});
|
|
13064
13064
|
});
|
|
13065
13065
|
const currmtime = curr.mtimeMs;
|
|
13066
|
-
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) foreach(cont.listeners, (listener$2) => listener$2(path$
|
|
13066
|
+
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) foreach(cont.listeners, (listener$2) => listener$2(path$14, curr));
|
|
13067
13067
|
})
|
|
13068
13068
|
};
|
|
13069
13069
|
FsWatchFileInstances.set(fullPath, cont);
|
|
@@ -13096,22 +13096,22 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13096
13096
|
* @param {Function} listener on fs change
|
|
13097
13097
|
* @returns {Function} closer for the watcher instance
|
|
13098
13098
|
*/
|
|
13099
|
-
_watchWithNodeFs(path$
|
|
13099
|
+
_watchWithNodeFs(path$14, listener$1) {
|
|
13100
13100
|
const opts = this.fsw.options;
|
|
13101
|
-
const directory = sysPath$2.dirname(path$
|
|
13102
|
-
const basename$3 = sysPath$2.basename(path$
|
|
13101
|
+
const directory = sysPath$2.dirname(path$14);
|
|
13102
|
+
const basename$3 = sysPath$2.basename(path$14);
|
|
13103
13103
|
this.fsw._getWatchedDir(directory).add(basename$3);
|
|
13104
|
-
const absolutePath = sysPath$2.resolve(path$
|
|
13104
|
+
const absolutePath = sysPath$2.resolve(path$14);
|
|
13105
13105
|
const options$1 = { persistent: opts.persistent };
|
|
13106
13106
|
if (!listener$1) listener$1 = EMPTY_FN$2;
|
|
13107
13107
|
let closer;
|
|
13108
13108
|
if (opts.usePolling) {
|
|
13109
13109
|
options$1.interval = opts.enableBinaryInterval && isBinaryPath(basename$3) ? opts.binaryInterval : opts.interval;
|
|
13110
|
-
closer = setFsWatchFileListener(path$
|
|
13110
|
+
closer = setFsWatchFileListener(path$14, absolutePath, options$1, {
|
|
13111
13111
|
listener: listener$1,
|
|
13112
13112
|
rawEmitter: this.fsw._emitRaw
|
|
13113
13113
|
});
|
|
13114
|
-
} else closer = setFsWatchListener(path$
|
|
13114
|
+
} else closer = setFsWatchListener(path$14, absolutePath, options$1, {
|
|
13115
13115
|
listener: listener$1,
|
|
13116
13116
|
errHandler: this._boundHandleError,
|
|
13117
13117
|
rawEmitter: this.fsw._emitRaw
|
|
@@ -13132,7 +13132,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13132
13132
|
const parent = this.fsw._getWatchedDir(dirname$3);
|
|
13133
13133
|
let prevStats = stats;
|
|
13134
13134
|
if (parent.has(basename$3)) return;
|
|
13135
|
-
const listener$1 = async (path$
|
|
13135
|
+
const listener$1 = async (path$14, newStats) => {
|
|
13136
13136
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
|
|
13137
13137
|
if (!newStats || newStats.mtimeMs === 0) try {
|
|
13138
13138
|
const newStats$1 = await stat$2(file);
|
|
@@ -13141,9 +13141,9 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13141
13141
|
const mt = newStats$1.mtimeMs;
|
|
13142
13142
|
if (!at || at <= mt || mt !== prevStats.mtimeMs) this.fsw._emit(EV_CHANGE$2, file, newStats$1);
|
|
13143
13143
|
if (isLinux && prevStats.ino !== newStats$1.ino) {
|
|
13144
|
-
this.fsw._closeFile(path$
|
|
13144
|
+
this.fsw._closeFile(path$14);
|
|
13145
13145
|
prevStats = newStats$1;
|
|
13146
|
-
this.fsw._addPathCloser(path$
|
|
13146
|
+
this.fsw._addPathCloser(path$14, this._watchWithNodeFs(file, listener$1));
|
|
13147
13147
|
} else prevStats = newStats$1;
|
|
13148
13148
|
} catch (error$1) {
|
|
13149
13149
|
this.fsw._remove(dirname$3, basename$3);
|
|
@@ -13170,7 +13170,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13170
13170
|
* @param {String} item basename of this item
|
|
13171
13171
|
* @returns {Promise<Boolean>} true if no more processing is needed for this entry.
|
|
13172
13172
|
*/
|
|
13173
|
-
async _handleSymlink(entry, directory, path$
|
|
13173
|
+
async _handleSymlink(entry, directory, path$14, item) {
|
|
13174
13174
|
if (this.fsw.closed) return;
|
|
13175
13175
|
const full = entry.fullPath;
|
|
13176
13176
|
const dir = this.fsw._getWatchedDir(directory);
|
|
@@ -13178,7 +13178,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13178
13178
|
this.fsw._incrReadyCount();
|
|
13179
13179
|
let linkPath;
|
|
13180
13180
|
try {
|
|
13181
|
-
linkPath = await fsrealpath(path$
|
|
13181
|
+
linkPath = await fsrealpath(path$14);
|
|
13182
13182
|
} catch (e$1) {
|
|
13183
13183
|
this.fsw._emitReady();
|
|
13184
13184
|
return true;
|
|
@@ -13187,12 +13187,12 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13187
13187
|
if (dir.has(item)) {
|
|
13188
13188
|
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
13189
13189
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
13190
|
-
this.fsw._emit(EV_CHANGE$2, path$
|
|
13190
|
+
this.fsw._emit(EV_CHANGE$2, path$14, entry.stats);
|
|
13191
13191
|
}
|
|
13192
13192
|
} else {
|
|
13193
13193
|
dir.add(item);
|
|
13194
13194
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
13195
|
-
this.fsw._emit(EV_ADD$2, path$
|
|
13195
|
+
this.fsw._emit(EV_ADD$2, path$14, entry.stats);
|
|
13196
13196
|
}
|
|
13197
13197
|
this.fsw._emitReady();
|
|
13198
13198
|
return true;
|
|
@@ -13218,17 +13218,17 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13218
13218
|
return;
|
|
13219
13219
|
}
|
|
13220
13220
|
const item = entry.path;
|
|
13221
|
-
let path$
|
|
13221
|
+
let path$14 = sysPath$2.join(directory, item);
|
|
13222
13222
|
current.add(item);
|
|
13223
|
-
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path$
|
|
13223
|
+
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path$14, item)) return;
|
|
13224
13224
|
if (this.fsw.closed) {
|
|
13225
13225
|
stream$2 = void 0;
|
|
13226
13226
|
return;
|
|
13227
13227
|
}
|
|
13228
13228
|
if (item === target || !target && !previous.has(item)) {
|
|
13229
13229
|
this.fsw._incrReadyCount();
|
|
13230
|
-
path$
|
|
13231
|
-
this._addToNodeFs(path$
|
|
13230
|
+
path$14 = sysPath$2.join(dir, sysPath$2.relative(dir, path$14));
|
|
13231
|
+
this._addToNodeFs(path$14, initialAdd, wh, depth + 1);
|
|
13232
13232
|
}
|
|
13233
13233
|
}).on(EV_ERROR$2, this._boundHandleError);
|
|
13234
13234
|
return new Promise((resolve$4) => stream$2.once(STR_END$2, () => {
|
|
@@ -13291,13 +13291,13 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13291
13291
|
* @param {String=} target Child path actually targeted for watch
|
|
13292
13292
|
* @returns {Promise}
|
|
13293
13293
|
*/
|
|
13294
|
-
async _addToNodeFs(path$
|
|
13294
|
+
async _addToNodeFs(path$14, initialAdd, priorWh, depth, target) {
|
|
13295
13295
|
const ready = this.fsw._emitReady;
|
|
13296
|
-
if (this.fsw._isIgnored(path$
|
|
13296
|
+
if (this.fsw._isIgnored(path$14) || this.fsw.closed) {
|
|
13297
13297
|
ready();
|
|
13298
13298
|
return false;
|
|
13299
13299
|
}
|
|
13300
|
-
const wh = this.fsw._getWatchHelpers(path$
|
|
13300
|
+
const wh = this.fsw._getWatchHelpers(path$14, depth);
|
|
13301
13301
|
if (!wh.hasGlob && priorWh) {
|
|
13302
13302
|
wh.hasGlob = priorWh.hasGlob;
|
|
13303
13303
|
wh.globFilter = priorWh.globFilter;
|
|
@@ -13311,32 +13311,32 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
13311
13311
|
ready();
|
|
13312
13312
|
return false;
|
|
13313
13313
|
}
|
|
13314
|
-
const follow = this.fsw.options.followSymlinks && !path$
|
|
13314
|
+
const follow = this.fsw.options.followSymlinks && !path$14.includes(STAR) && !path$14.includes(BRACE_START$1);
|
|
13315
13315
|
let closer;
|
|
13316
13316
|
if (stats.isDirectory()) {
|
|
13317
|
-
const absPath = sysPath$2.resolve(path$
|
|
13318
|
-
const targetPath = follow ? await fsrealpath(path$
|
|
13317
|
+
const absPath = sysPath$2.resolve(path$14);
|
|
13318
|
+
const targetPath = follow ? await fsrealpath(path$14) : path$14;
|
|
13319
13319
|
if (this.fsw.closed) return;
|
|
13320
13320
|
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
13321
13321
|
if (this.fsw.closed) return;
|
|
13322
13322
|
if (absPath !== targetPath && targetPath !== void 0) this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
13323
13323
|
} else if (stats.isSymbolicLink()) {
|
|
13324
|
-
const targetPath = follow ? await fsrealpath(path$
|
|
13324
|
+
const targetPath = follow ? await fsrealpath(path$14) : path$14;
|
|
13325
13325
|
if (this.fsw.closed) return;
|
|
13326
13326
|
const parent = sysPath$2.dirname(wh.watchPath);
|
|
13327
13327
|
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
13328
13328
|
this.fsw._emit(EV_ADD$2, wh.watchPath, stats);
|
|
13329
|
-
closer = await this._handleDir(parent, stats, initialAdd, depth, path$
|
|
13329
|
+
closer = await this._handleDir(parent, stats, initialAdd, depth, path$14, wh, targetPath);
|
|
13330
13330
|
if (this.fsw.closed) return;
|
|
13331
|
-
if (targetPath !== void 0) this.fsw._symlinkPaths.set(sysPath$2.resolve(path$
|
|
13331
|
+
if (targetPath !== void 0) this.fsw._symlinkPaths.set(sysPath$2.resolve(path$14), targetPath);
|
|
13332
13332
|
} else closer = this._handleFile(wh.watchPath, stats, initialAdd);
|
|
13333
13333
|
ready();
|
|
13334
|
-
this.fsw._addPathCloser(path$
|
|
13334
|
+
this.fsw._addPathCloser(path$14, closer);
|
|
13335
13335
|
return false;
|
|
13336
13336
|
} catch (error$1) {
|
|
13337
13337
|
if (this.fsw._handleError(error$1)) {
|
|
13338
13338
|
ready();
|
|
13339
|
-
return path$
|
|
13339
|
+
return path$14;
|
|
13340
13340
|
}
|
|
13341
13341
|
}
|
|
13342
13342
|
}
|
|
@@ -13402,8 +13402,8 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13402
13402
|
* @param {Function} callback called when fsevents is bound and ready
|
|
13403
13403
|
* @returns {{stop: Function}} new fsevents instance
|
|
13404
13404
|
*/
|
|
13405
|
-
const createFSEventsInstance = (path$
|
|
13406
|
-
return { stop: fsevents.watch(path$
|
|
13405
|
+
const createFSEventsInstance = (path$14, callback) => {
|
|
13406
|
+
return { stop: fsevents.watch(path$14, callback) };
|
|
13407
13407
|
};
|
|
13408
13408
|
/**
|
|
13409
13409
|
* Instantiates the fsevents interface or binds listeners to an existing one covering
|
|
@@ -13414,12 +13414,12 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13414
13414
|
* @param {Function} rawEmitter - passes data to listeners of the 'raw' event
|
|
13415
13415
|
* @returns {Function} closer
|
|
13416
13416
|
*/
|
|
13417
|
-
function setFSEventsListener(path$
|
|
13417
|
+
function setFSEventsListener(path$14, realPath, listener$1, rawEmitter) {
|
|
13418
13418
|
let watchPath = sysPath$1.extname(realPath) ? sysPath$1.dirname(realPath) : realPath;
|
|
13419
13419
|
const parentPath = sysPath$1.dirname(watchPath);
|
|
13420
13420
|
let cont = FSEventsWatchers.get(watchPath);
|
|
13421
13421
|
if (couldConsolidate(parentPath)) watchPath = parentPath;
|
|
13422
|
-
const resolvedPath = sysPath$1.resolve(path$
|
|
13422
|
+
const resolvedPath = sysPath$1.resolve(path$14);
|
|
13423
13423
|
const hasSymlink = resolvedPath !== realPath;
|
|
13424
13424
|
const filteredListener = (fullPath, flags, info) => {
|
|
13425
13425
|
if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
|
|
@@ -13461,18 +13461,18 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13461
13461
|
}
|
|
13462
13462
|
};
|
|
13463
13463
|
}
|
|
13464
|
-
const couldConsolidate = (path$
|
|
13464
|
+
const couldConsolidate = (path$14) => {
|
|
13465
13465
|
let count = 0;
|
|
13466
|
-
for (const watchPath of FSEventsWatchers.keys()) if (watchPath.indexOf(path$
|
|
13466
|
+
for (const watchPath of FSEventsWatchers.keys()) if (watchPath.indexOf(path$14) === 0) {
|
|
13467
13467
|
count++;
|
|
13468
13468
|
if (count >= consolidateThreshhold) return true;
|
|
13469
13469
|
}
|
|
13470
13470
|
return false;
|
|
13471
13471
|
};
|
|
13472
13472
|
const canUse = () => fsevents && FSEventsWatchers.size < 128;
|
|
13473
|
-
const calcDepth = (path$
|
|
13473
|
+
const calcDepth = (path$14, root) => {
|
|
13474
13474
|
let i$1 = 0;
|
|
13475
|
-
while (!path$
|
|
13475
|
+
while (!path$14.indexOf(root) && (path$14 = sysPath$1.dirname(path$14)) !== root) i$1++;
|
|
13476
13476
|
return i$1;
|
|
13477
13477
|
};
|
|
13478
13478
|
const sameTypes = (info, stats) => info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || info.type === FSEVENT_TYPE_FILE && stats.isFile();
|
|
@@ -13486,42 +13486,42 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13486
13486
|
constructor(fsw) {
|
|
13487
13487
|
this.fsw = fsw;
|
|
13488
13488
|
}
|
|
13489
|
-
checkIgnored(path$
|
|
13489
|
+
checkIgnored(path$14, stats) {
|
|
13490
13490
|
const ipaths = this.fsw._ignoredPaths;
|
|
13491
|
-
if (this.fsw._isIgnored(path$
|
|
13492
|
-
ipaths.add(path$
|
|
13493
|
-
if (stats && stats.isDirectory()) ipaths.add(path$
|
|
13491
|
+
if (this.fsw._isIgnored(path$14, stats)) {
|
|
13492
|
+
ipaths.add(path$14);
|
|
13493
|
+
if (stats && stats.isDirectory()) ipaths.add(path$14 + ROOT_GLOBSTAR);
|
|
13494
13494
|
return true;
|
|
13495
13495
|
}
|
|
13496
|
-
ipaths.delete(path$
|
|
13497
|
-
ipaths.delete(path$
|
|
13496
|
+
ipaths.delete(path$14);
|
|
13497
|
+
ipaths.delete(path$14 + ROOT_GLOBSTAR);
|
|
13498
13498
|
}
|
|
13499
|
-
addOrChange(path$
|
|
13499
|
+
addOrChange(path$14, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
13500
13500
|
const event = watchedDir.has(item) ? EV_CHANGE$1 : EV_ADD$1;
|
|
13501
|
-
this.handleEvent(event, path$
|
|
13501
|
+
this.handleEvent(event, path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13502
13502
|
}
|
|
13503
|
-
async checkExists(path$
|
|
13503
|
+
async checkExists(path$14, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
13504
13504
|
try {
|
|
13505
|
-
const stats = await stat$1(path$
|
|
13505
|
+
const stats = await stat$1(path$14);
|
|
13506
13506
|
if (this.fsw.closed) return;
|
|
13507
|
-
if (sameTypes(info, stats)) this.addOrChange(path$
|
|
13508
|
-
else this.handleEvent(EV_UNLINK$1, path$
|
|
13507
|
+
if (sameTypes(info, stats)) this.addOrChange(path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13508
|
+
else this.handleEvent(EV_UNLINK$1, path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13509
13509
|
} catch (error$1) {
|
|
13510
|
-
if (error$1.code === "EACCES") this.addOrChange(path$
|
|
13511
|
-
else this.handleEvent(EV_UNLINK$1, path$
|
|
13510
|
+
if (error$1.code === "EACCES") this.addOrChange(path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13511
|
+
else this.handleEvent(EV_UNLINK$1, path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13512
13512
|
}
|
|
13513
13513
|
}
|
|
13514
|
-
handleEvent(event, path$
|
|
13515
|
-
if (this.fsw.closed || this.checkIgnored(path$
|
|
13514
|
+
handleEvent(event, path$14, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
13515
|
+
if (this.fsw.closed || this.checkIgnored(path$14)) return;
|
|
13516
13516
|
if (event === EV_UNLINK$1) {
|
|
13517
13517
|
const isDirectory$2 = info.type === FSEVENT_TYPE_DIRECTORY;
|
|
13518
13518
|
if (isDirectory$2 || watchedDir.has(item)) this.fsw._remove(parent, item, isDirectory$2);
|
|
13519
13519
|
} else {
|
|
13520
13520
|
if (event === EV_ADD$1) {
|
|
13521
|
-
if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path$
|
|
13521
|
+
if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path$14);
|
|
13522
13522
|
if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
|
|
13523
13523
|
const curDepth = opts.depth === void 0 ? void 0 : calcDepth(fullPath, realPath) + 1;
|
|
13524
|
-
return this._addToFsEvents(path$
|
|
13524
|
+
return this._addToFsEvents(path$14, false, true, curDepth);
|
|
13525
13525
|
}
|
|
13526
13526
|
this.fsw._getWatchedDir(parent).add(item);
|
|
13527
13527
|
}
|
|
@@ -13529,8 +13529,8 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13529
13529
|
* @type {'add'|'addDir'|'unlink'|'unlinkDir'}
|
|
13530
13530
|
*/
|
|
13531
13531
|
const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
|
|
13532
|
-
this.fsw._emit(eventName, path$
|
|
13533
|
-
if (eventName === EV_ADD_DIR$1) this._addToFsEvents(path$
|
|
13532
|
+
this.fsw._emit(eventName, path$14);
|
|
13533
|
+
if (eventName === EV_ADD_DIR$1) this._addToFsEvents(path$14, false, true);
|
|
13534
13534
|
}
|
|
13535
13535
|
}
|
|
13536
13536
|
/**
|
|
@@ -13547,26 +13547,26 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13547
13547
|
const watchCallback = async (fullPath, flags, info) => {
|
|
13548
13548
|
if (this.fsw.closed || this.fsw._isIgnored(fullPath)) return;
|
|
13549
13549
|
if (opts.depth !== void 0 && calcDepth(fullPath, realPath) > opts.depth) return;
|
|
13550
|
-
const path$
|
|
13551
|
-
if (globFilter && !globFilter(path$
|
|
13552
|
-
const parent = sysPath$1.dirname(path$
|
|
13553
|
-
const item = sysPath$1.basename(path$
|
|
13554
|
-
const watchedDir = this.fsw._getWatchedDir(info.type === FSEVENT_TYPE_DIRECTORY ? path$
|
|
13550
|
+
const path$14 = transform$2(sysPath$1.join(watchPath, sysPath$1.relative(watchPath, fullPath)));
|
|
13551
|
+
if (globFilter && !globFilter(path$14)) return;
|
|
13552
|
+
const parent = sysPath$1.dirname(path$14);
|
|
13553
|
+
const item = sysPath$1.basename(path$14);
|
|
13554
|
+
const watchedDir = this.fsw._getWatchedDir(info.type === FSEVENT_TYPE_DIRECTORY ? path$14 : parent);
|
|
13555
13555
|
if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) if (typeof opts.ignored === FUNCTION_TYPE$1) {
|
|
13556
13556
|
let stats;
|
|
13557
13557
|
try {
|
|
13558
|
-
stats = await stat$1(path$
|
|
13558
|
+
stats = await stat$1(path$14);
|
|
13559
13559
|
} catch (error$1) {}
|
|
13560
13560
|
if (this.fsw.closed) return;
|
|
13561
|
-
if (this.checkIgnored(path$
|
|
13562
|
-
if (sameTypes(info, stats)) this.addOrChange(path$
|
|
13563
|
-
else this.handleEvent(EV_UNLINK$1, path$
|
|
13564
|
-
} else this.checkExists(path$
|
|
13561
|
+
if (this.checkIgnored(path$14, stats)) return;
|
|
13562
|
+
if (sameTypes(info, stats)) this.addOrChange(path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13563
|
+
else this.handleEvent(EV_UNLINK$1, path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13564
|
+
} else this.checkExists(path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13565
13565
|
else switch (info.event) {
|
|
13566
13566
|
case FSEVENT_CREATED:
|
|
13567
|
-
case FSEVENT_MODIFIED: return this.addOrChange(path$
|
|
13567
|
+
case FSEVENT_MODIFIED: return this.addOrChange(path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13568
13568
|
case FSEVENT_DELETED:
|
|
13569
|
-
case FSEVENT_MOVED: return this.checkExists(path$
|
|
13569
|
+
case FSEVENT_MOVED: return this.checkExists(path$14, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
13570
13570
|
}
|
|
13571
13571
|
};
|
|
13572
13572
|
const closer = setFSEventsListener(watchPath, realPath, watchCallback, this.fsw._emitRaw);
|
|
@@ -13590,10 +13590,10 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13590
13590
|
if (this.fsw.closed) return;
|
|
13591
13591
|
if (this.fsw._isIgnored(linkTarget)) return this.fsw._emitReady();
|
|
13592
13592
|
this.fsw._incrReadyCount();
|
|
13593
|
-
this._addToFsEvents(linkTarget || linkPath, (path$
|
|
13593
|
+
this._addToFsEvents(linkTarget || linkPath, (path$14) => {
|
|
13594
13594
|
let aliasedPath = linkPath;
|
|
13595
|
-
if (linkTarget && linkTarget !== DOT_SLASH) aliasedPath = path$
|
|
13596
|
-
else if (path$
|
|
13595
|
+
if (linkTarget && linkTarget !== DOT_SLASH) aliasedPath = path$14.replace(linkTarget, linkPath);
|
|
13596
|
+
else if (path$14 !== DOT_SLASH) aliasedPath = sysPath$1.join(linkPath, path$14);
|
|
13597
13597
|
return transform$2(aliasedPath);
|
|
13598
13598
|
}, false, curDepth);
|
|
13599
13599
|
} catch (error$1) {
|
|
@@ -13615,10 +13615,10 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13615
13615
|
dirObj.add(base);
|
|
13616
13616
|
if (!opts.ignoreInitial || forceAdd === true) this.fsw._emit(isDir ? EV_ADD_DIR$1 : EV_ADD$1, pp, stats);
|
|
13617
13617
|
}
|
|
13618
|
-
initWatch(realPath, path$
|
|
13618
|
+
initWatch(realPath, path$14, wh, processPath) {
|
|
13619
13619
|
if (this.fsw.closed) return;
|
|
13620
13620
|
const closer = this._watchWithFsEvents(wh.watchPath, sysPath$1.resolve(realPath || wh.watchPath), processPath, wh.globFilter);
|
|
13621
|
-
this.fsw._addPathCloser(path$
|
|
13621
|
+
this.fsw._addPathCloser(path$14, closer);
|
|
13622
13622
|
}
|
|
13623
13623
|
/**
|
|
13624
13624
|
* Handle added path with fsevents
|
|
@@ -13628,17 +13628,17 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13628
13628
|
* @param {Number=} priorDepth Level of subdirectories already traversed.
|
|
13629
13629
|
* @returns {Promise<void>}
|
|
13630
13630
|
*/
|
|
13631
|
-
async _addToFsEvents(path$
|
|
13631
|
+
async _addToFsEvents(path$14, transform$2, forceAdd, priorDepth) {
|
|
13632
13632
|
if (this.fsw.closed) return;
|
|
13633
13633
|
const opts = this.fsw.options;
|
|
13634
13634
|
const processPath = typeof transform$2 === FUNCTION_TYPE$1 ? transform$2 : IDENTITY_FN;
|
|
13635
|
-
const wh = this.fsw._getWatchHelpers(path$
|
|
13635
|
+
const wh = this.fsw._getWatchHelpers(path$14);
|
|
13636
13636
|
try {
|
|
13637
13637
|
const stats = await statMethods[wh.statMethod](wh.watchPath);
|
|
13638
13638
|
if (this.fsw.closed) return;
|
|
13639
13639
|
if (this.fsw._isIgnored(wh.watchPath, stats)) throw null;
|
|
13640
13640
|
if (stats.isDirectory()) {
|
|
13641
|
-
if (!wh.globFilter) this.emitAdd(processPath(path$
|
|
13641
|
+
if (!wh.globFilter) this.emitAdd(processPath(path$14), stats, processPath, opts, forceAdd);
|
|
13642
13642
|
if (priorDepth && priorDepth > opts.depth) return;
|
|
13643
13643
|
this.fsw._readdirp(wh.watchPath, {
|
|
13644
13644
|
fileFilter: (entry) => wh.filterPath(entry),
|
|
@@ -13666,13 +13666,13 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
13666
13666
|
this.fsw._emitReady();
|
|
13667
13667
|
}
|
|
13668
13668
|
}
|
|
13669
|
-
if (opts.persistent && forceAdd !== true) if (typeof transform$2 === FUNCTION_TYPE$1) this.initWatch(void 0, path$
|
|
13669
|
+
if (opts.persistent && forceAdd !== true) if (typeof transform$2 === FUNCTION_TYPE$1) this.initWatch(void 0, path$14, wh, processPath);
|
|
13670
13670
|
else {
|
|
13671
13671
|
let realPath;
|
|
13672
13672
|
try {
|
|
13673
13673
|
realPath = await realpath(wh.watchPath);
|
|
13674
13674
|
} catch (e$1) {}
|
|
13675
|
-
this.initWatch(realPath, path$
|
|
13675
|
+
this.initWatch(realPath, path$14, wh, processPath);
|
|
13676
13676
|
}
|
|
13677
13677
|
}
|
|
13678
13678
|
};
|
|
@@ -13740,15 +13740,15 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13740
13740
|
if (prepend) str = SLASH + str;
|
|
13741
13741
|
return str;
|
|
13742
13742
|
};
|
|
13743
|
-
const normalizePathToUnix = (path$
|
|
13744
|
-
const normalizeIgnored = (cwd = EMPTY_STR) => (path$
|
|
13745
|
-
if (typeof path$
|
|
13746
|
-
return normalizePathToUnix(sysPath.isAbsolute(path$
|
|
13743
|
+
const normalizePathToUnix = (path$14) => toUnix(sysPath.normalize(toUnix(path$14)));
|
|
13744
|
+
const normalizeIgnored = (cwd = EMPTY_STR) => (path$14) => {
|
|
13745
|
+
if (typeof path$14 !== STRING_TYPE) return path$14;
|
|
13746
|
+
return normalizePathToUnix(sysPath.isAbsolute(path$14) ? path$14 : sysPath.join(cwd, path$14));
|
|
13747
13747
|
};
|
|
13748
|
-
const getAbsolutePath = (path$
|
|
13749
|
-
if (sysPath.isAbsolute(path$
|
|
13750
|
-
if (path$
|
|
13751
|
-
return sysPath.join(cwd, path$
|
|
13748
|
+
const getAbsolutePath = (path$14, cwd) => {
|
|
13749
|
+
if (sysPath.isAbsolute(path$14)) return path$14;
|
|
13750
|
+
if (path$14.startsWith(BANG)) return BANG + sysPath.join(cwd, path$14.slice(1));
|
|
13751
|
+
return sysPath.join(cwd, path$14);
|
|
13752
13752
|
};
|
|
13753
13753
|
const undef = (opts, key) => opts[key] === void 0;
|
|
13754
13754
|
/**
|
|
@@ -13808,17 +13808,17 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13808
13808
|
const STAT_METHOD_F = "stat";
|
|
13809
13809
|
const STAT_METHOD_L = "lstat";
|
|
13810
13810
|
var WatchHelper = class {
|
|
13811
|
-
constructor(path$
|
|
13811
|
+
constructor(path$14, watchPath, follow, fsw) {
|
|
13812
13812
|
this.fsw = fsw;
|
|
13813
|
-
this.path = path$
|
|
13813
|
+
this.path = path$14 = path$14.replace(REPLACER_RE, EMPTY_STR);
|
|
13814
13814
|
this.watchPath = watchPath;
|
|
13815
13815
|
this.fullWatchPath = sysPath.resolve(watchPath);
|
|
13816
|
-
this.hasGlob = watchPath !== path$
|
|
13816
|
+
this.hasGlob = watchPath !== path$14;
|
|
13817
13817
|
/** @type {object|boolean} */
|
|
13818
|
-
if (path$
|
|
13818
|
+
if (path$14 === EMPTY_STR) this.hasGlob = false;
|
|
13819
13819
|
this.globSymlink = this.hasGlob && follow ? void 0 : false;
|
|
13820
|
-
this.globFilter = this.hasGlob ? anymatch(path$
|
|
13821
|
-
this.dirParts = this.getDirParts(path$
|
|
13820
|
+
this.globFilter = this.hasGlob ? anymatch(path$14, void 0, ANYMATCH_OPTS) : false;
|
|
13821
|
+
this.dirParts = this.getDirParts(path$14);
|
|
13822
13822
|
this.dirParts.forEach((parts) => {
|
|
13823
13823
|
if (parts.length > 1) parts.pop();
|
|
13824
13824
|
});
|
|
@@ -13842,11 +13842,11 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13842
13842
|
const resolvedPath = this.entryPath(entry);
|
|
13843
13843
|
return (this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? this.globFilter(resolvedPath) : true) && this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
|
|
13844
13844
|
}
|
|
13845
|
-
getDirParts(path$
|
|
13845
|
+
getDirParts(path$14) {
|
|
13846
13846
|
if (!this.hasGlob) return [];
|
|
13847
13847
|
const parts = [];
|
|
13848
|
-
(path$
|
|
13849
|
-
parts.push(sysPath.relative(this.watchPath, path$
|
|
13848
|
+
(path$14.includes(BRACE_START) ? braces.expand(path$14) : [path$14]).forEach((path$15) => {
|
|
13849
|
+
parts.push(sysPath.relative(this.watchPath, path$15).split(SLASH_OR_BACK_SLASH_RE));
|
|
13850
13850
|
});
|
|
13851
13851
|
return parts;
|
|
13852
13852
|
}
|
|
@@ -13948,30 +13948,30 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13948
13948
|
const { cwd, disableGlobbing } = this.options;
|
|
13949
13949
|
this.closed = false;
|
|
13950
13950
|
let paths = unifyPaths(paths_);
|
|
13951
|
-
if (cwd) paths = paths.map((path$
|
|
13952
|
-
const absPath = getAbsolutePath(path$
|
|
13953
|
-
if (disableGlobbing || !isGlob(path$
|
|
13951
|
+
if (cwd) paths = paths.map((path$14) => {
|
|
13952
|
+
const absPath = getAbsolutePath(path$14, cwd);
|
|
13953
|
+
if (disableGlobbing || !isGlob(path$14)) return absPath;
|
|
13954
13954
|
return normalizePath$1(absPath);
|
|
13955
13955
|
});
|
|
13956
|
-
paths = paths.filter((path$
|
|
13957
|
-
if (path$
|
|
13958
|
-
this._ignoredPaths.add(path$
|
|
13956
|
+
paths = paths.filter((path$14) => {
|
|
13957
|
+
if (path$14.startsWith(BANG)) {
|
|
13958
|
+
this._ignoredPaths.add(path$14.slice(1));
|
|
13959
13959
|
return false;
|
|
13960
13960
|
}
|
|
13961
|
-
this._ignoredPaths.delete(path$
|
|
13962
|
-
this._ignoredPaths.delete(path$
|
|
13961
|
+
this._ignoredPaths.delete(path$14);
|
|
13962
|
+
this._ignoredPaths.delete(path$14 + SLASH_GLOBSTAR);
|
|
13963
13963
|
this._userIgnored = void 0;
|
|
13964
13964
|
return true;
|
|
13965
13965
|
});
|
|
13966
13966
|
if (this.options.useFsEvents && this._fsEventsHandler) {
|
|
13967
13967
|
if (!this._readyCount) this._readyCount = paths.length;
|
|
13968
13968
|
if (this.options.persistent) this._readyCount += paths.length;
|
|
13969
|
-
paths.forEach((path$
|
|
13969
|
+
paths.forEach((path$14) => this._fsEventsHandler._addToFsEvents(path$14));
|
|
13970
13970
|
} else {
|
|
13971
13971
|
if (!this._readyCount) this._readyCount = 0;
|
|
13972
13972
|
this._readyCount += paths.length;
|
|
13973
|
-
Promise.all(paths.map(async (path$
|
|
13974
|
-
const res = await this._nodeFsHandler._addToNodeFs(path$
|
|
13973
|
+
Promise.all(paths.map(async (path$14) => {
|
|
13974
|
+
const res = await this._nodeFsHandler._addToNodeFs(path$14, !_internal, 0, 0, _origAdd);
|
|
13975
13975
|
if (res) this._emitReady();
|
|
13976
13976
|
return res;
|
|
13977
13977
|
})).then((results) => {
|
|
@@ -13992,14 +13992,14 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13992
13992
|
if (this.closed) return this;
|
|
13993
13993
|
const paths = unifyPaths(paths_);
|
|
13994
13994
|
const { cwd } = this.options;
|
|
13995
|
-
paths.forEach((path$
|
|
13996
|
-
if (!sysPath.isAbsolute(path$
|
|
13997
|
-
if (cwd) path$
|
|
13998
|
-
path$
|
|
13999
|
-
}
|
|
14000
|
-
this._closePath(path$
|
|
14001
|
-
this._ignoredPaths.add(path$
|
|
14002
|
-
if (this._watched.has(path$
|
|
13995
|
+
paths.forEach((path$14) => {
|
|
13996
|
+
if (!sysPath.isAbsolute(path$14) && !this._closers.has(path$14)) {
|
|
13997
|
+
if (cwd) path$14 = sysPath.join(cwd, path$14);
|
|
13998
|
+
path$14 = sysPath.resolve(path$14);
|
|
13999
|
+
}
|
|
14000
|
+
this._closePath(path$14);
|
|
14001
|
+
this._ignoredPaths.add(path$14);
|
|
14002
|
+
if (this._watched.has(path$14)) this._ignoredPaths.add(path$14 + SLASH_GLOBSTAR);
|
|
14003
14003
|
this._userIgnored = void 0;
|
|
14004
14004
|
});
|
|
14005
14005
|
return this;
|
|
@@ -14060,37 +14060,37 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14060
14060
|
* @param {*=} val3
|
|
14061
14061
|
* @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
14062
14062
|
*/
|
|
14063
|
-
async _emit(event, path$
|
|
14063
|
+
async _emit(event, path$14, val1, val2, val3) {
|
|
14064
14064
|
if (this.closed) return;
|
|
14065
14065
|
const opts = this.options;
|
|
14066
|
-
if (isWindows$2) path$
|
|
14067
|
-
if (opts.cwd) path$
|
|
14066
|
+
if (isWindows$2) path$14 = sysPath.normalize(path$14);
|
|
14067
|
+
if (opts.cwd) path$14 = sysPath.relative(opts.cwd, path$14);
|
|
14068
14068
|
/** @type Array<any> */
|
|
14069
|
-
const args = [event, path$
|
|
14069
|
+
const args = [event, path$14];
|
|
14070
14070
|
if (val3 !== void 0) args.push(val1, val2, val3);
|
|
14071
14071
|
else if (val2 !== void 0) args.push(val1, val2);
|
|
14072
14072
|
else if (val1 !== void 0) args.push(val1);
|
|
14073
14073
|
const awf = opts.awaitWriteFinish;
|
|
14074
14074
|
let pw;
|
|
14075
|
-
if (awf && (pw = this._pendingWrites.get(path$
|
|
14075
|
+
if (awf && (pw = this._pendingWrites.get(path$14))) {
|
|
14076
14076
|
pw.lastChange = /* @__PURE__ */ new Date();
|
|
14077
14077
|
return this;
|
|
14078
14078
|
}
|
|
14079
14079
|
if (opts.atomic) {
|
|
14080
14080
|
if (event === EV_UNLINK) {
|
|
14081
|
-
this._pendingUnlinks.set(path$
|
|
14081
|
+
this._pendingUnlinks.set(path$14, args);
|
|
14082
14082
|
setTimeout(() => {
|
|
14083
|
-
this._pendingUnlinks.forEach((entry, path$
|
|
14083
|
+
this._pendingUnlinks.forEach((entry, path$15) => {
|
|
14084
14084
|
this.emit(...entry);
|
|
14085
14085
|
this.emit(EV_ALL, ...entry);
|
|
14086
|
-
this._pendingUnlinks.delete(path$
|
|
14086
|
+
this._pendingUnlinks.delete(path$15);
|
|
14087
14087
|
});
|
|
14088
14088
|
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
14089
14089
|
return this;
|
|
14090
14090
|
}
|
|
14091
|
-
if (event === EV_ADD && this._pendingUnlinks.has(path$
|
|
14091
|
+
if (event === EV_ADD && this._pendingUnlinks.has(path$14)) {
|
|
14092
14092
|
event = args[0] = EV_CHANGE;
|
|
14093
|
-
this._pendingUnlinks.delete(path$
|
|
14093
|
+
this._pendingUnlinks.delete(path$14);
|
|
14094
14094
|
}
|
|
14095
14095
|
}
|
|
14096
14096
|
if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
|
|
@@ -14105,14 +14105,14 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14105
14105
|
this.emitWithAll(event, args);
|
|
14106
14106
|
}
|
|
14107
14107
|
};
|
|
14108
|
-
this._awaitWriteFinish(path$
|
|
14108
|
+
this._awaitWriteFinish(path$14, awf.stabilityThreshold, event, awfEmit);
|
|
14109
14109
|
return this;
|
|
14110
14110
|
}
|
|
14111
14111
|
if (event === EV_CHANGE) {
|
|
14112
|
-
if (!this._throttle(EV_CHANGE, path$
|
|
14112
|
+
if (!this._throttle(EV_CHANGE, path$14, 50)) return this;
|
|
14113
14113
|
}
|
|
14114
14114
|
if (opts.alwaysStat && val1 === void 0 && (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)) {
|
|
14115
|
-
const fullPath = opts.cwd ? sysPath.join(opts.cwd, path$
|
|
14115
|
+
const fullPath = opts.cwd ? sysPath.join(opts.cwd, path$14) : path$14;
|
|
14116
14116
|
let stats;
|
|
14117
14117
|
try {
|
|
14118
14118
|
stats = await stat(fullPath);
|
|
@@ -14140,21 +14140,21 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14140
14140
|
* @param {Number} timeout duration of time to suppress duplicate actions
|
|
14141
14141
|
* @returns {Object|false} tracking object or false if action should be suppressed
|
|
14142
14142
|
*/
|
|
14143
|
-
_throttle(actionType, path$
|
|
14143
|
+
_throttle(actionType, path$14, timeout$1) {
|
|
14144
14144
|
if (!this._throttled.has(actionType)) this._throttled.set(actionType, /* @__PURE__ */ new Map());
|
|
14145
14145
|
/** @type {Map<Path, Object>} */
|
|
14146
14146
|
const action = this._throttled.get(actionType);
|
|
14147
14147
|
/** @type {Object} */
|
|
14148
|
-
const actionPath = action.get(path$
|
|
14148
|
+
const actionPath = action.get(path$14);
|
|
14149
14149
|
if (actionPath) {
|
|
14150
14150
|
actionPath.count++;
|
|
14151
14151
|
return false;
|
|
14152
14152
|
}
|
|
14153
14153
|
let timeoutObject;
|
|
14154
14154
|
const clear = () => {
|
|
14155
|
-
const item = action.get(path$
|
|
14155
|
+
const item = action.get(path$14);
|
|
14156
14156
|
const count = item ? item.count : 0;
|
|
14157
|
-
action.delete(path$
|
|
14157
|
+
action.delete(path$14);
|
|
14158
14158
|
clearTimeout(timeoutObject);
|
|
14159
14159
|
if (item) clearTimeout(item.timeoutObject);
|
|
14160
14160
|
return count;
|
|
@@ -14165,7 +14165,7 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14165
14165
|
clear,
|
|
14166
14166
|
count: 0
|
|
14167
14167
|
};
|
|
14168
|
-
action.set(path$
|
|
14168
|
+
action.set(path$14, thr);
|
|
14169
14169
|
return thr;
|
|
14170
14170
|
}
|
|
14171
14171
|
_incrReadyCount() {
|
|
@@ -14179,30 +14179,30 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14179
14179
|
* @param {EventName} event
|
|
14180
14180
|
* @param {Function} awfEmit Callback to be called when ready for event to be emitted.
|
|
14181
14181
|
*/
|
|
14182
|
-
_awaitWriteFinish(path$
|
|
14182
|
+
_awaitWriteFinish(path$14, threshold, event, awfEmit) {
|
|
14183
14183
|
let timeoutHandler;
|
|
14184
|
-
let fullPath = path$
|
|
14185
|
-
if (this.options.cwd && !sysPath.isAbsolute(path$
|
|
14184
|
+
let fullPath = path$14;
|
|
14185
|
+
if (this.options.cwd && !sysPath.isAbsolute(path$14)) fullPath = sysPath.join(this.options.cwd, path$14);
|
|
14186
14186
|
const now = /* @__PURE__ */ new Date();
|
|
14187
14187
|
const awaitWriteFinish = (prevStat) => {
|
|
14188
14188
|
fs$6.stat(fullPath, (err$2, curStat) => {
|
|
14189
|
-
if (err$2 || !this._pendingWrites.has(path$
|
|
14189
|
+
if (err$2 || !this._pendingWrites.has(path$14)) {
|
|
14190
14190
|
if (err$2 && err$2.code !== "ENOENT") awfEmit(err$2);
|
|
14191
14191
|
return;
|
|
14192
14192
|
}
|
|
14193
14193
|
const now$1 = Number(/* @__PURE__ */ new Date());
|
|
14194
|
-
if (prevStat && curStat.size !== prevStat.size) this._pendingWrites.get(path$
|
|
14195
|
-
if (now$1 - this._pendingWrites.get(path$
|
|
14196
|
-
this._pendingWrites.delete(path$
|
|
14194
|
+
if (prevStat && curStat.size !== prevStat.size) this._pendingWrites.get(path$14).lastChange = now$1;
|
|
14195
|
+
if (now$1 - this._pendingWrites.get(path$14).lastChange >= threshold) {
|
|
14196
|
+
this._pendingWrites.delete(path$14);
|
|
14197
14197
|
awfEmit(void 0, curStat);
|
|
14198
14198
|
} else timeoutHandler = setTimeout(awaitWriteFinish, this.options.awaitWriteFinish.pollInterval, curStat);
|
|
14199
14199
|
});
|
|
14200
14200
|
};
|
|
14201
|
-
if (!this._pendingWrites.has(path$
|
|
14202
|
-
this._pendingWrites.set(path$
|
|
14201
|
+
if (!this._pendingWrites.has(path$14)) {
|
|
14202
|
+
this._pendingWrites.set(path$14, {
|
|
14203
14203
|
lastChange: now,
|
|
14204
14204
|
cancelWait: () => {
|
|
14205
|
-
this._pendingWrites.delete(path$
|
|
14205
|
+
this._pendingWrites.delete(path$14);
|
|
14206
14206
|
clearTimeout(timeoutHandler);
|
|
14207
14207
|
return event;
|
|
14208
14208
|
}
|
|
@@ -14219,19 +14219,19 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14219
14219
|
* @param {fs.Stats=} stats result of fs.stat
|
|
14220
14220
|
* @returns {Boolean}
|
|
14221
14221
|
*/
|
|
14222
|
-
_isIgnored(path$
|
|
14223
|
-
if (this.options.atomic && DOT_RE.test(path$
|
|
14222
|
+
_isIgnored(path$14, stats) {
|
|
14223
|
+
if (this.options.atomic && DOT_RE.test(path$14)) return true;
|
|
14224
14224
|
if (!this._userIgnored) {
|
|
14225
14225
|
const { cwd } = this.options;
|
|
14226
14226
|
const ign = this.options.ignored;
|
|
14227
14227
|
const ignored = ign && ign.map(normalizeIgnored(cwd));
|
|
14228
|
-
const paths = arrify(ignored).filter((path$
|
|
14228
|
+
const paths = arrify(ignored).filter((path$15) => typeof path$15 === STRING_TYPE && !isGlob(path$15)).map((path$15) => path$15 + SLASH_GLOBSTAR);
|
|
14229
14229
|
this._userIgnored = anymatch(this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths), void 0, ANYMATCH_OPTS);
|
|
14230
14230
|
}
|
|
14231
|
-
return this._userIgnored([path$
|
|
14231
|
+
return this._userIgnored([path$14, stats]);
|
|
14232
14232
|
}
|
|
14233
|
-
_isntIgnored(path$
|
|
14234
|
-
return !this._isIgnored(path$
|
|
14233
|
+
_isntIgnored(path$14, stat$4) {
|
|
14234
|
+
return !this._isIgnored(path$14, stat$4);
|
|
14235
14235
|
}
|
|
14236
14236
|
/**
|
|
14237
14237
|
* Provides a set of common helpers and properties relating to symlink and glob handling.
|
|
@@ -14239,10 +14239,10 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14239
14239
|
* @param {Number=} depth at any depth > 0, this isn't a glob
|
|
14240
14240
|
* @returns {WatchHelper} object containing helpers for this path
|
|
14241
14241
|
*/
|
|
14242
|
-
_getWatchHelpers(path$
|
|
14243
|
-
const watchPath = depth || this.options.disableGlobbing || !isGlob(path$
|
|
14242
|
+
_getWatchHelpers(path$14, depth) {
|
|
14243
|
+
const watchPath = depth || this.options.disableGlobbing || !isGlob(path$14) ? path$14 : globParent(path$14);
|
|
14244
14244
|
const follow = this.options.followSymlinks;
|
|
14245
|
-
return new WatchHelper(path$
|
|
14245
|
+
return new WatchHelper(path$14, watchPath, follow, this);
|
|
14246
14246
|
}
|
|
14247
14247
|
/**
|
|
14248
14248
|
* Provides directory tracking objects
|
|
@@ -14276,57 +14276,57 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14276
14276
|
* @returns {void}
|
|
14277
14277
|
*/
|
|
14278
14278
|
_remove(directory, item, isDirectory$2) {
|
|
14279
|
-
const path$
|
|
14280
|
-
const fullPath = sysPath.resolve(path$
|
|
14281
|
-
isDirectory$2 = isDirectory$2 != null ? isDirectory$2 : this._watched.has(path$
|
|
14282
|
-
if (!this._throttle("remove", path$
|
|
14279
|
+
const path$14 = sysPath.join(directory, item);
|
|
14280
|
+
const fullPath = sysPath.resolve(path$14);
|
|
14281
|
+
isDirectory$2 = isDirectory$2 != null ? isDirectory$2 : this._watched.has(path$14) || this._watched.has(fullPath);
|
|
14282
|
+
if (!this._throttle("remove", path$14, 100)) return;
|
|
14283
14283
|
if (!isDirectory$2 && !this.options.useFsEvents && this._watched.size === 1) this.add(directory, item, true);
|
|
14284
|
-
this._getWatchedDir(path$
|
|
14284
|
+
this._getWatchedDir(path$14).getChildren().forEach((nested) => this._remove(path$14, nested));
|
|
14285
14285
|
const parent = this._getWatchedDir(directory);
|
|
14286
14286
|
const wasTracked = parent.has(item);
|
|
14287
14287
|
parent.remove(item);
|
|
14288
14288
|
if (this._symlinkPaths.has(fullPath)) this._symlinkPaths.delete(fullPath);
|
|
14289
|
-
let relPath = path$
|
|
14290
|
-
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path$
|
|
14289
|
+
let relPath = path$14;
|
|
14290
|
+
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path$14);
|
|
14291
14291
|
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
14292
14292
|
if (this._pendingWrites.get(relPath).cancelWait() === EV_ADD) return;
|
|
14293
14293
|
}
|
|
14294
|
-
this._watched.delete(path$
|
|
14294
|
+
this._watched.delete(path$14);
|
|
14295
14295
|
this._watched.delete(fullPath);
|
|
14296
14296
|
const eventName = isDirectory$2 ? EV_UNLINK_DIR : EV_UNLINK;
|
|
14297
|
-
if (wasTracked && !this._isIgnored(path$
|
|
14298
|
-
if (!this.options.useFsEvents) this._closePath(path$
|
|
14297
|
+
if (wasTracked && !this._isIgnored(path$14)) this._emit(eventName, path$14);
|
|
14298
|
+
if (!this.options.useFsEvents) this._closePath(path$14);
|
|
14299
14299
|
}
|
|
14300
14300
|
/**
|
|
14301
14301
|
* Closes all watchers for a path
|
|
14302
14302
|
* @param {Path} path
|
|
14303
14303
|
*/
|
|
14304
|
-
_closePath(path$
|
|
14305
|
-
this._closeFile(path$
|
|
14306
|
-
const dir = sysPath.dirname(path$
|
|
14307
|
-
this._getWatchedDir(dir).remove(sysPath.basename(path$
|
|
14304
|
+
_closePath(path$14) {
|
|
14305
|
+
this._closeFile(path$14);
|
|
14306
|
+
const dir = sysPath.dirname(path$14);
|
|
14307
|
+
this._getWatchedDir(dir).remove(sysPath.basename(path$14));
|
|
14308
14308
|
}
|
|
14309
14309
|
/**
|
|
14310
14310
|
* Closes only file-specific watchers
|
|
14311
14311
|
* @param {Path} path
|
|
14312
14312
|
*/
|
|
14313
|
-
_closeFile(path$
|
|
14314
|
-
const closers = this._closers.get(path$
|
|
14313
|
+
_closeFile(path$14) {
|
|
14314
|
+
const closers = this._closers.get(path$14);
|
|
14315
14315
|
if (!closers) return;
|
|
14316
14316
|
closers.forEach((closer) => closer());
|
|
14317
|
-
this._closers.delete(path$
|
|
14317
|
+
this._closers.delete(path$14);
|
|
14318
14318
|
}
|
|
14319
14319
|
/**
|
|
14320
14320
|
*
|
|
14321
14321
|
* @param {Path} path
|
|
14322
14322
|
* @param {Function} closer
|
|
14323
14323
|
*/
|
|
14324
|
-
_addPathCloser(path$
|
|
14324
|
+
_addPathCloser(path$14, closer) {
|
|
14325
14325
|
if (!closer) return;
|
|
14326
|
-
let list = this._closers.get(path$
|
|
14326
|
+
let list = this._closers.get(path$14);
|
|
14327
14327
|
if (!list) {
|
|
14328
14328
|
list = [];
|
|
14329
|
-
this._closers.set(path$
|
|
14329
|
+
this._closers.set(path$14, list);
|
|
14330
14330
|
}
|
|
14331
14331
|
list.push(closer);
|
|
14332
14332
|
}
|
|
@@ -14366,18 +14366,29 @@ var require_chokidar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14366
14366
|
}));
|
|
14367
14367
|
|
|
14368
14368
|
//#endregion
|
|
14369
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
14369
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js
|
|
14370
14370
|
var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14371
|
+
/** @import { ControlOperator } from './parse' */
|
|
14372
|
+
/** @type {ControlOperator['op'][]} */
|
|
14371
14373
|
var OPS = [
|
|
14372
14374
|
"||",
|
|
14373
14375
|
"&&",
|
|
14376
|
+
";;&",
|
|
14374
14377
|
";;",
|
|
14378
|
+
";&",
|
|
14375
14379
|
"|&",
|
|
14376
14380
|
"<(",
|
|
14381
|
+
">(",
|
|
14377
14382
|
"<<<",
|
|
14383
|
+
"<<-",
|
|
14384
|
+
"<<",
|
|
14378
14385
|
">>",
|
|
14379
14386
|
">&",
|
|
14387
|
+
">|",
|
|
14388
|
+
"&>>",
|
|
14389
|
+
"&>",
|
|
14380
14390
|
"<&",
|
|
14391
|
+
"<>",
|
|
14381
14392
|
"&",
|
|
14382
14393
|
";",
|
|
14383
14394
|
"(",
|
|
@@ -14387,52 +14398,71 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14387
14398
|
">"
|
|
14388
14399
|
];
|
|
14389
14400
|
var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
|
|
14390
|
-
var GLOB_SHELL_SPECIAL = /[\s#!"$&'()
|
|
14401
|
+
var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
|
|
14402
|
+
/** @type {typeof import('./quote')} */
|
|
14391
14403
|
module.exports = function quote(xs) {
|
|
14404
|
+
var sawComment = false;
|
|
14392
14405
|
return xs.map(function(s) {
|
|
14406
|
+
if (sawComment && typeof s === "string" && LINE_TERMINATORS.test(s)) throw new TypeError("a token after a `comment` must not contain line terminators");
|
|
14393
14407
|
if (s === "") return "''";
|
|
14394
14408
|
if (s && typeof s === "object") {
|
|
14395
|
-
if (s.op === "glob") {
|
|
14409
|
+
if ("op" in s && s.op === "glob") {
|
|
14396
14410
|
if (typeof s.pattern !== "string") throw new TypeError("glob token requires a string `pattern`");
|
|
14397
14411
|
if (LINE_TERMINATORS.test(s.pattern)) throw new TypeError("glob `pattern` must not contain line terminators");
|
|
14412
|
+
if (s.pattern === "") return "''";
|
|
14398
14413
|
return s.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
|
|
14399
14414
|
}
|
|
14400
|
-
if (typeof s.op === "string") {
|
|
14415
|
+
if ("op" in s && typeof s.op === "string") {
|
|
14401
14416
|
if (OPS.indexOf(s.op) < 0) throw new TypeError("invalid `op` value: " + JSON.stringify(s.op));
|
|
14402
14417
|
return s.op.replace(/[\s\S]/g, "\\$&");
|
|
14403
14418
|
}
|
|
14404
|
-
if (typeof s.comment === "string") {
|
|
14419
|
+
if ("comment" in s && typeof s.comment === "string") {
|
|
14405
14420
|
if (LINE_TERMINATORS.test(s.comment)) throw new TypeError("`comment` must not contain line terminators");
|
|
14421
|
+
sawComment = true;
|
|
14406
14422
|
return "#" + s.comment;
|
|
14407
14423
|
}
|
|
14408
14424
|
throw new TypeError("unrecognized object token shape");
|
|
14409
14425
|
}
|
|
14410
|
-
if (/
|
|
14411
|
-
if (/["
|
|
14412
|
-
|
|
14426
|
+
if (/'/.test(s) && /!/.test(s)) return "'" + s.replace(/'/g, "'\"'\"'") + "'";
|
|
14427
|
+
if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s + "'";
|
|
14428
|
+
if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`])/g, "\\$1") + "\"";
|
|
14429
|
+
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
|
|
14413
14430
|
}).join(" ");
|
|
14414
14431
|
};
|
|
14415
14432
|
}));
|
|
14416
14433
|
|
|
14417
14434
|
//#endregion
|
|
14418
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
14435
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js
|
|
14419
14436
|
var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14437
|
+
/**
|
|
14438
|
+
* @import {
|
|
14439
|
+
* ControlOperator,
|
|
14440
|
+
* Env,
|
|
14441
|
+
* GlobPattern,
|
|
14442
|
+
* ParseEntry,
|
|
14443
|
+
* } from './parse' */
|
|
14420
14444
|
var CONTROL = "(?:" + [
|
|
14421
14445
|
"\\|\\|",
|
|
14422
|
-
"
|
|
14423
|
-
"
|
|
14424
|
-
"
|
|
14446
|
+
"\\&(?:\\&|>>?)",
|
|
14447
|
+
";;\\&?",
|
|
14448
|
+
"[;|]\\&",
|
|
14425
14449
|
"\\<\\(",
|
|
14426
14450
|
"\\<\\<\\<",
|
|
14451
|
+
"\\<\\<-",
|
|
14452
|
+
"\\<\\<(?!\\()",
|
|
14427
14453
|
">>",
|
|
14428
|
-
"
|
|
14429
|
-
"
|
|
14454
|
+
">[&|(]",
|
|
14455
|
+
"<[&>]",
|
|
14430
14456
|
"[&;()|<>]"
|
|
14431
14457
|
].join("|") + ")";
|
|
14432
14458
|
var controlRE = /* @__PURE__ */ new RegExp("^" + CONTROL + "$");
|
|
14433
14459
|
var META = "|&;()<> \\t";
|
|
14434
|
-
var SINGLE_QUOTE = "
|
|
14435
|
-
var
|
|
14460
|
+
var SINGLE_QUOTE = "'([^']*?)'";
|
|
14461
|
+
var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
|
|
14462
|
+
var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
|
|
14463
|
+
var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
|
|
14464
|
+
var ANSI_C_LETTERS = "abeEfnrtv";
|
|
14465
|
+
var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
|
|
14436
14466
|
var hash = /^#$/;
|
|
14437
14467
|
var SQ = "'";
|
|
14438
14468
|
var DQ = "\"";
|
|
@@ -14441,17 +14471,26 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14441
14471
|
var mult = 4294967296;
|
|
14442
14472
|
for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
|
|
14443
14473
|
var startsWithToken = /* @__PURE__ */ new RegExp("^" + TOKEN);
|
|
14474
|
+
/**
|
|
14475
|
+
* @param {string} s
|
|
14476
|
+
* @param {RegExp} r
|
|
14477
|
+
*/
|
|
14444
14478
|
function matchAll(s, r$1) {
|
|
14445
14479
|
var origIndex = r$1.lastIndex;
|
|
14446
14480
|
var matches$2 = [];
|
|
14447
14481
|
var matchObj;
|
|
14448
14482
|
while (matchObj = r$1.exec(s)) {
|
|
14449
|
-
matches$2.
|
|
14483
|
+
matches$2[matches$2.length] = matchObj;
|
|
14450
14484
|
if (r$1.lastIndex === matchObj.index) r$1.lastIndex += 1;
|
|
14451
14485
|
}
|
|
14452
14486
|
r$1.lastIndex = origIndex;
|
|
14453
14487
|
return matches$2;
|
|
14454
14488
|
}
|
|
14489
|
+
/**
|
|
14490
|
+
* @param {Env} env
|
|
14491
|
+
* @param {string} pre
|
|
14492
|
+
* @param {string} key
|
|
14493
|
+
*/
|
|
14455
14494
|
function getVar(env$1, pre, key) {
|
|
14456
14495
|
var r$1 = typeof env$1 === "function" ? env$1(key) : env$1[key];
|
|
14457
14496
|
if (typeof r$1 === "undefined" && key != "") r$1 = "";
|
|
@@ -14459,11 +14498,51 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14459
14498
|
if (typeof r$1 === "object") return pre + TOKEN + JSON.stringify(r$1) + TOKEN;
|
|
14460
14499
|
return pre + r$1;
|
|
14461
14500
|
}
|
|
14501
|
+
var ansiCEscape = /\\([0-7]{1,3}|x[\dA-Fa-f]{1,2}|u[\dA-Fa-f]{1,4}|U[\dA-Fa-f]{1,8}|c(?:\\\\|[\s\S])|[abeEfnrtv\\'"?])/g;
|
|
14502
|
+
/**
|
|
14503
|
+
* @param {string} m
|
|
14504
|
+
* @param {string} escape
|
|
14505
|
+
*/
|
|
14506
|
+
function expandAnsiCEscape(m, escape$2) {
|
|
14507
|
+
var kind = escape$2.charAt(0);
|
|
14508
|
+
if (kind === "c") {
|
|
14509
|
+
var ctrl = escape$2.charAt(1);
|
|
14510
|
+
return ctrl === "?" ? "" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
|
|
14511
|
+
}
|
|
14512
|
+
if (kind === "x" || kind === "u" || kind === "U") {
|
|
14513
|
+
var cp$1 = parseInt(escape$2.slice(1), 16);
|
|
14514
|
+
if (cp$1 > 1114111) return m;
|
|
14515
|
+
return String.fromCharCode.apply(null, cp$1 > 65535 ? [55232 + (cp$1 >> 10), 56320 + (cp$1 & 1023)] : [cp$1]);
|
|
14516
|
+
}
|
|
14517
|
+
if (kind >= "0" && kind <= "7") return String.fromCharCode(parseInt(escape$2, 8) & 255);
|
|
14518
|
+
var letter = ANSI_C_LETTERS.indexOf(escape$2);
|
|
14519
|
+
return letter < 0 ? escape$2 : ANSI_C_CHARS.charAt(letter);
|
|
14520
|
+
}
|
|
14521
|
+
/** @param {string} body */
|
|
14522
|
+
function expandAnsiC(body) {
|
|
14523
|
+
return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
|
|
14524
|
+
}
|
|
14525
|
+
/**
|
|
14526
|
+
* @param {string} s
|
|
14527
|
+
* @param {number} i
|
|
14528
|
+
*/
|
|
14529
|
+
function closesAnsiC(s, i$1) {
|
|
14530
|
+
ansiCAt.lastIndex = i$1;
|
|
14531
|
+
return !!ansiCAt.exec(s)[1];
|
|
14532
|
+
}
|
|
14533
|
+
/**
|
|
14534
|
+
* @param {string} string
|
|
14535
|
+
* @param {Env} [env]
|
|
14536
|
+
* @param {{ escape?: string, splitUnquoted?: boolean | string }} [opts]
|
|
14537
|
+
* @returns {ParseEntry[]}
|
|
14538
|
+
*/
|
|
14462
14539
|
function parseInternal(string, env$1, opts) {
|
|
14463
14540
|
if (!opts) opts = {};
|
|
14464
14541
|
var BS = opts.escape || "\\";
|
|
14465
|
-
var
|
|
14466
|
-
var
|
|
14542
|
+
var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
|
|
14543
|
+
var BAREWORD = "(\\" + BS + "['\"$\\" + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + ")|[^\\s'\"$" + META + "])+";
|
|
14544
|
+
var DOUBLE_QUOTE = "\"(?:\\" + BS + "[\\s\\S]|[^\"\\" + BS + "])*\"";
|
|
14545
|
+
var matches$2 = matchAll(string, new RegExp(["(" + CONTROL + ")", "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"].join("|"), "g"));
|
|
14467
14546
|
if (matches$2.length === 0) return [];
|
|
14468
14547
|
if (!env$1) env$1 = {};
|
|
14469
14548
|
var commented = false;
|
|
@@ -14471,27 +14550,41 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14471
14550
|
var s = match[0];
|
|
14472
14551
|
if (!s || commented) return;
|
|
14473
14552
|
if (controlRE.test(s)) return { op: s };
|
|
14553
|
+
/** @type {string | boolean} */
|
|
14474
14554
|
var quote = false;
|
|
14475
14555
|
var esc = false;
|
|
14476
14556
|
var out = "";
|
|
14557
|
+
/** @type {string[]} */
|
|
14558
|
+
var words = [];
|
|
14559
|
+
var sawQuote = false;
|
|
14560
|
+
/** @type {number | null} */
|
|
14561
|
+
var pendingNw = null;
|
|
14477
14562
|
var isGlob$2 = false;
|
|
14563
|
+
/** @type {number} */
|
|
14478
14564
|
var i$1;
|
|
14479
14565
|
function parseEnvVar() {
|
|
14480
14566
|
i$1 += 1;
|
|
14567
|
+
/** @type {number | RegExpMatchArray | null} */
|
|
14481
14568
|
var varend;
|
|
14569
|
+
/** @type {string} */
|
|
14482
14570
|
var varname;
|
|
14483
14571
|
var char = s.charAt(i$1);
|
|
14484
14572
|
if (char === "{") {
|
|
14485
14573
|
i$1 += 1;
|
|
14486
14574
|
if (s.charAt(i$1) === "}") throw new Error("Bad substitution: " + s.slice(i$1 - 2, i$1 + 1));
|
|
14487
|
-
|
|
14488
|
-
|
|
14575
|
+
var depth = 1;
|
|
14576
|
+
varend = i$1;
|
|
14577
|
+
while (depth > 0 && varend < s.length) {
|
|
14578
|
+
if (s.charAt(varend) === "{" && s.charAt(varend - 1) === "$") depth += 1;
|
|
14579
|
+
else if (s.charAt(varend) === "}") depth -= 1;
|
|
14580
|
+
varend += 1;
|
|
14581
|
+
}
|
|
14582
|
+
if (depth !== 0) throw new Error("Bad substitution: " + s.slice(i$1));
|
|
14583
|
+
varend -= 1;
|
|
14489
14584
|
varname = s.slice(i$1, varend);
|
|
14490
14585
|
i$1 = varend;
|
|
14491
|
-
} else if (/[
|
|
14492
|
-
|
|
14493
|
-
i$1 += 1;
|
|
14494
|
-
} else {
|
|
14586
|
+
} else if (/[*@#?$!-]/.test(char)) varname = char;
|
|
14587
|
+
else {
|
|
14495
14588
|
var slicedFromI = s.slice(i$1);
|
|
14496
14589
|
varend = slicedFromI.match(/[^\w\d_]/);
|
|
14497
14590
|
if (!varend) {
|
|
@@ -14504,8 +14597,23 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14504
14597
|
}
|
|
14505
14598
|
return getVar(env$1, "", varname);
|
|
14506
14599
|
}
|
|
14600
|
+
function flushRun() {
|
|
14601
|
+
if (pendingNw === null) return;
|
|
14602
|
+
if (pendingNw === 0) {
|
|
14603
|
+
if (out !== "") {
|
|
14604
|
+
words[words.length] = out;
|
|
14605
|
+
out = "";
|
|
14606
|
+
}
|
|
14607
|
+
} else {
|
|
14608
|
+
words[words.length] = out;
|
|
14609
|
+
out = "";
|
|
14610
|
+
for (var fe = 1; fe < pendingNw; fe += 1) words[words.length] = "";
|
|
14611
|
+
}
|
|
14612
|
+
pendingNw = null;
|
|
14613
|
+
}
|
|
14507
14614
|
for (i$1 = 0; i$1 < s.length; i$1++) {
|
|
14508
14615
|
var c = s.charAt(i$1);
|
|
14616
|
+
if (ifs && c !== DS) flushRun();
|
|
14509
14617
|
isGlob$2 = isGlob$2 || !quote && (c === "*" || c === "?");
|
|
14510
14618
|
if (esc) {
|
|
14511
14619
|
out += c;
|
|
@@ -14519,50 +14627,87 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14519
14627
|
else out += BS + c;
|
|
14520
14628
|
} else if (c === DS) out += parseEnvVar();
|
|
14521
14629
|
else out += c;
|
|
14522
|
-
else if (c === DQ || c === SQ)
|
|
14523
|
-
|
|
14630
|
+
else if (c === DQ || c === SQ) {
|
|
14631
|
+
quote = c;
|
|
14632
|
+
sawQuote = true;
|
|
14633
|
+
} else if (controlRE.test(c)) return { op: s };
|
|
14524
14634
|
else if (hash.test(c)) {
|
|
14525
14635
|
commented = true;
|
|
14526
14636
|
var commentObj = { comment: string.slice(match.index + i$1 + 1) };
|
|
14527
14637
|
if (out.length) return [out, commentObj];
|
|
14528
14638
|
return [commentObj];
|
|
14529
14639
|
} else if (c === BS) esc = true;
|
|
14530
|
-
else if (c === DS)
|
|
14531
|
-
|
|
14640
|
+
else if (c === DS && s.charAt(i$1 + 1) === SQ && closesAnsiC(s, i$1)) {
|
|
14641
|
+
flushRun();
|
|
14642
|
+
sawQuote = true;
|
|
14643
|
+
out += expandAnsiC(s.slice(i$1 + 2, ansiCAt.lastIndex - 1));
|
|
14644
|
+
i$1 = ansiCAt.lastIndex - 1;
|
|
14645
|
+
} else if (c === DS) {
|
|
14646
|
+
var value$1 = parseEnvVar();
|
|
14647
|
+
if (!ifs) out += value$1;
|
|
14648
|
+
else for (var vi = 0; vi < value$1.length; vi += 1) {
|
|
14649
|
+
var vc = value$1.charAt(vi);
|
|
14650
|
+
if (ifs.indexOf(vc) < 0) {
|
|
14651
|
+
flushRun();
|
|
14652
|
+
out += vc;
|
|
14653
|
+
} else if (pendingNw === null) pendingNw = vc === " " || vc === " " || vc === "\n" ? 0 : 1;
|
|
14654
|
+
else if (vc !== " " && vc !== " " && vc !== "\n") pendingNw += 1;
|
|
14655
|
+
}
|
|
14656
|
+
} else out += c;
|
|
14532
14657
|
}
|
|
14533
14658
|
if (isGlob$2) return {
|
|
14534
14659
|
op: "glob",
|
|
14535
14660
|
pattern: out
|
|
14536
14661
|
};
|
|
14662
|
+
if (ifs) {
|
|
14663
|
+
if (pendingNw !== null && pendingNw > 0) {
|
|
14664
|
+
words[words.length] = out;
|
|
14665
|
+
out = "";
|
|
14666
|
+
for (var te = 1; te < pendingNw; te += 1) words[words.length] = "";
|
|
14667
|
+
}
|
|
14668
|
+
if (out !== "" || sawQuote && words.length === 0) words[words.length] = out;
|
|
14669
|
+
return words;
|
|
14670
|
+
}
|
|
14537
14671
|
return out;
|
|
14538
14672
|
}).reduce(function(prev, arg) {
|
|
14539
|
-
|
|
14673
|
+
if (typeof arg === "undefined") return prev;
|
|
14674
|
+
/** @type {ParseEntry[]} */ [].concat(arg).forEach(function(entry) {
|
|
14675
|
+
prev[prev.length] = entry;
|
|
14676
|
+
});
|
|
14677
|
+
return prev;
|
|
14540
14678
|
}, []);
|
|
14541
14679
|
}
|
|
14680
|
+
/** @type {typeof import('./parse')} */
|
|
14542
14681
|
module.exports = function parse$15(s, env$1, opts) {
|
|
14543
14682
|
var mapped = parseInternal(s, env$1, opts);
|
|
14544
14683
|
if (typeof env$1 !== "function") return mapped;
|
|
14545
14684
|
return mapped.reduce(function(acc, s$1) {
|
|
14546
|
-
if (typeof s$1 === "object")
|
|
14685
|
+
if (typeof s$1 === "object") {
|
|
14686
|
+
acc[acc.length] = s$1;
|
|
14687
|
+
return acc;
|
|
14688
|
+
}
|
|
14547
14689
|
var xs = s$1.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
|
14548
|
-
if (xs.length === 1)
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14690
|
+
if (xs.length === 1) {
|
|
14691
|
+
acc[acc.length] = xs[0];
|
|
14692
|
+
return acc;
|
|
14693
|
+
}
|
|
14694
|
+
xs.filter(Boolean).forEach(function(x) {
|
|
14695
|
+
acc[acc.length] = startsWithToken.test(x) ? JSON.parse(x.split(TOKEN)[1]) : x;
|
|
14696
|
+
});
|
|
14697
|
+
return acc;
|
|
14553
14698
|
}, []);
|
|
14554
14699
|
};
|
|
14555
14700
|
}));
|
|
14556
14701
|
|
|
14557
14702
|
//#endregion
|
|
14558
|
-
//#region ../../node_modules/.pnpm/shell-quote@1.
|
|
14703
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js
|
|
14559
14704
|
var require_shell_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14560
14705
|
exports.quote = require_quote();
|
|
14561
14706
|
exports.parse = require_parse$1();
|
|
14562
14707
|
}));
|
|
14563
14708
|
|
|
14564
14709
|
//#endregion
|
|
14565
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
14710
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/macos.js
|
|
14566
14711
|
var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14567
14712
|
module.exports = {
|
|
14568
14713
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
@@ -14598,7 +14743,7 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14598
14743
|
}));
|
|
14599
14744
|
|
|
14600
14745
|
//#endregion
|
|
14601
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
14746
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/linux.js
|
|
14602
14747
|
var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14603
14748
|
module.exports = {
|
|
14604
14749
|
atom: "atom",
|
|
@@ -14633,7 +14778,7 @@ var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14633
14778
|
}));
|
|
14634
14779
|
|
|
14635
14780
|
//#endregion
|
|
14636
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
14781
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/editor-info/windows.js
|
|
14637
14782
|
var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14638
14783
|
module.exports = [
|
|
14639
14784
|
"Brackets.exe",
|
|
@@ -14667,9 +14812,9 @@ var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14667
14812
|
}));
|
|
14668
14813
|
|
|
14669
14814
|
//#endregion
|
|
14670
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
14815
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/guess.js
|
|
14671
14816
|
var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14672
|
-
const path$
|
|
14817
|
+
const path$9 = __require("path");
|
|
14673
14818
|
const shellQuote = require_shell_quote();
|
|
14674
14819
|
const childProcess$2 = __require("child_process");
|
|
14675
14820
|
const COMMON_EDITORS_MACOS = require_macos();
|
|
@@ -14693,7 +14838,7 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14693
14838
|
const runningProcesses = output.split("\r\n");
|
|
14694
14839
|
for (let i$1 = 0; i$1 < runningProcesses.length; i$1++) {
|
|
14695
14840
|
const fullProcessPath = runningProcesses[i$1].trim();
|
|
14696
|
-
const shortProcessName = path$
|
|
14841
|
+
const shortProcessName = path$9.win32.basename(fullProcessPath);
|
|
14697
14842
|
if (COMMON_EDITORS_WIN.indexOf(shortProcessName) !== -1) return fullProcessPath;
|
|
14698
14843
|
}
|
|
14699
14844
|
}
|
|
@@ -14743,11 +14888,15 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14743
14888
|
}));
|
|
14744
14889
|
|
|
14745
14890
|
//#endregion
|
|
14746
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
14891
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/get-args.js
|
|
14747
14892
|
var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14748
|
-
const
|
|
14749
|
-
|
|
14750
|
-
|
|
14893
|
+
const os$1 = __require("os");
|
|
14894
|
+
const path$8 = __require("path");
|
|
14895
|
+
module.exports = function getArgumentsForFile$1(editor, fileName, lineNumber, columnNumber = 1) {
|
|
14896
|
+
fileName = path$8.resolve(fileName);
|
|
14897
|
+
if (process.platform === "linux" && fileName.startsWith("/mnt/") && /Microsoft/i.test(os$1.release())) fileName = `./${path$8.relative("", fileName)}`;
|
|
14898
|
+
if (!lineNumber) return [fileName];
|
|
14899
|
+
switch (path$8.basename(editor).replace(/\.(exe|cmd|bat)$/i, "")) {
|
|
14751
14900
|
case "atom":
|
|
14752
14901
|
case "Atom":
|
|
14753
14902
|
case "Atom Beta":
|
|
@@ -14823,7 +14972,44 @@ var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14823
14972
|
}));
|
|
14824
14973
|
|
|
14825
14974
|
//#endregion
|
|
14826
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.14.
|
|
14975
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/construct-windows-launch-command.js
|
|
14976
|
+
var require_construct_windows_launch_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14977
|
+
function escapeCmdArgs(cmdArgs) {
|
|
14978
|
+
return cmdArgs.replace(/([&|<>,;=^])/g, "^$1");
|
|
14979
|
+
}
|
|
14980
|
+
function doubleQuoteIfNeeded(str) {
|
|
14981
|
+
if (str.includes("^")) return `^"${str}^"`;
|
|
14982
|
+
else if (str.includes(" ")) return `"${str}"`;
|
|
14983
|
+
return str;
|
|
14984
|
+
}
|
|
14985
|
+
function constructWindowsLaunchCommand$1(editor, args) {
|
|
14986
|
+
if (args.some((arg) => /[\r\n]/.test(arg))) throw new Error("Cannot launch an editor with an argument containing a line break");
|
|
14987
|
+
if (args.some((arg) => arg.includes("%"))) throw new Error("Cannot launch an editor with an argument containing \"%\"");
|
|
14988
|
+
return [editor, ...args.map(escapeCmdArgs)].map(doubleQuoteIfNeeded).join(" ");
|
|
14989
|
+
}
|
|
14990
|
+
module.exports = constructWindowsLaunchCommand$1;
|
|
14991
|
+
}));
|
|
14992
|
+
|
|
14993
|
+
//#endregion
|
|
14994
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/parse-file.js
|
|
14995
|
+
var require_parse_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14996
|
+
const path$7 = __require("path");
|
|
14997
|
+
const positionRE = /:(\d+)(:(\d+))?$/;
|
|
14998
|
+
module.exports = function parseFile$2(file) {
|
|
14999
|
+
if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
|
|
15000
|
+
const unresolvedFileName = file.replace(positionRE, "");
|
|
15001
|
+
const fileName = unresolvedFileName ? path$7.resolve(unresolvedFileName) : "";
|
|
15002
|
+
const match = file.match(positionRE);
|
|
15003
|
+
return {
|
|
15004
|
+
fileName,
|
|
15005
|
+
lineNumber: match && match[1],
|
|
15006
|
+
columnNumber: match && match[3]
|
|
15007
|
+
};
|
|
15008
|
+
};
|
|
15009
|
+
}));
|
|
15010
|
+
|
|
15011
|
+
//#endregion
|
|
15012
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.14.2/node_modules/launch-editor/index.js
|
|
14827
15013
|
var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14828
15014
|
/**
|
|
14829
15015
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
@@ -14835,12 +15021,13 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
14835
15021
|
* Modified by Yuxi Evan You
|
|
14836
15022
|
*/
|
|
14837
15023
|
const fs$5 = __require("fs");
|
|
14838
|
-
const os$1 = __require("os");
|
|
14839
15024
|
const path$6 = __require("path");
|
|
14840
15025
|
const colors$27 = require_picocolors();
|
|
14841
15026
|
const childProcess$1 = __require("child_process");
|
|
14842
15027
|
const guessEditor = require_guess();
|
|
14843
|
-
const
|
|
15028
|
+
const getArgumentsForFile = require_get_args();
|
|
15029
|
+
const constructWindowsLaunchCommand = require_construct_windows_launch_command();
|
|
15030
|
+
const parseFile = require_parse_file();
|
|
14844
15031
|
function wrapErrorCallback(cb) {
|
|
14845
15032
|
return (fileName, errorMessage) => {
|
|
14846
15033
|
console.log();
|
|
@@ -14861,55 +15048,36 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
14861
15048
|
}
|
|
14862
15049
|
return false;
|
|
14863
15050
|
}
|
|
14864
|
-
const positionRE = /:(\d+)(:(\d+))?$/;
|
|
14865
|
-
function parseFile(file) {
|
|
14866
|
-
if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
|
|
14867
|
-
const fileName = file.replace(positionRE, "");
|
|
14868
|
-
const match = file.match(positionRE);
|
|
14869
|
-
return {
|
|
14870
|
-
fileName,
|
|
14871
|
-
lineNumber: match && match[1],
|
|
14872
|
-
columnNumber: match && match[3]
|
|
14873
|
-
};
|
|
14874
|
-
}
|
|
14875
15051
|
let currentChildProcess = null;
|
|
14876
15052
|
function launchEditor(file, specifiedEditor, onErrorCallback) {
|
|
14877
|
-
const
|
|
14878
|
-
let { fileName } = parsed;
|
|
14879
|
-
const { lineNumber, columnNumber } = parsed;
|
|
14880
|
-
if (process.platform === "win32" && path$6.resolve(fileName).startsWith("\\\\")) return onErrorCallback(fileName, "UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");
|
|
14881
|
-
if (!fs$5.existsSync(fileName)) return;
|
|
15053
|
+
const { fileName, lineNumber, columnNumber } = parseFile(file);
|
|
14882
15054
|
if (typeof specifiedEditor === "function") {
|
|
14883
15055
|
onErrorCallback = specifiedEditor;
|
|
14884
15056
|
specifiedEditor = void 0;
|
|
14885
15057
|
}
|
|
14886
15058
|
onErrorCallback = wrapErrorCallback(onErrorCallback);
|
|
15059
|
+
if (process.platform === "win32" && fileName.startsWith("\\\\")) return onErrorCallback(fileName, "UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");
|
|
15060
|
+
if (!fs$5.existsSync(fileName)) return;
|
|
14887
15061
|
const [editor, ...args] = guessEditor(specifiedEditor);
|
|
14888
15062
|
if (!editor) {
|
|
14889
15063
|
onErrorCallback(fileName, null);
|
|
14890
15064
|
return;
|
|
14891
15065
|
}
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
15066
|
+
const extraArgs = getArgumentsForFile(editor, fileName, lineNumber, columnNumber);
|
|
15067
|
+
args.push.apply(args, extraArgs);
|
|
15068
|
+
let launchCommand;
|
|
15069
|
+
if (process.platform === "win32") try {
|
|
15070
|
+
launchCommand = constructWindowsLaunchCommand(editor, args);
|
|
15071
|
+
} catch (error$1) {
|
|
15072
|
+
onErrorCallback(fileName, error$1.message);
|
|
15073
|
+
return;
|
|
15074
|
+
}
|
|
14897
15075
|
if (currentChildProcess && isTerminalEditor(editor)) currentChildProcess.kill("SIGKILL");
|
|
14898
|
-
if (process.platform === "win32") {
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
if (str.includes("^")) return `^"${str}^"`;
|
|
14904
|
-
else if (str.includes(" ")) return `"${str}"`;
|
|
14905
|
-
return str;
|
|
14906
|
-
}
|
|
14907
|
-
const launchCommand = [editor, ...args.map(escapeCmdArgs)].map(doubleQuoteIfNeeded).join(" ");
|
|
14908
|
-
currentChildProcess = childProcess$1.exec(launchCommand, {
|
|
14909
|
-
stdio: "inherit",
|
|
14910
|
-
shell: true
|
|
14911
|
-
});
|
|
14912
|
-
} else currentChildProcess = childProcess$1.spawn(editor, args, { stdio: "inherit" });
|
|
15076
|
+
if (process.platform === "win32") currentChildProcess = childProcess$1.exec(launchCommand, {
|
|
15077
|
+
stdio: "inherit",
|
|
15078
|
+
shell: true
|
|
15079
|
+
});
|
|
15080
|
+
else currentChildProcess = childProcess$1.spawn(editor, args, { stdio: "inherit" });
|
|
14913
15081
|
currentChildProcess.on("exit", function(errorCode) {
|
|
14914
15082
|
currentChildProcess = null;
|
|
14915
15083
|
if (errorCode) onErrorCallback(fileName, "(code " + errorCode + ")");
|
|
@@ -14924,7 +15092,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
14924
15092
|
}));
|
|
14925
15093
|
|
|
14926
15094
|
//#endregion
|
|
14927
|
-
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.14.
|
|
15095
|
+
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.14.2/node_modules/launch-editor-middleware/index.js
|
|
14928
15096
|
var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14929
15097
|
const path$5 = __require("path");
|
|
14930
15098
|
const launch = require_launch_editor();
|
|
@@ -16155,28 +16323,28 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16155
16323
|
module.exports = isexe$3;
|
|
16156
16324
|
isexe$3.sync = sync$2;
|
|
16157
16325
|
var fs$4 = __require("fs");
|
|
16158
|
-
function checkPathExt(path$
|
|
16326
|
+
function checkPathExt(path$14, options$1) {
|
|
16159
16327
|
var pathext = options$1.pathExt !== void 0 ? options$1.pathExt : process.env.PATHEXT;
|
|
16160
16328
|
if (!pathext) return true;
|
|
16161
16329
|
pathext = pathext.split(";");
|
|
16162
16330
|
if (pathext.indexOf("") !== -1) return true;
|
|
16163
16331
|
for (var i$1 = 0; i$1 < pathext.length; i$1++) {
|
|
16164
16332
|
var p = pathext[i$1].toLowerCase();
|
|
16165
|
-
if (p && path$
|
|
16333
|
+
if (p && path$14.substr(-p.length).toLowerCase() === p) return true;
|
|
16166
16334
|
}
|
|
16167
16335
|
return false;
|
|
16168
16336
|
}
|
|
16169
|
-
function checkStat$1(stat$4, path$
|
|
16337
|
+
function checkStat$1(stat$4, path$14, options$1) {
|
|
16170
16338
|
if (!stat$4.isSymbolicLink() && !stat$4.isFile()) return false;
|
|
16171
|
-
return checkPathExt(path$
|
|
16339
|
+
return checkPathExt(path$14, options$1);
|
|
16172
16340
|
}
|
|
16173
|
-
function isexe$3(path$
|
|
16174
|
-
fs$4.stat(path$
|
|
16175
|
-
cb(er, er ? false : checkStat$1(stat$4, path$
|
|
16341
|
+
function isexe$3(path$14, options$1, cb) {
|
|
16342
|
+
fs$4.stat(path$14, function(er, stat$4) {
|
|
16343
|
+
cb(er, er ? false : checkStat$1(stat$4, path$14, options$1));
|
|
16176
16344
|
});
|
|
16177
16345
|
}
|
|
16178
|
-
function sync$2(path$
|
|
16179
|
-
return checkStat$1(fs$4.statSync(path$
|
|
16346
|
+
function sync$2(path$14, options$1) {
|
|
16347
|
+
return checkStat$1(fs$4.statSync(path$14), path$14, options$1);
|
|
16180
16348
|
}
|
|
16181
16349
|
}));
|
|
16182
16350
|
|
|
@@ -16186,13 +16354,13 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16186
16354
|
module.exports = isexe$2;
|
|
16187
16355
|
isexe$2.sync = sync$1;
|
|
16188
16356
|
var fs$3 = __require("fs");
|
|
16189
|
-
function isexe$2(path$
|
|
16190
|
-
fs$3.stat(path$
|
|
16357
|
+
function isexe$2(path$14, options$1, cb) {
|
|
16358
|
+
fs$3.stat(path$14, function(er, stat$4) {
|
|
16191
16359
|
cb(er, er ? false : checkStat(stat$4, options$1));
|
|
16192
16360
|
});
|
|
16193
16361
|
}
|
|
16194
|
-
function sync$1(path$
|
|
16195
|
-
return checkStat(fs$3.statSync(path$
|
|
16362
|
+
function sync$1(path$14, options$1) {
|
|
16363
|
+
return checkStat(fs$3.statSync(path$14), options$1);
|
|
16196
16364
|
}
|
|
16197
16365
|
function checkStat(stat$4, options$1) {
|
|
16198
16366
|
return stat$4.isFile() && checkMode(stat$4, options$1);
|
|
@@ -16220,7 +16388,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16220
16388
|
else core = require_mode();
|
|
16221
16389
|
module.exports = isexe$1;
|
|
16222
16390
|
isexe$1.sync = sync;
|
|
16223
|
-
function isexe$1(path$
|
|
16391
|
+
function isexe$1(path$14, options$1, cb) {
|
|
16224
16392
|
if (typeof options$1 === "function") {
|
|
16225
16393
|
cb = options$1;
|
|
16226
16394
|
options$1 = {};
|
|
@@ -16228,13 +16396,13 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16228
16396
|
if (!cb) {
|
|
16229
16397
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
16230
16398
|
return new Promise(function(resolve$4, reject) {
|
|
16231
|
-
isexe$1(path$
|
|
16399
|
+
isexe$1(path$14, options$1 || {}, function(er, is) {
|
|
16232
16400
|
if (er) reject(er);
|
|
16233
16401
|
else resolve$4(is);
|
|
16234
16402
|
});
|
|
16235
16403
|
});
|
|
16236
16404
|
}
|
|
16237
|
-
core(path$
|
|
16405
|
+
core(path$14, options$1 || {}, function(er, is) {
|
|
16238
16406
|
if (er) {
|
|
16239
16407
|
if (er.code === "EACCES" || options$1 && options$1.ignoreErrors) {
|
|
16240
16408
|
er = null;
|
|
@@ -16244,9 +16412,9 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16244
16412
|
cb(er, is);
|
|
16245
16413
|
});
|
|
16246
16414
|
}
|
|
16247
|
-
function sync(path$
|
|
16415
|
+
function sync(path$14, options$1) {
|
|
16248
16416
|
try {
|
|
16249
|
-
return core.sync(path$
|
|
16417
|
+
return core.sync(path$14, options$1 || {});
|
|
16250
16418
|
} catch (er) {
|
|
16251
16419
|
if (options$1 && options$1.ignoreErrors || er.code === "EACCES") return false;
|
|
16252
16420
|
else throw er;
|
|
@@ -16405,8 +16573,8 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
16405
16573
|
module.exports = (string = "") => {
|
|
16406
16574
|
const match = string.match(shebangRegex);
|
|
16407
16575
|
if (!match) return null;
|
|
16408
|
-
const [path$
|
|
16409
|
-
const binary = path$
|
|
16576
|
+
const [path$14, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
16577
|
+
const binary = path$14.split("/").pop();
|
|
16410
16578
|
if (binary === "env") return argument;
|
|
16411
16579
|
return argument ? `${binary} ${argument}` : binary;
|
|
16412
16580
|
};
|
|
@@ -22587,9 +22755,9 @@ function isFileLoadingAllowed(config$2, filePath) {
|
|
|
22587
22755
|
if (fs$12.allow.some((uri) => isFileInTargetPath(uri, filePath))) return true;
|
|
22588
22756
|
return false;
|
|
22589
22757
|
}
|
|
22590
|
-
function checkLoadingAccess(config$2, path$
|
|
22591
|
-
if (isFileLoadingAllowed(config$2, slash(path$
|
|
22592
|
-
if (isFileReadable(path$
|
|
22758
|
+
function checkLoadingAccess(config$2, path$14) {
|
|
22759
|
+
if (isFileLoadingAllowed(config$2, slash(path$14))) return "allowed";
|
|
22760
|
+
if (isFileReadable(path$14)) return "denied";
|
|
22593
22761
|
return "fallback";
|
|
22594
22762
|
}
|
|
22595
22763
|
function respondWithAccessDenied(id, server, res) {
|
|
@@ -24726,8 +24894,9 @@ function createDevHtmlTransformFn(config$2) {
|
|
|
24726
24894
|
};
|
|
24727
24895
|
}
|
|
24728
24896
|
function getHtmlFilename(url$3, server) {
|
|
24729
|
-
|
|
24730
|
-
|
|
24897
|
+
const urlPath = cleanUrl(url$3);
|
|
24898
|
+
if (urlPath.startsWith(FS_PREFIX)) return decodeURIComponent(fsPathFromId(urlPath));
|
|
24899
|
+
else return decodeURIComponent(normalizePath(path.join(server.config.root, urlPath.slice(1))));
|
|
24731
24900
|
}
|
|
24732
24901
|
function shouldPreTransform(url$3, config$2) {
|
|
24733
24902
|
return !checkPublicFile(url$3, config$2) && (isJSRequest(url$3) || isCSSRequest(url$3));
|
|
@@ -24736,6 +24905,7 @@ const wordCharRE = /\w/;
|
|
|
24736
24905
|
function isBareRelative(url$3) {
|
|
24737
24906
|
return wordCharRE.test(url$3[0]) && !url$3.includes(":");
|
|
24738
24907
|
}
|
|
24908
|
+
const multipleLeadingSlashesRE = /^\/{2,}/g;
|
|
24739
24909
|
const processNodeUrl = (url$3, useSrcSetReplacer, config$2, htmlPath, originalUrl, server, isClassicScriptLink) => {
|
|
24740
24910
|
const replacer = (url$4) => {
|
|
24741
24911
|
if (url$4[0] === "/" && url$4[1] !== "/" || (url$4[0] === "." || isBareRelative(url$4)) && originalUrl && originalUrl !== "/" && htmlPath === "/index.html") url$4 = path.posix.join(config$2.base, url$4);
|
|
@@ -24761,6 +24931,7 @@ const processNodeUrl = (url$3, useSrcSetReplacer, config$2, htmlPath, originalUr
|
|
|
24761
24931
|
return useSrcSetReplacer ? processSrcSetSync(url$3, ({ url: url$4 }) => replacer(url$4)) : replacer(url$3);
|
|
24762
24932
|
};
|
|
24763
24933
|
const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl }) => {
|
|
24934
|
+
if (htmlPath.startsWith("//")) htmlPath = htmlPath.replace(multipleLeadingSlashesRE, "/");
|
|
24764
24935
|
const { config: config$2, watcher } = server;
|
|
24765
24936
|
const base = config$2.base || "/";
|
|
24766
24937
|
const decodedBase = config$2.decodedBase || "/";
|
|
@@ -25355,10 +25526,10 @@ function notFoundMiddleware() {
|
|
|
25355
25526
|
//#region src/node/server/searchRoot.ts
|
|
25356
25527
|
const ROOT_FILES = ["pnpm-workspace.yaml", "lerna.json"];
|
|
25357
25528
|
function hasWorkspacePackageJSON(root) {
|
|
25358
|
-
const path$
|
|
25359
|
-
if (!isFileReadable(path$
|
|
25529
|
+
const path$14 = join(root, "package.json");
|
|
25530
|
+
if (!isFileReadable(path$14)) return false;
|
|
25360
25531
|
try {
|
|
25361
|
-
return !!(JSON.parse(fs.readFileSync(path$
|
|
25532
|
+
return !!(JSON.parse(fs.readFileSync(path$14, "utf-8")) || {}).workspaces;
|
|
25362
25533
|
} catch {
|
|
25363
25534
|
return false;
|
|
25364
25535
|
}
|
|
@@ -25367,8 +25538,8 @@ function hasRootFile(root) {
|
|
|
25367
25538
|
return ROOT_FILES.some((file) => fs.existsSync(join(root, file)));
|
|
25368
25539
|
}
|
|
25369
25540
|
function hasPackageJSON(root) {
|
|
25370
|
-
const path$
|
|
25371
|
-
return fs.existsSync(path$
|
|
25541
|
+
const path$14 = join(root, "package.json");
|
|
25542
|
+
return fs.existsSync(path$14);
|
|
25372
25543
|
}
|
|
25373
25544
|
/**
|
|
25374
25545
|
* Search up for the nearest `package.json`
|
|
@@ -25572,13 +25743,13 @@ async function _createServer(inlineConfig = {}, options$1) {
|
|
|
25572
25743
|
const options$2 = server.config.server;
|
|
25573
25744
|
const url$3 = getServerUrlByHost(server.resolvedUrls, options$2.host);
|
|
25574
25745
|
if (url$3) {
|
|
25575
|
-
const path$
|
|
25746
|
+
const path$14 = typeof options$2.open === "string" ? new URL(options$2.open, url$3).href : url$3;
|
|
25576
25747
|
if (server.config.server.preTransformRequests) setTimeout(() => {
|
|
25577
|
-
(path$
|
|
25748
|
+
(path$14.startsWith("https:") ? get$1 : get)(path$14, { headers: { Accept: "text/html" } }, (res) => {
|
|
25578
25749
|
res.on("end", () => {});
|
|
25579
25750
|
}).on("error", () => {}).end();
|
|
25580
25751
|
}, 0);
|
|
25581
|
-
openBrowser(path$
|
|
25752
|
+
openBrowser(path$14, true, server.config.logger);
|
|
25582
25753
|
} else server.config.logger.warn("No URL available to open in browser");
|
|
25583
25754
|
},
|
|
25584
25755
|
async close() {
|
|
@@ -25640,11 +25811,11 @@ async function _createServer(inlineConfig = {}, options$1) {
|
|
|
25640
25811
|
await Promise.all(Object.values(server.environments).map((environment) => environment.pluginContainer.watchChange(file, { event: isUnlink ? "delete" : "create" })));
|
|
25641
25812
|
if (publicDir && publicFiles) {
|
|
25642
25813
|
if (file.startsWith(publicDir)) {
|
|
25643
|
-
const path$
|
|
25644
|
-
publicFiles[isUnlink ? "delete" : "add"](path$
|
|
25814
|
+
const path$14 = file.slice(publicDir.length);
|
|
25815
|
+
publicFiles[isUnlink ? "delete" : "add"](path$14);
|
|
25645
25816
|
if (!isUnlink) {
|
|
25646
25817
|
const clientModuleGraph = server.environments.client.moduleGraph;
|
|
25647
|
-
const etag$1 = (await clientModuleGraph.getModuleByUrl(path$
|
|
25818
|
+
const etag$1 = (await clientModuleGraph.getModuleByUrl(path$14))?.transformResult?.etag;
|
|
25648
25819
|
if (etag$1) clientModuleGraph.etagToModuleMap.delete(etag$1);
|
|
25649
25820
|
}
|
|
25650
25821
|
}
|
|
@@ -27255,8 +27426,8 @@ function importAnalysisPlugin(config$2) {
|
|
|
27255
27426
|
if (specifier === clientPublicPath) return;
|
|
27256
27427
|
if (specifier[0] === "/" && !(config$2.assetsInclude(cleanUrl(specifier)) || urlRE.test(specifier)) && checkPublicFile(specifier, config$2)) throw new Error(`Cannot import non-asset file ${specifier} which is inside /public. JS/CSS files inside /public are copied as-is on build and can only be referenced via <script src> or <link href> in html. If you want to get the URL of that file, use ${injectQuery(specifier, "url")} instead.`);
|
|
27257
27428
|
let [url$3, resolvedId] = await normalizeUrl(specifier, start);
|
|
27429
|
+
if (resolvedId) config$2.safeModulePaths.add(cleanUrl(resolvedId));
|
|
27258
27430
|
resolvedId = resolvedId || url$3;
|
|
27259
|
-
config$2.safeModulePaths.add(fsPathFromUrl(stripBase(url$3, base)));
|
|
27260
27431
|
if (url$3 !== specifier) {
|
|
27261
27432
|
let rewriteDone = false;
|
|
27262
27433
|
if (depsOptimizer?.isOptimizedDepFile(resolvedId) && !optimizedDepChunkRE.test(resolvedId)) {
|
|
@@ -27937,11 +28108,11 @@ function dynamicImportToGlob(node, sourceString) {
|
|
|
27937
28108
|
const dynamicImportHelperId = "\0vite/dynamic-import-helper.js";
|
|
27938
28109
|
const relativePathRE = /^\.{1,2}\//;
|
|
27939
28110
|
const hasDynamicImportRE = /\bimport\s*[(/]/;
|
|
27940
|
-
const dynamicImportHelper = (glob$1, path$
|
|
27941
|
-
const v = glob$1[path$
|
|
28111
|
+
const dynamicImportHelper = (glob$1, path$14, segs) => {
|
|
28112
|
+
const v = glob$1[path$14];
|
|
27942
28113
|
if (v) return typeof v === "function" ? v() : Promise.resolve(v);
|
|
27943
28114
|
return new Promise((_, reject) => {
|
|
27944
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + path$
|
|
28115
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + path$14 + (path$14.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : ""))));
|
|
27945
28116
|
});
|
|
27946
28117
|
};
|
|
27947
28118
|
function parseDynamicImportPattern(strings) {
|
|
@@ -28333,8 +28504,8 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
|
28333
28504
|
files: matchedFiles
|
|
28334
28505
|
};
|
|
28335
28506
|
}
|
|
28336
|
-
function globSafePath(path$
|
|
28337
|
-
return escapePath(normalizePath(path$
|
|
28507
|
+
function globSafePath(path$14) {
|
|
28508
|
+
return escapePath(normalizePath(path$14));
|
|
28338
28509
|
}
|
|
28339
28510
|
function lastNthChar(str, n$2) {
|
|
28340
28511
|
return str.charAt(str.length - 1 - n$2);
|
|
@@ -30739,7 +30910,7 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
|
|
|
30739
30910
|
};
|
|
30740
30911
|
};
|
|
30741
30912
|
return new WorkerWithFallback(async () => {
|
|
30742
|
-
const [fsp$1, path$
|
|
30913
|
+
const [fsp$1, path$14] = await Promise.all([import("node:fs/promises"), import("node:path")]);
|
|
30743
30914
|
let ViteLessManager;
|
|
30744
30915
|
const createViteLessPlugin = (less, rootFile) => {
|
|
30745
30916
|
const { FileManager } = less;
|
|
@@ -30758,7 +30929,7 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
|
|
|
30758
30929
|
async loadFile(filename, dir, opts, env$1) {
|
|
30759
30930
|
const result = await viteLessResolve(filename, dir, this.rootFile, opts.mime);
|
|
30760
30931
|
if (result) return {
|
|
30761
|
-
filename: path$
|
|
30932
|
+
filename: path$14.resolve(result.resolved),
|
|
30762
30933
|
contents: result.contents ?? await fsp$1.readFile(result.resolved, "utf-8")
|
|
30763
30934
|
};
|
|
30764
30935
|
else return super.loadFile(filename, dir, opts, env$1);
|
|
@@ -31331,7 +31502,7 @@ function esbuildDepPlugin(environment, qualified, external) {
|
|
|
31331
31502
|
build$3.onLoad({
|
|
31332
31503
|
filter: /.*/,
|
|
31333
31504
|
namespace: "browser-external"
|
|
31334
|
-
}, ({ path: path$
|
|
31505
|
+
}, ({ path: path$14 }) => {
|
|
31335
31506
|
if (isProduction) return { contents: "module.exports = {}" };
|
|
31336
31507
|
else return { contents: `\
|
|
31337
31508
|
module.exports = Object.create(new Proxy({}, {
|
|
@@ -31342,7 +31513,7 @@ module.exports = Object.create(new Proxy({}, {
|
|
|
31342
31513
|
key !== 'constructor' &&
|
|
31343
31514
|
key !== 'splice'
|
|
31344
31515
|
) {
|
|
31345
|
-
console.warn(\`Module "${path$
|
|
31516
|
+
console.warn(\`Module "${path$14}" has been externalized for browser compatibility. Cannot access "${path$14}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
|
|
31346
31517
|
}
|
|
31347
31518
|
}
|
|
31348
31519
|
}))` };
|
|
@@ -31350,8 +31521,8 @@ module.exports = Object.create(new Proxy({}, {
|
|
|
31350
31521
|
build$3.onLoad({
|
|
31351
31522
|
filter: /.*/,
|
|
31352
31523
|
namespace: "optional-peer-dep"
|
|
31353
|
-
}, ({ path: path$
|
|
31354
|
-
const [, peerDep, parentDep] = path$
|
|
31524
|
+
}, ({ path: path$14 }) => {
|
|
31525
|
+
const [, peerDep, parentDep] = path$14.split(":");
|
|
31355
31526
|
return { contents: `module.exports = {};throw new Error(\`Could not resolve "${peerDep}" imported by "${parentDep}".${isProduction ? "" : " Is it installed?"}\`)` };
|
|
31356
31527
|
});
|
|
31357
31528
|
}
|
|
@@ -31593,10 +31764,10 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
|
31593
31764
|
"@vite/client",
|
|
31594
31765
|
"@vite/env"
|
|
31595
31766
|
];
|
|
31596
|
-
const isUnlessEntry = (path$
|
|
31597
|
-
const externalUnlessEntry = ({ path: path$
|
|
31598
|
-
path: path$
|
|
31599
|
-
external: isUnlessEntry(path$
|
|
31767
|
+
const isUnlessEntry = (path$14) => !entries.includes(path$14);
|
|
31768
|
+
const externalUnlessEntry = ({ path: path$14 }) => ({
|
|
31769
|
+
path: path$14,
|
|
31770
|
+
external: isUnlessEntry(path$14)
|
|
31600
31771
|
});
|
|
31601
31772
|
const doTransformGlobImport = async (contents, id, loader$1) => {
|
|
31602
31773
|
let transpiledContents;
|
|
@@ -31608,31 +31779,31 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
|
31608
31779
|
name: "vite:dep-scan",
|
|
31609
31780
|
setup(build$3) {
|
|
31610
31781
|
const scripts = {};
|
|
31611
|
-
build$3.onResolve({ filter: externalRE }, ({ path: path$
|
|
31612
|
-
path: path$
|
|
31782
|
+
build$3.onResolve({ filter: externalRE }, ({ path: path$14 }) => ({
|
|
31783
|
+
path: path$14,
|
|
31613
31784
|
external: true
|
|
31614
31785
|
}));
|
|
31615
|
-
build$3.onResolve({ filter: dataUrlRE }, ({ path: path$
|
|
31616
|
-
path: path$
|
|
31786
|
+
build$3.onResolve({ filter: dataUrlRE }, ({ path: path$14 }) => ({
|
|
31787
|
+
path: path$14,
|
|
31617
31788
|
external: true
|
|
31618
31789
|
}));
|
|
31619
|
-
build$3.onResolve({ filter: virtualModuleRE }, ({ path: path$
|
|
31790
|
+
build$3.onResolve({ filter: virtualModuleRE }, ({ path: path$14 }) => {
|
|
31620
31791
|
return {
|
|
31621
|
-
path: path$
|
|
31792
|
+
path: path$14.replace(virtualModulePrefix, ""),
|
|
31622
31793
|
namespace: "script"
|
|
31623
31794
|
};
|
|
31624
31795
|
});
|
|
31625
31796
|
build$3.onLoad({
|
|
31626
31797
|
filter: /.*/,
|
|
31627
31798
|
namespace: "script"
|
|
31628
|
-
}, ({ path: path$
|
|
31629
|
-
return scripts[path$
|
|
31799
|
+
}, ({ path: path$14 }) => {
|
|
31800
|
+
return scripts[path$14];
|
|
31630
31801
|
});
|
|
31631
|
-
build$3.onResolve({ filter: htmlTypesRE }, async ({ path: path$
|
|
31632
|
-
const resolved = await resolve$4(path$
|
|
31802
|
+
build$3.onResolve({ filter: htmlTypesRE }, async ({ path: path$14, importer }) => {
|
|
31803
|
+
const resolved = await resolve$4(path$14, importer);
|
|
31633
31804
|
if (!resolved) return;
|
|
31634
31805
|
if (isInNodeModules(resolved) && isOptimizable(resolved, optimizeDepsOptions)) return;
|
|
31635
|
-
if (shouldExternalizeDep(resolved, path$
|
|
31806
|
+
if (shouldExternalizeDep(resolved, path$14)) return externalUnlessEntry({ path: path$14 });
|
|
31636
31807
|
return {
|
|
31637
31808
|
path: resolved,
|
|
31638
31809
|
namespace: "html"
|
|
@@ -31723,10 +31894,10 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
|
31723
31894
|
} else missing[id] = normalizePath(importer);
|
|
31724
31895
|
});
|
|
31725
31896
|
const setupExternalize = (filter$1, doExternalize) => {
|
|
31726
|
-
build$3.onResolve({ filter: filter$1 }, ({ path: path$
|
|
31897
|
+
build$3.onResolve({ filter: filter$1 }, ({ path: path$14 }) => {
|
|
31727
31898
|
return {
|
|
31728
|
-
path: path$
|
|
31729
|
-
external: doExternalize(path$
|
|
31899
|
+
path: path$14,
|
|
31900
|
+
external: doExternalize(path$14)
|
|
31730
31901
|
};
|
|
31731
31902
|
});
|
|
31732
31903
|
};
|
|
@@ -32989,8 +33160,8 @@ function mapWithBrowserField(relativePathInPkgDir, map$1) {
|
|
|
32989
33160
|
if (normalizedPath === normalizedKey || equalWithoutSuffix(normalizedPath, normalizedKey, ".js") || equalWithoutSuffix(normalizedPath, normalizedKey, "/index.js")) return map$1[key];
|
|
32990
33161
|
}
|
|
32991
33162
|
}
|
|
32992
|
-
function equalWithoutSuffix(path$
|
|
32993
|
-
return key.endsWith(suffix) && key.slice(0, -suffix.length) === path$
|
|
33163
|
+
function equalWithoutSuffix(path$14, key, suffix) {
|
|
33164
|
+
return key.endsWith(suffix) && key.slice(0, -suffix.length) === path$14;
|
|
32994
33165
|
}
|
|
32995
33166
|
function tryResolveRealFile(file, preserveSymlinks) {
|
|
32996
33167
|
if (tryStatSync(file)?.isFile()) return getRealPath(file, preserveSymlinks);
|
|
@@ -33013,8 +33184,8 @@ function getRealPath(resolved, preserveSymlinks) {
|
|
|
33013
33184
|
if (!preserveSymlinks) resolved = safeRealpathSync(resolved);
|
|
33014
33185
|
return normalizePath(resolved);
|
|
33015
33186
|
}
|
|
33016
|
-
function isDirectory(path$
|
|
33017
|
-
return tryStatSync(path$
|
|
33187
|
+
function isDirectory(path$14) {
|
|
33188
|
+
return tryStatSync(path$14)?.isDirectory() ?? false;
|
|
33018
33189
|
}
|
|
33019
33190
|
|
|
33020
33191
|
//#endregion
|
|
@@ -33857,10 +34028,10 @@ function escapeId(id) {
|
|
|
33857
34028
|
if (!needsEscapeRegEx.test(id)) return id;
|
|
33858
34029
|
return id.replace(backSlashRegEx, "\\\\").replace(quoteNewlineRegEx, "\\$1");
|
|
33859
34030
|
}
|
|
33860
|
-
const getResolveUrl = (path$
|
|
34031
|
+
const getResolveUrl = (path$14, URL$4 = "URL") => `new ${URL$4}(${path$14}).href`;
|
|
33861
34032
|
const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(partialEncodeURIPath(relativePath))}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`);
|
|
33862
|
-
const getFileUrlFromFullPath = (path$
|
|
33863
|
-
const getFileUrlFromRelativePath = (path$
|
|
34033
|
+
const getFileUrlFromFullPath = (path$14) => `require('u' + 'rl').pathToFileURL(${path$14}).href`;
|
|
34034
|
+
const getFileUrlFromRelativePath = (path$14) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path$14)}'`);
|
|
33864
34035
|
const customRelativeUrlMechanisms = {
|
|
33865
34036
|
amd: (relativePath) => {
|
|
33866
34037
|
if (relativePath[0] !== ".") relativePath = "./" + relativePath;
|
|
@@ -34880,9 +35051,9 @@ var DevEnvironment = class extends BaseEnvironment {
|
|
|
34880
35051
|
});
|
|
34881
35052
|
}
|
|
34882
35053
|
});
|
|
34883
|
-
this.hot.on("vite:invalidate", async ({ path: path$
|
|
35054
|
+
this.hot.on("vite:invalidate", async ({ path: path$14, message, firstInvalidatedBy }) => {
|
|
34884
35055
|
invalidateModule(this, {
|
|
34885
|
-
path: path$
|
|
35056
|
+
path: path$14,
|
|
34886
35057
|
message,
|
|
34887
35058
|
firstInvalidatedBy
|
|
34888
35059
|
});
|
|
@@ -35431,14 +35602,14 @@ function getDefaultEnvironmentOptions(config$2) {
|
|
|
35431
35602
|
* Check and warn if `path` includes characters that don't work well in Vite,
|
|
35432
35603
|
* such as `#` and `?` and `*`.
|
|
35433
35604
|
*/
|
|
35434
|
-
function checkBadCharactersInPath(name, path$
|
|
35605
|
+
function checkBadCharactersInPath(name, path$14, logger) {
|
|
35435
35606
|
const badChars = [];
|
|
35436
|
-
if (path$
|
|
35437
|
-
if (path$
|
|
35438
|
-
if (path$
|
|
35607
|
+
if (path$14.includes("#")) badChars.push("#");
|
|
35608
|
+
if (path$14.includes("?")) badChars.push("?");
|
|
35609
|
+
if (path$14.includes("*")) badChars.push("*");
|
|
35439
35610
|
if (badChars.length > 0) {
|
|
35440
35611
|
const charString = badChars.map((c) => `"${c}"`).join(" and ");
|
|
35441
|
-
logger.warn(import_picocolors.default.yellow(`${name} contains the ${charString} ${badChars.length > 1 ? "characters" : "character"} (${import_picocolors.default.cyan(path$
|
|
35612
|
+
logger.warn(import_picocolors.default.yellow(`${name} contains the ${charString} ${badChars.length > 1 ? "characters" : "character"} (${import_picocolors.default.cyan(path$14)}), which may not work when running Vite. Consider renaming the directory / file to remove the characters.`));
|
|
35442
35613
|
}
|
|
35443
35614
|
}
|
|
35444
35615
|
const clientAlias = [{
|