@zeroxyz/cli 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/index.js +2250 -246
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -76448,6 +76448,2000 @@ var require_siwe = __commonJS({
|
|
|
76448
76448
|
}
|
|
76449
76449
|
});
|
|
76450
76450
|
|
|
76451
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
|
|
76452
|
+
var require_constants3 = __commonJS({
|
|
76453
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports$1, module) {
|
|
76454
|
+
init_esm_shims();
|
|
76455
|
+
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
76456
|
+
var MAX_LENGTH = 256;
|
|
76457
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
76458
|
+
9007199254740991;
|
|
76459
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
76460
|
+
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
76461
|
+
var RELEASE_TYPES = [
|
|
76462
|
+
"major",
|
|
76463
|
+
"premajor",
|
|
76464
|
+
"minor",
|
|
76465
|
+
"preminor",
|
|
76466
|
+
"patch",
|
|
76467
|
+
"prepatch",
|
|
76468
|
+
"prerelease"
|
|
76469
|
+
];
|
|
76470
|
+
module.exports = {
|
|
76471
|
+
MAX_LENGTH,
|
|
76472
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
76473
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
76474
|
+
MAX_SAFE_INTEGER,
|
|
76475
|
+
RELEASE_TYPES,
|
|
76476
|
+
SEMVER_SPEC_VERSION,
|
|
76477
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
76478
|
+
FLAG_LOOSE: 2
|
|
76479
|
+
};
|
|
76480
|
+
}
|
|
76481
|
+
});
|
|
76482
|
+
|
|
76483
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
|
|
76484
|
+
var require_debug2 = __commonJS({
|
|
76485
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports$1, module) {
|
|
76486
|
+
init_esm_shims();
|
|
76487
|
+
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
76488
|
+
};
|
|
76489
|
+
module.exports = debug;
|
|
76490
|
+
}
|
|
76491
|
+
});
|
|
76492
|
+
|
|
76493
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
|
|
76494
|
+
var require_re = __commonJS({
|
|
76495
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports$1, module) {
|
|
76496
|
+
init_esm_shims();
|
|
76497
|
+
var {
|
|
76498
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
76499
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
76500
|
+
MAX_LENGTH
|
|
76501
|
+
} = require_constants3();
|
|
76502
|
+
var debug = require_debug2();
|
|
76503
|
+
exports$1 = module.exports = {};
|
|
76504
|
+
var re = exports$1.re = [];
|
|
76505
|
+
var safeRe = exports$1.safeRe = [];
|
|
76506
|
+
var src = exports$1.src = [];
|
|
76507
|
+
var safeSrc = exports$1.safeSrc = [];
|
|
76508
|
+
var t = exports$1.t = {};
|
|
76509
|
+
var R2 = 0;
|
|
76510
|
+
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
76511
|
+
var safeRegexReplacements = [
|
|
76512
|
+
["\\s", 1],
|
|
76513
|
+
["\\d", MAX_LENGTH],
|
|
76514
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
76515
|
+
];
|
|
76516
|
+
var makeSafeRegex = (value) => {
|
|
76517
|
+
for (const [token, max] of safeRegexReplacements) {
|
|
76518
|
+
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
76519
|
+
}
|
|
76520
|
+
return value;
|
|
76521
|
+
};
|
|
76522
|
+
var createToken = (name, value, isGlobal) => {
|
|
76523
|
+
const safe = makeSafeRegex(value);
|
|
76524
|
+
const index3 = R2++;
|
|
76525
|
+
debug(name, index3, value);
|
|
76526
|
+
t[name] = index3;
|
|
76527
|
+
src[index3] = value;
|
|
76528
|
+
safeSrc[index3] = safe;
|
|
76529
|
+
re[index3] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
76530
|
+
safeRe[index3] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
76531
|
+
};
|
|
76532
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
76533
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
76534
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
76535
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
76536
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
76537
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
76538
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
76539
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
76540
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
76541
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
76542
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
76543
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
76544
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
76545
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
76546
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
76547
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
76548
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
76549
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
76550
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
76551
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
76552
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
76553
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
76554
|
+
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
76555
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
76556
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
76557
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
76558
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
76559
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
76560
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
76561
|
+
exports$1.tildeTrimReplace = "$1~";
|
|
76562
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
76563
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
76564
|
+
createToken("LONECARET", "(?:\\^)");
|
|
76565
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
76566
|
+
exports$1.caretTrimReplace = "$1^";
|
|
76567
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
76568
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
76569
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
76570
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
76571
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
76572
|
+
exports$1.comparatorTrimReplace = "$1$2$3";
|
|
76573
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
76574
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
76575
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
76576
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
76577
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
76578
|
+
}
|
|
76579
|
+
});
|
|
76580
|
+
|
|
76581
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
|
|
76582
|
+
var require_parse_options = __commonJS({
|
|
76583
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports$1, module) {
|
|
76584
|
+
init_esm_shims();
|
|
76585
|
+
var looseOption = Object.freeze({ loose: true });
|
|
76586
|
+
var emptyOpts = Object.freeze({});
|
|
76587
|
+
var parseOptions = (options) => {
|
|
76588
|
+
if (!options) {
|
|
76589
|
+
return emptyOpts;
|
|
76590
|
+
}
|
|
76591
|
+
if (typeof options !== "object") {
|
|
76592
|
+
return looseOption;
|
|
76593
|
+
}
|
|
76594
|
+
return options;
|
|
76595
|
+
};
|
|
76596
|
+
module.exports = parseOptions;
|
|
76597
|
+
}
|
|
76598
|
+
});
|
|
76599
|
+
|
|
76600
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
|
|
76601
|
+
var require_identifiers2 = __commonJS({
|
|
76602
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports$1, module) {
|
|
76603
|
+
init_esm_shims();
|
|
76604
|
+
var numeric = /^[0-9]+$/;
|
|
76605
|
+
var compareIdentifiers = (a, b3) => {
|
|
76606
|
+
if (typeof a === "number" && typeof b3 === "number") {
|
|
76607
|
+
return a === b3 ? 0 : a < b3 ? -1 : 1;
|
|
76608
|
+
}
|
|
76609
|
+
const anum2 = numeric.test(a);
|
|
76610
|
+
const bnum = numeric.test(b3);
|
|
76611
|
+
if (anum2 && bnum) {
|
|
76612
|
+
a = +a;
|
|
76613
|
+
b3 = +b3;
|
|
76614
|
+
}
|
|
76615
|
+
return a === b3 ? 0 : anum2 && !bnum ? -1 : bnum && !anum2 ? 1 : a < b3 ? -1 : 1;
|
|
76616
|
+
};
|
|
76617
|
+
var rcompareIdentifiers = (a, b3) => compareIdentifiers(b3, a);
|
|
76618
|
+
module.exports = {
|
|
76619
|
+
compareIdentifiers,
|
|
76620
|
+
rcompareIdentifiers
|
|
76621
|
+
};
|
|
76622
|
+
}
|
|
76623
|
+
});
|
|
76624
|
+
|
|
76625
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
|
|
76626
|
+
var require_semver = __commonJS({
|
|
76627
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports$1, module) {
|
|
76628
|
+
init_esm_shims();
|
|
76629
|
+
var debug = require_debug2();
|
|
76630
|
+
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3();
|
|
76631
|
+
var { safeRe: re, t } = require_re();
|
|
76632
|
+
var parseOptions = require_parse_options();
|
|
76633
|
+
var { compareIdentifiers } = require_identifiers2();
|
|
76634
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
76635
|
+
const identifiers = identifier.split(".");
|
|
76636
|
+
if (identifiers.length > prerelease.length) {
|
|
76637
|
+
return false;
|
|
76638
|
+
}
|
|
76639
|
+
for (let i = 0; i < identifiers.length; i++) {
|
|
76640
|
+
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
76641
|
+
return false;
|
|
76642
|
+
}
|
|
76643
|
+
}
|
|
76644
|
+
return true;
|
|
76645
|
+
};
|
|
76646
|
+
var SemVer = class _SemVer {
|
|
76647
|
+
constructor(version12, options) {
|
|
76648
|
+
options = parseOptions(options);
|
|
76649
|
+
if (version12 instanceof _SemVer) {
|
|
76650
|
+
if (version12.loose === !!options.loose && version12.includePrerelease === !!options.includePrerelease) {
|
|
76651
|
+
return version12;
|
|
76652
|
+
} else {
|
|
76653
|
+
version12 = version12.version;
|
|
76654
|
+
}
|
|
76655
|
+
} else if (typeof version12 !== "string") {
|
|
76656
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version12}".`);
|
|
76657
|
+
}
|
|
76658
|
+
if (version12.length > MAX_LENGTH) {
|
|
76659
|
+
throw new TypeError(
|
|
76660
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
76661
|
+
);
|
|
76662
|
+
}
|
|
76663
|
+
debug("SemVer", version12, options);
|
|
76664
|
+
this.options = options;
|
|
76665
|
+
this.loose = !!options.loose;
|
|
76666
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
76667
|
+
const m2 = version12.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
76668
|
+
if (!m2) {
|
|
76669
|
+
throw new TypeError(`Invalid Version: ${version12}`);
|
|
76670
|
+
}
|
|
76671
|
+
this.raw = version12;
|
|
76672
|
+
this.major = +m2[1];
|
|
76673
|
+
this.minor = +m2[2];
|
|
76674
|
+
this.patch = +m2[3];
|
|
76675
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
76676
|
+
throw new TypeError("Invalid major version");
|
|
76677
|
+
}
|
|
76678
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
76679
|
+
throw new TypeError("Invalid minor version");
|
|
76680
|
+
}
|
|
76681
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
76682
|
+
throw new TypeError("Invalid patch version");
|
|
76683
|
+
}
|
|
76684
|
+
if (!m2[4]) {
|
|
76685
|
+
this.prerelease = [];
|
|
76686
|
+
} else {
|
|
76687
|
+
this.prerelease = m2[4].split(".").map((id) => {
|
|
76688
|
+
if (/^[0-9]+$/.test(id)) {
|
|
76689
|
+
const num2 = +id;
|
|
76690
|
+
if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {
|
|
76691
|
+
return num2;
|
|
76692
|
+
}
|
|
76693
|
+
}
|
|
76694
|
+
return id;
|
|
76695
|
+
});
|
|
76696
|
+
}
|
|
76697
|
+
this.build = m2[5] ? m2[5].split(".") : [];
|
|
76698
|
+
this.format();
|
|
76699
|
+
}
|
|
76700
|
+
format() {
|
|
76701
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
76702
|
+
if (this.prerelease.length) {
|
|
76703
|
+
this.version += `-${this.prerelease.join(".")}`;
|
|
76704
|
+
}
|
|
76705
|
+
return this.version;
|
|
76706
|
+
}
|
|
76707
|
+
toString() {
|
|
76708
|
+
return this.version;
|
|
76709
|
+
}
|
|
76710
|
+
compare(other) {
|
|
76711
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
76712
|
+
if (!(other instanceof _SemVer)) {
|
|
76713
|
+
if (typeof other === "string" && other === this.version) {
|
|
76714
|
+
return 0;
|
|
76715
|
+
}
|
|
76716
|
+
other = new _SemVer(other, this.options);
|
|
76717
|
+
}
|
|
76718
|
+
if (other.version === this.version) {
|
|
76719
|
+
return 0;
|
|
76720
|
+
}
|
|
76721
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
76722
|
+
}
|
|
76723
|
+
compareMain(other) {
|
|
76724
|
+
if (!(other instanceof _SemVer)) {
|
|
76725
|
+
other = new _SemVer(other, this.options);
|
|
76726
|
+
}
|
|
76727
|
+
if (this.major < other.major) {
|
|
76728
|
+
return -1;
|
|
76729
|
+
}
|
|
76730
|
+
if (this.major > other.major) {
|
|
76731
|
+
return 1;
|
|
76732
|
+
}
|
|
76733
|
+
if (this.minor < other.minor) {
|
|
76734
|
+
return -1;
|
|
76735
|
+
}
|
|
76736
|
+
if (this.minor > other.minor) {
|
|
76737
|
+
return 1;
|
|
76738
|
+
}
|
|
76739
|
+
if (this.patch < other.patch) {
|
|
76740
|
+
return -1;
|
|
76741
|
+
}
|
|
76742
|
+
if (this.patch > other.patch) {
|
|
76743
|
+
return 1;
|
|
76744
|
+
}
|
|
76745
|
+
return 0;
|
|
76746
|
+
}
|
|
76747
|
+
comparePre(other) {
|
|
76748
|
+
if (!(other instanceof _SemVer)) {
|
|
76749
|
+
other = new _SemVer(other, this.options);
|
|
76750
|
+
}
|
|
76751
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
76752
|
+
return -1;
|
|
76753
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
76754
|
+
return 1;
|
|
76755
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
76756
|
+
return 0;
|
|
76757
|
+
}
|
|
76758
|
+
let i = 0;
|
|
76759
|
+
do {
|
|
76760
|
+
const a = this.prerelease[i];
|
|
76761
|
+
const b3 = other.prerelease[i];
|
|
76762
|
+
debug("prerelease compare", i, a, b3);
|
|
76763
|
+
if (a === void 0 && b3 === void 0) {
|
|
76764
|
+
return 0;
|
|
76765
|
+
} else if (b3 === void 0) {
|
|
76766
|
+
return 1;
|
|
76767
|
+
} else if (a === void 0) {
|
|
76768
|
+
return -1;
|
|
76769
|
+
} else if (a === b3) {
|
|
76770
|
+
continue;
|
|
76771
|
+
} else {
|
|
76772
|
+
return compareIdentifiers(a, b3);
|
|
76773
|
+
}
|
|
76774
|
+
} while (++i);
|
|
76775
|
+
}
|
|
76776
|
+
compareBuild(other) {
|
|
76777
|
+
if (!(other instanceof _SemVer)) {
|
|
76778
|
+
other = new _SemVer(other, this.options);
|
|
76779
|
+
}
|
|
76780
|
+
let i = 0;
|
|
76781
|
+
do {
|
|
76782
|
+
const a = this.build[i];
|
|
76783
|
+
const b3 = other.build[i];
|
|
76784
|
+
debug("build compare", i, a, b3);
|
|
76785
|
+
if (a === void 0 && b3 === void 0) {
|
|
76786
|
+
return 0;
|
|
76787
|
+
} else if (b3 === void 0) {
|
|
76788
|
+
return 1;
|
|
76789
|
+
} else if (a === void 0) {
|
|
76790
|
+
return -1;
|
|
76791
|
+
} else if (a === b3) {
|
|
76792
|
+
continue;
|
|
76793
|
+
} else {
|
|
76794
|
+
return compareIdentifiers(a, b3);
|
|
76795
|
+
}
|
|
76796
|
+
} while (++i);
|
|
76797
|
+
}
|
|
76798
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
76799
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
76800
|
+
inc(release, identifier, identifierBase) {
|
|
76801
|
+
if (release.startsWith("pre")) {
|
|
76802
|
+
if (!identifier && identifierBase === false) {
|
|
76803
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
76804
|
+
}
|
|
76805
|
+
if (identifier) {
|
|
76806
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
76807
|
+
if (!match || match[1] !== identifier) {
|
|
76808
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
76809
|
+
}
|
|
76810
|
+
}
|
|
76811
|
+
}
|
|
76812
|
+
switch (release) {
|
|
76813
|
+
case "premajor":
|
|
76814
|
+
this.prerelease.length = 0;
|
|
76815
|
+
this.patch = 0;
|
|
76816
|
+
this.minor = 0;
|
|
76817
|
+
this.major++;
|
|
76818
|
+
this.inc("pre", identifier, identifierBase);
|
|
76819
|
+
break;
|
|
76820
|
+
case "preminor":
|
|
76821
|
+
this.prerelease.length = 0;
|
|
76822
|
+
this.patch = 0;
|
|
76823
|
+
this.minor++;
|
|
76824
|
+
this.inc("pre", identifier, identifierBase);
|
|
76825
|
+
break;
|
|
76826
|
+
case "prepatch":
|
|
76827
|
+
this.prerelease.length = 0;
|
|
76828
|
+
this.inc("patch", identifier, identifierBase);
|
|
76829
|
+
this.inc("pre", identifier, identifierBase);
|
|
76830
|
+
break;
|
|
76831
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
76832
|
+
// prepatch.
|
|
76833
|
+
case "prerelease":
|
|
76834
|
+
if (this.prerelease.length === 0) {
|
|
76835
|
+
this.inc("patch", identifier, identifierBase);
|
|
76836
|
+
}
|
|
76837
|
+
this.inc("pre", identifier, identifierBase);
|
|
76838
|
+
break;
|
|
76839
|
+
case "release":
|
|
76840
|
+
if (this.prerelease.length === 0) {
|
|
76841
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
76842
|
+
}
|
|
76843
|
+
this.prerelease.length = 0;
|
|
76844
|
+
break;
|
|
76845
|
+
case "major":
|
|
76846
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
76847
|
+
this.major++;
|
|
76848
|
+
}
|
|
76849
|
+
this.minor = 0;
|
|
76850
|
+
this.patch = 0;
|
|
76851
|
+
this.prerelease = [];
|
|
76852
|
+
break;
|
|
76853
|
+
case "minor":
|
|
76854
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
76855
|
+
this.minor++;
|
|
76856
|
+
}
|
|
76857
|
+
this.patch = 0;
|
|
76858
|
+
this.prerelease = [];
|
|
76859
|
+
break;
|
|
76860
|
+
case "patch":
|
|
76861
|
+
if (this.prerelease.length === 0) {
|
|
76862
|
+
this.patch++;
|
|
76863
|
+
}
|
|
76864
|
+
this.prerelease = [];
|
|
76865
|
+
break;
|
|
76866
|
+
// This probably shouldn't be used publicly.
|
|
76867
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
76868
|
+
case "pre": {
|
|
76869
|
+
const base2 = Number(identifierBase) ? 1 : 0;
|
|
76870
|
+
if (this.prerelease.length === 0) {
|
|
76871
|
+
this.prerelease = [base2];
|
|
76872
|
+
} else {
|
|
76873
|
+
let i = this.prerelease.length;
|
|
76874
|
+
while (--i >= 0) {
|
|
76875
|
+
if (typeof this.prerelease[i] === "number") {
|
|
76876
|
+
this.prerelease[i]++;
|
|
76877
|
+
i = -2;
|
|
76878
|
+
}
|
|
76879
|
+
}
|
|
76880
|
+
if (i === -1) {
|
|
76881
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
76882
|
+
throw new Error("invalid increment argument: identifier already exists");
|
|
76883
|
+
}
|
|
76884
|
+
this.prerelease.push(base2);
|
|
76885
|
+
}
|
|
76886
|
+
}
|
|
76887
|
+
if (identifier) {
|
|
76888
|
+
let prerelease = [identifier, base2];
|
|
76889
|
+
if (identifierBase === false) {
|
|
76890
|
+
prerelease = [identifier];
|
|
76891
|
+
}
|
|
76892
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
76893
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
76894
|
+
if (isNaN(prereleaseBase)) {
|
|
76895
|
+
this.prerelease = prerelease;
|
|
76896
|
+
}
|
|
76897
|
+
} else {
|
|
76898
|
+
this.prerelease = prerelease;
|
|
76899
|
+
}
|
|
76900
|
+
}
|
|
76901
|
+
break;
|
|
76902
|
+
}
|
|
76903
|
+
default:
|
|
76904
|
+
throw new Error(`invalid increment argument: ${release}`);
|
|
76905
|
+
}
|
|
76906
|
+
this.raw = this.format();
|
|
76907
|
+
if (this.build.length) {
|
|
76908
|
+
this.raw += `+${this.build.join(".")}`;
|
|
76909
|
+
}
|
|
76910
|
+
return this;
|
|
76911
|
+
}
|
|
76912
|
+
};
|
|
76913
|
+
module.exports = SemVer;
|
|
76914
|
+
}
|
|
76915
|
+
});
|
|
76916
|
+
|
|
76917
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
|
|
76918
|
+
var require_parse = __commonJS({
|
|
76919
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports$1, module) {
|
|
76920
|
+
init_esm_shims();
|
|
76921
|
+
var SemVer = require_semver();
|
|
76922
|
+
var parse6 = (version12, options, throwErrors = false) => {
|
|
76923
|
+
if (version12 instanceof SemVer) {
|
|
76924
|
+
return version12;
|
|
76925
|
+
}
|
|
76926
|
+
try {
|
|
76927
|
+
return new SemVer(version12, options);
|
|
76928
|
+
} catch (er) {
|
|
76929
|
+
if (!throwErrors) {
|
|
76930
|
+
return null;
|
|
76931
|
+
}
|
|
76932
|
+
throw er;
|
|
76933
|
+
}
|
|
76934
|
+
};
|
|
76935
|
+
module.exports = parse6;
|
|
76936
|
+
}
|
|
76937
|
+
});
|
|
76938
|
+
|
|
76939
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
|
|
76940
|
+
var require_valid = __commonJS({
|
|
76941
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports$1, module) {
|
|
76942
|
+
init_esm_shims();
|
|
76943
|
+
var parse6 = require_parse();
|
|
76944
|
+
var valid = (version12, options) => {
|
|
76945
|
+
const v = parse6(version12, options);
|
|
76946
|
+
return v ? v.version : null;
|
|
76947
|
+
};
|
|
76948
|
+
module.exports = valid;
|
|
76949
|
+
}
|
|
76950
|
+
});
|
|
76951
|
+
|
|
76952
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
|
|
76953
|
+
var require_clean = __commonJS({
|
|
76954
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports$1, module) {
|
|
76955
|
+
init_esm_shims();
|
|
76956
|
+
var parse6 = require_parse();
|
|
76957
|
+
var clean2 = (version12, options) => {
|
|
76958
|
+
const s = parse6(version12.trim().replace(/^[=v]+/, ""), options);
|
|
76959
|
+
return s ? s.version : null;
|
|
76960
|
+
};
|
|
76961
|
+
module.exports = clean2;
|
|
76962
|
+
}
|
|
76963
|
+
});
|
|
76964
|
+
|
|
76965
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
|
|
76966
|
+
var require_inc = __commonJS({
|
|
76967
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports$1, module) {
|
|
76968
|
+
init_esm_shims();
|
|
76969
|
+
var SemVer = require_semver();
|
|
76970
|
+
var inc = (version12, release, options, identifier, identifierBase) => {
|
|
76971
|
+
if (typeof options === "string") {
|
|
76972
|
+
identifierBase = identifier;
|
|
76973
|
+
identifier = options;
|
|
76974
|
+
options = void 0;
|
|
76975
|
+
}
|
|
76976
|
+
try {
|
|
76977
|
+
return new SemVer(
|
|
76978
|
+
version12 instanceof SemVer ? version12.version : version12,
|
|
76979
|
+
options
|
|
76980
|
+
).inc(release, identifier, identifierBase).version;
|
|
76981
|
+
} catch (er) {
|
|
76982
|
+
return null;
|
|
76983
|
+
}
|
|
76984
|
+
};
|
|
76985
|
+
module.exports = inc;
|
|
76986
|
+
}
|
|
76987
|
+
});
|
|
76988
|
+
|
|
76989
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
|
|
76990
|
+
var require_diff = __commonJS({
|
|
76991
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports$1, module) {
|
|
76992
|
+
init_esm_shims();
|
|
76993
|
+
var parse6 = require_parse();
|
|
76994
|
+
var diff = (version1, version22) => {
|
|
76995
|
+
const v1 = parse6(version1, null, true);
|
|
76996
|
+
const v2 = parse6(version22, null, true);
|
|
76997
|
+
const comparison = v1.compare(v2);
|
|
76998
|
+
if (comparison === 0) {
|
|
76999
|
+
return null;
|
|
77000
|
+
}
|
|
77001
|
+
const v1Higher = comparison > 0;
|
|
77002
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
77003
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
77004
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
77005
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
77006
|
+
if (lowHasPre && !highHasPre) {
|
|
77007
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
77008
|
+
return "major";
|
|
77009
|
+
}
|
|
77010
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
77011
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
77012
|
+
return "minor";
|
|
77013
|
+
}
|
|
77014
|
+
return "patch";
|
|
77015
|
+
}
|
|
77016
|
+
}
|
|
77017
|
+
const prefix = highHasPre ? "pre" : "";
|
|
77018
|
+
if (v1.major !== v2.major) {
|
|
77019
|
+
return prefix + "major";
|
|
77020
|
+
}
|
|
77021
|
+
if (v1.minor !== v2.minor) {
|
|
77022
|
+
return prefix + "minor";
|
|
77023
|
+
}
|
|
77024
|
+
if (v1.patch !== v2.patch) {
|
|
77025
|
+
return prefix + "patch";
|
|
77026
|
+
}
|
|
77027
|
+
return "prerelease";
|
|
77028
|
+
};
|
|
77029
|
+
module.exports = diff;
|
|
77030
|
+
}
|
|
77031
|
+
});
|
|
77032
|
+
|
|
77033
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
|
|
77034
|
+
var require_major = __commonJS({
|
|
77035
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports$1, module) {
|
|
77036
|
+
init_esm_shims();
|
|
77037
|
+
var SemVer = require_semver();
|
|
77038
|
+
var major = (a, loose) => new SemVer(a, loose).major;
|
|
77039
|
+
module.exports = major;
|
|
77040
|
+
}
|
|
77041
|
+
});
|
|
77042
|
+
|
|
77043
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
|
|
77044
|
+
var require_minor = __commonJS({
|
|
77045
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports$1, module) {
|
|
77046
|
+
init_esm_shims();
|
|
77047
|
+
var SemVer = require_semver();
|
|
77048
|
+
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
77049
|
+
module.exports = minor;
|
|
77050
|
+
}
|
|
77051
|
+
});
|
|
77052
|
+
|
|
77053
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
|
|
77054
|
+
var require_patch = __commonJS({
|
|
77055
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports$1, module) {
|
|
77056
|
+
init_esm_shims();
|
|
77057
|
+
var SemVer = require_semver();
|
|
77058
|
+
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
77059
|
+
module.exports = patch;
|
|
77060
|
+
}
|
|
77061
|
+
});
|
|
77062
|
+
|
|
77063
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
|
|
77064
|
+
var require_prerelease = __commonJS({
|
|
77065
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports$1, module) {
|
|
77066
|
+
init_esm_shims();
|
|
77067
|
+
var parse6 = require_parse();
|
|
77068
|
+
var prerelease = (version12, options) => {
|
|
77069
|
+
const parsed = parse6(version12, options);
|
|
77070
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
77071
|
+
};
|
|
77072
|
+
module.exports = prerelease;
|
|
77073
|
+
}
|
|
77074
|
+
});
|
|
77075
|
+
|
|
77076
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
|
|
77077
|
+
var require_compare = __commonJS({
|
|
77078
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports$1, module) {
|
|
77079
|
+
init_esm_shims();
|
|
77080
|
+
var SemVer = require_semver();
|
|
77081
|
+
var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
|
|
77082
|
+
module.exports = compare;
|
|
77083
|
+
}
|
|
77084
|
+
});
|
|
77085
|
+
|
|
77086
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
|
|
77087
|
+
var require_rcompare = __commonJS({
|
|
77088
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports$1, module) {
|
|
77089
|
+
init_esm_shims();
|
|
77090
|
+
var compare = require_compare();
|
|
77091
|
+
var rcompare = (a, b3, loose) => compare(b3, a, loose);
|
|
77092
|
+
module.exports = rcompare;
|
|
77093
|
+
}
|
|
77094
|
+
});
|
|
77095
|
+
|
|
77096
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
|
|
77097
|
+
var require_compare_loose = __commonJS({
|
|
77098
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports$1, module) {
|
|
77099
|
+
init_esm_shims();
|
|
77100
|
+
var compare = require_compare();
|
|
77101
|
+
var compareLoose = (a, b3) => compare(a, b3, true);
|
|
77102
|
+
module.exports = compareLoose;
|
|
77103
|
+
}
|
|
77104
|
+
});
|
|
77105
|
+
|
|
77106
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
|
|
77107
|
+
var require_compare_build = __commonJS({
|
|
77108
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports$1, module) {
|
|
77109
|
+
init_esm_shims();
|
|
77110
|
+
var SemVer = require_semver();
|
|
77111
|
+
var compareBuild = (a, b3, loose) => {
|
|
77112
|
+
const versionA = new SemVer(a, loose);
|
|
77113
|
+
const versionB = new SemVer(b3, loose);
|
|
77114
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
77115
|
+
};
|
|
77116
|
+
module.exports = compareBuild;
|
|
77117
|
+
}
|
|
77118
|
+
});
|
|
77119
|
+
|
|
77120
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
|
|
77121
|
+
var require_sort = __commonJS({
|
|
77122
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports$1, module) {
|
|
77123
|
+
init_esm_shims();
|
|
77124
|
+
var compareBuild = require_compare_build();
|
|
77125
|
+
var sort = (list2, loose) => list2.sort((a, b3) => compareBuild(a, b3, loose));
|
|
77126
|
+
module.exports = sort;
|
|
77127
|
+
}
|
|
77128
|
+
});
|
|
77129
|
+
|
|
77130
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
|
|
77131
|
+
var require_rsort = __commonJS({
|
|
77132
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports$1, module) {
|
|
77133
|
+
init_esm_shims();
|
|
77134
|
+
var compareBuild = require_compare_build();
|
|
77135
|
+
var rsort = (list2, loose) => list2.sort((a, b3) => compareBuild(b3, a, loose));
|
|
77136
|
+
module.exports = rsort;
|
|
77137
|
+
}
|
|
77138
|
+
});
|
|
77139
|
+
|
|
77140
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
|
|
77141
|
+
var require_gt = __commonJS({
|
|
77142
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports$1, module) {
|
|
77143
|
+
init_esm_shims();
|
|
77144
|
+
var compare = require_compare();
|
|
77145
|
+
var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
|
|
77146
|
+
module.exports = gt;
|
|
77147
|
+
}
|
|
77148
|
+
});
|
|
77149
|
+
|
|
77150
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
|
|
77151
|
+
var require_lt = __commonJS({
|
|
77152
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports$1, module) {
|
|
77153
|
+
init_esm_shims();
|
|
77154
|
+
var compare = require_compare();
|
|
77155
|
+
var lt2 = (a, b3, loose) => compare(a, b3, loose) < 0;
|
|
77156
|
+
module.exports = lt2;
|
|
77157
|
+
}
|
|
77158
|
+
});
|
|
77159
|
+
|
|
77160
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
|
|
77161
|
+
var require_eq = __commonJS({
|
|
77162
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports$1, module) {
|
|
77163
|
+
init_esm_shims();
|
|
77164
|
+
var compare = require_compare();
|
|
77165
|
+
var eq = (a, b3, loose) => compare(a, b3, loose) === 0;
|
|
77166
|
+
module.exports = eq;
|
|
77167
|
+
}
|
|
77168
|
+
});
|
|
77169
|
+
|
|
77170
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
|
|
77171
|
+
var require_neq = __commonJS({
|
|
77172
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports$1, module) {
|
|
77173
|
+
init_esm_shims();
|
|
77174
|
+
var compare = require_compare();
|
|
77175
|
+
var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
|
|
77176
|
+
module.exports = neq;
|
|
77177
|
+
}
|
|
77178
|
+
});
|
|
77179
|
+
|
|
77180
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
|
|
77181
|
+
var require_gte = __commonJS({
|
|
77182
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports$1, module) {
|
|
77183
|
+
init_esm_shims();
|
|
77184
|
+
var compare = require_compare();
|
|
77185
|
+
var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
|
|
77186
|
+
module.exports = gte;
|
|
77187
|
+
}
|
|
77188
|
+
});
|
|
77189
|
+
|
|
77190
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
|
|
77191
|
+
var require_lte = __commonJS({
|
|
77192
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports$1, module) {
|
|
77193
|
+
init_esm_shims();
|
|
77194
|
+
var compare = require_compare();
|
|
77195
|
+
var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
|
|
77196
|
+
module.exports = lte;
|
|
77197
|
+
}
|
|
77198
|
+
});
|
|
77199
|
+
|
|
77200
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
|
|
77201
|
+
var require_cmp = __commonJS({
|
|
77202
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports$1, module) {
|
|
77203
|
+
init_esm_shims();
|
|
77204
|
+
var eq = require_eq();
|
|
77205
|
+
var neq = require_neq();
|
|
77206
|
+
var gt = require_gt();
|
|
77207
|
+
var gte = require_gte();
|
|
77208
|
+
var lt2 = require_lt();
|
|
77209
|
+
var lte = require_lte();
|
|
77210
|
+
var cmp = (a, op, b3, loose) => {
|
|
77211
|
+
switch (op) {
|
|
77212
|
+
case "===":
|
|
77213
|
+
if (typeof a === "object") {
|
|
77214
|
+
a = a.version;
|
|
77215
|
+
}
|
|
77216
|
+
if (typeof b3 === "object") {
|
|
77217
|
+
b3 = b3.version;
|
|
77218
|
+
}
|
|
77219
|
+
return a === b3;
|
|
77220
|
+
case "!==":
|
|
77221
|
+
if (typeof a === "object") {
|
|
77222
|
+
a = a.version;
|
|
77223
|
+
}
|
|
77224
|
+
if (typeof b3 === "object") {
|
|
77225
|
+
b3 = b3.version;
|
|
77226
|
+
}
|
|
77227
|
+
return a !== b3;
|
|
77228
|
+
case "":
|
|
77229
|
+
case "=":
|
|
77230
|
+
case "==":
|
|
77231
|
+
return eq(a, b3, loose);
|
|
77232
|
+
case "!=":
|
|
77233
|
+
return neq(a, b3, loose);
|
|
77234
|
+
case ">":
|
|
77235
|
+
return gt(a, b3, loose);
|
|
77236
|
+
case ">=":
|
|
77237
|
+
return gte(a, b3, loose);
|
|
77238
|
+
case "<":
|
|
77239
|
+
return lt2(a, b3, loose);
|
|
77240
|
+
case "<=":
|
|
77241
|
+
return lte(a, b3, loose);
|
|
77242
|
+
default:
|
|
77243
|
+
throw new TypeError(`Invalid operator: ${op}`);
|
|
77244
|
+
}
|
|
77245
|
+
};
|
|
77246
|
+
module.exports = cmp;
|
|
77247
|
+
}
|
|
77248
|
+
});
|
|
77249
|
+
|
|
77250
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
|
|
77251
|
+
var require_coerce = __commonJS({
|
|
77252
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports$1, module) {
|
|
77253
|
+
init_esm_shims();
|
|
77254
|
+
var SemVer = require_semver();
|
|
77255
|
+
var parse6 = require_parse();
|
|
77256
|
+
var { safeRe: re, t } = require_re();
|
|
77257
|
+
var coerce2 = (version12, options) => {
|
|
77258
|
+
if (version12 instanceof SemVer) {
|
|
77259
|
+
return version12;
|
|
77260
|
+
}
|
|
77261
|
+
if (typeof version12 === "number") {
|
|
77262
|
+
version12 = String(version12);
|
|
77263
|
+
}
|
|
77264
|
+
if (typeof version12 !== "string") {
|
|
77265
|
+
return null;
|
|
77266
|
+
}
|
|
77267
|
+
options = options || {};
|
|
77268
|
+
let match = null;
|
|
77269
|
+
if (!options.rtl) {
|
|
77270
|
+
match = version12.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
77271
|
+
} else {
|
|
77272
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
77273
|
+
let next;
|
|
77274
|
+
while ((next = coerceRtlRegex.exec(version12)) && (!match || match.index + match[0].length !== version12.length)) {
|
|
77275
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
77276
|
+
match = next;
|
|
77277
|
+
}
|
|
77278
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
77279
|
+
}
|
|
77280
|
+
coerceRtlRegex.lastIndex = -1;
|
|
77281
|
+
}
|
|
77282
|
+
if (match === null) {
|
|
77283
|
+
return null;
|
|
77284
|
+
}
|
|
77285
|
+
const major = match[2];
|
|
77286
|
+
const minor = match[3] || "0";
|
|
77287
|
+
const patch = match[4] || "0";
|
|
77288
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
77289
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
77290
|
+
return parse6(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
77291
|
+
};
|
|
77292
|
+
module.exports = coerce2;
|
|
77293
|
+
}
|
|
77294
|
+
});
|
|
77295
|
+
|
|
77296
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
|
|
77297
|
+
var require_truncate = __commonJS({
|
|
77298
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports$1, module) {
|
|
77299
|
+
init_esm_shims();
|
|
77300
|
+
var parse6 = require_parse();
|
|
77301
|
+
var constants = require_constants3();
|
|
77302
|
+
var SemVer = require_semver();
|
|
77303
|
+
var truncate = (version12, truncation, options) => {
|
|
77304
|
+
if (!constants.RELEASE_TYPES.includes(truncation)) {
|
|
77305
|
+
return null;
|
|
77306
|
+
}
|
|
77307
|
+
const clonedVersion = cloneInputVersion(version12, options);
|
|
77308
|
+
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
77309
|
+
};
|
|
77310
|
+
var cloneInputVersion = (version12, options) => {
|
|
77311
|
+
const versionStringToParse = version12 instanceof SemVer ? version12.version : version12;
|
|
77312
|
+
return parse6(versionStringToParse, options);
|
|
77313
|
+
};
|
|
77314
|
+
var doTruncation = (version12, truncation) => {
|
|
77315
|
+
if (isPrerelease(truncation)) {
|
|
77316
|
+
return version12.version;
|
|
77317
|
+
}
|
|
77318
|
+
version12.prerelease = [];
|
|
77319
|
+
switch (truncation) {
|
|
77320
|
+
case "major":
|
|
77321
|
+
version12.minor = 0;
|
|
77322
|
+
version12.patch = 0;
|
|
77323
|
+
break;
|
|
77324
|
+
case "minor":
|
|
77325
|
+
version12.patch = 0;
|
|
77326
|
+
break;
|
|
77327
|
+
}
|
|
77328
|
+
return version12.format();
|
|
77329
|
+
};
|
|
77330
|
+
var isPrerelease = (type2) => {
|
|
77331
|
+
return type2.startsWith("pre");
|
|
77332
|
+
};
|
|
77333
|
+
module.exports = truncate;
|
|
77334
|
+
}
|
|
77335
|
+
});
|
|
77336
|
+
|
|
77337
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
|
|
77338
|
+
var require_lrucache = __commonJS({
|
|
77339
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports$1, module) {
|
|
77340
|
+
init_esm_shims();
|
|
77341
|
+
var LRUCache = class {
|
|
77342
|
+
constructor() {
|
|
77343
|
+
this.max = 1e3;
|
|
77344
|
+
this.map = /* @__PURE__ */ new Map();
|
|
77345
|
+
}
|
|
77346
|
+
get(key) {
|
|
77347
|
+
const value = this.map.get(key);
|
|
77348
|
+
if (value === void 0) {
|
|
77349
|
+
return void 0;
|
|
77350
|
+
} else {
|
|
77351
|
+
this.map.delete(key);
|
|
77352
|
+
this.map.set(key, value);
|
|
77353
|
+
return value;
|
|
77354
|
+
}
|
|
77355
|
+
}
|
|
77356
|
+
delete(key) {
|
|
77357
|
+
return this.map.delete(key);
|
|
77358
|
+
}
|
|
77359
|
+
set(key, value) {
|
|
77360
|
+
const deleted = this.delete(key);
|
|
77361
|
+
if (!deleted && value !== void 0) {
|
|
77362
|
+
if (this.map.size >= this.max) {
|
|
77363
|
+
const firstKey = this.map.keys().next().value;
|
|
77364
|
+
this.delete(firstKey);
|
|
77365
|
+
}
|
|
77366
|
+
this.map.set(key, value);
|
|
77367
|
+
}
|
|
77368
|
+
return this;
|
|
77369
|
+
}
|
|
77370
|
+
};
|
|
77371
|
+
module.exports = LRUCache;
|
|
77372
|
+
}
|
|
77373
|
+
});
|
|
77374
|
+
|
|
77375
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
|
|
77376
|
+
var require_range2 = __commonJS({
|
|
77377
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports$1, module) {
|
|
77378
|
+
init_esm_shims();
|
|
77379
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
77380
|
+
var Range = class _Range {
|
|
77381
|
+
constructor(range, options) {
|
|
77382
|
+
options = parseOptions(options);
|
|
77383
|
+
if (range instanceof _Range) {
|
|
77384
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
77385
|
+
return range;
|
|
77386
|
+
} else {
|
|
77387
|
+
return new _Range(range.raw, options);
|
|
77388
|
+
}
|
|
77389
|
+
}
|
|
77390
|
+
if (range instanceof Comparator) {
|
|
77391
|
+
this.raw = range.value;
|
|
77392
|
+
this.set = [[range]];
|
|
77393
|
+
this.formatted = void 0;
|
|
77394
|
+
return this;
|
|
77395
|
+
}
|
|
77396
|
+
this.options = options;
|
|
77397
|
+
this.loose = !!options.loose;
|
|
77398
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
77399
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
77400
|
+
this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c) => c.length);
|
|
77401
|
+
if (!this.set.length) {
|
|
77402
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
77403
|
+
}
|
|
77404
|
+
if (this.set.length > 1) {
|
|
77405
|
+
const first = this.set[0];
|
|
77406
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
77407
|
+
if (this.set.length === 0) {
|
|
77408
|
+
this.set = [first];
|
|
77409
|
+
} else if (this.set.length > 1) {
|
|
77410
|
+
for (const c of this.set) {
|
|
77411
|
+
if (c.length === 1 && isAny(c[0])) {
|
|
77412
|
+
this.set = [c];
|
|
77413
|
+
break;
|
|
77414
|
+
}
|
|
77415
|
+
}
|
|
77416
|
+
}
|
|
77417
|
+
}
|
|
77418
|
+
this.formatted = void 0;
|
|
77419
|
+
}
|
|
77420
|
+
get range() {
|
|
77421
|
+
if (this.formatted === void 0) {
|
|
77422
|
+
this.formatted = "";
|
|
77423
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
77424
|
+
if (i > 0) {
|
|
77425
|
+
this.formatted += "||";
|
|
77426
|
+
}
|
|
77427
|
+
const comps = this.set[i];
|
|
77428
|
+
for (let k3 = 0; k3 < comps.length; k3++) {
|
|
77429
|
+
if (k3 > 0) {
|
|
77430
|
+
this.formatted += " ";
|
|
77431
|
+
}
|
|
77432
|
+
this.formatted += comps[k3].toString().trim();
|
|
77433
|
+
}
|
|
77434
|
+
}
|
|
77435
|
+
}
|
|
77436
|
+
return this.formatted;
|
|
77437
|
+
}
|
|
77438
|
+
format() {
|
|
77439
|
+
return this.range;
|
|
77440
|
+
}
|
|
77441
|
+
toString() {
|
|
77442
|
+
return this.range;
|
|
77443
|
+
}
|
|
77444
|
+
parseRange(range) {
|
|
77445
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
77446
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
77447
|
+
const memoKey = memoOpts + ":" + range;
|
|
77448
|
+
const cached2 = cache.get(memoKey);
|
|
77449
|
+
if (cached2) {
|
|
77450
|
+
return cached2;
|
|
77451
|
+
}
|
|
77452
|
+
const loose = this.options.loose;
|
|
77453
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
77454
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
77455
|
+
debug("hyphen replace", range);
|
|
77456
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
77457
|
+
debug("comparator trim", range);
|
|
77458
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
77459
|
+
debug("tilde trim", range);
|
|
77460
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
77461
|
+
debug("caret trim", range);
|
|
77462
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
77463
|
+
if (loose) {
|
|
77464
|
+
rangeList = rangeList.filter((comp) => {
|
|
77465
|
+
debug("loose invalid filter", comp, this.options);
|
|
77466
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
77467
|
+
});
|
|
77468
|
+
}
|
|
77469
|
+
debug("range list", rangeList);
|
|
77470
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
77471
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
77472
|
+
for (const comp of comparators) {
|
|
77473
|
+
if (isNullSet(comp)) {
|
|
77474
|
+
return [comp];
|
|
77475
|
+
}
|
|
77476
|
+
rangeMap.set(comp.value, comp);
|
|
77477
|
+
}
|
|
77478
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
77479
|
+
rangeMap.delete("");
|
|
77480
|
+
}
|
|
77481
|
+
const result = [...rangeMap.values()];
|
|
77482
|
+
cache.set(memoKey, result);
|
|
77483
|
+
return result;
|
|
77484
|
+
}
|
|
77485
|
+
intersects(range, options) {
|
|
77486
|
+
if (!(range instanceof _Range)) {
|
|
77487
|
+
throw new TypeError("a Range is required");
|
|
77488
|
+
}
|
|
77489
|
+
return this.set.some((thisComparators) => {
|
|
77490
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
77491
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
77492
|
+
return rangeComparators.every((rangeComparator) => {
|
|
77493
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
77494
|
+
});
|
|
77495
|
+
});
|
|
77496
|
+
});
|
|
77497
|
+
});
|
|
77498
|
+
}
|
|
77499
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
77500
|
+
test(version12) {
|
|
77501
|
+
if (!version12) {
|
|
77502
|
+
return false;
|
|
77503
|
+
}
|
|
77504
|
+
if (typeof version12 === "string") {
|
|
77505
|
+
try {
|
|
77506
|
+
version12 = new SemVer(version12, this.options);
|
|
77507
|
+
} catch (er) {
|
|
77508
|
+
return false;
|
|
77509
|
+
}
|
|
77510
|
+
}
|
|
77511
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
77512
|
+
if (testSet(this.set[i], version12, this.options)) {
|
|
77513
|
+
return true;
|
|
77514
|
+
}
|
|
77515
|
+
}
|
|
77516
|
+
return false;
|
|
77517
|
+
}
|
|
77518
|
+
};
|
|
77519
|
+
module.exports = Range;
|
|
77520
|
+
var LRU = require_lrucache();
|
|
77521
|
+
var cache = new LRU();
|
|
77522
|
+
var parseOptions = require_parse_options();
|
|
77523
|
+
var Comparator = require_comparator();
|
|
77524
|
+
var debug = require_debug2();
|
|
77525
|
+
var SemVer = require_semver();
|
|
77526
|
+
var {
|
|
77527
|
+
safeRe: re,
|
|
77528
|
+
src,
|
|
77529
|
+
t,
|
|
77530
|
+
comparatorTrimReplace,
|
|
77531
|
+
tildeTrimReplace,
|
|
77532
|
+
caretTrimReplace
|
|
77533
|
+
} = require_re();
|
|
77534
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants3();
|
|
77535
|
+
var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
77536
|
+
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
77537
|
+
var isAny = (c) => c.value === "";
|
|
77538
|
+
var isSatisfiable = (comparators, options) => {
|
|
77539
|
+
let result = true;
|
|
77540
|
+
const remainingComparators = comparators.slice();
|
|
77541
|
+
let testComparator = remainingComparators.pop();
|
|
77542
|
+
while (result && remainingComparators.length) {
|
|
77543
|
+
result = remainingComparators.every((otherComparator) => {
|
|
77544
|
+
return testComparator.intersects(otherComparator, options);
|
|
77545
|
+
});
|
|
77546
|
+
testComparator = remainingComparators.pop();
|
|
77547
|
+
}
|
|
77548
|
+
return result;
|
|
77549
|
+
};
|
|
77550
|
+
var parseComparator = (comp, options) => {
|
|
77551
|
+
comp = comp.replace(re[t.BUILD], "");
|
|
77552
|
+
debug("comp", comp, options);
|
|
77553
|
+
comp = replaceCarets(comp, options);
|
|
77554
|
+
debug("caret", comp);
|
|
77555
|
+
comp = replaceTildes(comp, options);
|
|
77556
|
+
debug("tildes", comp);
|
|
77557
|
+
comp = replaceXRanges(comp, options);
|
|
77558
|
+
debug("xrange", comp);
|
|
77559
|
+
comp = replaceStars(comp, options);
|
|
77560
|
+
debug("stars", comp);
|
|
77561
|
+
return comp;
|
|
77562
|
+
};
|
|
77563
|
+
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
77564
|
+
var invalidXRangeOrder = (M2, m2, p2) => isX(M2) && !isX(m2) || isX(m2) && p2 && !isX(p2);
|
|
77565
|
+
var replaceTildes = (comp, options) => {
|
|
77566
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
77567
|
+
};
|
|
77568
|
+
var replaceTilde = (comp, options) => {
|
|
77569
|
+
const r2 = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
77570
|
+
const z3 = options.includePrerelease ? "-0" : "";
|
|
77571
|
+
return comp.replace(r2, (_3, M2, m2, p2, pr) => {
|
|
77572
|
+
debug("tilde", comp, _3, M2, m2, p2, pr);
|
|
77573
|
+
let ret;
|
|
77574
|
+
if (isX(M2)) {
|
|
77575
|
+
ret = "";
|
|
77576
|
+
} else if (isX(m2)) {
|
|
77577
|
+
ret = `>=${M2}.0.0${z3} <${+M2 + 1}.0.0-0`;
|
|
77578
|
+
} else if (isX(p2)) {
|
|
77579
|
+
ret = `>=${M2}.${m2}.0${z3} <${M2}.${+m2 + 1}.0-0`;
|
|
77580
|
+
} else if (pr) {
|
|
77581
|
+
debug("replaceTilde pr", pr);
|
|
77582
|
+
ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${+m2 + 1}.0-0`;
|
|
77583
|
+
} else {
|
|
77584
|
+
ret = `>=${M2}.${m2}.${p2} <${M2}.${+m2 + 1}.0-0`;
|
|
77585
|
+
}
|
|
77586
|
+
debug("tilde return", ret);
|
|
77587
|
+
return ret;
|
|
77588
|
+
});
|
|
77589
|
+
};
|
|
77590
|
+
var replaceCarets = (comp, options) => {
|
|
77591
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
77592
|
+
};
|
|
77593
|
+
var replaceCaret = (comp, options) => {
|
|
77594
|
+
debug("caret", comp, options);
|
|
77595
|
+
const r2 = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
77596
|
+
const z3 = options.includePrerelease ? "-0" : "";
|
|
77597
|
+
return comp.replace(r2, (_3, M2, m2, p2, pr) => {
|
|
77598
|
+
debug("caret", comp, _3, M2, m2, p2, pr);
|
|
77599
|
+
let ret;
|
|
77600
|
+
if (isX(M2)) {
|
|
77601
|
+
ret = "";
|
|
77602
|
+
} else if (isX(m2)) {
|
|
77603
|
+
ret = `>=${M2}.0.0${z3} <${+M2 + 1}.0.0-0`;
|
|
77604
|
+
} else if (isX(p2)) {
|
|
77605
|
+
if (M2 === "0") {
|
|
77606
|
+
ret = `>=${M2}.${m2}.0${z3} <${M2}.${+m2 + 1}.0-0`;
|
|
77607
|
+
} else {
|
|
77608
|
+
ret = `>=${M2}.${m2}.0${z3} <${+M2 + 1}.0.0-0`;
|
|
77609
|
+
}
|
|
77610
|
+
} else if (pr) {
|
|
77611
|
+
debug("replaceCaret pr", pr);
|
|
77612
|
+
if (M2 === "0") {
|
|
77613
|
+
if (m2 === "0") {
|
|
77614
|
+
ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${m2}.${+p2 + 1}-0`;
|
|
77615
|
+
} else {
|
|
77616
|
+
ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${+m2 + 1}.0-0`;
|
|
77617
|
+
}
|
|
77618
|
+
} else {
|
|
77619
|
+
ret = `>=${M2}.${m2}.${p2}-${pr} <${+M2 + 1}.0.0-0`;
|
|
77620
|
+
}
|
|
77621
|
+
} else {
|
|
77622
|
+
debug("no pr");
|
|
77623
|
+
if (M2 === "0") {
|
|
77624
|
+
if (m2 === "0") {
|
|
77625
|
+
ret = `>=${M2}.${m2}.${p2} <${M2}.${m2}.${+p2 + 1}-0`;
|
|
77626
|
+
} else {
|
|
77627
|
+
ret = `>=${M2}.${m2}.${p2} <${M2}.${+m2 + 1}.0-0`;
|
|
77628
|
+
}
|
|
77629
|
+
} else {
|
|
77630
|
+
ret = `>=${M2}.${m2}.${p2} <${+M2 + 1}.0.0-0`;
|
|
77631
|
+
}
|
|
77632
|
+
}
|
|
77633
|
+
debug("caret return", ret);
|
|
77634
|
+
return ret;
|
|
77635
|
+
});
|
|
77636
|
+
};
|
|
77637
|
+
var replaceXRanges = (comp, options) => {
|
|
77638
|
+
debug("replaceXRanges", comp, options);
|
|
77639
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
77640
|
+
};
|
|
77641
|
+
var replaceXRange = (comp, options) => {
|
|
77642
|
+
comp = comp.trim();
|
|
77643
|
+
const r2 = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
77644
|
+
return comp.replace(r2, (ret, gtlt, M2, m2, p2, pr) => {
|
|
77645
|
+
debug("xRange", comp, ret, gtlt, M2, m2, p2, pr);
|
|
77646
|
+
if (invalidXRangeOrder(M2, m2, p2)) {
|
|
77647
|
+
return comp;
|
|
77648
|
+
}
|
|
77649
|
+
const xM = isX(M2);
|
|
77650
|
+
const xm = xM || isX(m2);
|
|
77651
|
+
const xp = xm || isX(p2);
|
|
77652
|
+
const anyX = xp;
|
|
77653
|
+
if (gtlt === "=" && anyX) {
|
|
77654
|
+
gtlt = "";
|
|
77655
|
+
}
|
|
77656
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
77657
|
+
if (xM) {
|
|
77658
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
77659
|
+
ret = "<0.0.0-0";
|
|
77660
|
+
} else {
|
|
77661
|
+
ret = "*";
|
|
77662
|
+
}
|
|
77663
|
+
} else if (gtlt && anyX) {
|
|
77664
|
+
if (xm) {
|
|
77665
|
+
m2 = 0;
|
|
77666
|
+
}
|
|
77667
|
+
p2 = 0;
|
|
77668
|
+
if (gtlt === ">") {
|
|
77669
|
+
gtlt = ">=";
|
|
77670
|
+
if (xm) {
|
|
77671
|
+
M2 = +M2 + 1;
|
|
77672
|
+
m2 = 0;
|
|
77673
|
+
p2 = 0;
|
|
77674
|
+
} else {
|
|
77675
|
+
m2 = +m2 + 1;
|
|
77676
|
+
p2 = 0;
|
|
77677
|
+
}
|
|
77678
|
+
} else if (gtlt === "<=") {
|
|
77679
|
+
gtlt = "<";
|
|
77680
|
+
if (xm) {
|
|
77681
|
+
M2 = +M2 + 1;
|
|
77682
|
+
} else {
|
|
77683
|
+
m2 = +m2 + 1;
|
|
77684
|
+
}
|
|
77685
|
+
}
|
|
77686
|
+
if (gtlt === "<") {
|
|
77687
|
+
pr = "-0";
|
|
77688
|
+
}
|
|
77689
|
+
ret = `${gtlt + M2}.${m2}.${p2}${pr}`;
|
|
77690
|
+
} else if (xm) {
|
|
77691
|
+
ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;
|
|
77692
|
+
} else if (xp) {
|
|
77693
|
+
ret = `>=${M2}.${m2}.0${pr} <${M2}.${+m2 + 1}.0-0`;
|
|
77694
|
+
}
|
|
77695
|
+
debug("xRange return", ret);
|
|
77696
|
+
return ret;
|
|
77697
|
+
});
|
|
77698
|
+
};
|
|
77699
|
+
var replaceStars = (comp, options) => {
|
|
77700
|
+
debug("replaceStars", comp, options);
|
|
77701
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
77702
|
+
};
|
|
77703
|
+
var replaceGTE0 = (comp, options) => {
|
|
77704
|
+
debug("replaceGTE0", comp, options);
|
|
77705
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
77706
|
+
};
|
|
77707
|
+
var hyphenReplace = (incPr) => ($0, from50, fM, fm, fp, fpr, fb, to2, tM, tm, tp, tpr) => {
|
|
77708
|
+
if (isX(fM)) {
|
|
77709
|
+
from50 = "";
|
|
77710
|
+
} else if (isX(fm)) {
|
|
77711
|
+
from50 = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
77712
|
+
} else if (isX(fp)) {
|
|
77713
|
+
from50 = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
77714
|
+
} else if (fpr) {
|
|
77715
|
+
from50 = `>=${from50}`;
|
|
77716
|
+
} else {
|
|
77717
|
+
from50 = `>=${from50}${incPr ? "-0" : ""}`;
|
|
77718
|
+
}
|
|
77719
|
+
if (isX(tM)) {
|
|
77720
|
+
to2 = "";
|
|
77721
|
+
} else if (isX(tm)) {
|
|
77722
|
+
to2 = `<${+tM + 1}.0.0-0`;
|
|
77723
|
+
} else if (isX(tp)) {
|
|
77724
|
+
to2 = `<${tM}.${+tm + 1}.0-0`;
|
|
77725
|
+
} else if (tpr) {
|
|
77726
|
+
to2 = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
77727
|
+
} else if (incPr) {
|
|
77728
|
+
to2 = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
77729
|
+
} else {
|
|
77730
|
+
to2 = `<=${to2}`;
|
|
77731
|
+
}
|
|
77732
|
+
return `${from50} ${to2}`.trim();
|
|
77733
|
+
};
|
|
77734
|
+
var testSet = (set4, version12, options) => {
|
|
77735
|
+
for (let i = 0; i < set4.length; i++) {
|
|
77736
|
+
if (!set4[i].test(version12)) {
|
|
77737
|
+
return false;
|
|
77738
|
+
}
|
|
77739
|
+
}
|
|
77740
|
+
if (version12.prerelease.length && !options.includePrerelease) {
|
|
77741
|
+
for (let i = 0; i < set4.length; i++) {
|
|
77742
|
+
debug(set4[i].semver);
|
|
77743
|
+
if (set4[i].semver === Comparator.ANY) {
|
|
77744
|
+
continue;
|
|
77745
|
+
}
|
|
77746
|
+
if (set4[i].semver.prerelease.length > 0) {
|
|
77747
|
+
const allowed = set4[i].semver;
|
|
77748
|
+
if (allowed.major === version12.major && allowed.minor === version12.minor && allowed.patch === version12.patch) {
|
|
77749
|
+
return true;
|
|
77750
|
+
}
|
|
77751
|
+
}
|
|
77752
|
+
}
|
|
77753
|
+
return false;
|
|
77754
|
+
}
|
|
77755
|
+
return true;
|
|
77756
|
+
};
|
|
77757
|
+
}
|
|
77758
|
+
});
|
|
77759
|
+
|
|
77760
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
|
|
77761
|
+
var require_comparator = __commonJS({
|
|
77762
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports$1, module) {
|
|
77763
|
+
init_esm_shims();
|
|
77764
|
+
var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
|
|
77765
|
+
var Comparator = class _Comparator {
|
|
77766
|
+
static get ANY() {
|
|
77767
|
+
return ANY;
|
|
77768
|
+
}
|
|
77769
|
+
constructor(comp, options) {
|
|
77770
|
+
options = parseOptions(options);
|
|
77771
|
+
if (comp instanceof _Comparator) {
|
|
77772
|
+
if (comp.loose === !!options.loose) {
|
|
77773
|
+
return comp;
|
|
77774
|
+
} else {
|
|
77775
|
+
comp = comp.value;
|
|
77776
|
+
}
|
|
77777
|
+
}
|
|
77778
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
77779
|
+
debug("comparator", comp, options);
|
|
77780
|
+
this.options = options;
|
|
77781
|
+
this.loose = !!options.loose;
|
|
77782
|
+
this.parse(comp);
|
|
77783
|
+
if (this.semver === ANY) {
|
|
77784
|
+
this.value = "";
|
|
77785
|
+
} else {
|
|
77786
|
+
this.value = this.operator + this.semver.version;
|
|
77787
|
+
}
|
|
77788
|
+
debug("comp", this);
|
|
77789
|
+
}
|
|
77790
|
+
parse(comp) {
|
|
77791
|
+
const r2 = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
77792
|
+
const m2 = comp.match(r2);
|
|
77793
|
+
if (!m2) {
|
|
77794
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
77795
|
+
}
|
|
77796
|
+
this.operator = m2[1] !== void 0 ? m2[1] : "";
|
|
77797
|
+
if (this.operator === "=") {
|
|
77798
|
+
this.operator = "";
|
|
77799
|
+
}
|
|
77800
|
+
if (!m2[2]) {
|
|
77801
|
+
this.semver = ANY;
|
|
77802
|
+
} else {
|
|
77803
|
+
this.semver = new SemVer(m2[2], this.options.loose);
|
|
77804
|
+
}
|
|
77805
|
+
}
|
|
77806
|
+
toString() {
|
|
77807
|
+
return this.value;
|
|
77808
|
+
}
|
|
77809
|
+
test(version12) {
|
|
77810
|
+
debug("Comparator.test", version12, this.options.loose);
|
|
77811
|
+
if (this.semver === ANY || version12 === ANY) {
|
|
77812
|
+
return true;
|
|
77813
|
+
}
|
|
77814
|
+
if (typeof version12 === "string") {
|
|
77815
|
+
try {
|
|
77816
|
+
version12 = new SemVer(version12, this.options);
|
|
77817
|
+
} catch (er) {
|
|
77818
|
+
return false;
|
|
77819
|
+
}
|
|
77820
|
+
}
|
|
77821
|
+
return cmp(version12, this.operator, this.semver, this.options);
|
|
77822
|
+
}
|
|
77823
|
+
intersects(comp, options) {
|
|
77824
|
+
if (!(comp instanceof _Comparator)) {
|
|
77825
|
+
throw new TypeError("a Comparator is required");
|
|
77826
|
+
}
|
|
77827
|
+
if (this.operator === "") {
|
|
77828
|
+
if (this.value === "") {
|
|
77829
|
+
return true;
|
|
77830
|
+
}
|
|
77831
|
+
return new Range(comp.value, options).test(this.value);
|
|
77832
|
+
} else if (comp.operator === "") {
|
|
77833
|
+
if (comp.value === "") {
|
|
77834
|
+
return true;
|
|
77835
|
+
}
|
|
77836
|
+
return new Range(this.value, options).test(comp.semver);
|
|
77837
|
+
}
|
|
77838
|
+
options = parseOptions(options);
|
|
77839
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
77840
|
+
return false;
|
|
77841
|
+
}
|
|
77842
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
77843
|
+
return false;
|
|
77844
|
+
}
|
|
77845
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
77846
|
+
return true;
|
|
77847
|
+
}
|
|
77848
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
77849
|
+
return true;
|
|
77850
|
+
}
|
|
77851
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
77852
|
+
return true;
|
|
77853
|
+
}
|
|
77854
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
77855
|
+
return true;
|
|
77856
|
+
}
|
|
77857
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
77858
|
+
return true;
|
|
77859
|
+
}
|
|
77860
|
+
return false;
|
|
77861
|
+
}
|
|
77862
|
+
};
|
|
77863
|
+
module.exports = Comparator;
|
|
77864
|
+
var parseOptions = require_parse_options();
|
|
77865
|
+
var { safeRe: re, t } = require_re();
|
|
77866
|
+
var cmp = require_cmp();
|
|
77867
|
+
var debug = require_debug2();
|
|
77868
|
+
var SemVer = require_semver();
|
|
77869
|
+
var Range = require_range2();
|
|
77870
|
+
}
|
|
77871
|
+
});
|
|
77872
|
+
|
|
77873
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
|
|
77874
|
+
var require_satisfies = __commonJS({
|
|
77875
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports$1, module) {
|
|
77876
|
+
init_esm_shims();
|
|
77877
|
+
var Range = require_range2();
|
|
77878
|
+
var satisfies = (version12, range, options) => {
|
|
77879
|
+
try {
|
|
77880
|
+
range = new Range(range, options);
|
|
77881
|
+
} catch (er) {
|
|
77882
|
+
return false;
|
|
77883
|
+
}
|
|
77884
|
+
return range.test(version12);
|
|
77885
|
+
};
|
|
77886
|
+
module.exports = satisfies;
|
|
77887
|
+
}
|
|
77888
|
+
});
|
|
77889
|
+
|
|
77890
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
|
|
77891
|
+
var require_to_comparators = __commonJS({
|
|
77892
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports$1, module) {
|
|
77893
|
+
init_esm_shims();
|
|
77894
|
+
var Range = require_range2();
|
|
77895
|
+
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
77896
|
+
module.exports = toComparators;
|
|
77897
|
+
}
|
|
77898
|
+
});
|
|
77899
|
+
|
|
77900
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
|
|
77901
|
+
var require_max_satisfying = __commonJS({
|
|
77902
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports$1, module) {
|
|
77903
|
+
init_esm_shims();
|
|
77904
|
+
var SemVer = require_semver();
|
|
77905
|
+
var Range = require_range2();
|
|
77906
|
+
var maxSatisfying = (versions, range, options) => {
|
|
77907
|
+
let max = null;
|
|
77908
|
+
let maxSV = null;
|
|
77909
|
+
let rangeObj = null;
|
|
77910
|
+
try {
|
|
77911
|
+
rangeObj = new Range(range, options);
|
|
77912
|
+
} catch (er) {
|
|
77913
|
+
return null;
|
|
77914
|
+
}
|
|
77915
|
+
versions.forEach((v) => {
|
|
77916
|
+
if (rangeObj.test(v)) {
|
|
77917
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
77918
|
+
max = v;
|
|
77919
|
+
maxSV = new SemVer(max, options);
|
|
77920
|
+
}
|
|
77921
|
+
}
|
|
77922
|
+
});
|
|
77923
|
+
return max;
|
|
77924
|
+
};
|
|
77925
|
+
module.exports = maxSatisfying;
|
|
77926
|
+
}
|
|
77927
|
+
});
|
|
77928
|
+
|
|
77929
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
|
|
77930
|
+
var require_min_satisfying = __commonJS({
|
|
77931
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports$1, module) {
|
|
77932
|
+
init_esm_shims();
|
|
77933
|
+
var SemVer = require_semver();
|
|
77934
|
+
var Range = require_range2();
|
|
77935
|
+
var minSatisfying = (versions, range, options) => {
|
|
77936
|
+
let min = null;
|
|
77937
|
+
let minSV = null;
|
|
77938
|
+
let rangeObj = null;
|
|
77939
|
+
try {
|
|
77940
|
+
rangeObj = new Range(range, options);
|
|
77941
|
+
} catch (er) {
|
|
77942
|
+
return null;
|
|
77943
|
+
}
|
|
77944
|
+
versions.forEach((v) => {
|
|
77945
|
+
if (rangeObj.test(v)) {
|
|
77946
|
+
if (!min || minSV.compare(v) === 1) {
|
|
77947
|
+
min = v;
|
|
77948
|
+
minSV = new SemVer(min, options);
|
|
77949
|
+
}
|
|
77950
|
+
}
|
|
77951
|
+
});
|
|
77952
|
+
return min;
|
|
77953
|
+
};
|
|
77954
|
+
module.exports = minSatisfying;
|
|
77955
|
+
}
|
|
77956
|
+
});
|
|
77957
|
+
|
|
77958
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
|
|
77959
|
+
var require_min_version = __commonJS({
|
|
77960
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports$1, module) {
|
|
77961
|
+
init_esm_shims();
|
|
77962
|
+
var SemVer = require_semver();
|
|
77963
|
+
var Range = require_range2();
|
|
77964
|
+
var gt = require_gt();
|
|
77965
|
+
var minVersion = (range, loose) => {
|
|
77966
|
+
range = new Range(range, loose);
|
|
77967
|
+
let minver = new SemVer("0.0.0");
|
|
77968
|
+
if (range.test(minver)) {
|
|
77969
|
+
return minver;
|
|
77970
|
+
}
|
|
77971
|
+
minver = new SemVer("0.0.0-0");
|
|
77972
|
+
if (range.test(minver)) {
|
|
77973
|
+
return minver;
|
|
77974
|
+
}
|
|
77975
|
+
minver = null;
|
|
77976
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
77977
|
+
const comparators = range.set[i];
|
|
77978
|
+
let setMin = null;
|
|
77979
|
+
comparators.forEach((comparator) => {
|
|
77980
|
+
const compver = new SemVer(comparator.semver.version);
|
|
77981
|
+
switch (comparator.operator) {
|
|
77982
|
+
case ">":
|
|
77983
|
+
if (compver.prerelease.length === 0) {
|
|
77984
|
+
compver.patch++;
|
|
77985
|
+
} else {
|
|
77986
|
+
compver.prerelease.push(0);
|
|
77987
|
+
}
|
|
77988
|
+
compver.raw = compver.format();
|
|
77989
|
+
/* fallthrough */
|
|
77990
|
+
case "":
|
|
77991
|
+
case ">=":
|
|
77992
|
+
if (!setMin || gt(compver, setMin)) {
|
|
77993
|
+
setMin = compver;
|
|
77994
|
+
}
|
|
77995
|
+
break;
|
|
77996
|
+
case "<":
|
|
77997
|
+
case "<=":
|
|
77998
|
+
break;
|
|
77999
|
+
/* istanbul ignore next */
|
|
78000
|
+
default:
|
|
78001
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
78002
|
+
}
|
|
78003
|
+
});
|
|
78004
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
78005
|
+
minver = setMin;
|
|
78006
|
+
}
|
|
78007
|
+
}
|
|
78008
|
+
if (minver && range.test(minver)) {
|
|
78009
|
+
return minver;
|
|
78010
|
+
}
|
|
78011
|
+
return null;
|
|
78012
|
+
};
|
|
78013
|
+
module.exports = minVersion;
|
|
78014
|
+
}
|
|
78015
|
+
});
|
|
78016
|
+
|
|
78017
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
|
|
78018
|
+
var require_valid2 = __commonJS({
|
|
78019
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports$1, module) {
|
|
78020
|
+
init_esm_shims();
|
|
78021
|
+
var Range = require_range2();
|
|
78022
|
+
var validRange = (range, options) => {
|
|
78023
|
+
try {
|
|
78024
|
+
return new Range(range, options).range || "*";
|
|
78025
|
+
} catch (er) {
|
|
78026
|
+
return null;
|
|
78027
|
+
}
|
|
78028
|
+
};
|
|
78029
|
+
module.exports = validRange;
|
|
78030
|
+
}
|
|
78031
|
+
});
|
|
78032
|
+
|
|
78033
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
|
|
78034
|
+
var require_outside = __commonJS({
|
|
78035
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports$1, module) {
|
|
78036
|
+
init_esm_shims();
|
|
78037
|
+
var SemVer = require_semver();
|
|
78038
|
+
var Comparator = require_comparator();
|
|
78039
|
+
var { ANY } = Comparator;
|
|
78040
|
+
var Range = require_range2();
|
|
78041
|
+
var satisfies = require_satisfies();
|
|
78042
|
+
var gt = require_gt();
|
|
78043
|
+
var lt2 = require_lt();
|
|
78044
|
+
var lte = require_lte();
|
|
78045
|
+
var gte = require_gte();
|
|
78046
|
+
var outside = (version12, range, hilo, options) => {
|
|
78047
|
+
version12 = new SemVer(version12, options);
|
|
78048
|
+
range = new Range(range, options);
|
|
78049
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
78050
|
+
switch (hilo) {
|
|
78051
|
+
case ">":
|
|
78052
|
+
gtfn = gt;
|
|
78053
|
+
ltefn = lte;
|
|
78054
|
+
ltfn = lt2;
|
|
78055
|
+
comp = ">";
|
|
78056
|
+
ecomp = ">=";
|
|
78057
|
+
break;
|
|
78058
|
+
case "<":
|
|
78059
|
+
gtfn = lt2;
|
|
78060
|
+
ltefn = gte;
|
|
78061
|
+
ltfn = gt;
|
|
78062
|
+
comp = "<";
|
|
78063
|
+
ecomp = "<=";
|
|
78064
|
+
break;
|
|
78065
|
+
default:
|
|
78066
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
78067
|
+
}
|
|
78068
|
+
if (satisfies(version12, range, options)) {
|
|
78069
|
+
return false;
|
|
78070
|
+
}
|
|
78071
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
78072
|
+
const comparators = range.set[i];
|
|
78073
|
+
let high = null;
|
|
78074
|
+
let low = null;
|
|
78075
|
+
comparators.forEach((comparator) => {
|
|
78076
|
+
if (comparator.semver === ANY) {
|
|
78077
|
+
comparator = new Comparator(">=0.0.0");
|
|
78078
|
+
}
|
|
78079
|
+
high = high || comparator;
|
|
78080
|
+
low = low || comparator;
|
|
78081
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
78082
|
+
high = comparator;
|
|
78083
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
78084
|
+
low = comparator;
|
|
78085
|
+
}
|
|
78086
|
+
});
|
|
78087
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
78088
|
+
return false;
|
|
78089
|
+
}
|
|
78090
|
+
if ((!low.operator || low.operator === comp) && ltefn(version12, low.semver)) {
|
|
78091
|
+
return false;
|
|
78092
|
+
} else if (low.operator === ecomp && ltfn(version12, low.semver)) {
|
|
78093
|
+
return false;
|
|
78094
|
+
}
|
|
78095
|
+
}
|
|
78096
|
+
return true;
|
|
78097
|
+
};
|
|
78098
|
+
module.exports = outside;
|
|
78099
|
+
}
|
|
78100
|
+
});
|
|
78101
|
+
|
|
78102
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
|
|
78103
|
+
var require_gtr = __commonJS({
|
|
78104
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports$1, module) {
|
|
78105
|
+
init_esm_shims();
|
|
78106
|
+
var outside = require_outside();
|
|
78107
|
+
var gtr = (version12, range, options) => outside(version12, range, ">", options);
|
|
78108
|
+
module.exports = gtr;
|
|
78109
|
+
}
|
|
78110
|
+
});
|
|
78111
|
+
|
|
78112
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
|
|
78113
|
+
var require_ltr = __commonJS({
|
|
78114
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports$1, module) {
|
|
78115
|
+
init_esm_shims();
|
|
78116
|
+
var outside = require_outside();
|
|
78117
|
+
var ltr = (version12, range, options) => outside(version12, range, "<", options);
|
|
78118
|
+
module.exports = ltr;
|
|
78119
|
+
}
|
|
78120
|
+
});
|
|
78121
|
+
|
|
78122
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
|
|
78123
|
+
var require_intersects = __commonJS({
|
|
78124
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports$1, module) {
|
|
78125
|
+
init_esm_shims();
|
|
78126
|
+
var Range = require_range2();
|
|
78127
|
+
var intersects = (r1, r2, options) => {
|
|
78128
|
+
r1 = new Range(r1, options);
|
|
78129
|
+
r2 = new Range(r2, options);
|
|
78130
|
+
return r1.intersects(r2, options);
|
|
78131
|
+
};
|
|
78132
|
+
module.exports = intersects;
|
|
78133
|
+
}
|
|
78134
|
+
});
|
|
78135
|
+
|
|
78136
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
|
|
78137
|
+
var require_simplify = __commonJS({
|
|
78138
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports$1, module) {
|
|
78139
|
+
init_esm_shims();
|
|
78140
|
+
var satisfies = require_satisfies();
|
|
78141
|
+
var compare = require_compare();
|
|
78142
|
+
module.exports = (versions, range, options) => {
|
|
78143
|
+
const set4 = [];
|
|
78144
|
+
let first = null;
|
|
78145
|
+
let prev = null;
|
|
78146
|
+
const v = versions.sort((a, b3) => compare(a, b3, options));
|
|
78147
|
+
for (const version12 of v) {
|
|
78148
|
+
const included = satisfies(version12, range, options);
|
|
78149
|
+
if (included) {
|
|
78150
|
+
prev = version12;
|
|
78151
|
+
if (!first) {
|
|
78152
|
+
first = version12;
|
|
78153
|
+
}
|
|
78154
|
+
} else {
|
|
78155
|
+
if (prev) {
|
|
78156
|
+
set4.push([first, prev]);
|
|
78157
|
+
}
|
|
78158
|
+
prev = null;
|
|
78159
|
+
first = null;
|
|
78160
|
+
}
|
|
78161
|
+
}
|
|
78162
|
+
if (first) {
|
|
78163
|
+
set4.push([first, null]);
|
|
78164
|
+
}
|
|
78165
|
+
const ranges = [];
|
|
78166
|
+
for (const [min, max] of set4) {
|
|
78167
|
+
if (min === max) {
|
|
78168
|
+
ranges.push(min);
|
|
78169
|
+
} else if (!max && min === v[0]) {
|
|
78170
|
+
ranges.push("*");
|
|
78171
|
+
} else if (!max) {
|
|
78172
|
+
ranges.push(`>=${min}`);
|
|
78173
|
+
} else if (min === v[0]) {
|
|
78174
|
+
ranges.push(`<=${max}`);
|
|
78175
|
+
} else {
|
|
78176
|
+
ranges.push(`${min} - ${max}`);
|
|
78177
|
+
}
|
|
78178
|
+
}
|
|
78179
|
+
const simplified = ranges.join(" || ");
|
|
78180
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
78181
|
+
return simplified.length < original.length ? simplified : range;
|
|
78182
|
+
};
|
|
78183
|
+
}
|
|
78184
|
+
});
|
|
78185
|
+
|
|
78186
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
|
|
78187
|
+
var require_subset = __commonJS({
|
|
78188
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports$1, module) {
|
|
78189
|
+
init_esm_shims();
|
|
78190
|
+
var Range = require_range2();
|
|
78191
|
+
var Comparator = require_comparator();
|
|
78192
|
+
var { ANY } = Comparator;
|
|
78193
|
+
var satisfies = require_satisfies();
|
|
78194
|
+
var compare = require_compare();
|
|
78195
|
+
var subset = (sub, dom, options = {}) => {
|
|
78196
|
+
if (sub === dom) {
|
|
78197
|
+
return true;
|
|
78198
|
+
}
|
|
78199
|
+
sub = new Range(sub, options);
|
|
78200
|
+
dom = new Range(dom, options);
|
|
78201
|
+
let sawNonNull = false;
|
|
78202
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
78203
|
+
for (const simpleDom of dom.set) {
|
|
78204
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
78205
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
78206
|
+
if (isSub) {
|
|
78207
|
+
continue OUTER;
|
|
78208
|
+
}
|
|
78209
|
+
}
|
|
78210
|
+
if (sawNonNull) {
|
|
78211
|
+
return false;
|
|
78212
|
+
}
|
|
78213
|
+
}
|
|
78214
|
+
return true;
|
|
78215
|
+
};
|
|
78216
|
+
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
78217
|
+
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
78218
|
+
var simpleSubset = (sub, dom, options) => {
|
|
78219
|
+
if (sub === dom) {
|
|
78220
|
+
return true;
|
|
78221
|
+
}
|
|
78222
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
78223
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
78224
|
+
return true;
|
|
78225
|
+
} else if (options.includePrerelease) {
|
|
78226
|
+
sub = minimumVersionWithPreRelease;
|
|
78227
|
+
} else {
|
|
78228
|
+
sub = minimumVersion;
|
|
78229
|
+
}
|
|
78230
|
+
}
|
|
78231
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
78232
|
+
if (options.includePrerelease) {
|
|
78233
|
+
return true;
|
|
78234
|
+
} else {
|
|
78235
|
+
dom = minimumVersion;
|
|
78236
|
+
}
|
|
78237
|
+
}
|
|
78238
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
78239
|
+
let gt, lt2;
|
|
78240
|
+
for (const c of sub) {
|
|
78241
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
78242
|
+
gt = higherGT(gt, c, options);
|
|
78243
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
|
78244
|
+
lt2 = lowerLT(lt2, c, options);
|
|
78245
|
+
} else {
|
|
78246
|
+
eqSet.add(c.semver);
|
|
78247
|
+
}
|
|
78248
|
+
}
|
|
78249
|
+
if (eqSet.size > 1) {
|
|
78250
|
+
return null;
|
|
78251
|
+
}
|
|
78252
|
+
let gtltComp;
|
|
78253
|
+
if (gt && lt2) {
|
|
78254
|
+
gtltComp = compare(gt.semver, lt2.semver, options);
|
|
78255
|
+
if (gtltComp > 0) {
|
|
78256
|
+
return null;
|
|
78257
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt2.operator !== "<=")) {
|
|
78258
|
+
return null;
|
|
78259
|
+
}
|
|
78260
|
+
}
|
|
78261
|
+
for (const eq of eqSet) {
|
|
78262
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
78263
|
+
return null;
|
|
78264
|
+
}
|
|
78265
|
+
if (lt2 && !satisfies(eq, String(lt2), options)) {
|
|
78266
|
+
return null;
|
|
78267
|
+
}
|
|
78268
|
+
for (const c of dom) {
|
|
78269
|
+
if (!satisfies(eq, String(c), options)) {
|
|
78270
|
+
return false;
|
|
78271
|
+
}
|
|
78272
|
+
}
|
|
78273
|
+
return true;
|
|
78274
|
+
}
|
|
78275
|
+
let higher, lower;
|
|
78276
|
+
let hasDomLT, hasDomGT;
|
|
78277
|
+
let needDomLTPre = lt2 && !options.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false;
|
|
78278
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
78279
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
78280
|
+
needDomLTPre = false;
|
|
78281
|
+
}
|
|
78282
|
+
for (const c of dom) {
|
|
78283
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
78284
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
78285
|
+
if (gt) {
|
|
78286
|
+
if (needDomGTPre) {
|
|
78287
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
78288
|
+
needDomGTPre = false;
|
|
78289
|
+
}
|
|
78290
|
+
}
|
|
78291
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
78292
|
+
higher = higherGT(gt, c, options);
|
|
78293
|
+
if (higher === c && higher !== gt) {
|
|
78294
|
+
return false;
|
|
78295
|
+
}
|
|
78296
|
+
} else if (gt.operator === ">=" && !c.test(gt.semver)) {
|
|
78297
|
+
return false;
|
|
78298
|
+
}
|
|
78299
|
+
}
|
|
78300
|
+
if (lt2) {
|
|
78301
|
+
if (needDomLTPre) {
|
|
78302
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
78303
|
+
needDomLTPre = false;
|
|
78304
|
+
}
|
|
78305
|
+
}
|
|
78306
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
78307
|
+
lower = lowerLT(lt2, c, options);
|
|
78308
|
+
if (lower === c && lower !== lt2) {
|
|
78309
|
+
return false;
|
|
78310
|
+
}
|
|
78311
|
+
} else if (lt2.operator === "<=" && !c.test(lt2.semver)) {
|
|
78312
|
+
return false;
|
|
78313
|
+
}
|
|
78314
|
+
}
|
|
78315
|
+
if (!c.operator && (lt2 || gt) && gtltComp !== 0) {
|
|
78316
|
+
return false;
|
|
78317
|
+
}
|
|
78318
|
+
}
|
|
78319
|
+
if (gt && hasDomLT && !lt2 && gtltComp !== 0) {
|
|
78320
|
+
return false;
|
|
78321
|
+
}
|
|
78322
|
+
if (lt2 && hasDomGT && !gt && gtltComp !== 0) {
|
|
78323
|
+
return false;
|
|
78324
|
+
}
|
|
78325
|
+
if (needDomGTPre || needDomLTPre) {
|
|
78326
|
+
return false;
|
|
78327
|
+
}
|
|
78328
|
+
return true;
|
|
78329
|
+
};
|
|
78330
|
+
var higherGT = (a, b3, options) => {
|
|
78331
|
+
if (!a) {
|
|
78332
|
+
return b3;
|
|
78333
|
+
}
|
|
78334
|
+
const comp = compare(a.semver, b3.semver, options);
|
|
78335
|
+
return comp > 0 ? a : comp < 0 ? b3 : b3.operator === ">" && a.operator === ">=" ? b3 : a;
|
|
78336
|
+
};
|
|
78337
|
+
var lowerLT = (a, b3, options) => {
|
|
78338
|
+
if (!a) {
|
|
78339
|
+
return b3;
|
|
78340
|
+
}
|
|
78341
|
+
const comp = compare(a.semver, b3.semver, options);
|
|
78342
|
+
return comp < 0 ? a : comp > 0 ? b3 : b3.operator === "<" && a.operator === "<=" ? b3 : a;
|
|
78343
|
+
};
|
|
78344
|
+
module.exports = subset;
|
|
78345
|
+
}
|
|
78346
|
+
});
|
|
78347
|
+
|
|
78348
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
|
|
78349
|
+
var require_semver2 = __commonJS({
|
|
78350
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports$1, module) {
|
|
78351
|
+
init_esm_shims();
|
|
78352
|
+
var internalRe = require_re();
|
|
78353
|
+
var constants = require_constants3();
|
|
78354
|
+
var SemVer = require_semver();
|
|
78355
|
+
var identifiers = require_identifiers2();
|
|
78356
|
+
var parse6 = require_parse();
|
|
78357
|
+
var valid = require_valid();
|
|
78358
|
+
var clean2 = require_clean();
|
|
78359
|
+
var inc = require_inc();
|
|
78360
|
+
var diff = require_diff();
|
|
78361
|
+
var major = require_major();
|
|
78362
|
+
var minor = require_minor();
|
|
78363
|
+
var patch = require_patch();
|
|
78364
|
+
var prerelease = require_prerelease();
|
|
78365
|
+
var compare = require_compare();
|
|
78366
|
+
var rcompare = require_rcompare();
|
|
78367
|
+
var compareLoose = require_compare_loose();
|
|
78368
|
+
var compareBuild = require_compare_build();
|
|
78369
|
+
var sort = require_sort();
|
|
78370
|
+
var rsort = require_rsort();
|
|
78371
|
+
var gt = require_gt();
|
|
78372
|
+
var lt2 = require_lt();
|
|
78373
|
+
var eq = require_eq();
|
|
78374
|
+
var neq = require_neq();
|
|
78375
|
+
var gte = require_gte();
|
|
78376
|
+
var lte = require_lte();
|
|
78377
|
+
var cmp = require_cmp();
|
|
78378
|
+
var coerce2 = require_coerce();
|
|
78379
|
+
var truncate = require_truncate();
|
|
78380
|
+
var Comparator = require_comparator();
|
|
78381
|
+
var Range = require_range2();
|
|
78382
|
+
var satisfies = require_satisfies();
|
|
78383
|
+
var toComparators = require_to_comparators();
|
|
78384
|
+
var maxSatisfying = require_max_satisfying();
|
|
78385
|
+
var minSatisfying = require_min_satisfying();
|
|
78386
|
+
var minVersion = require_min_version();
|
|
78387
|
+
var validRange = require_valid2();
|
|
78388
|
+
var outside = require_outside();
|
|
78389
|
+
var gtr = require_gtr();
|
|
78390
|
+
var ltr = require_ltr();
|
|
78391
|
+
var intersects = require_intersects();
|
|
78392
|
+
var simplifyRange = require_simplify();
|
|
78393
|
+
var subset = require_subset();
|
|
78394
|
+
module.exports = {
|
|
78395
|
+
parse: parse6,
|
|
78396
|
+
valid,
|
|
78397
|
+
clean: clean2,
|
|
78398
|
+
inc,
|
|
78399
|
+
diff,
|
|
78400
|
+
major,
|
|
78401
|
+
minor,
|
|
78402
|
+
patch,
|
|
78403
|
+
prerelease,
|
|
78404
|
+
compare,
|
|
78405
|
+
rcompare,
|
|
78406
|
+
compareLoose,
|
|
78407
|
+
compareBuild,
|
|
78408
|
+
sort,
|
|
78409
|
+
rsort,
|
|
78410
|
+
gt,
|
|
78411
|
+
lt: lt2,
|
|
78412
|
+
eq,
|
|
78413
|
+
neq,
|
|
78414
|
+
gte,
|
|
78415
|
+
lte,
|
|
78416
|
+
cmp,
|
|
78417
|
+
coerce: coerce2,
|
|
78418
|
+
truncate,
|
|
78419
|
+
Comparator,
|
|
78420
|
+
Range,
|
|
78421
|
+
satisfies,
|
|
78422
|
+
toComparators,
|
|
78423
|
+
maxSatisfying,
|
|
78424
|
+
minSatisfying,
|
|
78425
|
+
minVersion,
|
|
78426
|
+
validRange,
|
|
78427
|
+
outside,
|
|
78428
|
+
gtr,
|
|
78429
|
+
ltr,
|
|
78430
|
+
intersects,
|
|
78431
|
+
simplifyRange,
|
|
78432
|
+
subset,
|
|
78433
|
+
SemVer,
|
|
78434
|
+
re: internalRe.re,
|
|
78435
|
+
src: internalRe.src,
|
|
78436
|
+
tokens: internalRe.t,
|
|
78437
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
78438
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
78439
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
78440
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
78441
|
+
};
|
|
78442
|
+
}
|
|
78443
|
+
});
|
|
78444
|
+
|
|
76451
78445
|
// ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
76452
78446
|
var require_src2 = __commonJS({
|
|
76453
78447
|
"../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$1, module) {
|
|
@@ -76582,7 +78576,7 @@ init_esm_shims();
|
|
|
76582
78576
|
|
|
76583
78577
|
// package.json
|
|
76584
78578
|
var package_default = {
|
|
76585
|
-
version: "1.
|
|
78579
|
+
version: "1.12.0"};
|
|
76586
78580
|
|
|
76587
78581
|
// src/app.ts
|
|
76588
78582
|
init_esm_shims();
|
|
@@ -147524,6 +149518,136 @@ var getCommand = (appContext) => new Command("get").description("Get details for
|
|
|
147524
149518
|
// src/commands/init-command.ts
|
|
147525
149519
|
init_esm_shims();
|
|
147526
149520
|
|
|
149521
|
+
// src/agents/load-agents.ts
|
|
149522
|
+
init_esm_shims();
|
|
149523
|
+
var import_semver = __toESM(require_semver2());
|
|
149524
|
+
|
|
149525
|
+
// src/agents/schema.ts
|
|
149526
|
+
init_esm_shims();
|
|
149527
|
+
var agentDetectSchema = zod_default.looseObject({
|
|
149528
|
+
// Config dir under $HOME (e.g. ".claude"). Presence is the PRIMARY signal
|
|
149529
|
+
// that an agent is installed on this machine.
|
|
149530
|
+
dir: zod_default.string(),
|
|
149531
|
+
// Executable name resolved on PATH (e.g. "claude"). Secondary: decides
|
|
149532
|
+
// plugin-install vs. standalone-fallback for a present agent.
|
|
149533
|
+
exe: zod_default.string()
|
|
149534
|
+
});
|
|
149535
|
+
var agentInstallStepSchema = zod_default.looseObject({
|
|
149536
|
+
label: zod_default.string(),
|
|
149537
|
+
// Bare executable name (resolved on PATH) and its literal argv. Run with no
|
|
149538
|
+
// shell, so args are never word-split or interpolated.
|
|
149539
|
+
command: zod_default.string(),
|
|
149540
|
+
args: zod_default.array(zod_default.string()),
|
|
149541
|
+
// required:false steps may fail without failing the install (e.g. a
|
|
149542
|
+
// marketplace add that's already present).
|
|
149543
|
+
required: zod_default.boolean().optional()
|
|
149544
|
+
});
|
|
149545
|
+
var agentInstallSchema = zod_default.looseObject({
|
|
149546
|
+
// The executable the steps need on PATH (shown in manual instructions).
|
|
149547
|
+
executable: zod_default.string(),
|
|
149548
|
+
steps: zod_default.array(agentInstallStepSchema)
|
|
149549
|
+
});
|
|
149550
|
+
var agentStandaloneMcpSchema = zod_default.looseObject({
|
|
149551
|
+
file: zod_default.string(),
|
|
149552
|
+
shape: zod_default.string()
|
|
149553
|
+
});
|
|
149554
|
+
var agentStandaloneHooksSchema = zod_default.looseObject({
|
|
149555
|
+
// Config file to merge the hook declarations into (relative to $HOME).
|
|
149556
|
+
file: zod_default.string(),
|
|
149557
|
+
// Names the config schema. The CLI's generic JSON merger handles the shared
|
|
149558
|
+
// `{ hooks: { Event: [...] } }` shape (claude-settings, codex-hooks); other
|
|
149559
|
+
// formats (e.g. kiro-agent) need their own writer and are skipped until one
|
|
149560
|
+
// exists.
|
|
149561
|
+
format: zod_default.string(),
|
|
149562
|
+
sessionStart: zod_default.boolean().optional(),
|
|
149563
|
+
// Domains to ensure on this host's sandbox network allowlist
|
|
149564
|
+
// (sandbox.network.allowedDomains) after merging — e.g. ["*.zero.xyz"] for
|
|
149565
|
+
// Claude. Omitted hosts get no allowlist entry.
|
|
149566
|
+
network: zod_default.array(zod_default.string()).optional()
|
|
149567
|
+
});
|
|
149568
|
+
var agentStandaloneSchema = zod_default.looseObject({
|
|
149569
|
+
// Skill install dirs (relative to $HOME) for the standalone fallback.
|
|
149570
|
+
skills: zod_default.array(zod_default.string()).optional(),
|
|
149571
|
+
// mcp/hooks targets are carried for a future pass; only `skills` is consumed
|
|
149572
|
+
// today (see init-command.ts). `mcp` is optional — hook-provisioned hosts
|
|
149573
|
+
// (claude-code, codex) omit it; ephemeral/plugin-bundled hosts (e.g. kiro)
|
|
149574
|
+
// carry it.
|
|
149575
|
+
mcp: agentStandaloneMcpSchema.optional(),
|
|
149576
|
+
hooks: agentStandaloneHooksSchema.optional()
|
|
149577
|
+
});
|
|
149578
|
+
var agentEntrySchema = zod_default.looseObject({
|
|
149579
|
+
id: zod_default.string(),
|
|
149580
|
+
name: zod_default.string(),
|
|
149581
|
+
// Optional per-entry minimum CLI version gate (semver). Top-level minCli
|
|
149582
|
+
// applies to the whole matrix.
|
|
149583
|
+
minCli: zod_default.string().optional(),
|
|
149584
|
+
detect: agentDetectSchema,
|
|
149585
|
+
// Optional: standalone-only agents (e.g. kiro) carry no install block.
|
|
149586
|
+
install: agentInstallSchema.optional(),
|
|
149587
|
+
standalone: agentStandaloneSchema.optional()
|
|
149588
|
+
});
|
|
149589
|
+
var agentsMatrixSchema = zod_default.looseObject({
|
|
149590
|
+
schemaVersion: zod_default.number(),
|
|
149591
|
+
minCli: zod_default.string().optional(),
|
|
149592
|
+
agents: zod_default.array(agentEntrySchema)
|
|
149593
|
+
});
|
|
149594
|
+
|
|
149595
|
+
// src/agents/load-agents.ts
|
|
149596
|
+
var ALLOWED_ORG = "officialzeroxyz";
|
|
149597
|
+
var isBelowGate = (version12, gate) => {
|
|
149598
|
+
const v = import_semver.default.coerce(version12);
|
|
149599
|
+
const g2 = import_semver.default.coerce(gate);
|
|
149600
|
+
if (!v || !g2) return false;
|
|
149601
|
+
return import_semver.default.lt(v, g2);
|
|
149602
|
+
};
|
|
149603
|
+
var isAllowedSlug = (slug) => {
|
|
149604
|
+
const value = slug.trim();
|
|
149605
|
+
if (value.length === 0) return false;
|
|
149606
|
+
const urlMatch = value.match(
|
|
149607
|
+
/^(?:https?:\/\/)?github\.com\/([^/]+)(?:\/|$)/i
|
|
149608
|
+
);
|
|
149609
|
+
if (urlMatch) {
|
|
149610
|
+
return urlMatch[1]?.toLowerCase() === ALLOWED_ORG;
|
|
149611
|
+
}
|
|
149612
|
+
if (value.includes("://")) return false;
|
|
149613
|
+
const shorthand = value.match(/^([^/]+)\/[^/]+$/);
|
|
149614
|
+
if (shorthand) {
|
|
149615
|
+
return shorthand[1]?.toLowerCase() === ALLOWED_ORG;
|
|
149616
|
+
}
|
|
149617
|
+
return false;
|
|
149618
|
+
};
|
|
149619
|
+
var looksLikeRepoRef = (arg) => {
|
|
149620
|
+
if (/github\.com/i.test(arg)) return true;
|
|
149621
|
+
if (arg.includes("://")) return false;
|
|
149622
|
+
return /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/.test(arg);
|
|
149623
|
+
};
|
|
149624
|
+
var passesAllowlist = (entry) => {
|
|
149625
|
+
if (!entry.install) return true;
|
|
149626
|
+
return entry.install.steps.every(
|
|
149627
|
+
(step) => step.args.filter(looksLikeRepoRef).every(isAllowedSlug)
|
|
149628
|
+
);
|
|
149629
|
+
};
|
|
149630
|
+
var filterMatrix = (matrix, cliVersion) => {
|
|
149631
|
+
const topGate = matrix.minCli;
|
|
149632
|
+
return matrix.agents.filter((entry) => {
|
|
149633
|
+
const gate = entry.minCli ?? topGate;
|
|
149634
|
+
if (gate && isBelowGate(cliVersion, gate)) return false;
|
|
149635
|
+
return passesAllowlist(entry);
|
|
149636
|
+
});
|
|
149637
|
+
};
|
|
149638
|
+
var fetchMatrix = async (url4) => {
|
|
149639
|
+
const res = await fetch(url4);
|
|
149640
|
+
if (!res.ok) {
|
|
149641
|
+
throw new Error(`GET ${url4} failed with ${res.status}`);
|
|
149642
|
+
}
|
|
149643
|
+
const raw = await res.json();
|
|
149644
|
+
return agentsMatrixSchema.parse(raw);
|
|
149645
|
+
};
|
|
149646
|
+
var loadAgents = async (webBase, cliVersion) => {
|
|
149647
|
+
const matrix = await fetchMatrix(`${webBase}/agents.json`);
|
|
149648
|
+
return { entries: filterMatrix(matrix, cliVersion) };
|
|
149649
|
+
};
|
|
149650
|
+
|
|
147527
149651
|
// src/util/install-banner.ts
|
|
147528
149652
|
init_esm_shims();
|
|
147529
149653
|
var colorsEnabled = () => {
|
|
@@ -147597,143 +149721,25 @@ var updateJsonConfigFile = (path3, update2, options = {}) => {
|
|
|
147597
149721
|
|
|
147598
149722
|
// src/commands/init-command.ts
|
|
147599
149723
|
var SKILL_DIRS = [".claude/skills", ".agents/skills"];
|
|
147600
|
-
var ZERO_SANDBOX_DOMAIN = "*.zero.xyz";
|
|
147601
149724
|
var CLAUDE_SETTINGS_PATH = ".claude/settings.json";
|
|
147602
149725
|
var CODEX_HOOKS_PATH = ".codex/hooks.json";
|
|
147603
|
-
var
|
|
147604
|
-
var
|
|
147605
|
-
var initAgentSchema = zod_default.enum(INIT_AGENTS);
|
|
147606
|
-
var HARNESS_SPECS = {
|
|
147607
|
-
claude: {
|
|
147608
|
-
agent: "claude",
|
|
147609
|
-
displayName: "Claude Code",
|
|
147610
|
-
executable: "claude",
|
|
147611
|
-
installCommands: [
|
|
147612
|
-
{
|
|
147613
|
-
label: "add marketplace",
|
|
147614
|
-
command: "claude",
|
|
147615
|
-
args: ["plugin", "marketplace", "add", "officialzeroxyz/zero-plugins"],
|
|
147616
|
-
required: false
|
|
147617
|
-
},
|
|
147618
|
-
{
|
|
147619
|
-
label: "install plugin",
|
|
147620
|
-
command: "claude",
|
|
147621
|
-
args: ["plugin", "install", "zero@zero-plugins"]
|
|
147622
|
-
}
|
|
147623
|
-
],
|
|
147624
|
-
manualInstructions: [
|
|
147625
|
-
"Claude Code Desktop: open the Code tab, choose Customize, then add a Personal plugin marketplace from officialzeroxyz/zero-plugins.",
|
|
147626
|
-
"After it syncs, click the + icon on the Zero plugin, then start a new session and ask Claude to help set up and test Zero."
|
|
147627
|
-
]
|
|
147628
|
-
},
|
|
147629
|
-
codex: {
|
|
147630
|
-
agent: "codex",
|
|
147631
|
-
displayName: "Codex",
|
|
147632
|
-
executable: "codex",
|
|
147633
|
-
installCommands: [
|
|
147634
|
-
{
|
|
147635
|
-
label: "add marketplace",
|
|
147636
|
-
command: "codex",
|
|
147637
|
-
args: ["plugin", "marketplace", "add", "officialzeroxyz/zero-plugins"],
|
|
147638
|
-
required: false
|
|
147639
|
-
},
|
|
147640
|
-
{
|
|
147641
|
-
label: "install plugin",
|
|
147642
|
-
command: "codex",
|
|
147643
|
-
args: ["plugin", "add", "zero@zero-plugins"]
|
|
147644
|
-
}
|
|
147645
|
-
],
|
|
147646
|
-
manualInstructions: [
|
|
147647
|
-
"Codex app: open Plugins in the sidebar, click +, then add marketplace officialzeroxyz/zero-plugins.",
|
|
147648
|
-
"Select the Zero filter, click Add plugin on Zero, then start a new chat and ask Codex to help set up and test Zero."
|
|
147649
|
-
]
|
|
147650
|
-
},
|
|
147651
|
-
gemini: {
|
|
147652
|
-
agent: "gemini",
|
|
147653
|
-
displayName: "Gemini CLI",
|
|
147654
|
-
executable: "gemini",
|
|
147655
|
-
installCommands: [
|
|
147656
|
-
{
|
|
147657
|
-
label: "install extension",
|
|
147658
|
-
command: "gemini",
|
|
147659
|
-
args: [
|
|
147660
|
-
"extensions",
|
|
147661
|
-
"install",
|
|
147662
|
-
"https://github.com/officialzeroxyz/zero-plugins",
|
|
147663
|
-
"--auto-update"
|
|
147664
|
-
]
|
|
147665
|
-
}
|
|
147666
|
-
],
|
|
147667
|
-
manualInstructions: [
|
|
147668
|
-
"Gemini CLI: run this from a shell where `gemini` is on PATH: gemini extensions install https://github.com/officialzeroxyz/zero-plugins --auto-update"
|
|
147669
|
-
]
|
|
147670
|
-
},
|
|
147671
|
-
openclaw: {
|
|
147672
|
-
agent: "openclaw",
|
|
147673
|
-
displayName: "OpenClaw",
|
|
147674
|
-
executable: "openclaw",
|
|
147675
|
-
installCommands: [
|
|
147676
|
-
{
|
|
147677
|
-
label: "install plugin",
|
|
147678
|
-
command: "openclaw",
|
|
147679
|
-
args: [
|
|
147680
|
-
"plugins",
|
|
147681
|
-
"install",
|
|
147682
|
-
"zero",
|
|
147683
|
-
"--marketplace",
|
|
147684
|
-
"officialzeroxyz/zero-plugins"
|
|
147685
|
-
]
|
|
147686
|
-
}
|
|
147687
|
-
],
|
|
147688
|
-
manualInstructions: [
|
|
147689
|
-
"OpenClaw: run this from a shell where `openclaw` is on PATH: openclaw plugins install zero --marketplace officialzeroxyz/zero-plugins"
|
|
147690
|
-
]
|
|
147691
|
-
}
|
|
147692
|
-
};
|
|
149726
|
+
var CLI_VERSION = package_default.version;
|
|
149727
|
+
var STANDALONE = "standalone";
|
|
147693
149728
|
var unique = (items) => [...new Set(items)];
|
|
147694
|
-
var
|
|
147695
|
-
if (
|
|
149729
|
+
var buildSelection = (standalone, matrixIds) => {
|
|
149730
|
+
if (standalone) {
|
|
147696
149731
|
return {
|
|
147697
|
-
kind: "
|
|
147698
|
-
requestedAgents: [
|
|
147699
|
-
pluginAgents: [
|
|
149732
|
+
kind: "standalone",
|
|
149733
|
+
requestedAgents: [STANDALONE],
|
|
149734
|
+
pluginAgents: []
|
|
147700
149735
|
};
|
|
147701
149736
|
}
|
|
147702
|
-
const parsed = unique(
|
|
147703
|
-
values.flatMap(
|
|
147704
|
-
(value) => value.split(",").map((part) => part.trim().toLowerCase()).filter(Boolean)
|
|
147705
|
-
)
|
|
147706
|
-
);
|
|
147707
|
-
if (parsed.length === 0) {
|
|
147708
|
-
throw new Error("Pass at least one agent name to --agent");
|
|
147709
|
-
}
|
|
147710
|
-
const agents = parsed.map((value) => {
|
|
147711
|
-
const result = initAgentSchema.safeParse(value);
|
|
147712
|
-
if (!result.success) {
|
|
147713
|
-
throw new Error(
|
|
147714
|
-
`Unknown agent "${value}". Expected one of: ${INIT_AGENTS.join(", ")}`
|
|
147715
|
-
);
|
|
147716
|
-
}
|
|
147717
|
-
return result.data;
|
|
147718
|
-
});
|
|
147719
|
-
if (agents.includes("standalone") && agents.length > 1) {
|
|
147720
|
-
throw new Error(
|
|
147721
|
-
"`standalone` cannot be combined with other --agent values; run it separately."
|
|
147722
|
-
);
|
|
147723
|
-
}
|
|
147724
|
-
if (agents[0] === "standalone") {
|
|
147725
|
-
return { kind: "standalone", requestedAgents: agents, pluginAgents: [] };
|
|
147726
|
-
}
|
|
147727
149737
|
return {
|
|
147728
|
-
kind: "
|
|
147729
|
-
requestedAgents:
|
|
147730
|
-
pluginAgents:
|
|
149738
|
+
kind: "default",
|
|
149739
|
+
requestedAgents: [...matrixIds],
|
|
149740
|
+
pluginAgents: [...matrixIds]
|
|
147731
149741
|
};
|
|
147732
149742
|
};
|
|
147733
|
-
var collectAgentOption = (value, previous = []) => [
|
|
147734
|
-
...previous,
|
|
147735
|
-
value
|
|
147736
|
-
];
|
|
147737
149743
|
var commandSummary = (command, args) => [command, ...args].join(" ");
|
|
147738
149744
|
var commandOutput = (result) => {
|
|
147739
149745
|
const chunks = [result.stderr, result.stdout].map((chunk) => typeof chunk === "string" ? chunk.trim() : "").filter(Boolean);
|
|
@@ -147760,20 +149766,22 @@ var isCommandCallable = (command) => {
|
|
|
147760
149766
|
});
|
|
147761
149767
|
return result.status === 0;
|
|
147762
149768
|
};
|
|
147763
|
-
var
|
|
149769
|
+
var detectAgent = (home, entry) => ({
|
|
149770
|
+
entry,
|
|
149771
|
+
present: existsSync(join(home, entry.detect.dir)),
|
|
149772
|
+
exeCallable: isCommandCallable(entry.detect.exe),
|
|
149773
|
+
method: entry.install ?? null
|
|
149774
|
+
});
|
|
149775
|
+
var installAgentPlugin = (entry, method, options) => {
|
|
149776
|
+
const base2 = { agent: entry.id, displayName: entry.name };
|
|
147764
149777
|
if (options.dryRun) {
|
|
147765
|
-
for (const step of
|
|
149778
|
+
for (const step of method.steps) {
|
|
147766
149779
|
stepInfo(`would run: ${commandSummary(step.command, step.args)}`);
|
|
147767
149780
|
}
|
|
147768
|
-
return {
|
|
147769
|
-
agent: spec.agent,
|
|
147770
|
-
displayName: spec.displayName,
|
|
147771
|
-
status: "would_install",
|
|
147772
|
-
detail: "dry run"
|
|
147773
|
-
};
|
|
149781
|
+
return { ...base2, status: "would_install", detail: "dry run" };
|
|
147774
149782
|
}
|
|
147775
149783
|
let optionalFailure;
|
|
147776
|
-
for (const step of
|
|
149784
|
+
for (const step of method.steps) {
|
|
147777
149785
|
if (options.verbose) {
|
|
147778
149786
|
stepInfo(`running: ${commandSummary(step.command, step.args)}`);
|
|
147779
149787
|
}
|
|
@@ -147789,33 +149797,21 @@ var installHarnessPlugin = (spec, options) => {
|
|
|
147789
149797
|
if (options.verbose) stepInfo(`${optionalFailure}; continuing`);
|
|
147790
149798
|
continue;
|
|
147791
149799
|
}
|
|
147792
|
-
return {
|
|
147793
|
-
agent: spec.agent,
|
|
147794
|
-
displayName: spec.displayName,
|
|
147795
|
-
status: "failed",
|
|
147796
|
-
detail
|
|
147797
|
-
};
|
|
149800
|
+
return { ...base2, status: "failed", detail };
|
|
147798
149801
|
}
|
|
147799
149802
|
return {
|
|
147800
|
-
|
|
147801
|
-
displayName: spec.displayName,
|
|
149803
|
+
...base2,
|
|
147802
149804
|
status: "installed",
|
|
147803
149805
|
detail: optionalFailure ? `installed; ignored ${optionalFailure}` : void 0
|
|
147804
149806
|
};
|
|
147805
149807
|
};
|
|
147806
|
-
var
|
|
147807
|
-
|
|
147808
|
-
|
|
147809
|
-
|
|
147810
|
-
};
|
|
147811
|
-
var fallbackReason = (selection, detectedAgents, results) => {
|
|
147812
|
-
if (selection.kind === "standalone")
|
|
147813
|
-
return "--agent standalone was requested";
|
|
147814
|
-
if (selection.kind === "default" && detectedAgents.length === 0) {
|
|
147815
|
-
return "no supported harness CLIs were callable in this shell";
|
|
149808
|
+
var fallbackReason = (selection, detections, results) => {
|
|
149809
|
+
if (selection.kind === "standalone") return "--standalone was requested";
|
|
149810
|
+
if (!detections.some((detection) => detection.present)) {
|
|
149811
|
+
return "no supported harness was detected in this environment";
|
|
147816
149812
|
}
|
|
147817
|
-
if (results.every((result) => result.status === "skipped_unavailable")) {
|
|
147818
|
-
return "no
|
|
149813
|
+
if (results.length > 0 && results.every((result) => result.status === "skipped_unavailable")) {
|
|
149814
|
+
return "no detected harness could install the Zero plugin";
|
|
147819
149815
|
}
|
|
147820
149816
|
return "no plugin install succeeded";
|
|
147821
149817
|
};
|
|
@@ -147883,7 +149879,8 @@ var installHookScripts = async (home, hooksJson, webBase, verbose) => {
|
|
|
147883
149879
|
})
|
|
147884
149880
|
);
|
|
147885
149881
|
};
|
|
147886
|
-
var
|
|
149882
|
+
var ensureSandboxDomains = (settings, domains, verbose) => {
|
|
149883
|
+
if (domains.length === 0) return;
|
|
147887
149884
|
if (!settings.sandbox || typeof settings.sandbox !== "object") {
|
|
147888
149885
|
settings.sandbox = {};
|
|
147889
149886
|
}
|
|
@@ -147896,10 +149893,10 @@ var ensureZeroSandboxAllowlist = (settings, verbose) => {
|
|
|
147896
149893
|
network.allowedDomains = [];
|
|
147897
149894
|
}
|
|
147898
149895
|
const allowedDomains = network.allowedDomains;
|
|
147899
|
-
|
|
147900
|
-
allowedDomains.
|
|
147901
|
-
|
|
147902
|
-
stepInfo(`sandbox.network.allowedDomains += ${
|
|
149896
|
+
for (const domain3 of domains) {
|
|
149897
|
+
if (!allowedDomains.includes(domain3)) {
|
|
149898
|
+
allowedDomains.push(domain3);
|
|
149899
|
+
if (verbose) stepInfo(`sandbox.network.allowedDomains += ${domain3}`);
|
|
147903
149900
|
}
|
|
147904
149901
|
}
|
|
147905
149902
|
};
|
|
@@ -147951,9 +149948,7 @@ var registerHooksInJsonFile = (home, hooksJson, target, verbose) => {
|
|
|
147951
149948
|
}
|
|
147952
149949
|
}
|
|
147953
149950
|
}
|
|
147954
|
-
|
|
147955
|
-
ensureZeroSandboxAllowlist(config2, verbose);
|
|
147956
|
-
}
|
|
149951
|
+
ensureSandboxDomains(config2, target.network, verbose);
|
|
147957
149952
|
return true;
|
|
147958
149953
|
},
|
|
147959
149954
|
{ createIfMissing: true }
|
|
@@ -147967,6 +149962,21 @@ var registerHooksInJsonFile = (home, hooksJson, target, verbose) => {
|
|
|
147967
149962
|
}
|
|
147968
149963
|
return true;
|
|
147969
149964
|
};
|
|
149965
|
+
var JSON_HOOK_FORMATS = /* @__PURE__ */ new Set(["claude-settings", "codex-hooks"]);
|
|
149966
|
+
var buildHookTargets = (entries) => {
|
|
149967
|
+
const byFile = /* @__PURE__ */ new Map();
|
|
149968
|
+
for (const entry of entries) {
|
|
149969
|
+
const hooks = entry.standalone?.hooks;
|
|
149970
|
+
if (!hooks || !JSON_HOOK_FORMATS.has(hooks.format)) continue;
|
|
149971
|
+
const existing = byFile.get(hooks.file);
|
|
149972
|
+
const network = unique([
|
|
149973
|
+
...existing?.network ?? [],
|
|
149974
|
+
...hooks.network ?? []
|
|
149975
|
+
]);
|
|
149976
|
+
byFile.set(hooks.file, { relativePath: hooks.file, network });
|
|
149977
|
+
}
|
|
149978
|
+
return [...byFile.values()];
|
|
149979
|
+
};
|
|
147970
149980
|
var runStandaloneInit = async (appContext, options = {}) => {
|
|
147971
149981
|
const verbose = options.verbose ?? false;
|
|
147972
149982
|
options.onStep?.("fetch");
|
|
@@ -148012,35 +150022,24 @@ var runStandaloneInit = async (appContext, options = {}) => {
|
|
|
148012
150022
|
);
|
|
148013
150023
|
stepSuccess("Hook scripts installed", "~/.zero/hooks");
|
|
148014
150024
|
options.onStep?.("settings");
|
|
148015
|
-
const
|
|
148016
|
-
|
|
148017
|
-
|
|
148018
|
-
|
|
148019
|
-
|
|
148020
|
-
|
|
148021
|
-
|
|
148022
|
-
|
|
148023
|
-
|
|
148024
|
-
|
|
148025
|
-
|
|
148026
|
-
|
|
148027
|
-
const codexHooksRegistered = registerHooksInJsonFile(
|
|
148028
|
-
home,
|
|
148029
|
-
hooksJson,
|
|
148030
|
-
{
|
|
148031
|
-
relativePath: CODEX_HOOKS_PATH,
|
|
148032
|
-
includeSandboxAllowlist: false
|
|
148033
|
-
},
|
|
148034
|
-
verbose
|
|
148035
|
-
);
|
|
148036
|
-
if (codexHooksRegistered) {
|
|
148037
|
-
stepSuccess("Codex hooks registered", "~/.codex/hooks.json");
|
|
150025
|
+
const registeredFiles = /* @__PURE__ */ new Set();
|
|
150026
|
+
for (const target of options.hookTargets ?? []) {
|
|
150027
|
+
const registered = registerHooksInJsonFile(
|
|
150028
|
+
home,
|
|
150029
|
+
hooksJson,
|
|
150030
|
+
target,
|
|
150031
|
+
verbose
|
|
150032
|
+
);
|
|
150033
|
+
if (registered) {
|
|
150034
|
+
registeredFiles.add(target.relativePath);
|
|
150035
|
+
stepSuccess("Hooks registered", `~/${target.relativePath}`);
|
|
150036
|
+
}
|
|
148038
150037
|
}
|
|
148039
150038
|
return {
|
|
148040
150039
|
skillsInstalled,
|
|
148041
150040
|
hookScriptsInstalled,
|
|
148042
|
-
settingsRegistered,
|
|
148043
|
-
codexHooksRegistered
|
|
150041
|
+
settingsRegistered: registeredFiles.has(CLAUDE_SETTINGS_PATH),
|
|
150042
|
+
codexHooksRegistered: registeredFiles.has(CODEX_HOOKS_PATH)
|
|
148044
150043
|
};
|
|
148045
150044
|
};
|
|
148046
150045
|
var statusLabel = (result) => {
|
|
@@ -148067,8 +150066,7 @@ var runInit = async (appContext, options = {}) => {
|
|
|
148067
150066
|
const verbose = options.verbose ?? false;
|
|
148068
150067
|
const dryRun = options.dryRun ?? false;
|
|
148069
150068
|
const fallbackAllowed = options.fallback ?? true;
|
|
148070
|
-
const
|
|
148071
|
-
const requestedAgents = selection.requestedAgents;
|
|
150069
|
+
const home = homedir();
|
|
148072
150070
|
let currentStep = "plugins";
|
|
148073
150071
|
appContext.services.analyticsService.capture("init_started", {});
|
|
148074
150072
|
try {
|
|
@@ -148077,55 +150075,59 @@ var runInit = async (appContext, options = {}) => {
|
|
|
148077
150075
|
console.log("");
|
|
148078
150076
|
console.log(color.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
148079
150077
|
console.log("");
|
|
150078
|
+
currentStep = "fetch";
|
|
150079
|
+
const { entries } = await loadAgents(
|
|
150080
|
+
appContext.env.ZERO_WEB_URL,
|
|
150081
|
+
CLI_VERSION
|
|
150082
|
+
);
|
|
150083
|
+
currentStep = "plugins";
|
|
150084
|
+
const entryById = new Map(entries.map((entry) => [entry.id, entry]));
|
|
150085
|
+
const selection = buildSelection(
|
|
150086
|
+
options.standalone ?? false,
|
|
150087
|
+
entries.map((entry) => entry.id)
|
|
150088
|
+
);
|
|
150089
|
+
const requestedAgents = selection.requestedAgents;
|
|
148080
150090
|
console.log(` Requested agents: ${requestedAgents.join(", ")}`);
|
|
148081
150091
|
if (dryRun) stepInfo("dry run: no plugin commands or file writes will run");
|
|
148082
|
-
const
|
|
148083
|
-
|
|
148084
|
-
|
|
150092
|
+
const detections = selection.kind === "standalone" ? [] : selection.pluginAgents.flatMap((id) => {
|
|
150093
|
+
const entry = entryById.get(id);
|
|
150094
|
+
return entry ? [detectAgent(home, entry)] : [];
|
|
150095
|
+
});
|
|
150096
|
+
const detectedAgents = detections.filter((detection) => detection.present).map((detection) => detection.entry.id);
|
|
148085
150097
|
if (selection.kind === "default") {
|
|
148086
150098
|
console.log(
|
|
148087
|
-
` Detected
|
|
150099
|
+
` Detected harnesses: ${detectedAgents.length > 0 ? detectedAgents.join(", ") : "none"}`
|
|
148088
150100
|
);
|
|
148089
150101
|
}
|
|
148090
150102
|
console.log("");
|
|
150103
|
+
const fallbackSkillDirs = [];
|
|
148091
150104
|
const pluginResults = [];
|
|
148092
|
-
|
|
148093
|
-
|
|
148094
|
-
|
|
148095
|
-
|
|
148096
|
-
|
|
148097
|
-
|
|
148098
|
-
|
|
148099
|
-
|
|
148100
|
-
|
|
148101
|
-
};
|
|
148102
|
-
pluginResults.push(result2);
|
|
148103
|
-
stepSkip(
|
|
148104
|
-
`${spec.displayName}: ${statusLabel(result2)}`,
|
|
148105
|
-
result2.detail
|
|
148106
|
-
);
|
|
148107
|
-
if (selection.kind === "specific") {
|
|
148108
|
-
printManualInstructions(spec);
|
|
148109
|
-
}
|
|
148110
|
-
continue;
|
|
148111
|
-
}
|
|
148112
|
-
const result = installHarnessPlugin(spec, { dryRun, verbose });
|
|
148113
|
-
pluginResults.push(result);
|
|
148114
|
-
if (result.status === "installed") {
|
|
148115
|
-
stepSuccess(
|
|
148116
|
-
`${spec.displayName}: ${statusLabel(result)}`,
|
|
148117
|
-
result.detail
|
|
148118
|
-
);
|
|
148119
|
-
} else if (result.status === "would_install") {
|
|
148120
|
-
stepSkip(
|
|
148121
|
-
`${spec.displayName}: ${statusLabel(result)}`,
|
|
148122
|
-
result.detail
|
|
148123
|
-
);
|
|
150105
|
+
for (const detection of detections) {
|
|
150106
|
+
const { entry, present, exeCallable, method } = detection;
|
|
150107
|
+
if (present && exeCallable && method) {
|
|
150108
|
+
const result2 = installAgentPlugin(entry, method, { dryRun, verbose });
|
|
150109
|
+
pluginResults.push(result2);
|
|
150110
|
+
if (result2.status === "installed") {
|
|
150111
|
+
stepSuccess(`${entry.name}: ${statusLabel(result2)}`, result2.detail);
|
|
150112
|
+
} else if (result2.status === "would_install") {
|
|
150113
|
+
stepSkip(`${entry.name}: ${statusLabel(result2)}`, result2.detail);
|
|
148124
150114
|
} else {
|
|
148125
|
-
stepWarn(
|
|
148126
|
-
|
|
148127
|
-
|
|
148128
|
-
|
|
150115
|
+
stepWarn(`${entry.name}: ${statusLabel(result2)}`, result2.detail);
|
|
150116
|
+
}
|
|
150117
|
+
continue;
|
|
150118
|
+
}
|
|
150119
|
+
const detail = !present ? `~/${entry.detect.dir} not found` : !method ? "no plugin install available for this harness" : `\`${entry.detect.exe}\` is not callable in this shell`;
|
|
150120
|
+
const result = {
|
|
150121
|
+
agent: entry.id,
|
|
150122
|
+
displayName: entry.name,
|
|
150123
|
+
status: "skipped_unavailable",
|
|
150124
|
+
detail
|
|
150125
|
+
};
|
|
150126
|
+
pluginResults.push(result);
|
|
150127
|
+
stepSkip(`${entry.name}: ${statusLabel(result)}`, result.detail);
|
|
150128
|
+
if (present && !exeCallable) {
|
|
150129
|
+
for (const dir of entry.standalone?.skills ?? []) {
|
|
150130
|
+
fallbackSkillDirs.push(join(home, dir));
|
|
148129
150131
|
}
|
|
148130
150132
|
}
|
|
148131
150133
|
}
|
|
@@ -148143,7 +150145,7 @@ var runInit = async (appContext, options = {}) => {
|
|
|
148143
150145
|
if (selection.kind === "standalone" || !pluginSucceeded) {
|
|
148144
150146
|
standaloneFallbackReason = fallbackReason(
|
|
148145
150147
|
selection,
|
|
148146
|
-
|
|
150148
|
+
detections,
|
|
148147
150149
|
pluginResults
|
|
148148
150150
|
);
|
|
148149
150151
|
if (!fallbackAllowed && selection.kind !== "standalone") {
|
|
@@ -148166,7 +150168,11 @@ var runInit = async (appContext, options = {}) => {
|
|
|
148166
150168
|
} else {
|
|
148167
150169
|
standaloneResult = await runStandaloneInit(appContext, {
|
|
148168
150170
|
verbose,
|
|
148169
|
-
skillsDir:
|
|
150171
|
+
skillsDir: unique([
|
|
150172
|
+
...options.skillsDir ?? [],
|
|
150173
|
+
...fallbackSkillDirs
|
|
150174
|
+
]),
|
|
150175
|
+
hookTargets: buildHookTargets(entries),
|
|
148170
150176
|
onStep: (step) => {
|
|
148171
150177
|
currentStep = step;
|
|
148172
150178
|
}
|
|
@@ -148231,12 +150237,10 @@ var runInit = async (appContext, options = {}) => {
|
|
|
148231
150237
|
}
|
|
148232
150238
|
};
|
|
148233
150239
|
var initCommand = (appContext) => new Command("init").description(
|
|
148234
|
-
"Install the Zero plugin for supported
|
|
150240
|
+
"Install the Zero plugin for every supported agent, with a standalone skill/hook fallback"
|
|
148235
150241
|
).option(
|
|
148236
|
-
"--
|
|
148237
|
-
"
|
|
148238
|
-
collectAgentOption,
|
|
148239
|
-
[]
|
|
150242
|
+
"--standalone",
|
|
150243
|
+
"Install only the standalone skill/hooks fallback; skip all plugin installs"
|
|
148240
150244
|
).option(
|
|
148241
150245
|
"--no-fallback",
|
|
148242
150246
|
"Do not install standalone skills/hooks if plugin install does not succeed"
|
|
@@ -148852,7 +150856,7 @@ var HOOK_FILES = [
|
|
|
148852
150856
|
"zero-context.sh",
|
|
148853
150857
|
"ensure-runner.sh"
|
|
148854
150858
|
];
|
|
148855
|
-
var
|
|
150859
|
+
var ZERO_SANDBOX_DOMAIN = "*.zero.xyz";
|
|
148856
150860
|
var CLAUDE_SETTINGS_PATH2 = ".claude/settings.json";
|
|
148857
150861
|
var CODEX_HOOKS_PATH2 = ".codex/hooks.json";
|
|
148858
150862
|
var LEGACY_SKILL_NAMES = ["zero"];
|
|
@@ -148950,11 +150954,11 @@ var stripZeroFromSettings = (settings, verbose, removeSandboxAllowlist) => {
|
|
|
148950
150954
|
const network = sandbox?.network && typeof sandbox.network === "object" ? sandbox.network : null;
|
|
148951
150955
|
if (network && Array.isArray(network.allowedDomains)) {
|
|
148952
150956
|
const domains = network.allowedDomains;
|
|
148953
|
-
const next = domains.filter((d3) => d3 !==
|
|
150957
|
+
const next = domains.filter((d3) => d3 !== ZERO_SANDBOX_DOMAIN);
|
|
148954
150958
|
if (next.length !== domains.length) {
|
|
148955
150959
|
changed = true;
|
|
148956
150960
|
if (verbose) {
|
|
148957
|
-
stepInfo(`sandbox.network.allowedDomains -= ${
|
|
150961
|
+
stepInfo(`sandbox.network.allowedDomains -= ${ZERO_SANDBOX_DOMAIN}`);
|
|
148958
150962
|
}
|
|
148959
150963
|
if (next.length === 0) {
|
|
148960
150964
|
delete network.allowedDomains;
|
|
@@ -154288,7 +156292,7 @@ var detectAgentHost = (env = process.env) => {
|
|
|
154288
156292
|
};
|
|
154289
156293
|
|
|
154290
156294
|
// src/app/app-services.ts
|
|
154291
|
-
var
|
|
156295
|
+
var CLI_VERSION2 = package_default.version;
|
|
154292
156296
|
var resolveCredentials = (env, config2, injectedToken) => {
|
|
154293
156297
|
const credentials = injectedToken ? {
|
|
154294
156298
|
kind: "session",
|
|
@@ -154342,7 +156346,7 @@ var getServices = async (env) => {
|
|
|
154342
156346
|
baseUrl: env.ZERO_API_URL,
|
|
154343
156347
|
// The SDK scopes defaultHeaders to same-origin API calls, so this
|
|
154344
156348
|
// never reaches capability URLs.
|
|
154345
|
-
defaultHeaders: { "x-zero-client": `cli/${
|
|
156349
|
+
defaultHeaders: { "x-zero-client": `cli/${CLI_VERSION2}` },
|
|
154346
156350
|
// `POST /v1/runs` is non-idempotent (no server-side dedup key); a
|
|
154347
156351
|
// transport-level replay after the row inserted would double-count
|
|
154348
156352
|
// runs and skew capability quality signal. 401 refresh-replay still
|
|
@@ -154374,7 +156378,7 @@ var getServices = async (env) => {
|
|
|
154374
156378
|
const analyticsService = new AnalyticsService({
|
|
154375
156379
|
walletAddress: account?.address ?? null,
|
|
154376
156380
|
configPath,
|
|
154377
|
-
cliVersion:
|
|
156381
|
+
cliVersion: CLI_VERSION2,
|
|
154378
156382
|
environment: env.ZERO_ENV,
|
|
154379
156383
|
requestId: randomUUID(),
|
|
154380
156384
|
agentHost: detectAgentHost()
|