@socketsecurity/lib 5.23.0 → 5.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/archives.js +4 -4
- package/dist/constants/socket.js +1 -1
- package/dist/debug.js +5 -5
- package/dist/dlx/manifest.js +18 -20
- package/dist/errors.js +2 -3
- package/dist/external/@npmcli/package-json/lib/read-package.js +3 -2
- package/dist/external/@npmcli/package-json.js +4125 -165
- package/dist/external/@npmcli/promise-spawn.js +3 -2
- package/dist/external/adm-zip.js +3 -2
- package/dist/external/debug.js +2 -1
- package/dist/external/external-pack.js +4 -3
- package/dist/external/fast-sort.js +2 -1
- package/dist/external/get-east-asian-width.js +3 -2
- package/dist/external/npm-pack.js +6965 -4075
- package/dist/external/p-map.js +6 -5
- package/dist/external/pico-pack.js +24 -23
- package/dist/external/supports-color.js +3 -1
- package/dist/external/tar-fs.js +9 -8
- package/dist/external/which.js +3 -2
- package/dist/external/yargs-parser.js +3 -2
- package/dist/fs.js +5 -4
- package/dist/git.js +3 -3
- package/dist/github.d.ts +3 -3
- package/dist/github.js +3 -3
- package/dist/http-request.d.ts +2 -2
- package/dist/json/edit.js +9 -9
- package/dist/json/parse.d.ts +2 -2
- package/dist/json/parse.js +2 -2
- package/dist/logger.js +5 -6
- package/dist/objects.js +28 -39
- package/dist/packages/edit.js +3 -3
- package/dist/packages/isolation.js +3 -3
- package/dist/primordials.d.ts +337 -0
- package/dist/primordials.js +828 -0
- package/dist/process-lock.js +11 -11
- package/dist/releases/github.js +4 -4
- package/dist/signal-exit.js +4 -4
- package/dist/spawn.d.ts +13 -13
- package/dist/stdio/stderr.d.ts +2 -2
- package/dist/suppress-warnings.js +2 -2
- package/package.json +12 -8
- package/dist/env/socket-cli-shadow.d.ts +0 -77
- package/dist/env/socket-cli-shadow.js +0 -59
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { JSONParse: _p_JSONParse, JSONStringify: _p_JSONStringify, MathRandom: _p_MathRandom, ObjectDefineProperty: _p_ObjectDefineProperty, ObjectGetOwnPropertyDescriptor: _p_ObjectGetOwnPropertyDescriptor, SetCtor: _p_SetCtor, SymbolFor: _p_SymbolFor } = require('../../primordials.js')
|
|
1
2
|
"use strict";
|
|
2
3
|
/**
|
|
3
4
|
* Bundled from @npmcli/package-json
|
|
@@ -15,8 +16,8 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
15
16
|
var require_lib = __commonJS({
|
|
16
17
|
"node_modules/.pnpm/json-parse-even-better-errors@5.0.0/node_modules/json-parse-even-better-errors/lib/index.js"(exports2, module2) {
|
|
17
18
|
"use strict";
|
|
18
|
-
var INDENT =
|
|
19
|
-
var NEWLINE =
|
|
19
|
+
var INDENT = _p_SymbolFor("indent");
|
|
20
|
+
var NEWLINE = _p_SymbolFor("newline");
|
|
20
21
|
var DEFAULT_NEWLINE = "\n";
|
|
21
22
|
var DEFAULT_INDENT = " ";
|
|
22
23
|
var BOM = /^\uFEFF/;
|
|
@@ -122,7 +123,7 @@ var require_lib = __commonJS({
|
|
|
122
123
|
// node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/update-dependencies.js
|
|
123
124
|
var require_update_dependencies = __commonJS({
|
|
124
125
|
"node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/update-dependencies.js"(exports2, module2) {
|
|
125
|
-
var depTypes = /* @__PURE__ */ new
|
|
126
|
+
var depTypes = /* @__PURE__ */ new _p_SetCtor([
|
|
126
127
|
"dependencies",
|
|
127
128
|
"optionalDependencies",
|
|
128
129
|
"devDependencies",
|
|
@@ -883,7 +884,7 @@ var require_lib2 = __commonJS({
|
|
|
883
884
|
var require_commonjs = __commonJS({
|
|
884
885
|
"node_modules/.pnpm/lru-cache@11.2.2/node_modules/lru-cache/dist/commonjs/index.js"(exports2) {
|
|
885
886
|
"use strict";
|
|
886
|
-
|
|
887
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
887
888
|
exports2.LRUCache = void 0;
|
|
888
889
|
var defaultPerf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
|
889
890
|
var warned = /* @__PURE__ */ new Set();
|
|
@@ -2863,11 +2864,11 @@ var require_commonjs2 = __commonJS({
|
|
|
2863
2864
|
var require_commonjs3 = __commonJS({
|
|
2864
2865
|
"node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/commonjs/index.js"(exports2) {
|
|
2865
2866
|
"use strict";
|
|
2866
|
-
|
|
2867
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
2867
2868
|
exports2.EXPANSION_MAX = void 0;
|
|
2868
2869
|
exports2.expand = expand;
|
|
2869
2870
|
var balanced_match_1 = require_commonjs2();
|
|
2870
|
-
var escSlash = "\0SLASH" +
|
|
2871
|
+
var escSlash = "\0SLASH" + _p_MathRandom() + "\0";
|
|
2871
2872
|
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
2872
2873
|
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
2873
2874
|
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
@@ -3191,7 +3192,7 @@ var require_unescape = __commonJS({
|
|
|
3191
3192
|
var require_ast = __commonJS({
|
|
3192
3193
|
"node_modules/.pnpm/minimatch@9.0.6/node_modules/minimatch/dist/commonjs/ast.js"(exports2) {
|
|
3193
3194
|
"use strict";
|
|
3194
|
-
|
|
3195
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
3195
3196
|
exports2.AST = void 0;
|
|
3196
3197
|
var brace_expressions_js_1 = require_brace_expressions();
|
|
3197
3198
|
var unescape_js_1 = require_unescape();
|
|
@@ -3701,7 +3702,7 @@ var require_escape = __commonJS({
|
|
|
3701
3702
|
var require_commonjs4 = __commonJS({
|
|
3702
3703
|
"node_modules/.pnpm/minimatch@9.0.6/node_modules/minimatch/dist/commonjs/index.js"(exports2) {
|
|
3703
3704
|
"use strict";
|
|
3704
|
-
|
|
3705
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
3705
3706
|
exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0;
|
|
3706
3707
|
var brace_expansion_1 = require_commonjs3();
|
|
3707
3708
|
var assert_valid_pattern_js_1 = require_assert_valid_pattern();
|
|
@@ -4462,7 +4463,7 @@ var require_commonjs5 = __commonJS({
|
|
|
4462
4463
|
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
4463
4464
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
4464
4465
|
};
|
|
4465
|
-
|
|
4466
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
4466
4467
|
exports2.Minipass = exports2.isWritable = exports2.isReadable = exports2.isStream = void 0;
|
|
4467
4468
|
var proc = typeof process === "object" && process ? process : {
|
|
4468
4469
|
stdout: null,
|
|
@@ -5366,7 +5367,7 @@ var require_commonjs6 = __commonJS({
|
|
|
5366
5367
|
"use strict";
|
|
5367
5368
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
5368
5369
|
if (k2 === void 0) k2 = k;
|
|
5369
|
-
var desc =
|
|
5370
|
+
var desc = _p_ObjectGetOwnPropertyDescriptor(m, k);
|
|
5370
5371
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5371
5372
|
desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
5372
5373
|
return m[k];
|
|
@@ -7446,7 +7447,7 @@ var require_ignore = __commonJS({
|
|
|
7446
7447
|
var require_processor = __commonJS({
|
|
7447
7448
|
"node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/processor.js"(exports2) {
|
|
7448
7449
|
"use strict";
|
|
7449
|
-
|
|
7450
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
7450
7451
|
exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0;
|
|
7451
7452
|
var minimatch_1 = require_commonjs4();
|
|
7452
7453
|
var HasWalkedCache = class _HasWalkedCache {
|
|
@@ -7691,7 +7692,7 @@ var require_processor = __commonJS({
|
|
|
7691
7692
|
var require_walker = __commonJS({
|
|
7692
7693
|
"node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/walker.js"(exports2) {
|
|
7693
7694
|
"use strict";
|
|
7694
|
-
|
|
7695
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
7695
7696
|
exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0;
|
|
7696
7697
|
var minipass_1 = require_commonjs5();
|
|
7697
7698
|
var ignore_js_1 = require_ignore();
|
|
@@ -8040,7 +8041,7 @@ var require_walker = __commonJS({
|
|
|
8040
8041
|
var require_glob = __commonJS({
|
|
8041
8042
|
"node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/glob.js"(exports2) {
|
|
8042
8043
|
"use strict";
|
|
8043
|
-
|
|
8044
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
8044
8045
|
exports2.Glob = void 0;
|
|
8045
8046
|
var minimatch_1 = require_commonjs4();
|
|
8046
8047
|
var node_url_1 = require("node:url");
|
|
@@ -8277,7 +8278,7 @@ var require_has_magic = __commonJS({
|
|
|
8277
8278
|
var require_commonjs7 = __commonJS({
|
|
8278
8279
|
"node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/index.js"(exports2) {
|
|
8279
8280
|
"use strict";
|
|
8280
|
-
|
|
8281
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
8281
8282
|
exports2.glob = exports2.sync = exports2.iterate = exports2.iterateSync = exports2.stream = exports2.streamSync = exports2.Ignore = exports2.hasMagic = exports2.Glob = exports2.unescape = exports2.escape = void 0;
|
|
8282
8283
|
exports2.globStreamSync = globStreamSync;
|
|
8283
8284
|
exports2.globStream = globStream;
|
|
@@ -10067,179 +10068,4138 @@ var require_normalize_data = __commonJS({
|
|
|
10067
10068
|
}
|
|
10068
10069
|
});
|
|
10069
10070
|
|
|
10070
|
-
//
|
|
10071
|
-
var
|
|
10072
|
-
"
|
|
10071
|
+
// node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js
|
|
10072
|
+
var require_posix = __commonJS({
|
|
10073
|
+
"node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js"(exports2) {
|
|
10073
10074
|
"use strict";
|
|
10074
|
-
|
|
10075
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
10076
|
+
exports2.sync = exports2.isexe = void 0;
|
|
10077
|
+
var fs_1 = require("fs");
|
|
10078
|
+
var promises_1 = require("fs/promises");
|
|
10079
|
+
var isexe = /* @__PURE__ */ __name(async (path, options = {}) => {
|
|
10080
|
+
const { ignoreErrors = false } = options;
|
|
10081
|
+
try {
|
|
10082
|
+
return checkStat(await (0, promises_1.stat)(path), options);
|
|
10083
|
+
} catch (e) {
|
|
10084
|
+
const er = e;
|
|
10085
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
10086
|
+
return false;
|
|
10087
|
+
throw er;
|
|
10088
|
+
}
|
|
10089
|
+
}, "isexe");
|
|
10090
|
+
exports2.isexe = isexe;
|
|
10091
|
+
var sync = /* @__PURE__ */ __name((path, options = {}) => {
|
|
10092
|
+
const { ignoreErrors = false } = options;
|
|
10093
|
+
try {
|
|
10094
|
+
return checkStat((0, fs_1.statSync)(path), options);
|
|
10095
|
+
} catch (e) {
|
|
10096
|
+
const er = e;
|
|
10097
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
10098
|
+
return false;
|
|
10099
|
+
throw er;
|
|
10100
|
+
}
|
|
10101
|
+
}, "sync");
|
|
10102
|
+
exports2.sync = sync;
|
|
10103
|
+
var checkStat = /* @__PURE__ */ __name((stat, options) => stat.isFile() && checkMode(stat, options), "checkStat");
|
|
10104
|
+
var checkMode = /* @__PURE__ */ __name((stat, options) => {
|
|
10105
|
+
const myUid = options.uid ?? process.getuid?.();
|
|
10106
|
+
const myGroups = options.groups ?? process.getgroups?.() ?? [];
|
|
10107
|
+
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
|
|
10108
|
+
if (myUid === void 0 || myGid === void 0) {
|
|
10109
|
+
throw new Error("cannot get uid or gid");
|
|
10110
|
+
}
|
|
10111
|
+
const groups = /* @__PURE__ */ new Set([myGid, ...myGroups]);
|
|
10112
|
+
const mod = stat.mode;
|
|
10113
|
+
const uid = stat.uid;
|
|
10114
|
+
const gid = stat.gid;
|
|
10115
|
+
const u = parseInt("100", 8);
|
|
10116
|
+
const g = parseInt("010", 8);
|
|
10117
|
+
const o = parseInt("001", 8);
|
|
10118
|
+
const ug = u | g;
|
|
10119
|
+
return !!(mod & o || mod & g && groups.has(gid) || mod & u && uid === myUid || mod & ug && myUid === 0);
|
|
10120
|
+
}, "checkMode");
|
|
10075
10121
|
}
|
|
10076
10122
|
});
|
|
10077
10123
|
|
|
10078
|
-
// node_modules/.pnpm
|
|
10079
|
-
var
|
|
10080
|
-
"node_modules/.pnpm
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
var
|
|
10085
|
-
var
|
|
10086
|
-
var
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10124
|
+
// node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js
|
|
10125
|
+
var require_win32 = __commonJS({
|
|
10126
|
+
"node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js"(exports2) {
|
|
10127
|
+
"use strict";
|
|
10128
|
+
_p_ObjectDefineProperty(exports2, "__esModule", { value: true });
|
|
10129
|
+
exports2.sync = exports2.isexe = void 0;
|
|
10130
|
+
var fs_1 = require("fs");
|
|
10131
|
+
var promises_1 = require("fs/promises");
|
|
10132
|
+
var isexe = /* @__PURE__ */ __name(async (path, options = {}) => {
|
|
10133
|
+
const { ignoreErrors = false } = options;
|
|
10134
|
+
try {
|
|
10135
|
+
return checkStat(await (0, promises_1.stat)(path), path, options);
|
|
10136
|
+
} catch (e) {
|
|
10137
|
+
const er = e;
|
|
10138
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
10139
|
+
return false;
|
|
10140
|
+
throw er;
|
|
10091
10141
|
}
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
__name(
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10142
|
+
}, "isexe");
|
|
10143
|
+
exports2.isexe = isexe;
|
|
10144
|
+
var sync = /* @__PURE__ */ __name((path, options = {}) => {
|
|
10145
|
+
const { ignoreErrors = false } = options;
|
|
10146
|
+
try {
|
|
10147
|
+
return checkStat((0, fs_1.statSync)(path), path, options);
|
|
10148
|
+
} catch (e) {
|
|
10149
|
+
const er = e;
|
|
10150
|
+
if (ignoreErrors || er.code === "EACCES")
|
|
10151
|
+
return false;
|
|
10152
|
+
throw er;
|
|
10099
10153
|
}
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
__name(
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
}, {});
|
|
10154
|
+
}, "sync");
|
|
10155
|
+
exports2.sync = sync;
|
|
10156
|
+
var checkPathExt = /* @__PURE__ */ __name((path, options) => {
|
|
10157
|
+
const { pathExt = process.env.PATHEXT || "" } = options;
|
|
10158
|
+
const peSplit = pathExt.split(";");
|
|
10159
|
+
if (peSplit.indexOf("") !== -1) {
|
|
10160
|
+
return true;
|
|
10161
|
+
}
|
|
10162
|
+
for (let i = 0; i < peSplit.length; i++) {
|
|
10163
|
+
const p = peSplit[i].toLowerCase();
|
|
10164
|
+
const ext = path.substring(path.length - p.length).toLowerCase();
|
|
10165
|
+
if (p && ext === p) {
|
|
10166
|
+
return true;
|
|
10114
10167
|
}
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
10168
|
+
}
|
|
10169
|
+
return false;
|
|
10170
|
+
}, "checkPathExt");
|
|
10171
|
+
var checkStat = /* @__PURE__ */ __name((stat, path, options) => stat.isFile() && checkPathExt(path, options), "checkStat");
|
|
10172
|
+
}
|
|
10173
|
+
});
|
|
10174
|
+
|
|
10175
|
+
// node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/options.js
|
|
10176
|
+
var require_options = __commonJS({
|
|
10177
|
+
"node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/options.js"(exports2) {
|
|
10178
|
+
"use strict";
|
|
10179
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10180
|
+
}
|
|
10181
|
+
});
|
|
10182
|
+
|
|
10183
|
+
// node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js
|
|
10184
|
+
var require_cjs = __commonJS({
|
|
10185
|
+
"node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js"(exports2) {
|
|
10186
|
+
"use strict";
|
|
10187
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
10188
|
+
if (k2 === void 0) k2 = k;
|
|
10189
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10190
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10191
|
+
desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
10192
|
+
return m[k];
|
|
10193
|
+
}, "get") };
|
|
10194
|
+
}
|
|
10195
|
+
Object.defineProperty(o, k2, desc);
|
|
10196
|
+
}) : (function(o, m, k, k2) {
|
|
10197
|
+
if (k2 === void 0) k2 = k;
|
|
10198
|
+
o[k2] = m[k];
|
|
10199
|
+
}));
|
|
10200
|
+
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
10201
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
10202
|
+
}) : function(o, v) {
|
|
10203
|
+
o["default"] = v;
|
|
10204
|
+
});
|
|
10205
|
+
var __importStar = exports2 && exports2.__importStar || function(mod) {
|
|
10206
|
+
if (mod && mod.__esModule) return mod;
|
|
10207
|
+
var result = {};
|
|
10208
|
+
if (mod != null) {
|
|
10209
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
10210
|
+
}
|
|
10211
|
+
__setModuleDefault(result, mod);
|
|
10212
|
+
return result;
|
|
10213
|
+
};
|
|
10214
|
+
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
10215
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
|
|
10216
|
+
};
|
|
10217
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10218
|
+
exports2.sync = exports2.isexe = exports2.posix = exports2.win32 = void 0;
|
|
10219
|
+
var posix = __importStar(require_posix());
|
|
10220
|
+
exports2.posix = posix;
|
|
10221
|
+
var win32 = __importStar(require_win32());
|
|
10222
|
+
exports2.win32 = win32;
|
|
10223
|
+
__exportStar(require_options(), exports2);
|
|
10224
|
+
var platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;
|
|
10225
|
+
var impl = platform === "win32" ? win32 : posix;
|
|
10226
|
+
exports2.isexe = impl.isexe;
|
|
10227
|
+
exports2.sync = impl.sync;
|
|
10228
|
+
}
|
|
10229
|
+
});
|
|
10230
|
+
|
|
10231
|
+
// node_modules/.pnpm/which@5.0.0/node_modules/which/lib/index.js
|
|
10232
|
+
var require_lib4 = __commonJS({
|
|
10233
|
+
"node_modules/.pnpm/which@5.0.0/node_modules/which/lib/index.js"(exports2, module2) {
|
|
10234
|
+
var { isexe, sync: isexeSync } = require_cjs();
|
|
10235
|
+
var { join, delimiter, sep, posix } = require("path");
|
|
10236
|
+
var isWindows = process.platform === "win32";
|
|
10237
|
+
var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1"));
|
|
10238
|
+
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
10239
|
+
var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
|
|
10240
|
+
var getPathInfo = /* @__PURE__ */ __name((cmd, {
|
|
10241
|
+
path: optPath = process.env.PATH,
|
|
10242
|
+
pathExt: optPathExt = process.env.PATHEXT,
|
|
10243
|
+
delimiter: optDelimiter = delimiter
|
|
10244
|
+
}) => {
|
|
10245
|
+
const pathEnv = cmd.match(rSlash) ? [""] : [
|
|
10246
|
+
// windows always checks the cwd first
|
|
10247
|
+
...isWindows ? [process.cwd()] : [],
|
|
10248
|
+
...(optPath || /* istanbul ignore next: very unusual */
|
|
10249
|
+
"").split(optDelimiter)
|
|
10250
|
+
];
|
|
10251
|
+
if (isWindows) {
|
|
10252
|
+
const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
|
|
10253
|
+
const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]);
|
|
10254
|
+
if (cmd.includes(".") && pathExt[0] !== "") {
|
|
10255
|
+
pathExt.unshift("");
|
|
10256
|
+
}
|
|
10257
|
+
return { pathEnv, pathExt, pathExtExe };
|
|
10258
|
+
}
|
|
10259
|
+
return { pathEnv, pathExt: [""] };
|
|
10260
|
+
}, "getPathInfo");
|
|
10261
|
+
var getPathPart = /* @__PURE__ */ __name((raw, cmd) => {
|
|
10262
|
+
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
10263
|
+
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
10264
|
+
return prefix + join(pathPart, cmd);
|
|
10265
|
+
}, "getPathPart");
|
|
10266
|
+
var which = /* @__PURE__ */ __name(async (cmd, opt = {}) => {
|
|
10267
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
10268
|
+
const found = [];
|
|
10269
|
+
for (const envPart of pathEnv) {
|
|
10270
|
+
const p = getPathPart(envPart, cmd);
|
|
10271
|
+
for (const ext of pathExt) {
|
|
10272
|
+
const withExt = p + ext;
|
|
10273
|
+
const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
|
10274
|
+
if (is) {
|
|
10275
|
+
if (!opt.all) {
|
|
10276
|
+
return withExt;
|
|
10140
10277
|
}
|
|
10141
|
-
|
|
10278
|
+
found.push(withExt);
|
|
10142
10279
|
}
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10280
|
+
}
|
|
10281
|
+
}
|
|
10282
|
+
if (opt.all && found.length) {
|
|
10283
|
+
return found;
|
|
10284
|
+
}
|
|
10285
|
+
if (opt.nothrow) {
|
|
10286
|
+
return null;
|
|
10287
|
+
}
|
|
10288
|
+
throw getNotFoundError(cmd);
|
|
10289
|
+
}, "which");
|
|
10290
|
+
var whichSync = /* @__PURE__ */ __name((cmd, opt = {}) => {
|
|
10291
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
10292
|
+
const found = [];
|
|
10293
|
+
for (const pathEnvPart of pathEnv) {
|
|
10294
|
+
const p = getPathPart(pathEnvPart, cmd);
|
|
10295
|
+
for (const ext of pathExt) {
|
|
10296
|
+
const withExt = p + ext;
|
|
10297
|
+
const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
|
10298
|
+
if (is) {
|
|
10299
|
+
if (!opt.all) {
|
|
10300
|
+
return withExt;
|
|
10301
|
+
}
|
|
10302
|
+
found.push(withExt);
|
|
10146
10303
|
}
|
|
10147
|
-
return pkg;
|
|
10148
10304
|
}
|
|
10149
10305
|
}
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10306
|
+
if (opt.all && found.length) {
|
|
10307
|
+
return found;
|
|
10308
|
+
}
|
|
10309
|
+
if (opt.nothrow) {
|
|
10310
|
+
return null;
|
|
10311
|
+
}
|
|
10312
|
+
throw getNotFoundError(cmd);
|
|
10313
|
+
}, "whichSync");
|
|
10314
|
+
module2.exports = which;
|
|
10315
|
+
which.sync = whichSync;
|
|
10316
|
+
}
|
|
10317
|
+
});
|
|
10318
|
+
|
|
10319
|
+
// node_modules/.pnpm/@npmcli+promise-spawn@9.0.1/node_modules/@npmcli/promise-spawn/lib/escape.js
|
|
10320
|
+
var require_escape2 = __commonJS({
|
|
10321
|
+
"node_modules/.pnpm/@npmcli+promise-spawn@9.0.1/node_modules/@npmcli/promise-spawn/lib/escape.js"(exports2, module2) {
|
|
10322
|
+
"use strict";
|
|
10323
|
+
var cmd = /* @__PURE__ */ __name((input, doubleEscape) => {
|
|
10324
|
+
if (!input.length) {
|
|
10325
|
+
return '""';
|
|
10326
|
+
}
|
|
10327
|
+
let result;
|
|
10328
|
+
if (!/[ \t\n\v"]/.test(input)) {
|
|
10329
|
+
result = input;
|
|
10330
|
+
} else {
|
|
10331
|
+
result = '"';
|
|
10332
|
+
for (let i = 0; i <= input.length; ++i) {
|
|
10333
|
+
let slashCount = 0;
|
|
10334
|
+
while (input[i] === "\\") {
|
|
10335
|
+
++i;
|
|
10336
|
+
++slashCount;
|
|
10337
|
+
}
|
|
10338
|
+
if (i === input.length) {
|
|
10339
|
+
result += "\\".repeat(slashCount * 2);
|
|
10340
|
+
break;
|
|
10341
|
+
}
|
|
10342
|
+
if (input[i] === '"') {
|
|
10343
|
+
result += "\\".repeat(slashCount * 2 + 1);
|
|
10344
|
+
result += input[i];
|
|
10159
10345
|
} else {
|
|
10160
|
-
|
|
10346
|
+
result += "\\".repeat(slashCount);
|
|
10347
|
+
result += input[i];
|
|
10161
10348
|
}
|
|
10162
10349
|
}
|
|
10163
|
-
|
|
10164
|
-
changes?.push('empty "man" was removed');
|
|
10165
|
-
} else {
|
|
10166
|
-
pkg.man = mans;
|
|
10167
|
-
return pkg;
|
|
10168
|
-
}
|
|
10350
|
+
result += '"';
|
|
10169
10351
|
}
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
function isCorrectlyEncodedName(spec) {
|
|
10174
|
-
return !spec.match(/[/@\s+%:]/) && spec === encodeURIComponent(spec);
|
|
10175
|
-
}
|
|
10176
|
-
__name(isCorrectlyEncodedName, "isCorrectlyEncodedName");
|
|
10177
|
-
function isValidScopedPackageName(spec) {
|
|
10178
|
-
if (spec.charAt(0) !== "@") {
|
|
10179
|
-
return false;
|
|
10352
|
+
result = result.replace(/[ !%^&()<>|"]/g, "^$&");
|
|
10353
|
+
if (doubleEscape) {
|
|
10354
|
+
result = result.replace(/[ !%^&()<>|"]/g, "^$&");
|
|
10180
10355
|
}
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10356
|
+
return result;
|
|
10357
|
+
}, "cmd");
|
|
10358
|
+
var sh = /* @__PURE__ */ __name((input) => {
|
|
10359
|
+
if (!input.length) {
|
|
10360
|
+
return `''`;
|
|
10184
10361
|
}
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
return
|
|
10190
|
-
}
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10362
|
+
if (!/[\t\n\r "#$&'()*;<>?\\`|~]/.test(input)) {
|
|
10363
|
+
return input;
|
|
10364
|
+
}
|
|
10365
|
+
const result = `'${input.replace(/'/g, `'\\''`)}'`.replace(/^(?:'')+(?!$)/, "").replace(/\\'''/g, `\\'`);
|
|
10366
|
+
return result;
|
|
10367
|
+
}, "sh");
|
|
10368
|
+
module2.exports = {
|
|
10369
|
+
cmd,
|
|
10370
|
+
sh
|
|
10371
|
+
};
|
|
10372
|
+
}
|
|
10373
|
+
});
|
|
10374
|
+
|
|
10375
|
+
// node_modules/.pnpm/@npmcli+promise-spawn@9.0.1/node_modules/@npmcli/promise-spawn/lib/index.js
|
|
10376
|
+
var require_lib5 = __commonJS({
|
|
10377
|
+
"node_modules/.pnpm/@npmcli+promise-spawn@9.0.1/node_modules/@npmcli/promise-spawn/lib/index.js"(exports2, module2) {
|
|
10378
|
+
"use strict";
|
|
10379
|
+
var { spawn } = require("child_process");
|
|
10380
|
+
var os = require("os");
|
|
10381
|
+
var which = require_lib4();
|
|
10382
|
+
var escape = require_escape2();
|
|
10383
|
+
var promiseSpawn = /* @__PURE__ */ __name((cmd, args, opts = {}, extra = {}) => {
|
|
10384
|
+
if (opts.shell) {
|
|
10385
|
+
return spawnWithShell(cmd, args, opts, extra);
|
|
10386
|
+
}
|
|
10387
|
+
let resolve, reject;
|
|
10388
|
+
const promise = new Promise((_resolve, _reject) => {
|
|
10389
|
+
resolve = _resolve;
|
|
10390
|
+
reject = _reject;
|
|
10391
|
+
});
|
|
10392
|
+
const closeError = new Error("command failed");
|
|
10393
|
+
const stdout = [];
|
|
10394
|
+
const stderr = [];
|
|
10395
|
+
const getResult = /* @__PURE__ */ __name((result) => ({
|
|
10396
|
+
cmd,
|
|
10397
|
+
args,
|
|
10398
|
+
...result,
|
|
10399
|
+
...stdioResult(stdout, stderr, opts),
|
|
10400
|
+
...extra
|
|
10401
|
+
}), "getResult");
|
|
10402
|
+
const rejectWithOpts = /* @__PURE__ */ __name((er, erOpts) => {
|
|
10403
|
+
const resultError = getResult(erOpts);
|
|
10404
|
+
reject(Object.assign(er, resultError));
|
|
10405
|
+
}, "rejectWithOpts");
|
|
10406
|
+
const proc = spawn(cmd, args, opts);
|
|
10407
|
+
promise.stdin = proc.stdin;
|
|
10408
|
+
promise.process = proc;
|
|
10409
|
+
proc.on("error", rejectWithOpts);
|
|
10410
|
+
if (proc.stdout) {
|
|
10411
|
+
proc.stdout.on("data", (c) => stdout.push(c));
|
|
10412
|
+
proc.stdout.on("error", rejectWithOpts);
|
|
10413
|
+
}
|
|
10414
|
+
if (proc.stderr) {
|
|
10415
|
+
proc.stderr.on("data", (c) => stderr.push(c));
|
|
10416
|
+
proc.stderr.on("error", rejectWithOpts);
|
|
10417
|
+
}
|
|
10418
|
+
proc.on("close", (code, signal) => {
|
|
10419
|
+
if (code || signal) {
|
|
10420
|
+
rejectWithOpts(closeError, { code, signal });
|
|
10204
10421
|
} else {
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10422
|
+
resolve(getResult({ code, signal }));
|
|
10423
|
+
}
|
|
10424
|
+
});
|
|
10425
|
+
return promise;
|
|
10426
|
+
}, "promiseSpawn");
|
|
10427
|
+
var spawnWithShell = /* @__PURE__ */ __name((cmd, args, opts, extra) => {
|
|
10428
|
+
let command = opts.shell;
|
|
10429
|
+
if (command === true) {
|
|
10430
|
+
command = process.platform === "win32" ? process.env.ComSpec || "cmd.exe" : "sh";
|
|
10431
|
+
}
|
|
10432
|
+
const options = { ...opts, shell: false };
|
|
10433
|
+
const realArgs = [];
|
|
10434
|
+
let script = cmd;
|
|
10435
|
+
const isCmd = /(?:^|\\)cmd(?:\.exe)?$/i.test(command);
|
|
10436
|
+
if (isCmd) {
|
|
10437
|
+
let doubleEscape = false;
|
|
10438
|
+
let initialCmd = "";
|
|
10439
|
+
let insideQuotes = false;
|
|
10440
|
+
for (let i = 0; i < cmd.length; ++i) {
|
|
10441
|
+
const char = cmd.charAt(i);
|
|
10442
|
+
if (char === " " && !insideQuotes) {
|
|
10443
|
+
break;
|
|
10214
10444
|
}
|
|
10215
|
-
|
|
10216
|
-
|
|
10445
|
+
initialCmd += char;
|
|
10446
|
+
if (char === '"' || char === "'") {
|
|
10447
|
+
insideQuotes = !insideQuotes;
|
|
10217
10448
|
}
|
|
10218
10449
|
}
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10450
|
+
let pathToInitial;
|
|
10451
|
+
try {
|
|
10452
|
+
pathToInitial = which.sync(initialCmd, {
|
|
10453
|
+
path: options.env && findInObject(options.env, "PATH") || process.env.PATH,
|
|
10454
|
+
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
10455
|
+
}).toLowerCase();
|
|
10456
|
+
} catch (err) {
|
|
10457
|
+
pathToInitial = initialCmd.toLowerCase();
|
|
10458
|
+
}
|
|
10459
|
+
doubleEscape = pathToInitial.endsWith(".cmd") || pathToInitial.endsWith(".bat");
|
|
10460
|
+
for (const arg of args) {
|
|
10461
|
+
script += ` ${escape.cmd(arg, doubleEscape)}`;
|
|
10462
|
+
}
|
|
10463
|
+
realArgs.push("/d", "/s", "/c", script);
|
|
10464
|
+
options.windowsVerbatimArguments = true;
|
|
10465
|
+
} else {
|
|
10466
|
+
for (const arg of args) {
|
|
10467
|
+
script += ` ${escape.sh(arg)}`;
|
|
10468
|
+
}
|
|
10469
|
+
realArgs.push("-c", script);
|
|
10470
|
+
}
|
|
10471
|
+
return promiseSpawn(command, realArgs, options, extra);
|
|
10472
|
+
}, "spawnWithShell");
|
|
10473
|
+
var open = /* @__PURE__ */ __name((_args, opts = {}, extra = {}) => {
|
|
10474
|
+
const options = { ...opts, shell: true };
|
|
10475
|
+
const args = [].concat(_args);
|
|
10476
|
+
let platform = process.platform;
|
|
10477
|
+
if (platform === "linux" && os.release().toLowerCase().includes("microsoft")) {
|
|
10478
|
+
platform = "wsl";
|
|
10479
|
+
if (!process.env.BROWSER) {
|
|
10480
|
+
return Promise.reject(
|
|
10481
|
+
new Error("Set the BROWSER environment variable to your desired browser.")
|
|
10482
|
+
);
|
|
10223
10483
|
}
|
|
10224
10484
|
}
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
if (
|
|
10228
|
-
|
|
10485
|
+
let command = options.command;
|
|
10486
|
+
if (!command) {
|
|
10487
|
+
if (platform === "win32") {
|
|
10488
|
+
options.shell = process.env.ComSpec;
|
|
10489
|
+
command = 'start ""';
|
|
10490
|
+
} else if (platform === "wsl") {
|
|
10491
|
+
command = "sensible-browser";
|
|
10492
|
+
} else if (platform === "darwin") {
|
|
10493
|
+
command = "open";
|
|
10229
10494
|
} else {
|
|
10230
|
-
|
|
10231
|
-
throw new Error(`Invalid version: "${data.version}"`);
|
|
10232
|
-
}
|
|
10233
|
-
const version = clean(data.version, loose);
|
|
10234
|
-
if (version !== data.version) {
|
|
10235
|
-
changes?.push(`"version" was cleaned and set to "${version}"`);
|
|
10236
|
-
data.version = version;
|
|
10237
|
-
}
|
|
10495
|
+
command = "xdg-open";
|
|
10238
10496
|
}
|
|
10239
10497
|
}
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10498
|
+
return spawnWithShell(command, args, options, extra);
|
|
10499
|
+
}, "open");
|
|
10500
|
+
promiseSpawn.open = open;
|
|
10501
|
+
var isPipe = /* @__PURE__ */ __name((stdio = "pipe", fd) => {
|
|
10502
|
+
if (stdio === "pipe" || stdio === null) {
|
|
10503
|
+
return true;
|
|
10504
|
+
}
|
|
10505
|
+
if (Array.isArray(stdio)) {
|
|
10506
|
+
return isPipe(stdio[fd], fd);
|
|
10507
|
+
}
|
|
10508
|
+
return false;
|
|
10509
|
+
}, "isPipe");
|
|
10510
|
+
var stdioResult = /* @__PURE__ */ __name((stdout, stderr, { stdioString = true, stdio }) => {
|
|
10511
|
+
const result = {
|
|
10512
|
+
stdout: null,
|
|
10513
|
+
stderr: null
|
|
10514
|
+
};
|
|
10515
|
+
if (isPipe(stdio, 1)) {
|
|
10516
|
+
result.stdout = Buffer.concat(stdout);
|
|
10517
|
+
if (stdioString) {
|
|
10518
|
+
result.stdout = result.stdout.toString().trim();
|
|
10519
|
+
}
|
|
10520
|
+
}
|
|
10521
|
+
if (isPipe(stdio, 2)) {
|
|
10522
|
+
result.stderr = Buffer.concat(stderr);
|
|
10523
|
+
if (stdioString) {
|
|
10524
|
+
result.stderr = result.stderr.toString().trim();
|
|
10525
|
+
}
|
|
10526
|
+
}
|
|
10527
|
+
return result;
|
|
10528
|
+
}, "stdioResult");
|
|
10529
|
+
var findInObject = /* @__PURE__ */ __name((obj, key) => {
|
|
10530
|
+
key = key.toLowerCase();
|
|
10531
|
+
for (const objKey of Object.keys(obj).sort()) {
|
|
10532
|
+
if (objKey.toLowerCase() === key) {
|
|
10533
|
+
return obj[objKey];
|
|
10534
|
+
}
|
|
10535
|
+
}
|
|
10536
|
+
}, "findInObject");
|
|
10537
|
+
module2.exports = promiseSpawn;
|
|
10538
|
+
}
|
|
10539
|
+
});
|
|
10540
|
+
|
|
10541
|
+
// node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.js
|
|
10542
|
+
var require_err_code = __commonJS({
|
|
10543
|
+
"node_modules/.pnpm/err-code@2.0.3/node_modules/err-code/index.js"(exports2, module2) {
|
|
10544
|
+
"use strict";
|
|
10545
|
+
function assign(obj, props) {
|
|
10546
|
+
for (const key in props) {
|
|
10547
|
+
Object.defineProperty(obj, key, {
|
|
10548
|
+
value: props[key],
|
|
10549
|
+
enumerable: true,
|
|
10550
|
+
configurable: true
|
|
10551
|
+
});
|
|
10552
|
+
}
|
|
10553
|
+
return obj;
|
|
10554
|
+
}
|
|
10555
|
+
__name(assign, "assign");
|
|
10556
|
+
function createError(err, code, props) {
|
|
10557
|
+
if (!err || typeof err === "string") {
|
|
10558
|
+
throw new TypeError("Please pass an Error to err-code");
|
|
10559
|
+
}
|
|
10560
|
+
if (!props) {
|
|
10561
|
+
props = {};
|
|
10562
|
+
}
|
|
10563
|
+
if (typeof code === "object") {
|
|
10564
|
+
props = code;
|
|
10565
|
+
code = void 0;
|
|
10566
|
+
}
|
|
10567
|
+
if (code != null) {
|
|
10568
|
+
props.code = code;
|
|
10569
|
+
}
|
|
10570
|
+
try {
|
|
10571
|
+
return assign(err, props);
|
|
10572
|
+
} catch (_) {
|
|
10573
|
+
props.message = err.message;
|
|
10574
|
+
props.stack = err.stack;
|
|
10575
|
+
const ErrClass = /* @__PURE__ */ __name(function() {
|
|
10576
|
+
}, "ErrClass");
|
|
10577
|
+
ErrClass.prototype = Object.create(Object.getPrototypeOf(err));
|
|
10578
|
+
return assign(new ErrClass(), props);
|
|
10579
|
+
}
|
|
10580
|
+
}
|
|
10581
|
+
__name(createError, "createError");
|
|
10582
|
+
module2.exports = createError;
|
|
10583
|
+
}
|
|
10584
|
+
});
|
|
10585
|
+
|
|
10586
|
+
// node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js
|
|
10587
|
+
var require_retry_operation = __commonJS({
|
|
10588
|
+
"node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js"(exports2, module2) {
|
|
10589
|
+
function RetryOperation(timeouts, options) {
|
|
10590
|
+
if (typeof options === "boolean") {
|
|
10591
|
+
options = { forever: options };
|
|
10592
|
+
}
|
|
10593
|
+
this._originalTimeouts = _p_JSONParse(_p_JSONStringify(timeouts));
|
|
10594
|
+
this._timeouts = timeouts;
|
|
10595
|
+
this._options = options || {};
|
|
10596
|
+
this._maxRetryTime = options && options.maxRetryTime || Infinity;
|
|
10597
|
+
this._fn = null;
|
|
10598
|
+
this._errors = [];
|
|
10599
|
+
this._attempts = 1;
|
|
10600
|
+
this._operationTimeout = null;
|
|
10601
|
+
this._operationTimeoutCb = null;
|
|
10602
|
+
this._timeout = null;
|
|
10603
|
+
this._operationStart = null;
|
|
10604
|
+
if (this._options.forever) {
|
|
10605
|
+
this._cachedTimeouts = this._timeouts.slice(0);
|
|
10606
|
+
}
|
|
10607
|
+
}
|
|
10608
|
+
__name(RetryOperation, "RetryOperation");
|
|
10609
|
+
module2.exports = RetryOperation;
|
|
10610
|
+
RetryOperation.prototype.reset = function() {
|
|
10611
|
+
this._attempts = 1;
|
|
10612
|
+
this._timeouts = this._originalTimeouts;
|
|
10613
|
+
};
|
|
10614
|
+
RetryOperation.prototype.stop = function() {
|
|
10615
|
+
if (this._timeout) {
|
|
10616
|
+
clearTimeout(this._timeout);
|
|
10617
|
+
}
|
|
10618
|
+
this._timeouts = [];
|
|
10619
|
+
this._cachedTimeouts = null;
|
|
10620
|
+
};
|
|
10621
|
+
RetryOperation.prototype.retry = function(err) {
|
|
10622
|
+
if (this._timeout) {
|
|
10623
|
+
clearTimeout(this._timeout);
|
|
10624
|
+
}
|
|
10625
|
+
if (!err) {
|
|
10626
|
+
return false;
|
|
10627
|
+
}
|
|
10628
|
+
var currentTime = (/* @__PURE__ */ new Date()).getTime();
|
|
10629
|
+
if (err && currentTime - this._operationStart >= this._maxRetryTime) {
|
|
10630
|
+
this._errors.unshift(new Error("RetryOperation timeout occurred"));
|
|
10631
|
+
return false;
|
|
10632
|
+
}
|
|
10633
|
+
this._errors.push(err);
|
|
10634
|
+
var timeout = this._timeouts.shift();
|
|
10635
|
+
if (timeout === void 0) {
|
|
10636
|
+
if (this._cachedTimeouts) {
|
|
10637
|
+
this._errors.splice(this._errors.length - 1, this._errors.length);
|
|
10638
|
+
this._timeouts = this._cachedTimeouts.slice(0);
|
|
10639
|
+
timeout = this._timeouts.shift();
|
|
10640
|
+
} else {
|
|
10641
|
+
return false;
|
|
10642
|
+
}
|
|
10643
|
+
}
|
|
10644
|
+
var self = this;
|
|
10645
|
+
var timer = setTimeout(function() {
|
|
10646
|
+
self._attempts++;
|
|
10647
|
+
if (self._operationTimeoutCb) {
|
|
10648
|
+
self._timeout = setTimeout(function() {
|
|
10649
|
+
self._operationTimeoutCb(self._attempts);
|
|
10650
|
+
}, self._operationTimeout);
|
|
10651
|
+
if (self._options.unref) {
|
|
10652
|
+
self._timeout.unref();
|
|
10653
|
+
}
|
|
10654
|
+
}
|
|
10655
|
+
self._fn(self._attempts);
|
|
10656
|
+
}, timeout);
|
|
10657
|
+
if (this._options.unref) {
|
|
10658
|
+
timer.unref();
|
|
10659
|
+
}
|
|
10660
|
+
return true;
|
|
10661
|
+
};
|
|
10662
|
+
RetryOperation.prototype.attempt = function(fn, timeoutOps) {
|
|
10663
|
+
this._fn = fn;
|
|
10664
|
+
if (timeoutOps) {
|
|
10665
|
+
if (timeoutOps.timeout) {
|
|
10666
|
+
this._operationTimeout = timeoutOps.timeout;
|
|
10667
|
+
}
|
|
10668
|
+
if (timeoutOps.cb) {
|
|
10669
|
+
this._operationTimeoutCb = timeoutOps.cb;
|
|
10670
|
+
}
|
|
10671
|
+
}
|
|
10672
|
+
var self = this;
|
|
10673
|
+
if (this._operationTimeoutCb) {
|
|
10674
|
+
this._timeout = setTimeout(function() {
|
|
10675
|
+
self._operationTimeoutCb();
|
|
10676
|
+
}, self._operationTimeout);
|
|
10677
|
+
}
|
|
10678
|
+
this._operationStart = (/* @__PURE__ */ new Date()).getTime();
|
|
10679
|
+
this._fn(this._attempts);
|
|
10680
|
+
};
|
|
10681
|
+
RetryOperation.prototype.try = function(fn) {
|
|
10682
|
+
/* @__PURE__ */ console.log("Using RetryOperation.try() is deprecated");
|
|
10683
|
+
this.attempt(fn);
|
|
10684
|
+
};
|
|
10685
|
+
RetryOperation.prototype.start = function(fn) {
|
|
10686
|
+
/* @__PURE__ */ console.log("Using RetryOperation.start() is deprecated");
|
|
10687
|
+
this.attempt(fn);
|
|
10688
|
+
};
|
|
10689
|
+
RetryOperation.prototype.start = RetryOperation.prototype.try;
|
|
10690
|
+
RetryOperation.prototype.errors = function() {
|
|
10691
|
+
return this._errors;
|
|
10692
|
+
};
|
|
10693
|
+
RetryOperation.prototype.attempts = function() {
|
|
10694
|
+
return this._attempts;
|
|
10695
|
+
};
|
|
10696
|
+
RetryOperation.prototype.mainError = function() {
|
|
10697
|
+
if (this._errors.length === 0) {
|
|
10698
|
+
return null;
|
|
10699
|
+
}
|
|
10700
|
+
var counts = {};
|
|
10701
|
+
var mainError = null;
|
|
10702
|
+
var mainErrorCount = 0;
|
|
10703
|
+
for (var i = 0; i < this._errors.length; i++) {
|
|
10704
|
+
var error = this._errors[i];
|
|
10705
|
+
var message = error.message;
|
|
10706
|
+
var count = (counts[message] || 0) + 1;
|
|
10707
|
+
counts[message] = count;
|
|
10708
|
+
if (count >= mainErrorCount) {
|
|
10709
|
+
mainError = error;
|
|
10710
|
+
mainErrorCount = count;
|
|
10711
|
+
}
|
|
10712
|
+
}
|
|
10713
|
+
return mainError;
|
|
10714
|
+
};
|
|
10715
|
+
}
|
|
10716
|
+
});
|
|
10717
|
+
|
|
10718
|
+
// node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js
|
|
10719
|
+
var require_retry = __commonJS({
|
|
10720
|
+
"node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js"(exports2) {
|
|
10721
|
+
var RetryOperation = require_retry_operation();
|
|
10722
|
+
exports2.operation = function(options) {
|
|
10723
|
+
var timeouts = exports2.timeouts(options);
|
|
10724
|
+
return new RetryOperation(timeouts, {
|
|
10725
|
+
forever: options && options.forever,
|
|
10726
|
+
unref: options && options.unref,
|
|
10727
|
+
maxRetryTime: options && options.maxRetryTime
|
|
10728
|
+
});
|
|
10729
|
+
};
|
|
10730
|
+
exports2.timeouts = function(options) {
|
|
10731
|
+
if (options instanceof Array) {
|
|
10732
|
+
return [].concat(options);
|
|
10733
|
+
}
|
|
10734
|
+
var opts = {
|
|
10735
|
+
retries: 10,
|
|
10736
|
+
factor: 2,
|
|
10737
|
+
minTimeout: 1 * 1e3,
|
|
10738
|
+
maxTimeout: Infinity,
|
|
10739
|
+
randomize: false
|
|
10740
|
+
};
|
|
10741
|
+
for (var key in options) {
|
|
10742
|
+
opts[key] = options[key];
|
|
10743
|
+
}
|
|
10744
|
+
if (opts.minTimeout > opts.maxTimeout) {
|
|
10745
|
+
throw new Error("minTimeout is greater than maxTimeout");
|
|
10746
|
+
}
|
|
10747
|
+
var timeouts = [];
|
|
10748
|
+
for (var i = 0; i < opts.retries; i++) {
|
|
10749
|
+
timeouts.push(this.createTimeout(i, opts));
|
|
10750
|
+
}
|
|
10751
|
+
if (options && options.forever && !timeouts.length) {
|
|
10752
|
+
timeouts.push(this.createTimeout(i, opts));
|
|
10753
|
+
}
|
|
10754
|
+
timeouts.sort(function(a, b) {
|
|
10755
|
+
return a - b;
|
|
10756
|
+
});
|
|
10757
|
+
return timeouts;
|
|
10758
|
+
};
|
|
10759
|
+
exports2.createTimeout = function(attempt, opts) {
|
|
10760
|
+
var random = opts.randomize ? Math.random() + 1 : 1;
|
|
10761
|
+
var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
|
|
10762
|
+
timeout = Math.min(timeout, opts.maxTimeout);
|
|
10763
|
+
return timeout;
|
|
10764
|
+
};
|
|
10765
|
+
exports2.wrap = function(obj, options, methods) {
|
|
10766
|
+
if (options instanceof Array) {
|
|
10767
|
+
methods = options;
|
|
10768
|
+
options = null;
|
|
10769
|
+
}
|
|
10770
|
+
if (!methods) {
|
|
10771
|
+
methods = [];
|
|
10772
|
+
for (var key in obj) {
|
|
10773
|
+
if (typeof obj[key] === "function") {
|
|
10774
|
+
methods.push(key);
|
|
10775
|
+
}
|
|
10776
|
+
}
|
|
10777
|
+
}
|
|
10778
|
+
for (var i = 0; i < methods.length; i++) {
|
|
10779
|
+
var method = methods[i];
|
|
10780
|
+
var original = obj[method];
|
|
10781
|
+
obj[method] = (/* @__PURE__ */ __name(function retryWrapper(original2) {
|
|
10782
|
+
var op = exports2.operation(options);
|
|
10783
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
10784
|
+
var callback = args.pop();
|
|
10785
|
+
args.push(function(err) {
|
|
10786
|
+
if (op.retry(err)) {
|
|
10787
|
+
return;
|
|
10788
|
+
}
|
|
10789
|
+
if (err) {
|
|
10790
|
+
arguments[0] = op.mainError();
|
|
10791
|
+
}
|
|
10792
|
+
callback.apply(this, arguments);
|
|
10793
|
+
});
|
|
10794
|
+
op.attempt(function() {
|
|
10795
|
+
original2.apply(obj, args);
|
|
10796
|
+
});
|
|
10797
|
+
}, "retryWrapper")).bind(obj, original);
|
|
10798
|
+
obj[method].options = options;
|
|
10799
|
+
}
|
|
10800
|
+
};
|
|
10801
|
+
}
|
|
10802
|
+
});
|
|
10803
|
+
|
|
10804
|
+
// node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js
|
|
10805
|
+
var require_retry2 = __commonJS({
|
|
10806
|
+
"node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js"(exports2, module2) {
|
|
10807
|
+
module2.exports = require_retry();
|
|
10808
|
+
}
|
|
10809
|
+
});
|
|
10810
|
+
|
|
10811
|
+
// node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/index.js
|
|
10812
|
+
var require_promise_retry = __commonJS({
|
|
10813
|
+
"node_modules/.pnpm/promise-retry@2.0.1/node_modules/promise-retry/index.js"(exports2, module2) {
|
|
10814
|
+
"use strict";
|
|
10815
|
+
var errcode = require_err_code();
|
|
10816
|
+
var retry = require_retry2();
|
|
10817
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
10818
|
+
function isRetryError(err) {
|
|
10819
|
+
return err && err.code === "EPROMISERETRY" && hasOwn.call(err, "retried");
|
|
10820
|
+
}
|
|
10821
|
+
__name(isRetryError, "isRetryError");
|
|
10822
|
+
function promiseRetry(fn, options) {
|
|
10823
|
+
var temp;
|
|
10824
|
+
var operation;
|
|
10825
|
+
if (typeof fn === "object" && typeof options === "function") {
|
|
10826
|
+
temp = options;
|
|
10827
|
+
options = fn;
|
|
10828
|
+
fn = temp;
|
|
10829
|
+
}
|
|
10830
|
+
operation = retry.operation(options);
|
|
10831
|
+
return new Promise(function(resolve, reject) {
|
|
10832
|
+
operation.attempt(function(number) {
|
|
10833
|
+
Promise.resolve().then(function() {
|
|
10834
|
+
return fn(function(err) {
|
|
10835
|
+
if (isRetryError(err)) {
|
|
10836
|
+
err = err.retried;
|
|
10837
|
+
}
|
|
10838
|
+
throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err });
|
|
10839
|
+
}, number);
|
|
10840
|
+
}).then(resolve, function(err) {
|
|
10841
|
+
if (isRetryError(err)) {
|
|
10842
|
+
err = err.retried;
|
|
10843
|
+
if (operation.retry(err || new Error())) {
|
|
10844
|
+
return;
|
|
10845
|
+
}
|
|
10846
|
+
}
|
|
10847
|
+
reject(err);
|
|
10848
|
+
});
|
|
10849
|
+
});
|
|
10850
|
+
});
|
|
10851
|
+
}
|
|
10852
|
+
__name(promiseRetry, "promiseRetry");
|
|
10853
|
+
module2.exports = promiseRetry;
|
|
10854
|
+
}
|
|
10855
|
+
});
|
|
10856
|
+
|
|
10857
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/errors.js
|
|
10858
|
+
var require_errors = __commonJS({
|
|
10859
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/errors.js"(exports2, module2) {
|
|
10860
|
+
var maxRetry = 3;
|
|
10861
|
+
var GitError = class extends Error {
|
|
10862
|
+
static {
|
|
10863
|
+
__name(this, "GitError");
|
|
10864
|
+
}
|
|
10865
|
+
shouldRetry() {
|
|
10866
|
+
return false;
|
|
10867
|
+
}
|
|
10868
|
+
};
|
|
10869
|
+
var GitConnectionError = class extends GitError {
|
|
10870
|
+
static {
|
|
10871
|
+
__name(this, "GitConnectionError");
|
|
10872
|
+
}
|
|
10873
|
+
constructor() {
|
|
10874
|
+
super("A git connection error occurred");
|
|
10875
|
+
}
|
|
10876
|
+
shouldRetry(number) {
|
|
10877
|
+
return number < maxRetry;
|
|
10878
|
+
}
|
|
10879
|
+
};
|
|
10880
|
+
var GitPathspecError = class extends GitError {
|
|
10881
|
+
static {
|
|
10882
|
+
__name(this, "GitPathspecError");
|
|
10883
|
+
}
|
|
10884
|
+
constructor() {
|
|
10885
|
+
super("The git reference could not be found");
|
|
10886
|
+
}
|
|
10887
|
+
};
|
|
10888
|
+
var GitUnknownError = class extends GitError {
|
|
10889
|
+
static {
|
|
10890
|
+
__name(this, "GitUnknownError");
|
|
10891
|
+
}
|
|
10892
|
+
constructor() {
|
|
10893
|
+
super("An unknown git error occurred");
|
|
10894
|
+
}
|
|
10895
|
+
};
|
|
10896
|
+
module2.exports = {
|
|
10897
|
+
GitConnectionError,
|
|
10898
|
+
GitPathspecError,
|
|
10899
|
+
GitUnknownError
|
|
10900
|
+
};
|
|
10901
|
+
}
|
|
10902
|
+
});
|
|
10903
|
+
|
|
10904
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/make-error.js
|
|
10905
|
+
var require_make_error = __commonJS({
|
|
10906
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/make-error.js"(exports2, module2) {
|
|
10907
|
+
var {
|
|
10908
|
+
GitConnectionError,
|
|
10909
|
+
GitPathspecError,
|
|
10910
|
+
GitUnknownError
|
|
10911
|
+
} = require_errors();
|
|
10912
|
+
var connectionErrorRe = new RegExp([
|
|
10913
|
+
"remote error: Internal Server Error",
|
|
10914
|
+
"The remote end hung up unexpectedly",
|
|
10915
|
+
"Connection timed out",
|
|
10916
|
+
"Operation timed out",
|
|
10917
|
+
"Failed to connect to .* Timed out",
|
|
10918
|
+
"Connection reset by peer",
|
|
10919
|
+
"SSL_ERROR_SYSCALL",
|
|
10920
|
+
"The requested URL returned error: 503"
|
|
10921
|
+
].join("|"));
|
|
10922
|
+
var missingPathspecRe = /pathspec .* did not match any file\(s\) known to git/;
|
|
10923
|
+
function makeError(er) {
|
|
10924
|
+
const message = er.stderr;
|
|
10925
|
+
let gitEr;
|
|
10926
|
+
if (connectionErrorRe.test(message)) {
|
|
10927
|
+
gitEr = new GitConnectionError(message);
|
|
10928
|
+
} else if (missingPathspecRe.test(message)) {
|
|
10929
|
+
gitEr = new GitPathspecError(message);
|
|
10930
|
+
} else {
|
|
10931
|
+
gitEr = new GitUnknownError(message);
|
|
10932
|
+
}
|
|
10933
|
+
return Object.assign(gitEr, er);
|
|
10934
|
+
}
|
|
10935
|
+
__name(makeError, "makeError");
|
|
10936
|
+
module2.exports = makeError;
|
|
10937
|
+
}
|
|
10938
|
+
});
|
|
10939
|
+
|
|
10940
|
+
// node_modules/.pnpm/ini@5.0.0/node_modules/ini/lib/ini.js
|
|
10941
|
+
var require_ini = __commonJS({
|
|
10942
|
+
"node_modules/.pnpm/ini@5.0.0/node_modules/ini/lib/ini.js"(exports2, module2) {
|
|
10943
|
+
var { hasOwnProperty } = Object.prototype;
|
|
10944
|
+
var encode = /* @__PURE__ */ __name((obj, opt = {}) => {
|
|
10945
|
+
if (typeof opt === "string") {
|
|
10946
|
+
opt = { section: opt };
|
|
10947
|
+
}
|
|
10948
|
+
opt.align = opt.align === true;
|
|
10949
|
+
opt.newline = opt.newline === true;
|
|
10950
|
+
opt.sort = opt.sort === true;
|
|
10951
|
+
opt.whitespace = opt.whitespace === true || opt.align === true;
|
|
10952
|
+
opt.platform = opt.platform || typeof process !== "undefined" && process.platform;
|
|
10953
|
+
opt.bracketedArray = opt.bracketedArray !== false;
|
|
10954
|
+
const eol = opt.platform === "win32" ? "\r\n" : "\n";
|
|
10955
|
+
const separator = opt.whitespace ? " = " : "=";
|
|
10956
|
+
const children = [];
|
|
10957
|
+
const keys = opt.sort ? Object.keys(obj).sort() : Object.keys(obj);
|
|
10958
|
+
let padToChars = 0;
|
|
10959
|
+
if (opt.align) {
|
|
10960
|
+
padToChars = safe(
|
|
10961
|
+
keys.filter((k) => obj[k] === null || Array.isArray(obj[k]) || typeof obj[k] !== "object").map((k) => Array.isArray(obj[k]) ? `${k}[]` : k).concat([""]).reduce((a, b) => safe(a).length >= safe(b).length ? a : b)
|
|
10962
|
+
).length;
|
|
10963
|
+
}
|
|
10964
|
+
let out = "";
|
|
10965
|
+
const arraySuffix = opt.bracketedArray ? "[]" : "";
|
|
10966
|
+
for (const k of keys) {
|
|
10967
|
+
const val = obj[k];
|
|
10968
|
+
if (val && Array.isArray(val)) {
|
|
10969
|
+
for (const item of val) {
|
|
10970
|
+
out += safe(`${k}${arraySuffix}`).padEnd(padToChars, " ") + separator + safe(item) + eol;
|
|
10971
|
+
}
|
|
10972
|
+
} else if (val && typeof val === "object") {
|
|
10973
|
+
children.push(k);
|
|
10974
|
+
} else {
|
|
10975
|
+
out += safe(k).padEnd(padToChars, " ") + separator + safe(val) + eol;
|
|
10976
|
+
}
|
|
10977
|
+
}
|
|
10978
|
+
if (opt.section && out.length) {
|
|
10979
|
+
out = "[" + safe(opt.section) + "]" + (opt.newline ? eol + eol : eol) + out;
|
|
10980
|
+
}
|
|
10981
|
+
for (const k of children) {
|
|
10982
|
+
const nk = splitSections(k, ".").join("\\.");
|
|
10983
|
+
const section = (opt.section ? opt.section + "." : "") + nk;
|
|
10984
|
+
const child = encode(obj[k], {
|
|
10985
|
+
...opt,
|
|
10986
|
+
section
|
|
10987
|
+
});
|
|
10988
|
+
if (out.length && child.length) {
|
|
10989
|
+
out += eol;
|
|
10990
|
+
}
|
|
10991
|
+
out += child;
|
|
10992
|
+
}
|
|
10993
|
+
return out;
|
|
10994
|
+
}, "encode");
|
|
10995
|
+
function splitSections(str, separator) {
|
|
10996
|
+
var lastMatchIndex = 0;
|
|
10997
|
+
var lastSeparatorIndex = 0;
|
|
10998
|
+
var nextIndex = 0;
|
|
10999
|
+
var sections = [];
|
|
11000
|
+
do {
|
|
11001
|
+
nextIndex = str.indexOf(separator, lastMatchIndex);
|
|
11002
|
+
if (nextIndex !== -1) {
|
|
11003
|
+
lastMatchIndex = nextIndex + separator.length;
|
|
11004
|
+
if (nextIndex > 0 && str[nextIndex - 1] === "\\") {
|
|
11005
|
+
continue;
|
|
11006
|
+
}
|
|
11007
|
+
sections.push(str.slice(lastSeparatorIndex, nextIndex));
|
|
11008
|
+
lastSeparatorIndex = nextIndex + separator.length;
|
|
11009
|
+
}
|
|
11010
|
+
} while (nextIndex !== -1);
|
|
11011
|
+
sections.push(str.slice(lastSeparatorIndex));
|
|
11012
|
+
return sections;
|
|
11013
|
+
}
|
|
11014
|
+
__name(splitSections, "splitSections");
|
|
11015
|
+
var decode = /* @__PURE__ */ __name((str, opt = {}) => {
|
|
11016
|
+
opt.bracketedArray = opt.bracketedArray !== false;
|
|
11017
|
+
const out = /* @__PURE__ */ Object.create(null);
|
|
11018
|
+
let p = out;
|
|
11019
|
+
let section = null;
|
|
11020
|
+
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
|
11021
|
+
const lines = str.split(/[\r\n]+/g);
|
|
11022
|
+
const duplicates = {};
|
|
11023
|
+
for (const line of lines) {
|
|
11024
|
+
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
|
11025
|
+
continue;
|
|
11026
|
+
}
|
|
11027
|
+
const match = line.match(re);
|
|
11028
|
+
if (!match) {
|
|
11029
|
+
continue;
|
|
11030
|
+
}
|
|
11031
|
+
if (match[1] !== void 0) {
|
|
11032
|
+
section = unsafe(match[1]);
|
|
11033
|
+
if (section === "__proto__") {
|
|
11034
|
+
p = /* @__PURE__ */ Object.create(null);
|
|
11035
|
+
continue;
|
|
11036
|
+
}
|
|
11037
|
+
p = out[section] = out[section] || /* @__PURE__ */ Object.create(null);
|
|
11038
|
+
continue;
|
|
11039
|
+
}
|
|
11040
|
+
const keyRaw = unsafe(match[2]);
|
|
11041
|
+
let isArray;
|
|
11042
|
+
if (opt.bracketedArray) {
|
|
11043
|
+
isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]";
|
|
11044
|
+
} else {
|
|
11045
|
+
duplicates[keyRaw] = (duplicates?.[keyRaw] || 0) + 1;
|
|
11046
|
+
isArray = duplicates[keyRaw] > 1;
|
|
11047
|
+
}
|
|
11048
|
+
const key = isArray && keyRaw.endsWith("[]") ? keyRaw.slice(0, -2) : keyRaw;
|
|
11049
|
+
if (key === "__proto__") {
|
|
11050
|
+
continue;
|
|
11051
|
+
}
|
|
11052
|
+
const valueRaw = match[3] ? unsafe(match[4]) : true;
|
|
11053
|
+
const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw;
|
|
11054
|
+
if (isArray) {
|
|
11055
|
+
if (!hasOwnProperty.call(p, key)) {
|
|
11056
|
+
p[key] = [];
|
|
11057
|
+
} else if (!Array.isArray(p[key])) {
|
|
11058
|
+
p[key] = [p[key]];
|
|
11059
|
+
}
|
|
11060
|
+
}
|
|
11061
|
+
if (Array.isArray(p[key])) {
|
|
11062
|
+
p[key].push(value);
|
|
11063
|
+
} else {
|
|
11064
|
+
p[key] = value;
|
|
11065
|
+
}
|
|
11066
|
+
}
|
|
11067
|
+
const remove = [];
|
|
11068
|
+
for (const k of Object.keys(out)) {
|
|
11069
|
+
if (!hasOwnProperty.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) {
|
|
11070
|
+
continue;
|
|
11071
|
+
}
|
|
11072
|
+
const parts = splitSections(k, ".");
|
|
11073
|
+
p = out;
|
|
11074
|
+
const l = parts.pop();
|
|
11075
|
+
const nl = l.replace(/\\\./g, ".");
|
|
11076
|
+
for (const part of parts) {
|
|
11077
|
+
if (part === "__proto__") {
|
|
11078
|
+
continue;
|
|
11079
|
+
}
|
|
11080
|
+
if (!hasOwnProperty.call(p, part) || typeof p[part] !== "object") {
|
|
11081
|
+
p[part] = /* @__PURE__ */ Object.create(null);
|
|
11082
|
+
}
|
|
11083
|
+
p = p[part];
|
|
11084
|
+
}
|
|
11085
|
+
if (p === out && nl === l) {
|
|
11086
|
+
continue;
|
|
11087
|
+
}
|
|
11088
|
+
p[nl] = out[k];
|
|
11089
|
+
remove.push(k);
|
|
11090
|
+
}
|
|
11091
|
+
for (const del of remove) {
|
|
11092
|
+
delete out[del];
|
|
11093
|
+
}
|
|
11094
|
+
return out;
|
|
11095
|
+
}, "decode");
|
|
11096
|
+
var isQuoted = /* @__PURE__ */ __name((val) => {
|
|
11097
|
+
return val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'");
|
|
11098
|
+
}, "isQuoted");
|
|
11099
|
+
var safe = /* @__PURE__ */ __name((val) => {
|
|
11100
|
+
if (typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim()) {
|
|
11101
|
+
return JSON.stringify(val);
|
|
11102
|
+
}
|
|
11103
|
+
return val.split(";").join("\\;").split("#").join("\\#");
|
|
11104
|
+
}, "safe");
|
|
11105
|
+
var unsafe = /* @__PURE__ */ __name((val) => {
|
|
11106
|
+
val = (val || "").trim();
|
|
11107
|
+
if (isQuoted(val)) {
|
|
11108
|
+
if (val.charAt(0) === "'") {
|
|
11109
|
+
val = val.slice(1, -1);
|
|
11110
|
+
}
|
|
11111
|
+
try {
|
|
11112
|
+
val = JSON.parse(val);
|
|
11113
|
+
} catch {
|
|
11114
|
+
}
|
|
11115
|
+
} else {
|
|
11116
|
+
let esc = false;
|
|
11117
|
+
let unesc = "";
|
|
11118
|
+
for (let i = 0, l = val.length; i < l; i++) {
|
|
11119
|
+
const c = val.charAt(i);
|
|
11120
|
+
if (esc) {
|
|
11121
|
+
if ("\\;#".indexOf(c) !== -1) {
|
|
11122
|
+
unesc += c;
|
|
11123
|
+
} else {
|
|
11124
|
+
unesc += "\\" + c;
|
|
11125
|
+
}
|
|
11126
|
+
esc = false;
|
|
11127
|
+
} else if (";#".indexOf(c) !== -1) {
|
|
11128
|
+
break;
|
|
11129
|
+
} else if (c === "\\") {
|
|
11130
|
+
esc = true;
|
|
11131
|
+
} else {
|
|
11132
|
+
unesc += c;
|
|
11133
|
+
}
|
|
11134
|
+
}
|
|
11135
|
+
if (esc) {
|
|
11136
|
+
unesc += "\\";
|
|
11137
|
+
}
|
|
11138
|
+
return unesc.trim();
|
|
11139
|
+
}
|
|
11140
|
+
return val;
|
|
11141
|
+
}, "unsafe");
|
|
11142
|
+
module2.exports = {
|
|
11143
|
+
parse: decode,
|
|
11144
|
+
decode,
|
|
11145
|
+
stringify: encode,
|
|
11146
|
+
encode,
|
|
11147
|
+
safe,
|
|
11148
|
+
unsafe
|
|
11149
|
+
};
|
|
11150
|
+
}
|
|
11151
|
+
});
|
|
11152
|
+
|
|
11153
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/opts.js
|
|
11154
|
+
var require_opts = __commonJS({
|
|
11155
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/opts.js"(exports2, module2) {
|
|
11156
|
+
var fs = require("node:fs");
|
|
11157
|
+
var os = require("node:os");
|
|
11158
|
+
var path = require("node:path");
|
|
11159
|
+
var ini = require_ini();
|
|
11160
|
+
var gitConfigPath = path.join(os.homedir(), ".gitconfig");
|
|
11161
|
+
var cachedConfig = null;
|
|
11162
|
+
var loadGitConfig = /* @__PURE__ */ __name(() => {
|
|
11163
|
+
if (cachedConfig === null) {
|
|
11164
|
+
try {
|
|
11165
|
+
cachedConfig = {};
|
|
11166
|
+
if (fs.existsSync(gitConfigPath)) {
|
|
11167
|
+
const configContent = fs.readFileSync(gitConfigPath, "utf-8");
|
|
11168
|
+
cachedConfig = ini.parse(configContent);
|
|
11169
|
+
}
|
|
11170
|
+
} catch (error) {
|
|
11171
|
+
cachedConfig = {};
|
|
11172
|
+
}
|
|
11173
|
+
}
|
|
11174
|
+
return cachedConfig;
|
|
11175
|
+
}, "loadGitConfig");
|
|
11176
|
+
var checkGitConfigs = /* @__PURE__ */ __name(() => {
|
|
11177
|
+
const config = loadGitConfig();
|
|
11178
|
+
return {
|
|
11179
|
+
sshCommandSetInConfig: config?.core?.sshCommand !== void 0,
|
|
11180
|
+
askPassSetInConfig: config?.core?.askpass !== void 0
|
|
11181
|
+
};
|
|
11182
|
+
}, "checkGitConfigs");
|
|
11183
|
+
var sshCommandSetInEnv = process.env.GIT_SSH_COMMAND !== void 0;
|
|
11184
|
+
var askPassSetInEnv = process.env.GIT_ASKPASS !== void 0;
|
|
11185
|
+
var { sshCommandSetInConfig, askPassSetInConfig } = checkGitConfigs();
|
|
11186
|
+
var finalGitEnv = {
|
|
11187
|
+
...askPassSetInEnv || askPassSetInConfig ? {} : {
|
|
11188
|
+
GIT_ASKPASS: "echo"
|
|
11189
|
+
},
|
|
11190
|
+
...sshCommandSetInEnv || sshCommandSetInConfig ? {} : {
|
|
11191
|
+
GIT_SSH_COMMAND: "ssh -oStrictHostKeyChecking=accept-new"
|
|
11192
|
+
}
|
|
11193
|
+
};
|
|
11194
|
+
module2.exports = (opts = {}) => ({
|
|
11195
|
+
stdioString: true,
|
|
11196
|
+
...opts,
|
|
11197
|
+
shell: false,
|
|
11198
|
+
env: opts.env || { ...finalGitEnv, ...process.env }
|
|
11199
|
+
});
|
|
11200
|
+
module2.exports.loadGitConfig = loadGitConfig;
|
|
11201
|
+
}
|
|
11202
|
+
});
|
|
11203
|
+
|
|
11204
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/which.js
|
|
11205
|
+
var require_which = __commonJS({
|
|
11206
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/which.js"(exports2, module2) {
|
|
11207
|
+
var which = require_lib4();
|
|
11208
|
+
var gitPath;
|
|
11209
|
+
try {
|
|
11210
|
+
gitPath = which.sync("git");
|
|
11211
|
+
} catch {
|
|
11212
|
+
}
|
|
11213
|
+
module2.exports = (opts = {}) => {
|
|
11214
|
+
if (opts.git) {
|
|
11215
|
+
return opts.git;
|
|
11216
|
+
}
|
|
11217
|
+
if (!gitPath || opts.git === false) {
|
|
11218
|
+
return Object.assign(new Error("No git binary found in $PATH"), { code: "ENOGIT" });
|
|
11219
|
+
}
|
|
11220
|
+
return gitPath;
|
|
11221
|
+
};
|
|
11222
|
+
}
|
|
11223
|
+
});
|
|
11224
|
+
|
|
11225
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/spawn.js
|
|
11226
|
+
var require_spawn = __commonJS({
|
|
11227
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/spawn.js"(exports2, module2) {
|
|
11228
|
+
var spawn = require_lib5();
|
|
11229
|
+
var promiseRetry = require_promise_retry();
|
|
11230
|
+
var { log } = require_lib2();
|
|
11231
|
+
var makeError = require_make_error();
|
|
11232
|
+
var makeOpts = require_opts();
|
|
11233
|
+
module2.exports = (gitArgs, opts = {}) => {
|
|
11234
|
+
const whichGit = require_which();
|
|
11235
|
+
const gitPath = whichGit(opts);
|
|
11236
|
+
if (gitPath instanceof Error) {
|
|
11237
|
+
return Promise.reject(gitPath);
|
|
11238
|
+
}
|
|
11239
|
+
const args = opts.allowReplace || gitArgs[0] === "--no-replace-objects" ? gitArgs : ["--no-replace-objects", ...gitArgs];
|
|
11240
|
+
let retryOpts = opts.retry;
|
|
11241
|
+
if (retryOpts === null || retryOpts === void 0) {
|
|
11242
|
+
retryOpts = {
|
|
11243
|
+
retries: opts.fetchRetries || 2,
|
|
11244
|
+
factor: opts.fetchRetryFactor || 10,
|
|
11245
|
+
maxTimeout: opts.fetchRetryMaxtimeout || 6e4,
|
|
11246
|
+
minTimeout: opts.fetchRetryMintimeout || 1e3
|
|
11247
|
+
};
|
|
11248
|
+
}
|
|
11249
|
+
return promiseRetry((retryFn, number) => {
|
|
11250
|
+
if (number !== 1) {
|
|
11251
|
+
log.silly("git", `Retrying git command: ${args.join(" ")} attempt # ${number}`);
|
|
11252
|
+
}
|
|
11253
|
+
return spawn(gitPath, args, makeOpts(opts)).catch((er) => {
|
|
11254
|
+
const gitError = makeError(er);
|
|
11255
|
+
if (!gitError.shouldRetry(number)) {
|
|
11256
|
+
throw gitError;
|
|
11257
|
+
}
|
|
11258
|
+
retryFn(gitError);
|
|
11259
|
+
});
|
|
11260
|
+
}, retryOpts);
|
|
11261
|
+
};
|
|
11262
|
+
}
|
|
11263
|
+
});
|
|
11264
|
+
|
|
11265
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
11266
|
+
var require_inc = __commonJS({
|
|
11267
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
11268
|
+
"use strict";
|
|
11269
|
+
var SemVer = require_semver();
|
|
11270
|
+
var inc = /* @__PURE__ */ __name((version, release, options, identifier, identifierBase) => {
|
|
11271
|
+
if (typeof options === "string") {
|
|
11272
|
+
identifierBase = identifier;
|
|
11273
|
+
identifier = options;
|
|
11274
|
+
options = void 0;
|
|
11275
|
+
}
|
|
11276
|
+
try {
|
|
11277
|
+
return new SemVer(
|
|
11278
|
+
version instanceof SemVer ? version.version : version,
|
|
11279
|
+
options
|
|
11280
|
+
).inc(release, identifier, identifierBase).version;
|
|
11281
|
+
} catch (er) {
|
|
11282
|
+
return null;
|
|
11283
|
+
}
|
|
11284
|
+
}, "inc");
|
|
11285
|
+
module2.exports = inc;
|
|
11286
|
+
}
|
|
11287
|
+
});
|
|
11288
|
+
|
|
11289
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
11290
|
+
var require_diff = __commonJS({
|
|
11291
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
11292
|
+
"use strict";
|
|
11293
|
+
var parse = require_parse();
|
|
11294
|
+
var diff = /* @__PURE__ */ __name((version1, version2) => {
|
|
11295
|
+
const v1 = parse(version1, null, true);
|
|
11296
|
+
const v2 = parse(version2, null, true);
|
|
11297
|
+
const comparison = v1.compare(v2);
|
|
11298
|
+
if (comparison === 0) {
|
|
11299
|
+
return null;
|
|
11300
|
+
}
|
|
11301
|
+
const v1Higher = comparison > 0;
|
|
11302
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
11303
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
11304
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
11305
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
11306
|
+
if (lowHasPre && !highHasPre) {
|
|
11307
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
11308
|
+
return "major";
|
|
11309
|
+
}
|
|
11310
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
11311
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
11312
|
+
return "minor";
|
|
11313
|
+
}
|
|
11314
|
+
return "patch";
|
|
11315
|
+
}
|
|
11316
|
+
}
|
|
11317
|
+
const prefix = highHasPre ? "pre" : "";
|
|
11318
|
+
if (v1.major !== v2.major) {
|
|
11319
|
+
return prefix + "major";
|
|
11320
|
+
}
|
|
11321
|
+
if (v1.minor !== v2.minor) {
|
|
11322
|
+
return prefix + "minor";
|
|
11323
|
+
}
|
|
11324
|
+
if (v1.patch !== v2.patch) {
|
|
11325
|
+
return prefix + "patch";
|
|
11326
|
+
}
|
|
11327
|
+
return "prerelease";
|
|
11328
|
+
}, "diff");
|
|
11329
|
+
module2.exports = diff;
|
|
11330
|
+
}
|
|
11331
|
+
});
|
|
11332
|
+
|
|
11333
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
11334
|
+
var require_major = __commonJS({
|
|
11335
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js"(exports2, module2) {
|
|
11336
|
+
"use strict";
|
|
11337
|
+
var SemVer = require_semver();
|
|
11338
|
+
var major = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).major, "major");
|
|
11339
|
+
module2.exports = major;
|
|
11340
|
+
}
|
|
11341
|
+
});
|
|
11342
|
+
|
|
11343
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
11344
|
+
var require_minor = __commonJS({
|
|
11345
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js"(exports2, module2) {
|
|
11346
|
+
"use strict";
|
|
11347
|
+
var SemVer = require_semver();
|
|
11348
|
+
var minor = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).minor, "minor");
|
|
11349
|
+
module2.exports = minor;
|
|
11350
|
+
}
|
|
11351
|
+
});
|
|
11352
|
+
|
|
11353
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
11354
|
+
var require_patch = __commonJS({
|
|
11355
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js"(exports2, module2) {
|
|
11356
|
+
"use strict";
|
|
11357
|
+
var SemVer = require_semver();
|
|
11358
|
+
var patch = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).patch, "patch");
|
|
11359
|
+
module2.exports = patch;
|
|
11360
|
+
}
|
|
11361
|
+
});
|
|
11362
|
+
|
|
11363
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
11364
|
+
var require_prerelease = __commonJS({
|
|
11365
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
11366
|
+
"use strict";
|
|
11367
|
+
var parse = require_parse();
|
|
11368
|
+
var prerelease = /* @__PURE__ */ __name((version, options) => {
|
|
11369
|
+
const parsed = parse(version, options);
|
|
11370
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
11371
|
+
}, "prerelease");
|
|
11372
|
+
module2.exports = prerelease;
|
|
11373
|
+
}
|
|
11374
|
+
});
|
|
11375
|
+
|
|
11376
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
11377
|
+
var require_compare = __commonJS({
|
|
11378
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
11379
|
+
"use strict";
|
|
11380
|
+
var SemVer = require_semver();
|
|
11381
|
+
var compare = /* @__PURE__ */ __name((a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)), "compare");
|
|
11382
|
+
module2.exports = compare;
|
|
11383
|
+
}
|
|
11384
|
+
});
|
|
11385
|
+
|
|
11386
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
11387
|
+
var require_rcompare = __commonJS({
|
|
11388
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
11389
|
+
"use strict";
|
|
11390
|
+
var compare = require_compare();
|
|
11391
|
+
var rcompare = /* @__PURE__ */ __name((a, b, loose) => compare(b, a, loose), "rcompare");
|
|
11392
|
+
module2.exports = rcompare;
|
|
11393
|
+
}
|
|
11394
|
+
});
|
|
11395
|
+
|
|
11396
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
11397
|
+
var require_compare_loose = __commonJS({
|
|
11398
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
11399
|
+
"use strict";
|
|
11400
|
+
var compare = require_compare();
|
|
11401
|
+
var compareLoose = /* @__PURE__ */ __name((a, b) => compare(a, b, true), "compareLoose");
|
|
11402
|
+
module2.exports = compareLoose;
|
|
11403
|
+
}
|
|
11404
|
+
});
|
|
11405
|
+
|
|
11406
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
11407
|
+
var require_compare_build = __commonJS({
|
|
11408
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
11409
|
+
"use strict";
|
|
11410
|
+
var SemVer = require_semver();
|
|
11411
|
+
var compareBuild = /* @__PURE__ */ __name((a, b, loose) => {
|
|
11412
|
+
const versionA = new SemVer(a, loose);
|
|
11413
|
+
const versionB = new SemVer(b, loose);
|
|
11414
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
11415
|
+
}, "compareBuild");
|
|
11416
|
+
module2.exports = compareBuild;
|
|
11417
|
+
}
|
|
11418
|
+
});
|
|
11419
|
+
|
|
11420
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
11421
|
+
var require_sort = __commonJS({
|
|
11422
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
11423
|
+
"use strict";
|
|
11424
|
+
var compareBuild = require_compare_build();
|
|
11425
|
+
var sort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(a, b, loose)), "sort");
|
|
11426
|
+
module2.exports = sort;
|
|
11427
|
+
}
|
|
11428
|
+
});
|
|
11429
|
+
|
|
11430
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
11431
|
+
var require_rsort = __commonJS({
|
|
11432
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
11433
|
+
"use strict";
|
|
11434
|
+
var compareBuild = require_compare_build();
|
|
11435
|
+
var rsort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(b, a, loose)), "rsort");
|
|
11436
|
+
module2.exports = rsort;
|
|
11437
|
+
}
|
|
11438
|
+
});
|
|
11439
|
+
|
|
11440
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
11441
|
+
var require_gt = __commonJS({
|
|
11442
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
11443
|
+
"use strict";
|
|
11444
|
+
var compare = require_compare();
|
|
11445
|
+
var gt = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) > 0, "gt");
|
|
11446
|
+
module2.exports = gt;
|
|
11447
|
+
}
|
|
11448
|
+
});
|
|
11449
|
+
|
|
11450
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
11451
|
+
var require_lt = __commonJS({
|
|
11452
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
11453
|
+
"use strict";
|
|
11454
|
+
var compare = require_compare();
|
|
11455
|
+
var lt = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) < 0, "lt");
|
|
11456
|
+
module2.exports = lt;
|
|
11457
|
+
}
|
|
11458
|
+
});
|
|
11459
|
+
|
|
11460
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
11461
|
+
var require_eq = __commonJS({
|
|
11462
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
11463
|
+
"use strict";
|
|
11464
|
+
var compare = require_compare();
|
|
11465
|
+
var eq = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) === 0, "eq");
|
|
11466
|
+
module2.exports = eq;
|
|
11467
|
+
}
|
|
11468
|
+
});
|
|
11469
|
+
|
|
11470
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
11471
|
+
var require_neq = __commonJS({
|
|
11472
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
11473
|
+
"use strict";
|
|
11474
|
+
var compare = require_compare();
|
|
11475
|
+
var neq = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) !== 0, "neq");
|
|
11476
|
+
module2.exports = neq;
|
|
11477
|
+
}
|
|
11478
|
+
});
|
|
11479
|
+
|
|
11480
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
11481
|
+
var require_gte = __commonJS({
|
|
11482
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
11483
|
+
"use strict";
|
|
11484
|
+
var compare = require_compare();
|
|
11485
|
+
var gte = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) >= 0, "gte");
|
|
11486
|
+
module2.exports = gte;
|
|
11487
|
+
}
|
|
11488
|
+
});
|
|
11489
|
+
|
|
11490
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
11491
|
+
var require_lte = __commonJS({
|
|
11492
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
11493
|
+
"use strict";
|
|
11494
|
+
var compare = require_compare();
|
|
11495
|
+
var lte = /* @__PURE__ */ __name((a, b, loose) => compare(a, b, loose) <= 0, "lte");
|
|
11496
|
+
module2.exports = lte;
|
|
11497
|
+
}
|
|
11498
|
+
});
|
|
11499
|
+
|
|
11500
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
11501
|
+
var require_cmp = __commonJS({
|
|
11502
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
11503
|
+
"use strict";
|
|
11504
|
+
var eq = require_eq();
|
|
11505
|
+
var neq = require_neq();
|
|
11506
|
+
var gt = require_gt();
|
|
11507
|
+
var gte = require_gte();
|
|
11508
|
+
var lt = require_lt();
|
|
11509
|
+
var lte = require_lte();
|
|
11510
|
+
var cmp = /* @__PURE__ */ __name((a, op, b, loose) => {
|
|
11511
|
+
switch (op) {
|
|
11512
|
+
case "===":
|
|
11513
|
+
if (typeof a === "object") {
|
|
11514
|
+
a = a.version;
|
|
11515
|
+
}
|
|
11516
|
+
if (typeof b === "object") {
|
|
11517
|
+
b = b.version;
|
|
11518
|
+
}
|
|
11519
|
+
return a === b;
|
|
11520
|
+
case "!==":
|
|
11521
|
+
if (typeof a === "object") {
|
|
11522
|
+
a = a.version;
|
|
11523
|
+
}
|
|
11524
|
+
if (typeof b === "object") {
|
|
11525
|
+
b = b.version;
|
|
11526
|
+
}
|
|
11527
|
+
return a !== b;
|
|
11528
|
+
case "":
|
|
11529
|
+
case "=":
|
|
11530
|
+
case "==":
|
|
11531
|
+
return eq(a, b, loose);
|
|
11532
|
+
case "!=":
|
|
11533
|
+
return neq(a, b, loose);
|
|
11534
|
+
case ">":
|
|
11535
|
+
return gt(a, b, loose);
|
|
11536
|
+
case ">=":
|
|
11537
|
+
return gte(a, b, loose);
|
|
11538
|
+
case "<":
|
|
11539
|
+
return lt(a, b, loose);
|
|
11540
|
+
case "<=":
|
|
11541
|
+
return lte(a, b, loose);
|
|
11542
|
+
default:
|
|
11543
|
+
throw new TypeError(`Invalid operator: ${op}`);
|
|
11544
|
+
}
|
|
11545
|
+
}, "cmp");
|
|
11546
|
+
module2.exports = cmp;
|
|
11547
|
+
}
|
|
11548
|
+
});
|
|
11549
|
+
|
|
11550
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
11551
|
+
var require_coerce = __commonJS({
|
|
11552
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
11553
|
+
"use strict";
|
|
11554
|
+
var SemVer = require_semver();
|
|
11555
|
+
var parse = require_parse();
|
|
11556
|
+
var { safeRe: re, t } = require_re();
|
|
11557
|
+
var coerce = /* @__PURE__ */ __name((version, options) => {
|
|
11558
|
+
if (version instanceof SemVer) {
|
|
11559
|
+
return version;
|
|
11560
|
+
}
|
|
11561
|
+
if (typeof version === "number") {
|
|
11562
|
+
version = String(version);
|
|
11563
|
+
}
|
|
11564
|
+
if (typeof version !== "string") {
|
|
11565
|
+
return null;
|
|
11566
|
+
}
|
|
11567
|
+
options = options || {};
|
|
11568
|
+
let match = null;
|
|
11569
|
+
if (!options.rtl) {
|
|
11570
|
+
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
11571
|
+
} else {
|
|
11572
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
11573
|
+
let next;
|
|
11574
|
+
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
11575
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
11576
|
+
match = next;
|
|
11577
|
+
}
|
|
11578
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
11579
|
+
}
|
|
11580
|
+
coerceRtlRegex.lastIndex = -1;
|
|
11581
|
+
}
|
|
11582
|
+
if (match === null) {
|
|
11583
|
+
return null;
|
|
11584
|
+
}
|
|
11585
|
+
const major = match[2];
|
|
11586
|
+
const minor = match[3] || "0";
|
|
11587
|
+
const patch = match[4] || "0";
|
|
11588
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
11589
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
11590
|
+
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
11591
|
+
}, "coerce");
|
|
11592
|
+
module2.exports = coerce;
|
|
11593
|
+
}
|
|
11594
|
+
});
|
|
11595
|
+
|
|
11596
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
|
|
11597
|
+
var require_lrucache = __commonJS({
|
|
11598
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js"(exports2, module2) {
|
|
11599
|
+
"use strict";
|
|
11600
|
+
var LRUCache = class {
|
|
11601
|
+
static {
|
|
11602
|
+
__name(this, "LRUCache");
|
|
11603
|
+
}
|
|
11604
|
+
constructor() {
|
|
11605
|
+
this.max = 1e3;
|
|
11606
|
+
this.map = /* @__PURE__ */ new Map();
|
|
11607
|
+
}
|
|
11608
|
+
get(key) {
|
|
11609
|
+
const value = this.map.get(key);
|
|
11610
|
+
if (value === void 0) {
|
|
11611
|
+
return void 0;
|
|
11612
|
+
} else {
|
|
11613
|
+
this.map.delete(key);
|
|
11614
|
+
this.map.set(key, value);
|
|
11615
|
+
return value;
|
|
11616
|
+
}
|
|
11617
|
+
}
|
|
11618
|
+
delete(key) {
|
|
11619
|
+
return this.map.delete(key);
|
|
11620
|
+
}
|
|
11621
|
+
set(key, value) {
|
|
11622
|
+
const deleted = this.delete(key);
|
|
11623
|
+
if (!deleted && value !== void 0) {
|
|
11624
|
+
if (this.map.size >= this.max) {
|
|
11625
|
+
const firstKey = this.map.keys().next().value;
|
|
11626
|
+
this.delete(firstKey);
|
|
11627
|
+
}
|
|
11628
|
+
this.map.set(key, value);
|
|
11629
|
+
}
|
|
11630
|
+
return this;
|
|
11631
|
+
}
|
|
11632
|
+
};
|
|
11633
|
+
module2.exports = LRUCache;
|
|
11634
|
+
}
|
|
11635
|
+
});
|
|
11636
|
+
|
|
11637
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
11638
|
+
var require_range = __commonJS({
|
|
11639
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
11640
|
+
"use strict";
|
|
11641
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
11642
|
+
var Range = class _Range {
|
|
11643
|
+
static {
|
|
11644
|
+
__name(this, "Range");
|
|
11645
|
+
}
|
|
11646
|
+
constructor(range, options) {
|
|
11647
|
+
options = parseOptions(options);
|
|
11648
|
+
if (range instanceof _Range) {
|
|
11649
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
11650
|
+
return range;
|
|
11651
|
+
} else {
|
|
11652
|
+
return new _Range(range.raw, options);
|
|
11653
|
+
}
|
|
11654
|
+
}
|
|
11655
|
+
if (range instanceof Comparator) {
|
|
11656
|
+
this.raw = range.value;
|
|
11657
|
+
this.set = [[range]];
|
|
11658
|
+
this.formatted = void 0;
|
|
11659
|
+
return this;
|
|
11660
|
+
}
|
|
11661
|
+
this.options = options;
|
|
11662
|
+
this.loose = !!options.loose;
|
|
11663
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
11664
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
11665
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
11666
|
+
if (!this.set.length) {
|
|
11667
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
11668
|
+
}
|
|
11669
|
+
if (this.set.length > 1) {
|
|
11670
|
+
const first = this.set[0];
|
|
11671
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
11672
|
+
if (this.set.length === 0) {
|
|
11673
|
+
this.set = [first];
|
|
11674
|
+
} else if (this.set.length > 1) {
|
|
11675
|
+
for (const c of this.set) {
|
|
11676
|
+
if (c.length === 1 && isAny(c[0])) {
|
|
11677
|
+
this.set = [c];
|
|
11678
|
+
break;
|
|
11679
|
+
}
|
|
11680
|
+
}
|
|
11681
|
+
}
|
|
11682
|
+
}
|
|
11683
|
+
this.formatted = void 0;
|
|
11684
|
+
}
|
|
11685
|
+
get range() {
|
|
11686
|
+
if (this.formatted === void 0) {
|
|
11687
|
+
this.formatted = "";
|
|
11688
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
11689
|
+
if (i > 0) {
|
|
11690
|
+
this.formatted += "||";
|
|
11691
|
+
}
|
|
11692
|
+
const comps = this.set[i];
|
|
11693
|
+
for (let k = 0; k < comps.length; k++) {
|
|
11694
|
+
if (k > 0) {
|
|
11695
|
+
this.formatted += " ";
|
|
11696
|
+
}
|
|
11697
|
+
this.formatted += comps[k].toString().trim();
|
|
11698
|
+
}
|
|
11699
|
+
}
|
|
11700
|
+
}
|
|
11701
|
+
return this.formatted;
|
|
11702
|
+
}
|
|
11703
|
+
format() {
|
|
11704
|
+
return this.range;
|
|
11705
|
+
}
|
|
11706
|
+
toString() {
|
|
11707
|
+
return this.range;
|
|
11708
|
+
}
|
|
11709
|
+
parseRange(range) {
|
|
11710
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
11711
|
+
const memoKey = memoOpts + ":" + range;
|
|
11712
|
+
const cached = cache.get(memoKey);
|
|
11713
|
+
if (cached) {
|
|
11714
|
+
return cached;
|
|
11715
|
+
}
|
|
11716
|
+
const loose = this.options.loose;
|
|
11717
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
11718
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
11719
|
+
debug("hyphen replace", range);
|
|
11720
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
11721
|
+
debug("comparator trim", range);
|
|
11722
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
11723
|
+
debug("tilde trim", range);
|
|
11724
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
11725
|
+
debug("caret trim", range);
|
|
11726
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
11727
|
+
if (loose) {
|
|
11728
|
+
rangeList = rangeList.filter((comp) => {
|
|
11729
|
+
debug("loose invalid filter", comp, this.options);
|
|
11730
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
11731
|
+
});
|
|
11732
|
+
}
|
|
11733
|
+
debug("range list", rangeList);
|
|
11734
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
11735
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
11736
|
+
for (const comp of comparators) {
|
|
11737
|
+
if (isNullSet(comp)) {
|
|
11738
|
+
return [comp];
|
|
11739
|
+
}
|
|
11740
|
+
rangeMap.set(comp.value, comp);
|
|
11741
|
+
}
|
|
11742
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
11743
|
+
rangeMap.delete("");
|
|
11744
|
+
}
|
|
11745
|
+
const result = [...rangeMap.values()];
|
|
11746
|
+
cache.set(memoKey, result);
|
|
11747
|
+
return result;
|
|
11748
|
+
}
|
|
11749
|
+
intersects(range, options) {
|
|
11750
|
+
if (!(range instanceof _Range)) {
|
|
11751
|
+
throw new TypeError("a Range is required");
|
|
11752
|
+
}
|
|
11753
|
+
return this.set.some((thisComparators) => {
|
|
11754
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
11755
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
11756
|
+
return rangeComparators.every((rangeComparator) => {
|
|
11757
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
11758
|
+
});
|
|
11759
|
+
});
|
|
11760
|
+
});
|
|
11761
|
+
});
|
|
11762
|
+
}
|
|
11763
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
11764
|
+
test(version) {
|
|
11765
|
+
if (!version) {
|
|
11766
|
+
return false;
|
|
11767
|
+
}
|
|
11768
|
+
if (typeof version === "string") {
|
|
11769
|
+
try {
|
|
11770
|
+
version = new SemVer(version, this.options);
|
|
11771
|
+
} catch (er) {
|
|
11772
|
+
return false;
|
|
11773
|
+
}
|
|
11774
|
+
}
|
|
11775
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
11776
|
+
if (testSet(this.set[i], version, this.options)) {
|
|
11777
|
+
return true;
|
|
11778
|
+
}
|
|
11779
|
+
}
|
|
11780
|
+
return false;
|
|
11781
|
+
}
|
|
11782
|
+
};
|
|
11783
|
+
module2.exports = Range;
|
|
11784
|
+
var LRU = require_lrucache();
|
|
11785
|
+
var cache = new LRU();
|
|
11786
|
+
var parseOptions = require_parse_options();
|
|
11787
|
+
var Comparator = require_comparator();
|
|
11788
|
+
var debug = require_debug();
|
|
11789
|
+
var SemVer = require_semver();
|
|
11790
|
+
var {
|
|
11791
|
+
safeRe: re,
|
|
11792
|
+
t,
|
|
11793
|
+
comparatorTrimReplace,
|
|
11794
|
+
tildeTrimReplace,
|
|
11795
|
+
caretTrimReplace
|
|
11796
|
+
} = require_re();
|
|
11797
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
11798
|
+
var isNullSet = /* @__PURE__ */ __name((c) => c.value === "<0.0.0-0", "isNullSet");
|
|
11799
|
+
var isAny = /* @__PURE__ */ __name((c) => c.value === "", "isAny");
|
|
11800
|
+
var isSatisfiable = /* @__PURE__ */ __name((comparators, options) => {
|
|
11801
|
+
let result = true;
|
|
11802
|
+
const remainingComparators = comparators.slice();
|
|
11803
|
+
let testComparator = remainingComparators.pop();
|
|
11804
|
+
while (result && remainingComparators.length) {
|
|
11805
|
+
result = remainingComparators.every((otherComparator) => {
|
|
11806
|
+
return testComparator.intersects(otherComparator, options);
|
|
11807
|
+
});
|
|
11808
|
+
testComparator = remainingComparators.pop();
|
|
11809
|
+
}
|
|
11810
|
+
return result;
|
|
11811
|
+
}, "isSatisfiable");
|
|
11812
|
+
var parseComparator = /* @__PURE__ */ __name((comp, options) => {
|
|
11813
|
+
debug("comp", comp, options);
|
|
11814
|
+
comp = replaceCarets(comp, options);
|
|
11815
|
+
debug("caret", comp);
|
|
11816
|
+
comp = replaceTildes(comp, options);
|
|
11817
|
+
debug("tildes", comp);
|
|
11818
|
+
comp = replaceXRanges(comp, options);
|
|
11819
|
+
debug("xrange", comp);
|
|
11820
|
+
comp = replaceStars(comp, options);
|
|
11821
|
+
debug("stars", comp);
|
|
11822
|
+
return comp;
|
|
11823
|
+
}, "parseComparator");
|
|
11824
|
+
var isX = /* @__PURE__ */ __name((id) => !id || id.toLowerCase() === "x" || id === "*", "isX");
|
|
11825
|
+
var replaceTildes = /* @__PURE__ */ __name((comp, options) => {
|
|
11826
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
11827
|
+
}, "replaceTildes");
|
|
11828
|
+
var replaceTilde = /* @__PURE__ */ __name((comp, options) => {
|
|
11829
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
11830
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
11831
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
11832
|
+
let ret;
|
|
11833
|
+
if (isX(M)) {
|
|
11834
|
+
ret = "";
|
|
11835
|
+
} else if (isX(m)) {
|
|
11836
|
+
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
11837
|
+
} else if (isX(p)) {
|
|
11838
|
+
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
11839
|
+
} else if (pr) {
|
|
11840
|
+
debug("replaceTilde pr", pr);
|
|
11841
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
11842
|
+
} else {
|
|
11843
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
11844
|
+
}
|
|
11845
|
+
debug("tilde return", ret);
|
|
11846
|
+
return ret;
|
|
11847
|
+
});
|
|
11848
|
+
}, "replaceTilde");
|
|
11849
|
+
var replaceCarets = /* @__PURE__ */ __name((comp, options) => {
|
|
11850
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
11851
|
+
}, "replaceCarets");
|
|
11852
|
+
var replaceCaret = /* @__PURE__ */ __name((comp, options) => {
|
|
11853
|
+
debug("caret", comp, options);
|
|
11854
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
11855
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
11856
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
11857
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
11858
|
+
let ret;
|
|
11859
|
+
if (isX(M)) {
|
|
11860
|
+
ret = "";
|
|
11861
|
+
} else if (isX(m)) {
|
|
11862
|
+
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
11863
|
+
} else if (isX(p)) {
|
|
11864
|
+
if (M === "0") {
|
|
11865
|
+
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
11866
|
+
} else {
|
|
11867
|
+
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
11868
|
+
}
|
|
11869
|
+
} else if (pr) {
|
|
11870
|
+
debug("replaceCaret pr", pr);
|
|
11871
|
+
if (M === "0") {
|
|
11872
|
+
if (m === "0") {
|
|
11873
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
11874
|
+
} else {
|
|
11875
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
11876
|
+
}
|
|
11877
|
+
} else {
|
|
11878
|
+
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
11879
|
+
}
|
|
11880
|
+
} else {
|
|
11881
|
+
debug("no pr");
|
|
11882
|
+
if (M === "0") {
|
|
11883
|
+
if (m === "0") {
|
|
11884
|
+
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
11885
|
+
} else {
|
|
11886
|
+
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
11887
|
+
}
|
|
11888
|
+
} else {
|
|
11889
|
+
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
11890
|
+
}
|
|
11891
|
+
}
|
|
11892
|
+
debug("caret return", ret);
|
|
11893
|
+
return ret;
|
|
11894
|
+
});
|
|
11895
|
+
}, "replaceCaret");
|
|
11896
|
+
var replaceXRanges = /* @__PURE__ */ __name((comp, options) => {
|
|
11897
|
+
debug("replaceXRanges", comp, options);
|
|
11898
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
11899
|
+
}, "replaceXRanges");
|
|
11900
|
+
var replaceXRange = /* @__PURE__ */ __name((comp, options) => {
|
|
11901
|
+
comp = comp.trim();
|
|
11902
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
11903
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
11904
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
11905
|
+
const xM = isX(M);
|
|
11906
|
+
const xm = xM || isX(m);
|
|
11907
|
+
const xp = xm || isX(p);
|
|
11908
|
+
const anyX = xp;
|
|
11909
|
+
if (gtlt === "=" && anyX) {
|
|
11910
|
+
gtlt = "";
|
|
11911
|
+
}
|
|
11912
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
11913
|
+
if (xM) {
|
|
11914
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
11915
|
+
ret = "<0.0.0-0";
|
|
11916
|
+
} else {
|
|
11917
|
+
ret = "*";
|
|
11918
|
+
}
|
|
11919
|
+
} else if (gtlt && anyX) {
|
|
11920
|
+
if (xm) {
|
|
11921
|
+
m = 0;
|
|
11922
|
+
}
|
|
11923
|
+
p = 0;
|
|
11924
|
+
if (gtlt === ">") {
|
|
11925
|
+
gtlt = ">=";
|
|
11926
|
+
if (xm) {
|
|
11927
|
+
M = +M + 1;
|
|
11928
|
+
m = 0;
|
|
11929
|
+
p = 0;
|
|
11930
|
+
} else {
|
|
11931
|
+
m = +m + 1;
|
|
11932
|
+
p = 0;
|
|
11933
|
+
}
|
|
11934
|
+
} else if (gtlt === "<=") {
|
|
11935
|
+
gtlt = "<";
|
|
11936
|
+
if (xm) {
|
|
11937
|
+
M = +M + 1;
|
|
11938
|
+
} else {
|
|
11939
|
+
m = +m + 1;
|
|
11940
|
+
}
|
|
11941
|
+
}
|
|
11942
|
+
if (gtlt === "<") {
|
|
11943
|
+
pr = "-0";
|
|
11944
|
+
}
|
|
11945
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
11946
|
+
} else if (xm) {
|
|
11947
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
11948
|
+
} else if (xp) {
|
|
11949
|
+
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
11950
|
+
}
|
|
11951
|
+
debug("xRange return", ret);
|
|
11952
|
+
return ret;
|
|
11953
|
+
});
|
|
11954
|
+
}, "replaceXRange");
|
|
11955
|
+
var replaceStars = /* @__PURE__ */ __name((comp, options) => {
|
|
11956
|
+
debug("replaceStars", comp, options);
|
|
11957
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
11958
|
+
}, "replaceStars");
|
|
11959
|
+
var replaceGTE0 = /* @__PURE__ */ __name((comp, options) => {
|
|
11960
|
+
debug("replaceGTE0", comp, options);
|
|
11961
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
11962
|
+
}, "replaceGTE0");
|
|
11963
|
+
var hyphenReplace = /* @__PURE__ */ __name((incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
11964
|
+
if (isX(fM)) {
|
|
11965
|
+
from = "";
|
|
11966
|
+
} else if (isX(fm)) {
|
|
11967
|
+
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
11968
|
+
} else if (isX(fp)) {
|
|
11969
|
+
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
11970
|
+
} else if (fpr) {
|
|
11971
|
+
from = `>=${from}`;
|
|
11972
|
+
} else {
|
|
11973
|
+
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
11974
|
+
}
|
|
11975
|
+
if (isX(tM)) {
|
|
11976
|
+
to = "";
|
|
11977
|
+
} else if (isX(tm)) {
|
|
11978
|
+
to = `<${+tM + 1}.0.0-0`;
|
|
11979
|
+
} else if (isX(tp)) {
|
|
11980
|
+
to = `<${tM}.${+tm + 1}.0-0`;
|
|
11981
|
+
} else if (tpr) {
|
|
11982
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
11983
|
+
} else if (incPr) {
|
|
11984
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
11985
|
+
} else {
|
|
11986
|
+
to = `<=${to}`;
|
|
11987
|
+
}
|
|
11988
|
+
return `${from} ${to}`.trim();
|
|
11989
|
+
}, "hyphenReplace");
|
|
11990
|
+
var testSet = /* @__PURE__ */ __name((set, version, options) => {
|
|
11991
|
+
for (let i = 0; i < set.length; i++) {
|
|
11992
|
+
if (!set[i].test(version)) {
|
|
11993
|
+
return false;
|
|
11994
|
+
}
|
|
11995
|
+
}
|
|
11996
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
|
11997
|
+
for (let i = 0; i < set.length; i++) {
|
|
11998
|
+
debug(set[i].semver);
|
|
11999
|
+
if (set[i].semver === Comparator.ANY) {
|
|
12000
|
+
continue;
|
|
12001
|
+
}
|
|
12002
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
12003
|
+
const allowed = set[i].semver;
|
|
12004
|
+
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
|
12005
|
+
return true;
|
|
12006
|
+
}
|
|
12007
|
+
}
|
|
12008
|
+
}
|
|
12009
|
+
return false;
|
|
12010
|
+
}
|
|
12011
|
+
return true;
|
|
12012
|
+
}, "testSet");
|
|
12013
|
+
}
|
|
12014
|
+
});
|
|
12015
|
+
|
|
12016
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
12017
|
+
var require_comparator = __commonJS({
|
|
12018
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
12019
|
+
"use strict";
|
|
12020
|
+
var ANY = Symbol("SemVer ANY");
|
|
12021
|
+
var Comparator = class _Comparator {
|
|
12022
|
+
static {
|
|
12023
|
+
__name(this, "Comparator");
|
|
12024
|
+
}
|
|
12025
|
+
static get ANY() {
|
|
12026
|
+
return ANY;
|
|
12027
|
+
}
|
|
12028
|
+
constructor(comp, options) {
|
|
12029
|
+
options = parseOptions(options);
|
|
12030
|
+
if (comp instanceof _Comparator) {
|
|
12031
|
+
if (comp.loose === !!options.loose) {
|
|
12032
|
+
return comp;
|
|
12033
|
+
} else {
|
|
12034
|
+
comp = comp.value;
|
|
12035
|
+
}
|
|
12036
|
+
}
|
|
12037
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
12038
|
+
debug("comparator", comp, options);
|
|
12039
|
+
this.options = options;
|
|
12040
|
+
this.loose = !!options.loose;
|
|
12041
|
+
this.parse(comp);
|
|
12042
|
+
if (this.semver === ANY) {
|
|
12043
|
+
this.value = "";
|
|
12044
|
+
} else {
|
|
12045
|
+
this.value = this.operator + this.semver.version;
|
|
12046
|
+
}
|
|
12047
|
+
debug("comp", this);
|
|
12048
|
+
}
|
|
12049
|
+
parse(comp) {
|
|
12050
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
12051
|
+
const m = comp.match(r);
|
|
12052
|
+
if (!m) {
|
|
12053
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
12054
|
+
}
|
|
12055
|
+
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
12056
|
+
if (this.operator === "=") {
|
|
12057
|
+
this.operator = "";
|
|
12058
|
+
}
|
|
12059
|
+
if (!m[2]) {
|
|
12060
|
+
this.semver = ANY;
|
|
12061
|
+
} else {
|
|
12062
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
|
12063
|
+
}
|
|
12064
|
+
}
|
|
12065
|
+
toString() {
|
|
12066
|
+
return this.value;
|
|
12067
|
+
}
|
|
12068
|
+
test(version) {
|
|
12069
|
+
debug("Comparator.test", version, this.options.loose);
|
|
12070
|
+
if (this.semver === ANY || version === ANY) {
|
|
12071
|
+
return true;
|
|
12072
|
+
}
|
|
12073
|
+
if (typeof version === "string") {
|
|
12074
|
+
try {
|
|
12075
|
+
version = new SemVer(version, this.options);
|
|
12076
|
+
} catch (er) {
|
|
12077
|
+
return false;
|
|
12078
|
+
}
|
|
12079
|
+
}
|
|
12080
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
12081
|
+
}
|
|
12082
|
+
intersects(comp, options) {
|
|
12083
|
+
if (!(comp instanceof _Comparator)) {
|
|
12084
|
+
throw new TypeError("a Comparator is required");
|
|
12085
|
+
}
|
|
12086
|
+
if (this.operator === "") {
|
|
12087
|
+
if (this.value === "") {
|
|
12088
|
+
return true;
|
|
12089
|
+
}
|
|
12090
|
+
return new Range(comp.value, options).test(this.value);
|
|
12091
|
+
} else if (comp.operator === "") {
|
|
12092
|
+
if (comp.value === "") {
|
|
12093
|
+
return true;
|
|
12094
|
+
}
|
|
12095
|
+
return new Range(this.value, options).test(comp.semver);
|
|
12096
|
+
}
|
|
12097
|
+
options = parseOptions(options);
|
|
12098
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
12099
|
+
return false;
|
|
12100
|
+
}
|
|
12101
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
12102
|
+
return false;
|
|
12103
|
+
}
|
|
12104
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
12105
|
+
return true;
|
|
12106
|
+
}
|
|
12107
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
12108
|
+
return true;
|
|
12109
|
+
}
|
|
12110
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
12111
|
+
return true;
|
|
12112
|
+
}
|
|
12113
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
12114
|
+
return true;
|
|
12115
|
+
}
|
|
12116
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
12117
|
+
return true;
|
|
12118
|
+
}
|
|
12119
|
+
return false;
|
|
12120
|
+
}
|
|
12121
|
+
};
|
|
12122
|
+
module2.exports = Comparator;
|
|
12123
|
+
var parseOptions = require_parse_options();
|
|
12124
|
+
var { safeRe: re, t } = require_re();
|
|
12125
|
+
var cmp = require_cmp();
|
|
12126
|
+
var debug = require_debug();
|
|
12127
|
+
var SemVer = require_semver();
|
|
12128
|
+
var Range = require_range();
|
|
12129
|
+
}
|
|
12130
|
+
});
|
|
12131
|
+
|
|
12132
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
12133
|
+
var require_satisfies = __commonJS({
|
|
12134
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
12135
|
+
"use strict";
|
|
12136
|
+
var Range = require_range();
|
|
12137
|
+
var satisfies = /* @__PURE__ */ __name((version, range, options) => {
|
|
12138
|
+
try {
|
|
12139
|
+
range = new Range(range, options);
|
|
12140
|
+
} catch (er) {
|
|
12141
|
+
return false;
|
|
12142
|
+
}
|
|
12143
|
+
return range.test(version);
|
|
12144
|
+
}, "satisfies");
|
|
12145
|
+
module2.exports = satisfies;
|
|
12146
|
+
}
|
|
12147
|
+
});
|
|
12148
|
+
|
|
12149
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
12150
|
+
var require_to_comparators = __commonJS({
|
|
12151
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
|
|
12152
|
+
"use strict";
|
|
12153
|
+
var Range = require_range();
|
|
12154
|
+
var toComparators = /* @__PURE__ */ __name((range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")), "toComparators");
|
|
12155
|
+
module2.exports = toComparators;
|
|
12156
|
+
}
|
|
12157
|
+
});
|
|
12158
|
+
|
|
12159
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
12160
|
+
var require_max_satisfying = __commonJS({
|
|
12161
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
|
|
12162
|
+
"use strict";
|
|
12163
|
+
var SemVer = require_semver();
|
|
12164
|
+
var Range = require_range();
|
|
12165
|
+
var maxSatisfying = /* @__PURE__ */ __name((versions, range, options) => {
|
|
12166
|
+
let max = null;
|
|
12167
|
+
let maxSV = null;
|
|
12168
|
+
let rangeObj = null;
|
|
12169
|
+
try {
|
|
12170
|
+
rangeObj = new Range(range, options);
|
|
12171
|
+
} catch (er) {
|
|
12172
|
+
return null;
|
|
12173
|
+
}
|
|
12174
|
+
versions.forEach((v) => {
|
|
12175
|
+
if (rangeObj.test(v)) {
|
|
12176
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
12177
|
+
max = v;
|
|
12178
|
+
maxSV = new SemVer(max, options);
|
|
12179
|
+
}
|
|
12180
|
+
}
|
|
12181
|
+
});
|
|
12182
|
+
return max;
|
|
12183
|
+
}, "maxSatisfying");
|
|
12184
|
+
module2.exports = maxSatisfying;
|
|
12185
|
+
}
|
|
12186
|
+
});
|
|
12187
|
+
|
|
12188
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
12189
|
+
var require_min_satisfying = __commonJS({
|
|
12190
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
|
|
12191
|
+
"use strict";
|
|
12192
|
+
var SemVer = require_semver();
|
|
12193
|
+
var Range = require_range();
|
|
12194
|
+
var minSatisfying = /* @__PURE__ */ __name((versions, range, options) => {
|
|
12195
|
+
let min = null;
|
|
12196
|
+
let minSV = null;
|
|
12197
|
+
let rangeObj = null;
|
|
12198
|
+
try {
|
|
12199
|
+
rangeObj = new Range(range, options);
|
|
12200
|
+
} catch (er) {
|
|
12201
|
+
return null;
|
|
12202
|
+
}
|
|
12203
|
+
versions.forEach((v) => {
|
|
12204
|
+
if (rangeObj.test(v)) {
|
|
12205
|
+
if (!min || minSV.compare(v) === 1) {
|
|
12206
|
+
min = v;
|
|
12207
|
+
minSV = new SemVer(min, options);
|
|
12208
|
+
}
|
|
12209
|
+
}
|
|
12210
|
+
});
|
|
12211
|
+
return min;
|
|
12212
|
+
}, "minSatisfying");
|
|
12213
|
+
module2.exports = minSatisfying;
|
|
12214
|
+
}
|
|
12215
|
+
});
|
|
12216
|
+
|
|
12217
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
12218
|
+
var require_min_version = __commonJS({
|
|
12219
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js"(exports2, module2) {
|
|
12220
|
+
"use strict";
|
|
12221
|
+
var SemVer = require_semver();
|
|
12222
|
+
var Range = require_range();
|
|
12223
|
+
var gt = require_gt();
|
|
12224
|
+
var minVersion = /* @__PURE__ */ __name((range, loose) => {
|
|
12225
|
+
range = new Range(range, loose);
|
|
12226
|
+
let minver = new SemVer("0.0.0");
|
|
12227
|
+
if (range.test(minver)) {
|
|
12228
|
+
return minver;
|
|
12229
|
+
}
|
|
12230
|
+
minver = new SemVer("0.0.0-0");
|
|
12231
|
+
if (range.test(minver)) {
|
|
12232
|
+
return minver;
|
|
12233
|
+
}
|
|
12234
|
+
minver = null;
|
|
12235
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
12236
|
+
const comparators = range.set[i];
|
|
12237
|
+
let setMin = null;
|
|
12238
|
+
comparators.forEach((comparator) => {
|
|
12239
|
+
const compver = new SemVer(comparator.semver.version);
|
|
12240
|
+
switch (comparator.operator) {
|
|
12241
|
+
case ">":
|
|
12242
|
+
if (compver.prerelease.length === 0) {
|
|
12243
|
+
compver.patch++;
|
|
12244
|
+
} else {
|
|
12245
|
+
compver.prerelease.push(0);
|
|
12246
|
+
}
|
|
12247
|
+
compver.raw = compver.format();
|
|
12248
|
+
/* fallthrough */
|
|
12249
|
+
case "":
|
|
12250
|
+
case ">=":
|
|
12251
|
+
if (!setMin || gt(compver, setMin)) {
|
|
12252
|
+
setMin = compver;
|
|
12253
|
+
}
|
|
12254
|
+
break;
|
|
12255
|
+
case "<":
|
|
12256
|
+
case "<=":
|
|
12257
|
+
break;
|
|
12258
|
+
/* istanbul ignore next */
|
|
12259
|
+
default:
|
|
12260
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
12261
|
+
}
|
|
12262
|
+
});
|
|
12263
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
12264
|
+
minver = setMin;
|
|
12265
|
+
}
|
|
12266
|
+
}
|
|
12267
|
+
if (minver && range.test(minver)) {
|
|
12268
|
+
return minver;
|
|
12269
|
+
}
|
|
12270
|
+
return null;
|
|
12271
|
+
}, "minVersion");
|
|
12272
|
+
module2.exports = minVersion;
|
|
12273
|
+
}
|
|
12274
|
+
});
|
|
12275
|
+
|
|
12276
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
12277
|
+
var require_valid2 = __commonJS({
|
|
12278
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js"(exports2, module2) {
|
|
12279
|
+
"use strict";
|
|
12280
|
+
var Range = require_range();
|
|
12281
|
+
var validRange = /* @__PURE__ */ __name((range, options) => {
|
|
12282
|
+
try {
|
|
12283
|
+
return new Range(range, options).range || "*";
|
|
12284
|
+
} catch (er) {
|
|
12285
|
+
return null;
|
|
12286
|
+
}
|
|
12287
|
+
}, "validRange");
|
|
12288
|
+
module2.exports = validRange;
|
|
12289
|
+
}
|
|
12290
|
+
});
|
|
12291
|
+
|
|
12292
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
12293
|
+
var require_outside = __commonJS({
|
|
12294
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js"(exports2, module2) {
|
|
12295
|
+
"use strict";
|
|
12296
|
+
var SemVer = require_semver();
|
|
12297
|
+
var Comparator = require_comparator();
|
|
12298
|
+
var { ANY } = Comparator;
|
|
12299
|
+
var Range = require_range();
|
|
12300
|
+
var satisfies = require_satisfies();
|
|
12301
|
+
var gt = require_gt();
|
|
12302
|
+
var lt = require_lt();
|
|
12303
|
+
var lte = require_lte();
|
|
12304
|
+
var gte = require_gte();
|
|
12305
|
+
var outside = /* @__PURE__ */ __name((version, range, hilo, options) => {
|
|
12306
|
+
version = new SemVer(version, options);
|
|
12307
|
+
range = new Range(range, options);
|
|
12308
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
12309
|
+
switch (hilo) {
|
|
12310
|
+
case ">":
|
|
12311
|
+
gtfn = gt;
|
|
12312
|
+
ltefn = lte;
|
|
12313
|
+
ltfn = lt;
|
|
12314
|
+
comp = ">";
|
|
12315
|
+
ecomp = ">=";
|
|
12316
|
+
break;
|
|
12317
|
+
case "<":
|
|
12318
|
+
gtfn = lt;
|
|
12319
|
+
ltefn = gte;
|
|
12320
|
+
ltfn = gt;
|
|
12321
|
+
comp = "<";
|
|
12322
|
+
ecomp = "<=";
|
|
12323
|
+
break;
|
|
12324
|
+
default:
|
|
12325
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
12326
|
+
}
|
|
12327
|
+
if (satisfies(version, range, options)) {
|
|
12328
|
+
return false;
|
|
12329
|
+
}
|
|
12330
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
12331
|
+
const comparators = range.set[i];
|
|
12332
|
+
let high = null;
|
|
12333
|
+
let low = null;
|
|
12334
|
+
comparators.forEach((comparator) => {
|
|
12335
|
+
if (comparator.semver === ANY) {
|
|
12336
|
+
comparator = new Comparator(">=0.0.0");
|
|
12337
|
+
}
|
|
12338
|
+
high = high || comparator;
|
|
12339
|
+
low = low || comparator;
|
|
12340
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
12341
|
+
high = comparator;
|
|
12342
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
12343
|
+
low = comparator;
|
|
12344
|
+
}
|
|
12345
|
+
});
|
|
12346
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
12347
|
+
return false;
|
|
12348
|
+
}
|
|
12349
|
+
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
|
12350
|
+
return false;
|
|
12351
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
12352
|
+
return false;
|
|
12353
|
+
}
|
|
12354
|
+
}
|
|
12355
|
+
return true;
|
|
12356
|
+
}, "outside");
|
|
12357
|
+
module2.exports = outside;
|
|
12358
|
+
}
|
|
12359
|
+
});
|
|
12360
|
+
|
|
12361
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
12362
|
+
var require_gtr = __commonJS({
|
|
12363
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
12364
|
+
"use strict";
|
|
12365
|
+
var outside = require_outside();
|
|
12366
|
+
var gtr = /* @__PURE__ */ __name((version, range, options) => outside(version, range, ">", options), "gtr");
|
|
12367
|
+
module2.exports = gtr;
|
|
12368
|
+
}
|
|
12369
|
+
});
|
|
12370
|
+
|
|
12371
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
12372
|
+
var require_ltr = __commonJS({
|
|
12373
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
12374
|
+
"use strict";
|
|
12375
|
+
var outside = require_outside();
|
|
12376
|
+
var ltr = /* @__PURE__ */ __name((version, range, options) => outside(version, range, "<", options), "ltr");
|
|
12377
|
+
module2.exports = ltr;
|
|
12378
|
+
}
|
|
12379
|
+
});
|
|
12380
|
+
|
|
12381
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
12382
|
+
var require_intersects = __commonJS({
|
|
12383
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js"(exports2, module2) {
|
|
12384
|
+
"use strict";
|
|
12385
|
+
var Range = require_range();
|
|
12386
|
+
var intersects = /* @__PURE__ */ __name((r1, r2, options) => {
|
|
12387
|
+
r1 = new Range(r1, options);
|
|
12388
|
+
r2 = new Range(r2, options);
|
|
12389
|
+
return r1.intersects(r2, options);
|
|
12390
|
+
}, "intersects");
|
|
12391
|
+
module2.exports = intersects;
|
|
12392
|
+
}
|
|
12393
|
+
});
|
|
12394
|
+
|
|
12395
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
12396
|
+
var require_simplify = __commonJS({
|
|
12397
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
12398
|
+
"use strict";
|
|
12399
|
+
var satisfies = require_satisfies();
|
|
12400
|
+
var compare = require_compare();
|
|
12401
|
+
module2.exports = (versions, range, options) => {
|
|
12402
|
+
const set = [];
|
|
12403
|
+
let first = null;
|
|
12404
|
+
let prev = null;
|
|
12405
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
12406
|
+
for (const version of v) {
|
|
12407
|
+
const included = satisfies(version, range, options);
|
|
12408
|
+
if (included) {
|
|
12409
|
+
prev = version;
|
|
12410
|
+
if (!first) {
|
|
12411
|
+
first = version;
|
|
12412
|
+
}
|
|
12413
|
+
} else {
|
|
12414
|
+
if (prev) {
|
|
12415
|
+
set.push([first, prev]);
|
|
12416
|
+
}
|
|
12417
|
+
prev = null;
|
|
12418
|
+
first = null;
|
|
12419
|
+
}
|
|
12420
|
+
}
|
|
12421
|
+
if (first) {
|
|
12422
|
+
set.push([first, null]);
|
|
12423
|
+
}
|
|
12424
|
+
const ranges = [];
|
|
12425
|
+
for (const [min, max] of set) {
|
|
12426
|
+
if (min === max) {
|
|
12427
|
+
ranges.push(min);
|
|
12428
|
+
} else if (!max && min === v[0]) {
|
|
12429
|
+
ranges.push("*");
|
|
12430
|
+
} else if (!max) {
|
|
12431
|
+
ranges.push(`>=${min}`);
|
|
12432
|
+
} else if (min === v[0]) {
|
|
12433
|
+
ranges.push(`<=${max}`);
|
|
12434
|
+
} else {
|
|
12435
|
+
ranges.push(`${min} - ${max}`);
|
|
12436
|
+
}
|
|
12437
|
+
}
|
|
12438
|
+
const simplified = ranges.join(" || ");
|
|
12439
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
12440
|
+
return simplified.length < original.length ? simplified : range;
|
|
12441
|
+
};
|
|
12442
|
+
}
|
|
12443
|
+
});
|
|
12444
|
+
|
|
12445
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
12446
|
+
var require_subset = __commonJS({
|
|
12447
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js"(exports2, module2) {
|
|
12448
|
+
"use strict";
|
|
12449
|
+
var Range = require_range();
|
|
12450
|
+
var Comparator = require_comparator();
|
|
12451
|
+
var { ANY } = Comparator;
|
|
12452
|
+
var satisfies = require_satisfies();
|
|
12453
|
+
var compare = require_compare();
|
|
12454
|
+
var subset = /* @__PURE__ */ __name((sub, dom, options = {}) => {
|
|
12455
|
+
if (sub === dom) {
|
|
12456
|
+
return true;
|
|
12457
|
+
}
|
|
12458
|
+
sub = new Range(sub, options);
|
|
12459
|
+
dom = new Range(dom, options);
|
|
12460
|
+
let sawNonNull = false;
|
|
12461
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
12462
|
+
for (const simpleDom of dom.set) {
|
|
12463
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
12464
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
12465
|
+
if (isSub) {
|
|
12466
|
+
continue OUTER;
|
|
12467
|
+
}
|
|
12468
|
+
}
|
|
12469
|
+
if (sawNonNull) {
|
|
12470
|
+
return false;
|
|
12471
|
+
}
|
|
12472
|
+
}
|
|
12473
|
+
return true;
|
|
12474
|
+
}, "subset");
|
|
12475
|
+
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
12476
|
+
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
12477
|
+
var simpleSubset = /* @__PURE__ */ __name((sub, dom, options) => {
|
|
12478
|
+
if (sub === dom) {
|
|
12479
|
+
return true;
|
|
12480
|
+
}
|
|
12481
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
12482
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
12483
|
+
return true;
|
|
12484
|
+
} else if (options.includePrerelease) {
|
|
12485
|
+
sub = minimumVersionWithPreRelease;
|
|
12486
|
+
} else {
|
|
12487
|
+
sub = minimumVersion;
|
|
12488
|
+
}
|
|
12489
|
+
}
|
|
12490
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
12491
|
+
if (options.includePrerelease) {
|
|
12492
|
+
return true;
|
|
12493
|
+
} else {
|
|
12494
|
+
dom = minimumVersion;
|
|
12495
|
+
}
|
|
12496
|
+
}
|
|
12497
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
12498
|
+
let gt, lt;
|
|
12499
|
+
for (const c of sub) {
|
|
12500
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
12501
|
+
gt = higherGT(gt, c, options);
|
|
12502
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
|
12503
|
+
lt = lowerLT(lt, c, options);
|
|
12504
|
+
} else {
|
|
12505
|
+
eqSet.add(c.semver);
|
|
12506
|
+
}
|
|
12507
|
+
}
|
|
12508
|
+
if (eqSet.size > 1) {
|
|
12509
|
+
return null;
|
|
12510
|
+
}
|
|
12511
|
+
let gtltComp;
|
|
12512
|
+
if (gt && lt) {
|
|
12513
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
12514
|
+
if (gtltComp > 0) {
|
|
12515
|
+
return null;
|
|
12516
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
12517
|
+
return null;
|
|
12518
|
+
}
|
|
12519
|
+
}
|
|
12520
|
+
for (const eq of eqSet) {
|
|
12521
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
12522
|
+
return null;
|
|
12523
|
+
}
|
|
12524
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
12525
|
+
return null;
|
|
12526
|
+
}
|
|
12527
|
+
for (const c of dom) {
|
|
12528
|
+
if (!satisfies(eq, String(c), options)) {
|
|
12529
|
+
return false;
|
|
12530
|
+
}
|
|
12531
|
+
}
|
|
12532
|
+
return true;
|
|
12533
|
+
}
|
|
12534
|
+
let higher, lower;
|
|
12535
|
+
let hasDomLT, hasDomGT;
|
|
12536
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
12537
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
12538
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
12539
|
+
needDomLTPre = false;
|
|
12540
|
+
}
|
|
12541
|
+
for (const c of dom) {
|
|
12542
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
12543
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
12544
|
+
if (gt) {
|
|
12545
|
+
if (needDomGTPre) {
|
|
12546
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
12547
|
+
needDomGTPre = false;
|
|
12548
|
+
}
|
|
12549
|
+
}
|
|
12550
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
12551
|
+
higher = higherGT(gt, c, options);
|
|
12552
|
+
if (higher === c && higher !== gt) {
|
|
12553
|
+
return false;
|
|
12554
|
+
}
|
|
12555
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
|
|
12556
|
+
return false;
|
|
12557
|
+
}
|
|
12558
|
+
}
|
|
12559
|
+
if (lt) {
|
|
12560
|
+
if (needDomLTPre) {
|
|
12561
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
12562
|
+
needDomLTPre = false;
|
|
12563
|
+
}
|
|
12564
|
+
}
|
|
12565
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
12566
|
+
lower = lowerLT(lt, c, options);
|
|
12567
|
+
if (lower === c && lower !== lt) {
|
|
12568
|
+
return false;
|
|
12569
|
+
}
|
|
12570
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
|
|
12571
|
+
return false;
|
|
12572
|
+
}
|
|
12573
|
+
}
|
|
12574
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
12575
|
+
return false;
|
|
12576
|
+
}
|
|
12577
|
+
}
|
|
12578
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
12579
|
+
return false;
|
|
12580
|
+
}
|
|
12581
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
12582
|
+
return false;
|
|
12583
|
+
}
|
|
12584
|
+
if (needDomGTPre || needDomLTPre) {
|
|
12585
|
+
return false;
|
|
12586
|
+
}
|
|
12587
|
+
return true;
|
|
12588
|
+
}, "simpleSubset");
|
|
12589
|
+
var higherGT = /* @__PURE__ */ __name((a, b, options) => {
|
|
12590
|
+
if (!a) {
|
|
12591
|
+
return b;
|
|
12592
|
+
}
|
|
12593
|
+
const comp = compare(a.semver, b.semver, options);
|
|
12594
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
12595
|
+
}, "higherGT");
|
|
12596
|
+
var lowerLT = /* @__PURE__ */ __name((a, b, options) => {
|
|
12597
|
+
if (!a) {
|
|
12598
|
+
return b;
|
|
12599
|
+
}
|
|
12600
|
+
const comp = compare(a.semver, b.semver, options);
|
|
12601
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
12602
|
+
}, "lowerLT");
|
|
12603
|
+
module2.exports = subset;
|
|
12604
|
+
}
|
|
12605
|
+
});
|
|
12606
|
+
|
|
12607
|
+
// node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
|
|
12608
|
+
var require_semver2 = __commonJS({
|
|
12609
|
+
"node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js"(exports2, module2) {
|
|
12610
|
+
"use strict";
|
|
12611
|
+
var internalRe = require_re();
|
|
12612
|
+
var constants = require_constants();
|
|
12613
|
+
var SemVer = require_semver();
|
|
12614
|
+
var identifiers = require_identifiers();
|
|
12615
|
+
var parse = require_parse();
|
|
12616
|
+
var valid = require_valid();
|
|
12617
|
+
var clean = require_clean();
|
|
12618
|
+
var inc = require_inc();
|
|
12619
|
+
var diff = require_diff();
|
|
12620
|
+
var major = require_major();
|
|
12621
|
+
var minor = require_minor();
|
|
12622
|
+
var patch = require_patch();
|
|
12623
|
+
var prerelease = require_prerelease();
|
|
12624
|
+
var compare = require_compare();
|
|
12625
|
+
var rcompare = require_rcompare();
|
|
12626
|
+
var compareLoose = require_compare_loose();
|
|
12627
|
+
var compareBuild = require_compare_build();
|
|
12628
|
+
var sort = require_sort();
|
|
12629
|
+
var rsort = require_rsort();
|
|
12630
|
+
var gt = require_gt();
|
|
12631
|
+
var lt = require_lt();
|
|
12632
|
+
var eq = require_eq();
|
|
12633
|
+
var neq = require_neq();
|
|
12634
|
+
var gte = require_gte();
|
|
12635
|
+
var lte = require_lte();
|
|
12636
|
+
var cmp = require_cmp();
|
|
12637
|
+
var coerce = require_coerce();
|
|
12638
|
+
var Comparator = require_comparator();
|
|
12639
|
+
var Range = require_range();
|
|
12640
|
+
var satisfies = require_satisfies();
|
|
12641
|
+
var toComparators = require_to_comparators();
|
|
12642
|
+
var maxSatisfying = require_max_satisfying();
|
|
12643
|
+
var minSatisfying = require_min_satisfying();
|
|
12644
|
+
var minVersion = require_min_version();
|
|
12645
|
+
var validRange = require_valid2();
|
|
12646
|
+
var outside = require_outside();
|
|
12647
|
+
var gtr = require_gtr();
|
|
12648
|
+
var ltr = require_ltr();
|
|
12649
|
+
var intersects = require_intersects();
|
|
12650
|
+
var simplifyRange = require_simplify();
|
|
12651
|
+
var subset = require_subset();
|
|
12652
|
+
module2.exports = {
|
|
12653
|
+
parse,
|
|
12654
|
+
valid,
|
|
12655
|
+
clean,
|
|
12656
|
+
inc,
|
|
12657
|
+
diff,
|
|
12658
|
+
major,
|
|
12659
|
+
minor,
|
|
12660
|
+
patch,
|
|
12661
|
+
prerelease,
|
|
12662
|
+
compare,
|
|
12663
|
+
rcompare,
|
|
12664
|
+
compareLoose,
|
|
12665
|
+
compareBuild,
|
|
12666
|
+
sort,
|
|
12667
|
+
rsort,
|
|
12668
|
+
gt,
|
|
12669
|
+
lt,
|
|
12670
|
+
eq,
|
|
12671
|
+
neq,
|
|
12672
|
+
gte,
|
|
12673
|
+
lte,
|
|
12674
|
+
cmp,
|
|
12675
|
+
coerce,
|
|
12676
|
+
Comparator,
|
|
12677
|
+
Range,
|
|
12678
|
+
satisfies,
|
|
12679
|
+
toComparators,
|
|
12680
|
+
maxSatisfying,
|
|
12681
|
+
minSatisfying,
|
|
12682
|
+
minVersion,
|
|
12683
|
+
validRange,
|
|
12684
|
+
outside,
|
|
12685
|
+
gtr,
|
|
12686
|
+
ltr,
|
|
12687
|
+
intersects,
|
|
12688
|
+
simplifyRange,
|
|
12689
|
+
subset,
|
|
12690
|
+
SemVer,
|
|
12691
|
+
re: internalRe.re,
|
|
12692
|
+
src: internalRe.src,
|
|
12693
|
+
tokens: internalRe.t,
|
|
12694
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
12695
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
12696
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
12697
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
12698
|
+
};
|
|
12699
|
+
}
|
|
12700
|
+
});
|
|
12701
|
+
|
|
12702
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/lines-to-revs.js
|
|
12703
|
+
var require_lines_to_revs = __commonJS({
|
|
12704
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/lines-to-revs.js"(exports2, module2) {
|
|
12705
|
+
var semver = require_semver2();
|
|
12706
|
+
module2.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
|
|
12707
|
+
versions: {},
|
|
12708
|
+
"dist-tags": {},
|
|
12709
|
+
refs: {},
|
|
12710
|
+
shas: {}
|
|
12711
|
+
}));
|
|
12712
|
+
var finish = /* @__PURE__ */ __name((revs) => distTags(shaList(peelTags(revs))), "finish");
|
|
12713
|
+
var shaList = /* @__PURE__ */ __name((revs) => {
|
|
12714
|
+
Object.keys(revs.refs).forEach((ref) => {
|
|
12715
|
+
const doc = revs.refs[ref];
|
|
12716
|
+
if (!revs.shas[doc.sha]) {
|
|
12717
|
+
revs.shas[doc.sha] = [ref];
|
|
12718
|
+
} else {
|
|
12719
|
+
revs.shas[doc.sha].push(ref);
|
|
12720
|
+
}
|
|
12721
|
+
});
|
|
12722
|
+
return revs;
|
|
12723
|
+
}, "shaList");
|
|
12724
|
+
var peelTags = /* @__PURE__ */ __name((revs) => {
|
|
12725
|
+
Object.keys(revs.refs).filter((ref) => ref.endsWith("^{}")).forEach((ref) => {
|
|
12726
|
+
const peeled = revs.refs[ref];
|
|
12727
|
+
const unpeeled = revs.refs[ref.replace(/\^\{\}$/, "")];
|
|
12728
|
+
if (unpeeled) {
|
|
12729
|
+
unpeeled.sha = peeled.sha;
|
|
12730
|
+
delete revs.refs[ref];
|
|
12731
|
+
}
|
|
12732
|
+
});
|
|
12733
|
+
return revs;
|
|
12734
|
+
}, "peelTags");
|
|
12735
|
+
var distTags = /* @__PURE__ */ __name((revs) => {
|
|
12736
|
+
const HEAD = revs.refs.HEAD || /* istanbul ignore next */
|
|
12737
|
+
{};
|
|
12738
|
+
const versions = Object.keys(revs.versions);
|
|
12739
|
+
versions.forEach((v) => {
|
|
12740
|
+
const ver = revs.versions[v];
|
|
12741
|
+
if (revs.refs.latest && ver.sha === revs.refs.latest.sha) {
|
|
12742
|
+
revs["dist-tags"].latest = v;
|
|
12743
|
+
} else if (ver.sha === HEAD.sha) {
|
|
12744
|
+
revs["dist-tags"].HEAD = v;
|
|
12745
|
+
if (!revs.refs.latest) {
|
|
12746
|
+
revs["dist-tags"].latest = v;
|
|
12747
|
+
}
|
|
12748
|
+
}
|
|
12749
|
+
});
|
|
12750
|
+
return revs;
|
|
12751
|
+
}, "distTags");
|
|
12752
|
+
var refType = /* @__PURE__ */ __name((ref) => {
|
|
12753
|
+
if (ref.startsWith("refs/tags/")) {
|
|
12754
|
+
return "tag";
|
|
12755
|
+
}
|
|
12756
|
+
if (ref.startsWith("refs/heads/")) {
|
|
12757
|
+
return "branch";
|
|
12758
|
+
}
|
|
12759
|
+
if (ref.startsWith("refs/pull/")) {
|
|
12760
|
+
return "pull";
|
|
12761
|
+
}
|
|
12762
|
+
if (ref === "HEAD") {
|
|
12763
|
+
return "head";
|
|
12764
|
+
}
|
|
12765
|
+
return "other";
|
|
12766
|
+
}, "refType");
|
|
12767
|
+
var lineToRevDoc = /* @__PURE__ */ __name((line) => {
|
|
12768
|
+
const split = line.trim().split(/\s+/, 2);
|
|
12769
|
+
if (split.length < 2) {
|
|
12770
|
+
return null;
|
|
12771
|
+
}
|
|
12772
|
+
const sha = split[0].trim();
|
|
12773
|
+
const rawRef = split[1].trim();
|
|
12774
|
+
const type = refType(rawRef);
|
|
12775
|
+
if (type === "tag") {
|
|
12776
|
+
const ref = rawRef.slice("refs/tags/".length);
|
|
12777
|
+
return { sha, ref, rawRef, type };
|
|
12778
|
+
}
|
|
12779
|
+
if (type === "branch") {
|
|
12780
|
+
const ref = rawRef.slice("refs/heads/".length);
|
|
12781
|
+
return { sha, ref, rawRef, type };
|
|
12782
|
+
}
|
|
12783
|
+
if (type === "pull") {
|
|
12784
|
+
const ref = rawRef.slice("refs/".length).replace(/\/head$/, "");
|
|
12785
|
+
return { sha, ref, rawRef, type };
|
|
12786
|
+
}
|
|
12787
|
+
if (type === "head") {
|
|
12788
|
+
const ref = "HEAD";
|
|
12789
|
+
return { sha, ref, rawRef, type };
|
|
12790
|
+
}
|
|
12791
|
+
return { sha, ref: rawRef, rawRef, type };
|
|
12792
|
+
}, "lineToRevDoc");
|
|
12793
|
+
var linesToRevsReducer = /* @__PURE__ */ __name((revs, line) => {
|
|
12794
|
+
const doc = lineToRevDoc(line);
|
|
12795
|
+
if (!doc) {
|
|
12796
|
+
return revs;
|
|
12797
|
+
}
|
|
12798
|
+
revs.refs[doc.ref] = doc;
|
|
12799
|
+
revs.refs[doc.rawRef] = doc;
|
|
12800
|
+
if (doc.type === "tag") {
|
|
12801
|
+
const match = !doc.ref.endsWith("^{}") && doc.ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/);
|
|
12802
|
+
if (match && semver.valid(match[1], true)) {
|
|
12803
|
+
revs.versions[semver.clean(match[1], true)] = doc;
|
|
12804
|
+
}
|
|
12805
|
+
}
|
|
12806
|
+
return revs;
|
|
12807
|
+
}, "linesToRevsReducer");
|
|
12808
|
+
}
|
|
12809
|
+
});
|
|
12810
|
+
|
|
12811
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/revs.js
|
|
12812
|
+
var require_revs = __commonJS({
|
|
12813
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/revs.js"(exports2, module2) {
|
|
12814
|
+
var spawn = require_spawn();
|
|
12815
|
+
var { LRUCache } = require_commonjs();
|
|
12816
|
+
var linesToRevs = require_lines_to_revs();
|
|
12817
|
+
var revsCache = new LRUCache({
|
|
12818
|
+
max: 100,
|
|
12819
|
+
ttl: 5 * 60 * 1e3
|
|
12820
|
+
});
|
|
12821
|
+
module2.exports = async (repo, opts = {}) => {
|
|
12822
|
+
if (!opts.noGitRevCache) {
|
|
12823
|
+
const cached = revsCache.get(repo);
|
|
12824
|
+
if (cached) {
|
|
12825
|
+
return cached;
|
|
12826
|
+
}
|
|
12827
|
+
}
|
|
12828
|
+
const { stdout } = await spawn(["ls-remote", repo], opts);
|
|
12829
|
+
const revs = linesToRevs(stdout.trim().split("\n"));
|
|
12830
|
+
revsCache.set(repo, revs);
|
|
12831
|
+
return revs;
|
|
12832
|
+
};
|
|
12833
|
+
}
|
|
12834
|
+
});
|
|
12835
|
+
|
|
12836
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/utils.js
|
|
12837
|
+
var require_utils = __commonJS({
|
|
12838
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/utils.js"(exports2) {
|
|
12839
|
+
var isWindows = /* @__PURE__ */ __name((opts) => (opts.fakePlatform || process.platform) === "win32", "isWindows");
|
|
12840
|
+
exports2.isWindows = isWindows;
|
|
12841
|
+
}
|
|
12842
|
+
});
|
|
12843
|
+
|
|
12844
|
+
// node_modules/.pnpm/validate-npm-package-name@6.0.2/node_modules/validate-npm-package-name/lib/index.js
|
|
12845
|
+
var require_lib6 = __commonJS({
|
|
12846
|
+
"node_modules/.pnpm/validate-npm-package-name@6.0.2/node_modules/validate-npm-package-name/lib/index.js"(exports2, module2) {
|
|
12847
|
+
"use strict";
|
|
12848
|
+
var { builtinModules: builtins } = require("module");
|
|
12849
|
+
var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
|
|
12850
|
+
var exclusionList = [
|
|
12851
|
+
"node_modules",
|
|
12852
|
+
"favicon.ico"
|
|
12853
|
+
];
|
|
12854
|
+
function validate(name) {
|
|
12855
|
+
var warnings = [];
|
|
12856
|
+
var errors = [];
|
|
12857
|
+
if (name === null) {
|
|
12858
|
+
errors.push("name cannot be null");
|
|
12859
|
+
return done(warnings, errors);
|
|
12860
|
+
}
|
|
12861
|
+
if (name === void 0) {
|
|
12862
|
+
errors.push("name cannot be undefined");
|
|
12863
|
+
return done(warnings, errors);
|
|
12864
|
+
}
|
|
12865
|
+
if (typeof name !== "string") {
|
|
12866
|
+
errors.push("name must be a string");
|
|
12867
|
+
return done(warnings, errors);
|
|
12868
|
+
}
|
|
12869
|
+
if (!name.length) {
|
|
12870
|
+
errors.push("name length must be greater than zero");
|
|
12871
|
+
}
|
|
12872
|
+
if (name.startsWith(".")) {
|
|
12873
|
+
errors.push("name cannot start with a period");
|
|
12874
|
+
}
|
|
12875
|
+
if (name.match(/^_/)) {
|
|
12876
|
+
errors.push("name cannot start with an underscore");
|
|
12877
|
+
}
|
|
12878
|
+
if (name.trim() !== name) {
|
|
12879
|
+
errors.push("name cannot contain leading or trailing spaces");
|
|
12880
|
+
}
|
|
12881
|
+
exclusionList.forEach(function(excludedName) {
|
|
12882
|
+
if (name.toLowerCase() === excludedName) {
|
|
12883
|
+
errors.push(excludedName + " is not a valid package name");
|
|
12884
|
+
}
|
|
12885
|
+
});
|
|
12886
|
+
if (builtins.includes(name.toLowerCase())) {
|
|
12887
|
+
warnings.push(name + " is a core module name");
|
|
12888
|
+
}
|
|
12889
|
+
if (name.length > 214) {
|
|
12890
|
+
warnings.push("name can no longer contain more than 214 characters");
|
|
12891
|
+
}
|
|
12892
|
+
if (name.toLowerCase() !== name) {
|
|
12893
|
+
warnings.push("name can no longer contain capital letters");
|
|
12894
|
+
}
|
|
12895
|
+
if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) {
|
|
12896
|
+
warnings.push(`name can no longer contain special characters ("~'!()*")`);
|
|
12897
|
+
}
|
|
12898
|
+
if (encodeURIComponent(name) !== name) {
|
|
12899
|
+
var nameMatch = name.match(scopedPackagePattern);
|
|
12900
|
+
if (nameMatch) {
|
|
12901
|
+
var user = nameMatch[1];
|
|
12902
|
+
var pkg = nameMatch[2];
|
|
12903
|
+
if (pkg.startsWith(".")) {
|
|
12904
|
+
errors.push("name cannot start with a period");
|
|
12905
|
+
}
|
|
12906
|
+
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
|
|
12907
|
+
return done(warnings, errors);
|
|
12908
|
+
}
|
|
12909
|
+
}
|
|
12910
|
+
errors.push("name can only contain URL-friendly characters");
|
|
12911
|
+
}
|
|
12912
|
+
return done(warnings, errors);
|
|
12913
|
+
}
|
|
12914
|
+
__name(validate, "validate");
|
|
12915
|
+
var done = /* @__PURE__ */ __name(function(warnings, errors) {
|
|
12916
|
+
var result = {
|
|
12917
|
+
validForNewPackages: errors.length === 0 && warnings.length === 0,
|
|
12918
|
+
validForOldPackages: errors.length === 0,
|
|
12919
|
+
warnings,
|
|
12920
|
+
errors
|
|
12921
|
+
};
|
|
12922
|
+
if (!result.warnings.length) {
|
|
12923
|
+
delete result.warnings;
|
|
12924
|
+
}
|
|
12925
|
+
if (!result.errors.length) {
|
|
12926
|
+
delete result.errors;
|
|
12927
|
+
}
|
|
12928
|
+
return result;
|
|
12929
|
+
}, "done");
|
|
12930
|
+
module2.exports = validate;
|
|
12931
|
+
}
|
|
12932
|
+
});
|
|
12933
|
+
|
|
12934
|
+
// node_modules/.pnpm/npm-package-arg@12.0.2/node_modules/npm-package-arg/lib/npa.js
|
|
12935
|
+
var require_npa = __commonJS({
|
|
12936
|
+
"node_modules/.pnpm/npm-package-arg@12.0.2/node_modules/npm-package-arg/lib/npa.js"(exports2, module2) {
|
|
12937
|
+
"use strict";
|
|
12938
|
+
var isWindows = process.platform === "win32";
|
|
12939
|
+
var { URL: URL2 } = require("node:url");
|
|
12940
|
+
var path = isWindows ? require("node:path/win32") : require("node:path");
|
|
12941
|
+
var { homedir } = require("node:os");
|
|
12942
|
+
var HostedGit = require_lib3();
|
|
12943
|
+
var semver = require_semver2();
|
|
12944
|
+
var validatePackageName = require_lib6();
|
|
12945
|
+
var { log } = require_lib2();
|
|
12946
|
+
var hasSlashes = isWindows ? /\\|[/]/ : /[/]/;
|
|
12947
|
+
var isURL = /^(?:git[+])?[a-z]+:/i;
|
|
12948
|
+
var isGit = /^[^@]+@[^:.]+\.[^:]+:.+$/i;
|
|
12949
|
+
var isFileType = /[.](?:tgz|tar.gz|tar)$/i;
|
|
12950
|
+
var isPortNumber = /:[0-9]+(\/|$)/i;
|
|
12951
|
+
var isWindowsFile = /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/;
|
|
12952
|
+
var isPosixFile = /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/;
|
|
12953
|
+
var defaultRegistry = "https://registry.npmjs.org";
|
|
12954
|
+
function npa(arg, where) {
|
|
12955
|
+
let name;
|
|
12956
|
+
let spec;
|
|
12957
|
+
if (typeof arg === "object") {
|
|
12958
|
+
if (arg instanceof Result && (!where || where === arg.where)) {
|
|
12959
|
+
return arg;
|
|
12960
|
+
} else if (arg.name && arg.rawSpec) {
|
|
12961
|
+
return npa.resolve(arg.name, arg.rawSpec, where || arg.where);
|
|
12962
|
+
} else {
|
|
12963
|
+
return npa(arg.raw, where || arg.where);
|
|
12964
|
+
}
|
|
12965
|
+
}
|
|
12966
|
+
const nameEndsAt = arg.indexOf("@", 1);
|
|
12967
|
+
const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg;
|
|
12968
|
+
if (isURL.test(arg)) {
|
|
12969
|
+
spec = arg;
|
|
12970
|
+
} else if (isGit.test(arg)) {
|
|
12971
|
+
spec = `git+ssh://${arg}`;
|
|
12972
|
+
} else if (!namePart.startsWith("@") && (hasSlashes.test(namePart) || isFileType.test(namePart))) {
|
|
12973
|
+
spec = arg;
|
|
12974
|
+
} else if (nameEndsAt > 0) {
|
|
12975
|
+
name = namePart;
|
|
12976
|
+
spec = arg.slice(nameEndsAt + 1) || "*";
|
|
12977
|
+
} else {
|
|
12978
|
+
const valid = validatePackageName(arg);
|
|
12979
|
+
if (valid.validForOldPackages) {
|
|
12980
|
+
name = arg;
|
|
12981
|
+
spec = "*";
|
|
12982
|
+
} else {
|
|
12983
|
+
spec = arg;
|
|
12984
|
+
}
|
|
12985
|
+
}
|
|
12986
|
+
return resolve(name, spec, where, arg);
|
|
12987
|
+
}
|
|
12988
|
+
__name(npa, "npa");
|
|
12989
|
+
function isFileSpec(spec) {
|
|
12990
|
+
if (!spec) {
|
|
12991
|
+
return false;
|
|
12992
|
+
}
|
|
12993
|
+
if (spec.toLowerCase().startsWith("file:")) {
|
|
12994
|
+
return true;
|
|
12995
|
+
}
|
|
12996
|
+
if (isWindows) {
|
|
12997
|
+
return isWindowsFile.test(spec);
|
|
12998
|
+
}
|
|
12999
|
+
return isPosixFile.test(spec);
|
|
13000
|
+
}
|
|
13001
|
+
__name(isFileSpec, "isFileSpec");
|
|
13002
|
+
function isAliasSpec(spec) {
|
|
13003
|
+
if (!spec) {
|
|
13004
|
+
return false;
|
|
13005
|
+
}
|
|
13006
|
+
return spec.toLowerCase().startsWith("npm:");
|
|
13007
|
+
}
|
|
13008
|
+
__name(isAliasSpec, "isAliasSpec");
|
|
13009
|
+
function resolve(name, spec, where, arg) {
|
|
13010
|
+
const res = new Result({
|
|
13011
|
+
raw: arg,
|
|
13012
|
+
name,
|
|
13013
|
+
rawSpec: spec,
|
|
13014
|
+
fromArgument: arg != null
|
|
13015
|
+
});
|
|
13016
|
+
if (name) {
|
|
13017
|
+
res.name = name;
|
|
13018
|
+
}
|
|
13019
|
+
if (!where) {
|
|
13020
|
+
where = process.cwd();
|
|
13021
|
+
}
|
|
13022
|
+
if (isFileSpec(spec)) {
|
|
13023
|
+
return fromFile(res, where);
|
|
13024
|
+
} else if (isAliasSpec(spec)) {
|
|
13025
|
+
return fromAlias(res, where);
|
|
13026
|
+
}
|
|
13027
|
+
const hosted = HostedGit.fromUrl(spec, {
|
|
13028
|
+
noGitPlus: true,
|
|
13029
|
+
noCommittish: true
|
|
13030
|
+
});
|
|
13031
|
+
if (hosted) {
|
|
13032
|
+
return fromHostedGit(res, hosted);
|
|
13033
|
+
} else if (spec && isURL.test(spec)) {
|
|
13034
|
+
return fromURL(res);
|
|
13035
|
+
} else if (spec && (hasSlashes.test(spec) || isFileType.test(spec))) {
|
|
13036
|
+
return fromFile(res, where);
|
|
13037
|
+
} else {
|
|
13038
|
+
return fromRegistry(res);
|
|
13039
|
+
}
|
|
13040
|
+
}
|
|
13041
|
+
__name(resolve, "resolve");
|
|
13042
|
+
function toPurl(arg, reg = defaultRegistry) {
|
|
13043
|
+
const res = npa(arg);
|
|
13044
|
+
if (res.type !== "version") {
|
|
13045
|
+
throw invalidPurlType(res.type, res.raw);
|
|
13046
|
+
}
|
|
13047
|
+
let purl = "pkg:npm/" + res.name.replace(/^@/, "%40") + "@" + res.rawSpec;
|
|
13048
|
+
if (reg !== defaultRegistry) {
|
|
13049
|
+
purl += "?repository_url=" + reg;
|
|
13050
|
+
}
|
|
13051
|
+
return purl;
|
|
13052
|
+
}
|
|
13053
|
+
__name(toPurl, "toPurl");
|
|
13054
|
+
function invalidPackageName(name, valid, raw) {
|
|
13055
|
+
const err = new Error(`Invalid package name "${name}" of package "${raw}": ${valid.errors.join("; ")}.`);
|
|
13056
|
+
err.code = "EINVALIDPACKAGENAME";
|
|
13057
|
+
return err;
|
|
13058
|
+
}
|
|
13059
|
+
__name(invalidPackageName, "invalidPackageName");
|
|
13060
|
+
function invalidTagName(name, raw) {
|
|
13061
|
+
const err = new Error(`Invalid tag name "${name}" of package "${raw}": Tags may not have any characters that encodeURIComponent encodes.`);
|
|
13062
|
+
err.code = "EINVALIDTAGNAME";
|
|
13063
|
+
return err;
|
|
13064
|
+
}
|
|
13065
|
+
__name(invalidTagName, "invalidTagName");
|
|
13066
|
+
function invalidPurlType(type, raw) {
|
|
13067
|
+
const err = new Error(`Invalid type "${type}" of package "${raw}": Purl can only be generated for "version" types.`);
|
|
13068
|
+
err.code = "EINVALIDPURLTYPE";
|
|
13069
|
+
return err;
|
|
13070
|
+
}
|
|
13071
|
+
__name(invalidPurlType, "invalidPurlType");
|
|
13072
|
+
var Result = class {
|
|
13073
|
+
static {
|
|
13074
|
+
__name(this, "Result");
|
|
13075
|
+
}
|
|
13076
|
+
constructor(opts) {
|
|
13077
|
+
this.type = opts.type;
|
|
13078
|
+
this.registry = opts.registry;
|
|
13079
|
+
this.where = opts.where;
|
|
13080
|
+
if (opts.raw == null) {
|
|
13081
|
+
this.raw = opts.name ? `${opts.name}@${opts.rawSpec}` : opts.rawSpec;
|
|
13082
|
+
} else {
|
|
13083
|
+
this.raw = opts.raw;
|
|
13084
|
+
}
|
|
13085
|
+
this.name = void 0;
|
|
13086
|
+
this.escapedName = void 0;
|
|
13087
|
+
this.scope = void 0;
|
|
13088
|
+
this.rawSpec = opts.rawSpec || "";
|
|
13089
|
+
this.saveSpec = opts.saveSpec;
|
|
13090
|
+
this.fetchSpec = opts.fetchSpec;
|
|
13091
|
+
if (opts.name) {
|
|
13092
|
+
this.setName(opts.name);
|
|
13093
|
+
}
|
|
13094
|
+
this.gitRange = opts.gitRange;
|
|
13095
|
+
this.gitCommittish = opts.gitCommittish;
|
|
13096
|
+
this.gitSubdir = opts.gitSubdir;
|
|
13097
|
+
this.hosted = opts.hosted;
|
|
13098
|
+
}
|
|
13099
|
+
// TODO move this to a getter/setter in a semver major
|
|
13100
|
+
setName(name) {
|
|
13101
|
+
const valid = validatePackageName(name);
|
|
13102
|
+
if (!valid.validForOldPackages) {
|
|
13103
|
+
throw invalidPackageName(name, valid, this.raw);
|
|
13104
|
+
}
|
|
13105
|
+
this.name = name;
|
|
13106
|
+
this.scope = name[0] === "@" ? name.slice(0, name.indexOf("/")) : void 0;
|
|
13107
|
+
this.escapedName = name.replace("/", "%2f");
|
|
13108
|
+
return this;
|
|
13109
|
+
}
|
|
13110
|
+
toString() {
|
|
13111
|
+
const full = [];
|
|
13112
|
+
if (this.name != null && this.name !== "") {
|
|
13113
|
+
full.push(this.name);
|
|
13114
|
+
}
|
|
13115
|
+
const spec = this.saveSpec || this.fetchSpec || this.rawSpec;
|
|
13116
|
+
if (spec != null && spec !== "") {
|
|
13117
|
+
full.push(spec);
|
|
13118
|
+
}
|
|
13119
|
+
return full.length ? full.join("@") : this.raw;
|
|
13120
|
+
}
|
|
13121
|
+
toJSON() {
|
|
13122
|
+
const result = Object.assign({}, this);
|
|
13123
|
+
delete result.hosted;
|
|
13124
|
+
return result;
|
|
13125
|
+
}
|
|
13126
|
+
};
|
|
13127
|
+
function setGitAttrs(res, committish) {
|
|
13128
|
+
if (!committish) {
|
|
13129
|
+
res.gitCommittish = null;
|
|
13130
|
+
return;
|
|
13131
|
+
}
|
|
13132
|
+
for (const part of committish.split("::")) {
|
|
13133
|
+
if (!part.includes(":")) {
|
|
13134
|
+
if (res.gitRange) {
|
|
13135
|
+
throw new Error("cannot override existing semver range with a committish");
|
|
13136
|
+
}
|
|
13137
|
+
if (res.gitCommittish) {
|
|
13138
|
+
throw new Error("cannot override existing committish with a second committish");
|
|
13139
|
+
}
|
|
13140
|
+
res.gitCommittish = part;
|
|
13141
|
+
continue;
|
|
13142
|
+
}
|
|
13143
|
+
const [name, value] = part.split(":");
|
|
13144
|
+
if (name === "semver") {
|
|
13145
|
+
if (res.gitCommittish) {
|
|
13146
|
+
throw new Error("cannot override existing committish with a semver range");
|
|
13147
|
+
}
|
|
13148
|
+
if (res.gitRange) {
|
|
13149
|
+
throw new Error("cannot override existing semver range with a second semver range");
|
|
13150
|
+
}
|
|
13151
|
+
res.gitRange = decodeURIComponent(value);
|
|
13152
|
+
continue;
|
|
13153
|
+
}
|
|
13154
|
+
if (name === "path") {
|
|
13155
|
+
if (res.gitSubdir) {
|
|
13156
|
+
throw new Error("cannot override existing path with a second path");
|
|
13157
|
+
}
|
|
13158
|
+
res.gitSubdir = `/${value}`;
|
|
13159
|
+
continue;
|
|
13160
|
+
}
|
|
13161
|
+
log.warn("npm-package-arg", `ignoring unknown key "${name}"`);
|
|
13162
|
+
}
|
|
13163
|
+
}
|
|
13164
|
+
__name(setGitAttrs, "setGitAttrs");
|
|
13165
|
+
var encodedPathChars = /* @__PURE__ */ new Map([
|
|
13166
|
+
["\0", "%00"],
|
|
13167
|
+
[" ", "%09"],
|
|
13168
|
+
["\n", "%0A"],
|
|
13169
|
+
["\r", "%0D"],
|
|
13170
|
+
[" ", "%20"],
|
|
13171
|
+
['"', "%22"],
|
|
13172
|
+
["#", "%23"],
|
|
13173
|
+
["%", "%25"],
|
|
13174
|
+
["?", "%3F"],
|
|
13175
|
+
["[", "%5B"],
|
|
13176
|
+
["\\", isWindows ? "/" : "%5C"],
|
|
13177
|
+
["]", "%5D"],
|
|
13178
|
+
["^", "%5E"],
|
|
13179
|
+
["|", "%7C"],
|
|
13180
|
+
["~", "%7E"]
|
|
13181
|
+
]);
|
|
13182
|
+
function pathToFileURL(str) {
|
|
13183
|
+
let result = "";
|
|
13184
|
+
for (let i = 0; i < str.length; i++) {
|
|
13185
|
+
result = `${result}${encodedPathChars.get(str[i]) ?? str[i]}`;
|
|
13186
|
+
}
|
|
13187
|
+
if (result.startsWith("file:")) {
|
|
13188
|
+
return result;
|
|
13189
|
+
}
|
|
13190
|
+
return `file:${result}`;
|
|
13191
|
+
}
|
|
13192
|
+
__name(pathToFileURL, "pathToFileURL");
|
|
13193
|
+
function fromFile(res, where) {
|
|
13194
|
+
res.type = isFileType.test(res.rawSpec) ? "file" : "directory";
|
|
13195
|
+
res.where = where;
|
|
13196
|
+
let rawSpec = pathToFileURL(res.rawSpec);
|
|
13197
|
+
if (rawSpec.startsWith("file:/")) {
|
|
13198
|
+
if (/^file:\/\/[^/]/.test(rawSpec)) {
|
|
13199
|
+
rawSpec = `file:/${rawSpec.slice(5)}`;
|
|
13200
|
+
}
|
|
13201
|
+
if (/^\/{1,3}\.\.?(\/|$)/.test(rawSpec.slice(5))) {
|
|
13202
|
+
rawSpec = rawSpec.replace(/^file:\/{1,3}/, "file:");
|
|
13203
|
+
}
|
|
13204
|
+
}
|
|
13205
|
+
let resolvedUrl;
|
|
13206
|
+
let specUrl;
|
|
13207
|
+
try {
|
|
13208
|
+
resolvedUrl = new URL2(rawSpec, `${pathToFileURL(path.resolve(where))}/`);
|
|
13209
|
+
specUrl = new URL2(rawSpec);
|
|
13210
|
+
} catch (originalError) {
|
|
13211
|
+
const er = new Error("Invalid file: URL, must comply with RFC 8089");
|
|
13212
|
+
throw Object.assign(er, {
|
|
13213
|
+
raw: res.rawSpec,
|
|
13214
|
+
spec: res,
|
|
13215
|
+
where,
|
|
13216
|
+
originalError
|
|
13217
|
+
});
|
|
13218
|
+
}
|
|
13219
|
+
let specPath = decodeURIComponent(specUrl.pathname);
|
|
13220
|
+
let resolvedPath = decodeURIComponent(resolvedUrl.pathname);
|
|
13221
|
+
if (isWindows) {
|
|
13222
|
+
specPath = specPath.replace(/^\/+([a-z]:\/)/i, "$1");
|
|
13223
|
+
resolvedPath = resolvedPath.replace(/^\/+([a-z]:\/)/i, "$1");
|
|
13224
|
+
}
|
|
13225
|
+
if (/^\/~(\/|$)/.test(specPath)) {
|
|
13226
|
+
res.saveSpec = `file:${specPath.substr(1)}`;
|
|
13227
|
+
resolvedPath = path.resolve(homedir(), specPath.substr(3));
|
|
13228
|
+
} else if (!path.isAbsolute(rawSpec.slice(5))) {
|
|
13229
|
+
res.saveSpec = `file:${path.relative(where, resolvedPath)}`;
|
|
13230
|
+
} else {
|
|
13231
|
+
res.saveSpec = `file:${path.resolve(resolvedPath)}`;
|
|
13232
|
+
}
|
|
13233
|
+
res.fetchSpec = path.resolve(where, resolvedPath);
|
|
13234
|
+
res.saveSpec = res.saveSpec.split("\\").join("/");
|
|
13235
|
+
if (res.saveSpec.startsWith("file://")) {
|
|
13236
|
+
res.saveSpec = `file:/${res.saveSpec.slice(7)}`;
|
|
13237
|
+
}
|
|
13238
|
+
return res;
|
|
13239
|
+
}
|
|
13240
|
+
__name(fromFile, "fromFile");
|
|
13241
|
+
function fromHostedGit(res, hosted) {
|
|
13242
|
+
res.type = "git";
|
|
13243
|
+
res.hosted = hosted;
|
|
13244
|
+
res.saveSpec = hosted.toString({ noGitPlus: false, noCommittish: false });
|
|
13245
|
+
res.fetchSpec = hosted.getDefaultRepresentation() === "shortcut" ? null : hosted.toString();
|
|
13246
|
+
setGitAttrs(res, hosted.committish);
|
|
13247
|
+
return res;
|
|
13248
|
+
}
|
|
13249
|
+
__name(fromHostedGit, "fromHostedGit");
|
|
13250
|
+
function unsupportedURLType(protocol, spec) {
|
|
13251
|
+
const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`);
|
|
13252
|
+
err.code = "EUNSUPPORTEDPROTOCOL";
|
|
13253
|
+
return err;
|
|
13254
|
+
}
|
|
13255
|
+
__name(unsupportedURLType, "unsupportedURLType");
|
|
13256
|
+
function fromURL(res) {
|
|
13257
|
+
let rawSpec = res.rawSpec;
|
|
13258
|
+
res.saveSpec = rawSpec;
|
|
13259
|
+
if (rawSpec.startsWith("git+ssh:")) {
|
|
13260
|
+
const matched = rawSpec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);
|
|
13261
|
+
if (matched && !matched[1].match(isPortNumber)) {
|
|
13262
|
+
res.type = "git";
|
|
13263
|
+
setGitAttrs(res, matched[2]);
|
|
13264
|
+
res.fetchSpec = matched[1];
|
|
13265
|
+
return res;
|
|
13266
|
+
}
|
|
13267
|
+
} else if (rawSpec.startsWith("git+file://")) {
|
|
13268
|
+
rawSpec = rawSpec.replace(/\\/g, "/");
|
|
13269
|
+
}
|
|
13270
|
+
const parsedUrl = new URL2(rawSpec);
|
|
13271
|
+
switch (parsedUrl.protocol) {
|
|
13272
|
+
case "git:":
|
|
13273
|
+
case "git+http:":
|
|
13274
|
+
case "git+https:":
|
|
13275
|
+
case "git+rsync:":
|
|
13276
|
+
case "git+ftp:":
|
|
13277
|
+
case "git+file:":
|
|
13278
|
+
case "git+ssh:":
|
|
13279
|
+
res.type = "git";
|
|
13280
|
+
setGitAttrs(res, parsedUrl.hash.slice(1));
|
|
13281
|
+
if (parsedUrl.protocol === "git+file:" && /^git\+file:\/\/[a-z]:/i.test(rawSpec)) {
|
|
13282
|
+
res.fetchSpec = `git+file://${parsedUrl.host.toLowerCase()}:${parsedUrl.pathname}`;
|
|
13283
|
+
} else {
|
|
13284
|
+
parsedUrl.hash = "";
|
|
13285
|
+
res.fetchSpec = parsedUrl.toString();
|
|
13286
|
+
}
|
|
13287
|
+
if (res.fetchSpec.startsWith("git+")) {
|
|
13288
|
+
res.fetchSpec = res.fetchSpec.slice(4);
|
|
13289
|
+
}
|
|
13290
|
+
break;
|
|
13291
|
+
case "http:":
|
|
13292
|
+
case "https:":
|
|
13293
|
+
res.type = "remote";
|
|
13294
|
+
res.fetchSpec = res.saveSpec;
|
|
13295
|
+
break;
|
|
13296
|
+
default:
|
|
13297
|
+
throw unsupportedURLType(parsedUrl.protocol, rawSpec);
|
|
13298
|
+
}
|
|
13299
|
+
return res;
|
|
13300
|
+
}
|
|
13301
|
+
__name(fromURL, "fromURL");
|
|
13302
|
+
function fromAlias(res, where) {
|
|
13303
|
+
const subSpec = npa(res.rawSpec.substr(4), where);
|
|
13304
|
+
if (subSpec.type === "alias") {
|
|
13305
|
+
throw new Error("nested aliases not supported");
|
|
13306
|
+
}
|
|
13307
|
+
if (!subSpec.registry) {
|
|
13308
|
+
throw new Error("aliases only work for registry deps");
|
|
13309
|
+
}
|
|
13310
|
+
if (!subSpec.name) {
|
|
13311
|
+
throw new Error("aliases must have a name");
|
|
13312
|
+
}
|
|
13313
|
+
res.subSpec = subSpec;
|
|
13314
|
+
res.registry = true;
|
|
13315
|
+
res.type = "alias";
|
|
13316
|
+
res.saveSpec = null;
|
|
13317
|
+
res.fetchSpec = null;
|
|
13318
|
+
return res;
|
|
13319
|
+
}
|
|
13320
|
+
__name(fromAlias, "fromAlias");
|
|
13321
|
+
function fromRegistry(res) {
|
|
13322
|
+
res.registry = true;
|
|
13323
|
+
const spec = res.rawSpec.trim();
|
|
13324
|
+
res.saveSpec = null;
|
|
13325
|
+
res.fetchSpec = spec;
|
|
13326
|
+
const version = semver.valid(spec, true);
|
|
13327
|
+
const range = semver.validRange(spec, true);
|
|
13328
|
+
if (version) {
|
|
13329
|
+
res.type = "version";
|
|
13330
|
+
} else if (range) {
|
|
13331
|
+
res.type = "range";
|
|
13332
|
+
} else {
|
|
13333
|
+
if (encodeURIComponent(spec) !== spec) {
|
|
13334
|
+
throw invalidTagName(spec, res.raw);
|
|
13335
|
+
}
|
|
13336
|
+
res.type = "tag";
|
|
13337
|
+
}
|
|
13338
|
+
return res;
|
|
13339
|
+
}
|
|
13340
|
+
__name(fromRegistry, "fromRegistry");
|
|
13341
|
+
module2.exports = npa;
|
|
13342
|
+
module2.exports.resolve = resolve;
|
|
13343
|
+
module2.exports.toPurl = toPurl;
|
|
13344
|
+
module2.exports.Result = Result;
|
|
13345
|
+
}
|
|
13346
|
+
});
|
|
13347
|
+
|
|
13348
|
+
// node_modules/.pnpm/npm-install-checks@7.1.2/node_modules/npm-install-checks/lib/current-env.js
|
|
13349
|
+
var require_current_env = __commonJS({
|
|
13350
|
+
"node_modules/.pnpm/npm-install-checks@7.1.2/node_modules/npm-install-checks/lib/current-env.js"(exports2, module2) {
|
|
13351
|
+
var process2 = require("node:process");
|
|
13352
|
+
var nodeOs = require("node:os");
|
|
13353
|
+
var fs = require("node:fs");
|
|
13354
|
+
function isMusl(file) {
|
|
13355
|
+
return file.includes("libc.musl-") || file.includes("ld-musl-");
|
|
13356
|
+
}
|
|
13357
|
+
__name(isMusl, "isMusl");
|
|
13358
|
+
function os() {
|
|
13359
|
+
return process2.platform;
|
|
13360
|
+
}
|
|
13361
|
+
__name(os, "os");
|
|
13362
|
+
function cpu() {
|
|
13363
|
+
return process2.arch;
|
|
13364
|
+
}
|
|
13365
|
+
__name(cpu, "cpu");
|
|
13366
|
+
var LDD_PATH = "/usr/bin/ldd";
|
|
13367
|
+
function getFamilyFromFilesystem() {
|
|
13368
|
+
try {
|
|
13369
|
+
const content = fs.readFileSync(LDD_PATH, "utf-8");
|
|
13370
|
+
if (content.includes("musl")) {
|
|
13371
|
+
return "musl";
|
|
13372
|
+
}
|
|
13373
|
+
if (content.includes("GNU C Library")) {
|
|
13374
|
+
return "glibc";
|
|
13375
|
+
}
|
|
13376
|
+
return null;
|
|
13377
|
+
} catch {
|
|
13378
|
+
return void 0;
|
|
13379
|
+
}
|
|
13380
|
+
}
|
|
13381
|
+
__name(getFamilyFromFilesystem, "getFamilyFromFilesystem");
|
|
13382
|
+
function getFamilyFromReport() {
|
|
13383
|
+
const originalExclude = process2.report.excludeNetwork;
|
|
13384
|
+
process2.report.excludeNetwork = true;
|
|
13385
|
+
const report = process2.report.getReport();
|
|
13386
|
+
process2.report.excludeNetwork = originalExclude;
|
|
13387
|
+
if (report.header?.glibcVersionRuntime) {
|
|
13388
|
+
family = "glibc";
|
|
13389
|
+
} else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) {
|
|
13390
|
+
family = "musl";
|
|
13391
|
+
} else {
|
|
13392
|
+
family = null;
|
|
13393
|
+
}
|
|
13394
|
+
return family;
|
|
13395
|
+
}
|
|
13396
|
+
__name(getFamilyFromReport, "getFamilyFromReport");
|
|
13397
|
+
var family;
|
|
13398
|
+
function libc(osName) {
|
|
13399
|
+
if (osName !== "linux") {
|
|
13400
|
+
return void 0;
|
|
13401
|
+
}
|
|
13402
|
+
if (family === void 0) {
|
|
13403
|
+
family = getFamilyFromFilesystem();
|
|
13404
|
+
if (family === void 0) {
|
|
13405
|
+
family = getFamilyFromReport();
|
|
13406
|
+
}
|
|
13407
|
+
}
|
|
13408
|
+
return family;
|
|
13409
|
+
}
|
|
13410
|
+
__name(libc, "libc");
|
|
13411
|
+
function devEngines(env = {}) {
|
|
13412
|
+
const osName = env.os || os();
|
|
13413
|
+
return {
|
|
13414
|
+
cpu: {
|
|
13415
|
+
name: env.cpu || cpu()
|
|
13416
|
+
},
|
|
13417
|
+
libc: {
|
|
13418
|
+
name: env.libc || libc(osName)
|
|
13419
|
+
},
|
|
13420
|
+
os: {
|
|
13421
|
+
name: osName,
|
|
13422
|
+
version: env.osVersion || nodeOs.release()
|
|
13423
|
+
},
|
|
13424
|
+
packageManager: {
|
|
13425
|
+
name: "npm",
|
|
13426
|
+
version: env.npmVersion
|
|
13427
|
+
},
|
|
13428
|
+
runtime: {
|
|
13429
|
+
name: "node",
|
|
13430
|
+
version: env.nodeVersion || process2.version
|
|
13431
|
+
}
|
|
13432
|
+
};
|
|
13433
|
+
}
|
|
13434
|
+
__name(devEngines, "devEngines");
|
|
13435
|
+
module2.exports = {
|
|
13436
|
+
cpu,
|
|
13437
|
+
libc,
|
|
13438
|
+
os,
|
|
13439
|
+
devEngines
|
|
13440
|
+
};
|
|
13441
|
+
}
|
|
13442
|
+
});
|
|
13443
|
+
|
|
13444
|
+
// node_modules/.pnpm/npm-install-checks@7.1.2/node_modules/npm-install-checks/lib/dev-engines.js
|
|
13445
|
+
var require_dev_engines = __commonJS({
|
|
13446
|
+
"node_modules/.pnpm/npm-install-checks@7.1.2/node_modules/npm-install-checks/lib/dev-engines.js"(exports2, module2) {
|
|
13447
|
+
var satisfies = require_satisfies();
|
|
13448
|
+
var validRange = require_valid2();
|
|
13449
|
+
var recognizedOnFail = [
|
|
13450
|
+
"ignore",
|
|
13451
|
+
"warn",
|
|
13452
|
+
"error",
|
|
13453
|
+
"download"
|
|
13454
|
+
];
|
|
13455
|
+
var recognizedProperties = [
|
|
13456
|
+
"name",
|
|
13457
|
+
"version",
|
|
13458
|
+
"onFail"
|
|
13459
|
+
];
|
|
13460
|
+
var recognizedEngines = [
|
|
13461
|
+
"packageManager",
|
|
13462
|
+
"runtime",
|
|
13463
|
+
"cpu",
|
|
13464
|
+
"libc",
|
|
13465
|
+
"os"
|
|
13466
|
+
];
|
|
13467
|
+
function checkDependency(wanted, current, opts) {
|
|
13468
|
+
const { engine } = opts;
|
|
13469
|
+
if (typeof wanted !== "object" || wanted === null || Array.isArray(wanted)) {
|
|
13470
|
+
throw new Error(`Invalid non-object value for "${engine}"`);
|
|
13471
|
+
}
|
|
13472
|
+
const properties = Object.keys(wanted);
|
|
13473
|
+
for (const prop of properties) {
|
|
13474
|
+
if (!recognizedProperties.includes(prop)) {
|
|
13475
|
+
throw new Error(`Invalid property "${prop}" for "${engine}"`);
|
|
13476
|
+
}
|
|
13477
|
+
}
|
|
13478
|
+
if (!properties.includes("name")) {
|
|
13479
|
+
throw new Error(`Missing "name" property for "${engine}"`);
|
|
13480
|
+
}
|
|
13481
|
+
if (typeof wanted.name !== "string") {
|
|
13482
|
+
throw new Error(`Invalid non-string value for "name" within "${engine}"`);
|
|
13483
|
+
}
|
|
13484
|
+
if (typeof current.name !== "string" || current.name === "") {
|
|
13485
|
+
throw new Error(`Unable to determine "name" for "${engine}"`);
|
|
13486
|
+
}
|
|
13487
|
+
if (properties.includes("onFail")) {
|
|
13488
|
+
if (typeof wanted.onFail !== "string") {
|
|
13489
|
+
throw new Error(`Invalid non-string value for "onFail" within "${engine}"`);
|
|
13490
|
+
}
|
|
13491
|
+
if (!recognizedOnFail.includes(wanted.onFail)) {
|
|
13492
|
+
throw new Error(`Invalid onFail value "${wanted.onFail}" for "${engine}"`);
|
|
13493
|
+
}
|
|
13494
|
+
}
|
|
13495
|
+
if (wanted.name !== current.name) {
|
|
13496
|
+
return new Error(
|
|
13497
|
+
`Invalid name "${wanted.name}" does not match "${current.name}" for "${engine}"`
|
|
13498
|
+
);
|
|
13499
|
+
}
|
|
13500
|
+
if (properties.includes("version")) {
|
|
13501
|
+
if (typeof wanted.version !== "string") {
|
|
13502
|
+
throw new Error(`Invalid non-string value for "version" within "${engine}"`);
|
|
13503
|
+
}
|
|
13504
|
+
if (typeof current.version !== "string" || current.version === "") {
|
|
13505
|
+
throw new Error(`Unable to determine "version" for "${engine}" "${wanted.name}"`);
|
|
13506
|
+
}
|
|
13507
|
+
if (validRange(wanted.version)) {
|
|
13508
|
+
if (!satisfies(current.version, wanted.version, opts.semver)) {
|
|
13509
|
+
return new Error(
|
|
13510
|
+
// eslint-disable-next-line max-len
|
|
13511
|
+
`Invalid semver version "${wanted.version}" does not match "${current.version}" for "${engine}"`
|
|
13512
|
+
);
|
|
13513
|
+
}
|
|
13514
|
+
} else if (wanted.version !== current.version) {
|
|
13515
|
+
return new Error(
|
|
13516
|
+
`Invalid version "${wanted.version}" does not match "${current.version}" for "${engine}"`
|
|
13517
|
+
);
|
|
13518
|
+
}
|
|
13519
|
+
}
|
|
13520
|
+
}
|
|
13521
|
+
__name(checkDependency, "checkDependency");
|
|
13522
|
+
function checkDevEngines(wanted, current = {}, opts = {}) {
|
|
13523
|
+
if (typeof wanted !== "object" || wanted === null || Array.isArray(wanted)) {
|
|
13524
|
+
throw new Error(`Invalid non-object value for "devEngines"`);
|
|
13525
|
+
}
|
|
13526
|
+
const errors = [];
|
|
13527
|
+
for (const engine of Object.keys(wanted)) {
|
|
13528
|
+
if (!recognizedEngines.includes(engine)) {
|
|
13529
|
+
throw new Error(`Invalid property "devEngines.${engine}"`);
|
|
13530
|
+
}
|
|
13531
|
+
const dependencyAsAuthored = wanted[engine];
|
|
13532
|
+
const dependencies = [dependencyAsAuthored].flat();
|
|
13533
|
+
const currentEngine = current[engine] || {};
|
|
13534
|
+
if (dependencies.length === 0) {
|
|
13535
|
+
continue;
|
|
13536
|
+
}
|
|
13537
|
+
const depErrors = [];
|
|
13538
|
+
for (const dep of dependencies) {
|
|
13539
|
+
const result = checkDependency(dep, currentEngine, { ...opts, engine });
|
|
13540
|
+
if (result) {
|
|
13541
|
+
depErrors.push(result);
|
|
13542
|
+
}
|
|
13543
|
+
}
|
|
13544
|
+
const invalid = depErrors.length === dependencies.length;
|
|
13545
|
+
if (invalid) {
|
|
13546
|
+
const lastDependency = dependencies[dependencies.length - 1];
|
|
13547
|
+
let onFail = lastDependency.onFail || "error";
|
|
13548
|
+
if (onFail === "download") {
|
|
13549
|
+
onFail = "error";
|
|
13550
|
+
}
|
|
13551
|
+
const err = Object.assign(new Error(`Invalid devEngines.${engine}`), {
|
|
13552
|
+
errors: depErrors,
|
|
13553
|
+
engine,
|
|
13554
|
+
isWarn: onFail === "warn",
|
|
13555
|
+
isError: onFail === "error",
|
|
13556
|
+
current: currentEngine,
|
|
13557
|
+
required: dependencyAsAuthored
|
|
13558
|
+
});
|
|
13559
|
+
errors.push(err);
|
|
13560
|
+
}
|
|
13561
|
+
}
|
|
13562
|
+
return errors;
|
|
13563
|
+
}
|
|
13564
|
+
__name(checkDevEngines, "checkDevEngines");
|
|
13565
|
+
module2.exports = {
|
|
13566
|
+
checkDevEngines
|
|
13567
|
+
};
|
|
13568
|
+
}
|
|
13569
|
+
});
|
|
13570
|
+
|
|
13571
|
+
// node_modules/.pnpm/npm-install-checks@7.1.2/node_modules/npm-install-checks/lib/index.js
|
|
13572
|
+
var require_lib7 = __commonJS({
|
|
13573
|
+
"node_modules/.pnpm/npm-install-checks@7.1.2/node_modules/npm-install-checks/lib/index.js"(exports2, module2) {
|
|
13574
|
+
var semver = require_semver2();
|
|
13575
|
+
var currentEnv = require_current_env();
|
|
13576
|
+
var { checkDevEngines } = require_dev_engines();
|
|
13577
|
+
var checkEngine = /* @__PURE__ */ __name((target, npmVer, nodeVer, force = false) => {
|
|
13578
|
+
const nodev = force ? null : nodeVer;
|
|
13579
|
+
const eng = target.engines;
|
|
13580
|
+
const opt = { includePrerelease: true };
|
|
13581
|
+
if (!eng) {
|
|
13582
|
+
return;
|
|
13583
|
+
}
|
|
13584
|
+
const nodeFail = nodev && eng.node && !semver.satisfies(nodev, eng.node, opt);
|
|
13585
|
+
const npmFail = npmVer && eng.npm && !semver.satisfies(npmVer, eng.npm, opt);
|
|
13586
|
+
if (nodeFail || npmFail) {
|
|
13587
|
+
throw Object.assign(new Error("Unsupported engine"), {
|
|
13588
|
+
pkgid: target._id,
|
|
13589
|
+
current: { node: nodeVer, npm: npmVer },
|
|
13590
|
+
required: eng,
|
|
13591
|
+
code: "EBADENGINE"
|
|
13592
|
+
});
|
|
13593
|
+
}
|
|
13594
|
+
}, "checkEngine");
|
|
13595
|
+
var checkPlatform = /* @__PURE__ */ __name((target, force = false, environment = {}) => {
|
|
13596
|
+
if (force) {
|
|
13597
|
+
return;
|
|
13598
|
+
}
|
|
13599
|
+
const os = environment.os || currentEnv.os();
|
|
13600
|
+
const cpu = environment.cpu || currentEnv.cpu();
|
|
13601
|
+
const libc = environment.libc || currentEnv.libc(os);
|
|
13602
|
+
const osOk = target.os ? checkList(os, target.os) : true;
|
|
13603
|
+
const cpuOk = target.cpu ? checkList(cpu, target.cpu) : true;
|
|
13604
|
+
let libcOk = target.libc ? checkList(libc, target.libc) : true;
|
|
13605
|
+
if (target.libc && !libc) {
|
|
13606
|
+
libcOk = false;
|
|
13607
|
+
}
|
|
13608
|
+
if (!osOk || !cpuOk || !libcOk) {
|
|
13609
|
+
throw Object.assign(new Error("Unsupported platform"), {
|
|
13610
|
+
pkgid: target._id,
|
|
13611
|
+
current: {
|
|
13612
|
+
os,
|
|
13613
|
+
cpu,
|
|
13614
|
+
libc
|
|
13615
|
+
},
|
|
13616
|
+
required: {
|
|
13617
|
+
os: target.os,
|
|
13618
|
+
cpu: target.cpu,
|
|
13619
|
+
libc: target.libc
|
|
13620
|
+
},
|
|
13621
|
+
code: "EBADPLATFORM"
|
|
13622
|
+
});
|
|
13623
|
+
}
|
|
13624
|
+
}, "checkPlatform");
|
|
13625
|
+
var checkList = /* @__PURE__ */ __name((value, list) => {
|
|
13626
|
+
if (typeof list === "string") {
|
|
13627
|
+
list = [list];
|
|
13628
|
+
}
|
|
13629
|
+
if (list.length === 1 && list[0] === "any") {
|
|
13630
|
+
return true;
|
|
13631
|
+
}
|
|
13632
|
+
let negated = 0;
|
|
13633
|
+
let match = false;
|
|
13634
|
+
for (const entry of list) {
|
|
13635
|
+
const negate = entry.charAt(0) === "!";
|
|
13636
|
+
const test = negate ? entry.slice(1) : entry;
|
|
13637
|
+
if (negate) {
|
|
13638
|
+
negated++;
|
|
13639
|
+
if (value === test) {
|
|
13640
|
+
return false;
|
|
13641
|
+
}
|
|
13642
|
+
} else {
|
|
13643
|
+
match = match || value === test;
|
|
13644
|
+
}
|
|
13645
|
+
}
|
|
13646
|
+
return match || negated === list.length;
|
|
13647
|
+
}, "checkList");
|
|
13648
|
+
module2.exports = {
|
|
13649
|
+
checkEngine,
|
|
13650
|
+
checkPlatform,
|
|
13651
|
+
checkDevEngines,
|
|
13652
|
+
currentEnv
|
|
13653
|
+
};
|
|
13654
|
+
}
|
|
13655
|
+
});
|
|
13656
|
+
|
|
13657
|
+
// node_modules/.pnpm/npm-normalize-package-bin@5.0.0/node_modules/npm-normalize-package-bin/lib/index.js
|
|
13658
|
+
var require_lib8 = __commonJS({
|
|
13659
|
+
"node_modules/.pnpm/npm-normalize-package-bin@5.0.0/node_modules/npm-normalize-package-bin/lib/index.js"(exports2, module2) {
|
|
13660
|
+
var { join, basename } = require("path");
|
|
13661
|
+
var normalize = /* @__PURE__ */ __name((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), "normalize");
|
|
13662
|
+
var normalizeString = /* @__PURE__ */ __name((pkg) => {
|
|
13663
|
+
if (!pkg.name) {
|
|
13664
|
+
return removeBin(pkg);
|
|
13665
|
+
}
|
|
13666
|
+
pkg.bin = { [pkg.name]: pkg.bin };
|
|
13667
|
+
return normalizeObject(pkg);
|
|
13668
|
+
}, "normalizeString");
|
|
13669
|
+
var normalizeArray = /* @__PURE__ */ __name((pkg) => {
|
|
13670
|
+
pkg.bin = pkg.bin.reduce((acc, k) => {
|
|
13671
|
+
acc[basename(k)] = k;
|
|
13672
|
+
return acc;
|
|
13673
|
+
}, {});
|
|
13674
|
+
return normalizeObject(pkg);
|
|
13675
|
+
}, "normalizeArray");
|
|
13676
|
+
var removeBin = /* @__PURE__ */ __name((pkg) => {
|
|
13677
|
+
delete pkg.bin;
|
|
13678
|
+
return pkg;
|
|
13679
|
+
}, "removeBin");
|
|
13680
|
+
var normalizeObject = /* @__PURE__ */ __name((pkg) => {
|
|
13681
|
+
const orig = pkg.bin;
|
|
13682
|
+
const clean = {};
|
|
13683
|
+
let hasBins = false;
|
|
13684
|
+
Object.keys(orig).forEach((binKey) => {
|
|
13685
|
+
const base = join("/", basename(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
13686
|
+
if (typeof orig[binKey] !== "string" || !base) {
|
|
13687
|
+
return;
|
|
13688
|
+
}
|
|
13689
|
+
const binTarget = join("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
13690
|
+
if (!binTarget) {
|
|
13691
|
+
return;
|
|
13692
|
+
}
|
|
13693
|
+
clean[base] = binTarget;
|
|
13694
|
+
hasBins = true;
|
|
13695
|
+
});
|
|
13696
|
+
if (hasBins) {
|
|
13697
|
+
pkg.bin = clean;
|
|
13698
|
+
} else {
|
|
13699
|
+
delete pkg.bin;
|
|
13700
|
+
}
|
|
13701
|
+
return pkg;
|
|
13702
|
+
}, "normalizeObject");
|
|
13703
|
+
module2.exports = normalize;
|
|
13704
|
+
}
|
|
13705
|
+
});
|
|
13706
|
+
|
|
13707
|
+
// node_modules/.pnpm/npm-pick-manifest@10.0.0/node_modules/npm-pick-manifest/lib/index.js
|
|
13708
|
+
var require_lib9 = __commonJS({
|
|
13709
|
+
"node_modules/.pnpm/npm-pick-manifest@10.0.0/node_modules/npm-pick-manifest/lib/index.js"(exports2, module2) {
|
|
13710
|
+
"use strict";
|
|
13711
|
+
var npa = require_npa();
|
|
13712
|
+
var semver = require_semver2();
|
|
13713
|
+
var { checkEngine } = require_lib7();
|
|
13714
|
+
var normalizeBin = require_lib8();
|
|
13715
|
+
var engineOk = /* @__PURE__ */ __name((manifest, npmVersion, nodeVersion) => {
|
|
13716
|
+
try {
|
|
13717
|
+
checkEngine(manifest, npmVersion, nodeVersion);
|
|
13718
|
+
return true;
|
|
13719
|
+
} catch (_) {
|
|
13720
|
+
return false;
|
|
13721
|
+
}
|
|
13722
|
+
}, "engineOk");
|
|
13723
|
+
var isBefore = /* @__PURE__ */ __name((verTimes, ver, time) => !verTimes || !verTimes[ver] || Date.parse(verTimes[ver]) <= time, "isBefore");
|
|
13724
|
+
var avoidSemverOpt = { includePrerelease: true, loose: true };
|
|
13725
|
+
var shouldAvoid = /* @__PURE__ */ __name((ver, avoid) => avoid && semver.satisfies(ver, avoid, avoidSemverOpt), "shouldAvoid");
|
|
13726
|
+
var decorateAvoid = /* @__PURE__ */ __name((result, avoid) => result && shouldAvoid(result.version, avoid) ? { ...result, _shouldAvoid: true } : result, "decorateAvoid");
|
|
13727
|
+
var pickManifest = /* @__PURE__ */ __name((packument, wanted, opts) => {
|
|
13728
|
+
const {
|
|
13729
|
+
defaultTag = "latest",
|
|
13730
|
+
before = null,
|
|
13731
|
+
nodeVersion = process.version,
|
|
13732
|
+
npmVersion = null,
|
|
13733
|
+
includeStaged = false,
|
|
13734
|
+
avoid = null,
|
|
13735
|
+
avoidStrict = false
|
|
13736
|
+
} = opts;
|
|
13737
|
+
const { name, time: verTimes } = packument;
|
|
13738
|
+
const versions = packument.versions || {};
|
|
13739
|
+
if (avoidStrict) {
|
|
13740
|
+
const looseOpts = {
|
|
13741
|
+
...opts,
|
|
13742
|
+
avoidStrict: false
|
|
13743
|
+
};
|
|
13744
|
+
const result = pickManifest(packument, wanted, looseOpts);
|
|
13745
|
+
if (!result || !result._shouldAvoid) {
|
|
13746
|
+
return result;
|
|
13747
|
+
}
|
|
13748
|
+
const caret = pickManifest(packument, `^${result.version}`, looseOpts);
|
|
13749
|
+
if (!caret || !caret._shouldAvoid) {
|
|
13750
|
+
return {
|
|
13751
|
+
...caret,
|
|
13752
|
+
_outsideDependencyRange: true,
|
|
13753
|
+
_isSemVerMajor: false
|
|
13754
|
+
};
|
|
13755
|
+
}
|
|
13756
|
+
const star = pickManifest(packument, "*", looseOpts);
|
|
13757
|
+
if (!star || !star._shouldAvoid) {
|
|
13758
|
+
return {
|
|
13759
|
+
...star,
|
|
13760
|
+
_outsideDependencyRange: true,
|
|
13761
|
+
_isSemVerMajor: true
|
|
13762
|
+
};
|
|
13763
|
+
}
|
|
13764
|
+
throw Object.assign(new Error(`No avoidable versions for ${name}`), {
|
|
13765
|
+
code: "ETARGET",
|
|
13766
|
+
name,
|
|
13767
|
+
wanted,
|
|
13768
|
+
avoid,
|
|
13769
|
+
before,
|
|
13770
|
+
versions: Object.keys(versions)
|
|
13771
|
+
});
|
|
13772
|
+
}
|
|
13773
|
+
const staged = includeStaged && packument.stagedVersions && packument.stagedVersions.versions || {};
|
|
13774
|
+
const restricted = packument.policyRestrictions && packument.policyRestrictions.versions || {};
|
|
13775
|
+
const time = before && verTimes ? +new Date(before) : Infinity;
|
|
13776
|
+
const spec = npa.resolve(name, wanted || defaultTag);
|
|
13777
|
+
const type = spec.type;
|
|
13778
|
+
const distTags = packument["dist-tags"] || {};
|
|
13779
|
+
if (type !== "tag" && type !== "version" && type !== "range") {
|
|
13780
|
+
throw new Error("Only tag, version, and range are supported");
|
|
13781
|
+
}
|
|
13782
|
+
if (wanted && type === "tag") {
|
|
13783
|
+
const ver = distTags[wanted];
|
|
13784
|
+
if (isBefore(verTimes, ver, time)) {
|
|
13785
|
+
return decorateAvoid(versions[ver] || staged[ver] || restricted[ver], avoid);
|
|
13786
|
+
} else {
|
|
13787
|
+
return pickManifest(packument, `<=${ver}`, opts);
|
|
13788
|
+
}
|
|
13789
|
+
}
|
|
13790
|
+
if (wanted && type === "version") {
|
|
13791
|
+
const ver = semver.clean(wanted, { loose: true });
|
|
13792
|
+
const mani = versions[ver] || staged[ver] || restricted[ver];
|
|
13793
|
+
return isBefore(verTimes, ver, time) ? decorateAvoid(mani, avoid) : null;
|
|
13794
|
+
}
|
|
13795
|
+
const range = type === "range" ? wanted : "*";
|
|
13796
|
+
const defaultVer = distTags[defaultTag];
|
|
13797
|
+
if (defaultVer && (range === "*" || semver.satisfies(defaultVer, range, { loose: true })) && !restricted[defaultVer] && !shouldAvoid(defaultVer, avoid)) {
|
|
13798
|
+
const mani = versions[defaultVer];
|
|
13799
|
+
const ok = mani && isBefore(verTimes, defaultVer, time) && engineOk(mani, npmVersion, nodeVersion) && !mani.deprecated && !staged[defaultVer];
|
|
13800
|
+
if (ok) {
|
|
13801
|
+
return mani;
|
|
13802
|
+
}
|
|
13803
|
+
}
|
|
13804
|
+
const allEntries = Object.entries(versions).concat(Object.entries(staged)).concat(Object.entries(restricted)).filter(([ver]) => isBefore(verTimes, ver, time));
|
|
13805
|
+
if (!allEntries.length) {
|
|
13806
|
+
throw Object.assign(new Error(`No versions available for ${name}`), {
|
|
13807
|
+
code: "ENOVERSIONS",
|
|
13808
|
+
name,
|
|
13809
|
+
type,
|
|
13810
|
+
wanted,
|
|
13811
|
+
before,
|
|
13812
|
+
versions: Object.keys(versions)
|
|
13813
|
+
});
|
|
13814
|
+
}
|
|
13815
|
+
const sortSemverOpt = { loose: true };
|
|
13816
|
+
const entries = allEntries.filter(([ver]) => semver.satisfies(ver, range, { loose: true })).sort((a, b) => {
|
|
13817
|
+
const [vera, mania] = a;
|
|
13818
|
+
const [verb, manib] = b;
|
|
13819
|
+
const notavoida = !shouldAvoid(vera, avoid);
|
|
13820
|
+
const notavoidb = !shouldAvoid(verb, avoid);
|
|
13821
|
+
const notrestra = !restricted[vera];
|
|
13822
|
+
const notrestrb = !restricted[verb];
|
|
13823
|
+
const notstagea = !staged[vera];
|
|
13824
|
+
const notstageb = !staged[verb];
|
|
13825
|
+
const notdepra = !mania.deprecated;
|
|
13826
|
+
const notdeprb = !manib.deprecated;
|
|
13827
|
+
const enginea = engineOk(mania, npmVersion, nodeVersion);
|
|
13828
|
+
const engineb = engineOk(manib, npmVersion, nodeVersion);
|
|
13829
|
+
return notavoidb - notavoida || notrestrb - notrestra || notstageb - notstagea || (notdeprb && engineb) - (notdepra && enginea) || engineb - enginea || notdeprb - notdepra || semver.rcompare(vera, verb, sortSemverOpt);
|
|
13830
|
+
});
|
|
13831
|
+
return decorateAvoid(entries[0] && entries[0][1], avoid);
|
|
13832
|
+
}, "pickManifest");
|
|
13833
|
+
module2.exports = (packument, wanted, opts = {}) => {
|
|
13834
|
+
const mani = pickManifest(packument, wanted, opts);
|
|
13835
|
+
const picked = mani && normalizeBin(mani);
|
|
13836
|
+
const policyRestrictions = packument.policyRestrictions;
|
|
13837
|
+
const restricted = policyRestrictions && policyRestrictions.versions || {};
|
|
13838
|
+
if (picked && !restricted[picked.version]) {
|
|
13839
|
+
return picked;
|
|
13840
|
+
}
|
|
13841
|
+
const { before = null, defaultTag = "latest" } = opts;
|
|
13842
|
+
const bstr = before ? new Date(before).toLocaleString() : "";
|
|
13843
|
+
const { name } = packument;
|
|
13844
|
+
const pckg = `${name}@${wanted}` + (before ? ` with a date before ${bstr}` : "");
|
|
13845
|
+
const isForbidden = picked && !!restricted[picked.version];
|
|
13846
|
+
const polMsg = isForbidden ? policyRestrictions.message : "";
|
|
13847
|
+
const msg = !isForbidden ? `No matching version found for ${pckg}.` : `Could not download ${pckg} due to policy violations:
|
|
13848
|
+
${polMsg}`;
|
|
13849
|
+
const code = isForbidden ? "E403" : "ETARGET";
|
|
13850
|
+
throw Object.assign(new Error(msg), {
|
|
13851
|
+
code,
|
|
13852
|
+
type: npa.resolve(packument.name, wanted).type,
|
|
13853
|
+
wanted,
|
|
13854
|
+
versions: Object.keys(packument.versions ?? {}),
|
|
13855
|
+
name,
|
|
13856
|
+
distTags: packument["dist-tags"],
|
|
13857
|
+
defaultTag
|
|
13858
|
+
});
|
|
13859
|
+
};
|
|
13860
|
+
}
|
|
13861
|
+
});
|
|
13862
|
+
|
|
13863
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/clone.js
|
|
13864
|
+
var require_clone = __commonJS({
|
|
13865
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/clone.js"(exports2, module2) {
|
|
13866
|
+
var shallowHosts = /* @__PURE__ */ new _p_SetCtor([
|
|
13867
|
+
"github.com",
|
|
13868
|
+
"gist.github.com",
|
|
13869
|
+
"gitlab.com",
|
|
13870
|
+
"bitbucket.com",
|
|
13871
|
+
"bitbucket.org"
|
|
13872
|
+
]);
|
|
13873
|
+
var { parse } = require("url");
|
|
13874
|
+
var path = require("path");
|
|
13875
|
+
var getRevs = require_revs();
|
|
13876
|
+
var spawn = require_spawn();
|
|
13877
|
+
var { isWindows } = require_utils();
|
|
13878
|
+
var pickManifest = require_lib9();
|
|
13879
|
+
var fs = require("fs/promises");
|
|
13880
|
+
module2.exports = (repo, ref = "HEAD", target = null, opts = {}) => getRevs(repo, opts).then((revs) => clone(
|
|
13881
|
+
repo,
|
|
13882
|
+
revs,
|
|
13883
|
+
ref,
|
|
13884
|
+
resolveRef(revs, ref, opts),
|
|
13885
|
+
target || defaultTarget(repo, opts.cwd),
|
|
13886
|
+
opts
|
|
13887
|
+
));
|
|
13888
|
+
var maybeShallow = /* @__PURE__ */ __name((repo, opts) => {
|
|
13889
|
+
if (opts.gitShallow === false || opts.gitShallow) {
|
|
13890
|
+
return opts.gitShallow;
|
|
13891
|
+
}
|
|
13892
|
+
return shallowHosts.has(parse(repo).host);
|
|
13893
|
+
}, "maybeShallow");
|
|
13894
|
+
var defaultTarget = /* @__PURE__ */ __name((repo, cwd = process.cwd()) => path.resolve(cwd, path.basename(repo.replace(/[/\\]?\.git$/, ""))), "defaultTarget");
|
|
13895
|
+
var clone = /* @__PURE__ */ __name((repo, revs, ref, revDoc, target, opts) => {
|
|
13896
|
+
if (!revDoc) {
|
|
13897
|
+
return unresolved(repo, ref, target, opts);
|
|
13898
|
+
}
|
|
13899
|
+
if (revDoc.sha === revs.refs.HEAD.sha) {
|
|
13900
|
+
return plain(repo, revDoc, target, opts);
|
|
13901
|
+
}
|
|
13902
|
+
if (revDoc.type === "tag" || revDoc.type === "branch") {
|
|
13903
|
+
return branch(repo, revDoc, target, opts);
|
|
13904
|
+
}
|
|
13905
|
+
return other(repo, revDoc, target, opts);
|
|
13906
|
+
}, "clone");
|
|
13907
|
+
var resolveRef = /* @__PURE__ */ __name((revs, ref, opts) => {
|
|
13908
|
+
const { spec = {} } = opts;
|
|
13909
|
+
ref = spec.gitCommittish || ref;
|
|
13910
|
+
if (!revs) {
|
|
13911
|
+
return null;
|
|
13912
|
+
}
|
|
13913
|
+
if (spec.gitRange) {
|
|
13914
|
+
return pickManifest(revs, spec.gitRange, opts);
|
|
13915
|
+
}
|
|
13916
|
+
if (!ref) {
|
|
13917
|
+
return revs.refs.HEAD;
|
|
13918
|
+
}
|
|
13919
|
+
if (revs.refs[ref]) {
|
|
13920
|
+
return revs.refs[ref];
|
|
13921
|
+
}
|
|
13922
|
+
if (revs.shas[ref]) {
|
|
13923
|
+
return revs.refs[revs.shas[ref][0]];
|
|
13924
|
+
}
|
|
13925
|
+
return null;
|
|
13926
|
+
}, "resolveRef");
|
|
13927
|
+
var other = /* @__PURE__ */ __name((repo, revDoc, target, opts) => {
|
|
13928
|
+
const shallow = maybeShallow(repo, opts);
|
|
13929
|
+
const fetchOrigin = ["fetch", "origin", revDoc.rawRef].concat(shallow ? ["--depth=1"] : []);
|
|
13930
|
+
const git = /* @__PURE__ */ __name((args) => spawn(args, { ...opts, cwd: target }), "git");
|
|
13931
|
+
return fs.mkdir(target, { recursive: true }).then(() => git(["init"])).then(() => isWindows(opts) ? git(["config", "--local", "--add", "core.longpaths", "true"]) : null).then(() => git(["remote", "add", "origin", repo])).then(() => git(fetchOrigin)).then(() => git(["checkout", revDoc.sha])).then(() => updateSubmodules(target, opts)).then(() => revDoc.sha);
|
|
13932
|
+
}, "other");
|
|
13933
|
+
var branch = /* @__PURE__ */ __name((repo, revDoc, target, opts) => {
|
|
13934
|
+
const args = [
|
|
13935
|
+
"clone",
|
|
13936
|
+
"-b",
|
|
13937
|
+
revDoc.ref,
|
|
13938
|
+
repo,
|
|
13939
|
+
target,
|
|
13940
|
+
"--recurse-submodules"
|
|
13941
|
+
];
|
|
13942
|
+
if (maybeShallow(repo, opts)) {
|
|
13943
|
+
args.push("--depth=1");
|
|
13944
|
+
}
|
|
13945
|
+
if (isWindows(opts)) {
|
|
13946
|
+
args.push("--config", "core.longpaths=true");
|
|
13947
|
+
}
|
|
13948
|
+
return spawn(args, opts).then(() => revDoc.sha);
|
|
13949
|
+
}, "branch");
|
|
13950
|
+
var plain = /* @__PURE__ */ __name((repo, revDoc, target, opts) => {
|
|
13951
|
+
const args = [
|
|
13952
|
+
"clone",
|
|
13953
|
+
repo,
|
|
13954
|
+
target,
|
|
13955
|
+
"--recurse-submodules"
|
|
13956
|
+
];
|
|
13957
|
+
if (maybeShallow(repo, opts)) {
|
|
13958
|
+
args.push("--depth=1");
|
|
13959
|
+
}
|
|
13960
|
+
if (isWindows(opts)) {
|
|
13961
|
+
args.push("--config", "core.longpaths=true");
|
|
13962
|
+
}
|
|
13963
|
+
return spawn(args, opts).then(() => revDoc.sha);
|
|
13964
|
+
}, "plain");
|
|
13965
|
+
var updateSubmodules = /* @__PURE__ */ __name(async (target, opts) => {
|
|
13966
|
+
const hasSubmodules = await fs.stat(`${target}/.gitmodules`).then(() => true).catch(() => false);
|
|
13967
|
+
if (!hasSubmodules) {
|
|
13968
|
+
return null;
|
|
13969
|
+
}
|
|
13970
|
+
return spawn([
|
|
13971
|
+
"submodule",
|
|
13972
|
+
"update",
|
|
13973
|
+
"-q",
|
|
13974
|
+
"--init",
|
|
13975
|
+
"--recursive"
|
|
13976
|
+
], { ...opts, cwd: target });
|
|
13977
|
+
}, "updateSubmodules");
|
|
13978
|
+
var unresolved = /* @__PURE__ */ __name((repo, ref, target, opts) => {
|
|
13979
|
+
const lp = isWindows(opts) ? ["--config", "core.longpaths=true"] : [];
|
|
13980
|
+
const cloneArgs = ["clone", "--mirror", "-q", repo, target + "/.git"];
|
|
13981
|
+
const git = /* @__PURE__ */ __name((args) => spawn(args, { ...opts, cwd: target }), "git");
|
|
13982
|
+
return fs.mkdir(target, { recursive: true }).then(() => git(cloneArgs.concat(lp))).then(() => git(["init"])).then(() => git(["checkout", ref])).then(() => updateSubmodules(target, opts)).then(() => git(["rev-parse", "--revs-only", "HEAD"])).then(({ stdout }) => stdout.trim());
|
|
13983
|
+
}, "unresolved");
|
|
13984
|
+
}
|
|
13985
|
+
});
|
|
13986
|
+
|
|
13987
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/is.js
|
|
13988
|
+
var require_is = __commonJS({
|
|
13989
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/is.js"(exports2, module2) {
|
|
13990
|
+
var { stat } = require("fs/promises");
|
|
13991
|
+
module2.exports = ({ cwd = process.cwd() } = {}) => stat(cwd + "/.git").then(() => true, () => false);
|
|
13992
|
+
}
|
|
13993
|
+
});
|
|
13994
|
+
|
|
13995
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/find.js
|
|
13996
|
+
var require_find = __commonJS({
|
|
13997
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/find.js"(exports2, module2) {
|
|
13998
|
+
var is = require_is();
|
|
13999
|
+
var { dirname } = require("path");
|
|
14000
|
+
module2.exports = async ({ cwd = process.cwd(), root } = {}) => {
|
|
14001
|
+
while (true) {
|
|
14002
|
+
if (await is({ cwd })) {
|
|
14003
|
+
return cwd;
|
|
14004
|
+
}
|
|
14005
|
+
const next = dirname(cwd);
|
|
14006
|
+
if (cwd === root || cwd === next) {
|
|
14007
|
+
return null;
|
|
14008
|
+
}
|
|
14009
|
+
cwd = next;
|
|
14010
|
+
}
|
|
14011
|
+
};
|
|
14012
|
+
}
|
|
14013
|
+
});
|
|
14014
|
+
|
|
14015
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/is-clean.js
|
|
14016
|
+
var require_is_clean = __commonJS({
|
|
14017
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/is-clean.js"(exports2, module2) {
|
|
14018
|
+
var spawn = require_spawn();
|
|
14019
|
+
module2.exports = (opts = {}) => spawn(["status", "--porcelain=v1", "-uno"], opts).then((res) => !res.stdout.trim().split(/\r?\n+/).map((l) => l.trim()).filter((l) => l).length);
|
|
14020
|
+
}
|
|
14021
|
+
});
|
|
14022
|
+
|
|
14023
|
+
// node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/index.js
|
|
14024
|
+
var require_lib10 = __commonJS({
|
|
14025
|
+
"node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/index.js"(exports2, module2) {
|
|
14026
|
+
module2.exports = {
|
|
14027
|
+
clone: require_clone(),
|
|
14028
|
+
revs: require_revs(),
|
|
14029
|
+
spawn: require_spawn(),
|
|
14030
|
+
is: require_is(),
|
|
14031
|
+
find: require_find(),
|
|
14032
|
+
isClean: require_is_clean(),
|
|
14033
|
+
errors: require_errors()
|
|
14034
|
+
};
|
|
14035
|
+
}
|
|
14036
|
+
});
|
|
14037
|
+
|
|
14038
|
+
// node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/normalize.js
|
|
14039
|
+
var require_normalize = __commonJS({
|
|
14040
|
+
"node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/normalize.js"(exports2, module2) {
|
|
14041
|
+
var valid = require_valid();
|
|
14042
|
+
var clean = require_clean();
|
|
14043
|
+
var fs = require("node:fs/promises");
|
|
14044
|
+
var path = require("node:path");
|
|
14045
|
+
var { log } = require_lib2();
|
|
14046
|
+
var moduleBuiltin = require("node:module");
|
|
14047
|
+
var _hostedGitInfo;
|
|
14048
|
+
function lazyHostedGitInfo() {
|
|
14049
|
+
if (!_hostedGitInfo) {
|
|
14050
|
+
_hostedGitInfo = require_lib3();
|
|
14051
|
+
}
|
|
14052
|
+
return _hostedGitInfo;
|
|
14053
|
+
}
|
|
14054
|
+
__name(lazyHostedGitInfo, "lazyHostedGitInfo");
|
|
14055
|
+
var _glob;
|
|
14056
|
+
function lazyLoadGlob() {
|
|
14057
|
+
if (!_glob) {
|
|
14058
|
+
_glob = require_commonjs7().glob;
|
|
14059
|
+
}
|
|
14060
|
+
return _glob;
|
|
14061
|
+
}
|
|
14062
|
+
__name(lazyLoadGlob, "lazyLoadGlob");
|
|
14063
|
+
function normalizePackageBin(pkg, changes) {
|
|
14064
|
+
if (pkg.bin) {
|
|
14065
|
+
if (typeof pkg.bin === "string" && pkg.name) {
|
|
14066
|
+
changes?.push('"bin" was converted to an object');
|
|
14067
|
+
pkg.bin = { [pkg.name]: pkg.bin };
|
|
14068
|
+
} else if (Array.isArray(pkg.bin)) {
|
|
14069
|
+
changes?.push('"bin" was converted to an object');
|
|
14070
|
+
pkg.bin = pkg.bin.reduce((acc, k) => {
|
|
14071
|
+
acc[path.basename(k)] = k;
|
|
14072
|
+
return acc;
|
|
14073
|
+
}, {});
|
|
14074
|
+
}
|
|
14075
|
+
if (typeof pkg.bin === "object") {
|
|
14076
|
+
for (const binKey in pkg.bin) {
|
|
14077
|
+
if (typeof pkg.bin[binKey] !== "string") {
|
|
14078
|
+
delete pkg.bin[binKey];
|
|
14079
|
+
changes?.push(`removed invalid "bin[${binKey}]"`);
|
|
14080
|
+
continue;
|
|
14081
|
+
}
|
|
14082
|
+
const base = path.basename(secureAndUnixifyPath(binKey));
|
|
14083
|
+
if (!base) {
|
|
14084
|
+
delete pkg.bin[binKey];
|
|
14085
|
+
changes?.push(`removed invalid "bin[${binKey}]"`);
|
|
14086
|
+
continue;
|
|
14087
|
+
}
|
|
14088
|
+
const binTarget = secureAndUnixifyPath(pkg.bin[binKey]);
|
|
14089
|
+
if (!binTarget) {
|
|
14090
|
+
delete pkg.bin[binKey];
|
|
14091
|
+
changes?.push(`removed invalid "bin[${binKey}]"`);
|
|
14092
|
+
continue;
|
|
14093
|
+
}
|
|
14094
|
+
if (base !== binKey) {
|
|
14095
|
+
delete pkg.bin[binKey];
|
|
14096
|
+
changes?.push(`"bin[${binKey}]" was renamed to "bin[${base}]"`);
|
|
14097
|
+
}
|
|
14098
|
+
if (binTarget !== pkg.bin[binKey]) {
|
|
14099
|
+
changes?.push(`"bin[${base}]" script name ${binTarget} was invalid and removed`);
|
|
14100
|
+
}
|
|
14101
|
+
pkg.bin[base] = binTarget;
|
|
14102
|
+
}
|
|
14103
|
+
if (Object.keys(pkg.bin).length === 0) {
|
|
14104
|
+
changes?.push('empty "bin" was removed');
|
|
14105
|
+
delete pkg.bin;
|
|
14106
|
+
}
|
|
14107
|
+
return pkg;
|
|
14108
|
+
}
|
|
14109
|
+
}
|
|
14110
|
+
delete pkg.bin;
|
|
14111
|
+
}
|
|
14112
|
+
__name(normalizePackageBin, "normalizePackageBin");
|
|
14113
|
+
function normalizePackageMan(pkg, changes) {
|
|
14114
|
+
if (pkg.man) {
|
|
14115
|
+
const mans = [];
|
|
14116
|
+
for (const man of Array.isArray(pkg.man) ? pkg.man : [pkg.man]) {
|
|
14117
|
+
if (typeof man !== "string") {
|
|
14118
|
+
changes?.push(`removed invalid "man [${man}]"`);
|
|
14119
|
+
} else {
|
|
14120
|
+
mans.push(secureAndUnixifyPath(man));
|
|
14121
|
+
}
|
|
14122
|
+
}
|
|
14123
|
+
if (!mans.length) {
|
|
14124
|
+
changes?.push('empty "man" was removed');
|
|
14125
|
+
} else {
|
|
14126
|
+
pkg.man = mans;
|
|
14127
|
+
return pkg;
|
|
14128
|
+
}
|
|
14129
|
+
}
|
|
14130
|
+
delete pkg.man;
|
|
14131
|
+
}
|
|
14132
|
+
__name(normalizePackageMan, "normalizePackageMan");
|
|
14133
|
+
function isCorrectlyEncodedName(spec) {
|
|
14134
|
+
return !spec.match(/[/@\s+%:]/) && spec === encodeURIComponent(spec);
|
|
14135
|
+
}
|
|
14136
|
+
__name(isCorrectlyEncodedName, "isCorrectlyEncodedName");
|
|
14137
|
+
function isValidScopedPackageName(spec) {
|
|
14138
|
+
if (spec.charAt(0) !== "@") {
|
|
14139
|
+
return false;
|
|
14140
|
+
}
|
|
14141
|
+
const rest = spec.slice(1).split("/");
|
|
14142
|
+
if (rest.length !== 2) {
|
|
14143
|
+
return false;
|
|
14144
|
+
}
|
|
14145
|
+
return rest[0] && rest[1] && rest[0] === encodeURIComponent(rest[0]) && rest[1] === encodeURIComponent(rest[1]);
|
|
14146
|
+
}
|
|
14147
|
+
__name(isValidScopedPackageName, "isValidScopedPackageName");
|
|
14148
|
+
function unixifyPath(ref) {
|
|
14149
|
+
return ref.replace(/\\|:/g, "/");
|
|
14150
|
+
}
|
|
14151
|
+
__name(unixifyPath, "unixifyPath");
|
|
14152
|
+
function secureAndUnixifyPath(ref) {
|
|
14153
|
+
const secured = unixifyPath(path.join(".", path.join("/", unixifyPath(ref))));
|
|
14154
|
+
return secured.startsWith("./") ? "" : secured;
|
|
14155
|
+
}
|
|
14156
|
+
__name(secureAndUnixifyPath, "secureAndUnixifyPath");
|
|
14157
|
+
function syncSteps(pkg, { strict, steps, changes, allowLegacyCase }) {
|
|
14158
|
+
const data = pkg.content;
|
|
14159
|
+
const pkgId = `${data.name ?? ""}@${data.version ?? ""}`;
|
|
14160
|
+
if (steps.includes("fixName") || steps.includes("fixNameField") || steps.includes("normalizeData")) {
|
|
14161
|
+
if (!data.name && !strict) {
|
|
14162
|
+
changes?.push('Missing "name" field was set to an empty string');
|
|
14163
|
+
data.name = "";
|
|
14164
|
+
} else {
|
|
14165
|
+
if (typeof data.name !== "string") {
|
|
14166
|
+
throw new Error("name field must be a string.");
|
|
14167
|
+
}
|
|
14168
|
+
if (!strict) {
|
|
14169
|
+
const name = data.name.trim();
|
|
14170
|
+
if (data.name !== name) {
|
|
14171
|
+
changes?.push(`Whitespace was trimmed from "name"`);
|
|
14172
|
+
data.name = name;
|
|
14173
|
+
}
|
|
14174
|
+
}
|
|
14175
|
+
if (data.name.startsWith(".") || !(isValidScopedPackageName(data.name) || isCorrectlyEncodedName(data.name)) || strict && !allowLegacyCase && data.name !== data.name.toLowerCase() || data.name.toLowerCase() === "node_modules" || data.name.toLowerCase() === "favicon.ico") {
|
|
14176
|
+
throw new Error("Invalid name: " + JSON.stringify(data.name));
|
|
14177
|
+
}
|
|
14178
|
+
}
|
|
14179
|
+
}
|
|
14180
|
+
if (steps.includes("fixName")) {
|
|
14181
|
+
if (moduleBuiltin.builtinModules.includes(data.name)) {
|
|
14182
|
+
log.warn("package-json", pkgId, `Package name "${data.name}" conflicts with a Node.js built-in module name`);
|
|
14183
|
+
}
|
|
14184
|
+
}
|
|
14185
|
+
if (steps.includes("fixVersionField") || steps.includes("normalizeData")) {
|
|
14186
|
+
const loose = !strict;
|
|
14187
|
+
if (!data.version) {
|
|
14188
|
+
data.version = "";
|
|
14189
|
+
} else {
|
|
14190
|
+
if (!valid(data.version, loose)) {
|
|
14191
|
+
throw new Error(`Invalid version: "${data.version}"`);
|
|
14192
|
+
}
|
|
14193
|
+
const version = clean(data.version, loose);
|
|
14194
|
+
if (version !== data.version) {
|
|
14195
|
+
changes?.push(`"version" was cleaned and set to "${version}"`);
|
|
14196
|
+
data.version = version;
|
|
14197
|
+
}
|
|
14198
|
+
}
|
|
14199
|
+
}
|
|
14200
|
+
if (steps.includes("_attributes")) {
|
|
14201
|
+
for (const key in data) {
|
|
14202
|
+
if (key.startsWith("_")) {
|
|
10243
14203
|
changes?.push(`"${key}" was removed`);
|
|
10244
14204
|
delete pkg.content[key];
|
|
10245
14205
|
}
|
|
@@ -10484,7 +14444,7 @@ var require_normalize = __commonJS({
|
|
|
10484
14444
|
normalizePackageBin(data, changes);
|
|
10485
14445
|
}
|
|
10486
14446
|
if (steps.includes("gitHead") && !data.gitHead) {
|
|
10487
|
-
const git =
|
|
14447
|
+
const git = require_lib10();
|
|
10488
14448
|
const gitRoot = await git.find({ cwd: pkg.path, root });
|
|
10489
14449
|
let head;
|
|
10490
14450
|
if (gitRoot) {
|
|
@@ -10611,7 +14571,7 @@ var require_read_package = __commonJS({
|
|
|
10611
14571
|
});
|
|
10612
14572
|
|
|
10613
14573
|
// node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/sort.js
|
|
10614
|
-
var
|
|
14574
|
+
var require_sort2 = __commonJS({
|
|
10615
14575
|
"node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/sort.js"(exports2, module2) {
|
|
10616
14576
|
function packageSort(json) {
|
|
10617
14577
|
const {
|
|
@@ -10709,7 +14669,7 @@ var require_sort = __commonJS({
|
|
|
10709
14669
|
});
|
|
10710
14670
|
|
|
10711
14671
|
// node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/index.js
|
|
10712
|
-
var
|
|
14672
|
+
var require_lib11 = __commonJS({
|
|
10713
14673
|
"node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/index.js"(exports2, module2) {
|
|
10714
14674
|
var { readFile, writeFile } = require("node:fs/promises");
|
|
10715
14675
|
var { resolve } = require("node:path");
|
|
@@ -10719,7 +14679,7 @@ var require_lib4 = __commonJS({
|
|
|
10719
14679
|
var updateWorkspaces = require_update_workspaces();
|
|
10720
14680
|
var { normalize, syncNormalize } = require_normalize();
|
|
10721
14681
|
var { read, parse } = require_read_package();
|
|
10722
|
-
var { packageSort } =
|
|
14682
|
+
var { packageSort } = require_sort2();
|
|
10723
14683
|
var knownSteps = /* @__PURE__ */ new Set([
|
|
10724
14684
|
updateDeps,
|
|
10725
14685
|
updateScripts,
|
|
@@ -10965,4 +14925,4 @@ var require_lib4 = __commonJS({
|
|
|
10965
14925
|
});
|
|
10966
14926
|
|
|
10967
14927
|
// src/external/@npmcli/package-json.js
|
|
10968
|
-
module.exports =
|
|
14928
|
+
module.exports = require_lib11();
|