@camunda8/cli 4.7.0-alpha.24 → 4.7.0-alpha.26

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