@h3ravel/config 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1512 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1511 -54
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
import { safeDot, setNested } from "@h3ravel/support";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { readdir } from "node:fs/promises";
|
|
5
2
|
import { EnvParser, PathLoader } from "@h3ravel/shared";
|
|
3
|
+
import { dd, dump, safeDot, setNested } from "@h3ravel/support";
|
|
4
|
+
import path from "node:path";
|
|
6
5
|
import "node:os";
|
|
7
6
|
import "node:net";
|
|
8
7
|
import { debuglog } from "node:util";
|
|
8
|
+
import { readdir } from "node:fs/promises";
|
|
9
9
|
import "node:child_process";
|
|
10
10
|
import "dotenv";
|
|
11
11
|
import "edge.js";
|
|
@@ -35,55 +35,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
35
|
enumerable: true
|
|
36
36
|
}) : target, mod));
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/ConfigRepository.ts
|
|
40
|
-
var ConfigRepository = class {
|
|
41
|
-
loaded = false;
|
|
42
|
-
configs = {};
|
|
43
|
-
constructor(app) {
|
|
44
|
-
this.app = app;
|
|
45
|
-
}
|
|
46
|
-
get(key, def) {
|
|
47
|
-
return safeDot(this.configs, key) ?? def;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Modify the defined configurations
|
|
51
|
-
*/
|
|
52
|
-
set(key, value) {
|
|
53
|
-
setNested(this.configs, key, value);
|
|
54
|
-
}
|
|
55
|
-
async load() {
|
|
56
|
-
if (!this.loaded) {
|
|
57
|
-
const configPath = this.app.getPath("config");
|
|
58
|
-
const files = (await readdir(configPath)).filter((e) => {
|
|
59
|
-
return !e.includes(".d.ts") && !e.includes(".d.cts") && !e.includes(".map");
|
|
60
|
-
});
|
|
61
|
-
for (let i = 0; i < files.length; i++) {
|
|
62
|
-
const configModule = await import(path.join(configPath, files[i]));
|
|
63
|
-
const name = files[i].replaceAll(/\.ts|\.js/g, "");
|
|
64
|
-
if (typeof configModule.default === "function") this.configs[name] = configModule.default(this.app);
|
|
65
|
-
}
|
|
66
|
-
this.loaded = true;
|
|
67
|
-
}
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/EnvLoader.ts
|
|
74
|
-
var EnvLoader = class {
|
|
75
|
-
constructor(_app) {
|
|
76
|
-
this._app = _app;
|
|
77
|
-
}
|
|
78
|
-
get(key, def) {
|
|
79
|
-
return safeDot(EnvParser.parse(process.env), key) ?? def;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/Helpers.ts
|
|
85
|
-
var Helpers = class {};
|
|
86
|
-
|
|
87
38
|
//#endregion
|
|
88
39
|
//#region ../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
89
40
|
var require_Reflect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js": (() => {
|
|
@@ -1317,11 +1268,11 @@ var import_Reflect = /* @__PURE__ */ __toESM(require_Reflect(), 1);
|
|
|
1317
1268
|
|
|
1318
1269
|
//#endregion
|
|
1319
1270
|
//#region ../../node_modules/.pnpm/detect-port@2.1.0/node_modules/detect-port/dist/esm/detect-port.js
|
|
1320
|
-
const debug$
|
|
1271
|
+
const debug$6 = debuglog("detect-port");
|
|
1321
1272
|
|
|
1322
1273
|
//#endregion
|
|
1323
1274
|
//#region ../../node_modules/.pnpm/detect-port@2.1.0/node_modules/detect-port/dist/esm/wait-port.js
|
|
1324
|
-
const debug = debuglog("detect-port:wait-port");
|
|
1275
|
+
const debug$5 = debuglog("detect-port:wait-port");
|
|
1325
1276
|
|
|
1326
1277
|
//#endregion
|
|
1327
1278
|
//#region ../../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js
|
|
@@ -1380,9 +1331,1464 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
|
|
|
1380
1331
|
module.exports.expand = expand;
|
|
1381
1332
|
}) });
|
|
1382
1333
|
|
|
1334
|
+
//#endregion
|
|
1335
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
1336
|
+
var require_constants = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js": ((exports, module) => {
|
|
1337
|
+
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
1338
|
+
const MAX_LENGTH$2 = 256;
|
|
1339
|
+
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
1340
|
+
const MAX_SAFE_COMPONENT_LENGTH$1 = 16;
|
|
1341
|
+
const MAX_SAFE_BUILD_LENGTH$1 = MAX_LENGTH$2 - 6;
|
|
1342
|
+
const RELEASE_TYPES = [
|
|
1343
|
+
"major",
|
|
1344
|
+
"premajor",
|
|
1345
|
+
"minor",
|
|
1346
|
+
"preminor",
|
|
1347
|
+
"patch",
|
|
1348
|
+
"prepatch",
|
|
1349
|
+
"prerelease"
|
|
1350
|
+
];
|
|
1351
|
+
module.exports = {
|
|
1352
|
+
MAX_LENGTH: MAX_LENGTH$2,
|
|
1353
|
+
MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1,
|
|
1354
|
+
MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$1,
|
|
1355
|
+
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
|
|
1356
|
+
RELEASE_TYPES,
|
|
1357
|
+
SEMVER_SPEC_VERSION,
|
|
1358
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
1359
|
+
FLAG_LOOSE: 2
|
|
1360
|
+
};
|
|
1361
|
+
}) });
|
|
1362
|
+
|
|
1363
|
+
//#endregion
|
|
1364
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
|
|
1365
|
+
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js": ((exports, module) => {
|
|
1366
|
+
const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
1367
|
+
module.exports = debug$4;
|
|
1368
|
+
}) });
|
|
1369
|
+
|
|
1370
|
+
//#endregion
|
|
1371
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
|
|
1372
|
+
var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js": ((exports, module) => {
|
|
1373
|
+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants();
|
|
1374
|
+
const debug$3 = require_debug();
|
|
1375
|
+
exports = module.exports = {};
|
|
1376
|
+
const re$4 = exports.re = [];
|
|
1377
|
+
const safeRe = exports.safeRe = [];
|
|
1378
|
+
const src = exports.src = [];
|
|
1379
|
+
const safeSrc = exports.safeSrc = [];
|
|
1380
|
+
const t$4 = exports.t = {};
|
|
1381
|
+
let R = 0;
|
|
1382
|
+
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
1383
|
+
const safeRegexReplacements = [
|
|
1384
|
+
["\\s", 1],
|
|
1385
|
+
["\\d", MAX_LENGTH$1],
|
|
1386
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
1387
|
+
];
|
|
1388
|
+
const makeSafeRegex = (value) => {
|
|
1389
|
+
for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
1390
|
+
return value;
|
|
1391
|
+
};
|
|
1392
|
+
const createToken = (name, value, isGlobal) => {
|
|
1393
|
+
const safe = makeSafeRegex(value);
|
|
1394
|
+
const index = R++;
|
|
1395
|
+
debug$3(name, index, value);
|
|
1396
|
+
t$4[name] = index;
|
|
1397
|
+
src[index] = value;
|
|
1398
|
+
safeSrc[index] = safe;
|
|
1399
|
+
re$4[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
1400
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
1401
|
+
};
|
|
1402
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
1403
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
1404
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
1405
|
+
createToken("MAINVERSION", `(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})`);
|
|
1406
|
+
createToken("MAINVERSIONLOOSE", `(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
1407
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIER]})`);
|
|
1408
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
1409
|
+
createToken("PRERELEASE", `(?:-(${src[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src[t$4.PRERELEASEIDENTIFIER]})*))`);
|
|
1410
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
1411
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
1412
|
+
createToken("BUILD", `(?:\\+(${src[t$4.BUILDIDENTIFIER]}(?:\\.${src[t$4.BUILDIDENTIFIER]})*))`);
|
|
1413
|
+
createToken("FULLPLAIN", `v?${src[t$4.MAINVERSION]}${src[t$4.PRERELEASE]}?${src[t$4.BUILD]}?`);
|
|
1414
|
+
createToken("FULL", `^${src[t$4.FULLPLAIN]}$`);
|
|
1415
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t$4.MAINVERSIONLOOSE]}${src[t$4.PRERELEASELOOSE]}?${src[t$4.BUILD]}?`);
|
|
1416
|
+
createToken("LOOSE", `^${src[t$4.LOOSEPLAIN]}$`);
|
|
1417
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
1418
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
1419
|
+
createToken("XRANGEIDENTIFIER", `${src[t$4.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
1420
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:${src[t$4.PRERELEASE]})?${src[t$4.BUILD]}?)?)?`);
|
|
1421
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src[t$4.PRERELEASELOOSE]})?${src[t$4.BUILD]}?)?)?`);
|
|
1422
|
+
createToken("XRANGE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAIN]}$`);
|
|
1423
|
+
createToken("XRANGELOOSE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1424
|
+
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
1425
|
+
createToken("COERCE", `${src[t$4.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
1426
|
+
createToken("COERCEFULL", src[t$4.COERCEPLAIN] + `(?:${src[t$4.PRERELEASE]})?(?:${src[t$4.BUILD]})?(?:$|[^\\d])`);
|
|
1427
|
+
createToken("COERCERTL", src[t$4.COERCE], true);
|
|
1428
|
+
createToken("COERCERTLFULL", src[t$4.COERCEFULL], true);
|
|
1429
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
1430
|
+
createToken("TILDETRIM", `(\\s*)${src[t$4.LONETILDE]}\\s+`, true);
|
|
1431
|
+
exports.tildeTrimReplace = "$1~";
|
|
1432
|
+
createToken("TILDE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAIN]}$`);
|
|
1433
|
+
createToken("TILDELOOSE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1434
|
+
createToken("LONECARET", "(?:\\^)");
|
|
1435
|
+
createToken("CARETTRIM", `(\\s*)${src[t$4.LONECARET]}\\s+`, true);
|
|
1436
|
+
exports.caretTrimReplace = "$1^";
|
|
1437
|
+
createToken("CARET", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAIN]}$`);
|
|
1438
|
+
createToken("CARETLOOSE", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1439
|
+
createToken("COMPARATORLOOSE", `^${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]})$|^$`);
|
|
1440
|
+
createToken("COMPARATOR", `^${src[t$4.GTLT]}\\s*(${src[t$4.FULLPLAIN]})$|^$`);
|
|
1441
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]}|${src[t$4.XRANGEPLAIN]})`, true);
|
|
1442
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
1443
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t$4.XRANGEPLAIN]})\\s+-\\s+(${src[t$4.XRANGEPLAIN]})\\s*$`);
|
|
1444
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$4.XRANGEPLAINLOOSE]})\\s*$`);
|
|
1445
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
1446
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
1447
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
1448
|
+
}) });
|
|
1449
|
+
|
|
1450
|
+
//#endregion
|
|
1451
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
|
|
1452
|
+
var require_parse_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js": ((exports, module) => {
|
|
1453
|
+
const looseOption = Object.freeze({ loose: true });
|
|
1454
|
+
const emptyOpts = Object.freeze({});
|
|
1455
|
+
const parseOptions$3 = (options) => {
|
|
1456
|
+
if (!options) return emptyOpts;
|
|
1457
|
+
if (typeof options !== "object") return looseOption;
|
|
1458
|
+
return options;
|
|
1459
|
+
};
|
|
1460
|
+
module.exports = parseOptions$3;
|
|
1461
|
+
}) });
|
|
1462
|
+
|
|
1463
|
+
//#endregion
|
|
1464
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
|
|
1465
|
+
var require_identifiers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js": ((exports, module) => {
|
|
1466
|
+
const numeric = /^[0-9]+$/;
|
|
1467
|
+
const compareIdentifiers$1 = (a, b) => {
|
|
1468
|
+
const anum = numeric.test(a);
|
|
1469
|
+
const bnum = numeric.test(b);
|
|
1470
|
+
if (anum && bnum) {
|
|
1471
|
+
a = +a;
|
|
1472
|
+
b = +b;
|
|
1473
|
+
}
|
|
1474
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
1475
|
+
};
|
|
1476
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);
|
|
1477
|
+
module.exports = {
|
|
1478
|
+
compareIdentifiers: compareIdentifiers$1,
|
|
1479
|
+
rcompareIdentifiers
|
|
1480
|
+
};
|
|
1481
|
+
}) });
|
|
1482
|
+
|
|
1483
|
+
//#endregion
|
|
1484
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
1485
|
+
var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js": ((exports, module) => {
|
|
1486
|
+
const debug$2 = require_debug();
|
|
1487
|
+
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
1488
|
+
const { safeRe: re$3, t: t$3 } = require_re();
|
|
1489
|
+
const parseOptions$2 = require_parse_options();
|
|
1490
|
+
const { compareIdentifiers } = require_identifiers();
|
|
1491
|
+
var SemVer$15 = class SemVer$15 {
|
|
1492
|
+
constructor(version, options) {
|
|
1493
|
+
options = parseOptions$2(options);
|
|
1494
|
+
if (version instanceof SemVer$15) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
1495
|
+
else version = version.version;
|
|
1496
|
+
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
1497
|
+
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
1498
|
+
debug$2("SemVer", version, options);
|
|
1499
|
+
this.options = options;
|
|
1500
|
+
this.loose = !!options.loose;
|
|
1501
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
1502
|
+
const m = version.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]);
|
|
1503
|
+
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
1504
|
+
this.raw = version;
|
|
1505
|
+
this.major = +m[1];
|
|
1506
|
+
this.minor = +m[2];
|
|
1507
|
+
this.patch = +m[3];
|
|
1508
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
1509
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
1510
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
1511
|
+
if (!m[4]) this.prerelease = [];
|
|
1512
|
+
else this.prerelease = m[4].split(".").map((id) => {
|
|
1513
|
+
if (/^[0-9]+$/.test(id)) {
|
|
1514
|
+
const num = +id;
|
|
1515
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
1516
|
+
}
|
|
1517
|
+
return id;
|
|
1518
|
+
});
|
|
1519
|
+
this.build = m[5] ? m[5].split(".") : [];
|
|
1520
|
+
this.format();
|
|
1521
|
+
}
|
|
1522
|
+
format() {
|
|
1523
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
1524
|
+
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
1525
|
+
return this.version;
|
|
1526
|
+
}
|
|
1527
|
+
toString() {
|
|
1528
|
+
return this.version;
|
|
1529
|
+
}
|
|
1530
|
+
compare(other) {
|
|
1531
|
+
debug$2("SemVer.compare", this.version, this.options, other);
|
|
1532
|
+
if (!(other instanceof SemVer$15)) {
|
|
1533
|
+
if (typeof other === "string" && other === this.version) return 0;
|
|
1534
|
+
other = new SemVer$15(other, this.options);
|
|
1535
|
+
}
|
|
1536
|
+
if (other.version === this.version) return 0;
|
|
1537
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
1538
|
+
}
|
|
1539
|
+
compareMain(other) {
|
|
1540
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
1541
|
+
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
1542
|
+
}
|
|
1543
|
+
comparePre(other) {
|
|
1544
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
1545
|
+
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
1546
|
+
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
1547
|
+
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
1548
|
+
let i = 0;
|
|
1549
|
+
do {
|
|
1550
|
+
const a = this.prerelease[i];
|
|
1551
|
+
const b = other.prerelease[i];
|
|
1552
|
+
debug$2("prerelease compare", i, a, b);
|
|
1553
|
+
if (a === void 0 && b === void 0) return 0;
|
|
1554
|
+
else if (b === void 0) return 1;
|
|
1555
|
+
else if (a === void 0) return -1;
|
|
1556
|
+
else if (a === b) continue;
|
|
1557
|
+
else return compareIdentifiers(a, b);
|
|
1558
|
+
} while (++i);
|
|
1559
|
+
}
|
|
1560
|
+
compareBuild(other) {
|
|
1561
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
1562
|
+
let i = 0;
|
|
1563
|
+
do {
|
|
1564
|
+
const a = this.build[i];
|
|
1565
|
+
const b = other.build[i];
|
|
1566
|
+
debug$2("build compare", i, a, b);
|
|
1567
|
+
if (a === void 0 && b === void 0) return 0;
|
|
1568
|
+
else if (b === void 0) return 1;
|
|
1569
|
+
else if (a === void 0) return -1;
|
|
1570
|
+
else if (a === b) continue;
|
|
1571
|
+
else return compareIdentifiers(a, b);
|
|
1572
|
+
} while (++i);
|
|
1573
|
+
}
|
|
1574
|
+
inc(release, identifier, identifierBase) {
|
|
1575
|
+
if (release.startsWith("pre")) {
|
|
1576
|
+
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
1577
|
+
if (identifier) {
|
|
1578
|
+
const match = `-${identifier}`.match(this.options.loose ? re$3[t$3.PRERELEASELOOSE] : re$3[t$3.PRERELEASE]);
|
|
1579
|
+
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
switch (release) {
|
|
1583
|
+
case "premajor":
|
|
1584
|
+
this.prerelease.length = 0;
|
|
1585
|
+
this.patch = 0;
|
|
1586
|
+
this.minor = 0;
|
|
1587
|
+
this.major++;
|
|
1588
|
+
this.inc("pre", identifier, identifierBase);
|
|
1589
|
+
break;
|
|
1590
|
+
case "preminor":
|
|
1591
|
+
this.prerelease.length = 0;
|
|
1592
|
+
this.patch = 0;
|
|
1593
|
+
this.minor++;
|
|
1594
|
+
this.inc("pre", identifier, identifierBase);
|
|
1595
|
+
break;
|
|
1596
|
+
case "prepatch":
|
|
1597
|
+
this.prerelease.length = 0;
|
|
1598
|
+
this.inc("patch", identifier, identifierBase);
|
|
1599
|
+
this.inc("pre", identifier, identifierBase);
|
|
1600
|
+
break;
|
|
1601
|
+
case "prerelease":
|
|
1602
|
+
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
1603
|
+
this.inc("pre", identifier, identifierBase);
|
|
1604
|
+
break;
|
|
1605
|
+
case "release":
|
|
1606
|
+
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1607
|
+
this.prerelease.length = 0;
|
|
1608
|
+
break;
|
|
1609
|
+
case "major":
|
|
1610
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
1611
|
+
this.minor = 0;
|
|
1612
|
+
this.patch = 0;
|
|
1613
|
+
this.prerelease = [];
|
|
1614
|
+
break;
|
|
1615
|
+
case "minor":
|
|
1616
|
+
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
1617
|
+
this.patch = 0;
|
|
1618
|
+
this.prerelease = [];
|
|
1619
|
+
break;
|
|
1620
|
+
case "patch":
|
|
1621
|
+
if (this.prerelease.length === 0) this.patch++;
|
|
1622
|
+
this.prerelease = [];
|
|
1623
|
+
break;
|
|
1624
|
+
case "pre": {
|
|
1625
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
1626
|
+
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
1627
|
+
else {
|
|
1628
|
+
let i = this.prerelease.length;
|
|
1629
|
+
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
1630
|
+
this.prerelease[i]++;
|
|
1631
|
+
i = -2;
|
|
1632
|
+
}
|
|
1633
|
+
if (i === -1) {
|
|
1634
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
1635
|
+
this.prerelease.push(base);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
if (identifier) {
|
|
1639
|
+
let prerelease$2 = [identifier, base];
|
|
1640
|
+
if (identifierBase === false) prerelease$2 = [identifier];
|
|
1641
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
1642
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2;
|
|
1643
|
+
} else this.prerelease = prerelease$2;
|
|
1644
|
+
}
|
|
1645
|
+
break;
|
|
1646
|
+
}
|
|
1647
|
+
default: throw new Error(`invalid increment argument: ${release}`);
|
|
1648
|
+
}
|
|
1649
|
+
this.raw = this.format();
|
|
1650
|
+
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
1651
|
+
return this;
|
|
1652
|
+
}
|
|
1653
|
+
};
|
|
1654
|
+
module.exports = SemVer$15;
|
|
1655
|
+
}) });
|
|
1656
|
+
|
|
1657
|
+
//#endregion
|
|
1658
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
1659
|
+
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js": ((exports, module) => {
|
|
1660
|
+
const SemVer$14 = require_semver$1();
|
|
1661
|
+
const parse$6 = (version, options, throwErrors = false) => {
|
|
1662
|
+
if (version instanceof SemVer$14) return version;
|
|
1663
|
+
try {
|
|
1664
|
+
return new SemVer$14(version, options);
|
|
1665
|
+
} catch (er) {
|
|
1666
|
+
if (!throwErrors) return null;
|
|
1667
|
+
throw er;
|
|
1668
|
+
}
|
|
1669
|
+
};
|
|
1670
|
+
module.exports = parse$6;
|
|
1671
|
+
}) });
|
|
1672
|
+
|
|
1673
|
+
//#endregion
|
|
1674
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
1675
|
+
var require_valid$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js": ((exports, module) => {
|
|
1676
|
+
const parse$5 = require_parse();
|
|
1677
|
+
const valid$1 = (version, options) => {
|
|
1678
|
+
const v = parse$5(version, options);
|
|
1679
|
+
return v ? v.version : null;
|
|
1680
|
+
};
|
|
1681
|
+
module.exports = valid$1;
|
|
1682
|
+
}) });
|
|
1683
|
+
|
|
1684
|
+
//#endregion
|
|
1685
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
1686
|
+
var require_clean = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js": ((exports, module) => {
|
|
1687
|
+
const parse$4 = require_parse();
|
|
1688
|
+
const clean$1 = (version, options) => {
|
|
1689
|
+
const s = parse$4(version.trim().replace(/^[=v]+/, ""), options);
|
|
1690
|
+
return s ? s.version : null;
|
|
1691
|
+
};
|
|
1692
|
+
module.exports = clean$1;
|
|
1693
|
+
}) });
|
|
1694
|
+
|
|
1695
|
+
//#endregion
|
|
1696
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
1697
|
+
var require_inc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js": ((exports, module) => {
|
|
1698
|
+
const SemVer$13 = require_semver$1();
|
|
1699
|
+
const inc$1 = (version, release, options, identifier, identifierBase) => {
|
|
1700
|
+
if (typeof options === "string") {
|
|
1701
|
+
identifierBase = identifier;
|
|
1702
|
+
identifier = options;
|
|
1703
|
+
options = void 0;
|
|
1704
|
+
}
|
|
1705
|
+
try {
|
|
1706
|
+
return new SemVer$13(version instanceof SemVer$13 ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
1707
|
+
} catch (er) {
|
|
1708
|
+
return null;
|
|
1709
|
+
}
|
|
1710
|
+
};
|
|
1711
|
+
module.exports = inc$1;
|
|
1712
|
+
}) });
|
|
1713
|
+
|
|
1714
|
+
//#endregion
|
|
1715
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
1716
|
+
var require_diff = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js": ((exports, module) => {
|
|
1717
|
+
const parse$3 = require_parse();
|
|
1718
|
+
const diff$1 = (version1, version2) => {
|
|
1719
|
+
const v1 = parse$3(version1, null, true);
|
|
1720
|
+
const v2 = parse$3(version2, null, true);
|
|
1721
|
+
const comparison = v1.compare(v2);
|
|
1722
|
+
if (comparison === 0) return null;
|
|
1723
|
+
const v1Higher = comparison > 0;
|
|
1724
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
1725
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
1726
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
1727
|
+
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
1728
|
+
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
1729
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
1730
|
+
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
1731
|
+
return "patch";
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
const prefix = highHasPre ? "pre" : "";
|
|
1735
|
+
if (v1.major !== v2.major) return prefix + "major";
|
|
1736
|
+
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
1737
|
+
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
1738
|
+
return "prerelease";
|
|
1739
|
+
};
|
|
1740
|
+
module.exports = diff$1;
|
|
1741
|
+
}) });
|
|
1742
|
+
|
|
1743
|
+
//#endregion
|
|
1744
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
1745
|
+
var require_major = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js": ((exports, module) => {
|
|
1746
|
+
const SemVer$12 = require_semver$1();
|
|
1747
|
+
const major$1 = (a, loose) => new SemVer$12(a, loose).major;
|
|
1748
|
+
module.exports = major$1;
|
|
1749
|
+
}) });
|
|
1750
|
+
|
|
1751
|
+
//#endregion
|
|
1752
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
1753
|
+
var require_minor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js": ((exports, module) => {
|
|
1754
|
+
const SemVer$11 = require_semver$1();
|
|
1755
|
+
const minor$1 = (a, loose) => new SemVer$11(a, loose).minor;
|
|
1756
|
+
module.exports = minor$1;
|
|
1757
|
+
}) });
|
|
1758
|
+
|
|
1759
|
+
//#endregion
|
|
1760
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
1761
|
+
var require_patch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js": ((exports, module) => {
|
|
1762
|
+
const SemVer$10 = require_semver$1();
|
|
1763
|
+
const patch$1 = (a, loose) => new SemVer$10(a, loose).patch;
|
|
1764
|
+
module.exports = patch$1;
|
|
1765
|
+
}) });
|
|
1766
|
+
|
|
1767
|
+
//#endregion
|
|
1768
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
1769
|
+
var require_prerelease = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js": ((exports, module) => {
|
|
1770
|
+
const parse$2 = require_parse();
|
|
1771
|
+
const prerelease$1 = (version, options) => {
|
|
1772
|
+
const parsed = parse$2(version, options);
|
|
1773
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
1774
|
+
};
|
|
1775
|
+
module.exports = prerelease$1;
|
|
1776
|
+
}) });
|
|
1777
|
+
|
|
1778
|
+
//#endregion
|
|
1779
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
1780
|
+
var require_compare = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js": ((exports, module) => {
|
|
1781
|
+
const SemVer$9 = require_semver$1();
|
|
1782
|
+
const compare$11 = (a, b, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b, loose));
|
|
1783
|
+
module.exports = compare$11;
|
|
1784
|
+
}) });
|
|
1785
|
+
|
|
1786
|
+
//#endregion
|
|
1787
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
1788
|
+
var require_rcompare = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js": ((exports, module) => {
|
|
1789
|
+
const compare$10 = require_compare();
|
|
1790
|
+
const rcompare$1 = (a, b, loose) => compare$10(b, a, loose);
|
|
1791
|
+
module.exports = rcompare$1;
|
|
1792
|
+
}) });
|
|
1793
|
+
|
|
1794
|
+
//#endregion
|
|
1795
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
1796
|
+
var require_compare_loose = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js": ((exports, module) => {
|
|
1797
|
+
const compare$9 = require_compare();
|
|
1798
|
+
const compareLoose$1 = (a, b) => compare$9(a, b, true);
|
|
1799
|
+
module.exports = compareLoose$1;
|
|
1800
|
+
}) });
|
|
1801
|
+
|
|
1802
|
+
//#endregion
|
|
1803
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
1804
|
+
var require_compare_build = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js": ((exports, module) => {
|
|
1805
|
+
const SemVer$8 = require_semver$1();
|
|
1806
|
+
const compareBuild$3 = (a, b, loose) => {
|
|
1807
|
+
const versionA = new SemVer$8(a, loose);
|
|
1808
|
+
const versionB = new SemVer$8(b, loose);
|
|
1809
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
1810
|
+
};
|
|
1811
|
+
module.exports = compareBuild$3;
|
|
1812
|
+
}) });
|
|
1813
|
+
|
|
1814
|
+
//#endregion
|
|
1815
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
1816
|
+
var require_sort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js": ((exports, module) => {
|
|
1817
|
+
const compareBuild$2 = require_compare_build();
|
|
1818
|
+
const sort$1 = (list, loose) => list.sort((a, b) => compareBuild$2(a, b, loose));
|
|
1819
|
+
module.exports = sort$1;
|
|
1820
|
+
}) });
|
|
1821
|
+
|
|
1822
|
+
//#endregion
|
|
1823
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
1824
|
+
var require_rsort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js": ((exports, module) => {
|
|
1825
|
+
const compareBuild$1 = require_compare_build();
|
|
1826
|
+
const rsort$1 = (list, loose) => list.sort((a, b) => compareBuild$1(b, a, loose));
|
|
1827
|
+
module.exports = rsort$1;
|
|
1828
|
+
}) });
|
|
1829
|
+
|
|
1830
|
+
//#endregion
|
|
1831
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
1832
|
+
var require_gt = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js": ((exports, module) => {
|
|
1833
|
+
const compare$8 = require_compare();
|
|
1834
|
+
const gt$4 = (a, b, loose) => compare$8(a, b, loose) > 0;
|
|
1835
|
+
module.exports = gt$4;
|
|
1836
|
+
}) });
|
|
1837
|
+
|
|
1838
|
+
//#endregion
|
|
1839
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
1840
|
+
var require_lt = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js": ((exports, module) => {
|
|
1841
|
+
const compare$7 = require_compare();
|
|
1842
|
+
const lt$3 = (a, b, loose) => compare$7(a, b, loose) < 0;
|
|
1843
|
+
module.exports = lt$3;
|
|
1844
|
+
}) });
|
|
1845
|
+
|
|
1846
|
+
//#endregion
|
|
1847
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
1848
|
+
var require_eq = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js": ((exports, module) => {
|
|
1849
|
+
const compare$6 = require_compare();
|
|
1850
|
+
const eq$2 = (a, b, loose) => compare$6(a, b, loose) === 0;
|
|
1851
|
+
module.exports = eq$2;
|
|
1852
|
+
}) });
|
|
1853
|
+
|
|
1854
|
+
//#endregion
|
|
1855
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
1856
|
+
var require_neq = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js": ((exports, module) => {
|
|
1857
|
+
const compare$5 = require_compare();
|
|
1858
|
+
const neq$2 = (a, b, loose) => compare$5(a, b, loose) !== 0;
|
|
1859
|
+
module.exports = neq$2;
|
|
1860
|
+
}) });
|
|
1861
|
+
|
|
1862
|
+
//#endregion
|
|
1863
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
1864
|
+
var require_gte = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js": ((exports, module) => {
|
|
1865
|
+
const compare$4 = require_compare();
|
|
1866
|
+
const gte$3 = (a, b, loose) => compare$4(a, b, loose) >= 0;
|
|
1867
|
+
module.exports = gte$3;
|
|
1868
|
+
}) });
|
|
1869
|
+
|
|
1870
|
+
//#endregion
|
|
1871
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
1872
|
+
var require_lte = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js": ((exports, module) => {
|
|
1873
|
+
const compare$3 = require_compare();
|
|
1874
|
+
const lte$3 = (a, b, loose) => compare$3(a, b, loose) <= 0;
|
|
1875
|
+
module.exports = lte$3;
|
|
1876
|
+
}) });
|
|
1877
|
+
|
|
1878
|
+
//#endregion
|
|
1879
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
1880
|
+
var require_cmp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js": ((exports, module) => {
|
|
1881
|
+
const eq$1 = require_eq();
|
|
1882
|
+
const neq$1 = require_neq();
|
|
1883
|
+
const gt$3 = require_gt();
|
|
1884
|
+
const gte$2 = require_gte();
|
|
1885
|
+
const lt$2 = require_lt();
|
|
1886
|
+
const lte$2 = require_lte();
|
|
1887
|
+
const cmp$2 = (a, op, b, loose) => {
|
|
1888
|
+
switch (op) {
|
|
1889
|
+
case "===":
|
|
1890
|
+
if (typeof a === "object") a = a.version;
|
|
1891
|
+
if (typeof b === "object") b = b.version;
|
|
1892
|
+
return a === b;
|
|
1893
|
+
case "!==":
|
|
1894
|
+
if (typeof a === "object") a = a.version;
|
|
1895
|
+
if (typeof b === "object") b = b.version;
|
|
1896
|
+
return a !== b;
|
|
1897
|
+
case "":
|
|
1898
|
+
case "=":
|
|
1899
|
+
case "==": return eq$1(a, b, loose);
|
|
1900
|
+
case "!=": return neq$1(a, b, loose);
|
|
1901
|
+
case ">": return gt$3(a, b, loose);
|
|
1902
|
+
case ">=": return gte$2(a, b, loose);
|
|
1903
|
+
case "<": return lt$2(a, b, loose);
|
|
1904
|
+
case "<=": return lte$2(a, b, loose);
|
|
1905
|
+
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
1906
|
+
}
|
|
1907
|
+
};
|
|
1908
|
+
module.exports = cmp$2;
|
|
1909
|
+
}) });
|
|
1910
|
+
|
|
1911
|
+
//#endregion
|
|
1912
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
1913
|
+
var require_coerce = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js": ((exports, module) => {
|
|
1914
|
+
const SemVer$7 = require_semver$1();
|
|
1915
|
+
const parse$1 = require_parse();
|
|
1916
|
+
const { safeRe: re$2, t: t$2 } = require_re();
|
|
1917
|
+
const coerce$1 = (version, options) => {
|
|
1918
|
+
if (version instanceof SemVer$7) return version;
|
|
1919
|
+
if (typeof version === "number") version = String(version);
|
|
1920
|
+
if (typeof version !== "string") return null;
|
|
1921
|
+
options = options || {};
|
|
1922
|
+
let match = null;
|
|
1923
|
+
if (!options.rtl) match = version.match(options.includePrerelease ? re$2[t$2.COERCEFULL] : re$2[t$2.COERCE]);
|
|
1924
|
+
else {
|
|
1925
|
+
const coerceRtlRegex = options.includePrerelease ? re$2[t$2.COERCERTLFULL] : re$2[t$2.COERCERTL];
|
|
1926
|
+
let next;
|
|
1927
|
+
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
1928
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
1929
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
1930
|
+
}
|
|
1931
|
+
coerceRtlRegex.lastIndex = -1;
|
|
1932
|
+
}
|
|
1933
|
+
if (match === null) return null;
|
|
1934
|
+
const major$2 = match[2];
|
|
1935
|
+
const minor$2 = match[3] || "0";
|
|
1936
|
+
const patch$2 = match[4] || "0";
|
|
1937
|
+
const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
1938
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
1939
|
+
return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options);
|
|
1940
|
+
};
|
|
1941
|
+
module.exports = coerce$1;
|
|
1942
|
+
}) });
|
|
1943
|
+
|
|
1944
|
+
//#endregion
|
|
1945
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
|
|
1946
|
+
var require_lrucache = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js": ((exports, module) => {
|
|
1947
|
+
var LRUCache = class {
|
|
1948
|
+
constructor() {
|
|
1949
|
+
this.max = 1e3;
|
|
1950
|
+
this.map = /* @__PURE__ */ new Map();
|
|
1951
|
+
}
|
|
1952
|
+
get(key) {
|
|
1953
|
+
const value = this.map.get(key);
|
|
1954
|
+
if (value === void 0) return;
|
|
1955
|
+
else {
|
|
1956
|
+
this.map.delete(key);
|
|
1957
|
+
this.map.set(key, value);
|
|
1958
|
+
return value;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
delete(key) {
|
|
1962
|
+
return this.map.delete(key);
|
|
1963
|
+
}
|
|
1964
|
+
set(key, value) {
|
|
1965
|
+
if (!this.delete(key) && value !== void 0) {
|
|
1966
|
+
if (this.map.size >= this.max) {
|
|
1967
|
+
const firstKey = this.map.keys().next().value;
|
|
1968
|
+
this.delete(firstKey);
|
|
1969
|
+
}
|
|
1970
|
+
this.map.set(key, value);
|
|
1971
|
+
}
|
|
1972
|
+
return this;
|
|
1973
|
+
}
|
|
1974
|
+
};
|
|
1975
|
+
module.exports = LRUCache;
|
|
1976
|
+
}) });
|
|
1977
|
+
|
|
1978
|
+
//#endregion
|
|
1979
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
1980
|
+
var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js": ((exports, module) => {
|
|
1981
|
+
const SPACE_CHARACTERS = /\s+/g;
|
|
1982
|
+
var Range$11 = class Range$11 {
|
|
1983
|
+
constructor(range, options) {
|
|
1984
|
+
options = parseOptions$1(options);
|
|
1985
|
+
if (range instanceof Range$11) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
1986
|
+
else return new Range$11(range.raw, options);
|
|
1987
|
+
if (range instanceof Comparator$4) {
|
|
1988
|
+
this.raw = range.value;
|
|
1989
|
+
this.set = [[range]];
|
|
1990
|
+
this.formatted = void 0;
|
|
1991
|
+
return this;
|
|
1992
|
+
}
|
|
1993
|
+
this.options = options;
|
|
1994
|
+
this.loose = !!options.loose;
|
|
1995
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
1996
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
1997
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
1998
|
+
if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
1999
|
+
if (this.set.length > 1) {
|
|
2000
|
+
const first = this.set[0];
|
|
2001
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
2002
|
+
if (this.set.length === 0) this.set = [first];
|
|
2003
|
+
else if (this.set.length > 1) {
|
|
2004
|
+
for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
|
|
2005
|
+
this.set = [c];
|
|
2006
|
+
break;
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
this.formatted = void 0;
|
|
2011
|
+
}
|
|
2012
|
+
get range() {
|
|
2013
|
+
if (this.formatted === void 0) {
|
|
2014
|
+
this.formatted = "";
|
|
2015
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
2016
|
+
if (i > 0) this.formatted += "||";
|
|
2017
|
+
const comps = this.set[i];
|
|
2018
|
+
for (let k = 0; k < comps.length; k++) {
|
|
2019
|
+
if (k > 0) this.formatted += " ";
|
|
2020
|
+
this.formatted += comps[k].toString().trim();
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
return this.formatted;
|
|
2025
|
+
}
|
|
2026
|
+
format() {
|
|
2027
|
+
return this.range;
|
|
2028
|
+
}
|
|
2029
|
+
toString() {
|
|
2030
|
+
return this.range;
|
|
2031
|
+
}
|
|
2032
|
+
parseRange(range) {
|
|
2033
|
+
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
|
|
2034
|
+
const cached = cache.get(memoKey);
|
|
2035
|
+
if (cached) return cached;
|
|
2036
|
+
const loose = this.options.loose;
|
|
2037
|
+
const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE];
|
|
2038
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
2039
|
+
debug$1("hyphen replace", range);
|
|
2040
|
+
range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace);
|
|
2041
|
+
debug$1("comparator trim", range);
|
|
2042
|
+
range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace);
|
|
2043
|
+
debug$1("tilde trim", range);
|
|
2044
|
+
range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace);
|
|
2045
|
+
debug$1("caret trim", range);
|
|
2046
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
2047
|
+
if (loose) rangeList = rangeList.filter((comp) => {
|
|
2048
|
+
debug$1("loose invalid filter", comp, this.options);
|
|
2049
|
+
return !!comp.match(re$1[t$1.COMPARATORLOOSE]);
|
|
2050
|
+
});
|
|
2051
|
+
debug$1("range list", rangeList);
|
|
2052
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
2053
|
+
const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options));
|
|
2054
|
+
for (const comp of comparators) {
|
|
2055
|
+
if (isNullSet(comp)) return [comp];
|
|
2056
|
+
rangeMap.set(comp.value, comp);
|
|
2057
|
+
}
|
|
2058
|
+
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
2059
|
+
const result = [...rangeMap.values()];
|
|
2060
|
+
cache.set(memoKey, result);
|
|
2061
|
+
return result;
|
|
2062
|
+
}
|
|
2063
|
+
intersects(range, options) {
|
|
2064
|
+
if (!(range instanceof Range$11)) throw new TypeError("a Range is required");
|
|
2065
|
+
return this.set.some((thisComparators) => {
|
|
2066
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
2067
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
2068
|
+
return rangeComparators.every((rangeComparator) => {
|
|
2069
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
2070
|
+
});
|
|
2071
|
+
});
|
|
2072
|
+
});
|
|
2073
|
+
});
|
|
2074
|
+
}
|
|
2075
|
+
test(version) {
|
|
2076
|
+
if (!version) return false;
|
|
2077
|
+
if (typeof version === "string") try {
|
|
2078
|
+
version = new SemVer$6(version, this.options);
|
|
2079
|
+
} catch (er) {
|
|
2080
|
+
return false;
|
|
2081
|
+
}
|
|
2082
|
+
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
|
|
2083
|
+
return false;
|
|
2084
|
+
}
|
|
2085
|
+
};
|
|
2086
|
+
module.exports = Range$11;
|
|
2087
|
+
const cache = new (require_lrucache())();
|
|
2088
|
+
const parseOptions$1 = require_parse_options();
|
|
2089
|
+
const Comparator$4 = require_comparator();
|
|
2090
|
+
const debug$1 = require_debug();
|
|
2091
|
+
const SemVer$6 = require_semver$1();
|
|
2092
|
+
const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
2093
|
+
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
2094
|
+
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
2095
|
+
const isAny = (c) => c.value === "";
|
|
2096
|
+
const isSatisfiable = (comparators, options) => {
|
|
2097
|
+
let result = true;
|
|
2098
|
+
const remainingComparators = comparators.slice();
|
|
2099
|
+
let testComparator = remainingComparators.pop();
|
|
2100
|
+
while (result && remainingComparators.length) {
|
|
2101
|
+
result = remainingComparators.every((otherComparator) => {
|
|
2102
|
+
return testComparator.intersects(otherComparator, options);
|
|
2103
|
+
});
|
|
2104
|
+
testComparator = remainingComparators.pop();
|
|
2105
|
+
}
|
|
2106
|
+
return result;
|
|
2107
|
+
};
|
|
2108
|
+
const parseComparator = (comp, options) => {
|
|
2109
|
+
debug$1("comp", comp, options);
|
|
2110
|
+
comp = replaceCarets(comp, options);
|
|
2111
|
+
debug$1("caret", comp);
|
|
2112
|
+
comp = replaceTildes(comp, options);
|
|
2113
|
+
debug$1("tildes", comp);
|
|
2114
|
+
comp = replaceXRanges(comp, options);
|
|
2115
|
+
debug$1("xrange", comp);
|
|
2116
|
+
comp = replaceStars(comp, options);
|
|
2117
|
+
debug$1("stars", comp);
|
|
2118
|
+
return comp;
|
|
2119
|
+
};
|
|
2120
|
+
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
2121
|
+
const replaceTildes = (comp, options) => {
|
|
2122
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
2123
|
+
};
|
|
2124
|
+
const replaceTilde = (comp, options) => {
|
|
2125
|
+
const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE];
|
|
2126
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
2127
|
+
debug$1("tilde", comp, _, M, m, p, pr);
|
|
2128
|
+
let ret;
|
|
2129
|
+
if (isX(M)) ret = "";
|
|
2130
|
+
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
2131
|
+
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
2132
|
+
else if (pr) {
|
|
2133
|
+
debug$1("replaceTilde pr", pr);
|
|
2134
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
2135
|
+
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
2136
|
+
debug$1("tilde return", ret);
|
|
2137
|
+
return ret;
|
|
2138
|
+
});
|
|
2139
|
+
};
|
|
2140
|
+
const replaceCarets = (comp, options) => {
|
|
2141
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
2142
|
+
};
|
|
2143
|
+
const replaceCaret = (comp, options) => {
|
|
2144
|
+
debug$1("caret", comp, options);
|
|
2145
|
+
const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET];
|
|
2146
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
2147
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
2148
|
+
debug$1("caret", comp, _, M, m, p, pr);
|
|
2149
|
+
let ret;
|
|
2150
|
+
if (isX(M)) ret = "";
|
|
2151
|
+
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
2152
|
+
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
2153
|
+
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
2154
|
+
else if (pr) {
|
|
2155
|
+
debug$1("replaceCaret pr", pr);
|
|
2156
|
+
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
2157
|
+
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
2158
|
+
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
2159
|
+
} else {
|
|
2160
|
+
debug$1("no pr");
|
|
2161
|
+
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
2162
|
+
else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
2163
|
+
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
2164
|
+
}
|
|
2165
|
+
debug$1("caret return", ret);
|
|
2166
|
+
return ret;
|
|
2167
|
+
});
|
|
2168
|
+
};
|
|
2169
|
+
const replaceXRanges = (comp, options) => {
|
|
2170
|
+
debug$1("replaceXRanges", comp, options);
|
|
2171
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
2172
|
+
};
|
|
2173
|
+
const replaceXRange = (comp, options) => {
|
|
2174
|
+
comp = comp.trim();
|
|
2175
|
+
const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE];
|
|
2176
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
2177
|
+
debug$1("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
2178
|
+
const xM = isX(M);
|
|
2179
|
+
const xm = xM || isX(m);
|
|
2180
|
+
const xp = xm || isX(p);
|
|
2181
|
+
const anyX = xp;
|
|
2182
|
+
if (gtlt === "=" && anyX) gtlt = "";
|
|
2183
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
2184
|
+
if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
2185
|
+
else ret = "*";
|
|
2186
|
+
else if (gtlt && anyX) {
|
|
2187
|
+
if (xm) m = 0;
|
|
2188
|
+
p = 0;
|
|
2189
|
+
if (gtlt === ">") {
|
|
2190
|
+
gtlt = ">=";
|
|
2191
|
+
if (xm) {
|
|
2192
|
+
M = +M + 1;
|
|
2193
|
+
m = 0;
|
|
2194
|
+
p = 0;
|
|
2195
|
+
} else {
|
|
2196
|
+
m = +m + 1;
|
|
2197
|
+
p = 0;
|
|
2198
|
+
}
|
|
2199
|
+
} else if (gtlt === "<=") {
|
|
2200
|
+
gtlt = "<";
|
|
2201
|
+
if (xm) M = +M + 1;
|
|
2202
|
+
else m = +m + 1;
|
|
2203
|
+
}
|
|
2204
|
+
if (gtlt === "<") pr = "-0";
|
|
2205
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
2206
|
+
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
2207
|
+
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
2208
|
+
debug$1("xRange return", ret);
|
|
2209
|
+
return ret;
|
|
2210
|
+
});
|
|
2211
|
+
};
|
|
2212
|
+
const replaceStars = (comp, options) => {
|
|
2213
|
+
debug$1("replaceStars", comp, options);
|
|
2214
|
+
return comp.trim().replace(re$1[t$1.STAR], "");
|
|
2215
|
+
};
|
|
2216
|
+
const replaceGTE0 = (comp, options) => {
|
|
2217
|
+
debug$1("replaceGTE0", comp, options);
|
|
2218
|
+
return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], "");
|
|
2219
|
+
};
|
|
2220
|
+
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
2221
|
+
if (isX(fM)) from = "";
|
|
2222
|
+
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
2223
|
+
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
2224
|
+
else if (fpr) from = `>=${from}`;
|
|
2225
|
+
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
2226
|
+
if (isX(tM)) to = "";
|
|
2227
|
+
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
2228
|
+
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
2229
|
+
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
2230
|
+
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
2231
|
+
else to = `<=${to}`;
|
|
2232
|
+
return `${from} ${to}`.trim();
|
|
2233
|
+
};
|
|
2234
|
+
const testSet = (set, version, options) => {
|
|
2235
|
+
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
2236
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
|
2237
|
+
for (let i = 0; i < set.length; i++) {
|
|
2238
|
+
debug$1(set[i].semver);
|
|
2239
|
+
if (set[i].semver === Comparator$4.ANY) continue;
|
|
2240
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
2241
|
+
const allowed = set[i].semver;
|
|
2242
|
+
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
return false;
|
|
2246
|
+
}
|
|
2247
|
+
return true;
|
|
2248
|
+
};
|
|
2249
|
+
}) });
|
|
2250
|
+
|
|
2251
|
+
//#endregion
|
|
2252
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
2253
|
+
var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js": ((exports, module) => {
|
|
2254
|
+
const ANY$2 = Symbol("SemVer ANY");
|
|
2255
|
+
var Comparator$3 = class Comparator$3 {
|
|
2256
|
+
static get ANY() {
|
|
2257
|
+
return ANY$2;
|
|
2258
|
+
}
|
|
2259
|
+
constructor(comp, options) {
|
|
2260
|
+
options = parseOptions(options);
|
|
2261
|
+
if (comp instanceof Comparator$3) if (comp.loose === !!options.loose) return comp;
|
|
2262
|
+
else comp = comp.value;
|
|
2263
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
2264
|
+
debug("comparator", comp, options);
|
|
2265
|
+
this.options = options;
|
|
2266
|
+
this.loose = !!options.loose;
|
|
2267
|
+
this.parse(comp);
|
|
2268
|
+
if (this.semver === ANY$2) this.value = "";
|
|
2269
|
+
else this.value = this.operator + this.semver.version;
|
|
2270
|
+
debug("comp", this);
|
|
2271
|
+
}
|
|
2272
|
+
parse(comp) {
|
|
2273
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
2274
|
+
const m = comp.match(r);
|
|
2275
|
+
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
2276
|
+
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
2277
|
+
if (this.operator === "=") this.operator = "";
|
|
2278
|
+
if (!m[2]) this.semver = ANY$2;
|
|
2279
|
+
else this.semver = new SemVer$5(m[2], this.options.loose);
|
|
2280
|
+
}
|
|
2281
|
+
toString() {
|
|
2282
|
+
return this.value;
|
|
2283
|
+
}
|
|
2284
|
+
test(version) {
|
|
2285
|
+
debug("Comparator.test", version, this.options.loose);
|
|
2286
|
+
if (this.semver === ANY$2 || version === ANY$2) return true;
|
|
2287
|
+
if (typeof version === "string") try {
|
|
2288
|
+
version = new SemVer$5(version, this.options);
|
|
2289
|
+
} catch (er) {
|
|
2290
|
+
return false;
|
|
2291
|
+
}
|
|
2292
|
+
return cmp$1(version, this.operator, this.semver, this.options);
|
|
2293
|
+
}
|
|
2294
|
+
intersects(comp, options) {
|
|
2295
|
+
if (!(comp instanceof Comparator$3)) throw new TypeError("a Comparator is required");
|
|
2296
|
+
if (this.operator === "") {
|
|
2297
|
+
if (this.value === "") return true;
|
|
2298
|
+
return new Range$10(comp.value, options).test(this.value);
|
|
2299
|
+
} else if (comp.operator === "") {
|
|
2300
|
+
if (comp.value === "") return true;
|
|
2301
|
+
return new Range$10(this.value, options).test(comp.semver);
|
|
2302
|
+
}
|
|
2303
|
+
options = parseOptions(options);
|
|
2304
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
2305
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
2306
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
2307
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
2308
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
2309
|
+
if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
2310
|
+
if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
2311
|
+
return false;
|
|
2312
|
+
}
|
|
2313
|
+
};
|
|
2314
|
+
module.exports = Comparator$3;
|
|
2315
|
+
const parseOptions = require_parse_options();
|
|
2316
|
+
const { safeRe: re, t } = require_re();
|
|
2317
|
+
const cmp$1 = require_cmp();
|
|
2318
|
+
const debug = require_debug();
|
|
2319
|
+
const SemVer$5 = require_semver$1();
|
|
2320
|
+
const Range$10 = require_range();
|
|
2321
|
+
}) });
|
|
2322
|
+
|
|
2323
|
+
//#endregion
|
|
2324
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
2325
|
+
var require_satisfies = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js": ((exports, module) => {
|
|
2326
|
+
const Range$9 = require_range();
|
|
2327
|
+
const satisfies$4 = (version, range, options) => {
|
|
2328
|
+
try {
|
|
2329
|
+
range = new Range$9(range, options);
|
|
2330
|
+
} catch (er) {
|
|
2331
|
+
return false;
|
|
2332
|
+
}
|
|
2333
|
+
return range.test(version);
|
|
2334
|
+
};
|
|
2335
|
+
module.exports = satisfies$4;
|
|
2336
|
+
}) });
|
|
2337
|
+
|
|
2338
|
+
//#endregion
|
|
2339
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
2340
|
+
var require_to_comparators = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js": ((exports, module) => {
|
|
2341
|
+
const Range$8 = require_range();
|
|
2342
|
+
const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
2343
|
+
module.exports = toComparators$1;
|
|
2344
|
+
}) });
|
|
2345
|
+
|
|
2346
|
+
//#endregion
|
|
2347
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
2348
|
+
var require_max_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js": ((exports, module) => {
|
|
2349
|
+
const SemVer$4 = require_semver$1();
|
|
2350
|
+
const Range$7 = require_range();
|
|
2351
|
+
const maxSatisfying$1 = (versions, range, options) => {
|
|
2352
|
+
let max = null;
|
|
2353
|
+
let maxSV = null;
|
|
2354
|
+
let rangeObj = null;
|
|
2355
|
+
try {
|
|
2356
|
+
rangeObj = new Range$7(range, options);
|
|
2357
|
+
} catch (er) {
|
|
2358
|
+
return null;
|
|
2359
|
+
}
|
|
2360
|
+
versions.forEach((v) => {
|
|
2361
|
+
if (rangeObj.test(v)) {
|
|
2362
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
2363
|
+
max = v;
|
|
2364
|
+
maxSV = new SemVer$4(max, options);
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
});
|
|
2368
|
+
return max;
|
|
2369
|
+
};
|
|
2370
|
+
module.exports = maxSatisfying$1;
|
|
2371
|
+
}) });
|
|
2372
|
+
|
|
2373
|
+
//#endregion
|
|
2374
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
2375
|
+
var require_min_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js": ((exports, module) => {
|
|
2376
|
+
const SemVer$3 = require_semver$1();
|
|
2377
|
+
const Range$6 = require_range();
|
|
2378
|
+
const minSatisfying$1 = (versions, range, options) => {
|
|
2379
|
+
let min = null;
|
|
2380
|
+
let minSV = null;
|
|
2381
|
+
let rangeObj = null;
|
|
2382
|
+
try {
|
|
2383
|
+
rangeObj = new Range$6(range, options);
|
|
2384
|
+
} catch (er) {
|
|
2385
|
+
return null;
|
|
2386
|
+
}
|
|
2387
|
+
versions.forEach((v) => {
|
|
2388
|
+
if (rangeObj.test(v)) {
|
|
2389
|
+
if (!min || minSV.compare(v) === 1) {
|
|
2390
|
+
min = v;
|
|
2391
|
+
minSV = new SemVer$3(min, options);
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
});
|
|
2395
|
+
return min;
|
|
2396
|
+
};
|
|
2397
|
+
module.exports = minSatisfying$1;
|
|
2398
|
+
}) });
|
|
2399
|
+
|
|
2400
|
+
//#endregion
|
|
2401
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
2402
|
+
var require_min_version = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js": ((exports, module) => {
|
|
2403
|
+
const SemVer$2 = require_semver$1();
|
|
2404
|
+
const Range$5 = require_range();
|
|
2405
|
+
const gt$2 = require_gt();
|
|
2406
|
+
const minVersion$1 = (range, loose) => {
|
|
2407
|
+
range = new Range$5(range, loose);
|
|
2408
|
+
let minver = new SemVer$2("0.0.0");
|
|
2409
|
+
if (range.test(minver)) return minver;
|
|
2410
|
+
minver = new SemVer$2("0.0.0-0");
|
|
2411
|
+
if (range.test(minver)) return minver;
|
|
2412
|
+
minver = null;
|
|
2413
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
2414
|
+
const comparators = range.set[i];
|
|
2415
|
+
let setMin = null;
|
|
2416
|
+
comparators.forEach((comparator) => {
|
|
2417
|
+
const compver = new SemVer$2(comparator.semver.version);
|
|
2418
|
+
switch (comparator.operator) {
|
|
2419
|
+
case ">":
|
|
2420
|
+
if (compver.prerelease.length === 0) compver.patch++;
|
|
2421
|
+
else compver.prerelease.push(0);
|
|
2422
|
+
compver.raw = compver.format();
|
|
2423
|
+
case "":
|
|
2424
|
+
case ">=":
|
|
2425
|
+
if (!setMin || gt$2(compver, setMin)) setMin = compver;
|
|
2426
|
+
break;
|
|
2427
|
+
case "<":
|
|
2428
|
+
case "<=": break;
|
|
2429
|
+
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
2430
|
+
}
|
|
2431
|
+
});
|
|
2432
|
+
if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin;
|
|
2433
|
+
}
|
|
2434
|
+
if (minver && range.test(minver)) return minver;
|
|
2435
|
+
return null;
|
|
2436
|
+
};
|
|
2437
|
+
module.exports = minVersion$1;
|
|
2438
|
+
}) });
|
|
2439
|
+
|
|
2440
|
+
//#endregion
|
|
2441
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
2442
|
+
var require_valid = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js": ((exports, module) => {
|
|
2443
|
+
const Range$4 = require_range();
|
|
2444
|
+
const validRange$1 = (range, options) => {
|
|
2445
|
+
try {
|
|
2446
|
+
return new Range$4(range, options).range || "*";
|
|
2447
|
+
} catch (er) {
|
|
2448
|
+
return null;
|
|
2449
|
+
}
|
|
2450
|
+
};
|
|
2451
|
+
module.exports = validRange$1;
|
|
2452
|
+
}) });
|
|
2453
|
+
|
|
2454
|
+
//#endregion
|
|
2455
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
2456
|
+
var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js": ((exports, module) => {
|
|
2457
|
+
const SemVer$1 = require_semver$1();
|
|
2458
|
+
const Comparator$2 = require_comparator();
|
|
2459
|
+
const { ANY: ANY$1 } = Comparator$2;
|
|
2460
|
+
const Range$3 = require_range();
|
|
2461
|
+
const satisfies$3 = require_satisfies();
|
|
2462
|
+
const gt$1 = require_gt();
|
|
2463
|
+
const lt$1 = require_lt();
|
|
2464
|
+
const lte$1 = require_lte();
|
|
2465
|
+
const gte$1 = require_gte();
|
|
2466
|
+
const outside$3 = (version, range, hilo, options) => {
|
|
2467
|
+
version = new SemVer$1(version, options);
|
|
2468
|
+
range = new Range$3(range, options);
|
|
2469
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
2470
|
+
switch (hilo) {
|
|
2471
|
+
case ">":
|
|
2472
|
+
gtfn = gt$1;
|
|
2473
|
+
ltefn = lte$1;
|
|
2474
|
+
ltfn = lt$1;
|
|
2475
|
+
comp = ">";
|
|
2476
|
+
ecomp = ">=";
|
|
2477
|
+
break;
|
|
2478
|
+
case "<":
|
|
2479
|
+
gtfn = lt$1;
|
|
2480
|
+
ltefn = gte$1;
|
|
2481
|
+
ltfn = gt$1;
|
|
2482
|
+
comp = "<";
|
|
2483
|
+
ecomp = "<=";
|
|
2484
|
+
break;
|
|
2485
|
+
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
2486
|
+
}
|
|
2487
|
+
if (satisfies$3(version, range, options)) return false;
|
|
2488
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
2489
|
+
const comparators = range.set[i];
|
|
2490
|
+
let high = null;
|
|
2491
|
+
let low = null;
|
|
2492
|
+
comparators.forEach((comparator) => {
|
|
2493
|
+
if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0");
|
|
2494
|
+
high = high || comparator;
|
|
2495
|
+
low = low || comparator;
|
|
2496
|
+
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
2497
|
+
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
2498
|
+
});
|
|
2499
|
+
if (high.operator === comp || high.operator === ecomp) return false;
|
|
2500
|
+
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
2501
|
+
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
2502
|
+
}
|
|
2503
|
+
return true;
|
|
2504
|
+
};
|
|
2505
|
+
module.exports = outside$3;
|
|
2506
|
+
}) });
|
|
2507
|
+
|
|
2508
|
+
//#endregion
|
|
2509
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
2510
|
+
var require_gtr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js": ((exports, module) => {
|
|
2511
|
+
const outside$2 = require_outside();
|
|
2512
|
+
const gtr$1 = (version, range, options) => outside$2(version, range, ">", options);
|
|
2513
|
+
module.exports = gtr$1;
|
|
2514
|
+
}) });
|
|
2515
|
+
|
|
2516
|
+
//#endregion
|
|
2517
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
2518
|
+
var require_ltr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js": ((exports, module) => {
|
|
2519
|
+
const outside$1 = require_outside();
|
|
2520
|
+
const ltr$1 = (version, range, options) => outside$1(version, range, "<", options);
|
|
2521
|
+
module.exports = ltr$1;
|
|
2522
|
+
}) });
|
|
2523
|
+
|
|
2524
|
+
//#endregion
|
|
2525
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
2526
|
+
var require_intersects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js": ((exports, module) => {
|
|
2527
|
+
const Range$2 = require_range();
|
|
2528
|
+
const intersects$1 = (r1, r2, options) => {
|
|
2529
|
+
r1 = new Range$2(r1, options);
|
|
2530
|
+
r2 = new Range$2(r2, options);
|
|
2531
|
+
return r1.intersects(r2, options);
|
|
2532
|
+
};
|
|
2533
|
+
module.exports = intersects$1;
|
|
2534
|
+
}) });
|
|
2535
|
+
|
|
2536
|
+
//#endregion
|
|
2537
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
2538
|
+
var require_simplify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js": ((exports, module) => {
|
|
2539
|
+
const satisfies$2 = require_satisfies();
|
|
2540
|
+
const compare$2 = require_compare();
|
|
2541
|
+
module.exports = (versions, range, options) => {
|
|
2542
|
+
const set = [];
|
|
2543
|
+
let first = null;
|
|
2544
|
+
let prev = null;
|
|
2545
|
+
const v = versions.sort((a, b) => compare$2(a, b, options));
|
|
2546
|
+
for (const version of v) if (satisfies$2(version, range, options)) {
|
|
2547
|
+
prev = version;
|
|
2548
|
+
if (!first) first = version;
|
|
2549
|
+
} else {
|
|
2550
|
+
if (prev) set.push([first, prev]);
|
|
2551
|
+
prev = null;
|
|
2552
|
+
first = null;
|
|
2553
|
+
}
|
|
2554
|
+
if (first) set.push([first, null]);
|
|
2555
|
+
const ranges = [];
|
|
2556
|
+
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
2557
|
+
else if (!max && min === v[0]) ranges.push("*");
|
|
2558
|
+
else if (!max) ranges.push(`>=${min}`);
|
|
2559
|
+
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
2560
|
+
else ranges.push(`${min} - ${max}`);
|
|
2561
|
+
const simplified = ranges.join(" || ");
|
|
2562
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
2563
|
+
return simplified.length < original.length ? simplified : range;
|
|
2564
|
+
};
|
|
2565
|
+
}) });
|
|
2566
|
+
|
|
2567
|
+
//#endregion
|
|
2568
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
2569
|
+
var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js": ((exports, module) => {
|
|
2570
|
+
const Range$1 = require_range();
|
|
2571
|
+
const Comparator$1 = require_comparator();
|
|
2572
|
+
const { ANY } = Comparator$1;
|
|
2573
|
+
const satisfies$1 = require_satisfies();
|
|
2574
|
+
const compare$1 = require_compare();
|
|
2575
|
+
const subset$1 = (sub, dom, options = {}) => {
|
|
2576
|
+
if (sub === dom) return true;
|
|
2577
|
+
sub = new Range$1(sub, options);
|
|
2578
|
+
dom = new Range$1(dom, options);
|
|
2579
|
+
let sawNonNull = false;
|
|
2580
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
2581
|
+
for (const simpleDom of dom.set) {
|
|
2582
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
2583
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
2584
|
+
if (isSub) continue OUTER;
|
|
2585
|
+
}
|
|
2586
|
+
if (sawNonNull) return false;
|
|
2587
|
+
}
|
|
2588
|
+
return true;
|
|
2589
|
+
};
|
|
2590
|
+
const minimumVersionWithPreRelease = [new Comparator$1(">=0.0.0-0")];
|
|
2591
|
+
const minimumVersion = [new Comparator$1(">=0.0.0")];
|
|
2592
|
+
const simpleSubset = (sub, dom, options) => {
|
|
2593
|
+
if (sub === dom) return true;
|
|
2594
|
+
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
2595
|
+
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
2596
|
+
else sub = minimumVersion;
|
|
2597
|
+
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
2598
|
+
else dom = minimumVersion;
|
|
2599
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
2600
|
+
let gt$5, lt$4;
|
|
2601
|
+
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt$5 = higherGT(gt$5, c, options);
|
|
2602
|
+
else if (c.operator === "<" || c.operator === "<=") lt$4 = lowerLT(lt$4, c, options);
|
|
2603
|
+
else eqSet.add(c.semver);
|
|
2604
|
+
if (eqSet.size > 1) return null;
|
|
2605
|
+
let gtltComp;
|
|
2606
|
+
if (gt$5 && lt$4) {
|
|
2607
|
+
gtltComp = compare$1(gt$5.semver, lt$4.semver, options);
|
|
2608
|
+
if (gtltComp > 0) return null;
|
|
2609
|
+
else if (gtltComp === 0 && (gt$5.operator !== ">=" || lt$4.operator !== "<=")) return null;
|
|
2610
|
+
}
|
|
2611
|
+
for (const eq$3 of eqSet) {
|
|
2612
|
+
if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null;
|
|
2613
|
+
if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null;
|
|
2614
|
+
for (const c of dom) if (!satisfies$1(eq$3, String(c), options)) return false;
|
|
2615
|
+
return true;
|
|
2616
|
+
}
|
|
2617
|
+
let higher, lower;
|
|
2618
|
+
let hasDomLT, hasDomGT;
|
|
2619
|
+
let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false;
|
|
2620
|
+
let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false;
|
|
2621
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
2622
|
+
for (const c of dom) {
|
|
2623
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
2624
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
2625
|
+
if (gt$5) {
|
|
2626
|
+
if (needDomGTPre) {
|
|
2627
|
+
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;
|
|
2628
|
+
}
|
|
2629
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
2630
|
+
higher = higherGT(gt$5, c, options);
|
|
2631
|
+
if (higher === c && higher !== gt$5) return false;
|
|
2632
|
+
} else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c), options)) return false;
|
|
2633
|
+
}
|
|
2634
|
+
if (lt$4) {
|
|
2635
|
+
if (needDomLTPre) {
|
|
2636
|
+
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;
|
|
2637
|
+
}
|
|
2638
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
2639
|
+
lower = lowerLT(lt$4, c, options);
|
|
2640
|
+
if (lower === c && lower !== lt$4) return false;
|
|
2641
|
+
} else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c), options)) return false;
|
|
2642
|
+
}
|
|
2643
|
+
if (!c.operator && (lt$4 || gt$5) && gtltComp !== 0) return false;
|
|
2644
|
+
}
|
|
2645
|
+
if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false;
|
|
2646
|
+
if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false;
|
|
2647
|
+
if (needDomGTPre || needDomLTPre) return false;
|
|
2648
|
+
return true;
|
|
2649
|
+
};
|
|
2650
|
+
const higherGT = (a, b, options) => {
|
|
2651
|
+
if (!a) return b;
|
|
2652
|
+
const comp = compare$1(a.semver, b.semver, options);
|
|
2653
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
2654
|
+
};
|
|
2655
|
+
const lowerLT = (a, b, options) => {
|
|
2656
|
+
if (!a) return b;
|
|
2657
|
+
const comp = compare$1(a.semver, b.semver, options);
|
|
2658
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
2659
|
+
};
|
|
2660
|
+
module.exports = subset$1;
|
|
2661
|
+
}) });
|
|
2662
|
+
|
|
2663
|
+
//#endregion
|
|
2664
|
+
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
|
|
2665
|
+
var require_semver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js": ((exports, module) => {
|
|
2666
|
+
const internalRe = require_re();
|
|
2667
|
+
const constants = require_constants();
|
|
2668
|
+
const SemVer = require_semver$1();
|
|
2669
|
+
const identifiers = require_identifiers();
|
|
2670
|
+
const parse = require_parse();
|
|
2671
|
+
const valid = require_valid$1();
|
|
2672
|
+
const clean = require_clean();
|
|
2673
|
+
const inc = require_inc();
|
|
2674
|
+
const diff = require_diff();
|
|
2675
|
+
const major = require_major();
|
|
2676
|
+
const minor = require_minor();
|
|
2677
|
+
const patch = require_patch();
|
|
2678
|
+
const prerelease = require_prerelease();
|
|
2679
|
+
const compare = require_compare();
|
|
2680
|
+
const rcompare = require_rcompare();
|
|
2681
|
+
const compareLoose = require_compare_loose();
|
|
2682
|
+
const compareBuild = require_compare_build();
|
|
2683
|
+
const sort = require_sort();
|
|
2684
|
+
const rsort = require_rsort();
|
|
2685
|
+
const gt = require_gt();
|
|
2686
|
+
const lt = require_lt();
|
|
2687
|
+
const eq = require_eq();
|
|
2688
|
+
const neq = require_neq();
|
|
2689
|
+
const gte = require_gte();
|
|
2690
|
+
const lte = require_lte();
|
|
2691
|
+
const cmp = require_cmp();
|
|
2692
|
+
const coerce = require_coerce();
|
|
2693
|
+
const Comparator = require_comparator();
|
|
2694
|
+
const Range = require_range();
|
|
2695
|
+
const satisfies = require_satisfies();
|
|
2696
|
+
const toComparators = require_to_comparators();
|
|
2697
|
+
const maxSatisfying = require_max_satisfying();
|
|
2698
|
+
const minSatisfying = require_min_satisfying();
|
|
2699
|
+
const minVersion = require_min_version();
|
|
2700
|
+
const validRange = require_valid();
|
|
2701
|
+
const outside = require_outside();
|
|
2702
|
+
const gtr = require_gtr();
|
|
2703
|
+
const ltr = require_ltr();
|
|
2704
|
+
const intersects = require_intersects();
|
|
2705
|
+
const simplifyRange = require_simplify();
|
|
2706
|
+
const subset = require_subset();
|
|
2707
|
+
module.exports = {
|
|
2708
|
+
parse,
|
|
2709
|
+
valid,
|
|
2710
|
+
clean,
|
|
2711
|
+
inc,
|
|
2712
|
+
diff,
|
|
2713
|
+
major,
|
|
2714
|
+
minor,
|
|
2715
|
+
patch,
|
|
2716
|
+
prerelease,
|
|
2717
|
+
compare,
|
|
2718
|
+
rcompare,
|
|
2719
|
+
compareLoose,
|
|
2720
|
+
compareBuild,
|
|
2721
|
+
sort,
|
|
2722
|
+
rsort,
|
|
2723
|
+
gt,
|
|
2724
|
+
lt,
|
|
2725
|
+
eq,
|
|
2726
|
+
neq,
|
|
2727
|
+
gte,
|
|
2728
|
+
lte,
|
|
2729
|
+
cmp,
|
|
2730
|
+
coerce,
|
|
2731
|
+
Comparator,
|
|
2732
|
+
Range,
|
|
2733
|
+
satisfies,
|
|
2734
|
+
toComparators,
|
|
2735
|
+
maxSatisfying,
|
|
2736
|
+
minSatisfying,
|
|
2737
|
+
minVersion,
|
|
2738
|
+
validRange,
|
|
2739
|
+
outside,
|
|
2740
|
+
gtr,
|
|
2741
|
+
ltr,
|
|
2742
|
+
intersects,
|
|
2743
|
+
simplifyRange,
|
|
2744
|
+
subset,
|
|
2745
|
+
SemVer,
|
|
2746
|
+
re: internalRe.re,
|
|
2747
|
+
src: internalRe.src,
|
|
2748
|
+
tokens: internalRe.t,
|
|
2749
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
2750
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
2751
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
2752
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
2753
|
+
};
|
|
2754
|
+
}) });
|
|
2755
|
+
|
|
1383
2756
|
//#endregion
|
|
1384
2757
|
//#region ../core/dist/index.js
|
|
1385
2758
|
var import_main = /* @__PURE__ */ __toESM(require_main(), 1);
|
|
2759
|
+
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
2760
|
+
var Registerer = class Registerer$1 {
|
|
2761
|
+
constructor(app) {
|
|
2762
|
+
this.app = app;
|
|
2763
|
+
}
|
|
2764
|
+
static register(app) {
|
|
2765
|
+
new Registerer$1(app).bootRegister();
|
|
2766
|
+
}
|
|
2767
|
+
bootRegister() {
|
|
2768
|
+
globalThis.dd = dd;
|
|
2769
|
+
globalThis.dump = dump;
|
|
2770
|
+
globalThis.app_path = (path$1) => this.appPath(path$1);
|
|
2771
|
+
globalThis.base_path = (path$1) => this.basePath(path$1);
|
|
2772
|
+
globalThis.public_path = (path$1) => this.publicPath(path$1);
|
|
2773
|
+
globalThis.storage_path = (path$1) => this.storagePath(path$1);
|
|
2774
|
+
globalThis.database_path = (path$1) => this.databasePath(path$1);
|
|
2775
|
+
}
|
|
2776
|
+
appPath(path$1) {
|
|
2777
|
+
return this.app.getPath("base", path.join(`/${process.env.DIST_DIR ?? "src"}/`.replace(/([^:]\/)\/+/g, "$1"), "app", path$1 ?? ""));
|
|
2778
|
+
}
|
|
2779
|
+
basePath(path$1) {
|
|
2780
|
+
return this.app.getPath("base", path$1);
|
|
2781
|
+
}
|
|
2782
|
+
publicPath(path$1) {
|
|
2783
|
+
return this.app.getPath("public", path$1);
|
|
2784
|
+
}
|
|
2785
|
+
storagePath(path$1) {
|
|
2786
|
+
return this.app.getPath("base", path.join("storage", path$1 ?? ""));
|
|
2787
|
+
}
|
|
2788
|
+
databasePath(path$1) {
|
|
2789
|
+
return this.app.getPath("database", path$1);
|
|
2790
|
+
}
|
|
2791
|
+
};
|
|
1386
2792
|
var ServiceProvider = class {
|
|
1387
2793
|
/**
|
|
1388
2794
|
* Sort order
|
|
@@ -1412,6 +2818,57 @@ var ServiceProvider = class {
|
|
|
1412
2818
|
}
|
|
1413
2819
|
};
|
|
1414
2820
|
|
|
2821
|
+
//#endregion
|
|
2822
|
+
//#region src/ConfigRepository.ts
|
|
2823
|
+
var ConfigRepository = class {
|
|
2824
|
+
loaded = false;
|
|
2825
|
+
configs = {};
|
|
2826
|
+
constructor(app) {
|
|
2827
|
+
this.app = app;
|
|
2828
|
+
}
|
|
2829
|
+
get(key, def) {
|
|
2830
|
+
return safeDot(this.configs, key) ?? def;
|
|
2831
|
+
}
|
|
2832
|
+
/**
|
|
2833
|
+
* Modify the defined configurations
|
|
2834
|
+
*/
|
|
2835
|
+
set(key, value) {
|
|
2836
|
+
setNested(this.configs, key, value);
|
|
2837
|
+
}
|
|
2838
|
+
async load() {
|
|
2839
|
+
if (!this.loaded) {
|
|
2840
|
+
const configPath = this.app.getPath("config");
|
|
2841
|
+
globalThis.env = this.app.make("env");
|
|
2842
|
+
Registerer.register(this.app);
|
|
2843
|
+
const files = (await readdir(configPath)).filter((e) => {
|
|
2844
|
+
return !e.includes(".d.ts") && !e.includes(".d.cts") && !e.includes(".map");
|
|
2845
|
+
});
|
|
2846
|
+
for (let i = 0; i < files.length; i++) {
|
|
2847
|
+
const configModule = await import(path.join(configPath, files[i]));
|
|
2848
|
+
const name = files[i].replaceAll(/\.ts|\.js/g, "");
|
|
2849
|
+
if (typeof configModule.default === "function") this.configs[name] = configModule.default(this.app);
|
|
2850
|
+
}
|
|
2851
|
+
this.loaded = true;
|
|
2852
|
+
}
|
|
2853
|
+
return this;
|
|
2854
|
+
}
|
|
2855
|
+
};
|
|
2856
|
+
|
|
2857
|
+
//#endregion
|
|
2858
|
+
//#region src/EnvLoader.ts
|
|
2859
|
+
var EnvLoader = class {
|
|
2860
|
+
constructor(_app) {
|
|
2861
|
+
this._app = _app;
|
|
2862
|
+
}
|
|
2863
|
+
get(key, def) {
|
|
2864
|
+
return safeDot(EnvParser.parse(process.env), key) ?? def;
|
|
2865
|
+
}
|
|
2866
|
+
};
|
|
2867
|
+
|
|
2868
|
+
//#endregion
|
|
2869
|
+
//#region src/Helpers.ts
|
|
2870
|
+
var Helpers = class {};
|
|
2871
|
+
|
|
1415
2872
|
//#endregion
|
|
1416
2873
|
//#region src/Providers/ConfigServiceProvider.ts
|
|
1417
2874
|
/**
|