@terai/dev 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.default.js +2019 -39
- package/dist/cli.default.js.map +1 -1
- package/dist/cli.default.mjs +2045 -65
- package/dist/cli.default.mjs.map +1 -1
- package/dist/cli.js +2019 -39
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +2045 -65
- package/dist/cli.mjs.map +1 -1
- package/dist/commands/extract.js +8 -9
- package/dist/commands/extract.js.map +1 -1
- package/dist/commands/extract.mjs +7 -8
- package/dist/commands/extract.mjs.map +1 -1
- package/dist/commands/index.js +8 -9
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/index.mjs +7 -8
- package/dist/commands/index.mjs.map +1 -1
- package/dist/commands/init.js +7 -8
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.mjs +6 -7
- package/dist/commands/init.mjs.map +1 -1
- package/dist/commands/translate.js +8 -9
- package/dist/commands/translate.js.map +1 -1
- package/dist/commands/translate.mjs +7 -8
- package/dist/commands/translate.mjs.map +1 -1
- package/package.json +8 -8
package/dist/cli.default.mjs
CHANGED
|
@@ -976,11 +976,11 @@ var require_signal_exit = __commonJS({
|
|
|
976
976
|
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
|
977
977
|
"use strict";
|
|
978
978
|
init_esm_shims();
|
|
979
|
-
var
|
|
980
|
-
var processOk = function(
|
|
981
|
-
return
|
|
979
|
+
var process10 = global.process;
|
|
980
|
+
var processOk = function(process11) {
|
|
981
|
+
return process11 && typeof process11 === "object" && typeof process11.removeListener === "function" && typeof process11.emit === "function" && typeof process11.reallyExit === "function" && typeof process11.listeners === "function" && typeof process11.kill === "function" && typeof process11.pid === "number" && typeof process11.on === "function";
|
|
982
982
|
};
|
|
983
|
-
if (!processOk(
|
|
983
|
+
if (!processOk(process10)) {
|
|
984
984
|
module2.exports = function() {
|
|
985
985
|
return function() {
|
|
986
986
|
};
|
|
@@ -988,15 +988,15 @@ var require_signal_exit = __commonJS({
|
|
|
988
988
|
} else {
|
|
989
989
|
assert2 = __require("assert");
|
|
990
990
|
signals = require_signals();
|
|
991
|
-
isWin = /^win/i.test(
|
|
991
|
+
isWin = /^win/i.test(process10.platform);
|
|
992
992
|
EE = __require("events");
|
|
993
993
|
if (typeof EE !== "function") {
|
|
994
994
|
EE = EE.EventEmitter;
|
|
995
995
|
}
|
|
996
|
-
if (
|
|
997
|
-
emitter =
|
|
996
|
+
if (process10.__signal_exit_emitter__) {
|
|
997
|
+
emitter = process10.__signal_exit_emitter__;
|
|
998
998
|
} else {
|
|
999
|
-
emitter =
|
|
999
|
+
emitter = process10.__signal_exit_emitter__ = new EE();
|
|
1000
1000
|
emitter.count = 0;
|
|
1001
1001
|
emitter.emitted = {};
|
|
1002
1002
|
}
|
|
@@ -1033,12 +1033,12 @@ var require_signal_exit = __commonJS({
|
|
|
1033
1033
|
loaded = false;
|
|
1034
1034
|
signals.forEach(function(sig) {
|
|
1035
1035
|
try {
|
|
1036
|
-
|
|
1036
|
+
process10.removeListener(sig, sigListeners[sig]);
|
|
1037
1037
|
} catch (er) {
|
|
1038
1038
|
}
|
|
1039
1039
|
});
|
|
1040
|
-
|
|
1041
|
-
|
|
1040
|
+
process10.emit = originalProcessEmit;
|
|
1041
|
+
process10.reallyExit = originalProcessReallyExit;
|
|
1042
1042
|
emitter.count -= 1;
|
|
1043
1043
|
};
|
|
1044
1044
|
module2.exports.unload = unload;
|
|
@@ -1055,7 +1055,7 @@ var require_signal_exit = __commonJS({
|
|
|
1055
1055
|
if (!processOk(global.process)) {
|
|
1056
1056
|
return;
|
|
1057
1057
|
}
|
|
1058
|
-
var listeners =
|
|
1058
|
+
var listeners = process10.listeners(sig);
|
|
1059
1059
|
if (listeners.length === emitter.count) {
|
|
1060
1060
|
unload();
|
|
1061
1061
|
emit("exit", null, sig);
|
|
@@ -1063,7 +1063,7 @@ var require_signal_exit = __commonJS({
|
|
|
1063
1063
|
if (isWin && sig === "SIGHUP") {
|
|
1064
1064
|
sig = "SIGINT";
|
|
1065
1065
|
}
|
|
1066
|
-
|
|
1066
|
+
process10.kill(process10.pid, sig);
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
1069
|
});
|
|
@@ -1079,36 +1079,36 @@ var require_signal_exit = __commonJS({
|
|
|
1079
1079
|
emitter.count += 1;
|
|
1080
1080
|
signals = signals.filter(function(sig) {
|
|
1081
1081
|
try {
|
|
1082
|
-
|
|
1082
|
+
process10.on(sig, sigListeners[sig]);
|
|
1083
1083
|
return true;
|
|
1084
1084
|
} catch (er) {
|
|
1085
1085
|
return false;
|
|
1086
1086
|
}
|
|
1087
1087
|
});
|
|
1088
|
-
|
|
1089
|
-
|
|
1088
|
+
process10.emit = processEmit;
|
|
1089
|
+
process10.reallyExit = processReallyExit;
|
|
1090
1090
|
};
|
|
1091
1091
|
module2.exports.load = load;
|
|
1092
|
-
originalProcessReallyExit =
|
|
1092
|
+
originalProcessReallyExit = process10.reallyExit;
|
|
1093
1093
|
processReallyExit = function processReallyExit2(code) {
|
|
1094
1094
|
if (!processOk(global.process)) {
|
|
1095
1095
|
return;
|
|
1096
1096
|
}
|
|
1097
|
-
|
|
1097
|
+
process10.exitCode = code || /* istanbul ignore next */
|
|
1098
1098
|
0;
|
|
1099
|
-
emit("exit",
|
|
1100
|
-
emit("afterexit",
|
|
1101
|
-
originalProcessReallyExit.call(
|
|
1099
|
+
emit("exit", process10.exitCode, null);
|
|
1100
|
+
emit("afterexit", process10.exitCode, null);
|
|
1101
|
+
originalProcessReallyExit.call(process10, process10.exitCode);
|
|
1102
1102
|
};
|
|
1103
|
-
originalProcessEmit =
|
|
1103
|
+
originalProcessEmit = process10.emit;
|
|
1104
1104
|
processEmit = function processEmit2(ev, arg) {
|
|
1105
1105
|
if (ev === "exit" && processOk(global.process)) {
|
|
1106
1106
|
if (arg !== void 0) {
|
|
1107
|
-
|
|
1107
|
+
process10.exitCode = arg;
|
|
1108
1108
|
}
|
|
1109
1109
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
1110
|
-
emit("exit",
|
|
1111
|
-
emit("afterexit",
|
|
1110
|
+
emit("exit", process10.exitCode, null);
|
|
1111
|
+
emit("afterexit", process10.exitCode, null);
|
|
1112
1112
|
return ret;
|
|
1113
1113
|
} else {
|
|
1114
1114
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -9652,6 +9652,1981 @@ var require_registry_auth_token = __commonJS({
|
|
|
9652
9652
|
}
|
|
9653
9653
|
});
|
|
9654
9654
|
|
|
9655
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
|
|
9656
|
+
var require_constants2 = __commonJS({
|
|
9657
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports, module2) {
|
|
9658
|
+
"use strict";
|
|
9659
|
+
init_esm_shims();
|
|
9660
|
+
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
9661
|
+
var MAX_LENGTH = 256;
|
|
9662
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
9663
|
+
9007199254740991;
|
|
9664
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
9665
|
+
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
9666
|
+
var RELEASE_TYPES = [
|
|
9667
|
+
"major",
|
|
9668
|
+
"premajor",
|
|
9669
|
+
"minor",
|
|
9670
|
+
"preminor",
|
|
9671
|
+
"patch",
|
|
9672
|
+
"prepatch",
|
|
9673
|
+
"prerelease"
|
|
9674
|
+
];
|
|
9675
|
+
module2.exports = {
|
|
9676
|
+
MAX_LENGTH,
|
|
9677
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
9678
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
9679
|
+
MAX_SAFE_INTEGER,
|
|
9680
|
+
RELEASE_TYPES,
|
|
9681
|
+
SEMVER_SPEC_VERSION,
|
|
9682
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
9683
|
+
FLAG_LOOSE: 2
|
|
9684
|
+
};
|
|
9685
|
+
}
|
|
9686
|
+
});
|
|
9687
|
+
|
|
9688
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
|
|
9689
|
+
var require_debug2 = __commonJS({
|
|
9690
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports, module2) {
|
|
9691
|
+
"use strict";
|
|
9692
|
+
init_esm_shims();
|
|
9693
|
+
var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
9694
|
+
};
|
|
9695
|
+
module2.exports = debug2;
|
|
9696
|
+
}
|
|
9697
|
+
});
|
|
9698
|
+
|
|
9699
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
|
|
9700
|
+
var require_re2 = __commonJS({
|
|
9701
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports, module2) {
|
|
9702
|
+
"use strict";
|
|
9703
|
+
init_esm_shims();
|
|
9704
|
+
var {
|
|
9705
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
9706
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
9707
|
+
MAX_LENGTH
|
|
9708
|
+
} = require_constants2();
|
|
9709
|
+
var debug2 = require_debug2();
|
|
9710
|
+
exports = module2.exports = {};
|
|
9711
|
+
var re = exports.re = [];
|
|
9712
|
+
var safeRe = exports.safeRe = [];
|
|
9713
|
+
var src = exports.src = [];
|
|
9714
|
+
var safeSrc = exports.safeSrc = [];
|
|
9715
|
+
var t = exports.t = {};
|
|
9716
|
+
var R = 0;
|
|
9717
|
+
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
9718
|
+
var safeRegexReplacements = [
|
|
9719
|
+
["\\s", 1],
|
|
9720
|
+
["\\d", MAX_LENGTH],
|
|
9721
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
9722
|
+
];
|
|
9723
|
+
var makeSafeRegex = (value) => {
|
|
9724
|
+
for (const [token, max] of safeRegexReplacements) {
|
|
9725
|
+
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
9726
|
+
}
|
|
9727
|
+
return value;
|
|
9728
|
+
};
|
|
9729
|
+
var createToken = (name, value, isGlobal) => {
|
|
9730
|
+
const safe = makeSafeRegex(value);
|
|
9731
|
+
const index = R++;
|
|
9732
|
+
debug2(name, index, value);
|
|
9733
|
+
t[name] = index;
|
|
9734
|
+
src[index] = value;
|
|
9735
|
+
safeSrc[index] = safe;
|
|
9736
|
+
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
9737
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
9738
|
+
};
|
|
9739
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
9740
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
9741
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
9742
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
9743
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
9744
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
9745
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
9746
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
9747
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
9748
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
9749
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
9750
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
9751
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
9752
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
9753
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
9754
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
9755
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
9756
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
9757
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
9758
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
9759
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
9760
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
9761
|
+
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
9762
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
9763
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
9764
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
9765
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
9766
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
9767
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
9768
|
+
exports.tildeTrimReplace = "$1~";
|
|
9769
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
9770
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
9771
|
+
createToken("LONECARET", "(?:\\^)");
|
|
9772
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
9773
|
+
exports.caretTrimReplace = "$1^";
|
|
9774
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
9775
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
9776
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
9777
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
9778
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
9779
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
9780
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
9781
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
9782
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
9783
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
9784
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
9785
|
+
}
|
|
9786
|
+
});
|
|
9787
|
+
|
|
9788
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
|
|
9789
|
+
var require_parse_options2 = __commonJS({
|
|
9790
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports, module2) {
|
|
9791
|
+
"use strict";
|
|
9792
|
+
init_esm_shims();
|
|
9793
|
+
var looseOption = Object.freeze({ loose: true });
|
|
9794
|
+
var emptyOpts = Object.freeze({});
|
|
9795
|
+
var parseOptions = (options) => {
|
|
9796
|
+
if (!options) {
|
|
9797
|
+
return emptyOpts;
|
|
9798
|
+
}
|
|
9799
|
+
if (typeof options !== "object") {
|
|
9800
|
+
return looseOption;
|
|
9801
|
+
}
|
|
9802
|
+
return options;
|
|
9803
|
+
};
|
|
9804
|
+
module2.exports = parseOptions;
|
|
9805
|
+
}
|
|
9806
|
+
});
|
|
9807
|
+
|
|
9808
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
|
|
9809
|
+
var require_identifiers2 = __commonJS({
|
|
9810
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports, module2) {
|
|
9811
|
+
"use strict";
|
|
9812
|
+
init_esm_shims();
|
|
9813
|
+
var numeric = /^[0-9]+$/;
|
|
9814
|
+
var compareIdentifiers = (a, b) => {
|
|
9815
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
9816
|
+
return a === b ? 0 : a < b ? -1 : 1;
|
|
9817
|
+
}
|
|
9818
|
+
const anum = numeric.test(a);
|
|
9819
|
+
const bnum = numeric.test(b);
|
|
9820
|
+
if (anum && bnum) {
|
|
9821
|
+
a = +a;
|
|
9822
|
+
b = +b;
|
|
9823
|
+
}
|
|
9824
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
9825
|
+
};
|
|
9826
|
+
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
9827
|
+
module2.exports = {
|
|
9828
|
+
compareIdentifiers,
|
|
9829
|
+
rcompareIdentifiers
|
|
9830
|
+
};
|
|
9831
|
+
}
|
|
9832
|
+
});
|
|
9833
|
+
|
|
9834
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
|
|
9835
|
+
var require_semver3 = __commonJS({
|
|
9836
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports, module2) {
|
|
9837
|
+
"use strict";
|
|
9838
|
+
init_esm_shims();
|
|
9839
|
+
var debug2 = require_debug2();
|
|
9840
|
+
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants2();
|
|
9841
|
+
var { safeRe: re, t } = require_re2();
|
|
9842
|
+
var parseOptions = require_parse_options2();
|
|
9843
|
+
var { compareIdentifiers } = require_identifiers2();
|
|
9844
|
+
var SemVer = class _SemVer {
|
|
9845
|
+
constructor(version, options) {
|
|
9846
|
+
options = parseOptions(options);
|
|
9847
|
+
if (version instanceof _SemVer) {
|
|
9848
|
+
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
9849
|
+
return version;
|
|
9850
|
+
} else {
|
|
9851
|
+
version = version.version;
|
|
9852
|
+
}
|
|
9853
|
+
} else if (typeof version !== "string") {
|
|
9854
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
9855
|
+
}
|
|
9856
|
+
if (version.length > MAX_LENGTH) {
|
|
9857
|
+
throw new TypeError(
|
|
9858
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
9859
|
+
);
|
|
9860
|
+
}
|
|
9861
|
+
debug2("SemVer", version, options);
|
|
9862
|
+
this.options = options;
|
|
9863
|
+
this.loose = !!options.loose;
|
|
9864
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
9865
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
9866
|
+
if (!m) {
|
|
9867
|
+
throw new TypeError(`Invalid Version: ${version}`);
|
|
9868
|
+
}
|
|
9869
|
+
this.raw = version;
|
|
9870
|
+
this.major = +m[1];
|
|
9871
|
+
this.minor = +m[2];
|
|
9872
|
+
this.patch = +m[3];
|
|
9873
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
9874
|
+
throw new TypeError("Invalid major version");
|
|
9875
|
+
}
|
|
9876
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
9877
|
+
throw new TypeError("Invalid minor version");
|
|
9878
|
+
}
|
|
9879
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
9880
|
+
throw new TypeError("Invalid patch version");
|
|
9881
|
+
}
|
|
9882
|
+
if (!m[4]) {
|
|
9883
|
+
this.prerelease = [];
|
|
9884
|
+
} else {
|
|
9885
|
+
this.prerelease = m[4].split(".").map((id) => {
|
|
9886
|
+
if (/^[0-9]+$/.test(id)) {
|
|
9887
|
+
const num = +id;
|
|
9888
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
9889
|
+
return num;
|
|
9890
|
+
}
|
|
9891
|
+
}
|
|
9892
|
+
return id;
|
|
9893
|
+
});
|
|
9894
|
+
}
|
|
9895
|
+
this.build = m[5] ? m[5].split(".") : [];
|
|
9896
|
+
this.format();
|
|
9897
|
+
}
|
|
9898
|
+
format() {
|
|
9899
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
9900
|
+
if (this.prerelease.length) {
|
|
9901
|
+
this.version += `-${this.prerelease.join(".")}`;
|
|
9902
|
+
}
|
|
9903
|
+
return this.version;
|
|
9904
|
+
}
|
|
9905
|
+
toString() {
|
|
9906
|
+
return this.version;
|
|
9907
|
+
}
|
|
9908
|
+
compare(other) {
|
|
9909
|
+
debug2("SemVer.compare", this.version, this.options, other);
|
|
9910
|
+
if (!(other instanceof _SemVer)) {
|
|
9911
|
+
if (typeof other === "string" && other === this.version) {
|
|
9912
|
+
return 0;
|
|
9913
|
+
}
|
|
9914
|
+
other = new _SemVer(other, this.options);
|
|
9915
|
+
}
|
|
9916
|
+
if (other.version === this.version) {
|
|
9917
|
+
return 0;
|
|
9918
|
+
}
|
|
9919
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
9920
|
+
}
|
|
9921
|
+
compareMain(other) {
|
|
9922
|
+
if (!(other instanceof _SemVer)) {
|
|
9923
|
+
other = new _SemVer(other, this.options);
|
|
9924
|
+
}
|
|
9925
|
+
if (this.major < other.major) {
|
|
9926
|
+
return -1;
|
|
9927
|
+
}
|
|
9928
|
+
if (this.major > other.major) {
|
|
9929
|
+
return 1;
|
|
9930
|
+
}
|
|
9931
|
+
if (this.minor < other.minor) {
|
|
9932
|
+
return -1;
|
|
9933
|
+
}
|
|
9934
|
+
if (this.minor > other.minor) {
|
|
9935
|
+
return 1;
|
|
9936
|
+
}
|
|
9937
|
+
if (this.patch < other.patch) {
|
|
9938
|
+
return -1;
|
|
9939
|
+
}
|
|
9940
|
+
if (this.patch > other.patch) {
|
|
9941
|
+
return 1;
|
|
9942
|
+
}
|
|
9943
|
+
return 0;
|
|
9944
|
+
}
|
|
9945
|
+
comparePre(other) {
|
|
9946
|
+
if (!(other instanceof _SemVer)) {
|
|
9947
|
+
other = new _SemVer(other, this.options);
|
|
9948
|
+
}
|
|
9949
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
9950
|
+
return -1;
|
|
9951
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
9952
|
+
return 1;
|
|
9953
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
9954
|
+
return 0;
|
|
9955
|
+
}
|
|
9956
|
+
let i = 0;
|
|
9957
|
+
do {
|
|
9958
|
+
const a = this.prerelease[i];
|
|
9959
|
+
const b = other.prerelease[i];
|
|
9960
|
+
debug2("prerelease compare", i, a, b);
|
|
9961
|
+
if (a === void 0 && b === void 0) {
|
|
9962
|
+
return 0;
|
|
9963
|
+
} else if (b === void 0) {
|
|
9964
|
+
return 1;
|
|
9965
|
+
} else if (a === void 0) {
|
|
9966
|
+
return -1;
|
|
9967
|
+
} else if (a === b) {
|
|
9968
|
+
continue;
|
|
9969
|
+
} else {
|
|
9970
|
+
return compareIdentifiers(a, b);
|
|
9971
|
+
}
|
|
9972
|
+
} while (++i);
|
|
9973
|
+
}
|
|
9974
|
+
compareBuild(other) {
|
|
9975
|
+
if (!(other instanceof _SemVer)) {
|
|
9976
|
+
other = new _SemVer(other, this.options);
|
|
9977
|
+
}
|
|
9978
|
+
let i = 0;
|
|
9979
|
+
do {
|
|
9980
|
+
const a = this.build[i];
|
|
9981
|
+
const b = other.build[i];
|
|
9982
|
+
debug2("build compare", i, a, b);
|
|
9983
|
+
if (a === void 0 && b === void 0) {
|
|
9984
|
+
return 0;
|
|
9985
|
+
} else if (b === void 0) {
|
|
9986
|
+
return 1;
|
|
9987
|
+
} else if (a === void 0) {
|
|
9988
|
+
return -1;
|
|
9989
|
+
} else if (a === b) {
|
|
9990
|
+
continue;
|
|
9991
|
+
} else {
|
|
9992
|
+
return compareIdentifiers(a, b);
|
|
9993
|
+
}
|
|
9994
|
+
} while (++i);
|
|
9995
|
+
}
|
|
9996
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
9997
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
9998
|
+
inc(release, identifier, identifierBase) {
|
|
9999
|
+
if (release.startsWith("pre")) {
|
|
10000
|
+
if (!identifier && identifierBase === false) {
|
|
10001
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
10002
|
+
}
|
|
10003
|
+
if (identifier) {
|
|
10004
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
10005
|
+
if (!match || match[1] !== identifier) {
|
|
10006
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
10007
|
+
}
|
|
10008
|
+
}
|
|
10009
|
+
}
|
|
10010
|
+
switch (release) {
|
|
10011
|
+
case "premajor":
|
|
10012
|
+
this.prerelease.length = 0;
|
|
10013
|
+
this.patch = 0;
|
|
10014
|
+
this.minor = 0;
|
|
10015
|
+
this.major++;
|
|
10016
|
+
this.inc("pre", identifier, identifierBase);
|
|
10017
|
+
break;
|
|
10018
|
+
case "preminor":
|
|
10019
|
+
this.prerelease.length = 0;
|
|
10020
|
+
this.patch = 0;
|
|
10021
|
+
this.minor++;
|
|
10022
|
+
this.inc("pre", identifier, identifierBase);
|
|
10023
|
+
break;
|
|
10024
|
+
case "prepatch":
|
|
10025
|
+
this.prerelease.length = 0;
|
|
10026
|
+
this.inc("patch", identifier, identifierBase);
|
|
10027
|
+
this.inc("pre", identifier, identifierBase);
|
|
10028
|
+
break;
|
|
10029
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
10030
|
+
// prepatch.
|
|
10031
|
+
case "prerelease":
|
|
10032
|
+
if (this.prerelease.length === 0) {
|
|
10033
|
+
this.inc("patch", identifier, identifierBase);
|
|
10034
|
+
}
|
|
10035
|
+
this.inc("pre", identifier, identifierBase);
|
|
10036
|
+
break;
|
|
10037
|
+
case "release":
|
|
10038
|
+
if (this.prerelease.length === 0) {
|
|
10039
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
10040
|
+
}
|
|
10041
|
+
this.prerelease.length = 0;
|
|
10042
|
+
break;
|
|
10043
|
+
case "major":
|
|
10044
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
10045
|
+
this.major++;
|
|
10046
|
+
}
|
|
10047
|
+
this.minor = 0;
|
|
10048
|
+
this.patch = 0;
|
|
10049
|
+
this.prerelease = [];
|
|
10050
|
+
break;
|
|
10051
|
+
case "minor":
|
|
10052
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
10053
|
+
this.minor++;
|
|
10054
|
+
}
|
|
10055
|
+
this.patch = 0;
|
|
10056
|
+
this.prerelease = [];
|
|
10057
|
+
break;
|
|
10058
|
+
case "patch":
|
|
10059
|
+
if (this.prerelease.length === 0) {
|
|
10060
|
+
this.patch++;
|
|
10061
|
+
}
|
|
10062
|
+
this.prerelease = [];
|
|
10063
|
+
break;
|
|
10064
|
+
// This probably shouldn't be used publicly.
|
|
10065
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
10066
|
+
case "pre": {
|
|
10067
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
10068
|
+
if (this.prerelease.length === 0) {
|
|
10069
|
+
this.prerelease = [base];
|
|
10070
|
+
} else {
|
|
10071
|
+
let i = this.prerelease.length;
|
|
10072
|
+
while (--i >= 0) {
|
|
10073
|
+
if (typeof this.prerelease[i] === "number") {
|
|
10074
|
+
this.prerelease[i]++;
|
|
10075
|
+
i = -2;
|
|
10076
|
+
}
|
|
10077
|
+
}
|
|
10078
|
+
if (i === -1) {
|
|
10079
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
10080
|
+
throw new Error("invalid increment argument: identifier already exists");
|
|
10081
|
+
}
|
|
10082
|
+
this.prerelease.push(base);
|
|
10083
|
+
}
|
|
10084
|
+
}
|
|
10085
|
+
if (identifier) {
|
|
10086
|
+
let prerelease = [identifier, base];
|
|
10087
|
+
if (identifierBase === false) {
|
|
10088
|
+
prerelease = [identifier];
|
|
10089
|
+
}
|
|
10090
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
10091
|
+
if (isNaN(this.prerelease[1])) {
|
|
10092
|
+
this.prerelease = prerelease;
|
|
10093
|
+
}
|
|
10094
|
+
} else {
|
|
10095
|
+
this.prerelease = prerelease;
|
|
10096
|
+
}
|
|
10097
|
+
}
|
|
10098
|
+
break;
|
|
10099
|
+
}
|
|
10100
|
+
default:
|
|
10101
|
+
throw new Error(`invalid increment argument: ${release}`);
|
|
10102
|
+
}
|
|
10103
|
+
this.raw = this.format();
|
|
10104
|
+
if (this.build.length) {
|
|
10105
|
+
this.raw += `+${this.build.join(".")}`;
|
|
10106
|
+
}
|
|
10107
|
+
return this;
|
|
10108
|
+
}
|
|
10109
|
+
};
|
|
10110
|
+
module2.exports = SemVer;
|
|
10111
|
+
}
|
|
10112
|
+
});
|
|
10113
|
+
|
|
10114
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
|
|
10115
|
+
var require_parse2 = __commonJS({
|
|
10116
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports, module2) {
|
|
10117
|
+
"use strict";
|
|
10118
|
+
init_esm_shims();
|
|
10119
|
+
var SemVer = require_semver3();
|
|
10120
|
+
var parse = (version, options, throwErrors = false) => {
|
|
10121
|
+
if (version instanceof SemVer) {
|
|
10122
|
+
return version;
|
|
10123
|
+
}
|
|
10124
|
+
try {
|
|
10125
|
+
return new SemVer(version, options);
|
|
10126
|
+
} catch (er) {
|
|
10127
|
+
if (!throwErrors) {
|
|
10128
|
+
return null;
|
|
10129
|
+
}
|
|
10130
|
+
throw er;
|
|
10131
|
+
}
|
|
10132
|
+
};
|
|
10133
|
+
module2.exports = parse;
|
|
10134
|
+
}
|
|
10135
|
+
});
|
|
10136
|
+
|
|
10137
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
|
|
10138
|
+
var require_valid3 = __commonJS({
|
|
10139
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports, module2) {
|
|
10140
|
+
"use strict";
|
|
10141
|
+
init_esm_shims();
|
|
10142
|
+
var parse = require_parse2();
|
|
10143
|
+
var valid = (version, options) => {
|
|
10144
|
+
const v = parse(version, options);
|
|
10145
|
+
return v ? v.version : null;
|
|
10146
|
+
};
|
|
10147
|
+
module2.exports = valid;
|
|
10148
|
+
}
|
|
10149
|
+
});
|
|
10150
|
+
|
|
10151
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
|
|
10152
|
+
var require_clean2 = __commonJS({
|
|
10153
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports, module2) {
|
|
10154
|
+
"use strict";
|
|
10155
|
+
init_esm_shims();
|
|
10156
|
+
var parse = require_parse2();
|
|
10157
|
+
var clean = (version, options) => {
|
|
10158
|
+
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
10159
|
+
return s ? s.version : null;
|
|
10160
|
+
};
|
|
10161
|
+
module2.exports = clean;
|
|
10162
|
+
}
|
|
10163
|
+
});
|
|
10164
|
+
|
|
10165
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js
|
|
10166
|
+
var require_inc2 = __commonJS({
|
|
10167
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js"(exports, module2) {
|
|
10168
|
+
"use strict";
|
|
10169
|
+
init_esm_shims();
|
|
10170
|
+
var SemVer = require_semver3();
|
|
10171
|
+
var inc = (version, release, options, identifier, identifierBase) => {
|
|
10172
|
+
if (typeof options === "string") {
|
|
10173
|
+
identifierBase = identifier;
|
|
10174
|
+
identifier = options;
|
|
10175
|
+
options = void 0;
|
|
10176
|
+
}
|
|
10177
|
+
try {
|
|
10178
|
+
return new SemVer(
|
|
10179
|
+
version instanceof SemVer ? version.version : version,
|
|
10180
|
+
options
|
|
10181
|
+
).inc(release, identifier, identifierBase).version;
|
|
10182
|
+
} catch (er) {
|
|
10183
|
+
return null;
|
|
10184
|
+
}
|
|
10185
|
+
};
|
|
10186
|
+
module2.exports = inc;
|
|
10187
|
+
}
|
|
10188
|
+
});
|
|
10189
|
+
|
|
10190
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
|
|
10191
|
+
var require_diff2 = __commonJS({
|
|
10192
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports, module2) {
|
|
10193
|
+
"use strict";
|
|
10194
|
+
init_esm_shims();
|
|
10195
|
+
var parse = require_parse2();
|
|
10196
|
+
var diff = (version1, version2) => {
|
|
10197
|
+
const v1 = parse(version1, null, true);
|
|
10198
|
+
const v2 = parse(version2, null, true);
|
|
10199
|
+
const comparison = v1.compare(v2);
|
|
10200
|
+
if (comparison === 0) {
|
|
10201
|
+
return null;
|
|
10202
|
+
}
|
|
10203
|
+
const v1Higher = comparison > 0;
|
|
10204
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
10205
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
10206
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
10207
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
10208
|
+
if (lowHasPre && !highHasPre) {
|
|
10209
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
10210
|
+
return "major";
|
|
10211
|
+
}
|
|
10212
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
10213
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
10214
|
+
return "minor";
|
|
10215
|
+
}
|
|
10216
|
+
return "patch";
|
|
10217
|
+
}
|
|
10218
|
+
}
|
|
10219
|
+
const prefix = highHasPre ? "pre" : "";
|
|
10220
|
+
if (v1.major !== v2.major) {
|
|
10221
|
+
return prefix + "major";
|
|
10222
|
+
}
|
|
10223
|
+
if (v1.minor !== v2.minor) {
|
|
10224
|
+
return prefix + "minor";
|
|
10225
|
+
}
|
|
10226
|
+
if (v1.patch !== v2.patch) {
|
|
10227
|
+
return prefix + "patch";
|
|
10228
|
+
}
|
|
10229
|
+
return "prerelease";
|
|
10230
|
+
};
|
|
10231
|
+
module2.exports = diff;
|
|
10232
|
+
}
|
|
10233
|
+
});
|
|
10234
|
+
|
|
10235
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js
|
|
10236
|
+
var require_major2 = __commonJS({
|
|
10237
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js"(exports, module2) {
|
|
10238
|
+
"use strict";
|
|
10239
|
+
init_esm_shims();
|
|
10240
|
+
var SemVer = require_semver3();
|
|
10241
|
+
var major2 = (a, loose) => new SemVer(a, loose).major;
|
|
10242
|
+
module2.exports = major2;
|
|
10243
|
+
}
|
|
10244
|
+
});
|
|
10245
|
+
|
|
10246
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js
|
|
10247
|
+
var require_minor2 = __commonJS({
|
|
10248
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js"(exports, module2) {
|
|
10249
|
+
"use strict";
|
|
10250
|
+
init_esm_shims();
|
|
10251
|
+
var SemVer = require_semver3();
|
|
10252
|
+
var minor2 = (a, loose) => new SemVer(a, loose).minor;
|
|
10253
|
+
module2.exports = minor2;
|
|
10254
|
+
}
|
|
10255
|
+
});
|
|
10256
|
+
|
|
10257
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js
|
|
10258
|
+
var require_patch2 = __commonJS({
|
|
10259
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js"(exports, module2) {
|
|
10260
|
+
"use strict";
|
|
10261
|
+
init_esm_shims();
|
|
10262
|
+
var SemVer = require_semver3();
|
|
10263
|
+
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
10264
|
+
module2.exports = patch;
|
|
10265
|
+
}
|
|
10266
|
+
});
|
|
10267
|
+
|
|
10268
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
|
|
10269
|
+
var require_prerelease2 = __commonJS({
|
|
10270
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports, module2) {
|
|
10271
|
+
"use strict";
|
|
10272
|
+
init_esm_shims();
|
|
10273
|
+
var parse = require_parse2();
|
|
10274
|
+
var prerelease = (version, options) => {
|
|
10275
|
+
const parsed = parse(version, options);
|
|
10276
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
10277
|
+
};
|
|
10278
|
+
module2.exports = prerelease;
|
|
10279
|
+
}
|
|
10280
|
+
});
|
|
10281
|
+
|
|
10282
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
|
|
10283
|
+
var require_compare2 = __commonJS({
|
|
10284
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports, module2) {
|
|
10285
|
+
"use strict";
|
|
10286
|
+
init_esm_shims();
|
|
10287
|
+
var SemVer = require_semver3();
|
|
10288
|
+
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
10289
|
+
module2.exports = compare;
|
|
10290
|
+
}
|
|
10291
|
+
});
|
|
10292
|
+
|
|
10293
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js
|
|
10294
|
+
var require_rcompare2 = __commonJS({
|
|
10295
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js"(exports, module2) {
|
|
10296
|
+
"use strict";
|
|
10297
|
+
init_esm_shims();
|
|
10298
|
+
var compare = require_compare2();
|
|
10299
|
+
var rcompare = (a, b, loose) => compare(b, a, loose);
|
|
10300
|
+
module2.exports = rcompare;
|
|
10301
|
+
}
|
|
10302
|
+
});
|
|
10303
|
+
|
|
10304
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js
|
|
10305
|
+
var require_compare_loose2 = __commonJS({
|
|
10306
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js"(exports, module2) {
|
|
10307
|
+
"use strict";
|
|
10308
|
+
init_esm_shims();
|
|
10309
|
+
var compare = require_compare2();
|
|
10310
|
+
var compareLoose = (a, b) => compare(a, b, true);
|
|
10311
|
+
module2.exports = compareLoose;
|
|
10312
|
+
}
|
|
10313
|
+
});
|
|
10314
|
+
|
|
10315
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js
|
|
10316
|
+
var require_compare_build2 = __commonJS({
|
|
10317
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js"(exports, module2) {
|
|
10318
|
+
"use strict";
|
|
10319
|
+
init_esm_shims();
|
|
10320
|
+
var SemVer = require_semver3();
|
|
10321
|
+
var compareBuild = (a, b, loose) => {
|
|
10322
|
+
const versionA = new SemVer(a, loose);
|
|
10323
|
+
const versionB = new SemVer(b, loose);
|
|
10324
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
10325
|
+
};
|
|
10326
|
+
module2.exports = compareBuild;
|
|
10327
|
+
}
|
|
10328
|
+
});
|
|
10329
|
+
|
|
10330
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js
|
|
10331
|
+
var require_sort2 = __commonJS({
|
|
10332
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js"(exports, module2) {
|
|
10333
|
+
"use strict";
|
|
10334
|
+
init_esm_shims();
|
|
10335
|
+
var compareBuild = require_compare_build2();
|
|
10336
|
+
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
10337
|
+
module2.exports = sort;
|
|
10338
|
+
}
|
|
10339
|
+
});
|
|
10340
|
+
|
|
10341
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js
|
|
10342
|
+
var require_rsort2 = __commonJS({
|
|
10343
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js"(exports, module2) {
|
|
10344
|
+
"use strict";
|
|
10345
|
+
init_esm_shims();
|
|
10346
|
+
var compareBuild = require_compare_build2();
|
|
10347
|
+
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
10348
|
+
module2.exports = rsort;
|
|
10349
|
+
}
|
|
10350
|
+
});
|
|
10351
|
+
|
|
10352
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
|
|
10353
|
+
var require_gt2 = __commonJS({
|
|
10354
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports, module2) {
|
|
10355
|
+
"use strict";
|
|
10356
|
+
init_esm_shims();
|
|
10357
|
+
var compare = require_compare2();
|
|
10358
|
+
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
10359
|
+
module2.exports = gt;
|
|
10360
|
+
}
|
|
10361
|
+
});
|
|
10362
|
+
|
|
10363
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
|
|
10364
|
+
var require_lt2 = __commonJS({
|
|
10365
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports, module2) {
|
|
10366
|
+
"use strict";
|
|
10367
|
+
init_esm_shims();
|
|
10368
|
+
var compare = require_compare2();
|
|
10369
|
+
var lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
10370
|
+
module2.exports = lt;
|
|
10371
|
+
}
|
|
10372
|
+
});
|
|
10373
|
+
|
|
10374
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
|
|
10375
|
+
var require_eq2 = __commonJS({
|
|
10376
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports, module2) {
|
|
10377
|
+
"use strict";
|
|
10378
|
+
init_esm_shims();
|
|
10379
|
+
var compare = require_compare2();
|
|
10380
|
+
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
10381
|
+
module2.exports = eq;
|
|
10382
|
+
}
|
|
10383
|
+
});
|
|
10384
|
+
|
|
10385
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
|
|
10386
|
+
var require_neq2 = __commonJS({
|
|
10387
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports, module2) {
|
|
10388
|
+
"use strict";
|
|
10389
|
+
init_esm_shims();
|
|
10390
|
+
var compare = require_compare2();
|
|
10391
|
+
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
10392
|
+
module2.exports = neq;
|
|
10393
|
+
}
|
|
10394
|
+
});
|
|
10395
|
+
|
|
10396
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
|
|
10397
|
+
var require_gte2 = __commonJS({
|
|
10398
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports, module2) {
|
|
10399
|
+
"use strict";
|
|
10400
|
+
init_esm_shims();
|
|
10401
|
+
var compare = require_compare2();
|
|
10402
|
+
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
10403
|
+
module2.exports = gte;
|
|
10404
|
+
}
|
|
10405
|
+
});
|
|
10406
|
+
|
|
10407
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
|
|
10408
|
+
var require_lte2 = __commonJS({
|
|
10409
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports, module2) {
|
|
10410
|
+
"use strict";
|
|
10411
|
+
init_esm_shims();
|
|
10412
|
+
var compare = require_compare2();
|
|
10413
|
+
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
10414
|
+
module2.exports = lte;
|
|
10415
|
+
}
|
|
10416
|
+
});
|
|
10417
|
+
|
|
10418
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
|
|
10419
|
+
var require_cmp2 = __commonJS({
|
|
10420
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports, module2) {
|
|
10421
|
+
"use strict";
|
|
10422
|
+
init_esm_shims();
|
|
10423
|
+
var eq = require_eq2();
|
|
10424
|
+
var neq = require_neq2();
|
|
10425
|
+
var gt = require_gt2();
|
|
10426
|
+
var gte = require_gte2();
|
|
10427
|
+
var lt = require_lt2();
|
|
10428
|
+
var lte = require_lte2();
|
|
10429
|
+
var cmp = (a, op, b, loose) => {
|
|
10430
|
+
switch (op) {
|
|
10431
|
+
case "===":
|
|
10432
|
+
if (typeof a === "object") {
|
|
10433
|
+
a = a.version;
|
|
10434
|
+
}
|
|
10435
|
+
if (typeof b === "object") {
|
|
10436
|
+
b = b.version;
|
|
10437
|
+
}
|
|
10438
|
+
return a === b;
|
|
10439
|
+
case "!==":
|
|
10440
|
+
if (typeof a === "object") {
|
|
10441
|
+
a = a.version;
|
|
10442
|
+
}
|
|
10443
|
+
if (typeof b === "object") {
|
|
10444
|
+
b = b.version;
|
|
10445
|
+
}
|
|
10446
|
+
return a !== b;
|
|
10447
|
+
case "":
|
|
10448
|
+
case "=":
|
|
10449
|
+
case "==":
|
|
10450
|
+
return eq(a, b, loose);
|
|
10451
|
+
case "!=":
|
|
10452
|
+
return neq(a, b, loose);
|
|
10453
|
+
case ">":
|
|
10454
|
+
return gt(a, b, loose);
|
|
10455
|
+
case ">=":
|
|
10456
|
+
return gte(a, b, loose);
|
|
10457
|
+
case "<":
|
|
10458
|
+
return lt(a, b, loose);
|
|
10459
|
+
case "<=":
|
|
10460
|
+
return lte(a, b, loose);
|
|
10461
|
+
default:
|
|
10462
|
+
throw new TypeError(`Invalid operator: ${op}`);
|
|
10463
|
+
}
|
|
10464
|
+
};
|
|
10465
|
+
module2.exports = cmp;
|
|
10466
|
+
}
|
|
10467
|
+
});
|
|
10468
|
+
|
|
10469
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
|
|
10470
|
+
var require_coerce2 = __commonJS({
|
|
10471
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports, module2) {
|
|
10472
|
+
"use strict";
|
|
10473
|
+
init_esm_shims();
|
|
10474
|
+
var SemVer = require_semver3();
|
|
10475
|
+
var parse = require_parse2();
|
|
10476
|
+
var { safeRe: re, t } = require_re2();
|
|
10477
|
+
var coerce = (version, options) => {
|
|
10478
|
+
if (version instanceof SemVer) {
|
|
10479
|
+
return version;
|
|
10480
|
+
}
|
|
10481
|
+
if (typeof version === "number") {
|
|
10482
|
+
version = String(version);
|
|
10483
|
+
}
|
|
10484
|
+
if (typeof version !== "string") {
|
|
10485
|
+
return null;
|
|
10486
|
+
}
|
|
10487
|
+
options = options || {};
|
|
10488
|
+
let match = null;
|
|
10489
|
+
if (!options.rtl) {
|
|
10490
|
+
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
10491
|
+
} else {
|
|
10492
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
10493
|
+
let next;
|
|
10494
|
+
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
10495
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
10496
|
+
match = next;
|
|
10497
|
+
}
|
|
10498
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
10499
|
+
}
|
|
10500
|
+
coerceRtlRegex.lastIndex = -1;
|
|
10501
|
+
}
|
|
10502
|
+
if (match === null) {
|
|
10503
|
+
return null;
|
|
10504
|
+
}
|
|
10505
|
+
const major2 = match[2];
|
|
10506
|
+
const minor2 = match[3] || "0";
|
|
10507
|
+
const patch = match[4] || "0";
|
|
10508
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
10509
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
10510
|
+
return parse(`${major2}.${minor2}.${patch}${prerelease}${build}`, options);
|
|
10511
|
+
};
|
|
10512
|
+
module2.exports = coerce;
|
|
10513
|
+
}
|
|
10514
|
+
});
|
|
10515
|
+
|
|
10516
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
|
|
10517
|
+
var require_lrucache = __commonJS({
|
|
10518
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports, module2) {
|
|
10519
|
+
"use strict";
|
|
10520
|
+
init_esm_shims();
|
|
10521
|
+
var LRUCache = class {
|
|
10522
|
+
constructor() {
|
|
10523
|
+
this.max = 1e3;
|
|
10524
|
+
this.map = /* @__PURE__ */ new Map();
|
|
10525
|
+
}
|
|
10526
|
+
get(key) {
|
|
10527
|
+
const value = this.map.get(key);
|
|
10528
|
+
if (value === void 0) {
|
|
10529
|
+
return void 0;
|
|
10530
|
+
} else {
|
|
10531
|
+
this.map.delete(key);
|
|
10532
|
+
this.map.set(key, value);
|
|
10533
|
+
return value;
|
|
10534
|
+
}
|
|
10535
|
+
}
|
|
10536
|
+
delete(key) {
|
|
10537
|
+
return this.map.delete(key);
|
|
10538
|
+
}
|
|
10539
|
+
set(key, value) {
|
|
10540
|
+
const deleted = this.delete(key);
|
|
10541
|
+
if (!deleted && value !== void 0) {
|
|
10542
|
+
if (this.map.size >= this.max) {
|
|
10543
|
+
const firstKey = this.map.keys().next().value;
|
|
10544
|
+
this.delete(firstKey);
|
|
10545
|
+
}
|
|
10546
|
+
this.map.set(key, value);
|
|
10547
|
+
}
|
|
10548
|
+
return this;
|
|
10549
|
+
}
|
|
10550
|
+
};
|
|
10551
|
+
module2.exports = LRUCache;
|
|
10552
|
+
}
|
|
10553
|
+
});
|
|
10554
|
+
|
|
10555
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
|
|
10556
|
+
var require_range2 = __commonJS({
|
|
10557
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports, module2) {
|
|
10558
|
+
"use strict";
|
|
10559
|
+
init_esm_shims();
|
|
10560
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
10561
|
+
var Range = class _Range {
|
|
10562
|
+
constructor(range, options) {
|
|
10563
|
+
options = parseOptions(options);
|
|
10564
|
+
if (range instanceof _Range) {
|
|
10565
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
10566
|
+
return range;
|
|
10567
|
+
} else {
|
|
10568
|
+
return new _Range(range.raw, options);
|
|
10569
|
+
}
|
|
10570
|
+
}
|
|
10571
|
+
if (range instanceof Comparator) {
|
|
10572
|
+
this.raw = range.value;
|
|
10573
|
+
this.set = [[range]];
|
|
10574
|
+
this.formatted = void 0;
|
|
10575
|
+
return this;
|
|
10576
|
+
}
|
|
10577
|
+
this.options = options;
|
|
10578
|
+
this.loose = !!options.loose;
|
|
10579
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
10580
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
10581
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
10582
|
+
if (!this.set.length) {
|
|
10583
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
10584
|
+
}
|
|
10585
|
+
if (this.set.length > 1) {
|
|
10586
|
+
const first = this.set[0];
|
|
10587
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
10588
|
+
if (this.set.length === 0) {
|
|
10589
|
+
this.set = [first];
|
|
10590
|
+
} else if (this.set.length > 1) {
|
|
10591
|
+
for (const c of this.set) {
|
|
10592
|
+
if (c.length === 1 && isAny(c[0])) {
|
|
10593
|
+
this.set = [c];
|
|
10594
|
+
break;
|
|
10595
|
+
}
|
|
10596
|
+
}
|
|
10597
|
+
}
|
|
10598
|
+
}
|
|
10599
|
+
this.formatted = void 0;
|
|
10600
|
+
}
|
|
10601
|
+
get range() {
|
|
10602
|
+
if (this.formatted === void 0) {
|
|
10603
|
+
this.formatted = "";
|
|
10604
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
10605
|
+
if (i > 0) {
|
|
10606
|
+
this.formatted += "||";
|
|
10607
|
+
}
|
|
10608
|
+
const comps = this.set[i];
|
|
10609
|
+
for (let k = 0; k < comps.length; k++) {
|
|
10610
|
+
if (k > 0) {
|
|
10611
|
+
this.formatted += " ";
|
|
10612
|
+
}
|
|
10613
|
+
this.formatted += comps[k].toString().trim();
|
|
10614
|
+
}
|
|
10615
|
+
}
|
|
10616
|
+
}
|
|
10617
|
+
return this.formatted;
|
|
10618
|
+
}
|
|
10619
|
+
format() {
|
|
10620
|
+
return this.range;
|
|
10621
|
+
}
|
|
10622
|
+
toString() {
|
|
10623
|
+
return this.range;
|
|
10624
|
+
}
|
|
10625
|
+
parseRange(range) {
|
|
10626
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
10627
|
+
const memoKey = memoOpts + ":" + range;
|
|
10628
|
+
const cached = cache.get(memoKey);
|
|
10629
|
+
if (cached) {
|
|
10630
|
+
return cached;
|
|
10631
|
+
}
|
|
10632
|
+
const loose = this.options.loose;
|
|
10633
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
10634
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
10635
|
+
debug2("hyphen replace", range);
|
|
10636
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
10637
|
+
debug2("comparator trim", range);
|
|
10638
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
10639
|
+
debug2("tilde trim", range);
|
|
10640
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
10641
|
+
debug2("caret trim", range);
|
|
10642
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
10643
|
+
if (loose) {
|
|
10644
|
+
rangeList = rangeList.filter((comp) => {
|
|
10645
|
+
debug2("loose invalid filter", comp, this.options);
|
|
10646
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
10647
|
+
});
|
|
10648
|
+
}
|
|
10649
|
+
debug2("range list", rangeList);
|
|
10650
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
10651
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
10652
|
+
for (const comp of comparators) {
|
|
10653
|
+
if (isNullSet(comp)) {
|
|
10654
|
+
return [comp];
|
|
10655
|
+
}
|
|
10656
|
+
rangeMap.set(comp.value, comp);
|
|
10657
|
+
}
|
|
10658
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
10659
|
+
rangeMap.delete("");
|
|
10660
|
+
}
|
|
10661
|
+
const result = [...rangeMap.values()];
|
|
10662
|
+
cache.set(memoKey, result);
|
|
10663
|
+
return result;
|
|
10664
|
+
}
|
|
10665
|
+
intersects(range, options) {
|
|
10666
|
+
if (!(range instanceof _Range)) {
|
|
10667
|
+
throw new TypeError("a Range is required");
|
|
10668
|
+
}
|
|
10669
|
+
return this.set.some((thisComparators) => {
|
|
10670
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
10671
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
10672
|
+
return rangeComparators.every((rangeComparator) => {
|
|
10673
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
10674
|
+
});
|
|
10675
|
+
});
|
|
10676
|
+
});
|
|
10677
|
+
});
|
|
10678
|
+
}
|
|
10679
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
10680
|
+
test(version) {
|
|
10681
|
+
if (!version) {
|
|
10682
|
+
return false;
|
|
10683
|
+
}
|
|
10684
|
+
if (typeof version === "string") {
|
|
10685
|
+
try {
|
|
10686
|
+
version = new SemVer(version, this.options);
|
|
10687
|
+
} catch (er) {
|
|
10688
|
+
return false;
|
|
10689
|
+
}
|
|
10690
|
+
}
|
|
10691
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
10692
|
+
if (testSet(this.set[i], version, this.options)) {
|
|
10693
|
+
return true;
|
|
10694
|
+
}
|
|
10695
|
+
}
|
|
10696
|
+
return false;
|
|
10697
|
+
}
|
|
10698
|
+
};
|
|
10699
|
+
module2.exports = Range;
|
|
10700
|
+
var LRU = require_lrucache();
|
|
10701
|
+
var cache = new LRU();
|
|
10702
|
+
var parseOptions = require_parse_options2();
|
|
10703
|
+
var Comparator = require_comparator2();
|
|
10704
|
+
var debug2 = require_debug2();
|
|
10705
|
+
var SemVer = require_semver3();
|
|
10706
|
+
var {
|
|
10707
|
+
safeRe: re,
|
|
10708
|
+
t,
|
|
10709
|
+
comparatorTrimReplace,
|
|
10710
|
+
tildeTrimReplace,
|
|
10711
|
+
caretTrimReplace
|
|
10712
|
+
} = require_re2();
|
|
10713
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants2();
|
|
10714
|
+
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
10715
|
+
var isAny = (c) => c.value === "";
|
|
10716
|
+
var isSatisfiable = (comparators, options) => {
|
|
10717
|
+
let result = true;
|
|
10718
|
+
const remainingComparators = comparators.slice();
|
|
10719
|
+
let testComparator = remainingComparators.pop();
|
|
10720
|
+
while (result && remainingComparators.length) {
|
|
10721
|
+
result = remainingComparators.every((otherComparator) => {
|
|
10722
|
+
return testComparator.intersects(otherComparator, options);
|
|
10723
|
+
});
|
|
10724
|
+
testComparator = remainingComparators.pop();
|
|
10725
|
+
}
|
|
10726
|
+
return result;
|
|
10727
|
+
};
|
|
10728
|
+
var parseComparator = (comp, options) => {
|
|
10729
|
+
comp = comp.replace(re[t.BUILD], "");
|
|
10730
|
+
debug2("comp", comp, options);
|
|
10731
|
+
comp = replaceCarets(comp, options);
|
|
10732
|
+
debug2("caret", comp);
|
|
10733
|
+
comp = replaceTildes(comp, options);
|
|
10734
|
+
debug2("tildes", comp);
|
|
10735
|
+
comp = replaceXRanges(comp, options);
|
|
10736
|
+
debug2("xrange", comp);
|
|
10737
|
+
comp = replaceStars(comp, options);
|
|
10738
|
+
debug2("stars", comp);
|
|
10739
|
+
return comp;
|
|
10740
|
+
};
|
|
10741
|
+
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
10742
|
+
var replaceTildes = (comp, options) => {
|
|
10743
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
10744
|
+
};
|
|
10745
|
+
var replaceTilde = (comp, options) => {
|
|
10746
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
10747
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
10748
|
+
debug2("tilde", comp, _, M, m, p, pr);
|
|
10749
|
+
let ret;
|
|
10750
|
+
if (isX(M)) {
|
|
10751
|
+
ret = "";
|
|
10752
|
+
} else if (isX(m)) {
|
|
10753
|
+
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
10754
|
+
} else if (isX(p)) {
|
|
10755
|
+
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
10756
|
+
} else if (pr) {
|
|
10757
|
+
debug2("replaceTilde pr", pr);
|
|
10758
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
10759
|
+
} else {
|
|
10760
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
10761
|
+
}
|
|
10762
|
+
debug2("tilde return", ret);
|
|
10763
|
+
return ret;
|
|
10764
|
+
});
|
|
10765
|
+
};
|
|
10766
|
+
var replaceCarets = (comp, options) => {
|
|
10767
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
10768
|
+
};
|
|
10769
|
+
var replaceCaret = (comp, options) => {
|
|
10770
|
+
debug2("caret", comp, options);
|
|
10771
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
10772
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
10773
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
10774
|
+
debug2("caret", comp, _, M, m, p, pr);
|
|
10775
|
+
let ret;
|
|
10776
|
+
if (isX(M)) {
|
|
10777
|
+
ret = "";
|
|
10778
|
+
} else if (isX(m)) {
|
|
10779
|
+
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
10780
|
+
} else if (isX(p)) {
|
|
10781
|
+
if (M === "0") {
|
|
10782
|
+
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
10783
|
+
} else {
|
|
10784
|
+
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
10785
|
+
}
|
|
10786
|
+
} else if (pr) {
|
|
10787
|
+
debug2("replaceCaret pr", pr);
|
|
10788
|
+
if (M === "0") {
|
|
10789
|
+
if (m === "0") {
|
|
10790
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
10791
|
+
} else {
|
|
10792
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
10793
|
+
}
|
|
10794
|
+
} else {
|
|
10795
|
+
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
10796
|
+
}
|
|
10797
|
+
} else {
|
|
10798
|
+
debug2("no pr");
|
|
10799
|
+
if (M === "0") {
|
|
10800
|
+
if (m === "0") {
|
|
10801
|
+
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
10802
|
+
} else {
|
|
10803
|
+
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
10804
|
+
}
|
|
10805
|
+
} else {
|
|
10806
|
+
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
10807
|
+
}
|
|
10808
|
+
}
|
|
10809
|
+
debug2("caret return", ret);
|
|
10810
|
+
return ret;
|
|
10811
|
+
});
|
|
10812
|
+
};
|
|
10813
|
+
var replaceXRanges = (comp, options) => {
|
|
10814
|
+
debug2("replaceXRanges", comp, options);
|
|
10815
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
10816
|
+
};
|
|
10817
|
+
var replaceXRange = (comp, options) => {
|
|
10818
|
+
comp = comp.trim();
|
|
10819
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
10820
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
10821
|
+
debug2("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
10822
|
+
const xM = isX(M);
|
|
10823
|
+
const xm = xM || isX(m);
|
|
10824
|
+
const xp = xm || isX(p);
|
|
10825
|
+
const anyX = xp;
|
|
10826
|
+
if (gtlt === "=" && anyX) {
|
|
10827
|
+
gtlt = "";
|
|
10828
|
+
}
|
|
10829
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
10830
|
+
if (xM) {
|
|
10831
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
10832
|
+
ret = "<0.0.0-0";
|
|
10833
|
+
} else {
|
|
10834
|
+
ret = "*";
|
|
10835
|
+
}
|
|
10836
|
+
} else if (gtlt && anyX) {
|
|
10837
|
+
if (xm) {
|
|
10838
|
+
m = 0;
|
|
10839
|
+
}
|
|
10840
|
+
p = 0;
|
|
10841
|
+
if (gtlt === ">") {
|
|
10842
|
+
gtlt = ">=";
|
|
10843
|
+
if (xm) {
|
|
10844
|
+
M = +M + 1;
|
|
10845
|
+
m = 0;
|
|
10846
|
+
p = 0;
|
|
10847
|
+
} else {
|
|
10848
|
+
m = +m + 1;
|
|
10849
|
+
p = 0;
|
|
10850
|
+
}
|
|
10851
|
+
} else if (gtlt === "<=") {
|
|
10852
|
+
gtlt = "<";
|
|
10853
|
+
if (xm) {
|
|
10854
|
+
M = +M + 1;
|
|
10855
|
+
} else {
|
|
10856
|
+
m = +m + 1;
|
|
10857
|
+
}
|
|
10858
|
+
}
|
|
10859
|
+
if (gtlt === "<") {
|
|
10860
|
+
pr = "-0";
|
|
10861
|
+
}
|
|
10862
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
10863
|
+
} else if (xm) {
|
|
10864
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
10865
|
+
} else if (xp) {
|
|
10866
|
+
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
10867
|
+
}
|
|
10868
|
+
debug2("xRange return", ret);
|
|
10869
|
+
return ret;
|
|
10870
|
+
});
|
|
10871
|
+
};
|
|
10872
|
+
var replaceStars = (comp, options) => {
|
|
10873
|
+
debug2("replaceStars", comp, options);
|
|
10874
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
10875
|
+
};
|
|
10876
|
+
var replaceGTE0 = (comp, options) => {
|
|
10877
|
+
debug2("replaceGTE0", comp, options);
|
|
10878
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
10879
|
+
};
|
|
10880
|
+
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
10881
|
+
if (isX(fM)) {
|
|
10882
|
+
from = "";
|
|
10883
|
+
} else if (isX(fm)) {
|
|
10884
|
+
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
10885
|
+
} else if (isX(fp)) {
|
|
10886
|
+
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
10887
|
+
} else if (fpr) {
|
|
10888
|
+
from = `>=${from}`;
|
|
10889
|
+
} else {
|
|
10890
|
+
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
10891
|
+
}
|
|
10892
|
+
if (isX(tM)) {
|
|
10893
|
+
to = "";
|
|
10894
|
+
} else if (isX(tm)) {
|
|
10895
|
+
to = `<${+tM + 1}.0.0-0`;
|
|
10896
|
+
} else if (isX(tp)) {
|
|
10897
|
+
to = `<${tM}.${+tm + 1}.0-0`;
|
|
10898
|
+
} else if (tpr) {
|
|
10899
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
10900
|
+
} else if (incPr) {
|
|
10901
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
10902
|
+
} else {
|
|
10903
|
+
to = `<=${to}`;
|
|
10904
|
+
}
|
|
10905
|
+
return `${from} ${to}`.trim();
|
|
10906
|
+
};
|
|
10907
|
+
var testSet = (set, version, options) => {
|
|
10908
|
+
for (let i = 0; i < set.length; i++) {
|
|
10909
|
+
if (!set[i].test(version)) {
|
|
10910
|
+
return false;
|
|
10911
|
+
}
|
|
10912
|
+
}
|
|
10913
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
|
10914
|
+
for (let i = 0; i < set.length; i++) {
|
|
10915
|
+
debug2(set[i].semver);
|
|
10916
|
+
if (set[i].semver === Comparator.ANY) {
|
|
10917
|
+
continue;
|
|
10918
|
+
}
|
|
10919
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
10920
|
+
const allowed = set[i].semver;
|
|
10921
|
+
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
|
10922
|
+
return true;
|
|
10923
|
+
}
|
|
10924
|
+
}
|
|
10925
|
+
}
|
|
10926
|
+
return false;
|
|
10927
|
+
}
|
|
10928
|
+
return true;
|
|
10929
|
+
};
|
|
10930
|
+
}
|
|
10931
|
+
});
|
|
10932
|
+
|
|
10933
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
|
|
10934
|
+
var require_comparator2 = __commonJS({
|
|
10935
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports, module2) {
|
|
10936
|
+
"use strict";
|
|
10937
|
+
init_esm_shims();
|
|
10938
|
+
var ANY = Symbol("SemVer ANY");
|
|
10939
|
+
var Comparator = class _Comparator {
|
|
10940
|
+
static get ANY() {
|
|
10941
|
+
return ANY;
|
|
10942
|
+
}
|
|
10943
|
+
constructor(comp, options) {
|
|
10944
|
+
options = parseOptions(options);
|
|
10945
|
+
if (comp instanceof _Comparator) {
|
|
10946
|
+
if (comp.loose === !!options.loose) {
|
|
10947
|
+
return comp;
|
|
10948
|
+
} else {
|
|
10949
|
+
comp = comp.value;
|
|
10950
|
+
}
|
|
10951
|
+
}
|
|
10952
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
10953
|
+
debug2("comparator", comp, options);
|
|
10954
|
+
this.options = options;
|
|
10955
|
+
this.loose = !!options.loose;
|
|
10956
|
+
this.parse(comp);
|
|
10957
|
+
if (this.semver === ANY) {
|
|
10958
|
+
this.value = "";
|
|
10959
|
+
} else {
|
|
10960
|
+
this.value = this.operator + this.semver.version;
|
|
10961
|
+
}
|
|
10962
|
+
debug2("comp", this);
|
|
10963
|
+
}
|
|
10964
|
+
parse(comp) {
|
|
10965
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
10966
|
+
const m = comp.match(r);
|
|
10967
|
+
if (!m) {
|
|
10968
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
10969
|
+
}
|
|
10970
|
+
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
10971
|
+
if (this.operator === "=") {
|
|
10972
|
+
this.operator = "";
|
|
10973
|
+
}
|
|
10974
|
+
if (!m[2]) {
|
|
10975
|
+
this.semver = ANY;
|
|
10976
|
+
} else {
|
|
10977
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
|
10978
|
+
}
|
|
10979
|
+
}
|
|
10980
|
+
toString() {
|
|
10981
|
+
return this.value;
|
|
10982
|
+
}
|
|
10983
|
+
test(version) {
|
|
10984
|
+
debug2("Comparator.test", version, this.options.loose);
|
|
10985
|
+
if (this.semver === ANY || version === ANY) {
|
|
10986
|
+
return true;
|
|
10987
|
+
}
|
|
10988
|
+
if (typeof version === "string") {
|
|
10989
|
+
try {
|
|
10990
|
+
version = new SemVer(version, this.options);
|
|
10991
|
+
} catch (er) {
|
|
10992
|
+
return false;
|
|
10993
|
+
}
|
|
10994
|
+
}
|
|
10995
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
10996
|
+
}
|
|
10997
|
+
intersects(comp, options) {
|
|
10998
|
+
if (!(comp instanceof _Comparator)) {
|
|
10999
|
+
throw new TypeError("a Comparator is required");
|
|
11000
|
+
}
|
|
11001
|
+
if (this.operator === "") {
|
|
11002
|
+
if (this.value === "") {
|
|
11003
|
+
return true;
|
|
11004
|
+
}
|
|
11005
|
+
return new Range(comp.value, options).test(this.value);
|
|
11006
|
+
} else if (comp.operator === "") {
|
|
11007
|
+
if (comp.value === "") {
|
|
11008
|
+
return true;
|
|
11009
|
+
}
|
|
11010
|
+
return new Range(this.value, options).test(comp.semver);
|
|
11011
|
+
}
|
|
11012
|
+
options = parseOptions(options);
|
|
11013
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
11014
|
+
return false;
|
|
11015
|
+
}
|
|
11016
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
11017
|
+
return false;
|
|
11018
|
+
}
|
|
11019
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
11020
|
+
return true;
|
|
11021
|
+
}
|
|
11022
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
11023
|
+
return true;
|
|
11024
|
+
}
|
|
11025
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
11026
|
+
return true;
|
|
11027
|
+
}
|
|
11028
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
11029
|
+
return true;
|
|
11030
|
+
}
|
|
11031
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
11032
|
+
return true;
|
|
11033
|
+
}
|
|
11034
|
+
return false;
|
|
11035
|
+
}
|
|
11036
|
+
};
|
|
11037
|
+
module2.exports = Comparator;
|
|
11038
|
+
var parseOptions = require_parse_options2();
|
|
11039
|
+
var { safeRe: re, t } = require_re2();
|
|
11040
|
+
var cmp = require_cmp2();
|
|
11041
|
+
var debug2 = require_debug2();
|
|
11042
|
+
var SemVer = require_semver3();
|
|
11043
|
+
var Range = require_range2();
|
|
11044
|
+
}
|
|
11045
|
+
});
|
|
11046
|
+
|
|
11047
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
|
|
11048
|
+
var require_satisfies2 = __commonJS({
|
|
11049
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports, module2) {
|
|
11050
|
+
"use strict";
|
|
11051
|
+
init_esm_shims();
|
|
11052
|
+
var Range = require_range2();
|
|
11053
|
+
var satisfies = (version, range, options) => {
|
|
11054
|
+
try {
|
|
11055
|
+
range = new Range(range, options);
|
|
11056
|
+
} catch (er) {
|
|
11057
|
+
return false;
|
|
11058
|
+
}
|
|
11059
|
+
return range.test(version);
|
|
11060
|
+
};
|
|
11061
|
+
module2.exports = satisfies;
|
|
11062
|
+
}
|
|
11063
|
+
});
|
|
11064
|
+
|
|
11065
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js
|
|
11066
|
+
var require_to_comparators2 = __commonJS({
|
|
11067
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js"(exports, module2) {
|
|
11068
|
+
"use strict";
|
|
11069
|
+
init_esm_shims();
|
|
11070
|
+
var Range = require_range2();
|
|
11071
|
+
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
11072
|
+
module2.exports = toComparators;
|
|
11073
|
+
}
|
|
11074
|
+
});
|
|
11075
|
+
|
|
11076
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js
|
|
11077
|
+
var require_max_satisfying2 = __commonJS({
|
|
11078
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
|
|
11079
|
+
"use strict";
|
|
11080
|
+
init_esm_shims();
|
|
11081
|
+
var SemVer = require_semver3();
|
|
11082
|
+
var Range = require_range2();
|
|
11083
|
+
var maxSatisfying = (versions, range, options) => {
|
|
11084
|
+
let max = null;
|
|
11085
|
+
let maxSV = null;
|
|
11086
|
+
let rangeObj = null;
|
|
11087
|
+
try {
|
|
11088
|
+
rangeObj = new Range(range, options);
|
|
11089
|
+
} catch (er) {
|
|
11090
|
+
return null;
|
|
11091
|
+
}
|
|
11092
|
+
versions.forEach((v) => {
|
|
11093
|
+
if (rangeObj.test(v)) {
|
|
11094
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
11095
|
+
max = v;
|
|
11096
|
+
maxSV = new SemVer(max, options);
|
|
11097
|
+
}
|
|
11098
|
+
}
|
|
11099
|
+
});
|
|
11100
|
+
return max;
|
|
11101
|
+
};
|
|
11102
|
+
module2.exports = maxSatisfying;
|
|
11103
|
+
}
|
|
11104
|
+
});
|
|
11105
|
+
|
|
11106
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js
|
|
11107
|
+
var require_min_satisfying2 = __commonJS({
|
|
11108
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
|
|
11109
|
+
"use strict";
|
|
11110
|
+
init_esm_shims();
|
|
11111
|
+
var SemVer = require_semver3();
|
|
11112
|
+
var Range = require_range2();
|
|
11113
|
+
var minSatisfying = (versions, range, options) => {
|
|
11114
|
+
let min = null;
|
|
11115
|
+
let minSV = null;
|
|
11116
|
+
let rangeObj = null;
|
|
11117
|
+
try {
|
|
11118
|
+
rangeObj = new Range(range, options);
|
|
11119
|
+
} catch (er) {
|
|
11120
|
+
return null;
|
|
11121
|
+
}
|
|
11122
|
+
versions.forEach((v) => {
|
|
11123
|
+
if (rangeObj.test(v)) {
|
|
11124
|
+
if (!min || minSV.compare(v) === 1) {
|
|
11125
|
+
min = v;
|
|
11126
|
+
minSV = new SemVer(min, options);
|
|
11127
|
+
}
|
|
11128
|
+
}
|
|
11129
|
+
});
|
|
11130
|
+
return min;
|
|
11131
|
+
};
|
|
11132
|
+
module2.exports = minSatisfying;
|
|
11133
|
+
}
|
|
11134
|
+
});
|
|
11135
|
+
|
|
11136
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js
|
|
11137
|
+
var require_min_version2 = __commonJS({
|
|
11138
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js"(exports, module2) {
|
|
11139
|
+
"use strict";
|
|
11140
|
+
init_esm_shims();
|
|
11141
|
+
var SemVer = require_semver3();
|
|
11142
|
+
var Range = require_range2();
|
|
11143
|
+
var gt = require_gt2();
|
|
11144
|
+
var minVersion = (range, loose) => {
|
|
11145
|
+
range = new Range(range, loose);
|
|
11146
|
+
let minver = new SemVer("0.0.0");
|
|
11147
|
+
if (range.test(minver)) {
|
|
11148
|
+
return minver;
|
|
11149
|
+
}
|
|
11150
|
+
minver = new SemVer("0.0.0-0");
|
|
11151
|
+
if (range.test(minver)) {
|
|
11152
|
+
return minver;
|
|
11153
|
+
}
|
|
11154
|
+
minver = null;
|
|
11155
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
11156
|
+
const comparators = range.set[i];
|
|
11157
|
+
let setMin = null;
|
|
11158
|
+
comparators.forEach((comparator) => {
|
|
11159
|
+
const compver = new SemVer(comparator.semver.version);
|
|
11160
|
+
switch (comparator.operator) {
|
|
11161
|
+
case ">":
|
|
11162
|
+
if (compver.prerelease.length === 0) {
|
|
11163
|
+
compver.patch++;
|
|
11164
|
+
} else {
|
|
11165
|
+
compver.prerelease.push(0);
|
|
11166
|
+
}
|
|
11167
|
+
compver.raw = compver.format();
|
|
11168
|
+
/* fallthrough */
|
|
11169
|
+
case "":
|
|
11170
|
+
case ">=":
|
|
11171
|
+
if (!setMin || gt(compver, setMin)) {
|
|
11172
|
+
setMin = compver;
|
|
11173
|
+
}
|
|
11174
|
+
break;
|
|
11175
|
+
case "<":
|
|
11176
|
+
case "<=":
|
|
11177
|
+
break;
|
|
11178
|
+
/* istanbul ignore next */
|
|
11179
|
+
default:
|
|
11180
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
11181
|
+
}
|
|
11182
|
+
});
|
|
11183
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
11184
|
+
minver = setMin;
|
|
11185
|
+
}
|
|
11186
|
+
}
|
|
11187
|
+
if (minver && range.test(minver)) {
|
|
11188
|
+
return minver;
|
|
11189
|
+
}
|
|
11190
|
+
return null;
|
|
11191
|
+
};
|
|
11192
|
+
module2.exports = minVersion;
|
|
11193
|
+
}
|
|
11194
|
+
});
|
|
11195
|
+
|
|
11196
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js
|
|
11197
|
+
var require_valid4 = __commonJS({
|
|
11198
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js"(exports, module2) {
|
|
11199
|
+
"use strict";
|
|
11200
|
+
init_esm_shims();
|
|
11201
|
+
var Range = require_range2();
|
|
11202
|
+
var validRange = (range, options) => {
|
|
11203
|
+
try {
|
|
11204
|
+
return new Range(range, options).range || "*";
|
|
11205
|
+
} catch (er) {
|
|
11206
|
+
return null;
|
|
11207
|
+
}
|
|
11208
|
+
};
|
|
11209
|
+
module2.exports = validRange;
|
|
11210
|
+
}
|
|
11211
|
+
});
|
|
11212
|
+
|
|
11213
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js
|
|
11214
|
+
var require_outside2 = __commonJS({
|
|
11215
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js"(exports, module2) {
|
|
11216
|
+
"use strict";
|
|
11217
|
+
init_esm_shims();
|
|
11218
|
+
var SemVer = require_semver3();
|
|
11219
|
+
var Comparator = require_comparator2();
|
|
11220
|
+
var { ANY } = Comparator;
|
|
11221
|
+
var Range = require_range2();
|
|
11222
|
+
var satisfies = require_satisfies2();
|
|
11223
|
+
var gt = require_gt2();
|
|
11224
|
+
var lt = require_lt2();
|
|
11225
|
+
var lte = require_lte2();
|
|
11226
|
+
var gte = require_gte2();
|
|
11227
|
+
var outside = (version, range, hilo, options) => {
|
|
11228
|
+
version = new SemVer(version, options);
|
|
11229
|
+
range = new Range(range, options);
|
|
11230
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
11231
|
+
switch (hilo) {
|
|
11232
|
+
case ">":
|
|
11233
|
+
gtfn = gt;
|
|
11234
|
+
ltefn = lte;
|
|
11235
|
+
ltfn = lt;
|
|
11236
|
+
comp = ">";
|
|
11237
|
+
ecomp = ">=";
|
|
11238
|
+
break;
|
|
11239
|
+
case "<":
|
|
11240
|
+
gtfn = lt;
|
|
11241
|
+
ltefn = gte;
|
|
11242
|
+
ltfn = gt;
|
|
11243
|
+
comp = "<";
|
|
11244
|
+
ecomp = "<=";
|
|
11245
|
+
break;
|
|
11246
|
+
default:
|
|
11247
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
11248
|
+
}
|
|
11249
|
+
if (satisfies(version, range, options)) {
|
|
11250
|
+
return false;
|
|
11251
|
+
}
|
|
11252
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
11253
|
+
const comparators = range.set[i];
|
|
11254
|
+
let high = null;
|
|
11255
|
+
let low = null;
|
|
11256
|
+
comparators.forEach((comparator) => {
|
|
11257
|
+
if (comparator.semver === ANY) {
|
|
11258
|
+
comparator = new Comparator(">=0.0.0");
|
|
11259
|
+
}
|
|
11260
|
+
high = high || comparator;
|
|
11261
|
+
low = low || comparator;
|
|
11262
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
11263
|
+
high = comparator;
|
|
11264
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
11265
|
+
low = comparator;
|
|
11266
|
+
}
|
|
11267
|
+
});
|
|
11268
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
11269
|
+
return false;
|
|
11270
|
+
}
|
|
11271
|
+
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
|
11272
|
+
return false;
|
|
11273
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
11274
|
+
return false;
|
|
11275
|
+
}
|
|
11276
|
+
}
|
|
11277
|
+
return true;
|
|
11278
|
+
};
|
|
11279
|
+
module2.exports = outside;
|
|
11280
|
+
}
|
|
11281
|
+
});
|
|
11282
|
+
|
|
11283
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js
|
|
11284
|
+
var require_gtr2 = __commonJS({
|
|
11285
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js"(exports, module2) {
|
|
11286
|
+
"use strict";
|
|
11287
|
+
init_esm_shims();
|
|
11288
|
+
var outside = require_outside2();
|
|
11289
|
+
var gtr = (version, range, options) => outside(version, range, ">", options);
|
|
11290
|
+
module2.exports = gtr;
|
|
11291
|
+
}
|
|
11292
|
+
});
|
|
11293
|
+
|
|
11294
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js
|
|
11295
|
+
var require_ltr2 = __commonJS({
|
|
11296
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js"(exports, module2) {
|
|
11297
|
+
"use strict";
|
|
11298
|
+
init_esm_shims();
|
|
11299
|
+
var outside = require_outside2();
|
|
11300
|
+
var ltr = (version, range, options) => outside(version, range, "<", options);
|
|
11301
|
+
module2.exports = ltr;
|
|
11302
|
+
}
|
|
11303
|
+
});
|
|
11304
|
+
|
|
11305
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js
|
|
11306
|
+
var require_intersects2 = __commonJS({
|
|
11307
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js"(exports, module2) {
|
|
11308
|
+
"use strict";
|
|
11309
|
+
init_esm_shims();
|
|
11310
|
+
var Range = require_range2();
|
|
11311
|
+
var intersects = (r1, r2, options) => {
|
|
11312
|
+
r1 = new Range(r1, options);
|
|
11313
|
+
r2 = new Range(r2, options);
|
|
11314
|
+
return r1.intersects(r2, options);
|
|
11315
|
+
};
|
|
11316
|
+
module2.exports = intersects;
|
|
11317
|
+
}
|
|
11318
|
+
});
|
|
11319
|
+
|
|
11320
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js
|
|
11321
|
+
var require_simplify2 = __commonJS({
|
|
11322
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js"(exports, module2) {
|
|
11323
|
+
"use strict";
|
|
11324
|
+
init_esm_shims();
|
|
11325
|
+
var satisfies = require_satisfies2();
|
|
11326
|
+
var compare = require_compare2();
|
|
11327
|
+
module2.exports = (versions, range, options) => {
|
|
11328
|
+
const set = [];
|
|
11329
|
+
let first = null;
|
|
11330
|
+
let prev = null;
|
|
11331
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
11332
|
+
for (const version of v) {
|
|
11333
|
+
const included = satisfies(version, range, options);
|
|
11334
|
+
if (included) {
|
|
11335
|
+
prev = version;
|
|
11336
|
+
if (!first) {
|
|
11337
|
+
first = version;
|
|
11338
|
+
}
|
|
11339
|
+
} else {
|
|
11340
|
+
if (prev) {
|
|
11341
|
+
set.push([first, prev]);
|
|
11342
|
+
}
|
|
11343
|
+
prev = null;
|
|
11344
|
+
first = null;
|
|
11345
|
+
}
|
|
11346
|
+
}
|
|
11347
|
+
if (first) {
|
|
11348
|
+
set.push([first, null]);
|
|
11349
|
+
}
|
|
11350
|
+
const ranges = [];
|
|
11351
|
+
for (const [min, max] of set) {
|
|
11352
|
+
if (min === max) {
|
|
11353
|
+
ranges.push(min);
|
|
11354
|
+
} else if (!max && min === v[0]) {
|
|
11355
|
+
ranges.push("*");
|
|
11356
|
+
} else if (!max) {
|
|
11357
|
+
ranges.push(`>=${min}`);
|
|
11358
|
+
} else if (min === v[0]) {
|
|
11359
|
+
ranges.push(`<=${max}`);
|
|
11360
|
+
} else {
|
|
11361
|
+
ranges.push(`${min} - ${max}`);
|
|
11362
|
+
}
|
|
11363
|
+
}
|
|
11364
|
+
const simplified = ranges.join(" || ");
|
|
11365
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
11366
|
+
return simplified.length < original.length ? simplified : range;
|
|
11367
|
+
};
|
|
11368
|
+
}
|
|
11369
|
+
});
|
|
11370
|
+
|
|
11371
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js
|
|
11372
|
+
var require_subset2 = __commonJS({
|
|
11373
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js"(exports, module2) {
|
|
11374
|
+
"use strict";
|
|
11375
|
+
init_esm_shims();
|
|
11376
|
+
var Range = require_range2();
|
|
11377
|
+
var Comparator = require_comparator2();
|
|
11378
|
+
var { ANY } = Comparator;
|
|
11379
|
+
var satisfies = require_satisfies2();
|
|
11380
|
+
var compare = require_compare2();
|
|
11381
|
+
var subset = (sub, dom, options = {}) => {
|
|
11382
|
+
if (sub === dom) {
|
|
11383
|
+
return true;
|
|
11384
|
+
}
|
|
11385
|
+
sub = new Range(sub, options);
|
|
11386
|
+
dom = new Range(dom, options);
|
|
11387
|
+
let sawNonNull = false;
|
|
11388
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
11389
|
+
for (const simpleDom of dom.set) {
|
|
11390
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
11391
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
11392
|
+
if (isSub) {
|
|
11393
|
+
continue OUTER;
|
|
11394
|
+
}
|
|
11395
|
+
}
|
|
11396
|
+
if (sawNonNull) {
|
|
11397
|
+
return false;
|
|
11398
|
+
}
|
|
11399
|
+
}
|
|
11400
|
+
return true;
|
|
11401
|
+
};
|
|
11402
|
+
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
11403
|
+
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
11404
|
+
var simpleSubset = (sub, dom, options) => {
|
|
11405
|
+
if (sub === dom) {
|
|
11406
|
+
return true;
|
|
11407
|
+
}
|
|
11408
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
11409
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
11410
|
+
return true;
|
|
11411
|
+
} else if (options.includePrerelease) {
|
|
11412
|
+
sub = minimumVersionWithPreRelease;
|
|
11413
|
+
} else {
|
|
11414
|
+
sub = minimumVersion;
|
|
11415
|
+
}
|
|
11416
|
+
}
|
|
11417
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
11418
|
+
if (options.includePrerelease) {
|
|
11419
|
+
return true;
|
|
11420
|
+
} else {
|
|
11421
|
+
dom = minimumVersion;
|
|
11422
|
+
}
|
|
11423
|
+
}
|
|
11424
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
11425
|
+
let gt, lt;
|
|
11426
|
+
for (const c of sub) {
|
|
11427
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
11428
|
+
gt = higherGT(gt, c, options);
|
|
11429
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
|
11430
|
+
lt = lowerLT(lt, c, options);
|
|
11431
|
+
} else {
|
|
11432
|
+
eqSet.add(c.semver);
|
|
11433
|
+
}
|
|
11434
|
+
}
|
|
11435
|
+
if (eqSet.size > 1) {
|
|
11436
|
+
return null;
|
|
11437
|
+
}
|
|
11438
|
+
let gtltComp;
|
|
11439
|
+
if (gt && lt) {
|
|
11440
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
11441
|
+
if (gtltComp > 0) {
|
|
11442
|
+
return null;
|
|
11443
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
11444
|
+
return null;
|
|
11445
|
+
}
|
|
11446
|
+
}
|
|
11447
|
+
for (const eq of eqSet) {
|
|
11448
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
11449
|
+
return null;
|
|
11450
|
+
}
|
|
11451
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
11452
|
+
return null;
|
|
11453
|
+
}
|
|
11454
|
+
for (const c of dom) {
|
|
11455
|
+
if (!satisfies(eq, String(c), options)) {
|
|
11456
|
+
return false;
|
|
11457
|
+
}
|
|
11458
|
+
}
|
|
11459
|
+
return true;
|
|
11460
|
+
}
|
|
11461
|
+
let higher, lower;
|
|
11462
|
+
let hasDomLT, hasDomGT;
|
|
11463
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
11464
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
11465
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
11466
|
+
needDomLTPre = false;
|
|
11467
|
+
}
|
|
11468
|
+
for (const c of dom) {
|
|
11469
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
11470
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
11471
|
+
if (gt) {
|
|
11472
|
+
if (needDomGTPre) {
|
|
11473
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
11474
|
+
needDomGTPre = false;
|
|
11475
|
+
}
|
|
11476
|
+
}
|
|
11477
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
11478
|
+
higher = higherGT(gt, c, options);
|
|
11479
|
+
if (higher === c && higher !== gt) {
|
|
11480
|
+
return false;
|
|
11481
|
+
}
|
|
11482
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
|
|
11483
|
+
return false;
|
|
11484
|
+
}
|
|
11485
|
+
}
|
|
11486
|
+
if (lt) {
|
|
11487
|
+
if (needDomLTPre) {
|
|
11488
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
11489
|
+
needDomLTPre = false;
|
|
11490
|
+
}
|
|
11491
|
+
}
|
|
11492
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
11493
|
+
lower = lowerLT(lt, c, options);
|
|
11494
|
+
if (lower === c && lower !== lt) {
|
|
11495
|
+
return false;
|
|
11496
|
+
}
|
|
11497
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
|
|
11498
|
+
return false;
|
|
11499
|
+
}
|
|
11500
|
+
}
|
|
11501
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
11502
|
+
return false;
|
|
11503
|
+
}
|
|
11504
|
+
}
|
|
11505
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
11506
|
+
return false;
|
|
11507
|
+
}
|
|
11508
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
11509
|
+
return false;
|
|
11510
|
+
}
|
|
11511
|
+
if (needDomGTPre || needDomLTPre) {
|
|
11512
|
+
return false;
|
|
11513
|
+
}
|
|
11514
|
+
return true;
|
|
11515
|
+
};
|
|
11516
|
+
var higherGT = (a, b, options) => {
|
|
11517
|
+
if (!a) {
|
|
11518
|
+
return b;
|
|
11519
|
+
}
|
|
11520
|
+
const comp = compare(a.semver, b.semver, options);
|
|
11521
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
11522
|
+
};
|
|
11523
|
+
var lowerLT = (a, b, options) => {
|
|
11524
|
+
if (!a) {
|
|
11525
|
+
return b;
|
|
11526
|
+
}
|
|
11527
|
+
const comp = compare(a.semver, b.semver, options);
|
|
11528
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
11529
|
+
};
|
|
11530
|
+
module2.exports = subset;
|
|
11531
|
+
}
|
|
11532
|
+
});
|
|
11533
|
+
|
|
11534
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js
|
|
11535
|
+
var require_semver4 = __commonJS({
|
|
11536
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js"(exports, module2) {
|
|
11537
|
+
"use strict";
|
|
11538
|
+
init_esm_shims();
|
|
11539
|
+
var internalRe = require_re2();
|
|
11540
|
+
var constants = require_constants2();
|
|
11541
|
+
var SemVer = require_semver3();
|
|
11542
|
+
var identifiers = require_identifiers2();
|
|
11543
|
+
var parse = require_parse2();
|
|
11544
|
+
var valid = require_valid3();
|
|
11545
|
+
var clean = require_clean2();
|
|
11546
|
+
var inc = require_inc2();
|
|
11547
|
+
var diff = require_diff2();
|
|
11548
|
+
var major2 = require_major2();
|
|
11549
|
+
var minor2 = require_minor2();
|
|
11550
|
+
var patch = require_patch2();
|
|
11551
|
+
var prerelease = require_prerelease2();
|
|
11552
|
+
var compare = require_compare2();
|
|
11553
|
+
var rcompare = require_rcompare2();
|
|
11554
|
+
var compareLoose = require_compare_loose2();
|
|
11555
|
+
var compareBuild = require_compare_build2();
|
|
11556
|
+
var sort = require_sort2();
|
|
11557
|
+
var rsort = require_rsort2();
|
|
11558
|
+
var gt = require_gt2();
|
|
11559
|
+
var lt = require_lt2();
|
|
11560
|
+
var eq = require_eq2();
|
|
11561
|
+
var neq = require_neq2();
|
|
11562
|
+
var gte = require_gte2();
|
|
11563
|
+
var lte = require_lte2();
|
|
11564
|
+
var cmp = require_cmp2();
|
|
11565
|
+
var coerce = require_coerce2();
|
|
11566
|
+
var Comparator = require_comparator2();
|
|
11567
|
+
var Range = require_range2();
|
|
11568
|
+
var satisfies = require_satisfies2();
|
|
11569
|
+
var toComparators = require_to_comparators2();
|
|
11570
|
+
var maxSatisfying = require_max_satisfying2();
|
|
11571
|
+
var minSatisfying = require_min_satisfying2();
|
|
11572
|
+
var minVersion = require_min_version2();
|
|
11573
|
+
var validRange = require_valid4();
|
|
11574
|
+
var outside = require_outside2();
|
|
11575
|
+
var gtr = require_gtr2();
|
|
11576
|
+
var ltr = require_ltr2();
|
|
11577
|
+
var intersects = require_intersects2();
|
|
11578
|
+
var simplifyRange = require_simplify2();
|
|
11579
|
+
var subset = require_subset2();
|
|
11580
|
+
module2.exports = {
|
|
11581
|
+
parse,
|
|
11582
|
+
valid,
|
|
11583
|
+
clean,
|
|
11584
|
+
inc,
|
|
11585
|
+
diff,
|
|
11586
|
+
major: major2,
|
|
11587
|
+
minor: minor2,
|
|
11588
|
+
patch,
|
|
11589
|
+
prerelease,
|
|
11590
|
+
compare,
|
|
11591
|
+
rcompare,
|
|
11592
|
+
compareLoose,
|
|
11593
|
+
compareBuild,
|
|
11594
|
+
sort,
|
|
11595
|
+
rsort,
|
|
11596
|
+
gt,
|
|
11597
|
+
lt,
|
|
11598
|
+
eq,
|
|
11599
|
+
neq,
|
|
11600
|
+
gte,
|
|
11601
|
+
lte,
|
|
11602
|
+
cmp,
|
|
11603
|
+
coerce,
|
|
11604
|
+
Comparator,
|
|
11605
|
+
Range,
|
|
11606
|
+
satisfies,
|
|
11607
|
+
toComparators,
|
|
11608
|
+
maxSatisfying,
|
|
11609
|
+
minSatisfying,
|
|
11610
|
+
minVersion,
|
|
11611
|
+
validRange,
|
|
11612
|
+
outside,
|
|
11613
|
+
gtr,
|
|
11614
|
+
ltr,
|
|
11615
|
+
intersects,
|
|
11616
|
+
simplifyRange,
|
|
11617
|
+
subset,
|
|
11618
|
+
SemVer,
|
|
11619
|
+
re: internalRe.re,
|
|
11620
|
+
src: internalRe.src,
|
|
11621
|
+
tokens: internalRe.t,
|
|
11622
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
11623
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
11624
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
11625
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
11626
|
+
};
|
|
11627
|
+
}
|
|
11628
|
+
});
|
|
11629
|
+
|
|
9655
11630
|
// ../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js
|
|
9656
11631
|
var require_ini2 = __commonJS({
|
|
9657
11632
|
"../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js"(exports, module2) {
|
|
@@ -10715,8 +12690,10 @@ import { runtime as runtime4 } from "@terai/runtime";
|
|
|
10715
12690
|
|
|
10716
12691
|
// ../logger/dist/index.mjs
|
|
10717
12692
|
init_esm_shims();
|
|
12693
|
+
|
|
12694
|
+
// ../logger/dist/chunk-HH7ZIRTH.mjs
|
|
12695
|
+
init_esm_shims();
|
|
10718
12696
|
import process2 from "process";
|
|
10719
|
-
import process3 from "process";
|
|
10720
12697
|
import os from "os";
|
|
10721
12698
|
import tty from "tty";
|
|
10722
12699
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -10783,10 +12760,10 @@ var styles = {
|
|
|
10783
12760
|
bgWhiteBright: [107, 49]
|
|
10784
12761
|
}
|
|
10785
12762
|
};
|
|
10786
|
-
|
|
12763
|
+
Object.keys(styles.modifier);
|
|
10787
12764
|
var foregroundColorNames = Object.keys(styles.color);
|
|
10788
12765
|
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
10789
|
-
|
|
12766
|
+
[...foregroundColorNames, ...backgroundColorNames];
|
|
10790
12767
|
function assembleStyles() {
|
|
10791
12768
|
const codes = /* @__PURE__ */ new Map();
|
|
10792
12769
|
for (const [groupName, group] of Object.entries(styles)) {
|
|
@@ -10903,13 +12880,13 @@ function assembleStyles() {
|
|
|
10903
12880
|
}
|
|
10904
12881
|
var ansiStyles = assembleStyles();
|
|
10905
12882
|
var ansi_styles_default = ansiStyles;
|
|
10906
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
12883
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
10907
12884
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
10908
12885
|
const position = argv.indexOf(prefix + flag);
|
|
10909
12886
|
const terminatorPosition = argv.indexOf("--");
|
|
10910
12887
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
10911
12888
|
}
|
|
10912
|
-
var { env } =
|
|
12889
|
+
var { env } = process2;
|
|
10913
12890
|
var flagForceColor;
|
|
10914
12891
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
10915
12892
|
flagForceColor = 0;
|
|
@@ -10965,7 +12942,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
10965
12942
|
if (env.TERM === "dumb") {
|
|
10966
12943
|
return min;
|
|
10967
12944
|
}
|
|
10968
|
-
if (
|
|
12945
|
+
if (process2.platform === "win32") {
|
|
10969
12946
|
const osRelease = os.release().split(".");
|
|
10970
12947
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
10971
12948
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -11201,7 +13178,7 @@ var applyStyle = (self, string) => {
|
|
|
11201
13178
|
};
|
|
11202
13179
|
Object.defineProperties(createChalk.prototype, styles2);
|
|
11203
13180
|
var chalk = createChalk();
|
|
11204
|
-
|
|
13181
|
+
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
11205
13182
|
var source_default = chalk;
|
|
11206
13183
|
function log(message) {
|
|
11207
13184
|
return process2.stdout.write(`${message}
|
|
@@ -11274,7 +13251,7 @@ init_esm_shims();
|
|
|
11274
13251
|
|
|
11275
13252
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
11276
13253
|
init_esm_shims();
|
|
11277
|
-
import
|
|
13254
|
+
import process9 from "process";
|
|
11278
13255
|
import { spawn } from "child_process";
|
|
11279
13256
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
11280
13257
|
import path6 from "path";
|
|
@@ -11584,10 +13561,10 @@ var styles3 = {
|
|
|
11584
13561
|
bgWhiteBright: [107, 49]
|
|
11585
13562
|
}
|
|
11586
13563
|
};
|
|
11587
|
-
var
|
|
13564
|
+
var modifierNames = Object.keys(styles3.modifier);
|
|
11588
13565
|
var foregroundColorNames2 = Object.keys(styles3.color);
|
|
11589
13566
|
var backgroundColorNames2 = Object.keys(styles3.bgColor);
|
|
11590
|
-
var
|
|
13567
|
+
var colorNames = [...foregroundColorNames2, ...backgroundColorNames2];
|
|
11591
13568
|
function assembleStyles2() {
|
|
11592
13569
|
const codes = /* @__PURE__ */ new Map();
|
|
11593
13570
|
for (const [groupName, group] of Object.entries(styles3)) {
|
|
@@ -11707,16 +13684,16 @@ var ansi_styles_default2 = ansiStyles2;
|
|
|
11707
13684
|
|
|
11708
13685
|
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
11709
13686
|
init_esm_shims();
|
|
11710
|
-
import
|
|
13687
|
+
import process3 from "process";
|
|
11711
13688
|
import os4 from "os";
|
|
11712
13689
|
import tty2 from "tty";
|
|
11713
|
-
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
13690
|
+
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process3.argv) {
|
|
11714
13691
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
11715
13692
|
const position = argv.indexOf(prefix + flag);
|
|
11716
13693
|
const terminatorPosition = argv.indexOf("--");
|
|
11717
13694
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
11718
13695
|
}
|
|
11719
|
-
var { env: env3 } =
|
|
13696
|
+
var { env: env3 } = process3;
|
|
11720
13697
|
var flagForceColor2;
|
|
11721
13698
|
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
11722
13699
|
flagForceColor2 = 0;
|
|
@@ -11772,7 +13749,7 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
11772
13749
|
if (env3.TERM === "dumb") {
|
|
11773
13750
|
return min;
|
|
11774
13751
|
}
|
|
11775
|
-
if (
|
|
13752
|
+
if (process3.platform === "win32") {
|
|
11776
13753
|
const osRelease = os4.release().split(".");
|
|
11777
13754
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
11778
13755
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -12013,7 +13990,7 @@ var applyStyle2 = (self, string) => {
|
|
|
12013
13990
|
};
|
|
12014
13991
|
Object.defineProperties(createChalk2.prototype, styles4);
|
|
12015
13992
|
var chalk2 = createChalk2();
|
|
12016
|
-
var
|
|
13993
|
+
var chalkStderr = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
12017
13994
|
var source_default2 = chalk2;
|
|
12018
13995
|
|
|
12019
13996
|
// ../../node_modules/.pnpm/update-notifier@6.0.2/node_modules/update-notifier/update-notifier.js
|
|
@@ -12702,7 +14679,7 @@ var AbortError = class extends RequestError {
|
|
|
12702
14679
|
|
|
12703
14680
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/index.js
|
|
12704
14681
|
init_esm_shims();
|
|
12705
|
-
import
|
|
14682
|
+
import process5 from "process";
|
|
12706
14683
|
import { Buffer as Buffer3 } from "buffer";
|
|
12707
14684
|
import { Duplex } from "stream";
|
|
12708
14685
|
import { URL as URL3, URLSearchParams as URLSearchParams2 } from "url";
|
|
@@ -13918,7 +15895,7 @@ var calculate_retry_delay_default = calculateRetryDelay;
|
|
|
13918
15895
|
|
|
13919
15896
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/options.js
|
|
13920
15897
|
init_esm_shims();
|
|
13921
|
-
import
|
|
15898
|
+
import process4 from "process";
|
|
13922
15899
|
import { promisify as promisify4, inspect } from "util";
|
|
13923
15900
|
import { URL as URL2, URLSearchParams } from "url";
|
|
13924
15901
|
import { checkServerIdentity } from "tls";
|
|
@@ -14319,7 +16296,7 @@ function parseLinkHeader(link) {
|
|
|
14319
16296
|
}
|
|
14320
16297
|
|
|
14321
16298
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/options.js
|
|
14322
|
-
var [major, minor] =
|
|
16299
|
+
var [major, minor] = process4.versions.node.split(".").map(Number);
|
|
14323
16300
|
function validateSearchParameters(searchParameters) {
|
|
14324
16301
|
for (const key in searchParameters) {
|
|
14325
16302
|
const value = searchParameters[key];
|
|
@@ -15950,7 +17927,7 @@ function isUnixSocketURL(url) {
|
|
|
15950
17927
|
|
|
15951
17928
|
// ../../node_modules/.pnpm/got@12.6.1/node_modules/got/dist/source/core/index.js
|
|
15952
17929
|
var { buffer: getBuffer } = import_get_stream2.default;
|
|
15953
|
-
var supportsBrotli = dist_default.string(
|
|
17930
|
+
var supportsBrotli = dist_default.string(process5.versions.brotli);
|
|
15954
17931
|
var methodsWithoutBody = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
15955
17932
|
var cacheableStore = new WeakableMap();
|
|
15956
17933
|
var redirectCodes = /* @__PURE__ */ new Set([300, 301, 302, 303, 304, 307, 308]);
|
|
@@ -16298,7 +18275,7 @@ var Request = class _Request extends Duplex {
|
|
|
16298
18275
|
this.emit("retry", this.retryCount + 1, error2, (updatedOptions) => {
|
|
16299
18276
|
const request = new _Request(options.url, updatedOptions, options);
|
|
16300
18277
|
request.retryCount = this.retryCount + 1;
|
|
16301
|
-
|
|
18278
|
+
process5.nextTick(() => {
|
|
16302
18279
|
void request.flush();
|
|
16303
18280
|
});
|
|
16304
18281
|
return request;
|
|
@@ -17285,7 +19262,7 @@ function registryUrl(scope) {
|
|
|
17285
19262
|
|
|
17286
19263
|
// ../../node_modules/.pnpm/package-json@8.1.1/node_modules/package-json/index.js
|
|
17287
19264
|
var import_registry_auth_token = __toESM(require_registry_auth_token(), 1);
|
|
17288
|
-
var import_semver2 = __toESM(
|
|
19265
|
+
var import_semver2 = __toESM(require_semver4(), 1);
|
|
17289
19266
|
var agentOptions = {
|
|
17290
19267
|
keepAlive: true,
|
|
17291
19268
|
maxSockets: 50
|
|
@@ -17376,9 +19353,9 @@ async function latestVersion(packageName, options) {
|
|
|
17376
19353
|
|
|
17377
19354
|
// ../../node_modules/.pnpm/is-npm@6.0.0/node_modules/is-npm/index.js
|
|
17378
19355
|
init_esm_shims();
|
|
17379
|
-
import
|
|
17380
|
-
var packageJson2 =
|
|
17381
|
-
var userAgent =
|
|
19356
|
+
import process6 from "process";
|
|
19357
|
+
var packageJson2 = process6.env.npm_package_json;
|
|
19358
|
+
var userAgent = process6.env.npm_config_user_agent;
|
|
17382
19359
|
var isNpm6 = Boolean(userAgent && userAgent.startsWith("npm"));
|
|
17383
19360
|
var isNpm7 = Boolean(packageJson2 && packageJson2.endsWith("package.json"));
|
|
17384
19361
|
var isNpm = isNpm6 || isNpm7;
|
|
@@ -17402,16 +19379,16 @@ var dist_default3 = isYarnGlobal;
|
|
|
17402
19379
|
|
|
17403
19380
|
// ../../node_modules/.pnpm/has-yarn@3.0.0/node_modules/has-yarn/index.js
|
|
17404
19381
|
init_esm_shims();
|
|
17405
|
-
import
|
|
19382
|
+
import process7 from "process";
|
|
17406
19383
|
import path5 from "path";
|
|
17407
19384
|
import fs2 from "fs";
|
|
17408
|
-
function hasYarn(cwd =
|
|
19385
|
+
function hasYarn(cwd = process7.cwd()) {
|
|
17409
19386
|
return fs2.existsSync(path5.resolve(cwd, "yarn.lock"));
|
|
17410
19387
|
}
|
|
17411
19388
|
|
|
17412
19389
|
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
17413
19390
|
init_esm_shims();
|
|
17414
|
-
import
|
|
19391
|
+
import process8 from "process";
|
|
17415
19392
|
|
|
17416
19393
|
// ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
|
|
17417
19394
|
init_esm_shims();
|
|
@@ -17648,10 +19625,10 @@ var styles5 = {
|
|
|
17648
19625
|
bgWhiteBright: [107, 49]
|
|
17649
19626
|
}
|
|
17650
19627
|
};
|
|
17651
|
-
var
|
|
19628
|
+
var modifierNames2 = Object.keys(styles5.modifier);
|
|
17652
19629
|
var foregroundColorNames3 = Object.keys(styles5.color);
|
|
17653
19630
|
var backgroundColorNames3 = Object.keys(styles5.bgColor);
|
|
17654
|
-
var
|
|
19631
|
+
var colorNames2 = [...foregroundColorNames3, ...backgroundColorNames3];
|
|
17655
19632
|
function assembleStyles3() {
|
|
17656
19633
|
const codes = /* @__PURE__ */ new Map();
|
|
17657
19634
|
for (const [groupName, group] of Object.entries(styles5)) {
|
|
@@ -17926,7 +19903,7 @@ var NEWLINE = "\n";
|
|
|
17926
19903
|
var PAD = " ";
|
|
17927
19904
|
var NONE = "none";
|
|
17928
19905
|
var terminalColumns = () => {
|
|
17929
|
-
const { env: env4, stdout, stderr } =
|
|
19906
|
+
const { env: env4, stdout, stderr } = process8;
|
|
17930
19907
|
if (stdout?.columns) {
|
|
17931
19908
|
return stdout.columns;
|
|
17932
19909
|
}
|
|
@@ -18122,8 +20099,8 @@ var boxContent = (content, contentWidth, options) => {
|
|
|
18122
20099
|
return result;
|
|
18123
20100
|
};
|
|
18124
20101
|
var sanitizeOptions = (options) => {
|
|
18125
|
-
if (options.fullscreen &&
|
|
18126
|
-
let newDimensions = [
|
|
20102
|
+
if (options.fullscreen && process8?.stdout) {
|
|
20103
|
+
let newDimensions = [process8.stdout.columns, process8.stdout.rows];
|
|
18127
20104
|
if (typeof options.fullscreen === "function") {
|
|
18128
20105
|
newDimensions = options.fullscreen(...newDimensions);
|
|
18129
20106
|
}
|
|
@@ -18300,7 +20277,7 @@ var UpdateNotifier = class {
|
|
|
18300
20277
|
this._packageName = options.pkg.name;
|
|
18301
20278
|
this.#packageVersion = options.pkg.version;
|
|
18302
20279
|
this.#updateCheckInterval = typeof options.updateCheckInterval === "number" ? options.updateCheckInterval : ONE_DAY;
|
|
18303
|
-
this.#isDisabled = "NO_UPDATE_NOTIFIER" in
|
|
20280
|
+
this.#isDisabled = "NO_UPDATE_NOTIFIER" in process9.env || process9.env.NODE_ENV === "test" || process9.argv.includes("--no-update-notifier") || import_is_ci.default;
|
|
18304
20281
|
this._shouldNotifyInNpmScript = options.shouldNotifyInNpmScript;
|
|
18305
20282
|
if (!this.#isDisabled) {
|
|
18306
20283
|
try {
|
|
@@ -18312,7 +20289,7 @@ var UpdateNotifier = class {
|
|
|
18312
20289
|
});
|
|
18313
20290
|
} catch {
|
|
18314
20291
|
const message = source_default2.yellow(format(" %s update check failed ", options.pkg.name)) + format("\n Try running with %s or get access ", source_default2.cyan("sudo")) + "\n to the local update config store via \n" + source_default2.cyan(format(" sudo chown -R $USER:$(id -gn $USER) %s ", xdgConfig));
|
|
18315
|
-
|
|
20292
|
+
process9.on("exit", () => {
|
|
18316
20293
|
console.error(boxen(message, { textAlignment: "center" }));
|
|
18317
20294
|
});
|
|
18318
20295
|
}
|
|
@@ -18330,7 +20307,7 @@ var UpdateNotifier = class {
|
|
|
18330
20307
|
if (Date.now() - this.config.get("lastUpdateCheck") < this.#updateCheckInterval) {
|
|
18331
20308
|
return;
|
|
18332
20309
|
}
|
|
18333
|
-
spawn(
|
|
20310
|
+
spawn(process9.execPath, [path6.join(__dirname2, "check.js"), JSON.stringify(this.#options)], {
|
|
18334
20311
|
detached: true,
|
|
18335
20312
|
stdio: "ignore"
|
|
18336
20313
|
}).unref();
|
|
@@ -18347,7 +20324,7 @@ var UpdateNotifier = class {
|
|
|
18347
20324
|
}
|
|
18348
20325
|
notify(options) {
|
|
18349
20326
|
const suppressForNpm = !this._shouldNotifyInNpmScript && isNpmOrYarn;
|
|
18350
|
-
if (!
|
|
20327
|
+
if (!process9.stdout.isTTY || suppressForNpm || !this.update || !import_semver3.default.gt(this.update.latest, this.update.current)) {
|
|
18351
20328
|
return this;
|
|
18352
20329
|
}
|
|
18353
20330
|
options = {
|
|
@@ -18386,12 +20363,12 @@ var UpdateNotifier = class {
|
|
|
18386
20363
|
if (options.defer === false) {
|
|
18387
20364
|
console.error(message);
|
|
18388
20365
|
} else {
|
|
18389
|
-
|
|
20366
|
+
process9.on("exit", () => {
|
|
18390
20367
|
console.error(message);
|
|
18391
20368
|
});
|
|
18392
|
-
|
|
20369
|
+
process9.on("SIGINT", () => {
|
|
18393
20370
|
console.error("");
|
|
18394
|
-
|
|
20371
|
+
process9.exit();
|
|
18395
20372
|
});
|
|
18396
20373
|
}
|
|
18397
20374
|
return this;
|
|
@@ -18408,7 +20385,7 @@ function updateNotifier(options) {
|
|
|
18408
20385
|
// package.json
|
|
18409
20386
|
var package_default = {
|
|
18410
20387
|
name: "@terai/dev",
|
|
18411
|
-
version: "0.0.
|
|
20388
|
+
version: "0.0.9",
|
|
18412
20389
|
description: "The user-facing package for Terai",
|
|
18413
20390
|
main: "dist/index.js",
|
|
18414
20391
|
module: "dist/index.mjs",
|
|
@@ -18658,6 +20635,9 @@ import { extract } from "@terai/extractor";
|
|
|
18658
20635
|
|
|
18659
20636
|
// ../generator/dist/index.mjs
|
|
18660
20637
|
init_esm_shims();
|
|
20638
|
+
|
|
20639
|
+
// ../generator/dist/chunk-N4N3TZO6.mjs
|
|
20640
|
+
init_esm_shims();
|
|
18661
20641
|
import { runtime } from "@terai/runtime";
|
|
18662
20642
|
import { stringify } from "@terai/utils";
|
|
18663
20643
|
async function generate({
|