@pipelab/plugin-minify 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 +182 -102
- package/dist/index.mjs +119 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { a as __require, i as __reExport, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk-kImr3pkf.mjs";
|
|
2
2
|
import { readdir } from "node:fs/promises";
|
|
3
|
-
import path, { dirname, join } from "node:path";
|
|
3
|
+
import path, { dirname, join, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { hostname } from "os";
|
|
6
6
|
import { normalize } from "path";
|
|
7
7
|
import { formatWithOptions, types } from "util";
|
|
8
|
+
import { homedir, platform } from "node:os";
|
|
8
9
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
9
10
|
import http from "node:http";
|
|
10
11
|
import { webcrypto } from "node:crypto";
|
|
@@ -47704,6 +47705,17 @@ init_esm_shims();
|
|
|
47704
47705
|
const metaUrl = typeof import.meta !== "undefined" ? import.meta.url : void 0;
|
|
47705
47706
|
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? dirname(fileURLToPath(metaUrl)) : process.cwd();
|
|
47706
47707
|
const isDev = process.env.NODE_ENV === "development";
|
|
47708
|
+
const getDefaultUserDataPath = (env) => {
|
|
47709
|
+
const base = (() => {
|
|
47710
|
+
switch (platform()) {
|
|
47711
|
+
case "win32": return process.env.APPDATA || join(homedir(), "AppData", "Roaming");
|
|
47712
|
+
case "darwin": return join(homedir(), "Library", "Application Support");
|
|
47713
|
+
default: return process.env.XDG_CONFIG_HOME || join(homedir(), ".config");
|
|
47714
|
+
}
|
|
47715
|
+
})();
|
|
47716
|
+
const mode = env ?? (isDev ? "dev" : "prod");
|
|
47717
|
+
return join(base, "@pipelab", mode === "dev" ? "app-dev" : mode === "beta" ? "app-beta" : "app");
|
|
47718
|
+
};
|
|
47707
47719
|
/**
|
|
47708
47720
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
47709
47721
|
*/
|
|
@@ -51465,6 +51477,71 @@ var WebSocketServer = class {
|
|
|
51465
51477
|
};
|
|
51466
51478
|
new WebSocketServer();
|
|
51467
51479
|
//#endregion
|
|
51480
|
+
//#region ../../packages/core-node/src/fs-utils.ts
|
|
51481
|
+
var import_slash = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
51482
|
+
module.exports = (path) => {
|
|
51483
|
+
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
|
|
51484
|
+
const hasNonAscii = /[^\u0000-\u0080]+/.test(path);
|
|
51485
|
+
if (isExtendedLengthPath || hasNonAscii) return path;
|
|
51486
|
+
return path.replace(/\\/g, "/");
|
|
51487
|
+
};
|
|
51488
|
+
})))(), 1);
|
|
51489
|
+
function removeTrailingSlash(path) {
|
|
51490
|
+
return path.replace(/[\\/]+$/, "");
|
|
51491
|
+
}
|
|
51492
|
+
removeTrailingSlash((0, import_slash.default)(resolve(homedir()))).toLowerCase();
|
|
51493
|
+
const additionalProtectedPaths = [
|
|
51494
|
+
getDefaultUserDataPath("dev"),
|
|
51495
|
+
getDefaultUserDataPath("beta"),
|
|
51496
|
+
getDefaultUserDataPath("prod"),
|
|
51497
|
+
projectRoot,
|
|
51498
|
+
process.cwd(),
|
|
51499
|
+
"/tmp",
|
|
51500
|
+
"/var/tmp",
|
|
51501
|
+
process.env.TEMP,
|
|
51502
|
+
process.env.TMP,
|
|
51503
|
+
join(homedir(), "AppData"),
|
|
51504
|
+
join(homedir(), "AppData", "Local"),
|
|
51505
|
+
join(homedir(), "AppData", "Roaming"),
|
|
51506
|
+
join(homedir(), "Library"),
|
|
51507
|
+
join(homedir(), "Library", "Application Support"),
|
|
51508
|
+
join(homedir(), ".config"),
|
|
51509
|
+
join(homedir(), ".local"),
|
|
51510
|
+
join(homedir(), ".local", "share"),
|
|
51511
|
+
join(homedir(), ".cache"),
|
|
51512
|
+
join(homedir(), "OneDrive"),
|
|
51513
|
+
join(homedir(), "Dropbox"),
|
|
51514
|
+
join(homedir(), ".ssh"),
|
|
51515
|
+
join(homedir(), ".gnupg"),
|
|
51516
|
+
join(homedir(), ".aws"),
|
|
51517
|
+
join(homedir(), ".docker"),
|
|
51518
|
+
join(homedir(), ".kube"),
|
|
51519
|
+
join(homedir(), ".vscode"),
|
|
51520
|
+
join(homedir(), ".vscode-insiders"),
|
|
51521
|
+
join(homedir(), ".cursor"),
|
|
51522
|
+
join(homedir(), ".npm"),
|
|
51523
|
+
join(homedir(), ".pnpm-state"),
|
|
51524
|
+
join(homedir(), ".yarn"),
|
|
51525
|
+
join(homedir(), ".cargo"),
|
|
51526
|
+
join(homedir(), ".rustup"),
|
|
51527
|
+
join(homedir(), ".m2"),
|
|
51528
|
+
join(homedir(), ".gradle")
|
|
51529
|
+
].filter((p) => typeof p === "string" && p.length > 0);
|
|
51530
|
+
new Set([
|
|
51531
|
+
join(homedir(), "Downloads"),
|
|
51532
|
+
join(homedir(), "Documents"),
|
|
51533
|
+
join(homedir(), "Desktop"),
|
|
51534
|
+
join(homedir(), "Pictures"),
|
|
51535
|
+
join(homedir(), "Music"),
|
|
51536
|
+
join(homedir(), "Videos"),
|
|
51537
|
+
join(homedir(), "Saved Games"),
|
|
51538
|
+
join(homedir(), "Contacts"),
|
|
51539
|
+
join(homedir(), "Searches"),
|
|
51540
|
+
join(homedir(), "Links"),
|
|
51541
|
+
join(homedir(), "3D Objects"),
|
|
51542
|
+
...additionalProtectedPaths
|
|
51543
|
+
].map((p) => removeTrailingSlash((0, import_slash.default)(resolve(p))).toLowerCase()));
|
|
51544
|
+
//#endregion
|
|
51468
51545
|
//#region ../../node_modules/tar/lib/high-level-opt.js
|
|
51469
51546
|
var require_high_level_opt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
51470
51547
|
const argmap = new Map([
|
|
@@ -55696,13 +55773,13 @@ var require_opts_arg = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
55696
55773
|
//#region ../../node_modules/mkdirp/lib/path-arg.js
|
|
55697
55774
|
var require_path_arg = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
55698
55775
|
const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
55699
|
-
const { resolve: resolve$
|
|
55776
|
+
const { resolve: resolve$13, parse: parse$2 } = __require("path");
|
|
55700
55777
|
const pathArg = (path) => {
|
|
55701
55778
|
if (/\0/.test(path)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
55702
55779
|
path,
|
|
55703
55780
|
code: "ERR_INVALID_ARG_VALUE"
|
|
55704
55781
|
});
|
|
55705
|
-
path = resolve$
|
|
55782
|
+
path = resolve$13(path);
|
|
55706
55783
|
if (platform === "win32") {
|
|
55707
55784
|
const badWinChars = /[*|"<>?:]/;
|
|
55708
55785
|
const { root } = parse$2(path);
|
|
@@ -58652,7 +58729,7 @@ var require_readdir_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58652
58729
|
const fs$19 = __require("fs");
|
|
58653
58730
|
const { EventEmitter } = __require("events");
|
|
58654
58731
|
const { Minimatch } = require_minimatch$1();
|
|
58655
|
-
const { resolve: resolve$
|
|
58732
|
+
const { resolve: resolve$12 } = __require("path");
|
|
58656
58733
|
function readdir(dir, strict) {
|
|
58657
58734
|
return new Promise((resolve, reject) => {
|
|
58658
58735
|
fs$19.readdir(dir, { withFileTypes: true }, (err, files) => {
|
|
@@ -58761,7 +58838,7 @@ var require_readdir_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58761
58838
|
if (this.options.ignore) this.ignoreMatchers = (Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore]).map((ignore) => new Minimatch(ignore, { dot: true }));
|
|
58762
58839
|
this.skipMatchers = [];
|
|
58763
58840
|
if (this.options.skip) this.skipMatchers = (Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]).map((skip) => new Minimatch(skip, { dot: true }));
|
|
58764
|
-
this.iterator = explore(resolve$
|
|
58841
|
+
this.iterator = explore(resolve$12(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
|
|
58765
58842
|
this.paused = false;
|
|
58766
58843
|
this.inactive = false;
|
|
58767
58844
|
this.aborted = false;
|
|
@@ -94014,7 +94091,7 @@ var require_npa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
94014
94091
|
const isWindows = process.platform === "win32";
|
|
94015
94092
|
const { URL: URL$6 } = __require("node:url");
|
|
94016
94093
|
const path$17 = isWindows ? __require("node:path/win32") : __require("node:path");
|
|
94017
|
-
const { homedir: homedir$
|
|
94094
|
+
const { homedir: homedir$2 } = __require("node:os");
|
|
94018
94095
|
const HostedGit = require_lib$28();
|
|
94019
94096
|
const semver = require_semver$2();
|
|
94020
94097
|
const validatePackageName = require_lib$23();
|
|
@@ -94219,7 +94296,7 @@ var require_npa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
94219
94296
|
}
|
|
94220
94297
|
if (/^\/~(\/|$)/.test(specPath)) {
|
|
94221
94298
|
res.saveSpec = `file:${specPath.substr(1)}`;
|
|
94222
|
-
resolvedPath = path$17.resolve(homedir$
|
|
94299
|
+
resolvedPath = path$17.resolve(homedir$2(), specPath.substr(3));
|
|
94223
94300
|
} else if (!path$17.isAbsolute(rawSpec.slice(5))) res.saveSpec = `file:${path$17.relative(where, resolvedPath)}`;
|
|
94224
94301
|
else res.saveSpec = `file:${path$17.resolve(resolvedPath)}`;
|
|
94225
94302
|
res.fetchSpec = path$17.resolve(where, resolvedPath);
|
|
@@ -95366,7 +95443,7 @@ var require_sort$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
95366
95443
|
//#region ../../node_modules/@npmcli/package-json/lib/index.js
|
|
95367
95444
|
var require_lib$18 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
95368
95445
|
const { readFile: readFile$4, writeFile: writeFile$2 } = __require("node:fs/promises");
|
|
95369
|
-
const { resolve: resolve$
|
|
95446
|
+
const { resolve: resolve$11 } = __require("node:path");
|
|
95370
95447
|
const parseJSON = require_lib$30();
|
|
95371
95448
|
const updateDeps = require_update_dependencies();
|
|
95372
95449
|
const updateScripts = require_update_scripts();
|
|
@@ -95469,7 +95546,7 @@ var require_lib$18 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
95469
95546
|
parseErr = err;
|
|
95470
95547
|
}
|
|
95471
95548
|
if (parseErr) {
|
|
95472
|
-
const indexFile = resolve$
|
|
95549
|
+
const indexFile = resolve$11(this.path, "index.js");
|
|
95473
95550
|
let indexFileContent;
|
|
95474
95551
|
try {
|
|
95475
95552
|
indexFileContent = await readFile$4(indexFile, "utf8");
|
|
@@ -95514,7 +95591,7 @@ var require_lib$18 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
95514
95591
|
return this.#path;
|
|
95515
95592
|
}
|
|
95516
95593
|
get filename() {
|
|
95517
|
-
if (this.path) return resolve$
|
|
95594
|
+
if (this.path) return resolve$11(this.path, "package.json");
|
|
95518
95595
|
}
|
|
95519
95596
|
create(path) {
|
|
95520
95597
|
this.#path = path;
|
|
@@ -96637,7 +96714,7 @@ var require_polyfill = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
96637
96714
|
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();
|
|
96638
96715
|
const { constants: { errno: { EEXIST, EISDIR, EINVAL, ENOTDIR } } } = __require("os");
|
|
96639
96716
|
const { chmod: chmod$1, copyFile, lstat: lstat$2, mkdir: mkdir$4, readdir: readdir$5, readlink, stat: stat$4, symlink, unlink, utimes } = __require("fs/promises");
|
|
96640
|
-
const { dirname: dirname$6, isAbsolute: isAbsolute$1, join: join$6, parse, resolve: resolve$
|
|
96717
|
+
const { dirname: dirname$6, isAbsolute: isAbsolute$1, join: join$6, parse, resolve: resolve$10, sep: sep$2, toNamespacedPath } = __require("path");
|
|
96641
96718
|
const { fileURLToPath: fileURLToPath$1 } = __require("url");
|
|
96642
96719
|
const defaultOptions = {
|
|
96643
96720
|
dereference: false,
|
|
@@ -96724,8 +96801,8 @@ var require_polyfill = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
96724
96801
|
);
|
|
96725
96802
|
}
|
|
96726
96803
|
async function checkParentPaths(src, srcStat, dest) {
|
|
96727
|
-
const srcParent = resolve$
|
|
96728
|
-
const destParent = resolve$
|
|
96804
|
+
const srcParent = resolve$10(dirname$6(src));
|
|
96805
|
+
const destParent = resolve$10(dirname$6(dest));
|
|
96729
96806
|
if (destParent === srcParent || destParent === parse(destParent).root) return;
|
|
96730
96807
|
let destStat;
|
|
96731
96808
|
try {
|
|
@@ -96744,7 +96821,7 @@ var require_polyfill = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
96744
96821
|
});
|
|
96745
96822
|
return checkParentPaths(src, srcStat, destParent);
|
|
96746
96823
|
}
|
|
96747
|
-
const normalizePathToArray = (path) => resolve$
|
|
96824
|
+
const normalizePathToArray = (path) => resolve$10(path).split(sep$2).filter(Boolean);
|
|
96748
96825
|
function isSrcSubdir(src, dest) {
|
|
96749
96826
|
const srcArr = normalizePathToArray(src);
|
|
96750
96827
|
const destArr = normalizePathToArray(dest);
|
|
@@ -96854,7 +96931,7 @@ var require_polyfill = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
96854
96931
|
}
|
|
96855
96932
|
async function onLink(destStat, src, dest) {
|
|
96856
96933
|
let resolvedSrc = await readlink(src);
|
|
96857
|
-
if (!isAbsolute$1(resolvedSrc)) resolvedSrc = resolve$
|
|
96934
|
+
if (!isAbsolute$1(resolvedSrc)) resolvedSrc = resolve$10(dirname$6(src), resolvedSrc);
|
|
96858
96935
|
if (!destStat) return symlink(resolvedSrc, dest);
|
|
96859
96936
|
let resolvedDest;
|
|
96860
96937
|
try {
|
|
@@ -96865,7 +96942,7 @@ var require_polyfill = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
96865
96942
|
// istanbul ignore next: should not be possible
|
|
96866
96943
|
throw err;
|
|
96867
96944
|
}
|
|
96868
|
-
if (!isAbsolute$1(resolvedDest)) resolvedDest = resolve$
|
|
96945
|
+
if (!isAbsolute$1(resolvedDest)) resolvedDest = resolve$10(dirname$6(dest), resolvedDest);
|
|
96869
96946
|
if (isSrcSubdir(resolvedSrc, resolvedDest)) throw new ERR_FS_CP_EINVAL({
|
|
96870
96947
|
message: `cannot copy ${resolvedSrc} to a subdirectory of self ${resolvedDest}`,
|
|
96871
96948
|
path: dest,
|
|
@@ -96952,7 +97029,7 @@ var require_readdir_scoped = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
96952
97029
|
//#endregion
|
|
96953
97030
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/move-file.js
|
|
96954
97031
|
var require_move_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
96955
|
-
const { dirname: dirname$5, join: join$3, resolve: resolve$
|
|
97032
|
+
const { dirname: dirname$5, join: join$3, resolve: resolve$9, relative: relative$1, isAbsolute } = __require("path");
|
|
96956
97033
|
const fs$11 = __require("fs/promises");
|
|
96957
97034
|
const pathExists = async (path) => {
|
|
96958
97035
|
try {
|
|
@@ -96988,10 +97065,10 @@ var require_move_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
96988
97065
|
if (root) {
|
|
96989
97066
|
await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
|
|
96990
97067
|
let target = await fs$11.readlink(symSource);
|
|
96991
|
-
if (isAbsolute(target)) target = resolve$
|
|
97068
|
+
if (isAbsolute(target)) target = resolve$9(symDestination, relative$1(symSource, target));
|
|
96992
97069
|
let targetStat = "file";
|
|
96993
97070
|
try {
|
|
96994
|
-
targetStat = await fs$11.stat(resolve$
|
|
97071
|
+
targetStat = await fs$11.stat(resolve$9(dirname$5(symSource), target));
|
|
96995
97072
|
if (targetStat.isDirectory()) targetStat = "junction";
|
|
96996
97073
|
} catch {}
|
|
96997
97074
|
await fs$11.symlink(target, symDestination, targetStat);
|
|
@@ -102808,7 +102885,7 @@ var require_lib$12 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102808
102885
|
var require_lib$11 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102809
102886
|
const bundled = require_lib$12();
|
|
102810
102887
|
const { readFile: readFile$1, readdir: readdir$2, stat: stat$2 } = __require("fs/promises");
|
|
102811
|
-
const { resolve: resolve$
|
|
102888
|
+
const { resolve: resolve$8, basename: basename$3, dirname: dirname$4 } = __require("path");
|
|
102812
102889
|
const normalizePackageBin = require_lib$21();
|
|
102813
102890
|
const readPackage = ({ path, packageJsonCache }) => packageJsonCache.has(path) ? Promise.resolve(packageJsonCache.get(path)) : readFile$1(path).then((json) => {
|
|
102814
102891
|
const pkg = normalizePackageBin(JSON.parse(json));
|
|
@@ -102852,7 +102929,7 @@ var require_lib$11 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102852
102929
|
const nm = /^@.+/.test(scope) ? dirname$4(dir) : dir;
|
|
102853
102930
|
const binFiles = [];
|
|
102854
102931
|
Object.keys(pkg.bin).forEach((b) => {
|
|
102855
|
-
const base = resolve$
|
|
102932
|
+
const base = resolve$8(nm, ".bin", b);
|
|
102856
102933
|
binFiles.push(base, base + ".cmd", base + ".ps1");
|
|
102857
102934
|
});
|
|
102858
102935
|
(await Promise.all(binFiles.map((b) => stat$2(b).then(() => b).catch(() => null)))).filter((b) => b).forEach((b) => result.add(b));
|
|
@@ -102873,7 +102950,7 @@ var require_lib$11 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102873
102950
|
}
|
|
102874
102951
|
const recursePromises = [];
|
|
102875
102952
|
for (const entry of dirEntries) {
|
|
102876
|
-
const p = resolve$
|
|
102953
|
+
const p = resolve$8(path, entry.name);
|
|
102877
102954
|
if (entry.isDirectory() === false) {
|
|
102878
102955
|
result.add(p);
|
|
102879
102956
|
continue;
|
|
@@ -102892,7 +102969,7 @@ var require_lib$11 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102892
102969
|
}
|
|
102893
102970
|
if (bundleDeps) recursePromises.push(...bundleDeps.map((dep) => {
|
|
102894
102971
|
return pkgContents({
|
|
102895
|
-
path: resolve$
|
|
102972
|
+
path: resolve$8(path, "node_modules", dep),
|
|
102896
102973
|
packageJsonCache,
|
|
102897
102974
|
pkg: true,
|
|
102898
102975
|
depth,
|
|
@@ -102904,7 +102981,7 @@ var require_lib$11 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102904
102981
|
return result;
|
|
102905
102982
|
};
|
|
102906
102983
|
module.exports = ({ path, ...opts }) => pkgContents({
|
|
102907
|
-
path: resolve$
|
|
102984
|
+
path: resolve$8(path),
|
|
102908
102985
|
...opts,
|
|
102909
102986
|
pkg: true
|
|
102910
102987
|
}).then((results) => [...results]);
|
|
@@ -106515,18 +106592,18 @@ var require_protected = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
106515
106592
|
//#endregion
|
|
106516
106593
|
//#region ../../node_modules/pacote/lib/util/cache-dir.js
|
|
106517
106594
|
var require_cache_dir = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
106518
|
-
const { resolve: resolve$
|
|
106519
|
-
const { tmpdir, homedir } = __require("node:os");
|
|
106595
|
+
const { resolve: resolve$7 } = __require("node:path");
|
|
106596
|
+
const { tmpdir, homedir: homedir$1 } = __require("node:os");
|
|
106520
106597
|
module.exports = (fakePlatform = false) => {
|
|
106521
106598
|
const temp = tmpdir();
|
|
106522
106599
|
const uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
106523
|
-
const home = homedir() || resolve$
|
|
106600
|
+
const home = homedir$1() || resolve$7(temp, "npm-" + uidOrPid);
|
|
106524
106601
|
const platform = fakePlatform || process.platform;
|
|
106525
106602
|
const cacheExtra = platform === "win32" ? "npm-cache" : ".npm";
|
|
106526
106603
|
const cacheRoot = platform === "win32" && process.env.LOCALAPPDATA || home;
|
|
106527
106604
|
return {
|
|
106528
|
-
cacache: resolve$
|
|
106529
|
-
tufcache: resolve$
|
|
106605
|
+
cacache: resolve$7(cacheRoot, cacheExtra, "_cacache"),
|
|
106606
|
+
tufcache: resolve$7(cacheRoot, cacheExtra, "_tuf")
|
|
106530
106607
|
};
|
|
106531
106608
|
};
|
|
106532
106609
|
}));
|
|
@@ -108340,7 +108417,7 @@ var require_lib$10 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108340
108417
|
var require_lib$9 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108341
108418
|
const { Walker: IgnoreWalker } = require_lib$10();
|
|
108342
108419
|
const { lstatSync: lstat$1, readFileSync: readFile } = __require("fs");
|
|
108343
|
-
const { basename: basename$2, dirname: dirname$3, extname: extname$1, join: join$2, relative, resolve: resolve$
|
|
108420
|
+
const { basename: basename$2, dirname: dirname$3, extname: extname$1, join: join$2, relative, resolve: resolve$6, sep } = __require("path");
|
|
108344
108421
|
const { log } = require_lib$29();
|
|
108345
108422
|
const defaultRules = Symbol("npm-packlist.rules.default");
|
|
108346
108423
|
const strictRules = Symbol("npm-packlist.rules.strict");
|
|
@@ -108391,7 +108468,7 @@ var require_lib$9 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108391
108468
|
...opts,
|
|
108392
108469
|
includeEmpty: false,
|
|
108393
108470
|
follow: false,
|
|
108394
|
-
path: resolve$
|
|
108471
|
+
path: resolve$6(opts?.path || tree.path).replace(/\\/g, "/"),
|
|
108395
108472
|
ignoreFiles: opts?.ignoreFiles || [
|
|
108396
108473
|
defaultRules,
|
|
108397
108474
|
"package.json",
|
|
@@ -108592,8 +108669,8 @@ var require_lib$9 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108592
108669
|
var require_set_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108593
108670
|
init_esm_shims();
|
|
108594
108671
|
const { log } = require_lib$29();
|
|
108595
|
-
const { resolve: resolve$
|
|
108596
|
-
const nodeGypPath = resolve$
|
|
108672
|
+
const { resolve: resolve$5, dirname: dirname$2, delimiter } = __require("path");
|
|
108673
|
+
const nodeGypPath = resolve$5(__dirname, "../lib/node-gyp-bin");
|
|
108597
108674
|
const setPATH = (projectPath, binPaths, env) => {
|
|
108598
108675
|
const PATH = Object.keys(env).filter((p) => /^path$/i.test(p) && env[p]).map((p) => env[p].split(delimiter)).reduce((set, p) => set.concat(p.filter((concatted) => !set.includes(concatted))), []).join(delimiter);
|
|
108599
108676
|
const pathArr = [];
|
|
@@ -108608,7 +108685,7 @@ var require_set_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108608
108685
|
let p = projectPath;
|
|
108609
108686
|
let pp;
|
|
108610
108687
|
do {
|
|
108611
|
-
pathArr.push(resolve$
|
|
108688
|
+
pathArr.push(resolve$5(p, "node_modules", ".bin"));
|
|
108612
108689
|
pp = p;
|
|
108613
108690
|
p = dirname$2(p);
|
|
108614
108691
|
} while (p !== pp);
|
|
@@ -108623,7 +108700,7 @@ var require_set_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108623
108700
|
//#region ../../node_modules/@npmcli/run-script/lib/make-spawn-args.js
|
|
108624
108701
|
var require_make_spawn_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108625
108702
|
const setPATH = require_set_path();
|
|
108626
|
-
const { resolve: resolve$
|
|
108703
|
+
const { resolve: resolve$4 } = __require("path");
|
|
108627
108704
|
let npm_config_node_gyp;
|
|
108628
108705
|
const makeSpawnArgs = (options) => {
|
|
108629
108706
|
const { args, binPaths, cmd, env, event, nodeGyp, path, scriptShell = true, stdio, stdioString } = options;
|
|
@@ -108637,7 +108714,7 @@ var require_make_spawn_args = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
108637
108714
|
env: setPATH(path, binPaths, {
|
|
108638
108715
|
...process.env,
|
|
108639
108716
|
...env,
|
|
108640
|
-
npm_package_json: resolve$
|
|
108717
|
+
npm_package_json: resolve$4(path, "package.json"),
|
|
108641
108718
|
npm_lifecycle_event: event,
|
|
108642
108719
|
npm_lifecycle_script: cmd,
|
|
108643
108720
|
npm_config_node_gyp
|
|
@@ -108725,10 +108802,10 @@ var require_signal_manager = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
108725
108802
|
//#region ../../node_modules/@npmcli/run-script/lib/is-server-package.js
|
|
108726
108803
|
var require_is_server_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108727
108804
|
const { stat: stat$1 } = __require("node:fs/promises");
|
|
108728
|
-
const { resolve: resolve$
|
|
108805
|
+
const { resolve: resolve$3 } = __require("node:path");
|
|
108729
108806
|
module.exports = async (path) => {
|
|
108730
108807
|
try {
|
|
108731
|
-
return (await stat$1(resolve$
|
|
108808
|
+
return (await stat$1(resolve$3(path, "server.js"))).isFile();
|
|
108732
108809
|
} catch (er) {
|
|
108733
108810
|
return false;
|
|
108734
108811
|
}
|
|
@@ -108838,7 +108915,7 @@ var require_run_script = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108838
108915
|
//#endregion
|
|
108839
108916
|
//#region ../../node_modules/pacote/lib/file.js
|
|
108840
108917
|
var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108841
|
-
const { resolve: resolve$
|
|
108918
|
+
const { resolve: resolve$2 } = __require("node:path");
|
|
108842
108919
|
const { stat, chmod } = __require("node:fs/promises");
|
|
108843
108920
|
const cacache = require_lib$14();
|
|
108844
108921
|
const fsm = require_lib$13();
|
|
@@ -108864,7 +108941,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108864
108941
|
#exeBins(pkg, dest) {
|
|
108865
108942
|
if (!pkg.bin) return Promise.resolve();
|
|
108866
108943
|
return Promise.all(Object.keys(pkg.bin).map(async (k) => {
|
|
108867
|
-
const script = resolve$
|
|
108944
|
+
const script = resolve$2(dest, pkg.bin[k]);
|
|
108868
108945
|
try {
|
|
108869
108946
|
const st = await stat(script);
|
|
108870
108947
|
const mode = st.mode | 73;
|
|
@@ -108915,7 +108992,7 @@ var require_tar_create_options = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
108915
108992
|
//#endregion
|
|
108916
108993
|
//#region ../../node_modules/pacote/lib/dir.js
|
|
108917
108994
|
var require_dir = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108918
|
-
const { resolve } = __require("node:path");
|
|
108995
|
+
const { resolve: resolve$1 } = __require("node:path");
|
|
108919
108996
|
const packlist = require_lib$9();
|
|
108920
108997
|
const runScript = require_run_script();
|
|
108921
108998
|
const tar = require_index_min();
|
|
@@ -108951,7 +109028,7 @@ var require_dir = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
108951
109028
|
env: {
|
|
108952
109029
|
npm_package_resolved: this.resolved,
|
|
108953
109030
|
npm_package_integrity: this.integrity,
|
|
108954
|
-
npm_package_json: resolve(this.resolved, "package.json")
|
|
109031
|
+
npm_package_json: resolve$1(this.resolved, "package.json")
|
|
108955
109032
|
}
|
|
108956
109033
|
});
|
|
108957
109034
|
});
|