vite-plus 0.2.9 → 0.3.1
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/LICENSE +29 -29
- package/README.md +6 -5
- package/binding/index.cjs +63 -55
- package/binding/index.d.cts +218 -14
- package/dist/{agent-DQU8uS6P.js → agent-C5jMYVfB.js} +3 -2
- package/dist/bin.js +101 -60
- package/dist/cli-parse-DHE8NrBU.js +13 -0
- package/dist/client/bundledDevClient.mjs +1 -1
- package/dist/client/client.mjs +1 -1
- package/dist/client/env.mjs +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/command-CLJK5jGW.js +2 -0
- package/dist/command-CguLh2KL.js +471 -0
- package/dist/config/bin.js +85 -55
- package/dist/{constants-CG513DRa.js → constants-0IAVgpox.js} +5 -3
- package/dist/create/bin.d.ts +13 -5
- package/dist/create/bin.js +55 -232
- package/dist/{define-config-DyNLA_f0.cjs → define-config-DIE9de46.cjs} +2 -2
- package/dist/{define-config-DWoAkNdp.d.ts → define-config-DPNEJxPz.d.ts} +5 -9
- package/dist/{define-config-CV4bQG_8.js → define-config-U3_xg7i-.js} +2 -2
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -1
- package/dist/dist-DfmT__Aw.js +619 -0
- package/dist/{editor-g4PosU99.js → editor-B5-lvRaU.js} +619 -88
- package/dist/{terminal-Bz-ps6rJ.js → help-BmKpeOP9.js} +1 -38
- package/dist/hooks/bin.js +9 -113
- package/dist/{hooks-pNCBWtFT.js → hooks-C-4gykWR.js} +5 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/migration/bin.js +76 -146
- package/dist/migration/compat/worker.js +1 -1
- package/dist/module-runner.d.ts +1 -1
- package/dist/module-runner.js +1 -1
- package/dist/{oxlint-plugin-config-BEZ9IUf7.js → oxlint-plugin-config-Drdl67Xp.js} +1 -1
- package/dist/oxlint-plugin.d.ts +2 -2
- package/dist/oxlint-plugin.js +1 -1
- package/dist/{pack-PvUg_xpv.d.ts → pack-BK38MLVZ.d.ts} +1 -1
- package/dist/pack-bin.d.ts +2 -3
- package/dist/pack-bin.js +9 -625
- package/dist/pack-client.d.ts +1 -1
- package/dist/pack.d.ts +2 -2
- package/dist/pack.js +1 -1
- package/dist/{package-B4T8RGMG.js → package-BZz2Ij68.js} +2 -2
- package/dist/{prompts-CHz_98bJ.js → prompts-CtzEgFY-.js} +7 -1872
- package/dist/{report-BS7ULx7A.js → report-CK5TnTsr.js} +2 -0
- package/dist/{resolve-vite-config-Dmeyeyj-.js → resolve-vite-config-CGks1xR7.js} +3 -3
- package/dist/resolve-vite-config-Dnmc-lBc.js +2 -0
- package/dist/semver-CaDAb8vV.js +1400 -0
- package/dist/staged/bin.js +82 -187
- package/dist/sync-versions/bin.d.ts +1 -0
- package/dist/sync-versions/bin.js +3884 -0
- package/dist/sync-versions/bin.mjs +13323 -0
- package/dist/terminal-MKGAuy-p.js +39 -0
- package/dist/toolchain.js +11 -11
- package/dist/toolchain.json +11 -11
- package/dist/{tsconfig-7v_BHagU.js → tsconfig-CUggNuJR.js} +5 -4
- package/dist/tsconfig-VAbm4ZzJ.js +2 -0
- package/dist/tsgolint-path.d.ts +3 -4
- package/dist/types/customEvent.d.ts +1 -1
- package/dist/types/hmrPayload.d.ts +1 -1
- package/dist/types/hot.d.ts +1 -1
- package/dist/types/import-meta.d.ts +1 -1
- package/dist/types/importGlob.d.ts +1 -1
- package/dist/types/importMeta.d.ts +1 -1
- package/dist/types/metadata.d.ts +1 -1
- package/dist/version.d.ts +2 -3
- package/dist/version.js +4 -3
- package/dist/versions.js +6 -6
- package/dist/vitest-ecosystem-BiRqcaRI.js +23 -0
- package/docs/guide/check.md +1 -0
- package/docs/guide/ci.md +42 -2
- package/docs/guide/env.md +136 -50
- package/docs/guide/ide-integration.md +14 -2
- package/docs/guide/index.md +1 -1
- package/docs/guide/install.md +5 -2
- package/docs/guide/installer-env-vars.md +51 -5
- package/docs/guide/migrate-rules.md +66 -2
- package/docs/guide/migrate.md +5 -5
- package/docs/guide/test.md +8 -0
- package/docs/guide/upgrade.md +48 -1
- package/package.json +34 -37
- package/dist/lib-L3DWSRQp.js +0 -75
- package/docs/_data/team.ts +0 -131
- package/docs/package.json +0 -30
- package/docs/pnpm-lock.yaml +0 -4003
- package/docs/pnpm-workspace.yaml +0 -13
- package/docs/public/checkmark.svg +0 -1
- package/docs/public/cta-background.jpg +0 -0
- package/docs/public/favicon.svg +0 -1
- package/docs/public/icon.svg +0 -1
- package/docs/public/logo.svg +0 -1
- package/docs/public/og.jpg +0 -0
- package/docs/vite.config.ts +0 -20
- package/dist/{json-qlK6UH0r.js → json-cULBl7Pi.js} +107 -107
|
@@ -1,486 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as accent } from "./terminal-
|
|
3
|
-
import {
|
|
4
|
-
import { a as writeJsonFile, i as readJsonFile } from "./json-
|
|
1
|
+
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CMFfr-1z.js";
|
|
2
|
+
import { t as accent } from "./terminal-MKGAuy-p.js";
|
|
3
|
+
import { f as VITE_PLUS_VERSION } from "./constants-0IAVgpox.js";
|
|
4
|
+
import { a as writeJsonFile, i as readJsonFile } from "./json-cULBl7Pi.js";
|
|
5
|
+
import { t as require_semver } from "./semver-CaDAb8vV.js";
|
|
6
|
+
import { n as runCommandSilently } from "./command-CguLh2KL.js";
|
|
5
7
|
import { t as require_dist } from "./dist-BDYZP12R.js";
|
|
6
8
|
import path from "node:path";
|
|
7
9
|
import { downloadPackageManager } from "../binding/index.js";
|
|
8
10
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
9
11
|
import fs from "node:fs";
|
|
10
|
-
import { constants as constants$1 } from "node:os";
|
|
11
12
|
import process$1, { stdin, stdout } from "node:process";
|
|
12
13
|
import * as l from "node:readline";
|
|
13
14
|
import l__default from "node:readline";
|
|
14
15
|
import { ReadStream } from "node:tty";
|
|
15
16
|
import { randomBytes } from "node:crypto";
|
|
16
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
17
|
-
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
18
|
-
module.exports = isexe;
|
|
19
|
-
isexe.sync = sync;
|
|
20
|
-
var fs$3 = __require("fs");
|
|
21
|
-
function checkPathExt(path, options) {
|
|
22
|
-
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
23
|
-
if (!pathext) return true;
|
|
24
|
-
pathext = pathext.split(";");
|
|
25
|
-
if (pathext.indexOf("") !== -1) return true;
|
|
26
|
-
for (var i = 0; i < pathext.length; i++) {
|
|
27
|
-
var p = pathext[i].toLowerCase();
|
|
28
|
-
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
function checkStat(stat, path, options) {
|
|
33
|
-
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
34
|
-
return checkPathExt(path, options);
|
|
35
|
-
}
|
|
36
|
-
function isexe(path, options, cb) {
|
|
37
|
-
fs$3.stat(path, function(er, stat) {
|
|
38
|
-
cb(er, er ? false : checkStat(stat, path, options));
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function sync(path, options) {
|
|
42
|
-
return checkStat(fs$3.statSync(path), path, options);
|
|
43
|
-
}
|
|
44
|
-
}));
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
47
|
-
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
48
|
-
module.exports = isexe;
|
|
49
|
-
isexe.sync = sync;
|
|
50
|
-
var fs$2 = __require("fs");
|
|
51
|
-
function isexe(path, options, cb) {
|
|
52
|
-
fs$2.stat(path, function(er, stat) {
|
|
53
|
-
cb(er, er ? false : checkStat(stat, options));
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function sync(path, options) {
|
|
57
|
-
return checkStat(fs$2.statSync(path), options);
|
|
58
|
-
}
|
|
59
|
-
function checkStat(stat, options) {
|
|
60
|
-
return stat.isFile() && checkMode(stat, options);
|
|
61
|
-
}
|
|
62
|
-
function checkMode(stat, options) {
|
|
63
|
-
var mod = stat.mode;
|
|
64
|
-
var uid = stat.uid;
|
|
65
|
-
var gid = stat.gid;
|
|
66
|
-
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
67
|
-
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
68
|
-
var u = parseInt("100", 8);
|
|
69
|
-
var g = parseInt("010", 8);
|
|
70
|
-
var o = parseInt("001", 8);
|
|
71
|
-
var ug = u | g;
|
|
72
|
-
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
77
|
-
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
78
|
-
__require("fs");
|
|
79
|
-
var core;
|
|
80
|
-
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
81
|
-
else core = require_mode();
|
|
82
|
-
module.exports = isexe;
|
|
83
|
-
isexe.sync = sync;
|
|
84
|
-
function isexe(path, options, cb) {
|
|
85
|
-
if (typeof options === "function") {
|
|
86
|
-
cb = options;
|
|
87
|
-
options = {};
|
|
88
|
-
}
|
|
89
|
-
if (!cb) {
|
|
90
|
-
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
91
|
-
return new Promise(function(resolve, reject) {
|
|
92
|
-
isexe(path, options || {}, function(er, is) {
|
|
93
|
-
if (er) reject(er);
|
|
94
|
-
else resolve(is);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
core(path, options || {}, function(er, is) {
|
|
99
|
-
if (er) {
|
|
100
|
-
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
101
|
-
er = null;
|
|
102
|
-
is = false;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
cb(er, is);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
function sync(path, options) {
|
|
109
|
-
try {
|
|
110
|
-
return core.sync(path, options || {});
|
|
111
|
-
} catch (er) {
|
|
112
|
-
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
113
|
-
else throw er;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}));
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
119
|
-
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
120
|
-
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
121
|
-
const path$3 = __require("path");
|
|
122
|
-
const COLON = isWindows ? ";" : ":";
|
|
123
|
-
const isexe = require_isexe();
|
|
124
|
-
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
125
|
-
const getPathInfo = (cmd, opt) => {
|
|
126
|
-
const colon = opt.colon || COLON;
|
|
127
|
-
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH ||
|
|
128
|
-
/* istanbul ignore next: very unusual */ "").split(colon)];
|
|
129
|
-
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
130
|
-
const pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
131
|
-
if (isWindows) {
|
|
132
|
-
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") pathExt.unshift("");
|
|
133
|
-
}
|
|
134
|
-
return {
|
|
135
|
-
pathEnv,
|
|
136
|
-
pathExt,
|
|
137
|
-
pathExtExe
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
const which = (cmd, opt, cb) => {
|
|
141
|
-
if (typeof opt === "function") {
|
|
142
|
-
cb = opt;
|
|
143
|
-
opt = {};
|
|
144
|
-
}
|
|
145
|
-
if (!opt) opt = {};
|
|
146
|
-
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
147
|
-
const found = [];
|
|
148
|
-
const step = (i) => new Promise((resolve, reject) => {
|
|
149
|
-
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
150
|
-
const ppRaw = pathEnv[i];
|
|
151
|
-
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
152
|
-
const pCmd = path$3.join(pathPart, cmd);
|
|
153
|
-
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
154
|
-
resolve(subStep(p, i, 0));
|
|
155
|
-
});
|
|
156
|
-
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
157
|
-
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
158
|
-
const ext = pathExt[ii];
|
|
159
|
-
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
160
|
-
if (!er && is) {
|
|
161
|
-
if (opt.all) found.push(p + ext);
|
|
162
|
-
else return resolve(p + ext);
|
|
163
|
-
}
|
|
164
|
-
return resolve(subStep(p, i, ii + 1));
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
168
|
-
};
|
|
169
|
-
const whichSync = (cmd, opt) => {
|
|
170
|
-
opt = opt || {};
|
|
171
|
-
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
172
|
-
const found = [];
|
|
173
|
-
for (let i = 0; i < pathEnv.length; i++) {
|
|
174
|
-
const ppRaw = pathEnv[i];
|
|
175
|
-
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
176
|
-
const pCmd = path$3.join(pathPart, cmd);
|
|
177
|
-
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
178
|
-
for (let j = 0; j < pathExt.length; j++) {
|
|
179
|
-
const cur = p + pathExt[j];
|
|
180
|
-
try {
|
|
181
|
-
if (isexe.sync(cur, { pathExt: pathExtExe })) {
|
|
182
|
-
if (opt.all) found.push(cur);
|
|
183
|
-
else return cur;
|
|
184
|
-
}
|
|
185
|
-
} catch (ex) {}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
if (opt.all && found.length) return found;
|
|
189
|
-
if (opt.nothrow) return null;
|
|
190
|
-
throw getNotFoundError(cmd);
|
|
191
|
-
};
|
|
192
|
-
module.exports = which;
|
|
193
|
-
which.sync = whichSync;
|
|
194
|
-
}));
|
|
195
|
-
//#endregion
|
|
196
|
-
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
197
|
-
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
198
|
-
const pathKey = (options = {}) => {
|
|
199
|
-
const environment = options.env || process.env;
|
|
200
|
-
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
201
|
-
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
202
|
-
};
|
|
203
|
-
module.exports = pathKey;
|
|
204
|
-
module.exports.default = pathKey;
|
|
205
|
-
}));
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
208
|
-
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
209
|
-
const path$2 = __require("path");
|
|
210
|
-
const which = require_which();
|
|
211
|
-
const getPathKey = require_path_key();
|
|
212
|
-
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
213
|
-
const env = parsed.options.env || process.env;
|
|
214
|
-
const cwd = process.cwd();
|
|
215
|
-
const hasCustomCwd = parsed.options.cwd != null;
|
|
216
|
-
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
217
|
-
if (shouldSwitchCwd) try {
|
|
218
|
-
process.chdir(parsed.options.cwd);
|
|
219
|
-
} catch (err) {}
|
|
220
|
-
let resolved;
|
|
221
|
-
try {
|
|
222
|
-
resolved = which.sync(parsed.command, {
|
|
223
|
-
path: env[getPathKey({ env })],
|
|
224
|
-
pathExt: withoutPathExt ? path$2.delimiter : void 0
|
|
225
|
-
});
|
|
226
|
-
} catch (e) {} finally {
|
|
227
|
-
if (shouldSwitchCwd) process.chdir(cwd);
|
|
228
|
-
}
|
|
229
|
-
if (resolved) resolved = path$2.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
230
|
-
return resolved;
|
|
231
|
-
}
|
|
232
|
-
function resolveCommand(parsed) {
|
|
233
|
-
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
234
|
-
}
|
|
235
|
-
module.exports = resolveCommand;
|
|
236
|
-
}));
|
|
237
|
-
//#endregion
|
|
238
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
239
|
-
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
240
|
-
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
241
|
-
function escapeCommand(arg) {
|
|
242
|
-
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
243
|
-
return arg;
|
|
244
|
-
}
|
|
245
|
-
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
246
|
-
arg = `${arg}`;
|
|
247
|
-
arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
|
|
248
|
-
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
249
|
-
arg = `"${arg}"`;
|
|
250
|
-
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
251
|
-
if (doubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
|
|
252
|
-
return arg;
|
|
253
|
-
}
|
|
254
|
-
module.exports.command = escapeCommand;
|
|
255
|
-
module.exports.argument = escapeArgument;
|
|
256
|
-
}));
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
259
|
-
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
260
|
-
module.exports = /^#!(.*)/;
|
|
261
|
-
}));
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
264
|
-
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
265
|
-
const shebangRegex = require_shebang_regex();
|
|
266
|
-
module.exports = (string = "") => {
|
|
267
|
-
const match = string.match(shebangRegex);
|
|
268
|
-
if (!match) return null;
|
|
269
|
-
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
270
|
-
const binary = path.split("/").pop();
|
|
271
|
-
if (binary === "env") return argument;
|
|
272
|
-
return argument ? `${binary} ${argument}` : binary;
|
|
273
|
-
};
|
|
274
|
-
}));
|
|
275
|
-
//#endregion
|
|
276
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
277
|
-
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
278
|
-
const fs$1 = __require("fs");
|
|
279
|
-
const shebangCommand = require_shebang_command();
|
|
280
|
-
function readShebang(command) {
|
|
281
|
-
const size = 150;
|
|
282
|
-
const buffer = Buffer.alloc(size);
|
|
283
|
-
let fd;
|
|
284
|
-
try {
|
|
285
|
-
fd = fs$1.openSync(command, "r");
|
|
286
|
-
fs$1.readSync(fd, buffer, 0, size, 0);
|
|
287
|
-
fs$1.closeSync(fd);
|
|
288
|
-
} catch (e) {}
|
|
289
|
-
return shebangCommand(buffer.toString());
|
|
290
|
-
}
|
|
291
|
-
module.exports = readShebang;
|
|
292
|
-
}));
|
|
293
|
-
//#endregion
|
|
294
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
295
|
-
var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
296
|
-
const path$1 = __require("path");
|
|
297
|
-
const resolveCommand = require_resolveCommand();
|
|
298
|
-
const escape = require_escape();
|
|
299
|
-
const readShebang = require_readShebang();
|
|
300
|
-
const isWin = process.platform === "win32";
|
|
301
|
-
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
302
|
-
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
303
|
-
function detectShebang(parsed) {
|
|
304
|
-
parsed.file = resolveCommand(parsed);
|
|
305
|
-
const shebang = parsed.file && readShebang(parsed.file);
|
|
306
|
-
if (shebang) {
|
|
307
|
-
parsed.args.unshift(parsed.file);
|
|
308
|
-
parsed.command = shebang;
|
|
309
|
-
return resolveCommand(parsed);
|
|
310
|
-
}
|
|
311
|
-
return parsed.file;
|
|
312
|
-
}
|
|
313
|
-
function parseNonShell(parsed) {
|
|
314
|
-
if (!isWin) return parsed;
|
|
315
|
-
const commandFile = detectShebang(parsed);
|
|
316
|
-
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
317
|
-
if (parsed.options.forceShell || needsShell) {
|
|
318
|
-
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
319
|
-
parsed.command = path$1.normalize(parsed.command);
|
|
320
|
-
parsed.command = escape.command(parsed.command);
|
|
321
|
-
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
322
|
-
parsed.args = [
|
|
323
|
-
"/d",
|
|
324
|
-
"/s",
|
|
325
|
-
"/c",
|
|
326
|
-
`"${[parsed.command].concat(parsed.args).join(" ")}"`
|
|
327
|
-
];
|
|
328
|
-
parsed.command = process.env.comspec || "cmd.exe";
|
|
329
|
-
parsed.options.windowsVerbatimArguments = true;
|
|
330
|
-
}
|
|
331
|
-
return parsed;
|
|
332
|
-
}
|
|
333
|
-
function parse(command, args, options) {
|
|
334
|
-
if (args && !Array.isArray(args)) {
|
|
335
|
-
options = args;
|
|
336
|
-
args = null;
|
|
337
|
-
}
|
|
338
|
-
args = args ? args.slice(0) : [];
|
|
339
|
-
options = Object.assign({}, options);
|
|
340
|
-
const parsed = {
|
|
341
|
-
command,
|
|
342
|
-
args,
|
|
343
|
-
options,
|
|
344
|
-
file: void 0,
|
|
345
|
-
original: {
|
|
346
|
-
command,
|
|
347
|
-
args
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
return options.shell ? parsed : parseNonShell(parsed);
|
|
351
|
-
}
|
|
352
|
-
module.exports = parse;
|
|
353
|
-
}));
|
|
354
|
-
//#endregion
|
|
355
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
356
|
-
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
357
|
-
const isWin = process.platform === "win32";
|
|
358
|
-
function notFoundError(original, syscall) {
|
|
359
|
-
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
360
|
-
code: "ENOENT",
|
|
361
|
-
errno: "ENOENT",
|
|
362
|
-
syscall: `${syscall} ${original.command}`,
|
|
363
|
-
path: original.command,
|
|
364
|
-
spawnargs: original.args
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
function hookChildProcess(cp, parsed) {
|
|
368
|
-
if (!isWin) return;
|
|
369
|
-
const originalEmit = cp.emit;
|
|
370
|
-
cp.emit = function(name, arg1) {
|
|
371
|
-
if (name === "exit") {
|
|
372
|
-
const err = verifyENOENT(arg1, parsed);
|
|
373
|
-
if (err) return originalEmit.call(cp, "error", err);
|
|
374
|
-
}
|
|
375
|
-
return originalEmit.apply(cp, arguments);
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
function verifyENOENT(status, parsed) {
|
|
379
|
-
if (isWin && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawn");
|
|
380
|
-
return null;
|
|
381
|
-
}
|
|
382
|
-
function verifyENOENTSync(status, parsed) {
|
|
383
|
-
if (isWin && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawnSync");
|
|
384
|
-
return null;
|
|
385
|
-
}
|
|
386
|
-
module.exports = {
|
|
387
|
-
hookChildProcess,
|
|
388
|
-
verifyENOENT,
|
|
389
|
-
verifyENOENTSync,
|
|
390
|
-
notFoundError
|
|
391
|
-
};
|
|
392
|
-
}));
|
|
393
|
-
//#endregion
|
|
394
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
395
|
-
var require_cross_spawn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
396
|
-
const cp = __require("child_process");
|
|
397
|
-
const parse = require_parse$1();
|
|
398
|
-
const enoent = require_enoent();
|
|
399
|
-
function spawn(command, args, options) {
|
|
400
|
-
const parsed = parse(command, args, options);
|
|
401
|
-
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
402
|
-
enoent.hookChildProcess(spawned, parsed);
|
|
403
|
-
return spawned;
|
|
404
|
-
}
|
|
405
|
-
function spawnSync(command, args, options) {
|
|
406
|
-
const parsed = parse(command, args, options);
|
|
407
|
-
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
408
|
-
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
409
|
-
return result;
|
|
410
|
-
}
|
|
411
|
-
module.exports = spawn;
|
|
412
|
-
module.exports.spawn = spawn;
|
|
413
|
-
module.exports.sync = spawnSync;
|
|
414
|
-
module.exports._parse = parse;
|
|
415
|
-
module.exports._enoent = enoent;
|
|
416
|
-
}));
|
|
417
|
-
//#endregion
|
|
418
|
-
//#region src/utils/command.ts
|
|
419
|
-
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
420
|
-
function exitCodeFromClose(code, signal) {
|
|
421
|
-
if (code !== null) return code;
|
|
422
|
-
const signalNumber = signal && constants$1.signals[signal];
|
|
423
|
-
return signalNumber ? 128 + signalNumber : 1;
|
|
424
|
-
}
|
|
425
|
-
async function runCommandSilently(options) {
|
|
426
|
-
const child = (0, import_cross_spawn.default)(options.command, options.args, {
|
|
427
|
-
stdio: [
|
|
428
|
-
"ignore",
|
|
429
|
-
"pipe",
|
|
430
|
-
"pipe"
|
|
431
|
-
],
|
|
432
|
-
cwd: options.cwd,
|
|
433
|
-
env: options.envs
|
|
434
|
-
});
|
|
435
|
-
return await new Promise((resolve, reject) => {
|
|
436
|
-
const stdout = [];
|
|
437
|
-
const stderr = [];
|
|
438
|
-
let timedOut = false;
|
|
439
|
-
const timer = options.timeoutMs === void 0 ? void 0 : setTimeout(() => {
|
|
440
|
-
timedOut = true;
|
|
441
|
-
child.kill("SIGKILL");
|
|
442
|
-
}, options.timeoutMs);
|
|
443
|
-
timer?.unref();
|
|
444
|
-
child.stdout?.on("data", (data) => {
|
|
445
|
-
stdout.push(data);
|
|
446
|
-
});
|
|
447
|
-
child.stderr?.on("data", (data) => {
|
|
448
|
-
stderr.push(data);
|
|
449
|
-
});
|
|
450
|
-
child.on("close", (code, signal) => {
|
|
451
|
-
clearTimeout(timer);
|
|
452
|
-
if (timedOut) {
|
|
453
|
-
reject(/* @__PURE__ */ new Error(`Command timed out after ${options.timeoutMs}ms: ${options.command}`));
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
resolve({
|
|
457
|
-
exitCode: exitCodeFromClose(code, signal),
|
|
458
|
-
stdout: Buffer.concat(stdout),
|
|
459
|
-
stderr: Buffer.concat(stderr)
|
|
460
|
-
});
|
|
461
|
-
});
|
|
462
|
-
child.on("error", (err) => {
|
|
463
|
-
clearTimeout(timer);
|
|
464
|
-
reject(err);
|
|
465
|
-
});
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
async function runCommand$1(options) {
|
|
469
|
-
const child = (0, import_cross_spawn.default)(options.command, options.args, {
|
|
470
|
-
stdio: "inherit",
|
|
471
|
-
cwd: options.cwd,
|
|
472
|
-
env: options.envs
|
|
473
|
-
});
|
|
474
|
-
return new Promise((resolve, reject) => {
|
|
475
|
-
child.on("close", (code, signal) => {
|
|
476
|
-
resolve({ exitCode: exitCodeFromClose(code, signal) });
|
|
477
|
-
});
|
|
478
|
-
child.on("error", (err) => {
|
|
479
|
-
reject(err);
|
|
480
|
-
});
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
//#endregion
|
|
484
17
|
//#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
|
|
485
18
|
const getCodePointsLength$1 = (() => {
|
|
486
19
|
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
@@ -2174,1404 +1707,6 @@ const text = (opts) => {
|
|
|
2174
1707
|
}).prompt();
|
|
2175
1708
|
};
|
|
2176
1709
|
//#endregion
|
|
2177
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
|
|
2178
|
-
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2179
|
-
module.exports = {
|
|
2180
|
-
MAX_LENGTH: 256,
|
|
2181
|
-
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
2182
|
-
MAX_SAFE_BUILD_LENGTH: 250,
|
|
2183
|
-
MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER ||
|
|
2184
|
-
/* istanbul ignore next */ 9007199254740991,
|
|
2185
|
-
RELEASE_TYPES: [
|
|
2186
|
-
"major",
|
|
2187
|
-
"premajor",
|
|
2188
|
-
"minor",
|
|
2189
|
-
"preminor",
|
|
2190
|
-
"patch",
|
|
2191
|
-
"prepatch",
|
|
2192
|
-
"prerelease"
|
|
2193
|
-
],
|
|
2194
|
-
SEMVER_SPEC_VERSION: "2.0.0",
|
|
2195
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
2196
|
-
FLAG_LOOSE: 2
|
|
2197
|
-
};
|
|
2198
|
-
}));
|
|
2199
|
-
//#endregion
|
|
2200
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
|
|
2201
|
-
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2202
|
-
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
2203
|
-
}));
|
|
2204
|
-
//#endregion
|
|
2205
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
|
|
2206
|
-
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2207
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
2208
|
-
const debug = require_debug();
|
|
2209
|
-
exports = module.exports = {};
|
|
2210
|
-
const re = exports.re = [];
|
|
2211
|
-
const safeRe = exports.safeRe = [];
|
|
2212
|
-
const src = exports.src = [];
|
|
2213
|
-
const safeSrc = exports.safeSrc = [];
|
|
2214
|
-
const t = exports.t = {};
|
|
2215
|
-
let R = 0;
|
|
2216
|
-
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
2217
|
-
const safeRegexReplacements = [
|
|
2218
|
-
["\\s", 1],
|
|
2219
|
-
["\\d", MAX_LENGTH],
|
|
2220
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
2221
|
-
];
|
|
2222
|
-
const makeSafeRegex = (value) => {
|
|
2223
|
-
for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
2224
|
-
return value;
|
|
2225
|
-
};
|
|
2226
|
-
const createToken = (name, value, isGlobal) => {
|
|
2227
|
-
const safe = makeSafeRegex(value);
|
|
2228
|
-
const index = R++;
|
|
2229
|
-
debug(name, index, value);
|
|
2230
|
-
t[name] = index;
|
|
2231
|
-
src[index] = value;
|
|
2232
|
-
safeSrc[index] = safe;
|
|
2233
|
-
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
2234
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
2235
|
-
};
|
|
2236
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
2237
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
2238
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
2239
|
-
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
2240
|
-
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
2241
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
2242
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
2243
|
-
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
2244
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
2245
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
2246
|
-
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
2247
|
-
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
2248
|
-
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
2249
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
2250
|
-
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
2251
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
2252
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
2253
|
-
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
2254
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
2255
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
2256
|
-
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
2257
|
-
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
2258
|
-
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
2259
|
-
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
2260
|
-
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
2261
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
2262
|
-
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
2263
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
2264
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
2265
|
-
exports.tildeTrimReplace = "$1~";
|
|
2266
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
2267
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
2268
|
-
createToken("LONECARET", "(?:\\^)");
|
|
2269
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
2270
|
-
exports.caretTrimReplace = "$1^";
|
|
2271
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
2272
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
2273
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
2274
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
2275
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
2276
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
2277
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
2278
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
2279
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
2280
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
2281
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
2282
|
-
}));
|
|
2283
|
-
//#endregion
|
|
2284
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
|
|
2285
|
-
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2286
|
-
const looseOption = Object.freeze({ loose: true });
|
|
2287
|
-
const emptyOpts = Object.freeze({});
|
|
2288
|
-
const parseOptions = (options) => {
|
|
2289
|
-
if (!options) return emptyOpts;
|
|
2290
|
-
if (typeof options !== "object") return looseOption;
|
|
2291
|
-
return options;
|
|
2292
|
-
};
|
|
2293
|
-
module.exports = parseOptions;
|
|
2294
|
-
}));
|
|
2295
|
-
//#endregion
|
|
2296
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
|
|
2297
|
-
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2298
|
-
const numeric = /^[0-9]+$/;
|
|
2299
|
-
const compareIdentifiers = (a, b) => {
|
|
2300
|
-
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
2301
|
-
const anum = numeric.test(a);
|
|
2302
|
-
const bnum = numeric.test(b);
|
|
2303
|
-
if (anum && bnum) {
|
|
2304
|
-
a = +a;
|
|
2305
|
-
b = +b;
|
|
2306
|
-
}
|
|
2307
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
2308
|
-
};
|
|
2309
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
2310
|
-
module.exports = {
|
|
2311
|
-
compareIdentifiers,
|
|
2312
|
-
rcompareIdentifiers
|
|
2313
|
-
};
|
|
2314
|
-
}));
|
|
2315
|
-
//#endregion
|
|
2316
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
|
|
2317
|
-
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2318
|
-
const debug = require_debug();
|
|
2319
|
-
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
2320
|
-
const { safeRe: re, t } = require_re();
|
|
2321
|
-
const parseOptions = require_parse_options();
|
|
2322
|
-
const { compareIdentifiers } = require_identifiers();
|
|
2323
|
-
const isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
2324
|
-
const identifiers = identifier.split(".");
|
|
2325
|
-
if (identifiers.length > prerelease.length) return false;
|
|
2326
|
-
for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
|
|
2327
|
-
return true;
|
|
2328
|
-
};
|
|
2329
|
-
module.exports = class SemVer {
|
|
2330
|
-
constructor(version, options) {
|
|
2331
|
-
options = parseOptions(options);
|
|
2332
|
-
if (version instanceof SemVer) {
|
|
2333
|
-
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
2334
|
-
else version = version.version;
|
|
2335
|
-
} else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
2336
|
-
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
2337
|
-
debug("SemVer", version, options);
|
|
2338
|
-
this.options = options;
|
|
2339
|
-
this.loose = !!options.loose;
|
|
2340
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
2341
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
2342
|
-
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
2343
|
-
this.raw = version;
|
|
2344
|
-
this.major = +m[1];
|
|
2345
|
-
this.minor = +m[2];
|
|
2346
|
-
this.patch = +m[3];
|
|
2347
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
2348
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
2349
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
2350
|
-
if (!m[4]) this.prerelease = [];
|
|
2351
|
-
else this.prerelease = m[4].split(".").map((id) => {
|
|
2352
|
-
if (/^[0-9]+$/.test(id)) {
|
|
2353
|
-
const num = +id;
|
|
2354
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
2355
|
-
}
|
|
2356
|
-
return id;
|
|
2357
|
-
});
|
|
2358
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
2359
|
-
this.format();
|
|
2360
|
-
}
|
|
2361
|
-
format() {
|
|
2362
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
2363
|
-
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
2364
|
-
return this.version;
|
|
2365
|
-
}
|
|
2366
|
-
toString() {
|
|
2367
|
-
return this.version;
|
|
2368
|
-
}
|
|
2369
|
-
compare(other) {
|
|
2370
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
2371
|
-
if (!(other instanceof SemVer)) {
|
|
2372
|
-
if (typeof other === "string" && other === this.version) return 0;
|
|
2373
|
-
other = new SemVer(other, this.options);
|
|
2374
|
-
}
|
|
2375
|
-
if (other.version === this.version) return 0;
|
|
2376
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
2377
|
-
}
|
|
2378
|
-
compareMain(other) {
|
|
2379
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
2380
|
-
if (this.major < other.major) return -1;
|
|
2381
|
-
if (this.major > other.major) return 1;
|
|
2382
|
-
if (this.minor < other.minor) return -1;
|
|
2383
|
-
if (this.minor > other.minor) return 1;
|
|
2384
|
-
if (this.patch < other.patch) return -1;
|
|
2385
|
-
if (this.patch > other.patch) return 1;
|
|
2386
|
-
return 0;
|
|
2387
|
-
}
|
|
2388
|
-
comparePre(other) {
|
|
2389
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
2390
|
-
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
2391
|
-
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
2392
|
-
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
2393
|
-
let i = 0;
|
|
2394
|
-
do {
|
|
2395
|
-
const a = this.prerelease[i];
|
|
2396
|
-
const b = other.prerelease[i];
|
|
2397
|
-
debug("prerelease compare", i, a, b);
|
|
2398
|
-
if (a === void 0 && b === void 0) return 0;
|
|
2399
|
-
else if (b === void 0) return 1;
|
|
2400
|
-
else if (a === void 0) return -1;
|
|
2401
|
-
else if (a === b) continue;
|
|
2402
|
-
else return compareIdentifiers(a, b);
|
|
2403
|
-
} while (++i);
|
|
2404
|
-
}
|
|
2405
|
-
compareBuild(other) {
|
|
2406
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
2407
|
-
let i = 0;
|
|
2408
|
-
do {
|
|
2409
|
-
const a = this.build[i];
|
|
2410
|
-
const b = other.build[i];
|
|
2411
|
-
debug("build compare", i, a, b);
|
|
2412
|
-
if (a === void 0 && b === void 0) return 0;
|
|
2413
|
-
else if (b === void 0) return 1;
|
|
2414
|
-
else if (a === void 0) return -1;
|
|
2415
|
-
else if (a === b) continue;
|
|
2416
|
-
else return compareIdentifiers(a, b);
|
|
2417
|
-
} while (++i);
|
|
2418
|
-
}
|
|
2419
|
-
inc(release, identifier, identifierBase) {
|
|
2420
|
-
if (release.startsWith("pre")) {
|
|
2421
|
-
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
2422
|
-
if (identifier) {
|
|
2423
|
-
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
2424
|
-
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
switch (release) {
|
|
2428
|
-
case "premajor":
|
|
2429
|
-
this.prerelease.length = 0;
|
|
2430
|
-
this.patch = 0;
|
|
2431
|
-
this.minor = 0;
|
|
2432
|
-
this.major++;
|
|
2433
|
-
this.inc("pre", identifier, identifierBase);
|
|
2434
|
-
break;
|
|
2435
|
-
case "preminor":
|
|
2436
|
-
this.prerelease.length = 0;
|
|
2437
|
-
this.patch = 0;
|
|
2438
|
-
this.minor++;
|
|
2439
|
-
this.inc("pre", identifier, identifierBase);
|
|
2440
|
-
break;
|
|
2441
|
-
case "prepatch":
|
|
2442
|
-
this.prerelease.length = 0;
|
|
2443
|
-
this.inc("patch", identifier, identifierBase);
|
|
2444
|
-
this.inc("pre", identifier, identifierBase);
|
|
2445
|
-
break;
|
|
2446
|
-
case "prerelease":
|
|
2447
|
-
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
2448
|
-
this.inc("pre", identifier, identifierBase);
|
|
2449
|
-
break;
|
|
2450
|
-
case "release":
|
|
2451
|
-
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
2452
|
-
this.prerelease.length = 0;
|
|
2453
|
-
break;
|
|
2454
|
-
case "major":
|
|
2455
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
2456
|
-
this.minor = 0;
|
|
2457
|
-
this.patch = 0;
|
|
2458
|
-
this.prerelease = [];
|
|
2459
|
-
break;
|
|
2460
|
-
case "minor":
|
|
2461
|
-
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
2462
|
-
this.patch = 0;
|
|
2463
|
-
this.prerelease = [];
|
|
2464
|
-
break;
|
|
2465
|
-
case "patch":
|
|
2466
|
-
if (this.prerelease.length === 0) this.patch++;
|
|
2467
|
-
this.prerelease = [];
|
|
2468
|
-
break;
|
|
2469
|
-
case "pre": {
|
|
2470
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
2471
|
-
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
2472
|
-
else {
|
|
2473
|
-
let i = this.prerelease.length;
|
|
2474
|
-
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
2475
|
-
this.prerelease[i]++;
|
|
2476
|
-
i = -2;
|
|
2477
|
-
}
|
|
2478
|
-
if (i === -1) {
|
|
2479
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
2480
|
-
this.prerelease.push(base);
|
|
2481
|
-
}
|
|
2482
|
-
}
|
|
2483
|
-
if (identifier) {
|
|
2484
|
-
let prerelease = [identifier, base];
|
|
2485
|
-
if (identifierBase === false) prerelease = [identifier];
|
|
2486
|
-
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
2487
|
-
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
2488
|
-
if (isNaN(prereleaseBase)) this.prerelease = prerelease;
|
|
2489
|
-
} else this.prerelease = prerelease;
|
|
2490
|
-
}
|
|
2491
|
-
break;
|
|
2492
|
-
}
|
|
2493
|
-
default: throw new Error(`invalid increment argument: ${release}`);
|
|
2494
|
-
}
|
|
2495
|
-
this.raw = this.format();
|
|
2496
|
-
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
2497
|
-
return this;
|
|
2498
|
-
}
|
|
2499
|
-
};
|
|
2500
|
-
}));
|
|
2501
|
-
//#endregion
|
|
2502
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
|
|
2503
|
-
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2504
|
-
const SemVer = require_semver$1();
|
|
2505
|
-
const parse = (version, options, throwErrors = false) => {
|
|
2506
|
-
if (version instanceof SemVer) return version;
|
|
2507
|
-
try {
|
|
2508
|
-
return new SemVer(version, options);
|
|
2509
|
-
} catch (er) {
|
|
2510
|
-
if (!throwErrors) return null;
|
|
2511
|
-
throw er;
|
|
2512
|
-
}
|
|
2513
|
-
};
|
|
2514
|
-
module.exports = parse;
|
|
2515
|
-
}));
|
|
2516
|
-
//#endregion
|
|
2517
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
|
|
2518
|
-
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2519
|
-
const parse = require_parse();
|
|
2520
|
-
const valid = (version, options) => {
|
|
2521
|
-
const v = parse(version, options);
|
|
2522
|
-
return v ? v.version : null;
|
|
2523
|
-
};
|
|
2524
|
-
module.exports = valid;
|
|
2525
|
-
}));
|
|
2526
|
-
//#endregion
|
|
2527
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
|
|
2528
|
-
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2529
|
-
const parse = require_parse();
|
|
2530
|
-
const clean = (version, options) => {
|
|
2531
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
2532
|
-
return s ? s.version : null;
|
|
2533
|
-
};
|
|
2534
|
-
module.exports = clean;
|
|
2535
|
-
}));
|
|
2536
|
-
//#endregion
|
|
2537
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
|
|
2538
|
-
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2539
|
-
const SemVer = require_semver$1();
|
|
2540
|
-
const inc = (version, release, options, identifier, identifierBase) => {
|
|
2541
|
-
if (typeof options === "string") {
|
|
2542
|
-
identifierBase = identifier;
|
|
2543
|
-
identifier = options;
|
|
2544
|
-
options = void 0;
|
|
2545
|
-
}
|
|
2546
|
-
try {
|
|
2547
|
-
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
2548
|
-
} catch (er) {
|
|
2549
|
-
return null;
|
|
2550
|
-
}
|
|
2551
|
-
};
|
|
2552
|
-
module.exports = inc;
|
|
2553
|
-
}));
|
|
2554
|
-
//#endregion
|
|
2555
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
|
|
2556
|
-
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2557
|
-
const parse = require_parse();
|
|
2558
|
-
const diff = (version1, version2) => {
|
|
2559
|
-
const v1 = parse(version1, null, true);
|
|
2560
|
-
const v2 = parse(version2, null, true);
|
|
2561
|
-
const comparison = v1.compare(v2);
|
|
2562
|
-
if (comparison === 0) return null;
|
|
2563
|
-
const v1Higher = comparison > 0;
|
|
2564
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
2565
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
2566
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
2567
|
-
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
2568
|
-
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
2569
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
2570
|
-
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
2571
|
-
return "patch";
|
|
2572
|
-
}
|
|
2573
|
-
}
|
|
2574
|
-
const prefix = highHasPre ? "pre" : "";
|
|
2575
|
-
if (v1.major !== v2.major) return prefix + "major";
|
|
2576
|
-
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
2577
|
-
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
2578
|
-
return "prerelease";
|
|
2579
|
-
};
|
|
2580
|
-
module.exports = diff;
|
|
2581
|
-
}));
|
|
2582
|
-
//#endregion
|
|
2583
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
|
|
2584
|
-
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2585
|
-
const SemVer = require_semver$1();
|
|
2586
|
-
const major = (a, loose) => new SemVer(a, loose).major;
|
|
2587
|
-
module.exports = major;
|
|
2588
|
-
}));
|
|
2589
|
-
//#endregion
|
|
2590
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
|
|
2591
|
-
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2592
|
-
const SemVer = require_semver$1();
|
|
2593
|
-
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
2594
|
-
module.exports = minor;
|
|
2595
|
-
}));
|
|
2596
|
-
//#endregion
|
|
2597
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
|
|
2598
|
-
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2599
|
-
const SemVer = require_semver$1();
|
|
2600
|
-
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
2601
|
-
module.exports = patch;
|
|
2602
|
-
}));
|
|
2603
|
-
//#endregion
|
|
2604
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
|
|
2605
|
-
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2606
|
-
const parse = require_parse();
|
|
2607
|
-
const prerelease = (version, options) => {
|
|
2608
|
-
const parsed = parse(version, options);
|
|
2609
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
2610
|
-
};
|
|
2611
|
-
module.exports = prerelease;
|
|
2612
|
-
}));
|
|
2613
|
-
//#endregion
|
|
2614
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
|
|
2615
|
-
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2616
|
-
const SemVer = require_semver$1();
|
|
2617
|
-
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
2618
|
-
module.exports = compare;
|
|
2619
|
-
}));
|
|
2620
|
-
//#endregion
|
|
2621
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
|
|
2622
|
-
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2623
|
-
const compare = require_compare();
|
|
2624
|
-
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
2625
|
-
module.exports = rcompare;
|
|
2626
|
-
}));
|
|
2627
|
-
//#endregion
|
|
2628
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
|
|
2629
|
-
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2630
|
-
const compare = require_compare();
|
|
2631
|
-
const compareLoose = (a, b) => compare(a, b, true);
|
|
2632
|
-
module.exports = compareLoose;
|
|
2633
|
-
}));
|
|
2634
|
-
//#endregion
|
|
2635
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
|
|
2636
|
-
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2637
|
-
const SemVer = require_semver$1();
|
|
2638
|
-
const compareBuild = (a, b, loose) => {
|
|
2639
|
-
const versionA = new SemVer(a, loose);
|
|
2640
|
-
const versionB = new SemVer(b, loose);
|
|
2641
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
2642
|
-
};
|
|
2643
|
-
module.exports = compareBuild;
|
|
2644
|
-
}));
|
|
2645
|
-
//#endregion
|
|
2646
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
|
|
2647
|
-
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2648
|
-
const compareBuild = require_compare_build();
|
|
2649
|
-
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
2650
|
-
module.exports = sort;
|
|
2651
|
-
}));
|
|
2652
|
-
//#endregion
|
|
2653
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
|
|
2654
|
-
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2655
|
-
const compareBuild = require_compare_build();
|
|
2656
|
-
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
2657
|
-
module.exports = rsort;
|
|
2658
|
-
}));
|
|
2659
|
-
//#endregion
|
|
2660
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
|
|
2661
|
-
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2662
|
-
const compare = require_compare();
|
|
2663
|
-
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
2664
|
-
module.exports = gt;
|
|
2665
|
-
}));
|
|
2666
|
-
//#endregion
|
|
2667
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
|
|
2668
|
-
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2669
|
-
const compare = require_compare();
|
|
2670
|
-
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
2671
|
-
module.exports = lt;
|
|
2672
|
-
}));
|
|
2673
|
-
//#endregion
|
|
2674
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
|
|
2675
|
-
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2676
|
-
const compare = require_compare();
|
|
2677
|
-
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
2678
|
-
module.exports = eq;
|
|
2679
|
-
}));
|
|
2680
|
-
//#endregion
|
|
2681
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
|
|
2682
|
-
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2683
|
-
const compare = require_compare();
|
|
2684
|
-
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
2685
|
-
module.exports = neq;
|
|
2686
|
-
}));
|
|
2687
|
-
//#endregion
|
|
2688
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
|
|
2689
|
-
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2690
|
-
const compare = require_compare();
|
|
2691
|
-
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
2692
|
-
module.exports = gte;
|
|
2693
|
-
}));
|
|
2694
|
-
//#endregion
|
|
2695
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
|
|
2696
|
-
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2697
|
-
const compare = require_compare();
|
|
2698
|
-
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
2699
|
-
module.exports = lte;
|
|
2700
|
-
}));
|
|
2701
|
-
//#endregion
|
|
2702
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
|
|
2703
|
-
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2704
|
-
const eq = require_eq();
|
|
2705
|
-
const neq = require_neq();
|
|
2706
|
-
const gt = require_gt();
|
|
2707
|
-
const gte = require_gte();
|
|
2708
|
-
const lt = require_lt();
|
|
2709
|
-
const lte = require_lte();
|
|
2710
|
-
const cmp = (a, op, b, loose) => {
|
|
2711
|
-
switch (op) {
|
|
2712
|
-
case "===":
|
|
2713
|
-
if (typeof a === "object") a = a.version;
|
|
2714
|
-
if (typeof b === "object") b = b.version;
|
|
2715
|
-
return a === b;
|
|
2716
|
-
case "!==":
|
|
2717
|
-
if (typeof a === "object") a = a.version;
|
|
2718
|
-
if (typeof b === "object") b = b.version;
|
|
2719
|
-
return a !== b;
|
|
2720
|
-
case "":
|
|
2721
|
-
case "=":
|
|
2722
|
-
case "==": return eq(a, b, loose);
|
|
2723
|
-
case "!=": return neq(a, b, loose);
|
|
2724
|
-
case ">": return gt(a, b, loose);
|
|
2725
|
-
case ">=": return gte(a, b, loose);
|
|
2726
|
-
case "<": return lt(a, b, loose);
|
|
2727
|
-
case "<=": return lte(a, b, loose);
|
|
2728
|
-
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
2729
|
-
}
|
|
2730
|
-
};
|
|
2731
|
-
module.exports = cmp;
|
|
2732
|
-
}));
|
|
2733
|
-
//#endregion
|
|
2734
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
|
|
2735
|
-
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2736
|
-
const SemVer = require_semver$1();
|
|
2737
|
-
const parse = require_parse();
|
|
2738
|
-
const { safeRe: re, t } = require_re();
|
|
2739
|
-
const coerce = (version, options) => {
|
|
2740
|
-
if (version instanceof SemVer) return version;
|
|
2741
|
-
if (typeof version === "number") version = String(version);
|
|
2742
|
-
if (typeof version !== "string") return null;
|
|
2743
|
-
options = options || {};
|
|
2744
|
-
let match = null;
|
|
2745
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
2746
|
-
else {
|
|
2747
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
2748
|
-
let next;
|
|
2749
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
2750
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
2751
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
2752
|
-
}
|
|
2753
|
-
coerceRtlRegex.lastIndex = -1;
|
|
2754
|
-
}
|
|
2755
|
-
if (match === null) return null;
|
|
2756
|
-
const major = match[2];
|
|
2757
|
-
const minor = match[3] || "0";
|
|
2758
|
-
const patch = match[4] || "0";
|
|
2759
|
-
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
2760
|
-
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
2761
|
-
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
2762
|
-
};
|
|
2763
|
-
module.exports = coerce;
|
|
2764
|
-
}));
|
|
2765
|
-
//#endregion
|
|
2766
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
|
|
2767
|
-
var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2768
|
-
const parse = require_parse();
|
|
2769
|
-
const constants = require_constants();
|
|
2770
|
-
const SemVer = require_semver$1();
|
|
2771
|
-
const truncate = (version, truncation, options) => {
|
|
2772
|
-
if (!constants.RELEASE_TYPES.includes(truncation)) return null;
|
|
2773
|
-
const clonedVersion = cloneInputVersion(version, options);
|
|
2774
|
-
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
2775
|
-
};
|
|
2776
|
-
const cloneInputVersion = (version, options) => {
|
|
2777
|
-
const versionStringToParse = version instanceof SemVer ? version.version : version;
|
|
2778
|
-
return parse(versionStringToParse, options);
|
|
2779
|
-
};
|
|
2780
|
-
const doTruncation = (version, truncation) => {
|
|
2781
|
-
if (isPrerelease(truncation)) return version.version;
|
|
2782
|
-
version.prerelease = [];
|
|
2783
|
-
switch (truncation) {
|
|
2784
|
-
case "major":
|
|
2785
|
-
version.minor = 0;
|
|
2786
|
-
version.patch = 0;
|
|
2787
|
-
break;
|
|
2788
|
-
case "minor": version.patch = 0;
|
|
2789
|
-
}
|
|
2790
|
-
return version.format();
|
|
2791
|
-
};
|
|
2792
|
-
const isPrerelease = (type) => {
|
|
2793
|
-
return type.startsWith("pre");
|
|
2794
|
-
};
|
|
2795
|
-
module.exports = truncate;
|
|
2796
|
-
}));
|
|
2797
|
-
//#endregion
|
|
2798
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
|
|
2799
|
-
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2800
|
-
var LRUCache = class {
|
|
2801
|
-
constructor() {
|
|
2802
|
-
this.max = 1e3;
|
|
2803
|
-
this.map = /* @__PURE__ */ new Map();
|
|
2804
|
-
}
|
|
2805
|
-
get(key) {
|
|
2806
|
-
const value = this.map.get(key);
|
|
2807
|
-
if (value === void 0) return;
|
|
2808
|
-
else {
|
|
2809
|
-
this.map.delete(key);
|
|
2810
|
-
this.map.set(key, value);
|
|
2811
|
-
return value;
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
delete(key) {
|
|
2815
|
-
return this.map.delete(key);
|
|
2816
|
-
}
|
|
2817
|
-
set(key, value) {
|
|
2818
|
-
if (!this.delete(key) && value !== void 0) {
|
|
2819
|
-
if (this.map.size >= this.max) {
|
|
2820
|
-
const firstKey = this.map.keys().next().value;
|
|
2821
|
-
this.delete(firstKey);
|
|
2822
|
-
}
|
|
2823
|
-
this.map.set(key, value);
|
|
2824
|
-
}
|
|
2825
|
-
return this;
|
|
2826
|
-
}
|
|
2827
|
-
};
|
|
2828
|
-
module.exports = LRUCache;
|
|
2829
|
-
}));
|
|
2830
|
-
//#endregion
|
|
2831
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
|
|
2832
|
-
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2833
|
-
const SPACE_CHARACTERS = /\s+/g;
|
|
2834
|
-
module.exports = class Range {
|
|
2835
|
-
constructor(range, options) {
|
|
2836
|
-
options = parseOptions(options);
|
|
2837
|
-
if (range instanceof Range) {
|
|
2838
|
-
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
2839
|
-
else return new Range(range.raw, options);
|
|
2840
|
-
}
|
|
2841
|
-
if (range instanceof Comparator) {
|
|
2842
|
-
this.raw = range.value;
|
|
2843
|
-
this.set = [[range]];
|
|
2844
|
-
this.formatted = void 0;
|
|
2845
|
-
return this;
|
|
2846
|
-
}
|
|
2847
|
-
this.options = options;
|
|
2848
|
-
this.loose = !!options.loose;
|
|
2849
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
2850
|
-
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
2851
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
2852
|
-
if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
2853
|
-
if (this.set.length > 1) {
|
|
2854
|
-
const first = this.set[0];
|
|
2855
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
2856
|
-
if (this.set.length === 0) this.set = [first];
|
|
2857
|
-
else if (this.set.length > 1) {
|
|
2858
|
-
for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
|
|
2859
|
-
this.set = [c];
|
|
2860
|
-
break;
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
this.formatted = void 0;
|
|
2865
|
-
}
|
|
2866
|
-
get range() {
|
|
2867
|
-
if (this.formatted === void 0) {
|
|
2868
|
-
this.formatted = "";
|
|
2869
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
2870
|
-
if (i > 0) this.formatted += "||";
|
|
2871
|
-
const comps = this.set[i];
|
|
2872
|
-
for (let k = 0; k < comps.length; k++) {
|
|
2873
|
-
if (k > 0) this.formatted += " ";
|
|
2874
|
-
this.formatted += comps[k].toString().trim();
|
|
2875
|
-
}
|
|
2876
|
-
}
|
|
2877
|
-
}
|
|
2878
|
-
return this.formatted;
|
|
2879
|
-
}
|
|
2880
|
-
format() {
|
|
2881
|
-
return this.range;
|
|
2882
|
-
}
|
|
2883
|
-
toString() {
|
|
2884
|
-
return this.range;
|
|
2885
|
-
}
|
|
2886
|
-
parseRange(range) {
|
|
2887
|
-
range = range.replace(BUILDSTRIPRE, "");
|
|
2888
|
-
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
|
|
2889
|
-
const cached = cache.get(memoKey);
|
|
2890
|
-
if (cached) return cached;
|
|
2891
|
-
const loose = this.options.loose;
|
|
2892
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
2893
|
-
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
2894
|
-
debug("hyphen replace", range);
|
|
2895
|
-
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
2896
|
-
debug("comparator trim", range);
|
|
2897
|
-
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
2898
|
-
debug("tilde trim", range);
|
|
2899
|
-
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
2900
|
-
debug("caret trim", range);
|
|
2901
|
-
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
2902
|
-
if (loose) rangeList = rangeList.filter((comp) => {
|
|
2903
|
-
debug("loose invalid filter", comp, this.options);
|
|
2904
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
2905
|
-
});
|
|
2906
|
-
debug("range list", rangeList);
|
|
2907
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
2908
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
2909
|
-
for (const comp of comparators) {
|
|
2910
|
-
if (isNullSet(comp)) return [comp];
|
|
2911
|
-
rangeMap.set(comp.value, comp);
|
|
2912
|
-
}
|
|
2913
|
-
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
2914
|
-
const result = [...rangeMap.values()];
|
|
2915
|
-
cache.set(memoKey, result);
|
|
2916
|
-
return result;
|
|
2917
|
-
}
|
|
2918
|
-
intersects(range, options) {
|
|
2919
|
-
if (!(range instanceof Range)) throw new TypeError("a Range is required");
|
|
2920
|
-
return this.set.some((thisComparators) => {
|
|
2921
|
-
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
2922
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
2923
|
-
return rangeComparators.every((rangeComparator) => {
|
|
2924
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
2925
|
-
});
|
|
2926
|
-
});
|
|
2927
|
-
});
|
|
2928
|
-
});
|
|
2929
|
-
}
|
|
2930
|
-
test(version) {
|
|
2931
|
-
if (!version) return false;
|
|
2932
|
-
if (typeof version === "string") try {
|
|
2933
|
-
version = new SemVer(version, this.options);
|
|
2934
|
-
} catch (er) {
|
|
2935
|
-
return false;
|
|
2936
|
-
}
|
|
2937
|
-
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
|
|
2938
|
-
return false;
|
|
2939
|
-
}
|
|
2940
|
-
};
|
|
2941
|
-
const cache = new (require_lrucache())();
|
|
2942
|
-
const parseOptions = require_parse_options();
|
|
2943
|
-
const Comparator = require_comparator();
|
|
2944
|
-
const debug = require_debug();
|
|
2945
|
-
const SemVer = require_semver$1();
|
|
2946
|
-
const { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
2947
|
-
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
2948
|
-
const BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
2949
|
-
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
2950
|
-
const isAny = (c) => c.value === "";
|
|
2951
|
-
const isSatisfiable = (comparators, options) => {
|
|
2952
|
-
let result = true;
|
|
2953
|
-
const remainingComparators = comparators.slice();
|
|
2954
|
-
let testComparator = remainingComparators.pop();
|
|
2955
|
-
while (result && remainingComparators.length) {
|
|
2956
|
-
result = remainingComparators.every((otherComparator) => {
|
|
2957
|
-
return testComparator.intersects(otherComparator, options);
|
|
2958
|
-
});
|
|
2959
|
-
testComparator = remainingComparators.pop();
|
|
2960
|
-
}
|
|
2961
|
-
return result;
|
|
2962
|
-
};
|
|
2963
|
-
const parseComparator = (comp, options) => {
|
|
2964
|
-
comp = comp.replace(re[t.BUILD], "");
|
|
2965
|
-
debug("comp", comp, options);
|
|
2966
|
-
comp = replaceCarets(comp, options);
|
|
2967
|
-
debug("caret", comp);
|
|
2968
|
-
comp = replaceTildes(comp, options);
|
|
2969
|
-
debug("tildes", comp);
|
|
2970
|
-
comp = replaceXRanges(comp, options);
|
|
2971
|
-
debug("xrange", comp);
|
|
2972
|
-
comp = replaceStars(comp, options);
|
|
2973
|
-
debug("stars", comp);
|
|
2974
|
-
return comp;
|
|
2975
|
-
};
|
|
2976
|
-
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
2977
|
-
const invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
2978
|
-
const replaceTildes = (comp, options) => {
|
|
2979
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
2980
|
-
};
|
|
2981
|
-
const replaceTilde = (comp, options) => {
|
|
2982
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
2983
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
2984
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
2985
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
2986
|
-
let ret;
|
|
2987
|
-
if (isX(M)) ret = "";
|
|
2988
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
2989
|
-
else if (isX(p)) ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
2990
|
-
else if (pr) {
|
|
2991
|
-
debug("replaceTilde pr", pr);
|
|
2992
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
2993
|
-
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
2994
|
-
debug("tilde return", ret);
|
|
2995
|
-
return ret;
|
|
2996
|
-
});
|
|
2997
|
-
};
|
|
2998
|
-
const replaceCarets = (comp, options) => {
|
|
2999
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
3000
|
-
};
|
|
3001
|
-
const replaceCaret = (comp, options) => {
|
|
3002
|
-
debug("caret", comp, options);
|
|
3003
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
3004
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
3005
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
3006
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
3007
|
-
let ret;
|
|
3008
|
-
if (isX(M)) ret = "";
|
|
3009
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
3010
|
-
else if (isX(p)) {
|
|
3011
|
-
if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
3012
|
-
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
3013
|
-
} else if (pr) {
|
|
3014
|
-
debug("replaceCaret pr", pr);
|
|
3015
|
-
if (M === "0") {
|
|
3016
|
-
if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
3017
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
3018
|
-
} else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
3019
|
-
} else {
|
|
3020
|
-
debug("no pr");
|
|
3021
|
-
if (M === "0") {
|
|
3022
|
-
if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
3023
|
-
else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
3024
|
-
} else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
3025
|
-
}
|
|
3026
|
-
debug("caret return", ret);
|
|
3027
|
-
return ret;
|
|
3028
|
-
});
|
|
3029
|
-
};
|
|
3030
|
-
const replaceXRanges = (comp, options) => {
|
|
3031
|
-
debug("replaceXRanges", comp, options);
|
|
3032
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
3033
|
-
};
|
|
3034
|
-
const replaceXRange = (comp, options) => {
|
|
3035
|
-
comp = comp.trim();
|
|
3036
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
3037
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
3038
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
3039
|
-
if (invalidXRangeOrder(M, m, p)) return comp;
|
|
3040
|
-
const xM = isX(M);
|
|
3041
|
-
const xm = xM || isX(m);
|
|
3042
|
-
const xp = xm || isX(p);
|
|
3043
|
-
const anyX = xp;
|
|
3044
|
-
if (gtlt === "=" && anyX) gtlt = "";
|
|
3045
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
3046
|
-
if (xM) {
|
|
3047
|
-
if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
3048
|
-
else ret = "*";
|
|
3049
|
-
} else if (gtlt && anyX) {
|
|
3050
|
-
if (xm) m = 0;
|
|
3051
|
-
p = 0;
|
|
3052
|
-
if (gtlt === ">") {
|
|
3053
|
-
gtlt = ">=";
|
|
3054
|
-
if (xm) {
|
|
3055
|
-
M = +M + 1;
|
|
3056
|
-
m = 0;
|
|
3057
|
-
p = 0;
|
|
3058
|
-
} else {
|
|
3059
|
-
m = +m + 1;
|
|
3060
|
-
p = 0;
|
|
3061
|
-
}
|
|
3062
|
-
} else if (gtlt === "<=") {
|
|
3063
|
-
gtlt = "<";
|
|
3064
|
-
if (xm) M = +M + 1;
|
|
3065
|
-
else m = +m + 1;
|
|
3066
|
-
}
|
|
3067
|
-
if (gtlt === "<") pr = "-0";
|
|
3068
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
3069
|
-
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
3070
|
-
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
3071
|
-
debug("xRange return", ret);
|
|
3072
|
-
return ret;
|
|
3073
|
-
});
|
|
3074
|
-
};
|
|
3075
|
-
const replaceStars = (comp, options) => {
|
|
3076
|
-
debug("replaceStars", comp, options);
|
|
3077
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
3078
|
-
};
|
|
3079
|
-
const replaceGTE0 = (comp, options) => {
|
|
3080
|
-
debug("replaceGTE0", comp, options);
|
|
3081
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
3082
|
-
};
|
|
3083
|
-
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
3084
|
-
if (isX(fM)) from = "";
|
|
3085
|
-
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
3086
|
-
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
3087
|
-
else if (fpr) from = `>=${from}`;
|
|
3088
|
-
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
3089
|
-
if (isX(tM)) to = "";
|
|
3090
|
-
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
3091
|
-
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
3092
|
-
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
3093
|
-
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
3094
|
-
else to = `<=${to}`;
|
|
3095
|
-
return `${from} ${to}`.trim();
|
|
3096
|
-
};
|
|
3097
|
-
const testSet = (set, version, options) => {
|
|
3098
|
-
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
3099
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
3100
|
-
for (let i = 0; i < set.length; i++) {
|
|
3101
|
-
debug(set[i].semver);
|
|
3102
|
-
if (set[i].semver === Comparator.ANY) continue;
|
|
3103
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
3104
|
-
const allowed = set[i].semver;
|
|
3105
|
-
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
return false;
|
|
3109
|
-
}
|
|
3110
|
-
return true;
|
|
3111
|
-
};
|
|
3112
|
-
}));
|
|
3113
|
-
//#endregion
|
|
3114
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
|
|
3115
|
-
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3116
|
-
const ANY = Symbol("SemVer ANY");
|
|
3117
|
-
module.exports = class Comparator {
|
|
3118
|
-
static get ANY() {
|
|
3119
|
-
return ANY;
|
|
3120
|
-
}
|
|
3121
|
-
constructor(comp, options) {
|
|
3122
|
-
options = parseOptions(options);
|
|
3123
|
-
if (comp instanceof Comparator) {
|
|
3124
|
-
if (comp.loose === !!options.loose) return comp;
|
|
3125
|
-
else comp = comp.value;
|
|
3126
|
-
}
|
|
3127
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
3128
|
-
debug("comparator", comp, options);
|
|
3129
|
-
this.options = options;
|
|
3130
|
-
this.loose = !!options.loose;
|
|
3131
|
-
this.parse(comp);
|
|
3132
|
-
if (this.semver === ANY) this.value = "";
|
|
3133
|
-
else this.value = this.operator + this.semver.version;
|
|
3134
|
-
debug("comp", this);
|
|
3135
|
-
}
|
|
3136
|
-
parse(comp) {
|
|
3137
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
3138
|
-
const m = comp.match(r);
|
|
3139
|
-
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
3140
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
3141
|
-
if (this.operator === "=") this.operator = "";
|
|
3142
|
-
if (!m[2]) this.semver = ANY;
|
|
3143
|
-
else this.semver = new SemVer(m[2], this.options.loose);
|
|
3144
|
-
}
|
|
3145
|
-
toString() {
|
|
3146
|
-
return this.value;
|
|
3147
|
-
}
|
|
3148
|
-
test(version) {
|
|
3149
|
-
debug("Comparator.test", version, this.options.loose);
|
|
3150
|
-
if (this.semver === ANY || version === ANY) return true;
|
|
3151
|
-
if (typeof version === "string") try {
|
|
3152
|
-
version = new SemVer(version, this.options);
|
|
3153
|
-
} catch (er) {
|
|
3154
|
-
return false;
|
|
3155
|
-
}
|
|
3156
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
3157
|
-
}
|
|
3158
|
-
intersects(comp, options) {
|
|
3159
|
-
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
3160
|
-
if (this.operator === "") {
|
|
3161
|
-
if (this.value === "") return true;
|
|
3162
|
-
return new Range(comp.value, options).test(this.value);
|
|
3163
|
-
} else if (comp.operator === "") {
|
|
3164
|
-
if (comp.value === "") return true;
|
|
3165
|
-
return new Range(this.value, options).test(comp.semver);
|
|
3166
|
-
}
|
|
3167
|
-
options = parseOptions(options);
|
|
3168
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
3169
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
3170
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
3171
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
3172
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
3173
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
3174
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
3175
|
-
return false;
|
|
3176
|
-
}
|
|
3177
|
-
};
|
|
3178
|
-
const parseOptions = require_parse_options();
|
|
3179
|
-
const { safeRe: re, t } = require_re();
|
|
3180
|
-
const cmp = require_cmp();
|
|
3181
|
-
const debug = require_debug();
|
|
3182
|
-
const SemVer = require_semver$1();
|
|
3183
|
-
const Range = require_range();
|
|
3184
|
-
}));
|
|
3185
|
-
//#endregion
|
|
3186
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
|
|
3187
|
-
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3188
|
-
const Range = require_range();
|
|
3189
|
-
const satisfies = (version, range, options) => {
|
|
3190
|
-
try {
|
|
3191
|
-
range = new Range(range, options);
|
|
3192
|
-
} catch (er) {
|
|
3193
|
-
return false;
|
|
3194
|
-
}
|
|
3195
|
-
return range.test(version);
|
|
3196
|
-
};
|
|
3197
|
-
module.exports = satisfies;
|
|
3198
|
-
}));
|
|
3199
|
-
//#endregion
|
|
3200
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
|
|
3201
|
-
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3202
|
-
const Range = require_range();
|
|
3203
|
-
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
3204
|
-
module.exports = toComparators;
|
|
3205
|
-
}));
|
|
3206
|
-
//#endregion
|
|
3207
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
|
|
3208
|
-
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3209
|
-
const SemVer = require_semver$1();
|
|
3210
|
-
const Range = require_range();
|
|
3211
|
-
const maxSatisfying = (versions, range, options) => {
|
|
3212
|
-
let max = null;
|
|
3213
|
-
let maxSV = null;
|
|
3214
|
-
let rangeObj = null;
|
|
3215
|
-
try {
|
|
3216
|
-
rangeObj = new Range(range, options);
|
|
3217
|
-
} catch (er) {
|
|
3218
|
-
return null;
|
|
3219
|
-
}
|
|
3220
|
-
versions.forEach((v) => {
|
|
3221
|
-
if (rangeObj.test(v)) {
|
|
3222
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
3223
|
-
max = v;
|
|
3224
|
-
maxSV = new SemVer(max, options);
|
|
3225
|
-
}
|
|
3226
|
-
}
|
|
3227
|
-
});
|
|
3228
|
-
return max;
|
|
3229
|
-
};
|
|
3230
|
-
module.exports = maxSatisfying;
|
|
3231
|
-
}));
|
|
3232
|
-
//#endregion
|
|
3233
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
|
|
3234
|
-
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3235
|
-
const SemVer = require_semver$1();
|
|
3236
|
-
const Range = require_range();
|
|
3237
|
-
const minSatisfying = (versions, range, options) => {
|
|
3238
|
-
let min = null;
|
|
3239
|
-
let minSV = null;
|
|
3240
|
-
let rangeObj = null;
|
|
3241
|
-
try {
|
|
3242
|
-
rangeObj = new Range(range, options);
|
|
3243
|
-
} catch (er) {
|
|
3244
|
-
return null;
|
|
3245
|
-
}
|
|
3246
|
-
versions.forEach((v) => {
|
|
3247
|
-
if (rangeObj.test(v)) {
|
|
3248
|
-
if (!min || minSV.compare(v) === 1) {
|
|
3249
|
-
min = v;
|
|
3250
|
-
minSV = new SemVer(min, options);
|
|
3251
|
-
}
|
|
3252
|
-
}
|
|
3253
|
-
});
|
|
3254
|
-
return min;
|
|
3255
|
-
};
|
|
3256
|
-
module.exports = minSatisfying;
|
|
3257
|
-
}));
|
|
3258
|
-
//#endregion
|
|
3259
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
|
|
3260
|
-
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3261
|
-
const SemVer = require_semver$1();
|
|
3262
|
-
const Range = require_range();
|
|
3263
|
-
const gt = require_gt();
|
|
3264
|
-
const minVersion = (range, loose) => {
|
|
3265
|
-
range = new Range(range, loose);
|
|
3266
|
-
let minver = new SemVer("0.0.0");
|
|
3267
|
-
if (range.test(minver)) return minver;
|
|
3268
|
-
minver = new SemVer("0.0.0-0");
|
|
3269
|
-
if (range.test(minver)) return minver;
|
|
3270
|
-
minver = null;
|
|
3271
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
3272
|
-
const comparators = range.set[i];
|
|
3273
|
-
let setMin = null;
|
|
3274
|
-
comparators.forEach((comparator) => {
|
|
3275
|
-
const compver = new SemVer(comparator.semver.version);
|
|
3276
|
-
switch (comparator.operator) {
|
|
3277
|
-
case ">":
|
|
3278
|
-
if (compver.prerelease.length === 0) compver.patch++;
|
|
3279
|
-
else compver.prerelease.push(0);
|
|
3280
|
-
compver.raw = compver.format();
|
|
3281
|
-
case "":
|
|
3282
|
-
case ">=":
|
|
3283
|
-
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
3284
|
-
break;
|
|
3285
|
-
case "<":
|
|
3286
|
-
case "<=": break;
|
|
3287
|
-
/* istanbul ignore next */
|
|
3288
|
-
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
3289
|
-
}
|
|
3290
|
-
});
|
|
3291
|
-
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
3292
|
-
}
|
|
3293
|
-
if (minver && range.test(minver)) return minver;
|
|
3294
|
-
return null;
|
|
3295
|
-
};
|
|
3296
|
-
module.exports = minVersion;
|
|
3297
|
-
}));
|
|
3298
|
-
//#endregion
|
|
3299
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
|
|
3300
|
-
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3301
|
-
const Range = require_range();
|
|
3302
|
-
const validRange = (range, options) => {
|
|
3303
|
-
try {
|
|
3304
|
-
return new Range(range, options).range || "*";
|
|
3305
|
-
} catch (er) {
|
|
3306
|
-
return null;
|
|
3307
|
-
}
|
|
3308
|
-
};
|
|
3309
|
-
module.exports = validRange;
|
|
3310
|
-
}));
|
|
3311
|
-
//#endregion
|
|
3312
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
|
|
3313
|
-
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3314
|
-
const SemVer = require_semver$1();
|
|
3315
|
-
const Comparator = require_comparator();
|
|
3316
|
-
const { ANY } = Comparator;
|
|
3317
|
-
const Range = require_range();
|
|
3318
|
-
const satisfies = require_satisfies();
|
|
3319
|
-
const gt = require_gt();
|
|
3320
|
-
const lt = require_lt();
|
|
3321
|
-
const lte = require_lte();
|
|
3322
|
-
const gte = require_gte();
|
|
3323
|
-
const outside = (version, range, hilo, options) => {
|
|
3324
|
-
version = new SemVer(version, options);
|
|
3325
|
-
range = new Range(range, options);
|
|
3326
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
3327
|
-
switch (hilo) {
|
|
3328
|
-
case ">":
|
|
3329
|
-
gtfn = gt;
|
|
3330
|
-
ltefn = lte;
|
|
3331
|
-
ltfn = lt;
|
|
3332
|
-
comp = ">";
|
|
3333
|
-
ecomp = ">=";
|
|
3334
|
-
break;
|
|
3335
|
-
case "<":
|
|
3336
|
-
gtfn = lt;
|
|
3337
|
-
ltefn = gte;
|
|
3338
|
-
ltfn = gt;
|
|
3339
|
-
comp = "<";
|
|
3340
|
-
ecomp = "<=";
|
|
3341
|
-
break;
|
|
3342
|
-
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
3343
|
-
}
|
|
3344
|
-
if (satisfies(version, range, options)) return false;
|
|
3345
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
3346
|
-
const comparators = range.set[i];
|
|
3347
|
-
let high = null;
|
|
3348
|
-
let low = null;
|
|
3349
|
-
comparators.forEach((comparator) => {
|
|
3350
|
-
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
3351
|
-
high = high || comparator;
|
|
3352
|
-
low = low || comparator;
|
|
3353
|
-
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
3354
|
-
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
3355
|
-
});
|
|
3356
|
-
if (high.operator === comp || high.operator === ecomp) return false;
|
|
3357
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
3358
|
-
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
3359
|
-
}
|
|
3360
|
-
return true;
|
|
3361
|
-
};
|
|
3362
|
-
module.exports = outside;
|
|
3363
|
-
}));
|
|
3364
|
-
//#endregion
|
|
3365
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
|
|
3366
|
-
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3367
|
-
const outside = require_outside();
|
|
3368
|
-
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
3369
|
-
module.exports = gtr;
|
|
3370
|
-
}));
|
|
3371
|
-
//#endregion
|
|
3372
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
|
|
3373
|
-
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3374
|
-
const outside = require_outside();
|
|
3375
|
-
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
3376
|
-
module.exports = ltr;
|
|
3377
|
-
}));
|
|
3378
|
-
//#endregion
|
|
3379
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
|
|
3380
|
-
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3381
|
-
const Range = require_range();
|
|
3382
|
-
const intersects = (r1, r2, options) => {
|
|
3383
|
-
r1 = new Range(r1, options);
|
|
3384
|
-
r2 = new Range(r2, options);
|
|
3385
|
-
return r1.intersects(r2, options);
|
|
3386
|
-
};
|
|
3387
|
-
module.exports = intersects;
|
|
3388
|
-
}));
|
|
3389
|
-
//#endregion
|
|
3390
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
|
|
3391
|
-
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3392
|
-
const satisfies = require_satisfies();
|
|
3393
|
-
const compare = require_compare();
|
|
3394
|
-
module.exports = (versions, range, options) => {
|
|
3395
|
-
const set = [];
|
|
3396
|
-
let first = null;
|
|
3397
|
-
let prev = null;
|
|
3398
|
-
const v = versions.sort((a, b) => compare(a, b, options));
|
|
3399
|
-
for (const version of v) if (satisfies(version, range, options)) {
|
|
3400
|
-
prev = version;
|
|
3401
|
-
if (!first) first = version;
|
|
3402
|
-
} else {
|
|
3403
|
-
if (prev) set.push([first, prev]);
|
|
3404
|
-
prev = null;
|
|
3405
|
-
first = null;
|
|
3406
|
-
}
|
|
3407
|
-
if (first) set.push([first, null]);
|
|
3408
|
-
const ranges = [];
|
|
3409
|
-
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
3410
|
-
else if (!max && min === v[0]) ranges.push("*");
|
|
3411
|
-
else if (!max) ranges.push(`>=${min}`);
|
|
3412
|
-
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
3413
|
-
else ranges.push(`${min} - ${max}`);
|
|
3414
|
-
const simplified = ranges.join(" || ");
|
|
3415
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
3416
|
-
return simplified.length < original.length ? simplified : range;
|
|
3417
|
-
};
|
|
3418
|
-
}));
|
|
3419
|
-
//#endregion
|
|
3420
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
|
|
3421
|
-
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3422
|
-
const Range = require_range();
|
|
3423
|
-
const Comparator = require_comparator();
|
|
3424
|
-
const { ANY } = Comparator;
|
|
3425
|
-
const satisfies = require_satisfies();
|
|
3426
|
-
const compare = require_compare();
|
|
3427
|
-
const subset = (sub, dom, options = {}) => {
|
|
3428
|
-
if (sub === dom) return true;
|
|
3429
|
-
sub = new Range(sub, options);
|
|
3430
|
-
dom = new Range(dom, options);
|
|
3431
|
-
let sawNonNull = false;
|
|
3432
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
3433
|
-
for (const simpleDom of dom.set) {
|
|
3434
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
3435
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
3436
|
-
if (isSub) continue OUTER;
|
|
3437
|
-
}
|
|
3438
|
-
if (sawNonNull) return false;
|
|
3439
|
-
}
|
|
3440
|
-
return true;
|
|
3441
|
-
};
|
|
3442
|
-
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
3443
|
-
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
3444
|
-
const simpleSubset = (sub, dom, options) => {
|
|
3445
|
-
if (sub === dom) return true;
|
|
3446
|
-
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
3447
|
-
if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
3448
|
-
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
3449
|
-
else sub = minimumVersion;
|
|
3450
|
-
}
|
|
3451
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
3452
|
-
if (options.includePrerelease) return true;
|
|
3453
|
-
else dom = minimumVersion;
|
|
3454
|
-
}
|
|
3455
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
3456
|
-
let gt, lt;
|
|
3457
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
3458
|
-
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
3459
|
-
else eqSet.add(c.semver);
|
|
3460
|
-
if (eqSet.size > 1) return null;
|
|
3461
|
-
let gtltComp;
|
|
3462
|
-
if (gt && lt) {
|
|
3463
|
-
gtltComp = compare(gt.semver, lt.semver, options);
|
|
3464
|
-
if (gtltComp > 0) return null;
|
|
3465
|
-
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
3466
|
-
}
|
|
3467
|
-
for (const eq of eqSet) {
|
|
3468
|
-
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
3469
|
-
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
3470
|
-
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
3471
|
-
return true;
|
|
3472
|
-
}
|
|
3473
|
-
let higher, lower;
|
|
3474
|
-
let hasDomLT, hasDomGT;
|
|
3475
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
3476
|
-
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
3477
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
3478
|
-
for (const c of dom) {
|
|
3479
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
3480
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
3481
|
-
if (gt) {
|
|
3482
|
-
if (needDomGTPre) {
|
|
3483
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
3484
|
-
}
|
|
3485
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
3486
|
-
higher = higherGT(gt, c, options);
|
|
3487
|
-
if (higher === c && higher !== gt) return false;
|
|
3488
|
-
} else if (gt.operator === ">=" && !c.test(gt.semver)) return false;
|
|
3489
|
-
}
|
|
3490
|
-
if (lt) {
|
|
3491
|
-
if (needDomLTPre) {
|
|
3492
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
3493
|
-
}
|
|
3494
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
3495
|
-
lower = lowerLT(lt, c, options);
|
|
3496
|
-
if (lower === c && lower !== lt) return false;
|
|
3497
|
-
} else if (lt.operator === "<=" && !c.test(lt.semver)) return false;
|
|
3498
|
-
}
|
|
3499
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
3500
|
-
}
|
|
3501
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
3502
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
3503
|
-
if (needDomGTPre || needDomLTPre) return false;
|
|
3504
|
-
return true;
|
|
3505
|
-
};
|
|
3506
|
-
const higherGT = (a, b, options) => {
|
|
3507
|
-
if (!a) return b;
|
|
3508
|
-
const comp = compare(a.semver, b.semver, options);
|
|
3509
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
3510
|
-
};
|
|
3511
|
-
const lowerLT = (a, b, options) => {
|
|
3512
|
-
if (!a) return b;
|
|
3513
|
-
const comp = compare(a.semver, b.semver, options);
|
|
3514
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
3515
|
-
};
|
|
3516
|
-
module.exports = subset;
|
|
3517
|
-
}));
|
|
3518
|
-
//#endregion
|
|
3519
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
|
|
3520
|
-
var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3521
|
-
const internalRe = require_re();
|
|
3522
|
-
const constants = require_constants();
|
|
3523
|
-
const SemVer = require_semver$1();
|
|
3524
|
-
const identifiers = require_identifiers();
|
|
3525
|
-
module.exports = {
|
|
3526
|
-
parse: require_parse(),
|
|
3527
|
-
valid: require_valid$1(),
|
|
3528
|
-
clean: require_clean(),
|
|
3529
|
-
inc: require_inc(),
|
|
3530
|
-
diff: require_diff(),
|
|
3531
|
-
major: require_major(),
|
|
3532
|
-
minor: require_minor(),
|
|
3533
|
-
patch: require_patch(),
|
|
3534
|
-
prerelease: require_prerelease(),
|
|
3535
|
-
compare: require_compare(),
|
|
3536
|
-
rcompare: require_rcompare(),
|
|
3537
|
-
compareLoose: require_compare_loose(),
|
|
3538
|
-
compareBuild: require_compare_build(),
|
|
3539
|
-
sort: require_sort(),
|
|
3540
|
-
rsort: require_rsort(),
|
|
3541
|
-
gt: require_gt(),
|
|
3542
|
-
lt: require_lt(),
|
|
3543
|
-
eq: require_eq(),
|
|
3544
|
-
neq: require_neq(),
|
|
3545
|
-
gte: require_gte(),
|
|
3546
|
-
lte: require_lte(),
|
|
3547
|
-
cmp: require_cmp(),
|
|
3548
|
-
coerce: require_coerce(),
|
|
3549
|
-
truncate: require_truncate(),
|
|
3550
|
-
Comparator: require_comparator(),
|
|
3551
|
-
Range: require_range(),
|
|
3552
|
-
satisfies: require_satisfies(),
|
|
3553
|
-
toComparators: require_to_comparators(),
|
|
3554
|
-
maxSatisfying: require_max_satisfying(),
|
|
3555
|
-
minSatisfying: require_min_satisfying(),
|
|
3556
|
-
minVersion: require_min_version(),
|
|
3557
|
-
validRange: require_valid(),
|
|
3558
|
-
outside: require_outside(),
|
|
3559
|
-
gtr: require_gtr(),
|
|
3560
|
-
ltr: require_ltr(),
|
|
3561
|
-
intersects: require_intersects(),
|
|
3562
|
-
simplifyRange: require_simplify(),
|
|
3563
|
-
subset: require_subset(),
|
|
3564
|
-
SemVer,
|
|
3565
|
-
re: internalRe.re,
|
|
3566
|
-
src: internalRe.src,
|
|
3567
|
-
tokens: internalRe.t,
|
|
3568
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
3569
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
3570
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
3571
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
3572
|
-
};
|
|
3573
|
-
}));
|
|
3574
|
-
//#endregion
|
|
3575
1710
|
//#region src/types/package.ts
|
|
3576
1711
|
const PackageManager = {
|
|
3577
1712
|
pnpm: "pnpm",
|
|
@@ -4354,4 +2489,4 @@ function defaultInteractive() {
|
|
|
4354
2489
|
return !process.env.CI && process.stdin.isTTY;
|
|
4355
2490
|
}
|
|
4356
2491
|
//#endregion
|
|
4357
|
-
export {
|
|
2492
|
+
export { multiselect as C, text as D, spinner as E, require_picocolors as O, log as S, select as T, getSpinner as _, resolveGitInit as a, confirm as b, selectPackageManager as c, readYamlFile as d, scalarString as f, getSilentSpinner as g, resolveApproveBuildTargets as h, promptGitHooks as i, isCancel as k, upgradeYarn as l, detectGatedBuilds as m, defaultInteractive as n, runViteFmt as o, approveBuilds as p, downloadPackageManager$1 as r, runViteInstall as s, cancelAndExit as t, editYamlFile as u, DependencyType as v, outro as w, intro as x, PackageManager as y };
|