@pipelab/plugin-construct 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/assets/script.ts +36 -28
- package/dist/index.cjs +204 -109
- package/dist/index.mjs +145 -53
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -45418,6 +45418,17 @@ const DEFAULT_PNPM_VERSION = "10.12.0";
|
|
|
45418
45418
|
const metaUrl = require("url").pathToFileURL(__filename).href;
|
|
45419
45419
|
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? (0, node_path.dirname)((0, node_url.fileURLToPath)(metaUrl)) : process.cwd();
|
|
45420
45420
|
const isDev = process.env.NODE_ENV === "development";
|
|
45421
|
+
const getDefaultUserDataPath = (env) => {
|
|
45422
|
+
const base = (() => {
|
|
45423
|
+
switch ((0, node_os.platform)()) {
|
|
45424
|
+
case "win32": return process.env.APPDATA || (0, node_path.join)((0, node_os.homedir)(), "AppData", "Roaming");
|
|
45425
|
+
case "darwin": return (0, node_path.join)((0, node_os.homedir)(), "Library", "Application Support");
|
|
45426
|
+
default: return process.env.XDG_CONFIG_HOME || (0, node_path.join)((0, node_os.homedir)(), ".config");
|
|
45427
|
+
}
|
|
45428
|
+
})();
|
|
45429
|
+
const mode = env ?? (isDev ? "dev" : "prod");
|
|
45430
|
+
return (0, node_path.join)(base, "@pipelab", mode === "dev" ? "app-dev" : mode === "beta" ? "app-beta" : "app");
|
|
45431
|
+
};
|
|
45421
45432
|
/**
|
|
45422
45433
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
45423
45434
|
*/
|
|
@@ -49184,6 +49195,74 @@ var WebSocketServer = class {
|
|
|
49184
49195
|
};
|
|
49185
49196
|
const webSocketServer = new WebSocketServer();
|
|
49186
49197
|
//#endregion
|
|
49198
|
+
//#region ../../node_modules/slash/index.js
|
|
49199
|
+
var require_slash = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
49200
|
+
module.exports = (path) => {
|
|
49201
|
+
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
|
|
49202
|
+
const hasNonAscii = /[^\u0000-\u0080]+/.test(path);
|
|
49203
|
+
if (isExtendedLengthPath || hasNonAscii) return path;
|
|
49204
|
+
return path.replace(/\\/g, "/");
|
|
49205
|
+
};
|
|
49206
|
+
}));
|
|
49207
|
+
//#endregion
|
|
49208
|
+
//#region ../../packages/core-node/src/fs-utils.ts
|
|
49209
|
+
var import_slash = /* @__PURE__ */ require_chunk.__toESM(require_slash(), 1);
|
|
49210
|
+
function removeTrailingSlash(path) {
|
|
49211
|
+
return path.replace(/[\\/]+$/, "");
|
|
49212
|
+
}
|
|
49213
|
+
removeTrailingSlash((0, import_slash.default)((0, node_path.resolve)((0, node_os.homedir)()))).toLowerCase();
|
|
49214
|
+
const additionalProtectedPaths = [
|
|
49215
|
+
getDefaultUserDataPath("dev"),
|
|
49216
|
+
getDefaultUserDataPath("beta"),
|
|
49217
|
+
getDefaultUserDataPath("prod"),
|
|
49218
|
+
projectRoot,
|
|
49219
|
+
process.cwd(),
|
|
49220
|
+
"/tmp",
|
|
49221
|
+
"/var/tmp",
|
|
49222
|
+
process.env.TEMP,
|
|
49223
|
+
process.env.TMP,
|
|
49224
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData"),
|
|
49225
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData", "Local"),
|
|
49226
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData", "Roaming"),
|
|
49227
|
+
(0, node_path.join)((0, node_os.homedir)(), "Library"),
|
|
49228
|
+
(0, node_path.join)((0, node_os.homedir)(), "Library", "Application Support"),
|
|
49229
|
+
(0, node_path.join)((0, node_os.homedir)(), ".config"),
|
|
49230
|
+
(0, node_path.join)((0, node_os.homedir)(), ".local"),
|
|
49231
|
+
(0, node_path.join)((0, node_os.homedir)(), ".local", "share"),
|
|
49232
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cache"),
|
|
49233
|
+
(0, node_path.join)((0, node_os.homedir)(), "OneDrive"),
|
|
49234
|
+
(0, node_path.join)((0, node_os.homedir)(), "Dropbox"),
|
|
49235
|
+
(0, node_path.join)((0, node_os.homedir)(), ".ssh"),
|
|
49236
|
+
(0, node_path.join)((0, node_os.homedir)(), ".gnupg"),
|
|
49237
|
+
(0, node_path.join)((0, node_os.homedir)(), ".aws"),
|
|
49238
|
+
(0, node_path.join)((0, node_os.homedir)(), ".docker"),
|
|
49239
|
+
(0, node_path.join)((0, node_os.homedir)(), ".kube"),
|
|
49240
|
+
(0, node_path.join)((0, node_os.homedir)(), ".vscode"),
|
|
49241
|
+
(0, node_path.join)((0, node_os.homedir)(), ".vscode-insiders"),
|
|
49242
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cursor"),
|
|
49243
|
+
(0, node_path.join)((0, node_os.homedir)(), ".npm"),
|
|
49244
|
+
(0, node_path.join)((0, node_os.homedir)(), ".pnpm-state"),
|
|
49245
|
+
(0, node_path.join)((0, node_os.homedir)(), ".yarn"),
|
|
49246
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cargo"),
|
|
49247
|
+
(0, node_path.join)((0, node_os.homedir)(), ".rustup"),
|
|
49248
|
+
(0, node_path.join)((0, node_os.homedir)(), ".m2"),
|
|
49249
|
+
(0, node_path.join)((0, node_os.homedir)(), ".gradle")
|
|
49250
|
+
].filter((p) => typeof p === "string" && p.length > 0);
|
|
49251
|
+
new Set([
|
|
49252
|
+
(0, node_path.join)((0, node_os.homedir)(), "Downloads"),
|
|
49253
|
+
(0, node_path.join)((0, node_os.homedir)(), "Documents"),
|
|
49254
|
+
(0, node_path.join)((0, node_os.homedir)(), "Desktop"),
|
|
49255
|
+
(0, node_path.join)((0, node_os.homedir)(), "Pictures"),
|
|
49256
|
+
(0, node_path.join)((0, node_os.homedir)(), "Music"),
|
|
49257
|
+
(0, node_path.join)((0, node_os.homedir)(), "Videos"),
|
|
49258
|
+
(0, node_path.join)((0, node_os.homedir)(), "Saved Games"),
|
|
49259
|
+
(0, node_path.join)((0, node_os.homedir)(), "Contacts"),
|
|
49260
|
+
(0, node_path.join)((0, node_os.homedir)(), "Searches"),
|
|
49261
|
+
(0, node_path.join)((0, node_os.homedir)(), "Links"),
|
|
49262
|
+
(0, node_path.join)((0, node_os.homedir)(), "3D Objects"),
|
|
49263
|
+
...additionalProtectedPaths
|
|
49264
|
+
].map((p) => removeTrailingSlash((0, import_slash.default)((0, node_path.resolve)(p))).toLowerCase()));
|
|
49265
|
+
//#endregion
|
|
49187
49266
|
//#region ../../node_modules/is-plain-obj/index.js
|
|
49188
49267
|
function isPlainObject(value) {
|
|
49189
49268
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -59577,13 +59656,13 @@ var require_opts_arg = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
59577
59656
|
//#region ../../node_modules/mkdirp/lib/path-arg.js
|
|
59578
59657
|
var require_path_arg = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
59579
59658
|
const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
59580
|
-
const { resolve: resolve$
|
|
59659
|
+
const { resolve: resolve$14, parse: parse$2 } = require("path");
|
|
59581
59660
|
const pathArg = (path$84) => {
|
|
59582
59661
|
if (/\0/.test(path$84)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
59583
59662
|
path: path$84,
|
|
59584
59663
|
code: "ERR_INVALID_ARG_VALUE"
|
|
59585
59664
|
});
|
|
59586
|
-
path$84 = resolve$
|
|
59665
|
+
path$84 = resolve$14(path$84);
|
|
59587
59666
|
if (platform === "win32") {
|
|
59588
59667
|
const badWinChars = /[*|"<>?:]/;
|
|
59589
59668
|
const { root } = parse$2(path$84);
|
|
@@ -60001,14 +60080,14 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
60001
60080
|
const assert$1 = require("assert");
|
|
60002
60081
|
const normalize = require_normalize_unicode();
|
|
60003
60082
|
const stripSlashes = require_strip_trailing_slashes();
|
|
60004
|
-
const { join: join$
|
|
60083
|
+
const { join: join$20 } = require("path");
|
|
60005
60084
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
60006
60085
|
module.exports = () => {
|
|
60007
60086
|
const queues = /* @__PURE__ */ new Map();
|
|
60008
60087
|
const reservations = /* @__PURE__ */ new Map();
|
|
60009
60088
|
const getDirs = (path$61) => {
|
|
60010
60089
|
return path$61.split("/").slice(0, -1).reduce((set, path$62) => {
|
|
60011
|
-
if (set.length) path$62 = join$
|
|
60090
|
+
if (set.length) path$62 = join$20(set[set.length - 1], path$62);
|
|
60012
60091
|
set.push(path$62 || "/");
|
|
60013
60092
|
return set;
|
|
60014
60093
|
}, []);
|
|
@@ -60062,7 +60141,7 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
60062
60141
|
};
|
|
60063
60142
|
const reserve = (paths, fn) => {
|
|
60064
60143
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
60065
|
-
return stripSlashes(join$
|
|
60144
|
+
return stripSlashes(join$20(normalize(p))).toLowerCase();
|
|
60066
60145
|
});
|
|
60067
60146
|
const dirs = new Set(paths.map((path$66) => getDirs(path$66)).reduce((a, b) => a.concat(b)));
|
|
60068
60147
|
reservations.set(fn, {
|
|
@@ -62628,7 +62707,7 @@ var require_readdir_glob = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
62628
62707
|
const fs$22 = require("fs");
|
|
62629
62708
|
const { EventEmitter } = require("events");
|
|
62630
62709
|
const { Minimatch } = require_minimatch$1();
|
|
62631
|
-
const { resolve: resolve$
|
|
62710
|
+
const { resolve: resolve$13 } = require("path");
|
|
62632
62711
|
function readdir(dir, strict) {
|
|
62633
62712
|
return new Promise((resolve, reject) => {
|
|
62634
62713
|
fs$22.readdir(dir, { withFileTypes: true }, (err, files) => {
|
|
@@ -62737,7 +62816,7 @@ var require_readdir_glob = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
62737
62816
|
if (this.options.ignore) this.ignoreMatchers = (Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore]).map((ignore) => new Minimatch(ignore, { dot: true }));
|
|
62738
62817
|
this.skipMatchers = [];
|
|
62739
62818
|
if (this.options.skip) this.skipMatchers = (Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]).map((skip) => new Minimatch(skip, { dot: true }));
|
|
62740
|
-
this.iterator = explore(resolve$
|
|
62819
|
+
this.iterator = explore(resolve$13(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
|
|
62741
62820
|
this.paused = false;
|
|
62742
62821
|
this.inactive = false;
|
|
62743
62822
|
this.aborted = false;
|
|
@@ -95899,7 +95978,7 @@ var require_index_min$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
95899
95978
|
//#region ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
|
|
95900
95979
|
var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
95901
95980
|
const { isexe, sync: isexeSync } = require_index_min$3();
|
|
95902
|
-
const { join: join$
|
|
95981
|
+
const { join: join$17, delimiter: delimiter$4, sep: sep$4, posix: posix$1 } = require("path");
|
|
95903
95982
|
const isWindows = process.platform === "win32";
|
|
95904
95983
|
/* istanbul ignore next */
|
|
95905
95984
|
const rSlash = new RegExp(`[${posix$1.sep}${sep$4 === posix$1.sep ? "" : sep$4}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -95929,7 +96008,7 @@ var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
95929
96008
|
};
|
|
95930
96009
|
const getPathPart = (raw, cmd) => {
|
|
95931
96010
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
95932
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
96011
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$17(pathPart, cmd);
|
|
95933
96012
|
};
|
|
95934
96013
|
const which = async (cmd, opt = {}) => {
|
|
95935
96014
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -96678,7 +96757,7 @@ var require_index_min$2 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
96678
96757
|
//#region ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
|
|
96679
96758
|
var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
96680
96759
|
const { isexe, sync: isexeSync } = require_index_min$2();
|
|
96681
|
-
const { join: join$
|
|
96760
|
+
const { join: join$16, delimiter: delimiter$3, sep: sep$3, posix } = require("path");
|
|
96682
96761
|
const isWindows = process.platform === "win32";
|
|
96683
96762
|
/* istanbul ignore next */
|
|
96684
96763
|
const rSlash = new RegExp(`[${posix.sep}${sep$3 === posix.sep ? "" : sep$3}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -96708,7 +96787,7 @@ var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
96708
96787
|
};
|
|
96709
96788
|
const getPathPart = (raw, cmd) => {
|
|
96710
96789
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
96711
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
96790
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$16(pathPart, cmd);
|
|
96712
96791
|
};
|
|
96713
96792
|
const which = async (cmd, opt = {}) => {
|
|
96714
96793
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -98606,7 +98685,7 @@ var require_lib$22 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98606
98685
|
//#endregion
|
|
98607
98686
|
//#region ../../node_modules/npm-normalize-package-bin/lib/index.js
|
|
98608
98687
|
var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98609
|
-
const { join: join$
|
|
98688
|
+
const { join: join$15, basename: basename$4 } = require("path");
|
|
98610
98689
|
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);
|
|
98611
98690
|
const normalizeString = (pkg) => {
|
|
98612
98691
|
if (!pkg.name) return removeBin(pkg);
|
|
@@ -98629,9 +98708,9 @@ var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98629
98708
|
const clean = {};
|
|
98630
98709
|
let hasBins = false;
|
|
98631
98710
|
Object.keys(orig).forEach((binKey) => {
|
|
98632
|
-
const base = join$
|
|
98711
|
+
const base = join$15("/", basename$4(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
98633
98712
|
if (typeof orig[binKey] !== "string" || !base) return;
|
|
98634
|
-
const binTarget = join$
|
|
98713
|
+
const binTarget = join$15("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
98635
98714
|
if (!binTarget) return;
|
|
98636
98715
|
clean[base] = binTarget;
|
|
98637
98716
|
hasBins = true;
|
|
@@ -98897,8 +98976,8 @@ var require_clone = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
98897
98976
|
//#endregion
|
|
98898
98977
|
//#region ../../node_modules/@npmcli/git/lib/is.js
|
|
98899
98978
|
var require_is = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98900
|
-
const { stat: stat$
|
|
98901
|
-
module.exports = ({ cwd = process.cwd() } = {}) => stat$
|
|
98979
|
+
const { stat: stat$7 } = require("fs/promises");
|
|
98980
|
+
module.exports = ({ cwd = process.cwd() } = {}) => stat$7(cwd + "/.git").then(() => true, () => false);
|
|
98902
98981
|
}));
|
|
98903
98982
|
//#endregion
|
|
98904
98983
|
//#region ../../node_modules/@npmcli/git/lib/find.js
|
|
@@ -99432,8 +99511,8 @@ var require_sort$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99432
99511
|
//#endregion
|
|
99433
99512
|
//#region ../../node_modules/@npmcli/package-json/lib/index.js
|
|
99434
99513
|
var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
99435
|
-
const { readFile: readFile$8, writeFile: writeFile$
|
|
99436
|
-
const { resolve: resolve$
|
|
99514
|
+
const { readFile: readFile$8, writeFile: writeFile$4 } = require("node:fs/promises");
|
|
99515
|
+
const { resolve: resolve$12 } = require("node:path");
|
|
99437
99516
|
const parseJSON = require_lib$30();
|
|
99438
99517
|
const updateDeps = require_update_dependencies();
|
|
99439
99518
|
const updateScripts = require_update_scripts();
|
|
@@ -99536,7 +99615,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99536
99615
|
parseErr = err;
|
|
99537
99616
|
}
|
|
99538
99617
|
if (parseErr) {
|
|
99539
|
-
const indexFile = resolve$
|
|
99618
|
+
const indexFile = resolve$12(this.path, "index.js");
|
|
99540
99619
|
let indexFileContent;
|
|
99541
99620
|
try {
|
|
99542
99621
|
indexFileContent = await readFile$8(indexFile, "utf8");
|
|
@@ -99581,7 +99660,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99581
99660
|
return this.#path;
|
|
99582
99661
|
}
|
|
99583
99662
|
get filename() {
|
|
99584
|
-
if (this.path) return resolve$
|
|
99663
|
+
if (this.path) return resolve$12(this.path, "package.json");
|
|
99585
99664
|
}
|
|
99586
99665
|
create(path) {
|
|
99587
99666
|
this.#path = path;
|
|
@@ -99605,7 +99684,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99605
99684
|
const content = sort ? packageSort(rest) : rest;
|
|
99606
99685
|
const fileContent = `${JSON.stringify(content, null, format)}\n`.replace(/\n/g, eol);
|
|
99607
99686
|
if (fileContent.trim() !== this.#readFileContent.trim()) {
|
|
99608
|
-
const written = await writeFile$
|
|
99687
|
+
const written = await writeFile$4(this.filename, fileContent);
|
|
99609
99688
|
this.#readFileContent = fileContent;
|
|
99610
99689
|
return written;
|
|
99611
99690
|
}
|
|
@@ -100703,8 +100782,8 @@ var require_errors$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100703
100782
|
var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100704
100783
|
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();
|
|
100705
100784
|
const { constants: { errno: { EEXIST, EISDIR, EINVAL, ENOTDIR } } } = require("os");
|
|
100706
|
-
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$
|
|
100707
|
-
const { dirname: dirname$10, isAbsolute: isAbsolute$2, join: join$
|
|
100785
|
+
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$9, readdir: readdir$7, readlink, stat: stat$6, symlink, unlink, utimes } = require("fs/promises");
|
|
100786
|
+
const { dirname: dirname$10, isAbsolute: isAbsolute$2, join: join$14, parse, resolve: resolve$11, sep: sep$2, toNamespacedPath } = require("path");
|
|
100708
100787
|
const { fileURLToPath } = require("url");
|
|
100709
100788
|
const defaultOptions = {
|
|
100710
100789
|
dereference: false,
|
|
@@ -100769,7 +100848,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100769
100848
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
100770
100849
|
}
|
|
100771
100850
|
function getStats(src, dest, opts) {
|
|
100772
|
-
const statFunc = opts.dereference ? (file) => stat$
|
|
100851
|
+
const statFunc = opts.dereference ? (file) => stat$6(file, { bigint: true }) : (file) => lstat$2(file, { bigint: true });
|
|
100773
100852
|
return Promise.all([statFunc(src), statFunc(dest).catch((err) => {
|
|
100774
100853
|
// istanbul ignore next: unsure how to cover.
|
|
100775
100854
|
if (err.code === "ENOENT") return null;
|
|
@@ -100780,23 +100859,23 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100780
100859
|
async function checkParentDir(destStat, src, dest, opts) {
|
|
100781
100860
|
const destParent = dirname$10(dest);
|
|
100782
100861
|
if (await pathExists(destParent)) return getStatsForCopy(destStat, src, dest, opts);
|
|
100783
|
-
await mkdir$
|
|
100862
|
+
await mkdir$9(destParent, { recursive: true });
|
|
100784
100863
|
return getStatsForCopy(destStat, src, dest, opts);
|
|
100785
100864
|
}
|
|
100786
100865
|
function pathExists(dest) {
|
|
100787
|
-
return stat$
|
|
100866
|
+
return stat$6(dest).then(
|
|
100788
100867
|
() => true,
|
|
100789
100868
|
// istanbul ignore next: not sure when this would occur
|
|
100790
100869
|
(err) => err.code === "ENOENT" ? false : Promise.reject(err)
|
|
100791
100870
|
);
|
|
100792
100871
|
}
|
|
100793
100872
|
async function checkParentPaths(src, srcStat, dest) {
|
|
100794
|
-
const srcParent = resolve$
|
|
100795
|
-
const destParent = resolve$
|
|
100873
|
+
const srcParent = resolve$11(dirname$10(src));
|
|
100874
|
+
const destParent = resolve$11(dirname$10(dest));
|
|
100796
100875
|
if (destParent === srcParent || destParent === parse(destParent).root) return;
|
|
100797
100876
|
let destStat;
|
|
100798
100877
|
try {
|
|
100799
|
-
destStat = await stat$
|
|
100878
|
+
destStat = await stat$6(destParent, { bigint: true });
|
|
100800
100879
|
} catch (err) {
|
|
100801
100880
|
// istanbul ignore else: not sure when this would occur
|
|
100802
100881
|
if (err.code === "ENOENT") return;
|
|
@@ -100811,7 +100890,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100811
100890
|
});
|
|
100812
100891
|
return checkParentPaths(src, srcStat, destParent);
|
|
100813
100892
|
}
|
|
100814
|
-
const normalizePathToArray = (path$54) => resolve$
|
|
100893
|
+
const normalizePathToArray = (path$54) => resolve$11(path$54).split(sep$2).filter(Boolean);
|
|
100815
100894
|
function isSrcSubdir(src, dest) {
|
|
100816
100895
|
const srcArr = normalizePathToArray(src);
|
|
100817
100896
|
const destArr = normalizePathToArray(dest);
|
|
@@ -100825,7 +100904,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100825
100904
|
return getStatsForCopy(destStat, src, dest, opts);
|
|
100826
100905
|
}
|
|
100827
100906
|
async function getStatsForCopy(destStat, src, dest, opts) {
|
|
100828
|
-
const srcStat = await (opts.dereference ? stat$
|
|
100907
|
+
const srcStat = await (opts.dereference ? stat$6 : lstat$2)(src);
|
|
100829
100908
|
// istanbul ignore else: can't portably test FIFO
|
|
100830
100909
|
if (srcStat.isDirectory() && opts.recursive) return onDir(srcStat, destStat, src, dest, opts);
|
|
100831
100910
|
else if (srcStat.isDirectory()) throw new ERR_FS_EISDIR({
|
|
@@ -100897,7 +100976,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100897
100976
|
return chmod$2(dest, srcMode);
|
|
100898
100977
|
}
|
|
100899
100978
|
async function setDestTimestamps(src, dest) {
|
|
100900
|
-
const updatedSrcStat = await stat$
|
|
100979
|
+
const updatedSrcStat = await stat$6(src);
|
|
100901
100980
|
return utimes(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
100902
100981
|
}
|
|
100903
100982
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -100905,23 +100984,23 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100905
100984
|
return copyDir(src, dest, opts);
|
|
100906
100985
|
}
|
|
100907
100986
|
async function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
100908
|
-
await mkdir$
|
|
100987
|
+
await mkdir$9(dest);
|
|
100909
100988
|
await copyDir(src, dest, opts);
|
|
100910
100989
|
return setDestMode(dest, srcMode);
|
|
100911
100990
|
}
|
|
100912
100991
|
async function copyDir(src, dest, opts) {
|
|
100913
|
-
const dir = await readdir$
|
|
100992
|
+
const dir = await readdir$7(src);
|
|
100914
100993
|
for (let i = 0; i < dir.length; i++) {
|
|
100915
100994
|
const item = dir[i];
|
|
100916
|
-
const srcItem = join$
|
|
100917
|
-
const destItem = join$
|
|
100995
|
+
const srcItem = join$14(src, item);
|
|
100996
|
+
const destItem = join$14(dest, item);
|
|
100918
100997
|
const { destStat } = await checkPaths(srcItem, destItem, opts);
|
|
100919
100998
|
await startCopy(destStat, srcItem, destItem, opts);
|
|
100920
100999
|
}
|
|
100921
101000
|
}
|
|
100922
101001
|
async function onLink(destStat, src, dest) {
|
|
100923
101002
|
let resolvedSrc = await readlink(src);
|
|
100924
|
-
if (!isAbsolute$2(resolvedSrc)) resolvedSrc = resolve$
|
|
101003
|
+
if (!isAbsolute$2(resolvedSrc)) resolvedSrc = resolve$11(dirname$10(src), resolvedSrc);
|
|
100925
101004
|
if (!destStat) return symlink(resolvedSrc, dest);
|
|
100926
101005
|
let resolvedDest;
|
|
100927
101006
|
try {
|
|
@@ -100932,14 +101011,14 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100932
101011
|
// istanbul ignore next: should not be possible
|
|
100933
101012
|
throw err;
|
|
100934
101013
|
}
|
|
100935
|
-
if (!isAbsolute$2(resolvedDest)) resolvedDest = resolve$
|
|
101014
|
+
if (!isAbsolute$2(resolvedDest)) resolvedDest = resolve$11(dirname$10(dest), resolvedDest);
|
|
100936
101015
|
if (isSrcSubdir(resolvedSrc, resolvedDest)) throw new ERR_FS_CP_EINVAL({
|
|
100937
101016
|
message: `cannot copy ${resolvedSrc} to a subdirectory of self ${resolvedDest}`,
|
|
100938
101017
|
path: dest,
|
|
100939
101018
|
syscall: "cp",
|
|
100940
101019
|
errno: EINVAL
|
|
100941
101020
|
});
|
|
100942
|
-
if ((await stat$
|
|
101021
|
+
if ((await stat$6(src)).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) throw new ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY({
|
|
100943
101022
|
message: `cannot overwrite ${resolvedDest} with ${resolvedSrc}`,
|
|
100944
101023
|
path: dest,
|
|
100945
101024
|
syscall: "cp",
|
|
@@ -100978,13 +101057,13 @@ var require_cp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
100978
101057
|
//#endregion
|
|
100979
101058
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/with-temp-dir.js
|
|
100980
101059
|
var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100981
|
-
const { join: join$
|
|
101060
|
+
const { join: join$13, sep: sep$1 } = require("path");
|
|
100982
101061
|
const getOptions = require_get_options();
|
|
100983
|
-
const { mkdir: mkdir$
|
|
101062
|
+
const { mkdir: mkdir$8, mkdtemp, rm: rm$8 } = require("fs/promises");
|
|
100984
101063
|
const withTempDir = async (root, fn, opts) => {
|
|
100985
101064
|
const options = getOptions(opts, { copy: ["tmpPrefix"] });
|
|
100986
|
-
await mkdir$
|
|
100987
|
-
const target = await mkdtemp(join$
|
|
101065
|
+
await mkdir$8(root, { recursive: true });
|
|
101066
|
+
const target = await mkdtemp(join$13(`${root}${sep$1}`, options.tmpPrefix || ""));
|
|
100988
101067
|
let err;
|
|
100989
101068
|
let result;
|
|
100990
101069
|
try {
|
|
@@ -101006,11 +101085,11 @@ var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
101006
101085
|
//#endregion
|
|
101007
101086
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/readdir-scoped.js
|
|
101008
101087
|
var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
101009
|
-
const { readdir: readdir$
|
|
101010
|
-
const { join: join$
|
|
101088
|
+
const { readdir: readdir$6 } = require("fs/promises");
|
|
101089
|
+
const { join: join$12 } = require("path");
|
|
101011
101090
|
const readdirScoped = async (dir) => {
|
|
101012
101091
|
const results = [];
|
|
101013
|
-
for (const item of await readdir$
|
|
101092
|
+
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));
|
|
101014
101093
|
else results.push(item);
|
|
101015
101094
|
return results;
|
|
101016
101095
|
};
|
|
@@ -101019,7 +101098,7 @@ var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
101019
101098
|
//#endregion
|
|
101020
101099
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/move-file.js
|
|
101021
101100
|
var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
101022
|
-
const { dirname: dirname$9, join: join$
|
|
101101
|
+
const { dirname: dirname$9, join: join$11, resolve: resolve$10, relative: relative$1, isAbsolute: isAbsolute$1 } = require("path");
|
|
101023
101102
|
const fs$13 = require("fs/promises");
|
|
101024
101103
|
const pathExists = async (path$53) => {
|
|
101025
101104
|
try {
|
|
@@ -101044,7 +101123,7 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
101044
101123
|
const sourceStat = await fs$13.lstat(source);
|
|
101045
101124
|
if (sourceStat.isDirectory()) {
|
|
101046
101125
|
const files = await fs$13.readdir(source);
|
|
101047
|
-
await Promise.all(files.map((file) => moveFile(join$
|
|
101126
|
+
await Promise.all(files.map((file) => moveFile(join$11(source, file), join$11(destination, file), options, false, symlinks)));
|
|
101048
101127
|
} else if (sourceStat.isSymbolicLink()) symlinks.push({
|
|
101049
101128
|
source,
|
|
101050
101129
|
destination
|
|
@@ -101055,10 +101134,10 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
101055
101134
|
if (root) {
|
|
101056
101135
|
await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
|
|
101057
101136
|
let target = await fs$13.readlink(symSource);
|
|
101058
|
-
if (isAbsolute$1(target)) target = resolve$
|
|
101137
|
+
if (isAbsolute$1(target)) target = resolve$10(symDestination, relative$1(symSource, target));
|
|
101059
101138
|
let targetStat = "file";
|
|
101060
101139
|
try {
|
|
101061
|
-
targetStat = await fs$13.stat(resolve$
|
|
101140
|
+
targetStat = await fs$13.stat(resolve$10(dirname$9(symSource), target));
|
|
101062
101141
|
if (targetStat.isDirectory()) targetStat = "junction";
|
|
101063
101142
|
} catch {}
|
|
101064
101143
|
await fs$13.symlink(target, symDestination, targetStat);
|
|
@@ -101220,7 +101299,7 @@ var require_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
101220
101299
|
//#region ../../node_modules/cacache/lib/entry-index.js
|
|
101221
101300
|
var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
101222
101301
|
const crypto$1 = require("crypto");
|
|
101223
|
-
const { appendFile, mkdir: mkdir$
|
|
101302
|
+
const { appendFile, mkdir: mkdir$7, readFile: readFile$7, readdir: readdir$5, rm: rm$7, writeFile: writeFile$3 } = require("fs/promises");
|
|
101224
101303
|
const { Minipass } = require_commonjs$10();
|
|
101225
101304
|
const path$14 = require("path");
|
|
101226
101305
|
const ssri = require_lib$17();
|
|
@@ -101254,7 +101333,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101254
101333
|
}).join("\n");
|
|
101255
101334
|
const setup = async () => {
|
|
101256
101335
|
const target = tmpName(cache, opts.tmpPrefix);
|
|
101257
|
-
await mkdir$
|
|
101336
|
+
await mkdir$7(path$14.dirname(target), { recursive: true });
|
|
101258
101337
|
return {
|
|
101259
101338
|
target,
|
|
101260
101339
|
moved: false
|
|
@@ -101267,8 +101346,8 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101267
101346
|
});
|
|
101268
101347
|
};
|
|
101269
101348
|
const write = async (tmp) => {
|
|
101270
|
-
await writeFile$
|
|
101271
|
-
await mkdir$
|
|
101349
|
+
await writeFile$3(tmp.target, newIndex, { flag: "wx" });
|
|
101350
|
+
await mkdir$7(path$14.dirname(bucket), { recursive: true });
|
|
101272
101351
|
await moveFile(tmp.target, bucket);
|
|
101273
101352
|
tmp.moved = true;
|
|
101274
101353
|
};
|
|
@@ -101292,7 +101371,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101292
101371
|
metadata
|
|
101293
101372
|
};
|
|
101294
101373
|
try {
|
|
101295
|
-
await mkdir$
|
|
101374
|
+
await mkdir$7(path$14.dirname(bucket), { recursive: true });
|
|
101296
101375
|
const stringified = JSON.stringify(entry);
|
|
101297
101376
|
await appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`);
|
|
101298
101377
|
} catch (err) {
|
|
@@ -101413,7 +101492,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101413
101492
|
};
|
|
101414
101493
|
}
|
|
101415
101494
|
function readdirOrEmpty(dir) {
|
|
101416
|
-
return readdir$
|
|
101495
|
+
return readdir$5(dir).catch((err) => {
|
|
101417
101496
|
if (err.code === "ENOENT" || err.code === "ENOTDIR") return [];
|
|
101418
101497
|
throw err;
|
|
101419
101498
|
});
|
|
@@ -106135,7 +106214,7 @@ var require_rm = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
106135
106214
|
//#endregion
|
|
106136
106215
|
//#region ../../node_modules/cacache/lib/verify.js
|
|
106137
106216
|
var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
106138
|
-
const { mkdir: mkdir$
|
|
106217
|
+
const { mkdir: mkdir$6, readFile: readFile$6, rm: rm$5, stat: stat$5, truncate, writeFile: writeFile$2 } = require("fs/promises");
|
|
106139
106218
|
const contentPath = require_path();
|
|
106140
106219
|
const fsm = require_lib$15();
|
|
106141
106220
|
const glob = require_glob();
|
|
@@ -106185,7 +106264,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106185
106264
|
}
|
|
106186
106265
|
async function fixPerms(cache, opts) {
|
|
106187
106266
|
opts.log.silly("verify", "fixing cache permissions");
|
|
106188
|
-
await mkdir$
|
|
106267
|
+
await mkdir$6(cache, { recursive: true });
|
|
106189
106268
|
return null;
|
|
106190
106269
|
}
|
|
106191
106270
|
async function garbageCollect(cache, opts) {
|
|
@@ -106231,7 +106310,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106231
106310
|
}
|
|
106232
106311
|
} else {
|
|
106233
106312
|
stats.reclaimedCount++;
|
|
106234
|
-
const s = await stat$
|
|
106313
|
+
const s = await stat$5(f);
|
|
106235
106314
|
await rm$5(f, {
|
|
106236
106315
|
recursive: true,
|
|
106237
106316
|
force: true
|
|
@@ -106245,7 +106324,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106245
106324
|
async function verifyContent(filepath, sri) {
|
|
106246
106325
|
const contentInfo = {};
|
|
106247
106326
|
try {
|
|
106248
|
-
const { size } = await stat$
|
|
106327
|
+
const { size } = await stat$5(filepath);
|
|
106249
106328
|
contentInfo.size = size;
|
|
106250
106329
|
contentInfo.valid = true;
|
|
106251
106330
|
await ssri.checkStream(new fsm.ReadStream(filepath), sri);
|
|
@@ -106299,7 +106378,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106299
106378
|
for (const entry of bucket) {
|
|
106300
106379
|
const content = contentPath(cache, entry.integrity);
|
|
106301
106380
|
try {
|
|
106302
|
-
await stat$
|
|
106381
|
+
await stat$5(content);
|
|
106303
106382
|
await index.insert(cache, entry.key, entry.integrity, {
|
|
106304
106383
|
metadata: entry.metadata,
|
|
106305
106384
|
size: entry.size,
|
|
@@ -106324,7 +106403,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106324
106403
|
async function writeVerifile(cache, opts) {
|
|
106325
106404
|
const verifile = path$10.join(cache, "_lastverified");
|
|
106326
106405
|
opts.log.silly("verify", "writing verifile to " + verifile);
|
|
106327
|
-
return writeFile$
|
|
106406
|
+
return writeFile$2(verifile, `${Date.now()}`);
|
|
106328
106407
|
}
|
|
106329
106408
|
module.exports.lastRun = lastRun;
|
|
106330
106409
|
async function lastRun(cache) {
|
|
@@ -106874,8 +106953,8 @@ var require_lib$12 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106874
106953
|
//#region ../../node_modules/@npmcli/installed-package-contents/lib/index.js
|
|
106875
106954
|
var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
106876
106955
|
const bundled = require_lib$12();
|
|
106877
|
-
const { readFile: readFile$5, readdir: readdir$
|
|
106878
|
-
const { resolve: resolve$
|
|
106956
|
+
const { readFile: readFile$5, readdir: readdir$4, stat: stat$4 } = require("fs/promises");
|
|
106957
|
+
const { resolve: resolve$9, basename: basename$3, dirname: dirname$8 } = require("path");
|
|
106879
106958
|
const normalizePackageBin = require_lib$21();
|
|
106880
106959
|
const readPackage = ({ path: path$48, packageJsonCache }) => packageJsonCache.has(path$48) ? Promise.resolve(packageJsonCache.get(path$48)) : readFile$5(path$48).then((json) => {
|
|
106881
106960
|
const pkg = normalizePackageBin(JSON.parse(json));
|
|
@@ -106919,17 +106998,17 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106919
106998
|
const nm = /^@.+/.test(scope) ? dirname$8(dir) : dir;
|
|
106920
106999
|
const binFiles = [];
|
|
106921
107000
|
Object.keys(pkg.bin).forEach((b) => {
|
|
106922
|
-
const base = resolve$
|
|
107001
|
+
const base = resolve$9(nm, ".bin", b);
|
|
106923
107002
|
binFiles.push(base, base + ".cmd", base + ".ps1");
|
|
106924
107003
|
});
|
|
106925
|
-
(await Promise.all(binFiles.map((b) => stat$
|
|
107004
|
+
(await Promise.all(binFiles.map((b) => stat$4(b).then(() => b).catch(() => null)))).filter((b) => b).forEach((b) => result.add(b));
|
|
106926
107005
|
}
|
|
106927
107006
|
}
|
|
106928
107007
|
if (currentDepth >= depth) {
|
|
106929
107008
|
result.add(path$50);
|
|
106930
107009
|
return result;
|
|
106931
107010
|
}
|
|
106932
|
-
const [dirEntries, bundleDeps] = await Promise.all([readdir$
|
|
107011
|
+
const [dirEntries, bundleDeps] = await Promise.all([readdir$4(path$50, { withFileTypes: true }), currentDepth === 0 && pkg && pkg.bundleDependencies ? bundled({
|
|
106933
107012
|
path: path$50,
|
|
106934
107013
|
packageJsonCache
|
|
106935
107014
|
}) : null]).catch(() => []);
|
|
@@ -106940,7 +107019,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106940
107019
|
}
|
|
106941
107020
|
const recursePromises = [];
|
|
106942
107021
|
for (const entry of dirEntries) {
|
|
106943
|
-
const p = resolve$
|
|
107022
|
+
const p = resolve$9(path$50, entry.name);
|
|
106944
107023
|
if (entry.isDirectory() === false) {
|
|
106945
107024
|
result.add(p);
|
|
106946
107025
|
continue;
|
|
@@ -106959,7 +107038,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106959
107038
|
}
|
|
106960
107039
|
if (bundleDeps) recursePromises.push(...bundleDeps.map((dep) => {
|
|
106961
107040
|
return pkgContents({
|
|
106962
|
-
path: resolve$
|
|
107041
|
+
path: resolve$9(path$50, "node_modules", dep),
|
|
106963
107042
|
packageJsonCache,
|
|
106964
107043
|
pkg: true,
|
|
106965
107044
|
depth,
|
|
@@ -106971,7 +107050,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106971
107050
|
return result;
|
|
106972
107051
|
};
|
|
106973
107052
|
module.exports = ({ path: path$51, ...opts }) => pkgContents({
|
|
106974
|
-
path: resolve$
|
|
107053
|
+
path: resolve$9(path$51),
|
|
106975
107054
|
...opts,
|
|
106976
107055
|
pkg: true
|
|
106977
107056
|
}).then((results) => [...results]);
|
|
@@ -110582,18 +110661,18 @@ var require_protected = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
110582
110661
|
//#endregion
|
|
110583
110662
|
//#region ../../node_modules/pacote/lib/util/cache-dir.js
|
|
110584
110663
|
var require_cache_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
110585
|
-
const { resolve: resolve$
|
|
110664
|
+
const { resolve: resolve$8 } = require("node:path");
|
|
110586
110665
|
const { tmpdir, homedir: homedir$1 } = require("node:os");
|
|
110587
110666
|
module.exports = (fakePlatform = false) => {
|
|
110588
110667
|
const temp = tmpdir();
|
|
110589
110668
|
const uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
110590
|
-
const home = homedir$1() || resolve$
|
|
110669
|
+
const home = homedir$1() || resolve$8(temp, "npm-" + uidOrPid);
|
|
110591
110670
|
const platform = fakePlatform || process.platform;
|
|
110592
110671
|
const cacheExtra = platform === "win32" ? "npm-cache" : ".npm";
|
|
110593
110672
|
const cacheRoot = platform === "win32" && process.env.LOCALAPPDATA || home;
|
|
110594
110673
|
return {
|
|
110595
|
-
cacache: resolve$
|
|
110596
|
-
tufcache: resolve$
|
|
110674
|
+
cacache: resolve$8(cacheRoot, cacheExtra, "_cacache"),
|
|
110675
|
+
tufcache: resolve$8(cacheRoot, cacheExtra, "_tuf")
|
|
110597
110676
|
};
|
|
110598
110677
|
};
|
|
110599
110678
|
}));
|
|
@@ -112407,7 +112486,7 @@ var require_lib$10 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112407
112486
|
var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112408
112487
|
const { Walker: IgnoreWalker } = require_lib$10();
|
|
112409
112488
|
const { lstatSync: lstat$1, readFileSync: readFile$4 } = require("fs");
|
|
112410
|
-
const { basename: basename$2, dirname: dirname$7, extname: extname$1, join: join$
|
|
112489
|
+
const { basename: basename$2, dirname: dirname$7, extname: extname$1, join: join$10, relative, resolve: resolve$7, sep } = require("path");
|
|
112411
112490
|
const { log } = require_lib$29();
|
|
112412
112491
|
const defaultRules = Symbol("npm-packlist.rules.default");
|
|
112413
112492
|
const strictRules = Symbol("npm-packlist.rules.strict");
|
|
@@ -112440,7 +112519,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112440
112519
|
const normalizePath = (path$45) => path$45.split("\\").join("/");
|
|
112441
112520
|
const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
|
|
112442
112521
|
for (const file of [".npmignore", ".gitignore"]) try {
|
|
112443
|
-
const ignoreContent = readFile$4(join$
|
|
112522
|
+
const ignoreContent = readFile$4(join$10(root, file), { encoding: "utf8" });
|
|
112444
112523
|
result.push(ignoreContent);
|
|
112445
112524
|
break;
|
|
112446
112525
|
} catch (err) {
|
|
@@ -112449,8 +112528,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112449
112528
|
}
|
|
112450
112529
|
if (!rel) return result;
|
|
112451
112530
|
const firstRel = rel.split(sep, 1)[0];
|
|
112452
|
-
const newRoot = join$
|
|
112453
|
-
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$
|
|
112531
|
+
const newRoot = join$10(root, firstRel);
|
|
112532
|
+
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$10(root, rel)), result);
|
|
112454
112533
|
};
|
|
112455
112534
|
var PackWalker = class PackWalker extends IgnoreWalker {
|
|
112456
112535
|
constructor(tree, opts) {
|
|
@@ -112458,7 +112537,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112458
112537
|
...opts,
|
|
112459
112538
|
includeEmpty: false,
|
|
112460
112539
|
follow: false,
|
|
112461
|
-
path: resolve$
|
|
112540
|
+
path: resolve$7(opts?.path || tree.path).replace(/\\/g, "/"),
|
|
112462
112541
|
ignoreFiles: opts?.ignoreFiles || [
|
|
112463
112542
|
defaultRules,
|
|
112464
112543
|
"package.json",
|
|
@@ -112517,7 +112596,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112517
112596
|
let ignoreFiles = null;
|
|
112518
112597
|
if (this.tree.workspaces) {
|
|
112519
112598
|
const workspaceDirs = [...this.tree.workspaces.values()].map((dir) => dir.replace(/\\/g, "/"));
|
|
112520
|
-
const entryPath = join$
|
|
112599
|
+
const entryPath = join$10(this.path, entry).replace(/\\/g, "/");
|
|
112521
112600
|
if (workspaceDirs.includes(entryPath)) ignoreFiles = [
|
|
112522
112601
|
defaultRules,
|
|
112523
112602
|
"package.json",
|
|
@@ -112577,7 +112656,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112577
112656
|
if (file.endsWith("/*")) file += "*";
|
|
112578
112657
|
const inverse = `!${file}`;
|
|
112579
112658
|
try {
|
|
112580
|
-
const stat = lstat$1(join$
|
|
112659
|
+
const stat = lstat$1(join$10(this.path, file.replace(/^!+/, "")).replace(/\\/g, "/"));
|
|
112581
112660
|
if (stat.isFile()) {
|
|
112582
112661
|
strict.unshift(inverse);
|
|
112583
112662
|
this.requiredFiles.push(file.startsWith("/") ? file.slice(1) : file);
|
|
@@ -112634,7 +112713,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112634
112713
|
walker.start();
|
|
112635
112714
|
});
|
|
112636
112715
|
const relativeFrom = relative(this.root, walker.path);
|
|
112637
|
-
for (const file of bundled) this.result.add(join$
|
|
112716
|
+
for (const file of bundled) this.result.add(join$10(relativeFrom, file).replace(/\\/g, "/"));
|
|
112638
112717
|
}
|
|
112639
112718
|
}
|
|
112640
112719
|
};
|
|
@@ -112658,8 +112737,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112658
112737
|
//#region ../../node_modules/@npmcli/run-script/lib/set-path.js
|
|
112659
112738
|
var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112660
112739
|
const { log } = require_lib$29();
|
|
112661
|
-
const { resolve: resolve$
|
|
112662
|
-
const nodeGypPath = resolve$
|
|
112740
|
+
const { resolve: resolve$6, dirname: dirname$6, delimiter: delimiter$2 } = require("path");
|
|
112741
|
+
const nodeGypPath = resolve$6(__dirname, "../lib/node-gyp-bin");
|
|
112663
112742
|
const setPATH = (projectPath, binPaths, env) => {
|
|
112664
112743
|
const PATH = Object.keys(env).filter((p) => /^path$/i.test(p) && env[p]).map((p) => env[p].split(delimiter$2)).reduce((set, p) => set.concat(p.filter((concatted) => !set.includes(concatted))), []).join(delimiter$2);
|
|
112665
112744
|
const pathArr = [];
|
|
@@ -112674,7 +112753,7 @@ var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
112674
112753
|
let p = projectPath;
|
|
112675
112754
|
let pp;
|
|
112676
112755
|
do {
|
|
112677
|
-
pathArr.push(resolve$
|
|
112756
|
+
pathArr.push(resolve$6(p, "node_modules", ".bin"));
|
|
112678
112757
|
pp = p;
|
|
112679
112758
|
p = dirname$6(p);
|
|
112680
112759
|
} while (p !== pp);
|
|
@@ -112689,7 +112768,7 @@ var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
112689
112768
|
//#region ../../node_modules/@npmcli/run-script/lib/make-spawn-args.js
|
|
112690
112769
|
var require_make_spawn_args = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112691
112770
|
const setPATH = require_set_path();
|
|
112692
|
-
const { resolve: resolve$
|
|
112771
|
+
const { resolve: resolve$5 } = require("path");
|
|
112693
112772
|
let npm_config_node_gyp;
|
|
112694
112773
|
const makeSpawnArgs = (options) => {
|
|
112695
112774
|
const { args, binPaths, cmd, env, event, nodeGyp, path: path$44, scriptShell = true, stdio, stdioString } = options;
|
|
@@ -112703,7 +112782,7 @@ var require_make_spawn_args = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
|
|
|
112703
112782
|
env: setPATH(path$44, binPaths, {
|
|
112704
112783
|
...process.env,
|
|
112705
112784
|
...env,
|
|
112706
|
-
npm_package_json: resolve$
|
|
112785
|
+
npm_package_json: resolve$5(path$44, "package.json"),
|
|
112707
112786
|
npm_lifecycle_event: event,
|
|
112708
112787
|
npm_lifecycle_script: cmd,
|
|
112709
112788
|
npm_config_node_gyp
|
|
@@ -112790,11 +112869,11 @@ var require_signal_manager = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
112790
112869
|
//#endregion
|
|
112791
112870
|
//#region ../../node_modules/@npmcli/run-script/lib/is-server-package.js
|
|
112792
112871
|
var require_is_server_package = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112793
|
-
const { stat: stat$
|
|
112794
|
-
const { resolve: resolve$
|
|
112872
|
+
const { stat: stat$3 } = require("node:fs/promises");
|
|
112873
|
+
const { resolve: resolve$4 } = require("node:path");
|
|
112795
112874
|
module.exports = async (path) => {
|
|
112796
112875
|
try {
|
|
112797
|
-
return (await stat$
|
|
112876
|
+
return (await stat$3(resolve$4(path, "server.js"))).isFile();
|
|
112798
112877
|
} catch (er) {
|
|
112799
112878
|
return false;
|
|
112800
112879
|
}
|
|
@@ -112904,8 +112983,8 @@ var require_run_script = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
112904
112983
|
//#endregion
|
|
112905
112984
|
//#region ../../node_modules/pacote/lib/file.js
|
|
112906
112985
|
var require_file$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112907
|
-
const { resolve: resolve$
|
|
112908
|
-
const { stat: stat$
|
|
112986
|
+
const { resolve: resolve$3 } = require("node:path");
|
|
112987
|
+
const { stat: stat$2, chmod: chmod$1 } = require("node:fs/promises");
|
|
112909
112988
|
const cacache = require_lib$14();
|
|
112910
112989
|
const fsm = require_lib$13();
|
|
112911
112990
|
const Fetcher = require_fetcher();
|
|
@@ -112930,9 +113009,9 @@ var require_file$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112930
113009
|
#exeBins(pkg, dest) {
|
|
112931
113010
|
if (!pkg.bin) return Promise.resolve();
|
|
112932
113011
|
return Promise.all(Object.keys(pkg.bin).map(async (k) => {
|
|
112933
|
-
const script = resolve$
|
|
113012
|
+
const script = resolve$3(dest, pkg.bin[k]);
|
|
112934
113013
|
try {
|
|
112935
|
-
const st = await stat$
|
|
113014
|
+
const st = await stat$2(script);
|
|
112936
113015
|
const mode = st.mode | 73;
|
|
112937
113016
|
if (mode === st.mode) return;
|
|
112938
113017
|
await chmod$1(script, mode);
|
|
@@ -112981,7 +113060,7 @@ var require_tar_create_options = /* @__PURE__ */ require_chunk.__commonJSMin(((e
|
|
|
112981
113060
|
//#endregion
|
|
112982
113061
|
//#region ../../node_modules/pacote/lib/dir.js
|
|
112983
113062
|
var require_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112984
|
-
const { resolve: resolve$
|
|
113063
|
+
const { resolve: resolve$2 } = require("node:path");
|
|
112985
113064
|
const packlist = require_lib$9();
|
|
112986
113065
|
const runScript = require_run_script();
|
|
112987
113066
|
const tar = require_index_min();
|
|
@@ -113017,7 +113096,7 @@ var require_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
113017
113096
|
env: {
|
|
113018
113097
|
npm_package_resolved: this.resolved,
|
|
113019
113098
|
npm_package_integrity: this.integrity,
|
|
113020
|
-
npm_package_json: resolve$
|
|
113099
|
+
npm_package_json: resolve$2(this.resolved, "package.json")
|
|
113021
113100
|
}
|
|
113022
113101
|
});
|
|
113023
113102
|
});
|
|
@@ -142028,7 +142107,7 @@ var require_registry = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
142028
142107
|
//#region ../../node_modules/pacote/lib/fetcher.js
|
|
142029
142108
|
var require_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
142030
142109
|
const { basename: basename$1, dirname: dirname$5 } = require("node:path");
|
|
142031
|
-
const { rm: rm$4, mkdir: mkdir$
|
|
142110
|
+
const { rm: rm$4, mkdir: mkdir$5 } = require("node:fs/promises");
|
|
142032
142111
|
const PackageJson = require_lib$18();
|
|
142033
142112
|
const cacache = require_lib$14();
|
|
142034
142113
|
const fsm = require_lib$13();
|
|
@@ -142212,7 +142291,7 @@ var require_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mod
|
|
|
142212
142291
|
}
|
|
142213
142292
|
async #mkdir(dest) {
|
|
142214
142293
|
await this.#empty(dest);
|
|
142215
|
-
return await mkdir$
|
|
142294
|
+
return await mkdir$5(dest, { recursive: true });
|
|
142216
142295
|
}
|
|
142217
142296
|
async extract(dest) {
|
|
142218
142297
|
await this.#mkdir(dest);
|
|
@@ -142232,7 +142311,7 @@ var require_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mod
|
|
|
142232
142311
|
}));
|
|
142233
142312
|
}
|
|
142234
142313
|
async tarballFile(dest) {
|
|
142235
|
-
await mkdir$
|
|
142314
|
+
await mkdir$5(dirname$5(dest), { recursive: true });
|
|
142236
142315
|
return this.#toFile(dest);
|
|
142237
142316
|
}
|
|
142238
142317
|
#extract(dest, tarball) {
|
|
@@ -150659,7 +150738,7 @@ var require_src = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
150659
150738
|
const { promisify } = require("util");
|
|
150660
150739
|
const path$3 = require("path");
|
|
150661
150740
|
const { createHash } = require("crypto");
|
|
150662
|
-
const { realpath, lstat, createReadStream, readdir: readdir$
|
|
150741
|
+
const { realpath, lstat, createReadStream, readdir: readdir$3 } = require("fs");
|
|
150663
150742
|
const url = require("url");
|
|
150664
150743
|
const slasher = require_glob_slash();
|
|
150665
150744
|
const minimatch = require_minimatch();
|
|
@@ -150984,7 +151063,7 @@ var require_src = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
150984
151063
|
lstat: promisify(lstat),
|
|
150985
151064
|
realpath: promisify(realpath),
|
|
150986
151065
|
createReadStream,
|
|
150987
|
-
readdir: promisify(readdir$
|
|
151066
|
+
readdir: promisify(readdir$3),
|
|
150988
151067
|
sendError
|
|
150989
151068
|
}, methods);
|
|
150990
151069
|
module.exports = async (request, response, config = {}, methods = {}) => {
|
|
@@ -151546,7 +151625,7 @@ async function resolveEntryPoint(packageDir, packageName) {
|
|
|
151546
151625
|
}
|
|
151547
151626
|
//#endregion
|
|
151548
151627
|
//#region ../../packages/core-node/src/handler-func.ts
|
|
151549
|
-
const { join: join$
|
|
151628
|
+
const { join: join$8 } = node_path.default;
|
|
151550
151629
|
//#endregion
|
|
151551
151630
|
//#region ../../packages/core-node/src/handlers/plugins.ts
|
|
151552
151631
|
const localPluginsMap = /* @__PURE__ */ new Map();
|
|
@@ -151756,9 +151835,14 @@ const script = async (page, log, filePath, username, password, version, download
|
|
|
151756
151835
|
await progressDialog.waitFor({ timeout: 0 });
|
|
151757
151836
|
log("Got loading progress dialog");
|
|
151758
151837
|
const progressInterval = setInterval(async () => {
|
|
151759
|
-
|
|
151760
|
-
|
|
151761
|
-
|
|
151838
|
+
try {
|
|
151839
|
+
const text = await progessBar.getAttribute("value", { timeout: 100 });
|
|
151840
|
+
if (text === null) return;
|
|
151841
|
+
const textAsNumber = parseFloat(text);
|
|
151842
|
+
log("progress", `${(Number.isNaN(textAsNumber) ? 0 : textAsNumber) * 100}%`);
|
|
151843
|
+
} catch {
|
|
151844
|
+
clearInterval(progressInterval);
|
|
151845
|
+
}
|
|
151762
151846
|
}, 500);
|
|
151763
151847
|
registerInstallButtonListener(page, log);
|
|
151764
151848
|
registerWebglErrorListener(page, log);
|
|
@@ -151771,7 +151855,7 @@ const script = async (page, log, filePath, username, password, version, download
|
|
|
151771
151855
|
timeout: 0
|
|
151772
151856
|
});
|
|
151773
151857
|
log("Got progress dialog to disapear");
|
|
151774
|
-
|
|
151858
|
+
clearInterval(progressInterval);
|
|
151775
151859
|
await page.getByRole("button", { name: "Menu" }).click();
|
|
151776
151860
|
await page.getByRole("menuitem", { name: "Project" }).click();
|
|
151777
151861
|
await page.getByRole("menuitem", { name: "Export" }).click();
|
|
@@ -151893,16 +151977,27 @@ const exportc3p = async (file, { cwd, log, inputs, setOutput, paths, abortSignal
|
|
|
151893
151977
|
const headless = newInputs.headless;
|
|
151894
151978
|
if (newInputs.customProfile) {
|
|
151895
151979
|
const customProfile = (0, node_path.join)(cwd, "playwright-profile");
|
|
151980
|
+
log("Setting up Playwright profile from custom Chrome profile...");
|
|
151981
|
+
log(` - Target playwright-profile folder: ${customProfile}`);
|
|
151896
151982
|
await (0, node_fs_promises.mkdir)(customProfile, { recursive: true });
|
|
151897
151983
|
const indexedDbPathSource = (0, node_path.join)(newInputs.customProfile, "Default", "IndexedDB");
|
|
151898
151984
|
const indexedDbPathDestination = (0, node_path.join)(customProfile, "Default", "IndexedDB");
|
|
151985
|
+
log(` - Source IndexedDB folder: ${indexedDbPathSource}`);
|
|
151986
|
+
log(` - Destination IndexedDB folder: ${indexedDbPathDestination}`);
|
|
151987
|
+
if (!(0, node_fs.existsSync)(indexedDbPathSource)) log(` [WARNING] Source IndexedDB directory does not exist: "${indexedDbPathSource}". Verify your custom profile path.`);
|
|
151899
151988
|
await (0, node_fs_promises.mkdir)(indexedDbPathDestination, { recursive: true });
|
|
151900
151989
|
for (const p of ["https_editor.construct.net_0.indexeddb.blob", "https_editor.construct.net_0.indexeddb.leveldb"]) {
|
|
151901
151990
|
const from = (0, node_path.join)(indexedDbPathSource, p);
|
|
151902
151991
|
const to = (0, node_path.join)(indexedDbPathDestination, p);
|
|
151903
|
-
|
|
151904
|
-
|
|
151905
|
-
|
|
151992
|
+
if ((0, node_fs.existsSync)(from)) {
|
|
151993
|
+
log(` - Copying: "${p}" to "${indexedDbPathDestination}"`);
|
|
151994
|
+
try {
|
|
151995
|
+
await (0, node_fs_promises.cp)(from, to, { recursive: true });
|
|
151996
|
+
log(` [OK] Successfully copied "${p}"`);
|
|
151997
|
+
} catch (e) {
|
|
151998
|
+
log(` [ERROR] Failed to copy "${p}":`, e instanceof Error ? `${e.message}\n${e.stack}` : String(e));
|
|
151999
|
+
}
|
|
152000
|
+
} else log(` - Skipping: "${p}" (does not exist in source profile)`);
|
|
151906
152001
|
}
|
|
151907
152002
|
browserContext = await browserInstance.launchPersistentContext(customProfile, {
|
|
151908
152003
|
headless,
|