@hot-updater/js 0.27.1 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +532 -677
- package/dist/index.d.cts +0 -1
- package/dist/{index.d.ts → index.d.mts} +0 -1
- package/dist/{index.js → index.mjs} +523 -668
- package/package.json +9 -5
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
10
|
var __copyProps = (to, from, except, desc) => {
|
|
12
11
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
12
|
key = keys[i];
|
|
@@ -22,62 +21,53 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
21
|
value: mod,
|
|
23
22
|
enumerable: true
|
|
24
23
|
}) : target, mod));
|
|
25
|
-
|
|
26
24
|
//#endregion
|
|
27
|
-
let
|
|
28
|
-
__hot_updater_core = __toESM(__hot_updater_core);
|
|
29
|
-
|
|
25
|
+
let _hot_updater_core = require("@hot-updater/core");
|
|
30
26
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
31
|
-
var require_constants = /* @__PURE__ */
|
|
27
|
+
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32
28
|
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
33
|
-
const MAX_LENGTH
|
|
34
|
-
const MAX_SAFE_INTEGER
|
|
35
|
-
const MAX_SAFE_COMPONENT_LENGTH$1 = 16;
|
|
36
|
-
const MAX_SAFE_BUILD_LENGTH$1 = MAX_LENGTH$2 - 6;
|
|
37
|
-
const RELEASE_TYPES = [
|
|
38
|
-
"major",
|
|
39
|
-
"premajor",
|
|
40
|
-
"minor",
|
|
41
|
-
"preminor",
|
|
42
|
-
"patch",
|
|
43
|
-
"prepatch",
|
|
44
|
-
"prerelease"
|
|
45
|
-
];
|
|
29
|
+
const MAX_LENGTH = 256;
|
|
30
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
46
31
|
module.exports = {
|
|
47
|
-
MAX_LENGTH
|
|
48
|
-
MAX_SAFE_COMPONENT_LENGTH:
|
|
49
|
-
MAX_SAFE_BUILD_LENGTH:
|
|
50
|
-
MAX_SAFE_INTEGER
|
|
51
|
-
RELEASE_TYPES
|
|
32
|
+
MAX_LENGTH,
|
|
33
|
+
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
34
|
+
MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
|
|
35
|
+
MAX_SAFE_INTEGER,
|
|
36
|
+
RELEASE_TYPES: [
|
|
37
|
+
"major",
|
|
38
|
+
"premajor",
|
|
39
|
+
"minor",
|
|
40
|
+
"preminor",
|
|
41
|
+
"patch",
|
|
42
|
+
"prepatch",
|
|
43
|
+
"prerelease"
|
|
44
|
+
],
|
|
52
45
|
SEMVER_SPEC_VERSION,
|
|
53
46
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
54
47
|
FLAG_LOOSE: 2
|
|
55
48
|
};
|
|
56
|
-
})
|
|
57
|
-
|
|
49
|
+
}));
|
|
58
50
|
//#endregion
|
|
59
51
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
|
|
60
|
-
var require_debug = /* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}) });
|
|
64
|
-
|
|
52
|
+
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
53
|
+
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
54
|
+
}));
|
|
65
55
|
//#endregion
|
|
66
56
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
|
|
67
|
-
var require_re = /* @__PURE__ */
|
|
68
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH
|
|
69
|
-
const debug
|
|
57
|
+
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58
|
+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
59
|
+
const debug = require_debug();
|
|
70
60
|
exports = module.exports = {};
|
|
71
|
-
const re
|
|
61
|
+
const re = exports.re = [];
|
|
72
62
|
const safeRe = exports.safeRe = [];
|
|
73
63
|
const src = exports.src = [];
|
|
74
64
|
const safeSrc = exports.safeSrc = [];
|
|
75
|
-
const t
|
|
65
|
+
const t = exports.t = {};
|
|
76
66
|
let R = 0;
|
|
77
67
|
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
78
68
|
const safeRegexReplacements = [
|
|
79
69
|
["\\s", 1],
|
|
80
|
-
["\\d", MAX_LENGTH
|
|
70
|
+
["\\d", MAX_LENGTH],
|
|
81
71
|
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
82
72
|
];
|
|
83
73
|
const makeSafeRegex = (value) => {
|
|
@@ -87,79 +77,77 @@ var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7
|
|
|
87
77
|
const createToken = (name, value, isGlobal) => {
|
|
88
78
|
const safe = makeSafeRegex(value);
|
|
89
79
|
const index = R++;
|
|
90
|
-
debug
|
|
91
|
-
t
|
|
80
|
+
debug(name, index, value);
|
|
81
|
+
t[name] = index;
|
|
92
82
|
src[index] = value;
|
|
93
83
|
safeSrc[index] = safe;
|
|
94
|
-
re
|
|
84
|
+
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
95
85
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
96
86
|
};
|
|
97
87
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
98
88
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
99
89
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
100
|
-
createToken("MAINVERSION", `(${src[t
|
|
101
|
-
createToken("MAINVERSIONLOOSE", `(${src[t
|
|
102
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t
|
|
103
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t
|
|
104
|
-
createToken("PRERELEASE", `(?:-(${src[t
|
|
105
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t
|
|
90
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
91
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
92
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
93
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
94
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
95
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
106
96
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
107
|
-
createToken("BUILD", `(?:\\+(${src[t
|
|
108
|
-
createToken("FULLPLAIN", `v?${src[t
|
|
109
|
-
createToken("FULL", `^${src[t
|
|
110
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t
|
|
111
|
-
createToken("LOOSE", `^${src[t
|
|
97
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
98
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
99
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
100
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
101
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
112
102
|
createToken("GTLT", "((?:<|>)?=?)");
|
|
113
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t
|
|
114
|
-
createToken("XRANGEIDENTIFIER", `${src[t
|
|
115
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t
|
|
116
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t
|
|
117
|
-
createToken("XRANGE", `^${src[t
|
|
118
|
-
createToken("XRANGELOOSE", `^${src[t
|
|
103
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
104
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
105
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
106
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
107
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
108
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
119
109
|
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
120
|
-
createToken("COERCE", `${src[t
|
|
121
|
-
createToken("COERCEFULL", src[t
|
|
122
|
-
createToken("COERCERTL", src[t
|
|
123
|
-
createToken("COERCERTLFULL", src[t
|
|
110
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
111
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
112
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
113
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
124
114
|
createToken("LONETILDE", "(?:~>?)");
|
|
125
|
-
createToken("TILDETRIM", `(\\s*)${src[t
|
|
115
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
126
116
|
exports.tildeTrimReplace = "$1~";
|
|
127
|
-
createToken("TILDE", `^${src[t
|
|
128
|
-
createToken("TILDELOOSE", `^${src[t
|
|
117
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
118
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
129
119
|
createToken("LONECARET", "(?:\\^)");
|
|
130
|
-
createToken("CARETTRIM", `(\\s*)${src[t
|
|
120
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
131
121
|
exports.caretTrimReplace = "$1^";
|
|
132
|
-
createToken("CARET", `^${src[t
|
|
133
|
-
createToken("CARETLOOSE", `^${src[t
|
|
134
|
-
createToken("COMPARATORLOOSE", `^${src[t
|
|
135
|
-
createToken("COMPARATOR", `^${src[t
|
|
136
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t
|
|
122
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
123
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
124
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
125
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
126
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
137
127
|
exports.comparatorTrimReplace = "$1$2$3";
|
|
138
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t
|
|
139
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t
|
|
128
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
129
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
140
130
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
141
131
|
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
142
132
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
143
|
-
})
|
|
144
|
-
|
|
133
|
+
}));
|
|
145
134
|
//#endregion
|
|
146
135
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
|
|
147
|
-
var require_parse_options = /* @__PURE__ */
|
|
136
|
+
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
148
137
|
const looseOption = Object.freeze({ loose: true });
|
|
149
138
|
const emptyOpts = Object.freeze({});
|
|
150
|
-
const parseOptions
|
|
139
|
+
const parseOptions = (options) => {
|
|
151
140
|
if (!options) return emptyOpts;
|
|
152
141
|
if (typeof options !== "object") return looseOption;
|
|
153
142
|
return options;
|
|
154
143
|
};
|
|
155
|
-
module.exports = parseOptions
|
|
156
|
-
})
|
|
157
|
-
|
|
144
|
+
module.exports = parseOptions;
|
|
145
|
+
}));
|
|
158
146
|
//#endregion
|
|
159
147
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
|
|
160
|
-
var require_identifiers = /* @__PURE__ */
|
|
148
|
+
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
161
149
|
const numeric = /^[0-9]+$/;
|
|
162
|
-
const compareIdentifiers
|
|
150
|
+
const compareIdentifiers = (a, b) => {
|
|
163
151
|
const anum = numeric.test(a);
|
|
164
152
|
const bnum = numeric.test(b);
|
|
165
153
|
if (anum && bnum) {
|
|
@@ -168,33 +156,32 @@ var require_identifiers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
168
156
|
}
|
|
169
157
|
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
170
158
|
};
|
|
171
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers
|
|
159
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
172
160
|
module.exports = {
|
|
173
|
-
compareIdentifiers
|
|
161
|
+
compareIdentifiers,
|
|
174
162
|
rcompareIdentifiers
|
|
175
163
|
};
|
|
176
|
-
})
|
|
177
|
-
|
|
164
|
+
}));
|
|
178
165
|
//#endregion
|
|
179
166
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
180
|
-
var require_semver$1 = /* @__PURE__ */
|
|
181
|
-
const debug
|
|
167
|
+
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
168
|
+
const debug = require_debug();
|
|
182
169
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
183
|
-
const { safeRe: re
|
|
184
|
-
const parseOptions
|
|
170
|
+
const { safeRe: re, t } = require_re();
|
|
171
|
+
const parseOptions = require_parse_options();
|
|
185
172
|
const { compareIdentifiers } = require_identifiers();
|
|
186
|
-
|
|
173
|
+
module.exports = class SemVer {
|
|
187
174
|
constructor(version, options) {
|
|
188
|
-
options = parseOptions
|
|
189
|
-
if (version instanceof SemVer
|
|
175
|
+
options = parseOptions(options);
|
|
176
|
+
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
190
177
|
else version = version.version;
|
|
191
178
|
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
192
179
|
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
193
|
-
debug
|
|
180
|
+
debug("SemVer", version, options);
|
|
194
181
|
this.options = options;
|
|
195
182
|
this.loose = !!options.loose;
|
|
196
183
|
this.includePrerelease = !!options.includePrerelease;
|
|
197
|
-
const m = version.trim().match(options.loose ? re
|
|
184
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
198
185
|
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
199
186
|
this.raw = version;
|
|
200
187
|
this.major = +m[1];
|
|
@@ -223,20 +210,20 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
223
210
|
return this.version;
|
|
224
211
|
}
|
|
225
212
|
compare(other) {
|
|
226
|
-
debug
|
|
227
|
-
if (!(other instanceof SemVer
|
|
213
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
214
|
+
if (!(other instanceof SemVer)) {
|
|
228
215
|
if (typeof other === "string" && other === this.version) return 0;
|
|
229
|
-
other = new SemVer
|
|
216
|
+
other = new SemVer(other, this.options);
|
|
230
217
|
}
|
|
231
218
|
if (other.version === this.version) return 0;
|
|
232
219
|
return this.compareMain(other) || this.comparePre(other);
|
|
233
220
|
}
|
|
234
221
|
compareMain(other) {
|
|
235
|
-
if (!(other instanceof SemVer
|
|
222
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
236
223
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
237
224
|
}
|
|
238
225
|
comparePre(other) {
|
|
239
|
-
if (!(other instanceof SemVer
|
|
226
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
240
227
|
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
241
228
|
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
242
229
|
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
@@ -244,7 +231,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
244
231
|
do {
|
|
245
232
|
const a = this.prerelease[i];
|
|
246
233
|
const b = other.prerelease[i];
|
|
247
|
-
debug
|
|
234
|
+
debug("prerelease compare", i, a, b);
|
|
248
235
|
if (a === void 0 && b === void 0) return 0;
|
|
249
236
|
else if (b === void 0) return 1;
|
|
250
237
|
else if (a === void 0) return -1;
|
|
@@ -253,12 +240,12 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
253
240
|
} while (++i);
|
|
254
241
|
}
|
|
255
242
|
compareBuild(other) {
|
|
256
|
-
if (!(other instanceof SemVer
|
|
243
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
257
244
|
let i = 0;
|
|
258
245
|
do {
|
|
259
246
|
const a = this.build[i];
|
|
260
247
|
const b = other.build[i];
|
|
261
|
-
debug
|
|
248
|
+
debug("build compare", i, a, b);
|
|
262
249
|
if (a === void 0 && b === void 0) return 0;
|
|
263
250
|
else if (b === void 0) return 1;
|
|
264
251
|
else if (a === void 0) return -1;
|
|
@@ -270,7 +257,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
270
257
|
if (release.startsWith("pre")) {
|
|
271
258
|
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
272
259
|
if (identifier) {
|
|
273
|
-
const match = `-${identifier}`.match(this.options.loose ? re
|
|
260
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
274
261
|
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
275
262
|
}
|
|
276
263
|
}
|
|
@@ -331,11 +318,11 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
331
318
|
}
|
|
332
319
|
}
|
|
333
320
|
if (identifier) {
|
|
334
|
-
let prerelease
|
|
335
|
-
if (identifierBase === false) prerelease
|
|
321
|
+
let prerelease = [identifier, base];
|
|
322
|
+
if (identifierBase === false) prerelease = [identifier];
|
|
336
323
|
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
337
|
-
if (isNaN(this.prerelease[1])) this.prerelease = prerelease
|
|
338
|
-
} else this.prerelease = prerelease
|
|
324
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
|
|
325
|
+
} else this.prerelease = prerelease;
|
|
339
326
|
}
|
|
340
327
|
break;
|
|
341
328
|
}
|
|
@@ -346,73 +333,67 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
346
333
|
return this;
|
|
347
334
|
}
|
|
348
335
|
};
|
|
349
|
-
|
|
350
|
-
}) });
|
|
351
|
-
|
|
336
|
+
}));
|
|
352
337
|
//#endregion
|
|
353
338
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
354
|
-
var require_parse = /* @__PURE__ */
|
|
355
|
-
const SemVer
|
|
356
|
-
const parse
|
|
357
|
-
if (version instanceof SemVer
|
|
339
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
340
|
+
const SemVer = require_semver$1();
|
|
341
|
+
const parse = (version, options, throwErrors = false) => {
|
|
342
|
+
if (version instanceof SemVer) return version;
|
|
358
343
|
try {
|
|
359
|
-
return new SemVer
|
|
344
|
+
return new SemVer(version, options);
|
|
360
345
|
} catch (er) {
|
|
361
346
|
if (!throwErrors) return null;
|
|
362
347
|
throw er;
|
|
363
348
|
}
|
|
364
349
|
};
|
|
365
|
-
module.exports = parse
|
|
366
|
-
})
|
|
367
|
-
|
|
350
|
+
module.exports = parse;
|
|
351
|
+
}));
|
|
368
352
|
//#endregion
|
|
369
353
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
370
|
-
var require_valid$1 = /* @__PURE__ */
|
|
371
|
-
const parse
|
|
372
|
-
const valid
|
|
373
|
-
const v = parse
|
|
354
|
+
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
355
|
+
const parse = require_parse();
|
|
356
|
+
const valid = (version, options) => {
|
|
357
|
+
const v = parse(version, options);
|
|
374
358
|
return v ? v.version : null;
|
|
375
359
|
};
|
|
376
|
-
module.exports = valid
|
|
377
|
-
})
|
|
378
|
-
|
|
360
|
+
module.exports = valid;
|
|
361
|
+
}));
|
|
379
362
|
//#endregion
|
|
380
363
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
381
|
-
var require_clean = /* @__PURE__ */
|
|
382
|
-
const parse
|
|
383
|
-
const clean
|
|
384
|
-
const s = parse
|
|
364
|
+
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
365
|
+
const parse = require_parse();
|
|
366
|
+
const clean = (version, options) => {
|
|
367
|
+
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
385
368
|
return s ? s.version : null;
|
|
386
369
|
};
|
|
387
|
-
module.exports = clean
|
|
388
|
-
})
|
|
389
|
-
|
|
370
|
+
module.exports = clean;
|
|
371
|
+
}));
|
|
390
372
|
//#endregion
|
|
391
373
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
392
|
-
var require_inc = /* @__PURE__ */
|
|
393
|
-
const SemVer
|
|
394
|
-
const inc
|
|
374
|
+
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
375
|
+
const SemVer = require_semver$1();
|
|
376
|
+
const inc = (version, release, options, identifier, identifierBase) => {
|
|
395
377
|
if (typeof options === "string") {
|
|
396
378
|
identifierBase = identifier;
|
|
397
379
|
identifier = options;
|
|
398
380
|
options = void 0;
|
|
399
381
|
}
|
|
400
382
|
try {
|
|
401
|
-
return new SemVer
|
|
383
|
+
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
402
384
|
} catch (er) {
|
|
403
385
|
return null;
|
|
404
386
|
}
|
|
405
387
|
};
|
|
406
|
-
module.exports = inc
|
|
407
|
-
})
|
|
408
|
-
|
|
388
|
+
module.exports = inc;
|
|
389
|
+
}));
|
|
409
390
|
//#endregion
|
|
410
391
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
411
|
-
var require_diff = /* @__PURE__ */
|
|
412
|
-
const parse
|
|
413
|
-
const diff
|
|
414
|
-
const v1 = parse
|
|
415
|
-
const v2 = parse
|
|
392
|
+
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
393
|
+
const parse = require_parse();
|
|
394
|
+
const diff = (version1, version2) => {
|
|
395
|
+
const v1 = parse(version1, null, true);
|
|
396
|
+
const v2 = parse(version2, null, true);
|
|
416
397
|
const comparison = v1.compare(v2);
|
|
417
398
|
if (comparison === 0) return null;
|
|
418
399
|
const v1Higher = comparison > 0;
|
|
@@ -432,154 +413,137 @@ var require_diff = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver
|
|
|
432
413
|
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
433
414
|
return "prerelease";
|
|
434
415
|
};
|
|
435
|
-
module.exports = diff
|
|
436
|
-
})
|
|
437
|
-
|
|
416
|
+
module.exports = diff;
|
|
417
|
+
}));
|
|
438
418
|
//#endregion
|
|
439
419
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
440
|
-
var require_major = /* @__PURE__ */
|
|
441
|
-
const SemVer
|
|
442
|
-
const major
|
|
443
|
-
module.exports = major
|
|
444
|
-
})
|
|
445
|
-
|
|
420
|
+
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
421
|
+
const SemVer = require_semver$1();
|
|
422
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
423
|
+
module.exports = major;
|
|
424
|
+
}));
|
|
446
425
|
//#endregion
|
|
447
426
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
448
|
-
var require_minor = /* @__PURE__ */
|
|
449
|
-
const SemVer
|
|
450
|
-
const minor
|
|
451
|
-
module.exports = minor
|
|
452
|
-
})
|
|
453
|
-
|
|
427
|
+
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
428
|
+
const SemVer = require_semver$1();
|
|
429
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
430
|
+
module.exports = minor;
|
|
431
|
+
}));
|
|
454
432
|
//#endregion
|
|
455
433
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
456
|
-
var require_patch = /* @__PURE__ */
|
|
457
|
-
const SemVer
|
|
458
|
-
const patch
|
|
459
|
-
module.exports = patch
|
|
460
|
-
})
|
|
461
|
-
|
|
434
|
+
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
435
|
+
const SemVer = require_semver$1();
|
|
436
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
437
|
+
module.exports = patch;
|
|
438
|
+
}));
|
|
462
439
|
//#endregion
|
|
463
440
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
464
|
-
var require_prerelease = /* @__PURE__ */
|
|
465
|
-
const parse
|
|
466
|
-
const prerelease
|
|
467
|
-
const parsed = parse
|
|
441
|
+
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
442
|
+
const parse = require_parse();
|
|
443
|
+
const prerelease = (version, options) => {
|
|
444
|
+
const parsed = parse(version, options);
|
|
468
445
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
469
446
|
};
|
|
470
|
-
module.exports = prerelease
|
|
471
|
-
})
|
|
472
|
-
|
|
447
|
+
module.exports = prerelease;
|
|
448
|
+
}));
|
|
473
449
|
//#endregion
|
|
474
450
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
475
|
-
var require_compare = /* @__PURE__ */
|
|
476
|
-
const SemVer
|
|
477
|
-
const compare
|
|
478
|
-
module.exports = compare
|
|
479
|
-
})
|
|
480
|
-
|
|
451
|
+
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
452
|
+
const SemVer = require_semver$1();
|
|
453
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
454
|
+
module.exports = compare;
|
|
455
|
+
}));
|
|
481
456
|
//#endregion
|
|
482
457
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
483
|
-
var require_rcompare = /* @__PURE__ */
|
|
484
|
-
const compare
|
|
485
|
-
const rcompare
|
|
486
|
-
module.exports = rcompare
|
|
487
|
-
})
|
|
488
|
-
|
|
458
|
+
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
459
|
+
const compare = require_compare();
|
|
460
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
461
|
+
module.exports = rcompare;
|
|
462
|
+
}));
|
|
489
463
|
//#endregion
|
|
490
464
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
491
|
-
var require_compare_loose = /* @__PURE__ */
|
|
492
|
-
const compare
|
|
493
|
-
const compareLoose
|
|
494
|
-
module.exports = compareLoose
|
|
495
|
-
})
|
|
496
|
-
|
|
465
|
+
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
466
|
+
const compare = require_compare();
|
|
467
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
468
|
+
module.exports = compareLoose;
|
|
469
|
+
}));
|
|
497
470
|
//#endregion
|
|
498
471
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
499
|
-
var require_compare_build = /* @__PURE__ */
|
|
500
|
-
const SemVer
|
|
501
|
-
const compareBuild
|
|
502
|
-
const versionA = new SemVer
|
|
503
|
-
const versionB = new SemVer
|
|
472
|
+
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
473
|
+
const SemVer = require_semver$1();
|
|
474
|
+
const compareBuild = (a, b, loose) => {
|
|
475
|
+
const versionA = new SemVer(a, loose);
|
|
476
|
+
const versionB = new SemVer(b, loose);
|
|
504
477
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
505
478
|
};
|
|
506
|
-
module.exports = compareBuild
|
|
507
|
-
})
|
|
508
|
-
|
|
479
|
+
module.exports = compareBuild;
|
|
480
|
+
}));
|
|
509
481
|
//#endregion
|
|
510
482
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
511
|
-
var require_sort = /* @__PURE__ */
|
|
512
|
-
const compareBuild
|
|
513
|
-
const sort
|
|
514
|
-
module.exports = sort
|
|
515
|
-
})
|
|
516
|
-
|
|
483
|
+
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
484
|
+
const compareBuild = require_compare_build();
|
|
485
|
+
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
486
|
+
module.exports = sort;
|
|
487
|
+
}));
|
|
517
488
|
//#endregion
|
|
518
489
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
519
|
-
var require_rsort = /* @__PURE__ */
|
|
520
|
-
const compareBuild
|
|
521
|
-
const rsort
|
|
522
|
-
module.exports = rsort
|
|
523
|
-
})
|
|
524
|
-
|
|
490
|
+
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
491
|
+
const compareBuild = require_compare_build();
|
|
492
|
+
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
493
|
+
module.exports = rsort;
|
|
494
|
+
}));
|
|
525
495
|
//#endregion
|
|
526
496
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
527
|
-
var require_gt = /* @__PURE__ */
|
|
528
|
-
const compare
|
|
529
|
-
const gt
|
|
530
|
-
module.exports = gt
|
|
531
|
-
})
|
|
532
|
-
|
|
497
|
+
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
498
|
+
const compare = require_compare();
|
|
499
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
500
|
+
module.exports = gt;
|
|
501
|
+
}));
|
|
533
502
|
//#endregion
|
|
534
503
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
535
|
-
var require_lt = /* @__PURE__ */
|
|
536
|
-
const compare
|
|
537
|
-
const lt
|
|
538
|
-
module.exports = lt
|
|
539
|
-
})
|
|
540
|
-
|
|
504
|
+
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
505
|
+
const compare = require_compare();
|
|
506
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
507
|
+
module.exports = lt;
|
|
508
|
+
}));
|
|
541
509
|
//#endregion
|
|
542
510
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
543
|
-
var require_eq = /* @__PURE__ */
|
|
544
|
-
const compare
|
|
545
|
-
const eq
|
|
546
|
-
module.exports = eq
|
|
547
|
-
})
|
|
548
|
-
|
|
511
|
+
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
512
|
+
const compare = require_compare();
|
|
513
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
514
|
+
module.exports = eq;
|
|
515
|
+
}));
|
|
549
516
|
//#endregion
|
|
550
517
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
551
|
-
var require_neq = /* @__PURE__ */
|
|
552
|
-
const compare
|
|
553
|
-
const neq
|
|
554
|
-
module.exports = neq
|
|
555
|
-
})
|
|
556
|
-
|
|
518
|
+
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
519
|
+
const compare = require_compare();
|
|
520
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
521
|
+
module.exports = neq;
|
|
522
|
+
}));
|
|
557
523
|
//#endregion
|
|
558
524
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
559
|
-
var require_gte = /* @__PURE__ */
|
|
560
|
-
const compare
|
|
561
|
-
const gte
|
|
562
|
-
module.exports = gte
|
|
563
|
-
})
|
|
564
|
-
|
|
525
|
+
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
526
|
+
const compare = require_compare();
|
|
527
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
528
|
+
module.exports = gte;
|
|
529
|
+
}));
|
|
565
530
|
//#endregion
|
|
566
531
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
567
|
-
var require_lte = /* @__PURE__ */
|
|
568
|
-
const compare
|
|
569
|
-
const lte
|
|
570
|
-
module.exports = lte
|
|
571
|
-
})
|
|
572
|
-
|
|
532
|
+
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
533
|
+
const compare = require_compare();
|
|
534
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
535
|
+
module.exports = lte;
|
|
536
|
+
}));
|
|
573
537
|
//#endregion
|
|
574
538
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
575
|
-
var require_cmp = /* @__PURE__ */
|
|
576
|
-
const eq
|
|
577
|
-
const neq
|
|
578
|
-
const gt
|
|
579
|
-
const gte
|
|
580
|
-
const lt
|
|
581
|
-
const lte
|
|
582
|
-
const cmp
|
|
539
|
+
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
540
|
+
const eq = require_eq();
|
|
541
|
+
const neq = require_neq();
|
|
542
|
+
const gt = require_gt();
|
|
543
|
+
const gte = require_gte();
|
|
544
|
+
const lt = require_lt();
|
|
545
|
+
const lte = require_lte();
|
|
546
|
+
const cmp = (a, op, b, loose) => {
|
|
583
547
|
switch (op) {
|
|
584
548
|
case "===":
|
|
585
549
|
if (typeof a === "object") a = a.version;
|
|
@@ -591,33 +555,32 @@ var require_cmp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@
|
|
|
591
555
|
return a !== b;
|
|
592
556
|
case "":
|
|
593
557
|
case "=":
|
|
594
|
-
case "==": return eq
|
|
595
|
-
case "!=": return neq
|
|
596
|
-
case ">": return gt
|
|
597
|
-
case ">=": return gte
|
|
598
|
-
case "<": return lt
|
|
599
|
-
case "<=": return lte
|
|
558
|
+
case "==": return eq(a, b, loose);
|
|
559
|
+
case "!=": return neq(a, b, loose);
|
|
560
|
+
case ">": return gt(a, b, loose);
|
|
561
|
+
case ">=": return gte(a, b, loose);
|
|
562
|
+
case "<": return lt(a, b, loose);
|
|
563
|
+
case "<=": return lte(a, b, loose);
|
|
600
564
|
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
601
565
|
}
|
|
602
566
|
};
|
|
603
|
-
module.exports = cmp
|
|
604
|
-
})
|
|
605
|
-
|
|
567
|
+
module.exports = cmp;
|
|
568
|
+
}));
|
|
606
569
|
//#endregion
|
|
607
570
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
608
|
-
var require_coerce = /* @__PURE__ */
|
|
609
|
-
const SemVer
|
|
610
|
-
const parse
|
|
611
|
-
const { safeRe: re
|
|
612
|
-
const coerce
|
|
613
|
-
if (version instanceof SemVer
|
|
571
|
+
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
572
|
+
const SemVer = require_semver$1();
|
|
573
|
+
const parse = require_parse();
|
|
574
|
+
const { safeRe: re, t } = require_re();
|
|
575
|
+
const coerce = (version, options) => {
|
|
576
|
+
if (version instanceof SemVer) return version;
|
|
614
577
|
if (typeof version === "number") version = String(version);
|
|
615
578
|
if (typeof version !== "string") return null;
|
|
616
579
|
options = options || {};
|
|
617
580
|
let match = null;
|
|
618
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re
|
|
581
|
+
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
619
582
|
else {
|
|
620
|
-
const coerceRtlRegex = options.includePrerelease ? re
|
|
583
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
621
584
|
let next;
|
|
622
585
|
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
623
586
|
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
@@ -626,15 +589,14 @@ var require_coerce = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
626
589
|
coerceRtlRegex.lastIndex = -1;
|
|
627
590
|
}
|
|
628
591
|
if (match === null) return null;
|
|
629
|
-
const major
|
|
630
|
-
return parse
|
|
592
|
+
const major = match[2];
|
|
593
|
+
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
631
594
|
};
|
|
632
|
-
module.exports = coerce
|
|
633
|
-
})
|
|
634
|
-
|
|
595
|
+
module.exports = coerce;
|
|
596
|
+
}));
|
|
635
597
|
//#endregion
|
|
636
598
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
|
|
637
|
-
var require_lrucache = /* @__PURE__ */
|
|
599
|
+
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
638
600
|
var LRUCache = class {
|
|
639
601
|
constructor() {
|
|
640
602
|
this.max = 1e3;
|
|
@@ -664,18 +626,17 @@ var require_lrucache = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
664
626
|
}
|
|
665
627
|
};
|
|
666
628
|
module.exports = LRUCache;
|
|
667
|
-
})
|
|
668
|
-
|
|
629
|
+
}));
|
|
669
630
|
//#endregion
|
|
670
631
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
671
|
-
var require_range = /* @__PURE__ */
|
|
632
|
+
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
672
633
|
const SPACE_CHARACTERS = /\s+/g;
|
|
673
|
-
|
|
634
|
+
module.exports = class Range {
|
|
674
635
|
constructor(range, options) {
|
|
675
|
-
options = parseOptions
|
|
676
|
-
if (range instanceof Range
|
|
677
|
-
else return new Range
|
|
678
|
-
if (range instanceof Comparator
|
|
636
|
+
options = parseOptions(options);
|
|
637
|
+
if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
638
|
+
else return new Range(range.raw, options);
|
|
639
|
+
if (range instanceof Comparator) {
|
|
679
640
|
this.raw = range.value;
|
|
680
641
|
this.set = [[range]];
|
|
681
642
|
this.formatted = void 0;
|
|
@@ -722,37 +683,37 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
722
683
|
}
|
|
723
684
|
parseRange(range) {
|
|
724
685
|
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
|
|
725
|
-
const cached = cache
|
|
686
|
+
const cached = cache.get(memoKey);
|
|
726
687
|
if (cached) return cached;
|
|
727
688
|
const loose = this.options.loose;
|
|
728
|
-
const hr = loose ? re
|
|
689
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
729
690
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
730
|
-
debug
|
|
731
|
-
range = range.replace(re
|
|
732
|
-
debug
|
|
733
|
-
range = range.replace(re
|
|
734
|
-
debug
|
|
735
|
-
range = range.replace(re
|
|
736
|
-
debug
|
|
691
|
+
debug("hyphen replace", range);
|
|
692
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
693
|
+
debug("comparator trim", range);
|
|
694
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
695
|
+
debug("tilde trim", range);
|
|
696
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
697
|
+
debug("caret trim", range);
|
|
737
698
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
738
699
|
if (loose) rangeList = rangeList.filter((comp) => {
|
|
739
|
-
debug
|
|
740
|
-
return !!comp.match(re
|
|
700
|
+
debug("loose invalid filter", comp, this.options);
|
|
701
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
741
702
|
});
|
|
742
|
-
debug
|
|
703
|
+
debug("range list", rangeList);
|
|
743
704
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
744
|
-
const comparators = rangeList.map((comp) => new Comparator
|
|
705
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
745
706
|
for (const comp of comparators) {
|
|
746
707
|
if (isNullSet(comp)) return [comp];
|
|
747
708
|
rangeMap.set(comp.value, comp);
|
|
748
709
|
}
|
|
749
710
|
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
750
711
|
const result = [...rangeMap.values()];
|
|
751
|
-
cache
|
|
712
|
+
cache.set(memoKey, result);
|
|
752
713
|
return result;
|
|
753
714
|
}
|
|
754
715
|
intersects(range, options) {
|
|
755
|
-
if (!(range instanceof Range
|
|
716
|
+
if (!(range instanceof Range)) throw new TypeError("a Range is required");
|
|
756
717
|
return this.set.some((thisComparators) => {
|
|
757
718
|
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
758
719
|
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
@@ -766,7 +727,7 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
766
727
|
test(version) {
|
|
767
728
|
if (!version) return false;
|
|
768
729
|
if (typeof version === "string") try {
|
|
769
|
-
version = new SemVer
|
|
730
|
+
version = new SemVer(version, this.options);
|
|
770
731
|
} catch (er) {
|
|
771
732
|
return false;
|
|
772
733
|
}
|
|
@@ -774,13 +735,12 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
774
735
|
return false;
|
|
775
736
|
}
|
|
776
737
|
};
|
|
777
|
-
|
|
778
|
-
const
|
|
779
|
-
const
|
|
780
|
-
const
|
|
781
|
-
const
|
|
782
|
-
const
|
|
783
|
-
const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
738
|
+
const cache = new (require_lrucache())();
|
|
739
|
+
const parseOptions = require_parse_options();
|
|
740
|
+
const Comparator = require_comparator();
|
|
741
|
+
const debug = require_debug();
|
|
742
|
+
const SemVer = require_semver$1();
|
|
743
|
+
const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
784
744
|
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
785
745
|
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
786
746
|
const isAny = (c) => c.value === "";
|
|
@@ -797,15 +757,15 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
797
757
|
return result;
|
|
798
758
|
};
|
|
799
759
|
const parseComparator = (comp, options) => {
|
|
800
|
-
debug
|
|
760
|
+
debug("comp", comp, options);
|
|
801
761
|
comp = replaceCarets(comp, options);
|
|
802
|
-
debug
|
|
762
|
+
debug("caret", comp);
|
|
803
763
|
comp = replaceTildes(comp, options);
|
|
804
|
-
debug
|
|
764
|
+
debug("tildes", comp);
|
|
805
765
|
comp = replaceXRanges(comp, options);
|
|
806
|
-
debug
|
|
766
|
+
debug("xrange", comp);
|
|
807
767
|
comp = replaceStars(comp, options);
|
|
808
|
-
debug
|
|
768
|
+
debug("stars", comp);
|
|
809
769
|
return comp;
|
|
810
770
|
};
|
|
811
771
|
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
@@ -813,18 +773,18 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
813
773
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
814
774
|
};
|
|
815
775
|
const replaceTilde = (comp, options) => {
|
|
816
|
-
const r = options.loose ? re
|
|
776
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
817
777
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
818
|
-
debug
|
|
778
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
819
779
|
let ret;
|
|
820
780
|
if (isX(M)) ret = "";
|
|
821
781
|
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
822
782
|
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
823
783
|
else if (pr) {
|
|
824
|
-
debug
|
|
784
|
+
debug("replaceTilde pr", pr);
|
|
825
785
|
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
826
786
|
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
827
|
-
debug
|
|
787
|
+
debug("tilde return", ret);
|
|
828
788
|
return ret;
|
|
829
789
|
});
|
|
830
790
|
};
|
|
@@ -832,40 +792,40 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
832
792
|
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
833
793
|
};
|
|
834
794
|
const replaceCaret = (comp, options) => {
|
|
835
|
-
debug
|
|
836
|
-
const r = options.loose ? re
|
|
795
|
+
debug("caret", comp, options);
|
|
796
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
837
797
|
const z = options.includePrerelease ? "-0" : "";
|
|
838
798
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
839
|
-
debug
|
|
799
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
840
800
|
let ret;
|
|
841
801
|
if (isX(M)) ret = "";
|
|
842
802
|
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
843
803
|
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
844
804
|
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
845
805
|
else if (pr) {
|
|
846
|
-
debug
|
|
806
|
+
debug("replaceCaret pr", pr);
|
|
847
807
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
848
808
|
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
849
809
|
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
850
810
|
} else {
|
|
851
|
-
debug
|
|
811
|
+
debug("no pr");
|
|
852
812
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
853
813
|
else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
854
814
|
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
855
815
|
}
|
|
856
|
-
debug
|
|
816
|
+
debug("caret return", ret);
|
|
857
817
|
return ret;
|
|
858
818
|
});
|
|
859
819
|
};
|
|
860
820
|
const replaceXRanges = (comp, options) => {
|
|
861
|
-
debug
|
|
821
|
+
debug("replaceXRanges", comp, options);
|
|
862
822
|
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
863
823
|
};
|
|
864
824
|
const replaceXRange = (comp, options) => {
|
|
865
825
|
comp = comp.trim();
|
|
866
|
-
const r = options.loose ? re
|
|
826
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
867
827
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
868
|
-
debug
|
|
828
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
869
829
|
const xM = isX(M);
|
|
870
830
|
const xm = xM || isX(m);
|
|
871
831
|
const xp = xm || isX(p);
|
|
@@ -896,17 +856,17 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
896
856
|
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
897
857
|
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
898
858
|
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
899
|
-
debug
|
|
859
|
+
debug("xRange return", ret);
|
|
900
860
|
return ret;
|
|
901
861
|
});
|
|
902
862
|
};
|
|
903
863
|
const replaceStars = (comp, options) => {
|
|
904
|
-
debug
|
|
905
|
-
return comp.trim().replace(re
|
|
864
|
+
debug("replaceStars", comp, options);
|
|
865
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
906
866
|
};
|
|
907
867
|
const replaceGTE0 = (comp, options) => {
|
|
908
|
-
debug
|
|
909
|
-
return comp.trim().replace(re
|
|
868
|
+
debug("replaceGTE0", comp, options);
|
|
869
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
910
870
|
};
|
|
911
871
|
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
912
872
|
if (isX(fM)) from = "";
|
|
@@ -926,8 +886,8 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
926
886
|
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
927
887
|
if (version.prerelease.length && !options.includePrerelease) {
|
|
928
888
|
for (let i = 0; i < set.length; i++) {
|
|
929
|
-
debug
|
|
930
|
-
if (set[i].semver === Comparator
|
|
889
|
+
debug(set[i].semver);
|
|
890
|
+
if (set[i].semver === Comparator.ANY) continue;
|
|
931
891
|
if (set[i].semver.prerelease.length > 0) {
|
|
932
892
|
const allowed = set[i].semver;
|
|
933
893
|
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
@@ -937,26 +897,25 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
937
897
|
}
|
|
938
898
|
return true;
|
|
939
899
|
};
|
|
940
|
-
})
|
|
941
|
-
|
|
900
|
+
}));
|
|
942
901
|
//#endregion
|
|
943
902
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
944
|
-
var require_comparator = /* @__PURE__ */
|
|
945
|
-
const ANY
|
|
946
|
-
|
|
903
|
+
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
904
|
+
const ANY = Symbol("SemVer ANY");
|
|
905
|
+
module.exports = class Comparator {
|
|
947
906
|
static get ANY() {
|
|
948
|
-
return ANY
|
|
907
|
+
return ANY;
|
|
949
908
|
}
|
|
950
909
|
constructor(comp, options) {
|
|
951
910
|
options = parseOptions(options);
|
|
952
|
-
if (comp instanceof Comparator
|
|
911
|
+
if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
|
|
953
912
|
else comp = comp.value;
|
|
954
913
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
955
914
|
debug("comparator", comp, options);
|
|
956
915
|
this.options = options;
|
|
957
916
|
this.loose = !!options.loose;
|
|
958
917
|
this.parse(comp);
|
|
959
|
-
if (this.semver === ANY
|
|
918
|
+
if (this.semver === ANY) this.value = "";
|
|
960
919
|
else this.value = this.operator + this.semver.version;
|
|
961
920
|
debug("comp", this);
|
|
962
921
|
}
|
|
@@ -966,30 +925,30 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
966
925
|
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
967
926
|
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
968
927
|
if (this.operator === "=") this.operator = "";
|
|
969
|
-
if (!m[2]) this.semver = ANY
|
|
970
|
-
else this.semver = new SemVer
|
|
928
|
+
if (!m[2]) this.semver = ANY;
|
|
929
|
+
else this.semver = new SemVer(m[2], this.options.loose);
|
|
971
930
|
}
|
|
972
931
|
toString() {
|
|
973
932
|
return this.value;
|
|
974
933
|
}
|
|
975
934
|
test(version) {
|
|
976
935
|
debug("Comparator.test", version, this.options.loose);
|
|
977
|
-
if (this.semver === ANY
|
|
936
|
+
if (this.semver === ANY || version === ANY) return true;
|
|
978
937
|
if (typeof version === "string") try {
|
|
979
|
-
version = new SemVer
|
|
938
|
+
version = new SemVer(version, this.options);
|
|
980
939
|
} catch (er) {
|
|
981
940
|
return false;
|
|
982
941
|
}
|
|
983
|
-
return cmp
|
|
942
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
984
943
|
}
|
|
985
944
|
intersects(comp, options) {
|
|
986
|
-
if (!(comp instanceof Comparator
|
|
945
|
+
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
987
946
|
if (this.operator === "") {
|
|
988
947
|
if (this.value === "") return true;
|
|
989
|
-
return new Range
|
|
948
|
+
return new Range(comp.value, options).test(this.value);
|
|
990
949
|
} else if (comp.operator === "") {
|
|
991
950
|
if (comp.value === "") return true;
|
|
992
|
-
return new Range
|
|
951
|
+
return new Range(this.value, options).test(comp.semver);
|
|
993
952
|
}
|
|
994
953
|
options = parseOptions(options);
|
|
995
954
|
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
@@ -997,54 +956,50 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
997
956
|
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
998
957
|
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
999
958
|
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
1000
|
-
if (cmp
|
|
1001
|
-
if (cmp
|
|
959
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
960
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
1002
961
|
return false;
|
|
1003
962
|
}
|
|
1004
963
|
};
|
|
1005
|
-
module.exports = Comparator$3;
|
|
1006
964
|
const parseOptions = require_parse_options();
|
|
1007
965
|
const { safeRe: re, t } = require_re();
|
|
1008
|
-
const cmp
|
|
966
|
+
const cmp = require_cmp();
|
|
1009
967
|
const debug = require_debug();
|
|
1010
|
-
const SemVer
|
|
1011
|
-
const Range
|
|
1012
|
-
})
|
|
1013
|
-
|
|
968
|
+
const SemVer = require_semver$1();
|
|
969
|
+
const Range = require_range();
|
|
970
|
+
}));
|
|
1014
971
|
//#endregion
|
|
1015
972
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
1016
|
-
var require_satisfies = /* @__PURE__ */
|
|
1017
|
-
const Range
|
|
1018
|
-
const satisfies
|
|
973
|
+
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
974
|
+
const Range = require_range();
|
|
975
|
+
const satisfies = (version, range, options) => {
|
|
1019
976
|
try {
|
|
1020
|
-
range = new Range
|
|
977
|
+
range = new Range(range, options);
|
|
1021
978
|
} catch (er) {
|
|
1022
979
|
return false;
|
|
1023
980
|
}
|
|
1024
981
|
return range.test(version);
|
|
1025
982
|
};
|
|
1026
|
-
module.exports = satisfies
|
|
1027
|
-
})
|
|
1028
|
-
|
|
983
|
+
module.exports = satisfies;
|
|
984
|
+
}));
|
|
1029
985
|
//#endregion
|
|
1030
986
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
1031
|
-
var require_to_comparators = /* @__PURE__ */
|
|
1032
|
-
const Range
|
|
1033
|
-
const toComparators
|
|
1034
|
-
module.exports = toComparators
|
|
1035
|
-
})
|
|
1036
|
-
|
|
987
|
+
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
988
|
+
const Range = require_range();
|
|
989
|
+
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
990
|
+
module.exports = toComparators;
|
|
991
|
+
}));
|
|
1037
992
|
//#endregion
|
|
1038
993
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
1039
|
-
var require_max_satisfying = /* @__PURE__ */
|
|
1040
|
-
const SemVer
|
|
1041
|
-
const Range
|
|
1042
|
-
const maxSatisfying
|
|
994
|
+
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
995
|
+
const SemVer = require_semver$1();
|
|
996
|
+
const Range = require_range();
|
|
997
|
+
const maxSatisfying = (versions, range, options) => {
|
|
1043
998
|
let max = null;
|
|
1044
999
|
let maxSV = null;
|
|
1045
1000
|
let rangeObj = null;
|
|
1046
1001
|
try {
|
|
1047
|
-
rangeObj = new Range
|
|
1002
|
+
rangeObj = new Range(range, options);
|
|
1048
1003
|
} catch (er) {
|
|
1049
1004
|
return null;
|
|
1050
1005
|
}
|
|
@@ -1052,26 +1007,25 @@ var require_max_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1052
1007
|
if (rangeObj.test(v)) {
|
|
1053
1008
|
if (!max || maxSV.compare(v) === -1) {
|
|
1054
1009
|
max = v;
|
|
1055
|
-
maxSV = new SemVer
|
|
1010
|
+
maxSV = new SemVer(max, options);
|
|
1056
1011
|
}
|
|
1057
1012
|
}
|
|
1058
1013
|
});
|
|
1059
1014
|
return max;
|
|
1060
1015
|
};
|
|
1061
|
-
module.exports = maxSatisfying
|
|
1062
|
-
})
|
|
1063
|
-
|
|
1016
|
+
module.exports = maxSatisfying;
|
|
1017
|
+
}));
|
|
1064
1018
|
//#endregion
|
|
1065
1019
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
1066
|
-
var require_min_satisfying = /* @__PURE__ */
|
|
1067
|
-
const SemVer
|
|
1068
|
-
const Range
|
|
1069
|
-
const minSatisfying
|
|
1020
|
+
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1021
|
+
const SemVer = require_semver$1();
|
|
1022
|
+
const Range = require_range();
|
|
1023
|
+
const minSatisfying = (versions, range, options) => {
|
|
1070
1024
|
let min = null;
|
|
1071
1025
|
let minSV = null;
|
|
1072
1026
|
let rangeObj = null;
|
|
1073
1027
|
try {
|
|
1074
|
-
rangeObj = new Range
|
|
1028
|
+
rangeObj = new Range(range, options);
|
|
1075
1029
|
} catch (er) {
|
|
1076
1030
|
return null;
|
|
1077
1031
|
}
|
|
@@ -1079,33 +1033,32 @@ var require_min_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1079
1033
|
if (rangeObj.test(v)) {
|
|
1080
1034
|
if (!min || minSV.compare(v) === 1) {
|
|
1081
1035
|
min = v;
|
|
1082
|
-
minSV = new SemVer
|
|
1036
|
+
minSV = new SemVer(min, options);
|
|
1083
1037
|
}
|
|
1084
1038
|
}
|
|
1085
1039
|
});
|
|
1086
1040
|
return min;
|
|
1087
1041
|
};
|
|
1088
|
-
module.exports = minSatisfying
|
|
1089
|
-
})
|
|
1090
|
-
|
|
1042
|
+
module.exports = minSatisfying;
|
|
1043
|
+
}));
|
|
1091
1044
|
//#endregion
|
|
1092
1045
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
1093
|
-
var require_min_version = /* @__PURE__ */
|
|
1094
|
-
const SemVer
|
|
1095
|
-
const Range
|
|
1096
|
-
const gt
|
|
1097
|
-
const minVersion
|
|
1098
|
-
range = new Range
|
|
1099
|
-
let minver = new SemVer
|
|
1046
|
+
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1047
|
+
const SemVer = require_semver$1();
|
|
1048
|
+
const Range = require_range();
|
|
1049
|
+
const gt = require_gt();
|
|
1050
|
+
const minVersion = (range, loose) => {
|
|
1051
|
+
range = new Range(range, loose);
|
|
1052
|
+
let minver = new SemVer("0.0.0");
|
|
1100
1053
|
if (range.test(minver)) return minver;
|
|
1101
|
-
minver = new SemVer
|
|
1054
|
+
minver = new SemVer("0.0.0-0");
|
|
1102
1055
|
if (range.test(minver)) return minver;
|
|
1103
1056
|
minver = null;
|
|
1104
1057
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1105
1058
|
const comparators = range.set[i];
|
|
1106
1059
|
let setMin = null;
|
|
1107
1060
|
comparators.forEach((comparator) => {
|
|
1108
|
-
const compver = new SemVer
|
|
1061
|
+
const compver = new SemVer(comparator.semver.version);
|
|
1109
1062
|
switch (comparator.operator) {
|
|
1110
1063
|
case ">":
|
|
1111
1064
|
if (compver.prerelease.length === 0) compver.patch++;
|
|
@@ -1113,75 +1066,73 @@ var require_min_version = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
1113
1066
|
compver.raw = compver.format();
|
|
1114
1067
|
case "":
|
|
1115
1068
|
case ">=":
|
|
1116
|
-
if (!setMin || gt
|
|
1069
|
+
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
1117
1070
|
break;
|
|
1118
1071
|
case "<":
|
|
1119
1072
|
case "<=": break;
|
|
1120
1073
|
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1121
1074
|
}
|
|
1122
1075
|
});
|
|
1123
|
-
if (setMin && (!minver || gt
|
|
1076
|
+
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
1124
1077
|
}
|
|
1125
1078
|
if (minver && range.test(minver)) return minver;
|
|
1126
1079
|
return null;
|
|
1127
1080
|
};
|
|
1128
|
-
module.exports = minVersion
|
|
1129
|
-
})
|
|
1130
|
-
|
|
1081
|
+
module.exports = minVersion;
|
|
1082
|
+
}));
|
|
1131
1083
|
//#endregion
|
|
1132
1084
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
1133
|
-
var require_valid = /* @__PURE__ */
|
|
1134
|
-
const Range
|
|
1135
|
-
const validRange
|
|
1085
|
+
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1086
|
+
const Range = require_range();
|
|
1087
|
+
const validRange = (range, options) => {
|
|
1136
1088
|
try {
|
|
1137
|
-
return new Range
|
|
1089
|
+
return new Range(range, options).range || "*";
|
|
1138
1090
|
} catch (er) {
|
|
1139
1091
|
return null;
|
|
1140
1092
|
}
|
|
1141
1093
|
};
|
|
1142
|
-
module.exports = validRange
|
|
1143
|
-
})
|
|
1144
|
-
|
|
1094
|
+
module.exports = validRange;
|
|
1095
|
+
}));
|
|
1145
1096
|
//#endregion
|
|
1146
1097
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
1147
|
-
var require_outside = /* @__PURE__ */
|
|
1148
|
-
const SemVer
|
|
1149
|
-
const Comparator
|
|
1150
|
-
const { ANY
|
|
1151
|
-
const Range
|
|
1152
|
-
const satisfies
|
|
1153
|
-
const gt
|
|
1154
|
-
const lt
|
|
1155
|
-
const lte
|
|
1156
|
-
const gte
|
|
1157
|
-
const outside
|
|
1158
|
-
version = new SemVer
|
|
1159
|
-
range = new Range
|
|
1098
|
+
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1099
|
+
const SemVer = require_semver$1();
|
|
1100
|
+
const Comparator = require_comparator();
|
|
1101
|
+
const { ANY } = Comparator;
|
|
1102
|
+
const Range = require_range();
|
|
1103
|
+
const satisfies = require_satisfies();
|
|
1104
|
+
const gt = require_gt();
|
|
1105
|
+
const lt = require_lt();
|
|
1106
|
+
const lte = require_lte();
|
|
1107
|
+
const gte = require_gte();
|
|
1108
|
+
const outside = (version, range, hilo, options) => {
|
|
1109
|
+
version = new SemVer(version, options);
|
|
1110
|
+
range = new Range(range, options);
|
|
1160
1111
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1161
1112
|
switch (hilo) {
|
|
1162
1113
|
case ">":
|
|
1163
|
-
gtfn = gt
|
|
1164
|
-
ltefn = lte
|
|
1165
|
-
ltfn = lt
|
|
1114
|
+
gtfn = gt;
|
|
1115
|
+
ltefn = lte;
|
|
1116
|
+
ltfn = lt;
|
|
1166
1117
|
comp = ">";
|
|
1167
1118
|
ecomp = ">=";
|
|
1168
1119
|
break;
|
|
1169
1120
|
case "<":
|
|
1170
|
-
gtfn = lt
|
|
1171
|
-
ltefn = gte
|
|
1172
|
-
ltfn = gt
|
|
1121
|
+
gtfn = lt;
|
|
1122
|
+
ltefn = gte;
|
|
1123
|
+
ltfn = gt;
|
|
1173
1124
|
comp = "<";
|
|
1174
1125
|
ecomp = "<=";
|
|
1175
1126
|
break;
|
|
1176
1127
|
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1177
1128
|
}
|
|
1178
|
-
if (satisfies
|
|
1129
|
+
if (satisfies(version, range, options)) return false;
|
|
1179
1130
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1180
1131
|
const comparators = range.set[i];
|
|
1181
1132
|
let high = null;
|
|
1182
1133
|
let low = null;
|
|
1183
1134
|
comparators.forEach((comparator) => {
|
|
1184
|
-
if (comparator.semver === ANY
|
|
1135
|
+
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
1185
1136
|
high = high || comparator;
|
|
1186
1137
|
low = low || comparator;
|
|
1187
1138
|
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
@@ -1193,48 +1144,44 @@ var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sem
|
|
|
1193
1144
|
}
|
|
1194
1145
|
return true;
|
|
1195
1146
|
};
|
|
1196
|
-
module.exports = outside
|
|
1197
|
-
})
|
|
1198
|
-
|
|
1147
|
+
module.exports = outside;
|
|
1148
|
+
}));
|
|
1199
1149
|
//#endregion
|
|
1200
1150
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
1201
|
-
var require_gtr = /* @__PURE__ */
|
|
1202
|
-
const outside
|
|
1203
|
-
const gtr
|
|
1204
|
-
module.exports = gtr
|
|
1205
|
-
})
|
|
1206
|
-
|
|
1151
|
+
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1152
|
+
const outside = require_outside();
|
|
1153
|
+
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1154
|
+
module.exports = gtr;
|
|
1155
|
+
}));
|
|
1207
1156
|
//#endregion
|
|
1208
1157
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
1209
|
-
var require_ltr = /* @__PURE__ */
|
|
1210
|
-
const outside
|
|
1211
|
-
const ltr
|
|
1212
|
-
module.exports = ltr
|
|
1213
|
-
})
|
|
1214
|
-
|
|
1158
|
+
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1159
|
+
const outside = require_outside();
|
|
1160
|
+
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1161
|
+
module.exports = ltr;
|
|
1162
|
+
}));
|
|
1215
1163
|
//#endregion
|
|
1216
1164
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
1217
|
-
var require_intersects = /* @__PURE__ */
|
|
1218
|
-
const Range
|
|
1219
|
-
const intersects
|
|
1220
|
-
r1 = new Range
|
|
1221
|
-
r2 = new Range
|
|
1165
|
+
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1166
|
+
const Range = require_range();
|
|
1167
|
+
const intersects = (r1, r2, options) => {
|
|
1168
|
+
r1 = new Range(r1, options);
|
|
1169
|
+
r2 = new Range(r2, options);
|
|
1222
1170
|
return r1.intersects(r2, options);
|
|
1223
1171
|
};
|
|
1224
|
-
module.exports = intersects
|
|
1225
|
-
})
|
|
1226
|
-
|
|
1172
|
+
module.exports = intersects;
|
|
1173
|
+
}));
|
|
1227
1174
|
//#endregion
|
|
1228
1175
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
1229
|
-
var require_simplify = /* @__PURE__ */
|
|
1230
|
-
const satisfies
|
|
1231
|
-
const compare
|
|
1176
|
+
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1177
|
+
const satisfies = require_satisfies();
|
|
1178
|
+
const compare = require_compare();
|
|
1232
1179
|
module.exports = (versions, range, options) => {
|
|
1233
1180
|
const set = [];
|
|
1234
1181
|
let first = null;
|
|
1235
1182
|
let prev = null;
|
|
1236
|
-
const v = versions.sort((a, b) => compare
|
|
1237
|
-
for (const version of v) if (satisfies
|
|
1183
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1184
|
+
for (const version of v) if (satisfies(version, range, options)) {
|
|
1238
1185
|
prev = version;
|
|
1239
1186
|
if (!first) first = version;
|
|
1240
1187
|
} else {
|
|
@@ -1253,20 +1200,19 @@ var require_simplify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
1253
1200
|
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1254
1201
|
return simplified.length < original.length ? simplified : range;
|
|
1255
1202
|
};
|
|
1256
|
-
})
|
|
1257
|
-
|
|
1203
|
+
}));
|
|
1258
1204
|
//#endregion
|
|
1259
1205
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
1260
|
-
var require_subset = /* @__PURE__ */
|
|
1261
|
-
const Range
|
|
1262
|
-
const Comparator
|
|
1263
|
-
const { ANY } = Comparator
|
|
1264
|
-
const satisfies
|
|
1265
|
-
const compare
|
|
1266
|
-
const subset
|
|
1206
|
+
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1207
|
+
const Range = require_range();
|
|
1208
|
+
const Comparator = require_comparator();
|
|
1209
|
+
const { ANY } = Comparator;
|
|
1210
|
+
const satisfies = require_satisfies();
|
|
1211
|
+
const compare = require_compare();
|
|
1212
|
+
const subset = (sub, dom, options = {}) => {
|
|
1267
1213
|
if (sub === dom) return true;
|
|
1268
|
-
sub = new Range
|
|
1269
|
-
dom = new Range
|
|
1214
|
+
sub = new Range(sub, options);
|
|
1215
|
+
dom = new Range(dom, options);
|
|
1270
1216
|
let sawNonNull = false;
|
|
1271
1217
|
OUTER: for (const simpleSub of sub.set) {
|
|
1272
1218
|
for (const simpleDom of dom.set) {
|
|
@@ -1278,8 +1224,8 @@ var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
1278
1224
|
}
|
|
1279
1225
|
return true;
|
|
1280
1226
|
};
|
|
1281
|
-
const minimumVersionWithPreRelease = [new Comparator
|
|
1282
|
-
const minimumVersion = [new Comparator
|
|
1227
|
+
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1228
|
+
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
1283
1229
|
const simpleSubset = (sub, dom, options) => {
|
|
1284
1230
|
if (sub === dom) return true;
|
|
1285
1231
|
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
@@ -1288,151 +1234,113 @@ var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
1288
1234
|
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1289
1235
|
else dom = minimumVersion;
|
|
1290
1236
|
const eqSet = /* @__PURE__ */ new Set();
|
|
1291
|
-
let gt
|
|
1292
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt
|
|
1293
|
-
else if (c.operator === "<" || c.operator === "<=") lt
|
|
1237
|
+
let gt, lt;
|
|
1238
|
+
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
1239
|
+
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
1294
1240
|
else eqSet.add(c.semver);
|
|
1295
1241
|
if (eqSet.size > 1) return null;
|
|
1296
1242
|
let gtltComp;
|
|
1297
|
-
if (gt
|
|
1298
|
-
gtltComp = compare
|
|
1243
|
+
if (gt && lt) {
|
|
1244
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1299
1245
|
if (gtltComp > 0) return null;
|
|
1300
|
-
else if (gtltComp === 0 && (gt
|
|
1246
|
+
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
1301
1247
|
}
|
|
1302
|
-
for (const eq
|
|
1303
|
-
if (gt
|
|
1304
|
-
if (lt
|
|
1305
|
-
for (const c of dom) if (!satisfies
|
|
1248
|
+
for (const eq of eqSet) {
|
|
1249
|
+
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
1250
|
+
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
1251
|
+
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
1306
1252
|
return true;
|
|
1307
1253
|
}
|
|
1308
1254
|
let higher, lower;
|
|
1309
1255
|
let hasDomLT, hasDomGT;
|
|
1310
|
-
let needDomLTPre = lt
|
|
1311
|
-
let needDomGTPre = gt
|
|
1312
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt
|
|
1256
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1257
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1258
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1313
1259
|
for (const c of dom) {
|
|
1314
1260
|
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1315
1261
|
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1316
|
-
if (gt
|
|
1262
|
+
if (gt) {
|
|
1317
1263
|
if (needDomGTPre) {
|
|
1318
1264
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
1319
1265
|
}
|
|
1320
1266
|
if (c.operator === ">" || c.operator === ">=") {
|
|
1321
|
-
higher = higherGT(gt
|
|
1322
|
-
if (higher === c && higher !== gt
|
|
1323
|
-
} else if (gt
|
|
1267
|
+
higher = higherGT(gt, c, options);
|
|
1268
|
+
if (higher === c && higher !== gt) return false;
|
|
1269
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
|
|
1324
1270
|
}
|
|
1325
|
-
if (lt
|
|
1271
|
+
if (lt) {
|
|
1326
1272
|
if (needDomLTPre) {
|
|
1327
1273
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
1328
1274
|
}
|
|
1329
1275
|
if (c.operator === "<" || c.operator === "<=") {
|
|
1330
|
-
lower = lowerLT(lt
|
|
1331
|
-
if (lower === c && lower !== lt
|
|
1332
|
-
} else if (lt
|
|
1276
|
+
lower = lowerLT(lt, c, options);
|
|
1277
|
+
if (lower === c && lower !== lt) return false;
|
|
1278
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
|
|
1333
1279
|
}
|
|
1334
|
-
if (!c.operator && (lt
|
|
1280
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
1335
1281
|
}
|
|
1336
|
-
if (gt
|
|
1337
|
-
if (lt
|
|
1282
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
1283
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
1338
1284
|
if (needDomGTPre || needDomLTPre) return false;
|
|
1339
1285
|
return true;
|
|
1340
1286
|
};
|
|
1341
1287
|
const higherGT = (a, b, options) => {
|
|
1342
1288
|
if (!a) return b;
|
|
1343
|
-
const comp = compare
|
|
1289
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1344
1290
|
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1345
1291
|
};
|
|
1346
1292
|
const lowerLT = (a, b, options) => {
|
|
1347
1293
|
if (!a) return b;
|
|
1348
|
-
const comp = compare
|
|
1294
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1349
1295
|
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1350
1296
|
};
|
|
1351
|
-
module.exports = subset
|
|
1352
|
-
})
|
|
1353
|
-
|
|
1297
|
+
module.exports = subset;
|
|
1298
|
+
}));
|
|
1354
1299
|
//#endregion
|
|
1355
|
-
//#region
|
|
1356
|
-
var
|
|
1300
|
+
//#region src/semverSatisfies.ts
|
|
1301
|
+
var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1357
1302
|
const internalRe = require_re();
|
|
1358
1303
|
const constants = require_constants();
|
|
1359
1304
|
const SemVer = require_semver$1();
|
|
1360
1305
|
const identifiers = require_identifiers();
|
|
1361
|
-
const parse = require_parse();
|
|
1362
|
-
const valid = require_valid$1();
|
|
1363
|
-
const clean = require_clean();
|
|
1364
|
-
const inc = require_inc();
|
|
1365
|
-
const diff = require_diff();
|
|
1366
|
-
const major = require_major();
|
|
1367
|
-
const minor = require_minor();
|
|
1368
|
-
const patch = require_patch();
|
|
1369
|
-
const prerelease = require_prerelease();
|
|
1370
|
-
const compare = require_compare();
|
|
1371
|
-
const rcompare = require_rcompare();
|
|
1372
|
-
const compareLoose = require_compare_loose();
|
|
1373
|
-
const compareBuild = require_compare_build();
|
|
1374
|
-
const sort = require_sort();
|
|
1375
|
-
const rsort = require_rsort();
|
|
1376
|
-
const gt = require_gt();
|
|
1377
|
-
const lt = require_lt();
|
|
1378
|
-
const eq = require_eq();
|
|
1379
|
-
const neq = require_neq();
|
|
1380
|
-
const gte = require_gte();
|
|
1381
|
-
const lte = require_lte();
|
|
1382
|
-
const cmp = require_cmp();
|
|
1383
|
-
const coerce = require_coerce();
|
|
1384
|
-
const Comparator = require_comparator();
|
|
1385
|
-
const Range = require_range();
|
|
1386
|
-
const satisfies = require_satisfies();
|
|
1387
|
-
const toComparators = require_to_comparators();
|
|
1388
|
-
const maxSatisfying = require_max_satisfying();
|
|
1389
|
-
const minSatisfying = require_min_satisfying();
|
|
1390
|
-
const minVersion = require_min_version();
|
|
1391
|
-
const validRange = require_valid();
|
|
1392
|
-
const outside = require_outside();
|
|
1393
|
-
const gtr = require_gtr();
|
|
1394
|
-
const ltr = require_ltr();
|
|
1395
|
-
const intersects = require_intersects();
|
|
1396
|
-
const simplifyRange = require_simplify();
|
|
1397
|
-
const subset = require_subset();
|
|
1398
1306
|
module.exports = {
|
|
1399
|
-
parse,
|
|
1400
|
-
valid,
|
|
1401
|
-
clean,
|
|
1402
|
-
inc,
|
|
1403
|
-
diff,
|
|
1404
|
-
major,
|
|
1405
|
-
minor,
|
|
1406
|
-
patch,
|
|
1407
|
-
prerelease,
|
|
1408
|
-
compare,
|
|
1409
|
-
rcompare,
|
|
1410
|
-
compareLoose,
|
|
1411
|
-
compareBuild,
|
|
1412
|
-
sort,
|
|
1413
|
-
rsort,
|
|
1414
|
-
gt,
|
|
1415
|
-
lt,
|
|
1416
|
-
eq,
|
|
1417
|
-
neq,
|
|
1418
|
-
gte,
|
|
1419
|
-
lte,
|
|
1420
|
-
cmp,
|
|
1421
|
-
coerce,
|
|
1422
|
-
Comparator,
|
|
1423
|
-
Range,
|
|
1424
|
-
satisfies,
|
|
1425
|
-
toComparators,
|
|
1426
|
-
maxSatisfying,
|
|
1427
|
-
minSatisfying,
|
|
1428
|
-
minVersion,
|
|
1429
|
-
validRange,
|
|
1430
|
-
outside,
|
|
1431
|
-
gtr,
|
|
1432
|
-
ltr,
|
|
1433
|
-
intersects,
|
|
1434
|
-
simplifyRange,
|
|
1435
|
-
subset,
|
|
1307
|
+
parse: require_parse(),
|
|
1308
|
+
valid: require_valid$1(),
|
|
1309
|
+
clean: require_clean(),
|
|
1310
|
+
inc: require_inc(),
|
|
1311
|
+
diff: require_diff(),
|
|
1312
|
+
major: require_major(),
|
|
1313
|
+
minor: require_minor(),
|
|
1314
|
+
patch: require_patch(),
|
|
1315
|
+
prerelease: require_prerelease(),
|
|
1316
|
+
compare: require_compare(),
|
|
1317
|
+
rcompare: require_rcompare(),
|
|
1318
|
+
compareLoose: require_compare_loose(),
|
|
1319
|
+
compareBuild: require_compare_build(),
|
|
1320
|
+
sort: require_sort(),
|
|
1321
|
+
rsort: require_rsort(),
|
|
1322
|
+
gt: require_gt(),
|
|
1323
|
+
lt: require_lt(),
|
|
1324
|
+
eq: require_eq(),
|
|
1325
|
+
neq: require_neq(),
|
|
1326
|
+
gte: require_gte(),
|
|
1327
|
+
lte: require_lte(),
|
|
1328
|
+
cmp: require_cmp(),
|
|
1329
|
+
coerce: require_coerce(),
|
|
1330
|
+
Comparator: require_comparator(),
|
|
1331
|
+
Range: require_range(),
|
|
1332
|
+
satisfies: require_satisfies(),
|
|
1333
|
+
toComparators: require_to_comparators(),
|
|
1334
|
+
maxSatisfying: require_max_satisfying(),
|
|
1335
|
+
minSatisfying: require_min_satisfying(),
|
|
1336
|
+
minVersion: require_min_version(),
|
|
1337
|
+
validRange: require_valid(),
|
|
1338
|
+
outside: require_outside(),
|
|
1339
|
+
gtr: require_gtr(),
|
|
1340
|
+
ltr: require_ltr(),
|
|
1341
|
+
intersects: require_intersects(),
|
|
1342
|
+
simplifyRange: require_simplify(),
|
|
1343
|
+
subset: require_subset(),
|
|
1436
1344
|
SemVer,
|
|
1437
1345
|
re: internalRe.re,
|
|
1438
1346
|
src: internalRe.src,
|
|
@@ -1442,17 +1350,12 @@ var require_semver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
1442
1350
|
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1443
1351
|
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1444
1352
|
};
|
|
1445
|
-
})
|
|
1446
|
-
|
|
1447
|
-
//#endregion
|
|
1448
|
-
//#region src/semverSatisfies.ts
|
|
1449
|
-
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
1353
|
+
})))(), 1);
|
|
1450
1354
|
const semverSatisfies = (targetAppVersion, currentVersion) => {
|
|
1451
1355
|
const currentCoerce = import_semver.default.coerce(currentVersion);
|
|
1452
1356
|
if (!currentCoerce) return false;
|
|
1453
1357
|
return import_semver.default.satisfies(currentCoerce.version, targetAppVersion);
|
|
1454
1358
|
};
|
|
1455
|
-
|
|
1456
1359
|
//#endregion
|
|
1457
1360
|
//#region src/filterCompatibleAppVersions.ts
|
|
1458
1361
|
/**
|
|
@@ -1466,12 +1369,11 @@ const semverSatisfies = (targetAppVersion, currentVersion) => {
|
|
|
1466
1369
|
const filterCompatibleAppVersions = (targetAppVersionList, currentVersion) => {
|
|
1467
1370
|
return targetAppVersionList.filter((version) => semverSatisfies(version, currentVersion)).sort((a, b) => b.localeCompare(a));
|
|
1468
1371
|
};
|
|
1469
|
-
|
|
1470
1372
|
//#endregion
|
|
1471
1373
|
//#region src/getUpdateInfo.ts
|
|
1472
1374
|
const INIT_BUNDLE_ROLLBACK_UPDATE_INFO = {
|
|
1473
1375
|
message: null,
|
|
1474
|
-
id:
|
|
1376
|
+
id: _hot_updater_core.NIL_UUID,
|
|
1475
1377
|
shouldForceUpdate: true,
|
|
1476
1378
|
status: "ROLLBACK",
|
|
1477
1379
|
storageUri: null,
|
|
@@ -1485,6 +1387,14 @@ const makeResponse = (bundle, status) => ({
|
|
|
1485
1387
|
storageUri: bundle.storageUri,
|
|
1486
1388
|
fileHash: bundle.fileHash
|
|
1487
1389
|
});
|
|
1390
|
+
const isEligibleUpdateCandidate = (bundle, cohort) => {
|
|
1391
|
+
return (0, _hot_updater_core.isCohortEligibleForUpdate)(bundle.id, cohort, bundle.rolloutCohortCount, bundle.targetCohorts);
|
|
1392
|
+
};
|
|
1393
|
+
const findLatestEligibleUpdateCandidate = (bundles, bundleId, cohort) => {
|
|
1394
|
+
let updateCandidate = null;
|
|
1395
|
+
for (const bundle of bundles) if (bundle.id.localeCompare(bundleId) > 0 && isEligibleUpdateCandidate(bundle, cohort) && (!updateCandidate || bundle.id.localeCompare(updateCandidate.id) > 0)) updateCandidate = bundle;
|
|
1396
|
+
return updateCandidate;
|
|
1397
|
+
};
|
|
1488
1398
|
const getUpdateInfo = async (bundles, args) => {
|
|
1489
1399
|
switch (args._updateStrategy) {
|
|
1490
1400
|
case "appVersion": return appVersionStrategy(bundles, args);
|
|
@@ -1492,37 +1402,30 @@ const getUpdateInfo = async (bundles, args) => {
|
|
|
1492
1402
|
default: return null;
|
|
1493
1403
|
}
|
|
1494
1404
|
};
|
|
1495
|
-
const appVersionStrategy = async (bundles, { channel = "production", minBundleId =
|
|
1405
|
+
const appVersionStrategy = async (bundles, { channel = "production", minBundleId = _hot_updater_core.NIL_UUID, platform, appVersion, bundleId, cohort }) => {
|
|
1496
1406
|
const candidateBundles = [];
|
|
1497
1407
|
for (const b of bundles) {
|
|
1498
1408
|
if (b.platform !== platform || b.channel !== channel || !b.targetAppVersion || !semverSatisfies(b.targetAppVersion, appVersion) || !b.enabled || minBundleId && b.id.localeCompare(minBundleId) < 0) continue;
|
|
1499
1409
|
candidateBundles.push(b);
|
|
1500
1410
|
}
|
|
1501
1411
|
if (candidateBundles.length === 0) {
|
|
1502
|
-
if (bundleId ===
|
|
1412
|
+
if (bundleId === _hot_updater_core.NIL_UUID || minBundleId && bundleId.localeCompare(minBundleId) <= 0) return null;
|
|
1503
1413
|
return INIT_BUNDLE_ROLLBACK_UPDATE_INFO;
|
|
1504
1414
|
}
|
|
1505
|
-
let latestCandidate = null;
|
|
1506
|
-
let updateCandidate = null;
|
|
1507
1415
|
let rollbackCandidate = null;
|
|
1508
1416
|
let currentBundle;
|
|
1509
|
-
for (const b of candidateBundles)
|
|
1510
|
-
|
|
1511
|
-
if (b.id
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
if (bundleId === __hot_updater_core.NIL_UUID) {
|
|
1521
|
-
if (latestCandidate && latestCandidate.id.localeCompare(bundleId) > 0) return makeResponse(latestCandidate, "UPDATE");
|
|
1417
|
+
for (const b of candidateBundles) if (b.id === bundleId) currentBundle = b;
|
|
1418
|
+
else if (bundleId !== _hot_updater_core.NIL_UUID && b.id.localeCompare(bundleId) < 0) {
|
|
1419
|
+
if (!rollbackCandidate || b.id.localeCompare(rollbackCandidate.id) > 0) rollbackCandidate = b;
|
|
1420
|
+
}
|
|
1421
|
+
const updateCandidate = findLatestEligibleUpdateCandidate(candidateBundles, bundleId, cohort);
|
|
1422
|
+
const currentBundleEligible = currentBundle ? isEligibleUpdateCandidate(currentBundle, cohort) : false;
|
|
1423
|
+
if (bundleId === _hot_updater_core.NIL_UUID) {
|
|
1424
|
+
if (updateCandidate) return makeResponse(updateCandidate, "UPDATE");
|
|
1522
1425
|
return null;
|
|
1523
1426
|
}
|
|
1524
|
-
if (
|
|
1525
|
-
if (
|
|
1427
|
+
if (currentBundleEligible) {
|
|
1428
|
+
if (updateCandidate) return makeResponse(updateCandidate, "UPDATE");
|
|
1526
1429
|
return null;
|
|
1527
1430
|
}
|
|
1528
1431
|
if (updateCandidate) return makeResponse(updateCandidate, "UPDATE");
|
|
@@ -1530,37 +1433,30 @@ const appVersionStrategy = async (bundles, { channel = "production", minBundleId
|
|
|
1530
1433
|
if (minBundleId && bundleId.localeCompare(minBundleId) <= 0) return null;
|
|
1531
1434
|
return INIT_BUNDLE_ROLLBACK_UPDATE_INFO;
|
|
1532
1435
|
};
|
|
1533
|
-
const fingerprintStrategy = async (bundles, { channel = "production", minBundleId =
|
|
1436
|
+
const fingerprintStrategy = async (bundles, { channel = "production", minBundleId = _hot_updater_core.NIL_UUID, platform, fingerprintHash, bundleId, cohort }) => {
|
|
1534
1437
|
const candidateBundles = [];
|
|
1535
1438
|
for (const b of bundles) {
|
|
1536
1439
|
if (b.platform !== platform || b.channel !== channel || !b.fingerprintHash || b.fingerprintHash !== fingerprintHash || !b.enabled || minBundleId && b.id.localeCompare(minBundleId) < 0) continue;
|
|
1537
1440
|
candidateBundles.push(b);
|
|
1538
1441
|
}
|
|
1539
1442
|
if (candidateBundles.length === 0) {
|
|
1540
|
-
if (bundleId ===
|
|
1443
|
+
if (bundleId === _hot_updater_core.NIL_UUID || minBundleId && bundleId.localeCompare(minBundleId) <= 0) return null;
|
|
1541
1444
|
return INIT_BUNDLE_ROLLBACK_UPDATE_INFO;
|
|
1542
1445
|
}
|
|
1543
|
-
let latestCandidate = null;
|
|
1544
|
-
let updateCandidate = null;
|
|
1545
1446
|
let rollbackCandidate = null;
|
|
1546
1447
|
let currentBundle;
|
|
1547
|
-
for (const b of candidateBundles)
|
|
1548
|
-
|
|
1549
|
-
if (b.id
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
if (bundleId === __hot_updater_core.NIL_UUID) {
|
|
1559
|
-
if (latestCandidate && latestCandidate.id.localeCompare(bundleId) > 0) return makeResponse(latestCandidate, "UPDATE");
|
|
1448
|
+
for (const b of candidateBundles) if (b.id === bundleId) currentBundle = b;
|
|
1449
|
+
else if (bundleId !== _hot_updater_core.NIL_UUID && b.id.localeCompare(bundleId) < 0) {
|
|
1450
|
+
if (!rollbackCandidate || b.id.localeCompare(rollbackCandidate.id) > 0) rollbackCandidate = b;
|
|
1451
|
+
}
|
|
1452
|
+
const updateCandidate = findLatestEligibleUpdateCandidate(candidateBundles, bundleId, cohort);
|
|
1453
|
+
const currentBundleEligible = currentBundle ? isEligibleUpdateCandidate(currentBundle, cohort) : false;
|
|
1454
|
+
if (bundleId === _hot_updater_core.NIL_UUID) {
|
|
1455
|
+
if (updateCandidate) return makeResponse(updateCandidate, "UPDATE");
|
|
1560
1456
|
return null;
|
|
1561
1457
|
}
|
|
1562
|
-
if (
|
|
1563
|
-
if (
|
|
1458
|
+
if (currentBundleEligible) {
|
|
1459
|
+
if (updateCandidate) return makeResponse(updateCandidate, "UPDATE");
|
|
1564
1460
|
return null;
|
|
1565
1461
|
}
|
|
1566
1462
|
if (updateCandidate) return makeResponse(updateCandidate, "UPDATE");
|
|
@@ -1568,12 +1464,10 @@ const fingerprintStrategy = async (bundles, { channel = "production", minBundleI
|
|
|
1568
1464
|
if (minBundleId && bundleId.localeCompare(minBundleId) <= 0) return null;
|
|
1569
1465
|
return INIT_BUNDLE_ROLLBACK_UPDATE_INFO;
|
|
1570
1466
|
};
|
|
1571
|
-
|
|
1572
1467
|
//#endregion
|
|
1573
1468
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/buffer_utils.js
|
|
1574
1469
|
const encoder = new TextEncoder();
|
|
1575
1470
|
const decoder = new TextDecoder();
|
|
1576
|
-
const MAX_INT32 = 2 ** 32;
|
|
1577
1471
|
function concat(...buffers) {
|
|
1578
1472
|
const size = buffers.reduce((acc, { length }) => acc + length, 0);
|
|
1579
1473
|
const buf = new Uint8Array(size);
|
|
@@ -1584,7 +1478,6 @@ function concat(...buffers) {
|
|
|
1584
1478
|
}
|
|
1585
1479
|
return buf;
|
|
1586
1480
|
}
|
|
1587
|
-
|
|
1588
1481
|
//#endregion
|
|
1589
1482
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/base64.js
|
|
1590
1483
|
function encodeBase64(input) {
|
|
@@ -1601,7 +1494,6 @@ function decodeBase64(encoded) {
|
|
|
1601
1494
|
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
1602
1495
|
return bytes;
|
|
1603
1496
|
}
|
|
1604
|
-
|
|
1605
1497
|
//#endregion
|
|
1606
1498
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/util/base64url.js
|
|
1607
1499
|
function decode(input) {
|
|
@@ -1624,14 +1516,13 @@ function encode(input) {
|
|
|
1624
1516
|
});
|
|
1625
1517
|
return encodeBase64(unencoded).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
1626
1518
|
}
|
|
1627
|
-
|
|
1628
1519
|
//#endregion
|
|
1629
1520
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/util/errors.js
|
|
1630
1521
|
var JOSEError = class extends Error {
|
|
1631
1522
|
static code = "ERR_JOSE_GENERIC";
|
|
1632
1523
|
code = "ERR_JOSE_GENERIC";
|
|
1633
|
-
constructor(message
|
|
1634
|
-
super(message
|
|
1524
|
+
constructor(message, options) {
|
|
1525
|
+
super(message, options);
|
|
1635
1526
|
this.name = this.constructor.name;
|
|
1636
1527
|
Error.captureStackTrace?.(this, this.constructor);
|
|
1637
1528
|
}
|
|
@@ -1642,8 +1533,8 @@ var JWTClaimValidationFailed = class extends JOSEError {
|
|
|
1642
1533
|
claim;
|
|
1643
1534
|
reason;
|
|
1644
1535
|
payload;
|
|
1645
|
-
constructor(message
|
|
1646
|
-
super(message
|
|
1536
|
+
constructor(message, payload, claim = "unspecified", reason = "unspecified") {
|
|
1537
|
+
super(message, { cause: {
|
|
1647
1538
|
claim,
|
|
1648
1539
|
reason,
|
|
1649
1540
|
payload
|
|
@@ -1659,8 +1550,8 @@ var JWTExpired = class extends JOSEError {
|
|
|
1659
1550
|
claim;
|
|
1660
1551
|
reason;
|
|
1661
1552
|
payload;
|
|
1662
|
-
constructor(message
|
|
1663
|
-
super(message
|
|
1553
|
+
constructor(message, payload, claim = "unspecified", reason = "unspecified") {
|
|
1554
|
+
super(message, { cause: {
|
|
1664
1555
|
claim,
|
|
1665
1556
|
reason,
|
|
1666
1557
|
payload
|
|
@@ -1686,22 +1577,13 @@ var JWTInvalid = class extends JOSEError {
|
|
|
1686
1577
|
static code = "ERR_JWT_INVALID";
|
|
1687
1578
|
code = "ERR_JWT_INVALID";
|
|
1688
1579
|
};
|
|
1689
|
-
var JWKSMultipleMatchingKeys = class extends JOSEError {
|
|
1690
|
-
[Symbol.asyncIterator];
|
|
1691
|
-
static code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
1692
|
-
code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
1693
|
-
constructor(message$1 = "multiple matching keys found in the JSON Web Key Set", options) {
|
|
1694
|
-
super(message$1, options);
|
|
1695
|
-
}
|
|
1696
|
-
};
|
|
1697
1580
|
var JWSSignatureVerificationFailed = class extends JOSEError {
|
|
1698
1581
|
static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
1699
1582
|
code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
1700
|
-
constructor(message
|
|
1701
|
-
super(message
|
|
1583
|
+
constructor(message = "signature verification failed", options) {
|
|
1584
|
+
super(message, options);
|
|
1702
1585
|
}
|
|
1703
1586
|
};
|
|
1704
|
-
|
|
1705
1587
|
//#endregion
|
|
1706
1588
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/crypto_key.js
|
|
1707
1589
|
function unusable(name, prop = "algorithm.name") {
|
|
@@ -1766,7 +1648,6 @@ function checkSigCryptoKey(key, alg, usage) {
|
|
|
1766
1648
|
}
|
|
1767
1649
|
checkUsage(key, usage);
|
|
1768
1650
|
}
|
|
1769
|
-
|
|
1770
1651
|
//#endregion
|
|
1771
1652
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/invalid_key_input.js
|
|
1772
1653
|
function message(msg, actual, ...types) {
|
|
@@ -1789,7 +1670,6 @@ var invalid_key_input_default = (actual, ...types) => {
|
|
|
1789
1670
|
function withAlg(alg, actual, ...types) {
|
|
1790
1671
|
return message(`Key for the ${alg} algorithm must be `, actual, ...types);
|
|
1791
1672
|
}
|
|
1792
|
-
|
|
1793
1673
|
//#endregion
|
|
1794
1674
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/is_key_like.js
|
|
1795
1675
|
function isCryptoKey(key) {
|
|
@@ -1801,7 +1681,6 @@ function isKeyObject(key) {
|
|
|
1801
1681
|
var is_key_like_default = (key) => {
|
|
1802
1682
|
return isCryptoKey(key) || isKeyObject(key);
|
|
1803
1683
|
};
|
|
1804
|
-
|
|
1805
1684
|
//#endregion
|
|
1806
1685
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/is_disjoint.js
|
|
1807
1686
|
var is_disjoint_default = (...headers) => {
|
|
@@ -1821,7 +1700,6 @@ var is_disjoint_default = (...headers) => {
|
|
|
1821
1700
|
}
|
|
1822
1701
|
return true;
|
|
1823
1702
|
};
|
|
1824
|
-
|
|
1825
1703
|
//#endregion
|
|
1826
1704
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/is_object.js
|
|
1827
1705
|
function isObjectLike(value) {
|
|
@@ -1834,7 +1712,6 @@ var is_object_default = (input) => {
|
|
|
1834
1712
|
while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
|
|
1835
1713
|
return Object.getPrototypeOf(input) === proto;
|
|
1836
1714
|
};
|
|
1837
|
-
|
|
1838
1715
|
//#endregion
|
|
1839
1716
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/check_key_length.js
|
|
1840
1717
|
var check_key_length_default = (alg, key) => {
|
|
@@ -1843,7 +1720,6 @@ var check_key_length_default = (alg, key) => {
|
|
|
1843
1720
|
if (typeof modulusLength !== "number" || modulusLength < 2048) throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
|
|
1844
1721
|
}
|
|
1845
1722
|
};
|
|
1846
|
-
|
|
1847
1723
|
//#endregion
|
|
1848
1724
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/jwk_to_key.js
|
|
1849
1725
|
function subtleMapping(jwk) {
|
|
@@ -1951,7 +1827,6 @@ var jwk_to_key_default = async (jwk) => {
|
|
|
1951
1827
|
delete keyData.use;
|
|
1952
1828
|
return crypto.subtle.importKey("jwk", keyData, algorithm, jwk.ext ?? (jwk.d ? false : true), jwk.key_ops ?? keyUsages);
|
|
1953
1829
|
};
|
|
1954
|
-
|
|
1955
1830
|
//#endregion
|
|
1956
1831
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/validate_crit.js
|
|
1957
1832
|
var validate_crit_default = (Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) => {
|
|
@@ -1968,7 +1843,6 @@ var validate_crit_default = (Err, recognizedDefault, recognizedOption, protected
|
|
|
1968
1843
|
}
|
|
1969
1844
|
return new Set(protectedHeader.crit);
|
|
1970
1845
|
};
|
|
1971
|
-
|
|
1972
1846
|
//#endregion
|
|
1973
1847
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/validate_algorithms.js
|
|
1974
1848
|
var validate_algorithms_default = (option, algorithms) => {
|
|
@@ -1976,7 +1850,6 @@ var validate_algorithms_default = (option, algorithms) => {
|
|
|
1976
1850
|
if (!algorithms) return;
|
|
1977
1851
|
return new Set(algorithms);
|
|
1978
1852
|
};
|
|
1979
|
-
|
|
1980
1853
|
//#endregion
|
|
1981
1854
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/is_jwk.js
|
|
1982
1855
|
function isJWK(key) {
|
|
@@ -1991,7 +1864,6 @@ function isPublicJWK(key) {
|
|
|
1991
1864
|
function isSecretJWK(key) {
|
|
1992
1865
|
return key.kty === "oct" && typeof key.k === "string";
|
|
1993
1866
|
}
|
|
1994
|
-
|
|
1995
1867
|
//#endregion
|
|
1996
1868
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/normalize_key.js
|
|
1997
1869
|
let cache;
|
|
@@ -2108,7 +1980,6 @@ var normalize_key_default = async (key, alg) => {
|
|
|
2108
1980
|
}
|
|
2109
1981
|
throw new Error("unreachable");
|
|
2110
1982
|
};
|
|
2111
|
-
|
|
2112
1983
|
//#endregion
|
|
2113
1984
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/check_key_type.js
|
|
2114
1985
|
const tag = (key) => key?.[Symbol.toStringTag];
|
|
@@ -2191,7 +2062,6 @@ var check_key_type_default = (alg, key, usage) => {
|
|
|
2191
2062
|
if (alg.startsWith("HS") || alg === "dir" || alg.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(alg) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(alg)) symmetricTypeCheck(alg, key, usage);
|
|
2192
2063
|
else asymmetricTypeCheck(alg, key, usage);
|
|
2193
2064
|
};
|
|
2194
|
-
|
|
2195
2065
|
//#endregion
|
|
2196
2066
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/subtle_dsa.js
|
|
2197
2067
|
var subtle_dsa_default = (alg, algorithm) => {
|
|
@@ -2228,7 +2098,6 @@ var subtle_dsa_default = (alg, algorithm) => {
|
|
|
2228
2098
|
default: throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
|
|
2229
2099
|
}
|
|
2230
2100
|
};
|
|
2231
|
-
|
|
2232
2101
|
//#endregion
|
|
2233
2102
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/get_sign_verify_key.js
|
|
2234
2103
|
var get_sign_verify_key_default = async (alg, key, usage) => {
|
|
@@ -2242,7 +2111,6 @@ var get_sign_verify_key_default = async (alg, key, usage) => {
|
|
|
2242
2111
|
checkSigCryptoKey(key, alg, usage);
|
|
2243
2112
|
return key;
|
|
2244
2113
|
};
|
|
2245
|
-
|
|
2246
2114
|
//#endregion
|
|
2247
2115
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/verify.js
|
|
2248
2116
|
var verify_default = async (alg, key, signature, data) => {
|
|
@@ -2255,7 +2123,6 @@ var verify_default = async (alg, key, signature, data) => {
|
|
|
2255
2123
|
return false;
|
|
2256
2124
|
}
|
|
2257
2125
|
};
|
|
2258
|
-
|
|
2259
2126
|
//#endregion
|
|
2260
2127
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/jws/flattened/verify.js
|
|
2261
2128
|
async function flattenedVerify(jws, key, options) {
|
|
@@ -2322,7 +2189,6 @@ async function flattenedVerify(jws, key, options) {
|
|
|
2322
2189
|
};
|
|
2323
2190
|
return result;
|
|
2324
2191
|
}
|
|
2325
|
-
|
|
2326
2192
|
//#endregion
|
|
2327
2193
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/jws/compact/verify.js
|
|
2328
2194
|
async function compactVerify(jws, key, options) {
|
|
@@ -2345,11 +2211,9 @@ async function compactVerify(jws, key, options) {
|
|
|
2345
2211
|
};
|
|
2346
2212
|
return result;
|
|
2347
2213
|
}
|
|
2348
|
-
|
|
2349
2214
|
//#endregion
|
|
2350
2215
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/epoch.js
|
|
2351
2216
|
var epoch_default = (date) => Math.floor(date.getTime() / 1e3);
|
|
2352
|
-
|
|
2353
2217
|
//#endregion
|
|
2354
2218
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/secs.js
|
|
2355
2219
|
const minute = 60;
|
|
@@ -2403,7 +2267,6 @@ var secs_default = (str) => {
|
|
|
2403
2267
|
if (matched[1] === "-" || matched[4] === "ago") return -numericDate;
|
|
2404
2268
|
return numericDate;
|
|
2405
2269
|
};
|
|
2406
|
-
|
|
2407
2270
|
//#endregion
|
|
2408
2271
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
|
|
2409
2272
|
function validateInput(label, input) {
|
|
@@ -2513,7 +2376,6 @@ var JWTClaimsBuilder = class {
|
|
|
2513
2376
|
else this.#payload.iat = validateInput("setIssuedAt", value);
|
|
2514
2377
|
}
|
|
2515
2378
|
};
|
|
2516
|
-
|
|
2517
2379
|
//#endregion
|
|
2518
2380
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/jwt/verify.js
|
|
2519
2381
|
async function jwtVerify(jwt, key, options) {
|
|
@@ -2529,7 +2391,6 @@ async function jwtVerify(jwt, key, options) {
|
|
|
2529
2391
|
};
|
|
2530
2392
|
return result;
|
|
2531
2393
|
}
|
|
2532
|
-
|
|
2533
2394
|
//#endregion
|
|
2534
2395
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/lib/sign.js
|
|
2535
2396
|
var sign_default = async (alg, key, data) => {
|
|
@@ -2538,7 +2399,6 @@ var sign_default = async (alg, key, data) => {
|
|
|
2538
2399
|
const signature = await crypto.subtle.sign(subtle_dsa_default(alg, cryptoKey.algorithm), cryptoKey, data);
|
|
2539
2400
|
return new Uint8Array(signature);
|
|
2540
2401
|
};
|
|
2541
|
-
|
|
2542
2402
|
//#endregion
|
|
2543
2403
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/jws/flattened/sign.js
|
|
2544
2404
|
var FlattenedSign = class {
|
|
@@ -2591,7 +2451,6 @@ var FlattenedSign = class {
|
|
|
2591
2451
|
return jws;
|
|
2592
2452
|
}
|
|
2593
2453
|
};
|
|
2594
|
-
|
|
2595
2454
|
//#endregion
|
|
2596
2455
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/jws/compact/sign.js
|
|
2597
2456
|
var CompactSign = class {
|
|
@@ -2609,7 +2468,6 @@ var CompactSign = class {
|
|
|
2609
2468
|
return `${jws.protected}.${jws.payload}.${jws.signature}`;
|
|
2610
2469
|
}
|
|
2611
2470
|
};
|
|
2612
|
-
|
|
2613
2471
|
//#endregion
|
|
2614
2472
|
//#region ../../node_modules/.pnpm/jose@6.0.10/node_modules/jose/dist/webapi/jwt/sign.js
|
|
2615
2473
|
var SignJWT = class {
|
|
@@ -2657,7 +2515,6 @@ var SignJWT = class {
|
|
|
2657
2515
|
return sig.sign(key, options);
|
|
2658
2516
|
}
|
|
2659
2517
|
};
|
|
2660
|
-
|
|
2661
2518
|
//#endregion
|
|
2662
2519
|
//#region src/verifyJwtSignedUrl.ts
|
|
2663
2520
|
/**
|
|
@@ -2732,7 +2589,6 @@ const verifyJwtSignedUrl = async ({ path, token, jwtSecret, handler }) => {
|
|
|
2732
2589
|
handler
|
|
2733
2590
|
});
|
|
2734
2591
|
};
|
|
2735
|
-
|
|
2736
2592
|
//#endregion
|
|
2737
2593
|
//#region src/withJwtSignedUrl.ts
|
|
2738
2594
|
/**
|
|
@@ -2746,8 +2602,8 @@ const verifyJwtSignedUrl = async ({ path, token, jwtSecret, handler }) => {
|
|
|
2746
2602
|
*/
|
|
2747
2603
|
const withJwtSignedUrl = async ({ data, reqUrl, jwtSecret }) => {
|
|
2748
2604
|
if (!data) return null;
|
|
2749
|
-
const { storageUri
|
|
2750
|
-
if (data.id ===
|
|
2605
|
+
const { storageUri, ...rest } = data;
|
|
2606
|
+
if (data.id === _hot_updater_core.NIL_UUID || !storageUri) return {
|
|
2751
2607
|
...rest,
|
|
2752
2608
|
fileUrl: null
|
|
2753
2609
|
};
|
|
@@ -2766,7 +2622,6 @@ const signToken = async (key, jwtSecret) => {
|
|
|
2766
2622
|
const secretKey = new TextEncoder().encode(jwtSecret);
|
|
2767
2623
|
return await new SignJWT({ key }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("60s").sign(secretKey);
|
|
2768
2624
|
};
|
|
2769
|
-
|
|
2770
2625
|
//#endregion
|
|
2771
2626
|
exports.filterCompatibleAppVersions = filterCompatibleAppVersions;
|
|
2772
2627
|
exports.getUpdateInfo = getUpdateInfo;
|
|
@@ -2774,4 +2629,4 @@ exports.semverSatisfies = semverSatisfies;
|
|
|
2774
2629
|
exports.signToken = signToken;
|
|
2775
2630
|
exports.verifyJwtSignedUrl = verifyJwtSignedUrl;
|
|
2776
2631
|
exports.verifyJwtToken = verifyJwtToken;
|
|
2777
|
-
exports.withJwtSignedUrl = withJwtSignedUrl;
|
|
2632
|
+
exports.withJwtSignedUrl = withJwtSignedUrl;
|