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