@powerhousedao/shared 6.2.0-dev.23 → 6.2.0-dev.25

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.
@@ -1585,7 +1585,7 @@ declare function parsePackageManager(args?: {
1585
1585
  bun?: boolean;
1586
1586
  }): Agent | undefined;
1587
1587
  declare function handleMutuallyExclusiveOptions(options: Record<string, string | boolean | number | undefined>, optionsName: string): void;
1588
- declare function getTagFromVersion(version: string): "latest" | "staging" | "dev";
1588
+ declare function getTagFromVersion(version: string): "dev" | "latest" | "staging";
1589
1589
  declare function logVersionUpdate(args: {
1590
1590
  name: string;
1591
1591
  version: string;
@@ -2783,13 +2783,13 @@ function parseJson(string, reviver, fileName) {
2783
2783
  }
2784
2784
  }
2785
2785
  //#endregion
2786
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js
2787
- var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2786
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/debug.js
2787
+ var require_debug$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2788
2788
  module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
2789
2789
  }));
2790
2790
  //#endregion
2791
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js
2792
- var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2791
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/constants.js
2792
+ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2793
2793
  const SEMVER_SPEC_VERSION = "2.0.0";
2794
2794
  const MAX_LENGTH = 256;
2795
2795
  const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
@@ -2813,10 +2813,10 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2813
2813
  };
2814
2814
  }));
2815
2815
  //#endregion
2816
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js
2817
- var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2818
- const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
2819
- const debug = require_debug();
2816
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/re.js
2817
+ var require_re$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2818
+ const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants$1();
2819
+ const debug = require_debug$1();
2820
2820
  exports = module.exports = {};
2821
2821
  const re = exports.re = [];
2822
2822
  const safeRe = exports.safeRe = [];
@@ -2892,8 +2892,8 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2892
2892
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
2893
2893
  }));
2894
2894
  //#endregion
2895
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js
2896
- var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2895
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/parse-options.js
2896
+ var require_parse_options$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2897
2897
  const looseOption = Object.freeze({ loose: true });
2898
2898
  const emptyOpts = Object.freeze({});
2899
2899
  const parseOptions = (options) => {
@@ -2904,8 +2904,8 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
2904
2904
  module.exports = parseOptions;
2905
2905
  }));
2906
2906
  //#endregion
2907
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js
2908
- var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2907
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/identifiers.js
2908
+ var require_identifiers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2909
2909
  const numeric = /^[0-9]+$/;
2910
2910
  const compareIdentifiers = (a, b) => {
2911
2911
  if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
@@ -2924,13 +2924,19 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2924
2924
  };
2925
2925
  }));
2926
2926
  //#endregion
2927
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js
2928
- var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2929
- const debug = require_debug();
2930
- const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
2931
- const { safeRe: re, t } = require_re();
2932
- const parseOptions = require_parse_options();
2933
- const { compareIdentifiers } = require_identifiers();
2927
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/semver.js
2928
+ var require_semver$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2929
+ const debug = require_debug$1();
2930
+ const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants$1();
2931
+ const { safeRe: re, t } = require_re$1();
2932
+ const parseOptions = require_parse_options$1();
2933
+ const { compareIdentifiers } = require_identifiers$1();
2934
+ const isPrereleaseIdentifier = (prerelease, identifier) => {
2935
+ const identifiers = identifier.split(".");
2936
+ if (identifiers.length > prerelease.length) return false;
2937
+ for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
2938
+ return true;
2939
+ };
2934
2940
  module.exports = class SemVer {
2935
2941
  constructor(version, options) {
2936
2942
  options = parseOptions(options);
@@ -3087,8 +3093,9 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3087
3093
  if (identifier) {
3088
3094
  let prerelease = [identifier, base];
3089
3095
  if (identifierBase === false) prerelease = [identifier];
3090
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
3091
- if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
3096
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
3097
+ const prereleaseBase = this.prerelease[identifier.split(".").length];
3098
+ if (isNaN(prereleaseBase)) this.prerelease = prerelease;
3092
3099
  } else this.prerelease = prerelease;
3093
3100
  }
3094
3101
  break;
@@ -3102,9 +3109,9 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3102
3109
  };
