hot-updater 0.18.2 → 0.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1181 -449
- package/dist/index.js +1320 -585
- package/dist/plugins/babel.cjs +1 -1
- package/dist/plugins/babel.js +1 -1
- package/package.json +8 -9
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const require_picocolors$1 = require('./picocolors-nLcU57DT.cjs');
|
|
3
|
-
const fs = require_picocolors$1.__toESM(require("fs"));
|
|
4
|
-
const path = require_picocolors$1.__toESM(require("path"));
|
|
5
3
|
const http = require_picocolors$1.__toESM(require("http"));
|
|
6
4
|
const http2 = require_picocolors$1.__toESM(require("http2"));
|
|
7
5
|
const stream = require_picocolors$1.__toESM(require("stream"));
|
|
8
6
|
const crypto = require_picocolors$1.__toESM(require("crypto"));
|
|
9
7
|
const __hot_updater_console = require_picocolors$1.__toESM(require("@hot-updater/console"));
|
|
10
8
|
const __hot_updater_plugin_core = require_picocolors$1.__toESM(require("@hot-updater/plugin-core"));
|
|
9
|
+
const fs = require_picocolors$1.__toESM(require("fs"));
|
|
11
10
|
const node_process = require_picocolors$1.__toESM(require("node:process"));
|
|
12
11
|
const node_buffer = require_picocolors$1.__toESM(require("node:buffer"));
|
|
13
12
|
const node_path = require_picocolors$1.__toESM(require("node:path"));
|
|
@@ -21,6 +20,7 @@ const node_net = require_picocolors$1.__toESM(require("node:net"));
|
|
|
21
20
|
const __clack_prompts = require_picocolors$1.__toESM(require("@clack/prompts"));
|
|
22
21
|
const fs_promises = require_picocolors$1.__toESM(require("fs/promises"));
|
|
23
22
|
const es_git = require_picocolors$1.__toESM(require("es-git"));
|
|
23
|
+
const path = require_picocolors$1.__toESM(require("path"));
|
|
24
24
|
const __bacons_xcode = require_picocolors$1.__toESM(require("@bacons/xcode"));
|
|
25
25
|
const globby = require_picocolors$1.__toESM(require("globby"));
|
|
26
26
|
const __rnef_tools = require_picocolors$1.__toESM(require("@rnef/tools"));
|
|
@@ -480,11 +480,11 @@ var require_re = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/sem
|
|
|
480
480
|
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants();
|
|
481
481
|
const debug$3 = require_debug();
|
|
482
482
|
exports = module.exports = {};
|
|
483
|
-
const re$
|
|
483
|
+
const re$4 = exports.re = [];
|
|
484
484
|
const safeRe = exports.safeRe = [];
|
|
485
485
|
const src = exports.src = [];
|
|
486
486
|
const safeSrc = exports.safeSrc = [];
|
|
487
|
-
const t$
|
|
487
|
+
const t$4 = exports.t = {};
|
|
488
488
|
let R = 0;
|
|
489
489
|
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
490
490
|
const safeRegexReplacements = [
|
|
@@ -500,55 +500,55 @@ var require_re = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/sem
|
|
|
500
500
|
const safe = makeSafeRegex(value);
|
|
501
501
|
const index$1 = R++;
|
|
502
502
|
debug$3(name, index$1, value);
|
|
503
|
-
t$
|
|
503
|
+
t$4[name] = index$1;
|
|
504
504
|
src[index$1] = value;
|
|
505
505
|
safeSrc[index$1] = safe;
|
|
506
|
-
re$
|
|
506
|
+
re$4[index$1] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
507
507
|
safeRe[index$1] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
508
508
|
};
|
|
509
509
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
510
510
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
511
511
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
512
|
-
createToken("MAINVERSION", `(${src[t$
|
|
513
|
-
createToken("MAINVERSIONLOOSE", `(${src[t$
|
|
514
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t$
|
|
515
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$
|
|
516
|
-
createToken("PRERELEASE", `(?:-(${src[t$
|
|
517
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t$
|
|
512
|
+
createToken("MAINVERSION", `(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})`);
|
|
513
|
+
createToken("MAINVERSIONLOOSE", `(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
514
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIER]})`);
|
|
515
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
516
|
+
createToken("PRERELEASE", `(?:-(${src[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src[t$4.PRERELEASEIDENTIFIER]})*))`);
|
|
517
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
518
518
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
519
|
-
createToken("BUILD", `(?:\\+(${src[t$
|
|
520
|
-
createToken("FULLPLAIN", `v?${src[t$
|
|
521
|
-
createToken("FULL", `^${src[t$
|
|
522
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t$
|
|
523
|
-
createToken("LOOSE", `^${src[t$
|
|
519
|
+
createToken("BUILD", `(?:\\+(${src[t$4.BUILDIDENTIFIER]}(?:\\.${src[t$4.BUILDIDENTIFIER]})*))`);
|
|
520
|
+
createToken("FULLPLAIN", `v?${src[t$4.MAINVERSION]}${src[t$4.PRERELEASE]}?${src[t$4.BUILD]}?`);
|
|
521
|
+
createToken("FULL", `^${src[t$4.FULLPLAIN]}$`);
|
|
522
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t$4.MAINVERSIONLOOSE]}${src[t$4.PRERELEASELOOSE]}?${src[t$4.BUILD]}?`);
|
|
523
|
+
createToken("LOOSE", `^${src[t$4.LOOSEPLAIN]}$`);
|
|
524
524
|
createToken("GTLT", "((?:<|>)?=?)");
|
|
525
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t$
|
|
526
|
-
createToken("XRANGEIDENTIFIER", `${src[t$
|
|
527
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$
|
|
528
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$
|
|
529
|
-
createToken("XRANGE", `^${src[t$
|
|
530
|
-
createToken("XRANGELOOSE", `^${src[t$
|
|
525
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
526
|
+
createToken("XRANGEIDENTIFIER", `${src[t$4.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
527
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:${src[t$4.PRERELEASE]})?${src[t$4.BUILD]}?)?)?`);
|
|
528
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src[t$4.PRERELEASELOOSE]})?${src[t$4.BUILD]}?)?)?`);
|
|
529
|
+
createToken("XRANGE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAIN]}$`);
|
|
530
|
+
createToken("XRANGELOOSE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
531
531
|
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
532
|
-
createToken("COERCE", `${src[t$
|
|
533
|
-
createToken("COERCEFULL", src[t$
|
|
534
|
-
createToken("COERCERTL", src[t$
|
|
535
|
-
createToken("COERCERTLFULL", src[t$
|
|
532
|
+
createToken("COERCE", `${src[t$4.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
533
|
+
createToken("COERCEFULL", src[t$4.COERCEPLAIN] + `(?:${src[t$4.PRERELEASE]})?(?:${src[t$4.BUILD]})?(?:$|[^\\d])`);
|
|
534
|
+
createToken("COERCERTL", src[t$4.COERCE], true);
|
|
535
|
+
createToken("COERCERTLFULL", src[t$4.COERCEFULL], true);
|
|
536
536
|
createToken("LONETILDE", "(?:~>?)");
|
|
537
|
-
createToken("TILDETRIM", `(\\s*)${src[t$
|
|
537
|
+
createToken("TILDETRIM", `(\\s*)${src[t$4.LONETILDE]}\\s+`, true);
|
|
538
538
|
exports.tildeTrimReplace = "$1~";
|
|
539
|
-
createToken("TILDE", `^${src[t$
|
|
540
|
-
createToken("TILDELOOSE", `^${src[t$
|
|
539
|
+
createToken("TILDE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAIN]}$`);
|
|
540
|
+
createToken("TILDELOOSE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
541
541
|
createToken("LONECARET", "(?:\\^)");
|
|
542
|
-
createToken("CARETTRIM", `(\\s*)${src[t$
|
|
542
|
+
createToken("CARETTRIM", `(\\s*)${src[t$4.LONECARET]}\\s+`, true);
|
|
543
543
|
exports.caretTrimReplace = "$1^";
|
|
544
|
-
createToken("CARET", `^${src[t$
|
|
545
|
-
createToken("CARETLOOSE", `^${src[t$
|
|
546
|
-
createToken("COMPARATORLOOSE", `^${src[t$
|
|
547
|
-
createToken("COMPARATOR", `^${src[t$
|
|
548
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t$
|
|
544
|
+
createToken("CARET", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAIN]}$`);
|
|
545
|
+
createToken("CARETLOOSE", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
546
|
+
createToken("COMPARATORLOOSE", `^${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]})$|^$`);
|
|
547
|
+
createToken("COMPARATOR", `^${src[t$4.GTLT]}\\s*(${src[t$4.FULLPLAIN]})$|^$`);
|
|
548
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]}|${src[t$4.XRANGEPLAIN]})`, true);
|
|
549
549
|
exports.comparatorTrimReplace = "$1$2$3";
|
|
550
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t$
|
|
551
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$
|
|
550
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t$4.XRANGEPLAIN]})\\s+-\\s+(${src[t$4.XRANGEPLAIN]})\\s*$`);
|
|
551
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$4.XRANGEPLAINLOOSE]})\\s*$`);
|
|
552
552
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
553
553
|
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
554
554
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
@@ -576,16 +576,16 @@ var require_identifiers = require_picocolors$1.__commonJS({ "../../node_modules/
|
|
|
576
576
|
|
|
577
577
|
//#endregion
|
|
578
578
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
579
|
-
var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js"(exports, module) {
|
|
579
|
+
var require_semver$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js"(exports, module) {
|
|
580
580
|
const debug$2 = require_debug();
|
|
581
581
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
582
|
-
const { safeRe: re$
|
|
582
|
+
const { safeRe: re$3, t: t$3 } = require_re();
|
|
583
583
|
const parseOptions$2 = require_parse_options();
|
|
584
584
|
const { compareIdentifiers } = require_identifiers();
|
|
585
|
-
var SemVer$
|
|
585
|
+
var SemVer$15 = class SemVer$15 {
|
|
586
586
|
constructor(version$1, options) {
|
|
587
587
|
options = parseOptions$2(options);
|
|
588
|
-
if (version$1 instanceof SemVer$
|
|
588
|
+
if (version$1 instanceof SemVer$15) if (version$1.loose === !!options.loose && version$1.includePrerelease === !!options.includePrerelease) return version$1;
|
|
589
589
|
else version$1 = version$1.version;
|
|
590
590
|
else if (typeof version$1 !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version$1}".`);
|
|
591
591
|
if (version$1.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
@@ -593,7 +593,7 @@ var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm
|
|
|
593
593
|
this.options = options;
|
|
594
594
|
this.loose = !!options.loose;
|
|
595
595
|
this.includePrerelease = !!options.includePrerelease;
|
|
596
|
-
const m = version$1.trim().match(options.loose ? re$
|
|
596
|
+
const m = version$1.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]);
|
|
597
597
|
if (!m) throw new TypeError(`Invalid Version: ${version$1}`);
|
|
598
598
|
this.raw = version$1;
|
|
599
599
|
this.major = +m[1];
|
|
@@ -623,19 +623,19 @@ var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm
|
|
|
623
623
|
}
|
|
624
624
|
compare(other) {
|
|
625
625
|
debug$2("SemVer.compare", this.version, this.options, other);
|
|
626
|
-
if (!(other instanceof SemVer$
|
|
626
|
+
if (!(other instanceof SemVer$15)) {
|
|
627
627
|
if (typeof other === "string" && other === this.version) return 0;
|
|
628
|
-
other = new SemVer$
|
|
628
|
+
other = new SemVer$15(other, this.options);
|
|
629
629
|
}
|
|
630
630
|
if (other.version === this.version) return 0;
|
|
631
631
|
return this.compareMain(other) || this.comparePre(other);
|
|
632
632
|
}
|
|
633
633
|
compareMain(other) {
|
|
634
|
-
if (!(other instanceof SemVer$
|
|
634
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
635
635
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
636
636
|
}
|
|
637
637
|
comparePre(other) {
|
|
638
|
-
if (!(other instanceof SemVer$
|
|
638
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
639
639
|
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
640
640
|
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
641
641
|
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
@@ -652,7 +652,7 @@ var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm
|
|
|
652
652
|
} while (++i$2);
|
|
653
653
|
}
|
|
654
654
|
compareBuild(other) {
|
|
655
|
-
if (!(other instanceof SemVer$
|
|
655
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
656
656
|
let i$2 = 0;
|
|
657
657
|
do {
|
|
658
658
|
const a$1 = this.build[i$2];
|
|
@@ -669,7 +669,7 @@ var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm
|
|
|
669
669
|
if (release.startsWith("pre")) {
|
|
670
670
|
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
671
671
|
if (identifier) {
|
|
672
|
-
const match = `-${identifier}`.match(this.options.loose ? re$
|
|
672
|
+
const match = `-${identifier}`.match(this.options.loose ? re$3[t$3.PRERELEASELOOSE] : re$3[t$3.PRERELEASE]);
|
|
673
673
|
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
@@ -730,11 +730,11 @@ var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm
|
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
if (identifier) {
|
|
733
|
-
let prerelease = [identifier, base];
|
|
734
|
-
if (identifierBase === false) prerelease = [identifier];
|
|
733
|
+
let prerelease$2 = [identifier, base];
|
|
734
|
+
if (identifierBase === false) prerelease$2 = [identifier];
|
|
735
735
|
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
736
|
-
if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
|
|
737
|
-
} else this.prerelease = prerelease;
|
|
736
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2;
|
|
737
|
+
} else this.prerelease = prerelease$2;
|
|
738
738
|
}
|
|
739
739
|
break;
|
|
740
740
|
}
|
|
@@ -745,75 +745,75 @@ var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm
|
|
|
745
745
|
return this;
|
|
746
746
|
}
|
|
747
747
|
};
|
|
748
|
-
module.exports = SemVer$
|
|
748
|
+
module.exports = SemVer$15;
|
|
749
749
|
} });
|
|
750
750
|
|
|
751
751
|
//#endregion
|
|
752
752
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
753
753
|
var require_compare = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js"(exports, module) {
|
|
754
|
-
const SemVer$
|
|
755
|
-
const compare$
|
|
756
|
-
module.exports = compare$
|
|
754
|
+
const SemVer$14 = require_semver$1();
|
|
755
|
+
const compare$11 = (a$1, b, loose) => new SemVer$14(a$1, loose).compare(new SemVer$14(b, loose));
|
|
756
|
+
module.exports = compare$11;
|
|
757
757
|
} });
|
|
758
758
|
|
|
759
759
|
//#endregion
|
|
760
760
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
761
761
|
var require_eq = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js"(exports, module) {
|
|
762
|
-
const compare$
|
|
763
|
-
const eq$
|
|
764
|
-
module.exports = eq$
|
|
762
|
+
const compare$10 = require_compare();
|
|
763
|
+
const eq$2 = (a$1, b, loose) => compare$10(a$1, b, loose) === 0;
|
|
764
|
+
module.exports = eq$2;
|
|
765
765
|
} });
|
|
766
766
|
|
|
767
767
|
//#endregion
|
|
768
768
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
769
769
|
var require_neq = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js"(exports, module) {
|
|
770
|
-
const compare$
|
|
771
|
-
const neq$
|
|
772
|
-
module.exports = neq$
|
|
770
|
+
const compare$9 = require_compare();
|
|
771
|
+
const neq$2 = (a$1, b, loose) => compare$9(a$1, b, loose) !== 0;
|
|
772
|
+
module.exports = neq$2;
|
|
773
773
|
} });
|
|
774
774
|
|
|
775
775
|
//#endregion
|
|
776
776
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
777
777
|
var require_gt = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js"(exports, module) {
|
|
778
|
-
const compare$
|
|
779
|
-
const gt$
|
|
780
|
-
module.exports = gt$
|
|
778
|
+
const compare$8 = require_compare();
|
|
779
|
+
const gt$4 = (a$1, b, loose) => compare$8(a$1, b, loose) > 0;
|
|
780
|
+
module.exports = gt$4;
|
|
781
781
|
} });
|
|
782
782
|
|
|
783
783
|
//#endregion
|
|
784
784
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
785
785
|
var require_gte = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js"(exports, module) {
|
|
786
|
-
const compare$
|
|
787
|
-
const gte$
|
|
788
|
-
module.exports = gte$
|
|
786
|
+
const compare$7 = require_compare();
|
|
787
|
+
const gte$3 = (a$1, b, loose) => compare$7(a$1, b, loose) >= 0;
|
|
788
|
+
module.exports = gte$3;
|
|
789
789
|
} });
|
|
790
790
|
|
|
791
791
|
//#endregion
|
|
792
792
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
793
793
|
var require_lt = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js"(exports, module) {
|
|
794
|
-
const compare$
|
|
795
|
-
const lt$
|
|
796
|
-
module.exports = lt$
|
|
794
|
+
const compare$6 = require_compare();
|
|
795
|
+
const lt$3 = (a$1, b, loose) => compare$6(a$1, b, loose) < 0;
|
|
796
|
+
module.exports = lt$3;
|
|
797
797
|
} });
|
|
798
798
|
|
|
799
799
|
//#endregion
|
|
800
800
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
801
801
|
var require_lte = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js"(exports, module) {
|
|
802
|
-
const compare = require_compare();
|
|
803
|
-
const lte$
|
|
804
|
-
module.exports = lte$
|
|
802
|
+
const compare$5 = require_compare();
|
|
803
|
+
const lte$3 = (a$1, b, loose) => compare$5(a$1, b, loose) <= 0;
|
|
804
|
+
module.exports = lte$3;
|
|
805
805
|
} });
|
|
806
806
|
|
|
807
807
|
//#endregion
|
|
808
808
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
809
809
|
var require_cmp = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js"(exports, module) {
|
|
810
|
-
const eq = require_eq();
|
|
811
|
-
const neq = require_neq();
|
|
812
|
-
const gt = require_gt();
|
|
813
|
-
const gte = require_gte();
|
|
814
|
-
const lt = require_lt();
|
|
815
|
-
const lte = require_lte();
|
|
816
|
-
const cmp$
|
|
810
|
+
const eq$1 = require_eq();
|
|
811
|
+
const neq$1 = require_neq();
|
|
812
|
+
const gt$3 = require_gt();
|
|
813
|
+
const gte$2 = require_gte();
|
|
814
|
+
const lt$2 = require_lt();
|
|
815
|
+
const lte$2 = require_lte();
|
|
816
|
+
const cmp$2 = (a$1, op, b, loose) => {
|
|
817
817
|
switch (op) {
|
|
818
818
|
case "===":
|
|
819
819
|
if (typeof a$1 === "object") a$1 = a$1.version;
|
|
@@ -825,69 +825,69 @@ var require_cmp = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/se
|
|
|
825
825
|
return a$1 !== b;
|
|
826
826
|
case "":
|
|
827
827
|
case "=":
|
|
828
|
-
case "==": return eq(a$1, b, loose);
|
|
829
|
-
case "!=": return neq(a$1, b, loose);
|
|
830
|
-
case ">": return gt(a$1, b, loose);
|
|
831
|
-
case ">=": return gte(a$1, b, loose);
|
|
832
|
-
case "<": return lt(a$1, b, loose);
|
|
833
|
-
case "<=": return lte(a$1, b, loose);
|
|
828
|
+
case "==": return eq$1(a$1, b, loose);
|
|
829
|
+
case "!=": return neq$1(a$1, b, loose);
|
|
830
|
+
case ">": return gt$3(a$1, b, loose);
|
|
831
|
+
case ">=": return gte$2(a$1, b, loose);
|
|
832
|
+
case "<": return lt$2(a$1, b, loose);
|
|
833
|
+
case "<=": return lte$2(a$1, b, loose);
|
|
834
834
|
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
835
835
|
}
|
|
836
836
|
};
|
|
837
|
-
module.exports = cmp$
|
|
837
|
+
module.exports = cmp$2;
|
|
838
838
|
} });
|
|
839
839
|
|
|
840
840
|
//#endregion
|
|
841
841
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
842
842
|
var require_comparator = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js"(exports, module) {
|
|
843
|
-
const ANY = Symbol("SemVer ANY");
|
|
844
|
-
var Comparator$
|
|
843
|
+
const ANY$2 = Symbol("SemVer ANY");
|
|
844
|
+
var Comparator$4 = class Comparator$4 {
|
|
845
845
|
static get ANY() {
|
|
846
|
-
return ANY;
|
|
846
|
+
return ANY$2;
|
|
847
847
|
}
|
|
848
848
|
constructor(comp, options) {
|
|
849
849
|
options = parseOptions$1(options);
|
|
850
|
-
if (comp instanceof Comparator$
|
|
850
|
+
if (comp instanceof Comparator$4) if (comp.loose === !!options.loose) return comp;
|
|
851
851
|
else comp = comp.value;
|
|
852
852
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
853
853
|
debug$1("comparator", comp, options);
|
|
854
854
|
this.options = options;
|
|
855
855
|
this.loose = !!options.loose;
|
|
856
856
|
this.parse(comp);
|
|
857
|
-
if (this.semver === ANY) this.value = "";
|
|
857
|
+
if (this.semver === ANY$2) this.value = "";
|
|
858
858
|
else this.value = this.operator + this.semver.version;
|
|
859
859
|
debug$1("comp", this);
|
|
860
860
|
}
|
|
861
861
|
parse(comp) {
|
|
862
|
-
const r = this.options.loose ? re$
|
|
862
|
+
const r = this.options.loose ? re$2[t$2.COMPARATORLOOSE] : re$2[t$2.COMPARATOR];
|
|
863
863
|
const m = comp.match(r);
|
|
864
864
|
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
865
865
|
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
866
866
|
if (this.operator === "=") this.operator = "";
|
|
867
|
-
if (!m[2]) this.semver = ANY;
|
|
868
|
-
else this.semver = new SemVer$
|
|
867
|
+
if (!m[2]) this.semver = ANY$2;
|
|
868
|
+
else this.semver = new SemVer$13(m[2], this.options.loose);
|
|
869
869
|
}
|
|
870
870
|
toString() {
|
|
871
871
|
return this.value;
|
|
872
872
|
}
|
|
873
873
|
test(version$1) {
|
|
874
874
|
debug$1("Comparator.test", version$1, this.options.loose);
|
|
875
|
-
if (this.semver === ANY || version$1 === ANY) return true;
|
|
875
|
+
if (this.semver === ANY$2 || version$1 === ANY$2) return true;
|
|
876
876
|
if (typeof version$1 === "string") try {
|
|
877
|
-
version$1 = new SemVer$
|
|
877
|
+
version$1 = new SemVer$13(version$1, this.options);
|
|
878
878
|
} catch (er) {
|
|
879
879
|
return false;
|
|
880
880
|
}
|
|
881
|
-
return cmp(version$1, this.operator, this.semver, this.options);
|
|
881
|
+
return cmp$1(version$1, this.operator, this.semver, this.options);
|
|
882
882
|
}
|
|
883
883
|
intersects(comp, options) {
|
|
884
|
-
if (!(comp instanceof Comparator$
|
|
884
|
+
if (!(comp instanceof Comparator$4)) throw new TypeError("a Comparator is required");
|
|
885
885
|
if (this.operator === "") {
|
|
886
886
|
if (this.value === "") return true;
|
|
887
|
-
return new Range$
|
|
887
|
+
return new Range$11(comp.value, options).test(this.value);
|
|
888
888
|
} else if (comp.operator === "") {
|
|
889
889
|
if (comp.value === "") return true;
|
|
890
|
-
return new Range$
|
|
890
|
+
return new Range$11(this.value, options).test(comp.semver);
|
|
891
891
|
}
|
|
892
892
|
options = parseOptions$1(options);
|
|
893
893
|
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
@@ -895,30 +895,30 @@ var require_comparator = require_picocolors$1.__commonJS({ "../../node_modules/.
|
|
|
895
895
|
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
896
896
|
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
897
897
|
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
898
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
899
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
898
|
+
if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
899
|
+
if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
900
900
|
return false;
|
|
901
901
|
}
|
|
902
902
|
};
|
|
903
|
-
module.exports = Comparator$
|
|
903
|
+
module.exports = Comparator$4;
|
|
904
904
|
const parseOptions$1 = require_parse_options();
|
|
905
|
-
const { safeRe: re$
|
|
906
|
-
const cmp = require_cmp();
|
|
905
|
+
const { safeRe: re$2, t: t$2 } = require_re();
|
|
906
|
+
const cmp$1 = require_cmp();
|
|
907
907
|
const debug$1 = require_debug();
|
|
908
|
-
const SemVer$
|
|
909
|
-
const Range$
|
|
908
|
+
const SemVer$13 = require_semver$1();
|
|
909
|
+
const Range$11 = require_range();
|
|
910
910
|
} });
|
|
911
911
|
|
|
912
912
|
//#endregion
|
|
913
913
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
914
914
|
var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js"(exports, module) {
|
|
915
915
|
const SPACE_CHARACTERS = /\s+/g;
|
|
916
|
-
var Range$
|
|
916
|
+
var Range$10 = class Range$10 {
|
|
917
917
|
constructor(range, options) {
|
|
918
918
|
options = parseOptions(options);
|
|
919
|
-
if (range instanceof Range$
|
|
920
|
-
else return new Range$
|
|
921
|
-
if (range instanceof Comparator) {
|
|
919
|
+
if (range instanceof Range$10) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
920
|
+
else return new Range$10(range.raw, options);
|
|
921
|
+
if (range instanceof Comparator$3) {
|
|
922
922
|
this.raw = range.value;
|
|
923
923
|
this.set = [[range]];
|
|
924
924
|
this.formatted = void 0;
|
|
@@ -969,23 +969,23 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
969
969
|
const cached = cache$1.get(memoKey);
|
|
970
970
|
if (cached) return cached;
|
|
971
971
|
const loose = this.options.loose;
|
|
972
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
972
|
+
const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE];
|
|
973
973
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
974
974
|
debug("hyphen replace", range);
|
|
975
|
-
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
975
|
+
range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace);
|
|
976
976
|
debug("comparator trim", range);
|
|
977
|
-
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
977
|
+
range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace);
|
|
978
978
|
debug("tilde trim", range);
|
|
979
|
-
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
979
|
+
range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace);
|
|
980
980
|
debug("caret trim", range);
|
|
981
981
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
982
982
|
if (loose) rangeList = rangeList.filter((comp) => {
|
|
983
983
|
debug("loose invalid filter", comp, this.options);
|
|
984
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
984
|
+
return !!comp.match(re$1[t$1.COMPARATORLOOSE]);
|
|
985
985
|
});
|
|
986
986
|
debug("range list", rangeList);
|
|
987
987
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
988
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
988
|
+
const comparators = rangeList.map((comp) => new Comparator$3(comp, this.options));
|
|
989
989
|
for (const comp of comparators) {
|
|
990
990
|
if (isNullSet(comp)) return [comp];
|
|
991
991
|
rangeMap.set(comp.value, comp);
|
|
@@ -996,7 +996,7 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
996
996
|
return result;
|
|
997
997
|
}
|
|
998
998
|
intersects(range, options) {
|
|
999
|
-
if (!(range instanceof Range$
|
|
999
|
+
if (!(range instanceof Range$10)) throw new TypeError("a Range is required");
|
|
1000
1000
|
return this.set.some((thisComparators) => {
|
|
1001
1001
|
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
1002
1002
|
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
@@ -1010,7 +1010,7 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1010
1010
|
test(version$1) {
|
|
1011
1011
|
if (!version$1) return false;
|
|
1012
1012
|
if (typeof version$1 === "string") try {
|
|
1013
|
-
version$1 = new SemVer$
|
|
1013
|
+
version$1 = new SemVer$12(version$1, this.options);
|
|
1014
1014
|
} catch (er) {
|
|
1015
1015
|
return false;
|
|
1016
1016
|
}
|
|
@@ -1018,14 +1018,14 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1018
1018
|
return false;
|
|
1019
1019
|
}
|
|
1020
1020
|
};
|
|
1021
|
-
module.exports = Range$
|
|
1021
|
+
module.exports = Range$10;
|
|
1022
1022
|
const LRU = require_lrucache();
|
|
1023
1023
|
const cache$1 = new LRU();
|
|
1024
1024
|
const parseOptions = require_parse_options();
|
|
1025
|
-
const Comparator = require_comparator();
|
|
1025
|
+
const Comparator$3 = require_comparator();
|
|
1026
1026
|
const debug = require_debug();
|
|
1027
|
-
const SemVer$
|
|
1028
|
-
const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
1027
|
+
const SemVer$12 = require_semver$1();
|
|
1028
|
+
const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
1029
1029
|
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
1030
1030
|
const isNullSet = (c$1) => c$1.value === "<0.0.0-0";
|
|
1031
1031
|
const isAny = (c$1) => c$1.value === "";
|
|
@@ -1058,7 +1058,7 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1058
1058
|
return comp.trim().split(/\s+/).map((c$1) => replaceTilde(c$1, options)).join(" ");
|
|
1059
1059
|
};
|
|
1060
1060
|
const replaceTilde = (comp, options) => {
|
|
1061
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
1061
|
+
const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE];
|
|
1062
1062
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1063
1063
|
debug("tilde", comp, _, M, m, p, pr);
|
|
1064
1064
|
let ret;
|
|
@@ -1078,7 +1078,7 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1078
1078
|
};
|
|
1079
1079
|
const replaceCaret = (comp, options) => {
|
|
1080
1080
|
debug("caret", comp, options);
|
|
1081
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
1081
|
+
const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET];
|
|
1082
1082
|
const z = options.includePrerelease ? "-0" : "";
|
|
1083
1083
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1084
1084
|
debug("caret", comp, _, M, m, p, pr);
|
|
@@ -1108,7 +1108,7 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1108
1108
|
};
|
|
1109
1109
|
const replaceXRange = (comp, options) => {
|
|
1110
1110
|
comp = comp.trim();
|
|
1111
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
1111
|
+
const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE];
|
|
1112
1112
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
1113
1113
|
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
1114
1114
|
const xM = isX(M);
|
|
@@ -1147,11 +1147,11 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1147
1147
|
};
|
|
1148
1148
|
const replaceStars = (comp, options) => {
|
|
1149
1149
|
debug("replaceStars", comp, options);
|
|
1150
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
1150
|
+
return comp.trim().replace(re$1[t$1.STAR], "");
|
|
1151
1151
|
};
|
|
1152
1152
|
const replaceGTE0 = (comp, options) => {
|
|
1153
1153
|
debug("replaceGTE0", comp, options);
|
|
1154
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
1154
|
+
return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], "");
|
|
1155
1155
|
};
|
|
1156
1156
|
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
1157
1157
|
if (isX(fM)) from = "";
|
|
@@ -1172,7 +1172,7 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1172
1172
|
if (version$1.prerelease.length && !options.includePrerelease) {
|
|
1173
1173
|
for (let i$2 = 0; i$2 < set.length; i$2++) {
|
|
1174
1174
|
debug(set[i$2].semver);
|
|
1175
|
-
if (set[i$2].semver === Comparator.ANY) continue;
|
|
1175
|
+
if (set[i$2].semver === Comparator$3.ANY) continue;
|
|
1176
1176
|
if (set[i$2].semver.prerelease.length > 0) {
|
|
1177
1177
|
const allowed = set[i$2].semver;
|
|
1178
1178
|
if (allowed.major === version$1.major && allowed.minor === version$1.minor && allowed.patch === version$1.patch) return true;
|
|
@@ -1187,15 +1187,15 @@ var require_range = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
1187
1187
|
//#endregion
|
|
1188
1188
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
1189
1189
|
var require_valid$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js"(exports, module) {
|
|
1190
|
-
const Range = require_range();
|
|
1191
|
-
const validRange = (range, options) => {
|
|
1190
|
+
const Range$9 = require_range();
|
|
1191
|
+
const validRange$1 = (range, options) => {
|
|
1192
1192
|
try {
|
|
1193
|
-
return new Range(range, options).range || "*";
|
|
1193
|
+
return new Range$9(range, options).range || "*";
|
|
1194
1194
|
} catch (er) {
|
|
1195
1195
|
return null;
|
|
1196
1196
|
}
|
|
1197
1197
|
};
|
|
1198
|
-
module.exports = validRange;
|
|
1198
|
+
module.exports = validRange$1;
|
|
1199
1199
|
} });
|
|
1200
1200
|
|
|
1201
1201
|
//#endregion
|
|
@@ -1618,38 +1618,60 @@ async function isPortReachable(port, { host, timeout = 1e3 } = {}) {
|
|
|
1618
1618
|
}
|
|
1619
1619
|
|
|
1620
1620
|
//#endregion
|
|
1621
|
-
//#region
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
directory = node_path.default.dirname(directory);
|
|
1621
|
+
//#region src/utils/getFileHash.ts
|
|
1622
|
+
const getFileHashFromFile = async (filepath) => {
|
|
1623
|
+
try {
|
|
1624
|
+
const fileBuffer = await fs_promises.default.readFile(filepath).catch((error) => {
|
|
1625
|
+
console.error("Error reading the file:", error);
|
|
1626
|
+
throw error;
|
|
1627
|
+
});
|
|
1628
|
+
const hash = crypto.default.createHash("sha256");
|
|
1629
|
+
hash.update(fileBuffer);
|
|
1630
|
+
const fileHash = hash.digest("hex");
|
|
1631
|
+
return fileHash;
|
|
1632
|
+
} catch (error) {
|
|
1633
|
+
console.error("Error fetching or processing the file:", error);
|
|
1634
|
+
throw error;
|
|
1636
1635
|
}
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
if (directory === stopAt || directory === root) break;
|
|
1650
|
-
directory = node_path.default.dirname(directory);
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1638
|
+
//#endregion
|
|
1639
|
+
//#region src/utils/git.ts
|
|
1640
|
+
const getLatestGitCommit = async () => {
|
|
1641
|
+
try {
|
|
1642
|
+
const repo = await (0, es_git.openRepository)((0, __hot_updater_plugin_core.getCwd)());
|
|
1643
|
+
const headSha = repo.revparse("HEAD").from;
|
|
1644
|
+
if (headSha) return repo.getCommit(headSha);
|
|
1645
|
+
return null;
|
|
1646
|
+
} catch (error) {
|
|
1647
|
+
return null;
|
|
1651
1648
|
}
|
|
1652
|
-
}
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
//#endregion
|
|
1652
|
+
//#region src/utils/version/getAndroidVersion.ts
|
|
1653
|
+
var import_valid$4 = require_picocolors$1.__toESM(require_valid$1());
|
|
1654
|
+
const getAndroidVersionFromAppBuildGradle = async () => {
|
|
1655
|
+
const buildGradlePath = path.default.join((0, __hot_updater_plugin_core.getCwd)(), "android", "app", "build.gradle");
|
|
1656
|
+
try {
|
|
1657
|
+
const buildGradleContent = await fs_promises.default.readFile(buildGradlePath, "utf8");
|
|
1658
|
+
const versionNameMatch = buildGradleContent.match(/versionName\s+['"]([^"]+)['"]/);
|
|
1659
|
+
return versionNameMatch?.[1] ?? null;
|
|
1660
|
+
} catch (error) {
|
|
1661
|
+
return null;
|
|
1662
|
+
}
|
|
1663
|
+
};
|
|
1664
|
+
const AndroidVersionParsers = { "app-build-gradle": getAndroidVersionFromAppBuildGradle };
|
|
1665
|
+
const getAndroidVersion = async ({ parser, validateWithSemver = false }) => {
|
|
1666
|
+
const parsers = Array.isArray(parser) ? parser : [parser];
|
|
1667
|
+
for (const parserKey of parsers) {
|
|
1668
|
+
const parsedVersion = await AndroidVersionParsers[parserKey]();
|
|
1669
|
+
if (!parsedVersion) continue;
|
|
1670
|
+
if (validateWithSemver && !(0, import_valid$4.default)(parsedVersion)) continue;
|
|
1671
|
+
return parsedVersion;
|
|
1672
|
+
}
|
|
1673
|
+
return null;
|
|
1674
|
+
};
|
|
1653
1675
|
|
|
1654
1676
|
//#endregion
|
|
1655
1677
|
//#region ../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/conventions.js
|
|
@@ -1819,11 +1841,11 @@ var require_dom = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@x
|
|
|
1819
1841
|
function _extends(Class, Super) {
|
|
1820
1842
|
var pt = Class.prototype;
|
|
1821
1843
|
if (!(pt instanceof Super)) {
|
|
1822
|
-
function t$
|
|
1823
|
-
t$
|
|
1824
|
-
t$
|
|
1825
|
-
copy(pt, t$
|
|
1826
|
-
Class.prototype = pt = t$
|
|
1844
|
+
function t$5() {}
|
|
1845
|
+
t$5.prototype = Super.prototype;
|
|
1846
|
+
t$5 = new t$5();
|
|
1847
|
+
copy(pt, t$5);
|
|
1848
|
+
Class.prototype = pt = t$5;
|
|
1827
1849
|
}
|
|
1828
1850
|
if (pt.constructor != Class) {
|
|
1829
1851
|
if (typeof Class != "function") console.error("unknown Class:" + Class);
|
|
@@ -1908,15 +1930,15 @@ var require_dom = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@x
|
|
|
1908
1930
|
_updateLiveList(this);
|
|
1909
1931
|
}
|
|
1910
1932
|
function _updateLiveList(list) {
|
|
1911
|
-
var inc = list._node._inc || list._node.ownerDocument._inc;
|
|
1912
|
-
if (list._inc !== inc) {
|
|
1933
|
+
var inc$2 = list._node._inc || list._node.ownerDocument._inc;
|
|
1934
|
+
if (list._inc !== inc$2) {
|
|
1913
1935
|
var ls = list._refresh(list._node);
|
|
1914
1936
|
__set__(list, "length", ls.length);
|
|
1915
1937
|
if (!list.$$length || ls.length < list.$$length) {
|
|
1916
1938
|
for (var i$2 = ls.length; i$2 in list; i$2++) if (Object.prototype.hasOwnProperty.call(list, i$2)) delete list[i$2];
|
|
1917
1939
|
}
|
|
1918
1940
|
copy(ls, list);
|
|
1919
|
-
list._inc = inc;
|
|
1941
|
+
list._inc = inc$2;
|
|
1920
1942
|
}
|
|
1921
1943
|
}
|
|
1922
1944
|
LiveNodeList.prototype.item = function(i$2) {
|
|
@@ -5232,10 +5254,10 @@ var require_sax = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@x
|
|
|
5232
5254
|
var domBuilder = this.domBuilder;
|
|
5233
5255
|
domBuilder.startDocument();
|
|
5234
5256
|
_copy(defaultNSMap, defaultNSMap = {});
|
|
5235
|
-
parse$
|
|
5257
|
+
parse$13(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
|
|
5236
5258
|
domBuilder.endDocument();
|
|
5237
5259
|
} };
|
|
5238
|
-
function parse$
|
|
5260
|
+
function parse$13(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
|
|
5239
5261
|
function fixedFromCharCode(code$1) {
|
|
5240
5262
|
if (code$1 > 65535) {
|
|
5241
5263
|
code$1 -= 65536;
|
|
@@ -5355,10 +5377,10 @@ var require_sax = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@x
|
|
|
5355
5377
|
else appendText(Math.max(tagStart, start) + 1);
|
|
5356
5378
|
}
|
|
5357
5379
|
}
|
|
5358
|
-
function copyLocator(f, t$
|
|
5359
|
-
t$
|
|
5360
|
-
t$
|
|
5361
|
-
return t$
|
|
5380
|
+
function copyLocator(f, t$5) {
|
|
5381
|
+
t$5.lineNumber = f.lineNumber;
|
|
5382
|
+
t$5.columnNumber = f.columnNumber;
|
|
5383
|
+
return t$5;
|
|
5362
5384
|
}
|
|
5363
5385
|
/**
|
|
5364
5386
|
* @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);
|
|
@@ -5943,7 +5965,7 @@ var require_parse$3 = require_picocolors$1.__commonJS({ "../../node_modules/.pnp
|
|
|
5943
5965
|
/**
|
|
5944
5966
|
* Module exports.
|
|
5945
5967
|
*/
|
|
5946
|
-
exports.parse = parse$
|
|
5968
|
+
exports.parse = parse$12;
|
|
5947
5969
|
var TEXT_NODE = 3;
|
|
5948
5970
|
var CDATA_NODE = 4;
|
|
5949
5971
|
var COMMENT_NODE = 8;
|
|
@@ -5982,12 +6004,12 @@ var require_parse$3 = require_picocolors$1.__commonJS({ "../../node_modules/.pnp
|
|
|
5982
6004
|
* @returns {Mixed} the decoded value from the Plist XML
|
|
5983
6005
|
* @api public
|
|
5984
6006
|
*/
|
|
5985
|
-
function parse$
|
|
6007
|
+
function parse$12(xml) {
|
|
5986
6008
|
var doc = new DOMParser().parseFromString(xml);
|
|
5987
6009
|
invariant(doc.documentElement.nodeName === "plist", "malformed document. First element should be <plist>");
|
|
5988
|
-
var plist$
|
|
5989
|
-
if (plist$
|
|
5990
|
-
return plist$
|
|
6010
|
+
var plist$2 = parsePlistXML(doc.documentElement);
|
|
6011
|
+
if (plist$2.length == 1) plist$2 = plist$2[0];
|
|
6012
|
+
return plist$2;
|
|
5991
6013
|
}
|
|
5992
6014
|
/**
|
|
5993
6015
|
* Convert an XML based plist document into a JSON representation.
|
|
@@ -9241,79 +9263,97 @@ var require_plist = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
9241
9263
|
} });
|
|
9242
9264
|
|
|
9243
9265
|
//#endregion
|
|
9244
|
-
//#region src/utils/
|
|
9245
|
-
|
|
9246
|
-
const
|
|
9266
|
+
//#region src/utils/getIosAppTargetDirectoryName.ts
|
|
9267
|
+
const getIosAppTargetDirectoryName = () => {
|
|
9268
|
+
const iosDirectory = path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios");
|
|
9269
|
+
const [xcodeprojPath] = (0, globby.globbySync)("*.xcodeproj/project.pbxproj", {
|
|
9270
|
+
cwd: iosDirectory,
|
|
9271
|
+
absolute: false,
|
|
9272
|
+
onlyFiles: true
|
|
9273
|
+
});
|
|
9274
|
+
return xcodeprojPath?.split(".")?.[0] ?? null;
|
|
9275
|
+
};
|
|
9276
|
+
|
|
9277
|
+
//#endregion
|
|
9278
|
+
//#region src/utils/version/getIOSVersion.ts
|
|
9279
|
+
var import_plist$1 = require_picocolors$1.__toESM(require_plist());
|
|
9280
|
+
var import_valid$3 = require_picocolors$1.__toESM(require_valid$1());
|
|
9281
|
+
const isFileExist = async (path$21) => {
|
|
9247
9282
|
try {
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9283
|
+
await fs_promises.default.access(path$21);
|
|
9284
|
+
return true;
|
|
9285
|
+
} catch {
|
|
9286
|
+
return false;
|
|
9287
|
+
}
|
|
9288
|
+
};
|
|
9289
|
+
const getIOSVersionFromInfoPlist = async () => {
|
|
9290
|
+
try {
|
|
9291
|
+
const iosAppTargetDirectory = getIosAppTargetDirectoryName();
|
|
9292
|
+
if (!iosAppTargetDirectory) return null;
|
|
9293
|
+
const plistPath = path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios", iosAppTargetDirectory, "Info.plist");
|
|
9294
|
+
if (!await isFileExist(plistPath)) return null;
|
|
9253
9295
|
const file = await fs_promises.default.readFile(plistPath, "utf8");
|
|
9254
|
-
const data = import_plist$
|
|
9296
|
+
const data = import_plist$1.default.parse(file);
|
|
9255
9297
|
return data["CFBundleShortVersionString"] ?? null;
|
|
9256
9298
|
} catch {
|
|
9257
9299
|
return null;
|
|
9258
9300
|
}
|
|
9259
9301
|
};
|
|
9260
|
-
const
|
|
9261
|
-
const buildGradlePath = path.default.join(cwd, "android", "app", "build.gradle");
|
|
9302
|
+
const getIOSVersionFromXcodeProject = async () => {
|
|
9262
9303
|
try {
|
|
9263
|
-
const
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9304
|
+
const [xcodeprojPath] = (0, globby.globbySync)("*.xcodeproj/project.pbxproj", {
|
|
9305
|
+
cwd: path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios"),
|
|
9306
|
+
absolute: true,
|
|
9307
|
+
onlyFiles: true
|
|
9308
|
+
});
|
|
9309
|
+
if (!xcodeprojPath) return null;
|
|
9310
|
+
const project = __bacons_xcode.XcodeProject.open(xcodeprojPath).toJSON();
|
|
9311
|
+
const objects = project.objects ?? {};
|
|
9312
|
+
for (const key of Object.keys(objects)) {
|
|
9313
|
+
const obj = objects[key];
|
|
9314
|
+
if (obj?.isa === "XCBuildConfiguration" && obj?.name === "Release" && typeof obj.buildSettings?.MARKETING_VERSION === "string") return obj.buildSettings.MARKETING_VERSION;
|
|
9315
|
+
}
|
|
9316
|
+
return null;
|
|
9317
|
+
} catch {
|
|
9267
9318
|
return null;
|
|
9268
9319
|
}
|
|
9269
9320
|
};
|
|
9270
|
-
const
|
|
9321
|
+
const IOSVersionParsers = {
|
|
9322
|
+
xcodeproj: getIOSVersionFromXcodeProject,
|
|
9323
|
+
"info-plist": getIOSVersionFromInfoPlist
|
|
9324
|
+
};
|
|
9325
|
+
const getIOSVersion = async ({ parser, validateWithSemver = false }) => {
|
|
9326
|
+
const parsers = Array.isArray(parser) ? parser : [parser];
|
|
9327
|
+
for (const parserKey of parsers) {
|
|
9328
|
+
const parsedVersion = await IOSVersionParsers[parserKey]();
|
|
9329
|
+
if (!parsedVersion) continue;
|
|
9330
|
+
if (validateWithSemver && !(0, import_valid$3.default)(parsedVersion)) continue;
|
|
9331
|
+
return parsedVersion;
|
|
9332
|
+
}
|
|
9333
|
+
return null;
|
|
9334
|
+
};
|
|
9335
|
+
|
|
9336
|
+
//#endregion
|
|
9337
|
+
//#region src/utils/version/getDefaultTargetAppVersion.ts
|
|
9338
|
+
var import_valid$2 = require_picocolors$1.__toESM(require_valid$1());
|
|
9339
|
+
const getDefaultTargetAppVersion = async (platform$2) => {
|
|
9271
9340
|
let version$1 = null;
|
|
9272
9341
|
switch (platform$2) {
|
|
9273
9342
|
case "ios":
|
|
9274
|
-
version$1 = await getIOSVersion
|
|
9343
|
+
version$1 = await getIOSVersion({ parser: "info-plist" });
|
|
9275
9344
|
break;
|
|
9276
9345
|
case "android":
|
|
9277
|
-
version$1 = await getAndroidVersion
|
|
9346
|
+
version$1 = await getAndroidVersion({ parser: "app-build-gradle" });
|
|
9278
9347
|
break;
|
|
9279
9348
|
}
|
|
9280
9349
|
if (!version$1) return null;
|
|
9350
|
+
const isAcceptableFormat = /^\d+\.\d+$/.test(version$1) || (0, import_valid$2.default)(version$1);
|
|
9351
|
+
if (!isAcceptableFormat) return null;
|
|
9281
9352
|
const dotCount = version$1.split(".").length - 1;
|
|
9282
9353
|
if (dotCount === 1) version$1 = `${version$1}.x`;
|
|
9283
9354
|
return version$1;
|
|
9284
9355
|
};
|
|
9285
9356
|
|
|
9286
|
-
//#endregion
|
|
9287
|
-
//#region src/utils/getFileHash.ts
|
|
9288
|
-
const getFileHashFromFile = async (filepath) => {
|
|
9289
|
-
try {
|
|
9290
|
-
const fileBuffer = await fs_promises.default.readFile(filepath).catch((error) => {
|
|
9291
|
-
console.error("Error reading the file:", error);
|
|
9292
|
-
throw error;
|
|
9293
|
-
});
|
|
9294
|
-
const hash = crypto.default.createHash("sha256");
|
|
9295
|
-
hash.update(fileBuffer);
|
|
9296
|
-
const fileHash = hash.digest("hex");
|
|
9297
|
-
return fileHash;
|
|
9298
|
-
} catch (error) {
|
|
9299
|
-
console.error("Error fetching or processing the file:", error);
|
|
9300
|
-
throw error;
|
|
9301
|
-
}
|
|
9302
|
-
};
|
|
9303
|
-
|
|
9304
|
-
//#endregion
|
|
9305
|
-
//#region src/utils/git.ts
|
|
9306
|
-
const getLatestGitCommit = async () => {
|
|
9307
|
-
try {
|
|
9308
|
-
const repo = await (0, es_git.openRepository)((0, __hot_updater_plugin_core.getCwd)());
|
|
9309
|
-
const headSha = repo.revparse("HEAD").from;
|
|
9310
|
-
if (headSha) return repo.getCommit(headSha);
|
|
9311
|
-
return null;
|
|
9312
|
-
} catch (error) {
|
|
9313
|
-
return null;
|
|
9314
|
-
}
|
|
9315
|
-
};
|
|
9316
|
-
|
|
9317
9357
|
//#endregion
|
|
9318
9358
|
//#region src/prompts/getPlatform.ts
|
|
9319
9359
|
const getPlatform = async (message) => {
|
|
@@ -9328,7 +9368,6 @@ const getPlatform = async (message) => {
|
|
|
9328
9368
|
value: "android"
|
|
9329
9369
|
}]
|
|
9330
9370
|
});
|
|
9331
|
-
if (typeof platform$2 !== "string") throw new Error("Invalid platform");
|
|
9332
9371
|
return platform$2;
|
|
9333
9372
|
};
|
|
9334
9373
|
|
|
@@ -9370,64 +9409,38 @@ async function getBundleZipTargets(basePath, files) {
|
|
|
9370
9409
|
}
|
|
9371
9410
|
|
|
9372
9411
|
//#endregion
|
|
9373
|
-
//#region
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
const getIOSVersion = async () => {
|
|
9389
|
-
try {
|
|
9390
|
-
const [xcodeprojPath] = (0, globby.globbySync)("*.xcodeproj/project.pbxproj", {
|
|
9391
|
-
cwd: path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios"),
|
|
9392
|
-
absolute: true,
|
|
9393
|
-
onlyFiles: true
|
|
9394
|
-
});
|
|
9395
|
-
if (!xcodeprojPath) return null;
|
|
9396
|
-
const project = __bacons_xcode.XcodeProject.open(xcodeprojPath).toJSON();
|
|
9397
|
-
const objects = project.objects ?? {};
|
|
9398
|
-
for (const key of Object.keys(objects)) {
|
|
9399
|
-
const obj = objects[key];
|
|
9400
|
-
if (obj?.isa === "XCBuildConfiguration" && obj?.name === "Release" && typeof obj.buildSettings?.MARKETING_VERSION === "string") return obj.buildSettings.MARKETING_VERSION;
|
|
9401
|
-
}
|
|
9402
|
-
return null;
|
|
9403
|
-
} catch {
|
|
9404
|
-
return null;
|
|
9405
|
-
}
|
|
9406
|
-
};
|
|
9407
|
-
const getPlistVersion = async () => {
|
|
9408
|
-
try {
|
|
9409
|
-
const plistPath = await findUp("Info.plist", {
|
|
9410
|
-
cwd: path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios"),
|
|
9411
|
-
type: "file"
|
|
9412
|
-
});
|
|
9413
|
-
if (!plistPath) return null;
|
|
9414
|
-
const file = await fs_promises.default.readFile(plistPath, "utf8");
|
|
9415
|
-
const data = import_plist$1.default.parse(file);
|
|
9416
|
-
return data["CFBundleShortVersionString"] ?? null;
|
|
9417
|
-
} catch {
|
|
9418
|
-
return null;
|
|
9412
|
+
//#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
|
|
9413
|
+
const toPath$2 = (urlOrPath) => urlOrPath instanceof URL ? (0, node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
9414
|
+
async function findUp(name, { cwd = node_process.default.cwd(), type: type$1 = "file", stopAt } = {}) {
|
|
9415
|
+
let directory = node_path.default.resolve(toPath$2(cwd) ?? "");
|
|
9416
|
+
const { root } = node_path.default.parse(directory);
|
|
9417
|
+
stopAt = node_path.default.resolve(directory, toPath$2(stopAt ?? root));
|
|
9418
|
+
const isAbsoluteName = node_path.default.isAbsolute(name);
|
|
9419
|
+
while (directory) {
|
|
9420
|
+
const filePath = isAbsoluteName ? name : node_path.default.join(directory, name);
|
|
9421
|
+
try {
|
|
9422
|
+
const stats = await node_fs_promises.default.stat(filePath);
|
|
9423
|
+
if (type$1 === "file" && stats.isFile() || type$1 === "directory" && stats.isDirectory()) return filePath;
|
|
9424
|
+
} catch {}
|
|
9425
|
+
if (directory === stopAt || directory === root) break;
|
|
9426
|
+
directory = node_path.default.dirname(directory);
|
|
9419
9427
|
}
|
|
9420
|
-
}
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9428
|
+
}
|
|
9429
|
+
function findUpSync(name, { cwd = node_process.default.cwd(), type: type$1 = "file", stopAt } = {}) {
|
|
9430
|
+
let directory = node_path.default.resolve(toPath$2(cwd) ?? "");
|
|
9431
|
+
const { root } = node_path.default.parse(directory);
|
|
9432
|
+
stopAt = node_path.default.resolve(directory, toPath$2(stopAt) ?? root);
|
|
9433
|
+
const isAbsoluteName = node_path.default.isAbsolute(name);
|
|
9434
|
+
while (directory) {
|
|
9435
|
+
const filePath = isAbsoluteName ? name : node_path.default.join(directory, name);
|
|
9436
|
+
try {
|
|
9437
|
+
const stats = node_fs.default.statSync(filePath, { throwIfNoEntry: false });
|
|
9438
|
+
if (type$1 === "file" && stats?.isFile() || type$1 === "directory" && stats?.isDirectory()) return filePath;
|
|
9439
|
+
} catch {}
|
|
9440
|
+
if (directory === stopAt || directory === root) break;
|
|
9441
|
+
directory = node_path.default.dirname(directory);
|
|
9429
9442
|
}
|
|
9430
|
-
}
|
|
9443
|
+
}
|
|
9431
9444
|
|
|
9432
9445
|
//#endregion
|
|
9433
9446
|
//#region ../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js
|
|
@@ -9453,8 +9466,8 @@ var require_js_tokens = require_picocolors$1.__commonJS({ "../../node_modules/.p
|
|
|
9453
9466
|
} });
|
|
9454
9467
|
|
|
9455
9468
|
//#endregion
|
|
9456
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
9457
|
-
var require_identifier = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
9469
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/identifier.js
|
|
9470
|
+
var require_identifier = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
|
|
9458
9471
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9459
9472
|
exports.isIdentifierChar = isIdentifierChar;
|
|
9460
9473
|
exports.isIdentifierName = isIdentifierName;
|
|
@@ -10430,8 +10443,8 @@ var require_identifier = require_picocolors$1.__commonJS({ "../../node_modules/.
|
|
|
10430
10443
|
} });
|
|
10431
10444
|
|
|
10432
10445
|
//#endregion
|
|
10433
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
10434
|
-
var require_keyword = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
10446
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/keyword.js
|
|
10447
|
+
var require_keyword = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
|
|
10435
10448
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10436
10449
|
exports.isKeyword = isKeyword;
|
|
10437
10450
|
exports.isReservedWord = isReservedWord;
|
|
@@ -10510,8 +10523,8 @@ var require_keyword = require_picocolors$1.__commonJS({ "../../node_modules/.pnp
|
|
|
10510
10523
|
} });
|
|
10511
10524
|
|
|
10512
10525
|
//#endregion
|
|
10513
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
10514
|
-
var require_lib$2 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
10526
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/index.js
|
|
10527
|
+
var require_lib$2 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
|
|
10515
10528
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10516
10529
|
Object.defineProperty(exports, "isIdentifierChar", {
|
|
10517
10530
|
enumerable: true,
|
|
@@ -10566,14 +10579,14 @@ var require_lib$2 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
10566
10579
|
} });
|
|
10567
10580
|
|
|
10568
10581
|
//#endregion
|
|
10569
|
-
//#region ../../node_modules/.pnpm/@babel+code-frame@7.
|
|
10570
|
-
var require_lib$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+code-frame@7.
|
|
10582
|
+
//#region ../../node_modules/.pnpm/@babel+code-frame@7.27.1/node_modules/@babel/code-frame/lib/index.js
|
|
10583
|
+
var require_lib$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/@babel+code-frame@7.27.1/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
|
10571
10584
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10572
|
-
var picocolors$
|
|
10585
|
+
var picocolors$3 = require_picocolors$1.require_picocolors();
|
|
10573
10586
|
var jsTokens = require_js_tokens();
|
|
10574
10587
|
var helperValidatorIdentifier = require_lib$2();
|
|
10575
10588
|
function isColorSupported() {
|
|
10576
|
-
return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors$
|
|
10589
|
+
return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors$3.isColorSupported;
|
|
10577
10590
|
}
|
|
10578
10591
|
const compose = (f, g) => (v) => f(g(v));
|
|
10579
10592
|
function buildDefs(colors) {
|
|
@@ -10593,8 +10606,8 @@ var require_lib$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
10593
10606
|
reset: colors.reset
|
|
10594
10607
|
};
|
|
10595
10608
|
}
|
|
10596
|
-
const defsOn = buildDefs(picocolors$
|
|
10597
|
-
const defsOff = buildDefs(picocolors$
|
|
10609
|
+
const defsOn = buildDefs(picocolors$3.createColors(true));
|
|
10610
|
+
const defsOff = buildDefs(picocolors$3.createColors(false));
|
|
10598
10611
|
function getDefs(enabled) {
|
|
10599
10612
|
return enabled ? defsOn : defsOff;
|
|
10600
10613
|
}
|
|
@@ -10836,39 +10849,39 @@ function parseJson(string, reviver, fileName) {
|
|
|
10836
10849
|
//#endregion
|
|
10837
10850
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
10838
10851
|
var require_parse$2 = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js"(exports, module) {
|
|
10839
|
-
const SemVer = require_semver();
|
|
10840
|
-
const parse$
|
|
10841
|
-
if (version$1 instanceof SemVer) return version$1;
|
|
10852
|
+
const SemVer$11 = require_semver$1();
|
|
10853
|
+
const parse$11 = (version$1, options, throwErrors = false) => {
|
|
10854
|
+
if (version$1 instanceof SemVer$11) return version$1;
|
|
10842
10855
|
try {
|
|
10843
|
-
return new SemVer(version$1, options);
|
|
10856
|
+
return new SemVer$11(version$1, options);
|
|
10844
10857
|
} catch (er) {
|
|
10845
10858
|
if (!throwErrors) return null;
|
|
10846
10859
|
throw er;
|
|
10847
10860
|
}
|
|
10848
10861
|
};
|
|
10849
|
-
module.exports = parse$
|
|
10862
|
+
module.exports = parse$11;
|
|
10850
10863
|
} });
|
|
10851
10864
|
|
|
10852
10865
|
//#endregion
|
|
10853
10866
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
10854
10867
|
var require_valid = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js"(exports, module) {
|
|
10855
|
-
const parse$
|
|
10856
|
-
const valid$
|
|
10857
|
-
const v = parse$
|
|
10868
|
+
const parse$10 = require_parse$2();
|
|
10869
|
+
const valid$2 = (version$1, options) => {
|
|
10870
|
+
const v = parse$10(version$1, options);
|
|
10858
10871
|
return v ? v.version : null;
|
|
10859
10872
|
};
|
|
10860
|
-
module.exports = valid$
|
|
10873
|
+
module.exports = valid$2;
|
|
10861
10874
|
} });
|
|
10862
10875
|
|
|
10863
10876
|
//#endregion
|
|
10864
10877
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
10865
10878
|
var require_clean = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js"(exports, module) {
|
|
10866
|
-
const parse$
|
|
10867
|
-
const clean = (version$1, options) => {
|
|
10868
|
-
const s = parse$
|
|
10879
|
+
const parse$9 = require_parse$2();
|
|
10880
|
+
const clean$1 = (version$1, options) => {
|
|
10881
|
+
const s = parse$9(version$1.trim().replace(/^[=v]+/, ""), options);
|
|
10869
10882
|
return s ? s.version : null;
|
|
10870
10883
|
};
|
|
10871
|
-
module.exports = clean;
|
|
10884
|
+
module.exports = clean$1;
|
|
10872
10885
|
} });
|
|
10873
10886
|
|
|
10874
10887
|
//#endregion
|
|
@@ -11728,18 +11741,18 @@ var require_parse$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnp
|
|
|
11728
11741
|
index$1++;
|
|
11729
11742
|
}
|
|
11730
11743
|
function parseOperator(operator) {
|
|
11731
|
-
var t$
|
|
11732
|
-
if (t$
|
|
11744
|
+
var t$5 = token();
|
|
11745
|
+
if (t$5 && t$5.type === "OPERATOR" && operator === t$5.string) {
|
|
11733
11746
|
next();
|
|
11734
|
-
return t$
|
|
11747
|
+
return t$5.string;
|
|
11735
11748
|
}
|
|
11736
11749
|
}
|
|
11737
11750
|
function parseWith() {
|
|
11738
11751
|
if (parseOperator("WITH")) {
|
|
11739
|
-
var t$
|
|
11740
|
-
if (t$
|
|
11752
|
+
var t$5 = token();
|
|
11753
|
+
if (t$5 && t$5.type === "EXCEPTION") {
|
|
11741
11754
|
next();
|
|
11742
|
-
return t$
|
|
11755
|
+
return t$5.string;
|
|
11743
11756
|
}
|
|
11744
11757
|
throw new Error("Expected exception after `WITH`");
|
|
11745
11758
|
}
|
|
@@ -11747,25 +11760,25 @@ var require_parse$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnp
|
|
|
11747
11760
|
function parseLicenseRef() {
|
|
11748
11761
|
var begin = index$1;
|
|
11749
11762
|
var string = "";
|
|
11750
|
-
var t$
|
|
11751
|
-
if (t$
|
|
11763
|
+
var t$5 = token();
|
|
11764
|
+
if (t$5.type === "DOCUMENTREF") {
|
|
11752
11765
|
next();
|
|
11753
|
-
string += "DocumentRef-" + t$
|
|
11766
|
+
string += "DocumentRef-" + t$5.string + ":";
|
|
11754
11767
|
if (!parseOperator(":")) throw new Error("Expected `:` after `DocumentRef-...`");
|
|
11755
11768
|
}
|
|
11756
|
-
t$
|
|
11757
|
-
if (t$
|
|
11769
|
+
t$5 = token();
|
|
11770
|
+
if (t$5.type === "LICENSEREF") {
|
|
11758
11771
|
next();
|
|
11759
|
-
string += "LicenseRef-" + t$
|
|
11772
|
+
string += "LicenseRef-" + t$5.string;
|
|
11760
11773
|
return { license: string };
|
|
11761
11774
|
}
|
|
11762
11775
|
index$1 = begin;
|
|
11763
11776
|
}
|
|
11764
11777
|
function parseLicense() {
|
|
11765
|
-
var t$
|
|
11766
|
-
if (t$
|
|
11778
|
+
var t$5 = token();
|
|
11779
|
+
if (t$5 && t$5.type === "LICENSE") {
|
|
11767
11780
|
next();
|
|
11768
|
-
var node$1 = { license: t$
|
|
11781
|
+
var node$1 = { license: t$5.string };
|
|
11769
11782
|
if (parseOperator("+")) node$1.plus = true;
|
|
11770
11783
|
var exception = parseWith();
|
|
11771
11784
|
if (exception) node$1.exception = exception;
|
|
@@ -11808,20 +11821,20 @@ var require_parse$1 = require_picocolors$1.__commonJS({ "../../node_modules/.pnp
|
|
|
11808
11821
|
//#region ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js
|
|
11809
11822
|
var require_spdx_expression_parse = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js"(exports, module) {
|
|
11810
11823
|
var scan = require_scan();
|
|
11811
|
-
var parse$
|
|
11824
|
+
var parse$8 = require_parse$1();
|
|
11812
11825
|
module.exports = function(source) {
|
|
11813
|
-
return parse$
|
|
11826
|
+
return parse$8(scan(source));
|
|
11814
11827
|
};
|
|
11815
11828
|
} });
|
|
11816
11829
|
|
|
11817
11830
|
//#endregion
|
|
11818
11831
|
//#region ../../node_modules/.pnpm/spdx-correct@3.2.0/node_modules/spdx-correct/index.js
|
|
11819
11832
|
var require_spdx_correct = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/spdx-correct@3.2.0/node_modules/spdx-correct/index.js"(exports, module) {
|
|
11820
|
-
var parse$
|
|
11833
|
+
var parse$7 = require_spdx_expression_parse();
|
|
11821
11834
|
var spdxLicenseIds = require_spdx_license_ids();
|
|
11822
|
-
function valid(string) {
|
|
11835
|
+
function valid$1(string) {
|
|
11823
11836
|
try {
|
|
11824
|
-
parse$
|
|
11837
|
+
parse$7(string);
|
|
11825
11838
|
return true;
|
|
11826
11839
|
} catch (error) {
|
|
11827
11840
|
return false;
|
|
@@ -12008,7 +12021,7 @@ var require_spdx_correct = require_picocolors$1.__commonJS({ "../../node_modules
|
|
|
12008
12021
|
var validTransformation = function(identifier) {
|
|
12009
12022
|
for (var i$2 = 0; i$2 < transforms.length; i$2++) {
|
|
12010
12023
|
var transformed = transforms[i$2](identifier).trim();
|
|
12011
|
-
if (transformed !== identifier && valid(transformed)) return transformed;
|
|
12024
|
+
if (transformed !== identifier && valid$1(transformed)) return transformed;
|
|
12012
12025
|
}
|
|
12013
12026
|
return null;
|
|
12014
12027
|
};
|
|
@@ -12041,13 +12054,13 @@ var require_spdx_correct = require_picocolors$1.__commonJS({ "../../node_modules
|
|
|
12041
12054
|
var validArugment = typeof identifier === "string" && identifier.trim().length !== 0;
|
|
12042
12055
|
if (!validArugment) throw Error("Invalid argument. Expected non-empty string.");
|
|
12043
12056
|
identifier = identifier.trim();
|
|
12044
|
-
if (valid(identifier)) return postprocess(identifier);
|
|
12057
|
+
if (valid$1(identifier)) return postprocess(identifier);
|
|
12045
12058
|
var noPlus = identifier.replace(/\+$/, "").trim();
|
|
12046
|
-
if (valid(noPlus)) return postprocess(noPlus);
|
|
12059
|
+
if (valid$1(noPlus)) return postprocess(noPlus);
|
|
12047
12060
|
var transformed = validTransformation(identifier);
|
|
12048
12061
|
if (transformed !== null) return postprocess(transformed);
|
|
12049
12062
|
transformed = anyCorrection(identifier, function(argument) {
|
|
12050
|
-
if (valid(argument)) return argument;
|
|
12063
|
+
if (valid$1(argument)) return argument;
|
|
12051
12064
|
return validTransformation(argument);
|
|
12052
12065
|
});
|
|
12053
12066
|
if (transformed !== null) return postprocess(transformed);
|
|
@@ -12089,7 +12102,7 @@ var require_spdx_correct = require_picocolors$1.__commonJS({ "../../node_modules
|
|
|
12089
12102
|
//#endregion
|
|
12090
12103
|
//#region ../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js
|
|
12091
12104
|
var require_validate_npm_package_license = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js"(exports, module) {
|
|
12092
|
-
var parse$
|
|
12105
|
+
var parse$6 = require_spdx_expression_parse();
|
|
12093
12106
|
var correct = require_spdx_correct();
|
|
12094
12107
|
var genericWarning = "license should be a valid SPDX license expression (without \"LicenseRef\"), \"UNLICENSED\", or \"SEE LICENSE IN <filename>\"";
|
|
12095
12108
|
var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/;
|
|
@@ -12105,7 +12118,7 @@ var require_validate_npm_package_license = require_picocolors$1.__commonJS({ "..
|
|
|
12105
12118
|
module.exports = function(argument) {
|
|
12106
12119
|
var ast;
|
|
12107
12120
|
try {
|
|
12108
|
-
ast = parse$
|
|
12121
|
+
ast = parse$6(argument);
|
|
12109
12122
|
} catch (e) {
|
|
12110
12123
|
var match;
|
|
12111
12124
|
if (argument === "UNLICENSED" || argument === "UNLICENCED") return {
|
|
@@ -12486,11 +12499,11 @@ var require_commonjs = require_picocolors$1.__commonJS({ "../../node_modules/.pn
|
|
|
12486
12499
|
starts[index$1] = ttl !== 0 ? start : 0;
|
|
12487
12500
|
ttls[index$1] = ttl;
|
|
12488
12501
|
if (ttl !== 0 && this.ttlAutopurge) {
|
|
12489
|
-
const t$
|
|
12502
|
+
const t$5 = setTimeout(() => {
|
|
12490
12503
|
if (this.#isStale(index$1)) this.delete(this.#keyList[index$1]);
|
|
12491
12504
|
}, ttl + 1);
|
|
12492
12505
|
/* c8 ignore start */
|
|
12493
|
-
if (t$
|
|
12506
|
+
if (t$5.unref) t$5.unref();
|
|
12494
12507
|
}
|
|
12495
12508
|
};
|
|
12496
12509
|
this.#updateItemAge = (index$1) => {
|
|
@@ -12514,9 +12527,9 @@ var require_commonjs = require_picocolors$1.__commonJS({ "../../node_modules/.pn
|
|
|
12514
12527
|
const n$1 = perf.now();
|
|
12515
12528
|
if (this.ttlResolution > 0) {
|
|
12516
12529
|
cachedNow = n$1;
|
|
12517
|
-
const t$
|
|
12530
|
+
const t$5 = setTimeout(() => cachedNow = 0, this.ttlResolution);
|
|
12518
12531
|
/* c8 ignore start */
|
|
12519
|
-
if (t$
|
|
12532
|
+
if (t$5.unref) t$5.unref();
|
|
12520
12533
|
}
|
|
12521
12534
|
return n$1;
|
|
12522
12535
|
};
|
|
@@ -12531,8 +12544,8 @@ var require_commonjs = require_picocolors$1.__commonJS({ "../../node_modules/.pn
|
|
|
12531
12544
|
};
|
|
12532
12545
|
this.#isStale = (index$1) => {
|
|
12533
12546
|
const s = starts[index$1];
|
|
12534
|
-
const t$
|
|
12535
|
-
return !!t$
|
|
12547
|
+
const t$5 = ttls[index$1];
|
|
12548
|
+
return !!t$5 && !!s && (cachedNow || getNow()) - s > t$5;
|
|
12536
12549
|
};
|
|
12537
12550
|
}
|
|
12538
12551
|
#updateItemAge = () => {};
|
|
@@ -13231,13 +13244,13 @@ var require_hosts = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
13231
13244
|
const defaults = {
|
|
13232
13245
|
sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
13233
13246
|
sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
13234
|
-
edittemplate: ({ domain, user, project, committish, editpath, path: path$
|
|
13247
|
+
edittemplate: ({ domain, user, project, committish, editpath, path: path$21 }) => `https://${domain}/${user}/${project}${maybeJoin("/", editpath, "/", maybeEncode(committish || "HEAD"), "/", path$21)}`,
|
|
13235
13248
|
browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}`,
|
|
13236
|
-
browsetreetemplate: ({ domain, user, project, committish, treepath, path: path$
|
|
13237
|
-
browseblobtemplate: ({ domain, user, project, committish, blobpath, path: path$
|
|
13249
|
+
browsetreetemplate: ({ domain, user, project, committish, treepath, path: path$21, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || "HEAD")}/${path$21}${maybeJoin("#", hashformat(fragment || ""))}`,
|
|
13250
|
+
browseblobtemplate: ({ domain, user, project, committish, blobpath, path: path$21, fragment, hashformat }) => `https://${domain}/${user}/${project}/${blobpath}/${maybeEncode(committish || "HEAD")}/${path$21}${maybeJoin("#", hashformat(fragment || ""))}`,
|
|
13238
13251
|
docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}#readme`,
|
|
13239
13252
|
httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
13240
|
-
filetemplate: ({ domain, user, project, committish, path: path$
|
|
13253
|
+
filetemplate: ({ domain, user, project, committish, path: path$21 }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish || "HEAD")}/${path$21}`,
|
|
13241
13254
|
shortcuttemplate: ({ type: type$1, user, project, committish }) => `${type$1}:${user}/${project}${maybeJoin("#", committish)}`,
|
|
13242
13255
|
pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin("#", committish)}`,
|
|
13243
13256
|
bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`,
|
|
@@ -13257,7 +13270,7 @@ var require_hosts = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
13257
13270
|
treepath: "tree",
|
|
13258
13271
|
blobpath: "blob",
|
|
13259
13272
|
editpath: "edit",
|
|
13260
|
-
filetemplate: ({ auth, user, project, committish, path: path$
|
|
13273
|
+
filetemplate: ({ auth, user, project, committish, path: path$21 }) => `https://${maybeJoin(auth, "@")}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish || "HEAD")}/${path$21}`,
|
|
13261
13274
|
gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
13262
13275
|
tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish || "HEAD")}`,
|
|
13263
13276
|
extract: (url$2) => {
|
|
@@ -13284,7 +13297,7 @@ var require_hosts = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
13284
13297
|
treepath: "src",
|
|
13285
13298
|
blobpath: "src",
|
|
13286
13299
|
editpath: "?mode=edit",
|
|
13287
|
-
edittemplate: ({ domain, user, project, committish, treepath, path: path$
|
|
13300
|
+
edittemplate: ({ domain, user, project, committish, treepath, path: path$21, editpath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish || "HEAD"), "/", path$21, editpath)}`,
|
|
13288
13301
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish || "HEAD")}.tar.gz`,
|
|
13289
13302
|
extract: (url$2) => {
|
|
13290
13303
|
let [, user, project, aux] = url$2.pathname.split("/", 4);
|
|
@@ -13312,9 +13325,9 @@ var require_hosts = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
13312
13325
|
httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
13313
13326
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish || "HEAD")}`,
|
|
13314
13327
|
extract: (url$2) => {
|
|
13315
|
-
const path$
|
|
13316
|
-
if (path$
|
|
13317
|
-
const segments = path$
|
|
13328
|
+
const path$21 = url$2.pathname.slice(1);
|
|
13329
|
+
if (path$21.includes("/-/") || path$21.includes("/archive.tar.gz")) return;
|
|
13330
|
+
const segments = path$21.split("/");
|
|
13318
13331
|
let project = segments.pop();
|
|
13319
13332
|
if (project.endsWith(".git")) project = project.slice(0, -4);
|
|
13320
13333
|
const user = segments.join("/");
|
|
@@ -13340,11 +13353,11 @@ var require_hosts = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
13340
13353
|
sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin("#", committish)}`,
|
|
13341
13354
|
edittemplate: ({ domain, user, project, committish, editpath }) => `https://${domain}/${user}/${project}${maybeJoin("/", maybeEncode(committish))}/${editpath}`,
|
|
13342
13355
|
browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`,
|
|
13343
|
-
browsetreetemplate: ({ domain, project, committish, path: path$
|
|
13344
|
-
browseblobtemplate: ({ domain, project, committish, path: path$
|
|
13356
|
+
browsetreetemplate: ({ domain, project, committish, path: path$21, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path$21))}`,
|
|
13357
|
+
browseblobtemplate: ({ domain, project, committish, path: path$21, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path$21))}`,
|
|
13345
13358
|
docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`,
|
|
13346
13359
|
httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin("#", committish)}`,
|
|
13347
|
-
filetemplate: ({ user, project, committish, path: path$
|
|
13360
|
+
filetemplate: ({ user, project, committish, path: path$21 }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin("/", maybeEncode(committish))}/${path$21}`,
|
|
13348
13361
|
shortcuttemplate: ({ type: type$1, project, committish }) => `${type$1}:${project}${maybeJoin("#", committish)}`,
|
|
13349
13362
|
pathtemplate: ({ project, committish }) => `${project}${maybeJoin("#", committish)}`,
|
|
13350
13363
|
bugstemplate: ({ domain, project }) => `https://${domain}/${project}`,
|
|
@@ -13374,7 +13387,7 @@ var require_hosts = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
13374
13387
|
domain: "git.sr.ht",
|
|
13375
13388
|
treepath: "tree",
|
|
13376
13389
|
blobpath: "tree",
|
|
13377
|
-
filetemplate: ({ domain, user, project, committish, path: path$
|
|
13390
|
+
filetemplate: ({ domain, user, project, committish, path: path$21 }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || "HEAD"}/${path$21}`,
|
|
13378
13391
|
httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
13379
13392
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || "HEAD"}.tar.gz`,
|
|
13380
13393
|
bugstemplate: () => null,
|
|
@@ -13586,27 +13599,27 @@ var require_lib = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/ho
|
|
|
13586
13599
|
sshurl(opts) {
|
|
13587
13600
|
return this.#fill(this.sshurltemplate, opts);
|
|
13588
13601
|
}
|
|
13589
|
-
browse(path$
|
|
13590
|
-
if (typeof path$
|
|
13602
|
+
browse(path$21, ...args) {
|
|
13603
|
+
if (typeof path$21 !== "string") return this.#fill(this.browsetemplate, path$21);
|
|
13591
13604
|
if (typeof args[0] !== "string") return this.#fill(this.browsetreetemplate, {
|
|
13592
13605
|
...args[0],
|
|
13593
|
-
path: path$
|
|
13606
|
+
path: path$21
|
|
13594
13607
|
});
|
|
13595
13608
|
return this.#fill(this.browsetreetemplate, {
|
|
13596
13609
|
...args[1],
|
|
13597
13610
|
fragment: args[0],
|
|
13598
|
-
path: path$
|
|
13611
|
+
path: path$21
|
|
13599
13612
|
});
|
|
13600
13613
|
}
|
|
13601
|
-
browseFile(path$
|
|
13614
|
+
browseFile(path$21, ...args) {
|
|
13602
13615
|
if (typeof args[0] !== "string") return this.#fill(this.browseblobtemplate, {
|
|
13603
13616
|
...args[0],
|
|
13604
|
-
path: path$
|
|
13617
|
+
path: path$21
|
|
13605
13618
|
});
|
|
13606
13619
|
return this.#fill(this.browseblobtemplate, {
|
|
13607
13620
|
...args[1],
|
|
13608
13621
|
fragment: args[0],
|
|
13609
|
-
path: path$
|
|
13622
|
+
path: path$21
|
|
13610
13623
|
});
|
|
13611
13624
|
}
|
|
13612
13625
|
docs(opts) {
|
|
@@ -13633,16 +13646,16 @@ var require_lib = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/ho
|
|
|
13633
13646
|
noCommittish: false
|
|
13634
13647
|
});
|
|
13635
13648
|
}
|
|
13636
|
-
file(path$
|
|
13649
|
+
file(path$21, opts) {
|
|
13637
13650
|
return this.#fill(this.filetemplate, {
|
|
13638
13651
|
...opts,
|
|
13639
|
-
path: path$
|
|
13652
|
+
path: path$21
|
|
13640
13653
|
});
|
|
13641
13654
|
}
|
|
13642
|
-
edit(path$
|
|
13655
|
+
edit(path$21, opts) {
|
|
13643
13656
|
return this.#fill(this.edittemplate, {
|
|
13644
13657
|
...opts,
|
|
13645
|
-
path: path$
|
|
13658
|
+
path: path$21
|
|
13646
13659
|
});
|
|
13647
13660
|
}
|
|
13648
13661
|
getDefaultRepresentation() {
|
|
@@ -14196,6 +14209,16 @@ const printBanner = () => {
|
|
|
14196
14209
|
(0, __hot_updater_plugin_core.printBanner)(version);
|
|
14197
14210
|
};
|
|
14198
14211
|
|
|
14212
|
+
//#endregion
|
|
14213
|
+
//#region src/utils/version/getNativeAppVersion.ts
|
|
14214
|
+
const getNativeAppVersion = async (platform$2) => {
|
|
14215
|
+
switch (platform$2) {
|
|
14216
|
+
case "ios": return getIOSVersion({ parser: ["xcodeproj", "info-plist"] });
|
|
14217
|
+
case "android": return getAndroidVersion({ parser: "app-build-gradle" });
|
|
14218
|
+
default: return null;
|
|
14219
|
+
}
|
|
14220
|
+
};
|
|
14221
|
+
|
|
14199
14222
|
//#endregion
|
|
14200
14223
|
//#region src/commands/deploy.ts
|
|
14201
14224
|
var import_valid$1 = require_picocolors$1.__toESM(require_valid$1());
|
|
@@ -14244,7 +14267,7 @@ const deploy = async (options) => {
|
|
|
14244
14267
|
target.fingerprintHash = fingerprint.hash;
|
|
14245
14268
|
s.stop(`Fingerprint(${platform$2}): ${fingerprint.hash}`);
|
|
14246
14269
|
} else {
|
|
14247
|
-
const defaultTargetAppVersion = await getDefaultTargetAppVersion(
|
|
14270
|
+
const defaultTargetAppVersion = await getDefaultTargetAppVersion(platform$2) ?? "1.0.0";
|
|
14248
14271
|
const targetAppVersion = options.targetAppVersion ?? (options.interactive ? await __clack_prompts.text({
|
|
14249
14272
|
message: "Target app version",
|
|
14250
14273
|
placeholder: defaultTargetAppVersion,
|
|
@@ -15195,29 +15218,29 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
15195
15218
|
var require_windows = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
|
|
15196
15219
|
module.exports = isexe$3;
|
|
15197
15220
|
isexe$3.sync = sync$2;
|
|
15198
|
-
var fs$
|
|
15199
|
-
function checkPathExt(path$
|
|
15221
|
+
var fs$8 = require("fs");
|
|
15222
|
+
function checkPathExt(path$21, options) {
|
|
15200
15223
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
15201
15224
|
if (!pathext) return true;
|
|
15202
15225
|
pathext = pathext.split(";");
|
|
15203
15226
|
if (pathext.indexOf("") !== -1) return true;
|
|
15204
15227
|
for (var i$2 = 0; i$2 < pathext.length; i$2++) {
|
|
15205
15228
|
var p = pathext[i$2].toLowerCase();
|
|
15206
|
-
if (p && path$
|
|
15229
|
+
if (p && path$21.substr(-p.length).toLowerCase() === p) return true;
|
|
15207
15230
|
}
|
|
15208
15231
|
return false;
|
|
15209
15232
|
}
|
|
15210
|
-
function checkStat$1(stat, path$
|
|
15233
|
+
function checkStat$1(stat, path$21, options) {
|
|
15211
15234
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
15212
|
-
return checkPathExt(path$
|
|
15235
|
+
return checkPathExt(path$21, options);
|
|
15213
15236
|
}
|
|
15214
|
-
function isexe$3(path$
|
|
15215
|
-
fs$
|
|
15216
|
-
cb(er, er ? false : checkStat$1(stat, path$
|
|
15237
|
+
function isexe$3(path$21, options, cb) {
|
|
15238
|
+
fs$8.stat(path$21, function(er, stat) {
|
|
15239
|
+
cb(er, er ? false : checkStat$1(stat, path$21, options));
|
|
15217
15240
|
});
|
|
15218
15241
|
}
|
|
15219
|
-
function sync$2(path$
|
|
15220
|
-
return checkStat$1(fs$
|
|
15242
|
+
function sync$2(path$21, options) {
|
|
15243
|
+
return checkStat$1(fs$8.statSync(path$21), path$21, options);
|
|
15221
15244
|
}
|
|
15222
15245
|
} });
|
|
15223
15246
|
|
|
@@ -15226,14 +15249,14 @@ var require_windows = require_picocolors$1.__commonJS({ "../../node_modules/.pnp
|
|
|
15226
15249
|
var require_mode = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
|
|
15227
15250
|
module.exports = isexe$2;
|
|
15228
15251
|
isexe$2.sync = sync$1;
|
|
15229
|
-
var fs$
|
|
15230
|
-
function isexe$2(path$
|
|
15231
|
-
fs$
|
|
15252
|
+
var fs$7 = require("fs");
|
|
15253
|
+
function isexe$2(path$21, options, cb) {
|
|
15254
|
+
fs$7.stat(path$21, function(er, stat) {
|
|
15232
15255
|
cb(er, er ? false : checkStat(stat, options));
|
|
15233
15256
|
});
|
|
15234
15257
|
}
|
|
15235
|
-
function sync$1(path$
|
|
15236
|
-
return checkStat(fs$
|
|
15258
|
+
function sync$1(path$21, options) {
|
|
15259
|
+
return checkStat(fs$7.statSync(path$21), options);
|
|
15237
15260
|
}
|
|
15238
15261
|
function checkStat(stat, options) {
|
|
15239
15262
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -15256,13 +15279,13 @@ var require_mode = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/i
|
|
|
15256
15279
|
//#endregion
|
|
15257
15280
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
15258
15281
|
var require_isexe = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
|
|
15259
|
-
var fs$
|
|
15282
|
+
var fs$6 = require("fs");
|
|
15260
15283
|
var core;
|
|
15261
15284
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
15262
15285
|
else core = require_mode();
|
|
15263
15286
|
module.exports = isexe$1;
|
|
15264
15287
|
isexe$1.sync = sync;
|
|
15265
|
-
function isexe$1(path$
|
|
15288
|
+
function isexe$1(path$21, options, cb) {
|
|
15266
15289
|
if (typeof options === "function") {
|
|
15267
15290
|
cb = options;
|
|
15268
15291
|
options = {};
|
|
@@ -15270,13 +15293,13 @@ var require_isexe = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
15270
15293
|
if (!cb) {
|
|
15271
15294
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
15272
15295
|
return new Promise(function(resolve, reject) {
|
|
15273
|
-
isexe$1(path$
|
|
15296
|
+
isexe$1(path$21, options || {}, function(er, is) {
|
|
15274
15297
|
if (er) reject(er);
|
|
15275
15298
|
else resolve(is);
|
|
15276
15299
|
});
|
|
15277
15300
|
});
|
|
15278
15301
|
}
|
|
15279
|
-
core(path$
|
|
15302
|
+
core(path$21, options || {}, function(er, is) {
|
|
15280
15303
|
if (er) {
|
|
15281
15304
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
15282
15305
|
er = null;
|
|
@@ -15286,9 +15309,9 @@ var require_isexe = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
15286
15309
|
cb(er, is);
|
|
15287
15310
|
});
|
|
15288
15311
|
}
|
|
15289
|
-
function sync(path$
|
|
15312
|
+
function sync(path$21, options) {
|
|
15290
15313
|
try {
|
|
15291
|
-
return core.sync(path$
|
|
15314
|
+
return core.sync(path$21, options || {});
|
|
15292
15315
|
} catch (er) {
|
|
15293
15316
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
15294
15317
|
else throw er;
|
|
@@ -15450,8 +15473,8 @@ var require_shebang_command = require_picocolors$1.__commonJS({ "../../node_modu
|
|
|
15450
15473
|
module.exports = (string = "") => {
|
|
15451
15474
|
const match = string.match(shebangRegex);
|
|
15452
15475
|
if (!match) return null;
|
|
15453
|
-
const [path$
|
|
15454
|
-
const binary = path$
|
|
15476
|
+
const [path$21, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
15477
|
+
const binary = path$21.split("/").pop();
|
|
15455
15478
|
if (binary === "env") return argument;
|
|
15456
15479
|
return argument ? `${binary} ${argument}` : binary;
|
|
15457
15480
|
};
|
|
@@ -15460,16 +15483,16 @@ var require_shebang_command = require_picocolors$1.__commonJS({ "../../node_modu
|
|
|
15460
15483
|
//#endregion
|
|
15461
15484
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
15462
15485
|
var require_readShebang = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
15463
|
-
const fs$
|
|
15486
|
+
const fs$5 = require("fs");
|
|
15464
15487
|
const shebangCommand = require_shebang_command();
|
|
15465
15488
|
function readShebang$1(command) {
|
|
15466
15489
|
const size = 150;
|
|
15467
15490
|
const buffer = Buffer.alloc(size);
|
|
15468
15491
|
let fd;
|
|
15469
15492
|
try {
|
|
15470
|
-
fd = fs$
|
|
15471
|
-
fs$
|
|
15472
|
-
fs$
|
|
15493
|
+
fd = fs$5.openSync(command, "r");
|
|
15494
|
+
fs$5.readSync(fd, buffer, 0, size, 0);
|
|
15495
|
+
fs$5.closeSync(fd);
|
|
15473
15496
|
} catch (e) {}
|
|
15474
15497
|
return shebangCommand(buffer.toString());
|
|
15475
15498
|
}
|
|
@@ -15517,7 +15540,7 @@ var require_parse = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
15517
15540
|
}
|
|
15518
15541
|
return parsed;
|
|
15519
15542
|
}
|
|
15520
|
-
function parse$
|
|
15543
|
+
function parse$5(command, args, options) {
|
|
15521
15544
|
if (args && !Array.isArray(args)) {
|
|
15522
15545
|
options = args;
|
|
15523
15546
|
args = null;
|
|
@@ -15536,7 +15559,7 @@ var require_parse = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/
|
|
|
15536
15559
|
};
|
|
15537
15560
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
15538
15561
|
}
|
|
15539
|
-
module.exports = parse$
|
|
15562
|
+
module.exports = parse$5;
|
|
15540
15563
|
} });
|
|
15541
15564
|
|
|
15542
15565
|
//#endregion
|
|
@@ -15583,16 +15606,16 @@ var require_enoent = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm
|
|
|
15583
15606
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
15584
15607
|
var require_cross_spawn = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
|
|
15585
15608
|
const cp = require("child_process");
|
|
15586
|
-
const parse = require_parse();
|
|
15609
|
+
const parse$4 = require_parse();
|
|
15587
15610
|
const enoent = require_enoent();
|
|
15588
15611
|
function spawn$1(command, args, options) {
|
|
15589
|
-
const parsed = parse(command, args, options);
|
|
15612
|
+
const parsed = parse$4(command, args, options);
|
|
15590
15613
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
15591
15614
|
enoent.hookChildProcess(spawned, parsed);
|
|
15592
15615
|
return spawned;
|
|
15593
15616
|
}
|
|
15594
15617
|
function spawnSync$1(command, args, options) {
|
|
15595
|
-
const parsed = parse(command, args, options);
|
|
15618
|
+
const parsed = parse$4(command, args, options);
|
|
15596
15619
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
15597
15620
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
15598
15621
|
return result;
|
|
@@ -15600,7 +15623,7 @@ var require_cross_spawn = require_picocolors$1.__commonJS({ "../../node_modules/
|
|
|
15600
15623
|
module.exports = spawn$1;
|
|
15601
15624
|
module.exports.spawn = spawn$1;
|
|
15602
15625
|
module.exports.sync = spawnSync$1;
|
|
15603
|
-
module.exports._parse = parse;
|
|
15626
|
+
module.exports._parse = parse$4;
|
|
15604
15627
|
module.exports._enoent = enoent;
|
|
15605
15628
|
} });
|
|
15606
15629
|
|
|
@@ -16911,16 +16934,16 @@ var c = class {
|
|
|
16911
16934
|
#n;
|
|
16912
16935
|
#r = !1;
|
|
16913
16936
|
#e = void 0;
|
|
16914
|
-
constructor(e, t$
|
|
16915
|
-
this.#t = e, this.#n = t$
|
|
16937
|
+
constructor(e, t$5) {
|
|
16938
|
+
this.#t = e, this.#n = t$5;
|
|
16916
16939
|
}
|
|
16917
16940
|
next() {
|
|
16918
16941
|
const e = () => this.#s();
|
|
16919
16942
|
return this.#e = this.#e ? this.#e.then(e, e) : e(), this.#e;
|
|
16920
16943
|
}
|
|
16921
16944
|
return(e) {
|
|
16922
|
-
const t$
|
|
16923
|
-
return this.#e ? this.#e.then(t$
|
|
16945
|
+
const t$5 = () => this.#i(e);
|
|
16946
|
+
return this.#e ? this.#e.then(t$5, t$5) : t$5();
|
|
16924
16947
|
}
|
|
16925
16948
|
async #s() {
|
|
16926
16949
|
if (this.#r) return {
|
|
@@ -16930,8 +16953,8 @@ var c = class {
|
|
|
16930
16953
|
let e;
|
|
16931
16954
|
try {
|
|
16932
16955
|
e = await this.#t.read();
|
|
16933
|
-
} catch (t$
|
|
16934
|
-
throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t$
|
|
16956
|
+
} catch (t$5) {
|
|
16957
|
+
throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t$5;
|
|
16935
16958
|
}
|
|
16936
16959
|
return e.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e;
|
|
16937
16960
|
}
|
|
@@ -16941,8 +16964,8 @@ var c = class {
|
|
|
16941
16964
|
value: e
|
|
16942
16965
|
};
|
|
16943
16966
|
if (this.#r = !0, !this.#n) {
|
|
16944
|
-
const t$
|
|
16945
|
-
return this.#t.releaseLock(), await t$
|
|
16967
|
+
const t$5 = this.#t.cancel(e);
|
|
16968
|
+
return this.#t.releaseLock(), await t$5, {
|
|
16946
16969
|
done: !0,
|
|
16947
16970
|
value: e
|
|
16948
16971
|
};
|
|
@@ -16977,8 +17000,8 @@ const u = Object.create(a, {
|
|
|
16977
17000
|
}
|
|
16978
17001
|
});
|
|
16979
17002
|
function h({ preventCancel: r = !1 } = {}) {
|
|
16980
|
-
const e = this.getReader(), t$
|
|
16981
|
-
return s[n] = t$
|
|
17003
|
+
const e = this.getReader(), t$5 = new c(e, r), s = Object.create(u);
|
|
17004
|
+
return s[n] = t$5, s;
|
|
16982
17005
|
}
|
|
16983
17006
|
|
|
16984
17007
|
//#endregion
|
|
@@ -18634,12 +18657,12 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
18634
18657
|
}
|
|
18635
18658
|
};
|
|
18636
18659
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
18637
|
-
for (const { path: path$
|
|
18638
|
-
const pathString = typeof path$
|
|
18639
|
-
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path$
|
|
18660
|
+
for (const { path: path$21, append } of stdioItems.filter(({ type: type$1 }) => FILE_TYPES.has(type$1))) {
|
|
18661
|
+
const pathString = typeof path$21 === "string" ? path$21 : path$21.toString();
|
|
18662
|
+
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path$21, serializedResult);
|
|
18640
18663
|
else {
|
|
18641
18664
|
outputFiles.add(pathString);
|
|
18642
|
-
(0, node_fs.writeFileSync)(path$
|
|
18665
|
+
(0, node_fs.writeFileSync)(path$21, serializedResult);
|
|
18643
18666
|
}
|
|
18644
18667
|
}
|
|
18645
18668
|
};
|
|
@@ -21193,15 +21216,9 @@ const getChannel = async (platform$2) => {
|
|
|
21193
21216
|
};
|
|
21194
21217
|
|
|
21195
21218
|
//#endregion
|
|
21196
|
-
//#region src/
|
|
21197
|
-
var import_picocolors = require_picocolors$1.__toESM(require_picocolors$1.require_picocolors());
|
|
21198
|
-
|
|
21199
|
-
const DEFAULT_CHANNEL = "production";
|
|
21200
|
-
const program = new __commander_js_extra_typings.Command();
|
|
21201
|
-
program.name("hot-updater").description((0, __hot_updater_plugin_core.banner)(version)).version(version);
|
|
21202
|
-
program.command("init").description("Initialize Hot Updater").action(init);
|
|
21203
|
-
const fingerprintCommand = program.command("fingerprint").description("Generate fingerprint");
|
|
21204
|
-
fingerprintCommand.action(async () => {
|
|
21219
|
+
//#region src/commands/fingerprint.ts
|
|
21220
|
+
var import_picocolors$2 = require_picocolors$1.__toESM(require_picocolors$1.require_picocolors());
|
|
21221
|
+
const handleFingerprint = async () => {
|
|
21205
21222
|
const config = await (0, __hot_updater_plugin_core.loadConfig)(null);
|
|
21206
21223
|
if (config.updateStrategy === "appVersion") {
|
|
21207
21224
|
__clack_prompts.log.error("The updateStrategy in hot-updater.config.ts is set to 'appVersion'. This command only works with 'fingerprint' strategy.");
|
|
@@ -21245,8 +21262,8 @@ fingerprintCommand.action(async () => {
|
|
|
21245
21262
|
process.exit(1);
|
|
21246
21263
|
}
|
|
21247
21264
|
__clack_prompts.log.success("Fingerprint matched");
|
|
21248
|
-
}
|
|
21249
|
-
|
|
21265
|
+
};
|
|
21266
|
+
const handleCreateFingerprint = async () => {
|
|
21250
21267
|
const FINGERPRINT_FILE_PATH = path.default.join((0, __hot_updater_plugin_core.getCwd)(), "fingerprint.json");
|
|
21251
21268
|
const createFingerprintData = async (config) => {
|
|
21252
21269
|
const [ios, android] = await Promise.all([(0, __rnef_tools.nativeFingerprint)((0, __hot_updater_plugin_core.getCwd)(), {
|
|
@@ -21285,26 +21302,742 @@ fingerprintCommand.command("create").description("Create fingerprint").action(as
|
|
|
21285
21302
|
return "Created fingerprint.json";
|
|
21286
21303
|
}
|
|
21287
21304
|
}]);
|
|
21288
|
-
if (diffChanged) __clack_prompts.log.success(import_picocolors.default.bold(`${import_picocolors.default.blue("fingerprint.json")} has changed, you need to rebuild the native app.`));
|
|
21289
|
-
});
|
|
21290
|
-
|
|
21291
|
-
|
|
21305
|
+
if (diffChanged) __clack_prompts.log.success(import_picocolors$2.default.bold(`${import_picocolors$2.default.blue("fingerprint.json")} has changed, you need to rebuild the native app.`));
|
|
21306
|
+
else __clack_prompts.log.success(import_picocolors$2.default.bold(`${import_picocolors$2.default.blue("fingerprint.json")} is up to date.`));
|
|
21307
|
+
};
|
|
21308
|
+
|
|
21309
|
+
//#endregion
|
|
21310
|
+
//#region src/commands/channel.ts
|
|
21311
|
+
var import_picocolors$1 = require_picocolors$1.__toESM(require_picocolors$1.require_picocolors());
|
|
21312
|
+
const handleChannel = async () => {
|
|
21292
21313
|
const androidChannel = await getChannel("android");
|
|
21293
21314
|
const iosChannel = await getChannel("ios");
|
|
21294
|
-
__clack_prompts.log.info(`Current Android channel: ${import_picocolors.default.green(androidChannel.value)}`);
|
|
21295
|
-
__clack_prompts.log.info(` from: ${import_picocolors.default.blue(androidChannel.path)}`);
|
|
21296
|
-
__clack_prompts.log.info(`Current iOS channel: ${import_picocolors.default.green(iosChannel.value)}`);
|
|
21297
|
-
__clack_prompts.log.info(` from: ${import_picocolors.default.blue(iosChannel.path)}`);
|
|
21298
|
-
}
|
|
21299
|
-
|
|
21315
|
+
__clack_prompts.log.info(`Current Android channel: ${import_picocolors$1.default.green(androidChannel.value)}`);
|
|
21316
|
+
__clack_prompts.log.info(` from: ${import_picocolors$1.default.blue(androidChannel.path)}`);
|
|
21317
|
+
__clack_prompts.log.info(`Current iOS channel: ${import_picocolors$1.default.green(iosChannel.value)}`);
|
|
21318
|
+
__clack_prompts.log.info(` from: ${import_picocolors$1.default.blue(iosChannel.path)}`);
|
|
21319
|
+
};
|
|
21320
|
+
const handleSetChannel = async (channel) => {
|
|
21300
21321
|
const { path: androidPath } = await setChannel("android", channel);
|
|
21301
|
-
__clack_prompts.log.success(`Set Android channel to: ${import_picocolors.default.green(channel)}`);
|
|
21302
|
-
__clack_prompts.log.info(` from: ${import_picocolors.default.blue(androidPath)}`);
|
|
21322
|
+
__clack_prompts.log.success(`Set Android channel to: ${import_picocolors$1.default.green(channel)}`);
|
|
21323
|
+
__clack_prompts.log.info(` from: ${import_picocolors$1.default.blue(androidPath)}`);
|
|
21303
21324
|
const { path: iosPath } = await setChannel("ios", channel);
|
|
21304
|
-
__clack_prompts.log.success(`Set iOS channel to: ${import_picocolors.default.green(channel)}`);
|
|
21305
|
-
__clack_prompts.log.info(` from: ${import_picocolors.default.blue(iosPath)}`);
|
|
21325
|
+
__clack_prompts.log.success(`Set iOS channel to: ${import_picocolors$1.default.green(channel)}`);
|
|
21326
|
+
__clack_prompts.log.info(` from: ${import_picocolors$1.default.blue(iosPath)}`);
|
|
21306
21327
|
__clack_prompts.log.success("You need to rebuild the native app if the channel has changed.");
|
|
21307
|
-
|
|
21328
|
+
const config = await (0, __hot_updater_plugin_core.loadConfig)(null);
|
|
21329
|
+
if (config.updateStrategy === "fingerprint") await handleCreateFingerprint();
|
|
21330
|
+
};
|
|
21331
|
+
|
|
21332
|
+
//#endregion
|
|
21333
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
21334
|
+
var require_inc = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js"(exports, module) {
|
|
21335
|
+
const SemVer$10 = require_semver$1();
|
|
21336
|
+
const inc$1 = (version$1, release, options, identifier, identifierBase) => {
|
|
21337
|
+
if (typeof options === "string") {
|
|
21338
|
+
identifierBase = identifier;
|
|
21339
|
+
identifier = options;
|
|
21340
|
+
options = void 0;
|
|
21341
|
+
}
|
|
21342
|
+
try {
|
|
21343
|
+
return new SemVer$10(version$1 instanceof SemVer$10 ? version$1.version : version$1, options).inc(release, identifier, identifierBase).version;
|
|
21344
|
+
} catch (er) {
|
|
21345
|
+
return null;
|
|
21346
|
+
}
|
|
21347
|
+
};
|
|
21348
|
+
module.exports = inc$1;
|
|
21349
|
+
} });
|
|
21350
|
+
|
|
21351
|
+
//#endregion
|
|
21352
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
21353
|
+
var require_diff = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js"(exports, module) {
|
|
21354
|
+
const parse$3 = require_parse$2();
|
|
21355
|
+
const diff$1 = (version1, version2) => {
|
|
21356
|
+
const v1 = parse$3(version1, null, true);
|
|
21357
|
+
const v2 = parse$3(version2, null, true);
|
|
21358
|
+
const comparison = v1.compare(v2);
|
|
21359
|
+
if (comparison === 0) return null;
|
|
21360
|
+
const v1Higher = comparison > 0;
|
|
21361
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
21362
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
21363
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
21364
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
21365
|
+
if (lowHasPre && !highHasPre) {
|
|
21366
|
+
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
21367
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
21368
|
+
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
21369
|
+
return "patch";
|
|
21370
|
+
}
|
|
21371
|
+
}
|
|
21372
|
+
const prefix = highHasPre ? "pre" : "";
|
|
21373
|
+
if (v1.major !== v2.major) return prefix + "major";
|
|
21374
|
+
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
21375
|
+
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
21376
|
+
return "prerelease";
|
|
21377
|
+
};
|
|
21378
|
+
module.exports = diff$1;
|
|
21379
|
+
} });
|
|
21380
|
+
|
|
21381
|
+
//#endregion
|
|
21382
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
21383
|
+
var require_major = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js"(exports, module) {
|
|
21384
|
+
const SemVer$9 = require_semver$1();
|
|
21385
|
+
const major$1 = (a$1, loose) => new SemVer$9(a$1, loose).major;
|
|
21386
|
+
module.exports = major$1;
|
|
21387
|
+
} });
|
|
21388
|
+
|
|
21389
|
+
//#endregion
|
|
21390
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
21391
|
+
var require_minor = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js"(exports, module) {
|
|
21392
|
+
const SemVer$8 = require_semver$1();
|
|
21393
|
+
const minor$1 = (a$1, loose) => new SemVer$8(a$1, loose).minor;
|
|
21394
|
+
module.exports = minor$1;
|
|
21395
|
+
} });
|
|
21396
|
+
|
|
21397
|
+
//#endregion
|
|
21398
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
21399
|
+
var require_patch = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js"(exports, module) {
|
|
21400
|
+
const SemVer$7 = require_semver$1();
|
|
21401
|
+
const patch$1 = (a$1, loose) => new SemVer$7(a$1, loose).patch;
|
|
21402
|
+
module.exports = patch$1;
|
|
21403
|
+
} });
|
|
21404
|
+
|
|
21405
|
+
//#endregion
|
|
21406
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
21407
|
+
var require_prerelease = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js"(exports, module) {
|
|
21408
|
+
const parse$2 = require_parse$2();
|
|
21409
|
+
const prerelease$1 = (version$1, options) => {
|
|
21410
|
+
const parsed = parse$2(version$1, options);
|
|
21411
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
21412
|
+
};
|
|
21413
|
+
module.exports = prerelease$1;
|
|
21414
|
+
} });
|
|
21415
|
+
|
|
21416
|
+
//#endregion
|
|
21417
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
21418
|
+
var require_rcompare = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js"(exports, module) {
|
|
21419
|
+
const compare$4 = require_compare();
|
|
21420
|
+
const rcompare$1 = (a$1, b, loose) => compare$4(b, a$1, loose);
|
|
21421
|
+
module.exports = rcompare$1;
|
|
21422
|
+
} });
|
|
21423
|
+
|
|
21424
|
+
//#endregion
|
|
21425
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
21426
|
+
var require_compare_loose = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js"(exports, module) {
|
|
21427
|
+
const compare$3 = require_compare();
|
|
21428
|
+
const compareLoose$1 = (a$1, b) => compare$3(a$1, b, true);
|
|
21429
|
+
module.exports = compareLoose$1;
|
|
21430
|
+
} });
|
|
21431
|
+
|
|
21432
|
+
//#endregion
|
|
21433
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
21434
|
+
var require_compare_build = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js"(exports, module) {
|
|
21435
|
+
const SemVer$6 = require_semver$1();
|
|
21436
|
+
const compareBuild$3 = (a$1, b, loose) => {
|
|
21437
|
+
const versionA = new SemVer$6(a$1, loose);
|
|
21438
|
+
const versionB = new SemVer$6(b, loose);
|
|
21439
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
21440
|
+
};
|
|
21441
|
+
module.exports = compareBuild$3;
|
|
21442
|
+
} });
|
|
21443
|
+
|
|
21444
|
+
//#endregion
|
|
21445
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
21446
|
+
var require_sort = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js"(exports, module) {
|
|
21447
|
+
const compareBuild$2 = require_compare_build();
|
|
21448
|
+
const sort$1 = (list, loose) => list.sort((a$1, b) => compareBuild$2(a$1, b, loose));
|
|
21449
|
+
module.exports = sort$1;
|
|
21450
|
+
} });
|
|
21451
|
+
|
|
21452
|
+
//#endregion
|
|
21453
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
21454
|
+
var require_rsort = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js"(exports, module) {
|
|
21455
|
+
const compareBuild$1 = require_compare_build();
|
|
21456
|
+
const rsort$1 = (list, loose) => list.sort((a$1, b) => compareBuild$1(b, a$1, loose));
|
|
21457
|
+
module.exports = rsort$1;
|
|
21458
|
+
} });
|
|
21459
|
+
|
|
21460
|
+
//#endregion
|
|
21461
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
21462
|
+
var require_coerce = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js"(exports, module) {
|
|
21463
|
+
const SemVer$5 = require_semver$1();
|
|
21464
|
+
const parse$1 = require_parse$2();
|
|
21465
|
+
const { safeRe: re, t } = require_re();
|
|
21466
|
+
const coerce$1 = (version$1, options) => {
|
|
21467
|
+
if (version$1 instanceof SemVer$5) return version$1;
|
|
21468
|
+
if (typeof version$1 === "number") version$1 = String(version$1);
|
|
21469
|
+
if (typeof version$1 !== "string") return null;
|
|
21470
|
+
options = options || {};
|
|
21471
|
+
let match = null;
|
|
21472
|
+
if (!options.rtl) match = version$1.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
21473
|
+
else {
|
|
21474
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
21475
|
+
let next;
|
|
21476
|
+
while ((next = coerceRtlRegex.exec(version$1)) && (!match || match.index + match[0].length !== version$1.length)) {
|
|
21477
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
21478
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
21479
|
+
}
|
|
21480
|
+
coerceRtlRegex.lastIndex = -1;
|
|
21481
|
+
}
|
|
21482
|
+
if (match === null) return null;
|
|
21483
|
+
const major$2 = match[2];
|
|
21484
|
+
const minor$2 = match[3] || "0";
|
|
21485
|
+
const patch$2 = match[4] || "0";
|
|
21486
|
+
const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
21487
|
+
const build$1 = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
21488
|
+
return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build$1}`, options);
|
|
21489
|
+
};
|
|
21490
|
+
module.exports = coerce$1;
|
|
21491
|
+
} });
|
|
21492
|
+
|
|
21493
|
+
//#endregion
|
|
21494
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
21495
|
+
var require_satisfies = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js"(exports, module) {
|
|
21496
|
+
const Range$8 = require_range();
|
|
21497
|
+
const satisfies$4 = (version$1, range, options) => {
|
|
21498
|
+
try {
|
|
21499
|
+
range = new Range$8(range, options);
|
|
21500
|
+
} catch (er) {
|
|
21501
|
+
return false;
|
|
21502
|
+
}
|
|
21503
|
+
return range.test(version$1);
|
|
21504
|
+
};
|
|
21505
|
+
module.exports = satisfies$4;
|
|
21506
|
+
} });
|
|
21507
|
+
|
|
21508
|
+
//#endregion
|
|
21509
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
21510
|
+
var require_to_comparators = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js"(exports, module) {
|
|
21511
|
+
const Range$7 = require_range();
|
|
21512
|
+
const toComparators$1 = (range, options) => new Range$7(range, options).set.map((comp) => comp.map((c$1) => c$1.value).join(" ").trim().split(" "));
|
|
21513
|
+
module.exports = toComparators$1;
|
|
21514
|
+
} });
|
|
21515
|
+
|
|
21516
|
+
//#endregion
|
|
21517
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
21518
|
+
var require_max_satisfying = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
|
|
21519
|
+
const SemVer$4 = require_semver$1();
|
|
21520
|
+
const Range$6 = require_range();
|
|
21521
|
+
const maxSatisfying$1 = (versions, range, options) => {
|
|
21522
|
+
let max = null;
|
|
21523
|
+
let maxSV = null;
|
|
21524
|
+
let rangeObj = null;
|
|
21525
|
+
try {
|
|
21526
|
+
rangeObj = new Range$6(range, options);
|
|
21527
|
+
} catch (er) {
|
|
21528
|
+
return null;
|
|
21529
|
+
}
|
|
21530
|
+
versions.forEach((v) => {
|
|
21531
|
+
if (rangeObj.test(v)) {
|
|
21532
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
21533
|
+
max = v;
|
|
21534
|
+
maxSV = new SemVer$4(max, options);
|
|
21535
|
+
}
|
|
21536
|
+
}
|
|
21537
|
+
});
|
|
21538
|
+
return max;
|
|
21539
|
+
};
|
|
21540
|
+
module.exports = maxSatisfying$1;
|
|
21541
|
+
} });
|
|
21542
|
+
|
|
21543
|
+
//#endregion
|
|
21544
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
21545
|
+
var require_min_satisfying = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
|
|
21546
|
+
const SemVer$3 = require_semver$1();
|
|
21547
|
+
const Range$5 = require_range();
|
|
21548
|
+
const minSatisfying$1 = (versions, range, options) => {
|
|
21549
|
+
let min = null;
|
|
21550
|
+
let minSV = null;
|
|
21551
|
+
let rangeObj = null;
|
|
21552
|
+
try {
|
|
21553
|
+
rangeObj = new Range$5(range, options);
|
|
21554
|
+
} catch (er) {
|
|
21555
|
+
return null;
|
|
21556
|
+
}
|
|
21557
|
+
versions.forEach((v) => {
|
|
21558
|
+
if (rangeObj.test(v)) {
|
|
21559
|
+
if (!min || minSV.compare(v) === 1) {
|
|
21560
|
+
min = v;
|
|
21561
|
+
minSV = new SemVer$3(min, options);
|
|
21562
|
+
}
|
|
21563
|
+
}
|
|
21564
|
+
});
|
|
21565
|
+
return min;
|
|
21566
|
+
};
|
|
21567
|
+
module.exports = minSatisfying$1;
|
|
21568
|
+
} });
|
|
21569
|
+
|
|
21570
|
+
//#endregion
|
|
21571
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
21572
|
+
var require_min_version = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js"(exports, module) {
|
|
21573
|
+
const SemVer$2 = require_semver$1();
|
|
21574
|
+
const Range$4 = require_range();
|
|
21575
|
+
const gt$2 = require_gt();
|
|
21576
|
+
const minVersion$1 = (range, loose) => {
|
|
21577
|
+
range = new Range$4(range, loose);
|
|
21578
|
+
let minver = new SemVer$2("0.0.0");
|
|
21579
|
+
if (range.test(minver)) return minver;
|
|
21580
|
+
minver = new SemVer$2("0.0.0-0");
|
|
21581
|
+
if (range.test(minver)) return minver;
|
|
21582
|
+
minver = null;
|
|
21583
|
+
for (let i$2 = 0; i$2 < range.set.length; ++i$2) {
|
|
21584
|
+
const comparators = range.set[i$2];
|
|
21585
|
+
let setMin = null;
|
|
21586
|
+
comparators.forEach((comparator) => {
|
|
21587
|
+
const compver = new SemVer$2(comparator.semver.version);
|
|
21588
|
+
switch (comparator.operator) {
|
|
21589
|
+
case ">":
|
|
21590
|
+
if (compver.prerelease.length === 0) compver.patch++;
|
|
21591
|
+
else compver.prerelease.push(0);
|
|
21592
|
+
compver.raw = compver.format();
|
|
21593
|
+
case "":
|
|
21594
|
+
case ">=":
|
|
21595
|
+
if (!setMin || gt$2(compver, setMin)) setMin = compver;
|
|
21596
|
+
break;
|
|
21597
|
+
case "<":
|
|
21598
|
+
case "<=": break;
|
|
21599
|
+
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
21600
|
+
}
|
|
21601
|
+
});
|
|
21602
|
+
if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin;
|
|
21603
|
+
}
|
|
21604
|
+
if (minver && range.test(minver)) return minver;
|
|
21605
|
+
return null;
|
|
21606
|
+
};
|
|
21607
|
+
module.exports = minVersion$1;
|
|
21608
|
+
} });
|
|
21609
|
+
|
|
21610
|
+
//#endregion
|
|
21611
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
21612
|
+
var require_outside = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js"(exports, module) {
|
|
21613
|
+
const SemVer$1 = require_semver$1();
|
|
21614
|
+
const Comparator$2 = require_comparator();
|
|
21615
|
+
const { ANY: ANY$1 } = Comparator$2;
|
|
21616
|
+
const Range$3 = require_range();
|
|
21617
|
+
const satisfies$3 = require_satisfies();
|
|
21618
|
+
const gt$1 = require_gt();
|
|
21619
|
+
const lt$1 = require_lt();
|
|
21620
|
+
const lte$1 = require_lte();
|
|
21621
|
+
const gte$1 = require_gte();
|
|
21622
|
+
const outside$3 = (version$1, range, hilo, options) => {
|
|
21623
|
+
version$1 = new SemVer$1(version$1, options);
|
|
21624
|
+
range = new Range$3(range, options);
|
|
21625
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
21626
|
+
switch (hilo) {
|
|
21627
|
+
case ">":
|
|
21628
|
+
gtfn = gt$1;
|
|
21629
|
+
ltefn = lte$1;
|
|
21630
|
+
ltfn = lt$1;
|
|
21631
|
+
comp = ">";
|
|
21632
|
+
ecomp = ">=";
|
|
21633
|
+
break;
|
|
21634
|
+
case "<":
|
|
21635
|
+
gtfn = lt$1;
|
|
21636
|
+
ltefn = gte$1;
|
|
21637
|
+
ltfn = gt$1;
|
|
21638
|
+
comp = "<";
|
|
21639
|
+
ecomp = "<=";
|
|
21640
|
+
break;
|
|
21641
|
+
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
21642
|
+
}
|
|
21643
|
+
if (satisfies$3(version$1, range, options)) return false;
|
|
21644
|
+
for (let i$2 = 0; i$2 < range.set.length; ++i$2) {
|
|
21645
|
+
const comparators = range.set[i$2];
|
|
21646
|
+
let high = null;
|
|
21647
|
+
let low = null;
|
|
21648
|
+
comparators.forEach((comparator) => {
|
|
21649
|
+
if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0");
|
|
21650
|
+
high = high || comparator;
|
|
21651
|
+
low = low || comparator;
|
|
21652
|
+
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
21653
|
+
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
21654
|
+
});
|
|
21655
|
+
if (high.operator === comp || high.operator === ecomp) return false;
|
|
21656
|
+
if ((!low.operator || low.operator === comp) && ltefn(version$1, low.semver)) return false;
|
|
21657
|
+
else if (low.operator === ecomp && ltfn(version$1, low.semver)) return false;
|
|
21658
|
+
}
|
|
21659
|
+
return true;
|
|
21660
|
+
};
|
|
21661
|
+
module.exports = outside$3;
|
|
21662
|
+
} });
|
|
21663
|
+
|
|
21664
|
+
//#endregion
|
|
21665
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
21666
|
+
var require_gtr = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js"(exports, module) {
|
|
21667
|
+
const outside$2 = require_outside();
|
|
21668
|
+
const gtr$1 = (version$1, range, options) => outside$2(version$1, range, ">", options);
|
|
21669
|
+
module.exports = gtr$1;
|
|
21670
|
+
} });
|
|
21671
|
+
|
|
21672
|
+
//#endregion
|
|
21673
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
21674
|
+
var require_ltr = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js"(exports, module) {
|
|
21675
|
+
const outside$1 = require_outside();
|
|
21676
|
+
const ltr$1 = (version$1, range, options) => outside$1(version$1, range, "<", options);
|
|
21677
|
+
module.exports = ltr$1;
|
|
21678
|
+
} });
|
|
21679
|
+
|
|
21680
|
+
//#endregion
|
|
21681
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
21682
|
+
var require_intersects = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js"(exports, module) {
|
|
21683
|
+
const Range$2 = require_range();
|
|
21684
|
+
const intersects$1 = (r1, r2, options) => {
|
|
21685
|
+
r1 = new Range$2(r1, options);
|
|
21686
|
+
r2 = new Range$2(r2, options);
|
|
21687
|
+
return r1.intersects(r2, options);
|
|
21688
|
+
};
|
|
21689
|
+
module.exports = intersects$1;
|
|
21690
|
+
} });
|
|
21691
|
+
|
|
21692
|
+
//#endregion
|
|
21693
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
21694
|
+
var require_simplify = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js"(exports, module) {
|
|
21695
|
+
const satisfies$2 = require_satisfies();
|
|
21696
|
+
const compare$2 = require_compare();
|
|
21697
|
+
module.exports = (versions, range, options) => {
|
|
21698
|
+
const set = [];
|
|
21699
|
+
let first = null;
|
|
21700
|
+
let prev = null;
|
|
21701
|
+
const v = versions.sort((a$1, b) => compare$2(a$1, b, options));
|
|
21702
|
+
for (const version$1 of v) {
|
|
21703
|
+
const included = satisfies$2(version$1, range, options);
|
|
21704
|
+
if (included) {
|
|
21705
|
+
prev = version$1;
|
|
21706
|
+
if (!first) first = version$1;
|
|
21707
|
+
} else {
|
|
21708
|
+
if (prev) set.push([first, prev]);
|
|
21709
|
+
prev = null;
|
|
21710
|
+
first = null;
|
|
21711
|
+
}
|
|
21712
|
+
}
|
|
21713
|
+
if (first) set.push([first, null]);
|
|
21714
|
+
const ranges = [];
|
|
21715
|
+
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
21716
|
+
else if (!max && min === v[0]) ranges.push("*");
|
|
21717
|
+
else if (!max) ranges.push(`>=${min}`);
|
|
21718
|
+
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
21719
|
+
else ranges.push(`${min} - ${max}`);
|
|
21720
|
+
const simplified = ranges.join(" || ");
|
|
21721
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
21722
|
+
return simplified.length < original.length ? simplified : range;
|
|
21723
|
+
};
|
|
21724
|
+
} });
|
|
21725
|
+
|
|
21726
|
+
//#endregion
|
|
21727
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
21728
|
+
var require_subset = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js"(exports, module) {
|
|
21729
|
+
const Range$1 = require_range();
|
|
21730
|
+
const Comparator$1 = require_comparator();
|
|
21731
|
+
const { ANY } = Comparator$1;
|
|
21732
|
+
const satisfies$1 = require_satisfies();
|
|
21733
|
+
const compare$1 = require_compare();
|
|
21734
|
+
const subset$1 = (sub, dom$2, options = {}) => {
|
|
21735
|
+
if (sub === dom$2) return true;
|
|
21736
|
+
sub = new Range$1(sub, options);
|
|
21737
|
+
dom$2 = new Range$1(dom$2, options);
|
|
21738
|
+
let sawNonNull = false;
|
|
21739
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
21740
|
+
for (const simpleDom of dom$2.set) {
|
|
21741
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
21742
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
21743
|
+
if (isSub) continue OUTER;
|
|
21744
|
+
}
|
|
21745
|
+
if (sawNonNull) return false;
|
|
21746
|
+
}
|
|
21747
|
+
return true;
|
|
21748
|
+
};
|
|
21749
|
+
const minimumVersionWithPreRelease = [new Comparator$1(">=0.0.0-0")];
|
|
21750
|
+
const minimumVersion = [new Comparator$1(">=0.0.0")];
|
|
21751
|
+
const simpleSubset = (sub, dom$2, options) => {
|
|
21752
|
+
if (sub === dom$2) return true;
|
|
21753
|
+
if (sub.length === 1 && sub[0].semver === ANY) if (dom$2.length === 1 && dom$2[0].semver === ANY) return true;
|
|
21754
|
+
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
21755
|
+
else sub = minimumVersion;
|
|
21756
|
+
if (dom$2.length === 1 && dom$2[0].semver === ANY) if (options.includePrerelease) return true;
|
|
21757
|
+
else dom$2 = minimumVersion;
|
|
21758
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
21759
|
+
let gt$5, lt$4;
|
|
21760
|
+
for (const c$1 of sub) if (c$1.operator === ">" || c$1.operator === ">=") gt$5 = higherGT(gt$5, c$1, options);
|
|
21761
|
+
else if (c$1.operator === "<" || c$1.operator === "<=") lt$4 = lowerLT(lt$4, c$1, options);
|
|
21762
|
+
else eqSet.add(c$1.semver);
|
|
21763
|
+
if (eqSet.size > 1) return null;
|
|
21764
|
+
let gtltComp;
|
|
21765
|
+
if (gt$5 && lt$4) {
|
|
21766
|
+
gtltComp = compare$1(gt$5.semver, lt$4.semver, options);
|
|
21767
|
+
if (gtltComp > 0) return null;
|
|
21768
|
+
else if (gtltComp === 0 && (gt$5.operator !== ">=" || lt$4.operator !== "<=")) return null;
|
|
21769
|
+
}
|
|
21770
|
+
for (const eq$3 of eqSet) {
|
|
21771
|
+
if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null;
|
|
21772
|
+
if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null;
|
|
21773
|
+
for (const c$1 of dom$2) if (!satisfies$1(eq$3, String(c$1), options)) return false;
|
|
21774
|
+
return true;
|
|
21775
|
+
}
|
|
21776
|
+
let higher, lower;
|
|
21777
|
+
let hasDomLT, hasDomGT;
|
|
21778
|
+
let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false;
|
|
21779
|
+
let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false;
|
|
21780
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
21781
|
+
for (const c$1 of dom$2) {
|
|
21782
|
+
hasDomGT = hasDomGT || c$1.operator === ">" || c$1.operator === ">=";
|
|
21783
|
+
hasDomLT = hasDomLT || c$1.operator === "<" || c$1.operator === "<=";
|
|
21784
|
+
if (gt$5) {
|
|
21785
|
+
if (needDomGTPre) {
|
|
21786
|
+
if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomGTPre.major && c$1.semver.minor === needDomGTPre.minor && c$1.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
21787
|
+
}
|
|
21788
|
+
if (c$1.operator === ">" || c$1.operator === ">=") {
|
|
21789
|
+
higher = higherGT(gt$5, c$1, options);
|
|
21790
|
+
if (higher === c$1 && higher !== gt$5) return false;
|
|
21791
|
+
} else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c$1), options)) return false;
|
|
21792
|
+
}
|
|
21793
|
+
if (lt$4) {
|
|
21794
|
+
if (needDomLTPre) {
|
|
21795
|
+
if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomLTPre.major && c$1.semver.minor === needDomLTPre.minor && c$1.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
21796
|
+
}
|
|
21797
|
+
if (c$1.operator === "<" || c$1.operator === "<=") {
|
|
21798
|
+
lower = lowerLT(lt$4, c$1, options);
|
|
21799
|
+
if (lower === c$1 && lower !== lt$4) return false;
|
|
21800
|
+
} else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c$1), options)) return false;
|
|
21801
|
+
}
|
|
21802
|
+
if (!c$1.operator && (lt$4 || gt$5) && gtltComp !== 0) return false;
|
|
21803
|
+
}
|
|
21804
|
+
if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false;
|
|
21805
|
+
if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false;
|
|
21806
|
+
if (needDomGTPre || needDomLTPre) return false;
|
|
21807
|
+
return true;
|
|
21808
|
+
};
|
|
21809
|
+
const higherGT = (a$1, b, options) => {
|
|
21810
|
+
if (!a$1) return b;
|
|
21811
|
+
const comp = compare$1(a$1.semver, b.semver, options);
|
|
21812
|
+
return comp > 0 ? a$1 : comp < 0 ? b : b.operator === ">" && a$1.operator === ">=" ? b : a$1;
|
|
21813
|
+
};
|
|
21814
|
+
const lowerLT = (a$1, b, options) => {
|
|
21815
|
+
if (!a$1) return b;
|
|
21816
|
+
const comp = compare$1(a$1.semver, b.semver, options);
|
|
21817
|
+
return comp < 0 ? a$1 : comp > 0 ? b : b.operator === "<" && a$1.operator === "<=" ? b : a$1;
|
|
21818
|
+
};
|
|
21819
|
+
module.exports = subset$1;
|
|
21820
|
+
} });
|
|
21821
|
+
|
|
21822
|
+
//#endregion
|
|
21823
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
|
|
21824
|
+
var require_semver = require_picocolors$1.__commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js"(exports, module) {
|
|
21825
|
+
const internalRe = require_re();
|
|
21826
|
+
const constants = require_constants();
|
|
21827
|
+
const SemVer = require_semver$1();
|
|
21828
|
+
const identifiers = require_identifiers();
|
|
21829
|
+
const parse = require_parse$2();
|
|
21830
|
+
const valid = require_valid();
|
|
21831
|
+
const clean = require_clean();
|
|
21832
|
+
const inc = require_inc();
|
|
21833
|
+
const diff = require_diff();
|
|
21834
|
+
const major = require_major();
|
|
21835
|
+
const minor = require_minor();
|
|
21836
|
+
const patch = require_patch();
|
|
21837
|
+
const prerelease = require_prerelease();
|
|
21838
|
+
const compare = require_compare();
|
|
21839
|
+
const rcompare = require_rcompare();
|
|
21840
|
+
const compareLoose = require_compare_loose();
|
|
21841
|
+
const compareBuild = require_compare_build();
|
|
21842
|
+
const sort = require_sort();
|
|
21843
|
+
const rsort = require_rsort();
|
|
21844
|
+
const gt = require_gt();
|
|
21845
|
+
const lt = require_lt();
|
|
21846
|
+
const eq = require_eq();
|
|
21847
|
+
const neq = require_neq();
|
|
21848
|
+
const gte = require_gte();
|
|
21849
|
+
const lte = require_lte();
|
|
21850
|
+
const cmp = require_cmp();
|
|
21851
|
+
const coerce = require_coerce();
|
|
21852
|
+
const Comparator = require_comparator();
|
|
21853
|
+
const Range = require_range();
|
|
21854
|
+
const satisfies = require_satisfies();
|
|
21855
|
+
const toComparators = require_to_comparators();
|
|
21856
|
+
const maxSatisfying = require_max_satisfying();
|
|
21857
|
+
const minSatisfying = require_min_satisfying();
|
|
21858
|
+
const minVersion = require_min_version();
|
|
21859
|
+
const validRange = require_valid$1();
|
|
21860
|
+
const outside = require_outside();
|
|
21861
|
+
const gtr = require_gtr();
|
|
21862
|
+
const ltr = require_ltr();
|
|
21863
|
+
const intersects = require_intersects();
|
|
21864
|
+
const simplifyRange = require_simplify();
|
|
21865
|
+
const subset = require_subset();
|
|
21866
|
+
module.exports = {
|
|
21867
|
+
parse,
|
|
21868
|
+
valid,
|
|
21869
|
+
clean,
|
|
21870
|
+
inc,
|
|
21871
|
+
diff,
|
|
21872
|
+
major,
|
|
21873
|
+
minor,
|
|
21874
|
+
patch,
|
|
21875
|
+
prerelease,
|
|
21876
|
+
compare,
|
|
21877
|
+
rcompare,
|
|
21878
|
+
compareLoose,
|
|
21879
|
+
compareBuild,
|
|
21880
|
+
sort,
|
|
21881
|
+
rsort,
|
|
21882
|
+
gt,
|
|
21883
|
+
lt,
|
|
21884
|
+
eq,
|
|
21885
|
+
neq,
|
|
21886
|
+
gte,
|
|
21887
|
+
lte,
|
|
21888
|
+
cmp,
|
|
21889
|
+
coerce,
|
|
21890
|
+
Comparator,
|
|
21891
|
+
Range,
|
|
21892
|
+
satisfies,
|
|
21893
|
+
toComparators,
|
|
21894
|
+
maxSatisfying,
|
|
21895
|
+
minSatisfying,
|
|
21896
|
+
minVersion,
|
|
21897
|
+
validRange,
|
|
21898
|
+
outside,
|
|
21899
|
+
gtr,
|
|
21900
|
+
ltr,
|
|
21901
|
+
intersects,
|
|
21902
|
+
simplifyRange,
|
|
21903
|
+
subset,
|
|
21904
|
+
SemVer,
|
|
21905
|
+
re: internalRe.re,
|
|
21906
|
+
src: internalRe.src,
|
|
21907
|
+
tokens: internalRe.t,
|
|
21908
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
21909
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
21910
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
21911
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
21912
|
+
};
|
|
21913
|
+
} });
|
|
21914
|
+
|
|
21915
|
+
//#endregion
|
|
21916
|
+
//#region src/commands/doctor.ts
|
|
21917
|
+
var import_semver = require_picocolors$1.__toESM(require_semver());
|
|
21918
|
+
/**
|
|
21919
|
+
* Checks if two versions (or version and range) are compatible.
|
|
21920
|
+
* @param versionA - First version or range string.
|
|
21921
|
+
* @param versionB - Second version or range string.
|
|
21922
|
+
* @returns True if compatible, false otherwise.
|
|
21923
|
+
*/
|
|
21924
|
+
function areVersionsCompatible(versionA, versionB) {
|
|
21925
|
+
if (versionA === versionB) return true;
|
|
21926
|
+
const options = { includePrerelease: true };
|
|
21927
|
+
if (import_semver.valid(versionA) && import_semver.validRange(versionB) && import_semver.satisfies(versionA, versionB, options)) return true;
|
|
21928
|
+
if (import_semver.valid(versionB) && import_semver.validRange(versionA) && import_semver.satisfies(versionB, versionA, options)) return true;
|
|
21929
|
+
return false;
|
|
21930
|
+
}
|
|
21931
|
+
/**
|
|
21932
|
+
* Performs health check on Hot Updater installation
|
|
21933
|
+
* @param cwd - Current working directory (optional)
|
|
21934
|
+
* @returns true if everything is healthy, or DoctorResult with details if there are issues
|
|
21935
|
+
*/
|
|
21936
|
+
async function doctor(cwd = (0, __hot_updater_plugin_core.getCwd)()) {
|
|
21937
|
+
try {
|
|
21938
|
+
const packageResult = await readPackageUp({ cwd });
|
|
21939
|
+
if (!packageResult) return {
|
|
21940
|
+
success: false,
|
|
21941
|
+
error: "Could not find package.json"
|
|
21942
|
+
};
|
|
21943
|
+
const packageJson = packageResult.packageJson;
|
|
21944
|
+
const packageJsonPath = packageResult.path;
|
|
21945
|
+
const allDependencies = merge(packageJson.dependencies ?? {}, packageJson.devDependencies ?? {});
|
|
21946
|
+
const hotUpdaterVersion = allDependencies["hot-updater"];
|
|
21947
|
+
if (!hotUpdaterVersion) return {
|
|
21948
|
+
success: false,
|
|
21949
|
+
error: "hot-updater CLI not found. Please install it first."
|
|
21950
|
+
};
|
|
21951
|
+
const hotUpdaterPackages = Object.keys(allDependencies).filter((key) => key.startsWith("@hot-updater/"));
|
|
21952
|
+
const versionMismatches = [];
|
|
21953
|
+
for (const packageName of hotUpdaterPackages) {
|
|
21954
|
+
const currentVersion = allDependencies[packageName];
|
|
21955
|
+
if (hotUpdaterVersion && currentVersion && !areVersionsCompatible(currentVersion, hotUpdaterVersion)) versionMismatches.push({
|
|
21956
|
+
packageName,
|
|
21957
|
+
currentVersion,
|
|
21958
|
+
expectedVersion: hotUpdaterVersion
|
|
21959
|
+
});
|
|
21960
|
+
}
|
|
21961
|
+
const details = {
|
|
21962
|
+
hotUpdaterVersion,
|
|
21963
|
+
packageJsonPath,
|
|
21964
|
+
installedHotUpdaterPackages: hotUpdaterPackages
|
|
21965
|
+
};
|
|
21966
|
+
if (versionMismatches.length > 0) details.versionMismatches = versionMismatches;
|
|
21967
|
+
const hasIssues = versionMismatches.length > 0;
|
|
21968
|
+
if (hasIssues) return {
|
|
21969
|
+
success: false,
|
|
21970
|
+
details
|
|
21971
|
+
};
|
|
21972
|
+
return true;
|
|
21973
|
+
} catch (error) {
|
|
21974
|
+
return {
|
|
21975
|
+
success: false,
|
|
21976
|
+
error: error.message
|
|
21977
|
+
};
|
|
21978
|
+
}
|
|
21979
|
+
}
|
|
21980
|
+
/**
|
|
21981
|
+
* Fix version mismatches in package.json
|
|
21982
|
+
* This is a separate utility function for CLI usage
|
|
21983
|
+
*/
|
|
21984
|
+
async function fixVersionMismatches(packageJsonPath, versionMismatches) {
|
|
21985
|
+
const packageResult = await fs.default.promises.readFile(packageJsonPath, "utf-8");
|
|
21986
|
+
if (!packageResult) throw new Error("Could not read package.json");
|
|
21987
|
+
const packageJson = JSON.parse(packageResult);
|
|
21988
|
+
for (const mismatch of versionMismatches) if (packageJson.dependencies?.[mismatch.packageName]) packageJson.dependencies[mismatch.packageName] = mismatch.expectedVersion;
|
|
21989
|
+
else if (packageJson.devDependencies?.[mismatch.packageName]) packageJson.devDependencies[mismatch.packageName] = mismatch.expectedVersion;
|
|
21990
|
+
const content = `${JSON.stringify(packageJson, null, 2)}\n`;
|
|
21991
|
+
await fs.default.promises.writeFile(packageJsonPath, content);
|
|
21992
|
+
}
|
|
21993
|
+
const handleDoctor = async ({ fix }) => {
|
|
21994
|
+
__clack_prompts.intro("Checking the health of Hot Updater.");
|
|
21995
|
+
const result = await doctor();
|
|
21996
|
+
if (result === true) {
|
|
21997
|
+
__clack_prompts.log.success("✅ All Hot Updater checks passed!");
|
|
21998
|
+
__clack_prompts.outro("Hot Updater is healthy.");
|
|
21999
|
+
return;
|
|
22000
|
+
}
|
|
22001
|
+
if (result.error) {
|
|
22002
|
+
__clack_prompts.log.error(result.error);
|
|
22003
|
+
__clack_prompts.outro("Doctor check failed.");
|
|
22004
|
+
return;
|
|
22005
|
+
}
|
|
22006
|
+
const { details } = result;
|
|
22007
|
+
if (details?.hotUpdaterVersion) __clack_prompts.log.info(`hot-updater CLI version: ${details.hotUpdaterVersion}`);
|
|
22008
|
+
if (details?.versionMismatches && details.versionMismatches.length > 0) {
|
|
22009
|
+
__clack_prompts.log.warn("Version mismatches found:");
|
|
22010
|
+
for (const mismatch of details.versionMismatches) __clack_prompts.log.error(`❌ ${mismatch.packageName}: ${mismatch.currentVersion} (expected ${mismatch.expectedVersion})`);
|
|
22011
|
+
if (fix && details.packageJsonPath) try {
|
|
22012
|
+
await fixVersionMismatches(details.packageJsonPath, details.versionMismatches);
|
|
22013
|
+
__clack_prompts.log.success("✅ Fixed version mismatches in package.json");
|
|
22014
|
+
__clack_prompts.log.info("Run your package manager to install the updated versions.");
|
|
22015
|
+
} catch (error) {
|
|
22016
|
+
__clack_prompts.log.error(`Failed to fix versions: ${error.message}`);
|
|
22017
|
+
}
|
|
22018
|
+
else if (!fix) {
|
|
22019
|
+
__clack_prompts.log.info("Run with --fix to automatically update versions.");
|
|
22020
|
+
process.exit(1);
|
|
22021
|
+
}
|
|
22022
|
+
}
|
|
22023
|
+
__clack_prompts.outro("Doctor check complete.");
|
|
22024
|
+
};
|
|
22025
|
+
|
|
22026
|
+
//#endregion
|
|
22027
|
+
//#region src/index.ts
|
|
22028
|
+
var import_picocolors = require_picocolors$1.__toESM(require_picocolors$1.require_picocolors());
|
|
22029
|
+
var import_valid = require_picocolors$1.__toESM(require_valid$1());
|
|
22030
|
+
const DEFAULT_CHANNEL = "production";
|
|
22031
|
+
const program = new __commander_js_extra_typings.Command();
|
|
22032
|
+
program.name("hot-updater").description((0, __hot_updater_plugin_core.banner)(version)).version(version);
|
|
22033
|
+
program.command("init").description("Initialize Hot Updater").action(init);
|
|
22034
|
+
program.command("doctor").description("Check the health of Hot Updater").option("-f, --fix", "fix the issues", false).action(handleDoctor);
|
|
22035
|
+
const fingerprintCommand = program.command("fingerprint").description("Generate fingerprint");
|
|
22036
|
+
fingerprintCommand.action(handleFingerprint);
|
|
22037
|
+
fingerprintCommand.command("create").description("Create fingerprint").action(handleCreateFingerprint);
|
|
22038
|
+
const channelCommand = program.command("channel").description("Manage channels");
|
|
22039
|
+
channelCommand.action(handleChannel);
|
|
22040
|
+
channelCommand.command("set").description("Set the channel for Android (BuildConfig) and iOS (Info.plist)").argument("<channel>", "the channel to set").action(handleSetChannel);
|
|
21308
22041
|
program.command("deploy").description("deploy a new version").addOption(new __commander_js_extra_typings.Option("-p, --platform <platform>", "specify the platform").choices(["ios", "android"])).addOption(new __commander_js_extra_typings.Option("-t, --target-app-version <targetAppVersion>", "specify the target app version (semver format e.g. 1.0.0, 1.x.x)").argParser((value) => {
|
|
21309
22042
|
if (!(0, import_valid.default)(value)) {
|
|
21310
22043
|
__clack_prompts.log.error("Invalid semver format (e.g. 1.0.0, 1.x.x)");
|
|
@@ -21322,9 +22055,8 @@ program.command("console").description("open the console").action(async () => {
|
|
|
21322
22055
|
});
|
|
21323
22056
|
});
|
|
21324
22057
|
program.command("app-version").description("get the current app version").action(async () => {
|
|
21325
|
-
const
|
|
21326
|
-
const
|
|
21327
|
-
const iosVersion = await getDefaultTargetAppVersion(path$20, "ios");
|
|
22058
|
+
const androidVersion = await getNativeAppVersion("android");
|
|
22059
|
+
const iosVersion = await getNativeAppVersion("ios");
|
|
21328
22060
|
__hot_updater_plugin_core.log.info(`Android version: ${androidVersion}`);
|
|
21329
22061
|
__hot_updater_plugin_core.log.info(`iOS version: ${iosVersion}`);
|
|
21330
22062
|
});
|