@storm-software/workspace-tools 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +3 -1
- package/index.js +2251 -620
- package/meta.json +1 -1
- package/package.json +2 -1
- package/src/executors/tsup/executor.js +2429 -798
- package/src/executors/tsup/get-config.js +9 -9
- package/src/executors/tsup-neutral/executor.js +2251 -620
- package/src/executors/tsup-node/executor.js +2251 -620
- package/src/generators/config-schema/generator.js +2 -2
- package/src/generators/init/init.js +2 -2
- package/src/generators/node-library/generator.js +773 -595
- package/src/generators/preset/generator.js +2 -2
|
@@ -7825,9 +7825,9 @@ var require_run_tasks_in_serial = __commonJS({
|
|
|
7825
7825
|
}
|
|
7826
7826
|
});
|
|
7827
7827
|
|
|
7828
|
-
// node_modules/.pnpm/ignore@5.
|
|
7828
|
+
// node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js
|
|
7829
7829
|
var require_ignore = __commonJS({
|
|
7830
|
-
"node_modules/.pnpm/ignore@5.
|
|
7830
|
+
"node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js"(exports, module2) {
|
|
7831
7831
|
function makeArray(subject) {
|
|
7832
7832
|
return Array.isArray(subject) ? subject : [subject];
|
|
7833
7833
|
}
|
|
@@ -8247,14 +8247,14 @@ var require_parse_target_string = __commonJS({
|
|
|
8247
8247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8248
8248
|
exports.targetToTargetString = exports.parseTargetString = void 0;
|
|
8249
8249
|
var nx_1 = require_nx();
|
|
8250
|
-
var { readCachedProjectGraph, splitTarget, splitByColons } = (0, nx_1.requireNx)();
|
|
8250
|
+
var { readCachedProjectGraph: readCachedProjectGraph2, splitTarget, splitByColons } = (0, nx_1.requireNx)();
|
|
8251
8251
|
splitTarget = splitTarget ?? require("nx/src/utils/split-target").splitTarget;
|
|
8252
8252
|
splitByColons = splitByColons ?? ((s) => s.split(":"));
|
|
8253
8253
|
function parseTargetString(targetString, projectGraphOrCtx) {
|
|
8254
8254
|
let projectGraph = projectGraphOrCtx && "projectGraph" in projectGraphOrCtx ? projectGraphOrCtx.projectGraph : projectGraphOrCtx;
|
|
8255
8255
|
if (!projectGraph) {
|
|
8256
8256
|
try {
|
|
8257
|
-
projectGraph =
|
|
8257
|
+
projectGraph = readCachedProjectGraph2();
|
|
8258
8258
|
} catch (e) {
|
|
8259
8259
|
projectGraph = { nodes: {} };
|
|
8260
8260
|
}
|
|
@@ -19932,9 +19932,9 @@ var require_supports_color = __commonJS({
|
|
|
19932
19932
|
}
|
|
19933
19933
|
});
|
|
19934
19934
|
|
|
19935
|
-
// node_modules/.pnpm/chalk@4.1.
|
|
19935
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
|
|
19936
19936
|
var require_util = __commonJS({
|
|
19937
|
-
"node_modules/.pnpm/chalk@4.1.
|
|
19937
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module2) {
|
|
19938
19938
|
"use strict";
|
|
19939
19939
|
var stringReplaceAll = (string, substring, replacer) => {
|
|
19940
19940
|
let index = string.indexOf(substring);
|
|
@@ -19971,9 +19971,9 @@ var require_util = __commonJS({
|
|
|
19971
19971
|
}
|
|
19972
19972
|
});
|
|
19973
19973
|
|
|
19974
|
-
// node_modules/.pnpm/chalk@4.1.
|
|
19974
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
|
|
19975
19975
|
var require_templates = __commonJS({
|
|
19976
|
-
"node_modules/.pnpm/chalk@4.1.
|
|
19976
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module2) {
|
|
19977
19977
|
"use strict";
|
|
19978
19978
|
var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
19979
19979
|
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
@@ -20085,9 +20085,9 @@ var require_templates = __commonJS({
|
|
|
20085
20085
|
}
|
|
20086
20086
|
});
|
|
20087
20087
|
|
|
20088
|
-
// node_modules/.pnpm/chalk@4.1.
|
|
20088
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
|
|
20089
20089
|
var require_source = __commonJS({
|
|
20090
|
-
"node_modules/.pnpm/chalk@4.1.
|
|
20090
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module2) {
|
|
20091
20091
|
"use strict";
|
|
20092
20092
|
var ansiStyles = require_ansi_styles();
|
|
20093
20093
|
var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color();
|
|
@@ -21453,9 +21453,9 @@ var require_watch_for_single_file_changes = __commonJS({
|
|
|
21453
21453
|
}
|
|
21454
21454
|
});
|
|
21455
21455
|
|
|
21456
|
-
// node_modules/.pnpm/universalify@2.0.
|
|
21456
|
+
// node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
|
21457
21457
|
var require_universalify = __commonJS({
|
|
21458
|
-
"node_modules/.pnpm/universalify@2.0.
|
|
21458
|
+
"node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
|
|
21459
21459
|
"use strict";
|
|
21460
21460
|
exports.fromCallback = function(fn) {
|
|
21461
21461
|
return Object.defineProperty(function(...args) {
|
|
@@ -21463,11 +21463,8 @@ var require_universalify = __commonJS({
|
|
|
21463
21463
|
fn.apply(this, args);
|
|
21464
21464
|
else {
|
|
21465
21465
|
return new Promise((resolve, reject) => {
|
|
21466
|
-
|
|
21467
|
-
|
|
21468
|
-
...args,
|
|
21469
|
-
(err, res) => err != null ? reject(err) : resolve(res)
|
|
21470
|
-
);
|
|
21466
|
+
args.push((err, res) => err != null ? reject(err) : resolve(res));
|
|
21467
|
+
fn.apply(this, args);
|
|
21471
21468
|
});
|
|
21472
21469
|
}
|
|
21473
21470
|
}, "name", { value: fn.name });
|
|
@@ -21477,8 +21474,10 @@ var require_universalify = __commonJS({
|
|
|
21477
21474
|
const cb = args[args.length - 1];
|
|
21478
21475
|
if (typeof cb !== "function")
|
|
21479
21476
|
return fn.apply(this, args);
|
|
21480
|
-
else
|
|
21481
|
-
|
|
21477
|
+
else {
|
|
21478
|
+
args.pop();
|
|
21479
|
+
fn.apply(this, args).then((r) => cb(null, r), cb);
|
|
21480
|
+
}
|
|
21482
21481
|
}, "name", { value: fn.name });
|
|
21483
21482
|
};
|
|
21484
21483
|
}
|
|
@@ -22292,9 +22291,9 @@ var require_graceful_fs = __commonJS({
|
|
|
22292
22291
|
}
|
|
22293
22292
|
});
|
|
22294
22293
|
|
|
22295
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22294
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
|
|
22296
22295
|
var require_fs2 = __commonJS({
|
|
22297
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22296
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
22298
22297
|
"use strict";
|
|
22299
22298
|
var u = require_universalify().fromCallback;
|
|
22300
22299
|
var fs = require_graceful_fs();
|
|
@@ -22408,9 +22407,9 @@ var require_fs2 = __commonJS({
|
|
|
22408
22407
|
}
|
|
22409
22408
|
});
|
|
22410
22409
|
|
|
22411
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22410
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
|
|
22412
22411
|
var require_utils2 = __commonJS({
|
|
22413
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22412
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
|
|
22414
22413
|
"use strict";
|
|
22415
22414
|
var path2 = require("path");
|
|
22416
22415
|
module2.exports.checkPath = function checkPath(pth) {
|
|
@@ -22426,9 +22425,9 @@ var require_utils2 = __commonJS({
|
|
|
22426
22425
|
}
|
|
22427
22426
|
});
|
|
22428
22427
|
|
|
22429
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22428
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
22430
22429
|
var require_make_dir = __commonJS({
|
|
22431
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22430
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
|
|
22432
22431
|
"use strict";
|
|
22433
22432
|
var fs = require_fs2();
|
|
22434
22433
|
var { checkPath } = require_utils2();
|
|
@@ -22455,9 +22454,9 @@ var require_make_dir = __commonJS({
|
|
|
22455
22454
|
}
|
|
22456
22455
|
});
|
|
22457
22456
|
|
|
22458
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22457
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
|
|
22459
22458
|
var require_mkdirs = __commonJS({
|
|
22460
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22459
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
|
|
22461
22460
|
"use strict";
|
|
22462
22461
|
var u = require_universalify().fromPromise;
|
|
22463
22462
|
var { makeDir: _makeDir, makeDirSync } = require_make_dir();
|
|
@@ -22474,9 +22473,9 @@ var require_mkdirs = __commonJS({
|
|
|
22474
22473
|
}
|
|
22475
22474
|
});
|
|
22476
22475
|
|
|
22477
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22476
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
|
|
22478
22477
|
var require_path_exists = __commonJS({
|
|
22479
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22478
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
|
|
22480
22479
|
"use strict";
|
|
22481
22480
|
var u = require_universalify().fromPromise;
|
|
22482
22481
|
var fs = require_fs2();
|
|
@@ -22490,22 +22489,27 @@ var require_path_exists = __commonJS({
|
|
|
22490
22489
|
}
|
|
22491
22490
|
});
|
|
22492
22491
|
|
|
22493
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22492
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
|
|
22494
22493
|
var require_utimes = __commonJS({
|
|
22495
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22494
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
|
|
22496
22495
|
"use strict";
|
|
22497
|
-
var fs =
|
|
22498
|
-
|
|
22499
|
-
|
|
22500
|
-
|
|
22501
|
-
|
|
22502
|
-
|
|
22503
|
-
|
|
22504
|
-
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
})
|
|
22508
|
-
|
|
22496
|
+
var fs = require_fs2();
|
|
22497
|
+
var u = require_universalify().fromPromise;
|
|
22498
|
+
async function utimesMillis(path2, atime, mtime) {
|
|
22499
|
+
const fd = await fs.open(path2, "r+");
|
|
22500
|
+
let closeErr = null;
|
|
22501
|
+
try {
|
|
22502
|
+
await fs.futimes(fd, atime, mtime);
|
|
22503
|
+
} finally {
|
|
22504
|
+
try {
|
|
22505
|
+
await fs.close(fd);
|
|
22506
|
+
} catch (e) {
|
|
22507
|
+
closeErr = e;
|
|
22508
|
+
}
|
|
22509
|
+
}
|
|
22510
|
+
if (closeErr) {
|
|
22511
|
+
throw closeErr;
|
|
22512
|
+
}
|
|
22509
22513
|
}
|
|
22510
22514
|
function utimesMillisSync(path2, atime, mtime) {
|
|
22511
22515
|
const fd = fs.openSync(path2, "r+");
|
|
@@ -22513,19 +22517,19 @@ var require_utimes = __commonJS({
|
|
|
22513
22517
|
return fs.closeSync(fd);
|
|
22514
22518
|
}
|
|
22515
22519
|
module2.exports = {
|
|
22516
|
-
utimesMillis,
|
|
22520
|
+
utimesMillis: u(utimesMillis),
|
|
22517
22521
|
utimesMillisSync
|
|
22518
22522
|
};
|
|
22519
22523
|
}
|
|
22520
22524
|
});
|
|
22521
22525
|
|
|
22522
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22526
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
|
|
22523
22527
|
var require_stat = __commonJS({
|
|
22524
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22528
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
|
|
22525
22529
|
"use strict";
|
|
22526
22530
|
var fs = require_fs2();
|
|
22527
22531
|
var path2 = require("path");
|
|
22528
|
-
var
|
|
22532
|
+
var u = require_universalify().fromPromise;
|
|
22529
22533
|
function getStats(src, dest, opts) {
|
|
22530
22534
|
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
|
22531
22535
|
return Promise.all([
|
|
@@ -22550,32 +22554,28 @@ var require_stat = __commonJS({
|
|
|
22550
22554
|
}
|
|
22551
22555
|
return { srcStat, destStat };
|
|
22552
22556
|
}
|
|
22553
|
-
function checkPaths(src, dest, funcName, opts
|
|
22554
|
-
|
|
22555
|
-
|
|
22556
|
-
|
|
22557
|
-
|
|
22558
|
-
|
|
22559
|
-
if (
|
|
22560
|
-
|
|
22561
|
-
const destBaseName = path2.basename(dest);
|
|
22562
|
-
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
22563
|
-
return cb(null, { srcStat, destStat, isChangingCase: true });
|
|
22564
|
-
}
|
|
22565
|
-
return cb(new Error("Source and destination must not be the same."));
|
|
22566
|
-
}
|
|
22567
|
-
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
22568
|
-
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
|
|
22569
|
-
}
|
|
22570
|
-
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
22571
|
-
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
|
|
22557
|
+
async function checkPaths(src, dest, funcName, opts) {
|
|
22558
|
+
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
22559
|
+
if (destStat) {
|
|
22560
|
+
if (areIdentical(srcStat, destStat)) {
|
|
22561
|
+
const srcBaseName = path2.basename(src);
|
|
22562
|
+
const destBaseName = path2.basename(dest);
|
|
22563
|
+
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
22564
|
+
return { srcStat, destStat, isChangingCase: true };
|
|
22572
22565
|
}
|
|
22566
|
+
throw new Error("Source and destination must not be the same.");
|
|
22573
22567
|
}
|
|
22574
|
-
if (srcStat.isDirectory() &&
|
|
22575
|
-
|
|
22568
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
22569
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
|
|
22576
22570
|
}
|
|
22577
|
-
|
|
22578
|
-
|
|
22571
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
22572
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
|
|
22573
|
+
}
|
|
22574
|
+
}
|
|
22575
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
22576
|
+
throw new Error(errMsg(src, dest, funcName));
|
|
22577
|
+
}
|
|
22578
|
+
return { srcStat, destStat };
|
|
22579
22579
|
}
|
|
22580
22580
|
function checkPathsSync(src, dest, funcName, opts) {
|
|
22581
22581
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
@@ -22600,22 +22600,23 @@ var require_stat = __commonJS({
|
|
|
22600
22600
|
}
|
|
22601
22601
|
return { srcStat, destStat };
|
|
22602
22602
|
}
|
|
22603
|
-
function checkParentPaths(src, srcStat, dest, funcName
|
|
22603
|
+
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
22604
22604
|
const srcParent = path2.resolve(path2.dirname(src));
|
|
22605
22605
|
const destParent = path2.resolve(path2.dirname(dest));
|
|
22606
22606
|
if (destParent === srcParent || destParent === path2.parse(destParent).root)
|
|
22607
|
-
return
|
|
22608
|
-
|
|
22609
|
-
|
|
22610
|
-
|
|
22611
|
-
|
|
22612
|
-
|
|
22613
|
-
|
|
22614
|
-
|
|
22615
|
-
|
|
22616
|
-
|
|
22617
|
-
|
|
22618
|
-
}
|
|
22607
|
+
return;
|
|
22608
|
+
let destStat;
|
|
22609
|
+
try {
|
|
22610
|
+
destStat = await fs.stat(destParent, { bigint: true });
|
|
22611
|
+
} catch (err) {
|
|
22612
|
+
if (err.code === "ENOENT")
|
|
22613
|
+
return;
|
|
22614
|
+
throw err;
|
|
22615
|
+
}
|
|
22616
|
+
if (areIdentical(srcStat, destStat)) {
|
|
22617
|
+
throw new Error(errMsg(src, dest, funcName));
|
|
22618
|
+
}
|
|
22619
|
+
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
22619
22620
|
}
|
|
22620
22621
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
22621
22622
|
const srcParent = path2.resolve(path2.dirname(src));
|
|
@@ -22641,42 +22642,39 @@ var require_stat = __commonJS({
|
|
|
22641
22642
|
function isSrcSubdir(src, dest) {
|
|
22642
22643
|
const srcArr = path2.resolve(src).split(path2.sep).filter((i) => i);
|
|
22643
22644
|
const destArr = path2.resolve(dest).split(path2.sep).filter((i) => i);
|
|
22644
|
-
return srcArr.
|
|
22645
|
+
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
22645
22646
|
}
|
|
22646
22647
|
function errMsg(src, dest, funcName) {
|
|
22647
22648
|
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
|
|
22648
22649
|
}
|
|
22649
22650
|
module2.exports = {
|
|
22650
|
-
checkPaths
|
|
22651
|
+
// checkPaths
|
|
22652
|
+
checkPaths: u(checkPaths),
|
|
22651
22653
|
checkPathsSync,
|
|
22652
|
-
|
|
22654
|
+
// checkParent
|
|
22655
|
+
checkParentPaths: u(checkParentPaths),
|
|
22653
22656
|
checkParentPathsSync,
|
|
22657
|
+
// Misc
|
|
22654
22658
|
isSrcSubdir,
|
|
22655
22659
|
areIdentical
|
|
22656
22660
|
};
|
|
22657
22661
|
}
|
|
22658
22662
|
});
|
|
22659
22663
|
|
|
22660
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22664
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
|
|
22661
22665
|
var require_copy = __commonJS({
|
|
22662
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22666
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
|
|
22663
22667
|
"use strict";
|
|
22664
|
-
var fs =
|
|
22668
|
+
var fs = require_fs2();
|
|
22665
22669
|
var path2 = require("path");
|
|
22666
|
-
var mkdirs = require_mkdirs()
|
|
22667
|
-
var pathExists = require_path_exists()
|
|
22668
|
-
var utimesMillis = require_utimes()
|
|
22670
|
+
var { mkdirs } = require_mkdirs();
|
|
22671
|
+
var { pathExists } = require_path_exists();
|
|
22672
|
+
var { utimesMillis } = require_utimes();
|
|
22669
22673
|
var stat = require_stat();
|
|
22670
|
-
function copy(src, dest, opts
|
|
22671
|
-
if (typeof opts === "function"
|
|
22672
|
-
cb = opts;
|
|
22673
|
-
opts = {};
|
|
22674
|
-
} else if (typeof opts === "function") {
|
|
22674
|
+
async function copy(src, dest, opts = {}) {
|
|
22675
|
+
if (typeof opts === "function") {
|
|
22675
22676
|
opts = { filter: opts };
|
|
22676
22677
|
}
|
|
22677
|
-
cb = cb || function() {
|
|
22678
|
-
};
|
|
22679
|
-
opts = opts || {};
|
|
22680
22678
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
22681
22679
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
22682
22680
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
@@ -22686,212 +22684,119 @@ var require_copy = __commonJS({
|
|
|
22686
22684
|
"fs-extra-WARN0001"
|
|
22687
22685
|
);
|
|
22688
22686
|
}
|
|
22689
|
-
stat.checkPaths(src, dest, "copy", opts
|
|
22690
|
-
|
|
22691
|
-
|
|
22692
|
-
|
|
22693
|
-
|
|
22694
|
-
if (err2)
|
|
22695
|
-
return cb(err2);
|
|
22696
|
-
runFilter(src, dest, opts, (err3, include) => {
|
|
22697
|
-
if (err3)
|
|
22698
|
-
return cb(err3);
|
|
22699
|
-
if (!include)
|
|
22700
|
-
return cb();
|
|
22701
|
-
checkParentDir(destStat, src, dest, opts, cb);
|
|
22702
|
-
});
|
|
22703
|
-
});
|
|
22704
|
-
});
|
|
22705
|
-
}
|
|
22706
|
-
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
22687
|
+
const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
|
|
22688
|
+
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
22689
|
+
const include = await runFilter(src, dest, opts);
|
|
22690
|
+
if (!include)
|
|
22691
|
+
return;
|
|
22707
22692
|
const destParent = path2.dirname(dest);
|
|
22708
|
-
pathExists(destParent
|
|
22709
|
-
|
|
22710
|
-
|
|
22711
|
-
|
|
22712
|
-
|
|
22713
|
-
mkdirs(destParent, (err2) => {
|
|
22714
|
-
if (err2)
|
|
22715
|
-
return cb(err2);
|
|
22716
|
-
return getStats(destStat, src, dest, opts, cb);
|
|
22717
|
-
});
|
|
22718
|
-
});
|
|
22693
|
+
const dirExists = await pathExists(destParent);
|
|
22694
|
+
if (!dirExists) {
|
|
22695
|
+
await mkdirs(destParent);
|
|
22696
|
+
}
|
|
22697
|
+
await getStatsAndPerformCopy(destStat, src, dest, opts);
|
|
22719
22698
|
}
|
|
22720
|
-
function runFilter(src, dest, opts
|
|
22699
|
+
async function runFilter(src, dest, opts) {
|
|
22721
22700
|
if (!opts.filter)
|
|
22722
|
-
return
|
|
22723
|
-
|
|
22701
|
+
return true;
|
|
22702
|
+
return opts.filter(src, dest);
|
|
22724
22703
|
}
|
|
22725
|
-
function
|
|
22726
|
-
const
|
|
22727
|
-
|
|
22728
|
-
|
|
22729
|
-
|
|
22730
|
-
|
|
22731
|
-
|
|
22732
|
-
|
|
22733
|
-
|
|
22734
|
-
|
|
22735
|
-
|
|
22736
|
-
|
|
22737
|
-
|
|
22738
|
-
|
|
22739
|
-
return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
|
|
22740
|
-
return cb(new Error(`Unknown file: ${src}`));
|
|
22741
|
-
});
|
|
22704
|
+
async function getStatsAndPerformCopy(destStat, src, dest, opts) {
|
|
22705
|
+
const statFn = opts.dereference ? fs.stat : fs.lstat;
|
|
22706
|
+
const srcStat = await statFn(src);
|
|
22707
|
+
if (srcStat.isDirectory())
|
|
22708
|
+
return onDir(srcStat, destStat, src, dest, opts);
|
|
22709
|
+
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
22710
|
+
return onFile(srcStat, destStat, src, dest, opts);
|
|
22711
|
+
if (srcStat.isSymbolicLink())
|
|
22712
|
+
return onLink(destStat, src, dest, opts);
|
|
22713
|
+
if (srcStat.isSocket())
|
|
22714
|
+
throw new Error(`Cannot copy a socket file: ${src}`);
|
|
22715
|
+
if (srcStat.isFIFO())
|
|
22716
|
+
throw new Error(`Cannot copy a FIFO pipe: ${src}`);
|
|
22717
|
+
throw new Error(`Unknown file: ${src}`);
|
|
22742
22718
|
}
|
|
22743
|
-
function onFile(srcStat, destStat, src, dest, opts
|
|
22719
|
+
async function onFile(srcStat, destStat, src, dest, opts) {
|
|
22744
22720
|
if (!destStat)
|
|
22745
|
-
return copyFile(srcStat, src, dest, opts
|
|
22746
|
-
return mayCopyFile(srcStat, src, dest, opts, cb);
|
|
22747
|
-
}
|
|
22748
|
-
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
22721
|
+
return copyFile(srcStat, src, dest, opts);
|
|
22749
22722
|
if (opts.overwrite) {
|
|
22750
|
-
fs.unlink(dest
|
|
22751
|
-
|
|
22752
|
-
|
|
22753
|
-
|
|
22754
|
-
});
|
|
22755
|
-
}
|
|
22756
|
-
return cb(new Error(`'${dest}' already exists`));
|
|
22757
|
-
} else
|
|
22758
|
-
return cb();
|
|
22759
|
-
}
|
|
22760
|
-
function copyFile(srcStat, src, dest, opts, cb) {
|
|
22761
|
-
fs.copyFile(src, dest, (err) => {
|
|
22762
|
-
if (err)
|
|
22763
|
-
return cb(err);
|
|
22764
|
-
if (opts.preserveTimestamps)
|
|
22765
|
-
return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
|
22766
|
-
return setDestMode(dest, srcStat.mode, cb);
|
|
22767
|
-
});
|
|
22723
|
+
await fs.unlink(dest);
|
|
22724
|
+
return copyFile(srcStat, src, dest, opts);
|
|
22725
|
+
}
|
|
22726
|
+
if (opts.errorOnExist) {
|
|
22727
|
+
throw new Error(`'${dest}' already exists`);
|
|
22728
|
+
}
|
|
22768
22729
|
}
|
|
22769
|
-
function
|
|
22770
|
-
|
|
22771
|
-
|
|
22772
|
-
|
|
22773
|
-
|
|
22774
|
-
|
|
22775
|
-
|
|
22730
|
+
async function copyFile(srcStat, src, dest, opts) {
|
|
22731
|
+
await fs.copyFile(src, dest);
|
|
22732
|
+
if (opts.preserveTimestamps) {
|
|
22733
|
+
if (fileIsNotWritable(srcStat.mode)) {
|
|
22734
|
+
await makeFileWritable(dest, srcStat.mode);
|
|
22735
|
+
}
|
|
22736
|
+
const updatedSrcStat = await fs.stat(src);
|
|
22737
|
+
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
22776
22738
|
}
|
|
22777
|
-
return
|
|
22739
|
+
return fs.chmod(dest, srcStat.mode);
|
|
22778
22740
|
}
|
|
22779
22741
|
function fileIsNotWritable(srcMode) {
|
|
22780
22742
|
return (srcMode & 128) === 0;
|
|
22781
22743
|
}
|
|
22782
|
-
function makeFileWritable(dest, srcMode
|
|
22783
|
-
return
|
|
22784
|
-
}
|
|
22785
|
-
function setDestTimestampsAndMode(srcMode, src, dest, cb) {
|
|
22786
|
-
setDestTimestamps(src, dest, (err) => {
|
|
22787
|
-
if (err)
|
|
22788
|
-
return cb(err);
|
|
22789
|
-
return setDestMode(dest, srcMode, cb);
|
|
22790
|
-
});
|
|
22791
|
-
}
|
|
22792
|
-
function setDestMode(dest, srcMode, cb) {
|
|
22793
|
-
return fs.chmod(dest, srcMode, cb);
|
|
22794
|
-
}
|
|
22795
|
-
function setDestTimestamps(src, dest, cb) {
|
|
22796
|
-
fs.stat(src, (err, updatedSrcStat) => {
|
|
22797
|
-
if (err)
|
|
22798
|
-
return cb(err);
|
|
22799
|
-
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
22800
|
-
});
|
|
22801
|
-
}
|
|
22802
|
-
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
22803
|
-
if (!destStat)
|
|
22804
|
-
return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
22805
|
-
return copyDir(src, dest, opts, cb);
|
|
22806
|
-
}
|
|
22807
|
-
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
22808
|
-
fs.mkdir(dest, (err) => {
|
|
22809
|
-
if (err)
|
|
22810
|
-
return cb(err);
|
|
22811
|
-
copyDir(src, dest, opts, (err2) => {
|
|
22812
|
-
if (err2)
|
|
22813
|
-
return cb(err2);
|
|
22814
|
-
return setDestMode(dest, srcMode, cb);
|
|
22815
|
-
});
|
|
22816
|
-
});
|
|
22817
|
-
}
|
|
22818
|
-
function copyDir(src, dest, opts, cb) {
|
|
22819
|
-
fs.readdir(src, (err, items) => {
|
|
22820
|
-
if (err)
|
|
22821
|
-
return cb(err);
|
|
22822
|
-
return copyDirItems(items, src, dest, opts, cb);
|
|
22823
|
-
});
|
|
22824
|
-
}
|
|
22825
|
-
function copyDirItems(items, src, dest, opts, cb) {
|
|
22826
|
-
const item = items.pop();
|
|
22827
|
-
if (!item)
|
|
22828
|
-
return cb();
|
|
22829
|
-
return copyDirItem(items, item, src, dest, opts, cb);
|
|
22744
|
+
function makeFileWritable(dest, srcMode) {
|
|
22745
|
+
return fs.chmod(dest, srcMode | 128);
|
|
22830
22746
|
}
|
|
22831
|
-
function
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
|
|
22747
|
+
async function onDir(srcStat, destStat, src, dest, opts) {
|
|
22748
|
+
if (!destStat) {
|
|
22749
|
+
await fs.mkdir(dest);
|
|
22750
|
+
}
|
|
22751
|
+
const items = await fs.readdir(src);
|
|
22752
|
+
await Promise.all(items.map(async (item) => {
|
|
22753
|
+
const srcItem = path2.join(src, item);
|
|
22754
|
+
const destItem = path2.join(dest, item);
|
|
22755
|
+
const include = await runFilter(srcItem, destItem, opts);
|
|
22837
22756
|
if (!include)
|
|
22838
|
-
return
|
|
22839
|
-
stat.checkPaths(srcItem, destItem, "copy", opts
|
|
22840
|
-
|
|
22841
|
-
|
|
22842
|
-
|
|
22843
|
-
|
|
22844
|
-
|
|
22845
|
-
return cb(err3);
|
|
22846
|
-
return copyDirItems(items, src, dest, opts, cb);
|
|
22847
|
-
});
|
|
22848
|
-
});
|
|
22849
|
-
});
|
|
22850
|
-
}
|
|
22851
|
-
function onLink(destStat, src, dest, opts, cb) {
|
|
22852
|
-
fs.readlink(src, (err, resolvedSrc) => {
|
|
22853
|
-
if (err)
|
|
22854
|
-
return cb(err);
|
|
22855
|
-
if (opts.dereference) {
|
|
22856
|
-
resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
|
|
22857
|
-
}
|
|
22858
|
-
if (!destStat) {
|
|
22859
|
-
return fs.symlink(resolvedSrc, dest, cb);
|
|
22860
|
-
} else {
|
|
22861
|
-
fs.readlink(dest, (err2, resolvedDest) => {
|
|
22862
|
-
if (err2) {
|
|
22863
|
-
if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
|
|
22864
|
-
return fs.symlink(resolvedSrc, dest, cb);
|
|
22865
|
-
return cb(err2);
|
|
22866
|
-
}
|
|
22867
|
-
if (opts.dereference) {
|
|
22868
|
-
resolvedDest = path2.resolve(process.cwd(), resolvedDest);
|
|
22869
|
-
}
|
|
22870
|
-
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
22871
|
-
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
|
22872
|
-
}
|
|
22873
|
-
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
22874
|
-
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
|
22875
|
-
}
|
|
22876
|
-
return copyLink(resolvedSrc, dest, cb);
|
|
22877
|
-
});
|
|
22878
|
-
}
|
|
22879
|
-
});
|
|
22757
|
+
return;
|
|
22758
|
+
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
22759
|
+
return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
|
|
22760
|
+
}));
|
|
22761
|
+
if (!destStat) {
|
|
22762
|
+
await fs.chmod(dest, srcStat.mode);
|
|
22763
|
+
}
|
|
22880
22764
|
}
|
|
22881
|
-
function
|
|
22882
|
-
fs.
|
|
22883
|
-
|
|
22884
|
-
|
|
22885
|
-
|
|
22886
|
-
|
|
22765
|
+
async function onLink(destStat, src, dest, opts) {
|
|
22766
|
+
let resolvedSrc = await fs.readlink(src);
|
|
22767
|
+
if (opts.dereference) {
|
|
22768
|
+
resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
|
|
22769
|
+
}
|
|
22770
|
+
if (!destStat) {
|
|
22771
|
+
return fs.symlink(resolvedSrc, dest);
|
|
22772
|
+
}
|
|
22773
|
+
let resolvedDest = null;
|
|
22774
|
+
try {
|
|
22775
|
+
resolvedDest = await fs.readlink(dest);
|
|
22776
|
+
} catch (e) {
|
|
22777
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN")
|
|
22778
|
+
return fs.symlink(resolvedSrc, dest);
|
|
22779
|
+
throw e;
|
|
22780
|
+
}
|
|
22781
|
+
if (opts.dereference) {
|
|
22782
|
+
resolvedDest = path2.resolve(process.cwd(), resolvedDest);
|
|
22783
|
+
}
|
|
22784
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
22785
|
+
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
22786
|
+
}
|
|
22787
|
+
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
22788
|
+
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
22789
|
+
}
|
|
22790
|
+
await fs.unlink(dest);
|
|
22791
|
+
return fs.symlink(resolvedSrc, dest);
|
|
22887
22792
|
}
|
|
22888
22793
|
module2.exports = copy;
|
|
22889
22794
|
}
|
|
22890
22795
|
});
|
|
22891
22796
|
|
|
22892
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22797
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
|
|
22893
22798
|
var require_copy_sync = __commonJS({
|
|
22894
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22799
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
|
|
22895
22800
|
"use strict";
|
|
22896
22801
|
var fs = require_graceful_fs();
|
|
22897
22802
|
var path2 = require("path");
|
|
@@ -23030,11 +22935,11 @@ var require_copy_sync = __commonJS({
|
|
|
23030
22935
|
}
|
|
23031
22936
|
});
|
|
23032
22937
|
|
|
23033
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22938
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
|
|
23034
22939
|
var require_copy2 = __commonJS({
|
|
23035
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22940
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
|
|
23036
22941
|
"use strict";
|
|
23037
|
-
var u = require_universalify().
|
|
22942
|
+
var u = require_universalify().fromPromise;
|
|
23038
22943
|
module2.exports = {
|
|
23039
22944
|
copy: u(require_copy()),
|
|
23040
22945
|
copySync: require_copy_sync()
|
|
@@ -23042,9 +22947,9 @@ var require_copy2 = __commonJS({
|
|
|
23042
22947
|
}
|
|
23043
22948
|
});
|
|
23044
22949
|
|
|
23045
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22950
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
|
|
23046
22951
|
var require_remove = __commonJS({
|
|
23047
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22952
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
|
|
23048
22953
|
"use strict";
|
|
23049
22954
|
var fs = require_graceful_fs();
|
|
23050
22955
|
var u = require_universalify().fromCallback;
|
|
@@ -23061,9 +22966,9 @@ var require_remove = __commonJS({
|
|
|
23061
22966
|
}
|
|
23062
22967
|
});
|
|
23063
22968
|
|
|
23064
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
22969
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
|
|
23065
22970
|
var require_empty2 = __commonJS({
|
|
23066
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
22971
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
|
|
23067
22972
|
"use strict";
|
|
23068
22973
|
var u = require_universalify().fromPromise;
|
|
23069
22974
|
var fs = require_fs2();
|
|
@@ -23100,47 +23005,40 @@ var require_empty2 = __commonJS({
|
|
|
23100
23005
|
}
|
|
23101
23006
|
});
|
|
23102
23007
|
|
|
23103
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23008
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
|
|
23104
23009
|
var require_file = __commonJS({
|
|
23105
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23010
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
|
|
23106
23011
|
"use strict";
|
|
23107
|
-
var u = require_universalify().
|
|
23012
|
+
var u = require_universalify().fromPromise;
|
|
23108
23013
|
var path2 = require("path");
|
|
23109
|
-
var fs =
|
|
23014
|
+
var fs = require_fs2();
|
|
23110
23015
|
var mkdir = require_mkdirs();
|
|
23111
|
-
function createFile(file
|
|
23112
|
-
|
|
23113
|
-
|
|
23114
|
-
|
|
23115
|
-
|
|
23116
|
-
|
|
23117
|
-
|
|
23016
|
+
async function createFile(file) {
|
|
23017
|
+
let stats;
|
|
23018
|
+
try {
|
|
23019
|
+
stats = await fs.stat(file);
|
|
23020
|
+
} catch {
|
|
23021
|
+
}
|
|
23022
|
+
if (stats && stats.isFile())
|
|
23023
|
+
return;
|
|
23024
|
+
const dir = path2.dirname(file);
|
|
23025
|
+
let dirStats = null;
|
|
23026
|
+
try {
|
|
23027
|
+
dirStats = await fs.stat(dir);
|
|
23028
|
+
} catch (err) {
|
|
23029
|
+
if (err.code === "ENOENT") {
|
|
23030
|
+
await mkdir.mkdirs(dir);
|
|
23031
|
+
await fs.writeFile(file, "");
|
|
23032
|
+
return;
|
|
23033
|
+
} else {
|
|
23034
|
+
throw err;
|
|
23035
|
+
}
|
|
23036
|
+
}
|
|
23037
|
+
if (dirStats.isDirectory()) {
|
|
23038
|
+
await fs.writeFile(file, "");
|
|
23039
|
+
} else {
|
|
23040
|
+
await fs.readdir(dir);
|
|
23118
23041
|
}
|
|
23119
|
-
fs.stat(file, (err, stats) => {
|
|
23120
|
-
if (!err && stats.isFile())
|
|
23121
|
-
return callback();
|
|
23122
|
-
const dir = path2.dirname(file);
|
|
23123
|
-
fs.stat(dir, (err2, stats2) => {
|
|
23124
|
-
if (err2) {
|
|
23125
|
-
if (err2.code === "ENOENT") {
|
|
23126
|
-
return mkdir.mkdirs(dir, (err3) => {
|
|
23127
|
-
if (err3)
|
|
23128
|
-
return callback(err3);
|
|
23129
|
-
makeFile();
|
|
23130
|
-
});
|
|
23131
|
-
}
|
|
23132
|
-
return callback(err2);
|
|
23133
|
-
}
|
|
23134
|
-
if (stats2.isDirectory())
|
|
23135
|
-
makeFile();
|
|
23136
|
-
else {
|
|
23137
|
-
fs.readdir(dir, (err3) => {
|
|
23138
|
-
if (err3)
|
|
23139
|
-
return callback(err3);
|
|
23140
|
-
});
|
|
23141
|
-
}
|
|
23142
|
-
});
|
|
23143
|
-
});
|
|
23144
23042
|
}
|
|
23145
23043
|
function createFileSync(file) {
|
|
23146
23044
|
let stats;
|
|
@@ -23170,46 +23068,37 @@ var require_file = __commonJS({
|
|
|
23170
23068
|
}
|
|
23171
23069
|
});
|
|
23172
23070
|
|
|
23173
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23071
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
|
|
23174
23072
|
var require_link = __commonJS({
|
|
23175
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23073
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
|
|
23176
23074
|
"use strict";
|
|
23177
|
-
var u = require_universalify().
|
|
23075
|
+
var u = require_universalify().fromPromise;
|
|
23178
23076
|
var path2 = require("path");
|
|
23179
|
-
var fs =
|
|
23077
|
+
var fs = require_fs2();
|
|
23180
23078
|
var mkdir = require_mkdirs();
|
|
23181
|
-
var pathExists = require_path_exists()
|
|
23079
|
+
var { pathExists } = require_path_exists();
|
|
23182
23080
|
var { areIdentical } = require_stat();
|
|
23183
|
-
function createLink(srcpath, dstpath
|
|
23184
|
-
|
|
23185
|
-
|
|
23186
|
-
|
|
23187
|
-
|
|
23188
|
-
callback(null);
|
|
23189
|
-
});
|
|
23081
|
+
async function createLink(srcpath, dstpath) {
|
|
23082
|
+
let dstStat;
|
|
23083
|
+
try {
|
|
23084
|
+
dstStat = await fs.lstat(dstpath);
|
|
23085
|
+
} catch {
|
|
23190
23086
|
}
|
|
23191
|
-
|
|
23192
|
-
|
|
23193
|
-
|
|
23194
|
-
|
|
23195
|
-
|
|
23196
|
-
|
|
23197
|
-
|
|
23198
|
-
|
|
23199
|
-
|
|
23200
|
-
|
|
23201
|
-
|
|
23202
|
-
|
|
23203
|
-
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
if (err3)
|
|
23207
|
-
return callback(err3);
|
|
23208
|
-
makeLink(srcpath, dstpath);
|
|
23209
|
-
});
|
|
23210
|
-
});
|
|
23211
|
-
});
|
|
23212
|
-
});
|
|
23087
|
+
let srcStat;
|
|
23088
|
+
try {
|
|
23089
|
+
srcStat = await fs.lstat(srcpath);
|
|
23090
|
+
} catch (err) {
|
|
23091
|
+
err.message = err.message.replace("lstat", "ensureLink");
|
|
23092
|
+
throw err;
|
|
23093
|
+
}
|
|
23094
|
+
if (dstStat && areIdentical(srcStat, dstStat))
|
|
23095
|
+
return;
|
|
23096
|
+
const dir = path2.dirname(dstpath);
|
|
23097
|
+
const dirExists = await pathExists(dir);
|
|
23098
|
+
if (!dirExists) {
|
|
23099
|
+
await mkdir.mkdirs(dir);
|
|
23100
|
+
}
|
|
23101
|
+
await fs.link(srcpath, dstpath);
|
|
23213
23102
|
}
|
|
23214
23103
|
function createLinkSync(srcpath, dstpath) {
|
|
23215
23104
|
let dstStat;
|
|
@@ -23239,109 +23128,102 @@ var require_link = __commonJS({
|
|
|
23239
23128
|
}
|
|
23240
23129
|
});
|
|
23241
23130
|
|
|
23242
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23131
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
23243
23132
|
var require_symlink_paths = __commonJS({
|
|
23244
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23133
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
|
|
23245
23134
|
"use strict";
|
|
23246
23135
|
var path2 = require("path");
|
|
23247
|
-
var fs =
|
|
23248
|
-
var pathExists = require_path_exists()
|
|
23249
|
-
|
|
23136
|
+
var fs = require_fs2();
|
|
23137
|
+
var { pathExists } = require_path_exists();
|
|
23138
|
+
var u = require_universalify().fromPromise;
|
|
23139
|
+
async function symlinkPaths(srcpath, dstpath) {
|
|
23250
23140
|
if (path2.isAbsolute(srcpath)) {
|
|
23251
|
-
|
|
23252
|
-
|
|
23253
|
-
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
|
|
23257
|
-
|
|
23258
|
-
|
|
23259
|
-
|
|
23260
|
-
}
|
|
23261
|
-
}
|
|
23262
|
-
|
|
23263
|
-
|
|
23264
|
-
|
|
23265
|
-
|
|
23266
|
-
|
|
23267
|
-
|
|
23268
|
-
|
|
23269
|
-
|
|
23270
|
-
toDst: srcpath
|
|
23271
|
-
});
|
|
23272
|
-
} else {
|
|
23273
|
-
return fs.lstat(srcpath, (err2) => {
|
|
23274
|
-
if (err2) {
|
|
23275
|
-
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
|
23276
|
-
return callback(err2);
|
|
23277
|
-
}
|
|
23278
|
-
return callback(null, {
|
|
23279
|
-
toCwd: srcpath,
|
|
23280
|
-
toDst: path2.relative(dstdir, srcpath)
|
|
23281
|
-
});
|
|
23282
|
-
});
|
|
23283
|
-
}
|
|
23284
|
-
});
|
|
23141
|
+
try {
|
|
23142
|
+
await fs.lstat(srcpath);
|
|
23143
|
+
} catch (err) {
|
|
23144
|
+
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
23145
|
+
throw err;
|
|
23146
|
+
}
|
|
23147
|
+
return {
|
|
23148
|
+
toCwd: srcpath,
|
|
23149
|
+
toDst: srcpath
|
|
23150
|
+
};
|
|
23151
|
+
}
|
|
23152
|
+
const dstdir = path2.dirname(dstpath);
|
|
23153
|
+
const relativeToDst = path2.join(dstdir, srcpath);
|
|
23154
|
+
const exists = await pathExists(relativeToDst);
|
|
23155
|
+
if (exists) {
|
|
23156
|
+
return {
|
|
23157
|
+
toCwd: relativeToDst,
|
|
23158
|
+
toDst: srcpath
|
|
23159
|
+
};
|
|
23285
23160
|
}
|
|
23161
|
+
try {
|
|
23162
|
+
await fs.lstat(srcpath);
|
|
23163
|
+
} catch (err) {
|
|
23164
|
+
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
23165
|
+
throw err;
|
|
23166
|
+
}
|
|
23167
|
+
return {
|
|
23168
|
+
toCwd: srcpath,
|
|
23169
|
+
toDst: path2.relative(dstdir, srcpath)
|
|
23170
|
+
};
|
|
23286
23171
|
}
|
|
23287
23172
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
23288
|
-
let exists;
|
|
23289
23173
|
if (path2.isAbsolute(srcpath)) {
|
|
23290
|
-
|
|
23291
|
-
if (!
|
|
23174
|
+
const exists2 = fs.existsSync(srcpath);
|
|
23175
|
+
if (!exists2)
|
|
23292
23176
|
throw new Error("absolute srcpath does not exist");
|
|
23293
23177
|
return {
|
|
23294
23178
|
toCwd: srcpath,
|
|
23295
23179
|
toDst: srcpath
|
|
23296
23180
|
};
|
|
23297
|
-
} else {
|
|
23298
|
-
const dstdir = path2.dirname(dstpath);
|
|
23299
|
-
const relativeToDst = path2.join(dstdir, srcpath);
|
|
23300
|
-
exists = fs.existsSync(relativeToDst);
|
|
23301
|
-
if (exists) {
|
|
23302
|
-
return {
|
|
23303
|
-
toCwd: relativeToDst,
|
|
23304
|
-
toDst: srcpath
|
|
23305
|
-
};
|
|
23306
|
-
} else {
|
|
23307
|
-
exists = fs.existsSync(srcpath);
|
|
23308
|
-
if (!exists)
|
|
23309
|
-
throw new Error("relative srcpath does not exist");
|
|
23310
|
-
return {
|
|
23311
|
-
toCwd: srcpath,
|
|
23312
|
-
toDst: path2.relative(dstdir, srcpath)
|
|
23313
|
-
};
|
|
23314
|
-
}
|
|
23315
23181
|
}
|
|
23182
|
+
const dstdir = path2.dirname(dstpath);
|
|
23183
|
+
const relativeToDst = path2.join(dstdir, srcpath);
|
|
23184
|
+
const exists = fs.existsSync(relativeToDst);
|
|
23185
|
+
if (exists) {
|
|
23186
|
+
return {
|
|
23187
|
+
toCwd: relativeToDst,
|
|
23188
|
+
toDst: srcpath
|
|
23189
|
+
};
|
|
23190
|
+
}
|
|
23191
|
+
const srcExists = fs.existsSync(srcpath);
|
|
23192
|
+
if (!srcExists)
|
|
23193
|
+
throw new Error("relative srcpath does not exist");
|
|
23194
|
+
return {
|
|
23195
|
+
toCwd: srcpath,
|
|
23196
|
+
toDst: path2.relative(dstdir, srcpath)
|
|
23197
|
+
};
|
|
23316
23198
|
}
|
|
23317
23199
|
module2.exports = {
|
|
23318
|
-
symlinkPaths,
|
|
23200
|
+
symlinkPaths: u(symlinkPaths),
|
|
23319
23201
|
symlinkPathsSync
|
|
23320
23202
|
};
|
|
23321
23203
|
}
|
|
23322
23204
|
});
|
|
23323
23205
|
|
|
23324
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23206
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
23325
23207
|
var require_symlink_type = __commonJS({
|
|
23326
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23208
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
|
|
23327
23209
|
"use strict";
|
|
23328
|
-
var fs =
|
|
23329
|
-
|
|
23330
|
-
|
|
23331
|
-
type = typeof type === "function" ? false : type;
|
|
23210
|
+
var fs = require_fs2();
|
|
23211
|
+
var u = require_universalify().fromPromise;
|
|
23212
|
+
async function symlinkType(srcpath, type) {
|
|
23332
23213
|
if (type)
|
|
23333
|
-
return
|
|
23334
|
-
|
|
23335
|
-
|
|
23336
|
-
|
|
23337
|
-
|
|
23338
|
-
|
|
23339
|
-
}
|
|
23214
|
+
return type;
|
|
23215
|
+
let stats;
|
|
23216
|
+
try {
|
|
23217
|
+
stats = await fs.lstat(srcpath);
|
|
23218
|
+
} catch {
|
|
23219
|
+
return "file";
|
|
23220
|
+
}
|
|
23221
|
+
return stats && stats.isDirectory() ? "dir" : "file";
|
|
23340
23222
|
}
|
|
23341
23223
|
function symlinkTypeSync(srcpath, type) {
|
|
23342
|
-
let stats;
|
|
23343
23224
|
if (type)
|
|
23344
23225
|
return type;
|
|
23226
|
+
let stats;
|
|
23345
23227
|
try {
|
|
23346
23228
|
stats = fs.lstatSync(srcpath);
|
|
23347
23229
|
} catch {
|
|
@@ -23350,69 +23232,46 @@ var require_symlink_type = __commonJS({
|
|
|
23350
23232
|
return stats && stats.isDirectory() ? "dir" : "file";
|
|
23351
23233
|
}
|
|
23352
23234
|
module2.exports = {
|
|
23353
|
-
symlinkType,
|
|
23235
|
+
symlinkType: u(symlinkType),
|
|
23354
23236
|
symlinkTypeSync
|
|
23355
23237
|
};
|
|
23356
23238
|
}
|
|
23357
23239
|
});
|
|
23358
23240
|
|
|
23359
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23241
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
|
|
23360
23242
|
var require_symlink = __commonJS({
|
|
23361
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23243
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
|
|
23362
23244
|
"use strict";
|
|
23363
|
-
var u = require_universalify().
|
|
23245
|
+
var u = require_universalify().fromPromise;
|
|
23364
23246
|
var path2 = require("path");
|
|
23365
23247
|
var fs = require_fs2();
|
|
23366
|
-
var
|
|
23367
|
-
var
|
|
23368
|
-
var
|
|
23369
|
-
var
|
|
23370
|
-
var symlinkPaths = _symlinkPaths.symlinkPaths;
|
|
23371
|
-
var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
|
|
23372
|
-
var _symlinkType = require_symlink_type();
|
|
23373
|
-
var symlinkType = _symlinkType.symlinkType;
|
|
23374
|
-
var symlinkTypeSync = _symlinkType.symlinkTypeSync;
|
|
23375
|
-
var pathExists = require_path_exists().pathExists;
|
|
23248
|
+
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
23249
|
+
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
23250
|
+
var { symlinkType, symlinkTypeSync } = require_symlink_type();
|
|
23251
|
+
var { pathExists } = require_path_exists();
|
|
23376
23252
|
var { areIdentical } = require_stat();
|
|
23377
|
-
function createSymlink(srcpath, dstpath, type
|
|
23378
|
-
|
|
23379
|
-
|
|
23380
|
-
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23388
|
-
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
symlinkType(relative.toCwd, type, (err2, type2) => {
|
|
23400
|
-
if (err2)
|
|
23401
|
-
return callback(err2);
|
|
23402
|
-
const dir = path2.dirname(dstpath);
|
|
23403
|
-
pathExists(dir, (err3, dirExists) => {
|
|
23404
|
-
if (err3)
|
|
23405
|
-
return callback(err3);
|
|
23406
|
-
if (dirExists)
|
|
23407
|
-
return fs.symlink(srcpath, dstpath, type2, callback);
|
|
23408
|
-
mkdirs(dir, (err4) => {
|
|
23409
|
-
if (err4)
|
|
23410
|
-
return callback(err4);
|
|
23411
|
-
fs.symlink(srcpath, dstpath, type2, callback);
|
|
23412
|
-
});
|
|
23413
|
-
});
|
|
23414
|
-
});
|
|
23415
|
-
});
|
|
23253
|
+
async function createSymlink(srcpath, dstpath, type) {
|
|
23254
|
+
let stats;
|
|
23255
|
+
try {
|
|
23256
|
+
stats = await fs.lstat(dstpath);
|
|
23257
|
+
} catch {
|
|
23258
|
+
}
|
|
23259
|
+
if (stats && stats.isSymbolicLink()) {
|
|
23260
|
+
const [srcStat, dstStat] = await Promise.all([
|
|
23261
|
+
fs.stat(srcpath),
|
|
23262
|
+
fs.stat(dstpath)
|
|
23263
|
+
]);
|
|
23264
|
+
if (areIdentical(srcStat, dstStat))
|
|
23265
|
+
return;
|
|
23266
|
+
}
|
|
23267
|
+
const relative = await symlinkPaths(srcpath, dstpath);
|
|
23268
|
+
srcpath = relative.toDst;
|
|
23269
|
+
const toType = await symlinkType(relative.toCwd, type);
|
|
23270
|
+
const dir = path2.dirname(dstpath);
|
|
23271
|
+
if (!await pathExists(dir)) {
|
|
23272
|
+
await mkdirs(dir);
|
|
23273
|
+
}
|
|
23274
|
+
return fs.symlink(srcpath, dstpath, toType);
|
|
23416
23275
|
}
|
|
23417
23276
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
23418
23277
|
let stats;
|
|
@@ -23443,9 +23302,9 @@ var require_symlink = __commonJS({
|
|
|
23443
23302
|
}
|
|
23444
23303
|
});
|
|
23445
23304
|
|
|
23446
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23305
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
|
|
23447
23306
|
var require_ensure = __commonJS({
|
|
23448
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23307
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
|
|
23449
23308
|
"use strict";
|
|
23450
23309
|
var { createFile, createFileSync } = require_file();
|
|
23451
23310
|
var { createLink, createLinkSync } = require_link();
|
|
@@ -23470,6 +23329,37 @@ var require_ensure = __commonJS({
|
|
|
23470
23329
|
}
|
|
23471
23330
|
});
|
|
23472
23331
|
|
|
23332
|
+
// node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
|
|
23333
|
+
var require_universalify2 = __commonJS({
|
|
23334
|
+
"node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
|
23335
|
+
"use strict";
|
|
23336
|
+
exports.fromCallback = function(fn) {
|
|
23337
|
+
return Object.defineProperty(function(...args) {
|
|
23338
|
+
if (typeof args[args.length - 1] === "function")
|
|
23339
|
+
fn.apply(this, args);
|
|
23340
|
+
else {
|
|
23341
|
+
return new Promise((resolve, reject) => {
|
|
23342
|
+
fn.call(
|
|
23343
|
+
this,
|
|
23344
|
+
...args,
|
|
23345
|
+
(err, res) => err != null ? reject(err) : resolve(res)
|
|
23346
|
+
);
|
|
23347
|
+
});
|
|
23348
|
+
}
|
|
23349
|
+
}, "name", { value: fn.name });
|
|
23350
|
+
};
|
|
23351
|
+
exports.fromPromise = function(fn) {
|
|
23352
|
+
return Object.defineProperty(function(...args) {
|
|
23353
|
+
const cb = args[args.length - 1];
|
|
23354
|
+
if (typeof cb !== "function")
|
|
23355
|
+
return fn.apply(this, args);
|
|
23356
|
+
else
|
|
23357
|
+
fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
|
|
23358
|
+
}, "name", { value: fn.name });
|
|
23359
|
+
};
|
|
23360
|
+
}
|
|
23361
|
+
});
|
|
23362
|
+
|
|
23473
23363
|
// node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
23474
23364
|
var require_utils3 = __commonJS({
|
|
23475
23365
|
"node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
|
|
@@ -23496,7 +23386,7 @@ var require_jsonfile = __commonJS({
|
|
|
23496
23386
|
} catch (_) {
|
|
23497
23387
|
_fs = require("fs");
|
|
23498
23388
|
}
|
|
23499
|
-
var universalify =
|
|
23389
|
+
var universalify = require_universalify2();
|
|
23500
23390
|
var { stringify, stripBom } = require_utils3();
|
|
23501
23391
|
async function _readFile(file, options = {}) {
|
|
23502
23392
|
if (typeof options === "string") {
|
|
@@ -23560,9 +23450,9 @@ var require_jsonfile = __commonJS({
|
|
|
23560
23450
|
}
|
|
23561
23451
|
});
|
|
23562
23452
|
|
|
23563
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23453
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
|
|
23564
23454
|
var require_jsonfile2 = __commonJS({
|
|
23565
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23455
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
|
|
23566
23456
|
"use strict";
|
|
23567
23457
|
var jsonFile = require_jsonfile();
|
|
23568
23458
|
module2.exports = {
|
|
@@ -23575,39 +23465,27 @@ var require_jsonfile2 = __commonJS({
|
|
|
23575
23465
|
}
|
|
23576
23466
|
});
|
|
23577
23467
|
|
|
23578
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23468
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
|
|
23579
23469
|
var require_output_file = __commonJS({
|
|
23580
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23470
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
|
|
23581
23471
|
"use strict";
|
|
23582
|
-
var u = require_universalify().
|
|
23583
|
-
var fs =
|
|
23472
|
+
var u = require_universalify().fromPromise;
|
|
23473
|
+
var fs = require_fs2();
|
|
23584
23474
|
var path2 = require("path");
|
|
23585
23475
|
var mkdir = require_mkdirs();
|
|
23586
23476
|
var pathExists = require_path_exists().pathExists;
|
|
23587
|
-
function outputFile(file, data, encoding
|
|
23588
|
-
if (typeof encoding === "function") {
|
|
23589
|
-
callback = encoding;
|
|
23590
|
-
encoding = "utf8";
|
|
23591
|
-
}
|
|
23477
|
+
async function outputFile(file, data, encoding = "utf-8") {
|
|
23592
23478
|
const dir = path2.dirname(file);
|
|
23593
|
-
pathExists(dir
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
return fs.writeFile(file, data, encoding, callback);
|
|
23598
|
-
mkdir.mkdirs(dir, (err2) => {
|
|
23599
|
-
if (err2)
|
|
23600
|
-
return callback(err2);
|
|
23601
|
-
fs.writeFile(file, data, encoding, callback);
|
|
23602
|
-
});
|
|
23603
|
-
});
|
|
23479
|
+
if (!await pathExists(dir)) {
|
|
23480
|
+
await mkdir.mkdirs(dir);
|
|
23481
|
+
}
|
|
23482
|
+
return fs.writeFile(file, data, encoding);
|
|
23604
23483
|
}
|
|
23605
23484
|
function outputFileSync(file, ...args) {
|
|
23606
23485
|
const dir = path2.dirname(file);
|
|
23607
|
-
if (fs.existsSync(dir)) {
|
|
23608
|
-
|
|
23486
|
+
if (!fs.existsSync(dir)) {
|
|
23487
|
+
mkdir.mkdirsSync(dir);
|
|
23609
23488
|
}
|
|
23610
|
-
mkdir.mkdirsSync(dir);
|
|
23611
23489
|
fs.writeFileSync(file, ...args);
|
|
23612
23490
|
}
|
|
23613
23491
|
module2.exports = {
|
|
@@ -23617,9 +23495,9 @@ var require_output_file = __commonJS({
|
|
|
23617
23495
|
}
|
|
23618
23496
|
});
|
|
23619
23497
|
|
|
23620
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23498
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
|
|
23621
23499
|
var require_output_json = __commonJS({
|
|
23622
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23500
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
|
|
23623
23501
|
"use strict";
|
|
23624
23502
|
var { stringify } = require_utils3();
|
|
23625
23503
|
var { outputFile } = require_output_file();
|
|
@@ -23631,9 +23509,9 @@ var require_output_json = __commonJS({
|
|
|
23631
23509
|
}
|
|
23632
23510
|
});
|
|
23633
23511
|
|
|
23634
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23512
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
23635
23513
|
var require_output_json_sync = __commonJS({
|
|
23636
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23514
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
|
|
23637
23515
|
"use strict";
|
|
23638
23516
|
var { stringify } = require_utils3();
|
|
23639
23517
|
var { outputFileSync } = require_output_file();
|
|
@@ -23645,9 +23523,9 @@ var require_output_json_sync = __commonJS({
|
|
|
23645
23523
|
}
|
|
23646
23524
|
});
|
|
23647
23525
|
|
|
23648
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23526
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
|
|
23649
23527
|
var require_json = __commonJS({
|
|
23650
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23528
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
|
|
23651
23529
|
"use strict";
|
|
23652
23530
|
var u = require_universalify().fromPromise;
|
|
23653
23531
|
var jsonFile = require_jsonfile2();
|
|
@@ -23663,92 +23541,61 @@ var require_json = __commonJS({
|
|
|
23663
23541
|
}
|
|
23664
23542
|
});
|
|
23665
23543
|
|
|
23666
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23544
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
|
|
23667
23545
|
var require_move = __commonJS({
|
|
23668
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23546
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
|
|
23669
23547
|
"use strict";
|
|
23670
|
-
var fs =
|
|
23548
|
+
var fs = require_fs2();
|
|
23671
23549
|
var path2 = require("path");
|
|
23672
|
-
var copy = require_copy2()
|
|
23673
|
-
var remove = require_remove()
|
|
23674
|
-
var mkdirp = require_mkdirs()
|
|
23675
|
-
var pathExists = require_path_exists()
|
|
23550
|
+
var { copy } = require_copy2();
|
|
23551
|
+
var { remove } = require_remove();
|
|
23552
|
+
var { mkdirp } = require_mkdirs();
|
|
23553
|
+
var { pathExists } = require_path_exists();
|
|
23676
23554
|
var stat = require_stat();
|
|
23677
|
-
function move(src, dest, opts
|
|
23678
|
-
if (typeof opts === "function") {
|
|
23679
|
-
cb = opts;
|
|
23680
|
-
opts = {};
|
|
23681
|
-
}
|
|
23682
|
-
opts = opts || {};
|
|
23555
|
+
async function move(src, dest, opts = {}) {
|
|
23683
23556
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
23684
|
-
stat.checkPaths(src, dest, "move", opts
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
|
|
23690
|
-
return cb(err2);
|
|
23691
|
-
if (isParentRoot(dest))
|
|
23692
|
-
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
23693
|
-
mkdirp(path2.dirname(dest), (err3) => {
|
|
23694
|
-
if (err3)
|
|
23695
|
-
return cb(err3);
|
|
23696
|
-
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
23697
|
-
});
|
|
23698
|
-
});
|
|
23699
|
-
});
|
|
23700
|
-
}
|
|
23701
|
-
function isParentRoot(dest) {
|
|
23702
|
-
const parent = path2.dirname(dest);
|
|
23703
|
-
const parsedPath = path2.parse(parent);
|
|
23704
|
-
return parsedPath.root === parent;
|
|
23705
|
-
}
|
|
23706
|
-
function doRename(src, dest, overwrite, isChangingCase, cb) {
|
|
23707
|
-
if (isChangingCase)
|
|
23708
|
-
return rename(src, dest, overwrite, cb);
|
|
23709
|
-
if (overwrite) {
|
|
23710
|
-
return remove(dest, (err) => {
|
|
23711
|
-
if (err)
|
|
23712
|
-
return cb(err);
|
|
23713
|
-
return rename(src, dest, overwrite, cb);
|
|
23714
|
-
});
|
|
23557
|
+
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
23558
|
+
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
23559
|
+
const destParent = path2.dirname(dest);
|
|
23560
|
+
const parsedParentPath = path2.parse(destParent);
|
|
23561
|
+
if (parsedParentPath.root !== destParent) {
|
|
23562
|
+
await mkdirp(destParent);
|
|
23715
23563
|
}
|
|
23716
|
-
|
|
23717
|
-
if (err)
|
|
23718
|
-
return cb(err);
|
|
23719
|
-
if (destExists)
|
|
23720
|
-
return cb(new Error("dest already exists."));
|
|
23721
|
-
return rename(src, dest, overwrite, cb);
|
|
23722
|
-
});
|
|
23564
|
+
return doRename(src, dest, overwrite, isChangingCase);
|
|
23723
23565
|
}
|
|
23724
|
-
function
|
|
23725
|
-
|
|
23726
|
-
if (
|
|
23727
|
-
|
|
23728
|
-
if (
|
|
23729
|
-
|
|
23730
|
-
|
|
23731
|
-
}
|
|
23566
|
+
async function doRename(src, dest, overwrite, isChangingCase) {
|
|
23567
|
+
if (!isChangingCase) {
|
|
23568
|
+
if (overwrite) {
|
|
23569
|
+
await remove(dest);
|
|
23570
|
+
} else if (await pathExists(dest)) {
|
|
23571
|
+
throw new Error("dest already exists.");
|
|
23572
|
+
}
|
|
23573
|
+
}
|
|
23574
|
+
try {
|
|
23575
|
+
await fs.rename(src, dest);
|
|
23576
|
+
} catch (err) {
|
|
23577
|
+
if (err.code !== "EXDEV") {
|
|
23578
|
+
throw err;
|
|
23579
|
+
}
|
|
23580
|
+
await moveAcrossDevice(src, dest, overwrite);
|
|
23581
|
+
}
|
|
23732
23582
|
}
|
|
23733
|
-
function moveAcrossDevice(src, dest, overwrite
|
|
23583
|
+
async function moveAcrossDevice(src, dest, overwrite) {
|
|
23734
23584
|
const opts = {
|
|
23735
23585
|
overwrite,
|
|
23736
23586
|
errorOnExist: true,
|
|
23737
23587
|
preserveTimestamps: true
|
|
23738
23588
|
};
|
|
23739
|
-
copy(src, dest, opts
|
|
23740
|
-
|
|
23741
|
-
return cb(err);
|
|
23742
|
-
return remove(src, cb);
|
|
23743
|
-
});
|
|
23589
|
+
await copy(src, dest, opts);
|
|
23590
|
+
return remove(src);
|
|
23744
23591
|
}
|
|
23745
23592
|
module2.exports = move;
|
|
23746
23593
|
}
|
|
23747
23594
|
});
|
|
23748
23595
|
|
|
23749
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23596
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
|
|
23750
23597
|
var require_move_sync = __commonJS({
|
|
23751
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23598
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
|
|
23752
23599
|
"use strict";
|
|
23753
23600
|
var fs = require_graceful_fs();
|
|
23754
23601
|
var path2 = require("path");
|
|
@@ -23803,11 +23650,11 @@ var require_move_sync = __commonJS({
|
|
|
23803
23650
|
}
|
|
23804
23651
|
});
|
|
23805
23652
|
|
|
23806
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23653
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
|
|
23807
23654
|
var require_move2 = __commonJS({
|
|
23808
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23655
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
|
|
23809
23656
|
"use strict";
|
|
23810
|
-
var u = require_universalify().
|
|
23657
|
+
var u = require_universalify().fromPromise;
|
|
23811
23658
|
module2.exports = {
|
|
23812
23659
|
move: u(require_move()),
|
|
23813
23660
|
moveSync: require_move_sync()
|
|
@@ -23815,9 +23662,9 @@ var require_move2 = __commonJS({
|
|
|
23815
23662
|
}
|
|
23816
23663
|
});
|
|
23817
23664
|
|
|
23818
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
23665
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
|
|
23819
23666
|
var require_lib = __commonJS({
|
|
23820
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
23667
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module2) {
|
|
23821
23668
|
"use strict";
|
|
23822
23669
|
module2.exports = {
|
|
23823
23670
|
// Export promiseified graceful-fs:
|
|
@@ -39667,6 +39514,337 @@ var require_out5 = __commonJS({
|
|
|
39667
39514
|
}
|
|
39668
39515
|
});
|
|
39669
39516
|
|
|
39517
|
+
// node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/util.js
|
|
39518
|
+
var require_util2 = __commonJS({
|
|
39519
|
+
"node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/util.js"(exports, module2) {
|
|
39520
|
+
"use strict";
|
|
39521
|
+
var stringReplaceAll = (string, substring, replacer) => {
|
|
39522
|
+
let index = string.indexOf(substring);
|
|
39523
|
+
if (index === -1) {
|
|
39524
|
+
return string;
|
|
39525
|
+
}
|
|
39526
|
+
const substringLength = substring.length;
|
|
39527
|
+
let endIndex = 0;
|
|
39528
|
+
let returnValue = "";
|
|
39529
|
+
do {
|
|
39530
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
39531
|
+
endIndex = index + substringLength;
|
|
39532
|
+
index = string.indexOf(substring, endIndex);
|
|
39533
|
+
} while (index !== -1);
|
|
39534
|
+
returnValue += string.substr(endIndex);
|
|
39535
|
+
return returnValue;
|
|
39536
|
+
};
|
|
39537
|
+
var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
39538
|
+
let endIndex = 0;
|
|
39539
|
+
let returnValue = "";
|
|
39540
|
+
do {
|
|
39541
|
+
const gotCR = string[index - 1] === "\r";
|
|
39542
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
39543
|
+
endIndex = index + 1;
|
|
39544
|
+
index = string.indexOf("\n", endIndex);
|
|
39545
|
+
} while (index !== -1);
|
|
39546
|
+
returnValue += string.substr(endIndex);
|
|
39547
|
+
return returnValue;
|
|
39548
|
+
};
|
|
39549
|
+
module2.exports = {
|
|
39550
|
+
stringReplaceAll,
|
|
39551
|
+
stringEncaseCRLFWithFirstIndex
|
|
39552
|
+
};
|
|
39553
|
+
}
|
|
39554
|
+
});
|
|
39555
|
+
|
|
39556
|
+
// node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/templates.js
|
|
39557
|
+
var require_templates2 = __commonJS({
|
|
39558
|
+
"node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/templates.js"(exports, module2) {
|
|
39559
|
+
"use strict";
|
|
39560
|
+
var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
39561
|
+
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
39562
|
+
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
39563
|
+
var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
39564
|
+
var ESCAPES = /* @__PURE__ */ new Map([
|
|
39565
|
+
["n", "\n"],
|
|
39566
|
+
["r", "\r"],
|
|
39567
|
+
["t", " "],
|
|
39568
|
+
["b", "\b"],
|
|
39569
|
+
["f", "\f"],
|
|
39570
|
+
["v", "\v"],
|
|
39571
|
+
["0", "\0"],
|
|
39572
|
+
["\\", "\\"],
|
|
39573
|
+
["e", "\x1B"],
|
|
39574
|
+
["a", "\x07"]
|
|
39575
|
+
]);
|
|
39576
|
+
function unescape3(c) {
|
|
39577
|
+
const u = c[0] === "u";
|
|
39578
|
+
const bracket = c[1] === "{";
|
|
39579
|
+
if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
|
|
39580
|
+
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
39581
|
+
}
|
|
39582
|
+
if (u && bracket) {
|
|
39583
|
+
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
|
39584
|
+
}
|
|
39585
|
+
return ESCAPES.get(c) || c;
|
|
39586
|
+
}
|
|
39587
|
+
function parseArguments(name, arguments_) {
|
|
39588
|
+
const results = [];
|
|
39589
|
+
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
|
39590
|
+
let matches;
|
|
39591
|
+
for (const chunk of chunks) {
|
|
39592
|
+
const number = Number(chunk);
|
|
39593
|
+
if (!Number.isNaN(number)) {
|
|
39594
|
+
results.push(number);
|
|
39595
|
+
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
39596
|
+
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape3(escape2) : character));
|
|
39597
|
+
} else {
|
|
39598
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
39599
|
+
}
|
|
39600
|
+
}
|
|
39601
|
+
return results;
|
|
39602
|
+
}
|
|
39603
|
+
function parseStyle(style) {
|
|
39604
|
+
STYLE_REGEX.lastIndex = 0;
|
|
39605
|
+
const results = [];
|
|
39606
|
+
let matches;
|
|
39607
|
+
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
39608
|
+
const name = matches[1];
|
|
39609
|
+
if (matches[2]) {
|
|
39610
|
+
const args = parseArguments(name, matches[2]);
|
|
39611
|
+
results.push([name].concat(args));
|
|
39612
|
+
} else {
|
|
39613
|
+
results.push([name]);
|
|
39614
|
+
}
|
|
39615
|
+
}
|
|
39616
|
+
return results;
|
|
39617
|
+
}
|
|
39618
|
+
function buildStyle(chalk2, styles) {
|
|
39619
|
+
const enabled = {};
|
|
39620
|
+
for (const layer of styles) {
|
|
39621
|
+
for (const style of layer.styles) {
|
|
39622
|
+
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
39623
|
+
}
|
|
39624
|
+
}
|
|
39625
|
+
let current = chalk2;
|
|
39626
|
+
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
39627
|
+
if (!Array.isArray(styles2)) {
|
|
39628
|
+
continue;
|
|
39629
|
+
}
|
|
39630
|
+
if (!(styleName in current)) {
|
|
39631
|
+
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
39632
|
+
}
|
|
39633
|
+
current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
|
|
39634
|
+
}
|
|
39635
|
+
return current;
|
|
39636
|
+
}
|
|
39637
|
+
module2.exports = (chalk2, temporary) => {
|
|
39638
|
+
const styles = [];
|
|
39639
|
+
const chunks = [];
|
|
39640
|
+
let chunk = [];
|
|
39641
|
+
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
39642
|
+
if (escapeCharacter) {
|
|
39643
|
+
chunk.push(unescape3(escapeCharacter));
|
|
39644
|
+
} else if (style) {
|
|
39645
|
+
const string = chunk.join("");
|
|
39646
|
+
chunk = [];
|
|
39647
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
|
|
39648
|
+
styles.push({ inverse, styles: parseStyle(style) });
|
|
39649
|
+
} else if (close) {
|
|
39650
|
+
if (styles.length === 0) {
|
|
39651
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
39652
|
+
}
|
|
39653
|
+
chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
|
|
39654
|
+
chunk = [];
|
|
39655
|
+
styles.pop();
|
|
39656
|
+
} else {
|
|
39657
|
+
chunk.push(character);
|
|
39658
|
+
}
|
|
39659
|
+
});
|
|
39660
|
+
chunks.push(chunk.join(""));
|
|
39661
|
+
if (styles.length > 0) {
|
|
39662
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
39663
|
+
throw new Error(errMessage);
|
|
39664
|
+
}
|
|
39665
|
+
return chunks.join("");
|
|
39666
|
+
};
|
|
39667
|
+
}
|
|
39668
|
+
});
|
|
39669
|
+
|
|
39670
|
+
// node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/index.js
|
|
39671
|
+
var require_source2 = __commonJS({
|
|
39672
|
+
"node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/index.js"(exports, module2) {
|
|
39673
|
+
"use strict";
|
|
39674
|
+
var ansiStyles = require_ansi_styles();
|
|
39675
|
+
var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color();
|
|
39676
|
+
var {
|
|
39677
|
+
stringReplaceAll,
|
|
39678
|
+
stringEncaseCRLFWithFirstIndex
|
|
39679
|
+
} = require_util2();
|
|
39680
|
+
var { isArray } = Array;
|
|
39681
|
+
var levelMapping = [
|
|
39682
|
+
"ansi",
|
|
39683
|
+
"ansi",
|
|
39684
|
+
"ansi256",
|
|
39685
|
+
"ansi16m"
|
|
39686
|
+
];
|
|
39687
|
+
var styles = /* @__PURE__ */ Object.create(null);
|
|
39688
|
+
var applyOptions = (object, options = {}) => {
|
|
39689
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
39690
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
39691
|
+
}
|
|
39692
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
39693
|
+
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
39694
|
+
};
|
|
39695
|
+
var ChalkClass = class {
|
|
39696
|
+
constructor(options) {
|
|
39697
|
+
return chalkFactory(options);
|
|
39698
|
+
}
|
|
39699
|
+
};
|
|
39700
|
+
var chalkFactory = (options) => {
|
|
39701
|
+
const chalk3 = {};
|
|
39702
|
+
applyOptions(chalk3, options);
|
|
39703
|
+
chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
|
|
39704
|
+
Object.setPrototypeOf(chalk3, Chalk.prototype);
|
|
39705
|
+
Object.setPrototypeOf(chalk3.template, chalk3);
|
|
39706
|
+
chalk3.template.constructor = () => {
|
|
39707
|
+
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
39708
|
+
};
|
|
39709
|
+
chalk3.template.Instance = ChalkClass;
|
|
39710
|
+
return chalk3.template;
|
|
39711
|
+
};
|
|
39712
|
+
function Chalk(options) {
|
|
39713
|
+
return chalkFactory(options);
|
|
39714
|
+
}
|
|
39715
|
+
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
39716
|
+
styles[styleName] = {
|
|
39717
|
+
get() {
|
|
39718
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
|
39719
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
39720
|
+
return builder;
|
|
39721
|
+
}
|
|
39722
|
+
};
|
|
39723
|
+
}
|
|
39724
|
+
styles.visible = {
|
|
39725
|
+
get() {
|
|
39726
|
+
const builder = createBuilder(this, this._styler, true);
|
|
39727
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
39728
|
+
return builder;
|
|
39729
|
+
}
|
|
39730
|
+
};
|
|
39731
|
+
var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
39732
|
+
for (const model of usedModels) {
|
|
39733
|
+
styles[model] = {
|
|
39734
|
+
get() {
|
|
39735
|
+
const { level } = this;
|
|
39736
|
+
return function(...arguments_) {
|
|
39737
|
+
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
|
39738
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
39739
|
+
};
|
|
39740
|
+
}
|
|
39741
|
+
};
|
|
39742
|
+
}
|
|
39743
|
+
for (const model of usedModels) {
|
|
39744
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
39745
|
+
styles[bgModel] = {
|
|
39746
|
+
get() {
|
|
39747
|
+
const { level } = this;
|
|
39748
|
+
return function(...arguments_) {
|
|
39749
|
+
const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
|
|
39750
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
39751
|
+
};
|
|
39752
|
+
}
|
|
39753
|
+
};
|
|
39754
|
+
}
|
|
39755
|
+
var proto = Object.defineProperties(() => {
|
|
39756
|
+
}, {
|
|
39757
|
+
...styles,
|
|
39758
|
+
level: {
|
|
39759
|
+
enumerable: true,
|
|
39760
|
+
get() {
|
|
39761
|
+
return this._generator.level;
|
|
39762
|
+
},
|
|
39763
|
+
set(level) {
|
|
39764
|
+
this._generator.level = level;
|
|
39765
|
+
}
|
|
39766
|
+
}
|
|
39767
|
+
});
|
|
39768
|
+
var createStyler = (open, close, parent) => {
|
|
39769
|
+
let openAll;
|
|
39770
|
+
let closeAll;
|
|
39771
|
+
if (parent === void 0) {
|
|
39772
|
+
openAll = open;
|
|
39773
|
+
closeAll = close;
|
|
39774
|
+
} else {
|
|
39775
|
+
openAll = parent.openAll + open;
|
|
39776
|
+
closeAll = close + parent.closeAll;
|
|
39777
|
+
}
|
|
39778
|
+
return {
|
|
39779
|
+
open,
|
|
39780
|
+
close,
|
|
39781
|
+
openAll,
|
|
39782
|
+
closeAll,
|
|
39783
|
+
parent
|
|
39784
|
+
};
|
|
39785
|
+
};
|
|
39786
|
+
var createBuilder = (self2, _styler, _isEmpty) => {
|
|
39787
|
+
const builder = (...arguments_) => {
|
|
39788
|
+
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
39789
|
+
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
39790
|
+
}
|
|
39791
|
+
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
39792
|
+
};
|
|
39793
|
+
Object.setPrototypeOf(builder, proto);
|
|
39794
|
+
builder._generator = self2;
|
|
39795
|
+
builder._styler = _styler;
|
|
39796
|
+
builder._isEmpty = _isEmpty;
|
|
39797
|
+
return builder;
|
|
39798
|
+
};
|
|
39799
|
+
var applyStyle = (self2, string) => {
|
|
39800
|
+
if (self2.level <= 0 || !string) {
|
|
39801
|
+
return self2._isEmpty ? "" : string;
|
|
39802
|
+
}
|
|
39803
|
+
let styler = self2._styler;
|
|
39804
|
+
if (styler === void 0) {
|
|
39805
|
+
return string;
|
|
39806
|
+
}
|
|
39807
|
+
const { openAll, closeAll } = styler;
|
|
39808
|
+
if (string.indexOf("\x1B") !== -1) {
|
|
39809
|
+
while (styler !== void 0) {
|
|
39810
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
39811
|
+
styler = styler.parent;
|
|
39812
|
+
}
|
|
39813
|
+
}
|
|
39814
|
+
const lfIndex = string.indexOf("\n");
|
|
39815
|
+
if (lfIndex !== -1) {
|
|
39816
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
39817
|
+
}
|
|
39818
|
+
return openAll + string + closeAll;
|
|
39819
|
+
};
|
|
39820
|
+
var template;
|
|
39821
|
+
var chalkTag = (chalk3, ...strings) => {
|
|
39822
|
+
const [firstString] = strings;
|
|
39823
|
+
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
39824
|
+
return strings.join(" ");
|
|
39825
|
+
}
|
|
39826
|
+
const arguments_ = strings.slice(1);
|
|
39827
|
+
const parts = [firstString.raw[0]];
|
|
39828
|
+
for (let i = 1; i < firstString.length; i++) {
|
|
39829
|
+
parts.push(
|
|
39830
|
+
String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
|
|
39831
|
+
String(firstString.raw[i])
|
|
39832
|
+
);
|
|
39833
|
+
}
|
|
39834
|
+
if (template === void 0) {
|
|
39835
|
+
template = require_templates2();
|
|
39836
|
+
}
|
|
39837
|
+
return template(chalk3, parts.join(""));
|
|
39838
|
+
};
|
|
39839
|
+
Object.defineProperties(Chalk.prototype, styles);
|
|
39840
|
+
var chalk2 = Chalk();
|
|
39841
|
+
chalk2.supportsColor = stdoutColor;
|
|
39842
|
+
chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
39843
|
+
chalk2.stderr.supportsColor = stderrColor;
|
|
39844
|
+
module2.exports = chalk2;
|
|
39845
|
+
}
|
|
39846
|
+
});
|
|
39847
|
+
|
|
39670
39848
|
// node_modules/.pnpm/decky@1.1.1/node_modules/decky/index.js
|
|
39671
39849
|
var require_decky = __commonJS({
|
|
39672
39850
|
"node_modules/.pnpm/decky@1.1.1/node_modules/decky/index.js"(exports) {
|
|
@@ -39773,7 +39951,7 @@ var require_decky = __commonJS({
|
|
|
39773
39951
|
}), entryPoints;
|
|
39774
39952
|
}
|
|
39775
39953
|
var path2 = __toModule(require("path"));
|
|
39776
|
-
var import_chalk = __toModule(
|
|
39954
|
+
var import_chalk = __toModule(require_source2());
|
|
39777
39955
|
var esmLexer = require_lexer();
|
|
39778
39956
|
var hasLoadedLexers = false;
|
|
39779
39957
|
async function initLexers() {
|
|
@@ -39926,177 +40104,1631 @@ ${result.code}`, result.filePath, result.code.substring(0, prefixStart).split(`
|
|
|
39926
40104
|
decoratorPrefixes
|
|
39927
40105
|
}, decoratorPrefixes.forEach((prefix) => allPrefixes.add(prefix));
|
|
39928
40106
|
}
|
|
39929
|
-
let prefixes = [...allPrefixes].sort().reverse();
|
|
39930
|
-
return {
|
|
39931
|
-
process: async (code, filePath) => {
|
|
39932
|
-
let moduleImports;
|
|
39933
|
-
try {
|
|
39934
|
-
moduleImports = parseDecoratorImports(code, filePath);
|
|
39935
|
-
} catch (exception) {
|
|
39936
|
-
throw new ProcessorError(`Import/export parse error: ${exception.toString()}`, filePath, 0, code, 0);
|
|
39937
|
-
}
|
|
39938
|
-
let modules = new Array(moduleImports.length), moduleI = 0;
|
|
39939
|
-
for (let moduleImport of moduleImports) {
|
|
39940
|
-
code = code.substring(0, moduleImport.ss) + " ".repeat(moduleImport.se - moduleImport.ss + 1) + code.substring(moduleImport.se + 1);
|
|
39941
|
-
let name = path2.basename(moduleImport.n);
|
|
39942
|
-
fileMapping[name] && (modules[moduleI++] = name);
|
|
39943
|
-
}
|
|
39944
|
-
code = code.replace(/^\s*\/\/.*\n?$/gm, "").trim().split(`
|
|
40107
|
+
let prefixes = [...allPrefixes].sort().reverse();
|
|
40108
|
+
return {
|
|
40109
|
+
process: async (code, filePath) => {
|
|
40110
|
+
let moduleImports;
|
|
40111
|
+
try {
|
|
40112
|
+
moduleImports = parseDecoratorImports(code, filePath);
|
|
40113
|
+
} catch (exception) {
|
|
40114
|
+
throw new ProcessorError(`Import/export parse error: ${exception.toString()}`, filePath, 0, code, 0);
|
|
40115
|
+
}
|
|
40116
|
+
let modules = new Array(moduleImports.length), moduleI = 0;
|
|
40117
|
+
for (let moduleImport of moduleImports) {
|
|
40118
|
+
code = code.substring(0, moduleImport.ss) + " ".repeat(moduleImport.se - moduleImport.ss + 1) + code.substring(moduleImport.se + 1);
|
|
40119
|
+
let name = path2.basename(moduleImport.n);
|
|
40120
|
+
fileMapping[name] && (modules[moduleI++] = name);
|
|
40121
|
+
}
|
|
40122
|
+
code = code.replace(/^\s*\/\/.*\n?$/gm, "").trim().split(`
|
|
40123
|
+
|
|
40124
|
+
`).join(`
|
|
40125
|
+
`).trim() + `
|
|
40126
|
+
`, globalThis.process.env.DECKY_VERBOSE && console.log(import_chalk.default.yellow(code)), moduleI !== modules.length && (modules.length = moduleI);
|
|
40127
|
+
let result = {
|
|
40128
|
+
code,
|
|
40129
|
+
originalSource: code,
|
|
40130
|
+
filePath,
|
|
40131
|
+
startIndex: -1,
|
|
40132
|
+
stopIndex: -1
|
|
40133
|
+
}, symbolI = code.lastIndexOf("@") - 1;
|
|
40134
|
+
if (symbolI < -1)
|
|
40135
|
+
return { contents: code, note: null };
|
|
40136
|
+
symbolI === -1 && symbolI++;
|
|
40137
|
+
let _prefixI = -1, prefixI = -1, prefix = "", _code = "", didChange = false, lastMatchIndex = -1;
|
|
40138
|
+
do {
|
|
40139
|
+
if (symbolI = result.code.lastIndexOf("@"), symbolI === -1)
|
|
40140
|
+
break;
|
|
40141
|
+
for (result.startIndex = symbolI, result.stopIndex = result.startIndex + 1, prefix = "0AF"; result.stopIndex < result.code.length; )
|
|
40142
|
+
if (result.stopIndex++, result.code[result.stopIndex] === " " || result.code[result.stopIndex] === "(" || result.code[result.stopIndex] === `
|
|
40143
|
+
` || result.code[result.stopIndex] === ";" || result.code[result.stopIndex] === ",") {
|
|
40144
|
+
prefix = result.code.substring(result.startIndex + 1, result.stopIndex);
|
|
40145
|
+
break;
|
|
40146
|
+
}
|
|
40147
|
+
let decoratorModuleName;
|
|
40148
|
+
for (let moduleName of modules)
|
|
40149
|
+
if (prefixI = fileMapping[moduleName].decoratorPrefixes.indexOf(prefix), prefixI > -1) {
|
|
40150
|
+
decoratorModuleName = moduleName;
|
|
40151
|
+
break;
|
|
40152
|
+
}
|
|
40153
|
+
if (prefixI === -1) {
|
|
40154
|
+
result.code = result.code.substring(0, symbolI) + "\u{1F364}" + result.code.substring(symbolI + 1);
|
|
40155
|
+
continue;
|
|
40156
|
+
}
|
|
40157
|
+
let { decoratorFunctions } = fileMapping[decoratorModuleName];
|
|
40158
|
+
if (result.startIndex > -1 && decoratorFunctions[prefixI]) {
|
|
40159
|
+
_code = result.code, didChange = false;
|
|
40160
|
+
try {
|
|
40161
|
+
didChange = await decoratorFunctions[prefixI](result.startIndex, result);
|
|
40162
|
+
} catch (exception) {
|
|
40163
|
+
return exception instanceof ProcessorError ? {
|
|
40164
|
+
contents: "",
|
|
40165
|
+
note: exception.note
|
|
40166
|
+
} : {
|
|
40167
|
+
contents: "",
|
|
40168
|
+
note: new ProcessorError(exception.toString(), filePath, 0, result.code, 0).note
|
|
40169
|
+
};
|
|
40170
|
+
}
|
|
40171
|
+
didChange ? result.startIndex > -1 && result.stopIndex > -1 && (result.code = _code.substring(0, result.startIndex) + result.code + _code.substring(result.stopIndex)) : result.code = _code.substring(0, result.startIndex - 1) + _code.substring(result.stopIndex), result.startIndex = result.stopIndex = -1;
|
|
40172
|
+
}
|
|
40173
|
+
} while (symbolI > -1);
|
|
40174
|
+
return globalThis.process.env.DECKY_VERBOSE && console.log(import_chalk.default.green(result.code)), {
|
|
40175
|
+
contents: result.code.replace(/🍤/gm, "@"),
|
|
40176
|
+
note: null
|
|
40177
|
+
};
|
|
40178
|
+
},
|
|
40179
|
+
prefixes
|
|
40180
|
+
};
|
|
40181
|
+
}
|
|
40182
|
+
function onResolveDecorator(args) {
|
|
40183
|
+
return {
|
|
40184
|
+
path: args.path,
|
|
40185
|
+
namespace: "decorator-stub"
|
|
40186
|
+
};
|
|
40187
|
+
}
|
|
40188
|
+
function onResolveStaticDecorators(args) {
|
|
40189
|
+
return {
|
|
40190
|
+
path: args.path,
|
|
40191
|
+
namespace: "decky"
|
|
40192
|
+
};
|
|
40193
|
+
}
|
|
40194
|
+
var staticDecoratorCode = [property, klass].map((stub) => `/* @__PURE__ */
|
|
40195
|
+
export function ${stub}(...args){return args;}
|
|
40196
|
+
`).join(`
|
|
40197
|
+
`);
|
|
40198
|
+
function onLoadStaticDecorators(args) {
|
|
40199
|
+
return {
|
|
40200
|
+
contents: staticDecoratorCode,
|
|
40201
|
+
loader: "js"
|
|
40202
|
+
};
|
|
40203
|
+
}
|
|
40204
|
+
function plugin(decorators2) {
|
|
40205
|
+
let { prefixes, process: process2 } = buildDecoratorProcessor(decorators2), prefixesWithAt = prefixes.map((a) => a.startsWith("@") ? a : "@" + a);
|
|
40206
|
+
function isPotentialMatch(content) {
|
|
40207
|
+
if (!content.includes("@"))
|
|
40208
|
+
return false;
|
|
40209
|
+
for (let prefix of prefixesWithAt)
|
|
40210
|
+
if (content.includes(prefix))
|
|
40211
|
+
return true;
|
|
40212
|
+
return false;
|
|
40213
|
+
}
|
|
40214
|
+
function onLoadDecoratorStub(args) {
|
|
40215
|
+
let stub = require(args.path).decorators;
|
|
40216
|
+
return {
|
|
40217
|
+
contents: Object.keys(stub).map((stub2) => `/* @__PURE__ */
|
|
40218
|
+
export function ${stub2}(...args){return args;}
|
|
40219
|
+
`).join(`
|
|
40220
|
+
`),
|
|
40221
|
+
loader: "ts"
|
|
40222
|
+
};
|
|
40223
|
+
}
|
|
40224
|
+
async function onLoadCode(args) {
|
|
40225
|
+
let loader = path2.extname(args.path).substring(1), contents = await fs.promises.readFile(args.path, "utf8");
|
|
40226
|
+
if (!isPotentialMatch(contents))
|
|
40227
|
+
return {
|
|
40228
|
+
contents,
|
|
40229
|
+
loader
|
|
40230
|
+
};
|
|
40231
|
+
globalThis.process.env.DECKY_TIMINGS && console.time("[decky] ./" + path2.relative(globalThis.process.cwd(), args.path)), await initLexers();
|
|
40232
|
+
let { note, contents: _contents } = await process2(contents, args.path) ?? {};
|
|
40233
|
+
return globalThis.process.env.DECKY_TIMINGS && console.timeEnd("[decky] ./" + path2.relative(globalThis.process.cwd(), args.path)), {
|
|
40234
|
+
contents: _contents,
|
|
40235
|
+
errors: note ? [{ location: note.location, text: note.text }] : void 0,
|
|
40236
|
+
loader
|
|
40237
|
+
};
|
|
40238
|
+
}
|
|
40239
|
+
return {
|
|
40240
|
+
name: "decky",
|
|
40241
|
+
setup(build2) {
|
|
40242
|
+
build2.onResolve({ filter: /\.(decorator|dec|decky)\.(ts|tsx)$/ }, onResolveDecorator), build2.onResolve({ filter: /^decky$/ }, onResolveStaticDecorators), build2.onLoad({ filter: /^decky$/, namespace: "decky" }, onLoadStaticDecorators), build2.onLoad({ filter: /\.(decorator|dec)\.(ts)$/, namespace: "decorator-stub" }, onLoadDecoratorStub), build2.onLoad({ filter: /\.(decorator|dec)\.(tsx)$/, namespace: "decorator-stub" }, onLoadDecoratorStub), build2.onLoad({ filter: /\.(ts|tsx)$/ }, onLoadCode);
|
|
40243
|
+
}
|
|
40244
|
+
};
|
|
40245
|
+
}
|
|
40246
|
+
function property(callback) {
|
|
40247
|
+
return {
|
|
40248
|
+
callback,
|
|
40249
|
+
type: DecoratorType.property
|
|
40250
|
+
};
|
|
40251
|
+
}
|
|
40252
|
+
function propertyVoid(callback) {
|
|
40253
|
+
return {
|
|
40254
|
+
callback,
|
|
40255
|
+
type: DecoratorType.property
|
|
40256
|
+
};
|
|
40257
|
+
}
|
|
40258
|
+
function klass(callback) {
|
|
40259
|
+
return {
|
|
40260
|
+
callback,
|
|
40261
|
+
type: DecoratorType.klass
|
|
40262
|
+
};
|
|
40263
|
+
}
|
|
40264
|
+
function klassVoid(callback) {
|
|
40265
|
+
return {
|
|
40266
|
+
callback,
|
|
40267
|
+
type: DecoratorType.klass
|
|
40268
|
+
};
|
|
40269
|
+
}
|
|
40270
|
+
async function load2(decoratorsGlob, additionalConfig) {
|
|
40271
|
+
let entryPoints = await decorators(decoratorsGlob, additionalConfig), files = {};
|
|
40272
|
+
for (let file of entryPoints)
|
|
40273
|
+
Object.assign(files, {
|
|
40274
|
+
[file]: require(path2.join(process.cwd(), path2.dirname(file), path2.basename(file).replace(".ts", ".js"))).decorators
|
|
40275
|
+
});
|
|
40276
|
+
return plugin(files);
|
|
40277
|
+
}
|
|
40278
|
+
}
|
|
40279
|
+
});
|
|
40280
|
+
|
|
40281
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js
|
|
40282
|
+
var require_fs8 = __commonJS({
|
|
40283
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
40284
|
+
"use strict";
|
|
40285
|
+
var u = require_universalify2().fromCallback;
|
|
40286
|
+
var fs = require_graceful_fs();
|
|
40287
|
+
var api = [
|
|
40288
|
+
"access",
|
|
40289
|
+
"appendFile",
|
|
40290
|
+
"chmod",
|
|
40291
|
+
"chown",
|
|
40292
|
+
"close",
|
|
40293
|
+
"copyFile",
|
|
40294
|
+
"fchmod",
|
|
40295
|
+
"fchown",
|
|
40296
|
+
"fdatasync",
|
|
40297
|
+
"fstat",
|
|
40298
|
+
"fsync",
|
|
40299
|
+
"ftruncate",
|
|
40300
|
+
"futimes",
|
|
40301
|
+
"lchmod",
|
|
40302
|
+
"lchown",
|
|
40303
|
+
"link",
|
|
40304
|
+
"lstat",
|
|
40305
|
+
"mkdir",
|
|
40306
|
+
"mkdtemp",
|
|
40307
|
+
"open",
|
|
40308
|
+
"opendir",
|
|
40309
|
+
"readdir",
|
|
40310
|
+
"readFile",
|
|
40311
|
+
"readlink",
|
|
40312
|
+
"realpath",
|
|
40313
|
+
"rename",
|
|
40314
|
+
"rm",
|
|
40315
|
+
"rmdir",
|
|
40316
|
+
"stat",
|
|
40317
|
+
"symlink",
|
|
40318
|
+
"truncate",
|
|
40319
|
+
"unlink",
|
|
40320
|
+
"utimes",
|
|
40321
|
+
"writeFile"
|
|
40322
|
+
].filter((key) => {
|
|
40323
|
+
return typeof fs[key] === "function";
|
|
40324
|
+
});
|
|
40325
|
+
Object.assign(exports, fs);
|
|
40326
|
+
api.forEach((method) => {
|
|
40327
|
+
exports[method] = u(fs[method]);
|
|
40328
|
+
});
|
|
40329
|
+
exports.exists = function(filename, callback) {
|
|
40330
|
+
if (typeof callback === "function") {
|
|
40331
|
+
return fs.exists(filename, callback);
|
|
40332
|
+
}
|
|
40333
|
+
return new Promise((resolve) => {
|
|
40334
|
+
return fs.exists(filename, resolve);
|
|
40335
|
+
});
|
|
40336
|
+
};
|
|
40337
|
+
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
40338
|
+
if (typeof callback === "function") {
|
|
40339
|
+
return fs.read(fd, buffer, offset, length, position, callback);
|
|
40340
|
+
}
|
|
40341
|
+
return new Promise((resolve, reject) => {
|
|
40342
|
+
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
40343
|
+
if (err)
|
|
40344
|
+
return reject(err);
|
|
40345
|
+
resolve({ bytesRead, buffer: buffer2 });
|
|
40346
|
+
});
|
|
40347
|
+
});
|
|
40348
|
+
};
|
|
40349
|
+
exports.write = function(fd, buffer, ...args) {
|
|
40350
|
+
if (typeof args[args.length - 1] === "function") {
|
|
40351
|
+
return fs.write(fd, buffer, ...args);
|
|
40352
|
+
}
|
|
40353
|
+
return new Promise((resolve, reject) => {
|
|
40354
|
+
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
40355
|
+
if (err)
|
|
40356
|
+
return reject(err);
|
|
40357
|
+
resolve({ bytesWritten, buffer: buffer2 });
|
|
40358
|
+
});
|
|
40359
|
+
});
|
|
40360
|
+
};
|
|
40361
|
+
exports.readv = function(fd, buffers, ...args) {
|
|
40362
|
+
if (typeof args[args.length - 1] === "function") {
|
|
40363
|
+
return fs.readv(fd, buffers, ...args);
|
|
40364
|
+
}
|
|
40365
|
+
return new Promise((resolve, reject) => {
|
|
40366
|
+
fs.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
40367
|
+
if (err)
|
|
40368
|
+
return reject(err);
|
|
40369
|
+
resolve({ bytesRead, buffers: buffers2 });
|
|
40370
|
+
});
|
|
40371
|
+
});
|
|
40372
|
+
};
|
|
40373
|
+
exports.writev = function(fd, buffers, ...args) {
|
|
40374
|
+
if (typeof args[args.length - 1] === "function") {
|
|
40375
|
+
return fs.writev(fd, buffers, ...args);
|
|
40376
|
+
}
|
|
40377
|
+
return new Promise((resolve, reject) => {
|
|
40378
|
+
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
40379
|
+
if (err)
|
|
40380
|
+
return reject(err);
|
|
40381
|
+
resolve({ bytesWritten, buffers: buffers2 });
|
|
40382
|
+
});
|
|
40383
|
+
});
|
|
40384
|
+
};
|
|
40385
|
+
if (typeof fs.realpath.native === "function") {
|
|
40386
|
+
exports.realpath.native = u(fs.realpath.native);
|
|
40387
|
+
} else {
|
|
40388
|
+
process.emitWarning(
|
|
40389
|
+
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
40390
|
+
"Warning",
|
|
40391
|
+
"fs-extra-WARN0003"
|
|
40392
|
+
);
|
|
40393
|
+
}
|
|
40394
|
+
}
|
|
40395
|
+
});
|
|
40396
|
+
|
|
40397
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js
|
|
40398
|
+
var require_utils10 = __commonJS({
|
|
40399
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
|
|
40400
|
+
"use strict";
|
|
40401
|
+
var path2 = require("path");
|
|
40402
|
+
module2.exports.checkPath = function checkPath(pth) {
|
|
40403
|
+
if (process.platform === "win32") {
|
|
40404
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path2.parse(pth).root, ""));
|
|
40405
|
+
if (pathHasInvalidWinCharacters) {
|
|
40406
|
+
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
40407
|
+
error.code = "EINVAL";
|
|
40408
|
+
throw error;
|
|
40409
|
+
}
|
|
40410
|
+
}
|
|
40411
|
+
};
|
|
40412
|
+
}
|
|
40413
|
+
});
|
|
40414
|
+
|
|
40415
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
40416
|
+
var require_make_dir2 = __commonJS({
|
|
40417
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
|
|
40418
|
+
"use strict";
|
|
40419
|
+
var fs = require_fs8();
|
|
40420
|
+
var { checkPath } = require_utils10();
|
|
40421
|
+
var getMode = (options) => {
|
|
40422
|
+
const defaults2 = { mode: 511 };
|
|
40423
|
+
if (typeof options === "number")
|
|
40424
|
+
return options;
|
|
40425
|
+
return { ...defaults2, ...options }.mode;
|
|
40426
|
+
};
|
|
40427
|
+
module2.exports.makeDir = async (dir, options) => {
|
|
40428
|
+
checkPath(dir);
|
|
40429
|
+
return fs.mkdir(dir, {
|
|
40430
|
+
mode: getMode(options),
|
|
40431
|
+
recursive: true
|
|
40432
|
+
});
|
|
40433
|
+
};
|
|
40434
|
+
module2.exports.makeDirSync = (dir, options) => {
|
|
40435
|
+
checkPath(dir);
|
|
40436
|
+
return fs.mkdirSync(dir, {
|
|
40437
|
+
mode: getMode(options),
|
|
40438
|
+
recursive: true
|
|
40439
|
+
});
|
|
40440
|
+
};
|
|
40441
|
+
}
|
|
40442
|
+
});
|
|
40443
|
+
|
|
40444
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js
|
|
40445
|
+
var require_mkdirs2 = __commonJS({
|
|
40446
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
|
|
40447
|
+
"use strict";
|
|
40448
|
+
var u = require_universalify2().fromPromise;
|
|
40449
|
+
var { makeDir: _makeDir, makeDirSync } = require_make_dir2();
|
|
40450
|
+
var makeDir = u(_makeDir);
|
|
40451
|
+
module2.exports = {
|
|
40452
|
+
mkdirs: makeDir,
|
|
40453
|
+
mkdirsSync: makeDirSync,
|
|
40454
|
+
// alias
|
|
40455
|
+
mkdirp: makeDir,
|
|
40456
|
+
mkdirpSync: makeDirSync,
|
|
40457
|
+
ensureDir: makeDir,
|
|
40458
|
+
ensureDirSync: makeDirSync
|
|
40459
|
+
};
|
|
40460
|
+
}
|
|
40461
|
+
});
|
|
40462
|
+
|
|
40463
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js
|
|
40464
|
+
var require_path_exists2 = __commonJS({
|
|
40465
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
|
|
40466
|
+
"use strict";
|
|
40467
|
+
var u = require_universalify2().fromPromise;
|
|
40468
|
+
var fs = require_fs8();
|
|
40469
|
+
function pathExists(path2) {
|
|
40470
|
+
return fs.access(path2).then(() => true).catch(() => false);
|
|
40471
|
+
}
|
|
40472
|
+
module2.exports = {
|
|
40473
|
+
pathExists: u(pathExists),
|
|
40474
|
+
pathExistsSync: fs.existsSync
|
|
40475
|
+
};
|
|
40476
|
+
}
|
|
40477
|
+
});
|
|
40478
|
+
|
|
40479
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js
|
|
40480
|
+
var require_utimes2 = __commonJS({
|
|
40481
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
|
|
40482
|
+
"use strict";
|
|
40483
|
+
var fs = require_graceful_fs();
|
|
40484
|
+
function utimesMillis(path2, atime, mtime, callback) {
|
|
40485
|
+
fs.open(path2, "r+", (err, fd) => {
|
|
40486
|
+
if (err)
|
|
40487
|
+
return callback(err);
|
|
40488
|
+
fs.futimes(fd, atime, mtime, (futimesErr) => {
|
|
40489
|
+
fs.close(fd, (closeErr) => {
|
|
40490
|
+
if (callback)
|
|
40491
|
+
callback(futimesErr || closeErr);
|
|
40492
|
+
});
|
|
40493
|
+
});
|
|
40494
|
+
});
|
|
40495
|
+
}
|
|
40496
|
+
function utimesMillisSync(path2, atime, mtime) {
|
|
40497
|
+
const fd = fs.openSync(path2, "r+");
|
|
40498
|
+
fs.futimesSync(fd, atime, mtime);
|
|
40499
|
+
return fs.closeSync(fd);
|
|
40500
|
+
}
|
|
40501
|
+
module2.exports = {
|
|
40502
|
+
utimesMillis,
|
|
40503
|
+
utimesMillisSync
|
|
40504
|
+
};
|
|
40505
|
+
}
|
|
40506
|
+
});
|
|
40507
|
+
|
|
40508
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js
|
|
40509
|
+
var require_stat2 = __commonJS({
|
|
40510
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
|
|
40511
|
+
"use strict";
|
|
40512
|
+
var fs = require_fs8();
|
|
40513
|
+
var path2 = require("path");
|
|
40514
|
+
var util2 = require("util");
|
|
40515
|
+
function getStats(src, dest, opts) {
|
|
40516
|
+
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
|
40517
|
+
return Promise.all([
|
|
40518
|
+
statFunc(src),
|
|
40519
|
+
statFunc(dest).catch((err) => {
|
|
40520
|
+
if (err.code === "ENOENT")
|
|
40521
|
+
return null;
|
|
40522
|
+
throw err;
|
|
40523
|
+
})
|
|
40524
|
+
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
|
|
40525
|
+
}
|
|
40526
|
+
function getStatsSync(src, dest, opts) {
|
|
40527
|
+
let destStat;
|
|
40528
|
+
const statFunc = opts.dereference ? (file) => fs.statSync(file, { bigint: true }) : (file) => fs.lstatSync(file, { bigint: true });
|
|
40529
|
+
const srcStat = statFunc(src);
|
|
40530
|
+
try {
|
|
40531
|
+
destStat = statFunc(dest);
|
|
40532
|
+
} catch (err) {
|
|
40533
|
+
if (err.code === "ENOENT")
|
|
40534
|
+
return { srcStat, destStat: null };
|
|
40535
|
+
throw err;
|
|
40536
|
+
}
|
|
40537
|
+
return { srcStat, destStat };
|
|
40538
|
+
}
|
|
40539
|
+
function checkPaths(src, dest, funcName, opts, cb) {
|
|
40540
|
+
util2.callbackify(getStats)(src, dest, opts, (err, stats) => {
|
|
40541
|
+
if (err)
|
|
40542
|
+
return cb(err);
|
|
40543
|
+
const { srcStat, destStat } = stats;
|
|
40544
|
+
if (destStat) {
|
|
40545
|
+
if (areIdentical(srcStat, destStat)) {
|
|
40546
|
+
const srcBaseName = path2.basename(src);
|
|
40547
|
+
const destBaseName = path2.basename(dest);
|
|
40548
|
+
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
40549
|
+
return cb(null, { srcStat, destStat, isChangingCase: true });
|
|
40550
|
+
}
|
|
40551
|
+
return cb(new Error("Source and destination must not be the same."));
|
|
40552
|
+
}
|
|
40553
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
40554
|
+
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
|
|
40555
|
+
}
|
|
40556
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
40557
|
+
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
|
|
40558
|
+
}
|
|
40559
|
+
}
|
|
40560
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
40561
|
+
return cb(new Error(errMsg(src, dest, funcName)));
|
|
40562
|
+
}
|
|
40563
|
+
return cb(null, { srcStat, destStat });
|
|
40564
|
+
});
|
|
40565
|
+
}
|
|
40566
|
+
function checkPathsSync(src, dest, funcName, opts) {
|
|
40567
|
+
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
40568
|
+
if (destStat) {
|
|
40569
|
+
if (areIdentical(srcStat, destStat)) {
|
|
40570
|
+
const srcBaseName = path2.basename(src);
|
|
40571
|
+
const destBaseName = path2.basename(dest);
|
|
40572
|
+
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
40573
|
+
return { srcStat, destStat, isChangingCase: true };
|
|
40574
|
+
}
|
|
40575
|
+
throw new Error("Source and destination must not be the same.");
|
|
40576
|
+
}
|
|
40577
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
40578
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
|
|
40579
|
+
}
|
|
40580
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
40581
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
|
|
40582
|
+
}
|
|
40583
|
+
}
|
|
40584
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
40585
|
+
throw new Error(errMsg(src, dest, funcName));
|
|
40586
|
+
}
|
|
40587
|
+
return { srcStat, destStat };
|
|
40588
|
+
}
|
|
40589
|
+
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
40590
|
+
const srcParent = path2.resolve(path2.dirname(src));
|
|
40591
|
+
const destParent = path2.resolve(path2.dirname(dest));
|
|
40592
|
+
if (destParent === srcParent || destParent === path2.parse(destParent).root)
|
|
40593
|
+
return cb();
|
|
40594
|
+
fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
40595
|
+
if (err) {
|
|
40596
|
+
if (err.code === "ENOENT")
|
|
40597
|
+
return cb();
|
|
40598
|
+
return cb(err);
|
|
40599
|
+
}
|
|
40600
|
+
if (areIdentical(srcStat, destStat)) {
|
|
40601
|
+
return cb(new Error(errMsg(src, dest, funcName)));
|
|
40602
|
+
}
|
|
40603
|
+
return checkParentPaths(src, srcStat, destParent, funcName, cb);
|
|
40604
|
+
});
|
|
40605
|
+
}
|
|
40606
|
+
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
40607
|
+
const srcParent = path2.resolve(path2.dirname(src));
|
|
40608
|
+
const destParent = path2.resolve(path2.dirname(dest));
|
|
40609
|
+
if (destParent === srcParent || destParent === path2.parse(destParent).root)
|
|
40610
|
+
return;
|
|
40611
|
+
let destStat;
|
|
40612
|
+
try {
|
|
40613
|
+
destStat = fs.statSync(destParent, { bigint: true });
|
|
40614
|
+
} catch (err) {
|
|
40615
|
+
if (err.code === "ENOENT")
|
|
40616
|
+
return;
|
|
40617
|
+
throw err;
|
|
40618
|
+
}
|
|
40619
|
+
if (areIdentical(srcStat, destStat)) {
|
|
40620
|
+
throw new Error(errMsg(src, dest, funcName));
|
|
40621
|
+
}
|
|
40622
|
+
return checkParentPathsSync(src, srcStat, destParent, funcName);
|
|
40623
|
+
}
|
|
40624
|
+
function areIdentical(srcStat, destStat) {
|
|
40625
|
+
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
40626
|
+
}
|
|
40627
|
+
function isSrcSubdir(src, dest) {
|
|
40628
|
+
const srcArr = path2.resolve(src).split(path2.sep).filter((i) => i);
|
|
40629
|
+
const destArr = path2.resolve(dest).split(path2.sep).filter((i) => i);
|
|
40630
|
+
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
|
|
40631
|
+
}
|
|
40632
|
+
function errMsg(src, dest, funcName) {
|
|
40633
|
+
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
|
|
40634
|
+
}
|
|
40635
|
+
module2.exports = {
|
|
40636
|
+
checkPaths,
|
|
40637
|
+
checkPathsSync,
|
|
40638
|
+
checkParentPaths,
|
|
40639
|
+
checkParentPathsSync,
|
|
40640
|
+
isSrcSubdir,
|
|
40641
|
+
areIdentical
|
|
40642
|
+
};
|
|
40643
|
+
}
|
|
40644
|
+
});
|
|
40645
|
+
|
|
40646
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js
|
|
40647
|
+
var require_copy3 = __commonJS({
|
|
40648
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
|
|
40649
|
+
"use strict";
|
|
40650
|
+
var fs = require_graceful_fs();
|
|
40651
|
+
var path2 = require("path");
|
|
40652
|
+
var mkdirs = require_mkdirs2().mkdirs;
|
|
40653
|
+
var pathExists = require_path_exists2().pathExists;
|
|
40654
|
+
var utimesMillis = require_utimes2().utimesMillis;
|
|
40655
|
+
var stat = require_stat2();
|
|
40656
|
+
function copy(src, dest, opts, cb) {
|
|
40657
|
+
if (typeof opts === "function" && !cb) {
|
|
40658
|
+
cb = opts;
|
|
40659
|
+
opts = {};
|
|
40660
|
+
} else if (typeof opts === "function") {
|
|
40661
|
+
opts = { filter: opts };
|
|
40662
|
+
}
|
|
40663
|
+
cb = cb || function() {
|
|
40664
|
+
};
|
|
40665
|
+
opts = opts || {};
|
|
40666
|
+
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
40667
|
+
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
40668
|
+
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
40669
|
+
process.emitWarning(
|
|
40670
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
40671
|
+
"Warning",
|
|
40672
|
+
"fs-extra-WARN0001"
|
|
40673
|
+
);
|
|
40674
|
+
}
|
|
40675
|
+
stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
|
|
40676
|
+
if (err)
|
|
40677
|
+
return cb(err);
|
|
40678
|
+
const { srcStat, destStat } = stats;
|
|
40679
|
+
stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
|
|
40680
|
+
if (err2)
|
|
40681
|
+
return cb(err2);
|
|
40682
|
+
runFilter(src, dest, opts, (err3, include) => {
|
|
40683
|
+
if (err3)
|
|
40684
|
+
return cb(err3);
|
|
40685
|
+
if (!include)
|
|
40686
|
+
return cb();
|
|
40687
|
+
checkParentDir(destStat, src, dest, opts, cb);
|
|
40688
|
+
});
|
|
40689
|
+
});
|
|
40690
|
+
});
|
|
40691
|
+
}
|
|
40692
|
+
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
40693
|
+
const destParent = path2.dirname(dest);
|
|
40694
|
+
pathExists(destParent, (err, dirExists) => {
|
|
40695
|
+
if (err)
|
|
40696
|
+
return cb(err);
|
|
40697
|
+
if (dirExists)
|
|
40698
|
+
return getStats(destStat, src, dest, opts, cb);
|
|
40699
|
+
mkdirs(destParent, (err2) => {
|
|
40700
|
+
if (err2)
|
|
40701
|
+
return cb(err2);
|
|
40702
|
+
return getStats(destStat, src, dest, opts, cb);
|
|
40703
|
+
});
|
|
40704
|
+
});
|
|
40705
|
+
}
|
|
40706
|
+
function runFilter(src, dest, opts, cb) {
|
|
40707
|
+
if (!opts.filter)
|
|
40708
|
+
return cb(null, true);
|
|
40709
|
+
Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
|
|
40710
|
+
}
|
|
40711
|
+
function getStats(destStat, src, dest, opts, cb) {
|
|
40712
|
+
const stat2 = opts.dereference ? fs.stat : fs.lstat;
|
|
40713
|
+
stat2(src, (err, srcStat) => {
|
|
40714
|
+
if (err)
|
|
40715
|
+
return cb(err);
|
|
40716
|
+
if (srcStat.isDirectory())
|
|
40717
|
+
return onDir(srcStat, destStat, src, dest, opts, cb);
|
|
40718
|
+
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
40719
|
+
return onFile(srcStat, destStat, src, dest, opts, cb);
|
|
40720
|
+
else if (srcStat.isSymbolicLink())
|
|
40721
|
+
return onLink(destStat, src, dest, opts, cb);
|
|
40722
|
+
else if (srcStat.isSocket())
|
|
40723
|
+
return cb(new Error(`Cannot copy a socket file: ${src}`));
|
|
40724
|
+
else if (srcStat.isFIFO())
|
|
40725
|
+
return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
|
|
40726
|
+
return cb(new Error(`Unknown file: ${src}`));
|
|
40727
|
+
});
|
|
40728
|
+
}
|
|
40729
|
+
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
|
40730
|
+
if (!destStat)
|
|
40731
|
+
return copyFile(srcStat, src, dest, opts, cb);
|
|
40732
|
+
return mayCopyFile(srcStat, src, dest, opts, cb);
|
|
40733
|
+
}
|
|
40734
|
+
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
40735
|
+
if (opts.overwrite) {
|
|
40736
|
+
fs.unlink(dest, (err) => {
|
|
40737
|
+
if (err)
|
|
40738
|
+
return cb(err);
|
|
40739
|
+
return copyFile(srcStat, src, dest, opts, cb);
|
|
40740
|
+
});
|
|
40741
|
+
} else if (opts.errorOnExist) {
|
|
40742
|
+
return cb(new Error(`'${dest}' already exists`));
|
|
40743
|
+
} else
|
|
40744
|
+
return cb();
|
|
40745
|
+
}
|
|
40746
|
+
function copyFile(srcStat, src, dest, opts, cb) {
|
|
40747
|
+
fs.copyFile(src, dest, (err) => {
|
|
40748
|
+
if (err)
|
|
40749
|
+
return cb(err);
|
|
40750
|
+
if (opts.preserveTimestamps)
|
|
40751
|
+
return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
|
40752
|
+
return setDestMode(dest, srcStat.mode, cb);
|
|
40753
|
+
});
|
|
40754
|
+
}
|
|
40755
|
+
function handleTimestampsAndMode(srcMode, src, dest, cb) {
|
|
40756
|
+
if (fileIsNotWritable(srcMode)) {
|
|
40757
|
+
return makeFileWritable(dest, srcMode, (err) => {
|
|
40758
|
+
if (err)
|
|
40759
|
+
return cb(err);
|
|
40760
|
+
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
40761
|
+
});
|
|
40762
|
+
}
|
|
40763
|
+
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
40764
|
+
}
|
|
40765
|
+
function fileIsNotWritable(srcMode) {
|
|
40766
|
+
return (srcMode & 128) === 0;
|
|
40767
|
+
}
|
|
40768
|
+
function makeFileWritable(dest, srcMode, cb) {
|
|
40769
|
+
return setDestMode(dest, srcMode | 128, cb);
|
|
40770
|
+
}
|
|
40771
|
+
function setDestTimestampsAndMode(srcMode, src, dest, cb) {
|
|
40772
|
+
setDestTimestamps(src, dest, (err) => {
|
|
40773
|
+
if (err)
|
|
40774
|
+
return cb(err);
|
|
40775
|
+
return setDestMode(dest, srcMode, cb);
|
|
40776
|
+
});
|
|
40777
|
+
}
|
|
40778
|
+
function setDestMode(dest, srcMode, cb) {
|
|
40779
|
+
return fs.chmod(dest, srcMode, cb);
|
|
40780
|
+
}
|
|
40781
|
+
function setDestTimestamps(src, dest, cb) {
|
|
40782
|
+
fs.stat(src, (err, updatedSrcStat) => {
|
|
40783
|
+
if (err)
|
|
40784
|
+
return cb(err);
|
|
40785
|
+
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
40786
|
+
});
|
|
40787
|
+
}
|
|
40788
|
+
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
40789
|
+
if (!destStat)
|
|
40790
|
+
return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
40791
|
+
return copyDir(src, dest, opts, cb);
|
|
40792
|
+
}
|
|
40793
|
+
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
40794
|
+
fs.mkdir(dest, (err) => {
|
|
40795
|
+
if (err)
|
|
40796
|
+
return cb(err);
|
|
40797
|
+
copyDir(src, dest, opts, (err2) => {
|
|
40798
|
+
if (err2)
|
|
40799
|
+
return cb(err2);
|
|
40800
|
+
return setDestMode(dest, srcMode, cb);
|
|
40801
|
+
});
|
|
40802
|
+
});
|
|
40803
|
+
}
|
|
40804
|
+
function copyDir(src, dest, opts, cb) {
|
|
40805
|
+
fs.readdir(src, (err, items) => {
|
|
40806
|
+
if (err)
|
|
40807
|
+
return cb(err);
|
|
40808
|
+
return copyDirItems(items, src, dest, opts, cb);
|
|
40809
|
+
});
|
|
40810
|
+
}
|
|
40811
|
+
function copyDirItems(items, src, dest, opts, cb) {
|
|
40812
|
+
const item = items.pop();
|
|
40813
|
+
if (!item)
|
|
40814
|
+
return cb();
|
|
40815
|
+
return copyDirItem(items, item, src, dest, opts, cb);
|
|
40816
|
+
}
|
|
40817
|
+
function copyDirItem(items, item, src, dest, opts, cb) {
|
|
40818
|
+
const srcItem = path2.join(src, item);
|
|
40819
|
+
const destItem = path2.join(dest, item);
|
|
40820
|
+
runFilter(srcItem, destItem, opts, (err, include) => {
|
|
40821
|
+
if (err)
|
|
40822
|
+
return cb(err);
|
|
40823
|
+
if (!include)
|
|
40824
|
+
return copyDirItems(items, src, dest, opts, cb);
|
|
40825
|
+
stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
|
|
40826
|
+
if (err2)
|
|
40827
|
+
return cb(err2);
|
|
40828
|
+
const { destStat } = stats;
|
|
40829
|
+
getStats(destStat, srcItem, destItem, opts, (err3) => {
|
|
40830
|
+
if (err3)
|
|
40831
|
+
return cb(err3);
|
|
40832
|
+
return copyDirItems(items, src, dest, opts, cb);
|
|
40833
|
+
});
|
|
40834
|
+
});
|
|
40835
|
+
});
|
|
40836
|
+
}
|
|
40837
|
+
function onLink(destStat, src, dest, opts, cb) {
|
|
40838
|
+
fs.readlink(src, (err, resolvedSrc) => {
|
|
40839
|
+
if (err)
|
|
40840
|
+
return cb(err);
|
|
40841
|
+
if (opts.dereference) {
|
|
40842
|
+
resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
|
|
40843
|
+
}
|
|
40844
|
+
if (!destStat) {
|
|
40845
|
+
return fs.symlink(resolvedSrc, dest, cb);
|
|
40846
|
+
} else {
|
|
40847
|
+
fs.readlink(dest, (err2, resolvedDest) => {
|
|
40848
|
+
if (err2) {
|
|
40849
|
+
if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
|
|
40850
|
+
return fs.symlink(resolvedSrc, dest, cb);
|
|
40851
|
+
return cb(err2);
|
|
40852
|
+
}
|
|
40853
|
+
if (opts.dereference) {
|
|
40854
|
+
resolvedDest = path2.resolve(process.cwd(), resolvedDest);
|
|
40855
|
+
}
|
|
40856
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
40857
|
+
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
|
40858
|
+
}
|
|
40859
|
+
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
40860
|
+
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
|
40861
|
+
}
|
|
40862
|
+
return copyLink(resolvedSrc, dest, cb);
|
|
40863
|
+
});
|
|
40864
|
+
}
|
|
40865
|
+
});
|
|
40866
|
+
}
|
|
40867
|
+
function copyLink(resolvedSrc, dest, cb) {
|
|
40868
|
+
fs.unlink(dest, (err) => {
|
|
40869
|
+
if (err)
|
|
40870
|
+
return cb(err);
|
|
40871
|
+
return fs.symlink(resolvedSrc, dest, cb);
|
|
40872
|
+
});
|
|
40873
|
+
}
|
|
40874
|
+
module2.exports = copy;
|
|
40875
|
+
}
|
|
40876
|
+
});
|
|
40877
|
+
|
|
40878
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js
|
|
40879
|
+
var require_copy_sync2 = __commonJS({
|
|
40880
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
|
|
40881
|
+
"use strict";
|
|
40882
|
+
var fs = require_graceful_fs();
|
|
40883
|
+
var path2 = require("path");
|
|
40884
|
+
var mkdirsSync = require_mkdirs2().mkdirsSync;
|
|
40885
|
+
var utimesMillisSync = require_utimes2().utimesMillisSync;
|
|
40886
|
+
var stat = require_stat2();
|
|
40887
|
+
function copySync(src, dest, opts) {
|
|
40888
|
+
if (typeof opts === "function") {
|
|
40889
|
+
opts = { filter: opts };
|
|
40890
|
+
}
|
|
40891
|
+
opts = opts || {};
|
|
40892
|
+
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
40893
|
+
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
40894
|
+
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
40895
|
+
process.emitWarning(
|
|
40896
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
40897
|
+
"Warning",
|
|
40898
|
+
"fs-extra-WARN0002"
|
|
40899
|
+
);
|
|
40900
|
+
}
|
|
40901
|
+
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
40902
|
+
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
40903
|
+
if (opts.filter && !opts.filter(src, dest))
|
|
40904
|
+
return;
|
|
40905
|
+
const destParent = path2.dirname(dest);
|
|
40906
|
+
if (!fs.existsSync(destParent))
|
|
40907
|
+
mkdirsSync(destParent);
|
|
40908
|
+
return getStats(destStat, src, dest, opts);
|
|
40909
|
+
}
|
|
40910
|
+
function getStats(destStat, src, dest, opts) {
|
|
40911
|
+
const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
|
|
40912
|
+
const srcStat = statSync(src);
|
|
40913
|
+
if (srcStat.isDirectory())
|
|
40914
|
+
return onDir(srcStat, destStat, src, dest, opts);
|
|
40915
|
+
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
40916
|
+
return onFile(srcStat, destStat, src, dest, opts);
|
|
40917
|
+
else if (srcStat.isSymbolicLink())
|
|
40918
|
+
return onLink(destStat, src, dest, opts);
|
|
40919
|
+
else if (srcStat.isSocket())
|
|
40920
|
+
throw new Error(`Cannot copy a socket file: ${src}`);
|
|
40921
|
+
else if (srcStat.isFIFO())
|
|
40922
|
+
throw new Error(`Cannot copy a FIFO pipe: ${src}`);
|
|
40923
|
+
throw new Error(`Unknown file: ${src}`);
|
|
40924
|
+
}
|
|
40925
|
+
function onFile(srcStat, destStat, src, dest, opts) {
|
|
40926
|
+
if (!destStat)
|
|
40927
|
+
return copyFile(srcStat, src, dest, opts);
|
|
40928
|
+
return mayCopyFile(srcStat, src, dest, opts);
|
|
40929
|
+
}
|
|
40930
|
+
function mayCopyFile(srcStat, src, dest, opts) {
|
|
40931
|
+
if (opts.overwrite) {
|
|
40932
|
+
fs.unlinkSync(dest);
|
|
40933
|
+
return copyFile(srcStat, src, dest, opts);
|
|
40934
|
+
} else if (opts.errorOnExist) {
|
|
40935
|
+
throw new Error(`'${dest}' already exists`);
|
|
40936
|
+
}
|
|
40937
|
+
}
|
|
40938
|
+
function copyFile(srcStat, src, dest, opts) {
|
|
40939
|
+
fs.copyFileSync(src, dest);
|
|
40940
|
+
if (opts.preserveTimestamps)
|
|
40941
|
+
handleTimestamps(srcStat.mode, src, dest);
|
|
40942
|
+
return setDestMode(dest, srcStat.mode);
|
|
40943
|
+
}
|
|
40944
|
+
function handleTimestamps(srcMode, src, dest) {
|
|
40945
|
+
if (fileIsNotWritable(srcMode))
|
|
40946
|
+
makeFileWritable(dest, srcMode);
|
|
40947
|
+
return setDestTimestamps(src, dest);
|
|
40948
|
+
}
|
|
40949
|
+
function fileIsNotWritable(srcMode) {
|
|
40950
|
+
return (srcMode & 128) === 0;
|
|
40951
|
+
}
|
|
40952
|
+
function makeFileWritable(dest, srcMode) {
|
|
40953
|
+
return setDestMode(dest, srcMode | 128);
|
|
40954
|
+
}
|
|
40955
|
+
function setDestMode(dest, srcMode) {
|
|
40956
|
+
return fs.chmodSync(dest, srcMode);
|
|
40957
|
+
}
|
|
40958
|
+
function setDestTimestamps(src, dest) {
|
|
40959
|
+
const updatedSrcStat = fs.statSync(src);
|
|
40960
|
+
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
40961
|
+
}
|
|
40962
|
+
function onDir(srcStat, destStat, src, dest, opts) {
|
|
40963
|
+
if (!destStat)
|
|
40964
|
+
return mkDirAndCopy(srcStat.mode, src, dest, opts);
|
|
40965
|
+
return copyDir(src, dest, opts);
|
|
40966
|
+
}
|
|
40967
|
+
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
40968
|
+
fs.mkdirSync(dest);
|
|
40969
|
+
copyDir(src, dest, opts);
|
|
40970
|
+
return setDestMode(dest, srcMode);
|
|
40971
|
+
}
|
|
40972
|
+
function copyDir(src, dest, opts) {
|
|
40973
|
+
fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
40974
|
+
}
|
|
40975
|
+
function copyDirItem(item, src, dest, opts) {
|
|
40976
|
+
const srcItem = path2.join(src, item);
|
|
40977
|
+
const destItem = path2.join(dest, item);
|
|
40978
|
+
if (opts.filter && !opts.filter(srcItem, destItem))
|
|
40979
|
+
return;
|
|
40980
|
+
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
40981
|
+
return getStats(destStat, srcItem, destItem, opts);
|
|
40982
|
+
}
|
|
40983
|
+
function onLink(destStat, src, dest, opts) {
|
|
40984
|
+
let resolvedSrc = fs.readlinkSync(src);
|
|
40985
|
+
if (opts.dereference) {
|
|
40986
|
+
resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
|
|
40987
|
+
}
|
|
40988
|
+
if (!destStat) {
|
|
40989
|
+
return fs.symlinkSync(resolvedSrc, dest);
|
|
40990
|
+
} else {
|
|
40991
|
+
let resolvedDest;
|
|
40992
|
+
try {
|
|
40993
|
+
resolvedDest = fs.readlinkSync(dest);
|
|
40994
|
+
} catch (err) {
|
|
40995
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN")
|
|
40996
|
+
return fs.symlinkSync(resolvedSrc, dest);
|
|
40997
|
+
throw err;
|
|
40998
|
+
}
|
|
40999
|
+
if (opts.dereference) {
|
|
41000
|
+
resolvedDest = path2.resolve(process.cwd(), resolvedDest);
|
|
41001
|
+
}
|
|
41002
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
41003
|
+
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
41004
|
+
}
|
|
41005
|
+
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
41006
|
+
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
41007
|
+
}
|
|
41008
|
+
return copyLink(resolvedSrc, dest);
|
|
41009
|
+
}
|
|
41010
|
+
}
|
|
41011
|
+
function copyLink(resolvedSrc, dest) {
|
|
41012
|
+
fs.unlinkSync(dest);
|
|
41013
|
+
return fs.symlinkSync(resolvedSrc, dest);
|
|
41014
|
+
}
|
|
41015
|
+
module2.exports = copySync;
|
|
41016
|
+
}
|
|
41017
|
+
});
|
|
41018
|
+
|
|
41019
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js
|
|
41020
|
+
var require_copy4 = __commonJS({
|
|
41021
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
|
|
41022
|
+
"use strict";
|
|
41023
|
+
var u = require_universalify2().fromCallback;
|
|
41024
|
+
module2.exports = {
|
|
41025
|
+
copy: u(require_copy3()),
|
|
41026
|
+
copySync: require_copy_sync2()
|
|
41027
|
+
};
|
|
41028
|
+
}
|
|
41029
|
+
});
|
|
41030
|
+
|
|
41031
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js
|
|
41032
|
+
var require_remove2 = __commonJS({
|
|
41033
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
|
|
41034
|
+
"use strict";
|
|
41035
|
+
var fs = require_graceful_fs();
|
|
41036
|
+
var u = require_universalify2().fromCallback;
|
|
41037
|
+
function remove(path2, callback) {
|
|
41038
|
+
fs.rm(path2, { recursive: true, force: true }, callback);
|
|
41039
|
+
}
|
|
41040
|
+
function removeSync2(path2) {
|
|
41041
|
+
fs.rmSync(path2, { recursive: true, force: true });
|
|
41042
|
+
}
|
|
41043
|
+
module2.exports = {
|
|
41044
|
+
remove: u(remove),
|
|
41045
|
+
removeSync: removeSync2
|
|
41046
|
+
};
|
|
41047
|
+
}
|
|
41048
|
+
});
|
|
41049
|
+
|
|
41050
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js
|
|
41051
|
+
var require_empty3 = __commonJS({
|
|
41052
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
|
|
41053
|
+
"use strict";
|
|
41054
|
+
var u = require_universalify2().fromPromise;
|
|
41055
|
+
var fs = require_fs8();
|
|
41056
|
+
var path2 = require("path");
|
|
41057
|
+
var mkdir = require_mkdirs2();
|
|
41058
|
+
var remove = require_remove2();
|
|
41059
|
+
var emptyDir = u(async function emptyDir2(dir) {
|
|
41060
|
+
let items;
|
|
41061
|
+
try {
|
|
41062
|
+
items = await fs.readdir(dir);
|
|
41063
|
+
} catch {
|
|
41064
|
+
return mkdir.mkdirs(dir);
|
|
41065
|
+
}
|
|
41066
|
+
return Promise.all(items.map((item) => remove.remove(path2.join(dir, item))));
|
|
41067
|
+
});
|
|
41068
|
+
function emptyDirSync(dir) {
|
|
41069
|
+
let items;
|
|
41070
|
+
try {
|
|
41071
|
+
items = fs.readdirSync(dir);
|
|
41072
|
+
} catch {
|
|
41073
|
+
return mkdir.mkdirsSync(dir);
|
|
41074
|
+
}
|
|
41075
|
+
items.forEach((item) => {
|
|
41076
|
+
item = path2.join(dir, item);
|
|
41077
|
+
remove.removeSync(item);
|
|
41078
|
+
});
|
|
41079
|
+
}
|
|
41080
|
+
module2.exports = {
|
|
41081
|
+
emptyDirSync,
|
|
41082
|
+
emptydirSync: emptyDirSync,
|
|
41083
|
+
emptyDir,
|
|
41084
|
+
emptydir: emptyDir
|
|
41085
|
+
};
|
|
41086
|
+
}
|
|
41087
|
+
});
|
|
41088
|
+
|
|
41089
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js
|
|
41090
|
+
var require_file2 = __commonJS({
|
|
41091
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
|
|
41092
|
+
"use strict";
|
|
41093
|
+
var u = require_universalify2().fromCallback;
|
|
41094
|
+
var path2 = require("path");
|
|
41095
|
+
var fs = require_graceful_fs();
|
|
41096
|
+
var mkdir = require_mkdirs2();
|
|
41097
|
+
function createFile(file, callback) {
|
|
41098
|
+
function makeFile() {
|
|
41099
|
+
fs.writeFile(file, "", (err) => {
|
|
41100
|
+
if (err)
|
|
41101
|
+
return callback(err);
|
|
41102
|
+
callback();
|
|
41103
|
+
});
|
|
41104
|
+
}
|
|
41105
|
+
fs.stat(file, (err, stats) => {
|
|
41106
|
+
if (!err && stats.isFile())
|
|
41107
|
+
return callback();
|
|
41108
|
+
const dir = path2.dirname(file);
|
|
41109
|
+
fs.stat(dir, (err2, stats2) => {
|
|
41110
|
+
if (err2) {
|
|
41111
|
+
if (err2.code === "ENOENT") {
|
|
41112
|
+
return mkdir.mkdirs(dir, (err3) => {
|
|
41113
|
+
if (err3)
|
|
41114
|
+
return callback(err3);
|
|
41115
|
+
makeFile();
|
|
41116
|
+
});
|
|
41117
|
+
}
|
|
41118
|
+
return callback(err2);
|
|
41119
|
+
}
|
|
41120
|
+
if (stats2.isDirectory())
|
|
41121
|
+
makeFile();
|
|
41122
|
+
else {
|
|
41123
|
+
fs.readdir(dir, (err3) => {
|
|
41124
|
+
if (err3)
|
|
41125
|
+
return callback(err3);
|
|
41126
|
+
});
|
|
41127
|
+
}
|
|
41128
|
+
});
|
|
41129
|
+
});
|
|
41130
|
+
}
|
|
41131
|
+
function createFileSync(file) {
|
|
41132
|
+
let stats;
|
|
41133
|
+
try {
|
|
41134
|
+
stats = fs.statSync(file);
|
|
41135
|
+
} catch {
|
|
41136
|
+
}
|
|
41137
|
+
if (stats && stats.isFile())
|
|
41138
|
+
return;
|
|
41139
|
+
const dir = path2.dirname(file);
|
|
41140
|
+
try {
|
|
41141
|
+
if (!fs.statSync(dir).isDirectory()) {
|
|
41142
|
+
fs.readdirSync(dir);
|
|
41143
|
+
}
|
|
41144
|
+
} catch (err) {
|
|
41145
|
+
if (err && err.code === "ENOENT")
|
|
41146
|
+
mkdir.mkdirsSync(dir);
|
|
41147
|
+
else
|
|
41148
|
+
throw err;
|
|
41149
|
+
}
|
|
41150
|
+
fs.writeFileSync(file, "");
|
|
41151
|
+
}
|
|
41152
|
+
module2.exports = {
|
|
41153
|
+
createFile: u(createFile),
|
|
41154
|
+
createFileSync
|
|
41155
|
+
};
|
|
41156
|
+
}
|
|
41157
|
+
});
|
|
41158
|
+
|
|
41159
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js
|
|
41160
|
+
var require_link2 = __commonJS({
|
|
41161
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
|
|
41162
|
+
"use strict";
|
|
41163
|
+
var u = require_universalify2().fromCallback;
|
|
41164
|
+
var path2 = require("path");
|
|
41165
|
+
var fs = require_graceful_fs();
|
|
41166
|
+
var mkdir = require_mkdirs2();
|
|
41167
|
+
var pathExists = require_path_exists2().pathExists;
|
|
41168
|
+
var { areIdentical } = require_stat2();
|
|
41169
|
+
function createLink(srcpath, dstpath, callback) {
|
|
41170
|
+
function makeLink(srcpath2, dstpath2) {
|
|
41171
|
+
fs.link(srcpath2, dstpath2, (err) => {
|
|
41172
|
+
if (err)
|
|
41173
|
+
return callback(err);
|
|
41174
|
+
callback(null);
|
|
41175
|
+
});
|
|
41176
|
+
}
|
|
41177
|
+
fs.lstat(dstpath, (_, dstStat) => {
|
|
41178
|
+
fs.lstat(srcpath, (err, srcStat) => {
|
|
41179
|
+
if (err) {
|
|
41180
|
+
err.message = err.message.replace("lstat", "ensureLink");
|
|
41181
|
+
return callback(err);
|
|
41182
|
+
}
|
|
41183
|
+
if (dstStat && areIdentical(srcStat, dstStat))
|
|
41184
|
+
return callback(null);
|
|
41185
|
+
const dir = path2.dirname(dstpath);
|
|
41186
|
+
pathExists(dir, (err2, dirExists) => {
|
|
41187
|
+
if (err2)
|
|
41188
|
+
return callback(err2);
|
|
41189
|
+
if (dirExists)
|
|
41190
|
+
return makeLink(srcpath, dstpath);
|
|
41191
|
+
mkdir.mkdirs(dir, (err3) => {
|
|
41192
|
+
if (err3)
|
|
41193
|
+
return callback(err3);
|
|
41194
|
+
makeLink(srcpath, dstpath);
|
|
41195
|
+
});
|
|
41196
|
+
});
|
|
41197
|
+
});
|
|
41198
|
+
});
|
|
41199
|
+
}
|
|
41200
|
+
function createLinkSync(srcpath, dstpath) {
|
|
41201
|
+
let dstStat;
|
|
41202
|
+
try {
|
|
41203
|
+
dstStat = fs.lstatSync(dstpath);
|
|
41204
|
+
} catch {
|
|
41205
|
+
}
|
|
41206
|
+
try {
|
|
41207
|
+
const srcStat = fs.lstatSync(srcpath);
|
|
41208
|
+
if (dstStat && areIdentical(srcStat, dstStat))
|
|
41209
|
+
return;
|
|
41210
|
+
} catch (err) {
|
|
41211
|
+
err.message = err.message.replace("lstat", "ensureLink");
|
|
41212
|
+
throw err;
|
|
41213
|
+
}
|
|
41214
|
+
const dir = path2.dirname(dstpath);
|
|
41215
|
+
const dirExists = fs.existsSync(dir);
|
|
41216
|
+
if (dirExists)
|
|
41217
|
+
return fs.linkSync(srcpath, dstpath);
|
|
41218
|
+
mkdir.mkdirsSync(dir);
|
|
41219
|
+
return fs.linkSync(srcpath, dstpath);
|
|
41220
|
+
}
|
|
41221
|
+
module2.exports = {
|
|
41222
|
+
createLink: u(createLink),
|
|
41223
|
+
createLinkSync
|
|
41224
|
+
};
|
|
41225
|
+
}
|
|
41226
|
+
});
|
|
41227
|
+
|
|
41228
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
41229
|
+
var require_symlink_paths2 = __commonJS({
|
|
41230
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
|
|
41231
|
+
"use strict";
|
|
41232
|
+
var path2 = require("path");
|
|
41233
|
+
var fs = require_graceful_fs();
|
|
41234
|
+
var pathExists = require_path_exists2().pathExists;
|
|
41235
|
+
function symlinkPaths(srcpath, dstpath, callback) {
|
|
41236
|
+
if (path2.isAbsolute(srcpath)) {
|
|
41237
|
+
return fs.lstat(srcpath, (err) => {
|
|
41238
|
+
if (err) {
|
|
41239
|
+
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
41240
|
+
return callback(err);
|
|
41241
|
+
}
|
|
41242
|
+
return callback(null, {
|
|
41243
|
+
toCwd: srcpath,
|
|
41244
|
+
toDst: srcpath
|
|
41245
|
+
});
|
|
41246
|
+
});
|
|
41247
|
+
} else {
|
|
41248
|
+
const dstdir = path2.dirname(dstpath);
|
|
41249
|
+
const relativeToDst = path2.join(dstdir, srcpath);
|
|
41250
|
+
return pathExists(relativeToDst, (err, exists) => {
|
|
41251
|
+
if (err)
|
|
41252
|
+
return callback(err);
|
|
41253
|
+
if (exists) {
|
|
41254
|
+
return callback(null, {
|
|
41255
|
+
toCwd: relativeToDst,
|
|
41256
|
+
toDst: srcpath
|
|
41257
|
+
});
|
|
41258
|
+
} else {
|
|
41259
|
+
return fs.lstat(srcpath, (err2) => {
|
|
41260
|
+
if (err2) {
|
|
41261
|
+
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
|
41262
|
+
return callback(err2);
|
|
41263
|
+
}
|
|
41264
|
+
return callback(null, {
|
|
41265
|
+
toCwd: srcpath,
|
|
41266
|
+
toDst: path2.relative(dstdir, srcpath)
|
|
41267
|
+
});
|
|
41268
|
+
});
|
|
41269
|
+
}
|
|
41270
|
+
});
|
|
41271
|
+
}
|
|
41272
|
+
}
|
|
41273
|
+
function symlinkPathsSync(srcpath, dstpath) {
|
|
41274
|
+
let exists;
|
|
41275
|
+
if (path2.isAbsolute(srcpath)) {
|
|
41276
|
+
exists = fs.existsSync(srcpath);
|
|
41277
|
+
if (!exists)
|
|
41278
|
+
throw new Error("absolute srcpath does not exist");
|
|
41279
|
+
return {
|
|
41280
|
+
toCwd: srcpath,
|
|
41281
|
+
toDst: srcpath
|
|
41282
|
+
};
|
|
41283
|
+
} else {
|
|
41284
|
+
const dstdir = path2.dirname(dstpath);
|
|
41285
|
+
const relativeToDst = path2.join(dstdir, srcpath);
|
|
41286
|
+
exists = fs.existsSync(relativeToDst);
|
|
41287
|
+
if (exists) {
|
|
41288
|
+
return {
|
|
41289
|
+
toCwd: relativeToDst,
|
|
41290
|
+
toDst: srcpath
|
|
41291
|
+
};
|
|
41292
|
+
} else {
|
|
41293
|
+
exists = fs.existsSync(srcpath);
|
|
41294
|
+
if (!exists)
|
|
41295
|
+
throw new Error("relative srcpath does not exist");
|
|
41296
|
+
return {
|
|
41297
|
+
toCwd: srcpath,
|
|
41298
|
+
toDst: path2.relative(dstdir, srcpath)
|
|
41299
|
+
};
|
|
41300
|
+
}
|
|
41301
|
+
}
|
|
41302
|
+
}
|
|
41303
|
+
module2.exports = {
|
|
41304
|
+
symlinkPaths,
|
|
41305
|
+
symlinkPathsSync
|
|
41306
|
+
};
|
|
41307
|
+
}
|
|
41308
|
+
});
|
|
41309
|
+
|
|
41310
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
41311
|
+
var require_symlink_type2 = __commonJS({
|
|
41312
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
|
|
41313
|
+
"use strict";
|
|
41314
|
+
var fs = require_graceful_fs();
|
|
41315
|
+
function symlinkType(srcpath, type, callback) {
|
|
41316
|
+
callback = typeof type === "function" ? type : callback;
|
|
41317
|
+
type = typeof type === "function" ? false : type;
|
|
41318
|
+
if (type)
|
|
41319
|
+
return callback(null, type);
|
|
41320
|
+
fs.lstat(srcpath, (err, stats) => {
|
|
41321
|
+
if (err)
|
|
41322
|
+
return callback(null, "file");
|
|
41323
|
+
type = stats && stats.isDirectory() ? "dir" : "file";
|
|
41324
|
+
callback(null, type);
|
|
41325
|
+
});
|
|
41326
|
+
}
|
|
41327
|
+
function symlinkTypeSync(srcpath, type) {
|
|
41328
|
+
let stats;
|
|
41329
|
+
if (type)
|
|
41330
|
+
return type;
|
|
41331
|
+
try {
|
|
41332
|
+
stats = fs.lstatSync(srcpath);
|
|
41333
|
+
} catch {
|
|
41334
|
+
return "file";
|
|
41335
|
+
}
|
|
41336
|
+
return stats && stats.isDirectory() ? "dir" : "file";
|
|
41337
|
+
}
|
|
41338
|
+
module2.exports = {
|
|
41339
|
+
symlinkType,
|
|
41340
|
+
symlinkTypeSync
|
|
41341
|
+
};
|
|
41342
|
+
}
|
|
41343
|
+
});
|
|
39945
41344
|
|
|
39946
|
-
|
|
39947
|
-
|
|
39948
|
-
|
|
39949
|
-
|
|
39950
|
-
|
|
39951
|
-
|
|
39952
|
-
|
|
39953
|
-
|
|
39954
|
-
|
|
39955
|
-
|
|
39956
|
-
|
|
39957
|
-
|
|
39958
|
-
|
|
39959
|
-
|
|
39960
|
-
|
|
39961
|
-
|
|
39962
|
-
|
|
39963
|
-
|
|
39964
|
-
|
|
39965
|
-
|
|
39966
|
-
|
|
39967
|
-
|
|
39968
|
-
|
|
39969
|
-
|
|
39970
|
-
|
|
39971
|
-
|
|
39972
|
-
|
|
39973
|
-
|
|
39974
|
-
|
|
39975
|
-
|
|
39976
|
-
|
|
39977
|
-
|
|
39978
|
-
|
|
39979
|
-
|
|
39980
|
-
if (result.startIndex > -1 && decoratorFunctions[prefixI]) {
|
|
39981
|
-
_code = result.code, didChange = false;
|
|
39982
|
-
try {
|
|
39983
|
-
didChange = await decoratorFunctions[prefixI](result.startIndex, result);
|
|
39984
|
-
} catch (exception) {
|
|
39985
|
-
return exception instanceof ProcessorError ? {
|
|
39986
|
-
contents: "",
|
|
39987
|
-
note: exception.note
|
|
39988
|
-
} : {
|
|
39989
|
-
contents: "",
|
|
39990
|
-
note: new ProcessorError(exception.toString(), filePath, 0, result.code, 0).note
|
|
39991
|
-
};
|
|
39992
|
-
}
|
|
39993
|
-
didChange ? result.startIndex > -1 && result.stopIndex > -1 && (result.code = _code.substring(0, result.startIndex) + result.code + _code.substring(result.stopIndex)) : result.code = _code.substring(0, result.startIndex - 1) + _code.substring(result.stopIndex), result.startIndex = result.stopIndex = -1;
|
|
39994
|
-
}
|
|
39995
|
-
} while (symbolI > -1);
|
|
39996
|
-
return globalThis.process.env.DECKY_VERBOSE && console.log(import_chalk.default.green(result.code)), {
|
|
39997
|
-
contents: result.code.replace(/🍤/gm, "@"),
|
|
39998
|
-
note: null
|
|
39999
|
-
};
|
|
40000
|
-
},
|
|
40001
|
-
prefixes
|
|
40002
|
-
};
|
|
41345
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js
|
|
41346
|
+
var require_symlink2 = __commonJS({
|
|
41347
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
|
|
41348
|
+
"use strict";
|
|
41349
|
+
var u = require_universalify2().fromCallback;
|
|
41350
|
+
var path2 = require("path");
|
|
41351
|
+
var fs = require_fs8();
|
|
41352
|
+
var _mkdirs = require_mkdirs2();
|
|
41353
|
+
var mkdirs = _mkdirs.mkdirs;
|
|
41354
|
+
var mkdirsSync = _mkdirs.mkdirsSync;
|
|
41355
|
+
var _symlinkPaths = require_symlink_paths2();
|
|
41356
|
+
var symlinkPaths = _symlinkPaths.symlinkPaths;
|
|
41357
|
+
var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
|
|
41358
|
+
var _symlinkType = require_symlink_type2();
|
|
41359
|
+
var symlinkType = _symlinkType.symlinkType;
|
|
41360
|
+
var symlinkTypeSync = _symlinkType.symlinkTypeSync;
|
|
41361
|
+
var pathExists = require_path_exists2().pathExists;
|
|
41362
|
+
var { areIdentical } = require_stat2();
|
|
41363
|
+
function createSymlink(srcpath, dstpath, type, callback) {
|
|
41364
|
+
callback = typeof type === "function" ? type : callback;
|
|
41365
|
+
type = typeof type === "function" ? false : type;
|
|
41366
|
+
fs.lstat(dstpath, (err, stats) => {
|
|
41367
|
+
if (!err && stats.isSymbolicLink()) {
|
|
41368
|
+
Promise.all([
|
|
41369
|
+
fs.stat(srcpath),
|
|
41370
|
+
fs.stat(dstpath)
|
|
41371
|
+
]).then(([srcStat, dstStat]) => {
|
|
41372
|
+
if (areIdentical(srcStat, dstStat))
|
|
41373
|
+
return callback(null);
|
|
41374
|
+
_createSymlink(srcpath, dstpath, type, callback);
|
|
41375
|
+
});
|
|
41376
|
+
} else
|
|
41377
|
+
_createSymlink(srcpath, dstpath, type, callback);
|
|
41378
|
+
});
|
|
40003
41379
|
}
|
|
40004
|
-
function
|
|
40005
|
-
|
|
40006
|
-
|
|
40007
|
-
|
|
40008
|
-
|
|
41380
|
+
function _createSymlink(srcpath, dstpath, type, callback) {
|
|
41381
|
+
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
|
41382
|
+
if (err)
|
|
41383
|
+
return callback(err);
|
|
41384
|
+
srcpath = relative.toDst;
|
|
41385
|
+
symlinkType(relative.toCwd, type, (err2, type2) => {
|
|
41386
|
+
if (err2)
|
|
41387
|
+
return callback(err2);
|
|
41388
|
+
const dir = path2.dirname(dstpath);
|
|
41389
|
+
pathExists(dir, (err3, dirExists) => {
|
|
41390
|
+
if (err3)
|
|
41391
|
+
return callback(err3);
|
|
41392
|
+
if (dirExists)
|
|
41393
|
+
return fs.symlink(srcpath, dstpath, type2, callback);
|
|
41394
|
+
mkdirs(dir, (err4) => {
|
|
41395
|
+
if (err4)
|
|
41396
|
+
return callback(err4);
|
|
41397
|
+
fs.symlink(srcpath, dstpath, type2, callback);
|
|
41398
|
+
});
|
|
41399
|
+
});
|
|
41400
|
+
});
|
|
41401
|
+
});
|
|
40009
41402
|
}
|
|
40010
|
-
function
|
|
40011
|
-
|
|
40012
|
-
|
|
40013
|
-
|
|
40014
|
-
}
|
|
41403
|
+
function createSymlinkSync(srcpath, dstpath, type) {
|
|
41404
|
+
let stats;
|
|
41405
|
+
try {
|
|
41406
|
+
stats = fs.lstatSync(dstpath);
|
|
41407
|
+
} catch {
|
|
41408
|
+
}
|
|
41409
|
+
if (stats && stats.isSymbolicLink()) {
|
|
41410
|
+
const srcStat = fs.statSync(srcpath);
|
|
41411
|
+
const dstStat = fs.statSync(dstpath);
|
|
41412
|
+
if (areIdentical(srcStat, dstStat))
|
|
41413
|
+
return;
|
|
41414
|
+
}
|
|
41415
|
+
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
41416
|
+
srcpath = relative.toDst;
|
|
41417
|
+
type = symlinkTypeSync(relative.toCwd, type);
|
|
41418
|
+
const dir = path2.dirname(dstpath);
|
|
41419
|
+
const exists = fs.existsSync(dir);
|
|
41420
|
+
if (exists)
|
|
41421
|
+
return fs.symlinkSync(srcpath, dstpath, type);
|
|
41422
|
+
mkdirsSync(dir);
|
|
41423
|
+
return fs.symlinkSync(srcpath, dstpath, type);
|
|
40015
41424
|
}
|
|
40016
|
-
|
|
40017
|
-
|
|
40018
|
-
|
|
40019
|
-
|
|
40020
|
-
|
|
40021
|
-
|
|
40022
|
-
|
|
40023
|
-
|
|
40024
|
-
|
|
41425
|
+
module2.exports = {
|
|
41426
|
+
createSymlink: u(createSymlink),
|
|
41427
|
+
createSymlinkSync
|
|
41428
|
+
};
|
|
41429
|
+
}
|
|
41430
|
+
});
|
|
41431
|
+
|
|
41432
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js
|
|
41433
|
+
var require_ensure2 = __commonJS({
|
|
41434
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
|
|
41435
|
+
"use strict";
|
|
41436
|
+
var { createFile, createFileSync } = require_file2();
|
|
41437
|
+
var { createLink, createLinkSync } = require_link2();
|
|
41438
|
+
var { createSymlink, createSymlinkSync } = require_symlink2();
|
|
41439
|
+
module2.exports = {
|
|
41440
|
+
// file
|
|
41441
|
+
createFile,
|
|
41442
|
+
createFileSync,
|
|
41443
|
+
ensureFile: createFile,
|
|
41444
|
+
ensureFileSync: createFileSync,
|
|
41445
|
+
// link
|
|
41446
|
+
createLink,
|
|
41447
|
+
createLinkSync,
|
|
41448
|
+
ensureLink: createLink,
|
|
41449
|
+
ensureLinkSync: createLinkSync,
|
|
41450
|
+
// symlink
|
|
41451
|
+
createSymlink,
|
|
41452
|
+
createSymlinkSync,
|
|
41453
|
+
ensureSymlink: createSymlink,
|
|
41454
|
+
ensureSymlinkSync: createSymlinkSync
|
|
41455
|
+
};
|
|
41456
|
+
}
|
|
41457
|
+
});
|
|
41458
|
+
|
|
41459
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js
|
|
41460
|
+
var require_jsonfile3 = __commonJS({
|
|
41461
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
|
|
41462
|
+
"use strict";
|
|
41463
|
+
var jsonFile = require_jsonfile();
|
|
41464
|
+
module2.exports = {
|
|
41465
|
+
// jsonfile exports
|
|
41466
|
+
readJson: jsonFile.readFile,
|
|
41467
|
+
readJsonSync: jsonFile.readFileSync,
|
|
41468
|
+
writeJson: jsonFile.writeFile,
|
|
41469
|
+
writeJsonSync: jsonFile.writeFileSync
|
|
41470
|
+
};
|
|
41471
|
+
}
|
|
41472
|
+
});
|
|
41473
|
+
|
|
41474
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js
|
|
41475
|
+
var require_output_file2 = __commonJS({
|
|
41476
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
|
|
41477
|
+
"use strict";
|
|
41478
|
+
var u = require_universalify2().fromCallback;
|
|
41479
|
+
var fs = require_graceful_fs();
|
|
41480
|
+
var path2 = require("path");
|
|
41481
|
+
var mkdir = require_mkdirs2();
|
|
41482
|
+
var pathExists = require_path_exists2().pathExists;
|
|
41483
|
+
function outputFile(file, data, encoding, callback) {
|
|
41484
|
+
if (typeof encoding === "function") {
|
|
41485
|
+
callback = encoding;
|
|
41486
|
+
encoding = "utf8";
|
|
41487
|
+
}
|
|
41488
|
+
const dir = path2.dirname(file);
|
|
41489
|
+
pathExists(dir, (err, itDoes) => {
|
|
41490
|
+
if (err)
|
|
41491
|
+
return callback(err);
|
|
41492
|
+
if (itDoes)
|
|
41493
|
+
return fs.writeFile(file, data, encoding, callback);
|
|
41494
|
+
mkdir.mkdirs(dir, (err2) => {
|
|
41495
|
+
if (err2)
|
|
41496
|
+
return callback(err2);
|
|
41497
|
+
fs.writeFile(file, data, encoding, callback);
|
|
41498
|
+
});
|
|
41499
|
+
});
|
|
40025
41500
|
}
|
|
40026
|
-
function
|
|
40027
|
-
|
|
40028
|
-
|
|
40029
|
-
|
|
40030
|
-
return false;
|
|
40031
|
-
for (let prefix of prefixesWithAt)
|
|
40032
|
-
if (content.includes(prefix))
|
|
40033
|
-
return true;
|
|
40034
|
-
return false;
|
|
41501
|
+
function outputFileSync(file, ...args) {
|
|
41502
|
+
const dir = path2.dirname(file);
|
|
41503
|
+
if (fs.existsSync(dir)) {
|
|
41504
|
+
return fs.writeFileSync(file, ...args);
|
|
40035
41505
|
}
|
|
40036
|
-
|
|
40037
|
-
|
|
40038
|
-
|
|
40039
|
-
|
|
40040
|
-
|
|
40041
|
-
|
|
40042
|
-
|
|
40043
|
-
|
|
40044
|
-
|
|
41506
|
+
mkdir.mkdirsSync(dir);
|
|
41507
|
+
fs.writeFileSync(file, ...args);
|
|
41508
|
+
}
|
|
41509
|
+
module2.exports = {
|
|
41510
|
+
outputFile: u(outputFile),
|
|
41511
|
+
outputFileSync
|
|
41512
|
+
};
|
|
41513
|
+
}
|
|
41514
|
+
});
|
|
41515
|
+
|
|
41516
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js
|
|
41517
|
+
var require_output_json2 = __commonJS({
|
|
41518
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
|
|
41519
|
+
"use strict";
|
|
41520
|
+
var { stringify } = require_utils3();
|
|
41521
|
+
var { outputFile } = require_output_file2();
|
|
41522
|
+
async function outputJson(file, data, options = {}) {
|
|
41523
|
+
const str = stringify(data, options);
|
|
41524
|
+
await outputFile(file, str, options);
|
|
41525
|
+
}
|
|
41526
|
+
module2.exports = outputJson;
|
|
41527
|
+
}
|
|
41528
|
+
});
|
|
41529
|
+
|
|
41530
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
41531
|
+
var require_output_json_sync2 = __commonJS({
|
|
41532
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
|
|
41533
|
+
"use strict";
|
|
41534
|
+
var { stringify } = require_utils3();
|
|
41535
|
+
var { outputFileSync } = require_output_file2();
|
|
41536
|
+
function outputJsonSync(file, data, options) {
|
|
41537
|
+
const str = stringify(data, options);
|
|
41538
|
+
outputFileSync(file, str, options);
|
|
41539
|
+
}
|
|
41540
|
+
module2.exports = outputJsonSync;
|
|
41541
|
+
}
|
|
41542
|
+
});
|
|
41543
|
+
|
|
41544
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js
|
|
41545
|
+
var require_json2 = __commonJS({
|
|
41546
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
|
|
41547
|
+
"use strict";
|
|
41548
|
+
var u = require_universalify2().fromPromise;
|
|
41549
|
+
var jsonFile = require_jsonfile3();
|
|
41550
|
+
jsonFile.outputJson = u(require_output_json2());
|
|
41551
|
+
jsonFile.outputJsonSync = require_output_json_sync2();
|
|
41552
|
+
jsonFile.outputJSON = jsonFile.outputJson;
|
|
41553
|
+
jsonFile.outputJSONSync = jsonFile.outputJsonSync;
|
|
41554
|
+
jsonFile.writeJSON = jsonFile.writeJson;
|
|
41555
|
+
jsonFile.writeJSONSync = jsonFile.writeJsonSync;
|
|
41556
|
+
jsonFile.readJSON = jsonFile.readJson;
|
|
41557
|
+
jsonFile.readJSONSync = jsonFile.readJsonSync;
|
|
41558
|
+
module2.exports = jsonFile;
|
|
41559
|
+
}
|
|
41560
|
+
});
|
|
41561
|
+
|
|
41562
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js
|
|
41563
|
+
var require_move3 = __commonJS({
|
|
41564
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
|
|
41565
|
+
"use strict";
|
|
41566
|
+
var fs = require_graceful_fs();
|
|
41567
|
+
var path2 = require("path");
|
|
41568
|
+
var copy = require_copy4().copy;
|
|
41569
|
+
var remove = require_remove2().remove;
|
|
41570
|
+
var mkdirp = require_mkdirs2().mkdirp;
|
|
41571
|
+
var pathExists = require_path_exists2().pathExists;
|
|
41572
|
+
var stat = require_stat2();
|
|
41573
|
+
function move(src, dest, opts, cb) {
|
|
41574
|
+
if (typeof opts === "function") {
|
|
41575
|
+
cb = opts;
|
|
41576
|
+
opts = {};
|
|
40045
41577
|
}
|
|
40046
|
-
|
|
40047
|
-
|
|
40048
|
-
|
|
40049
|
-
|
|
40050
|
-
|
|
40051
|
-
|
|
40052
|
-
|
|
40053
|
-
|
|
40054
|
-
|
|
40055
|
-
|
|
40056
|
-
|
|
40057
|
-
|
|
40058
|
-
|
|
40059
|
-
|
|
41578
|
+
opts = opts || {};
|
|
41579
|
+
const overwrite = opts.overwrite || opts.clobber || false;
|
|
41580
|
+
stat.checkPaths(src, dest, "move", opts, (err, stats) => {
|
|
41581
|
+
if (err)
|
|
41582
|
+
return cb(err);
|
|
41583
|
+
const { srcStat, isChangingCase = false } = stats;
|
|
41584
|
+
stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
|
|
41585
|
+
if (err2)
|
|
41586
|
+
return cb(err2);
|
|
41587
|
+
if (isParentRoot(dest))
|
|
41588
|
+
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
41589
|
+
mkdirp(path2.dirname(dest), (err3) => {
|
|
41590
|
+
if (err3)
|
|
41591
|
+
return cb(err3);
|
|
41592
|
+
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
41593
|
+
});
|
|
41594
|
+
});
|
|
41595
|
+
});
|
|
41596
|
+
}
|
|
41597
|
+
function isParentRoot(dest) {
|
|
41598
|
+
const parent = path2.dirname(dest);
|
|
41599
|
+
const parsedPath = path2.parse(parent);
|
|
41600
|
+
return parsedPath.root === parent;
|
|
41601
|
+
}
|
|
41602
|
+
function doRename(src, dest, overwrite, isChangingCase, cb) {
|
|
41603
|
+
if (isChangingCase)
|
|
41604
|
+
return rename(src, dest, overwrite, cb);
|
|
41605
|
+
if (overwrite) {
|
|
41606
|
+
return remove(dest, (err) => {
|
|
41607
|
+
if (err)
|
|
41608
|
+
return cb(err);
|
|
41609
|
+
return rename(src, dest, overwrite, cb);
|
|
41610
|
+
});
|
|
40060
41611
|
}
|
|
40061
|
-
|
|
40062
|
-
|
|
40063
|
-
|
|
40064
|
-
|
|
40065
|
-
|
|
40066
|
-
|
|
41612
|
+
pathExists(dest, (err, destExists) => {
|
|
41613
|
+
if (err)
|
|
41614
|
+
return cb(err);
|
|
41615
|
+
if (destExists)
|
|
41616
|
+
return cb(new Error("dest already exists."));
|
|
41617
|
+
return rename(src, dest, overwrite, cb);
|
|
41618
|
+
});
|
|
40067
41619
|
}
|
|
40068
|
-
function
|
|
40069
|
-
|
|
40070
|
-
|
|
40071
|
-
|
|
40072
|
-
|
|
41620
|
+
function rename(src, dest, overwrite, cb) {
|
|
41621
|
+
fs.rename(src, dest, (err) => {
|
|
41622
|
+
if (!err)
|
|
41623
|
+
return cb();
|
|
41624
|
+
if (err.code !== "EXDEV")
|
|
41625
|
+
return cb(err);
|
|
41626
|
+
return moveAcrossDevice(src, dest, overwrite, cb);
|
|
41627
|
+
});
|
|
40073
41628
|
}
|
|
40074
|
-
function
|
|
40075
|
-
|
|
40076
|
-
|
|
40077
|
-
|
|
41629
|
+
function moveAcrossDevice(src, dest, overwrite, cb) {
|
|
41630
|
+
const opts = {
|
|
41631
|
+
overwrite,
|
|
41632
|
+
errorOnExist: true,
|
|
41633
|
+
preserveTimestamps: true
|
|
40078
41634
|
};
|
|
41635
|
+
copy(src, dest, opts, (err) => {
|
|
41636
|
+
if (err)
|
|
41637
|
+
return cb(err);
|
|
41638
|
+
return remove(src, cb);
|
|
41639
|
+
});
|
|
40079
41640
|
}
|
|
40080
|
-
|
|
40081
|
-
|
|
40082
|
-
|
|
40083
|
-
|
|
40084
|
-
|
|
41641
|
+
module2.exports = move;
|
|
41642
|
+
}
|
|
41643
|
+
});
|
|
41644
|
+
|
|
41645
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js
|
|
41646
|
+
var require_move_sync2 = __commonJS({
|
|
41647
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
|
|
41648
|
+
"use strict";
|
|
41649
|
+
var fs = require_graceful_fs();
|
|
41650
|
+
var path2 = require("path");
|
|
41651
|
+
var copySync = require_copy4().copySync;
|
|
41652
|
+
var removeSync2 = require_remove2().removeSync;
|
|
41653
|
+
var mkdirpSync = require_mkdirs2().mkdirpSync;
|
|
41654
|
+
var stat = require_stat2();
|
|
41655
|
+
function moveSync(src, dest, opts) {
|
|
41656
|
+
opts = opts || {};
|
|
41657
|
+
const overwrite = opts.overwrite || opts.clobber || false;
|
|
41658
|
+
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
41659
|
+
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
41660
|
+
if (!isParentRoot(dest))
|
|
41661
|
+
mkdirpSync(path2.dirname(dest));
|
|
41662
|
+
return doRename(src, dest, overwrite, isChangingCase);
|
|
40085
41663
|
}
|
|
40086
|
-
function
|
|
40087
|
-
|
|
40088
|
-
|
|
40089
|
-
|
|
40090
|
-
};
|
|
41664
|
+
function isParentRoot(dest) {
|
|
41665
|
+
const parent = path2.dirname(dest);
|
|
41666
|
+
const parsedPath = path2.parse(parent);
|
|
41667
|
+
return parsedPath.root === parent;
|
|
40091
41668
|
}
|
|
40092
|
-
|
|
40093
|
-
|
|
40094
|
-
|
|
40095
|
-
|
|
40096
|
-
|
|
40097
|
-
|
|
40098
|
-
|
|
41669
|
+
function doRename(src, dest, overwrite, isChangingCase) {
|
|
41670
|
+
if (isChangingCase)
|
|
41671
|
+
return rename(src, dest, overwrite);
|
|
41672
|
+
if (overwrite) {
|
|
41673
|
+
removeSync2(dest);
|
|
41674
|
+
return rename(src, dest, overwrite);
|
|
41675
|
+
}
|
|
41676
|
+
if (fs.existsSync(dest))
|
|
41677
|
+
throw new Error("dest already exists.");
|
|
41678
|
+
return rename(src, dest, overwrite);
|
|
41679
|
+
}
|
|
41680
|
+
function rename(src, dest, overwrite) {
|
|
41681
|
+
try {
|
|
41682
|
+
fs.renameSync(src, dest);
|
|
41683
|
+
} catch (err) {
|
|
41684
|
+
if (err.code !== "EXDEV")
|
|
41685
|
+
throw err;
|
|
41686
|
+
return moveAcrossDevice(src, dest, overwrite);
|
|
41687
|
+
}
|
|
40099
41688
|
}
|
|
41689
|
+
function moveAcrossDevice(src, dest, overwrite) {
|
|
41690
|
+
const opts = {
|
|
41691
|
+
overwrite,
|
|
41692
|
+
errorOnExist: true,
|
|
41693
|
+
preserveTimestamps: true
|
|
41694
|
+
};
|
|
41695
|
+
copySync(src, dest, opts);
|
|
41696
|
+
return removeSync2(src);
|
|
41697
|
+
}
|
|
41698
|
+
module2.exports = moveSync;
|
|
41699
|
+
}
|
|
41700
|
+
});
|
|
41701
|
+
|
|
41702
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js
|
|
41703
|
+
var require_move4 = __commonJS({
|
|
41704
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
|
|
41705
|
+
"use strict";
|
|
41706
|
+
var u = require_universalify2().fromCallback;
|
|
41707
|
+
module2.exports = {
|
|
41708
|
+
move: u(require_move3()),
|
|
41709
|
+
moveSync: require_move_sync2()
|
|
41710
|
+
};
|
|
41711
|
+
}
|
|
41712
|
+
});
|
|
41713
|
+
|
|
41714
|
+
// node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js
|
|
41715
|
+
var require_lib3 = __commonJS({
|
|
41716
|
+
"node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports, module2) {
|
|
41717
|
+
"use strict";
|
|
41718
|
+
module2.exports = {
|
|
41719
|
+
// Export promiseified graceful-fs:
|
|
41720
|
+
...require_fs8(),
|
|
41721
|
+
// Export extra methods:
|
|
41722
|
+
...require_copy4(),
|
|
41723
|
+
...require_empty3(),
|
|
41724
|
+
...require_ensure2(),
|
|
41725
|
+
...require_json2(),
|
|
41726
|
+
...require_mkdirs2(),
|
|
41727
|
+
...require_move4(),
|
|
41728
|
+
...require_output_file2(),
|
|
41729
|
+
...require_path_exists2(),
|
|
41730
|
+
...require_remove2()
|
|
41731
|
+
};
|
|
40100
41732
|
}
|
|
40101
41733
|
});
|
|
40102
41734
|
|
|
@@ -41219,7 +42851,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
41219
42851
|
});
|
|
41220
42852
|
|
|
41221
42853
|
// node_modules/.pnpm/joycon@3.1.1/node_modules/joycon/lib/index.js
|
|
41222
|
-
var
|
|
42854
|
+
var require_lib4 = __commonJS({
|
|
41223
42855
|
"node_modules/.pnpm/joycon@3.1.1/node_modules/joycon/lib/index.js"(exports, module2) {
|
|
41224
42856
|
"use strict";
|
|
41225
42857
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -41962,7 +43594,7 @@ var require_chunk_7G76EW2R = __commonJS({
|
|
|
41962
43594
|
var _chunkGQ77QZBOjs = require_chunk_GQ77QZBO();
|
|
41963
43595
|
var _fs = require("fs");
|
|
41964
43596
|
var _fs2 = _interopRequireDefault(_fs);
|
|
41965
|
-
var _joycon =
|
|
43597
|
+
var _joycon = require_lib4();
|
|
41966
43598
|
var _joycon2 = _interopRequireDefault(_joycon);
|
|
41967
43599
|
var _path = require("path");
|
|
41968
43600
|
var _path2 = _interopRequireDefault(_path);
|
|
@@ -45225,7 +46857,7 @@ var require_base = __commonJS({
|
|
|
45225
46857
|
});
|
|
45226
46858
|
|
|
45227
46859
|
// node_modules/.pnpm/sucrase@3.34.0/node_modules/sucrase/dist/parser/traverser/util.js
|
|
45228
|
-
var
|
|
46860
|
+
var require_util3 = __commonJS({
|
|
45229
46861
|
"node_modules/.pnpm/sucrase@3.34.0/node_modules/sucrase/dist/parser/traverser/util.js"(exports) {
|
|
45230
46862
|
"use strict";
|
|
45231
46863
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -54791,7 +56423,7 @@ var require_tokenizer = __commonJS({
|
|
|
54791
56423
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
54792
56424
|
}
|
|
54793
56425
|
var _base = require_base();
|
|
54794
|
-
var _util =
|
|
56426
|
+
var _util = require_util3();
|
|
54795
56427
|
var _charcodes = require_charcodes();
|
|
54796
56428
|
var _identifier = require_identifier();
|
|
54797
56429
|
var _whitespace = require_whitespace();
|
|
@@ -58291,7 +59923,7 @@ var require_NameManager = __commonJS({
|
|
|
58291
59923
|
});
|
|
58292
59924
|
|
|
58293
59925
|
// node_modules/.pnpm/ts-interface-checker@0.1.13/node_modules/ts-interface-checker/dist/util.js
|
|
58294
|
-
var
|
|
59926
|
+
var require_util4 = __commonJS({
|
|
58295
59927
|
"node_modules/.pnpm/ts-interface-checker@0.1.13/node_modules/ts-interface-checker/dist/util.js"(exports) {
|
|
58296
59928
|
"use strict";
|
|
58297
59929
|
var __extends2 = exports && exports.__extends || function() {
|
|
@@ -58458,7 +60090,7 @@ var require_types4 = __commonJS({
|
|
|
58458
60090
|
}();
|
|
58459
60091
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58460
60092
|
exports.basicTypes = exports.BasicType = exports.TParamList = exports.TParam = exports.param = exports.TFunc = exports.func = exports.TProp = exports.TOptional = exports.opt = exports.TIface = exports.iface = exports.TEnumLiteral = exports.enumlit = exports.TEnumType = exports.enumtype = exports.TIntersection = exports.intersection = exports.TUnion = exports.union = exports.TTuple = exports.tuple = exports.TArray = exports.array = exports.TLiteral = exports.lit = exports.TName = exports.name = exports.TType = void 0;
|
|
58461
|
-
var util_1 =
|
|
60093
|
+
var util_1 = require_util4();
|
|
58462
60094
|
var TType = (
|
|
58463
60095
|
/** @class */
|
|
58464
60096
|
function() {
|
|
@@ -59089,7 +60721,7 @@ var require_dist3 = __commonJS({
|
|
|
59089
60721
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59090
60722
|
exports.Checker = exports.createCheckers = void 0;
|
|
59091
60723
|
var types_1 = require_types4();
|
|
59092
|
-
var util_1 =
|
|
60724
|
+
var util_1 = require_util4();
|
|
59093
60725
|
var types_2 = require_types4();
|
|
59094
60726
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
59095
60727
|
return types_2.TArray;
|
|
@@ -59175,7 +60807,7 @@ var require_dist3 = __commonJS({
|
|
|
59175
60807
|
Object.defineProperty(exports, "BasicType", { enumerable: true, get: function() {
|
|
59176
60808
|
return types_2.BasicType;
|
|
59177
60809
|
} });
|
|
59178
|
-
var util_2 =
|
|
60810
|
+
var util_2 = require_util4();
|
|
59179
60811
|
Object.defineProperty(exports, "VError", { enumerable: true, get: function() {
|
|
59180
60812
|
return util_2.VError;
|
|
59181
60813
|
} });
|
|
@@ -59394,7 +61026,7 @@ var require_lval = __commonJS({
|
|
|
59394
61026
|
var _types = require_types3();
|
|
59395
61027
|
var _base = require_base();
|
|
59396
61028
|
var _expression = require_expression();
|
|
59397
|
-
var _util =
|
|
61029
|
+
var _util = require_util3();
|
|
59398
61030
|
function parseSpread() {
|
|
59399
61031
|
_index.next.call(void 0);
|
|
59400
61032
|
_expression.parseMaybeAssign.call(void 0, false);
|
|
@@ -59541,7 +61173,7 @@ var require_typescript2 = __commonJS({
|
|
|
59541
61173
|
var _expression = require_expression();
|
|
59542
61174
|
var _lval = require_lval();
|
|
59543
61175
|
var _statement = require_statement();
|
|
59544
|
-
var _util =
|
|
61176
|
+
var _util = require_util3();
|
|
59545
61177
|
var _jsx = require_jsx();
|
|
59546
61178
|
function tsIsIdentifier() {
|
|
59547
61179
|
return _index.match.call(void 0, _types.TokenType.name);
|
|
@@ -60852,7 +62484,7 @@ var require_jsx = __commonJS({
|
|
|
60852
62484
|
var _types = require_types3();
|
|
60853
62485
|
var _base = require_base();
|
|
60854
62486
|
var _expression = require_expression();
|
|
60855
|
-
var _util =
|
|
62487
|
+
var _util = require_util3();
|
|
60856
62488
|
var _charcodes = require_charcodes();
|
|
60857
62489
|
var _identifier = require_identifier();
|
|
60858
62490
|
var _typescript = require_typescript2();
|
|
@@ -61165,7 +62797,7 @@ var require_expression = __commonJS({
|
|
|
61165
62797
|
var _base = require_base();
|
|
61166
62798
|
var _lval = require_lval();
|
|
61167
62799
|
var _statement = require_statement();
|
|
61168
|
-
var _util =
|
|
62800
|
+
var _util = require_util3();
|
|
61169
62801
|
var StopState = class {
|
|
61170
62802
|
constructor(stop) {
|
|
61171
62803
|
this.stop = stop;
|
|
@@ -61899,7 +63531,7 @@ var require_flow = __commonJS({
|
|
|
61899
63531
|
var _base = require_base();
|
|
61900
63532
|
var _expression = require_expression();
|
|
61901
63533
|
var _statement = require_statement();
|
|
61902
|
-
var _util =
|
|
63534
|
+
var _util = require_util3();
|
|
61903
63535
|
function isMaybeDefaultImport(lookahead) {
|
|
61904
63536
|
return (lookahead.type === _types.TokenType.name || !!(lookahead.type & _types.TokenType.IS_KEYWORD)) && lookahead.contextualKeyword !== _keywords.ContextualKeyword._from;
|
|
61905
63537
|
}
|
|
@@ -62790,7 +64422,7 @@ var require_statement = __commonJS({
|
|
|
62790
64422
|
var _base = require_base();
|
|
62791
64423
|
var _expression = require_expression();
|
|
62792
64424
|
var _lval = require_lval();
|
|
62793
|
-
var _util =
|
|
64425
|
+
var _util = require_util3();
|
|
62794
64426
|
function parseTopLevel() {
|
|
62795
64427
|
parseBlockBody(_types.TokenType.eof);
|
|
62796
64428
|
_base.state.scopes.push(new (0, _state.Scope)(0, _base.state.tokens.length, true));
|
|
@@ -67356,7 +68988,7 @@ var require_url = __commonJS({
|
|
|
67356
68988
|
});
|
|
67357
68989
|
|
|
67358
68990
|
// node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/util.js
|
|
67359
|
-
var
|
|
68991
|
+
var require_util5 = __commonJS({
|
|
67360
68992
|
"node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/util.js"(exports) {
|
|
67361
68993
|
var URL2 = require_url();
|
|
67362
68994
|
function getArg(aArgs, aName, aDefaultValue) {
|
|
@@ -67678,7 +69310,7 @@ var require_array_set = __commonJS({
|
|
|
67678
69310
|
// node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/mapping-list.js
|
|
67679
69311
|
var require_mapping_list = __commonJS({
|
|
67680
69312
|
"node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/mapping-list.js"(exports) {
|
|
67681
|
-
var util2 =
|
|
69313
|
+
var util2 = require_util5();
|
|
67682
69314
|
function generatedPositionAfter(mappingA, mappingB) {
|
|
67683
69315
|
const lineA = mappingA.generatedLine;
|
|
67684
69316
|
const lineB = mappingB.generatedLine;
|
|
@@ -67740,7 +69372,7 @@ var require_mapping_list = __commonJS({
|
|
|
67740
69372
|
var require_source_map_generator = __commonJS({
|
|
67741
69373
|
"node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-map-generator.js"(exports) {
|
|
67742
69374
|
var base64VLQ = require_base64_vlq();
|
|
67743
|
-
var util2 =
|
|
69375
|
+
var util2 = require_util5();
|
|
67744
69376
|
var ArraySet = require_array_set().ArraySet;
|
|
67745
69377
|
var MappingList = require_mapping_list().MappingList;
|
|
67746
69378
|
var SourceMapGenerator = class _SourceMapGenerator {
|
|
@@ -68249,7 +69881,7 @@ var require_wasm = __commonJS({
|
|
|
68249
69881
|
// node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-map-consumer.js
|
|
68250
69882
|
var require_source_map_consumer = __commonJS({
|
|
68251
69883
|
"node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-map-consumer.js"(exports) {
|
|
68252
|
-
var util2 =
|
|
69884
|
+
var util2 = require_util5();
|
|
68253
69885
|
var binarySearch = require_binary_search();
|
|
68254
69886
|
var ArraySet = require_array_set().ArraySet;
|
|
68255
69887
|
var base64VLQ = require_base64_vlq();
|
|
@@ -69011,7 +70643,7 @@ var require_source_map_consumer = __commonJS({
|
|
|
69011
70643
|
var require_source_node = __commonJS({
|
|
69012
70644
|
"node_modules/.pnpm/source-map@0.8.0-beta.0/node_modules/source-map/lib/source-node.js"(exports) {
|
|
69013
70645
|
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
69014
|
-
var util2 =
|
|
70646
|
+
var util2 = require_util5();
|
|
69015
70647
|
var REGEX_NEWLINE = /(\r?\n)/;
|
|
69016
70648
|
var NEWLINE_CODE = 10;
|
|
69017
70649
|
var isSourceNode = "$$$isSourceNode$$$";
|
|
@@ -99042,7 +100674,7 @@ var require_keyword = __commonJS({
|
|
|
99042
100674
|
});
|
|
99043
100675
|
|
|
99044
100676
|
// node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/index.js
|
|
99045
|
-
var
|
|
100677
|
+
var require_lib5 = __commonJS({
|
|
99046
100678
|
"node_modules/.pnpm/@babel+helper-validator-identifier@7.22.20/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
|
|
99047
100679
|
"use strict";
|
|
99048
100680
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -100367,7 +101999,7 @@ var require_supports_color2 = __commonJS({
|
|
|
100367
101999
|
});
|
|
100368
102000
|
|
|
100369
102001
|
// node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js
|
|
100370
|
-
var
|
|
102002
|
+
var require_templates3 = __commonJS({
|
|
100371
102003
|
"node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports, module2) {
|
|
100372
102004
|
"use strict";
|
|
100373
102005
|
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
@@ -100484,7 +102116,7 @@ var require_chalk = __commonJS({
|
|
|
100484
102116
|
var escapeStringRegexp = require_escape_string_regexp();
|
|
100485
102117
|
var ansiStyles = require_ansi_styles2();
|
|
100486
102118
|
var stdoutColor = require_supports_color2().stdout;
|
|
100487
|
-
var template =
|
|
102119
|
+
var template = require_templates3();
|
|
100488
102120
|
var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
|
|
100489
102121
|
var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
|
|
100490
102122
|
var skipModels = /* @__PURE__ */ new Set(["gray"]);
|
|
@@ -100645,7 +102277,7 @@ var require_chalk = __commonJS({
|
|
|
100645
102277
|
});
|
|
100646
102278
|
|
|
100647
102279
|
// node_modules/.pnpm/@babel+highlight@7.22.20/node_modules/@babel/highlight/lib/index.js
|
|
100648
|
-
var
|
|
102280
|
+
var require_lib6 = __commonJS({
|
|
100649
102281
|
"node_modules/.pnpm/@babel+highlight@7.22.20/node_modules/@babel/highlight/lib/index.js"(exports) {
|
|
100650
102282
|
"use strict";
|
|
100651
102283
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -100654,7 +102286,7 @@ var require_lib5 = __commonJS({
|
|
|
100654
102286
|
exports.default = highlight;
|
|
100655
102287
|
exports.shouldHighlight = shouldHighlight;
|
|
100656
102288
|
var _jsTokens = require_js_tokens();
|
|
100657
|
-
var _helperValidatorIdentifier =
|
|
102289
|
+
var _helperValidatorIdentifier = require_lib5();
|
|
100658
102290
|
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
100659
102291
|
function _getRequireWildcardCache(nodeInterop) {
|
|
100660
102292
|
if (typeof WeakMap !== "function")
|
|
@@ -100789,7 +102421,7 @@ var require_lib5 = __commonJS({
|
|
|
100789
102421
|
});
|
|
100790
102422
|
|
|
100791
102423
|
// node_modules/.pnpm/@babel+code-frame@7.22.13/node_modules/@babel/code-frame/lib/index.js
|
|
100792
|
-
var
|
|
102424
|
+
var require_lib7 = __commonJS({
|
|
100793
102425
|
"node_modules/.pnpm/@babel+code-frame@7.22.13/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
|
100794
102426
|
"use strict";
|
|
100795
102427
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -100797,7 +102429,7 @@ var require_lib6 = __commonJS({
|
|
|
100797
102429
|
});
|
|
100798
102430
|
exports.codeFrameColumns = codeFrameColumns;
|
|
100799
102431
|
exports.default = _default;
|
|
100800
|
-
var _highlight =
|
|
102432
|
+
var _highlight = require_lib6();
|
|
100801
102433
|
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
100802
102434
|
function _getRequireWildcardCache(nodeInterop) {
|
|
100803
102435
|
if (typeof WeakMap !== "function")
|
|
@@ -100992,7 +102624,7 @@ var require_parse_json = __commonJS({
|
|
|
100992
102624
|
var errorEx = require_error_ex();
|
|
100993
102625
|
var fallback = require_json_parse_even_better_errors();
|
|
100994
102626
|
var { default: LinesAndColumns } = require_build();
|
|
100995
|
-
var { codeFrameColumns } =
|
|
102627
|
+
var { codeFrameColumns } = require_lib7();
|
|
100996
102628
|
var JSONError = errorEx("JSONError", {
|
|
100997
102629
|
fileName: errorEx.append("in %s"),
|
|
100998
102630
|
codeFrame: errorEx.append("\n\n%s\n")
|
|
@@ -101726,7 +103358,7 @@ var require_float = __commonJS({
|
|
|
101726
103358
|
});
|
|
101727
103359
|
|
|
101728
103360
|
// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js
|
|
101729
|
-
var
|
|
103361
|
+
var require_json3 = __commonJS({
|
|
101730
103362
|
"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js"(exports, module2) {
|
|
101731
103363
|
"use strict";
|
|
101732
103364
|
module2.exports = require_failsafe().extend({
|
|
@@ -101744,7 +103376,7 @@ var require_json2 = __commonJS({
|
|
|
101744
103376
|
var require_core2 = __commonJS({
|
|
101745
103377
|
"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js"(exports, module2) {
|
|
101746
103378
|
"use strict";
|
|
101747
|
-
module2.exports =
|
|
103379
|
+
module2.exports = require_json3();
|
|
101748
103380
|
}
|
|
101749
103381
|
});
|
|
101750
103382
|
|
|
@@ -103873,7 +105505,7 @@ var require_js_yaml = __commonJS({
|
|
|
103873
105505
|
module2.exports.Type = require_type();
|
|
103874
105506
|
module2.exports.Schema = require_schema();
|
|
103875
105507
|
module2.exports.FAILSAFE_SCHEMA = require_failsafe();
|
|
103876
|
-
module2.exports.JSON_SCHEMA =
|
|
105508
|
+
module2.exports.JSON_SCHEMA = require_json3();
|
|
103877
105509
|
module2.exports.CORE_SCHEMA = require_core2();
|
|
103878
105510
|
module2.exports.DEFAULT_SCHEMA = require_default();
|
|
103879
105511
|
module2.exports.load = loader.load;
|
|
@@ -104214,7 +105846,7 @@ var require_env_paths = __commonJS({
|
|
|
104214
105846
|
});
|
|
104215
105847
|
|
|
104216
105848
|
// node_modules/.pnpm/cosmiconfig@9.0.0_typescript@5.2.2/node_modules/cosmiconfig/dist/util.js
|
|
104217
|
-
var
|
|
105849
|
+
var require_util6 = __commonJS({
|
|
104218
105850
|
"node_modules/.pnpm/cosmiconfig@9.0.0_typescript@5.2.2/node_modules/cosmiconfig/dist/util.js"(exports) {
|
|
104219
105851
|
"use strict";
|
|
104220
105852
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -104318,7 +105950,7 @@ var require_ExplorerBase = __commonJS({
|
|
|
104318
105950
|
var env_paths_1 = __importDefault2(require_env_paths());
|
|
104319
105951
|
var os_1 = __importDefault2(require("os"));
|
|
104320
105952
|
var path_1 = __importDefault2(require("path"));
|
|
104321
|
-
var util_js_1 =
|
|
105953
|
+
var util_js_1 = require_util6();
|
|
104322
105954
|
var ExplorerBase = class {
|
|
104323
105955
|
#loadingMetaConfig = false;
|
|
104324
105956
|
config;
|
|
@@ -104474,7 +106106,7 @@ var require_Explorer = __commonJS({
|
|
|
104474
106106
|
var defaults_1 = require_defaults();
|
|
104475
106107
|
var ExplorerBase_js_1 = require_ExplorerBase();
|
|
104476
106108
|
var merge_1 = require_merge4();
|
|
104477
|
-
var util_js_1 =
|
|
106109
|
+
var util_js_1 = require_util6();
|
|
104478
106110
|
var Explorer = class extends ExplorerBase_js_1.ExplorerBase {
|
|
104479
106111
|
async load(filepath) {
|
|
104480
106112
|
filepath = path_1.default.resolve(filepath);
|
|
@@ -104632,7 +106264,7 @@ var require_ExplorerSync = __commonJS({
|
|
|
104632
106264
|
var defaults_1 = require_defaults();
|
|
104633
106265
|
var ExplorerBase_js_1 = require_ExplorerBase();
|
|
104634
106266
|
var merge_1 = require_merge4();
|
|
104635
|
-
var util_js_1 =
|
|
106267
|
+
var util_js_1 = require_util6();
|
|
104636
106268
|
var ExplorerSync = class extends ExplorerBase_js_1.ExplorerBase {
|
|
104637
106269
|
load(filepath) {
|
|
104638
106270
|
filepath = path_1.default.resolve(filepath);
|
|
@@ -104817,7 +106449,7 @@ var require_dist6 = __commonJS({
|
|
|
104817
106449
|
} });
|
|
104818
106450
|
var Explorer_js_1 = require_Explorer();
|
|
104819
106451
|
var ExplorerSync_js_1 = require_ExplorerSync();
|
|
104820
|
-
var util_1 =
|
|
106452
|
+
var util_1 = require_util6();
|
|
104821
106453
|
var identity = function identity2(x) {
|
|
104822
106454
|
return x;
|
|
104823
106455
|
};
|
|
@@ -105012,7 +106644,7 @@ var environmentPlugin = (data) => ({
|
|
|
105012
106644
|
|
|
105013
106645
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
105014
106646
|
var import_fs3 = require("fs");
|
|
105015
|
-
var import_fs_extra = __toESM(
|
|
106647
|
+
var import_fs_extra = __toESM(require_lib3());
|
|
105016
106648
|
var import_promises2 = require("fs/promises");
|
|
105017
106649
|
|
|
105018
106650
|
// node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
|
|
@@ -111190,7 +112822,6 @@ var glob = Object.assign(glob_, {
|
|
|
111190
112822
|
glob.glob = glob;
|
|
111191
112823
|
|
|
111192
112824
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
111193
|
-
var import_project_graph = require("nx/src/project-graph/project-graph");
|
|
111194
112825
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
111195
112826
|
var import_path4 = require("path");
|
|
111196
112827
|
var import_prettier = require("prettier");
|
|
@@ -115141,7 +116772,7 @@ var setConfigEnv = (config) => {
|
|
|
115141
116772
|
};
|
|
115142
116773
|
|
|
115143
116774
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
115144
|
-
var chalk = __toESM(
|
|
116775
|
+
var chalk = __toESM(require_source2());
|
|
115145
116776
|
|
|
115146
116777
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
115147
116778
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
@@ -115413,13 +117044,13 @@ function modernConfig({
|
|
|
115413
117044
|
}
|
|
115414
117045
|
}
|
|
115415
117046
|
},
|
|
115416
|
-
minify: debug ? false : "terser",
|
|
117047
|
+
/*minify: debug ? false : "terser",
|
|
115417
117048
|
terserOptions: {
|
|
115418
117049
|
compress: true,
|
|
115419
117050
|
ecma: 2020,
|
|
115420
117051
|
keep_classnames: true,
|
|
115421
117052
|
keep_fnames: true
|
|
115422
|
-
}
|
|
117053
|
+
},*/
|
|
115423
117054
|
apiReport,
|
|
115424
117055
|
docModel,
|
|
115425
117056
|
tsdocMetadata,
|
|
@@ -115481,13 +117112,13 @@ function legacyConfig({
|
|
|
115481
117112
|
}
|
|
115482
117113
|
}
|
|
115483
117114
|
},
|
|
115484
|
-
minify: debug ? false : "terser",
|
|
117115
|
+
/*minify: debug ? false : "terser",
|
|
115485
117116
|
terserOptions: {
|
|
115486
117117
|
compress: true,
|
|
115487
117118
|
ecma: 2020,
|
|
115488
117119
|
keep_classnames: true,
|
|
115489
117120
|
keep_fnames: true
|
|
115490
|
-
}
|
|
117121
|
+
},*/
|
|
115491
117122
|
apiReport: false,
|
|
115492
117123
|
docModel: false,
|
|
115493
117124
|
tsdocMetadata: false,
|
|
@@ -115552,13 +117183,13 @@ function workerConfig({
|
|
|
115552
117183
|
}
|
|
115553
117184
|
}
|
|
115554
117185
|
},
|
|
115555
|
-
minify: debug ? false : "terser",
|
|
117186
|
+
/*minify: debug ? false : "terser",
|
|
115556
117187
|
terserOptions: {
|
|
115557
117188
|
compress: true,
|
|
115558
117189
|
ecma: 2020,
|
|
115559
117190
|
keep_classnames: true,
|
|
115560
117191
|
keep_fnames: true
|
|
115561
|
-
}
|
|
117192
|
+
},*/
|
|
115562
117193
|
apiReport,
|
|
115563
117194
|
docModel,
|
|
115564
117195
|
tsdocMetadata,
|
|
@@ -115578,7 +117209,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
115578
117209
|
}) {
|
|
115579
117210
|
const entry = globSync(
|
|
115580
117211
|
[
|
|
115581
|
-
rest.entry ? rest.entry : (0, import_path3.join)(sourceRoot, "
|
|
117212
|
+
rest.entry ? rest.entry : (0, import_path3.join)(sourceRoot, "**/*.{ts,tsx}"),
|
|
115582
117213
|
...additionalEntryPoints ?? []
|
|
115583
117214
|
],
|
|
115584
117215
|
{
|
|
@@ -115730,7 +117361,7 @@ ${externalDependencies.map((dep) => {
|
|
|
115730
117361
|
}
|
|
115731
117362
|
}
|
|
115732
117363
|
}
|
|
115733
|
-
const projectGraph =
|
|
117364
|
+
const projectGraph = (0, import_devkit.readCachedProjectGraph)();
|
|
115734
117365
|
const pathToPackageJson = (0, import_path4.join)(context.root, projectRoot, "package.json");
|
|
115735
117366
|
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
115736
117367
|
delete packageJson.dependencies;
|