3103
3110
  }));
3104
3111
  //#endregion
3105
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js
3106
- var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3107
- const SemVer = require_semver$1();
3112
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/parse.js
3113
+ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3114
+ const SemVer = require_semver$2();
3108
3115
  const parse = (version, options, throwErrors = false) => {
3109
3116
  if (version instanceof SemVer) return version;
3110
3117
  try {
@@ -3117,9 +3124,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3117
3124
  module.exports = parse;
3118
3125
  }));
3119
3126
  //#endregion
3120
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js
3121
- var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3122
- const parse = require_parse$1();
3127
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/valid.js
3128
+ var require_valid$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3129
+ const parse = require_parse$2();
3123
3130
  const valid = (version, options) => {
3124
3131
  const v = parse(version, options);
3125
3132
  return v ? v.version : null;
@@ -3127,9 +3134,9 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3127
3134
  module.exports = valid;
3128
3135
  }));
3129
3136
  //#endregion
3130
- //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js
3131
- var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3132
- const parse = require_parse$1();
3137
+ //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/clean.js
3138
+ var require_clean$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3139
+ const parse = require_parse$2();
3133
3140
  const clean = (version, options) => {
3134
3141
  const s = parse(version.trim().replace(/^[=v]+/, ""), options);
3135
3142
  return s ? s.version : null;
@@ -4036,7 +4043,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4036
4043
  }));
4037
4044
  //#endregion
4038
4045
  //#region ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js
