@ecmaos/kernel 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -98
- package/dist/.vite/manifest.json +14 -14
- package/dist/{browser-C0q0NWWv.js → browser-D_CtuxSB.js} +2 -2
- package/dist/{browser-C0q0NWWv.js.map → browser-D_CtuxSB.js.map} +1 -1
- package/dist/{empty-BMkCc_7L.js → empty--zdtkf0T.js} +2099 -156
- package/dist/empty--zdtkf0T.js.map +1 -0
- package/dist/install-Ds1oWgTf.js +119 -0
- package/dist/install-Ds1oWgTf.js.map +1 -0
- package/dist/kernel.d.ts +18 -3
- package/dist/kernel.js +1 -1
- package/dist/swapi.js +1 -1
- package/dist/{topbar.min-xBbuiIjv.js → topbar.min-CDkSVOxV.js} +2 -2
- package/dist/{topbar.min-xBbuiIjv.js.map → topbar.min-CDkSVOxV.js.map} +1 -1
- package/dist/ui.js +1 -1
- package/package.json +2 -2
- package/dist/empty-BMkCc_7L.js.map +0 -1
- package/dist/install-C64fBUI2.js +0 -1997
- package/dist/install-C64fBUI2.js.map +0 -1
|
@@ -2525,6 +2525,1903 @@ function requirePathBrowserify() {
|
|
|
2525
2525
|
}
|
|
2526
2526
|
var pathBrowserifyExports = requirePathBrowserify();
|
|
2527
2527
|
const path = /* @__PURE__ */ getDefaultExportFromCjs$2(pathBrowserifyExports);
|
|
2528
|
+
var re$2 = { exports: {} };
|
|
2529
|
+
var constants$4;
|
|
2530
|
+
var hasRequiredConstants;
|
|
2531
|
+
function requireConstants() {
|
|
2532
|
+
if (hasRequiredConstants) return constants$4;
|
|
2533
|
+
hasRequiredConstants = 1;
|
|
2534
|
+
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
2535
|
+
const MAX_LENGTH = 256;
|
|
2536
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
2537
|
+
9007199254740991;
|
|
2538
|
+
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
2539
|
+
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
2540
|
+
const RELEASE_TYPES = [
|
|
2541
|
+
"major",
|
|
2542
|
+
"premajor",
|
|
2543
|
+
"minor",
|
|
2544
|
+
"preminor",
|
|
2545
|
+
"patch",
|
|
2546
|
+
"prepatch",
|
|
2547
|
+
"prerelease"
|
|
2548
|
+
];
|
|
2549
|
+
constants$4 = {
|
|
2550
|
+
MAX_LENGTH,
|
|
2551
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
2552
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
2553
|
+
MAX_SAFE_INTEGER,
|
|
2554
|
+
RELEASE_TYPES,
|
|
2555
|
+
SEMVER_SPEC_VERSION,
|
|
2556
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
2557
|
+
FLAG_LOOSE: 2
|
|
2558
|
+
};
|
|
2559
|
+
return constants$4;
|
|
2560
|
+
}
|
|
2561
|
+
var debug_1;
|
|
2562
|
+
var hasRequiredDebug;
|
|
2563
|
+
function requireDebug() {
|
|
2564
|
+
if (hasRequiredDebug) return debug_1;
|
|
2565
|
+
hasRequiredDebug = 1;
|
|
2566
|
+
const debug = typeof process$1$1 === "object" && process$1$1.env && process$1$1.env.NODE_DEBUG && /\bsemver\b/i.test(process$1$1.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
2567
|
+
};
|
|
2568
|
+
debug_1 = debug;
|
|
2569
|
+
return debug_1;
|
|
2570
|
+
}
|
|
2571
|
+
var hasRequiredRe;
|
|
2572
|
+
function requireRe() {
|
|
2573
|
+
if (hasRequiredRe) return re$2.exports;
|
|
2574
|
+
hasRequiredRe = 1;
|
|
2575
|
+
(function(module, exports) {
|
|
2576
|
+
const {
|
|
2577
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
2578
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
2579
|
+
MAX_LENGTH
|
|
2580
|
+
} = requireConstants();
|
|
2581
|
+
const debug = requireDebug();
|
|
2582
|
+
exports = module.exports = {};
|
|
2583
|
+
const re2 = exports.re = [];
|
|
2584
|
+
const safeRe = exports.safeRe = [];
|
|
2585
|
+
const src = exports.src = [];
|
|
2586
|
+
const t2 = exports.t = {};
|
|
2587
|
+
let R = 0;
|
|
2588
|
+
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
2589
|
+
const safeRegexReplacements = [
|
|
2590
|
+
["\\s", 1],
|
|
2591
|
+
["\\d", MAX_LENGTH],
|
|
2592
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
2593
|
+
];
|
|
2594
|
+
const makeSafeRegex = (value) => {
|
|
2595
|
+
for (const [token, max2] of safeRegexReplacements) {
|
|
2596
|
+
value = value.split(`${token}*`).join(`${token}{0,${max2}}`).split(`${token}+`).join(`${token}{1,${max2}}`);
|
|
2597
|
+
}
|
|
2598
|
+
return value;
|
|
2599
|
+
};
|
|
2600
|
+
const createToken = (name, value, isGlobal) => {
|
|
2601
|
+
const safe = makeSafeRegex(value);
|
|
2602
|
+
const index = R++;
|
|
2603
|
+
debug(name, index, value);
|
|
2604
|
+
t2[name] = index;
|
|
2605
|
+
src[index] = value;
|
|
2606
|
+
re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
2607
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
2608
|
+
};
|
|
2609
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
2610
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
2611
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
2612
|
+
createToken("MAINVERSION", `(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})`);
|
|
2613
|
+
createToken("MAINVERSIONLOOSE", `(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})`);
|
|
2614
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t2.NUMERICIDENTIFIER]}|${src[t2.NONNUMERICIDENTIFIER]})`);
|
|
2615
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t2.NUMERICIDENTIFIERLOOSE]}|${src[t2.NONNUMERICIDENTIFIER]})`);
|
|
2616
|
+
createToken("PRERELEASE", `(?:-(${src[t2.PRERELEASEIDENTIFIER]}(?:\\.${src[t2.PRERELEASEIDENTIFIER]})*))`);
|
|
2617
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t2.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t2.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
2618
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
2619
|
+
createToken("BUILD", `(?:\\+(${src[t2.BUILDIDENTIFIER]}(?:\\.${src[t2.BUILDIDENTIFIER]})*))`);
|
|
2620
|
+
createToken("FULLPLAIN", `v?${src[t2.MAINVERSION]}${src[t2.PRERELEASE]}?${src[t2.BUILD]}?`);
|
|
2621
|
+
createToken("FULL", `^${src[t2.FULLPLAIN]}$`);
|
|
2622
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t2.MAINVERSIONLOOSE]}${src[t2.PRERELEASELOOSE]}?${src[t2.BUILD]}?`);
|
|
2623
|
+
createToken("LOOSE", `^${src[t2.LOOSEPLAIN]}$`);
|
|
2624
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
2625
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t2.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
2626
|
+
createToken("XRANGEIDENTIFIER", `${src[t2.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
2627
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:${src[t2.PRERELEASE]})?${src[t2.BUILD]}?)?)?`);
|
|
2628
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:${src[t2.PRERELEASELOOSE]})?${src[t2.BUILD]}?)?)?`);
|
|
2629
|
+
createToken("XRANGE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAIN]}$`);
|
|
2630
|
+
createToken("XRANGELOOSE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAINLOOSE]}$`);
|
|
2631
|
+
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
2632
|
+
createToken("COERCE", `${src[t2.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
2633
|
+
createToken("COERCEFULL", src[t2.COERCEPLAIN] + `(?:${src[t2.PRERELEASE]})?(?:${src[t2.BUILD]})?(?:$|[^\\d])`);
|
|
2634
|
+
createToken("COERCERTL", src[t2.COERCE], true);
|
|
2635
|
+
createToken("COERCERTLFULL", src[t2.COERCEFULL], true);
|
|
2636
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
2637
|
+
createToken("TILDETRIM", `(\\s*)${src[t2.LONETILDE]}\\s+`, true);
|
|
2638
|
+
exports.tildeTrimReplace = "$1~";
|
|
2639
|
+
createToken("TILDE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAIN]}$`);
|
|
2640
|
+
createToken("TILDELOOSE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAINLOOSE]}$`);
|
|
2641
|
+
createToken("LONECARET", "(?:\\^)");
|
|
2642
|
+
createToken("CARETTRIM", `(\\s*)${src[t2.LONECARET]}\\s+`, true);
|
|
2643
|
+
exports.caretTrimReplace = "$1^";
|
|
2644
|
+
createToken("CARET", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAIN]}$`);
|
|
2645
|
+
createToken("CARETLOOSE", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAINLOOSE]}$`);
|
|
2646
|
+
createToken("COMPARATORLOOSE", `^${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]})$|^$`);
|
|
2647
|
+
createToken("COMPARATOR", `^${src[t2.GTLT]}\\s*(${src[t2.FULLPLAIN]})$|^$`);
|
|
2648
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]}|${src[t2.XRANGEPLAIN]})`, true);
|
|
2649
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
2650
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t2.XRANGEPLAIN]})\\s+-\\s+(${src[t2.XRANGEPLAIN]})\\s*$`);
|
|
2651
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t2.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t2.XRANGEPLAINLOOSE]})\\s*$`);
|
|
2652
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
2653
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
2654
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
2655
|
+
})(re$2, re$2.exports);
|
|
2656
|
+
return re$2.exports;
|
|
2657
|
+
}
|
|
2658
|
+
var parseOptions_1;
|
|
2659
|
+
var hasRequiredParseOptions;
|
|
2660
|
+
function requireParseOptions() {
|
|
2661
|
+
if (hasRequiredParseOptions) return parseOptions_1;
|
|
2662
|
+
hasRequiredParseOptions = 1;
|
|
2663
|
+
const looseOption = Object.freeze({ loose: true });
|
|
2664
|
+
const emptyOpts = Object.freeze({});
|
|
2665
|
+
const parseOptions = (options) => {
|
|
2666
|
+
if (!options) {
|
|
2667
|
+
return emptyOpts;
|
|
2668
|
+
}
|
|
2669
|
+
if (typeof options !== "object") {
|
|
2670
|
+
return looseOption;
|
|
2671
|
+
}
|
|
2672
|
+
return options;
|
|
2673
|
+
};
|
|
2674
|
+
parseOptions_1 = parseOptions;
|
|
2675
|
+
return parseOptions_1;
|
|
2676
|
+
}
|
|
2677
|
+
var identifiers;
|
|
2678
|
+
var hasRequiredIdentifiers;
|
|
2679
|
+
function requireIdentifiers() {
|
|
2680
|
+
if (hasRequiredIdentifiers) return identifiers;
|
|
2681
|
+
hasRequiredIdentifiers = 1;
|
|
2682
|
+
const numeric = /^[0-9]+$/;
|
|
2683
|
+
const compareIdentifiers = (a, b) => {
|
|
2684
|
+
const anum = numeric.test(a);
|
|
2685
|
+
const bnum = numeric.test(b);
|
|
2686
|
+
if (anum && bnum) {
|
|
2687
|
+
a = +a;
|
|
2688
|
+
b = +b;
|
|
2689
|
+
}
|
|
2690
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
2691
|
+
};
|
|
2692
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
2693
|
+
identifiers = {
|
|
2694
|
+
compareIdentifiers,
|
|
2695
|
+
rcompareIdentifiers
|
|
2696
|
+
};
|
|
2697
|
+
return identifiers;
|
|
2698
|
+
}
|
|
2699
|
+
var semver$2;
|
|
2700
|
+
var hasRequiredSemver$1;
|
|
2701
|
+
function requireSemver$1() {
|
|
2702
|
+
if (hasRequiredSemver$1) return semver$2;
|
|
2703
|
+
hasRequiredSemver$1 = 1;
|
|
2704
|
+
const debug = requireDebug();
|
|
2705
|
+
const { MAX_LENGTH, MAX_SAFE_INTEGER } = requireConstants();
|
|
2706
|
+
const { safeRe: re2, t: t2 } = requireRe();
|
|
2707
|
+
const parseOptions = requireParseOptions();
|
|
2708
|
+
const { compareIdentifiers } = requireIdentifiers();
|
|
2709
|
+
class SemVer {
|
|
2710
|
+
constructor(version2, options) {
|
|
2711
|
+
options = parseOptions(options);
|
|
2712
|
+
if (version2 instanceof SemVer) {
|
|
2713
|
+
if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) {
|
|
2714
|
+
return version2;
|
|
2715
|
+
} else {
|
|
2716
|
+
version2 = version2.version;
|
|
2717
|
+
}
|
|
2718
|
+
} else if (typeof version2 !== "string") {
|
|
2719
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
|
|
2720
|
+
}
|
|
2721
|
+
if (version2.length > MAX_LENGTH) {
|
|
2722
|
+
throw new TypeError(
|
|
2723
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
2724
|
+
);
|
|
2725
|
+
}
|
|
2726
|
+
debug("SemVer", version2, options);
|
|
2727
|
+
this.options = options;
|
|
2728
|
+
this.loose = !!options.loose;
|
|
2729
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
2730
|
+
const m = version2.trim().match(options.loose ? re2[t2.LOOSE] : re2[t2.FULL]);
|
|
2731
|
+
if (!m) {
|
|
2732
|
+
throw new TypeError(`Invalid Version: ${version2}`);
|
|
2733
|
+
}
|
|
2734
|
+
this.raw = version2;
|
|
2735
|
+
this.major = +m[1];
|
|
2736
|
+
this.minor = +m[2];
|
|
2737
|
+
this.patch = +m[3];
|
|
2738
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
2739
|
+
throw new TypeError("Invalid major version");
|
|
2740
|
+
}
|
|
2741
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
2742
|
+
throw new TypeError("Invalid minor version");
|
|
2743
|
+
}
|
|
2744
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
2745
|
+
throw new TypeError("Invalid patch version");
|
|
2746
|
+
}
|
|
2747
|
+
if (!m[4]) {
|
|
2748
|
+
this.prerelease = [];
|
|
2749
|
+
} else {
|
|
2750
|
+
this.prerelease = m[4].split(".").map((id) => {
|
|
2751
|
+
if (/^[0-9]+$/.test(id)) {
|
|
2752
|
+
const num = +id;
|
|
2753
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
2754
|
+
return num;
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
return id;
|
|
2758
|
+
});
|
|
2759
|
+
}
|
|
2760
|
+
this.build = m[5] ? m[5].split(".") : [];
|
|
2761
|
+
this.format();
|
|
2762
|
+
}
|
|
2763
|
+
format() {
|
|
2764
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
2765
|
+
if (this.prerelease.length) {
|
|
2766
|
+
this.version += `-${this.prerelease.join(".")}`;
|
|
2767
|
+
}
|
|
2768
|
+
return this.version;
|
|
2769
|
+
}
|
|
2770
|
+
toString() {
|
|
2771
|
+
return this.version;
|
|
2772
|
+
}
|
|
2773
|
+
compare(other) {
|
|
2774
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
2775
|
+
if (!(other instanceof SemVer)) {
|
|
2776
|
+
if (typeof other === "string" && other === this.version) {
|
|
2777
|
+
return 0;
|
|
2778
|
+
}
|
|
2779
|
+
other = new SemVer(other, this.options);
|
|
2780
|
+
}
|
|
2781
|
+
if (other.version === this.version) {
|
|
2782
|
+
return 0;
|
|
2783
|
+
}
|
|
2784
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
2785
|
+
}
|
|
2786
|
+
compareMain(other) {
|
|
2787
|
+
if (!(other instanceof SemVer)) {
|
|
2788
|
+
other = new SemVer(other, this.options);
|
|
2789
|
+
}
|
|
2790
|
+
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
2791
|
+
}
|
|
2792
|
+
comparePre(other) {
|
|
2793
|
+
if (!(other instanceof SemVer)) {
|
|
2794
|
+
other = new SemVer(other, this.options);
|
|
2795
|
+
}
|
|
2796
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
2797
|
+
return -1;
|
|
2798
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
2799
|
+
return 1;
|
|
2800
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
2801
|
+
return 0;
|
|
2802
|
+
}
|
|
2803
|
+
let i = 0;
|
|
2804
|
+
do {
|
|
2805
|
+
const a = this.prerelease[i];
|
|
2806
|
+
const b = other.prerelease[i];
|
|
2807
|
+
debug("prerelease compare", i, a, b);
|
|
2808
|
+
if (a === void 0 && b === void 0) {
|
|
2809
|
+
return 0;
|
|
2810
|
+
} else if (b === void 0) {
|
|
2811
|
+
return 1;
|
|
2812
|
+
} else if (a === void 0) {
|
|
2813
|
+
return -1;
|
|
2814
|
+
} else if (a === b) {
|
|
2815
|
+
continue;
|
|
2816
|
+
} else {
|
|
2817
|
+
return compareIdentifiers(a, b);
|
|
2818
|
+
}
|
|
2819
|
+
} while (++i);
|
|
2820
|
+
}
|
|
2821
|
+
compareBuild(other) {
|
|
2822
|
+
if (!(other instanceof SemVer)) {
|
|
2823
|
+
other = new SemVer(other, this.options);
|
|
2824
|
+
}
|
|
2825
|
+
let i = 0;
|
|
2826
|
+
do {
|
|
2827
|
+
const a = this.build[i];
|
|
2828
|
+
const b = other.build[i];
|
|
2829
|
+
debug("build compare", i, a, b);
|
|
2830
|
+
if (a === void 0 && b === void 0) {
|
|
2831
|
+
return 0;
|
|
2832
|
+
} else if (b === void 0) {
|
|
2833
|
+
return 1;
|
|
2834
|
+
} else if (a === void 0) {
|
|
2835
|
+
return -1;
|
|
2836
|
+
} else if (a === b) {
|
|
2837
|
+
continue;
|
|
2838
|
+
} else {
|
|
2839
|
+
return compareIdentifiers(a, b);
|
|
2840
|
+
}
|
|
2841
|
+
} while (++i);
|
|
2842
|
+
}
|
|
2843
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
2844
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
2845
|
+
inc(release, identifier, identifierBase) {
|
|
2846
|
+
switch (release) {
|
|
2847
|
+
case "premajor":
|
|
2848
|
+
this.prerelease.length = 0;
|
|
2849
|
+
this.patch = 0;
|
|
2850
|
+
this.minor = 0;
|
|
2851
|
+
this.major++;
|
|
2852
|
+
this.inc("pre", identifier, identifierBase);
|
|
2853
|
+
break;
|
|
2854
|
+
case "preminor":
|
|
2855
|
+
this.prerelease.length = 0;
|
|
2856
|
+
this.patch = 0;
|
|
2857
|
+
this.minor++;
|
|
2858
|
+
this.inc("pre", identifier, identifierBase);
|
|
2859
|
+
break;
|
|
2860
|
+
case "prepatch":
|
|
2861
|
+
this.prerelease.length = 0;
|
|
2862
|
+
this.inc("patch", identifier, identifierBase);
|
|
2863
|
+
this.inc("pre", identifier, identifierBase);
|
|
2864
|
+
break;
|
|
2865
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
2866
|
+
// prepatch.
|
|
2867
|
+
case "prerelease":
|
|
2868
|
+
if (this.prerelease.length === 0) {
|
|
2869
|
+
this.inc("patch", identifier, identifierBase);
|
|
2870
|
+
}
|
|
2871
|
+
this.inc("pre", identifier, identifierBase);
|
|
2872
|
+
break;
|
|
2873
|
+
case "major":
|
|
2874
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
2875
|
+
this.major++;
|
|
2876
|
+
}
|
|
2877
|
+
this.minor = 0;
|
|
2878
|
+
this.patch = 0;
|
|
2879
|
+
this.prerelease = [];
|
|
2880
|
+
break;
|
|
2881
|
+
case "minor":
|
|
2882
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
2883
|
+
this.minor++;
|
|
2884
|
+
}
|
|
2885
|
+
this.patch = 0;
|
|
2886
|
+
this.prerelease = [];
|
|
2887
|
+
break;
|
|
2888
|
+
case "patch":
|
|
2889
|
+
if (this.prerelease.length === 0) {
|
|
2890
|
+
this.patch++;
|
|
2891
|
+
}
|
|
2892
|
+
this.prerelease = [];
|
|
2893
|
+
break;
|
|
2894
|
+
// This probably shouldn't be used publicly.
|
|
2895
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
2896
|
+
case "pre": {
|
|
2897
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
2898
|
+
if (!identifier && identifierBase === false) {
|
|
2899
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
2900
|
+
}
|
|
2901
|
+
if (this.prerelease.length === 0) {
|
|
2902
|
+
this.prerelease = [base];
|
|
2903
|
+
} else {
|
|
2904
|
+
let i = this.prerelease.length;
|
|
2905
|
+
while (--i >= 0) {
|
|
2906
|
+
if (typeof this.prerelease[i] === "number") {
|
|
2907
|
+
this.prerelease[i]++;
|
|
2908
|
+
i = -2;
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
if (i === -1) {
|
|
2912
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
2913
|
+
throw new Error("invalid increment argument: identifier already exists");
|
|
2914
|
+
}
|
|
2915
|
+
this.prerelease.push(base);
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
if (identifier) {
|
|
2919
|
+
let prerelease = [identifier, base];
|
|
2920
|
+
if (identifierBase === false) {
|
|
2921
|
+
prerelease = [identifier];
|
|
2922
|
+
}
|
|
2923
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
2924
|
+
if (isNaN(this.prerelease[1])) {
|
|
2925
|
+
this.prerelease = prerelease;
|
|
2926
|
+
}
|
|
2927
|
+
} else {
|
|
2928
|
+
this.prerelease = prerelease;
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
break;
|
|
2932
|
+
}
|
|
2933
|
+
default:
|
|
2934
|
+
throw new Error(`invalid increment argument: ${release}`);
|
|
2935
|
+
}
|
|
2936
|
+
this.raw = this.format();
|
|
2937
|
+
if (this.build.length) {
|
|
2938
|
+
this.raw += `+${this.build.join(".")}`;
|
|
2939
|
+
}
|
|
2940
|
+
return this;
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
semver$2 = SemVer;
|
|
2944
|
+
return semver$2;
|
|
2945
|
+
}
|
|
2946
|
+
var parse_1;
|
|
2947
|
+
var hasRequiredParse$1;
|
|
2948
|
+
function requireParse$1() {
|
|
2949
|
+
if (hasRequiredParse$1) return parse_1;
|
|
2950
|
+
hasRequiredParse$1 = 1;
|
|
2951
|
+
const SemVer = requireSemver$1();
|
|
2952
|
+
const parse2 = (version2, options, throwErrors = false) => {
|
|
2953
|
+
if (version2 instanceof SemVer) {
|
|
2954
|
+
return version2;
|
|
2955
|
+
}
|
|
2956
|
+
try {
|
|
2957
|
+
return new SemVer(version2, options);
|
|
2958
|
+
} catch (er) {
|
|
2959
|
+
if (!throwErrors) {
|
|
2960
|
+
return null;
|
|
2961
|
+
}
|
|
2962
|
+
throw er;
|
|
2963
|
+
}
|
|
2964
|
+
};
|
|
2965
|
+
parse_1 = parse2;
|
|
2966
|
+
return parse_1;
|
|
2967
|
+
}
|
|
2968
|
+
var valid_1;
|
|
2969
|
+
var hasRequiredValid$1;
|
|
2970
|
+
function requireValid$1() {
|
|
2971
|
+
if (hasRequiredValid$1) return valid_1;
|
|
2972
|
+
hasRequiredValid$1 = 1;
|
|
2973
|
+
const parse2 = requireParse$1();
|
|
2974
|
+
const valid2 = (version2, options) => {
|
|
2975
|
+
const v = parse2(version2, options);
|
|
2976
|
+
return v ? v.version : null;
|
|
2977
|
+
};
|
|
2978
|
+
valid_1 = valid2;
|
|
2979
|
+
return valid_1;
|
|
2980
|
+
}
|
|
2981
|
+
var clean_1;
|
|
2982
|
+
var hasRequiredClean;
|
|
2983
|
+
function requireClean() {
|
|
2984
|
+
if (hasRequiredClean) return clean_1;
|
|
2985
|
+
hasRequiredClean = 1;
|
|
2986
|
+
const parse2 = requireParse$1();
|
|
2987
|
+
const clean = (version2, options) => {
|
|
2988
|
+
const s = parse2(version2.trim().replace(/^[=v]+/, ""), options);
|
|
2989
|
+
return s ? s.version : null;
|
|
2990
|
+
};
|
|
2991
|
+
clean_1 = clean;
|
|
2992
|
+
return clean_1;
|
|
2993
|
+
}
|
|
2994
|
+
var inc_1;
|
|
2995
|
+
var hasRequiredInc;
|
|
2996
|
+
function requireInc() {
|
|
2997
|
+
if (hasRequiredInc) return inc_1;
|
|
2998
|
+
hasRequiredInc = 1;
|
|
2999
|
+
const SemVer = requireSemver$1();
|
|
3000
|
+
const inc = (version2, release, options, identifier, identifierBase) => {
|
|
3001
|
+
if (typeof options === "string") {
|
|
3002
|
+
identifierBase = identifier;
|
|
3003
|
+
identifier = options;
|
|
3004
|
+
options = void 0;
|
|
3005
|
+
}
|
|
3006
|
+
try {
|
|
3007
|
+
return new SemVer(
|
|
3008
|
+
version2 instanceof SemVer ? version2.version : version2,
|
|
3009
|
+
options
|
|
3010
|
+
).inc(release, identifier, identifierBase).version;
|
|
3011
|
+
} catch (er) {
|
|
3012
|
+
return null;
|
|
3013
|
+
}
|
|
3014
|
+
};
|
|
3015
|
+
inc_1 = inc;
|
|
3016
|
+
return inc_1;
|
|
3017
|
+
}
|
|
3018
|
+
var diff_1;
|
|
3019
|
+
var hasRequiredDiff;
|
|
3020
|
+
function requireDiff() {
|
|
3021
|
+
if (hasRequiredDiff) return diff_1;
|
|
3022
|
+
hasRequiredDiff = 1;
|
|
3023
|
+
const parse2 = requireParse$1();
|
|
3024
|
+
const diff = (version1, version2) => {
|
|
3025
|
+
const v1 = parse2(version1, null, true);
|
|
3026
|
+
const v2 = parse2(version2, null, true);
|
|
3027
|
+
const comparison = v1.compare(v2);
|
|
3028
|
+
if (comparison === 0) {
|
|
3029
|
+
return null;
|
|
3030
|
+
}
|
|
3031
|
+
const v1Higher = comparison > 0;
|
|
3032
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
3033
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
3034
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
3035
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
3036
|
+
if (lowHasPre && !highHasPre) {
|
|
3037
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
3038
|
+
return "major";
|
|
3039
|
+
}
|
|
3040
|
+
if (highVersion.patch) {
|
|
3041
|
+
return "patch";
|
|
3042
|
+
}
|
|
3043
|
+
if (highVersion.minor) {
|
|
3044
|
+
return "minor";
|
|
3045
|
+
}
|
|
3046
|
+
return "major";
|
|
3047
|
+
}
|
|
3048
|
+
const prefix = highHasPre ? "pre" : "";
|
|
3049
|
+
if (v1.major !== v2.major) {
|
|
3050
|
+
return prefix + "major";
|
|
3051
|
+
}
|
|
3052
|
+
if (v1.minor !== v2.minor) {
|
|
3053
|
+
return prefix + "minor";
|
|
3054
|
+
}
|
|
3055
|
+
if (v1.patch !== v2.patch) {
|
|
3056
|
+
return prefix + "patch";
|
|
3057
|
+
}
|
|
3058
|
+
return "prerelease";
|
|
3059
|
+
};
|
|
3060
|
+
diff_1 = diff;
|
|
3061
|
+
return diff_1;
|
|
3062
|
+
}
|
|
3063
|
+
var major_1;
|
|
3064
|
+
var hasRequiredMajor;
|
|
3065
|
+
function requireMajor() {
|
|
3066
|
+
if (hasRequiredMajor) return major_1;
|
|
3067
|
+
hasRequiredMajor = 1;
|
|
3068
|
+
const SemVer = requireSemver$1();
|
|
3069
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
3070
|
+
major_1 = major;
|
|
3071
|
+
return major_1;
|
|
3072
|
+
}
|
|
3073
|
+
var minor_1;
|
|
3074
|
+
var hasRequiredMinor;
|
|
3075
|
+
function requireMinor() {
|
|
3076
|
+
if (hasRequiredMinor) return minor_1;
|
|
3077
|
+
hasRequiredMinor = 1;
|
|
3078
|
+
const SemVer = requireSemver$1();
|
|
3079
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
3080
|
+
minor_1 = minor;
|
|
3081
|
+
return minor_1;
|
|
3082
|
+
}
|
|
3083
|
+
var patch_1;
|
|
3084
|
+
var hasRequiredPatch;
|
|
3085
|
+
function requirePatch() {
|
|
3086
|
+
if (hasRequiredPatch) return patch_1;
|
|
3087
|
+
hasRequiredPatch = 1;
|
|
3088
|
+
const SemVer = requireSemver$1();
|
|
3089
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
3090
|
+
patch_1 = patch;
|
|
3091
|
+
return patch_1;
|
|
3092
|
+
}
|
|
3093
|
+
var prerelease_1;
|
|
3094
|
+
var hasRequiredPrerelease;
|
|
3095
|
+
function requirePrerelease() {
|
|
3096
|
+
if (hasRequiredPrerelease) return prerelease_1;
|
|
3097
|
+
hasRequiredPrerelease = 1;
|
|
3098
|
+
const parse2 = requireParse$1();
|
|
3099
|
+
const prerelease = (version2, options) => {
|
|
3100
|
+
const parsed = parse2(version2, options);
|
|
3101
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
3102
|
+
};
|
|
3103
|
+
prerelease_1 = prerelease;
|
|
3104
|
+
return prerelease_1;
|
|
3105
|
+
}
|
|
3106
|
+
var compare_1;
|
|
3107
|
+
var hasRequiredCompare;
|
|
3108
|
+
function requireCompare() {
|
|
3109
|
+
if (hasRequiredCompare) return compare_1;
|
|
3110
|
+
hasRequiredCompare = 1;
|
|
3111
|
+
const SemVer = requireSemver$1();
|
|
3112
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
3113
|
+
compare_1 = compare;
|
|
3114
|
+
return compare_1;
|
|
3115
|
+
}
|
|
3116
|
+
var rcompare_1;
|
|
3117
|
+
var hasRequiredRcompare;
|
|
3118
|
+
function requireRcompare() {
|
|
3119
|
+
if (hasRequiredRcompare) return rcompare_1;
|
|
3120
|
+
hasRequiredRcompare = 1;
|
|
3121
|
+
const compare = requireCompare();
|
|
3122
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
3123
|
+
rcompare_1 = rcompare;
|
|
3124
|
+
return rcompare_1;
|
|
3125
|
+
}
|
|
3126
|
+
var compareLoose_1;
|
|
3127
|
+
var hasRequiredCompareLoose;
|
|
3128
|
+
function requireCompareLoose() {
|
|
3129
|
+
if (hasRequiredCompareLoose) return compareLoose_1;
|
|
3130
|
+
hasRequiredCompareLoose = 1;
|
|
3131
|
+
const compare = requireCompare();
|
|
3132
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
3133
|
+
compareLoose_1 = compareLoose;
|
|
3134
|
+
return compareLoose_1;
|
|
3135
|
+
}
|
|
3136
|
+
var compareBuild_1;
|
|
3137
|
+
var hasRequiredCompareBuild;
|
|
3138
|
+
function requireCompareBuild() {
|
|
3139
|
+
if (hasRequiredCompareBuild) return compareBuild_1;
|
|
3140
|
+
hasRequiredCompareBuild = 1;
|
|
3141
|
+
const SemVer = requireSemver$1();
|
|
3142
|
+
const compareBuild = (a, b, loose) => {
|
|
3143
|
+
const versionA = new SemVer(a, loose);
|
|
3144
|
+
const versionB = new SemVer(b, loose);
|
|
3145
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
3146
|
+
};
|
|
3147
|
+
compareBuild_1 = compareBuild;
|
|
3148
|
+
return compareBuild_1;
|
|
3149
|
+
}
|
|
3150
|
+
var sort_1;
|
|
3151
|
+
var hasRequiredSort;
|
|
3152
|
+
function requireSort() {
|
|
3153
|
+
if (hasRequiredSort) return sort_1;
|
|
3154
|
+
hasRequiredSort = 1;
|
|
3155
|
+
const compareBuild = requireCompareBuild();
|
|
3156
|
+
const sort = (list2, loose) => list2.sort((a, b) => compareBuild(a, b, loose));
|
|
3157
|
+
sort_1 = sort;
|
|
3158
|
+
return sort_1;
|
|
3159
|
+
}
|
|
3160
|
+
var rsort_1;
|
|
3161
|
+
var hasRequiredRsort;
|
|
3162
|
+
function requireRsort() {
|
|
3163
|
+
if (hasRequiredRsort) return rsort_1;
|
|
3164
|
+
hasRequiredRsort = 1;
|
|
3165
|
+
const compareBuild = requireCompareBuild();
|
|
3166
|
+
const rsort = (list2, loose) => list2.sort((a, b) => compareBuild(b, a, loose));
|
|
3167
|
+
rsort_1 = rsort;
|
|
3168
|
+
return rsort_1;
|
|
3169
|
+
}
|
|
3170
|
+
var gt_1;
|
|
3171
|
+
var hasRequiredGt;
|
|
3172
|
+
function requireGt() {
|
|
3173
|
+
if (hasRequiredGt) return gt_1;
|
|
3174
|
+
hasRequiredGt = 1;
|
|
3175
|
+
const compare = requireCompare();
|
|
3176
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
3177
|
+
gt_1 = gt;
|
|
3178
|
+
return gt_1;
|
|
3179
|
+
}
|
|
3180
|
+
var lt_1;
|
|
3181
|
+
var hasRequiredLt;
|
|
3182
|
+
function requireLt() {
|
|
3183
|
+
if (hasRequiredLt) return lt_1;
|
|
3184
|
+
hasRequiredLt = 1;
|
|
3185
|
+
const compare = requireCompare();
|
|
3186
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
3187
|
+
lt_1 = lt;
|
|
3188
|
+
return lt_1;
|
|
3189
|
+
}
|
|
3190
|
+
var eq_1;
|
|
3191
|
+
var hasRequiredEq;
|
|
3192
|
+
function requireEq() {
|
|
3193
|
+
if (hasRequiredEq) return eq_1;
|
|
3194
|
+
hasRequiredEq = 1;
|
|
3195
|
+
const compare = requireCompare();
|
|
3196
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
3197
|
+
eq_1 = eq;
|
|
3198
|
+
return eq_1;
|
|
3199
|
+
}
|
|
3200
|
+
var neq_1;
|
|
3201
|
+
var hasRequiredNeq;
|
|
3202
|
+
function requireNeq() {
|
|
3203
|
+
if (hasRequiredNeq) return neq_1;
|
|
3204
|
+
hasRequiredNeq = 1;
|
|
3205
|
+
const compare = requireCompare();
|
|
3206
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
3207
|
+
neq_1 = neq;
|
|
3208
|
+
return neq_1;
|
|
3209
|
+
}
|
|
3210
|
+
var gte_1;
|
|
3211
|
+
var hasRequiredGte;
|
|
3212
|
+
function requireGte() {
|
|
3213
|
+
if (hasRequiredGte) return gte_1;
|
|
3214
|
+
hasRequiredGte = 1;
|
|
3215
|
+
const compare = requireCompare();
|
|
3216
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
3217
|
+
gte_1 = gte;
|
|
3218
|
+
return gte_1;
|
|
3219
|
+
}
|
|
3220
|
+
var lte_1;
|
|
3221
|
+
var hasRequiredLte;
|
|
3222
|
+
function requireLte() {
|
|
3223
|
+
if (hasRequiredLte) return lte_1;
|
|
3224
|
+
hasRequiredLte = 1;
|
|
3225
|
+
const compare = requireCompare();
|
|
3226
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
3227
|
+
lte_1 = lte;
|
|
3228
|
+
return lte_1;
|
|
3229
|
+
}
|
|
3230
|
+
var cmp_1;
|
|
3231
|
+
var hasRequiredCmp;
|
|
3232
|
+
function requireCmp() {
|
|
3233
|
+
if (hasRequiredCmp) return cmp_1;
|
|
3234
|
+
hasRequiredCmp = 1;
|
|
3235
|
+
const eq = requireEq();
|
|
3236
|
+
const neq = requireNeq();
|
|
3237
|
+
const gt = requireGt();
|
|
3238
|
+
const gte = requireGte();
|
|
3239
|
+
const lt = requireLt();
|
|
3240
|
+
const lte = requireLte();
|
|
3241
|
+
const cmp = (a, op, b, loose) => {
|
|
3242
|
+
switch (op) {
|
|
3243
|
+
case "===":
|
|
3244
|
+
if (typeof a === "object") {
|
|
3245
|
+
a = a.version;
|
|
3246
|
+
}
|
|
3247
|
+
if (typeof b === "object") {
|
|
3248
|
+
b = b.version;
|
|
3249
|
+
}
|
|
3250
|
+
return a === b;
|
|
3251
|
+
case "!==":
|
|
3252
|
+
if (typeof a === "object") {
|
|
3253
|
+
a = a.version;
|
|
3254
|
+
}
|
|
3255
|
+
if (typeof b === "object") {
|
|
3256
|
+
b = b.version;
|
|
3257
|
+
}
|
|
3258
|
+
return a !== b;
|
|
3259
|
+
case "":
|
|
3260
|
+
case "=":
|
|
3261
|
+
case "==":
|
|
3262
|
+
return eq(a, b, loose);
|
|
3263
|
+
case "!=":
|
|
3264
|
+
return neq(a, b, loose);
|
|
3265
|
+
case ">":
|
|
3266
|
+
return gt(a, b, loose);
|
|
3267
|
+
case ">=":
|
|
3268
|
+
return gte(a, b, loose);
|
|
3269
|
+
case "<":
|
|
3270
|
+
return lt(a, b, loose);
|
|
3271
|
+
case "<=":
|
|
3272
|
+
return lte(a, b, loose);
|
|
3273
|
+
default:
|
|
3274
|
+
throw new TypeError(`Invalid operator: ${op}`);
|
|
3275
|
+
}
|
|
3276
|
+
};
|
|
3277
|
+
cmp_1 = cmp;
|
|
3278
|
+
return cmp_1;
|
|
3279
|
+
}
|
|
3280
|
+
var coerce_1;
|
|
3281
|
+
var hasRequiredCoerce;
|
|
3282
|
+
function requireCoerce() {
|
|
3283
|
+
if (hasRequiredCoerce) return coerce_1;
|
|
3284
|
+
hasRequiredCoerce = 1;
|
|
3285
|
+
const SemVer = requireSemver$1();
|
|
3286
|
+
const parse2 = requireParse$1();
|
|
3287
|
+
const { safeRe: re2, t: t2 } = requireRe();
|
|
3288
|
+
const coerce2 = (version2, options) => {
|
|
3289
|
+
if (version2 instanceof SemVer) {
|
|
3290
|
+
return version2;
|
|
3291
|
+
}
|
|
3292
|
+
if (typeof version2 === "number") {
|
|
3293
|
+
version2 = String(version2);
|
|
3294
|
+
}
|
|
3295
|
+
if (typeof version2 !== "string") {
|
|
3296
|
+
return null;
|
|
3297
|
+
}
|
|
3298
|
+
options = options || {};
|
|
3299
|
+
let match = null;
|
|
3300
|
+
if (!options.rtl) {
|
|
3301
|
+
match = version2.match(options.includePrerelease ? re2[t2.COERCEFULL] : re2[t2.COERCE]);
|
|
3302
|
+
} else {
|
|
3303
|
+
const coerceRtlRegex = options.includePrerelease ? re2[t2.COERCERTLFULL] : re2[t2.COERCERTL];
|
|
3304
|
+
let next;
|
|
3305
|
+
while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) {
|
|
3306
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
3307
|
+
match = next;
|
|
3308
|
+
}
|
|
3309
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
3310
|
+
}
|
|
3311
|
+
coerceRtlRegex.lastIndex = -1;
|
|
3312
|
+
}
|
|
3313
|
+
if (match === null) {
|
|
3314
|
+
return null;
|
|
3315
|
+
}
|
|
3316
|
+
const major = match[2];
|
|
3317
|
+
const minor = match[3] || "0";
|
|
3318
|
+
const patch = match[4] || "0";
|
|
3319
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
3320
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
3321
|
+
return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
3322
|
+
};
|
|
3323
|
+
coerce_1 = coerce2;
|
|
3324
|
+
return coerce_1;
|
|
3325
|
+
}
|
|
3326
|
+
var lrucache;
|
|
3327
|
+
var hasRequiredLrucache;
|
|
3328
|
+
function requireLrucache() {
|
|
3329
|
+
if (hasRequiredLrucache) return lrucache;
|
|
3330
|
+
hasRequiredLrucache = 1;
|
|
3331
|
+
class LRUCache {
|
|
3332
|
+
constructor() {
|
|
3333
|
+
this.max = 1e3;
|
|
3334
|
+
this.map = /* @__PURE__ */ new Map();
|
|
3335
|
+
}
|
|
3336
|
+
get(key) {
|
|
3337
|
+
const value = this.map.get(key);
|
|
3338
|
+
if (value === void 0) {
|
|
3339
|
+
return void 0;
|
|
3340
|
+
} else {
|
|
3341
|
+
this.map.delete(key);
|
|
3342
|
+
this.map.set(key, value);
|
|
3343
|
+
return value;
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
delete(key) {
|
|
3347
|
+
return this.map.delete(key);
|
|
3348
|
+
}
|
|
3349
|
+
set(key, value) {
|
|
3350
|
+
const deleted = this.delete(key);
|
|
3351
|
+
if (!deleted && value !== void 0) {
|
|
3352
|
+
if (this.map.size >= this.max) {
|
|
3353
|
+
const firstKey = this.map.keys().next().value;
|
|
3354
|
+
this.delete(firstKey);
|
|
3355
|
+
}
|
|
3356
|
+
this.map.set(key, value);
|
|
3357
|
+
}
|
|
3358
|
+
return this;
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
lrucache = LRUCache;
|
|
3362
|
+
return lrucache;
|
|
3363
|
+
}
|
|
3364
|
+
var range;
|
|
3365
|
+
var hasRequiredRange;
|
|
3366
|
+
function requireRange() {
|
|
3367
|
+
if (hasRequiredRange) return range;
|
|
3368
|
+
hasRequiredRange = 1;
|
|
3369
|
+
const SPACE_CHARACTERS = /\s+/g;
|
|
3370
|
+
class Range {
|
|
3371
|
+
constructor(range2, options) {
|
|
3372
|
+
options = parseOptions(options);
|
|
3373
|
+
if (range2 instanceof Range) {
|
|
3374
|
+
if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) {
|
|
3375
|
+
return range2;
|
|
3376
|
+
} else {
|
|
3377
|
+
return new Range(range2.raw, options);
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
if (range2 instanceof Comparator) {
|
|
3381
|
+
this.raw = range2.value;
|
|
3382
|
+
this.set = [[range2]];
|
|
3383
|
+
this.formatted = void 0;
|
|
3384
|
+
return this;
|
|
3385
|
+
}
|
|
3386
|
+
this.options = options;
|
|
3387
|
+
this.loose = !!options.loose;
|
|
3388
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
3389
|
+
this.raw = range2.trim().replace(SPACE_CHARACTERS, " ");
|
|
3390
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
3391
|
+
if (!this.set.length) {
|
|
3392
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
3393
|
+
}
|
|
3394
|
+
if (this.set.length > 1) {
|
|
3395
|
+
const first = this.set[0];
|
|
3396
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
3397
|
+
if (this.set.length === 0) {
|
|
3398
|
+
this.set = [first];
|
|
3399
|
+
} else if (this.set.length > 1) {
|
|
3400
|
+
for (const c of this.set) {
|
|
3401
|
+
if (c.length === 1 && isAny(c[0])) {
|
|
3402
|
+
this.set = [c];
|
|
3403
|
+
break;
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
this.formatted = void 0;
|
|
3409
|
+
}
|
|
3410
|
+
get range() {
|
|
3411
|
+
if (this.formatted === void 0) {
|
|
3412
|
+
this.formatted = "";
|
|
3413
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
3414
|
+
if (i > 0) {
|
|
3415
|
+
this.formatted += "||";
|
|
3416
|
+
}
|
|
3417
|
+
const comps = this.set[i];
|
|
3418
|
+
for (let k = 0; k < comps.length; k++) {
|
|
3419
|
+
if (k > 0) {
|
|
3420
|
+
this.formatted += " ";
|
|
3421
|
+
}
|
|
3422
|
+
this.formatted += comps[k].toString().trim();
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
}
|
|
3426
|
+
return this.formatted;
|
|
3427
|
+
}
|
|
3428
|
+
format() {
|
|
3429
|
+
return this.range;
|
|
3430
|
+
}
|
|
3431
|
+
toString() {
|
|
3432
|
+
return this.range;
|
|
3433
|
+
}
|
|
3434
|
+
parseRange(range2) {
|
|
3435
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
3436
|
+
const memoKey = memoOpts + ":" + range2;
|
|
3437
|
+
const cached = cache.get(memoKey);
|
|
3438
|
+
if (cached) {
|
|
3439
|
+
return cached;
|
|
3440
|
+
}
|
|
3441
|
+
const loose = this.options.loose;
|
|
3442
|
+
const hr = loose ? re2[t2.HYPHENRANGELOOSE] : re2[t2.HYPHENRANGE];
|
|
3443
|
+
range2 = range2.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
3444
|
+
debug("hyphen replace", range2);
|
|
3445
|
+
range2 = range2.replace(re2[t2.COMPARATORTRIM], comparatorTrimReplace);
|
|
3446
|
+
debug("comparator trim", range2);
|
|
3447
|
+
range2 = range2.replace(re2[t2.TILDETRIM], tildeTrimReplace);
|
|
3448
|
+
debug("tilde trim", range2);
|
|
3449
|
+
range2 = range2.replace(re2[t2.CARETTRIM], caretTrimReplace);
|
|
3450
|
+
debug("caret trim", range2);
|
|
3451
|
+
let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
3452
|
+
if (loose) {
|
|
3453
|
+
rangeList = rangeList.filter((comp) => {
|
|
3454
|
+
debug("loose invalid filter", comp, this.options);
|
|
3455
|
+
return !!comp.match(re2[t2.COMPARATORLOOSE]);
|
|
3456
|
+
});
|
|
3457
|
+
}
|
|
3458
|
+
debug("range list", rangeList);
|
|
3459
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
3460
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
3461
|
+
for (const comp of comparators) {
|
|
3462
|
+
if (isNullSet(comp)) {
|
|
3463
|
+
return [comp];
|
|
3464
|
+
}
|
|
3465
|
+
rangeMap.set(comp.value, comp);
|
|
3466
|
+
}
|
|
3467
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
3468
|
+
rangeMap.delete("");
|
|
3469
|
+
}
|
|
3470
|
+
const result = [...rangeMap.values()];
|
|
3471
|
+
cache.set(memoKey, result);
|
|
3472
|
+
return result;
|
|
3473
|
+
}
|
|
3474
|
+
intersects(range2, options) {
|
|
3475
|
+
if (!(range2 instanceof Range)) {
|
|
3476
|
+
throw new TypeError("a Range is required");
|
|
3477
|
+
}
|
|
3478
|
+
return this.set.some((thisComparators) => {
|
|
3479
|
+
return isSatisfiable(thisComparators, options) && range2.set.some((rangeComparators) => {
|
|
3480
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
3481
|
+
return rangeComparators.every((rangeComparator) => {
|
|
3482
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
3483
|
+
});
|
|
3484
|
+
});
|
|
3485
|
+
});
|
|
3486
|
+
});
|
|
3487
|
+
}
|
|
3488
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
3489
|
+
test(version2) {
|
|
3490
|
+
if (!version2) {
|
|
3491
|
+
return false;
|
|
3492
|
+
}
|
|
3493
|
+
if (typeof version2 === "string") {
|
|
3494
|
+
try {
|
|
3495
|
+
version2 = new SemVer(version2, this.options);
|
|
3496
|
+
} catch (er) {
|
|
3497
|
+
return false;
|
|
3498
|
+
}
|
|
3499
|
+
}
|
|
3500
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
3501
|
+
if (testSet(this.set[i], version2, this.options)) {
|
|
3502
|
+
return true;
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
return false;
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
range = Range;
|
|
3509
|
+
const LRU = requireLrucache();
|
|
3510
|
+
const cache = new LRU();
|
|
3511
|
+
const parseOptions = requireParseOptions();
|
|
3512
|
+
const Comparator = requireComparator();
|
|
3513
|
+
const debug = requireDebug();
|
|
3514
|
+
const SemVer = requireSemver$1();
|
|
3515
|
+
const {
|
|
3516
|
+
safeRe: re2,
|
|
3517
|
+
t: t2,
|
|
3518
|
+
comparatorTrimReplace,
|
|
3519
|
+
tildeTrimReplace,
|
|
3520
|
+
caretTrimReplace
|
|
3521
|
+
} = requireRe();
|
|
3522
|
+
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants();
|
|
3523
|
+
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
3524
|
+
const isAny = (c) => c.value === "";
|
|
3525
|
+
const isSatisfiable = (comparators, options) => {
|
|
3526
|
+
let result = true;
|
|
3527
|
+
const remainingComparators = comparators.slice();
|
|
3528
|
+
let testComparator = remainingComparators.pop();
|
|
3529
|
+
while (result && remainingComparators.length) {
|
|
3530
|
+
result = remainingComparators.every((otherComparator) => {
|
|
3531
|
+
return testComparator.intersects(otherComparator, options);
|
|
3532
|
+
});
|
|
3533
|
+
testComparator = remainingComparators.pop();
|
|
3534
|
+
}
|
|
3535
|
+
return result;
|
|
3536
|
+
};
|
|
3537
|
+
const parseComparator = (comp, options) => {
|
|
3538
|
+
debug("comp", comp, options);
|
|
3539
|
+
comp = replaceCarets(comp, options);
|
|
3540
|
+
debug("caret", comp);
|
|
3541
|
+
comp = replaceTildes(comp, options);
|
|
3542
|
+
debug("tildes", comp);
|
|
3543
|
+
comp = replaceXRanges(comp, options);
|
|
3544
|
+
debug("xrange", comp);
|
|
3545
|
+
comp = replaceStars(comp, options);
|
|
3546
|
+
debug("stars", comp);
|
|
3547
|
+
return comp;
|
|
3548
|
+
};
|
|
3549
|
+
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
3550
|
+
const replaceTildes = (comp, options) => {
|
|
3551
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
3552
|
+
};
|
|
3553
|
+
const replaceTilde = (comp, options) => {
|
|
3554
|
+
const r = options.loose ? re2[t2.TILDELOOSE] : re2[t2.TILDE];
|
|
3555
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
3556
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
3557
|
+
let ret;
|
|
3558
|
+
if (isX(M)) {
|
|
3559
|
+
ret = "";
|
|
3560
|
+
} else if (isX(m)) {
|
|
3561
|
+
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
3562
|
+
} else if (isX(p)) {
|
|
3563
|
+
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
3564
|
+
} else if (pr) {
|
|
3565
|
+
debug("replaceTilde pr", pr);
|
|
3566
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
3567
|
+
} else {
|
|
3568
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
3569
|
+
}
|
|
3570
|
+
debug("tilde return", ret);
|
|
3571
|
+
return ret;
|
|
3572
|
+
});
|
|
3573
|
+
};
|
|
3574
|
+
const replaceCarets = (comp, options) => {
|
|
3575
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
3576
|
+
};
|
|
3577
|
+
const replaceCaret = (comp, options) => {
|
|
3578
|
+
debug("caret", comp, options);
|
|
3579
|
+
const r = options.loose ? re2[t2.CARETLOOSE] : re2[t2.CARET];
|
|
3580
|
+
const z2 = options.includePrerelease ? "-0" : "";
|
|
3581
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
3582
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
3583
|
+
let ret;
|
|
3584
|
+
if (isX(M)) {
|
|
3585
|
+
ret = "";
|
|
3586
|
+
} else if (isX(m)) {
|
|
3587
|
+
ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
|
|
3588
|
+
} else if (isX(p)) {
|
|
3589
|
+
if (M === "0") {
|
|
3590
|
+
ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`;
|
|
3591
|
+
} else {
|
|
3592
|
+
ret = `>=${M}.${m}.0${z2} <${+M + 1}.0.0-0`;
|
|
3593
|
+
}
|
|
3594
|
+
} else if (pr) {
|
|
3595
|
+
debug("replaceCaret pr", pr);
|
|
3596
|
+
if (M === "0") {
|
|
3597
|
+
if (m === "0") {
|
|
3598
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
3599
|
+
} else {
|
|
3600
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
3601
|
+
}
|
|
3602
|
+
} else {
|
|
3603
|
+
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
3604
|
+
}
|
|
3605
|
+
} else {
|
|
3606
|
+
debug("no pr");
|
|
3607
|
+
if (M === "0") {
|
|
3608
|
+
if (m === "0") {
|
|
3609
|
+
ret = `>=${M}.${m}.${p}${z2} <${M}.${m}.${+p + 1}-0`;
|
|
3610
|
+
} else {
|
|
3611
|
+
ret = `>=${M}.${m}.${p}${z2} <${M}.${+m + 1}.0-0`;
|
|
3612
|
+
}
|
|
3613
|
+
} else {
|
|
3614
|
+
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
debug("caret return", ret);
|
|
3618
|
+
return ret;
|
|
3619
|
+
});
|
|
3620
|
+
};
|
|
3621
|
+
const replaceXRanges = (comp, options) => {
|
|
3622
|
+
debug("replaceXRanges", comp, options);
|
|
3623
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
3624
|
+
};
|
|
3625
|
+
const replaceXRange = (comp, options) => {
|
|
3626
|
+
comp = comp.trim();
|
|
3627
|
+
const r = options.loose ? re2[t2.XRANGELOOSE] : re2[t2.XRANGE];
|
|
3628
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
3629
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
3630
|
+
const xM = isX(M);
|
|
3631
|
+
const xm = xM || isX(m);
|
|
3632
|
+
const xp = xm || isX(p);
|
|
3633
|
+
const anyX = xp;
|
|
3634
|
+
if (gtlt === "=" && anyX) {
|
|
3635
|
+
gtlt = "";
|
|
3636
|
+
}
|
|
3637
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
3638
|
+
if (xM) {
|
|
3639
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
3640
|
+
ret = "<0.0.0-0";
|
|
3641
|
+
} else {
|
|
3642
|
+
ret = "*";
|
|
3643
|
+
}
|
|
3644
|
+
} else if (gtlt && anyX) {
|
|
3645
|
+
if (xm) {
|
|
3646
|
+
m = 0;
|
|
3647
|
+
}
|
|
3648
|
+
p = 0;
|
|
3649
|
+
if (gtlt === ">") {
|
|
3650
|
+
gtlt = ">=";
|
|
3651
|
+
if (xm) {
|
|
3652
|
+
M = +M + 1;
|
|
3653
|
+
m = 0;
|
|
3654
|
+
p = 0;
|
|
3655
|
+
} else {
|
|
3656
|
+
m = +m + 1;
|
|
3657
|
+
p = 0;
|
|
3658
|
+
}
|
|
3659
|
+
} else if (gtlt === "<=") {
|
|
3660
|
+
gtlt = "<";
|
|
3661
|
+
if (xm) {
|
|
3662
|
+
M = +M + 1;
|
|
3663
|
+
} else {
|
|
3664
|
+
m = +m + 1;
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
if (gtlt === "<") {
|
|
3668
|
+
pr = "-0";
|
|
3669
|
+
}
|
|
3670
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
3671
|
+
} else if (xm) {
|
|
3672
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
3673
|
+
} else if (xp) {
|
|
3674
|
+
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
3675
|
+
}
|
|
3676
|
+
debug("xRange return", ret);
|
|
3677
|
+
return ret;
|
|
3678
|
+
});
|
|
3679
|
+
};
|
|
3680
|
+
const replaceStars = (comp, options) => {
|
|
3681
|
+
debug("replaceStars", comp, options);
|
|
3682
|
+
return comp.trim().replace(re2[t2.STAR], "");
|
|
3683
|
+
};
|
|
3684
|
+
const replaceGTE0 = (comp, options) => {
|
|
3685
|
+
debug("replaceGTE0", comp, options);
|
|
3686
|
+
return comp.trim().replace(re2[options.includePrerelease ? t2.GTE0PRE : t2.GTE0], "");
|
|
3687
|
+
};
|
|
3688
|
+
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
3689
|
+
if (isX(fM)) {
|
|
3690
|
+
from = "";
|
|
3691
|
+
} else if (isX(fm)) {
|
|
3692
|
+
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
3693
|
+
} else if (isX(fp)) {
|
|
3694
|
+
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
3695
|
+
} else if (fpr) {
|
|
3696
|
+
from = `>=${from}`;
|
|
3697
|
+
} else {
|
|
3698
|
+
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
3699
|
+
}
|
|
3700
|
+
if (isX(tM)) {
|
|
3701
|
+
to = "";
|
|
3702
|
+
} else if (isX(tm)) {
|
|
3703
|
+
to = `<${+tM + 1}.0.0-0`;
|
|
3704
|
+
} else if (isX(tp)) {
|
|
3705
|
+
to = `<${tM}.${+tm + 1}.0-0`;
|
|
3706
|
+
} else if (tpr) {
|
|
3707
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
3708
|
+
} else if (incPr) {
|
|
3709
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
3710
|
+
} else {
|
|
3711
|
+
to = `<=${to}`;
|
|
3712
|
+
}
|
|
3713
|
+
return `${from} ${to}`.trim();
|
|
3714
|
+
};
|
|
3715
|
+
const testSet = (set, version2, options) => {
|
|
3716
|
+
for (let i = 0; i < set.length; i++) {
|
|
3717
|
+
if (!set[i].test(version2)) {
|
|
3718
|
+
return false;
|
|
3719
|
+
}
|
|
3720
|
+
}
|
|
3721
|
+
if (version2.prerelease.length && !options.includePrerelease) {
|
|
3722
|
+
for (let i = 0; i < set.length; i++) {
|
|
3723
|
+
debug(set[i].semver);
|
|
3724
|
+
if (set[i].semver === Comparator.ANY) {
|
|
3725
|
+
continue;
|
|
3726
|
+
}
|
|
3727
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
3728
|
+
const allowed = set[i].semver;
|
|
3729
|
+
if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) {
|
|
3730
|
+
return true;
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
return false;
|
|
3735
|
+
}
|
|
3736
|
+
return true;
|
|
3737
|
+
};
|
|
3738
|
+
return range;
|
|
3739
|
+
}
|
|
3740
|
+
var comparator;
|
|
3741
|
+
var hasRequiredComparator;
|
|
3742
|
+
function requireComparator() {
|
|
3743
|
+
if (hasRequiredComparator) return comparator;
|
|
3744
|
+
hasRequiredComparator = 1;
|
|
3745
|
+
const ANY = Symbol("SemVer ANY");
|
|
3746
|
+
class Comparator {
|
|
3747
|
+
static get ANY() {
|
|
3748
|
+
return ANY;
|
|
3749
|
+
}
|
|
3750
|
+
constructor(comp, options) {
|
|
3751
|
+
options = parseOptions(options);
|
|
3752
|
+
if (comp instanceof Comparator) {
|
|
3753
|
+
if (comp.loose === !!options.loose) {
|
|
3754
|
+
return comp;
|
|
3755
|
+
} else {
|
|
3756
|
+
comp = comp.value;
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3759
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
3760
|
+
debug("comparator", comp, options);
|
|
3761
|
+
this.options = options;
|
|
3762
|
+
this.loose = !!options.loose;
|
|
3763
|
+
this.parse(comp);
|
|
3764
|
+
if (this.semver === ANY) {
|
|
3765
|
+
this.value = "";
|
|
3766
|
+
} else {
|
|
3767
|
+
this.value = this.operator + this.semver.version;
|
|
3768
|
+
}
|
|
3769
|
+
debug("comp", this);
|
|
3770
|
+
}
|
|
3771
|
+
parse(comp) {
|
|
3772
|
+
const r = this.options.loose ? re2[t2.COMPARATORLOOSE] : re2[t2.COMPARATOR];
|
|
3773
|
+
const m = comp.match(r);
|
|
3774
|
+
if (!m) {
|
|
3775
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
3776
|
+
}
|
|
3777
|
+
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
3778
|
+
if (this.operator === "=") {
|
|
3779
|
+
this.operator = "";
|
|
3780
|
+
}
|
|
3781
|
+
if (!m[2]) {
|
|
3782
|
+
this.semver = ANY;
|
|
3783
|
+
} else {
|
|
3784
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3787
|
+
toString() {
|
|
3788
|
+
return this.value;
|
|
3789
|
+
}
|
|
3790
|
+
test(version2) {
|
|
3791
|
+
debug("Comparator.test", version2, this.options.loose);
|
|
3792
|
+
if (this.semver === ANY || version2 === ANY) {
|
|
3793
|
+
return true;
|
|
3794
|
+
}
|
|
3795
|
+
if (typeof version2 === "string") {
|
|
3796
|
+
try {
|
|
3797
|
+
version2 = new SemVer(version2, this.options);
|
|
3798
|
+
} catch (er) {
|
|
3799
|
+
return false;
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
return cmp(version2, this.operator, this.semver, this.options);
|
|
3803
|
+
}
|
|
3804
|
+
intersects(comp, options) {
|
|
3805
|
+
if (!(comp instanceof Comparator)) {
|
|
3806
|
+
throw new TypeError("a Comparator is required");
|
|
3807
|
+
}
|
|
3808
|
+
if (this.operator === "") {
|
|
3809
|
+
if (this.value === "") {
|
|
3810
|
+
return true;
|
|
3811
|
+
}
|
|
3812
|
+
return new Range(comp.value, options).test(this.value);
|
|
3813
|
+
} else if (comp.operator === "") {
|
|
3814
|
+
if (comp.value === "") {
|
|
3815
|
+
return true;
|
|
3816
|
+
}
|
|
3817
|
+
return new Range(this.value, options).test(comp.semver);
|
|
3818
|
+
}
|
|
3819
|
+
options = parseOptions(options);
|
|
3820
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
3821
|
+
return false;
|
|
3822
|
+
}
|
|
3823
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
3824
|
+
return false;
|
|
3825
|
+
}
|
|
3826
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
3827
|
+
return true;
|
|
3828
|
+
}
|
|
3829
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
3830
|
+
return true;
|
|
3831
|
+
}
|
|
3832
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
3833
|
+
return true;
|
|
3834
|
+
}
|
|
3835
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
3836
|
+
return true;
|
|
3837
|
+
}
|
|
3838
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
3839
|
+
return true;
|
|
3840
|
+
}
|
|
3841
|
+
return false;
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
3844
|
+
comparator = Comparator;
|
|
3845
|
+
const parseOptions = requireParseOptions();
|
|
3846
|
+
const { safeRe: re2, t: t2 } = requireRe();
|
|
3847
|
+
const cmp = requireCmp();
|
|
3848
|
+
const debug = requireDebug();
|
|
3849
|
+
const SemVer = requireSemver$1();
|
|
3850
|
+
const Range = requireRange();
|
|
3851
|
+
return comparator;
|
|
3852
|
+
}
|
|
3853
|
+
var satisfies_1;
|
|
3854
|
+
var hasRequiredSatisfies;
|
|
3855
|
+
function requireSatisfies() {
|
|
3856
|
+
if (hasRequiredSatisfies) return satisfies_1;
|
|
3857
|
+
hasRequiredSatisfies = 1;
|
|
3858
|
+
const Range = requireRange();
|
|
3859
|
+
const satisfies = (version2, range2, options) => {
|
|
3860
|
+
try {
|
|
3861
|
+
range2 = new Range(range2, options);
|
|
3862
|
+
} catch (er) {
|
|
3863
|
+
return false;
|
|
3864
|
+
}
|
|
3865
|
+
return range2.test(version2);
|
|
3866
|
+
};
|
|
3867
|
+
satisfies_1 = satisfies;
|
|
3868
|
+
return satisfies_1;
|
|
3869
|
+
}
|
|
3870
|
+
var toComparators_1;
|
|
3871
|
+
var hasRequiredToComparators;
|
|
3872
|
+
function requireToComparators() {
|
|
3873
|
+
if (hasRequiredToComparators) return toComparators_1;
|
|
3874
|
+
hasRequiredToComparators = 1;
|
|
3875
|
+
const Range = requireRange();
|
|
3876
|
+
const toComparators = (range2, options) => new Range(range2, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
3877
|
+
toComparators_1 = toComparators;
|
|
3878
|
+
return toComparators_1;
|
|
3879
|
+
}
|
|
3880
|
+
var maxSatisfying_1;
|
|
3881
|
+
var hasRequiredMaxSatisfying;
|
|
3882
|
+
function requireMaxSatisfying() {
|
|
3883
|
+
if (hasRequiredMaxSatisfying) return maxSatisfying_1;
|
|
3884
|
+
hasRequiredMaxSatisfying = 1;
|
|
3885
|
+
const SemVer = requireSemver$1();
|
|
3886
|
+
const Range = requireRange();
|
|
3887
|
+
const maxSatisfying = (versions, range2, options) => {
|
|
3888
|
+
let max2 = null;
|
|
3889
|
+
let maxSV = null;
|
|
3890
|
+
let rangeObj = null;
|
|
3891
|
+
try {
|
|
3892
|
+
rangeObj = new Range(range2, options);
|
|
3893
|
+
} catch (er) {
|
|
3894
|
+
return null;
|
|
3895
|
+
}
|
|
3896
|
+
versions.forEach((v) => {
|
|
3897
|
+
if (rangeObj.test(v)) {
|
|
3898
|
+
if (!max2 || maxSV.compare(v) === -1) {
|
|
3899
|
+
max2 = v;
|
|
3900
|
+
maxSV = new SemVer(max2, options);
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
});
|
|
3904
|
+
return max2;
|
|
3905
|
+
};
|
|
3906
|
+
maxSatisfying_1 = maxSatisfying;
|
|
3907
|
+
return maxSatisfying_1;
|
|
3908
|
+
}
|
|
3909
|
+
var minSatisfying_1;
|
|
3910
|
+
var hasRequiredMinSatisfying;
|
|
3911
|
+
function requireMinSatisfying() {
|
|
3912
|
+
if (hasRequiredMinSatisfying) return minSatisfying_1;
|
|
3913
|
+
hasRequiredMinSatisfying = 1;
|
|
3914
|
+
const SemVer = requireSemver$1();
|
|
3915
|
+
const Range = requireRange();
|
|
3916
|
+
const minSatisfying = (versions, range2, options) => {
|
|
3917
|
+
let min = null;
|
|
3918
|
+
let minSV = null;
|
|
3919
|
+
let rangeObj = null;
|
|
3920
|
+
try {
|
|
3921
|
+
rangeObj = new Range(range2, options);
|
|
3922
|
+
} catch (er) {
|
|
3923
|
+
return null;
|
|
3924
|
+
}
|
|
3925
|
+
versions.forEach((v) => {
|
|
3926
|
+
if (rangeObj.test(v)) {
|
|
3927
|
+
if (!min || minSV.compare(v) === 1) {
|
|
3928
|
+
min = v;
|
|
3929
|
+
minSV = new SemVer(min, options);
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
});
|
|
3933
|
+
return min;
|
|
3934
|
+
};
|
|
3935
|
+
minSatisfying_1 = minSatisfying;
|
|
3936
|
+
return minSatisfying_1;
|
|
3937
|
+
}
|
|
3938
|
+
var minVersion_1;
|
|
3939
|
+
var hasRequiredMinVersion;
|
|
3940
|
+
function requireMinVersion() {
|
|
3941
|
+
if (hasRequiredMinVersion) return minVersion_1;
|
|
3942
|
+
hasRequiredMinVersion = 1;
|
|
3943
|
+
const SemVer = requireSemver$1();
|
|
3944
|
+
const Range = requireRange();
|
|
3945
|
+
const gt = requireGt();
|
|
3946
|
+
const minVersion = (range2, loose) => {
|
|
3947
|
+
range2 = new Range(range2, loose);
|
|
3948
|
+
let minver = new SemVer("0.0.0");
|
|
3949
|
+
if (range2.test(minver)) {
|
|
3950
|
+
return minver;
|
|
3951
|
+
}
|
|
3952
|
+
minver = new SemVer("0.0.0-0");
|
|
3953
|
+
if (range2.test(minver)) {
|
|
3954
|
+
return minver;
|
|
3955
|
+
}
|
|
3956
|
+
minver = null;
|
|
3957
|
+
for (let i = 0; i < range2.set.length; ++i) {
|
|
3958
|
+
const comparators = range2.set[i];
|
|
3959
|
+
let setMin = null;
|
|
3960
|
+
comparators.forEach((comparator2) => {
|
|
3961
|
+
const compver = new SemVer(comparator2.semver.version);
|
|
3962
|
+
switch (comparator2.operator) {
|
|
3963
|
+
case ">":
|
|
3964
|
+
if (compver.prerelease.length === 0) {
|
|
3965
|
+
compver.patch++;
|
|
3966
|
+
} else {
|
|
3967
|
+
compver.prerelease.push(0);
|
|
3968
|
+
}
|
|
3969
|
+
compver.raw = compver.format();
|
|
3970
|
+
/* fallthrough */
|
|
3971
|
+
case "":
|
|
3972
|
+
case ">=":
|
|
3973
|
+
if (!setMin || gt(compver, setMin)) {
|
|
3974
|
+
setMin = compver;
|
|
3975
|
+
}
|
|
3976
|
+
break;
|
|
3977
|
+
case "<":
|
|
3978
|
+
case "<=":
|
|
3979
|
+
break;
|
|
3980
|
+
/* istanbul ignore next */
|
|
3981
|
+
default:
|
|
3982
|
+
throw new Error(`Unexpected operation: ${comparator2.operator}`);
|
|
3983
|
+
}
|
|
3984
|
+
});
|
|
3985
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
3986
|
+
minver = setMin;
|
|
3987
|
+
}
|
|
3988
|
+
}
|
|
3989
|
+
if (minver && range2.test(minver)) {
|
|
3990
|
+
return minver;
|
|
3991
|
+
}
|
|
3992
|
+
return null;
|
|
3993
|
+
};
|
|
3994
|
+
minVersion_1 = minVersion;
|
|
3995
|
+
return minVersion_1;
|
|
3996
|
+
}
|
|
3997
|
+
var valid;
|
|
3998
|
+
var hasRequiredValid;
|
|
3999
|
+
function requireValid() {
|
|
4000
|
+
if (hasRequiredValid) return valid;
|
|
4001
|
+
hasRequiredValid = 1;
|
|
4002
|
+
const Range = requireRange();
|
|
4003
|
+
const validRange = (range2, options) => {
|
|
4004
|
+
try {
|
|
4005
|
+
return new Range(range2, options).range || "*";
|
|
4006
|
+
} catch (er) {
|
|
4007
|
+
return null;
|
|
4008
|
+
}
|
|
4009
|
+
};
|
|
4010
|
+
valid = validRange;
|
|
4011
|
+
return valid;
|
|
4012
|
+
}
|
|
4013
|
+
var outside_1;
|
|
4014
|
+
var hasRequiredOutside;
|
|
4015
|
+
function requireOutside() {
|
|
4016
|
+
if (hasRequiredOutside) return outside_1;
|
|
4017
|
+
hasRequiredOutside = 1;
|
|
4018
|
+
const SemVer = requireSemver$1();
|
|
4019
|
+
const Comparator = requireComparator();
|
|
4020
|
+
const { ANY } = Comparator;
|
|
4021
|
+
const Range = requireRange();
|
|
4022
|
+
const satisfies = requireSatisfies();
|
|
4023
|
+
const gt = requireGt();
|
|
4024
|
+
const lt = requireLt();
|
|
4025
|
+
const lte = requireLte();
|
|
4026
|
+
const gte = requireGte();
|
|
4027
|
+
const outside = (version2, range2, hilo, options) => {
|
|
4028
|
+
version2 = new SemVer(version2, options);
|
|
4029
|
+
range2 = new Range(range2, options);
|
|
4030
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
4031
|
+
switch (hilo) {
|
|
4032
|
+
case ">":
|
|
4033
|
+
gtfn = gt;
|
|
4034
|
+
ltefn = lte;
|
|
4035
|
+
ltfn = lt;
|
|
4036
|
+
comp = ">";
|
|
4037
|
+
ecomp = ">=";
|
|
4038
|
+
break;
|
|
4039
|
+
case "<":
|
|
4040
|
+
gtfn = lt;
|
|
4041
|
+
ltefn = gte;
|
|
4042
|
+
ltfn = gt;
|
|
4043
|
+
comp = "<";
|
|
4044
|
+
ecomp = "<=";
|
|
4045
|
+
break;
|
|
4046
|
+
default:
|
|
4047
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
4048
|
+
}
|
|
4049
|
+
if (satisfies(version2, range2, options)) {
|
|
4050
|
+
return false;
|
|
4051
|
+
}
|
|
4052
|
+
for (let i = 0; i < range2.set.length; ++i) {
|
|
4053
|
+
const comparators = range2.set[i];
|
|
4054
|
+
let high = null;
|
|
4055
|
+
let low = null;
|
|
4056
|
+
comparators.forEach((comparator2) => {
|
|
4057
|
+
if (comparator2.semver === ANY) {
|
|
4058
|
+
comparator2 = new Comparator(">=0.0.0");
|
|
4059
|
+
}
|
|
4060
|
+
high = high || comparator2;
|
|
4061
|
+
low = low || comparator2;
|
|
4062
|
+
if (gtfn(comparator2.semver, high.semver, options)) {
|
|
4063
|
+
high = comparator2;
|
|
4064
|
+
} else if (ltfn(comparator2.semver, low.semver, options)) {
|
|
4065
|
+
low = comparator2;
|
|
4066
|
+
}
|
|
4067
|
+
});
|
|
4068
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
4069
|
+
return false;
|
|
4070
|
+
}
|
|
4071
|
+
if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) {
|
|
4072
|
+
return false;
|
|
4073
|
+
} else if (low.operator === ecomp && ltfn(version2, low.semver)) {
|
|
4074
|
+
return false;
|
|
4075
|
+
}
|
|
4076
|
+
}
|
|
4077
|
+
return true;
|
|
4078
|
+
};
|
|
4079
|
+
outside_1 = outside;
|
|
4080
|
+
return outside_1;
|
|
4081
|
+
}
|
|
4082
|
+
var gtr_1;
|
|
4083
|
+
var hasRequiredGtr;
|
|
4084
|
+
function requireGtr() {
|
|
4085
|
+
if (hasRequiredGtr) return gtr_1;
|
|
4086
|
+
hasRequiredGtr = 1;
|
|
4087
|
+
const outside = requireOutside();
|
|
4088
|
+
const gtr = (version2, range2, options) => outside(version2, range2, ">", options);
|
|
4089
|
+
gtr_1 = gtr;
|
|
4090
|
+
return gtr_1;
|
|
4091
|
+
}
|
|
4092
|
+
var ltr_1;
|
|
4093
|
+
var hasRequiredLtr;
|
|
4094
|
+
function requireLtr() {
|
|
4095
|
+
if (hasRequiredLtr) return ltr_1;
|
|
4096
|
+
hasRequiredLtr = 1;
|
|
4097
|
+
const outside = requireOutside();
|
|
4098
|
+
const ltr = (version2, range2, options) => outside(version2, range2, "<", options);
|
|
4099
|
+
ltr_1 = ltr;
|
|
4100
|
+
return ltr_1;
|
|
4101
|
+
}
|
|
4102
|
+
var intersects_1;
|
|
4103
|
+
var hasRequiredIntersects;
|
|
4104
|
+
function requireIntersects() {
|
|
4105
|
+
if (hasRequiredIntersects) return intersects_1;
|
|
4106
|
+
hasRequiredIntersects = 1;
|
|
4107
|
+
const Range = requireRange();
|
|
4108
|
+
const intersects = (r1, r2, options) => {
|
|
4109
|
+
r1 = new Range(r1, options);
|
|
4110
|
+
r2 = new Range(r2, options);
|
|
4111
|
+
return r1.intersects(r2, options);
|
|
4112
|
+
};
|
|
4113
|
+
intersects_1 = intersects;
|
|
4114
|
+
return intersects_1;
|
|
4115
|
+
}
|
|
4116
|
+
var simplify;
|
|
4117
|
+
var hasRequiredSimplify;
|
|
4118
|
+
function requireSimplify() {
|
|
4119
|
+
if (hasRequiredSimplify) return simplify;
|
|
4120
|
+
hasRequiredSimplify = 1;
|
|
4121
|
+
const satisfies = requireSatisfies();
|
|
4122
|
+
const compare = requireCompare();
|
|
4123
|
+
simplify = (versions, range2, options) => {
|
|
4124
|
+
const set = [];
|
|
4125
|
+
let first = null;
|
|
4126
|
+
let prev = null;
|
|
4127
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
4128
|
+
for (const version2 of v) {
|
|
4129
|
+
const included = satisfies(version2, range2, options);
|
|
4130
|
+
if (included) {
|
|
4131
|
+
prev = version2;
|
|
4132
|
+
if (!first) {
|
|
4133
|
+
first = version2;
|
|
4134
|
+
}
|
|
4135
|
+
} else {
|
|
4136
|
+
if (prev) {
|
|
4137
|
+
set.push([first, prev]);
|
|
4138
|
+
}
|
|
4139
|
+
prev = null;
|
|
4140
|
+
first = null;
|
|
4141
|
+
}
|
|
4142
|
+
}
|
|
4143
|
+
if (first) {
|
|
4144
|
+
set.push([first, null]);
|
|
4145
|
+
}
|
|
4146
|
+
const ranges = [];
|
|
4147
|
+
for (const [min, max2] of set) {
|
|
4148
|
+
if (min === max2) {
|
|
4149
|
+
ranges.push(min);
|
|
4150
|
+
} else if (!max2 && min === v[0]) {
|
|
4151
|
+
ranges.push("*");
|
|
4152
|
+
} else if (!max2) {
|
|
4153
|
+
ranges.push(`>=${min}`);
|
|
4154
|
+
} else if (min === v[0]) {
|
|
4155
|
+
ranges.push(`<=${max2}`);
|
|
4156
|
+
} else {
|
|
4157
|
+
ranges.push(`${min} - ${max2}`);
|
|
4158
|
+
}
|
|
4159
|
+
}
|
|
4160
|
+
const simplified = ranges.join(" || ");
|
|
4161
|
+
const original = typeof range2.raw === "string" ? range2.raw : String(range2);
|
|
4162
|
+
return simplified.length < original.length ? simplified : range2;
|
|
4163
|
+
};
|
|
4164
|
+
return simplify;
|
|
4165
|
+
}
|
|
4166
|
+
var subset_1;
|
|
4167
|
+
var hasRequiredSubset;
|
|
4168
|
+
function requireSubset() {
|
|
4169
|
+
if (hasRequiredSubset) return subset_1;
|
|
4170
|
+
hasRequiredSubset = 1;
|
|
4171
|
+
const Range = requireRange();
|
|
4172
|
+
const Comparator = requireComparator();
|
|
4173
|
+
const { ANY } = Comparator;
|
|
4174
|
+
const satisfies = requireSatisfies();
|
|
4175
|
+
const compare = requireCompare();
|
|
4176
|
+
const subset = (sub, dom, options = {}) => {
|
|
4177
|
+
if (sub === dom) {
|
|
4178
|
+
return true;
|
|
4179
|
+
}
|
|
4180
|
+
sub = new Range(sub, options);
|
|
4181
|
+
dom = new Range(dom, options);
|
|
4182
|
+
let sawNonNull = false;
|
|
4183
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
4184
|
+
for (const simpleDom of dom.set) {
|
|
4185
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
4186
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
4187
|
+
if (isSub) {
|
|
4188
|
+
continue OUTER;
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
if (sawNonNull) {
|
|
4192
|
+
return false;
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
return true;
|
|
4196
|
+
};
|
|
4197
|
+
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
4198
|
+
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
4199
|
+
const simpleSubset = (sub, dom, options) => {
|
|
4200
|
+
if (sub === dom) {
|
|
4201
|
+
return true;
|
|
4202
|
+
}
|
|
4203
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
4204
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
4205
|
+
return true;
|
|
4206
|
+
} else if (options.includePrerelease) {
|
|
4207
|
+
sub = minimumVersionWithPreRelease;
|
|
4208
|
+
} else {
|
|
4209
|
+
sub = minimumVersion;
|
|
4210
|
+
}
|
|
4211
|
+
}
|
|
4212
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
4213
|
+
if (options.includePrerelease) {
|
|
4214
|
+
return true;
|
|
4215
|
+
} else {
|
|
4216
|
+
dom = minimumVersion;
|
|
4217
|
+
}
|
|
4218
|
+
}
|
|
4219
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
4220
|
+
let gt, lt;
|
|
4221
|
+
for (const c of sub) {
|
|
4222
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
4223
|
+
gt = higherGT(gt, c, options);
|
|
4224
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
|
4225
|
+
lt = lowerLT(lt, c, options);
|
|
4226
|
+
} else {
|
|
4227
|
+
eqSet.add(c.semver);
|
|
4228
|
+
}
|
|
4229
|
+
}
|
|
4230
|
+
if (eqSet.size > 1) {
|
|
4231
|
+
return null;
|
|
4232
|
+
}
|
|
4233
|
+
let gtltComp;
|
|
4234
|
+
if (gt && lt) {
|
|
4235
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
4236
|
+
if (gtltComp > 0) {
|
|
4237
|
+
return null;
|
|
4238
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
4239
|
+
return null;
|
|
4240
|
+
}
|
|
4241
|
+
}
|
|
4242
|
+
for (const eq of eqSet) {
|
|
4243
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
4244
|
+
return null;
|
|
4245
|
+
}
|
|
4246
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
4247
|
+
return null;
|
|
4248
|
+
}
|
|
4249
|
+
for (const c of dom) {
|
|
4250
|
+
if (!satisfies(eq, String(c), options)) {
|
|
4251
|
+
return false;
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
return true;
|
|
4255
|
+
}
|
|
4256
|
+
let higher, lower;
|
|
4257
|
+
let hasDomLT, hasDomGT;
|
|
4258
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
4259
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
4260
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
4261
|
+
needDomLTPre = false;
|
|
4262
|
+
}
|
|
4263
|
+
for (const c of dom) {
|
|
4264
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
4265
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
4266
|
+
if (gt) {
|
|
4267
|
+
if (needDomGTPre) {
|
|
4268
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
4269
|
+
needDomGTPre = false;
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
4273
|
+
higher = higherGT(gt, c, options);
|
|
4274
|
+
if (higher === c && higher !== gt) {
|
|
4275
|
+
return false;
|
|
4276
|
+
}
|
|
4277
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
|
|
4278
|
+
return false;
|
|
4279
|
+
}
|
|
4280
|
+
}
|
|
4281
|
+
if (lt) {
|
|
4282
|
+
if (needDomLTPre) {
|
|
4283
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
4284
|
+
needDomLTPre = false;
|
|
4285
|
+
}
|
|
4286
|
+
}
|
|
4287
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
4288
|
+
lower = lowerLT(lt, c, options);
|
|
4289
|
+
if (lower === c && lower !== lt) {
|
|
4290
|
+
return false;
|
|
4291
|
+
}
|
|
4292
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
|
|
4293
|
+
return false;
|
|
4294
|
+
}
|
|
4295
|
+
}
|
|
4296
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
4297
|
+
return false;
|
|
4298
|
+
}
|
|
4299
|
+
}
|
|
4300
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
4301
|
+
return false;
|
|
4302
|
+
}
|
|
4303
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
4304
|
+
return false;
|
|
4305
|
+
}
|
|
4306
|
+
if (needDomGTPre || needDomLTPre) {
|
|
4307
|
+
return false;
|
|
4308
|
+
}
|
|
4309
|
+
return true;
|
|
4310
|
+
};
|
|
4311
|
+
const higherGT = (a, b, options) => {
|
|
4312
|
+
if (!a) {
|
|
4313
|
+
return b;
|
|
4314
|
+
}
|
|
4315
|
+
const comp = compare(a.semver, b.semver, options);
|
|
4316
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
4317
|
+
};
|
|
4318
|
+
const lowerLT = (a, b, options) => {
|
|
4319
|
+
if (!a) {
|
|
4320
|
+
return b;
|
|
4321
|
+
}
|
|
4322
|
+
const comp = compare(a.semver, b.semver, options);
|
|
4323
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
4324
|
+
};
|
|
4325
|
+
subset_1 = subset;
|
|
4326
|
+
return subset_1;
|
|
4327
|
+
}
|
|
4328
|
+
var semver$1;
|
|
4329
|
+
var hasRequiredSemver;
|
|
4330
|
+
function requireSemver() {
|
|
4331
|
+
if (hasRequiredSemver) return semver$1;
|
|
4332
|
+
hasRequiredSemver = 1;
|
|
4333
|
+
const internalRe = requireRe();
|
|
4334
|
+
const constants2 = requireConstants();
|
|
4335
|
+
const SemVer = requireSemver$1();
|
|
4336
|
+
const identifiers2 = requireIdentifiers();
|
|
4337
|
+
const parse2 = requireParse$1();
|
|
4338
|
+
const valid2 = requireValid$1();
|
|
4339
|
+
const clean = requireClean();
|
|
4340
|
+
const inc = requireInc();
|
|
4341
|
+
const diff = requireDiff();
|
|
4342
|
+
const major = requireMajor();
|
|
4343
|
+
const minor = requireMinor();
|
|
4344
|
+
const patch = requirePatch();
|
|
4345
|
+
const prerelease = requirePrerelease();
|
|
4346
|
+
const compare = requireCompare();
|
|
4347
|
+
const rcompare = requireRcompare();
|
|
4348
|
+
const compareLoose = requireCompareLoose();
|
|
4349
|
+
const compareBuild = requireCompareBuild();
|
|
4350
|
+
const sort = requireSort();
|
|
4351
|
+
const rsort = requireRsort();
|
|
4352
|
+
const gt = requireGt();
|
|
4353
|
+
const lt = requireLt();
|
|
4354
|
+
const eq = requireEq();
|
|
4355
|
+
const neq = requireNeq();
|
|
4356
|
+
const gte = requireGte();
|
|
4357
|
+
const lte = requireLte();
|
|
4358
|
+
const cmp = requireCmp();
|
|
4359
|
+
const coerce2 = requireCoerce();
|
|
4360
|
+
const Comparator = requireComparator();
|
|
4361
|
+
const Range = requireRange();
|
|
4362
|
+
const satisfies = requireSatisfies();
|
|
4363
|
+
const toComparators = requireToComparators();
|
|
4364
|
+
const maxSatisfying = requireMaxSatisfying();
|
|
4365
|
+
const minSatisfying = requireMinSatisfying();
|
|
4366
|
+
const minVersion = requireMinVersion();
|
|
4367
|
+
const validRange = requireValid();
|
|
4368
|
+
const outside = requireOutside();
|
|
4369
|
+
const gtr = requireGtr();
|
|
4370
|
+
const ltr = requireLtr();
|
|
4371
|
+
const intersects = requireIntersects();
|
|
4372
|
+
const simplifyRange = requireSimplify();
|
|
4373
|
+
const subset = requireSubset();
|
|
4374
|
+
semver$1 = {
|
|
4375
|
+
parse: parse2,
|
|
4376
|
+
valid: valid2,
|
|
4377
|
+
clean,
|
|
4378
|
+
inc,
|
|
4379
|
+
diff,
|
|
4380
|
+
major,
|
|
4381
|
+
minor,
|
|
4382
|
+
patch,
|
|
4383
|
+
prerelease,
|
|
4384
|
+
compare,
|
|
4385
|
+
rcompare,
|
|
4386
|
+
compareLoose,
|
|
4387
|
+
compareBuild,
|
|
4388
|
+
sort,
|
|
4389
|
+
rsort,
|
|
4390
|
+
gt,
|
|
4391
|
+
lt,
|
|
4392
|
+
eq,
|
|
4393
|
+
neq,
|
|
4394
|
+
gte,
|
|
4395
|
+
lte,
|
|
4396
|
+
cmp,
|
|
4397
|
+
coerce: coerce2,
|
|
4398
|
+
Comparator,
|
|
4399
|
+
Range,
|
|
4400
|
+
satisfies,
|
|
4401
|
+
toComparators,
|
|
4402
|
+
maxSatisfying,
|
|
4403
|
+
minSatisfying,
|
|
4404
|
+
minVersion,
|
|
4405
|
+
validRange,
|
|
4406
|
+
outside,
|
|
4407
|
+
gtr,
|
|
4408
|
+
ltr,
|
|
4409
|
+
intersects,
|
|
4410
|
+
simplifyRange,
|
|
4411
|
+
subset,
|
|
4412
|
+
SemVer,
|
|
4413
|
+
re: internalRe.re,
|
|
4414
|
+
src: internalRe.src,
|
|
4415
|
+
tokens: internalRe.t,
|
|
4416
|
+
SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
|
|
4417
|
+
RELEASE_TYPES: constants2.RELEASE_TYPES,
|
|
4418
|
+
compareIdentifiers: identifiers2.compareIdentifiers,
|
|
4419
|
+
rcompareIdentifiers: identifiers2.rcompareIdentifiers
|
|
4420
|
+
};
|
|
4421
|
+
return semver$1;
|
|
4422
|
+
}
|
|
4423
|
+
var semverExports = requireSemver();
|
|
4424
|
+
const semver = /* @__PURE__ */ getDefaultExportFromCjs$2(semverExports);
|
|
2528
4425
|
/*! *****************************************************************************
|
|
2529
4426
|
Copyright (c) Microsoft Corporation.
|
|
2530
4427
|
|
|
@@ -7835,7 +9732,7 @@ function requireBuffer() {
|
|
|
7835
9732
|
);
|
|
7836
9733
|
E(
|
|
7837
9734
|
"ERR_OUT_OF_RANGE",
|
|
7838
|
-
function(str,
|
|
9735
|
+
function(str, range2, input) {
|
|
7839
9736
|
let msg = `The value of "${str}" is out of range.`;
|
|
7840
9737
|
let received = input;
|
|
7841
9738
|
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
@@ -7847,7 +9744,7 @@ function requireBuffer() {
|
|
|
7847
9744
|
}
|
|
7848
9745
|
received += "n";
|
|
7849
9746
|
}
|
|
7850
|
-
msg += ` It must be ${
|
|
9747
|
+
msg += ` It must be ${range2}. Received ${received}`;
|
|
7851
9748
|
return msg;
|
|
7852
9749
|
},
|
|
7853
9750
|
RangeError
|
|
@@ -7870,15 +9767,15 @@ function requireBuffer() {
|
|
|
7870
9767
|
function checkIntBI(value, min, max2, buf, offset, byteLength3) {
|
|
7871
9768
|
if (value > max2 || value < min) {
|
|
7872
9769
|
const n = typeof min === "bigint" ? "n" : "";
|
|
7873
|
-
let
|
|
9770
|
+
let range2;
|
|
7874
9771
|
{
|
|
7875
9772
|
if (min === 0 || min === BigInt(0)) {
|
|
7876
|
-
|
|
9773
|
+
range2 = `>= 0${n} and < 2${n} ** ${(byteLength3 + 1) * 8}${n}`;
|
|
7877
9774
|
} else {
|
|
7878
|
-
|
|
9775
|
+
range2 = `>= -(2${n} ** ${(byteLength3 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength3 + 1) * 8 - 1}${n}`;
|
|
7879
9776
|
}
|
|
7880
9777
|
}
|
|
7881
|
-
throw new errors2.ERR_OUT_OF_RANGE("value",
|
|
9778
|
+
throw new errors2.ERR_OUT_OF_RANGE("value", range2, value);
|
|
7882
9779
|
}
|
|
7883
9780
|
checkBounds(buf, offset, byteLength3);
|
|
7884
9781
|
}
|
|
@@ -9996,8 +11893,8 @@ function requireErrors() {
|
|
|
9996
11893
|
);
|
|
9997
11894
|
E(
|
|
9998
11895
|
"ERR_OUT_OF_RANGE",
|
|
9999
|
-
(str,
|
|
10000
|
-
assert(
|
|
11896
|
+
(str, range2, input) => {
|
|
11897
|
+
assert(range2, 'Missing "range" argument');
|
|
10001
11898
|
let received;
|
|
10002
11899
|
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
10003
11900
|
received = addNumericalSeparator(String(input));
|
|
@@ -10010,7 +11907,7 @@ function requireErrors() {
|
|
|
10010
11907
|
} else {
|
|
10011
11908
|
received = inspect2(input);
|
|
10012
11909
|
}
|
|
10013
|
-
return `The value of "${str}" is out of range. It must be ${
|
|
11910
|
+
return `The value of "${str}" is out of range. It must be ${range2}. Received ${received}`;
|
|
10014
11911
|
},
|
|
10015
11912
|
RangeError
|
|
10016
11913
|
);
|
|
@@ -19242,7 +21139,7 @@ ieee754$1.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
19242
21139
|
);
|
|
19243
21140
|
E(
|
|
19244
21141
|
"ERR_OUT_OF_RANGE",
|
|
19245
|
-
function(str,
|
|
21142
|
+
function(str, range2, input) {
|
|
19246
21143
|
let msg = `The value of "${str}" is out of range.`;
|
|
19247
21144
|
let received = input;
|
|
19248
21145
|
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
@@ -19254,7 +21151,7 @@ ieee754$1.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
19254
21151
|
}
|
|
19255
21152
|
received += "n";
|
|
19256
21153
|
}
|
|
19257
|
-
msg += ` It must be ${
|
|
21154
|
+
msg += ` It must be ${range2}. Received ${received}`;
|
|
19258
21155
|
return msg;
|
|
19259
21156
|
},
|
|
19260
21157
|
RangeError
|
|
@@ -19277,15 +21174,15 @@ ieee754$1.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
19277
21174
|
function checkIntBI(value, min, max2, buf, offset, byteLength3) {
|
|
19278
21175
|
if (value > max2 || value < min) {
|
|
19279
21176
|
const n = typeof min === "bigint" ? "n" : "";
|
|
19280
|
-
let
|
|
21177
|
+
let range2;
|
|
19281
21178
|
{
|
|
19282
21179
|
if (min === 0 || min === BigInt(0)) {
|
|
19283
|
-
|
|
21180
|
+
range2 = `>= 0${n} and < 2${n} ** ${(byteLength3 + 1) * 8}${n}`;
|
|
19284
21181
|
} else {
|
|
19285
|
-
|
|
21182
|
+
range2 = `>= -(2${n} ** ${(byteLength3 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength3 + 1) * 8 - 1}${n}`;
|
|
19286
21183
|
}
|
|
19287
21184
|
}
|
|
19288
|
-
throw new errors2.ERR_OUT_OF_RANGE("value",
|
|
21185
|
+
throw new errors2.ERR_OUT_OF_RANGE("value", range2, value);
|
|
19289
21186
|
}
|
|
19290
21187
|
checkBounds(buf, offset, byteLength3);
|
|
19291
21188
|
}
|
|
@@ -19517,7 +21414,7 @@ const pkg$c = {
|
|
|
19517
21414
|
description: "Web Audio API device driver"
|
|
19518
21415
|
};
|
|
19519
21416
|
async function cli$c(options) {
|
|
19520
|
-
options.kernel.log
|
|
21417
|
+
options.kernel.log.debug(`${pkg$c.name} CLI`, options.args);
|
|
19521
21418
|
const usage = `
|
|
19522
21419
|
Usage: audio <command>
|
|
19523
21420
|
|
|
@@ -20033,7 +21930,7 @@ async function cli$a(options) {
|
|
|
20033
21930
|
win.close();
|
|
20034
21931
|
resolve2(true);
|
|
20035
21932
|
} catch (error) {
|
|
20036
|
-
kernel.log
|
|
21933
|
+
kernel.log.error("Error requesting Bluetooth device", error);
|
|
20037
21934
|
kernel.storage.session.removeItem("permission:bluetooth");
|
|
20038
21935
|
win.close();
|
|
20039
21936
|
const dialog = kernel.windows.dialog({
|
|
@@ -20902,7 +22799,7 @@ const pkg$7 = {
|
|
|
20902
22799
|
description: "WebGPU device driver"
|
|
20903
22800
|
};
|
|
20904
22801
|
async function cli$7(options) {
|
|
20905
|
-
options.kernel.log
|
|
22802
|
+
options.kernel.log.debug(`${pkg$7.name} CLI`, options.args);
|
|
20906
22803
|
const usage = `
|
|
20907
22804
|
Usage: gpu <command>
|
|
20908
22805
|
|
|
@@ -22439,7 +24336,7 @@ async function getDrivers(kernel) {
|
|
|
22439
24336
|
});
|
|
22440
24337
|
}
|
|
22441
24338
|
} catch (error) {
|
|
22442
|
-
kernel.log
|
|
24339
|
+
kernel.log.error(`Failed to initialize WebGL device: ${error}`);
|
|
22443
24340
|
}
|
|
22444
24341
|
return drivers;
|
|
22445
24342
|
}
|
|
@@ -22582,7 +24479,7 @@ class Dom {
|
|
|
22582
24479
|
}
|
|
22583
24480
|
async topbar(show) {
|
|
22584
24481
|
if (!this._topbar) return;
|
|
22585
|
-
const { default: topbar } = await import("./topbar.min-
|
|
24482
|
+
const { default: topbar } = await import("./topbar.min-CDkSVOxV.js").then((n) => n.t);
|
|
22586
24483
|
this._topbarShow = show ?? !this._topbarShow;
|
|
22587
24484
|
if (this._topbarShow) topbar.show();
|
|
22588
24485
|
else topbar.hide();
|
|
@@ -27184,16 +29081,21 @@ class Filesystem {
|
|
|
27184
29081
|
const tarball = await this.fs.readFile(tarballPath);
|
|
27185
29082
|
const decompressed = pako.ungzip(tarball);
|
|
27186
29083
|
const tar = await TarReader.load(decompressed);
|
|
29084
|
+
const hasPackageDir = tar.fileInfos.some((file) => file.name.startsWith("package/"));
|
|
29085
|
+
const stripPrefix = hasPackageDir ? "package/" : "";
|
|
27187
29086
|
for (const file of tar.fileInfos) {
|
|
29087
|
+
if (hasPackageDir && !file.name.startsWith(stripPrefix)) continue;
|
|
29088
|
+
const relativePath = hasPackageDir ? file.name.slice(stripPrefix.length) : file.name;
|
|
29089
|
+
if (!relativePath) continue;
|
|
27188
29090
|
try {
|
|
27189
|
-
|
|
27190
|
-
|
|
27191
|
-
|
|
27192
|
-
|
|
27193
|
-
|
|
29091
|
+
if (relativePath.endsWith("/")) {
|
|
29092
|
+
await this.fs.mkdir(path.join(extractPath, relativePath), { mode: 493, recursive: true });
|
|
29093
|
+
continue;
|
|
29094
|
+
}
|
|
29095
|
+
await this.fs.mkdir(path.join(extractPath, path.dirname(relativePath)), { mode: 493, recursive: true });
|
|
27194
29096
|
const blob = tar.getFileBlob(file.name);
|
|
27195
29097
|
const binaryData = await blob.arrayBuffer().then((buffer2) => new Uint8Array(buffer2));
|
|
27196
|
-
const filePath = path.join(extractPath,
|
|
29098
|
+
const filePath = path.join(extractPath, relativePath);
|
|
27197
29099
|
await this.fs.writeFile(filePath, binaryData, { encoding: "binary", mode: 420 });
|
|
27198
29100
|
} catch (error) {
|
|
27199
29101
|
console.error(`Failed to extract file ${file.name}: ${error}`);
|
|
@@ -50613,7 +52515,7 @@ async function createSimpleWebSocket(url) {
|
|
|
50613
52515
|
case "node": {
|
|
50614
52516
|
let WebSocket2;
|
|
50615
52517
|
try {
|
|
50616
|
-
WebSocket2 = (await import("./browser-
|
|
52518
|
+
WebSocket2 = (await import("./browser-D_CtuxSB.js").then((n) => n.b)).default;
|
|
50617
52519
|
} catch (error) {
|
|
50618
52520
|
try {
|
|
50619
52521
|
WebSocket2 = __require("ws");
|
|
@@ -69555,7 +71457,7 @@ const TerminalCommands = (kernel, shell, terminal) => {
|
|
|
69555
71457
|
{ name: "reinstall", type: Boolean, description: "Reinstall the package if it is already installed" }
|
|
69556
71458
|
],
|
|
69557
71459
|
run: async (argv) => {
|
|
69558
|
-
const { default: install } = await import("./install-
|
|
71460
|
+
const { default: install } = await import("./install-Ds1oWgTf.js");
|
|
69559
71461
|
return await install({ kernel, shell, terminal, args: [argv.package, argv.registry, argv.reinstall] });
|
|
69560
71462
|
}
|
|
69561
71463
|
}),
|
|
@@ -71171,8 +73073,8 @@ const DefaultTerminalOptions = {
|
|
|
71171
73073
|
},
|
|
71172
73074
|
linkHandler: {
|
|
71173
73075
|
allowNonHttpProtocols: true,
|
|
71174
|
-
activate: (event, text13,
|
|
71175
|
-
console.log("activate", event, text13,
|
|
73076
|
+
activate: (event, text13, range2) => {
|
|
73077
|
+
console.log("activate", event, text13, range2);
|
|
71176
73078
|
if (text13.startsWith("http")) window.open(text13, "_blank", "noopener,noreferrer");
|
|
71177
73079
|
if (text13.startsWith("ecmaos://")) {
|
|
71178
73080
|
const [protocol, argstr] = text13.replace("ecmaos://", "").split("?");
|
|
@@ -71291,7 +73193,7 @@ class Terminal extends xtermExports.Terminal {
|
|
|
71291
73193
|
this._kernel.events.dispatch(TerminalEvents.MESSAGE, { terminal: this, message: event });
|
|
71292
73194
|
if (event.data.startsWith("@ecmaos/metal")) {
|
|
71293
73195
|
const [name, version2, id, encodedPublicKey] = event.data.split(":");
|
|
71294
|
-
this._kernel.log
|
|
73196
|
+
this._kernel.log.info(`${name}:${version2}:${id} connected`);
|
|
71295
73197
|
this._socketKey = JSON.parse(atob(encodedPublicKey));
|
|
71296
73198
|
}
|
|
71297
73199
|
});
|
|
@@ -71524,7 +73426,7 @@ class Terminal extends xtermExports.Terminal {
|
|
|
71524
73426
|
this._cmd = "";
|
|
71525
73427
|
this._cursorPosition = 0;
|
|
71526
73428
|
this.unlisten();
|
|
71527
|
-
this.write(this.prompt());
|
|
73429
|
+
this.write("\n" + this.prompt());
|
|
71528
73430
|
this.listen();
|
|
71529
73431
|
return;
|
|
71530
73432
|
case "l":
|
|
@@ -71560,7 +73462,7 @@ class Terminal extends xtermExports.Terminal {
|
|
|
71560
73462
|
try {
|
|
71561
73463
|
this._kernel.storage.local.setItem(`history:${uid}`, JSON.stringify(this._history[uid] || []));
|
|
71562
73464
|
} catch (error) {
|
|
71563
|
-
this._kernel.log
|
|
73465
|
+
this._kernel.log.error("Failed to save history", error);
|
|
71564
73466
|
}
|
|
71565
73467
|
}
|
|
71566
73468
|
this._historyPosition = this._history[uid]?.length || 0;
|
|
@@ -71574,7 +73476,7 @@ class Terminal extends xtermExports.Terminal {
|
|
|
71574
73476
|
}
|
|
71575
73477
|
this._cmd = "";
|
|
71576
73478
|
this._cursorPosition = 0;
|
|
71577
|
-
this.write(
|
|
73479
|
+
this.write(ansi$5.erase.inLine(2) + this.prompt());
|
|
71578
73480
|
break;
|
|
71579
73481
|
case "Backspace":
|
|
71580
73482
|
if (this._cursorPosition > 0) {
|
|
@@ -74415,7 +76317,7 @@ class Process {
|
|
|
74415
76317
|
this._command = options.command || "";
|
|
74416
76318
|
this._cwd = options.cwd || options.shell?.cwd || "/";
|
|
74417
76319
|
this._entry = options.entry || ((params) => {
|
|
74418
|
-
options.kernel?.log
|
|
76320
|
+
options.kernel?.log.silly(params);
|
|
74419
76321
|
return Promise.resolve(0);
|
|
74420
76322
|
});
|
|
74421
76323
|
this._events = new Events();
|
|
@@ -74589,7 +76491,7 @@ class Service {
|
|
|
74589
76491
|
data: await this._kernel.filesystem.fs.readFile(data.file)
|
|
74590
76492
|
});
|
|
74591
76493
|
} catch (error) {
|
|
74592
|
-
this._kernel.log
|
|
76494
|
+
this._kernel.log.error(error instanceof Error ? error.message : "Unknown error");
|
|
74593
76495
|
event.source?.postMessage({
|
|
74594
76496
|
type: "fs",
|
|
74595
76497
|
file: data.file,
|
|
@@ -74603,10 +76505,10 @@ class Service {
|
|
|
74603
76505
|
try {
|
|
74604
76506
|
switch (data.type) {
|
|
74605
76507
|
case "log":
|
|
74606
|
-
this._kernel.log
|
|
76508
|
+
this._kernel.log.info(`[ServiceWorker] ${data.message}`);
|
|
74607
76509
|
break;
|
|
74608
76510
|
case "error":
|
|
74609
|
-
this._kernel.log
|
|
76511
|
+
this._kernel.log.error(`[ServiceWorker] ${data.message}`);
|
|
74610
76512
|
break;
|
|
74611
76513
|
case "fs":
|
|
74612
76514
|
sendFile(event);
|
|
@@ -74614,7 +76516,7 @@ class Service {
|
|
|
74614
76516
|
}
|
|
74615
76517
|
} catch (error) {
|
|
74616
76518
|
if (data.type === "fs") {
|
|
74617
|
-
this._kernel.log
|
|
76519
|
+
this._kernel.log.error(`[ServiceWorker] Error reading file ${data.file}: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
74618
76520
|
event.source?.postMessage({
|
|
74619
76521
|
type: "fs",
|
|
74620
76522
|
file: data.file,
|
|
@@ -74651,7 +76553,7 @@ class Service {
|
|
|
74651
76553
|
registration.addEventListener("progress", () => {
|
|
74652
76554
|
if (!registration.downloadTotal) return;
|
|
74653
76555
|
const percent = Math.round(registration.downloaded / registration.downloadTotal * 100);
|
|
74654
|
-
this._kernel.log
|
|
76556
|
+
this._kernel.log.info(`${percent}% of ${urls.length} files downloaded.`);
|
|
74655
76557
|
});
|
|
74656
76558
|
navigator.serviceWorker.addEventListener("message", async (e2) => {
|
|
74657
76559
|
const root = this._kernel.shell.cwd || "/tmp";
|
|
@@ -74663,9 +76565,9 @@ class Service {
|
|
|
74663
76565
|
const response = await fetch(url);
|
|
74664
76566
|
const buffer2 = await response.arrayBuffer();
|
|
74665
76567
|
await this._kernel.filesystem.fs.writeFile(`${destination}/${url.split("/").pop()}`, new Uint8Array(buffer2));
|
|
74666
|
-
this._kernel.log
|
|
76568
|
+
this._kernel.log.info(`Saved ${url} to ${destination}/${url.split("/").pop()}.`);
|
|
74667
76569
|
} catch (error) {
|
|
74668
|
-
this._kernel.log
|
|
76570
|
+
this._kernel.log.error(`Failed to fetch ${url}: ${error}`);
|
|
74669
76571
|
}
|
|
74670
76572
|
}
|
|
74671
76573
|
delete this._fetches[id];
|
|
@@ -75189,21 +77091,21 @@ class Storage {
|
|
|
75189
77091
|
const open2 = this.indexed.open(name, options.indexed?.version || 1);
|
|
75190
77092
|
open2.onsuccess = () => {
|
|
75191
77093
|
this._db = open2.result;
|
|
75192
|
-
this._kernel.log
|
|
77094
|
+
this._kernel.log.silly(`IndexedDB connection to ${name} successful`);
|
|
75193
77095
|
};
|
|
75194
77096
|
open2.onerror = () => {
|
|
75195
|
-
this._kernel.log
|
|
77097
|
+
this._kernel.log.error("IndexedDB connection failed");
|
|
75196
77098
|
};
|
|
75197
77099
|
open2.onupgradeneeded = (event) => {
|
|
75198
77100
|
const db = open2.result;
|
|
75199
|
-
db.onerror = (event2) => this._kernel.log
|
|
77101
|
+
db.onerror = (event2) => this._kernel.log.error("IndexedDB connection failed", event2);
|
|
75200
77102
|
const store = db.createObjectStore("ecmaos:storage", { keyPath: "id", autoIncrement: true });
|
|
75201
77103
|
switch (event.newVersion) {
|
|
75202
77104
|
case 1:
|
|
75203
77105
|
store.createIndex("data", "data", { unique: false });
|
|
75204
77106
|
break;
|
|
75205
77107
|
}
|
|
75206
|
-
this._kernel.log
|
|
77108
|
+
this._kernel.log.silly(`IndexedDB schema ${event.newVersion === 1 ? "created" : "updated to version ${event.newVersion}"}`);
|
|
75207
77109
|
};
|
|
75208
77110
|
}
|
|
75209
77111
|
}
|
|
@@ -75219,7 +77121,7 @@ class Storage {
|
|
|
75219
77121
|
if (!usage) throw new Error("Storage usage not available");
|
|
75220
77122
|
return usage;
|
|
75221
77123
|
} catch (error) {
|
|
75222
|
-
this._kernel.log
|
|
77124
|
+
this._kernel.log.error("Storage usage failed", error);
|
|
75223
77125
|
return null;
|
|
75224
77126
|
}
|
|
75225
77127
|
}
|
|
@@ -75319,7 +77221,7 @@ class Users {
|
|
|
75319
77221
|
if (shadowEntry) {
|
|
75320
77222
|
const [, , , password, publicKey, encryptedPrivateKey] = shadowEntry.split(":");
|
|
75321
77223
|
if (!publicKey || !encryptedPrivateKey) {
|
|
75322
|
-
kernel.log
|
|
77224
|
+
kernel.log.warn(`User ${username} has no keypair`);
|
|
75323
77225
|
continue;
|
|
75324
77226
|
}
|
|
75325
77227
|
const keypair = { publicKey: JSON.parse(atob(publicKey)), privateKey: encryptedPrivateKey };
|
|
@@ -75334,7 +77236,7 @@ class Users {
|
|
|
75334
77236
|
keypair
|
|
75335
77237
|
}, { noWrite: true, noHome: true, noHash: true });
|
|
75336
77238
|
} else {
|
|
75337
|
-
kernel.log
|
|
77239
|
+
kernel.log.warn(`User ${username} not found in /etc/shadow`);
|
|
75338
77240
|
}
|
|
75339
77241
|
}
|
|
75340
77242
|
}
|
|
@@ -78437,7 +80339,7 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
78437
80339
|
);
|
|
78438
80340
|
E(
|
|
78439
80341
|
"ERR_OUT_OF_RANGE",
|
|
78440
|
-
function(str,
|
|
80342
|
+
function(str, range2, input) {
|
|
78441
80343
|
let msg = `The value of "${str}" is out of range.`;
|
|
78442
80344
|
let received = input;
|
|
78443
80345
|
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
@@ -78449,7 +80351,7 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
78449
80351
|
}
|
|
78450
80352
|
received += "n";
|
|
78451
80353
|
}
|
|
78452
|
-
msg += ` It must be ${
|
|
80354
|
+
msg += ` It must be ${range2}. Received ${received}`;
|
|
78453
80355
|
return msg;
|
|
78454
80356
|
},
|
|
78455
80357
|
RangeError
|
|
@@ -78472,15 +80374,15 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
|
|
|
78472
80374
|
function checkIntBI(value, min, max2, buf, offset, byteLength3) {
|
|
78473
80375
|
if (value > max2 || value < min) {
|
|
78474
80376
|
const n = typeof min === "bigint" ? "n" : "";
|
|
78475
|
-
let
|
|
80377
|
+
let range2;
|
|
78476
80378
|
{
|
|
78477
80379
|
if (min === 0 || min === BigInt(0)) {
|
|
78478
|
-
|
|
80380
|
+
range2 = `>= 0${n} and < 2${n} ** ${(byteLength3 + 1) * 8}${n}`;
|
|
78479
80381
|
} else {
|
|
78480
|
-
|
|
80382
|
+
range2 = `>= -(2${n} ** ${(byteLength3 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength3 + 1) * 8 - 1}${n}`;
|
|
78481
80383
|
}
|
|
78482
80384
|
}
|
|
78483
|
-
throw new errors2.ERR_OUT_OF_RANGE("value",
|
|
80385
|
+
throw new errors2.ERR_OUT_OF_RANGE("value", range2, value);
|
|
78484
80386
|
}
|
|
78485
80387
|
checkBounds(buf, offset, byteLength3);
|
|
78486
80388
|
}
|
|
@@ -82593,10 +84495,10 @@ var createBIOS = (() => {
|
|
|
82593
84495
|
return moduleRtn;
|
|
82594
84496
|
};
|
|
82595
84497
|
})();
|
|
82596
|
-
const __vite_import_meta_env__ = { "AUTHOR": { "name": "Jay Mathis", "email": "code@mathis.network", "url": "https://github.com/mathiscode" }, "BASE_URL": "/", "DESCRIPTION": "ecmaOS: Micro-kernel and framework for web technologies", "DEV": false, "HOMEPAGE": "https://ecmaos.sh", "KNOWN_ISSUES": ["Keyboard is broken on mobile; ecmaOS is not mobile-friendly at this time", "Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "CTRL-C will return you to a prompt, but doesn't currently interrupt a process", "Lots of unfinished work; watch your step"], "MODE": "production", "NAME": "@ecmaos/kernel", "PROD": true, "REPOSITORY": "https://github.com/ecmaos/ecmaos", "SSR": false, "TIPS": ["You can
|
|
84498
|
+
const __vite_import_meta_env__ = { "AUTHOR": { "name": "Jay Mathis", "email": "code@mathis.network", "url": "https://github.com/mathiscode" }, "BASE_URL": "/", "DESCRIPTION": "ecmaOS: Micro-kernel and framework for web technologies", "DEV": false, "HOMEPAGE": "https://ecmaos.sh", "KNOWN_ISSUES": ["Keyboard is broken on mobile; ecmaOS is not mobile-friendly at this time", "Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "CTRL-C will return you to a prompt, but doesn't currently interrupt a process", "Lots of unfinished work; watch your step"], "MODE": "production", "NAME": "@ecmaos/kernel", "PROD": true, "REPOSITORY": "https://github.com/ecmaos/ecmaos", "SSR": false, "TIPS": ["If it ever fails to boot, check your logs or try clearing all data", "You can run some devices that offer a CLI - e.g. '/dev/battery --help'", "Use the 'install' command to install packages - e.g. 'install @ecmaos-apps/news'", "Use the 'news' command to see the latest news about ecmaOS", "Type 'ls /bin' to see all built-in commands"], "VERSION": "0.2.7", "VITE_APP_SHOW_DEFAULT_LOGIN": "true", "VITE_AUTOLOGIN_PASSWORD": "root", "VITE_AUTOLOGIN_USERNAME": "root", "VITE_KERNEL_INTERVALS_PROC": "1000", "VITE_KERNEL_MODULES": "@ecmaos-modules/boilerplate@0.1.0", "VITE_METAL_SOCKET": "ws://localhost:30445/socket", "VITE_PORT": "30443", "VITE_RECOMMENDED_APPS": "@ecmaos-apps/code,@ecmaos-apps/webamp,@ecmaos-apps/news" };
|
|
82597
84499
|
var define_import_meta_env_AUTHOR_default = { name: "Jay Mathis", email: "code@mathis.network", url: "https://github.com/mathiscode" };
|
|
82598
84500
|
var define_import_meta_env_KNOWN_ISSUES_default = ["Keyboard is broken on mobile; ecmaOS is not mobile-friendly at this time", "Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "CTRL-C will return you to a prompt, but doesn't currently interrupt a process", "Lots of unfinished work; watch your step"];
|
|
82599
|
-
var define_import_meta_env_TIPS_default = ["You can
|
|
84501
|
+
var define_import_meta_env_TIPS_default = ["If it ever fails to boot, check your logs or try clearing all data", "You can run some devices that offer a CLI - e.g. '/dev/battery --help'", "Use the 'install' command to install packages - e.g. 'install @ecmaos-apps/news'", "Use the 'news' command to see the latest news about ecmaOS", "Type 'ls /bin' to see all built-in commands"];
|
|
82600
84502
|
const DefaultKernelOptions = {
|
|
82601
84503
|
dom: DefaultDomOptions,
|
|
82602
84504
|
log: DefaultLogOptions,
|
|
@@ -82637,7 +84539,7 @@ class Kernel {
|
|
|
82637
84539
|
/** Name of the kernel */
|
|
82638
84540
|
__publicField(this, "name", "@ecmaos/kernel");
|
|
82639
84541
|
/** Version string of the kernel */
|
|
82640
|
-
__publicField(this, "version", "0.2.
|
|
84542
|
+
__publicField(this, "version", "0.2.7");
|
|
82641
84543
|
/** Authentication and authorization service */
|
|
82642
84544
|
__publicField(this, "auth");
|
|
82643
84545
|
/** BIOS module providing low-level functionality */
|
|
@@ -82660,7 +84562,7 @@ class Kernel {
|
|
|
82660
84562
|
__publicField(this, "intervals");
|
|
82661
84563
|
/** Keyboard interface */
|
|
82662
84564
|
__publicField(this, "keyboard");
|
|
82663
|
-
/** Logging system
|
|
84565
|
+
/** Logging system */
|
|
82664
84566
|
__publicField(this, "log");
|
|
82665
84567
|
/** Memory management service */
|
|
82666
84568
|
__publicField(this, "memory");
|
|
@@ -82707,7 +84609,7 @@ class Kernel {
|
|
|
82707
84609
|
this.i18n = new I18n2(this.options.i18n);
|
|
82708
84610
|
this.intervals = new Intervals();
|
|
82709
84611
|
this.keyboard = navigator.keyboard;
|
|
82710
|
-
this.log = this.options.log ? new Log(this.options.log) :
|
|
84612
|
+
this.log = this.options.log ? new Log(this.options.log) : new Log();
|
|
82711
84613
|
this.memory = new Memory();
|
|
82712
84614
|
this.modules = /* @__PURE__ */ new Map();
|
|
82713
84615
|
this.processes = new ProcessManager();
|
|
@@ -82750,7 +84652,7 @@ class Kernel {
|
|
|
82750
84652
|
try {
|
|
82751
84653
|
this.dom.topbar();
|
|
82752
84654
|
this.terminal.unlisten();
|
|
82753
|
-
this.log
|
|
84655
|
+
this.log.attachTransport((logObj) => {
|
|
82754
84656
|
if (!logObj?.["_meta"]) return;
|
|
82755
84657
|
const acceptedLevels = ["WARN", "ERROR"];
|
|
82756
84658
|
if (!acceptedLevels.includes(logObj["_meta"].logLevelName)) return;
|
|
@@ -82789,9 +84691,9 @@ class Kernel {
|
|
|
82789
84691
|
logoFiglet = figlet.textSync(__vite_import_meta_env__["FIGLET_TEXT"] || "ECMAOS", { font: figletFont });
|
|
82790
84692
|
this.terminal.writeln(colorFiglet(figletColor, logoFiglet));
|
|
82791
84693
|
} catch (error) {
|
|
82792
|
-
this.log
|
|
84694
|
+
this.log.error(`Failed to load figlet font ${figletFont}: ${error.message}`);
|
|
82793
84695
|
}
|
|
82794
|
-
this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.
|
|
84696
|
+
this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.7"}`);
|
|
82795
84697
|
this.terminal.writeln(`${t2("kernel.madeBy", "Made with ❤️ by Jay Mathis")} ${this.terminal.createSpecialLink(
|
|
82796
84698
|
define_import_meta_env_AUTHOR_default?.url || "https://github.com/mathiscode",
|
|
82797
84699
|
`${define_import_meta_env_AUTHOR_default?.name} <${define_import_meta_env_AUTHOR_default?.email}>`
|
|
@@ -82810,13 +84712,13 @@ class Kernel {
|
|
|
82810
84712
|
spinner.start();
|
|
82811
84713
|
if (logoFiglet) console.log(`%c${logoFiglet}`, "color: green");
|
|
82812
84714
|
console.log(`%c${"https://github.com/ecmaos/ecmaos"}`, "color: blue; text-decoration: underline; font-size: 16px");
|
|
82813
|
-
this.log.info(`${"@ecmaos/kernel"} v${"0.2.
|
|
84715
|
+
this.log.info(`${"@ecmaos/kernel"} v${"0.2.7"}`);
|
|
82814
84716
|
if (Notification?.permission === "default") Notification.requestPermission();
|
|
82815
|
-
if (Notification?.permission === "denied") this.log
|
|
84717
|
+
if (Notification?.permission === "denied") this.log.warn(t2("kernel.permissionNotificationDenied", "Notification permission denied"));
|
|
82816
84718
|
this.intervals.set("title-blink", () => {
|
|
82817
84719
|
globalThis.document.title = globalThis.document.title.includes("_") ? "ecmaos# " : "ecmaos# _";
|
|
82818
84720
|
}, 600);
|
|
82819
|
-
this.toast.success(`${"@ecmaos/kernel"} v${"0.2.
|
|
84721
|
+
this.toast.success(`${"@ecmaos/kernel"} v${"0.2.7"}`);
|
|
82820
84722
|
}
|
|
82821
84723
|
await this.configure({ filesystem: Filesystem.options() });
|
|
82822
84724
|
const requiredPaths = [
|
|
@@ -82859,7 +84761,7 @@ class Kernel {
|
|
|
82859
84761
|
if (specialPermissions[path2]) mode2 = specialPermissions[path2];
|
|
82860
84762
|
if (!await this.filesystem.fs.exists(path2)) await this.filesystem.fs.mkdir(path2, { recursive: true, mode: mode2 });
|
|
82861
84763
|
}
|
|
82862
|
-
this.log
|
|
84764
|
+
this.log.attachTransport((logObj) => {
|
|
82863
84765
|
if (!logObj._meta) return;
|
|
82864
84766
|
const formattedDate = new Date(logObj._meta.date).toLocaleString(this.memory.config.get("locale") || "en-US", {
|
|
82865
84767
|
year: "numeric",
|
|
@@ -82886,7 +84788,7 @@ class Kernel {
|
|
|
82886
84788
|
await this.registerProc();
|
|
82887
84789
|
await this.registerPackages();
|
|
82888
84790
|
this.intervals.set("/proc", this.registerProc.bind(this), "1000");
|
|
82889
|
-
const modules = "@ecmaos-modules/
|
|
84791
|
+
const modules = "@ecmaos-modules/boilerplate@0.1.0";
|
|
82890
84792
|
if (modules) {
|
|
82891
84793
|
const mods = modules.split(",");
|
|
82892
84794
|
for (const mod of mods) {
|
|
@@ -82895,14 +84797,14 @@ class Kernel {
|
|
|
82895
84797
|
const name = spec?.[1];
|
|
82896
84798
|
const version2 = spec?.[2];
|
|
82897
84799
|
if (!name) {
|
|
82898
|
-
this.log
|
|
84800
|
+
this.log.error(`Failed to load module ${mod}: Invalid package name format`);
|
|
82899
84801
|
continue;
|
|
82900
84802
|
}
|
|
82901
84803
|
if (!version2) {
|
|
82902
|
-
this.log
|
|
84804
|
+
this.log.error(`Failed to load module ${mod}: No version specified`);
|
|
82903
84805
|
continue;
|
|
82904
84806
|
}
|
|
82905
|
-
this.log
|
|
84807
|
+
this.log.info(`Loading module ${name}@${version2}`);
|
|
82906
84808
|
const [scope, pkg2] = name.split("/");
|
|
82907
84809
|
const pkgPath = `/usr/lib/${scope ? `${scope}/` : ""}${pkg2}/${version2}`;
|
|
82908
84810
|
const exists2 = await this.filesystem.fs.exists(pkgPath);
|
|
@@ -82912,11 +84814,11 @@ class Kernel {
|
|
|
82912
84814
|
if (result !== 0) throw new Error(`Failed to install module ${name}@${version2}: ${result}`);
|
|
82913
84815
|
if (!await this.filesystem.fs.exists(pkgPath)) throw new Error(`Failed to install module ${name}@${version2}: ${result}`);
|
|
82914
84816
|
}
|
|
82915
|
-
const pkgJson = await this.filesystem.fs.readFile(`${pkgPath}/package
|
|
84817
|
+
const pkgJson = await this.filesystem.fs.readFile(`${pkgPath}/package.json`, "utf-8");
|
|
82916
84818
|
const pkgData = JSON.parse(pkgJson);
|
|
82917
84819
|
const mainFile = this.getPackageMainExport(pkgData);
|
|
82918
84820
|
if (!mainFile) throw new Error(`Failed to load module ${name}@${version2}: No main export found`);
|
|
82919
|
-
const mainPath = path.join(pkgPath,
|
|
84821
|
+
const mainPath = path.join(pkgPath, mainFile);
|
|
82920
84822
|
const module = await import(
|
|
82921
84823
|
/* @vite-ignore */
|
|
82922
84824
|
`/swapi/fs${mainPath}`
|
|
@@ -82925,7 +84827,7 @@ class Kernel {
|
|
|
82925
84827
|
module.init?.(this.id);
|
|
82926
84828
|
this.modules.set(modname, module);
|
|
82927
84829
|
} catch (error) {
|
|
82928
|
-
this.log
|
|
84830
|
+
this.log.error(`Failed to load module ${mod}: ${error.message}`);
|
|
82929
84831
|
}
|
|
82930
84832
|
}
|
|
82931
84833
|
}
|
|
@@ -82933,7 +84835,7 @@ class Kernel {
|
|
|
82933
84835
|
if (!await this.filesystem.fs.exists("/etc/passwd")) await this.users.add({ username: "root", password: "root", home: "/root" }, { noHome: true });
|
|
82934
84836
|
else await this.users.load();
|
|
82935
84837
|
} catch (err2) {
|
|
82936
|
-
this.log
|
|
84838
|
+
this.log.error(err2);
|
|
82937
84839
|
this.terminal.writeln(chalk$1.red(err2.message));
|
|
82938
84840
|
throw err2;
|
|
82939
84841
|
}
|
|
@@ -82997,7 +84899,7 @@ class Kernel {
|
|
|
82997
84899
|
async exit() {
|
|
82998
84900
|
}
|
|
82999
84901
|
}
|
|
83000
|
-
if (!await this.filesystem.fs.exists("/boot/init")) await this.filesystem.fs.writeFile("/boot/init", "#!ecmaos:script:init\n\n");
|
|
84902
|
+
if (!await this.filesystem.fs.exists("/boot/init")) await this.filesystem.fs.writeFile("/boot/init", "#!ecmaos:bin:script:init\n\n");
|
|
83001
84903
|
const initProcess = new InitProcess({
|
|
83002
84904
|
args: [],
|
|
83003
84905
|
command: "init",
|
|
@@ -83010,11 +84912,25 @@ class Kernel {
|
|
|
83010
84912
|
});
|
|
83011
84913
|
initProcess.start();
|
|
83012
84914
|
this._state = KernelState.RUNNING;
|
|
84915
|
+
if (!this.storage.local.getItem("ecmaos:first-boot")) {
|
|
84916
|
+
const recommendedApps = "@ecmaos-apps/code,@ecmaos-apps/webamp,@ecmaos-apps/news";
|
|
84917
|
+
if (recommendedApps) {
|
|
84918
|
+
const apps = recommendedApps.split(",");
|
|
84919
|
+
this.terminal.writeln("\n" + chalk$1.yellow.bold(this.i18n.t("kernel.recommendedApps", "Recommended apps:")));
|
|
84920
|
+
this.terminal.writeln(chalk$1.green(apps.map((app) => `- ${app}`).join("\n")));
|
|
84921
|
+
this.terminal.write(chalk$1.green.bold(this.i18n.t("kernel.installRecommendedApps", "Do you want to install the recommended apps? (Y/n)")));
|
|
84922
|
+
const answer = await this.terminal.readline();
|
|
84923
|
+
if (answer.toLowerCase()[0] === "y" || answer === "") {
|
|
84924
|
+
for (const app of apps) await this.shell.execute(`/bin/install --reinstall ${app}`);
|
|
84925
|
+
}
|
|
84926
|
+
}
|
|
84927
|
+
this.storage.local.setItem("ecmaos:first-boot", Date.now().toString());
|
|
84928
|
+
}
|
|
83013
84929
|
this.terminal.write(ansi$5.erase.inLine(2) + this.terminal.prompt());
|
|
83014
84930
|
this.terminal.focus();
|
|
83015
84931
|
this.terminal.listen();
|
|
83016
84932
|
} catch (error) {
|
|
83017
|
-
this.log
|
|
84933
|
+
this.log.error(error);
|
|
83018
84934
|
this._state = KernelState.PANIC;
|
|
83019
84935
|
this.events.dispatch(KernelEvents.PANIC, { error });
|
|
83020
84936
|
this.toast.error({
|
|
@@ -83086,7 +85002,7 @@ class Kernel {
|
|
|
83086
85002
|
async execute(options) {
|
|
83087
85003
|
try {
|
|
83088
85004
|
if (!await this.filesystem.exists(options.command)) {
|
|
83089
|
-
this.log
|
|
85005
|
+
this.log.error(`File not found for execution: ${options.command}`);
|
|
83090
85006
|
return -1;
|
|
83091
85007
|
}
|
|
83092
85008
|
if (options.command.startsWith("/dev/")) {
|
|
@@ -83099,25 +85015,25 @@ class Kernel {
|
|
|
83099
85015
|
switch (header.type) {
|
|
83100
85016
|
case "bin":
|
|
83101
85017
|
switch (header.namespace) {
|
|
83102
|
-
case "terminal":
|
|
85018
|
+
case "terminal":
|
|
85019
|
+
// left for backward-compatibility
|
|
85020
|
+
case "command":
|
|
83103
85021
|
if (!header.name) return -1;
|
|
83104
85022
|
exitCode = await this.executeCommand({ ...options, command: header.name });
|
|
83105
85023
|
break;
|
|
83106
|
-
|
|
83107
|
-
case "app": {
|
|
85024
|
+
case "app":
|
|
83108
85025
|
if (!header.name) return -1;
|
|
83109
85026
|
exitCode = await this.executeApp({ ...options, command: header.name, file: options.command });
|
|
83110
85027
|
break;
|
|
83111
|
-
|
|
85028
|
+
case "script":
|
|
85029
|
+
exitCode = await this.executeScript(options);
|
|
85030
|
+
break;
|
|
85031
|
+
case "node":
|
|
85032
|
+
exitCode = await this.executeNode(options);
|
|
85033
|
+
break;
|
|
83112
85034
|
}
|
|
83113
85035
|
;
|
|
83114
85036
|
break;
|
|
83115
|
-
case "node":
|
|
83116
|
-
exitCode = await this.executeNode(options);
|
|
83117
|
-
break;
|
|
83118
|
-
case "script":
|
|
83119
|
-
exitCode = await this.executeScript(options);
|
|
83120
|
-
break;
|
|
83121
85037
|
}
|
|
83122
85038
|
exitCode = exitCode ?? 0;
|
|
83123
85039
|
options.shell.env.set("?", exitCode.toString());
|
|
@@ -83125,7 +85041,7 @@ class Kernel {
|
|
|
83125
85041
|
return exitCode;
|
|
83126
85042
|
} catch (error) {
|
|
83127
85043
|
console.error(error);
|
|
83128
|
-
this.log
|
|
85044
|
+
this.log.error(error);
|
|
83129
85045
|
options.shell.env.set("?", "-1");
|
|
83130
85046
|
return -1;
|
|
83131
85047
|
}
|
|
@@ -83138,18 +85054,9 @@ class Kernel {
|
|
|
83138
85054
|
async executeApp(options) {
|
|
83139
85055
|
try {
|
|
83140
85056
|
const contents = await this.filesystem.fs.readFile(options.file, "utf-8");
|
|
83141
|
-
const
|
|
83142
|
-
const
|
|
83143
|
-
|
|
83144
|
-
(match, importPath) => {
|
|
83145
|
-
if (!importPath.startsWith(".")) return match;
|
|
83146
|
-
const resolvedPath = path.join(filePath, importPath);
|
|
83147
|
-
const extensions = [".js", ".css"];
|
|
83148
|
-
const withExtension = extensions.some((ext) => resolvedPath.endsWith(ext)) ? resolvedPath : `${resolvedPath}.js`;
|
|
83149
|
-
return `from "${location.protocol}//${location.host}/swapi/fs${withExtension}"`;
|
|
83150
|
-
}
|
|
83151
|
-
);
|
|
83152
|
-
const blob = new Blob([modifiedContents], { type: "application/javascript" });
|
|
85057
|
+
const binLink = await this.filesystem.fs.readlink(options.file);
|
|
85058
|
+
const filePath = path.dirname(binLink);
|
|
85059
|
+
const blob = new Blob([await this.replaceImports(contents, filePath)], { type: "text/javascript" });
|
|
83153
85060
|
const url = URL.createObjectURL(blob);
|
|
83154
85061
|
try {
|
|
83155
85062
|
const module = await import(
|
|
@@ -83174,7 +85081,7 @@ class Kernel {
|
|
|
83174
85081
|
URL.revokeObjectURL(url);
|
|
83175
85082
|
}
|
|
83176
85083
|
} catch (error) {
|
|
83177
|
-
this.log
|
|
85084
|
+
this.log.error(`Failed to execute app: ${error}`);
|
|
83178
85085
|
options.terminal?.writeln(chalk$1.red(error.message));
|
|
83179
85086
|
return -1;
|
|
83180
85087
|
}
|
|
@@ -83212,7 +85119,7 @@ class Kernel {
|
|
|
83212
85119
|
*/
|
|
83213
85120
|
async executeDevice(device, args = [], shell = this.shell) {
|
|
83214
85121
|
if (!device || !device.cli) {
|
|
83215
|
-
this.log
|
|
85122
|
+
this.log.error(`Device not found or does not have a CLI`);
|
|
83216
85123
|
return -1;
|
|
83217
85124
|
}
|
|
83218
85125
|
let deviceProcess = new Process({
|
|
@@ -83235,7 +85142,7 @@ class Kernel {
|
|
|
83235
85142
|
shell.setPositionalParameters([`/dev/${device.pkg.name}`, ...args]);
|
|
83236
85143
|
await deviceProcess.start();
|
|
83237
85144
|
} catch (error) {
|
|
83238
|
-
this.log
|
|
85145
|
+
this.log.error(error);
|
|
83239
85146
|
this.terminal.writeln(chalk$1.red(error.message));
|
|
83240
85147
|
return -2;
|
|
83241
85148
|
} finally {
|
|
@@ -83245,23 +85152,42 @@ class Kernel {
|
|
|
83245
85152
|
}
|
|
83246
85153
|
/**
|
|
83247
85154
|
* Executes a node script (or tries to)
|
|
85155
|
+
*
|
|
85156
|
+
* @remarks
|
|
85157
|
+
* Don't expect it to work; this will help develop further emulation layers
|
|
85158
|
+
*
|
|
83248
85159
|
* @param options - Execution options containing script path and shell
|
|
83249
85160
|
* @returns Exit code of the script
|
|
83250
85161
|
*/
|
|
83251
85162
|
async executeNode(options) {
|
|
83252
85163
|
if (!options.command) return -1;
|
|
83253
85164
|
try {
|
|
83254
|
-
const
|
|
83255
|
-
if (!
|
|
83256
|
-
const
|
|
85165
|
+
const contents = await this.filesystem.fs.readFile(options.command, "utf-8");
|
|
85166
|
+
if (!contents) return -1;
|
|
85167
|
+
const binLink = await this.filesystem.fs.readlink(options.command);
|
|
85168
|
+
const filePath = path.dirname(binLink);
|
|
85169
|
+
const blob = new Blob([await this.replaceImports(contents, filePath)], { type: "text/javascript" });
|
|
83257
85170
|
const url = URL.createObjectURL(blob);
|
|
83258
|
-
const
|
|
83259
|
-
|
|
83260
|
-
|
|
83261
|
-
|
|
85171
|
+
const module = await import(
|
|
85172
|
+
/* @vite-ignore */
|
|
85173
|
+
url
|
|
85174
|
+
);
|
|
85175
|
+
const main = module?.main || module?.default;
|
|
85176
|
+
if (typeof main !== "function") throw new Error("No main function found in module");
|
|
85177
|
+
const process2 = this.processes.create({
|
|
85178
|
+
args: options.args || [],
|
|
85179
|
+
command: options.command,
|
|
85180
|
+
kernel: this,
|
|
85181
|
+
shell: options.shell || this.shell,
|
|
85182
|
+
terminal: options.terminal || this.terminal,
|
|
85183
|
+
uid: options.shell.credentials.uid,
|
|
85184
|
+
gid: options.shell.credentials.gid,
|
|
85185
|
+
entry: async () => await main()
|
|
85186
|
+
});
|
|
85187
|
+
await process2.start();
|
|
83262
85188
|
return 0;
|
|
83263
85189
|
} catch (error) {
|
|
83264
|
-
this.log
|
|
85190
|
+
this.log.error(`Failed to execute node script: ${error}`);
|
|
83265
85191
|
this.terminal.writeln(chalk$1.red(error.message));
|
|
83266
85192
|
return -1;
|
|
83267
85193
|
}
|
|
@@ -83274,8 +85200,8 @@ class Kernel {
|
|
|
83274
85200
|
async executeScript(options) {
|
|
83275
85201
|
const header = await this.readFileHeader(options.command);
|
|
83276
85202
|
if (!header) return -1;
|
|
83277
|
-
if (header.type !== "script") {
|
|
83278
|
-
this.log
|
|
85203
|
+
if (header.type !== "bin" || header.namespace !== "script") {
|
|
85204
|
+
this.log.error(`File is not a script: ${options.command}`);
|
|
83279
85205
|
return -1;
|
|
83280
85206
|
}
|
|
83281
85207
|
const script = await this.filesystem.fs.readFile(options.command, "utf-8");
|
|
@@ -83285,7 +85211,7 @@ class Kernel {
|
|
|
83285
85211
|
await options.shell.execute(line3);
|
|
83286
85212
|
}
|
|
83287
85213
|
return 0;
|
|
83288
|
-
} else this.log
|
|
85214
|
+
} else this.log.error(`Script ${options.command} not found`);
|
|
83289
85215
|
return -1;
|
|
83290
85216
|
}
|
|
83291
85217
|
/**
|
|
@@ -83329,9 +85255,7 @@ class Kernel {
|
|
|
83329
85255
|
if (!type) return null;
|
|
83330
85256
|
return { type, namespace, name };
|
|
83331
85257
|
}
|
|
83332
|
-
if (header.startsWith("#!/usr/bin/env node")) {
|
|
83333
|
-
return { type: "node" };
|
|
83334
|
-
}
|
|
85258
|
+
if (header.startsWith("#!/usr/bin/env node")) return { type: "bin", namespace: "node", name: "node" };
|
|
83335
85259
|
return null;
|
|
83336
85260
|
};
|
|
83337
85261
|
return new Promise((resolve2, reject) => {
|
|
@@ -83343,7 +85267,7 @@ class Kernel {
|
|
|
83343
85267
|
readable2.on("error", (error) => reject(error));
|
|
83344
85268
|
readable2.on("close", () => resolve2(null));
|
|
83345
85269
|
} catch (error) {
|
|
83346
|
-
this.log
|
|
85270
|
+
this.log.error(error);
|
|
83347
85271
|
reject(error);
|
|
83348
85272
|
}
|
|
83349
85273
|
})();
|
|
@@ -83353,7 +85277,7 @@ class Kernel {
|
|
|
83353
85277
|
* Reboots the kernel by performing a shutdown and page reload
|
|
83354
85278
|
*/
|
|
83355
85279
|
async reboot() {
|
|
83356
|
-
this.log
|
|
85280
|
+
this.log.warn(this.i18n.t("Rebooting"));
|
|
83357
85281
|
await this.shutdown();
|
|
83358
85282
|
globalThis.location.reload();
|
|
83359
85283
|
}
|
|
@@ -83366,7 +85290,7 @@ class Kernel {
|
|
|
83366
85290
|
const whitelistedCommands = Object.entries(TerminalCommands(this, this.shell, this.terminal)).filter(([name]) => !this.options.blacklist?.commands?.includes(name));
|
|
83367
85291
|
for (const [name] of whitelistedCommands) {
|
|
83368
85292
|
if (await this.filesystem.fs.exists(`/bin/${name}`)) continue;
|
|
83369
|
-
await this.filesystem.fs.writeFile(`/bin/${name}`, `#!ecmaos:bin:
|
|
85293
|
+
await this.filesystem.fs.writeFile(`/bin/${name}`, `#!ecmaos:bin:command:${name}`, { mode: 493 });
|
|
83370
85294
|
}
|
|
83371
85295
|
}
|
|
83372
85296
|
/**
|
|
@@ -83392,48 +85316,45 @@ class Kernel {
|
|
|
83392
85316
|
this.events.on(event, async (detail) => {
|
|
83393
85317
|
switch (event) {
|
|
83394
85318
|
case KernelEvents.PANIC:
|
|
83395
|
-
this.log
|
|
85319
|
+
this.log.fatal("KernelPanic:", detail);
|
|
83396
85320
|
break;
|
|
83397
85321
|
}
|
|
83398
85322
|
});
|
|
83399
85323
|
}
|
|
83400
85324
|
}
|
|
83401
85325
|
/**
|
|
83402
|
-
* Registers the packages.
|
|
85326
|
+
* Registers the packages from /etc/packages that should be auto-loaded on boot.
|
|
83403
85327
|
* @returns {Promise<void>} A promise that resolves when the packages are registered.
|
|
83404
85328
|
*/
|
|
83405
85329
|
async registerPackages() {
|
|
83406
85330
|
try {
|
|
83407
85331
|
const packagesData = await this.filesystem.fs.readFile("/etc/packages", "utf-8");
|
|
83408
|
-
const packages =
|
|
85332
|
+
const packages = packagesData.split("\n").filter(Boolean).filter((pkg2) => !pkg2.startsWith("#"));
|
|
83409
85333
|
for (const pkg2 of packages) {
|
|
83410
|
-
const
|
|
83411
|
-
const
|
|
83412
|
-
|
|
83413
|
-
|
|
83414
|
-
|
|
83415
|
-
|
|
83416
|
-
|
|
85334
|
+
const spec = pkg2.match(/(@[^/]+\/[^@]+|[^@]+)(?:@([^/]+))?/);
|
|
85335
|
+
const name = spec?.[1];
|
|
85336
|
+
if (!name || !await this.filesystem.fs.exists(`/usr/lib/${name}`)) continue;
|
|
85337
|
+
const versions = await this.filesystem.fs.readdir(`/usr/lib/${name}`);
|
|
85338
|
+
const version2 = semver.maxSatisfying(versions, spec?.[2] || "*") || spec?.[2] || "*";
|
|
85339
|
+
const pkgData = await this.filesystem.fs.readFile(`/usr/lib/${name}/${version2}/package.json`, "utf-8");
|
|
85340
|
+
const pkgJson = JSON.parse(pkgData);
|
|
85341
|
+
const mainFile = this.getPackageMainExport(pkgJson);
|
|
85342
|
+
if (!mainFile) continue;
|
|
85343
|
+
const filePath = `/usr/lib/${name}/${version2}/${mainFile}`;
|
|
85344
|
+
const fileContents = await this.filesystem.fs.readFile(filePath, "utf-8");
|
|
85345
|
+
const blob = new Blob([fileContents], { type: "text/javascript" });
|
|
85346
|
+
const url = URL.createObjectURL(blob);
|
|
83417
85347
|
try {
|
|
83418
|
-
|
|
83419
|
-
const
|
|
83420
|
-
|
|
83421
|
-
|
|
83422
|
-
|
|
83423
|
-
|
|
83424
|
-
this.log?.debug(`Loading package ${pkg2.name} v${pkg2.version}`);
|
|
83425
|
-
const imports = await import(
|
|
83426
|
-
/* @vite-ignore */
|
|
83427
|
-
url
|
|
83428
|
-
);
|
|
83429
|
-
this.packages.set(pkg2.name, imports);
|
|
83430
|
-
} catch (err2) {
|
|
83431
|
-
this.log?.error(`Failed to load package ${pkg2.name} v${pkg2.version}: ${err2}`);
|
|
83432
|
-
} finally {
|
|
83433
|
-
URL.revokeObjectURL(url);
|
|
83434
|
-
}
|
|
85348
|
+
this.log.info(`Loading package ${name} v${version2}`);
|
|
85349
|
+
const imports = await import(
|
|
85350
|
+
/* @vite-ignore */
|
|
85351
|
+
url
|
|
85352
|
+
);
|
|
85353
|
+
this.packages.set(name, imports);
|
|
83435
85354
|
} catch (err2) {
|
|
83436
|
-
this.log
|
|
85355
|
+
this.log.error(`Failed to load package ${name} v${version2}: ${err2}`);
|
|
85356
|
+
} finally {
|
|
85357
|
+
URL.revokeObjectURL(url);
|
|
83437
85358
|
}
|
|
83438
85359
|
}
|
|
83439
85360
|
} catch {
|
|
@@ -83449,7 +85370,7 @@ class Kernel {
|
|
|
83449
85370
|
memory: "?",
|
|
83450
85371
|
platform: navigator.userAgentData?.platform || navigator?.platform || navigator.userAgent,
|
|
83451
85372
|
querystring: location.search,
|
|
83452
|
-
version: `${"@ecmaos/kernel"} ${"0.2.
|
|
85373
|
+
version: `${"@ecmaos/kernel"} ${"0.2.7"}`,
|
|
83453
85374
|
language: navigator.language,
|
|
83454
85375
|
host: location.host,
|
|
83455
85376
|
userAgent: navigator.userAgent,
|
|
@@ -83466,7 +85387,7 @@ class Kernel {
|
|
|
83466
85387
|
const { downlink, effectiveType, rtt, saveData } = navigator.connection;
|
|
83467
85388
|
contents.connection = JSON.stringify({ downlink, effectiveType, rtt, saveData }, null, 2);
|
|
83468
85389
|
} catch {
|
|
83469
|
-
this.log
|
|
85390
|
+
this.log.warn("Failed to get connection data");
|
|
83470
85391
|
}
|
|
83471
85392
|
}
|
|
83472
85393
|
if ("deviceMemory" in navigator) contents.memory = `>= ${navigator.deviceMemory}GB`;
|
|
@@ -83474,10 +85395,32 @@ class Kernel {
|
|
|
83474
85395
|
try {
|
|
83475
85396
|
await this.filesystem.fs.writeFile(`/proc/${key}`, value ?? new Uint8Array(), { flag: "w+", mode: 511 });
|
|
83476
85397
|
} catch (error) {
|
|
83477
|
-
this.log
|
|
85398
|
+
this.log.warn(`Failed to write proc data: ${key}`, error);
|
|
83478
85399
|
}
|
|
83479
85400
|
}
|
|
83480
85401
|
}
|
|
85402
|
+
/**
|
|
85403
|
+
* Replaces imports in a script with SWAPI URLs
|
|
85404
|
+
*
|
|
85405
|
+
* @remarks
|
|
85406
|
+
* I would love to just use import maps, but we need dynamic import maps
|
|
85407
|
+
* This is probably not our long-term solution
|
|
85408
|
+
*
|
|
85409
|
+
* @param {string} contents - The script contents
|
|
85410
|
+
* @returns {Promise<string>} The modified script contents
|
|
85411
|
+
*/
|
|
85412
|
+
async replaceImports(contents, packagePath) {
|
|
85413
|
+
const replacements = {};
|
|
85414
|
+
const importRegex = /from ['"]([^'"]+)['"]/g;
|
|
85415
|
+
const matches = contents.match(importRegex);
|
|
85416
|
+
for (const match of matches || []) {
|
|
85417
|
+
const importPath = match.replace(/from ['"]|['"]/g, "");
|
|
85418
|
+
const exists2 = await this.filesystem.fs.exists(`/usr/lib/${path.join(packagePath, importPath)}`);
|
|
85419
|
+
if (exists2) replacements[match] = `from "${location.protocol}//${location.host}/swapi/fs${path.join(packagePath, importPath)}"`;
|
|
85420
|
+
}
|
|
85421
|
+
for (const [match, replacement] of Object.entries(replacements)) contents = contents.replace(match, replacement);
|
|
85422
|
+
return contents;
|
|
85423
|
+
}
|
|
83481
85424
|
/**
|
|
83482
85425
|
* Shuts down the kernel.
|
|
83483
85426
|
* @returns {Promise<void>} A promise that resolves when the kernel is shut down.
|
|
@@ -83500,7 +85443,7 @@ class Kernel {
|
|
|
83500
85443
|
useCredentials(cred);
|
|
83501
85444
|
result = await operation();
|
|
83502
85445
|
} catch (error) {
|
|
83503
|
-
this.log
|
|
85446
|
+
this.log.error(error);
|
|
83504
85447
|
} finally {
|
|
83505
85448
|
useCredentials(currentCredentials);
|
|
83506
85449
|
}
|
|
@@ -83515,9 +85458,9 @@ const empty = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
83515
85458
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83516
85459
|
export {
|
|
83517
85460
|
Kernel as K,
|
|
83518
|
-
path as a,
|
|
83519
85461
|
chalk$1 as c,
|
|
83520
85462
|
getDefaultExportFromCjs$2 as g,
|
|
83521
|
-
|
|
85463
|
+
path as p,
|
|
85464
|
+
semver as s
|
|
83522
85465
|
};
|
|
83523
|
-
//# sourceMappingURL=empty
|
|
85466
|
+
//# sourceMappingURL=empty--zdtkf0T.js.map
|