@hot-updater/firebase 0.35.11 → 0.35.12
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/firebase/functions/index.cjs +675 -2705
- package/dist/iac/index.cjs +3 -3
- package/dist/iac/index.mjs +3 -3
- package/dist/index.cjs +5 -16
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +5 -15
- package/package.json +9 -9
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
|
-
var __create
|
|
4
|
-
var __defProp
|
|
5
|
-
var __getOwnPropDesc
|
|
6
|
-
var __getOwnPropNames
|
|
7
|
-
var __getProtoOf
|
|
8
|
-
var __hasOwnProp
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
11
|
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
13
|
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
17
|
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
21
20
|
value: mod,
|
|
22
21
|
enumerable: true
|
|
23
22
|
}) : target, mod));
|
|
24
23
|
//#endregion
|
|
25
|
-
let
|
|
26
|
-
firebase_admin = __toESM$1(firebase_admin);
|
|
24
|
+
let firebase_admin_app = require("firebase-admin/app");
|
|
27
25
|
let firebase_functions_v2_https = require("firebase-functions/v2/https");
|
|
28
26
|
let hono = require("hono");
|
|
27
|
+
let firebase_admin_firestore = require("firebase-admin/firestore");
|
|
29
28
|
let fs_promises = require("fs/promises");
|
|
30
|
-
fs_promises = __toESM
|
|
29
|
+
fs_promises = __toESM(fs_promises);
|
|
31
30
|
let path = require("path");
|
|
32
|
-
path = __toESM
|
|
31
|
+
path = __toESM(path);
|
|
32
|
+
let firebase_admin_storage = require("firebase-admin/storage");
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region ../../packages/server/dist/version.mjs
|
|
35
|
-
const HOT_UPDATER_SERVER_VERSION = "0.35.
|
|
35
|
+
const HOT_UPDATER_SERVER_VERSION = "0.35.12";
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region ../../packages/server/dist/internalRouter.mjs
|
|
38
38
|
const normalizePath = (path) => {
|
|
@@ -85,1387 +85,350 @@ function findRoute(router, method, path) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
|
-
//#region ../../node_modules/.pnpm/
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/re.js
|
|
119
|
-
var require_re$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
120
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants$1();
|
|
121
|
-
const debug = require_debug$1();
|
|
122
|
-
exports = module.exports = {};
|
|
123
|
-
const re = exports.re = [];
|
|
124
|
-
const safeRe = exports.safeRe = [];
|
|
125
|
-
const src = exports.src = [];
|
|
126
|
-
const safeSrc = exports.safeSrc = [];
|
|
127
|
-
const t = exports.t = {};
|
|
128
|
-
let R = 0;
|
|
129
|
-
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
130
|
-
const safeRegexReplacements = [
|
|
131
|
-
["\\s", 1],
|
|
132
|
-
["\\d", MAX_LENGTH],
|
|
133
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
88
|
+
//#region ../../node_modules/.pnpm/verkit@0.3.2/node_modules/verkit/dist/index.js
|
|
89
|
+
const LETTER_DASH_NUMBER$1 = "[a-zA-Z0-9-]";
|
|
90
|
+
const NUMERIC_IDENTIFIER$1 = String.raw`0|[1-9]\d*`;
|
|
91
|
+
const NUMERIC_IDENTIFIER_LOOSE$1 = String.raw`\d+`;
|
|
92
|
+
const NON_NUMERIC_IDENTIFIER$1 = String.raw`\d*[a-zA-Z-]${LETTER_DASH_NUMBER$1}*`;
|
|
93
|
+
const MAIN_VERSION$1 = String.raw`(${NUMERIC_IDENTIFIER$1})\.(${NUMERIC_IDENTIFIER$1})\.(${NUMERIC_IDENTIFIER$1})`;
|
|
94
|
+
const MAIN_VERSION_LOOSE$1 = String.raw`(${NUMERIC_IDENTIFIER_LOOSE$1})\.(${NUMERIC_IDENTIFIER_LOOSE$1})\.(${NUMERIC_IDENTIFIER_LOOSE$1})`;
|
|
95
|
+
const PRERELEASE_IDENTIFIER$1 = `(?:${NON_NUMERIC_IDENTIFIER$1}|${NUMERIC_IDENTIFIER$1})`;
|
|
96
|
+
const PRERELEASE_IDENTIFIER_LOOSE$1 = `(?:${NON_NUMERIC_IDENTIFIER$1}|${NUMERIC_IDENTIFIER_LOOSE$1})`;
|
|
97
|
+
const PRERELEASE$1 = String.raw`(?:-(${PRERELEASE_IDENTIFIER$1}(?:\.${PRERELEASE_IDENTIFIER$1})*))`;
|
|
98
|
+
const PRERELEASE_LOOSE$1 = String.raw`(?:-?(${PRERELEASE_IDENTIFIER_LOOSE$1}(?:\.${PRERELEASE_IDENTIFIER_LOOSE$1})*))`;
|
|
99
|
+
const BUILD_IDENTIFIER$1 = `${LETTER_DASH_NUMBER$1}+`;
|
|
100
|
+
const BUILD$1 = String.raw`(?:\+(${BUILD_IDENTIFIER$1}(?:\.${BUILD_IDENTIFIER$1})*))`;
|
|
101
|
+
const FULL_PLAIN$1 = `v?${MAIN_VERSION$1}${PRERELEASE$1}?${BUILD$1}?`;
|
|
102
|
+
const LOOSE_PLAIN$1 = String.raw`[v=\s]*${MAIN_VERSION_LOOSE$1}${PRERELEASE_LOOSE$1}?${BUILD$1}?`;
|
|
103
|
+
const GREATER_LESS_THAN$1 = "((?:<|>)?=?)";
|
|
104
|
+
const XRANGE_IDENTIFIER$1 = String.raw`${NUMERIC_IDENTIFIER$1}|x|X|\*`;
|
|
105
|
+
const XRANGE_IDENTIFIER_LOOSE$1 = String.raw`${NUMERIC_IDENTIFIER_LOOSE$1}|x|X|\*`;
|
|
106
|
+
const XRANGE_PLAIN$1 = String.raw`[v=\s]*(${XRANGE_IDENTIFIER$1})(?:\.(${XRANGE_IDENTIFIER$1})(?:\.(${XRANGE_IDENTIFIER$1})(?:${PRERELEASE$1})?${BUILD$1}?)?)?`;
|
|
107
|
+
const XRANGE_PLAIN_LOOSE$1 = String.raw`[v=\s]*(${XRANGE_IDENTIFIER_LOOSE$1})(?:\.(${XRANGE_IDENTIFIER_LOOSE$1})(?:\.(${XRANGE_IDENTIFIER_LOOSE$1})(?:${PRERELEASE_LOOSE$1})?${BUILD$1}?)?)?`;
|
|
108
|
+
const LONE_TILDE$1 = "(?:~>?)";
|
|
109
|
+
const LONE_CARET$1 = String.raw`(?:\^)`;
|
|
110
|
+
const COERCE_PLAIN$1 = String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;
|
|
111
|
+
const COERCE$1 = String.raw`${COERCE_PLAIN$1}(?:$|[^\d])`;
|
|
112
|
+
const COERCE_FULL$1 = String.raw`${COERCE_PLAIN$1}(?:${PRERELEASE$1})?(?:${BUILD$1})?(?:$|[^\d])`;
|
|
113
|
+
function makeSafeRegexSource$1(source) {
|
|
114
|
+
const replacements = [
|
|
115
|
+
[String.raw`\s`, 1],
|
|
116
|
+
[String.raw`\d`, 256],
|
|
117
|
+
[LETTER_DASH_NUMBER$1, 250]
|
|
134
118
|
];
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
181
|
-
createToken("LONECARET", "(?:\\^)");
|
|
182
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
183
|
-
exports.caretTrimReplace = "$1^";
|
|
184
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
185
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
186
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
187
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
188
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
189
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
190
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
191
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
192
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
193
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
194
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
195
|
-
}));
|
|
196
|
-
//#endregion
|
|
197
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/parse-options.js
|
|
198
|
-
var require_parse_options$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
199
|
-
const looseOption = Object.freeze({ loose: true });
|
|
200
|
-
const emptyOpts = Object.freeze({});
|
|
201
|
-
const parseOptions = (options) => {
|
|
202
|
-
if (!options) return emptyOpts;
|
|
203
|
-
if (typeof options !== "object") return looseOption;
|
|
204
|
-
return options;
|
|
205
|
-
};
|
|
206
|
-
module.exports = parseOptions;
|
|
207
|
-
}));
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/identifiers.js
|
|
210
|
-
var require_identifiers$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
211
|
-
const numeric = /^[0-9]+$/;
|
|
212
|
-
const compareIdentifiers = (a, b) => {
|
|
213
|
-
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
214
|
-
const anum = numeric.test(a);
|
|
215
|
-
const bnum = numeric.test(b);
|
|
216
|
-
if (anum && bnum) {
|
|
217
|
-
a = +a;
|
|
218
|
-
b = +b;
|
|
219
|
-
}
|
|
220
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
221
|
-
};
|
|
222
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
223
|
-
module.exports = {
|
|
224
|
-
compareIdentifiers,
|
|
225
|
-
rcompareIdentifiers
|
|
226
|
-
};
|
|
227
|
-
}));
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/semver.js
|
|
230
|
-
var require_semver$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
231
|
-
const debug = require_debug$1();
|
|
232
|
-
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants$1();
|
|
233
|
-
const { safeRe: re, t } = require_re$1();
|
|
234
|
-
const parseOptions = require_parse_options$1();
|
|
235
|
-
const { compareIdentifiers } = require_identifiers$1();
|
|
236
|
-
const isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
237
|
-
const identifiers = identifier.split(".");
|
|
238
|
-
if (identifiers.length > prerelease.length) return false;
|
|
239
|
-
for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
|
|
240
|
-
return true;
|
|
241
|
-
};
|
|
242
|
-
module.exports = class SemVer {
|
|
243
|
-
constructor(version, options) {
|
|
244
|
-
options = parseOptions(options);
|
|
245
|
-
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
246
|
-
else version = version.version;
|
|
247
|
-
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
248
|
-
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
249
|
-
debug("SemVer", version, options);
|
|
250
|
-
this.options = options;
|
|
251
|
-
this.loose = !!options.loose;
|
|
252
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
253
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
254
|
-
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
255
|
-
this.raw = version;
|
|
256
|
-
this.major = +m[1];
|
|
257
|
-
this.minor = +m[2];
|
|
258
|
-
this.patch = +m[3];
|
|
259
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
260
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
261
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
262
|
-
if (!m[4]) this.prerelease = [];
|
|
263
|
-
else this.prerelease = m[4].split(".").map((id) => {
|
|
264
|
-
if (/^[0-9]+$/.test(id)) {
|
|
265
|
-
const num = +id;
|
|
266
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
267
|
-
}
|
|
268
|
-
return id;
|
|
269
|
-
});
|
|
270
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
271
|
-
this.format();
|
|
272
|
-
}
|
|
273
|
-
format() {
|
|
274
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
275
|
-
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
276
|
-
return this.version;
|
|
277
|
-
}
|
|
278
|
-
toString() {
|
|
279
|
-
return this.version;
|
|
280
|
-
}
|
|
281
|
-
compare(other) {
|
|
282
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
283
|
-
if (!(other instanceof SemVer)) {
|
|
284
|
-
if (typeof other === "string" && other === this.version) return 0;
|
|
285
|
-
other = new SemVer(other, this.options);
|
|
286
|
-
}
|
|
287
|
-
if (other.version === this.version) return 0;
|
|
288
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
289
|
-
}
|
|
290
|
-
compareMain(other) {
|
|
291
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
292
|
-
if (this.major < other.major) return -1;
|
|
293
|
-
if (this.major > other.major) return 1;
|
|
294
|
-
if (this.minor < other.minor) return -1;
|
|
295
|
-
if (this.minor > other.minor) return 1;
|
|
296
|
-
if (this.patch < other.patch) return -1;
|
|
297
|
-
if (this.patch > other.patch) return 1;
|
|
298
|
-
return 0;
|
|
299
|
-
}
|
|
300
|
-
comparePre(other) {
|
|
301
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
302
|
-
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
303
|
-
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
304
|
-
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
305
|
-
let i = 0;
|
|
306
|
-
do {
|
|
307
|
-
const a = this.prerelease[i];
|
|
308
|
-
const b = other.prerelease[i];
|
|
309
|
-
debug("prerelease compare", i, a, b);
|
|
310
|
-
if (a === void 0 && b === void 0) return 0;
|
|
311
|
-
else if (b === void 0) return 1;
|
|
312
|
-
else if (a === void 0) return -1;
|
|
313
|
-
else if (a === b) continue;
|
|
314
|
-
else return compareIdentifiers(a, b);
|
|
315
|
-
} while (++i);
|
|
316
|
-
}
|
|
317
|
-
compareBuild(other) {
|
|
318
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
319
|
-
let i = 0;
|
|
320
|
-
do {
|
|
321
|
-
const a = this.build[i];
|
|
322
|
-
const b = other.build[i];
|
|
323
|
-
debug("build compare", i, a, b);
|
|
324
|
-
if (a === void 0 && b === void 0) return 0;
|
|
325
|
-
else if (b === void 0) return 1;
|
|
326
|
-
else if (a === void 0) return -1;
|
|
327
|
-
else if (a === b) continue;
|
|
328
|
-
else return compareIdentifiers(a, b);
|
|
329
|
-
} while (++i);
|
|
330
|
-
}
|
|
331
|
-
inc(release, identifier, identifierBase) {
|
|
332
|
-
if (release.startsWith("pre")) {
|
|
333
|
-
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
334
|
-
if (identifier) {
|
|
335
|
-
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
336
|
-
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
switch (release) {
|
|
340
|
-
case "premajor":
|
|
341
|
-
this.prerelease.length = 0;
|
|
342
|
-
this.patch = 0;
|
|
343
|
-
this.minor = 0;
|
|
344
|
-
this.major++;
|
|
345
|
-
this.inc("pre", identifier, identifierBase);
|
|
346
|
-
break;
|
|
347
|
-
case "preminor":
|
|
348
|
-
this.prerelease.length = 0;
|
|
349
|
-
this.patch = 0;
|
|
350
|
-
this.minor++;
|
|
351
|
-
this.inc("pre", identifier, identifierBase);
|
|
352
|
-
break;
|
|
353
|
-
case "prepatch":
|
|
354
|
-
this.prerelease.length = 0;
|
|
355
|
-
this.inc("patch", identifier, identifierBase);
|
|
356
|
-
this.inc("pre", identifier, identifierBase);
|
|
357
|
-
break;
|
|
358
|
-
case "prerelease":
|
|
359
|
-
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
360
|
-
this.inc("pre", identifier, identifierBase);
|
|
361
|
-
break;
|
|
362
|
-
case "release":
|
|
363
|
-
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
364
|
-
this.prerelease.length = 0;
|
|
365
|
-
break;
|
|
366
|
-
case "major":
|
|
367
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
368
|
-
this.minor = 0;
|
|
369
|
-
this.patch = 0;
|
|
370
|
-
this.prerelease = [];
|
|
371
|
-
break;
|
|
372
|
-
case "minor":
|
|
373
|
-
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
374
|
-
this.patch = 0;
|
|
375
|
-
this.prerelease = [];
|
|
376
|
-
break;
|
|
377
|
-
case "patch":
|
|
378
|
-
if (this.prerelease.length === 0) this.patch++;
|
|
379
|
-
this.prerelease = [];
|
|
380
|
-
break;
|
|
381
|
-
case "pre": {
|
|
382
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
383
|
-
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
384
|
-
else {
|
|
385
|
-
let i = this.prerelease.length;
|
|
386
|
-
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
387
|
-
this.prerelease[i]++;
|
|
388
|
-
i = -2;
|
|
389
|
-
}
|
|
390
|
-
if (i === -1) {
|
|
391
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
392
|
-
this.prerelease.push(base);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
if (identifier) {
|
|
396
|
-
let prerelease = [identifier, base];
|
|
397
|
-
if (identifierBase === false) prerelease = [identifier];
|
|
398
|
-
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
399
|
-
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
400
|
-
if (isNaN(prereleaseBase)) this.prerelease = prerelease;
|
|
401
|
-
} else this.prerelease = prerelease;
|
|
402
|
-
}
|
|
403
|
-
break;
|
|
404
|
-
}
|
|
405
|
-
default: throw new Error(`invalid increment argument: ${release}`);
|
|
406
|
-
}
|
|
407
|
-
this.raw = this.format();
|
|
408
|
-
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
409
|
-
return this;
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
}));
|
|
413
|
-
//#endregion
|
|
414
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/parse.js
|
|
415
|
-
var require_parse$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
416
|
-
const SemVer = require_semver$2();
|
|
417
|
-
const parse = (version, options, throwErrors = false) => {
|
|
418
|
-
if (version instanceof SemVer) return version;
|
|
419
|
-
try {
|
|
420
|
-
return new SemVer(version, options);
|
|
421
|
-
} catch (er) {
|
|
422
|
-
if (!throwErrors) return null;
|
|
423
|
-
throw er;
|
|
424
|
-
}
|
|
425
|
-
};
|
|
426
|
-
module.exports = parse;
|
|
427
|
-
}));
|
|
428
|
-
//#endregion
|
|
429
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/valid.js
|
|
430
|
-
var require_valid$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
431
|
-
const parse = require_parse$1();
|
|
432
|
-
const valid = (version, options) => {
|
|
433
|
-
const v = parse(version, options);
|
|
434
|
-
return v ? v.version : null;
|
|
435
|
-
};
|
|
436
|
-
module.exports = valid;
|
|
437
|
-
}));
|
|
438
|
-
//#endregion
|
|
439
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/clean.js
|
|
440
|
-
var require_clean$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
441
|
-
const parse = require_parse$1();
|
|
442
|
-
const clean = (version, options) => {
|
|
443
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
444
|
-
return s ? s.version : null;
|
|
445
|
-
};
|
|
446
|
-
module.exports = clean;
|
|
447
|
-
}));
|
|
448
|
-
//#endregion
|
|
449
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/inc.js
|
|
450
|
-
var require_inc$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
451
|
-
const SemVer = require_semver$2();
|
|
452
|
-
const inc = (version, release, options, identifier, identifierBase) => {
|
|
453
|
-
if (typeof options === "string") {
|
|
454
|
-
identifierBase = identifier;
|
|
455
|
-
identifier = options;
|
|
456
|
-
options = void 0;
|
|
457
|
-
}
|
|
458
|
-
try {
|
|
459
|
-
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
460
|
-
} catch (er) {
|
|
461
|
-
return null;
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
module.exports = inc;
|
|
465
|
-
}));
|
|
466
|
-
//#endregion
|
|
467
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/diff.js
|
|
468
|
-
var require_diff$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
469
|
-
const parse = require_parse$1();
|
|
470
|
-
const diff = (version1, version2) => {
|
|
471
|
-
const v1 = parse(version1, null, true);
|
|
472
|
-
const v2 = parse(version2, null, true);
|
|
473
|
-
const comparison = v1.compare(v2);
|
|
474
|
-
if (comparison === 0) return null;
|
|
475
|
-
const v1Higher = comparison > 0;
|
|
476
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
477
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
478
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
479
|
-
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
480
|
-
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
481
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
482
|
-
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
483
|
-
return "patch";
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
const prefix = highHasPre ? "pre" : "";
|
|
487
|
-
if (v1.major !== v2.major) return prefix + "major";
|
|
488
|
-
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
489
|
-
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
490
|
-
return "prerelease";
|
|
491
|
-
};
|
|
492
|
-
module.exports = diff;
|
|
493
|
-
}));
|
|
494
|
-
//#endregion
|
|
495
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/major.js
|
|
496
|
-
var require_major$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
497
|
-
const SemVer = require_semver$2();
|
|
498
|
-
const major = (a, loose) => new SemVer(a, loose).major;
|
|
499
|
-
module.exports = major;
|
|
500
|
-
}));
|
|
501
|
-
//#endregion
|
|
502
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/minor.js
|
|
503
|
-
var require_minor$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
504
|
-
const SemVer = require_semver$2();
|
|
505
|
-
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
506
|
-
module.exports = minor;
|
|
507
|
-
}));
|
|
508
|
-
//#endregion
|
|
509
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/patch.js
|
|
510
|
-
var require_patch$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
511
|
-
const SemVer = require_semver$2();
|
|
512
|
-
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
513
|
-
module.exports = patch;
|
|
514
|
-
}));
|
|
515
|
-
//#endregion
|
|
516
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/prerelease.js
|
|
517
|
-
var require_prerelease$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
518
|
-
const parse = require_parse$1();
|
|
519
|
-
const prerelease = (version, options) => {
|
|
520
|
-
const parsed = parse(version, options);
|
|
521
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
522
|
-
};
|
|
523
|
-
module.exports = prerelease;
|
|
524
|
-
}));
|
|
525
|
-
//#endregion
|
|
526
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare.js
|
|
527
|
-
var require_compare$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
528
|
-
const SemVer = require_semver$2();
|
|
529
|
-
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
530
|
-
module.exports = compare;
|
|
531
|
-
}));
|
|
532
|
-
//#endregion
|
|
533
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rcompare.js
|
|
534
|
-
var require_rcompare$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
535
|
-
const compare = require_compare$1();
|
|
536
|
-
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
537
|
-
module.exports = rcompare;
|
|
538
|
-
}));
|
|
539
|
-
//#endregion
|
|
540
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-loose.js
|
|
541
|
-
var require_compare_loose$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
542
|
-
const compare = require_compare$1();
|
|
543
|
-
const compareLoose = (a, b) => compare(a, b, true);
|
|
544
|
-
module.exports = compareLoose;
|
|
545
|
-
}));
|
|
546
|
-
//#endregion
|
|
547
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-build.js
|
|
548
|
-
var require_compare_build$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
549
|
-
const SemVer = require_semver$2();
|
|
550
|
-
const compareBuild = (a, b, loose) => {
|
|
551
|
-
const versionA = new SemVer(a, loose);
|
|
552
|
-
const versionB = new SemVer(b, loose);
|
|
553
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
554
|
-
};
|
|
555
|
-
module.exports = compareBuild;
|
|
556
|
-
}));
|
|
557
|
-
//#endregion
|
|
558
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/sort.js
|
|
559
|
-
var require_sort$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
560
|
-
const compareBuild = require_compare_build$1();
|
|
561
|
-
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
562
|
-
module.exports = sort;
|
|
563
|
-
}));
|
|
564
|
-
//#endregion
|
|
565
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rsort.js
|
|
566
|
-
var require_rsort$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
567
|
-
const compareBuild = require_compare_build$1();
|
|
568
|
-
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
569
|
-
module.exports = rsort;
|
|
570
|
-
}));
|
|
571
|
-
//#endregion
|
|
572
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gt.js
|
|
573
|
-
var require_gt$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
574
|
-
const compare = require_compare$1();
|
|
575
|
-
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
576
|
-
module.exports = gt;
|
|
577
|
-
}));
|
|
578
|
-
//#endregion
|
|
579
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lt.js
|
|
580
|
-
var require_lt$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
581
|
-
const compare = require_compare$1();
|
|
582
|
-
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
583
|
-
module.exports = lt;
|
|
584
|
-
}));
|
|
585
|
-
//#endregion
|
|
586
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/eq.js
|
|
587
|
-
var require_eq$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
588
|
-
const compare = require_compare$1();
|
|
589
|
-
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
590
|
-
module.exports = eq;
|
|
591
|
-
}));
|
|
592
|
-
//#endregion
|
|
593
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/neq.js
|
|
594
|
-
var require_neq$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
595
|
-
const compare = require_compare$1();
|
|
596
|
-
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
597
|
-
module.exports = neq;
|
|
598
|
-
}));
|
|
599
|
-
//#endregion
|
|
600
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gte.js
|
|
601
|
-
var require_gte$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
602
|
-
const compare = require_compare$1();
|
|
603
|
-
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
604
|
-
module.exports = gte;
|
|
605
|
-
}));
|
|
606
|
-
//#endregion
|
|
607
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lte.js
|
|
608
|
-
var require_lte$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
609
|
-
const compare = require_compare$1();
|
|
610
|
-
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
611
|
-
module.exports = lte;
|
|
612
|
-
}));
|
|
613
|
-
//#endregion
|
|
614
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/cmp.js
|
|
615
|
-
var require_cmp$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
616
|
-
const eq = require_eq$1();
|
|
617
|
-
const neq = require_neq$1();
|
|
618
|
-
const gt = require_gt$1();
|
|
619
|
-
const gte = require_gte$1();
|
|
620
|
-
const lt = require_lt$1();
|
|
621
|
-
const lte = require_lte$1();
|
|
622
|
-
const cmp = (a, op, b, loose) => {
|
|
623
|
-
switch (op) {
|
|
624
|
-
case "===":
|
|
625
|
-
if (typeof a === "object") a = a.version;
|
|
626
|
-
if (typeof b === "object") b = b.version;
|
|
627
|
-
return a === b;
|
|
628
|
-
case "!==":
|
|
629
|
-
if (typeof a === "object") a = a.version;
|
|
630
|
-
if (typeof b === "object") b = b.version;
|
|
631
|
-
return a !== b;
|
|
632
|
-
case "":
|
|
633
|
-
case "=":
|
|
634
|
-
case "==": return eq(a, b, loose);
|
|
635
|
-
case "!=": return neq(a, b, loose);
|
|
636
|
-
case ">": return gt(a, b, loose);
|
|
637
|
-
case ">=": return gte(a, b, loose);
|
|
638
|
-
case "<": return lt(a, b, loose);
|
|
639
|
-
case "<=": return lte(a, b, loose);
|
|
640
|
-
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
module.exports = cmp;
|
|
644
|
-
}));
|
|
645
|
-
//#endregion
|
|
646
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/coerce.js
|
|
647
|
-
var require_coerce$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
648
|
-
const SemVer = require_semver$2();
|
|
649
|
-
const parse = require_parse$1();
|
|
650
|
-
const { safeRe: re, t } = require_re$1();
|
|
651
|
-
const coerce = (version, options) => {
|
|
652
|
-
if (version instanceof SemVer) return version;
|
|
653
|
-
if (typeof version === "number") version = String(version);
|
|
654
|
-
if (typeof version !== "string") return null;
|
|
655
|
-
options = options || {};
|
|
656
|
-
let match = null;
|
|
657
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
658
|
-
else {
|
|
659
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
660
|
-
let next;
|
|
661
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
662
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
663
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
664
|
-
}
|
|
665
|
-
coerceRtlRegex.lastIndex = -1;
|
|
666
|
-
}
|
|
667
|
-
if (match === null) return null;
|
|
668
|
-
const major = match[2];
|
|
669
|
-
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
670
|
-
};
|
|
671
|
-
module.exports = coerce;
|
|
672
|
-
}));
|
|
673
|
-
//#endregion
|
|
674
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/truncate.js
|
|
675
|
-
var require_truncate$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
676
|
-
const parse = require_parse$1();
|
|
677
|
-
const constants = require_constants$1();
|
|
678
|
-
const SemVer = require_semver$2();
|
|
679
|
-
const truncate = (version, truncation, options) => {
|
|
680
|
-
if (!constants.RELEASE_TYPES.includes(truncation)) return null;
|
|
681
|
-
const clonedVersion = cloneInputVersion(version, options);
|
|
682
|
-
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
683
|
-
};
|
|
684
|
-
const cloneInputVersion = (version, options) => {
|
|
685
|
-
return parse(version instanceof SemVer ? version.version : version, options);
|
|
686
|
-
};
|
|
687
|
-
const doTruncation = (version, truncation) => {
|
|
688
|
-
if (isPrerelease(truncation)) return version.version;
|
|
689
|
-
version.prerelease = [];
|
|
690
|
-
switch (truncation) {
|
|
691
|
-
case "major":
|
|
692
|
-
version.minor = 0;
|
|
693
|
-
version.patch = 0;
|
|
694
|
-
break;
|
|
695
|
-
case "minor":
|
|
696
|
-
version.patch = 0;
|
|
697
|
-
break;
|
|
119
|
+
for (const [token, maximum] of replacements) source = source.split(`${token}*`).join(`${token}{0,${maximum}}`).split(`${token}+`).join(`${token}{1,${maximum}}`);
|
|
120
|
+
return source;
|
|
121
|
+
}
|
|
122
|
+
function safeRegex$1(source, flags) {
|
|
123
|
+
return new RegExp(makeSafeRegexSource$1(source), flags);
|
|
124
|
+
}
|
|
125
|
+
const NUMERIC$1$1 = /^\d+$/;
|
|
126
|
+
function compareIdentifiers$1(left, right) {
|
|
127
|
+
if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
|
|
128
|
+
const leftNumeric = NUMERIC$1$1.test(String(left));
|
|
129
|
+
const rightNumeric = NUMERIC$1$1.test(String(right));
|
|
130
|
+
const normalizedLeft = leftNumeric ? Number(left) : left;
|
|
131
|
+
const normalizedRight = rightNumeric ? Number(right) : right;
|
|
132
|
+
return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
|
|
133
|
+
}
|
|
134
|
+
const FULL$1 = safeRegex$1(`^${FULL_PLAIN$1}$`);
|
|
135
|
+
const LOOSE$1 = safeRegex$1(`^${LOOSE_PLAIN$1}$`);
|
|
136
|
+
safeRegex$1(`^${PRERELEASE$1}$`);
|
|
137
|
+
safeRegex$1(`^${PRERELEASE_LOOSE$1}$`);
|
|
138
|
+
const COERCE_EXACT$1 = safeRegex$1(COERCE$1);
|
|
139
|
+
const COERCE_FULL_EXACT$1 = safeRegex$1(COERCE_FULL$1);
|
|
140
|
+
const NUMERIC$2 = /^\d+$/;
|
|
141
|
+
function formatComparableVersion$1(version) {
|
|
142
|
+
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
143
|
+
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
144
|
+
}
|
|
145
|
+
function formatFullVersion$1(version) {
|
|
146
|
+
const comparable = formatComparableVersion$1(version);
|
|
147
|
+
return version.build?.length ? `${comparable}+${version.build.join(".")}` : comparable;
|
|
148
|
+
}
|
|
149
|
+
function parse$1(version, options = {}) {
|
|
150
|
+
if (typeof version !== "string") return version;
|
|
151
|
+
if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`);
|
|
152
|
+
const match = version.trim().match(options.loose ? LOOSE$1 : FULL$1);
|
|
153
|
+
if (!match) throw new TypeError(`Invalid version syntax: ${version}`);
|
|
154
|
+
const major = Number(match[1]);
|
|
155
|
+
const minor = Number(match[2]);
|
|
156
|
+
const patch = Number(match[3]);
|
|
157
|
+
if (major > Number.MAX_SAFE_INTEGER || major < 0) throw new TypeError(`Invalid major version: ${match[1]}`);
|
|
158
|
+
if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`);
|
|
159
|
+
if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`);
|
|
160
|
+
const prerelease = match[4] ? match[4].split(".").map((identifier) => {
|
|
161
|
+
if (NUMERIC$2.test(identifier)) {
|
|
162
|
+
const numeric = Number(identifier);
|
|
163
|
+
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
698
164
|
}
|
|
699
|
-
return
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
|
|
165
|
+
return identifier;
|
|
166
|
+
}) : void 0;
|
|
167
|
+
return {
|
|
168
|
+
build: match[5]?.split("."),
|
|
169
|
+
major,
|
|
170
|
+
minor,
|
|
171
|
+
patch,
|
|
172
|
+
prerelease
|
|
703
173
|
};
|
|
704
|
-
|
|
705
|
-
})
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
174
|
+
}
|
|
175
|
+
function tryParse$1(version, options = {}) {
|
|
176
|
+
try {
|
|
177
|
+
return parse$1(version, options);
|
|
178
|
+
} catch {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function compareMainParsed$1(left, right) {
|
|
183
|
+
return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1;
|
|
184
|
+
}
|
|
185
|
+
function comparePrereleaseParsed$1(left, right) {
|
|
186
|
+
const leftPrerelease = left.prerelease;
|
|
187
|
+
const rightPrerelease = right.prerelease;
|
|
188
|
+
if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
|
|
189
|
+
if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
|
|
190
|
+
if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
|
|
191
|
+
for (let index = 0;; index++) {
|
|
192
|
+
const leftIdentifier = leftPrerelease?.[index];
|
|
193
|
+
const rightIdentifier = rightPrerelease?.[index];
|
|
194
|
+
if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
|
|
195
|
+
if (rightIdentifier === void 0) return 1;
|
|
196
|
+
if (leftIdentifier === void 0) return -1;
|
|
197
|
+
if (leftIdentifier !== rightIdentifier) return compareIdentifiers$1(leftIdentifier, rightIdentifier);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function compareParsed$1(left, right) {
|
|
201
|
+
return compareMainParsed$1(left, right) || comparePrereleaseParsed$1(left, right);
|
|
202
|
+
}
|
|
203
|
+
function coerceParsedVersion$1(value, options = {}) {
|
|
204
|
+
if (typeof value === "object") return value;
|
|
205
|
+
const input = typeof value === "number" ? String(value) : value;
|
|
206
|
+
if (typeof input !== "string") return null;
|
|
207
|
+
let match = null;
|
|
208
|
+
if (options.rtl) {
|
|
209
|
+
const expression = safeRegex$1(options.includePrerelease ? COERCE_FULL$1 : COERCE$1, "g");
|
|
210
|
+
let next;
|
|
211
|
+
while ((next = expression.exec(input)) && (!match || match.index + match[0].length !== input.length)) {
|
|
212
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
213
|
+
expression.lastIndex = next.index + next[1].length + next[2].length;
|
|
735
214
|
}
|
|
215
|
+
} else match = (options.includePrerelease ? COERCE_FULL_EXACT$1 : COERCE_EXACT$1).exec(input);
|
|
216
|
+
if (!match) return null;
|
|
217
|
+
const major = match[2];
|
|
218
|
+
return tryParse$1(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
219
|
+
}
|
|
220
|
+
const STRICT_COMPARATOR$1 = safeRegex$1(String.raw`^${GREATER_LESS_THAN$1}\s*(${FULL_PLAIN$1})$|^$`);
|
|
221
|
+
const LOOSE_COMPARATOR$1$1 = safeRegex$1(String.raw`^${GREATER_LESS_THAN$1}\s*(${LOOSE_PLAIN$1})$|^$`);
|
|
222
|
+
function parseComparator$1(comparator, options = {}) {
|
|
223
|
+
const normalized = comparator.trim().replaceAll(/\s+/g, " ");
|
|
224
|
+
const match = normalized.match(options.loose ? LOOSE_COMPARATOR$1$1 : STRICT_COMPARATOR$1);
|
|
225
|
+
if (!match) throw new TypeError(`Invalid comparator: ${normalized}`);
|
|
226
|
+
const operator = match[1] === "=" ? "" : match[1] || "";
|
|
227
|
+
const version = match[2] ? parse$1(match[2], options) : null;
|
|
228
|
+
return {
|
|
229
|
+
operator,
|
|
230
|
+
options,
|
|
231
|
+
value: version ? `${operator}${formatComparableVersion$1(version)}` : "",
|
|
232
|
+
version
|
|
736
233
|
};
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
version = new SemVer(version, this.options);
|
|
841
|
-
} catch (er) {
|
|
842
|
-
return false;
|
|
234
|
+
}
|
|
235
|
+
function testParsedComparator$1(comparator, version) {
|
|
236
|
+
if (!comparator.version) return true;
|
|
237
|
+
const comparison = compareParsed$1(version, comparator.version);
|
|
238
|
+
switch (comparator.operator) {
|
|
239
|
+
case "": return comparison === 0;
|
|
240
|
+
case ">": return comparison > 0;
|
|
241
|
+
case ">=": return comparison >= 0;
|
|
242
|
+
case "<": return comparison < 0;
|
|
243
|
+
case "<=": return comparison <= 0;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function comparatorAllowsPrerelease$1(comparator, version) {
|
|
247
|
+
const allowed = comparator.version;
|
|
248
|
+
return allowed !== null && !!allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch;
|
|
249
|
+
}
|
|
250
|
+
function testComparatorSet$1(set, version, options) {
|
|
251
|
+
if (set.some((comparator) => !testParsedComparator$1(comparator, version))) return false;
|
|
252
|
+
return !version.prerelease?.length || !!options.includePrerelease || set.some((comparator) => comparatorAllowsPrerelease$1(comparator, version));
|
|
253
|
+
}
|
|
254
|
+
function compare(left, right, options = {}) {
|
|
255
|
+
return compareParsed$1(parse$1(left, options), parse$1(right, options));
|
|
256
|
+
}
|
|
257
|
+
function isGreaterOrEqual(left, right, options = {}) {
|
|
258
|
+
return compare(left, right, options) >= 0;
|
|
259
|
+
}
|
|
260
|
+
const BUILD_STRIP$1 = new RegExp(BUILD$1, "g");
|
|
261
|
+
const BUILD_SAFE$1 = safeRegex$1(BUILD$1);
|
|
262
|
+
const STRICT_HYPHEN$1 = safeRegex$1(String.raw`^\s*(${XRANGE_PLAIN$1})\s+-\s+(${XRANGE_PLAIN$1})\s*$`);
|
|
263
|
+
const LOOSE_HYPHEN$1 = safeRegex$1(String.raw`^\s*(${XRANGE_PLAIN_LOOSE$1})\s+-\s+(${XRANGE_PLAIN_LOOSE$1})\s*$`);
|
|
264
|
+
const COMPARATOR_TRIM$1 = safeRegex$1(String.raw`(\s*)${GREATER_LESS_THAN$1}\s*(${LOOSE_PLAIN$1}|${XRANGE_PLAIN$1})`, "g");
|
|
265
|
+
const TILDE_TRIM$1 = safeRegex$1(String.raw`(\s*)${LONE_TILDE$1}\s+`, "g");
|
|
266
|
+
const CARET_TRIM$1 = safeRegex$1(String.raw`(\s*)${LONE_CARET$1}\s+`, "g");
|
|
267
|
+
const STRICT_TILDE$1 = safeRegex$1(`^${LONE_TILDE$1}${XRANGE_PLAIN$1}$`);
|
|
268
|
+
const LOOSE_TILDE$1 = safeRegex$1(`^${LONE_TILDE$1}${XRANGE_PLAIN_LOOSE$1}$`);
|
|
269
|
+
const STRICT_CARET$1 = safeRegex$1(`^${LONE_CARET$1}${XRANGE_PLAIN$1}$`);
|
|
270
|
+
const LOOSE_CARET$1 = safeRegex$1(`^${LONE_CARET$1}${XRANGE_PLAIN_LOOSE$1}$`);
|
|
271
|
+
const STRICT_XRANGE$1 = safeRegex$1(String.raw`^${GREATER_LESS_THAN$1}\s*${XRANGE_PLAIN$1}$`);
|
|
272
|
+
const LOOSE_XRANGE$1 = safeRegex$1(String.raw`^${GREATER_LESS_THAN$1}\s*${XRANGE_PLAIN_LOOSE$1}$`);
|
|
273
|
+
const STAR$1 = safeRegex$1(String.raw`(<|>)?=?\s*\*`);
|
|
274
|
+
const GTE_ZERO$1 = /^\s*>=\s*0\.0\.0\s*$/;
|
|
275
|
+
const GTE_ZERO_PRERELEASE$1 = /^\s*>=\s*0\.0\.0-0\s*$/;
|
|
276
|
+
const LOOSE_COMPARATOR$2 = safeRegex$1(String.raw`^${GREATER_LESS_THAN$1}\s*(${LOOSE_PLAIN$1})$|^$`);
|
|
277
|
+
function isWildcard$1(value) {
|
|
278
|
+
return !value || String(value).toLowerCase() === "x" || String(value) === "*";
|
|
279
|
+
}
|
|
280
|
+
function hasInvalidWildcardOrder$1(major, minor, patch) {
|
|
281
|
+
return isWildcard$1(major) && !isWildcard$1(minor) || isWildcard$1(minor) && Boolean(patch) && !isWildcard$1(patch);
|
|
282
|
+
}
|
|
283
|
+
function replaceTilde$1(comparator, options) {
|
|
284
|
+
const expression = options.loose ? LOOSE_TILDE$1 : STRICT_TILDE$1;
|
|
285
|
+
const lowerPrerelease = options.includePrerelease ? "-0" : "";
|
|
286
|
+
return comparator.replace(expression, (_match, major, minor, patch, prerelease) => {
|
|
287
|
+
if (isWildcard$1(major)) return "";
|
|
288
|
+
if (isWildcard$1(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
289
|
+
if (isWildcard$1(patch)) return `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0`;
|
|
290
|
+
return prerelease ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`;
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function replaceTildes$1(comparator, options) {
|
|
294
|
+
return comparator.trim().split(/\s+/).map((part) => replaceTilde$1(part, options)).join(" ");
|
|
295
|
+
}
|
|
296
|
+
function replaceCaret$1(comparator, options) {
|
|
297
|
+
const expression = options.loose ? LOOSE_CARET$1 : STRICT_CARET$1;
|
|
298
|
+
const lowerPrerelease = options.includePrerelease ? "-0" : "";
|
|
299
|
+
return comparator.replace(expression, (_match, major, minor, patch, prerelease) => {
|
|
300
|
+
if (isWildcard$1(major)) return "";
|
|
301
|
+
if (isWildcard$1(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
302
|
+
if (isWildcard$1(patch)) return major === "0" ? `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
303
|
+
if (prerelease) return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch}-${prerelease} <${Number(major) + 1}.0.0-0`;
|
|
304
|
+
return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${Number(major) + 1}.0.0-0`;
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
function replaceCarets$1(comparator, options) {
|
|
308
|
+
return comparator.trim().split(/\s+/).map((part) => replaceCaret$1(part, options)).join(" ");
|
|
309
|
+
}
|
|
310
|
+
function replaceXRange$1(comparator, options) {
|
|
311
|
+
const expression = options.loose ? LOOSE_XRANGE$1 : STRICT_XRANGE$1;
|
|
312
|
+
return comparator.trim().replace(expression, (match, rawOperator, rawMajor, rawMinor, rawPatch) => {
|
|
313
|
+
let operator = rawOperator;
|
|
314
|
+
let major = rawMajor;
|
|
315
|
+
let minor = rawMinor;
|
|
316
|
+
let patch = rawPatch;
|
|
317
|
+
if (hasInvalidWildcardOrder$1(String(major), minor === void 0 ? void 0 : String(minor), patch === void 0 ? void 0 : String(patch))) return comparator;
|
|
318
|
+
const wildcardMajor = isWildcard$1(major);
|
|
319
|
+
const wildcardMinor = wildcardMajor || isWildcard$1(minor);
|
|
320
|
+
const wildcardPatch = wildcardMinor || isWildcard$1(patch);
|
|
321
|
+
if (operator === "=" && wildcardPatch) operator = "";
|
|
322
|
+
if (wildcardMajor) return operator === ">" || operator === "<" ? "<0.0.0-0" : "*";
|
|
323
|
+
let prerelease = options.includePrerelease ? "-0" : "";
|
|
324
|
+
if (operator && wildcardPatch) {
|
|
325
|
+
if (wildcardMinor) minor = 0;
|
|
326
|
+
patch = 0;
|
|
327
|
+
if (operator === ">") {
|
|
328
|
+
operator = ">=";
|
|
329
|
+
if (wildcardMinor) {
|
|
330
|
+
major = Number(major) + 1;
|
|
331
|
+
minor = 0;
|
|
332
|
+
} else minor = Number(minor) + 1;
|
|
333
|
+
} else if (operator === "<=") {
|
|
334
|
+
operator = "<";
|
|
335
|
+
if (wildcardMinor) major = Number(major) + 1;
|
|
336
|
+
else minor = Number(minor) + 1;
|
|
843
337
|
}
|
|
844
|
-
|
|
845
|
-
return
|
|
338
|
+
if (operator === "<") prerelease = "-0";
|
|
339
|
+
return `${operator}${major}.${minor}.${patch}${prerelease}`;
|
|
846
340
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
let
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
const parseComparator = (comp, options) => {
|
|
871
|
-
comp = comp.replace(re[t.BUILD], "");
|
|
872
|
-
debug("comp", comp, options);
|
|
873
|
-
comp = replaceCarets(comp, options);
|
|
874
|
-
debug("caret", comp);
|
|
875
|
-
comp = replaceTildes(comp, options);
|
|
876
|
-
debug("tildes", comp);
|
|
877
|
-
comp = replaceXRanges(comp, options);
|
|
878
|
-
debug("xrange", comp);
|
|
879
|
-
comp = replaceStars(comp, options);
|
|
880
|
-
debug("stars", comp);
|
|
881
|
-
return comp;
|
|
882
|
-
};
|
|
883
|
-
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
884
|
-
const invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
885
|
-
const replaceTildes = (comp, options) => {
|
|
886
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
887
|
-
};
|
|
888
|
-
const replaceTilde = (comp, options) => {
|
|
889
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
890
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
891
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
892
|
-
let ret;
|
|
893
|
-
if (isX(M)) ret = "";
|
|
894
|
-
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
895
|
-
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
896
|
-
else if (pr) {
|
|
897
|
-
debug("replaceTilde pr", pr);
|
|
898
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
899
|
-
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
900
|
-
debug("tilde return", ret);
|
|
901
|
-
return ret;
|
|
902
|
-
});
|
|
903
|
-
};
|
|
904
|
-
const replaceCarets = (comp, options) => {
|
|
905
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
906
|
-
};
|
|
907
|
-
const replaceCaret = (comp, options) => {
|
|
908
|
-
debug("caret", comp, options);
|
|
909
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
910
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
911
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
912
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
913
|
-
let ret;
|
|
914
|
-
if (isX(M)) ret = "";
|
|
915
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
916
|
-
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
917
|
-
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
918
|
-
else if (pr) {
|
|
919
|
-
debug("replaceCaret pr", pr);
|
|
920
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
921
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
922
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
923
|
-
} else {
|
|
924
|
-
debug("no pr");
|
|
925
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
926
|
-
else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
927
|
-
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
928
|
-
}
|
|
929
|
-
debug("caret return", ret);
|
|
930
|
-
return ret;
|
|
931
|
-
});
|
|
932
|
-
};
|
|
933
|
-
const replaceXRanges = (comp, options) => {
|
|
934
|
-
debug("replaceXRanges", comp, options);
|
|
935
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
936
|
-
};
|
|
937
|
-
const replaceXRange = (comp, options) => {
|
|
938
|
-
comp = comp.trim();
|
|
939
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
940
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
941
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
942
|
-
if (invalidXRangeOrder(M, m, p)) return comp;
|
|
943
|
-
const xM = isX(M);
|
|
944
|
-
const xm = xM || isX(m);
|
|
945
|
-
const xp = xm || isX(p);
|
|
946
|
-
const anyX = xp;
|
|
947
|
-
if (gtlt === "=" && anyX) gtlt = "";
|
|
948
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
949
|
-
if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
950
|
-
else ret = "*";
|
|
951
|
-
else if (gtlt && anyX) {
|
|
952
|
-
if (xm) m = 0;
|
|
953
|
-
p = 0;
|
|
954
|
-
if (gtlt === ">") {
|
|
955
|
-
gtlt = ">=";
|
|
956
|
-
if (xm) {
|
|
957
|
-
M = +M + 1;
|
|
958
|
-
m = 0;
|
|
959
|
-
p = 0;
|
|
960
|
-
} else {
|
|
961
|
-
m = +m + 1;
|
|
962
|
-
p = 0;
|
|
963
|
-
}
|
|
964
|
-
} else if (gtlt === "<=") {
|
|
965
|
-
gtlt = "<";
|
|
966
|
-
if (xm) M = +M + 1;
|
|
967
|
-
else m = +m + 1;
|
|
968
|
-
}
|
|
969
|
-
if (gtlt === "<") pr = "-0";
|
|
970
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
971
|
-
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
972
|
-
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
973
|
-
debug("xRange return", ret);
|
|
974
|
-
return ret;
|
|
975
|
-
});
|
|
976
|
-
};
|
|
977
|
-
const replaceStars = (comp, options) => {
|
|
978
|
-
debug("replaceStars", comp, options);
|
|
979
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
980
|
-
};
|
|
981
|
-
const replaceGTE0 = (comp, options) => {
|
|
982
|
-
debug("replaceGTE0", comp, options);
|
|
983
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
984
|
-
};
|
|
985
|
-
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
986
|
-
if (isX(fM)) from = "";
|
|
987
|
-
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
988
|
-
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
989
|
-
else if (fpr) from = `>=${from}`;
|
|
990
|
-
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
991
|
-
if (isX(tM)) to = "";
|
|
992
|
-
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
993
|
-
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
994
|
-
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
995
|
-
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
341
|
+
if (wildcardMinor) return `>=${major}.0.0${prerelease} <${Number(major) + 1}.0.0-0`;
|
|
342
|
+
if (wildcardPatch) return `>=${major}.${minor}.0${prerelease} <${major}.${Number(minor) + 1}.0-0`;
|
|
343
|
+
return match;
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function replaceXRanges$1(comparator, options) {
|
|
347
|
+
return comparator.split(/\s+/).map((part) => replaceXRange$1(part, options)).join(" ");
|
|
348
|
+
}
|
|
349
|
+
function replaceHyphenRange$1(range, options) {
|
|
350
|
+
const expression = options.loose ? LOOSE_HYPHEN$1 : STRICT_HYPHEN$1;
|
|
351
|
+
return range.replace(expression, (_match, rawFrom, fromMajor, fromMinor, fromPatch, fromPrerelease, _fromBuild, rawTo, toMajor, toMinor, toPatch, toPrerelease) => {
|
|
352
|
+
let from = rawFrom;
|
|
353
|
+
let to = rawTo;
|
|
354
|
+
if (isWildcard$1(fromMajor)) from = "";
|
|
355
|
+
else if (isWildcard$1(fromMinor)) from = `>=${fromMajor}.0.0${options.includePrerelease ? "-0" : ""}`;
|
|
356
|
+
else if (isWildcard$1(fromPatch)) from = `>=${fromMajor}.${fromMinor}.0${options.includePrerelease ? "-0" : ""}`;
|
|
357
|
+
else if (fromPrerelease) from = `>=${from}`;
|
|
358
|
+
else from = `>=${from}${options.includePrerelease ? "-0" : ""}`;
|
|
359
|
+
if (isWildcard$1(toMajor)) to = "";
|
|
360
|
+
else if (isWildcard$1(toMinor)) to = `<${Number(toMajor) + 1}.0.0-0`;
|
|
361
|
+
else if (isWildcard$1(toPatch)) to = `<${toMajor}.${Number(toMinor) + 1}.0-0`;
|
|
362
|
+
else if (toPrerelease) to = `<=${toMajor}.${toMinor}.${toPatch}-${toPrerelease}`;
|
|
363
|
+
else if (options.includePrerelease) to = `<${toMajor}.${toMinor}.${Number(toPatch) + 1}-0`;
|
|
996
364
|
else to = `<=${to}`;
|
|
997
365
|
return `${from} ${to}`.trim();
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
})
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
1028
|
-
debug("comparator", comp, options);
|
|
1029
|
-
this.options = options;
|
|
1030
|
-
this.loose = !!options.loose;
|
|
1031
|
-
this.parse(comp);
|
|
1032
|
-
if (this.semver === ANY) this.value = "";
|
|
1033
|
-
else this.value = this.operator + this.semver.version;
|
|
1034
|
-
debug("comp", this);
|
|
1035
|
-
}
|
|
1036
|
-
parse(comp) {
|
|
1037
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
1038
|
-
const m = comp.match(r);
|
|
1039
|
-
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
1040
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
1041
|
-
if (this.operator === "=") this.operator = "";
|
|
1042
|
-
if (!m[2]) this.semver = ANY;
|
|
1043
|
-
else this.semver = new SemVer(m[2], this.options.loose);
|
|
1044
|
-
}
|
|
1045
|
-
toString() {
|
|
1046
|
-
return this.value;
|
|
1047
|
-
}
|
|
1048
|
-
test(version) {
|
|
1049
|
-
debug("Comparator.test", version, this.options.loose);
|
|
1050
|
-
if (this.semver === ANY || version === ANY) return true;
|
|
1051
|
-
if (typeof version === "string") try {
|
|
1052
|
-
version = new SemVer(version, this.options);
|
|
1053
|
-
} catch (er) {
|
|
1054
|
-
return false;
|
|
1055
|
-
}
|
|
1056
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
1057
|
-
}
|
|
1058
|
-
intersects(comp, options) {
|
|
1059
|
-
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
1060
|
-
if (this.operator === "") {
|
|
1061
|
-
if (this.value === "") return true;
|
|
1062
|
-
return new Range(comp.value, options).test(this.value);
|
|
1063
|
-
} else if (comp.operator === "") {
|
|
1064
|
-
if (comp.value === "") return true;
|
|
1065
|
-
return new Range(this.value, options).test(comp.semver);
|
|
1066
|
-
}
|
|
1067
|
-
options = parseOptions(options);
|
|
1068
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
1069
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
1070
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
1071
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
1072
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
1073
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
1074
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
1075
|
-
return false;
|
|
1076
|
-
}
|
|
1077
|
-
};
|
|
1078
|
-
const parseOptions = require_parse_options$1();
|
|
1079
|
-
const { safeRe: re, t } = require_re$1();
|
|
1080
|
-
const cmp = require_cmp$1();
|
|
1081
|
-
const debug = require_debug$1();
|
|
1082
|
-
const SemVer = require_semver$2();
|
|
1083
|
-
const Range = require_range$1();
|
|
1084
|
-
}));
|
|
1085
|
-
//#endregion
|
|
1086
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/satisfies.js
|
|
1087
|
-
var require_satisfies$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1088
|
-
const Range = require_range$1();
|
|
1089
|
-
const satisfies = (version, range, options) => {
|
|
1090
|
-
try {
|
|
1091
|
-
range = new Range(range, options);
|
|
1092
|
-
} catch (er) {
|
|
1093
|
-
return false;
|
|
1094
|
-
}
|
|
1095
|
-
return range.test(version);
|
|
1096
|
-
};
|
|
1097
|
-
module.exports = satisfies;
|
|
1098
|
-
}));
|
|
1099
|
-
//#endregion
|
|
1100
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/to-comparators.js
|
|
1101
|
-
var require_to_comparators$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1102
|
-
const Range = require_range$1();
|
|
1103
|
-
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1104
|
-
module.exports = toComparators;
|
|
1105
|
-
}));
|
|
1106
|
-
//#endregion
|
|
1107
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/max-satisfying.js
|
|
1108
|
-
var require_max_satisfying$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1109
|
-
const SemVer = require_semver$2();
|
|
1110
|
-
const Range = require_range$1();
|
|
1111
|
-
const maxSatisfying = (versions, range, options) => {
|
|
1112
|
-
let max = null;
|
|
1113
|
-
let maxSV = null;
|
|
1114
|
-
let rangeObj = null;
|
|
1115
|
-
try {
|
|
1116
|
-
rangeObj = new Range(range, options);
|
|
1117
|
-
} catch (er) {
|
|
1118
|
-
return null;
|
|
1119
|
-
}
|
|
1120
|
-
versions.forEach((v) => {
|
|
1121
|
-
if (rangeObj.test(v)) {
|
|
1122
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
1123
|
-
max = v;
|
|
1124
|
-
maxSV = new SemVer(max, options);
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
});
|
|
1128
|
-
return max;
|
|
1129
|
-
};
|
|
1130
|
-
module.exports = maxSatisfying;
|
|
1131
|
-
}));
|
|
1132
|
-
//#endregion
|
|
1133
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/min-satisfying.js
|
|
1134
|
-
var require_min_satisfying$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1135
|
-
const SemVer = require_semver$2();
|
|
1136
|
-
const Range = require_range$1();
|
|
1137
|
-
const minSatisfying = (versions, range, options) => {
|
|
1138
|
-
let min = null;
|
|
1139
|
-
let minSV = null;
|
|
1140
|
-
let rangeObj = null;
|
|
1141
|
-
try {
|
|
1142
|
-
rangeObj = new Range(range, options);
|
|
1143
|
-
} catch (er) {
|
|
1144
|
-
return null;
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
function expandComparator$1(comparator, options) {
|
|
369
|
+
return replaceXRanges$1(replaceTildes$1(replaceCarets$1(comparator.replace(BUILD_SAFE$1, ""), options), options), options).trim().replace(STAR$1, "");
|
|
370
|
+
}
|
|
371
|
+
function parseSimpleRange$1(input, options) {
|
|
372
|
+
let parts = replaceHyphenRange$1(input.replace(BUILD_STRIP$1, ""), options).replace(COMPARATOR_TRIM$1, "$1$2$3").replace(TILDE_TRIM$1, "$1~").replace(CARET_TRIM$1, "$1^").split(" ").map((part) => expandComparator$1(part, options)).join(" ").split(/\s+/).map((part) => part.trim().replace(options.includePrerelease ? GTE_ZERO_PRERELEASE$1 : GTE_ZERO$1, ""));
|
|
373
|
+
if (options.loose) parts = parts.filter((part) => LOOSE_COMPARATOR$2.test(part));
|
|
374
|
+
const unique = /* @__PURE__ */ new Map();
|
|
375
|
+
for (const comparator of parts.map((part) => parseComparator$1(part, options))) {
|
|
376
|
+
if (comparator.value === "<0.0.0-0") return [comparator];
|
|
377
|
+
unique.set(comparator.value, comparator);
|
|
378
|
+
}
|
|
379
|
+
if (unique.size > 1) unique.delete("");
|
|
380
|
+
return [...unique.values()];
|
|
381
|
+
}
|
|
382
|
+
function parseRange$1(range, options = {}) {
|
|
383
|
+
if (typeof range !== "string") return range;
|
|
384
|
+
const parsedOptions = { ...options };
|
|
385
|
+
const raw = range.trim().replaceAll(/\s+/g, " ");
|
|
386
|
+
let sets = raw.split("||").map((part) => parseSimpleRange$1(part.trim(), parsedOptions)).filter((set) => set.length);
|
|
387
|
+
if (!sets.length) throw new TypeError(`Range contains no valid comparator sets: ${raw}`);
|
|
388
|
+
if (sets.length > 1) {
|
|
389
|
+
const first = sets[0];
|
|
390
|
+
sets = sets.filter((set) => set[0]?.value !== "<0.0.0-0");
|
|
391
|
+
if (!sets.length) sets = [first];
|
|
392
|
+
else if (sets.length > 1) {
|
|
393
|
+
const any = sets.find((set) => set.length === 1 && set[0]?.value === "");
|
|
394
|
+
if (any) sets = [any];
|
|
1145
395
|
}
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
}
|
|
1153
|
-
});
|
|
1154
|
-
return min;
|
|
396
|
+
}
|
|
397
|
+
return {
|
|
398
|
+
normalized: sets.map((set) => set.map((comparator) => comparator.value).join(" ")).join("||"),
|
|
399
|
+
options: parsedOptions,
|
|
400
|
+
raw,
|
|
401
|
+
sets
|
|
1155
402
|
};
|
|
1156
|
-
|
|
1157
|
-
})
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
const SemVer = require_semver$2();
|
|
1162
|
-
const Range = require_range$1();
|
|
1163
|
-
const gt = require_gt$1();
|
|
1164
|
-
const minVersion = (range, loose) => {
|
|
1165
|
-
range = new Range(range, loose);
|
|
1166
|
-
let minver = new SemVer("0.0.0");
|
|
1167
|
-
if (range.test(minver)) return minver;
|
|
1168
|
-
minver = new SemVer("0.0.0-0");
|
|
1169
|
-
if (range.test(minver)) return minver;
|
|
1170
|
-
minver = null;
|
|
1171
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1172
|
-
const comparators = range.set[i];
|
|
1173
|
-
let setMin = null;
|
|
1174
|
-
comparators.forEach((comparator) => {
|
|
1175
|
-
const compver = new SemVer(comparator.semver.version);
|
|
1176
|
-
switch (comparator.operator) {
|
|
1177
|
-
case ">":
|
|
1178
|
-
if (compver.prerelease.length === 0) compver.patch++;
|
|
1179
|
-
else compver.prerelease.push(0);
|
|
1180
|
-
compver.raw = compver.format();
|
|
1181
|
-
case "":
|
|
1182
|
-
case ">=":
|
|
1183
|
-
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
1184
|
-
break;
|
|
1185
|
-
case "<":
|
|
1186
|
-
case "<=": break;
|
|
1187
|
-
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1188
|
-
}
|
|
1189
|
-
});
|
|
1190
|
-
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
1191
|
-
}
|
|
1192
|
-
if (minver && range.test(minver)) return minver;
|
|
403
|
+
}
|
|
404
|
+
function tryParseRange$1(range, options = {}) {
|
|
405
|
+
try {
|
|
406
|
+
return parseRange$1(range, options);
|
|
407
|
+
} catch {
|
|
1193
408
|
return null;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
const { ANY } = Comparator;
|
|
1216
|
-
const Range = require_range$1();
|
|
1217
|
-
const satisfies = require_satisfies$1();
|
|
1218
|
-
const gt = require_gt$1();
|
|
1219
|
-
const lt = require_lt$1();
|
|
1220
|
-
const lte = require_lte$1();
|
|
1221
|
-
const gte = require_gte$1();
|
|
1222
|
-
const outside = (version, range, hilo, options) => {
|
|
1223
|
-
version = new SemVer(version, options);
|
|
1224
|
-
range = new Range(range, options);
|
|
1225
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1226
|
-
switch (hilo) {
|
|
1227
|
-
case ">":
|
|
1228
|
-
gtfn = gt;
|
|
1229
|
-
ltefn = lte;
|
|
1230
|
-
ltfn = lt;
|
|
1231
|
-
comp = ">";
|
|
1232
|
-
ecomp = ">=";
|
|
1233
|
-
break;
|
|
1234
|
-
case "<":
|
|
1235
|
-
gtfn = lt;
|
|
1236
|
-
ltefn = gte;
|
|
1237
|
-
ltfn = gt;
|
|
1238
|
-
comp = "<";
|
|
1239
|
-
ecomp = "<=";
|
|
1240
|
-
break;
|
|
1241
|
-
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1242
|
-
}
|
|
1243
|
-
if (satisfies(version, range, options)) return false;
|
|
1244
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1245
|
-
const comparators = range.set[i];
|
|
1246
|
-
let high = null;
|
|
1247
|
-
let low = null;
|
|
1248
|
-
comparators.forEach((comparator) => {
|
|
1249
|
-
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
1250
|
-
high = high || comparator;
|
|
1251
|
-
low = low || comparator;
|
|
1252
|
-
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
1253
|
-
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
1254
|
-
});
|
|
1255
|
-
if (high.operator === comp || high.operator === ecomp) return false;
|
|
1256
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
1257
|
-
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
1258
|
-
}
|
|
1259
|
-
return true;
|
|
1260
|
-
};
|
|
1261
|
-
module.exports = outside;
|
|
1262
|
-
}));
|
|
1263
|
-
//#endregion
|
|
1264
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/gtr.js
|
|
1265
|
-
var require_gtr$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1266
|
-
const outside = require_outside$1();
|
|
1267
|
-
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1268
|
-
module.exports = gtr;
|
|
1269
|
-
}));
|
|
1270
|
-
//#endregion
|
|
1271
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/ltr.js
|
|
1272
|
-
var require_ltr$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1273
|
-
const outside = require_outside$1();
|
|
1274
|
-
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1275
|
-
module.exports = ltr;
|
|
1276
|
-
}));
|
|
1277
|
-
//#endregion
|
|
1278
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/intersects.js
|
|
1279
|
-
var require_intersects$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1280
|
-
const Range = require_range$1();
|
|
1281
|
-
const intersects = (r1, r2, options) => {
|
|
1282
|
-
r1 = new Range(r1, options);
|
|
1283
|
-
r2 = new Range(r2, options);
|
|
1284
|
-
return r1.intersects(r2, options);
|
|
1285
|
-
};
|
|
1286
|
-
module.exports = intersects;
|
|
1287
|
-
}));
|
|
1288
|
-
//#endregion
|
|
1289
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/simplify.js
|
|
1290
|
-
var require_simplify$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1291
|
-
const satisfies = require_satisfies$1();
|
|
1292
|
-
const compare = require_compare$1();
|
|
1293
|
-
module.exports = (versions, range, options) => {
|
|
1294
|
-
const set = [];
|
|
1295
|
-
let first = null;
|
|
1296
|
-
let prev = null;
|
|
1297
|
-
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1298
|
-
for (const version of v) if (satisfies(version, range, options)) {
|
|
1299
|
-
prev = version;
|
|
1300
|
-
if (!first) first = version;
|
|
1301
|
-
} else {
|
|
1302
|
-
if (prev) set.push([first, prev]);
|
|
1303
|
-
prev = null;
|
|
1304
|
-
first = null;
|
|
1305
|
-
}
|
|
1306
|
-
if (first) set.push([first, null]);
|
|
1307
|
-
const ranges = [];
|
|
1308
|
-
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
1309
|
-
else if (!max && min === v[0]) ranges.push("*");
|
|
1310
|
-
else if (!max) ranges.push(`>=${min}`);
|
|
1311
|
-
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
1312
|
-
else ranges.push(`${min} - ${max}`);
|
|
1313
|
-
const simplified = ranges.join(" || ");
|
|
1314
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1315
|
-
return simplified.length < original.length ? simplified : range;
|
|
1316
|
-
};
|
|
1317
|
-
}));
|
|
1318
|
-
//#endregion
|
|
1319
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/subset.js
|
|
1320
|
-
var require_subset$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1321
|
-
const Range = require_range$1();
|
|
1322
|
-
const Comparator = require_comparator$1();
|
|
1323
|
-
const { ANY } = Comparator;
|
|
1324
|
-
const satisfies = require_satisfies$1();
|
|
1325
|
-
const compare = require_compare$1();
|
|
1326
|
-
const subset = (sub, dom, options = {}) => {
|
|
1327
|
-
if (sub === dom) return true;
|
|
1328
|
-
sub = new Range(sub, options);
|
|
1329
|
-
dom = new Range(dom, options);
|
|
1330
|
-
let sawNonNull = false;
|
|
1331
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
1332
|
-
for (const simpleDom of dom.set) {
|
|
1333
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
1334
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
1335
|
-
if (isSub) continue OUTER;
|
|
1336
|
-
}
|
|
1337
|
-
if (sawNonNull) return false;
|
|
1338
|
-
}
|
|
1339
|
-
return true;
|
|
1340
|
-
};
|
|
1341
|
-
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1342
|
-
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
1343
|
-
const simpleSubset = (sub, dom, options) => {
|
|
1344
|
-
if (sub === dom) return true;
|
|
1345
|
-
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
1346
|
-
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
1347
|
-
else sub = minimumVersion;
|
|
1348
|
-
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1349
|
-
else dom = minimumVersion;
|
|
1350
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
1351
|
-
let gt, lt;
|
|
1352
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
1353
|
-
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
1354
|
-
else eqSet.add(c.semver);
|
|
1355
|
-
if (eqSet.size > 1) return null;
|
|
1356
|
-
let gtltComp;
|
|
1357
|
-
if (gt && lt) {
|
|
1358
|
-
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1359
|
-
if (gtltComp > 0) return null;
|
|
1360
|
-
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
1361
|
-
}
|
|
1362
|
-
for (const eq of eqSet) {
|
|
1363
|
-
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
1364
|
-
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
1365
|
-
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
1366
|
-
return true;
|
|
1367
|
-
}
|
|
1368
|
-
let higher, lower;
|
|
1369
|
-
let hasDomLT, hasDomGT;
|
|
1370
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1371
|
-
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1372
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1373
|
-
for (const c of dom) {
|
|
1374
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1375
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1376
|
-
if (gt) {
|
|
1377
|
-
if (needDomGTPre) {
|
|
1378
|
-
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;
|
|
1379
|
-
}
|
|
1380
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
1381
|
-
higher = higherGT(gt, c, options);
|
|
1382
|
-
if (higher === c && higher !== gt) return false;
|
|
1383
|
-
} else if (gt.operator === ">=" && !c.test(gt.semver)) return false;
|
|
1384
|
-
}
|
|
1385
|
-
if (lt) {
|
|
1386
|
-
if (needDomLTPre) {
|
|
1387
|
-
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;
|
|
1388
|
-
}
|
|
1389
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
1390
|
-
lower = lowerLT(lt, c, options);
|
|
1391
|
-
if (lower === c && lower !== lt) return false;
|
|
1392
|
-
} else if (lt.operator === "<=" && !c.test(lt.semver)) return false;
|
|
1393
|
-
}
|
|
1394
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
1395
|
-
}
|
|
1396
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
1397
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
1398
|
-
if (needDomGTPre || needDomLTPre) return false;
|
|
1399
|
-
return true;
|
|
1400
|
-
};
|
|
1401
|
-
const higherGT = (a, b, options) => {
|
|
1402
|
-
if (!a) return b;
|
|
1403
|
-
const comp = compare(a.semver, b.semver, options);
|
|
1404
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1405
|
-
};
|
|
1406
|
-
const lowerLT = (a, b, options) => {
|
|
1407
|
-
if (!a) return b;
|
|
1408
|
-
const comp = compare(a.semver, b.semver, options);
|
|
1409
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1410
|
-
};
|
|
1411
|
-
module.exports = subset;
|
|
1412
|
-
}));
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function testParsedRange$1(range, version) {
|
|
412
|
+
return range.sets.some((set) => testComparatorSet$1(set, version, range.options));
|
|
413
|
+
}
|
|
414
|
+
function testRangeVersion$1(range, version) {
|
|
415
|
+
const parsed = tryParse$1(version, range.options);
|
|
416
|
+
return parsed ? testParsedRange$1(range, parsed) : false;
|
|
417
|
+
}
|
|
418
|
+
function satisfies$1(version, range, options = {}) {
|
|
419
|
+
const parsed = tryParseRange$1(range, options);
|
|
420
|
+
return parsed ? testRangeVersion$1(parsed, version) : false;
|
|
421
|
+
}
|
|
422
|
+
function normalize(version, options = {}) {
|
|
423
|
+
const parsed = tryParse$1(version, options);
|
|
424
|
+
return parsed ? formatComparableVersion$1(parsed) : null;
|
|
425
|
+
}
|
|
426
|
+
function coerce$1(value, options = {}) {
|
|
427
|
+
const parsed = coerceParsedVersion$1(value, options);
|
|
428
|
+
return parsed ? formatFullVersion$1(parsed) : null;
|
|
429
|
+
}
|
|
1413
430
|
//#endregion
|
|
1414
431
|
//#region ../../packages/server/dist/handler.mjs
|
|
1415
|
-
var import_semver$1 = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1416
|
-
const internalRe = require_re$1();
|
|
1417
|
-
const constants = require_constants$1();
|
|
1418
|
-
const SemVer = require_semver$2();
|
|
1419
|
-
const identifiers = require_identifiers$1();
|
|
1420
|
-
module.exports = {
|
|
1421
|
-
parse: require_parse$1(),
|
|
1422
|
-
valid: require_valid$3(),
|
|
1423
|
-
clean: require_clean$1(),
|
|
1424
|
-
inc: require_inc$1(),
|
|
1425
|
-
diff: require_diff$1(),
|
|
1426
|
-
major: require_major$1(),
|
|
1427
|
-
minor: require_minor$1(),
|
|
1428
|
-
patch: require_patch$1(),
|
|
1429
|
-
prerelease: require_prerelease$1(),
|
|
1430
|
-
compare: require_compare$1(),
|
|
1431
|
-
rcompare: require_rcompare$1(),
|
|
1432
|
-
compareLoose: require_compare_loose$1(),
|
|
1433
|
-
compareBuild: require_compare_build$1(),
|
|
1434
|
-
sort: require_sort$1(),
|
|
1435
|
-
rsort: require_rsort$1(),
|
|
1436
|
-
gt: require_gt$1(),
|
|
1437
|
-
lt: require_lt$1(),
|
|
1438
|
-
eq: require_eq$1(),
|
|
1439
|
-
neq: require_neq$1(),
|
|
1440
|
-
gte: require_gte$1(),
|
|
1441
|
-
lte: require_lte$1(),
|
|
1442
|
-
cmp: require_cmp$1(),
|
|
1443
|
-
coerce: require_coerce$1(),
|
|
1444
|
-
truncate: require_truncate$1(),
|
|
1445
|
-
Comparator: require_comparator$1(),
|
|
1446
|
-
Range: require_range$1(),
|
|
1447
|
-
satisfies: require_satisfies$1(),
|
|
1448
|
-
toComparators: require_to_comparators$1(),
|
|
1449
|
-
maxSatisfying: require_max_satisfying$1(),
|
|
1450
|
-
minSatisfying: require_min_satisfying$1(),
|
|
1451
|
-
minVersion: require_min_version$1(),
|
|
1452
|
-
validRange: require_valid$2(),
|
|
1453
|
-
outside: require_outside$1(),
|
|
1454
|
-
gtr: require_gtr$1(),
|
|
1455
|
-
ltr: require_ltr$1(),
|
|
1456
|
-
intersects: require_intersects$1(),
|
|
1457
|
-
simplifyRange: require_simplify$1(),
|
|
1458
|
-
subset: require_subset$1(),
|
|
1459
|
-
SemVer,
|
|
1460
|
-
re: internalRe.re,
|
|
1461
|
-
src: internalRe.src,
|
|
1462
|
-
tokens: internalRe.t,
|
|
1463
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
1464
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
1465
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1466
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1467
|
-
};
|
|
1468
|
-
})))(), 1);
|
|
1469
432
|
var HandlerBadRequestError = class extends Error {
|
|
1470
433
|
constructor(message) {
|
|
1471
434
|
super(message);
|
|
@@ -1479,8 +442,8 @@ const MAX_BUNDLE_LIST_LIMIT = 100;
|
|
|
1479
442
|
const supportsExplicitNoUpdateResponse = (request) => {
|
|
1480
443
|
const sdkVersion = request.headers.get(SDK_VERSION_HEADER)?.trim();
|
|
1481
444
|
if (!sdkVersion) return false;
|
|
1482
|
-
const normalizedSdkVersion =
|
|
1483
|
-
return normalizedSdkVersion !== null &&
|
|
445
|
+
const normalizedSdkVersion = normalize(sdkVersion);
|
|
446
|
+
return normalizedSdkVersion !== null && isGreaterOrEqual(normalizedSdkVersion, EXPLICIT_NO_UPDATE_MIN_SDK_VERSION);
|
|
1484
447
|
};
|
|
1485
448
|
const serializeUpdateInfo = (updateInfo, request) => {
|
|
1486
449
|
if (updateInfo) return JSON.stringify(updateInfo);
|
|
@@ -4049,9 +3012,9 @@ function createDatabasePlugin(options) {
|
|
|
4049
3012
|
//#endregion
|
|
4050
3013
|
//#region ../plugin-core/dist/semverSatisfies.mjs
|
|
4051
3014
|
const semverSatisfies$1 = (targetAppVersion, currentVersion) => {
|
|
4052
|
-
const currentCoerce =
|
|
3015
|
+
const currentCoerce = coerce$1(currentVersion);
|
|
4053
3016
|
if (!currentCoerce) return false;
|
|
4054
|
-
return
|
|
3017
|
+
return satisfies$1(currentCoerce, targetAppVersion);
|
|
4055
3018
|
};
|
|
4056
3019
|
//#endregion
|
|
4057
3020
|
//#region ../plugin-core/dist/filterCompatibleAppVersions.mjs
|
|
@@ -4086,1321 +3049,341 @@ const createRequestUpdateBundleResolver = (context) => {
|
|
|
4086
3049
|
};
|
|
4087
3050
|
//#endregion
|
|
4088
3051
|
//#region ../js/dist/index.mjs
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
}
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
MAX_SAFE_INTEGER,
|
|
4119
|
-
RELEASE_TYPES: [
|
|
4120
|
-
"major",
|
|
4121
|
-
"premajor",
|
|
4122
|
-
"minor",
|
|
4123
|
-
"preminor",
|
|
4124
|
-
"patch",
|
|
4125
|
-
"prepatch",
|
|
4126
|
-
"prerelease"
|
|
4127
|
-
],
|
|
4128
|
-
SEMVER_SPEC_VERSION,
|
|
4129
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
4130
|
-
FLAG_LOOSE: 2
|
|
4131
|
-
};
|
|
4132
|
-
}));
|
|
4133
|
-
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4134
|
-
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
4135
|
-
}));
|
|
4136
|
-
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4137
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
4138
|
-
const debug = require_debug();
|
|
4139
|
-
exports = module.exports = {};
|
|
4140
|
-
const re = exports.re = [];
|
|
4141
|
-
const safeRe = exports.safeRe = [];
|
|
4142
|
-
const src = exports.src = [];
|
|
4143
|
-
const safeSrc = exports.safeSrc = [];
|
|
4144
|
-
const t = exports.t = {};
|
|
4145
|
-
let R = 0;
|
|
4146
|
-
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
4147
|
-
const safeRegexReplacements = [
|
|
4148
|
-
["\\s", 1],
|
|
4149
|
-
["\\d", MAX_LENGTH],
|
|
4150
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
3052
|
+
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
3053
|
+
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
3054
|
+
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
3055
|
+
const NON_NUMERIC_IDENTIFIER = String.raw`\d*[a-zA-Z-]${LETTER_DASH_NUMBER}*`;
|
|
3056
|
+
const MAIN_VERSION = String.raw`(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})`;
|
|
3057
|
+
const MAIN_VERSION_LOOSE = String.raw`(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
3058
|
+
const PRERELEASE_IDENTIFIER = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER})`;
|
|
3059
|
+
const PRERELEASE_IDENTIFIER_LOOSE = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
3060
|
+
const PRERELEASE = String.raw`(?:-(${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*))`;
|
|
3061
|
+
const PRERELEASE_LOOSE = String.raw`(?:-?(${PRERELEASE_IDENTIFIER_LOOSE}(?:\.${PRERELEASE_IDENTIFIER_LOOSE})*))`;
|
|
3062
|
+
const BUILD_IDENTIFIER = `${LETTER_DASH_NUMBER}+`;
|
|
3063
|
+
const BUILD = String.raw`(?:\+(${BUILD_IDENTIFIER}(?:\.${BUILD_IDENTIFIER})*))`;
|
|
3064
|
+
const FULL_PLAIN = `v?${MAIN_VERSION}${PRERELEASE}?${BUILD}?`;
|
|
3065
|
+
const LOOSE_PLAIN = String.raw`[v=\s]*${MAIN_VERSION_LOOSE}${PRERELEASE_LOOSE}?${BUILD}?`;
|
|
3066
|
+
const GREATER_LESS_THAN = "((?:<|>)?=?)";
|
|
3067
|
+
const XRANGE_IDENTIFIER = String.raw`${NUMERIC_IDENTIFIER}|x|X|\*`;
|
|
3068
|
+
const XRANGE_IDENTIFIER_LOOSE = String.raw`${NUMERIC_IDENTIFIER_LOOSE}|x|X|\*`;
|
|
3069
|
+
const XRANGE_PLAIN = String.raw`[v=\s]*(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:${PRERELEASE})?${BUILD}?)?)?`;
|
|
3070
|
+
const XRANGE_PLAIN_LOOSE = String.raw`[v=\s]*(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:${PRERELEASE_LOOSE})?${BUILD}?)?)?`;
|
|
3071
|
+
const LONE_TILDE = "(?:~>?)";
|
|
3072
|
+
const LONE_CARET = String.raw`(?:\^)`;
|
|
3073
|
+
const COERCE_PLAIN = String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;
|
|
3074
|
+
const COERCE = String.raw`${COERCE_PLAIN}(?:$|[^\d])`;
|
|
3075
|
+
const COERCE_FULL = String.raw`${COERCE_PLAIN}(?:${PRERELEASE})?(?:${BUILD})?(?:$|[^\d])`;
|
|
3076
|
+
function makeSafeRegexSource(source) {
|
|
3077
|
+
const replacements = [
|
|
3078
|
+
[String.raw`\s`, 1],
|
|
3079
|
+
[String.raw`\d`, 256],
|
|
3080
|
+
[LETTER_DASH_NUMBER, 250]
|
|
4151
3081
|
];
|
|
4152
|
-
const
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
4198
|
-
createToken("LONECARET", "(?:\\^)");
|
|
4199
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
4200
|
-
exports.caretTrimReplace = "$1^";
|
|
4201
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
4202
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
4203
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
4204
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
4205
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
4206
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
4207
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
4208
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
4209
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
4210
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
4211
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
4212
|
-
}));
|
|
4213
|
-
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4214
|
-
const looseOption = Object.freeze({ loose: true });
|
|
4215
|
-
const emptyOpts = Object.freeze({});
|
|
4216
|
-
const parseOptions = (options) => {
|
|
4217
|
-
if (!options) return emptyOpts;
|
|
4218
|
-
if (typeof options !== "object") return looseOption;
|
|
4219
|
-
return options;
|
|
4220
|
-
};
|
|
4221
|
-
module.exports = parseOptions;
|
|
4222
|
-
}));
|
|
4223
|
-
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4224
|
-
const numeric = /^[0-9]+$/;
|
|
4225
|
-
const compareIdentifiers = (a, b) => {
|
|
4226
|
-
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
4227
|
-
const anum = numeric.test(a);
|
|
4228
|
-
const bnum = numeric.test(b);
|
|
4229
|
-
if (anum && bnum) {
|
|
4230
|
-
a = +a;
|
|
4231
|
-
b = +b;
|
|
4232
|
-
}
|
|
4233
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
4234
|
-
};
|
|
4235
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
4236
|
-
module.exports = {
|
|
4237
|
-
compareIdentifiers,
|
|
4238
|
-
rcompareIdentifiers
|
|
4239
|
-
};
|
|
4240
|
-
}));
|
|
4241
|
-
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4242
|
-
const debug = require_debug();
|
|
4243
|
-
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
4244
|
-
const { safeRe: re, t } = require_re();
|
|
4245
|
-
const parseOptions = require_parse_options();
|
|
4246
|
-
const { compareIdentifiers } = require_identifiers();
|
|
4247
|
-
const isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
4248
|
-
const identifiers = identifier.split(".");
|
|
4249
|
-
if (identifiers.length > prerelease.length) return false;
|
|
4250
|
-
for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
|
|
4251
|
-
return true;
|
|
4252
|
-
};
|
|
4253
|
-
module.exports = class SemVer {
|
|
4254
|
-
constructor(version, options) {
|
|
4255
|
-
options = parseOptions(options);
|
|
4256
|
-
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
4257
|
-
else version = version.version;
|
|
4258
|
-
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
4259
|
-
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
4260
|
-
debug("SemVer", version, options);
|
|
4261
|
-
this.options = options;
|
|
4262
|
-
this.loose = !!options.loose;
|
|
4263
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
4264
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
4265
|
-
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
4266
|
-
this.raw = version;
|
|
4267
|
-
this.major = +m[1];
|
|
4268
|
-
this.minor = +m[2];
|
|
4269
|
-
this.patch = +m[3];
|
|
4270
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
4271
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
4272
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
4273
|
-
if (!m[4]) this.prerelease = [];
|
|
4274
|
-
else this.prerelease = m[4].split(".").map((id) => {
|
|
4275
|
-
if (/^[0-9]+$/.test(id)) {
|
|
4276
|
-
const num = +id;
|
|
4277
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
4278
|
-
}
|
|
4279
|
-
return id;
|
|
4280
|
-
});
|
|
4281
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
4282
|
-
this.format();
|
|
4283
|
-
}
|
|
4284
|
-
format() {
|
|
4285
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
4286
|
-
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
4287
|
-
return this.version;
|
|
4288
|
-
}
|
|
4289
|
-
toString() {
|
|
4290
|
-
return this.version;
|
|
4291
|
-
}
|
|
4292
|
-
compare(other) {
|
|
4293
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
4294
|
-
if (!(other instanceof SemVer)) {
|
|
4295
|
-
if (typeof other === "string" && other === this.version) return 0;
|
|
4296
|
-
other = new SemVer(other, this.options);
|
|
4297
|
-
}
|
|
4298
|
-
if (other.version === this.version) return 0;
|
|
4299
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
4300
|
-
}
|
|
4301
|
-
compareMain(other) {
|
|
4302
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
4303
|
-
if (this.major < other.major) return -1;
|
|
4304
|
-
if (this.major > other.major) return 1;
|
|
4305
|
-
if (this.minor < other.minor) return -1;
|
|
4306
|
-
if (this.minor > other.minor) return 1;
|
|
4307
|
-
if (this.patch < other.patch) return -1;
|
|
4308
|
-
if (this.patch > other.patch) return 1;
|
|
4309
|
-
return 0;
|
|
4310
|
-
}
|
|
4311
|
-
comparePre(other) {
|
|
4312
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
4313
|
-
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
4314
|
-
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
4315
|
-
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
4316
|
-
let i = 0;
|
|
4317
|
-
do {
|
|
4318
|
-
const a = this.prerelease[i];
|
|
4319
|
-
const b = other.prerelease[i];
|
|
4320
|
-
debug("prerelease compare", i, a, b);
|
|
4321
|
-
if (a === void 0 && b === void 0) return 0;
|
|
4322
|
-
else if (b === void 0) return 1;
|
|
4323
|
-
else if (a === void 0) return -1;
|
|
4324
|
-
else if (a === b) continue;
|
|
4325
|
-
else return compareIdentifiers(a, b);
|
|
4326
|
-
} while (++i);
|
|
4327
|
-
}
|
|
4328
|
-
compareBuild(other) {
|
|
4329
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
4330
|
-
let i = 0;
|
|
4331
|
-
do {
|
|
4332
|
-
const a = this.build[i];
|
|
4333
|
-
const b = other.build[i];
|
|
4334
|
-
debug("build compare", i, a, b);
|
|
4335
|
-
if (a === void 0 && b === void 0) return 0;
|
|
4336
|
-
else if (b === void 0) return 1;
|
|
4337
|
-
else if (a === void 0) return -1;
|
|
4338
|
-
else if (a === b) continue;
|
|
4339
|
-
else return compareIdentifiers(a, b);
|
|
4340
|
-
} while (++i);
|
|
4341
|
-
}
|
|
4342
|
-
inc(release, identifier, identifierBase) {
|
|
4343
|
-
if (release.startsWith("pre")) {
|
|
4344
|
-
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
4345
|
-
if (identifier) {
|
|
4346
|
-
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
4347
|
-
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
4348
|
-
}
|
|
4349
|
-
}
|
|
4350
|
-
switch (release) {
|
|
4351
|
-
case "premajor":
|
|
4352
|
-
this.prerelease.length = 0;
|
|
4353
|
-
this.patch = 0;
|
|
4354
|
-
this.minor = 0;
|
|
4355
|
-
this.major++;
|
|
4356
|
-
this.inc("pre", identifier, identifierBase);
|
|
4357
|
-
break;
|
|
4358
|
-
case "preminor":
|
|
4359
|
-
this.prerelease.length = 0;
|
|
4360
|
-
this.patch = 0;
|
|
4361
|
-
this.minor++;
|
|
4362
|
-
this.inc("pre", identifier, identifierBase);
|
|
4363
|
-
break;
|
|
4364
|
-
case "prepatch":
|
|
4365
|
-
this.prerelease.length = 0;
|
|
4366
|
-
this.inc("patch", identifier, identifierBase);
|
|
4367
|
-
this.inc("pre", identifier, identifierBase);
|
|
4368
|
-
break;
|
|
4369
|
-
case "prerelease":
|
|
4370
|
-
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
4371
|
-
this.inc("pre", identifier, identifierBase);
|
|
4372
|
-
break;
|
|
4373
|
-
case "release":
|
|
4374
|
-
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
4375
|
-
this.prerelease.length = 0;
|
|
4376
|
-
break;
|
|
4377
|
-
case "major":
|
|
4378
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
4379
|
-
this.minor = 0;
|
|
4380
|
-
this.patch = 0;
|
|
4381
|
-
this.prerelease = [];
|
|
4382
|
-
break;
|
|
4383
|
-
case "minor":
|
|
4384
|
-
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
4385
|
-
this.patch = 0;
|
|
4386
|
-
this.prerelease = [];
|
|
4387
|
-
break;
|
|
4388
|
-
case "patch":
|
|
4389
|
-
if (this.prerelease.length === 0) this.patch++;
|
|
4390
|
-
this.prerelease = [];
|
|
4391
|
-
break;
|
|
4392
|
-
case "pre": {
|
|
4393
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
4394
|
-
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
4395
|
-
else {
|
|
4396
|
-
let i = this.prerelease.length;
|
|
4397
|
-
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
4398
|
-
this.prerelease[i]++;
|
|
4399
|
-
i = -2;
|
|
4400
|
-
}
|
|
4401
|
-
if (i === -1) {
|
|
4402
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
4403
|
-
this.prerelease.push(base);
|
|
4404
|
-
}
|
|
4405
|
-
}
|
|
4406
|
-
if (identifier) {
|
|
4407
|
-
let prerelease = [identifier, base];
|
|
4408
|
-
if (identifierBase === false) prerelease = [identifier];
|
|
4409
|
-
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
4410
|
-
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
4411
|
-
if (isNaN(prereleaseBase)) this.prerelease = prerelease;
|
|
4412
|
-
} else this.prerelease = prerelease;
|
|
4413
|
-
}
|
|
4414
|
-
break;
|
|
4415
|
-
}
|
|
4416
|
-
default: throw new Error(`invalid increment argument: ${release}`);
|
|
4417
|
-
}
|
|
4418
|
-
this.raw = this.format();
|
|
4419
|
-
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
4420
|
-
return this;
|
|
4421
|
-
}
|
|
4422
|
-
};
|
|
4423
|
-
}));
|
|
4424
|
-
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4425
|
-
const SemVer = require_semver$1();
|
|
4426
|
-
const parse = (version, options, throwErrors = false) => {
|
|
4427
|
-
if (version instanceof SemVer) return version;
|
|
4428
|
-
try {
|
|
4429
|
-
return new SemVer(version, options);
|
|
4430
|
-
} catch (er) {
|
|
4431
|
-
if (!throwErrors) return null;
|
|
4432
|
-
throw er;
|
|
4433
|
-
}
|
|
4434
|
-
};
|
|
4435
|
-
module.exports = parse;
|
|
4436
|
-
}));
|
|
4437
|
-
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4438
|
-
const parse = require_parse();
|
|
4439
|
-
const valid = (version, options) => {
|
|
4440
|
-
const v = parse(version, options);
|
|
4441
|
-
return v ? v.version : null;
|
|
4442
|
-
};
|
|
4443
|
-
module.exports = valid;
|
|
4444
|
-
}));
|
|
4445
|
-
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4446
|
-
const parse = require_parse();
|
|
4447
|
-
const clean = (version, options) => {
|
|
4448
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
4449
|
-
return s ? s.version : null;
|
|
4450
|
-
};
|
|
4451
|
-
module.exports = clean;
|
|
4452
|
-
}));
|
|
4453
|
-
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4454
|
-
const SemVer = require_semver$1();
|
|
4455
|
-
const inc = (version, release, options, identifier, identifierBase) => {
|
|
4456
|
-
if (typeof options === "string") {
|
|
4457
|
-
identifierBase = identifier;
|
|
4458
|
-
identifier = options;
|
|
4459
|
-
options = void 0;
|
|
4460
|
-
}
|
|
4461
|
-
try {
|
|
4462
|
-
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
4463
|
-
} catch (er) {
|
|
4464
|
-
return null;
|
|
4465
|
-
}
|
|
4466
|
-
};
|
|
4467
|
-
module.exports = inc;
|
|
4468
|
-
}));
|
|
4469
|
-
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4470
|
-
const parse = require_parse();
|
|
4471
|
-
const diff = (version1, version2) => {
|
|
4472
|
-
const v1 = parse(version1, null, true);
|
|
4473
|
-
const v2 = parse(version2, null, true);
|
|
4474
|
-
const comparison = v1.compare(v2);
|
|
4475
|
-
if (comparison === 0) return null;
|
|
4476
|
-
const v1Higher = comparison > 0;
|
|
4477
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
4478
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
4479
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
4480
|
-
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
4481
|
-
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
4482
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
4483
|
-
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
4484
|
-
return "patch";
|
|
4485
|
-
}
|
|
4486
|
-
}
|
|
4487
|
-
const prefix = highHasPre ? "pre" : "";
|
|
4488
|
-
if (v1.major !== v2.major) return prefix + "major";
|
|
4489
|
-
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
4490
|
-
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
4491
|
-
return "prerelease";
|
|
4492
|
-
};
|
|
4493
|
-
module.exports = diff;
|
|
4494
|
-
}));
|
|
4495
|
-
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4496
|
-
const SemVer = require_semver$1();
|
|
4497
|
-
const major = (a, loose) => new SemVer(a, loose).major;
|
|
4498
|
-
module.exports = major;
|
|
4499
|
-
}));
|
|
4500
|
-
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4501
|
-
const SemVer = require_semver$1();
|
|
4502
|
-
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
4503
|
-
module.exports = minor;
|
|
4504
|
-
}));
|
|
4505
|
-
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4506
|
-
const SemVer = require_semver$1();
|
|
4507
|
-
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
4508
|
-
module.exports = patch;
|
|
4509
|
-
}));
|
|
4510
|
-
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4511
|
-
const parse = require_parse();
|
|
4512
|
-
const prerelease = (version, options) => {
|
|
4513
|
-
const parsed = parse(version, options);
|
|
4514
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
4515
|
-
};
|
|
4516
|
-
module.exports = prerelease;
|
|
4517
|
-
}));
|
|
4518
|
-
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4519
|
-
const SemVer = require_semver$1();
|
|
4520
|
-
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
4521
|
-
module.exports = compare;
|
|
4522
|
-
}));
|
|
4523
|
-
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4524
|
-
const compare = require_compare();
|
|
4525
|
-
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
4526
|
-
module.exports = rcompare;
|
|
4527
|
-
}));
|
|
4528
|
-
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4529
|
-
const compare = require_compare();
|
|
4530
|
-
const compareLoose = (a, b) => compare(a, b, true);
|
|
4531
|
-
module.exports = compareLoose;
|
|
4532
|
-
}));
|
|
4533
|
-
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4534
|
-
const SemVer = require_semver$1();
|
|
4535
|
-
const compareBuild = (a, b, loose) => {
|
|
4536
|
-
const versionA = new SemVer(a, loose);
|
|
4537
|
-
const versionB = new SemVer(b, loose);
|
|
4538
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
4539
|
-
};
|
|
4540
|
-
module.exports = compareBuild;
|
|
4541
|
-
}));
|
|
4542
|
-
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4543
|
-
const compareBuild = require_compare_build();
|
|
4544
|
-
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
4545
|
-
module.exports = sort;
|
|
4546
|
-
}));
|
|
4547
|
-
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4548
|
-
const compareBuild = require_compare_build();
|
|
4549
|
-
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
4550
|
-
module.exports = rsort;
|
|
4551
|
-
}));
|
|
4552
|
-
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4553
|
-
const compare = require_compare();
|
|
4554
|
-
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
4555
|
-
module.exports = gt;
|
|
4556
|
-
}));
|
|
4557
|
-
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4558
|
-
const compare = require_compare();
|
|
4559
|
-
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
4560
|
-
module.exports = lt;
|
|
4561
|
-
}));
|
|
4562
|
-
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4563
|
-
const compare = require_compare();
|
|
4564
|
-
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
4565
|
-
module.exports = eq;
|
|
4566
|
-
}));
|
|
4567
|
-
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4568
|
-
const compare = require_compare();
|
|
4569
|
-
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
4570
|
-
module.exports = neq;
|
|
4571
|
-
}));
|
|
4572
|
-
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4573
|
-
const compare = require_compare();
|
|
4574
|
-
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
4575
|
-
module.exports = gte;
|
|
4576
|
-
}));
|
|
4577
|
-
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4578
|
-
const compare = require_compare();
|
|
4579
|
-
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
4580
|
-
module.exports = lte;
|
|
4581
|
-
}));
|
|
4582
|
-
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4583
|
-
const eq = require_eq();
|
|
4584
|
-
const neq = require_neq();
|
|
4585
|
-
const gt = require_gt();
|
|
4586
|
-
const gte = require_gte();
|
|
4587
|
-
const lt = require_lt();
|
|
4588
|
-
const lte = require_lte();
|
|
4589
|
-
const cmp = (a, op, b, loose) => {
|
|
4590
|
-
switch (op) {
|
|
4591
|
-
case "===":
|
|
4592
|
-
if (typeof a === "object") a = a.version;
|
|
4593
|
-
if (typeof b === "object") b = b.version;
|
|
4594
|
-
return a === b;
|
|
4595
|
-
case "!==":
|
|
4596
|
-
if (typeof a === "object") a = a.version;
|
|
4597
|
-
if (typeof b === "object") b = b.version;
|
|
4598
|
-
return a !== b;
|
|
4599
|
-
case "":
|
|
4600
|
-
case "=":
|
|
4601
|
-
case "==": return eq(a, b, loose);
|
|
4602
|
-
case "!=": return neq(a, b, loose);
|
|
4603
|
-
case ">": return gt(a, b, loose);
|
|
4604
|
-
case ">=": return gte(a, b, loose);
|
|
4605
|
-
case "<": return lt(a, b, loose);
|
|
4606
|
-
case "<=": return lte(a, b, loose);
|
|
4607
|
-
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
4608
|
-
}
|
|
4609
|
-
};
|
|
4610
|
-
module.exports = cmp;
|
|
4611
|
-
}));
|
|
4612
|
-
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4613
|
-
const SemVer = require_semver$1();
|
|
4614
|
-
const parse = require_parse();
|
|
4615
|
-
const { safeRe: re, t } = require_re();
|
|
4616
|
-
const coerce = (version, options) => {
|
|
4617
|
-
if (version instanceof SemVer) return version;
|
|
4618
|
-
if (typeof version === "number") version = String(version);
|
|
4619
|
-
if (typeof version !== "string") return null;
|
|
4620
|
-
options = options || {};
|
|
4621
|
-
let match = null;
|
|
4622
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
4623
|
-
else {
|
|
4624
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
4625
|
-
let next;
|
|
4626
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
4627
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
4628
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
4629
|
-
}
|
|
4630
|
-
coerceRtlRegex.lastIndex = -1;
|
|
4631
|
-
}
|
|
4632
|
-
if (match === null) return null;
|
|
4633
|
-
const major = match[2];
|
|
4634
|
-
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
4635
|
-
};
|
|
4636
|
-
module.exports = coerce;
|
|
4637
|
-
}));
|
|
4638
|
-
var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4639
|
-
const parse = require_parse();
|
|
4640
|
-
const constants = require_constants();
|
|
4641
|
-
const SemVer = require_semver$1();
|
|
4642
|
-
const truncate = (version, truncation, options) => {
|
|
4643
|
-
if (!constants.RELEASE_TYPES.includes(truncation)) return null;
|
|
4644
|
-
const clonedVersion = cloneInputVersion(version, options);
|
|
4645
|
-
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
4646
|
-
};
|
|
4647
|
-
const cloneInputVersion = (version, options) => {
|
|
4648
|
-
return parse(version instanceof SemVer ? version.version : version, options);
|
|
4649
|
-
};
|
|
4650
|
-
const doTruncation = (version, truncation) => {
|
|
4651
|
-
if (isPrerelease(truncation)) return version.version;
|
|
4652
|
-
version.prerelease = [];
|
|
4653
|
-
switch (truncation) {
|
|
4654
|
-
case "major":
|
|
4655
|
-
version.minor = 0;
|
|
4656
|
-
version.patch = 0;
|
|
4657
|
-
break;
|
|
4658
|
-
case "minor":
|
|
4659
|
-
version.patch = 0;
|
|
4660
|
-
break;
|
|
3082
|
+
for (const [token, maximum] of replacements) source = source.split(`${token}*`).join(`${token}{0,${maximum}}`).split(`${token}+`).join(`${token}{1,${maximum}}`);
|
|
3083
|
+
return source;
|
|
3084
|
+
}
|
|
3085
|
+
function safeRegex(source, flags) {
|
|
3086
|
+
return new RegExp(makeSafeRegexSource(source), flags);
|
|
3087
|
+
}
|
|
3088
|
+
const NUMERIC$1 = /^\d+$/;
|
|
3089
|
+
function compareIdentifiers(left, right) {
|
|
3090
|
+
if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
|
|
3091
|
+
const leftNumeric = NUMERIC$1.test(String(left));
|
|
3092
|
+
const rightNumeric = NUMERIC$1.test(String(right));
|
|
3093
|
+
const normalizedLeft = leftNumeric ? Number(left) : left;
|
|
3094
|
+
const normalizedRight = rightNumeric ? Number(right) : right;
|
|
3095
|
+
return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
|
|
3096
|
+
}
|
|
3097
|
+
const FULL = safeRegex(`^${FULL_PLAIN}$`);
|
|
3098
|
+
const LOOSE = safeRegex(`^${LOOSE_PLAIN}$`);
|
|
3099
|
+
safeRegex(`^${PRERELEASE}$`);
|
|
3100
|
+
safeRegex(`^${PRERELEASE_LOOSE}$`);
|
|
3101
|
+
const COERCE_EXACT = safeRegex(COERCE);
|
|
3102
|
+
const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
|
|
3103
|
+
const NUMERIC = /^\d+$/;
|
|
3104
|
+
function formatComparableVersion(version) {
|
|
3105
|
+
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
3106
|
+
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
3107
|
+
}
|
|
3108
|
+
function formatFullVersion(version) {
|
|
3109
|
+
const comparable = formatComparableVersion(version);
|
|
3110
|
+
return version.build?.length ? `${comparable}+${version.build.join(".")}` : comparable;
|
|
3111
|
+
}
|
|
3112
|
+
function parse(version, options = {}) {
|
|
3113
|
+
if (typeof version !== "string") return version;
|
|
3114
|
+
if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`);
|
|
3115
|
+
const match = version.trim().match(options.loose ? LOOSE : FULL);
|
|
3116
|
+
if (!match) throw new TypeError(`Invalid version syntax: ${version}`);
|
|
3117
|
+
const major = Number(match[1]);
|
|
3118
|
+
const minor = Number(match[2]);
|
|
3119
|
+
const patch = Number(match[3]);
|
|
3120
|
+
if (major > Number.MAX_SAFE_INTEGER || major < 0) throw new TypeError(`Invalid major version: ${match[1]}`);
|
|
3121
|
+
if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`);
|
|
3122
|
+
if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`);
|
|
3123
|
+
const prerelease = match[4] ? match[4].split(".").map((identifier) => {
|
|
3124
|
+
if (NUMERIC.test(identifier)) {
|
|
3125
|
+
const numeric = Number(identifier);
|
|
3126
|
+
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
4661
3127
|
}
|
|
4662
|
-
return
|
|
4663
|
-
};
|
|
4664
|
-
|
|
4665
|
-
|
|
3128
|
+
return identifier;
|
|
3129
|
+
}) : void 0;
|
|
3130
|
+
return {
|
|
3131
|
+
build: match[5]?.split("."),
|
|
3132
|
+
major,
|
|
3133
|
+
minor,
|
|
3134
|
+
patch,
|
|
3135
|
+
prerelease
|
|
4666
3136
|
};
|
|
4667
|
-
|
|
4668
|
-
})
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
3137
|
+
}
|
|
3138
|
+
function tryParse(version, options = {}) {
|
|
3139
|
+
try {
|
|
3140
|
+
return parse(version, options);
|
|
3141
|
+
} catch {
|
|
3142
|
+
return null;
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
function compareMainParsed(left, right) {
|
|
3146
|
+
return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1;
|
|
3147
|
+
}
|
|
3148
|
+
function comparePrereleaseParsed(left, right) {
|
|
3149
|
+
const leftPrerelease = left.prerelease;
|
|
3150
|
+
const rightPrerelease = right.prerelease;
|
|
3151
|
+
if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
|
|
3152
|
+
if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
|
|
3153
|
+
if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
|
|
3154
|
+
for (let index = 0;; index++) {
|
|
3155
|
+
const leftIdentifier = leftPrerelease?.[index];
|
|
3156
|
+
const rightIdentifier = rightPrerelease?.[index];
|
|
3157
|
+
if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
|
|
3158
|
+
if (rightIdentifier === void 0) return 1;
|
|
3159
|
+
if (leftIdentifier === void 0) return -1;
|
|
3160
|
+
if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
function compareParsed(left, right) {
|
|
3164
|
+
return compareMainParsed(left, right) || comparePrereleaseParsed(left, right);
|
|
3165
|
+
}
|
|
3166
|
+
function coerceParsedVersion(value, options = {}) {
|
|
3167
|
+
if (typeof value === "object") return value;
|
|
3168
|
+
const input = typeof value === "number" ? String(value) : value;
|
|
3169
|
+
if (typeof input !== "string") return null;
|
|
3170
|
+
let match = null;
|
|
3171
|
+
if (options.rtl) {
|
|
3172
|
+
const expression = safeRegex(options.includePrerelease ? COERCE_FULL : COERCE, "g");
|
|
3173
|
+
let next;
|
|
3174
|
+
while ((next = expression.exec(input)) && (!match || match.index + match[0].length !== input.length)) {
|
|
3175
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
3176
|
+
expression.lastIndex = next.index + next[1].length + next[2].length;
|
|
4696
3177
|
}
|
|
3178
|
+
} else match = (options.includePrerelease ? COERCE_FULL_EXACT : COERCE_EXACT).exec(input);
|
|
3179
|
+
if (!match) return null;
|
|
3180
|
+
const major = match[2];
|
|
3181
|
+
return tryParse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
3182
|
+
}
|
|
3183
|
+
const STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`);
|
|
3184
|
+
const LOOSE_COMPARATOR$1 = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`);
|
|
3185
|
+
function parseComparator(comparator, options = {}) {
|
|
3186
|
+
const normalized = comparator.trim().replaceAll(/\s+/g, " ");
|
|
3187
|
+
const match = normalized.match(options.loose ? LOOSE_COMPARATOR$1 : STRICT_COMPARATOR);
|
|
3188
|
+
if (!match) throw new TypeError(`Invalid comparator: ${normalized}`);
|
|
3189
|
+
const operator = match[1] === "=" ? "" : match[1] || "";
|
|
3190
|
+
const version = match[2] ? parse(match[2], options) : null;
|
|
3191
|
+
return {
|
|
3192
|
+
operator,
|
|
3193
|
+
options,
|
|
3194
|
+
value: version ? `${operator}${formatComparableVersion(version)}` : "",
|
|
3195
|
+
version
|
|
4697
3196
|
};
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
const
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
}
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
if (
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
}
|
|
4796
|
-
test(version) {
|
|
4797
|
-
if (!version) return false;
|
|
4798
|
-
if (typeof version === "string") try {
|
|
4799
|
-
version = new SemVer(version, this.options);
|
|
4800
|
-
} catch (er) {
|
|
4801
|
-
return false;
|
|
3197
|
+
}
|
|
3198
|
+
function testParsedComparator(comparator, version) {
|
|
3199
|
+
if (!comparator.version) return true;
|
|
3200
|
+
const comparison = compareParsed(version, comparator.version);
|
|
3201
|
+
switch (comparator.operator) {
|
|
3202
|
+
case "": return comparison === 0;
|
|
3203
|
+
case ">": return comparison > 0;
|
|
3204
|
+
case ">=": return comparison >= 0;
|
|
3205
|
+
case "<": return comparison < 0;
|
|
3206
|
+
case "<=": return comparison <= 0;
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
function comparatorAllowsPrerelease(comparator, version) {
|
|
3210
|
+
const allowed = comparator.version;
|
|
3211
|
+
return allowed !== null && !!allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch;
|
|
3212
|
+
}
|
|
3213
|
+
function testComparatorSet(set, version, options) {
|
|
3214
|
+
if (set.some((comparator) => !testParsedComparator(comparator, version))) return false;
|
|
3215
|
+
return !version.prerelease?.length || !!options.includePrerelease || set.some((comparator) => comparatorAllowsPrerelease(comparator, version));
|
|
3216
|
+
}
|
|
3217
|
+
const BUILD_STRIP = new RegExp(BUILD, "g");
|
|
3218
|
+
const BUILD_SAFE = safeRegex(BUILD);
|
|
3219
|
+
const STRICT_HYPHEN = safeRegex(String.raw`^\s*(${XRANGE_PLAIN})\s+-\s+(${XRANGE_PLAIN})\s*$`);
|
|
3220
|
+
const LOOSE_HYPHEN = safeRegex(String.raw`^\s*(${XRANGE_PLAIN_LOOSE})\s+-\s+(${XRANGE_PLAIN_LOOSE})\s*$`);
|
|
3221
|
+
const COMPARATOR_TRIM = safeRegex(String.raw`(\s*)${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN}|${XRANGE_PLAIN})`, "g");
|
|
3222
|
+
const TILDE_TRIM = safeRegex(String.raw`(\s*)${LONE_TILDE}\s+`, "g");
|
|
3223
|
+
const CARET_TRIM = safeRegex(String.raw`(\s*)${LONE_CARET}\s+`, "g");
|
|
3224
|
+
const STRICT_TILDE = safeRegex(`^${LONE_TILDE}${XRANGE_PLAIN}$`);
|
|
3225
|
+
const LOOSE_TILDE = safeRegex(`^${LONE_TILDE}${XRANGE_PLAIN_LOOSE}$`);
|
|
3226
|
+
const STRICT_CARET = safeRegex(`^${LONE_CARET}${XRANGE_PLAIN}$`);
|
|
3227
|
+
const LOOSE_CARET = safeRegex(`^${LONE_CARET}${XRANGE_PLAIN_LOOSE}$`);
|
|
3228
|
+
const STRICT_XRANGE = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*${XRANGE_PLAIN}$`);
|
|
3229
|
+
const LOOSE_XRANGE = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*${XRANGE_PLAIN_LOOSE}$`);
|
|
3230
|
+
const STAR = safeRegex(String.raw`(<|>)?=?\s*\*`);
|
|
3231
|
+
const GTE_ZERO = /^\s*>=\s*0\.0\.0\s*$/;
|
|
3232
|
+
const GTE_ZERO_PRERELEASE = /^\s*>=\s*0\.0\.0-0\s*$/;
|
|
3233
|
+
const LOOSE_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`);
|
|
3234
|
+
function isWildcard(value) {
|
|
3235
|
+
return !value || String(value).toLowerCase() === "x" || String(value) === "*";
|
|
3236
|
+
}
|
|
3237
|
+
function hasInvalidWildcardOrder(major, minor, patch) {
|
|
3238
|
+
return isWildcard(major) && !isWildcard(minor) || isWildcard(minor) && Boolean(patch) && !isWildcard(patch);
|
|
3239
|
+
}
|
|
3240
|
+
function replaceTilde(comparator, options) {
|
|
3241
|
+
const expression = options.loose ? LOOSE_TILDE : STRICT_TILDE;
|
|
3242
|
+
const lowerPrerelease = options.includePrerelease ? "-0" : "";
|
|
3243
|
+
return comparator.replace(expression, (_match, major, minor, patch, prerelease) => {
|
|
3244
|
+
if (isWildcard(major)) return "";
|
|
3245
|
+
if (isWildcard(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
3246
|
+
if (isWildcard(patch)) return `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0`;
|
|
3247
|
+
return prerelease ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`;
|
|
3248
|
+
});
|
|
3249
|
+
}
|
|
3250
|
+
function replaceTildes(comparator, options) {
|
|
3251
|
+
return comparator.trim().split(/\s+/).map((part) => replaceTilde(part, options)).join(" ");
|
|
3252
|
+
}
|
|
3253
|
+
function replaceCaret(comparator, options) {
|
|
3254
|
+
const expression = options.loose ? LOOSE_CARET : STRICT_CARET;
|
|
3255
|
+
const lowerPrerelease = options.includePrerelease ? "-0" : "";
|
|
3256
|
+
return comparator.replace(expression, (_match, major, minor, patch, prerelease) => {
|
|
3257
|
+
if (isWildcard(major)) return "";
|
|
3258
|
+
if (isWildcard(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
3259
|
+
if (isWildcard(patch)) return major === "0" ? `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
3260
|
+
if (prerelease) return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch}-${prerelease} <${Number(major) + 1}.0.0-0`;
|
|
3261
|
+
return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${Number(major) + 1}.0.0-0`;
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
function replaceCarets(comparator, options) {
|
|
3265
|
+
return comparator.trim().split(/\s+/).map((part) => replaceCaret(part, options)).join(" ");
|
|
3266
|
+
}
|
|
3267
|
+
function replaceXRange(comparator, options) {
|
|
3268
|
+
const expression = options.loose ? LOOSE_XRANGE : STRICT_XRANGE;
|
|
3269
|
+
return comparator.trim().replace(expression, (match, rawOperator, rawMajor, rawMinor, rawPatch) => {
|
|
3270
|
+
let operator = rawOperator;
|
|
3271
|
+
let major = rawMajor;
|
|
3272
|
+
let minor = rawMinor;
|
|
3273
|
+
let patch = rawPatch;
|
|
3274
|
+
if (hasInvalidWildcardOrder(String(major), minor === void 0 ? void 0 : String(minor), patch === void 0 ? void 0 : String(patch))) return comparator;
|
|
3275
|
+
const wildcardMajor = isWildcard(major);
|
|
3276
|
+
const wildcardMinor = wildcardMajor || isWildcard(minor);
|
|
3277
|
+
const wildcardPatch = wildcardMinor || isWildcard(patch);
|
|
3278
|
+
if (operator === "=" && wildcardPatch) operator = "";
|
|
3279
|
+
if (wildcardMajor) return operator === ">" || operator === "<" ? "<0.0.0-0" : "*";
|
|
3280
|
+
let prerelease = options.includePrerelease ? "-0" : "";
|
|
3281
|
+
if (operator && wildcardPatch) {
|
|
3282
|
+
if (wildcardMinor) minor = 0;
|
|
3283
|
+
patch = 0;
|
|
3284
|
+
if (operator === ">") {
|
|
3285
|
+
operator = ">=";
|
|
3286
|
+
if (wildcardMinor) {
|
|
3287
|
+
major = Number(major) + 1;
|
|
3288
|
+
minor = 0;
|
|
3289
|
+
} else minor = Number(minor) + 1;
|
|
3290
|
+
} else if (operator === "<=") {
|
|
3291
|
+
operator = "<";
|
|
3292
|
+
if (wildcardMinor) major = Number(major) + 1;
|
|
3293
|
+
else minor = Number(minor) + 1;
|
|
4802
3294
|
}
|
|
4803
|
-
|
|
4804
|
-
return
|
|
4805
|
-
}
|
|
4806
|
-
};
|
|
4807
|
-
const cache = new (require_lrucache())();
|
|
4808
|
-
const parseOptions = require_parse_options();
|
|
4809
|
-
const Comparator = require_comparator();
|
|
4810
|
-
const debug = require_debug();
|
|
4811
|
-
const SemVer = require_semver$1();
|
|
4812
|
-
const { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
4813
|
-
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
4814
|
-
const BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
4815
|
-
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
4816
|
-
const isAny = (c) => c.value === "";
|
|
4817
|
-
const isSatisfiable = (comparators, options) => {
|
|
4818
|
-
let result = true;
|
|
4819
|
-
const remainingComparators = comparators.slice();
|
|
4820
|
-
let testComparator = remainingComparators.pop();
|
|
4821
|
-
while (result && remainingComparators.length) {
|
|
4822
|
-
result = remainingComparators.every((otherComparator) => {
|
|
4823
|
-
return testComparator.intersects(otherComparator, options);
|
|
4824
|
-
});
|
|
4825
|
-
testComparator = remainingComparators.pop();
|
|
3295
|
+
if (operator === "<") prerelease = "-0";
|
|
3296
|
+
return `${operator}${major}.${minor}.${patch}${prerelease}`;
|
|
4826
3297
|
}
|
|
4827
|
-
return
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
4851
|
-
let ret;
|
|
4852
|
-
if (isX(M)) ret = "";
|
|
4853
|
-
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
4854
|
-
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
4855
|
-
else if (pr) {
|
|
4856
|
-
debug("replaceTilde pr", pr);
|
|
4857
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
4858
|
-
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
4859
|
-
debug("tilde return", ret);
|
|
4860
|
-
return ret;
|
|
4861
|
-
});
|
|
4862
|
-
};
|
|
4863
|
-
const replaceCarets = (comp, options) => {
|
|
4864
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
4865
|
-
};
|
|
4866
|
-
const replaceCaret = (comp, options) => {
|
|
4867
|
-
debug("caret", comp, options);
|
|
4868
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
4869
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
4870
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
4871
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
4872
|
-
let ret;
|
|
4873
|
-
if (isX(M)) ret = "";
|
|
4874
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
4875
|
-
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
4876
|
-
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
4877
|
-
else if (pr) {
|
|
4878
|
-
debug("replaceCaret pr", pr);
|
|
4879
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
4880
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
4881
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
4882
|
-
} else {
|
|
4883
|
-
debug("no pr");
|
|
4884
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
4885
|
-
else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
4886
|
-
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
4887
|
-
}
|
|
4888
|
-
debug("caret return", ret);
|
|
4889
|
-
return ret;
|
|
4890
|
-
});
|
|
4891
|
-
};
|
|
4892
|
-
const replaceXRanges = (comp, options) => {
|
|
4893
|
-
debug("replaceXRanges", comp, options);
|
|
4894
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
4895
|
-
};
|
|
4896
|
-
const replaceXRange = (comp, options) => {
|
|
4897
|
-
comp = comp.trim();
|
|
4898
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
4899
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
4900
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
4901
|
-
if (invalidXRangeOrder(M, m, p)) return comp;
|
|
4902
|
-
const xM = isX(M);
|
|
4903
|
-
const xm = xM || isX(m);
|
|
4904
|
-
const xp = xm || isX(p);
|
|
4905
|
-
const anyX = xp;
|
|
4906
|
-
if (gtlt === "=" && anyX) gtlt = "";
|
|
4907
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
4908
|
-
if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
4909
|
-
else ret = "*";
|
|
4910
|
-
else if (gtlt && anyX) {
|
|
4911
|
-
if (xm) m = 0;
|
|
4912
|
-
p = 0;
|
|
4913
|
-
if (gtlt === ">") {
|
|
4914
|
-
gtlt = ">=";
|
|
4915
|
-
if (xm) {
|
|
4916
|
-
M = +M + 1;
|
|
4917
|
-
m = 0;
|
|
4918
|
-
p = 0;
|
|
4919
|
-
} else {
|
|
4920
|
-
m = +m + 1;
|
|
4921
|
-
p = 0;
|
|
4922
|
-
}
|
|
4923
|
-
} else if (gtlt === "<=") {
|
|
4924
|
-
gtlt = "<";
|
|
4925
|
-
if (xm) M = +M + 1;
|
|
4926
|
-
else m = +m + 1;
|
|
4927
|
-
}
|
|
4928
|
-
if (gtlt === "<") pr = "-0";
|
|
4929
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
4930
|
-
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
4931
|
-
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
4932
|
-
debug("xRange return", ret);
|
|
4933
|
-
return ret;
|
|
4934
|
-
});
|
|
4935
|
-
};
|
|
4936
|
-
const replaceStars = (comp, options) => {
|
|
4937
|
-
debug("replaceStars", comp, options);
|
|
4938
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
4939
|
-
};
|
|
4940
|
-
const replaceGTE0 = (comp, options) => {
|
|
4941
|
-
debug("replaceGTE0", comp, options);
|
|
4942
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
4943
|
-
};
|
|
4944
|
-
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
4945
|
-
if (isX(fM)) from = "";
|
|
4946
|
-
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
4947
|
-
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
4948
|
-
else if (fpr) from = `>=${from}`;
|
|
4949
|
-
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
4950
|
-
if (isX(tM)) to = "";
|
|
4951
|
-
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
4952
|
-
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
4953
|
-
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
4954
|
-
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
3298
|
+
if (wildcardMinor) return `>=${major}.0.0${prerelease} <${Number(major) + 1}.0.0-0`;
|
|
3299
|
+
if (wildcardPatch) return `>=${major}.${minor}.0${prerelease} <${major}.${Number(minor) + 1}.0-0`;
|
|
3300
|
+
return match;
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
function replaceXRanges(comparator, options) {
|
|
3304
|
+
return comparator.split(/\s+/).map((part) => replaceXRange(part, options)).join(" ");
|
|
3305
|
+
}
|
|
3306
|
+
function replaceHyphenRange(range, options) {
|
|
3307
|
+
const expression = options.loose ? LOOSE_HYPHEN : STRICT_HYPHEN;
|
|
3308
|
+
return range.replace(expression, (_match, rawFrom, fromMajor, fromMinor, fromPatch, fromPrerelease, _fromBuild, rawTo, toMajor, toMinor, toPatch, toPrerelease) => {
|
|
3309
|
+
let from = rawFrom;
|
|
3310
|
+
let to = rawTo;
|
|
3311
|
+
if (isWildcard(fromMajor)) from = "";
|
|
3312
|
+
else if (isWildcard(fromMinor)) from = `>=${fromMajor}.0.0${options.includePrerelease ? "-0" : ""}`;
|
|
3313
|
+
else if (isWildcard(fromPatch)) from = `>=${fromMajor}.${fromMinor}.0${options.includePrerelease ? "-0" : ""}`;
|
|
3314
|
+
else if (fromPrerelease) from = `>=${from}`;
|
|
3315
|
+
else from = `>=${from}${options.includePrerelease ? "-0" : ""}`;
|
|
3316
|
+
if (isWildcard(toMajor)) to = "";
|
|
3317
|
+
else if (isWildcard(toMinor)) to = `<${Number(toMajor) + 1}.0.0-0`;
|
|
3318
|
+
else if (isWildcard(toPatch)) to = `<${toMajor}.${Number(toMinor) + 1}.0-0`;
|
|
3319
|
+
else if (toPrerelease) to = `<=${toMajor}.${toMinor}.${toPatch}-${toPrerelease}`;
|
|
3320
|
+
else if (options.includePrerelease) to = `<${toMajor}.${toMinor}.${Number(toPatch) + 1}-0`;
|
|
4955
3321
|
else to = `<=${to}`;
|
|
4956
3322
|
return `${from} ${to}`.trim();
|
|
4957
|
-
};
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
})
|
|
4974
|
-
|
|
4975
|
-
const
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
this.options = options;
|
|
4987
|
-
this.loose = !!options.loose;
|
|
4988
|
-
this.parse(comp);
|
|
4989
|
-
if (this.semver === ANY) this.value = "";
|
|
4990
|
-
else this.value = this.operator + this.semver.version;
|
|
4991
|
-
debug("comp", this);
|
|
4992
|
-
}
|
|
4993
|
-
parse(comp) {
|
|
4994
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
4995
|
-
const m = comp.match(r);
|
|
4996
|
-
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
4997
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
4998
|
-
if (this.operator === "=") this.operator = "";
|
|
4999
|
-
if (!m[2]) this.semver = ANY;
|
|
5000
|
-
else this.semver = new SemVer(m[2], this.options.loose);
|
|
5001
|
-
}
|
|
5002
|
-
toString() {
|
|
5003
|
-
return this.value;
|
|
5004
|
-
}
|
|
5005
|
-
test(version) {
|
|
5006
|
-
debug("Comparator.test", version, this.options.loose);
|
|
5007
|
-
if (this.semver === ANY || version === ANY) return true;
|
|
5008
|
-
if (typeof version === "string") try {
|
|
5009
|
-
version = new SemVer(version, this.options);
|
|
5010
|
-
} catch (er) {
|
|
5011
|
-
return false;
|
|
5012
|
-
}
|
|
5013
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
5014
|
-
}
|
|
5015
|
-
intersects(comp, options) {
|
|
5016
|
-
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
5017
|
-
if (this.operator === "") {
|
|
5018
|
-
if (this.value === "") return true;
|
|
5019
|
-
return new Range(comp.value, options).test(this.value);
|
|
5020
|
-
} else if (comp.operator === "") {
|
|
5021
|
-
if (comp.value === "") return true;
|
|
5022
|
-
return new Range(this.value, options).test(comp.semver);
|
|
5023
|
-
}
|
|
5024
|
-
options = parseOptions(options);
|
|
5025
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
5026
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
5027
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
5028
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
5029
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
5030
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
5031
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
5032
|
-
return false;
|
|
5033
|
-
}
|
|
5034
|
-
};
|
|
5035
|
-
const parseOptions = require_parse_options();
|
|
5036
|
-
const { safeRe: re, t } = require_re();
|
|
5037
|
-
const cmp = require_cmp();
|
|
5038
|
-
const debug = require_debug();
|
|
5039
|
-
const SemVer = require_semver$1();
|
|
5040
|
-
const Range = require_range();
|
|
5041
|
-
}));
|
|
5042
|
-
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5043
|
-
const Range = require_range();
|
|
5044
|
-
const satisfies = (version, range, options) => {
|
|
5045
|
-
try {
|
|
5046
|
-
range = new Range(range, options);
|
|
5047
|
-
} catch (er) {
|
|
5048
|
-
return false;
|
|
5049
|
-
}
|
|
5050
|
-
return range.test(version);
|
|
5051
|
-
};
|
|
5052
|
-
module.exports = satisfies;
|
|
5053
|
-
}));
|
|
5054
|
-
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5055
|
-
const Range = require_range();
|
|
5056
|
-
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
5057
|
-
module.exports = toComparators;
|
|
5058
|
-
}));
|
|
5059
|
-
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5060
|
-
const SemVer = require_semver$1();
|
|
5061
|
-
const Range = require_range();
|
|
5062
|
-
const maxSatisfying = (versions, range, options) => {
|
|
5063
|
-
let max = null;
|
|
5064
|
-
let maxSV = null;
|
|
5065
|
-
let rangeObj = null;
|
|
5066
|
-
try {
|
|
5067
|
-
rangeObj = new Range(range, options);
|
|
5068
|
-
} catch (er) {
|
|
5069
|
-
return null;
|
|
5070
|
-
}
|
|
5071
|
-
versions.forEach((v) => {
|
|
5072
|
-
if (rangeObj.test(v)) {
|
|
5073
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
5074
|
-
max = v;
|
|
5075
|
-
maxSV = new SemVer(max, options);
|
|
5076
|
-
}
|
|
5077
|
-
}
|
|
5078
|
-
});
|
|
5079
|
-
return max;
|
|
5080
|
-
};
|
|
5081
|
-
module.exports = maxSatisfying;
|
|
5082
|
-
}));
|
|
5083
|
-
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5084
|
-
const SemVer = require_semver$1();
|
|
5085
|
-
const Range = require_range();
|
|
5086
|
-
const minSatisfying = (versions, range, options) => {
|
|
5087
|
-
let min = null;
|
|
5088
|
-
let minSV = null;
|
|
5089
|
-
let rangeObj = null;
|
|
5090
|
-
try {
|
|
5091
|
-
rangeObj = new Range(range, options);
|
|
5092
|
-
} catch (er) {
|
|
5093
|
-
return null;
|
|
3323
|
+
});
|
|
3324
|
+
}
|
|
3325
|
+
function expandComparator(comparator, options) {
|
|
3326
|
+
return replaceXRanges(replaceTildes(replaceCarets(comparator.replace(BUILD_SAFE, ""), options), options), options).trim().replace(STAR, "");
|
|
3327
|
+
}
|
|
3328
|
+
function parseSimpleRange(input, options) {
|
|
3329
|
+
let parts = replaceHyphenRange(input.replace(BUILD_STRIP, ""), options).replace(COMPARATOR_TRIM, "$1$2$3").replace(TILDE_TRIM, "$1~").replace(CARET_TRIM, "$1^").split(" ").map((part) => expandComparator(part, options)).join(" ").split(/\s+/).map((part) => part.trim().replace(options.includePrerelease ? GTE_ZERO_PRERELEASE : GTE_ZERO, ""));
|
|
3330
|
+
if (options.loose) parts = parts.filter((part) => LOOSE_COMPARATOR.test(part));
|
|
3331
|
+
const unique = /* @__PURE__ */ new Map();
|
|
3332
|
+
for (const comparator of parts.map((part) => parseComparator(part, options))) {
|
|
3333
|
+
if (comparator.value === "<0.0.0-0") return [comparator];
|
|
3334
|
+
unique.set(comparator.value, comparator);
|
|
3335
|
+
}
|
|
3336
|
+
if (unique.size > 1) unique.delete("");
|
|
3337
|
+
return [...unique.values()];
|
|
3338
|
+
}
|
|
3339
|
+
function parseRange(range, options = {}) {
|
|
3340
|
+
if (typeof range !== "string") return range;
|
|
3341
|
+
const parsedOptions = { ...options };
|
|
3342
|
+
const raw = range.trim().replaceAll(/\s+/g, " ");
|
|
3343
|
+
let sets = raw.split("||").map((part) => parseSimpleRange(part.trim(), parsedOptions)).filter((set) => set.length);
|
|
3344
|
+
if (!sets.length) throw new TypeError(`Range contains no valid comparator sets: ${raw}`);
|
|
3345
|
+
if (sets.length > 1) {
|
|
3346
|
+
const first = sets[0];
|
|
3347
|
+
sets = sets.filter((set) => set[0]?.value !== "<0.0.0-0");
|
|
3348
|
+
if (!sets.length) sets = [first];
|
|
3349
|
+
else if (sets.length > 1) {
|
|
3350
|
+
const any = sets.find((set) => set.length === 1 && set[0]?.value === "");
|
|
3351
|
+
if (any) sets = [any];
|
|
5094
3352
|
}
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
}
|
|
5102
|
-
});
|
|
5103
|
-
return min;
|
|
3353
|
+
}
|
|
3354
|
+
return {
|
|
3355
|
+
normalized: sets.map((set) => set.map((comparator) => comparator.value).join(" ")).join("||"),
|
|
3356
|
+
options: parsedOptions,
|
|
3357
|
+
raw,
|
|
3358
|
+
sets
|
|
5104
3359
|
};
|
|
5105
|
-
|
|
5106
|
-
})
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
const gt = require_gt();
|
|
5111
|
-
const minVersion = (range, loose) => {
|
|
5112
|
-
range = new Range(range, loose);
|
|
5113
|
-
let minver = new SemVer("0.0.0");
|
|
5114
|
-
if (range.test(minver)) return minver;
|
|
5115
|
-
minver = new SemVer("0.0.0-0");
|
|
5116
|
-
if (range.test(minver)) return minver;
|
|
5117
|
-
minver = null;
|
|
5118
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
5119
|
-
const comparators = range.set[i];
|
|
5120
|
-
let setMin = null;
|
|
5121
|
-
comparators.forEach((comparator) => {
|
|
5122
|
-
const compver = new SemVer(comparator.semver.version);
|
|
5123
|
-
switch (comparator.operator) {
|
|
5124
|
-
case ">":
|
|
5125
|
-
if (compver.prerelease.length === 0) compver.patch++;
|
|
5126
|
-
else compver.prerelease.push(0);
|
|
5127
|
-
compver.raw = compver.format();
|
|
5128
|
-
case "":
|
|
5129
|
-
case ">=":
|
|
5130
|
-
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
5131
|
-
break;
|
|
5132
|
-
case "<":
|
|
5133
|
-
case "<=": break;
|
|
5134
|
-
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
5135
|
-
}
|
|
5136
|
-
});
|
|
5137
|
-
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
5138
|
-
}
|
|
5139
|
-
if (minver && range.test(minver)) return minver;
|
|
3360
|
+
}
|
|
3361
|
+
function tryParseRange(range, options = {}) {
|
|
3362
|
+
try {
|
|
3363
|
+
return parseRange(range, options);
|
|
3364
|
+
} catch {
|
|
5140
3365
|
return null;
|
|
5141
|
-
}
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
})
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
const { ANY } = Comparator;
|
|
5159
|
-
const Range = require_range();
|
|
5160
|
-
const satisfies = require_satisfies();
|
|
5161
|
-
const gt = require_gt();
|
|
5162
|
-
const lt = require_lt();
|
|
5163
|
-
const lte = require_lte();
|
|
5164
|
-
const gte = require_gte();
|
|
5165
|
-
const outside = (version, range, hilo, options) => {
|
|
5166
|
-
version = new SemVer(version, options);
|
|
5167
|
-
range = new Range(range, options);
|
|
5168
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
5169
|
-
switch (hilo) {
|
|
5170
|
-
case ">":
|
|
5171
|
-
gtfn = gt;
|
|
5172
|
-
ltefn = lte;
|
|
5173
|
-
ltfn = lt;
|
|
5174
|
-
comp = ">";
|
|
5175
|
-
ecomp = ">=";
|
|
5176
|
-
break;
|
|
5177
|
-
case "<":
|
|
5178
|
-
gtfn = lt;
|
|
5179
|
-
ltefn = gte;
|
|
5180
|
-
ltfn = gt;
|
|
5181
|
-
comp = "<";
|
|
5182
|
-
ecomp = "<=";
|
|
5183
|
-
break;
|
|
5184
|
-
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
5185
|
-
}
|
|
5186
|
-
if (satisfies(version, range, options)) return false;
|
|
5187
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
5188
|
-
const comparators = range.set[i];
|
|
5189
|
-
let high = null;
|
|
5190
|
-
let low = null;
|
|
5191
|
-
comparators.forEach((comparator) => {
|
|
5192
|
-
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
5193
|
-
high = high || comparator;
|
|
5194
|
-
low = low || comparator;
|
|
5195
|
-
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
5196
|
-
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
5197
|
-
});
|
|
5198
|
-
if (high.operator === comp || high.operator === ecomp) return false;
|
|
5199
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
5200
|
-
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
5201
|
-
}
|
|
5202
|
-
return true;
|
|
5203
|
-
};
|
|
5204
|
-
module.exports = outside;
|
|
5205
|
-
}));
|
|
5206
|
-
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5207
|
-
const outside = require_outside();
|
|
5208
|
-
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
5209
|
-
module.exports = gtr;
|
|
5210
|
-
}));
|
|
5211
|
-
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5212
|
-
const outside = require_outside();
|
|
5213
|
-
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
5214
|
-
module.exports = ltr;
|
|
5215
|
-
}));
|
|
5216
|
-
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5217
|
-
const Range = require_range();
|
|
5218
|
-
const intersects = (r1, r2, options) => {
|
|
5219
|
-
r1 = new Range(r1, options);
|
|
5220
|
-
r2 = new Range(r2, options);
|
|
5221
|
-
return r1.intersects(r2, options);
|
|
5222
|
-
};
|
|
5223
|
-
module.exports = intersects;
|
|
5224
|
-
}));
|
|
5225
|
-
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5226
|
-
const satisfies = require_satisfies();
|
|
5227
|
-
const compare = require_compare();
|
|
5228
|
-
module.exports = (versions, range, options) => {
|
|
5229
|
-
const set = [];
|
|
5230
|
-
let first = null;
|
|
5231
|
-
let prev = null;
|
|
5232
|
-
const v = versions.sort((a, b) => compare(a, b, options));
|
|
5233
|
-
for (const version of v) if (satisfies(version, range, options)) {
|
|
5234
|
-
prev = version;
|
|
5235
|
-
if (!first) first = version;
|
|
5236
|
-
} else {
|
|
5237
|
-
if (prev) set.push([first, prev]);
|
|
5238
|
-
prev = null;
|
|
5239
|
-
first = null;
|
|
5240
|
-
}
|
|
5241
|
-
if (first) set.push([first, null]);
|
|
5242
|
-
const ranges = [];
|
|
5243
|
-
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
5244
|
-
else if (!max && min === v[0]) ranges.push("*");
|
|
5245
|
-
else if (!max) ranges.push(`>=${min}`);
|
|
5246
|
-
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
5247
|
-
else ranges.push(`${min} - ${max}`);
|
|
5248
|
-
const simplified = ranges.join(" || ");
|
|
5249
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
5250
|
-
return simplified.length < original.length ? simplified : range;
|
|
5251
|
-
};
|
|
5252
|
-
}));
|
|
5253
|
-
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5254
|
-
const Range = require_range();
|
|
5255
|
-
const Comparator = require_comparator();
|
|
5256
|
-
const { ANY } = Comparator;
|
|
5257
|
-
const satisfies = require_satisfies();
|
|
5258
|
-
const compare = require_compare();
|
|
5259
|
-
const subset = (sub, dom, options = {}) => {
|
|
5260
|
-
if (sub === dom) return true;
|
|
5261
|
-
sub = new Range(sub, options);
|
|
5262
|
-
dom = new Range(dom, options);
|
|
5263
|
-
let sawNonNull = false;
|
|
5264
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
5265
|
-
for (const simpleDom of dom.set) {
|
|
5266
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
5267
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
5268
|
-
if (isSub) continue OUTER;
|
|
5269
|
-
}
|
|
5270
|
-
if (sawNonNull) return false;
|
|
5271
|
-
}
|
|
5272
|
-
return true;
|
|
5273
|
-
};
|
|
5274
|
-
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
5275
|
-
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
5276
|
-
const simpleSubset = (sub, dom, options) => {
|
|
5277
|
-
if (sub === dom) return true;
|
|
5278
|
-
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
5279
|
-
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
5280
|
-
else sub = minimumVersion;
|
|
5281
|
-
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
5282
|
-
else dom = minimumVersion;
|
|
5283
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
5284
|
-
let gt, lt;
|
|
5285
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
5286
|
-
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
5287
|
-
else eqSet.add(c.semver);
|
|
5288
|
-
if (eqSet.size > 1) return null;
|
|
5289
|
-
let gtltComp;
|
|
5290
|
-
if (gt && lt) {
|
|
5291
|
-
gtltComp = compare(gt.semver, lt.semver, options);
|
|
5292
|
-
if (gtltComp > 0) return null;
|
|
5293
|
-
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
5294
|
-
}
|
|
5295
|
-
for (const eq of eqSet) {
|
|
5296
|
-
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
5297
|
-
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
5298
|
-
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
5299
|
-
return true;
|
|
5300
|
-
}
|
|
5301
|
-
let higher, lower;
|
|
5302
|
-
let hasDomLT, hasDomGT;
|
|
5303
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
5304
|
-
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
5305
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
5306
|
-
for (const c of dom) {
|
|
5307
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
5308
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
5309
|
-
if (gt) {
|
|
5310
|
-
if (needDomGTPre) {
|
|
5311
|
-
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;
|
|
5312
|
-
}
|
|
5313
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
5314
|
-
higher = higherGT(gt, c, options);
|
|
5315
|
-
if (higher === c && higher !== gt) return false;
|
|
5316
|
-
} else if (gt.operator === ">=" && !c.test(gt.semver)) return false;
|
|
5317
|
-
}
|
|
5318
|
-
if (lt) {
|
|
5319
|
-
if (needDomLTPre) {
|
|
5320
|
-
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;
|
|
5321
|
-
}
|
|
5322
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
5323
|
-
lower = lowerLT(lt, c, options);
|
|
5324
|
-
if (lower === c && lower !== lt) return false;
|
|
5325
|
-
} else if (lt.operator === "<=" && !c.test(lt.semver)) return false;
|
|
5326
|
-
}
|
|
5327
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
5328
|
-
}
|
|
5329
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
5330
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
5331
|
-
if (needDomGTPre || needDomLTPre) return false;
|
|
5332
|
-
return true;
|
|
5333
|
-
};
|
|
5334
|
-
const higherGT = (a, b, options) => {
|
|
5335
|
-
if (!a) return b;
|
|
5336
|
-
const comp = compare(a.semver, b.semver, options);
|
|
5337
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
5338
|
-
};
|
|
5339
|
-
const lowerLT = (a, b, options) => {
|
|
5340
|
-
if (!a) return b;
|
|
5341
|
-
const comp = compare(a.semver, b.semver, options);
|
|
5342
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
5343
|
-
};
|
|
5344
|
-
module.exports = subset;
|
|
5345
|
-
}));
|
|
5346
|
-
var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5347
|
-
const internalRe = require_re();
|
|
5348
|
-
const constants = require_constants();
|
|
5349
|
-
const SemVer = require_semver$1();
|
|
5350
|
-
const identifiers = require_identifiers();
|
|
5351
|
-
module.exports = {
|
|
5352
|
-
parse: require_parse(),
|
|
5353
|
-
valid: require_valid$1(),
|
|
5354
|
-
clean: require_clean(),
|
|
5355
|
-
inc: require_inc(),
|
|
5356
|
-
diff: require_diff(),
|
|
5357
|
-
major: require_major(),
|
|
5358
|
-
minor: require_minor(),
|
|
5359
|
-
patch: require_patch(),
|
|
5360
|
-
prerelease: require_prerelease(),
|
|
5361
|
-
compare: require_compare(),
|
|
5362
|
-
rcompare: require_rcompare(),
|
|
5363
|
-
compareLoose: require_compare_loose(),
|
|
5364
|
-
compareBuild: require_compare_build(),
|
|
5365
|
-
sort: require_sort(),
|
|
5366
|
-
rsort: require_rsort(),
|
|
5367
|
-
gt: require_gt(),
|
|
5368
|
-
lt: require_lt(),
|
|
5369
|
-
eq: require_eq(),
|
|
5370
|
-
neq: require_neq(),
|
|
5371
|
-
gte: require_gte(),
|
|
5372
|
-
lte: require_lte(),
|
|
5373
|
-
cmp: require_cmp(),
|
|
5374
|
-
coerce: require_coerce(),
|
|
5375
|
-
truncate: require_truncate(),
|
|
5376
|
-
Comparator: require_comparator(),
|
|
5377
|
-
Range: require_range(),
|
|
5378
|
-
satisfies: require_satisfies(),
|
|
5379
|
-
toComparators: require_to_comparators(),
|
|
5380
|
-
maxSatisfying: require_max_satisfying(),
|
|
5381
|
-
minSatisfying: require_min_satisfying(),
|
|
5382
|
-
minVersion: require_min_version(),
|
|
5383
|
-
validRange: require_valid(),
|
|
5384
|
-
outside: require_outside(),
|
|
5385
|
-
gtr: require_gtr(),
|
|
5386
|
-
ltr: require_ltr(),
|
|
5387
|
-
intersects: require_intersects(),
|
|
5388
|
-
simplifyRange: require_simplify(),
|
|
5389
|
-
subset: require_subset(),
|
|
5390
|
-
SemVer,
|
|
5391
|
-
re: internalRe.re,
|
|
5392
|
-
src: internalRe.src,
|
|
5393
|
-
tokens: internalRe.t,
|
|
5394
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
5395
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
5396
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
5397
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
5398
|
-
};
|
|
5399
|
-
})))(), 1);
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
function testParsedRange(range, version) {
|
|
3369
|
+
return range.sets.some((set) => testComparatorSet(set, version, range.options));
|
|
3370
|
+
}
|
|
3371
|
+
function testRangeVersion(range, version) {
|
|
3372
|
+
const parsed = tryParse(version, range.options);
|
|
3373
|
+
return parsed ? testParsedRange(range, parsed) : false;
|
|
3374
|
+
}
|
|
3375
|
+
function satisfies(version, range, options = {}) {
|
|
3376
|
+
const parsed = tryParseRange(range, options);
|
|
3377
|
+
return parsed ? testRangeVersion(parsed, version) : false;
|
|
3378
|
+
}
|
|
3379
|
+
function coerce(value, options = {}) {
|
|
3380
|
+
const parsed = coerceParsedVersion(value, options);
|
|
3381
|
+
return parsed ? formatFullVersion(parsed) : null;
|
|
3382
|
+
}
|
|
5400
3383
|
const semverSatisfies = (targetAppVersion, currentVersion) => {
|
|
5401
|
-
const currentCoerce =
|
|
3384
|
+
const currentCoerce = coerce(currentVersion);
|
|
5402
3385
|
if (!currentCoerce) return false;
|
|
5403
|
-
return
|
|
3386
|
+
return satisfies(currentCoerce, targetAppVersion);
|
|
5404
3387
|
};
|
|
5405
3388
|
const INIT_BUNDLE_ROLLBACK_UPDATE_INFO$1 = {
|
|
5406
3389
|
message: null,
|
|
@@ -6239,13 +4222,7 @@ const convertToBundle = (firestoreData) => {
|
|
|
6239
4222
|
const firebaseDatabase = createDatabasePlugin({
|
|
6240
4223
|
name: "firebaseDatabase",
|
|
6241
4224
|
factory: (config) => {
|
|
6242
|
-
|
|
6243
|
-
try {
|
|
6244
|
-
app = firebase_admin.default.app();
|
|
6245
|
-
} catch {
|
|
6246
|
-
app = firebase_admin.default.initializeApp(config);
|
|
6247
|
-
}
|
|
6248
|
-
const db = firebase_admin.default.firestore(app);
|
|
4225
|
+
const db = (0, firebase_admin_firestore.getFirestore)((0, firebase_admin_app.getApps)().length ? (0, firebase_admin_app.getApp)() : (0, firebase_admin_app.initializeApp)(config));
|
|
6249
4226
|
const bundlesCollection = db.collection("bundles");
|
|
6250
4227
|
const targetAppVersionsCollection = db.collection("target_app_versions");
|
|
6251
4228
|
return {
|
|
@@ -6425,13 +4402,7 @@ const firebaseStorage = createUniversalStoragePlugin({
|
|
|
6425
4402
|
name: "firebaseStorage",
|
|
6426
4403
|
supportedProtocol: "gs",
|
|
6427
4404
|
factory: (config) => {
|
|
6428
|
-
|
|
6429
|
-
try {
|
|
6430
|
-
app = firebase_admin.default.app();
|
|
6431
|
-
} catch {
|
|
6432
|
-
app = firebase_admin.default.initializeApp(config);
|
|
6433
|
-
}
|
|
6434
|
-
const bucket = app.storage().bucket(config.storageBucket);
|
|
4405
|
+
const bucket = (0, firebase_admin_storage.getStorage)((0, firebase_admin_app.getApps)().length ? (0, firebase_admin_app.getApp)() : (0, firebase_admin_app.initializeApp)(config)).bucket(config.storageBucket);
|
|
6435
4406
|
const getStorageKey = createStorageKeyBuilder(config.basePath);
|
|
6436
4407
|
return {
|
|
6437
4408
|
node: {
|
|
@@ -6537,8 +4508,7 @@ const firebaseFunctionsStorage = (config, hooks) => {
|
|
|
6537
4508
|
//#endregion
|
|
6538
4509
|
//#region firebase/functions/index.ts
|
|
6539
4510
|
const HOT_UPDATER_BASE_PATH = "/api/check-update";
|
|
6540
|
-
|
|
6541
|
-
const adminOptions = firebase_admin.default.app().options;
|
|
4511
|
+
const adminOptions = ((0, firebase_admin_app.getApps)()[0] ?? (0, firebase_admin_app.initializeApp)()).options;
|
|
6542
4512
|
const storageBucket = adminOptions.storageBucket;
|
|
6543
4513
|
const cdnUrl = process.env.HOT_UPDATER_CDN_URL;
|
|
6544
4514
|
if (!storageBucket) throw new Error("Firebase runtime requires storageBucket to read bundle manifests.");
|