4039
- var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4046
+ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4040
4047
  module.exports = function(tokens) {
4041
4048
  var index = 0;
4042
4049
  function hasMore() {
@@ -4127,7 +4134,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4127
4134
  //#region ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js
4128
4135
  var require_spdx_expression_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4129
4136
  var scan = require_scan();
4130
- var parse = require_parse();
4137
+ var parse = require_parse$1();
4131
4138
  module.exports = function(source) {
4132
4139
  return parse(scan(source));
4133
4140
  };
@@ -5566,8 +5573,8 @@ var require_typos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5566
5573
  //#region ../../node_modules/.pnpm/normalize-package-data@8.0.0/node_modules/normalize-package-data/lib/fixer.js
5567
5574
  var require_fixer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5568
5575
  var { URL: URL$1 } = __require("node:url");
5569
- var isValidSemver = require_valid$1();
5570
- var cleanSemver = require_clean();
5576
+ var isValidSemver = require_valid$2();
5577
+ var cleanSemver = require_clean$1();
5571
5578
  var validateLicense = require_validate_npm_package_license();
5572
5579
  var hostedGitInfo = require_lib();
5573
5580
  var { isBuiltin } = __require("node:module");
@@ -5999,6 +6006,360 @@ async function readPackage({ cwd, normalize = true } = {}) {
5999
6006
  return _readPackage(await fsPromises.readFile(getPackagePath(cwd), "utf8"), normalize);
6000
6007
  }
6001
6008
  //#endregion
6009
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js
6010
+ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6011
+ const SEMVER_SPEC_VERSION = "2.0.0";
6012
+ const MAX_LENGTH = 256;
6013
+ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
6014
+ module.exports = {
6015
+ MAX_LENGTH,
6016
+ MAX_SAFE_COMPONENT_LENGTH: 16,
6017
+ MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
6018
+ MAX_SAFE_INTEGER,
6019
+ RELEASE_TYPES: [
6020
+ "major",
6021
+ "premajor",
6022
+ "minor",
6023
+ "preminor",
6024
+ "patch",
6025
+ "prepatch",
6026
+ "prerelease"
6027
+ ],
6028
+ SEMVER_SPEC_VERSION,
6029
+ FLAG_INCLUDE_PRERELEASE: 1,
6030
+ FLAG_LOOSE: 2
6031
+ };
6032
+ }));
6033
+ //#endregion
6034
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js
6035
+ var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6036
+ module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
6037
+ }));
6038
+ //#endregion
6039
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js
6040
+ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6041
+ const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
6042
+ const debug = require_debug();
6043
+ exports = module.exports = {};
6044
+ const re = exports.re = [];
6045
+ const safeRe = exports.safeRe = [];
6046
+ const src = exports.src = [];
6047
+ const safeSrc = exports.safeSrc = [];
6048
+ const t = exports.t = {};
6049
+ let R = 0;
6050
+ const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
6051
+ const safeRegexReplacements = [
6052
+ ["\\s", 1],
6053
+ ["\\d", MAX_LENGTH],
6054
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
6055
+ ];
6056
+ const makeSafeRegex = (value) => {
6057
+ for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
6058
+ return value;
6059
+ };
6060
+ const createToken = (name, value, isGlobal) => {
6061
+ const safe = makeSafeRegex(value);
6062
+ const index = R++;
6063
+ debug(name, index, value);
6064
+ t[name] = index;
6065
+ src[index] = value;
6066
+ safeSrc[index] = safe;
6067
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
6068
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
6069
+ };
6070
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
6071
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
6072
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
6073
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
6074
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
6075
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
6076
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
6077
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
6078
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
6079
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
6080
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
6081
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
6082
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
6083
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
6084
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
6085
+ createToken("GTLT", "((?:<|>)?=?)");
6086
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
6087
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
6088
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
6089
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
6090
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
6091
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
6092
+ createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
6093
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
6094
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
6095
+ createToken("COERCERTL", src[t.COERCE], true);
6096
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
6097
+ createToken("LONETILDE", "(?:~>?)");
6098
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
6099
+ exports.tildeTrimReplace = "$1~";
6100
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
6101
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
6102
+ createToken("LONECARET", "(?:\\^)");
6103
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
6104
+ exports.caretTrimReplace = "$1^";
6105
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
6106
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
6107
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
6108
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
6109
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
6110
+ exports.comparatorTrimReplace = "$1$2$3";
6111
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
6112
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
6113
+ createToken("STAR", "(<|>)?=?\\s*\\*");
6114
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
6115
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
6116
+ }));
6117
+ //#endregion
6118
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js
6119
+ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6120
+ const looseOption = Object.freeze({ loose: true });
6121
+ const emptyOpts = Object.freeze({});
6122
+ const parseOptions = (options) => {
6123
+ if (!options) return emptyOpts;
6124
+ if (typeof options !== "object") return looseOption;
6125
+ return options;
6126
+ };
6127
+ module.exports = parseOptions;
6128
+ }));
6129
+ //#endregion
6130
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js
6131
+ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6132
+ const numeric = /^[0-9]+$/;
6133
+ const compareIdentifiers = (a, b) => {
6134
+ if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
6135
+ const anum = numeric.test(a);
6136
+ const bnum = numeric.test(b);
6137
+ if (anum && bnum) {
6138
+ a = +a;
6139
+ b = +b;
6140
+ }
6141
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
6142
+ };
6143
+ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
6144
+ module.exports = {
6145
+ compareIdentifiers,
6146
+ rcompareIdentifiers
6147
+ };
6148
+ }));
6149
+ //#endregion
6150
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js
6151
+ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6152
+ const debug = require_debug();
6153
+ const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
6154
+ const { safeRe: re, t } = require_re();
6155
+ const parseOptions = require_parse_options();
6156
+ const { compareIdentifiers } = require_identifiers();
6157
+ module.exports = class SemVer {
6158
+ constructor(version, options) {
6159
+ options = parseOptions(options);
6160
+ if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
6161
+ else version = version.version;
6162
+ else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
6163
+ if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
6164
+ debug("SemVer", version, options);
6165
+ this.options = options;
6166
+ this.loose = !!options.loose;
6167
+ this.includePrerelease = !!options.includePrerelease;
6168
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
6169
+ if (!m) throw new TypeError(`Invalid Version: ${version}`);
6170
+ this.raw = version;
6171
+ this.major = +m[1];
6172
+ this.minor = +m[2];
6173
+ this.patch = +m[3];
6174
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
6175
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
6176
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
6177
+ if (!m[4]) this.prerelease = [];
6178
+ else this.prerelease = m[4].split(".").map((id) => {
6179
+ if (/^[0-9]+$/.test(id)) {
6180
+ const num = +id;
6181
+ if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
6182
+ }
6183
+ return id;
6184
+ });
6185
+ this.build = m[5] ? m[5].split(".") : [];
6186
+ this.format();
6187
+ }
6188
+ format() {
6189
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
6190
+ if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
6191
+ return this.version;
6192
+ }
6193
+ toString() {
6194
+ return this.version;
6195
+ }
6196
+ compare(other) {
6197
+ debug("SemVer.compare", this.version, this.options, other);
6198
+ if (!(other instanceof SemVer)) {
6199
+ if (typeof other === "string" && other === this.version) return 0;
6200
+ other = new SemVer(other, this.options);
6201
+ }
6202
+ if (other.version === this.version) return 0;
6203
+ return this.compareMain(other) || this.comparePre(other);
6204
+ }
6205
+ compareMain(other) {
6206
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
6207
+ if (this.major < other.major) return -1;
6208
+ if (this.major > other.major) return 1;
6209
+ if (this.minor < other.minor) return -1;
6210
+ if (this.minor > other.minor) return 1;
6211
+ if (this.patch < other.patch) return -1;
6212
+ if (this.patch > other.patch) return 1;
6213
+ return 0;
6214
+ }
6215
+ comparePre(other) {
6216
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
6217
+ if (this.prerelease.length && !other.prerelease.length) return -1;
6218
+ else if (!this.prerelease.length && other.prerelease.length) return 1;
6219
+ else if (!this.prerelease.length && !other.prerelease.length) return 0;
6220
+ let i = 0;
6221
+ do {
6222
+ const a = this.prerelease[i];
6223
+ const b = other.prerelease[i];
6224
+ debug("prerelease compare", i, a, b);
6225
+ if (a === void 0 && b === void 0) return 0;
6226
+ else if (b === void 0) return 1;
6227
+ else if (a === void 0) return -1;
6228
+ else if (a === b) continue;
6229
+ else return compareIdentifiers(a, b);
6230
+ } while (++i);
6231
+ }
6232
+ compareBuild(other) {
6233
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
6234
+ let i = 0;
6235
+ do {
6236
+ const a = this.build[i];
6237
+ const b = other.build[i];
6238
+ debug("build compare", i, a, b);
6239
+ if (a === void 0 && b === void 0) return 0;
6240
+ else if (b === void 0) return 1;
6241
+ else if (a === void 0) return -1;
6242
+ else if (a === b) continue;
6243
+ else return compareIdentifiers(a, b);
6244
+ } while (++i);
6245
+ }
6246
+ inc(release, identifier, identifierBase) {
6247
+ if (release.startsWith("pre")) {
6248
+ if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
6249
+ if (identifier) {
6250
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
6251
+ if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
6252
+ }
6253
+ }
6254
+ switch (release) {
6255
+ case "premajor":
6256
+ this.prerelease.length = 0;
6257
+ this.patch = 0;
6258
+ this.minor = 0;
6259
+ this.major++;
6260
+ this.inc("pre", identifier, identifierBase);
6261
+ break;
6262
+ case "preminor":
6263
+ this.prerelease.length = 0;
6264
+ this.patch = 0;
6265
+ this.minor++;
6266
+ this.inc("pre", identifier, identifierBase);
6267
+ break;
6268
+ case "prepatch":
6269
+ this.prerelease.length = 0;
6270
+ this.inc("patch", identifier, identifierBase);
6271
+ this.inc("pre", identifier, identifierBase);
6272
+ break;
6273
+ case "prerelease":
6274
+ if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
6275
+ this.inc("pre", identifier, identifierBase);
6276
+ break;
6277
+ case "release":
6278
+ if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
6279
+ this.prerelease.length = 0;
6280
+ break;
6281
+ case "major":
6282
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
6283
+ this.minor = 0;
6284
+ this.patch = 0;
6285
+ this.prerelease = [];
6286
+ break;
6287
+ case "minor":
6288
+ if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
6289
+ this.patch = 0;
6290
+ this.prerelease = [];
6291
+ break;
6292
+ case "patch":
6293
+ if (this.prerelease.length === 0) this.patch++;
6294
+ this.prerelease = [];
6295
+ break;
6296
+ case "pre": {
6297
+ const base = Number(identifierBase) ? 1 : 0;
6298
+ if (this.prerelease.length === 0) this.prerelease = [base];
6299
+ else {
6300
+ let i = this.prerelease.length;
6301
+ while (--i >= 0) if (typeof this.prerelease[i] === "number") {
6302
+ this.prerelease[i]++;
6303
+ i = -2;
6304
+ }
6305
+ if (i === -1) {
6306
+ if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
6307
+ this.prerelease.push(base);
6308
+ }
6309
+ }
6310
+ if (identifier) {
6311
+ let prerelease = [identifier, base];
6312
+ if (identifierBase === false) prerelease = [identifier];
6313
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
6314
+ if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
6315
+ } else this.prerelease = prerelease;
6316
+ }
6317
+ break;
6318
+ }
6319
+ default: throw new Error(`invalid increment argument: ${release}`);
6320
+ }
6321
+ this.raw = this.format();
6322
+ if (this.build.length) this.raw += `+${this.build.join(".")}`;
6323
+ return this;
6324
+ }
6325
+ };
6326
+ }));
6327
+ //#endregion
6328
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js
6329
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6330
+ const SemVer = require_semver$1();
6331
+ const parse = (version, options, throwErrors = false) => {
6332
+ if (version instanceof SemVer) return version;
6333
+ try {
6334
+ return new SemVer(version, options);
6335
+ } catch (er) {
6336
+ if (!throwErrors) return null;
6337
+ throw er;
6338
+ }
6339
+ };
6340
+ module.exports = parse;
6341
+ }));
6342
+ //#endregion
6343
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js
6344
+ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6345
+ const parse = require_parse();
6346
+ const valid = (version, options) => {
6347
+ const v = parse(version, options);
6348
+ return v ? v.version : null;
6349
+ };
6350
+ module.exports = valid;
6351
+ }));
6352
+ //#endregion
6353
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js
6354
+ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6355
+ const parse = require_parse();
6356
+ const clean = (version, options) => {
6357
+ const s = parse(version.trim().replace(/^[=v]+/, ""), options);
6358
+ return s ? s.version : null;
6359
+ };
6360
+ module.exports = clean;
6361
+ }));
6362
+ //#endregion
6002
6363
  //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js
