@pipelab/plugin-poki 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/index.cjs +213 -101
- package/dist/index.mjs +165 -56
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -45394,6 +45394,17 @@ const DEFAULT_PNPM_VERSION = "10.12.0";
|
|
|
45394
45394
|
const metaUrl = require("url").pathToFileURL(__filename).href;
|
|
45395
45395
|
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? (0, node_path.dirname)((0, node_url.fileURLToPath)(metaUrl)) : process.cwd();
|
|
45396
45396
|
const isDev = process.env.NODE_ENV === "development";
|
|
45397
|
+
const getDefaultUserDataPath = (env) => {
|
|
45398
|
+
const base = (() => {
|
|
45399
|
+
switch ((0, node_os.platform)()) {
|
|
45400
|
+
case "win32": return process.env.APPDATA || (0, node_path.join)((0, node_os.homedir)(), "AppData", "Roaming");
|
|
45401
|
+
case "darwin": return (0, node_path.join)((0, node_os.homedir)(), "Library", "Application Support");
|
|
45402
|
+
default: return process.env.XDG_CONFIG_HOME || (0, node_path.join)((0, node_os.homedir)(), ".config");
|
|
45403
|
+
}
|
|
45404
|
+
})();
|
|
45405
|
+
const mode = env ?? (isDev ? "dev" : "prod");
|
|
45406
|
+
return (0, node_path.join)(base, "@pipelab", mode === "dev" ? "app-dev" : mode === "beta" ? "app-beta" : "app");
|
|
45407
|
+
};
|
|
45397
45408
|
/**
|
|
45398
45409
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
45399
45410
|
*/
|
|
@@ -49160,6 +49171,74 @@ var WebSocketServer = class {
|
|
|
49160
49171
|
};
|
|
49161
49172
|
const webSocketServer = new WebSocketServer();
|
|
49162
49173
|
//#endregion
|
|
49174
|
+
//#region ../../node_modules/slash/index.js
|
|
49175
|
+
var require_slash = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
49176
|
+
module.exports = (path) => {
|
|
49177
|
+
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
|
|
49178
|
+
const hasNonAscii = /[^\u0000-\u0080]+/.test(path);
|
|
49179
|
+
if (isExtendedLengthPath || hasNonAscii) return path;
|
|
49180
|
+
return path.replace(/\\/g, "/");
|
|
49181
|
+
};
|
|
49182
|
+
}));
|
|
49183
|
+
//#endregion
|
|
49184
|
+
//#region ../../packages/core-node/src/fs-utils.ts
|
|
49185
|
+
var import_slash = /* @__PURE__ */ require_chunk.__toESM(require_slash(), 1);
|
|
49186
|
+
function removeTrailingSlash(path) {
|
|
49187
|
+
return path.replace(/[\\/]+$/, "");
|
|
49188
|
+
}
|
|
49189
|
+
removeTrailingSlash((0, import_slash.default)((0, node_path.resolve)((0, node_os.homedir)()))).toLowerCase();
|
|
49190
|
+
const additionalProtectedPaths = [
|
|
49191
|
+
getDefaultUserDataPath("dev"),
|
|
49192
|
+
getDefaultUserDataPath("beta"),
|
|
49193
|
+
getDefaultUserDataPath("prod"),
|
|
49194
|
+
projectRoot,
|
|
49195
|
+
process.cwd(),
|
|
49196
|
+
"/tmp",
|
|
49197
|
+
"/var/tmp",
|
|
49198
|
+
process.env.TEMP,
|
|
49199
|
+
process.env.TMP,
|
|
49200
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData"),
|
|
49201
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData", "Local"),
|
|
49202
|
+
(0, node_path.join)((0, node_os.homedir)(), "AppData", "Roaming"),
|
|
49203
|
+
(0, node_path.join)((0, node_os.homedir)(), "Library"),
|
|
49204
|
+
(0, node_path.join)((0, node_os.homedir)(), "Library", "Application Support"),
|
|
49205
|
+
(0, node_path.join)((0, node_os.homedir)(), ".config"),
|
|
49206
|
+
(0, node_path.join)((0, node_os.homedir)(), ".local"),
|
|
49207
|
+
(0, node_path.join)((0, node_os.homedir)(), ".local", "share"),
|
|
49208
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cache"),
|
|
49209
|
+
(0, node_path.join)((0, node_os.homedir)(), "OneDrive"),
|
|
49210
|
+
(0, node_path.join)((0, node_os.homedir)(), "Dropbox"),
|
|
49211
|
+
(0, node_path.join)((0, node_os.homedir)(), ".ssh"),
|
|
49212
|
+
(0, node_path.join)((0, node_os.homedir)(), ".gnupg"),
|
|
49213
|
+
(0, node_path.join)((0, node_os.homedir)(), ".aws"),
|
|
49214
|
+
(0, node_path.join)((0, node_os.homedir)(), ".docker"),
|
|
49215
|
+
(0, node_path.join)((0, node_os.homedir)(), ".kube"),
|
|
49216
|
+
(0, node_path.join)((0, node_os.homedir)(), ".vscode"),
|
|
49217
|
+
(0, node_path.join)((0, node_os.homedir)(), ".vscode-insiders"),
|
|
49218
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cursor"),
|
|
49219
|
+
(0, node_path.join)((0, node_os.homedir)(), ".npm"),
|
|
49220
|
+
(0, node_path.join)((0, node_os.homedir)(), ".pnpm-state"),
|
|
49221
|
+
(0, node_path.join)((0, node_os.homedir)(), ".yarn"),
|
|
49222
|
+
(0, node_path.join)((0, node_os.homedir)(), ".cargo"),
|
|
49223
|
+
(0, node_path.join)((0, node_os.homedir)(), ".rustup"),
|
|
49224
|
+
(0, node_path.join)((0, node_os.homedir)(), ".m2"),
|
|
49225
|
+
(0, node_path.join)((0, node_os.homedir)(), ".gradle")
|
|
49226
|
+
].filter((p) => typeof p === "string" && p.length > 0);
|
|
49227
|
+
new Set([
|
|
49228
|
+
(0, node_path.join)((0, node_os.homedir)(), "Downloads"),
|
|
49229
|
+
(0, node_path.join)((0, node_os.homedir)(), "Documents"),
|
|
49230
|
+
(0, node_path.join)((0, node_os.homedir)(), "Desktop"),
|
|
49231
|
+
(0, node_path.join)((0, node_os.homedir)(), "Pictures"),
|
|
49232
|
+
(0, node_path.join)((0, node_os.homedir)(), "Music"),
|
|
49233
|
+
(0, node_path.join)((0, node_os.homedir)(), "Videos"),
|
|
49234
|
+
(0, node_path.join)((0, node_os.homedir)(), "Saved Games"),
|
|
49235
|
+
(0, node_path.join)((0, node_os.homedir)(), "Contacts"),
|
|
49236
|
+
(0, node_path.join)((0, node_os.homedir)(), "Searches"),
|
|
49237
|
+
(0, node_path.join)((0, node_os.homedir)(), "Links"),
|
|
49238
|
+
(0, node_path.join)((0, node_os.homedir)(), "3D Objects"),
|
|
49239
|
+
...additionalProtectedPaths
|
|
49240
|
+
].map((p) => removeTrailingSlash((0, import_slash.default)((0, node_path.resolve)(p))).toLowerCase()));
|
|
49241
|
+
//#endregion
|
|
49163
49242
|
//#region ../../node_modules/is-plain-obj/index.js
|
|
49164
49243
|
function isPlainObject(value) {
|
|
49165
49244
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -59553,13 +59632,13 @@ var require_opts_arg = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
59553
59632
|
//#region ../../node_modules/mkdirp/lib/path-arg.js
|
|
59554
59633
|
var require_path_arg = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
59555
59634
|
const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
59556
|
-
const { resolve: resolve$
|
|
59635
|
+
const { resolve: resolve$15, parse: parse$2 } = require("path");
|
|
59557
59636
|
const pathArg = (path$84) => {
|
|
59558
59637
|
if (/\0/.test(path$84)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
59559
59638
|
path: path$84,
|
|
59560
59639
|
code: "ERR_INVALID_ARG_VALUE"
|
|
59561
59640
|
});
|
|
59562
|
-
path$84 = resolve$
|
|
59641
|
+
path$84 = resolve$15(path$84);
|
|
59563
59642
|
if (platform === "win32") {
|
|
59564
59643
|
const badWinChars = /[*|"<>?:]/;
|
|
59565
59644
|
const { root } = parse$2(path$84);
|
|
@@ -59977,14 +60056,14 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
59977
60056
|
const assert$1 = require("assert");
|
|
59978
60057
|
const normalize = require_normalize_unicode();
|
|
59979
60058
|
const stripSlashes = require_strip_trailing_slashes();
|
|
59980
|
-
const { join: join$
|
|
60059
|
+
const { join: join$18 } = require("path");
|
|
59981
60060
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
59982
60061
|
module.exports = () => {
|
|
59983
60062
|
const queues = /* @__PURE__ */ new Map();
|
|
59984
60063
|
const reservations = /* @__PURE__ */ new Map();
|
|
59985
60064
|
const getDirs = (path$61) => {
|
|
59986
60065
|
return path$61.split("/").slice(0, -1).reduce((set, path$62) => {
|
|
59987
|
-
if (set.length) path$62 = join$
|
|
60066
|
+
if (set.length) path$62 = join$18(set[set.length - 1], path$62);
|
|
59988
60067
|
set.push(path$62 || "/");
|
|
59989
60068
|
return set;
|
|
59990
60069
|
}, []);
|
|
@@ -60038,7 +60117,7 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
60038
60117
|
};
|
|
60039
60118
|
const reserve = (paths, fn) => {
|
|
60040
60119
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
60041
|
-
return stripSlashes(join$
|
|
60120
|
+
return stripSlashes(join$18(normalize(p))).toLowerCase();
|
|
60042
60121
|
});
|
|
60043
60122
|
const dirs = new Set(paths.map((path$66) => getDirs(path$66)).reduce((a, b) => a.concat(b)));
|
|
60044
60123
|
reservations.set(fn, {
|
|
@@ -62604,7 +62683,7 @@ var require_readdir_glob = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
62604
62683
|
const fs$22 = require("fs");
|
|
62605
62684
|
const { EventEmitter } = require("events");
|
|
62606
62685
|
const { Minimatch } = require_minimatch$1();
|
|
62607
|
-
const { resolve: resolve$
|
|
62686
|
+
const { resolve: resolve$14 } = require("path");
|
|
62608
62687
|
function readdir(dir, strict) {
|
|
62609
62688
|
return new Promise((resolve, reject) => {
|
|
62610
62689
|
fs$22.readdir(dir, { withFileTypes: true }, (err, files) => {
|
|
@@ -62713,7 +62792,7 @@ var require_readdir_glob = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
62713
62792
|
if (this.options.ignore) this.ignoreMatchers = (Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore]).map((ignore) => new Minimatch(ignore, { dot: true }));
|
|
62714
62793
|
this.skipMatchers = [];
|
|
62715
62794
|
if (this.options.skip) this.skipMatchers = (Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]).map((skip) => new Minimatch(skip, { dot: true }));
|
|
62716
|
-
this.iterator = explore(resolve$
|
|
62795
|
+
this.iterator = explore(resolve$14(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
|
|
62717
62796
|
this.paused = false;
|
|
62718
62797
|
this.inactive = false;
|
|
62719
62798
|
this.aborted = false;
|
|
@@ -95875,7 +95954,7 @@ var require_index_min$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
95875
95954
|
//#region ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
|
|
95876
95955
|
var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
95877
95956
|
const { isexe, sync: isexeSync } = require_index_min$3();
|
|
95878
|
-
const { join: join$
|
|
95957
|
+
const { join: join$15, delimiter: delimiter$4, sep: sep$4, posix: posix$1 } = require("path");
|
|
95879
95958
|
const isWindows = process.platform === "win32";
|
|
95880
95959
|
/* istanbul ignore next */
|
|
95881
95960
|
const rSlash = new RegExp(`[${posix$1.sep}${sep$4 === posix$1.sep ? "" : sep$4}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -95905,7 +95984,7 @@ var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
95905
95984
|
};
|
|
95906
95985
|
const getPathPart = (raw, cmd) => {
|
|
95907
95986
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
95908
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
95987
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$15(pathPart, cmd);
|
|
95909
95988
|
};
|
|
95910
95989
|
const which = async (cmd, opt = {}) => {
|
|
95911
95990
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -96654,7 +96733,7 @@ var require_index_min$2 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
96654
96733
|
//#region ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
|
|
96655
96734
|
var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
96656
96735
|
const { isexe, sync: isexeSync } = require_index_min$2();
|
|
96657
|
-
const { join: join$
|
|
96736
|
+
const { join: join$14, delimiter: delimiter$3, sep: sep$3, posix } = require("path");
|
|
96658
96737
|
const isWindows = process.platform === "win32";
|
|
96659
96738
|
/* istanbul ignore next */
|
|
96660
96739
|
const rSlash = new RegExp(`[${posix.sep}${sep$3 === posix.sep ? "" : sep$3}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -96684,7 +96763,7 @@ var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
96684
96763
|
};
|
|
96685
96764
|
const getPathPart = (raw, cmd) => {
|
|
96686
96765
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
96687
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
96766
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$14(pathPart, cmd);
|
|
96688
96767
|
};
|
|
96689
96768
|
const which = async (cmd, opt = {}) => {
|
|
96690
96769
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -98582,7 +98661,7 @@ var require_lib$22 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98582
98661
|
//#endregion
|
|
98583
98662
|
//#region ../../node_modules/npm-normalize-package-bin/lib/index.js
|
|
98584
98663
|
var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98585
|
-
const { join: join$
|
|
98664
|
+
const { join: join$13, basename: basename$4 } = require("path");
|
|
98586
98665
|
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);
|
|
98587
98666
|
const normalizeString = (pkg) => {
|
|
98588
98667
|
if (!pkg.name) return removeBin(pkg);
|
|
@@ -98605,9 +98684,9 @@ var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98605
98684
|
const clean = {};
|
|
98606
98685
|
let hasBins = false;
|
|
98607
98686
|
Object.keys(orig).forEach((binKey) => {
|
|
98608
|
-
const base = join$
|
|
98687
|
+
const base = join$13("/", basename$4(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
98609
98688
|
if (typeof orig[binKey] !== "string" || !base) return;
|
|
98610
|
-
const binTarget = join$
|
|
98689
|
+
const binTarget = join$13("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
98611
98690
|
if (!binTarget) return;
|
|
98612
98691
|
clean[base] = binTarget;
|
|
98613
98692
|
hasBins = true;
|
|
@@ -98873,8 +98952,8 @@ var require_clone = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
98873
98952
|
//#endregion
|
|
98874
98953
|
//#region ../../node_modules/@npmcli/git/lib/is.js
|
|
98875
98954
|
var require_is = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98876
|
-
const { stat: stat$
|
|
98877
|
-
module.exports = ({ cwd = process.cwd() } = {}) => stat$
|
|
98955
|
+
const { stat: stat$7 } = require("fs/promises");
|
|
98956
|
+
module.exports = ({ cwd = process.cwd() } = {}) => stat$7(cwd + "/.git").then(() => true, () => false);
|
|
98878
98957
|
}));
|
|
98879
98958
|
//#endregion
|
|
98880
98959
|
//#region ../../node_modules/@npmcli/git/lib/find.js
|
|
@@ -99408,8 +99487,8 @@ var require_sort$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99408
99487
|
//#endregion
|
|
99409
99488
|
//#region ../../node_modules/@npmcli/package-json/lib/index.js
|
|
99410
99489
|
var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
99411
|
-
const { readFile: readFile$8, writeFile: writeFile$
|
|
99412
|
-
const { resolve: resolve$
|
|
99490
|
+
const { readFile: readFile$8, writeFile: writeFile$5 } = require("node:fs/promises");
|
|
99491
|
+
const { resolve: resolve$13 } = require("node:path");
|
|
99413
99492
|
const parseJSON = require_lib$30();
|
|
99414
99493
|
const updateDeps = require_update_dependencies();
|
|
99415
99494
|
const updateScripts = require_update_scripts();
|
|
@@ -99512,7 +99591,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99512
99591
|
parseErr = err;
|
|
99513
99592
|
}
|
|
99514
99593
|
if (parseErr) {
|
|
99515
|
-
const indexFile = resolve$
|
|
99594
|
+
const indexFile = resolve$13(this.path, "index.js");
|
|
99516
99595
|
let indexFileContent;
|
|
99517
99596
|
try {
|
|
99518
99597
|
indexFileContent = await readFile$8(indexFile, "utf8");
|
|
@@ -99557,7 +99636,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99557
99636
|
return this.#path;
|
|
99558
99637
|
}
|
|
99559
99638
|
get filename() {
|
|
99560
|
-
if (this.path) return resolve$
|
|
99639
|
+
if (this.path) return resolve$13(this.path, "package.json");
|
|
99561
99640
|
}
|
|
99562
99641
|
create(path) {
|
|
99563
99642
|
this.#path = path;
|
|
@@ -99581,7 +99660,7 @@ var require_lib$18 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
99581
99660
|
const content = sort ? packageSort(rest) : rest;
|
|
99582
99661
|
const fileContent = `${JSON.stringify(content, null, format)}\n`.replace(/\n/g, eol);
|
|
99583
99662
|
if (fileContent.trim() !== this.#readFileContent.trim()) {
|
|
99584
|
-
const written = await writeFile$
|
|
99663
|
+
const written = await writeFile$5(this.filename, fileContent);
|
|
99585
99664
|
this.#readFileContent = fileContent;
|
|
99586
99665
|
return written;
|
|
99587
99666
|
}
|
|
@@ -100679,8 +100758,8 @@ var require_errors$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100679
100758
|
var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100680
100759
|
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();
|
|
100681
100760
|
const { constants: { errno: { EEXIST, EISDIR, EINVAL, ENOTDIR } } } = require("os");
|
|
100682
|
-
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$8, readdir: readdir$
|
|
100683
|
-
const { dirname: dirname$10, isAbsolute: isAbsolute$2, join: join$
|
|
100761
|
+
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$8, readdir: readdir$7, readlink, stat: stat$6, symlink, unlink, utimes } = require("fs/promises");
|
|
100762
|
+
const { dirname: dirname$10, isAbsolute: isAbsolute$2, join: join$12, parse, resolve: resolve$12, sep: sep$2, toNamespacedPath } = require("path");
|
|
100684
100763
|
const { fileURLToPath } = require("url");
|
|
100685
100764
|
const defaultOptions = {
|
|
100686
100765
|
dereference: false,
|
|
@@ -100745,7 +100824,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100745
100824
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
100746
100825
|
}
|
|
100747
100826
|
function getStats(src, dest, opts) {
|
|
100748
|
-
const statFunc = opts.dereference ? (file) => stat$
|
|
100827
|
+
const statFunc = opts.dereference ? (file) => stat$6(file, { bigint: true }) : (file) => lstat$2(file, { bigint: true });
|
|
100749
100828
|
return Promise.all([statFunc(src), statFunc(dest).catch((err) => {
|
|
100750
100829
|
// istanbul ignore next: unsure how to cover.
|
|
100751
100830
|
if (err.code === "ENOENT") return null;
|
|
@@ -100760,19 +100839,19 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100760
100839
|
return getStatsForCopy(destStat, src, dest, opts);
|
|
100761
100840
|
}
|
|
100762
100841
|
function pathExists(dest) {
|
|
100763
|
-
return stat$
|
|
100842
|
+
return stat$6(dest).then(
|
|
100764
100843
|
() => true,
|
|
100765
100844
|
// istanbul ignore next: not sure when this would occur
|
|
100766
100845
|
(err) => err.code === "ENOENT" ? false : Promise.reject(err)
|
|
100767
100846
|
);
|
|
100768
100847
|
}
|
|
100769
100848
|
async function checkParentPaths(src, srcStat, dest) {
|
|
100770
|
-
const srcParent = resolve$
|
|
100771
|
-
const destParent = resolve$
|
|
100849
|
+
const srcParent = resolve$12(dirname$10(src));
|
|
100850
|
+
const destParent = resolve$12(dirname$10(dest));
|
|
100772
100851
|
if (destParent === srcParent || destParent === parse(destParent).root) return;
|
|
100773
100852
|
let destStat;
|
|
100774
100853
|
try {
|
|
100775
|
-
destStat = await stat$
|
|
100854
|
+
destStat = await stat$6(destParent, { bigint: true });
|
|
100776
100855
|
} catch (err) {
|
|
100777
100856
|
// istanbul ignore else: not sure when this would occur
|
|
100778
100857
|
if (err.code === "ENOENT") return;
|
|
@@ -100787,7 +100866,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100787
100866
|
});
|
|
100788
100867
|
return checkParentPaths(src, srcStat, destParent);
|
|
100789
100868
|
}
|
|
100790
|
-
const normalizePathToArray = (path$54) => resolve$
|
|
100869
|
+
const normalizePathToArray = (path$54) => resolve$12(path$54).split(sep$2).filter(Boolean);
|
|
100791
100870
|
function isSrcSubdir(src, dest) {
|
|
100792
100871
|
const srcArr = normalizePathToArray(src);
|
|
100793
100872
|
const destArr = normalizePathToArray(dest);
|
|
@@ -100801,7 +100880,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100801
100880
|
return getStatsForCopy(destStat, src, dest, opts);
|
|
100802
100881
|
}
|
|
100803
100882
|
async function getStatsForCopy(destStat, src, dest, opts) {
|
|
100804
|
-
const srcStat = await (opts.dereference ? stat$
|
|
100883
|
+
const srcStat = await (opts.dereference ? stat$6 : lstat$2)(src);
|
|
100805
100884
|
// istanbul ignore else: can't portably test FIFO
|
|
100806
100885
|
if (srcStat.isDirectory() && opts.recursive) return onDir(srcStat, destStat, src, dest, opts);
|
|
100807
100886
|
else if (srcStat.isDirectory()) throw new ERR_FS_EISDIR({
|
|
@@ -100873,7 +100952,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100873
100952
|
return chmod$2(dest, srcMode);
|
|
100874
100953
|
}
|
|
100875
100954
|
async function setDestTimestamps(src, dest) {
|
|
100876
|
-
const updatedSrcStat = await stat$
|
|
100955
|
+
const updatedSrcStat = await stat$6(src);
|
|
100877
100956
|
return utimes(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
100878
100957
|
}
|
|
100879
100958
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -100886,18 +100965,18 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100886
100965
|
return setDestMode(dest, srcMode);
|
|
100887
100966
|
}
|
|
100888
100967
|
async function copyDir(src, dest, opts) {
|
|
100889
|
-
const dir = await readdir$
|
|
100968
|
+
const dir = await readdir$7(src);
|
|
100890
100969
|
for (let i = 0; i < dir.length; i++) {
|
|
100891
100970
|
const item = dir[i];
|
|
100892
|
-
const srcItem = join$
|
|
100893
|
-
const destItem = join$
|
|
100971
|
+
const srcItem = join$12(src, item);
|
|
100972
|
+
const destItem = join$12(dest, item);
|
|
100894
100973
|
const { destStat } = await checkPaths(srcItem, destItem, opts);
|
|
100895
100974
|
await startCopy(destStat, srcItem, destItem, opts);
|
|
100896
100975
|
}
|
|
100897
100976
|
}
|
|
100898
100977
|
async function onLink(destStat, src, dest) {
|
|
100899
100978
|
let resolvedSrc = await readlink(src);
|
|
100900
|
-
if (!isAbsolute$2(resolvedSrc)) resolvedSrc = resolve$
|
|
100979
|
+
if (!isAbsolute$2(resolvedSrc)) resolvedSrc = resolve$12(dirname$10(src), resolvedSrc);
|
|
100901
100980
|
if (!destStat) return symlink(resolvedSrc, dest);
|
|
100902
100981
|
let resolvedDest;
|
|
100903
100982
|
try {
|
|
@@ -100908,14 +100987,14 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100908
100987
|
// istanbul ignore next: should not be possible
|
|
100909
100988
|
throw err;
|
|
100910
100989
|
}
|
|
100911
|
-
if (!isAbsolute$2(resolvedDest)) resolvedDest = resolve$
|
|
100990
|
+
if (!isAbsolute$2(resolvedDest)) resolvedDest = resolve$12(dirname$10(dest), resolvedDest);
|
|
100912
100991
|
if (isSrcSubdir(resolvedSrc, resolvedDest)) throw new ERR_FS_CP_EINVAL({
|
|
100913
100992
|
message: `cannot copy ${resolvedSrc} to a subdirectory of self ${resolvedDest}`,
|
|
100914
100993
|
path: dest,
|
|
100915
100994
|
syscall: "cp",
|
|
100916
100995
|
errno: EINVAL
|
|
100917
100996
|
});
|
|
100918
|
-
if ((await stat$
|
|
100997
|
+
if ((await stat$6(src)).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) throw new ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY({
|
|
100919
100998
|
message: `cannot overwrite ${resolvedDest} with ${resolvedSrc}`,
|
|
100920
100999
|
path: dest,
|
|
100921
101000
|
syscall: "cp",
|
|
@@ -100954,13 +101033,13 @@ var require_cp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
100954
101033
|
//#endregion
|
|
100955
101034
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/with-temp-dir.js
|
|
100956
101035
|
var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100957
|
-
const { join: join$
|
|
101036
|
+
const { join: join$11, sep: sep$1 } = require("path");
|
|
100958
101037
|
const getOptions = require_get_options();
|
|
100959
101038
|
const { mkdir: mkdir$7, mkdtemp, rm: rm$8 } = require("fs/promises");
|
|
100960
101039
|
const withTempDir = async (root, fn, opts) => {
|
|
100961
101040
|
const options = getOptions(opts, { copy: ["tmpPrefix"] });
|
|
100962
101041
|
await mkdir$7(root, { recursive: true });
|
|
100963
|
-
const target = await mkdtemp(join$
|
|
101042
|
+
const target = await mkdtemp(join$11(`${root}${sep$1}`, options.tmpPrefix || ""));
|
|
100964
101043
|
let err;
|
|
100965
101044
|
let result;
|
|
100966
101045
|
try {
|
|
@@ -100982,11 +101061,11 @@ var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
100982
101061
|
//#endregion
|
|
100983
101062
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/readdir-scoped.js
|
|
100984
101063
|
var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100985
|
-
const { readdir: readdir$
|
|
100986
|
-
const { join: join$
|
|
101064
|
+
const { readdir: readdir$6 } = require("fs/promises");
|
|
101065
|
+
const { join: join$10 } = require("path");
|
|
100987
101066
|
const readdirScoped = async (dir) => {
|
|
100988
101067
|
const results = [];
|
|
100989
|
-
for (const item of await readdir$
|
|
101068
|
+
for (const item of await readdir$6(dir)) if (item.startsWith("@")) for (const scopedItem of await readdir$6(join$10(dir, item))) results.push(join$10(item, scopedItem));
|
|
100990
101069
|
else results.push(item);
|
|
100991
101070
|
return results;
|
|
100992
101071
|
};
|
|
@@ -100995,7 +101074,7 @@ var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
100995
101074
|
//#endregion
|
|
100996
101075
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/move-file.js
|
|
100997
101076
|
var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100998
|
-
const { dirname: dirname$9, join: join$
|
|
101077
|
+
const { dirname: dirname$9, join: join$9, resolve: resolve$11, relative: relative$1, isAbsolute: isAbsolute$1 } = require("path");
|
|
100999
101078
|
const fs$13 = require("fs/promises");
|
|
101000
101079
|
const pathExists = async (path$53) => {
|
|
101001
101080
|
try {
|
|
@@ -101020,7 +101099,7 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
101020
101099
|
const sourceStat = await fs$13.lstat(source);
|
|
101021
101100
|
if (sourceStat.isDirectory()) {
|
|
101022
101101
|
const files = await fs$13.readdir(source);
|
|
101023
|
-
await Promise.all(files.map((file) => moveFile(join$
|
|
101102
|
+
await Promise.all(files.map((file) => moveFile(join$9(source, file), join$9(destination, file), options, false, symlinks)));
|
|
101024
101103
|
} else if (sourceStat.isSymbolicLink()) symlinks.push({
|
|
101025
101104
|
source,
|
|
101026
101105
|
destination
|
|
@@ -101031,10 +101110,10 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
101031
101110
|
if (root) {
|
|
101032
101111
|
await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
|
|
101033
101112
|
let target = await fs$13.readlink(symSource);
|
|
101034
|
-
if (isAbsolute$1(target)) target = resolve$
|
|
101113
|
+
if (isAbsolute$1(target)) target = resolve$11(symDestination, relative$1(symSource, target));
|
|
101035
101114
|
let targetStat = "file";
|
|
101036
101115
|
try {
|
|
101037
|
-
targetStat = await fs$13.stat(resolve$
|
|
101116
|
+
targetStat = await fs$13.stat(resolve$11(dirname$9(symSource), target));
|
|
101038
101117
|
if (targetStat.isDirectory()) targetStat = "junction";
|
|
101039
101118
|
} catch {}
|
|
101040
101119
|
await fs$13.symlink(target, symDestination, targetStat);
|
|
@@ -101196,7 +101275,7 @@ var require_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
101196
101275
|
//#region ../../node_modules/cacache/lib/entry-index.js
|
|
101197
101276
|
var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
101198
101277
|
const crypto$1 = require("crypto");
|
|
101199
|
-
const { appendFile, mkdir: mkdir$6, readFile: readFile$7, readdir: readdir$
|
|
101278
|
+
const { appendFile, mkdir: mkdir$6, readFile: readFile$7, readdir: readdir$5, rm: rm$7, writeFile: writeFile$4 } = require("fs/promises");
|
|
101200
101279
|
const { Minipass } = require_commonjs$10();
|
|
101201
101280
|
const path$14 = require("path");
|
|
101202
101281
|
const ssri = require_lib$17();
|
|
@@ -101243,7 +101322,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101243
101322
|
});
|
|
101244
101323
|
};
|
|
101245
101324
|
const write = async (tmp) => {
|
|
101246
|
-
await writeFile$
|
|
101325
|
+
await writeFile$4(tmp.target, newIndex, { flag: "wx" });
|
|
101247
101326
|
await mkdir$6(path$14.dirname(bucket), { recursive: true });
|
|
101248
101327
|
await moveFile(tmp.target, bucket);
|
|
101249
101328
|
tmp.moved = true;
|
|
@@ -101389,7 +101468,7 @@ var require_entry_index = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
101389
101468
|
};
|
|
101390
101469
|
}
|
|
101391
101470
|
function readdirOrEmpty(dir) {
|
|
101392
|
-
return readdir$
|
|
101471
|
+
return readdir$5(dir).catch((err) => {
|
|
101393
101472
|
if (err.code === "ENOENT" || err.code === "ENOTDIR") return [];
|
|
101394
101473
|
throw err;
|
|
101395
101474
|
});
|
|
@@ -106111,7 +106190,7 @@ var require_rm = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
106111
106190
|
//#endregion
|
|
106112
106191
|
//#region ../../node_modules/cacache/lib/verify.js
|
|
106113
106192
|
var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
106114
|
-
const { mkdir: mkdir$5, readFile: readFile$6, rm: rm$5, stat: stat$
|
|
106193
|
+
const { mkdir: mkdir$5, readFile: readFile$6, rm: rm$5, stat: stat$5, truncate, writeFile: writeFile$3 } = require("fs/promises");
|
|
106115
106194
|
const contentPath = require_path();
|
|
106116
106195
|
const fsm = require_lib$15();
|
|
106117
106196
|
const glob = require_glob();
|
|
@@ -106207,7 +106286,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106207
106286
|
}
|
|
106208
106287
|
} else {
|
|
106209
106288
|
stats.reclaimedCount++;
|
|
106210
|
-
const s = await stat$
|
|
106289
|
+
const s = await stat$5(f);
|
|
106211
106290
|
await rm$5(f, {
|
|
106212
106291
|
recursive: true,
|
|
106213
106292
|
force: true
|
|
@@ -106221,7 +106300,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106221
106300
|
async function verifyContent(filepath, sri) {
|
|
106222
106301
|
const contentInfo = {};
|
|
106223
106302
|
try {
|
|
106224
|
-
const { size } = await stat$
|
|
106303
|
+
const { size } = await stat$5(filepath);
|
|
106225
106304
|
contentInfo.size = size;
|
|
106226
106305
|
contentInfo.valid = true;
|
|
106227
106306
|
await ssri.checkStream(new fsm.ReadStream(filepath), sri);
|
|
@@ -106275,7 +106354,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106275
106354
|
for (const entry of bucket) {
|
|
106276
106355
|
const content = contentPath(cache, entry.integrity);
|
|
106277
106356
|
try {
|
|
106278
|
-
await stat$
|
|
106357
|
+
await stat$5(content);
|
|
106279
106358
|
await index.insert(cache, entry.key, entry.integrity, {
|
|
106280
106359
|
metadata: entry.metadata,
|
|
106281
106360
|
size: entry.size,
|
|
@@ -106300,7 +106379,7 @@ var require_verify$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
106300
106379
|
async function writeVerifile(cache, opts) {
|
|
106301
106380
|
const verifile = path$10.join(cache, "_lastverified");
|
|
106302
106381
|
opts.log.silly("verify", "writing verifile to " + verifile);
|
|
106303
|
-
return writeFile$
|
|
106382
|
+
return writeFile$3(verifile, `${Date.now()}`);
|
|
106304
106383
|
}
|
|
106305
106384
|
module.exports.lastRun = lastRun;
|
|
106306
106385
|
async function lastRun(cache) {
|
|
@@ -106850,8 +106929,8 @@ var require_lib$12 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106850
106929
|
//#region ../../node_modules/@npmcli/installed-package-contents/lib/index.js
|
|
106851
106930
|
var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
106852
106931
|
const bundled = require_lib$12();
|
|
106853
|
-
const { readFile: readFile$5, readdir: readdir$
|
|
106854
|
-
const { resolve: resolve$
|
|
106932
|
+
const { readFile: readFile$5, readdir: readdir$4, stat: stat$4 } = require("fs/promises");
|
|
106933
|
+
const { resolve: resolve$10, basename: basename$3, dirname: dirname$8 } = require("path");
|
|
106855
106934
|
const normalizePackageBin = require_lib$21();
|
|
106856
106935
|
const readPackage = ({ path: path$48, packageJsonCache }) => packageJsonCache.has(path$48) ? Promise.resolve(packageJsonCache.get(path$48)) : readFile$5(path$48).then((json) => {
|
|
106857
106936
|
const pkg = normalizePackageBin(JSON.parse(json));
|
|
@@ -106895,17 +106974,17 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106895
106974
|
const nm = /^@.+/.test(scope) ? dirname$8(dir) : dir;
|
|
106896
106975
|
const binFiles = [];
|
|
106897
106976
|
Object.keys(pkg.bin).forEach((b) => {
|
|
106898
|
-
const base = resolve$
|
|
106977
|
+
const base = resolve$10(nm, ".bin", b);
|
|
106899
106978
|
binFiles.push(base, base + ".cmd", base + ".ps1");
|
|
106900
106979
|
});
|
|
106901
|
-
(await Promise.all(binFiles.map((b) => stat$
|
|
106980
|
+
(await Promise.all(binFiles.map((b) => stat$4(b).then(() => b).catch(() => null)))).filter((b) => b).forEach((b) => result.add(b));
|
|
106902
106981
|
}
|
|
106903
106982
|
}
|
|
106904
106983
|
if (currentDepth >= depth) {
|
|
106905
106984
|
result.add(path$50);
|
|
106906
106985
|
return result;
|
|
106907
106986
|
}
|
|
106908
|
-
const [dirEntries, bundleDeps] = await Promise.all([readdir$
|
|
106987
|
+
const [dirEntries, bundleDeps] = await Promise.all([readdir$4(path$50, { withFileTypes: true }), currentDepth === 0 && pkg && pkg.bundleDependencies ? bundled({
|
|
106909
106988
|
path: path$50,
|
|
106910
106989
|
packageJsonCache
|
|
106911
106990
|
}) : null]).catch(() => []);
|
|
@@ -106916,7 +106995,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106916
106995
|
}
|
|
106917
106996
|
const recursePromises = [];
|
|
106918
106997
|
for (const entry of dirEntries) {
|
|
106919
|
-
const p = resolve$
|
|
106998
|
+
const p = resolve$10(path$50, entry.name);
|
|
106920
106999
|
if (entry.isDirectory() === false) {
|
|
106921
107000
|
result.add(p);
|
|
106922
107001
|
continue;
|
|
@@ -106935,7 +107014,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106935
107014
|
}
|
|
106936
107015
|
if (bundleDeps) recursePromises.push(...bundleDeps.map((dep) => {
|
|
106937
107016
|
return pkgContents({
|
|
106938
|
-
path: resolve$
|
|
107017
|
+
path: resolve$10(path$50, "node_modules", dep),
|
|
106939
107018
|
packageJsonCache,
|
|
106940
107019
|
pkg: true,
|
|
106941
107020
|
depth,
|
|
@@ -106947,7 +107026,7 @@ var require_lib$11 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
106947
107026
|
return result;
|
|
106948
107027
|
};
|
|
106949
107028
|
module.exports = ({ path: path$51, ...opts }) => pkgContents({
|
|
106950
|
-
path: resolve$
|
|
107029
|
+
path: resolve$10(path$51),
|
|
106951
107030
|
...opts,
|
|
106952
107031
|
pkg: true
|
|
106953
107032
|
}).then((results) => [...results]);
|
|
@@ -110558,18 +110637,18 @@ var require_protected = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
110558
110637
|
//#endregion
|
|
110559
110638
|
//#region ../../node_modules/pacote/lib/util/cache-dir.js
|
|
110560
110639
|
var require_cache_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
110561
|
-
const { resolve: resolve$
|
|
110640
|
+
const { resolve: resolve$9 } = require("node:path");
|
|
110562
110641
|
const { tmpdir, homedir } = require("node:os");
|
|
110563
110642
|
module.exports = (fakePlatform = false) => {
|
|
110564
110643
|
const temp = tmpdir();
|
|
110565
110644
|
const uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
110566
|
-
const home = homedir() || resolve$
|
|
110645
|
+
const home = homedir() || resolve$9(temp, "npm-" + uidOrPid);
|
|
110567
110646
|
const platform = fakePlatform || process.platform;
|
|
110568
110647
|
const cacheExtra = platform === "win32" ? "npm-cache" : ".npm";
|
|
110569
110648
|
const cacheRoot = platform === "win32" && process.env.LOCALAPPDATA || home;
|
|
110570
110649
|
return {
|
|
110571
|
-
cacache: resolve$
|
|
110572
|
-
tufcache: resolve$
|
|
110650
|
+
cacache: resolve$9(cacheRoot, cacheExtra, "_cacache"),
|
|
110651
|
+
tufcache: resolve$9(cacheRoot, cacheExtra, "_tuf")
|
|
110573
110652
|
};
|
|
110574
110653
|
};
|
|
110575
110654
|
}));
|
|
@@ -112383,7 +112462,7 @@ var require_lib$10 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112383
112462
|
var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112384
112463
|
const { Walker: IgnoreWalker } = require_lib$10();
|
|
112385
112464
|
const { lstatSync: lstat$1, readFileSync: readFile$4 } = require("fs");
|
|
112386
|
-
const { basename: basename$2, dirname: dirname$7, extname: extname$1, join: join$
|
|
112465
|
+
const { basename: basename$2, dirname: dirname$7, extname: extname$1, join: join$8, relative, resolve: resolve$8, sep } = require("path");
|
|
112387
112466
|
const { log } = require_lib$29();
|
|
112388
112467
|
const defaultRules = Symbol("npm-packlist.rules.default");
|
|
112389
112468
|
const strictRules = Symbol("npm-packlist.rules.strict");
|
|
@@ -112416,7 +112495,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112416
112495
|
const normalizePath = (path$45) => path$45.split("\\").join("/");
|
|
112417
112496
|
const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
|
|
112418
112497
|
for (const file of [".npmignore", ".gitignore"]) try {
|
|
112419
|
-
const ignoreContent = readFile$4(join$
|
|
112498
|
+
const ignoreContent = readFile$4(join$8(root, file), { encoding: "utf8" });
|
|
112420
112499
|
result.push(ignoreContent);
|
|
112421
112500
|
break;
|
|
112422
112501
|
} catch (err) {
|
|
@@ -112425,8 +112504,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112425
112504
|
}
|
|
112426
112505
|
if (!rel) return result;
|
|
112427
112506
|
const firstRel = rel.split(sep, 1)[0];
|
|
112428
|
-
const newRoot = join$
|
|
112429
|
-
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$
|
|
112507
|
+
const newRoot = join$8(root, firstRel);
|
|
112508
|
+
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$8(root, rel)), result);
|
|
112430
112509
|
};
|
|
112431
112510
|
var PackWalker = class PackWalker extends IgnoreWalker {
|
|
112432
112511
|
constructor(tree, opts) {
|
|
@@ -112434,7 +112513,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112434
112513
|
...opts,
|
|
112435
112514
|
includeEmpty: false,
|
|
112436
112515
|
follow: false,
|
|
112437
|
-
path: resolve$
|
|
112516
|
+
path: resolve$8(opts?.path || tree.path).replace(/\\/g, "/"),
|
|
112438
112517
|
ignoreFiles: opts?.ignoreFiles || [
|
|
112439
112518
|
defaultRules,
|
|
112440
112519
|
"package.json",
|
|
@@ -112493,7 +112572,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112493
112572
|
let ignoreFiles = null;
|
|
112494
112573
|
if (this.tree.workspaces) {
|
|
112495
112574
|
const workspaceDirs = [...this.tree.workspaces.values()].map((dir) => dir.replace(/\\/g, "/"));
|
|
112496
|
-
const entryPath = join$
|
|
112575
|
+
const entryPath = join$8(this.path, entry).replace(/\\/g, "/");
|
|
112497
112576
|
if (workspaceDirs.includes(entryPath)) ignoreFiles = [
|
|
112498
112577
|
defaultRules,
|
|
112499
112578
|
"package.json",
|
|
@@ -112553,7 +112632,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112553
112632
|
if (file.endsWith("/*")) file += "*";
|
|
112554
112633
|
const inverse = `!${file}`;
|
|
112555
112634
|
try {
|
|
112556
|
-
const stat = lstat$1(join$
|
|
112635
|
+
const stat = lstat$1(join$8(this.path, file.replace(/^!+/, "")).replace(/\\/g, "/"));
|
|
112557
112636
|
if (stat.isFile()) {
|
|
112558
112637
|
strict.unshift(inverse);
|
|
112559
112638
|
this.requiredFiles.push(file.startsWith("/") ? file.slice(1) : file);
|
|
@@ -112610,7 +112689,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112610
112689
|
walker.start();
|
|
112611
112690
|
});
|
|
112612
112691
|
const relativeFrom = relative(this.root, walker.path);
|
|
112613
|
-
for (const file of bundled) this.result.add(join$
|
|
112692
|
+
for (const file of bundled) this.result.add(join$8(relativeFrom, file).replace(/\\/g, "/"));
|
|
112614
112693
|
}
|
|
112615
112694
|
}
|
|
112616
112695
|
};
|
|
@@ -112634,8 +112713,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112634
112713
|
//#region ../../node_modules/@npmcli/run-script/lib/set-path.js
|
|
112635
112714
|
var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112636
112715
|
const { log } = require_lib$29();
|
|
112637
|
-
const { resolve: resolve$
|
|
112638
|
-
const nodeGypPath = resolve$
|
|
112716
|
+
const { resolve: resolve$7, dirname: dirname$6, delimiter: delimiter$2 } = require("path");
|
|
112717
|
+
const nodeGypPath = resolve$7(__dirname, "../lib/node-gyp-bin");
|
|
112639
112718
|
const setPATH = (projectPath, binPaths, env) => {
|
|
112640
112719
|
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);
|
|
112641
112720
|
const pathArr = [];
|
|
@@ -112650,7 +112729,7 @@ var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
112650
112729
|
let p = projectPath;
|
|
112651
112730
|
let pp;
|
|
112652
112731
|
do {
|
|
112653
|
-
pathArr.push(resolve$
|
|
112732
|
+
pathArr.push(resolve$7(p, "node_modules", ".bin"));
|
|
112654
112733
|
pp = p;
|
|
112655
112734
|
p = dirname$6(p);
|
|
112656
112735
|
} while (p !== pp);
|
|
@@ -112665,7 +112744,7 @@ var require_set_path = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
112665
112744
|
//#region ../../node_modules/@npmcli/run-script/lib/make-spawn-args.js
|
|
112666
112745
|
var require_make_spawn_args = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112667
112746
|
const setPATH = require_set_path();
|
|
112668
|
-
const { resolve: resolve$
|
|
112747
|
+
const { resolve: resolve$6 } = require("path");
|
|
112669
112748
|
let npm_config_node_gyp;
|
|
112670
112749
|
const makeSpawnArgs = (options) => {
|
|
112671
112750
|
const { args, binPaths, cmd, env, event, nodeGyp, path: path$44, scriptShell = true, stdio, stdioString } = options;
|
|
@@ -112679,7 +112758,7 @@ var require_make_spawn_args = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
|
|
|
112679
112758
|
env: setPATH(path$44, binPaths, {
|
|
112680
112759
|
...process.env,
|
|
112681
112760
|
...env,
|
|
112682
|
-
npm_package_json: resolve$
|
|
112761
|
+
npm_package_json: resolve$6(path$44, "package.json"),
|
|
112683
112762
|
npm_lifecycle_event: event,
|
|
112684
112763
|
npm_lifecycle_script: cmd,
|
|
112685
112764
|
npm_config_node_gyp
|
|
@@ -112766,11 +112845,11 @@ var require_signal_manager = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
112766
112845
|
//#endregion
|
|
112767
112846
|
//#region ../../node_modules/@npmcli/run-script/lib/is-server-package.js
|
|
112768
112847
|
var require_is_server_package = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112769
|
-
const { stat: stat$
|
|
112770
|
-
const { resolve: resolve$
|
|
112848
|
+
const { stat: stat$3 } = require("node:fs/promises");
|
|
112849
|
+
const { resolve: resolve$5 } = require("node:path");
|
|
112771
112850
|
module.exports = async (path) => {
|
|
112772
112851
|
try {
|
|
112773
|
-
return (await stat$
|
|
112852
|
+
return (await stat$3(resolve$5(path, "server.js"))).isFile();
|
|
112774
112853
|
} catch (er) {
|
|
112775
112854
|
return false;
|
|
112776
112855
|
}
|
|
@@ -112880,8 +112959,8 @@ var require_run_script = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
112880
112959
|
//#endregion
|
|
112881
112960
|
//#region ../../node_modules/pacote/lib/file.js
|
|
112882
112961
|
var require_file$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112883
|
-
const { resolve: resolve$
|
|
112884
|
-
const { stat: stat$
|
|
112962
|
+
const { resolve: resolve$4 } = require("node:path");
|
|
112963
|
+
const { stat: stat$2, chmod: chmod$1 } = require("node:fs/promises");
|
|
112885
112964
|
const cacache = require_lib$14();
|
|
112886
112965
|
const fsm = require_lib$13();
|
|
112887
112966
|
const Fetcher = require_fetcher();
|
|
@@ -112906,9 +112985,9 @@ var require_file$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112906
112985
|
#exeBins(pkg, dest) {
|
|
112907
112986
|
if (!pkg.bin) return Promise.resolve();
|
|
112908
112987
|
return Promise.all(Object.keys(pkg.bin).map(async (k) => {
|
|
112909
|
-
const script = resolve$
|
|
112988
|
+
const script = resolve$4(dest, pkg.bin[k]);
|
|
112910
112989
|
try {
|
|
112911
|
-
const st = await stat$
|
|
112990
|
+
const st = await stat$2(script);
|
|
112912
112991
|
const mode = st.mode | 73;
|
|
112913
112992
|
if (mode === st.mode) return;
|
|
112914
112993
|
await chmod$1(script, mode);
|
|
@@ -112957,7 +113036,7 @@ var require_tar_create_options = /* @__PURE__ */ require_chunk.__commonJSMin(((e
|
|
|
112957
113036
|
//#endregion
|
|
112958
113037
|
//#region ../../node_modules/pacote/lib/dir.js
|
|
112959
113038
|
var require_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112960
|
-
const { resolve: resolve$
|
|
113039
|
+
const { resolve: resolve$3 } = require("node:path");
|
|
112961
113040
|
const packlist = require_lib$9();
|
|
112962
113041
|
const runScript = require_run_script();
|
|
112963
113042
|
const tar = require_index_min();
|
|
@@ -112993,7 +113072,7 @@ var require_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
112993
113072
|
env: {
|
|
112994
113073
|
npm_package_resolved: this.resolved,
|
|
112995
113074
|
npm_package_integrity: this.integrity,
|
|
112996
|
-
npm_package_json: resolve$
|
|
113075
|
+
npm_package_json: resolve$3(this.resolved, "package.json")
|
|
112997
113076
|
}
|
|
112998
113077
|
});
|
|
112999
113078
|
});
|
|
@@ -150635,7 +150714,7 @@ var require_src = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
150635
150714
|
const { promisify } = require("util");
|
|
150636
150715
|
const path$3 = require("path");
|
|
150637
150716
|
const { createHash } = require("crypto");
|
|
150638
|
-
const { realpath, lstat, createReadStream, readdir: readdir$
|
|
150717
|
+
const { realpath, lstat, createReadStream, readdir: readdir$3 } = require("fs");
|
|
150639
150718
|
const url = require("url");
|
|
150640
150719
|
const slasher = require_glob_slash();
|
|
150641
150720
|
const minimatch = require_minimatch();
|
|
@@ -150960,7 +151039,7 @@ var require_src = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
150960
151039
|
lstat: promisify(lstat),
|
|
150961
151040
|
realpath: promisify(realpath),
|
|
150962
151041
|
createReadStream,
|
|
150963
|
-
readdir: promisify(readdir$
|
|
151042
|
+
readdir: promisify(readdir$3),
|
|
150964
151043
|
sendError
|
|
150965
151044
|
}, methods);
|
|
150966
151045
|
module.exports = async (request, response, config = {}, methods = {}) => {
|
|
@@ -151522,7 +151601,7 @@ async function resolveEntryPoint(packageDir, packageName) {
|
|
|
151522
151601
|
}
|
|
151523
151602
|
//#endregion
|
|
151524
151603
|
//#region ../../packages/core-node/src/handler-func.ts
|
|
151525
|
-
const { join: join$
|
|
151604
|
+
const { join: join$6 } = node_path.default;
|
|
151526
151605
|
//#endregion
|
|
151527
151606
|
//#region ../../packages/core-node/src/handlers/plugins.ts
|
|
151528
151607
|
const localPluginsMap = /* @__PURE__ */ new Map();
|
|
@@ -151590,29 +151669,62 @@ var src_default = createNodeDefinition({
|
|
|
151590
151669
|
}),
|
|
151591
151670
|
runner: createActionRunner(async ({ log, inputs, paths, abortSignal, cwd, context }) => {
|
|
151592
151671
|
const { node, thirdparty, pnpm, userData } = paths;
|
|
151672
|
+
const absoluteInputFolder = (0, node_path.resolve)(inputs["input-folder"]);
|
|
151673
|
+
log("Starting Poki upload action...");
|
|
151674
|
+
log(`- Game ID: ${inputs.project}`);
|
|
151675
|
+
log(`- Version name: ${inputs.name}`);
|
|
151676
|
+
log(`- Version notes: ${inputs.notes}`);
|
|
151677
|
+
log(`- Input folder: ${absoluteInputFolder}`);
|
|
151678
|
+
log(`Fetching @poki/cli version ${POKI_CLI_VERSION}...`);
|
|
151593
151679
|
const { packageDir: pokiDir } = await fetchPackage("@poki/cli", POKI_CLI_VERSION, {
|
|
151594
151680
|
context,
|
|
151595
151681
|
installDeps: true
|
|
151596
151682
|
});
|
|
151597
151683
|
const poki = (0, node_path.join)(pokiDir, "bin", "index.js");
|
|
151598
|
-
|
|
151599
|
-
await
|
|
151600
|
-
|
|
151601
|
-
const
|
|
151602
|
-
|
|
151603
|
-
await (0, node_fs_promises.
|
|
151684
|
+
log(`Successfully resolved @poki/cli. Executable: ${poki}`);
|
|
151685
|
+
const tempUploadFolder = await context.createTempFolder("poki-upload-");
|
|
151686
|
+
log(`Created temporary upload root directory: ${tempUploadFolder}`);
|
|
151687
|
+
const tempDistFolder = (0, node_path.join)(tempUploadFolder, "dist");
|
|
151688
|
+
log(`Copying build files from "${absoluteInputFolder}" to "${tempDistFolder}"...`);
|
|
151689
|
+
await (0, node_fs_promises.cp)(absoluteInputFolder, tempDistFolder, { recursive: true });
|
|
151690
|
+
const pokiJsonPath = (0, node_path.join)(tempUploadFolder, "poki.json");
|
|
151691
|
+
log(`Writing temporary poki.json configuration at: ${pokiJsonPath}`);
|
|
151692
|
+
const pokiConfig = {
|
|
151604
151693
|
game_id: inputs.project,
|
|
151605
151694
|
build_dir: "dist"
|
|
151606
|
-
}
|
|
151607
|
-
log(
|
|
151608
|
-
|
|
151695
|
+
};
|
|
151696
|
+
log(`poki.json configuration content:\n${JSON.stringify(pokiConfig, null, 2)}`);
|
|
151697
|
+
await (0, node_fs_promises.writeFile)(pokiJsonPath, JSON.stringify(pokiConfig, void 0, 2), "utf-8");
|
|
151609
151698
|
const sandboxConfigDir = thirdparty;
|
|
151699
|
+
log("Checking for sandboxed authentication credentials...");
|
|
151700
|
+
const possibleAuthPaths = [(0, node_path.join)(sandboxConfigDir, "poki", "auth.json"), (0, node_path.join)(sandboxConfigDir, "Poki", "auth.json")];
|
|
151701
|
+
let authFileFound = false;
|
|
151702
|
+
let foundPath = "";
|
|
151703
|
+
for (const p of possibleAuthPaths) try {
|
|
151704
|
+
await (0, node_fs_promises.access)(p);
|
|
151705
|
+
authFileFound = true;
|
|
151706
|
+
foundPath = p;
|
|
151707
|
+
break;
|
|
151708
|
+
} catch {}
|
|
151709
|
+
if (authFileFound) log(`[Poki] Authentication file found at: ${foundPath}`);
|
|
151710
|
+
else {
|
|
151711
|
+
log("[Poki] [WARNING] No authentication file (auth.json) found in the sandboxed config directory.");
|
|
151712
|
+
log("[Poki] [WARNING] Poki CLI might try to open a browser for interactive login, which could hang/fail in headless environments.");
|
|
151713
|
+
log(`[Poki] Expected location: ${(0, node_path.join)(sandboxConfigDir, "poki", "auth.json")} or ${(0, node_path.join)(sandboxConfigDir, "Poki", "auth.json")}`);
|
|
151714
|
+
}
|
|
151715
|
+
log("Configuring environment variables:");
|
|
151716
|
+
log(` - XDG_CONFIG_HOME: ${sandboxConfigDir}`);
|
|
151717
|
+
log(` - LOCALAPPDATA: ${sandboxConfigDir}`);
|
|
151718
|
+
log(` - PATH: ${(0, node_path.dirname)(node)}${node_path.delimiter}${process.env.PATH}`);
|
|
151719
|
+
log(` - MSW_BRIDGE_PORT: ${process.env.MSW_BRIDGE_PORT || "not set"}`);
|
|
151720
|
+
log(` - NODE_OPTIONS: ${process.env.NODE_OPTIONS || "not set"}`);
|
|
151610
151721
|
const env = {
|
|
151611
151722
|
...process.env,
|
|
151612
151723
|
XDG_CONFIG_HOME: sandboxConfigDir,
|
|
151613
151724
|
LOCALAPPDATA: sandboxConfigDir,
|
|
151614
151725
|
PATH: `${(0, node_path.dirname)(node)}${node_path.delimiter}${process.env.PATH}`
|
|
151615
151726
|
};
|
|
151727
|
+
log(`Running Poki CLI upload command: node ${poki} upload --name "${inputs.name}" --notes "${inputs.notes}"`);
|
|
151616
151728
|
await runWithLiveLogs(node, [
|
|
151617
151729
|
poki,
|
|
151618
151730
|
"upload",
|
|
@@ -151621,7 +151733,7 @@ var src_default = createNodeDefinition({
|
|
|
151621
151733
|
"--notes",
|
|
151622
151734
|
inputs.notes
|
|
151623
151735
|
], {
|
|
151624
|
-
cwd,
|
|
151736
|
+
cwd: tempUploadFolder,
|
|
151625
151737
|
env,
|
|
151626
151738
|
cancelSignal: abortSignal
|
|
151627
151739
|
}, log, {
|