@pipelab/plugin-discord 1.0.0-beta.23 → 1.0.0-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunks-CfRneOgh.mjs → chunks-GrMn87xJ.mjs} +6 -6
- package/dist/chunks-GrMn87xJ.mjs.map +1 -0
- package/dist/index.cjs +181 -102
- package/dist/index.mjs +124 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunks-CfRneOgh.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -45395,6 +45395,17 @@ const DEFAULT_PNPM_VERSION = "10.12.0";
|
|
|
45395
45395
|
const metaUrl = require("url").pathToFileURL(__filename).href;
|
|
45396
45396
|
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? (0, node_path.dirname)((0, node_url.fileURLToPath)(metaUrl)) : process.cwd();
|
|
45397
45397
|
const isDev = process.env.NODE_ENV === "development";
|
|
45398
|
+
const getDefaultUserDataPath = (env) => {
|
|
45399
|
+
const base = (() => {
|
|
45400
|
+
switch ((0, node_os.platform)()) {
|
|
45401
|
+
case "win32": return process.env.APPDATA || (0, node_path.join)((0, node_os.homedir)(), "AppData", "Roaming");
|
|
45402
|
+
case "darwin": return (0, node_path.join)((0, node_os.homedir)(), "Library", "Application Support");
|
|
45403
|
+
default: return process.env.XDG_CONFIG_HOME || (0, node_path.join)((0, node_os.homedir)(), ".config");
|
|
45404
|
+
}
|
|
45405
|
+
})();
|
|
45406
|
+
const mode = env ?? (isDev ? "dev" : "prod");
|
|
45407
|
+
return (0, node_path.join)(base, "@pipelab", mode === "dev" ? "app-dev" : mode === "beta" ? "app-beta" : "app");
|
|
45408
|
+
};
|
|
45398
45409
|
/**
|
|
45399
45410
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
45400
45411
|
*/
|
|
@@ -49161,6 +49172,74 @@ var WebSocketServer = class {
|
|
|
49161
49172
|
};
|
|
49162
49173
|
const webSocketServer = new WebSocketServer();
|
|
49163
49174
|
//#endregion
|
|
49175
|
+
//#region ../../node_modules/slash/index.js
|
|
49176
|
+
var require_slash = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
49177
|
+
module.exports = (path) => {
|
|
49178
|
+
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
|
|
49179
|
+
const hasNonAscii = /[^\u0000-\u0080]+/.test(path);
|
|
49180
|
+
if (isExtendedLengthPath || hasNonAscii) return path;
|
|
49181
|
+
return path.replace(/\\/g, "/");
|
|
49182
|
+
};
|
|
49183
|
+
}));
|
|
49184
|
+
//#endregion
|
|
49185
|
+
//#region ../../packages/core-node/src/fs-utils.ts
|
|
49186
|
+
var import_slash = /* @__PURE__ */ require_chunk.__toESM(require_slash(), 1);
|
|
49187
|
+
function removeTrailingSlash(path) {
|
|
49188
|
+
return path.replace(/[\\/]+$/, "");
|
|
49189
|
+
}
|
|
49190
|
+
removeTrailingSlash((0, import_slash.default)((0, node_path.resolve)((0, node_os.homedir)()))).toLowerCase();
|
|
49191
|
+
const additionalProtectedPaths = [
|
|
49192
|
+
getDefaultUserDataPath("dev"),
|
|
49193
|
+
getDefaultUserDataPath("beta"),
|
|
49194
|
+
getDefaultUserDataPath("prod"),
|
|
49195
|
+
projectRoot,
|
|
49196
|
+
process.cwd(),
|
|
49197
|
+
"/tmp",
|
|
49198
|
+
"/var/tmp",
|
|
49199
|
+
process.env.TEMP,
|
|
49200
|
+
process.env.TMP,
|
|
49201
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData"),
|
|
49202
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData", "Local"),
|
|
49203
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData", "Roaming"),
|
|
49204
|
+
(0, node_path.join)((0, node_os.homedir)(), "Library"),
|
|
49205
|
+
(0, node_path.join)((0, node_os.homedir)(), "Library", "Application Support"),
|
|
49206
|
+
(0, node_path.join)((0, node_os.homedir)(), ".config"),
|
|
49207
|
+
(0, node_path.join)((0, node_os.homedir)(), ".local"),
|
|
49208
|
+
(0, node_path.join)((0, node_os.homedir)(), ".local", "share"),
|
|
49209
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cache"),
|
|
49210
|
+
(0, node_path.join)((0, node_os.homedir)(), "OneDrive"),
|
|
49211
|
+
(0, node_path.join)((0, node_os.homedir)(), "Dropbox"),
|
|
49212
|
+
(0, node_path.join)((0, node_os.homedir)(), ".ssh"),
|
|
49213
|
+
(0, node_path.join)((0, node_os.homedir)(), ".gnupg"),
|
|
49214
|
+
(0, node_path.join)((0, node_os.homedir)(), ".aws"),
|
|
49215
|
+
(0, node_path.join)((0, node_os.homedir)(), ".docker"),
|
|
49216
|
+
(0, node_path.join)((0, node_os.homedir)(), ".kube"),
|
|
49217
|
+
(0, node_path.join)((0, node_os.homedir)(), ".vscode"),
|
|
49218
|
+
(0, node_path.join)((0, node_os.homedir)(), ".vscode-insiders"),
|
|
49219
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cursor"),
|
|
49220
|
+
(0, node_path.join)((0, node_os.homedir)(), ".npm"),
|
|
49221
|
+
(0, node_path.join)((0, node_os.homedir)(), ".pnpm-state"),
|
|
49222
|
+
(0, node_path.join)((0, node_os.homedir)(), ".yarn"),
|
|
49223
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cargo"),
|
|
49224
|
+
(0, node_path.join)((0, node_os.homedir)(), ".rustup"),
|
|
49225
|
+
(0, node_path.join)((0, node_os.homedir)(), ".m2"),
|
|
49226
|
+
(0, node_path.join)((0, node_os.homedir)(), ".gradle")
|
|
49227
|
+
].filter((p) => typeof p === "string" && p.length > 0);
|
|
49228
|
+
new Set([
|
|
49229
|
+
(0, node_path.join)((0, node_os.homedir)(), "Downloads"),
|
|
49230
|
+
(0, node_path.join)((0, node_os.homedir)(), "Documents"),
|
|
49231
|
+
(0, node_path.join)((0, node_os.homedir)(), "Desktop"),
|
|
49232
|
+
(0, node_path.join)((0, node_os.homedir)(), "Pictures"),
|
|
49233
|
+
(0, node_path.join)((0, node_os.homedir)(), "Music"),
|
|
49234
|
+
(0, node_path.join)((0, node_os.homedir)(), "Videos"),
|
|
49235
|
+
(0, node_path.join)((0, node_os.homedir)(), "Saved Games"),
|
|
49236
|
+
(0, node_path.join)((0, node_os.homedir)(), "Contacts"),
|
|
49237
|
+
(0, node_path.join)((0, node_os.homedir)(), "Searches"),
|
|
49238
|
+
(0, node_path.join)((0, node_os.homedir)(), "Links"),
|
|
49239
|
+
(0, node_path.join)((0, node_os.homedir)(), "3D Objects"),
|
|
49240
|
+
...additionalProtectedPaths
|
|
49241
|
+
].map((p) => removeTrailingSlash((0, import_slash.default)((0, node_path.resolve)(p))).toLowerCase()));
|
|
49242
|
+
//#endregion
|
|
49164
49243
|
//#region ../../node_modules/is-plain-obj/index.js
|
|
49165
49244
|
function isPlainObject$2(value) {
|
|
49166
49245
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -59554,13 +59633,13 @@ var require_opts_arg = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
59554
59633
|
//#region ../../node_modules/mkdirp/lib/path-arg.js
|
|
59555
59634
|
var require_path_arg = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
59556
59635
|
const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
59557
|
-
const { resolve: resolve$
|
|
59636
|
+
const { resolve: resolve$14, parse: parse$2 } = require("path");
|
|
59558
59637
|
const pathArg = (path$84) => {
|
|
59559
59638
|
if (/\0/.test(path$84)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
59560
59639
|
path: path$84,
|
|
59561
59640
|
code: "ERR_INVALID_ARG_VALUE"
|
|
59562
59641
|
});
|
|
59563
|
-
path$84 = resolve$
|
|
59642
|
+
path$84 = resolve$14(path$84);
|
|
59564
59643
|
if (platform === "win32") {
|
|
59565
59644
|
const badWinChars = /[*|"<>?:]/;
|
|
59566
59645
|
const { root } = parse$2(path$84);
|
|
@@ -59978,14 +60057,14 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
59978
60057
|
const assert$1 = require("assert");
|
|
59979
60058
|
const normalize = require_normalize_unicode();
|
|
59980
60059
|
const stripSlashes = require_strip_trailing_slashes();
|
|
59981
|
-
const { join: join$
|
|
60060
|
+
const { join: join$20 } = require("path");
|
|
59982
60061
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
59983
60062
|
module.exports = () => {
|
|
59984
60063
|
const queues = /* @__PURE__ */ new Map();
|
|
59985
60064
|
const reservations = /* @__PURE__ */ new Map();
|
|
59986
60065
|
const getDirs = (path$61) => {
|
|
59987
60066
|
return path$61.split("/").slice(0, -1).reduce((set, path$62) => {
|
|
59988
|
-
if (set.length) path$62 = join$
|
|
60067
|
+
if (set.length) path$62 = join$20(set[set.length - 1], path$62);
|
|
59989
60068
|
set.push(path$62 || "/");
|
|
59990
60069
|
return set;
|
|
59991
60070
|
}, []);
|
|
@@ -60039,7 +60118,7 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
60039
60118
|
};
|
|
60040
60119
|
const reserve = (paths, fn) => {
|
|
60041
60120
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
60042
|
-
return stripSlashes(join$
|
|
60121
|
+
return stripSlashes(join$20(normalize(p))).toLowerCase();
|
|
60043
60122
|
});
|
|
60044
60123
|
const dirs = new Set(paths.map((path$66) => getDirs(path$66)).reduce((a, b) => a.concat(b)));
|
|
60045
60124
|
reservations.set(fn, {
|
|
@@ -62605,7 +62684,7 @@ var require_readdir_glob = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
62605
62684
|
const fs$22 = require("fs");
|
|
62606
62685
|
const { EventEmitter } = require("events");
|
|
62607
62686
|
const { Minimatch } = require_minimatch$1();
|
|
62608
|
-
const { resolve: resolve$
|
|
62687
|
+
const { resolve: resolve$13 } = require("path");
|
|
62609
62688
|
function readdir(dir, strict) {
|
|
62610
62689
|
return new Promise((resolve, reject) => {
|
|
62611
62690
|
fs$22.readdir(dir, { withFileTypes: true }, (err, files) => {
|
|
@@ -62714,7 +62793,7 @@ var require_readdir_glob = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
62714
62793
|
if (this.options.ignore) this.ignoreMatchers = (Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore]).map((ignore) => new Minimatch(ignore, { dot: true }));
|
|
62715
62794
|
this.skipMatchers = [];
|
|
62716
62795
|
if (this.options.skip) this.skipMatchers = (Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]).map((skip) => new Minimatch(skip, { dot: true }));
|
|
62717
|
-
this.iterator = explore(resolve$
|
|
62796
|
+
this.iterator = explore(resolve$13(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
|
|
62718
62797
|
this.paused = false;
|
|
62719
62798
|
this.inactive = false;
|
|
62720
62799
|
this.aborted = false;
|
|
@@ -95846,7 +95925,7 @@ var require_index_min$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
95846
95925
|
//#region ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
|
|
95847
95926
|
var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
95848
95927
|
const { isexe, sync: isexeSync } = require_index_min$3();
|
|
95849
|
-
const { join: join$
|
|
95928
|
+
const { join: join$17, delimiter: delimiter$3, sep: sep$5, posix: posix$1 } = require("path");
|
|
95850
95929
|
const isWindows = process.platform === "win32";
|
|
95851
95930
|
/* istanbul ignore next */
|
|
95852
95931
|
const rSlash = new RegExp(`[${posix$1.sep}${sep$5 === posix$1.sep ? "" : sep$5}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -95876,7 +95955,7 @@ var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
95876
95955
|
};
|
|
95877
95956
|
const getPathPart = (raw, cmd) => {
|
|
95878
95957
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
95879
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
95958
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$17(pathPart, cmd);
|
|
95880
95959
|
};
|
|
95881
95960
|
const which = async (cmd, opt = {}) => {
|
|
95882
95961
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -96625,7 +96704,7 @@ var require_index_min$2 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
96625
96704
|
//#region ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
|
|
96626
96705
|
var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
96627
96706
|
const { isexe, sync: isexeSync } = require_index_min$2();
|
|
96628
|
-
const { join: join$
|
|
96707
|
+
const { join: join$16, delimiter: delimiter$2, sep: sep$4, posix } = require("path");
|
|
96629
96708
|
const isWindows = process.platform === "win32";
|
|
96630
96709
|
/* istanbul ignore next */
|
|
96631
96710
|
const rSlash = new RegExp(`[${posix.sep}${sep$4 === posix.sep ? "" : sep$4}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -96655,7 +96734,7 @@ var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
96655
96734
|
};
|
|
96656
96735
|
const getPathPart = (raw, cmd) => {
|
|
96657
96736
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
96658
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
96737
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$16(pathPart, cmd);
|
|
96659
96738
|
};
|
|
96660
96739
|
const which = async (cmd, opt = {}) => {
|
|
96661
96740
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -98553,7 +98632,7 @@ var require_lib$22 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98553
98632
|
//#endregion
|
|
98554
98633
|
//#region ../../node_modules/npm-normalize-package-bin/lib/index.js
|
|
98555
98634
|
var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98556
|
-
const { join: join$
|
|
98635
|
+
const { join: join$15, basename: basename$6 } = require("path");
|
|
98557
98636
|
const normalize = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg);
|
|
98558
98637
|
const normalizeString = (pkg) => {
|
|
98559
98638
|
if (!pkg.name) return removeBin(pkg);
|
|
@@ -98576,9 +98655,9 @@ var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98576
98655
|
const clean = {};
|
|
98577
98656
|
let hasBins = false;
|
|
98578
98657
|
Object.keys(orig).forEach((binKey) => {
|
|
98579
|
-
const base = join$
|
|
98658
|
+
const base = join$15("/", basename$6(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
98580
98659
|
if (typeof orig[binKey] !== "string" || !base) return;
|
|
98581
|
-
const binTarget = join$
|
|
98660
|
+
const binTarget = join$15("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
98582
98661
|
if (!binTarget) return;
|
|
98583
98662
|
clean[base] = binTarget;
|
|
98584
98663
|
hasBins = true;
|
|
@@ -98844,8 +98923,8 @@ var require_clone = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
98844
98923
|
//#endregion
|
|
98845
98924
|
//#region ../../node_modules/@npmcli/git/lib/is.js
|
|
98846
98925
|
var require_is = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98847
|
-
const { stat: stat$
|
|
98848
|
-
module.exports = ({ cwd = process.cwd() } = {}) => stat$
|
|
98926
|
+
const { stat: stat$7 } = require("fs/promises");
|
|
98927
|
+
module.exports = ({ cwd = process.cwd() } = {}) => stat$7(cwd + "/.git").then(() => true, () => false);
|
|
98849
98928
|
}));
|
|
98850
98929
|
//#endregion
|
|
98851
98930
|
//#region ../../node_modules/@npmcli/git/lib/find.js
|
|
@@ -99379,8 +99458,8 @@ var require_sort$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99379
99458
|
//#endregion
|
|
99380
99459
|
//#region ../../node_modules/@npmcli/package-json/lib/index.js
|
|
99381
99460
|
var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
99382
|
-
const { readFile: readFile$8, writeFile: writeFile$
|
|
99383
|
-
const { resolve: resolve$
|
|
99461
|
+
const { readFile: readFile$8, writeFile: writeFile$5 } = require("node:fs/promises");
|
|
99462
|
+
const { resolve: resolve$12 } = require("node:path");
|
|
99384
99463
|
const parseJSON = require_lib$30();
|
|
99385
99464
|
const updateDeps = require_update_dependencies();
|
|
99386
99465
|
const updateScripts = require_update_scripts();
|
|
@@ -99483,7 +99562,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99483
99562
|
parseErr = err;
|
|
99484
99563
|
}
|
|
99485
99564
|
if (parseErr) {
|
|
99486
|
-
const indexFile = resolve$
|
|
99565
|
+
const indexFile = resolve$12(this.path, "index.js");
|
|
99487
99566
|
let indexFileContent;
|
|
99488
99567
|
try {
|
|
99489
99568
|
indexFileContent = await readFile$8(indexFile, "utf8");
|
|
@@ -99528,7 +99607,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99528
99607
|
return this.#path;
|
|
99529
99608
|
}
|
|
99530
99609
|
get filename() {
|
|
99531
|
-
if (this.path) return resolve$
|
|
99610
|
+
if (this.path) return resolve$12(this.path, "package.json");
|
|
99532
99611
|
}
|
|
99533
99612
|
create(path) {
|
|
99534
99613
|
this.#path = path;
|
|
@@ -99552,7 +99631,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99552
99631
|
const content = sort ? packageSort(rest) : rest;
|
|
99553
99632
|
const fileContent = `${JSON.stringify(content, null, format)}\n`.replace(/\n/g, eol);
|
|
99554
99633
|
if (fileContent.trim() !== this.#readFileContent.trim()) {
|
|
99555
|
-
const written = await writeFile$
|
|
99634
|
+
const written = await writeFile$5(this.filename, fileContent);
|
|
99556
99635
|
this.#readFileContent = fileContent;
|
|
99557
99636
|
return written;
|
|
99558
99637
|
}
|
|
@@ -100650,8 +100729,8 @@ var require_errors$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100650
100729
|
var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100651
100730
|
const { ERR_FS_CP_DIR_TO_NON_DIR, ERR_FS_CP_EEXIST, ERR_FS_CP_EINVAL, ERR_FS_CP_FIFO_PIPE, ERR_FS_CP_NON_DIR_TO_DIR, ERR_FS_CP_SOCKET, ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY, ERR_FS_CP_UNKNOWN, ERR_FS_EISDIR, ERR_INVALID_ARG_TYPE } = require_errors$3();
|
|
100652
100731
|
const { constants: { errno: { EEXIST, EISDIR, EINVAL, ENOTDIR } } } = require("os");
|
|
100653
|
-
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$
|
|
100654
|
-
const { dirname: dirname$9, isAbsolute: isAbsolute$2, join: join$
|
|
100732
|
+
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$8, readdir: readdir$7, readlink, stat: stat$6, symlink, unlink, utimes } = require("fs/promises");
|
|
100733
|
+
const { dirname: dirname$9, isAbsolute: isAbsolute$2, join: join$14, parse, resolve: resolve$11, sep: sep$3, toNamespacedPath } = require("path");
|
|
100655
100734
|
const { fileURLToPath } = require("url");
|
|
100656
100735
|
const defaultOptions = {
|
|
100657
100736
|
dereference: false,
|
|
@@ -100716,7 +100795,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100716
100795
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
100717
100796
|
}
|
|
100718
100797
|
function getStats(src, dest, opts) {
|
|
100719
|
-
const statFunc = opts.dereference ? (file) => stat$
|
|
100798
|
+
const statFunc = opts.dereference ? (file) => stat$6(file, { bigint: true }) : (file) => lstat$2(file, { bigint: true });
|
|
100720
100799
|
return Promise.all([statFunc(src), statFunc(dest).catch((err) => {
|
|
100721
100800
|
// istanbul ignore next: unsure how to cover.
|
|
100722
100801
|
if (err.code === "ENOENT") return null;
|
|
@@ -100727,23 +100806,23 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100727
100806
|
async function checkParentDir(destStat, src, dest, opts) {
|
|
100728
100807
|
const destParent = dirname$9(dest);
|
|
100729
100808
|
if (await pathExists(destParent)) return getStatsForCopy(destStat, src, dest, opts);
|
|
100730
|
-
await mkdir$
|
|
100809
|
+
await mkdir$8(destParent, { recursive: true });
|
|
100731
100810
|
return getStatsForCopy(destStat, src, dest, opts);
|
|
100732
100811
|
}
|
|
100733
100812
|
function pathExists(dest) {
|
|
100734
|
-
return stat$
|
|
100813
|
+
return stat$6(dest).then(
|
|
100735
100814
|
() => true,
|
|
100736
100815
|
// istanbul ignore next: not sure when this would occur
|
|
100737
100816
|
(err) => err.code === "ENOENT" ? false : Promise.reject(err)
|
|
100738
100817
|
);
|
|
100739
100818
|
}
|
|
100740
100819
|
async function checkParentPaths(src, srcStat, dest) {
|
|
100741
|
-
const srcParent = resolve$
|
|
100742
|
-
const destParent = resolve$
|
|
100820
|
+
const srcParent = resolve$11(dirname$9(src));
|
|
100821
|
+
const destParent = resolve$11(dirname$9(dest));
|
|
100743
100822
|
if (destParent === srcParent || destParent === parse(destParent).root) return;
|
|
100744
100823
|
let destStat;
|
|
100745
100824
|
try {
|
|
100746
|
-
destStat = await stat$
|
|
100825
|
+
destStat = await stat$6(destParent, { bigint: true });
|
|
100747
100826
|
} catch (err) {
|
|
100748
100827
|
// istanbul ignore else: not sure when this would occur
|
|
100749
100828
|
if (err.code === "ENOENT") return;
|
|
@@ -100758,7 +100837,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100758
100837
|
});
|
|
100759
100838
|
return checkParentPaths(src, srcStat, destParent);
|
|
100760
100839
|
}
|
|
100761
|
-
const normalizePathToArray = (path$54) => resolve$
|
|
100840
|
+
const normalizePathToArray = (path$54) => resolve$11(path$54).split(sep$3).filter(Boolean);
|
|
100762
100841
|
function isSrcSubdir(src, dest) {
|
|
100763
100842
|
const srcArr = normalizePathToArray(src);
|
|
100764
100843
|
const destArr = normalizePathToArray(dest);
|
|
@@ -100772,7 +100851,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100772
100851
|
return getStatsForCopy(destStat, src, dest, opts);
|
|
100773
100852
|
}
|
|
100774
100853
|
async function getStatsForCopy(destStat, src, dest, opts) {
|
|
100775
|
-
const srcStat = await (opts.dereference ? stat$
|
|
100854
|
+
const srcStat = await (opts.dereference ? stat$6 : lstat$2)(src);
|
|
100776
100855
|
// istanbul ignore else: can't portably test FIFO
|
|
100777
100856
|
if (srcStat.isDirectory() && opts.recursive) return onDir(srcStat, destStat, src, dest, opts);
|
|
100778
100857
|
else if (srcStat.isDirectory()) throw new ERR_FS_EISDIR({
|
|
@@ -100844,7 +100923,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100844
100923
|
return chmod$2(dest, srcMode);
|
|
100845
100924
|
}
|
|
100846
100925
|
async function setDestTimestamps(src, dest) {
|
|
100847
|
-
const updatedSrcStat = await stat$
|
|
100926
|
+
const updatedSrcStat = await stat$6(src);
|
|
100848
100927
|
return utimes(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
100849
100928
|
}
|
|
100850
100929
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -100852,23 +100931,23 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100852
100931
|
return copyDir(src, dest, opts);
|
|
100853
100932
|
}
|
|
100854
100933
|
async function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
100855
|
-
await mkdir$
|
|
100934
|
+
await mkdir$8(dest);
|
|
100856
100935
|
await copyDir(src, dest, opts);
|
|
100857
100936
|
return setDestMode(dest, srcMode);
|
|
100858
100937
|
}
|
|
100859
100938
|
async function copyDir(src, dest, opts) {
|
|
100860
|
-
const dir = await readdir$
|
|
100939
|
+
const dir = await readdir$7(src);
|
|
100861
100940
|
for (let i = 0; i < dir.length; i++) {
|
|
100862
100941
|
const item = dir[i];
|
|
100863
|
-
const srcItem = join$
|
|
100864
|
-
const destItem = join$
|
|
100942
|
+
const srcItem = join$14(src, item);
|
|
100943
|
+
const destItem = join$14(dest, item);
|
|
100865
100944
|
const { destStat } = await checkPaths(srcItem, destItem, opts);
|
|
100866
100945
|
await startCopy(destStat, srcItem, destItem, opts);
|
|
100867
100946
|
}
|
|
100868
100947
|
}
|
|
100869
100948
|
async function onLink(destStat, src, dest) {
|
|
100870
100949
|
let resolvedSrc = await readlink(src);
|
|
100871
|
-
if (!isAbsolute$2(resolvedSrc)) resolvedSrc = resolve$
|
|
100950
|
+
if (!isAbsolute$2(resolvedSrc)) resolvedSrc = resolve$11(dirname$9(src), resolvedSrc);
|
|
100872
100951
|
if (!destStat) return symlink(resolvedSrc, dest);
|
|
100873
100952
|
let resolvedDest;
|
|
100874
100953
|
try {
|
|
@@ -100879,14 +100958,14 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100879
100958
|
// istanbul ignore next: should not be possible
|
|
100880
100959
|
throw err;
|
|
100881
100960
|
}
|
|
100882
|
-
if (!isAbsolute$2(resolvedDest)) resolvedDest = resolve$
|
|
100961
|
+
if (!isAbsolute$2(resolvedDest)) resolvedDest = resolve$11(dirname$9(dest), resolvedDest);
|
|
100883
100962
|
if (isSrcSubdir(resolvedSrc, resolvedDest)) throw new ERR_FS_CP_EINVAL({
|
|
100884
100963
|
message: `cannot copy ${resolvedSrc} to a subdirectory of self ${resolvedDest}`,
|
|
100885
100964
|
path: dest,
|
|
100886
100965
|
syscall: "cp",
|
|
100887
100966
|
errno: EINVAL
|
|
100888
100967
|
});
|
|
100889
|
-
if ((await stat$
|
|
100968
|
+
if ((await stat$6(src)).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) throw new ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY({
|
|
100890
100969
|
message: `cannot overwrite ${resolvedDest} with ${resolvedSrc}`,
|
|
100891
100970
|
path: dest,
|
|
100892
100971
|
syscall: "cp",
|
|
@@ -100925,13 +101004,13 @@ var require_cp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
100925
101004
|
//#endregion
|
|
100926
101005
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/with-temp-dir.js
|
|
100927
101006
|
var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100928
|
-
const { join: join$
|
|
101007
|
+
const { join: join$13, sep: sep$2 } = require("path");
|
|
100929
101008
|
const getOptions = require_get_options();
|
|
100930
|
-
const { mkdir: mkdir$
|
|
101009
|
+
const { mkdir: mkdir$7, mkdtemp, rm: rm$8 } = require("fs/promises");
|
|
100931
101010
|
const withTempDir = async (root, fn, opts) => {
|
|
100932
101011
|
const options = getOptions(opts, { copy: ["tmpPrefix"] });
|
|
100933
|
-
await mkdir$
|
|
100934
|
-
const target = await mkdtemp(join$
|
|
101012
|
+
await mkdir$7(root, { recursive: true });
|
|
101013
|
+
const target = await mkdtemp(join$13(`${root}${sep$2}`, options.tmpPrefix || ""));
|
|
100935
101014
|
let err;
|
|
100936
101015
|
let result;
|
|
100937
101016
|
try {
|
|
@@ -100953,11 +101032,11 @@ var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
100953
101032
|
//#endregion
|
|
100954
101033
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/readdir-scoped.js
|
|
100955
101034
|
var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100956
|
-
const { readdir: readdir$
|
|
100957
|
-
const { join: join$
|
|
101035
|
+
const { readdir: readdir$6 } = require("fs/promises");
|
|
101036
|
+
const { join: join$12 } = require("path");
|
|
100958
101037
|
const readdirScoped = async (dir) => {
|
|
100959
101038
|
const results = [];
|
|
100960
|
-
for (const item of await readdir$
|
|
101039
|
+
for (const item of await readdir$6(dir)) if (item.startsWith("@")) for (const scopedItem of await readdir$6(join$12(dir, item))) results.push(join$12(item, scopedItem));
|
|
100961
101040
|
else results.push(item);
|
|
100962
101041
|
return results;
|
|
100963
101042
|
};
|
|
@@ -100966,7 +101045,7 @@ var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
100966
101045
|
//#endregion
|
|
100967
101046
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/move-file.js
|
|
100968
101047
|
var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100969
|
-
const { dirname: dirname$8, join: join$
|
|
101048
|
+
const { dirname: dirname$8, join: join$11, resolve: resolve$10, relative: relative$1, isAbsolute: isAbsolute$1 } = require("path");
|
|
100970
101049
|
const fs$13 = require("fs/promises");
|
|
100971
101050
|
const pathExists = async (path$53) => {
|
|
100972
101051
|
try {
|
|
@@ -100991,7 +101070,7 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
100991
101070
|
const sourceStat = await fs$13.lstat(source);
|
|
100992
101071
|
if (sourceStat.isDirectory()) {
|
|
100993
101072
|
const files = await fs$13.readdir(source);
|
|
100994
|
-
await Promise.all(files.map((file) => moveFile(join$
|
|
101073
|
+
await Promise.all(files.map((file) => moveFile(join$11(source, file), join$11(destination, file), options, false, symlinks)));
|
|
100995
101074
|
} else if (sourceStat.isSymbolicLink()) symlinks.push({
|
|
100996
101075
|
source,
|
|
100997
101076
|
destination
|
|
@@ -101002,10 +101081,10 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
101002
101081
|
if (root) {
|
|
101003
101082
|
await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
|
|
101004
101083
|
let target = await fs$13.readlink(symSource);
|
|
101005
|
-
if (isAbsolute$1(target)) target = resolve$
|
|
101084
|
+
if (isAbsolute$1(target)) target = resolve$10(symDestination, relative$1(symSource, target));
|
|
101006
101085
|
let targetStat = "file";
|
|
101007
101086
|
try {
|
|
101008
|
-
targetStat = await fs$13.stat(resolve$
|
|
101087
|
+
targetStat = await fs$13.stat(resolve$10(dirname$8(symSource), target));
|
|
101009
101088
|
if (targetStat.isDirectory()) targetStat = "junction";
|
|
101010
101089
|
} catch {}
|
|
101011
101090
|
await fs$13.symlink(target, symDestination, targetStat);
|
|
@@ -101167,7 +101246,7 @@ var require_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
101167
101246
|
//#region ../../node_modules/cacache/lib/entry-index.js
|
|
101168
101247
|
var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
101169
101248
|
const crypto$1 = require("crypto");
|
|
101170
|
-
const { appendFile, mkdir: mkdir$
|
|
101249
|
+
const { appendFile, mkdir: mkdir$6, readFile: readFile$7, readdir: readdir$5, rm: rm$7, writeFile: writeFile$4 } = require("fs/promises");
|
|
101171
101250
|
const { Minipass } = require_commonjs$10();
|
|
101172
101251
|
const path$14 = require("path");
|
|
101173
101252
|
const ssri = require_lib$17();
|
|
@@ -101201,7 +101280,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101201
101280
|
}).join("\n");
|
|
101202
101281
|
const setup = async () => {
|
|
101203
101282
|
const target = tmpName(cache, opts.tmpPrefix);
|
|
101204
|
-
await mkdir$
|
|
101283
|
+
await mkdir$6(path$14.dirname(target), { recursive: true });
|
|
101205
101284
|
return {
|
|
101206
101285
|
target,
|
|
101207
101286
|
moved: false
|
|
@@ -101214,8 +101293,8 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101214
101293
|
});
|
|
101215
101294
|
};
|
|
101216
101295
|
const write = async (tmp) => {
|
|
101217
|
-
await writeFile$
|
|
101218
|
-
await mkdir$
|
|
101296
|
+
await writeFile$4(tmp.target, newIndex, { flag: "wx" });
|
|
101297
|
+
await mkdir$6(path$14.dirname(bucket), { recursive: true });
|
|
101219
101298
|
await moveFile(tmp.target, bucket);
|
|
101220
101299
|
tmp.moved = true;
|
|
101221
101300
|
};
|
|
@@ -101239,7 +101318,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101239
101318
|
metadata
|
|
101240
101319
|
};
|
|
101241
101320
|
try {
|
|
101242
|
-
await mkdir$
|
|
101321
|
+
await mkdir$6(path$14.dirname(bucket), { recursive: true });
|
|
101243
101322
|
const stringified = JSON.stringify(entry);
|
|
101244
101323
|
await appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`);
|
|
101245
101324
|
} catch (err) {
|
|
@@ -101360,7 +101439,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101360
101439
|
};
|
|
101361
101440
|
}
|
|
101362
101441
|
function readdirOrEmpty(dir) {
|
|
101363
|
-
return readdir$
|
|
101442
|
+
return readdir$5(dir).catch((err) => {
|
|
101364
101443
|
if (err.code === "ENOENT" || err.code === "ENOTDIR") return [];
|
|
101365
101444
|
throw err;
|
|
101366
101445
|
});
|
|
@@ -106082,7 +106161,7 @@ var require_rm = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
106082
106161
|
//#endregion
|
|
106083
106162
|
//#region ../../node_modules/cacache/lib/verify.js
|
|
106084
106163
|
var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
106085
|
-
const { mkdir: mkdir$
|
|
106164
|
+
const { mkdir: mkdir$5, readFile: readFile$6, rm: rm$5, stat: stat$5, truncate, writeFile: writeFile$3 } = require("fs/promises");
|
|
106086
106165
|
const contentPath = require_path();
|
|
106087
106166
|
const fsm = require_lib$15();
|
|
106088
106167
|
const glob = require_glob();
|
|
@@ -106132,7 +106211,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106132
106211
|
}
|
|
106133
106212
|
async function fixPerms(cache, opts) {
|
|
106134
106213
|
opts.log.silly("verify", "fixing cache permissions");
|
|
106135
|
-
await mkdir$
|
|
106214
|
+
await mkdir$5(cache, { recursive: true });
|
|
106136
106215
|
return null;
|
|
106137
106216
|
}
|
|
106138
106217
|
async function garbageCollect(cache, opts) {
|
|
@@ -106178,7 +106257,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106178
106257
|
}
|
|
106179
106258
|
} else {
|
|
106180
106259
|
stats.reclaimedCount++;
|
|
106181
|
-
const s = await stat$
|
|
106260
|
+
const s = await stat$5(f);
|
|
106182
106261
|
await rm$5(f, {
|
|
106183
106262
|
recursive: true,
|
|
106184
106263
|
force: true
|
|
@@ -106192,7 +106271,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106192
106271
|
async function verifyContent(filepath, sri) {
|
|
106193
106272
|
const contentInfo = {};
|
|
106194
106273
|
try {
|
|
106195
|
-
const { size } = await stat$
|
|
106274
|
+
const { size } = await stat$5(filepath);
|
|
106196
106275
|
contentInfo.size = size;
|
|
106197
106276
|
contentInfo.valid = true;
|
|
106198
106277
|
await ssri.checkStream(new fsm.ReadStream(filepath), sri);
|
|
@@ -106246,7 +106325,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106246
106325
|
for (const entry of bucket) {
|
|
106247
106326
|
const content = contentPath(cache, entry.integrity);
|
|
106248
106327
|
try {
|
|
106249
|
-
await stat$
|
|
106328
|
+
await stat$5(content);
|
|
106250
106329
|
await index.insert(cache, entry.key, entry.integrity, {
|
|
106251
106330
|
metadata: entry.metadata,
|
|
106252
106331
|
size: entry.size,
|
|
@@ -106271,7 +106350,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106271
106350
|
async function writeVerifile(cache, opts) {
|
|
106272
106351
|
const verifile = path$10.join(cache, "_lastverified");
|
|
106273
106352
|
opts.log.silly("verify", "writing verifile to " + verifile);
|
|
106274
|
-
return writeFile$
|
|
106353
|
+
return writeFile$3(verifile, `${Date.now()}`);
|
|
106275
106354
|
}
|
|
106276
106355
|
module.exports.lastRun = lastRun;
|
|
106277
106356
|
async function lastRun(cache) {
|
|
@@ -106821,8 +106900,8 @@ var require_lib$12 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106821
106900
|
//#region ../../node_modules/@npmcli/installed-package-contents/lib/index.js
|
|
106822
106901
|
var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
106823
106902
|
const bundled = require_lib$12();
|
|
106824
|
-
const { readFile: readFile$5, readdir: readdir$
|
|
106825
|
-
const { resolve: resolve$
|
|
106903
|
+
const { readFile: readFile$5, readdir: readdir$4, stat: stat$4 } = require("fs/promises");
|
|
106904
|
+
const { resolve: resolve$9, basename: basename$5, dirname: dirname$7 } = require("path");
|
|
106826
106905
|
const normalizePackageBin = require_lib$21();
|
|
106827
106906
|
const readPackage = ({ path: path$48, packageJsonCache }) => packageJsonCache.has(path$48) ? Promise.resolve(packageJsonCache.get(path$48)) : readFile$5(path$48).then((json) => {
|
|
106828
106907
|
const pkg = normalizePackageBin(JSON.parse(json));
|
|
@@ -106866,17 +106945,17 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106866
106945
|
const nm = /^@.+/.test(scope) ? dirname$7(dir) : dir;
|
|
106867
106946
|
const binFiles = [];
|
|
106868
106947
|
Object.keys(pkg.bin).forEach((b) => {
|
|
106869
|
-
const base = resolve$
|
|
106948
|
+
const base = resolve$9(nm, ".bin", b);
|
|
106870
106949
|
binFiles.push(base, base + ".cmd", base + ".ps1");
|
|
106871
106950
|
});
|
|
106872
|
-
(await Promise.all(binFiles.map((b) => stat$
|
|
106951
|
+
(await Promise.all(binFiles.map((b) => stat$4(b).then(() => b).catch(() => null)))).filter((b) => b).forEach((b) => result.add(b));
|
|
106873
106952
|
}
|
|
106874
106953
|
}
|
|
106875
106954
|
if (currentDepth >= depth) {
|
|
106876
106955
|
result.add(path$50);
|
|
106877
106956
|
return result;
|
|
106878
106957
|
}
|
|
106879
|
-
const [dirEntries, bundleDeps] = await Promise.all([readdir$
|
|
106958
|
+
const [dirEntries, bundleDeps] = await Promise.all([readdir$4(path$50, { withFileTypes: true }), currentDepth === 0 && pkg && pkg.bundleDependencies ? bundled({
|
|
106880
106959
|
path: path$50,
|
|
106881
106960
|
packageJsonCache
|
|
106882
106961
|
}) : null]).catch(() => []);
|
|
@@ -106887,7 +106966,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106887
106966
|
}
|
|
106888
106967
|
const recursePromises = [];
|
|
106889
106968
|
for (const entry of dirEntries) {
|
|
106890
|
-
const p = resolve$
|
|
106969
|
+
const p = resolve$9(path$50, entry.name);
|
|
106891
106970
|
if (entry.isDirectory() === false) {
|
|
106892
106971
|
result.add(p);
|
|
106893
106972
|
continue;
|
|
@@ -106906,7 +106985,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106906
106985
|
}
|
|
106907
106986
|
if (bundleDeps) recursePromises.push(...bundleDeps.map((dep) => {
|
|
106908
106987
|
return pkgContents({
|
|
106909
|
-
path: resolve$
|
|
106988
|
+
path: resolve$9(path$50, "node_modules", dep),
|
|
106910
106989
|
packageJsonCache,
|
|
106911
106990
|
pkg: true,
|
|
106912
106991
|
depth,
|
|
@@ -106918,7 +106997,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106918
106997
|
return result;
|
|
106919
106998
|
};
|
|
106920
106999
|
module.exports = ({ path: path$51, ...opts }) => pkgContents({
|
|
106921
|
-
path: resolve$
|
|
107000
|
+
path: resolve$9(path$51),
|
|
106922
107001
|
...opts,
|
|
106923
107002
|
pkg: true
|
|
106924
107003
|
}).then((results) => [...results]);
|
|
@@ -110529,18 +110608,18 @@ var require_protected = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
110529
110608
|
//#endregion
|
|
110530
110609
|
//#region ../../node_modules/pacote/lib/util/cache-dir.js
|
|
110531
110610
|
var require_cache_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
110532
|
-
const { resolve: resolve$
|
|
110611
|
+
const { resolve: resolve$8 } = require("node:path");
|
|
110533
110612
|
const { tmpdir, homedir } = require("node:os");
|
|
110534
110613
|
module.exports = (fakePlatform = false) => {
|
|
110535
110614
|
const temp = tmpdir();
|
|
110536
110615
|
const uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
110537
|
-
const home = homedir() || resolve$
|
|
110616
|
+
const home = homedir() || resolve$8(temp, "npm-" + uidOrPid);
|
|
110538
110617
|
const platform = fakePlatform || process.platform;
|
|
110539
110618
|
const cacheExtra = platform === "win32" ? "npm-cache" : ".npm";
|
|
110540
110619
|
const cacheRoot = platform === "win32" && process.env.LOCALAPPDATA || home;
|
|
110541
110620
|
return {
|
|
110542
|
-
cacache: resolve$
|
|
110543
|
-
tufcache: resolve$
|
|
110621
|
+
cacache: resolve$8(cacheRoot, cacheExtra, "_cacache"),
|
|
110622
|
+
tufcache: resolve$8(cacheRoot, cacheExtra, "_tuf")
|
|
110544
110623
|
};
|
|
110545
110624
|
};
|
|
110546
110625
|
}));
|
|
@@ -112354,7 +112433,7 @@ var require_lib$10 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112354
112433
|
var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112355
112434
|
const { Walker: IgnoreWalker } = require_lib$10();
|
|
112356
112435
|
const { lstatSync: lstat$1, readFileSync: readFile$4 } = require("fs");
|
|
112357
|
-
const { basename: basename$4, dirname: dirname$6, extname: extname$1, join: join$
|
|
112436
|
+
const { basename: basename$4, dirname: dirname$6, extname: extname$1, join: join$10, relative, resolve: resolve$7, sep: sep$1 } = require("path");
|
|
112358
112437
|
const { log } = require_lib$29();
|
|
112359
112438
|
const defaultRules = Symbol("npm-packlist.rules.default");
|
|
112360
112439
|
const strictRules = Symbol("npm-packlist.rules.strict");
|
|
@@ -112387,7 +112466,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112387
112466
|
const normalizePath = (path$45) => path$45.split("\\").join("/");
|
|
112388
112467
|
const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
|
|
112389
112468
|
for (const file of [".npmignore", ".gitignore"]) try {
|
|
112390
|
-
const ignoreContent = readFile$4(join$
|
|
112469
|
+
const ignoreContent = readFile$4(join$10(root, file), { encoding: "utf8" });
|
|
112391
112470
|
result.push(ignoreContent);
|
|
112392
112471
|
break;
|
|
112393
112472
|
} catch (err) {
|
|
@@ -112396,8 +112475,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112396
112475
|
}
|
|
112397
112476
|
if (!rel) return result;
|
|
112398
112477
|
const firstRel = rel.split(sep$1, 1)[0];
|
|
112399
|
-
const newRoot = join$
|
|
112400
|
-
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$
|
|
112478
|
+
const newRoot = join$10(root, firstRel);
|
|
112479
|
+
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$10(root, rel)), result);
|
|
112401
112480
|
};
|
|
112402
112481
|
var PackWalker = class PackWalker extends IgnoreWalker {
|
|
112403
112482
|
constructor(tree, opts) {
|
|
@@ -112405,7 +112484,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112405
112484
|
...opts,
|
|
112406
112485
|
includeEmpty: false,
|
|
112407
112486
|
follow: false,
|
|
112408
|
-
path: resolve$
|
|
112487
|
+
path: resolve$7(opts?.path || tree.path).replace(/\\/g, "/"),
|
|
112409
112488
|
ignoreFiles: opts?.ignoreFiles || [
|
|
112410
112489
|
defaultRules,
|
|
112411
112490
|
"package.json",
|
|
@@ -112464,7 +112543,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112464
112543
|
let ignoreFiles = null;
|
|
112465
112544
|
if (this.tree.workspaces) {
|
|
112466
112545
|
const workspaceDirs = [...this.tree.workspaces.values()].map((dir) => dir.replace(/\\/g, "/"));
|
|
112467
|
-
const entryPath = join$
|
|
112546
|
+
const entryPath = join$10(this.path, entry).replace(/\\/g, "/");
|
|
112468
112547
|
if (workspaceDirs.includes(entryPath)) ignoreFiles = [
|
|
112469
112548
|
defaultRules,
|
|
112470
112549
|
"package.json",
|
|
@@ -112524,7 +112603,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112524
112603
|
if (file.endsWith("/*")) file += "*";
|
|
112525
112604
|
const inverse = `!${file}`;
|
|
112526
112605
|
try {
|
|
112527
|
-
const stat = lstat$1(join$
|
|
112606
|
+
const stat = lstat$1(join$10(this.path, file.replace(/^!+/, "")).replace(/\\/g, "/"));
|
|
112528
112607
|
if (stat.isFile()) {
|
|
112529
112608
|
strict.unshift(inverse);
|
|
112530
112609
|
this.requiredFiles.push(file.startsWith("/") ? file.slice(1) : file);
|
|
@@ -112581,7 +112660,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112581
112660
|
walker.start();
|
|
112582
112661
|
});
|
|
112583
112662
|
const relativeFrom = relative(this.root, walker.path);
|
|
112584
|
-
for (const file of bundled) this.result.add(join$
|
|
112663
|
+
for (const file of bundled) this.result.add(join$10(relativeFrom, file).replace(/\\/g, "/"));
|
|
112585
112664
|
}
|
|
112586
112665
|
}
|
|
112587
112666
|
};
|
|
@@ -112605,8 +112684,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112605
112684
|
//#region ../../node_modules/@npmcli/run-script/lib/set-path.js
|
|
112606
112685
|
var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112607
112686
|
const { log } = require_lib$29();
|
|
112608
|
-
const { resolve: resolve$
|
|
112609
|
-
const nodeGypPath = resolve$
|
|
112687
|
+
const { resolve: resolve$6, dirname: dirname$5, delimiter: delimiter$1 } = require("path");
|
|
112688
|
+
const nodeGypPath = resolve$6(__dirname, "../lib/node-gyp-bin");
|
|
112610
112689
|
const setPATH = (projectPath, binPaths, env) => {
|
|
112611
112690
|
const PATH = Object.keys(env).filter((p) => /^path$/i.test(p) && env[p]).map((p) => env[p].split(delimiter$1)).reduce((set, p) => set.concat(p.filter((concatted) => !set.includes(concatted))), []).join(delimiter$1);
|
|
112612
112691
|
const pathArr = [];
|
|
@@ -112621,7 +112700,7 @@ var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
112621
112700
|
let p = projectPath;
|
|
112622
112701
|
let pp;
|
|
112623
112702
|
do {
|
|
112624
|
-
pathArr.push(resolve$
|
|
112703
|
+
pathArr.push(resolve$6(p, "node_modules", ".bin"));
|
|
112625
112704
|
pp = p;
|
|
112626
112705
|
p = dirname$5(p);
|
|
112627
112706
|
} while (p !== pp);
|
|
@@ -112636,7 +112715,7 @@ var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
112636
112715
|
//#region ../../node_modules/@npmcli/run-script/lib/make-spawn-args.js
|
|
112637
112716
|
var require_make_spawn_args = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112638
112717
|
const setPATH = require_set_path();
|
|
112639
|
-
const { resolve: resolve$
|
|
112718
|
+
const { resolve: resolve$5 } = require("path");
|
|
112640
112719
|
let npm_config_node_gyp;
|
|
112641
112720
|
const makeSpawnArgs = (options) => {
|
|
112642
112721
|
const { args, binPaths, cmd, env, event, nodeGyp, path: path$44, scriptShell = true, stdio, stdioString } = options;
|
|
@@ -112650,7 +112729,7 @@ var require_make_spawn_args = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
|
|
|
112650
112729
|
env: setPATH(path$44, binPaths, {
|
|
112651
112730
|
...process.env,
|
|
112652
112731
|
...env,
|
|
112653
|
-
npm_package_json: resolve$
|
|
112732
|
+
npm_package_json: resolve$5(path$44, "package.json"),
|
|
112654
112733
|
npm_lifecycle_event: event,
|
|
112655
112734
|
npm_lifecycle_script: cmd,
|
|
112656
112735
|
npm_config_node_gyp
|
|
@@ -112737,11 +112816,11 @@ var require_signal_manager = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
112737
112816
|
//#endregion
|
|
112738
112817
|
//#region ../../node_modules/@npmcli/run-script/lib/is-server-package.js
|
|
112739
112818
|
var require_is_server_package = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112740
|
-
const { stat: stat$
|
|
112741
|
-
const { resolve: resolve$
|
|
112819
|
+
const { stat: stat$3 } = require("node:fs/promises");
|
|
112820
|
+
const { resolve: resolve$4 } = require("node:path");
|
|
112742
112821
|
module.exports = async (path) => {
|
|
112743
112822
|
try {
|
|
112744
|
-
return (await stat$
|
|
112823
|
+
return (await stat$3(resolve$4(path, "server.js"))).isFile();
|
|
112745
112824
|
} catch (er) {
|
|
112746
112825
|
return false;
|
|
112747
112826
|
}
|
|
@@ -112851,8 +112930,8 @@ var require_run_script = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
112851
112930
|
//#endregion
|
|
112852
112931
|
//#region ../../node_modules/pacote/lib/file.js
|
|
112853
112932
|
var require_file$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112854
|
-
const { resolve: resolve$
|
|
112855
|
-
const { stat: stat$
|
|
112933
|
+
const { resolve: resolve$3 } = require("node:path");
|
|
112934
|
+
const { stat: stat$2, chmod: chmod$1 } = require("node:fs/promises");
|
|
112856
112935
|
const cacache = require_lib$14();
|
|
112857
112936
|
const fsm = require_lib$13();
|
|
112858
112937
|
const Fetcher = require_fetcher();
|
|
@@ -112877,9 +112956,9 @@ var require_file$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112877
112956
|
#exeBins(pkg, dest) {
|
|
112878
112957
|
if (!pkg.bin) return Promise.resolve();
|
|
112879
112958
|
return Promise.all(Object.keys(pkg.bin).map(async (k) => {
|
|
112880
|
-
const script = resolve$
|
|
112959
|
+
const script = resolve$3(dest, pkg.bin[k]);
|
|
112881
112960
|
try {
|
|
112882
|
-
const st = await stat$
|
|
112961
|
+
const st = await stat$2(script);
|
|
112883
112962
|
const mode = st.mode | 73;
|
|
112884
112963
|
if (mode === st.mode) return;
|
|
112885
112964
|
await chmod$1(script, mode);
|
|
@@ -112928,7 +113007,7 @@ var require_tar_create_options = /* @__PURE__ */ require_chunk.__commonJSMin(((e
|
|
|
112928
113007
|
//#endregion
|
|
112929
113008
|
//#region ../../node_modules/pacote/lib/dir.js
|
|
112930
113009
|
var require_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112931
|
-
const { resolve: resolve$
|
|
113010
|
+
const { resolve: resolve$2 } = require("node:path");
|
|
112932
113011
|
const packlist = require_lib$9();
|
|
112933
113012
|
const runScript = require_run_script();
|
|
112934
113013
|
const tar = require_index_min();
|
|
@@ -112964,7 +113043,7 @@ var require_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
112964
113043
|
env: {
|
|
112965
113044
|
npm_package_resolved: this.resolved,
|
|
112966
113045
|
npm_package_integrity: this.integrity,
|
|
112967
|
-
npm_package_json: resolve$
|
|
113046
|
+
npm_package_json: resolve$2(this.resolved, "package.json")
|
|
112968
113047
|
}
|
|
112969
113048
|
});
|
|
112970
113049
|
});
|
|
@@ -141975,7 +142054,7 @@ var require_registry = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
141975
142054
|
//#region ../../node_modules/pacote/lib/fetcher.js
|
|
141976
142055
|
var require_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
141977
142056
|
const { basename: basename$3, dirname: dirname$4 } = require("node:path");
|
|
141978
|
-
const { rm: rm$4, mkdir: mkdir$
|
|
142057
|
+
const { rm: rm$4, mkdir: mkdir$4 } = require("node:fs/promises");
|
|
141979
142058
|
const PackageJson = require_lib$18();
|
|
141980
142059
|
const cacache = require_lib$14();
|
|
141981
142060
|
const fsm = require_lib$13();
|
|
@@ -142159,7 +142238,7 @@ var require_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mod
|
|
|
142159
142238
|
}
|
|
142160
142239
|
async #mkdir(dest) {
|
|
142161
142240
|
await this.#empty(dest);
|
|
142162
|
-
return await mkdir$
|
|
142241
|
+
return await mkdir$4(dest, { recursive: true });
|
|
142163
142242
|
}
|
|
142164
142243
|
async extract(dest) {
|
|
142165
142244
|
await this.#mkdir(dest);
|
|
@@ -142179,7 +142258,7 @@ var require_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mod
|
|
|
142179
142258
|
}));
|
|
142180
142259
|
}
|
|
142181
142260
|
async tarballFile(dest) {
|
|
142182
|
-
await mkdir$
|
|
142261
|
+
await mkdir$4(dirname$4(dest), { recursive: true });
|
|
142183
142262
|
return this.#toFile(dest);
|
|
142184
142263
|
}
|
|
142185
142264
|
#extract(dest, tarball) {
|
|
@@ -150606,7 +150685,7 @@ var require_src = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
150606
150685
|
const { promisify } = require("util");
|
|
150607
150686
|
const path$3 = require("path");
|
|
150608
150687
|
const { createHash } = require("crypto");
|
|
150609
|
-
const { realpath, lstat, createReadStream, readdir: readdir$
|
|
150688
|
+
const { realpath, lstat, createReadStream, readdir: readdir$3 } = require("fs");
|
|
150610
150689
|
const url = require("url");
|
|
150611
150690
|
const slasher = require_glob_slash();
|
|
150612
150691
|
const minimatch = require_minimatch();
|
|
@@ -150931,7 +151010,7 @@ var require_src = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
150931
151010
|
lstat: promisify(lstat),
|
|
150932
151011
|
realpath: promisify(realpath),
|
|
150933
151012
|
createReadStream,
|
|
150934
|
-
readdir: promisify(readdir$
|
|
151013
|
+
readdir: promisify(readdir$3),
|
|
150935
151014
|
sendError
|
|
150936
151015
|
}, methods);
|
|
150937
151016
|
module.exports = async (request, response, config = {}, methods = {}) => {
|
|
@@ -151501,7 +151580,7 @@ async function resolveEntryPoint(packageDir, packageName) {
|
|
|
151501
151580
|
}
|
|
151502
151581
|
//#endregion
|
|
151503
151582
|
//#region ../../packages/core-node/src/handler-func.ts
|
|
151504
|
-
const { join: join$
|
|
151583
|
+
const { join: join$8 } = node_path.default;
|
|
151505
151584
|
//#endregion
|
|
151506
151585
|
//#region ../../packages/core-node/src/handlers/plugins.ts
|
|
151507
151586
|
const localPluginsMap = /* @__PURE__ */ new Map();
|