6003
6364
  var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6004
6365
  const SemVer = require_semver$1();
@@ -6019,7 +6380,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6019
6380
  //#endregion
6020
6381
  //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js
6021
6382
  var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6022
- const parse = require_parse$1();
6383
+ const parse = require_parse();
6023
6384
  const diff = (version1, version2) => {
6024
6385
  const v1 = parse(version1, null, true);
6025
6386
  const v2 = parse(version2, null, true);
@@ -6068,7 +6429,7 @@ var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6068
6429
  //#endregion
6069
6430
  //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js
6070
6431
  var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6071
- const parse = require_parse$1();
6432
+ const parse = require_parse();
6072
6433
  const prerelease = (version, options) => {
6073
6434
  const parsed = parse(version, options);
6074
6435
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
@@ -6199,7 +6560,7 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6199
6560
  //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js
6200
6561
  var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6201
6562
  const SemVer = require_semver$1();
6202
- const parse = require_parse$1();
6563
+ const parse = require_parse();
6203
6564
  const { safeRe: re, t } = require_re();
6204
6565
  const coerce = (version, options) => {
6205
6566
  if (version instanceof SemVer) return version;
@@ -6934,7 +7295,7 @@ var import_semver = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
6934
7295
  const SemVer = require_semver$1();
6935
7296
  const identifiers = require_identifiers();
6936
7297
  module.exports = {
6937
- parse: require_parse$1(),
7298
+ parse: require_parse(),
6938
7299
  valid: require_valid$1(),
6939
7300
  clean: require_clean(),
6940
7301
  inc: require_inc(),