@oclif/plugin-test-esbuild 0.4.21 → 0.4.23
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/README.md +1 -1
- package/dist/{chunk-NYAOQONU.js → chunk-3RGGSNDJ.js} +1 -1
- package/dist/{chunk-WBL2ZEOX.js → chunk-BIYL2HN3.js} +1 -1
- package/dist/{chunk-ROBJRQRG.js → chunk-EB5PZLA5.js} +1 -1
- package/dist/{chunk-4P6LCYSK.js → chunk-L44NO6VG.js} +1 -1
- package/dist/{chunk-24X2WV72.js → chunk-PAHNEEAY.js} +6 -6
- package/dist/chunk-ZQOI2LXL.js +1966 -0
- package/dist/commands/esbuild.js +2 -2
- package/dist/commands/hello/index.js +2 -2
- package/dist/commands/hello/world.js +2 -2
- package/dist/hooks/init/init.js +2 -2
- package/dist/index.js +18 -1966
- package/dist/npa-TC6TVPHC.js +2260 -0
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/dist/npa-FUCICWXG.js +0 -4907
package/dist/index.js
CHANGED
|
@@ -1,1982 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ESBuild
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3RGGSNDJ.js";
|
|
4
4
|
import {
|
|
5
5
|
Hello
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BIYL2HN3.js";
|
|
7
7
|
import {
|
|
8
8
|
World
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L44NO6VG.js";
|
|
10
10
|
import {
|
|
11
11
|
init_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EB5PZLA5.js";
|
|
13
13
|
import {
|
|
14
14
|
require_lib,
|
|
15
15
|
require_src
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PAHNEEAY.js";
|
|
17
|
+
import {
|
|
18
|
+
require_lib as require_lib2,
|
|
19
|
+
require_semver
|
|
20
|
+
} from "./chunk-ZQOI2LXL.js";
|
|
17
21
|
import {
|
|
18
|
-
__commonJS,
|
|
19
|
-
__require,
|
|
20
22
|
__toESM,
|
|
21
23
|
init_cjs_shims
|
|
22
24
|
} from "./chunk-RRP6KXWN.js";
|
|
23
25
|
|
|
24
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/internal/constants.js
|
|
25
|
-
var require_constants = __commonJS({
|
|
26
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/internal/constants.js"(exports, module) {
|
|
27
|
-
init_cjs_shims();
|
|
28
|
-
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
29
|
-
var MAX_LENGTH = 256;
|
|
30
|
-
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
31
|
-
9007199254740991;
|
|
32
|
-
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
33
|
-
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
34
|
-
var RELEASE_TYPES = [
|
|
35
|
-
"major",
|
|
36
|
-
"premajor",
|
|
37
|
-
"minor",
|
|
38
|
-
"preminor",
|
|
39
|
-
"patch",
|
|
40
|
-
"prepatch",
|
|
41
|
-
"prerelease"
|
|
42
|
-
];
|
|
43
|
-
module.exports = {
|
|
44
|
-
MAX_LENGTH,
|
|
45
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
46
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
47
|
-
MAX_SAFE_INTEGER,
|
|
48
|
-
RELEASE_TYPES,
|
|
49
|
-
SEMVER_SPEC_VERSION,
|
|
50
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
51
|
-
FLAG_LOOSE: 2
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/internal/debug.js
|
|
57
|
-
var require_debug = __commonJS({
|
|
58
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/internal/debug.js"(exports, module) {
|
|
59
|
-
init_cjs_shims();
|
|
60
|
-
var debug4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
61
|
-
};
|
|
62
|
-
module.exports = debug4;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/internal/re.js
|
|
67
|
-
var require_re = __commonJS({
|
|
68
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/internal/re.js"(exports, module) {
|
|
69
|
-
init_cjs_shims();
|
|
70
|
-
var {
|
|
71
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
72
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
73
|
-
MAX_LENGTH
|
|
74
|
-
} = require_constants();
|
|
75
|
-
var debug4 = require_debug();
|
|
76
|
-
exports = module.exports = {};
|
|
77
|
-
var re = exports.re = [];
|
|
78
|
-
var safeRe = exports.safeRe = [];
|
|
79
|
-
var src = exports.src = [];
|
|
80
|
-
var t = exports.t = {};
|
|
81
|
-
var R = 0;
|
|
82
|
-
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
83
|
-
var safeRegexReplacements = [
|
|
84
|
-
["\\s", 1],
|
|
85
|
-
["\\d", MAX_LENGTH],
|
|
86
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
87
|
-
];
|
|
88
|
-
var makeSafeRegex = (value) => {
|
|
89
|
-
for (const [token, max] of safeRegexReplacements) {
|
|
90
|
-
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
91
|
-
}
|
|
92
|
-
return value;
|
|
93
|
-
};
|
|
94
|
-
var createToken = (name, value, isGlobal) => {
|
|
95
|
-
const safe = makeSafeRegex(value);
|
|
96
|
-
const index = R++;
|
|
97
|
-
debug4(name, index, value);
|
|
98
|
-
t[name] = index;
|
|
99
|
-
src[index] = value;
|
|
100
|
-
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
101
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
102
|
-
};
|
|
103
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
104
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
105
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
106
|
-
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
107
|
-
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
108
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
109
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
110
|
-
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
111
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
112
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
113
|
-
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
114
|
-
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
115
|
-
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
116
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
117
|
-
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
118
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
119
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
120
|
-
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
121
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
122
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
123
|
-
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
124
|
-
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
125
|
-
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
126
|
-
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
127
|
-
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
128
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
129
|
-
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
130
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
131
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
132
|
-
exports.tildeTrimReplace = "$1~";
|
|
133
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
134
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
135
|
-
createToken("LONECARET", "(?:\\^)");
|
|
136
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
137
|
-
exports.caretTrimReplace = "$1^";
|
|
138
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
139
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
140
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
141
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
142
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
143
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
144
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
145
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
146
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
147
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
148
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/internal/parse-options.js
|
|
153
|
-
var require_parse_options = __commonJS({
|
|
154
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/internal/parse-options.js"(exports, module) {
|
|
155
|
-
init_cjs_shims();
|
|
156
|
-
var looseOption = Object.freeze({ loose: true });
|
|
157
|
-
var emptyOpts = Object.freeze({});
|
|
158
|
-
var parseOptions = (options) => {
|
|
159
|
-
if (!options) {
|
|
160
|
-
return emptyOpts;
|
|
161
|
-
}
|
|
162
|
-
if (typeof options !== "object") {
|
|
163
|
-
return looseOption;
|
|
164
|
-
}
|
|
165
|
-
return options;
|
|
166
|
-
};
|
|
167
|
-
module.exports = parseOptions;
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/internal/identifiers.js
|
|
172
|
-
var require_identifiers = __commonJS({
|
|
173
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/internal/identifiers.js"(exports, module) {
|
|
174
|
-
init_cjs_shims();
|
|
175
|
-
var numeric = /^[0-9]+$/;
|
|
176
|
-
var compareIdentifiers = (a, b) => {
|
|
177
|
-
const anum = numeric.test(a);
|
|
178
|
-
const bnum = numeric.test(b);
|
|
179
|
-
if (anum && bnum) {
|
|
180
|
-
a = +a;
|
|
181
|
-
b = +b;
|
|
182
|
-
}
|
|
183
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
184
|
-
};
|
|
185
|
-
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
186
|
-
module.exports = {
|
|
187
|
-
compareIdentifiers,
|
|
188
|
-
rcompareIdentifiers
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/classes/semver.js
|
|
194
|
-
var require_semver = __commonJS({
|
|
195
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/classes/semver.js"(exports, module) {
|
|
196
|
-
init_cjs_shims();
|
|
197
|
-
var debug4 = require_debug();
|
|
198
|
-
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
199
|
-
var { safeRe: re, t } = require_re();
|
|
200
|
-
var parseOptions = require_parse_options();
|
|
201
|
-
var { compareIdentifiers } = require_identifiers();
|
|
202
|
-
var SemVer = class _SemVer {
|
|
203
|
-
constructor(version, options) {
|
|
204
|
-
options = parseOptions(options);
|
|
205
|
-
if (version instanceof _SemVer) {
|
|
206
|
-
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
207
|
-
return version;
|
|
208
|
-
} else {
|
|
209
|
-
version = version.version;
|
|
210
|
-
}
|
|
211
|
-
} else if (typeof version !== "string") {
|
|
212
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
213
|
-
}
|
|
214
|
-
if (version.length > MAX_LENGTH) {
|
|
215
|
-
throw new TypeError(
|
|
216
|
-
`version is longer than ${MAX_LENGTH} characters`
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
debug4("SemVer", version, options);
|
|
220
|
-
this.options = options;
|
|
221
|
-
this.loose = !!options.loose;
|
|
222
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
223
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
224
|
-
if (!m) {
|
|
225
|
-
throw new TypeError(`Invalid Version: ${version}`);
|
|
226
|
-
}
|
|
227
|
-
this.raw = version;
|
|
228
|
-
this.major = +m[1];
|
|
229
|
-
this.minor = +m[2];
|
|
230
|
-
this.patch = +m[3];
|
|
231
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
232
|
-
throw new TypeError("Invalid major version");
|
|
233
|
-
}
|
|
234
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
235
|
-
throw new TypeError("Invalid minor version");
|
|
236
|
-
}
|
|
237
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
238
|
-
throw new TypeError("Invalid patch version");
|
|
239
|
-
}
|
|
240
|
-
if (!m[4]) {
|
|
241
|
-
this.prerelease = [];
|
|
242
|
-
} else {
|
|
243
|
-
this.prerelease = m[4].split(".").map((id) => {
|
|
244
|
-
if (/^[0-9]+$/.test(id)) {
|
|
245
|
-
const num = +id;
|
|
246
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
247
|
-
return num;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return id;
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
254
|
-
this.format();
|
|
255
|
-
}
|
|
256
|
-
format() {
|
|
257
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
258
|
-
if (this.prerelease.length) {
|
|
259
|
-
this.version += `-${this.prerelease.join(".")}`;
|
|
260
|
-
}
|
|
261
|
-
return this.version;
|
|
262
|
-
}
|
|
263
|
-
toString() {
|
|
264
|
-
return this.version;
|
|
265
|
-
}
|
|
266
|
-
compare(other) {
|
|
267
|
-
debug4("SemVer.compare", this.version, this.options, other);
|
|
268
|
-
if (!(other instanceof _SemVer)) {
|
|
269
|
-
if (typeof other === "string" && other === this.version) {
|
|
270
|
-
return 0;
|
|
271
|
-
}
|
|
272
|
-
other = new _SemVer(other, this.options);
|
|
273
|
-
}
|
|
274
|
-
if (other.version === this.version) {
|
|
275
|
-
return 0;
|
|
276
|
-
}
|
|
277
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
278
|
-
}
|
|
279
|
-
compareMain(other) {
|
|
280
|
-
if (!(other instanceof _SemVer)) {
|
|
281
|
-
other = new _SemVer(other, this.options);
|
|
282
|
-
}
|
|
283
|
-
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
284
|
-
}
|
|
285
|
-
comparePre(other) {
|
|
286
|
-
if (!(other instanceof _SemVer)) {
|
|
287
|
-
other = new _SemVer(other, this.options);
|
|
288
|
-
}
|
|
289
|
-
if (this.prerelease.length && !other.prerelease.length) {
|
|
290
|
-
return -1;
|
|
291
|
-
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
292
|
-
return 1;
|
|
293
|
-
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
294
|
-
return 0;
|
|
295
|
-
}
|
|
296
|
-
let i = 0;
|
|
297
|
-
do {
|
|
298
|
-
const a = this.prerelease[i];
|
|
299
|
-
const b = other.prerelease[i];
|
|
300
|
-
debug4("prerelease compare", i, a, b);
|
|
301
|
-
if (a === void 0 && b === void 0) {
|
|
302
|
-
return 0;
|
|
303
|
-
} else if (b === void 0) {
|
|
304
|
-
return 1;
|
|
305
|
-
} else if (a === void 0) {
|
|
306
|
-
return -1;
|
|
307
|
-
} else if (a === b) {
|
|
308
|
-
continue;
|
|
309
|
-
} else {
|
|
310
|
-
return compareIdentifiers(a, b);
|
|
311
|
-
}
|
|
312
|
-
} while (++i);
|
|
313
|
-
}
|
|
314
|
-
compareBuild(other) {
|
|
315
|
-
if (!(other instanceof _SemVer)) {
|
|
316
|
-
other = new _SemVer(other, this.options);
|
|
317
|
-
}
|
|
318
|
-
let i = 0;
|
|
319
|
-
do {
|
|
320
|
-
const a = this.build[i];
|
|
321
|
-
const b = other.build[i];
|
|
322
|
-
debug4("build compare", i, a, b);
|
|
323
|
-
if (a === void 0 && b === void 0) {
|
|
324
|
-
return 0;
|
|
325
|
-
} else if (b === void 0) {
|
|
326
|
-
return 1;
|
|
327
|
-
} else if (a === void 0) {
|
|
328
|
-
return -1;
|
|
329
|
-
} else if (a === b) {
|
|
330
|
-
continue;
|
|
331
|
-
} else {
|
|
332
|
-
return compareIdentifiers(a, b);
|
|
333
|
-
}
|
|
334
|
-
} while (++i);
|
|
335
|
-
}
|
|
336
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
337
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
338
|
-
inc(release, identifier, identifierBase) {
|
|
339
|
-
switch (release) {
|
|
340
|
-
case "premajor":
|
|
341
|
-
this.prerelease.length = 0;
|
|
342
|
-
this.patch = 0;
|
|
343
|
-
this.minor = 0;
|
|
344
|
-
this.major++;
|
|
345
|
-
this.inc("pre", identifier, identifierBase);
|
|
346
|
-
break;
|
|
347
|
-
case "preminor":
|
|
348
|
-
this.prerelease.length = 0;
|
|
349
|
-
this.patch = 0;
|
|
350
|
-
this.minor++;
|
|
351
|
-
this.inc("pre", identifier, identifierBase);
|
|
352
|
-
break;
|
|
353
|
-
case "prepatch":
|
|
354
|
-
this.prerelease.length = 0;
|
|
355
|
-
this.inc("patch", identifier, identifierBase);
|
|
356
|
-
this.inc("pre", identifier, identifierBase);
|
|
357
|
-
break;
|
|
358
|
-
case "prerelease":
|
|
359
|
-
if (this.prerelease.length === 0) {
|
|
360
|
-
this.inc("patch", identifier, identifierBase);
|
|
361
|
-
}
|
|
362
|
-
this.inc("pre", identifier, identifierBase);
|
|
363
|
-
break;
|
|
364
|
-
case "major":
|
|
365
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
366
|
-
this.major++;
|
|
367
|
-
}
|
|
368
|
-
this.minor = 0;
|
|
369
|
-
this.patch = 0;
|
|
370
|
-
this.prerelease = [];
|
|
371
|
-
break;
|
|
372
|
-
case "minor":
|
|
373
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
374
|
-
this.minor++;
|
|
375
|
-
}
|
|
376
|
-
this.patch = 0;
|
|
377
|
-
this.prerelease = [];
|
|
378
|
-
break;
|
|
379
|
-
case "patch":
|
|
380
|
-
if (this.prerelease.length === 0) {
|
|
381
|
-
this.patch++;
|
|
382
|
-
}
|
|
383
|
-
this.prerelease = [];
|
|
384
|
-
break;
|
|
385
|
-
case "pre": {
|
|
386
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
387
|
-
if (!identifier && identifierBase === false) {
|
|
388
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
389
|
-
}
|
|
390
|
-
if (this.prerelease.length === 0) {
|
|
391
|
-
this.prerelease = [base];
|
|
392
|
-
} else {
|
|
393
|
-
let i = this.prerelease.length;
|
|
394
|
-
while (--i >= 0) {
|
|
395
|
-
if (typeof this.prerelease[i] === "number") {
|
|
396
|
-
this.prerelease[i]++;
|
|
397
|
-
i = -2;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
if (i === -1) {
|
|
401
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
402
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
403
|
-
}
|
|
404
|
-
this.prerelease.push(base);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
if (identifier) {
|
|
408
|
-
let prerelease = [identifier, base];
|
|
409
|
-
if (identifierBase === false) {
|
|
410
|
-
prerelease = [identifier];
|
|
411
|
-
}
|
|
412
|
-
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
413
|
-
if (isNaN(this.prerelease[1])) {
|
|
414
|
-
this.prerelease = prerelease;
|
|
415
|
-
}
|
|
416
|
-
} else {
|
|
417
|
-
this.prerelease = prerelease;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
break;
|
|
421
|
-
}
|
|
422
|
-
default:
|
|
423
|
-
throw new Error(`invalid increment argument: ${release}`);
|
|
424
|
-
}
|
|
425
|
-
this.raw = this.format();
|
|
426
|
-
if (this.build.length) {
|
|
427
|
-
this.raw += `+${this.build.join(".")}`;
|
|
428
|
-
}
|
|
429
|
-
return this;
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
module.exports = SemVer;
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/parse.js
|
|
437
|
-
var require_parse = __commonJS({
|
|
438
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/parse.js"(exports, module) {
|
|
439
|
-
init_cjs_shims();
|
|
440
|
-
var SemVer = require_semver();
|
|
441
|
-
var parse = (version, options, throwErrors = false) => {
|
|
442
|
-
if (version instanceof SemVer) {
|
|
443
|
-
return version;
|
|
444
|
-
}
|
|
445
|
-
try {
|
|
446
|
-
return new SemVer(version, options);
|
|
447
|
-
} catch (er) {
|
|
448
|
-
if (!throwErrors) {
|
|
449
|
-
return null;
|
|
450
|
-
}
|
|
451
|
-
throw er;
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
module.exports = parse;
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
|
|
458
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/valid.js
|
|
459
|
-
var require_valid = __commonJS({
|
|
460
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/valid.js"(exports, module) {
|
|
461
|
-
init_cjs_shims();
|
|
462
|
-
var parse = require_parse();
|
|
463
|
-
var valid2 = (version, options) => {
|
|
464
|
-
const v = parse(version, options);
|
|
465
|
-
return v ? v.version : null;
|
|
466
|
-
};
|
|
467
|
-
module.exports = valid2;
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
|
|
471
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/clean.js
|
|
472
|
-
var require_clean = __commonJS({
|
|
473
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/clean.js"(exports, module) {
|
|
474
|
-
init_cjs_shims();
|
|
475
|
-
var parse = require_parse();
|
|
476
|
-
var clean = (version, options) => {
|
|
477
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
478
|
-
return s ? s.version : null;
|
|
479
|
-
};
|
|
480
|
-
module.exports = clean;
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/inc.js
|
|
485
|
-
var require_inc = __commonJS({
|
|
486
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/inc.js"(exports, module) {
|
|
487
|
-
init_cjs_shims();
|
|
488
|
-
var SemVer = require_semver();
|
|
489
|
-
var inc = (version, release, options, identifier, identifierBase) => {
|
|
490
|
-
if (typeof options === "string") {
|
|
491
|
-
identifierBase = identifier;
|
|
492
|
-
identifier = options;
|
|
493
|
-
options = void 0;
|
|
494
|
-
}
|
|
495
|
-
try {
|
|
496
|
-
return new SemVer(
|
|
497
|
-
version instanceof SemVer ? version.version : version,
|
|
498
|
-
options
|
|
499
|
-
).inc(release, identifier, identifierBase).version;
|
|
500
|
-
} catch (er) {
|
|
501
|
-
return null;
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
module.exports = inc;
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
|
|
508
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/diff.js
|
|
509
|
-
var require_diff = __commonJS({
|
|
510
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/diff.js"(exports, module) {
|
|
511
|
-
init_cjs_shims();
|
|
512
|
-
var parse = require_parse();
|
|
513
|
-
var diff = (version1, version2) => {
|
|
514
|
-
const v1 = parse(version1, null, true);
|
|
515
|
-
const v2 = parse(version2, null, true);
|
|
516
|
-
const comparison = v1.compare(v2);
|
|
517
|
-
if (comparison === 0) {
|
|
518
|
-
return null;
|
|
519
|
-
}
|
|
520
|
-
const v1Higher = comparison > 0;
|
|
521
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
522
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
523
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
524
|
-
const lowHasPre = !!lowVersion.prerelease.length;
|
|
525
|
-
if (lowHasPre && !highHasPre) {
|
|
526
|
-
if (!lowVersion.patch && !lowVersion.minor) {
|
|
527
|
-
return "major";
|
|
528
|
-
}
|
|
529
|
-
if (highVersion.patch) {
|
|
530
|
-
return "patch";
|
|
531
|
-
}
|
|
532
|
-
if (highVersion.minor) {
|
|
533
|
-
return "minor";
|
|
534
|
-
}
|
|
535
|
-
return "major";
|
|
536
|
-
}
|
|
537
|
-
const prefix = highHasPre ? "pre" : "";
|
|
538
|
-
if (v1.major !== v2.major) {
|
|
539
|
-
return prefix + "major";
|
|
540
|
-
}
|
|
541
|
-
if (v1.minor !== v2.minor) {
|
|
542
|
-
return prefix + "minor";
|
|
543
|
-
}
|
|
544
|
-
if (v1.patch !== v2.patch) {
|
|
545
|
-
return prefix + "patch";
|
|
546
|
-
}
|
|
547
|
-
return "prerelease";
|
|
548
|
-
};
|
|
549
|
-
module.exports = diff;
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
|
|
553
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/major.js
|
|
554
|
-
var require_major = __commonJS({
|
|
555
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/major.js"(exports, module) {
|
|
556
|
-
init_cjs_shims();
|
|
557
|
-
var SemVer = require_semver();
|
|
558
|
-
var major = (a, loose) => new SemVer(a, loose).major;
|
|
559
|
-
module.exports = major;
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
|
|
563
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/minor.js
|
|
564
|
-
var require_minor = __commonJS({
|
|
565
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/minor.js"(exports, module) {
|
|
566
|
-
init_cjs_shims();
|
|
567
|
-
var SemVer = require_semver();
|
|
568
|
-
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
569
|
-
module.exports = minor;
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
|
|
573
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/patch.js
|
|
574
|
-
var require_patch = __commonJS({
|
|
575
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/patch.js"(exports, module) {
|
|
576
|
-
init_cjs_shims();
|
|
577
|
-
var SemVer = require_semver();
|
|
578
|
-
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
579
|
-
module.exports = patch;
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
|
|
583
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/prerelease.js
|
|
584
|
-
var require_prerelease = __commonJS({
|
|
585
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/prerelease.js"(exports, module) {
|
|
586
|
-
init_cjs_shims();
|
|
587
|
-
var parse = require_parse();
|
|
588
|
-
var prerelease = (version, options) => {
|
|
589
|
-
const parsed = parse(version, options);
|
|
590
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
591
|
-
};
|
|
592
|
-
module.exports = prerelease;
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/compare.js
|
|
597
|
-
var require_compare = __commonJS({
|
|
598
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/compare.js"(exports, module) {
|
|
599
|
-
init_cjs_shims();
|
|
600
|
-
var SemVer = require_semver();
|
|
601
|
-
var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
602
|
-
module.exports = compare2;
|
|
603
|
-
}
|
|
604
|
-
});
|
|
605
|
-
|
|
606
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/rcompare.js
|
|
607
|
-
var require_rcompare = __commonJS({
|
|
608
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/rcompare.js"(exports, module) {
|
|
609
|
-
init_cjs_shims();
|
|
610
|
-
var compare2 = require_compare();
|
|
611
|
-
var rcompare = (a, b, loose) => compare2(b, a, loose);
|
|
612
|
-
module.exports = rcompare;
|
|
613
|
-
}
|
|
614
|
-
});
|
|
615
|
-
|
|
616
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/compare-loose.js
|
|
617
|
-
var require_compare_loose = __commonJS({
|
|
618
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/compare-loose.js"(exports, module) {
|
|
619
|
-
init_cjs_shims();
|
|
620
|
-
var compare2 = require_compare();
|
|
621
|
-
var compareLoose = (a, b) => compare2(a, b, true);
|
|
622
|
-
module.exports = compareLoose;
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
|
|
626
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/compare-build.js
|
|
627
|
-
var require_compare_build = __commonJS({
|
|
628
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/compare-build.js"(exports, module) {
|
|
629
|
-
init_cjs_shims();
|
|
630
|
-
var SemVer = require_semver();
|
|
631
|
-
var compareBuild = (a, b, loose) => {
|
|
632
|
-
const versionA = new SemVer(a, loose);
|
|
633
|
-
const versionB = new SemVer(b, loose);
|
|
634
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
635
|
-
};
|
|
636
|
-
module.exports = compareBuild;
|
|
637
|
-
}
|
|
638
|
-
});
|
|
639
|
-
|
|
640
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/sort.js
|
|
641
|
-
var require_sort = __commonJS({
|
|
642
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/sort.js"(exports, module) {
|
|
643
|
-
init_cjs_shims();
|
|
644
|
-
var compareBuild = require_compare_build();
|
|
645
|
-
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
646
|
-
module.exports = sort;
|
|
647
|
-
}
|
|
648
|
-
});
|
|
649
|
-
|
|
650
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/rsort.js
|
|
651
|
-
var require_rsort = __commonJS({
|
|
652
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/rsort.js"(exports, module) {
|
|
653
|
-
init_cjs_shims();
|
|
654
|
-
var compareBuild = require_compare_build();
|
|
655
|
-
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
656
|
-
module.exports = rsort;
|
|
657
|
-
}
|
|
658
|
-
});
|
|
659
|
-
|
|
660
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/gt.js
|
|
661
|
-
var require_gt = __commonJS({
|
|
662
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/gt.js"(exports, module) {
|
|
663
|
-
init_cjs_shims();
|
|
664
|
-
var compare2 = require_compare();
|
|
665
|
-
var gt2 = (a, b, loose) => compare2(a, b, loose) > 0;
|
|
666
|
-
module.exports = gt2;
|
|
667
|
-
}
|
|
668
|
-
});
|
|
669
|
-
|
|
670
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/lt.js
|
|
671
|
-
var require_lt = __commonJS({
|
|
672
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/lt.js"(exports, module) {
|
|
673
|
-
init_cjs_shims();
|
|
674
|
-
var compare2 = require_compare();
|
|
675
|
-
var lt = (a, b, loose) => compare2(a, b, loose) < 0;
|
|
676
|
-
module.exports = lt;
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
|
-
|
|
680
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/eq.js
|
|
681
|
-
var require_eq = __commonJS({
|
|
682
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/eq.js"(exports, module) {
|
|
683
|
-
init_cjs_shims();
|
|
684
|
-
var compare2 = require_compare();
|
|
685
|
-
var eq = (a, b, loose) => compare2(a, b, loose) === 0;
|
|
686
|
-
module.exports = eq;
|
|
687
|
-
}
|
|
688
|
-
});
|
|
689
|
-
|
|
690
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/neq.js
|
|
691
|
-
var require_neq = __commonJS({
|
|
692
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/neq.js"(exports, module) {
|
|
693
|
-
init_cjs_shims();
|
|
694
|
-
var compare2 = require_compare();
|
|
695
|
-
var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
|
|
696
|
-
module.exports = neq;
|
|
697
|
-
}
|
|
698
|
-
});
|
|
699
|
-
|
|
700
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/gte.js
|
|
701
|
-
var require_gte = __commonJS({
|
|
702
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/gte.js"(exports, module) {
|
|
703
|
-
init_cjs_shims();
|
|
704
|
-
var compare2 = require_compare();
|
|
705
|
-
var gte = (a, b, loose) => compare2(a, b, loose) >= 0;
|
|
706
|
-
module.exports = gte;
|
|
707
|
-
}
|
|
708
|
-
});
|
|
709
|
-
|
|
710
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/lte.js
|
|
711
|
-
var require_lte = __commonJS({
|
|
712
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/lte.js"(exports, module) {
|
|
713
|
-
init_cjs_shims();
|
|
714
|
-
var compare2 = require_compare();
|
|
715
|
-
var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
|
|
716
|
-
module.exports = lte;
|
|
717
|
-
}
|
|
718
|
-
});
|
|
719
|
-
|
|
720
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/cmp.js
|
|
721
|
-
var require_cmp = __commonJS({
|
|
722
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/cmp.js"(exports, module) {
|
|
723
|
-
init_cjs_shims();
|
|
724
|
-
var eq = require_eq();
|
|
725
|
-
var neq = require_neq();
|
|
726
|
-
var gt2 = require_gt();
|
|
727
|
-
var gte = require_gte();
|
|
728
|
-
var lt = require_lt();
|
|
729
|
-
var lte = require_lte();
|
|
730
|
-
var cmp = (a, op, b, loose) => {
|
|
731
|
-
switch (op) {
|
|
732
|
-
case "===":
|
|
733
|
-
if (typeof a === "object") {
|
|
734
|
-
a = a.version;
|
|
735
|
-
}
|
|
736
|
-
if (typeof b === "object") {
|
|
737
|
-
b = b.version;
|
|
738
|
-
}
|
|
739
|
-
return a === b;
|
|
740
|
-
case "!==":
|
|
741
|
-
if (typeof a === "object") {
|
|
742
|
-
a = a.version;
|
|
743
|
-
}
|
|
744
|
-
if (typeof b === "object") {
|
|
745
|
-
b = b.version;
|
|
746
|
-
}
|
|
747
|
-
return a !== b;
|
|
748
|
-
case "":
|
|
749
|
-
case "=":
|
|
750
|
-
case "==":
|
|
751
|
-
return eq(a, b, loose);
|
|
752
|
-
case "!=":
|
|
753
|
-
return neq(a, b, loose);
|
|
754
|
-
case ">":
|
|
755
|
-
return gt2(a, b, loose);
|
|
756
|
-
case ">=":
|
|
757
|
-
return gte(a, b, loose);
|
|
758
|
-
case "<":
|
|
759
|
-
return lt(a, b, loose);
|
|
760
|
-
case "<=":
|
|
761
|
-
return lte(a, b, loose);
|
|
762
|
-
default:
|
|
763
|
-
throw new TypeError(`Invalid operator: ${op}`);
|
|
764
|
-
}
|
|
765
|
-
};
|
|
766
|
-
module.exports = cmp;
|
|
767
|
-
}
|
|
768
|
-
});
|
|
769
|
-
|
|
770
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/coerce.js
|
|
771
|
-
var require_coerce = __commonJS({
|
|
772
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/coerce.js"(exports, module) {
|
|
773
|
-
init_cjs_shims();
|
|
774
|
-
var SemVer = require_semver();
|
|
775
|
-
var parse = require_parse();
|
|
776
|
-
var { safeRe: re, t } = require_re();
|
|
777
|
-
var coerce = (version, options) => {
|
|
778
|
-
if (version instanceof SemVer) {
|
|
779
|
-
return version;
|
|
780
|
-
}
|
|
781
|
-
if (typeof version === "number") {
|
|
782
|
-
version = String(version);
|
|
783
|
-
}
|
|
784
|
-
if (typeof version !== "string") {
|
|
785
|
-
return null;
|
|
786
|
-
}
|
|
787
|
-
options = options || {};
|
|
788
|
-
let match = null;
|
|
789
|
-
if (!options.rtl) {
|
|
790
|
-
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
791
|
-
} else {
|
|
792
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
793
|
-
let next;
|
|
794
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
795
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
796
|
-
match = next;
|
|
797
|
-
}
|
|
798
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
799
|
-
}
|
|
800
|
-
coerceRtlRegex.lastIndex = -1;
|
|
801
|
-
}
|
|
802
|
-
if (match === null) {
|
|
803
|
-
return null;
|
|
804
|
-
}
|
|
805
|
-
const major = match[2];
|
|
806
|
-
const minor = match[3] || "0";
|
|
807
|
-
const patch = match[4] || "0";
|
|
808
|
-
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
809
|
-
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
810
|
-
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
811
|
-
};
|
|
812
|
-
module.exports = coerce;
|
|
813
|
-
}
|
|
814
|
-
});
|
|
815
|
-
|
|
816
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/internal/lrucache.js
|
|
817
|
-
var require_lrucache = __commonJS({
|
|
818
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/internal/lrucache.js"(exports, module) {
|
|
819
|
-
init_cjs_shims();
|
|
820
|
-
var LRUCache = class {
|
|
821
|
-
constructor() {
|
|
822
|
-
this.max = 1e3;
|
|
823
|
-
this.map = /* @__PURE__ */ new Map();
|
|
824
|
-
}
|
|
825
|
-
get(key) {
|
|
826
|
-
const value = this.map.get(key);
|
|
827
|
-
if (value === void 0) {
|
|
828
|
-
return void 0;
|
|
829
|
-
} else {
|
|
830
|
-
this.map.delete(key);
|
|
831
|
-
this.map.set(key, value);
|
|
832
|
-
return value;
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
delete(key) {
|
|
836
|
-
return this.map.delete(key);
|
|
837
|
-
}
|
|
838
|
-
set(key, value) {
|
|
839
|
-
const deleted = this.delete(key);
|
|
840
|
-
if (!deleted && value !== void 0) {
|
|
841
|
-
if (this.map.size >= this.max) {
|
|
842
|
-
const firstKey = this.map.keys().next().value;
|
|
843
|
-
this.delete(firstKey);
|
|
844
|
-
}
|
|
845
|
-
this.map.set(key, value);
|
|
846
|
-
}
|
|
847
|
-
return this;
|
|
848
|
-
}
|
|
849
|
-
};
|
|
850
|
-
module.exports = LRUCache;
|
|
851
|
-
}
|
|
852
|
-
});
|
|
853
|
-
|
|
854
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/classes/range.js
|
|
855
|
-
var require_range = __commonJS({
|
|
856
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/classes/range.js"(exports, module) {
|
|
857
|
-
init_cjs_shims();
|
|
858
|
-
var Range = class _Range {
|
|
859
|
-
constructor(range, options) {
|
|
860
|
-
options = parseOptions(options);
|
|
861
|
-
if (range instanceof _Range) {
|
|
862
|
-
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
863
|
-
return range;
|
|
864
|
-
} else {
|
|
865
|
-
return new _Range(range.raw, options);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
if (range instanceof Comparator) {
|
|
869
|
-
this.raw = range.value;
|
|
870
|
-
this.set = [[range]];
|
|
871
|
-
this.format();
|
|
872
|
-
return this;
|
|
873
|
-
}
|
|
874
|
-
this.options = options;
|
|
875
|
-
this.loose = !!options.loose;
|
|
876
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
877
|
-
this.raw = range.trim().split(/\s+/).join(" ");
|
|
878
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
879
|
-
if (!this.set.length) {
|
|
880
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
881
|
-
}
|
|
882
|
-
if (this.set.length > 1) {
|
|
883
|
-
const first = this.set[0];
|
|
884
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
885
|
-
if (this.set.length === 0) {
|
|
886
|
-
this.set = [first];
|
|
887
|
-
} else if (this.set.length > 1) {
|
|
888
|
-
for (const c of this.set) {
|
|
889
|
-
if (c.length === 1 && isAny(c[0])) {
|
|
890
|
-
this.set = [c];
|
|
891
|
-
break;
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
this.format();
|
|
897
|
-
}
|
|
898
|
-
format() {
|
|
899
|
-
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
|
|
900
|
-
return this.range;
|
|
901
|
-
}
|
|
902
|
-
toString() {
|
|
903
|
-
return this.range;
|
|
904
|
-
}
|
|
905
|
-
parseRange(range) {
|
|
906
|
-
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
907
|
-
const memoKey = memoOpts + ":" + range;
|
|
908
|
-
const cached = cache.get(memoKey);
|
|
909
|
-
if (cached) {
|
|
910
|
-
return cached;
|
|
911
|
-
}
|
|
912
|
-
const loose = this.options.loose;
|
|
913
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
914
|
-
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
915
|
-
debug4("hyphen replace", range);
|
|
916
|
-
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
917
|
-
debug4("comparator trim", range);
|
|
918
|
-
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
919
|
-
debug4("tilde trim", range);
|
|
920
|
-
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
921
|
-
debug4("caret trim", range);
|
|
922
|
-
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
923
|
-
if (loose) {
|
|
924
|
-
rangeList = rangeList.filter((comp) => {
|
|
925
|
-
debug4("loose invalid filter", comp, this.options);
|
|
926
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
debug4("range list", rangeList);
|
|
930
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
931
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
932
|
-
for (const comp of comparators) {
|
|
933
|
-
if (isNullSet(comp)) {
|
|
934
|
-
return [comp];
|
|
935
|
-
}
|
|
936
|
-
rangeMap.set(comp.value, comp);
|
|
937
|
-
}
|
|
938
|
-
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
939
|
-
rangeMap.delete("");
|
|
940
|
-
}
|
|
941
|
-
const result = [...rangeMap.values()];
|
|
942
|
-
cache.set(memoKey, result);
|
|
943
|
-
return result;
|
|
944
|
-
}
|
|
945
|
-
intersects(range, options) {
|
|
946
|
-
if (!(range instanceof _Range)) {
|
|
947
|
-
throw new TypeError("a Range is required");
|
|
948
|
-
}
|
|
949
|
-
return this.set.some((thisComparators) => {
|
|
950
|
-
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
951
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
952
|
-
return rangeComparators.every((rangeComparator) => {
|
|
953
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
954
|
-
});
|
|
955
|
-
});
|
|
956
|
-
});
|
|
957
|
-
});
|
|
958
|
-
}
|
|
959
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
960
|
-
test(version) {
|
|
961
|
-
if (!version) {
|
|
962
|
-
return false;
|
|
963
|
-
}
|
|
964
|
-
if (typeof version === "string") {
|
|
965
|
-
try {
|
|
966
|
-
version = new SemVer(version, this.options);
|
|
967
|
-
} catch (er) {
|
|
968
|
-
return false;
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
972
|
-
if (testSet(this.set[i], version, this.options)) {
|
|
973
|
-
return true;
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
return false;
|
|
977
|
-
}
|
|
978
|
-
};
|
|
979
|
-
module.exports = Range;
|
|
980
|
-
var LRU = require_lrucache();
|
|
981
|
-
var cache = new LRU();
|
|
982
|
-
var parseOptions = require_parse_options();
|
|
983
|
-
var Comparator = require_comparator();
|
|
984
|
-
var debug4 = require_debug();
|
|
985
|
-
var SemVer = require_semver();
|
|
986
|
-
var {
|
|
987
|
-
safeRe: re,
|
|
988
|
-
t,
|
|
989
|
-
comparatorTrimReplace,
|
|
990
|
-
tildeTrimReplace,
|
|
991
|
-
caretTrimReplace
|
|
992
|
-
} = require_re();
|
|
993
|
-
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
994
|
-
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
995
|
-
var isAny = (c) => c.value === "";
|
|
996
|
-
var isSatisfiable = (comparators, options) => {
|
|
997
|
-
let result = true;
|
|
998
|
-
const remainingComparators = comparators.slice();
|
|
999
|
-
let testComparator = remainingComparators.pop();
|
|
1000
|
-
while (result && remainingComparators.length) {
|
|
1001
|
-
result = remainingComparators.every((otherComparator) => {
|
|
1002
|
-
return testComparator.intersects(otherComparator, options);
|
|
1003
|
-
});
|
|
1004
|
-
testComparator = remainingComparators.pop();
|
|
1005
|
-
}
|
|
1006
|
-
return result;
|
|
1007
|
-
};
|
|
1008
|
-
var parseComparator = (comp, options) => {
|
|
1009
|
-
debug4("comp", comp, options);
|
|
1010
|
-
comp = replaceCarets(comp, options);
|
|
1011
|
-
debug4("caret", comp);
|
|
1012
|
-
comp = replaceTildes(comp, options);
|
|
1013
|
-
debug4("tildes", comp);
|
|
1014
|
-
comp = replaceXRanges(comp, options);
|
|
1015
|
-
debug4("xrange", comp);
|
|
1016
|
-
comp = replaceStars(comp, options);
|
|
1017
|
-
debug4("stars", comp);
|
|
1018
|
-
return comp;
|
|
1019
|
-
};
|
|
1020
|
-
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
1021
|
-
var replaceTildes = (comp, options) => {
|
|
1022
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
1023
|
-
};
|
|
1024
|
-
var replaceTilde = (comp, options) => {
|
|
1025
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
1026
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1027
|
-
debug4("tilde", comp, _, M, m, p, pr);
|
|
1028
|
-
let ret;
|
|
1029
|
-
if (isX(M)) {
|
|
1030
|
-
ret = "";
|
|
1031
|
-
} else if (isX(m)) {
|
|
1032
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
1033
|
-
} else if (isX(p)) {
|
|
1034
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
1035
|
-
} else if (pr) {
|
|
1036
|
-
debug4("replaceTilde pr", pr);
|
|
1037
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1038
|
-
} else {
|
|
1039
|
-
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
1040
|
-
}
|
|
1041
|
-
debug4("tilde return", ret);
|
|
1042
|
-
return ret;
|
|
1043
|
-
});
|
|
1044
|
-
};
|
|
1045
|
-
var replaceCarets = (comp, options) => {
|
|
1046
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
1047
|
-
};
|
|
1048
|
-
var replaceCaret = (comp, options) => {
|
|
1049
|
-
debug4("caret", comp, options);
|
|
1050
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
1051
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
1052
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1053
|
-
debug4("caret", comp, _, M, m, p, pr);
|
|
1054
|
-
let ret;
|
|
1055
|
-
if (isX(M)) {
|
|
1056
|
-
ret = "";
|
|
1057
|
-
} else if (isX(m)) {
|
|
1058
|
-
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
1059
|
-
} else if (isX(p)) {
|
|
1060
|
-
if (M === "0") {
|
|
1061
|
-
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
1062
|
-
} else {
|
|
1063
|
-
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
1064
|
-
}
|
|
1065
|
-
} else if (pr) {
|
|
1066
|
-
debug4("replaceCaret pr", pr);
|
|
1067
|
-
if (M === "0") {
|
|
1068
|
-
if (m === "0") {
|
|
1069
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
1070
|
-
} else {
|
|
1071
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1072
|
-
}
|
|
1073
|
-
} else {
|
|
1074
|
-
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
1075
|
-
}
|
|
1076
|
-
} else {
|
|
1077
|
-
debug4("no pr");
|
|
1078
|
-
if (M === "0") {
|
|
1079
|
-
if (m === "0") {
|
|
1080
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
1081
|
-
} else {
|
|
1082
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
1083
|
-
}
|
|
1084
|
-
} else {
|
|
1085
|
-
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
debug4("caret return", ret);
|
|
1089
|
-
return ret;
|
|
1090
|
-
});
|
|
1091
|
-
};
|
|
1092
|
-
var replaceXRanges = (comp, options) => {
|
|
1093
|
-
debug4("replaceXRanges", comp, options);
|
|
1094
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
1095
|
-
};
|
|
1096
|
-
var replaceXRange = (comp, options) => {
|
|
1097
|
-
comp = comp.trim();
|
|
1098
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
1099
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
1100
|
-
debug4("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
1101
|
-
const xM = isX(M);
|
|
1102
|
-
const xm = xM || isX(m);
|
|
1103
|
-
const xp = xm || isX(p);
|
|
1104
|
-
const anyX = xp;
|
|
1105
|
-
if (gtlt === "=" && anyX) {
|
|
1106
|
-
gtlt = "";
|
|
1107
|
-
}
|
|
1108
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
1109
|
-
if (xM) {
|
|
1110
|
-
if (gtlt === ">" || gtlt === "<") {
|
|
1111
|
-
ret = "<0.0.0-0";
|
|
1112
|
-
} else {
|
|
1113
|
-
ret = "*";
|
|
1114
|
-
}
|
|
1115
|
-
} else if (gtlt && anyX) {
|
|
1116
|
-
if (xm) {
|
|
1117
|
-
m = 0;
|
|
1118
|
-
}
|
|
1119
|
-
p = 0;
|
|
1120
|
-
if (gtlt === ">") {
|
|
1121
|
-
gtlt = ">=";
|
|
1122
|
-
if (xm) {
|
|
1123
|
-
M = +M + 1;
|
|
1124
|
-
m = 0;
|
|
1125
|
-
p = 0;
|
|
1126
|
-
} else {
|
|
1127
|
-
m = +m + 1;
|
|
1128
|
-
p = 0;
|
|
1129
|
-
}
|
|
1130
|
-
} else if (gtlt === "<=") {
|
|
1131
|
-
gtlt = "<";
|
|
1132
|
-
if (xm) {
|
|
1133
|
-
M = +M + 1;
|
|
1134
|
-
} else {
|
|
1135
|
-
m = +m + 1;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
if (gtlt === "<") {
|
|
1139
|
-
pr = "-0";
|
|
1140
|
-
}
|
|
1141
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
1142
|
-
} else if (xm) {
|
|
1143
|
-
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
1144
|
-
} else if (xp) {
|
|
1145
|
-
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
1146
|
-
}
|
|
1147
|
-
debug4("xRange return", ret);
|
|
1148
|
-
return ret;
|
|
1149
|
-
});
|
|
1150
|
-
};
|
|
1151
|
-
var replaceStars = (comp, options) => {
|
|
1152
|
-
debug4("replaceStars", comp, options);
|
|
1153
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
1154
|
-
};
|
|
1155
|
-
var replaceGTE0 = (comp, options) => {
|
|
1156
|
-
debug4("replaceGTE0", comp, options);
|
|
1157
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
1158
|
-
};
|
|
1159
|
-
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
1160
|
-
if (isX(fM)) {
|
|
1161
|
-
from = "";
|
|
1162
|
-
} else if (isX(fm)) {
|
|
1163
|
-
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
1164
|
-
} else if (isX(fp)) {
|
|
1165
|
-
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
1166
|
-
} else if (fpr) {
|
|
1167
|
-
from = `>=${from}`;
|
|
1168
|
-
} else {
|
|
1169
|
-
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
1170
|
-
}
|
|
1171
|
-
if (isX(tM)) {
|
|
1172
|
-
to = "";
|
|
1173
|
-
} else if (isX(tm)) {
|
|
1174
|
-
to = `<${+tM + 1}.0.0-0`;
|
|
1175
|
-
} else if (isX(tp)) {
|
|
1176
|
-
to = `<${tM}.${+tm + 1}.0-0`;
|
|
1177
|
-
} else if (tpr) {
|
|
1178
|
-
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
1179
|
-
} else if (incPr) {
|
|
1180
|
-
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
1181
|
-
} else {
|
|
1182
|
-
to = `<=${to}`;
|
|
1183
|
-
}
|
|
1184
|
-
return `${from} ${to}`.trim();
|
|
1185
|
-
};
|
|
1186
|
-
var testSet = (set, version, options) => {
|
|
1187
|
-
for (let i = 0; i < set.length; i++) {
|
|
1188
|
-
if (!set[i].test(version)) {
|
|
1189
|
-
return false;
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
1193
|
-
for (let i = 0; i < set.length; i++) {
|
|
1194
|
-
debug4(set[i].semver);
|
|
1195
|
-
if (set[i].semver === Comparator.ANY) {
|
|
1196
|
-
continue;
|
|
1197
|
-
}
|
|
1198
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
1199
|
-
const allowed = set[i].semver;
|
|
1200
|
-
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
|
1201
|
-
return true;
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
return false;
|
|
1206
|
-
}
|
|
1207
|
-
return true;
|
|
1208
|
-
};
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
1211
|
-
|
|
1212
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/classes/comparator.js
|
|
1213
|
-
var require_comparator = __commonJS({
|
|
1214
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/classes/comparator.js"(exports, module) {
|
|
1215
|
-
init_cjs_shims();
|
|
1216
|
-
var ANY = Symbol("SemVer ANY");
|
|
1217
|
-
var Comparator = class _Comparator {
|
|
1218
|
-
static get ANY() {
|
|
1219
|
-
return ANY;
|
|
1220
|
-
}
|
|
1221
|
-
constructor(comp, options) {
|
|
1222
|
-
options = parseOptions(options);
|
|
1223
|
-
if (comp instanceof _Comparator) {
|
|
1224
|
-
if (comp.loose === !!options.loose) {
|
|
1225
|
-
return comp;
|
|
1226
|
-
} else {
|
|
1227
|
-
comp = comp.value;
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
1231
|
-
debug4("comparator", comp, options);
|
|
1232
|
-
this.options = options;
|
|
1233
|
-
this.loose = !!options.loose;
|
|
1234
|
-
this.parse(comp);
|
|
1235
|
-
if (this.semver === ANY) {
|
|
1236
|
-
this.value = "";
|
|
1237
|
-
} else {
|
|
1238
|
-
this.value = this.operator + this.semver.version;
|
|
1239
|
-
}
|
|
1240
|
-
debug4("comp", this);
|
|
1241
|
-
}
|
|
1242
|
-
parse(comp) {
|
|
1243
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
1244
|
-
const m = comp.match(r);
|
|
1245
|
-
if (!m) {
|
|
1246
|
-
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
1247
|
-
}
|
|
1248
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
1249
|
-
if (this.operator === "=") {
|
|
1250
|
-
this.operator = "";
|
|
1251
|
-
}
|
|
1252
|
-
if (!m[2]) {
|
|
1253
|
-
this.semver = ANY;
|
|
1254
|
-
} else {
|
|
1255
|
-
this.semver = new SemVer(m[2], this.options.loose);
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
toString() {
|
|
1259
|
-
return this.value;
|
|
1260
|
-
}
|
|
1261
|
-
test(version) {
|
|
1262
|
-
debug4("Comparator.test", version, this.options.loose);
|
|
1263
|
-
if (this.semver === ANY || version === ANY) {
|
|
1264
|
-
return true;
|
|
1265
|
-
}
|
|
1266
|
-
if (typeof version === "string") {
|
|
1267
|
-
try {
|
|
1268
|
-
version = new SemVer(version, this.options);
|
|
1269
|
-
} catch (er) {
|
|
1270
|
-
return false;
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
1274
|
-
}
|
|
1275
|
-
intersects(comp, options) {
|
|
1276
|
-
if (!(comp instanceof _Comparator)) {
|
|
1277
|
-
throw new TypeError("a Comparator is required");
|
|
1278
|
-
}
|
|
1279
|
-
if (this.operator === "") {
|
|
1280
|
-
if (this.value === "") {
|
|
1281
|
-
return true;
|
|
1282
|
-
}
|
|
1283
|
-
return new Range(comp.value, options).test(this.value);
|
|
1284
|
-
} else if (comp.operator === "") {
|
|
1285
|
-
if (comp.value === "") {
|
|
1286
|
-
return true;
|
|
1287
|
-
}
|
|
1288
|
-
return new Range(this.value, options).test(comp.semver);
|
|
1289
|
-
}
|
|
1290
|
-
options = parseOptions(options);
|
|
1291
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
1292
|
-
return false;
|
|
1293
|
-
}
|
|
1294
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
1295
|
-
return false;
|
|
1296
|
-
}
|
|
1297
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
1298
|
-
return true;
|
|
1299
|
-
}
|
|
1300
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
1301
|
-
return true;
|
|
1302
|
-
}
|
|
1303
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
1304
|
-
return true;
|
|
1305
|
-
}
|
|
1306
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
1307
|
-
return true;
|
|
1308
|
-
}
|
|
1309
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
1310
|
-
return true;
|
|
1311
|
-
}
|
|
1312
|
-
return false;
|
|
1313
|
-
}
|
|
1314
|
-
};
|
|
1315
|
-
module.exports = Comparator;
|
|
1316
|
-
var parseOptions = require_parse_options();
|
|
1317
|
-
var { safeRe: re, t } = require_re();
|
|
1318
|
-
var cmp = require_cmp();
|
|
1319
|
-
var debug4 = require_debug();
|
|
1320
|
-
var SemVer = require_semver();
|
|
1321
|
-
var Range = require_range();
|
|
1322
|
-
}
|
|
1323
|
-
});
|
|
1324
|
-
|
|
1325
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/functions/satisfies.js
|
|
1326
|
-
var require_satisfies = __commonJS({
|
|
1327
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/functions/satisfies.js"(exports, module) {
|
|
1328
|
-
init_cjs_shims();
|
|
1329
|
-
var Range = require_range();
|
|
1330
|
-
var satisfies = (version, range, options) => {
|
|
1331
|
-
try {
|
|
1332
|
-
range = new Range(range, options);
|
|
1333
|
-
} catch (er) {
|
|
1334
|
-
return false;
|
|
1335
|
-
}
|
|
1336
|
-
return range.test(version);
|
|
1337
|
-
};
|
|
1338
|
-
module.exports = satisfies;
|
|
1339
|
-
}
|
|
1340
|
-
});
|
|
1341
|
-
|
|
1342
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/to-comparators.js
|
|
1343
|
-
var require_to_comparators = __commonJS({
|
|
1344
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/to-comparators.js"(exports, module) {
|
|
1345
|
-
init_cjs_shims();
|
|
1346
|
-
var Range = require_range();
|
|
1347
|
-
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1348
|
-
module.exports = toComparators;
|
|
1349
|
-
}
|
|
1350
|
-
});
|
|
1351
|
-
|
|
1352
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/max-satisfying.js
|
|
1353
|
-
var require_max_satisfying = __commonJS({
|
|
1354
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
|
|
1355
|
-
init_cjs_shims();
|
|
1356
|
-
var SemVer = require_semver();
|
|
1357
|
-
var Range = require_range();
|
|
1358
|
-
var maxSatisfying = (versions, range, options) => {
|
|
1359
|
-
let max = null;
|
|
1360
|
-
let maxSV = null;
|
|
1361
|
-
let rangeObj = null;
|
|
1362
|
-
try {
|
|
1363
|
-
rangeObj = new Range(range, options);
|
|
1364
|
-
} catch (er) {
|
|
1365
|
-
return null;
|
|
1366
|
-
}
|
|
1367
|
-
versions.forEach((v) => {
|
|
1368
|
-
if (rangeObj.test(v)) {
|
|
1369
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
1370
|
-
max = v;
|
|
1371
|
-
maxSV = new SemVer(max, options);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
});
|
|
1375
|
-
return max;
|
|
1376
|
-
};
|
|
1377
|
-
module.exports = maxSatisfying;
|
|
1378
|
-
}
|
|
1379
|
-
});
|
|
1380
|
-
|
|
1381
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/min-satisfying.js
|
|
1382
|
-
var require_min_satisfying = __commonJS({
|
|
1383
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
|
|
1384
|
-
init_cjs_shims();
|
|
1385
|
-
var SemVer = require_semver();
|
|
1386
|
-
var Range = require_range();
|
|
1387
|
-
var minSatisfying = (versions, range, options) => {
|
|
1388
|
-
let min = null;
|
|
1389
|
-
let minSV = null;
|
|
1390
|
-
let rangeObj = null;
|
|
1391
|
-
try {
|
|
1392
|
-
rangeObj = new Range(range, options);
|
|
1393
|
-
} catch (er) {
|
|
1394
|
-
return null;
|
|
1395
|
-
}
|
|
1396
|
-
versions.forEach((v) => {
|
|
1397
|
-
if (rangeObj.test(v)) {
|
|
1398
|
-
if (!min || minSV.compare(v) === 1) {
|
|
1399
|
-
min = v;
|
|
1400
|
-
minSV = new SemVer(min, options);
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
});
|
|
1404
|
-
return min;
|
|
1405
|
-
};
|
|
1406
|
-
module.exports = minSatisfying;
|
|
1407
|
-
}
|
|
1408
|
-
});
|
|
1409
|
-
|
|
1410
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/min-version.js
|
|
1411
|
-
var require_min_version = __commonJS({
|
|
1412
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/min-version.js"(exports, module) {
|
|
1413
|
-
init_cjs_shims();
|
|
1414
|
-
var SemVer = require_semver();
|
|
1415
|
-
var Range = require_range();
|
|
1416
|
-
var gt2 = require_gt();
|
|
1417
|
-
var minVersion = (range, loose) => {
|
|
1418
|
-
range = new Range(range, loose);
|
|
1419
|
-
let minver = new SemVer("0.0.0");
|
|
1420
|
-
if (range.test(minver)) {
|
|
1421
|
-
return minver;
|
|
1422
|
-
}
|
|
1423
|
-
minver = new SemVer("0.0.0-0");
|
|
1424
|
-
if (range.test(minver)) {
|
|
1425
|
-
return minver;
|
|
1426
|
-
}
|
|
1427
|
-
minver = null;
|
|
1428
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1429
|
-
const comparators = range.set[i];
|
|
1430
|
-
let setMin = null;
|
|
1431
|
-
comparators.forEach((comparator) => {
|
|
1432
|
-
const compver = new SemVer(comparator.semver.version);
|
|
1433
|
-
switch (comparator.operator) {
|
|
1434
|
-
case ">":
|
|
1435
|
-
if (compver.prerelease.length === 0) {
|
|
1436
|
-
compver.patch++;
|
|
1437
|
-
} else {
|
|
1438
|
-
compver.prerelease.push(0);
|
|
1439
|
-
}
|
|
1440
|
-
compver.raw = compver.format();
|
|
1441
|
-
case "":
|
|
1442
|
-
case ">=":
|
|
1443
|
-
if (!setMin || gt2(compver, setMin)) {
|
|
1444
|
-
setMin = compver;
|
|
1445
|
-
}
|
|
1446
|
-
break;
|
|
1447
|
-
case "<":
|
|
1448
|
-
case "<=":
|
|
1449
|
-
break;
|
|
1450
|
-
default:
|
|
1451
|
-
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1452
|
-
}
|
|
1453
|
-
});
|
|
1454
|
-
if (setMin && (!minver || gt2(minver, setMin))) {
|
|
1455
|
-
minver = setMin;
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
if (minver && range.test(minver)) {
|
|
1459
|
-
return minver;
|
|
1460
|
-
}
|
|
1461
|
-
return null;
|
|
1462
|
-
};
|
|
1463
|
-
module.exports = minVersion;
|
|
1464
|
-
}
|
|
1465
|
-
});
|
|
1466
|
-
|
|
1467
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/valid.js
|
|
1468
|
-
var require_valid2 = __commonJS({
|
|
1469
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/valid.js"(exports, module) {
|
|
1470
|
-
init_cjs_shims();
|
|
1471
|
-
var Range = require_range();
|
|
1472
|
-
var validRange2 = (range, options) => {
|
|
1473
|
-
try {
|
|
1474
|
-
return new Range(range, options).range || "*";
|
|
1475
|
-
} catch (er) {
|
|
1476
|
-
return null;
|
|
1477
|
-
}
|
|
1478
|
-
};
|
|
1479
|
-
module.exports = validRange2;
|
|
1480
|
-
}
|
|
1481
|
-
});
|
|
1482
|
-
|
|
1483
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/outside.js
|
|
1484
|
-
var require_outside = __commonJS({
|
|
1485
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/outside.js"(exports, module) {
|
|
1486
|
-
init_cjs_shims();
|
|
1487
|
-
var SemVer = require_semver();
|
|
1488
|
-
var Comparator = require_comparator();
|
|
1489
|
-
var { ANY } = Comparator;
|
|
1490
|
-
var Range = require_range();
|
|
1491
|
-
var satisfies = require_satisfies();
|
|
1492
|
-
var gt2 = require_gt();
|
|
1493
|
-
var lt = require_lt();
|
|
1494
|
-
var lte = require_lte();
|
|
1495
|
-
var gte = require_gte();
|
|
1496
|
-
var outside = (version, range, hilo, options) => {
|
|
1497
|
-
version = new SemVer(version, options);
|
|
1498
|
-
range = new Range(range, options);
|
|
1499
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1500
|
-
switch (hilo) {
|
|
1501
|
-
case ">":
|
|
1502
|
-
gtfn = gt2;
|
|
1503
|
-
ltefn = lte;
|
|
1504
|
-
ltfn = lt;
|
|
1505
|
-
comp = ">";
|
|
1506
|
-
ecomp = ">=";
|
|
1507
|
-
break;
|
|
1508
|
-
case "<":
|
|
1509
|
-
gtfn = lt;
|
|
1510
|
-
ltefn = gte;
|
|
1511
|
-
ltfn = gt2;
|
|
1512
|
-
comp = "<";
|
|
1513
|
-
ecomp = "<=";
|
|
1514
|
-
break;
|
|
1515
|
-
default:
|
|
1516
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
1517
|
-
}
|
|
1518
|
-
if (satisfies(version, range, options)) {
|
|
1519
|
-
return false;
|
|
1520
|
-
}
|
|
1521
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1522
|
-
const comparators = range.set[i];
|
|
1523
|
-
let high = null;
|
|
1524
|
-
let low = null;
|
|
1525
|
-
comparators.forEach((comparator) => {
|
|
1526
|
-
if (comparator.semver === ANY) {
|
|
1527
|
-
comparator = new Comparator(">=0.0.0");
|
|
1528
|
-
}
|
|
1529
|
-
high = high || comparator;
|
|
1530
|
-
low = low || comparator;
|
|
1531
|
-
if (gtfn(comparator.semver, high.semver, options)) {
|
|
1532
|
-
high = comparator;
|
|
1533
|
-
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
1534
|
-
low = comparator;
|
|
1535
|
-
}
|
|
1536
|
-
});
|
|
1537
|
-
if (high.operator === comp || high.operator === ecomp) {
|
|
1538
|
-
return false;
|
|
1539
|
-
}
|
|
1540
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
|
1541
|
-
return false;
|
|
1542
|
-
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
1543
|
-
return false;
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
return true;
|
|
1547
|
-
};
|
|
1548
|
-
module.exports = outside;
|
|
1549
|
-
}
|
|
1550
|
-
});
|
|
1551
|
-
|
|
1552
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/gtr.js
|
|
1553
|
-
var require_gtr = __commonJS({
|
|
1554
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/gtr.js"(exports, module) {
|
|
1555
|
-
init_cjs_shims();
|
|
1556
|
-
var outside = require_outside();
|
|
1557
|
-
var gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1558
|
-
module.exports = gtr;
|
|
1559
|
-
}
|
|
1560
|
-
});
|
|
1561
|
-
|
|
1562
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/ltr.js
|
|
1563
|
-
var require_ltr = __commonJS({
|
|
1564
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/ltr.js"(exports, module) {
|
|
1565
|
-
init_cjs_shims();
|
|
1566
|
-
var outside = require_outside();
|
|
1567
|
-
var ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1568
|
-
module.exports = ltr;
|
|
1569
|
-
}
|
|
1570
|
-
});
|
|
1571
|
-
|
|
1572
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/intersects.js
|
|
1573
|
-
var require_intersects = __commonJS({
|
|
1574
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/intersects.js"(exports, module) {
|
|
1575
|
-
init_cjs_shims();
|
|
1576
|
-
var Range = require_range();
|
|
1577
|
-
var intersects = (r1, r2, options) => {
|
|
1578
|
-
r1 = new Range(r1, options);
|
|
1579
|
-
r2 = new Range(r2, options);
|
|
1580
|
-
return r1.intersects(r2, options);
|
|
1581
|
-
};
|
|
1582
|
-
module.exports = intersects;
|
|
1583
|
-
}
|
|
1584
|
-
});
|
|
1585
|
-
|
|
1586
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/simplify.js
|
|
1587
|
-
var require_simplify = __commonJS({
|
|
1588
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/simplify.js"(exports, module) {
|
|
1589
|
-
init_cjs_shims();
|
|
1590
|
-
var satisfies = require_satisfies();
|
|
1591
|
-
var compare2 = require_compare();
|
|
1592
|
-
module.exports = (versions, range, options) => {
|
|
1593
|
-
const set = [];
|
|
1594
|
-
let first = null;
|
|
1595
|
-
let prev = null;
|
|
1596
|
-
const v = versions.sort((a, b) => compare2(a, b, options));
|
|
1597
|
-
for (const version of v) {
|
|
1598
|
-
const included = satisfies(version, range, options);
|
|
1599
|
-
if (included) {
|
|
1600
|
-
prev = version;
|
|
1601
|
-
if (!first) {
|
|
1602
|
-
first = version;
|
|
1603
|
-
}
|
|
1604
|
-
} else {
|
|
1605
|
-
if (prev) {
|
|
1606
|
-
set.push([first, prev]);
|
|
1607
|
-
}
|
|
1608
|
-
prev = null;
|
|
1609
|
-
first = null;
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
if (first) {
|
|
1613
|
-
set.push([first, null]);
|
|
1614
|
-
}
|
|
1615
|
-
const ranges = [];
|
|
1616
|
-
for (const [min, max] of set) {
|
|
1617
|
-
if (min === max) {
|
|
1618
|
-
ranges.push(min);
|
|
1619
|
-
} else if (!max && min === v[0]) {
|
|
1620
|
-
ranges.push("*");
|
|
1621
|
-
} else if (!max) {
|
|
1622
|
-
ranges.push(`>=${min}`);
|
|
1623
|
-
} else if (min === v[0]) {
|
|
1624
|
-
ranges.push(`<=${max}`);
|
|
1625
|
-
} else {
|
|
1626
|
-
ranges.push(`${min} - ${max}`);
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
|
-
const simplified = ranges.join(" || ");
|
|
1630
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1631
|
-
return simplified.length < original.length ? simplified : range;
|
|
1632
|
-
};
|
|
1633
|
-
}
|
|
1634
|
-
});
|
|
1635
|
-
|
|
1636
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/subset.js
|
|
1637
|
-
var require_subset = __commonJS({
|
|
1638
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/ranges/subset.js"(exports, module) {
|
|
1639
|
-
init_cjs_shims();
|
|
1640
|
-
var Range = require_range();
|
|
1641
|
-
var Comparator = require_comparator();
|
|
1642
|
-
var { ANY } = Comparator;
|
|
1643
|
-
var satisfies = require_satisfies();
|
|
1644
|
-
var compare2 = require_compare();
|
|
1645
|
-
var subset = (sub, dom, options = {}) => {
|
|
1646
|
-
if (sub === dom) {
|
|
1647
|
-
return true;
|
|
1648
|
-
}
|
|
1649
|
-
sub = new Range(sub, options);
|
|
1650
|
-
dom = new Range(dom, options);
|
|
1651
|
-
let sawNonNull = false;
|
|
1652
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
1653
|
-
for (const simpleDom of dom.set) {
|
|
1654
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
1655
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
1656
|
-
if (isSub) {
|
|
1657
|
-
continue OUTER;
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
if (sawNonNull) {
|
|
1661
|
-
return false;
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
return true;
|
|
1665
|
-
};
|
|
1666
|
-
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1667
|
-
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
1668
|
-
var simpleSubset = (sub, dom, options) => {
|
|
1669
|
-
if (sub === dom) {
|
|
1670
|
-
return true;
|
|
1671
|
-
}
|
|
1672
|
-
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
1673
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
1674
|
-
return true;
|
|
1675
|
-
} else if (options.includePrerelease) {
|
|
1676
|
-
sub = minimumVersionWithPreRelease;
|
|
1677
|
-
} else {
|
|
1678
|
-
sub = minimumVersion;
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
1682
|
-
if (options.includePrerelease) {
|
|
1683
|
-
return true;
|
|
1684
|
-
} else {
|
|
1685
|
-
dom = minimumVersion;
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
1689
|
-
let gt2, lt;
|
|
1690
|
-
for (const c of sub) {
|
|
1691
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
1692
|
-
gt2 = higherGT(gt2, c, options);
|
|
1693
|
-
} else if (c.operator === "<" || c.operator === "<=") {
|
|
1694
|
-
lt = lowerLT(lt, c, options);
|
|
1695
|
-
} else {
|
|
1696
|
-
eqSet.add(c.semver);
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
if (eqSet.size > 1) {
|
|
1700
|
-
return null;
|
|
1701
|
-
}
|
|
1702
|
-
let gtltComp;
|
|
1703
|
-
if (gt2 && lt) {
|
|
1704
|
-
gtltComp = compare2(gt2.semver, lt.semver, options);
|
|
1705
|
-
if (gtltComp > 0) {
|
|
1706
|
-
return null;
|
|
1707
|
-
} else if (gtltComp === 0 && (gt2.operator !== ">=" || lt.operator !== "<=")) {
|
|
1708
|
-
return null;
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
for (const eq of eqSet) {
|
|
1712
|
-
if (gt2 && !satisfies(eq, String(gt2), options)) {
|
|
1713
|
-
return null;
|
|
1714
|
-
}
|
|
1715
|
-
if (lt && !satisfies(eq, String(lt), options)) {
|
|
1716
|
-
return null;
|
|
1717
|
-
}
|
|
1718
|
-
for (const c of dom) {
|
|
1719
|
-
if (!satisfies(eq, String(c), options)) {
|
|
1720
|
-
return false;
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
return true;
|
|
1724
|
-
}
|
|
1725
|
-
let higher, lower;
|
|
1726
|
-
let hasDomLT, hasDomGT;
|
|
1727
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1728
|
-
let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false;
|
|
1729
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
1730
|
-
needDomLTPre = false;
|
|
1731
|
-
}
|
|
1732
|
-
for (const c of dom) {
|
|
1733
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1734
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1735
|
-
if (gt2) {
|
|
1736
|
-
if (needDomGTPre) {
|
|
1737
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
1738
|
-
needDomGTPre = false;
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
1742
|
-
higher = higherGT(gt2, c, options);
|
|
1743
|
-
if (higher === c && higher !== gt2) {
|
|
1744
|
-
return false;
|
|
1745
|
-
}
|
|
1746
|
-
} else if (gt2.operator === ">=" && !satisfies(gt2.semver, String(c), options)) {
|
|
1747
|
-
return false;
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
if (lt) {
|
|
1751
|
-
if (needDomLTPre) {
|
|
1752
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
1753
|
-
needDomLTPre = false;
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
1757
|
-
lower = lowerLT(lt, c, options);
|
|
1758
|
-
if (lower === c && lower !== lt) {
|
|
1759
|
-
return false;
|
|
1760
|
-
}
|
|
1761
|
-
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
|
|
1762
|
-
return false;
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
if (!c.operator && (lt || gt2) && gtltComp !== 0) {
|
|
1766
|
-
return false;
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
if (gt2 && hasDomLT && !lt && gtltComp !== 0) {
|
|
1770
|
-
return false;
|
|
1771
|
-
}
|
|
1772
|
-
if (lt && hasDomGT && !gt2 && gtltComp !== 0) {
|
|
1773
|
-
return false;
|
|
1774
|
-
}
|
|
1775
|
-
if (needDomGTPre || needDomLTPre) {
|
|
1776
|
-
return false;
|
|
1777
|
-
}
|
|
1778
|
-
return true;
|
|
1779
|
-
};
|
|
1780
|
-
var higherGT = (a, b, options) => {
|
|
1781
|
-
if (!a) {
|
|
1782
|
-
return b;
|
|
1783
|
-
}
|
|
1784
|
-
const comp = compare2(a.semver, b.semver, options);
|
|
1785
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1786
|
-
};
|
|
1787
|
-
var lowerLT = (a, b, options) => {
|
|
1788
|
-
if (!a) {
|
|
1789
|
-
return b;
|
|
1790
|
-
}
|
|
1791
|
-
const comp = compare2(a.semver, b.semver, options);
|
|
1792
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1793
|
-
};
|
|
1794
|
-
module.exports = subset;
|
|
1795
|
-
}
|
|
1796
|
-
});
|
|
1797
|
-
|
|
1798
|
-
// node_modules/@oclif/plugin-plugins/node_modules/semver/index.js
|
|
1799
|
-
var require_semver2 = __commonJS({
|
|
1800
|
-
"node_modules/@oclif/plugin-plugins/node_modules/semver/index.js"(exports, module) {
|
|
1801
|
-
init_cjs_shims();
|
|
1802
|
-
var internalRe = require_re();
|
|
1803
|
-
var constants = require_constants();
|
|
1804
|
-
var SemVer = require_semver();
|
|
1805
|
-
var identifiers = require_identifiers();
|
|
1806
|
-
var parse = require_parse();
|
|
1807
|
-
var valid2 = require_valid();
|
|
1808
|
-
var clean = require_clean();
|
|
1809
|
-
var inc = require_inc();
|
|
1810
|
-
var diff = require_diff();
|
|
1811
|
-
var major = require_major();
|
|
1812
|
-
var minor = require_minor();
|
|
1813
|
-
var patch = require_patch();
|
|
1814
|
-
var prerelease = require_prerelease();
|
|
1815
|
-
var compare2 = require_compare();
|
|
1816
|
-
var rcompare = require_rcompare();
|
|
1817
|
-
var compareLoose = require_compare_loose();
|
|
1818
|
-
var compareBuild = require_compare_build();
|
|
1819
|
-
var sort = require_sort();
|
|
1820
|
-
var rsort = require_rsort();
|
|
1821
|
-
var gt2 = require_gt();
|
|
1822
|
-
var lt = require_lt();
|
|
1823
|
-
var eq = require_eq();
|
|
1824
|
-
var neq = require_neq();
|
|
1825
|
-
var gte = require_gte();
|
|
1826
|
-
var lte = require_lte();
|
|
1827
|
-
var cmp = require_cmp();
|
|
1828
|
-
var coerce = require_coerce();
|
|
1829
|
-
var Comparator = require_comparator();
|
|
1830
|
-
var Range = require_range();
|
|
1831
|
-
var satisfies = require_satisfies();
|
|
1832
|
-
var toComparators = require_to_comparators();
|
|
1833
|
-
var maxSatisfying = require_max_satisfying();
|
|
1834
|
-
var minSatisfying = require_min_satisfying();
|
|
1835
|
-
var minVersion = require_min_version();
|
|
1836
|
-
var validRange2 = require_valid2();
|
|
1837
|
-
var outside = require_outside();
|
|
1838
|
-
var gtr = require_gtr();
|
|
1839
|
-
var ltr = require_ltr();
|
|
1840
|
-
var intersects = require_intersects();
|
|
1841
|
-
var simplifyRange = require_simplify();
|
|
1842
|
-
var subset = require_subset();
|
|
1843
|
-
module.exports = {
|
|
1844
|
-
parse,
|
|
1845
|
-
valid: valid2,
|
|
1846
|
-
clean,
|
|
1847
|
-
inc,
|
|
1848
|
-
diff,
|
|
1849
|
-
major,
|
|
1850
|
-
minor,
|
|
1851
|
-
patch,
|
|
1852
|
-
prerelease,
|
|
1853
|
-
compare: compare2,
|
|
1854
|
-
rcompare,
|
|
1855
|
-
compareLoose,
|
|
1856
|
-
compareBuild,
|
|
1857
|
-
sort,
|
|
1858
|
-
rsort,
|
|
1859
|
-
gt: gt2,
|
|
1860
|
-
lt,
|
|
1861
|
-
eq,
|
|
1862
|
-
neq,
|
|
1863
|
-
gte,
|
|
1864
|
-
lte,
|
|
1865
|
-
cmp,
|
|
1866
|
-
coerce,
|
|
1867
|
-
Comparator,
|
|
1868
|
-
Range,
|
|
1869
|
-
satisfies,
|
|
1870
|
-
toComparators,
|
|
1871
|
-
maxSatisfying,
|
|
1872
|
-
minSatisfying,
|
|
1873
|
-
minVersion,
|
|
1874
|
-
validRange: validRange2,
|
|
1875
|
-
outside,
|
|
1876
|
-
gtr,
|
|
1877
|
-
ltr,
|
|
1878
|
-
intersects,
|
|
1879
|
-
simplifyRange,
|
|
1880
|
-
subset,
|
|
1881
|
-
SemVer,
|
|
1882
|
-
re: internalRe.re,
|
|
1883
|
-
src: internalRe.src,
|
|
1884
|
-
tokens: internalRe.t,
|
|
1885
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
1886
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
1887
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1888
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1889
|
-
};
|
|
1890
|
-
}
|
|
1891
|
-
});
|
|
1892
|
-
|
|
1893
|
-
// node_modules/@oclif/plugin-plugins/node_modules/validate-npm-package-name/lib/index.js
|
|
1894
|
-
var require_lib2 = __commonJS({
|
|
1895
|
-
"node_modules/@oclif/plugin-plugins/node_modules/validate-npm-package-name/lib/index.js"(exports, module) {
|
|
1896
|
-
"use strict";
|
|
1897
|
-
init_cjs_shims();
|
|
1898
|
-
var { builtinModules: builtins } = __require("module");
|
|
1899
|
-
var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
|
|
1900
|
-
var blacklist = [
|
|
1901
|
-
"node_modules",
|
|
1902
|
-
"favicon.ico"
|
|
1903
|
-
];
|
|
1904
|
-
function validate2(name) {
|
|
1905
|
-
var warnings = [];
|
|
1906
|
-
var errors = [];
|
|
1907
|
-
if (name === null) {
|
|
1908
|
-
errors.push("name cannot be null");
|
|
1909
|
-
return done(warnings, errors);
|
|
1910
|
-
}
|
|
1911
|
-
if (name === void 0) {
|
|
1912
|
-
errors.push("name cannot be undefined");
|
|
1913
|
-
return done(warnings, errors);
|
|
1914
|
-
}
|
|
1915
|
-
if (typeof name !== "string") {
|
|
1916
|
-
errors.push("name must be a string");
|
|
1917
|
-
return done(warnings, errors);
|
|
1918
|
-
}
|
|
1919
|
-
if (!name.length) {
|
|
1920
|
-
errors.push("name length must be greater than zero");
|
|
1921
|
-
}
|
|
1922
|
-
if (name.match(/^\./)) {
|
|
1923
|
-
errors.push("name cannot start with a period");
|
|
1924
|
-
}
|
|
1925
|
-
if (name.match(/^_/)) {
|
|
1926
|
-
errors.push("name cannot start with an underscore");
|
|
1927
|
-
}
|
|
1928
|
-
if (name.trim() !== name) {
|
|
1929
|
-
errors.push("name cannot contain leading or trailing spaces");
|
|
1930
|
-
}
|
|
1931
|
-
blacklist.forEach(function(blacklistedName) {
|
|
1932
|
-
if (name.toLowerCase() === blacklistedName) {
|
|
1933
|
-
errors.push(blacklistedName + " is a blacklisted name");
|
|
1934
|
-
}
|
|
1935
|
-
});
|
|
1936
|
-
if (builtins.includes(name.toLowerCase())) {
|
|
1937
|
-
warnings.push(name + " is a core module name");
|
|
1938
|
-
}
|
|
1939
|
-
if (name.length > 214) {
|
|
1940
|
-
warnings.push("name can no longer contain more than 214 characters");
|
|
1941
|
-
}
|
|
1942
|
-
if (name.toLowerCase() !== name) {
|
|
1943
|
-
warnings.push("name can no longer contain capital letters");
|
|
1944
|
-
}
|
|
1945
|
-
if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) {
|
|
1946
|
-
warnings.push(`name can no longer contain special characters ("~'!()*")`);
|
|
1947
|
-
}
|
|
1948
|
-
if (encodeURIComponent(name) !== name) {
|
|
1949
|
-
var nameMatch = name.match(scopedPackagePattern);
|
|
1950
|
-
if (nameMatch) {
|
|
1951
|
-
var user = nameMatch[1];
|
|
1952
|
-
var pkg = nameMatch[2];
|
|
1953
|
-
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
|
|
1954
|
-
return done(warnings, errors);
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
errors.push("name can only contain URL-friendly characters");
|
|
1958
|
-
}
|
|
1959
|
-
return done(warnings, errors);
|
|
1960
|
-
}
|
|
1961
|
-
var done = function(warnings, errors) {
|
|
1962
|
-
var result = {
|
|
1963
|
-
validForNewPackages: errors.length === 0 && warnings.length === 0,
|
|
1964
|
-
validForOldPackages: errors.length === 0,
|
|
1965
|
-
warnings,
|
|
1966
|
-
errors
|
|
1967
|
-
};
|
|
1968
|
-
if (!result.warnings.length) {
|
|
1969
|
-
delete result.warnings;
|
|
1970
|
-
}
|
|
1971
|
-
if (!result.errors.length) {
|
|
1972
|
-
delete result.errors;
|
|
1973
|
-
}
|
|
1974
|
-
return result;
|
|
1975
|
-
};
|
|
1976
|
-
module.exports = validate2;
|
|
1977
|
-
}
|
|
1978
|
-
});
|
|
1979
|
-
|
|
1980
26
|
// src/index.ts
|
|
1981
27
|
init_cjs_shims();
|
|
1982
28
|
var import_core13 = __toESM(require_lib(), 1);
|
|
@@ -2559,7 +605,7 @@ var lib_default = (tree, opts = {}) => {
|
|
|
2559
605
|
init_cjs_shims();
|
|
2560
606
|
var import_core4 = __toESM(require_lib(), 1);
|
|
2561
607
|
var import_debug4 = __toESM(require_src(), 1);
|
|
2562
|
-
var import_semver = __toESM(
|
|
608
|
+
var import_semver = __toESM(require_semver(), 1);
|
|
2563
609
|
import { spawn as spawn2 } from "node:child_process";
|
|
2564
610
|
import { access, mkdir, readFile as readFile2, rename, rm, writeFile } from "node:fs/promises";
|
|
2565
611
|
import { basename, dirname, join as join2, resolve } from "node:path";
|
|
@@ -2947,7 +993,7 @@ var Plugins = class {
|
|
|
2947
993
|
const url = name;
|
|
2948
994
|
const output = await this.npm.install([...args, url], options);
|
|
2949
995
|
const { dependencies } = await this.pjson();
|
|
2950
|
-
const { default: npa } = await import("./npa-
|
|
996
|
+
const { default: npa } = await import("./npa-TC6TVPHC.js");
|
|
2951
997
|
const normalizedUrl = npa(url);
|
|
2952
998
|
const matches = Object.entries(dependencies ?? {}).find(([, u]) => {
|
|
2953
999
|
const normalized = npa(u);
|
|
@@ -3247,7 +1293,13 @@ var PluginsIndex = class _PluginsIndex extends import_core5.Command {
|
|
|
3247
1293
|
this.display(plugins);
|
|
3248
1294
|
this.displayJitPlugins(jitPlugins);
|
|
3249
1295
|
}
|
|
3250
|
-
return [
|
|
1296
|
+
return [
|
|
1297
|
+
...results.filter((p) => !p.parent).map((p) => {
|
|
1298
|
+
const { config, ...rest } = p;
|
|
1299
|
+
return rest;
|
|
1300
|
+
}),
|
|
1301
|
+
...jitPlugins
|
|
1302
|
+
];
|
|
3251
1303
|
}
|
|
3252
1304
|
createTree(plugin) {
|
|
3253
1305
|
const tree = {};
|