drizzle-kit 0.20.4-5bb2ccb → 0.20.4-7ffdcd8

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/utils.js CHANGED
@@ -1075,7 +1075,7 @@ var require_hanji = __commonJS({
1075
1075
  });
1076
1076
 
1077
1077
  // src/cli/views.ts
1078
- var import_hanji, info, schema, isRenamePromptItem, ResolveColumnSelect, ResolveTableSelect, ResolveSchemasSelect, Spinner, IntrospectProgress;
1078
+ var import_hanji, info, error, schema, isRenamePromptItem, ResolveColumnSelect, ResolveTableSelect, ResolveSchemasSelect, Spinner, IntrospectProgress;
1079
1079
  var init_views = __esm({
1080
1080
  "src/cli/views.ts"() {
1081
1081
  init_source();
@@ -1083,6 +1083,9 @@ var init_views = __esm({
1083
1083
  info = (msg, greyMsg = "") => {
1084
1084
  return `${source_default.blue.bold("Info:")} ${msg} ${greyMsg ? source_default.grey(greyMsg) : ""}`.trim();
1085
1085
  };
1086
+ error = (error2, greyMsg = "") => {
1087
+ return `${source_default.red.bold("Err:")} ${error2} ${greyMsg ? source_default.grey(greyMsg) : ""}`.trim();
1088
+ };
1086
1089
  schema = (schema4) => {
1087
1090
  const tables = Object.values(schema4.tables);
1088
1091
  let msg = source_default.bold(`${tables.length} tables
@@ -1322,14 +1325,14 @@ Is ${source_default.bold.blue(
1322
1325
  this.requestLayout();
1323
1326
  }
1324
1327
  render() {
1325
- let info2 = "";
1328
+ let info3 = "";
1326
1329
  const spin = this.spinner.value();
1327
- info2 += this.statusText(spin, this.state.tables);
1328
- info2 += this.statusText(spin, this.state.columns);
1329
- info2 += this.statusText(spin, this.state.enums);
1330
- info2 += this.statusText(spin, this.state.indexes);
1331
- info2 += this.statusText(spin, this.state.fks);
1332
- return info2;
1330
+ info3 += this.statusText(spin, this.state.tables);
1331
+ info3 += this.statusText(spin, this.state.columns);
1332
+ info3 += this.statusText(spin, this.state.enums);
1333
+ info3 += this.statusText(spin, this.state.indexes);
1334
+ info3 += this.statusText(spin, this.state.fks);
1335
+ return info3;
1333
1336
  }
1334
1337
  };
1335
1338
  }
@@ -8532,13 +8535,13 @@ var require_node2 = __commonJS({
8532
8535
  }
8533
8536
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8534
8537
  try {
8535
- var info2 = gen[key](arg);
8536
- var value = info2.value;
8538
+ var info3 = gen[key](arg);
8539
+ var value = info3.value;
8537
8540
  } catch (error2) {
8538
8541
  reject(error2);
8539
8542
  return;
8540
8543
  }
8541
- if (info2.done) {
8544
+ if (info3.done) {
8542
8545
  resolve(value);
8543
8546
  } else {
8544
8547
  Promise.resolve(value).then(_next, _throw);
@@ -9256,7 +9259,7 @@ var require_node2 = __commonJS({
9256
9259
  return /[0-9A-Fa-f]/.test(c);
9257
9260
  }
9258
9261
  });
9259
- var require_parse3 = __commonJS2((exports2, module22) => {
9262
+ var require_parse4 = __commonJS2((exports2, module22) => {
9260
9263
  "use strict";
9261
9264
  Object.defineProperty(exports2, "__esModule", { value: true });
9262
9265
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
@@ -10339,7 +10342,7 @@ var require_node2 = __commonJS({
10339
10342
  var require_lib32 = __commonJS2((exports2, module22) => {
10340
10343
  "use strict";
10341
10344
  Object.defineProperty(exports2, "__esModule", { value: true });
10342
- var _parse = require_parse3();
10345
+ var _parse = require_parse4();
10343
10346
  var _parse2 = _interopRequireDefault(_parse);
10344
10347
  var _stringify = require_stringify3();
10345
10348
  var _stringify2 = _interopRequireDefault(_stringify);
@@ -13025,6 +13028,7 @@ var init_serializer = __esm({
13025
13028
  import_path = __toESM(require("path"));
13026
13029
  glob = __toESM(require("glob"));
13027
13030
  init_source();
13031
+ init_views();
13028
13032
  sqlToStr = (sql2) => {
13029
13033
  return sql2.toQuery({
13030
13034
  escapeName: () => {
@@ -13075,7 +13079,16 @@ ${filenames.join("\n")}
13075
13079
  });
13076
13080
  return result2;
13077
13081
  }, /* @__PURE__ */ new Set());
13078
- return [...result];
13082
+ const res = [...result];
13083
+ const errors = res.filter((it) => {
13084
+ return !(it.endsWith(".ts") || it.endsWith(".js") || it.endsWith(".cjs") || it.endsWith(".mjs") || it.endsWith(".mts") || it.endsWith(".cts"));
13085
+ });
13086
+ if (res.length === 0) {
13087
+ console.log(error(`No schema files found for path [${path4.join(", ")}]`));
13088
+ console.log(error(`If path represents a file - please make sure to use .ts or other extension in the path`));
13089
+ process.exit(1);
13090
+ }
13091
+ return res;
13079
13092
  };
13080
13093
  }
13081
13094
  });
@@ -18014,7 +18027,7 @@ var init_introspect_pg = __esm({
18014
18027
  const file = importsTs + decalrations;
18015
18028
  const schemaEntry = `
18016
18029
  {
18017
- ${Object.values(schema4.tables).map((it) => withCasing(it.name)).join(",")}
18030
+ ${Object.values(schema4.tables).map((it) => withCasing(it.name, casing)).join(",\n")}
18018
18031
  }
18019
18032
  `;
18020
18033
  return { file, imports: importsTs, decalrations, schemaEntry };
@@ -24768,675 +24781,871 @@ var init_sqliteIntrospect = __esm({
24768
24781
  }
24769
24782
  });
24770
24783
 
24771
- // src/cli/utils.ts
24772
- var init_utils3 = __esm({
24773
- "src/cli/utils.ts"() {
24774
- init_views();
24784
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
24785
+ var require_constants = __commonJS({
24786
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js"(exports, module2) {
24787
+ var SEMVER_SPEC_VERSION = "2.0.0";
24788
+ var MAX_LENGTH = 256;
24789
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
24790
+ 9007199254740991;
24791
+ var MAX_SAFE_COMPONENT_LENGTH = 16;
24792
+ var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
24793
+ var RELEASE_TYPES = [
24794
+ "major",
24795
+ "premajor",
24796
+ "minor",
24797
+ "preminor",
24798
+ "patch",
24799
+ "prepatch",
24800
+ "prerelease"
24801
+ ];
24802
+ module2.exports = {
24803
+ MAX_LENGTH,
24804
+ MAX_SAFE_COMPONENT_LENGTH,
24805
+ MAX_SAFE_BUILD_LENGTH,
24806
+ MAX_SAFE_INTEGER,
24807
+ RELEASE_TYPES,
24808
+ SEMVER_SPEC_VERSION,
24809
+ FLAG_INCLUDE_PRERELEASE: 1,
24810
+ FLAG_LOOSE: 2
24811
+ };
24775
24812
  }
24776
24813
  });
24777
24814
 
24778
- // node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/lib/SqlString.js
24779
- var require_SqlString = __commonJS({
24780
- "node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/lib/SqlString.js"(exports) {
24781
- var SqlString = exports;
24782
- var ID_GLOBAL_REGEXP = /`/g;
24783
- var QUAL_GLOBAL_REGEXP = /\./g;
24784
- var CHARS_GLOBAL_REGEXP = /[\0\b\t\n\r\x1a\"\'\\]/g;
24785
- var CHARS_ESCAPE_MAP = {
24786
- "\0": "\\0",
24787
- "\b": "\\b",
24788
- " ": "\\t",
24789
- "\n": "\\n",
24790
- "\r": "\\r",
24791
- "": "\\Z",
24792
- '"': '\\"',
24793
- "'": "\\'",
24794
- "\\": "\\\\"
24815
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js
24816
+ var require_debug = __commonJS({
24817
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js"(exports, module2) {
24818
+ var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
24795
24819
  };
24796
- SqlString.escapeId = function escapeId(val, forbidQualified) {
24797
- if (Array.isArray(val)) {
24798
- var sql2 = "";
24799
- for (var i = 0; i < val.length; i++) {
24800
- sql2 += (i === 0 ? "" : ", ") + SqlString.escapeId(val[i], forbidQualified);
24801
- }
24802
- return sql2;
24803
- } else if (forbidQualified) {
24804
- return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``") + "`";
24805
- } else {
24806
- return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``").replace(QUAL_GLOBAL_REGEXP, "`.`") + "`";
24820
+ module2.exports = debug;
24821
+ }
24822
+ });
24823
+
24824
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js
24825
+ var require_re = __commonJS({
24826
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js"(exports, module2) {
24827
+ var {
24828
+ MAX_SAFE_COMPONENT_LENGTH,
24829
+ MAX_SAFE_BUILD_LENGTH,
24830
+ MAX_LENGTH
24831
+ } = require_constants();
24832
+ var debug = require_debug();
24833
+ exports = module2.exports = {};
24834
+ var re = exports.re = [];
24835
+ var safeRe = exports.safeRe = [];
24836
+ var src = exports.src = [];
24837
+ var t = exports.t = {};
24838
+ var R = 0;
24839
+ var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
24840
+ var safeRegexReplacements = [
24841
+ ["\\s", 1],
24842
+ ["\\d", MAX_LENGTH],
24843
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
24844
+ ];
24845
+ var makeSafeRegex = (value) => {
24846
+ for (const [token, max] of safeRegexReplacements) {
24847
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
24807
24848
  }
24849
+ return value;
24808
24850
  };
24809
- SqlString.escape = function escape2(val, stringifyObjects, timeZone) {
24810
- if (val === void 0 || val === null) {
24811
- return "NULL";
24851
+ var createToken = (name, value, isGlobal) => {
24852
+ const safe = makeSafeRegex(value);
24853
+ const index4 = R++;
24854
+ debug(name, index4, value);
24855
+ t[name] = index4;
24856
+ src[index4] = value;
24857
+ re[index4] = new RegExp(value, isGlobal ? "g" : void 0);
24858
+ safeRe[index4] = new RegExp(safe, isGlobal ? "g" : void 0);
24859
+ };
24860
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
24861
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
24862
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
24863
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
24864
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
24865
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
24866
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
24867
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
24868
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
24869
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
24870
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
24871
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
24872
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
24873
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
24874
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
24875
+ createToken("GTLT", "((?:<|>)?=?)");
24876
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
24877
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
24878
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
24879
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
24880
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
24881
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
24882
+ createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
24883
+ createToken("COERCERTL", src[t.COERCE], true);
24884
+ createToken("LONETILDE", "(?:~>?)");
24885
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
24886
+ exports.tildeTrimReplace = "$1~";
24887
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
24888
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
24889
+ createToken("LONECARET", "(?:\\^)");
24890
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
24891
+ exports.caretTrimReplace = "$1^";
24892
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
24893
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
24894
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
24895
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
24896
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
24897
+ exports.comparatorTrimReplace = "$1$2$3";
24898
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
24899
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
24900
+ createToken("STAR", "(<|>)?=?\\s*\\*");
24901
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
24902
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
24903
+ }
24904
+ });
24905
+
24906
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js
24907
+ var require_parse_options = __commonJS({
24908
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js"(exports, module2) {
24909
+ var looseOption = Object.freeze({ loose: true });
24910
+ var emptyOpts = Object.freeze({});
24911
+ var parseOptions = (options) => {
24912
+ if (!options) {
24913
+ return emptyOpts;
24914
+ }
24915
+ if (typeof options !== "object") {
24916
+ return looseOption;
24812
24917
  }
24813
- switch (typeof val) {
24814
- case "boolean":
24815
- return val ? "true" : "false";
24816
- case "number":
24817
- return val + "";
24818
- case "object":
24819
- if (Object.prototype.toString.call(val) === "[object Date]") {
24820
- return SqlString.dateToString(val, timeZone || "local");
24821
- } else if (Array.isArray(val)) {
24822
- return SqlString.arrayToList(val, timeZone);
24823
- } else if (Buffer.isBuffer(val)) {
24824
- return SqlString.bufferToString(val);
24825
- } else if (typeof val.toSqlString === "function") {
24826
- return String(val.toSqlString());
24827
- } else if (stringifyObjects) {
24828
- return escapeString(val.toString());
24829
- } else {
24830
- return SqlString.objectToValues(val, timeZone);
24831
- }
24832
- default:
24833
- return escapeString(val);
24918
+ return options;
24919
+ };
24920
+ module2.exports = parseOptions;
24921
+ }
24922
+ });
24923
+
24924
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js
24925
+ var require_identifiers = __commonJS({
24926
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js"(exports, module2) {
24927
+ var numeric = /^[0-9]+$/;
24928
+ var compareIdentifiers = (a, b) => {
24929
+ const anum = numeric.test(a);
24930
+ const bnum = numeric.test(b);
24931
+ if (anum && bnum) {
24932
+ a = +a;
24933
+ b = +b;
24834
24934
  }
24935
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
24835
24936
  };
24836
- SqlString.arrayToList = function arrayToList(array, timeZone) {
24837
- var sql2 = "";
24838
- for (var i = 0; i < array.length; i++) {
24839
- var val = array[i];
24840
- if (Array.isArray(val)) {
24841
- sql2 += (i === 0 ? "" : ", ") + "(" + SqlString.arrayToList(val, timeZone) + ")";
24937
+ var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
24938
+ module2.exports = {
24939
+ compareIdentifiers,
24940
+ rcompareIdentifiers
24941
+ };
24942
+ }
24943
+ });
24944
+
24945
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js
24946
+ var require_semver = __commonJS({
24947
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js"(exports, module2) {
24948
+ var debug = require_debug();
24949
+ var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
24950
+ var { safeRe: re, t } = require_re();
24951
+ var parseOptions = require_parse_options();
24952
+ var { compareIdentifiers } = require_identifiers();
24953
+ var SemVer = class _SemVer {
24954
+ constructor(version, options) {
24955
+ options = parseOptions(options);
24956
+ if (version instanceof _SemVer) {
24957
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
24958
+ return version;
24959
+ } else {
24960
+ version = version.version;
24961
+ }
24962
+ } else if (typeof version !== "string") {
24963
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
24964
+ }
24965
+ if (version.length > MAX_LENGTH) {
24966
+ throw new TypeError(
24967
+ `version is longer than ${MAX_LENGTH} characters`
24968
+ );
24969
+ }
24970
+ debug("SemVer", version, options);
24971
+ this.options = options;
24972
+ this.loose = !!options.loose;
24973
+ this.includePrerelease = !!options.includePrerelease;
24974
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
24975
+ if (!m) {
24976
+ throw new TypeError(`Invalid Version: ${version}`);
24977
+ }
24978
+ this.raw = version;
24979
+ this.major = +m[1];
24980
+ this.minor = +m[2];
24981
+ this.patch = +m[3];
24982
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
24983
+ throw new TypeError("Invalid major version");
24984
+ }
24985
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
24986
+ throw new TypeError("Invalid minor version");
24987
+ }
24988
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
24989
+ throw new TypeError("Invalid patch version");
24990
+ }
24991
+ if (!m[4]) {
24992
+ this.prerelease = [];
24842
24993
  } else {
24843
- sql2 += (i === 0 ? "" : ", ") + SqlString.escape(val, true, timeZone);
24994
+ this.prerelease = m[4].split(".").map((id) => {
24995
+ if (/^[0-9]+$/.test(id)) {
24996
+ const num = +id;
24997
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
24998
+ return num;
24999
+ }
25000
+ }
25001
+ return id;
25002
+ });
24844
25003
  }
25004
+ this.build = m[5] ? m[5].split(".") : [];
25005
+ this.format();
24845
25006
  }
24846
- return sql2;
24847
- };
24848
- SqlString.format = function format(sql2, values, stringifyObjects, timeZone) {
24849
- if (values == null) {
24850
- return sql2;
25007
+ format() {
25008
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
25009
+ if (this.prerelease.length) {
25010
+ this.version += `-${this.prerelease.join(".")}`;
25011
+ }
25012
+ return this.version;
24851
25013
  }
24852
- if (!Array.isArray(values)) {
24853
- values = [values];
25014
+ toString() {
25015
+ return this.version;
24854
25016
  }
24855
- var chunkIndex = 0;
24856
- var placeholdersRegex = /\?+/g;
24857
- var result = "";
24858
- var valuesIndex = 0;
24859
- var match2;
24860
- while (valuesIndex < values.length && (match2 = placeholdersRegex.exec(sql2))) {
24861
- var len = match2[0].length;
24862
- if (len > 2) {
24863
- continue;
25017
+ compare(other) {
25018
+ debug("SemVer.compare", this.version, this.options, other);
25019
+ if (!(other instanceof _SemVer)) {
25020
+ if (typeof other === "string" && other === this.version) {
25021
+ return 0;
25022
+ }
25023
+ other = new _SemVer(other, this.options);
24864
25024
  }
24865
- var value = len === 2 ? SqlString.escapeId(values[valuesIndex]) : SqlString.escape(values[valuesIndex], stringifyObjects, timeZone);
24866
- result += sql2.slice(chunkIndex, match2.index) + value;
24867
- chunkIndex = placeholdersRegex.lastIndex;
24868
- valuesIndex++;
25025
+ if (other.version === this.version) {
25026
+ return 0;
25027
+ }
25028
+ return this.compareMain(other) || this.comparePre(other);
24869
25029
  }
24870
- if (chunkIndex === 0) {
24871
- return sql2;
25030
+ compareMain(other) {
25031
+ if (!(other instanceof _SemVer)) {
25032
+ other = new _SemVer(other, this.options);
25033
+ }
25034
+ return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
24872
25035
  }
24873
- if (chunkIndex < sql2.length) {
24874
- return result + sql2.slice(chunkIndex);
25036
+ comparePre(other) {
25037
+ if (!(other instanceof _SemVer)) {
25038
+ other = new _SemVer(other, this.options);
25039
+ }
25040
+ if (this.prerelease.length && !other.prerelease.length) {
25041
+ return -1;
25042
+ } else if (!this.prerelease.length && other.prerelease.length) {
25043
+ return 1;
25044
+ } else if (!this.prerelease.length && !other.prerelease.length) {
25045
+ return 0;
25046
+ }
25047
+ let i = 0;
25048
+ do {
25049
+ const a = this.prerelease[i];
25050
+ const b = other.prerelease[i];
25051
+ debug("prerelease compare", i, a, b);
25052
+ if (a === void 0 && b === void 0) {
25053
+ return 0;
25054
+ } else if (b === void 0) {
25055
+ return 1;
25056
+ } else if (a === void 0) {
25057
+ return -1;
25058
+ } else if (a === b) {
25059
+ continue;
25060
+ } else {
25061
+ return compareIdentifiers(a, b);
25062
+ }
25063
+ } while (++i);
25064
+ }
25065
+ compareBuild(other) {
25066
+ if (!(other instanceof _SemVer)) {
25067
+ other = new _SemVer(other, this.options);
25068
+ }
25069
+ let i = 0;
25070
+ do {
25071
+ const a = this.build[i];
25072
+ const b = other.build[i];
25073
+ debug("prerelease compare", i, a, b);
25074
+ if (a === void 0 && b === void 0) {
25075
+ return 0;
25076
+ } else if (b === void 0) {
25077
+ return 1;
25078
+ } else if (a === void 0) {
25079
+ return -1;
25080
+ } else if (a === b) {
25081
+ continue;
25082
+ } else {
25083
+ return compareIdentifiers(a, b);
25084
+ }
25085
+ } while (++i);
25086
+ }
25087
+ // preminor will bump the version up to the next minor release, and immediately
25088
+ // down to pre-release. premajor and prepatch work the same way.
25089
+ inc(release, identifier, identifierBase) {
25090
+ switch (release) {
25091
+ case "premajor":
25092
+ this.prerelease.length = 0;
25093
+ this.patch = 0;
25094
+ this.minor = 0;
25095
+ this.major++;
25096
+ this.inc("pre", identifier, identifierBase);
25097
+ break;
25098
+ case "preminor":
25099
+ this.prerelease.length = 0;
25100
+ this.patch = 0;
25101
+ this.minor++;
25102
+ this.inc("pre", identifier, identifierBase);
25103
+ break;
25104
+ case "prepatch":
25105
+ this.prerelease.length = 0;
25106
+ this.inc("patch", identifier, identifierBase);
25107
+ this.inc("pre", identifier, identifierBase);
25108
+ break;
25109
+ case "prerelease":
25110
+ if (this.prerelease.length === 0) {
25111
+ this.inc("patch", identifier, identifierBase);
25112
+ }
25113
+ this.inc("pre", identifier, identifierBase);
25114
+ break;
25115
+ case "major":
25116
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
25117
+ this.major++;
25118
+ }
25119
+ this.minor = 0;
25120
+ this.patch = 0;
25121
+ this.prerelease = [];
25122
+ break;
25123
+ case "minor":
25124
+ if (this.patch !== 0 || this.prerelease.length === 0) {
25125
+ this.minor++;
25126
+ }
25127
+ this.patch = 0;
25128
+ this.prerelease = [];
25129
+ break;
25130
+ case "patch":
25131
+ if (this.prerelease.length === 0) {
25132
+ this.patch++;
25133
+ }
25134
+ this.prerelease = [];
25135
+ break;
25136
+ case "pre": {
25137
+ const base = Number(identifierBase) ? 1 : 0;
25138
+ if (!identifier && identifierBase === false) {
25139
+ throw new Error("invalid increment argument: identifier is empty");
25140
+ }
25141
+ if (this.prerelease.length === 0) {
25142
+ this.prerelease = [base];
25143
+ } else {
25144
+ let i = this.prerelease.length;
25145
+ while (--i >= 0) {
25146
+ if (typeof this.prerelease[i] === "number") {
25147
+ this.prerelease[i]++;
25148
+ i = -2;
25149
+ }
25150
+ }
25151
+ if (i === -1) {
25152
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
25153
+ throw new Error("invalid increment argument: identifier already exists");
25154
+ }
25155
+ this.prerelease.push(base);
25156
+ }
25157
+ }
25158
+ if (identifier) {
25159
+ let prerelease = [identifier, base];
25160
+ if (identifierBase === false) {
25161
+ prerelease = [identifier];
25162
+ }
25163
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
25164
+ if (isNaN(this.prerelease[1])) {
25165
+ this.prerelease = prerelease;
25166
+ }
25167
+ } else {
25168
+ this.prerelease = prerelease;
25169
+ }
25170
+ }
25171
+ break;
25172
+ }
25173
+ default:
25174
+ throw new Error(`invalid increment argument: ${release}`);
25175
+ }
25176
+ this.raw = this.format();
25177
+ if (this.build.length) {
25178
+ this.raw += `+${this.build.join(".")}`;
25179
+ }
25180
+ return this;
24875
25181
  }
24876
- return result;
24877
25182
  };
24878
- SqlString.dateToString = function dateToString(date, timeZone) {
24879
- var dt = new Date(date);
24880
- if (isNaN(dt.getTime())) {
24881
- return "NULL";
25183
+ module2.exports = SemVer;
25184
+ }
25185
+ });
25186
+
25187
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js
25188
+ var require_parse = __commonJS({
25189
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js"(exports, module2) {
25190
+ var SemVer = require_semver();
25191
+ var parse = (version, options, throwErrors = false) => {
25192
+ if (version instanceof SemVer) {
25193
+ return version;
24882
25194
  }
24883
- var year;
24884
- var month;
24885
- var day;
24886
- var hour;
24887
- var minute;
24888
- var second;
24889
- var millisecond;
24890
- if (timeZone === "local") {
24891
- year = dt.getFullYear();
24892
- month = dt.getMonth() + 1;
24893
- day = dt.getDate();
24894
- hour = dt.getHours();
24895
- minute = dt.getMinutes();
24896
- second = dt.getSeconds();
24897
- millisecond = dt.getMilliseconds();
24898
- } else {
24899
- var tz = convertTimezone(timeZone);
24900
- if (tz !== false && tz !== 0) {
24901
- dt.setTime(dt.getTime() + tz * 6e4);
25195
+ try {
25196
+ return new SemVer(version, options);
25197
+ } catch (er) {
25198
+ if (!throwErrors) {
25199
+ return null;
24902
25200
  }
24903
- year = dt.getUTCFullYear();
24904
- month = dt.getUTCMonth() + 1;
24905
- day = dt.getUTCDate();
24906
- hour = dt.getUTCHours();
24907
- minute = dt.getUTCMinutes();
24908
- second = dt.getUTCSeconds();
24909
- millisecond = dt.getUTCMilliseconds();
25201
+ throw er;
24910
25202
  }
24911
- var str = zeroPad(year, 4) + "-" + zeroPad(month, 2) + "-" + zeroPad(day, 2) + " " + zeroPad(hour, 2) + ":" + zeroPad(minute, 2) + ":" + zeroPad(second, 2) + "." + zeroPad(millisecond, 3);
24912
- return escapeString(str);
24913
25203
  };
24914
- SqlString.bufferToString = function bufferToString(buffer) {
24915
- return "X" + escapeString(buffer.toString("hex"));
25204
+ module2.exports = parse;
25205
+ }
25206
+ });
25207
+
25208
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js
25209
+ var require_valid = __commonJS({
25210
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js"(exports, module2) {
25211
+ var parse = require_parse();
25212
+ var valid = (version, options) => {
25213
+ const v = parse(version, options);
25214
+ return v ? v.version : null;
24916
25215
  };
24917
- SqlString.objectToValues = function objectToValues(object, timeZone) {
24918
- var sql2 = "";
24919
- for (var key in object) {
24920
- var val = object[key];
24921
- if (typeof val === "function") {
24922
- continue;
24923
- }
24924
- sql2 += (sql2.length === 0 ? "" : ", ") + SqlString.escapeId(key) + " = " + SqlString.escape(val, true, timeZone);
25216
+ module2.exports = valid;
25217
+ }
25218
+ });
25219
+
25220
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js
25221
+ var require_clean = __commonJS({
25222
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js"(exports, module2) {
25223
+ var parse = require_parse();
25224
+ var clean = (version, options) => {
25225
+ const s = parse(version.trim().replace(/^[=v]+/, ""), options);
25226
+ return s ? s.version : null;
25227
+ };
25228
+ module2.exports = clean;
25229
+ }
25230
+ });
25231
+
25232
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js
25233
+ var require_inc = __commonJS({
25234
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js"(exports, module2) {
25235
+ var SemVer = require_semver();
25236
+ var inc = (version, release, options, identifier, identifierBase) => {
25237
+ if (typeof options === "string") {
25238
+ identifierBase = identifier;
25239
+ identifier = options;
25240
+ options = void 0;
25241
+ }
25242
+ try {
25243
+ return new SemVer(
25244
+ version instanceof SemVer ? version.version : version,
25245
+ options
25246
+ ).inc(release, identifier, identifierBase).version;
25247
+ } catch (er) {
25248
+ return null;
24925
25249
  }
24926
- return sql2;
24927
25250
  };
24928
- SqlString.raw = function raw(sql2) {
24929
- if (typeof sql2 !== "string") {
24930
- throw new TypeError("argument sql must be a string");
25251
+ module2.exports = inc;
25252
+ }
25253
+ });
25254
+
25255
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js
25256
+ var require_diff = __commonJS({
25257
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js"(exports, module2) {
25258
+ var parse = require_parse();
25259
+ var diff2 = (version1, version2) => {
25260
+ const v1 = parse(version1, null, true);
25261
+ const v2 = parse(version2, null, true);
25262
+ const comparison = v1.compare(v2);
25263
+ if (comparison === 0) {
25264
+ return null;
24931
25265
  }
24932
- return {
24933
- toSqlString: function toSqlString() {
24934
- return sql2;
25266
+ const v1Higher = comparison > 0;
25267
+ const highVersion = v1Higher ? v1 : v2;
25268
+ const lowVersion = v1Higher ? v2 : v1;
25269
+ const highHasPre = !!highVersion.prerelease.length;
25270
+ const lowHasPre = !!lowVersion.prerelease.length;
25271
+ if (lowHasPre && !highHasPre) {
25272
+ if (!lowVersion.patch && !lowVersion.minor) {
25273
+ return "major";
24935
25274
  }
24936
- };
25275
+ if (highVersion.patch) {
25276
+ return "patch";
25277
+ }
25278
+ if (highVersion.minor) {
25279
+ return "minor";
25280
+ }
25281
+ return "major";
25282
+ }
25283
+ const prefix = highHasPre ? "pre" : "";
25284
+ if (v1.major !== v2.major) {
25285
+ return prefix + "major";
25286
+ }
25287
+ if (v1.minor !== v2.minor) {
25288
+ return prefix + "minor";
25289
+ }
25290
+ if (v1.patch !== v2.patch) {
25291
+ return prefix + "patch";
25292
+ }
25293
+ return "prerelease";
24937
25294
  };
24938
- function escapeString(val) {
24939
- var chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex = 0;
24940
- var escapedVal = "";
24941
- var match2;
24942
- while (match2 = CHARS_GLOBAL_REGEXP.exec(val)) {
24943
- escapedVal += val.slice(chunkIndex, match2.index) + CHARS_ESCAPE_MAP[match2[0]];
24944
- chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex;
25295
+ module2.exports = diff2;
25296
+ }
25297
+ });
25298
+
25299
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js
25300
+ var require_major = __commonJS({
25301
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js"(exports, module2) {
25302
+ var SemVer = require_semver();
25303
+ var major = (a, loose) => new SemVer(a, loose).major;
25304
+ module2.exports = major;
25305
+ }
25306
+ });
25307
+
25308
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js
25309
+ var require_minor = __commonJS({
25310
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js"(exports, module2) {
25311
+ var SemVer = require_semver();
25312
+ var minor = (a, loose) => new SemVer(a, loose).minor;
25313
+ module2.exports = minor;
25314
+ }
25315
+ });
25316
+
25317
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js
25318
+ var require_patch = __commonJS({
25319
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js"(exports, module2) {
25320
+ var SemVer = require_semver();
25321
+ var patch = (a, loose) => new SemVer(a, loose).patch;
25322
+ module2.exports = patch;
25323
+ }
25324
+ });
25325
+
25326
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js
25327
+ var require_prerelease = __commonJS({
25328
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js"(exports, module2) {
25329
+ var parse = require_parse();
25330
+ var prerelease = (version, options) => {
25331
+ const parsed = parse(version, options);
25332
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
25333
+ };
25334
+ module2.exports = prerelease;
25335
+ }
25336
+ });
25337
+
25338
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js
25339
+ var require_compare = __commonJS({
25340
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js"(exports, module2) {
25341
+ var SemVer = require_semver();
25342
+ var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
25343
+ module2.exports = compare;
25344
+ }
25345
+ });
25346
+
25347
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js
25348
+ var require_rcompare = __commonJS({
25349
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js"(exports, module2) {
25350
+ var compare = require_compare();
25351
+ var rcompare = (a, b, loose) => compare(b, a, loose);
25352
+ module2.exports = rcompare;
25353
+ }
25354
+ });
25355
+
25356
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js
25357
+ var require_compare_loose = __commonJS({
25358
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js"(exports, module2) {
25359
+ var compare = require_compare();
25360
+ var compareLoose = (a, b) => compare(a, b, true);
25361
+ module2.exports = compareLoose;
25362
+ }
25363
+ });
25364
+
25365
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js
25366
+ var require_compare_build = __commonJS({
25367
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js"(exports, module2) {
25368
+ var SemVer = require_semver();
25369
+ var compareBuild = (a, b, loose) => {
25370
+ const versionA = new SemVer(a, loose);
25371
+ const versionB = new SemVer(b, loose);
25372
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
25373
+ };
25374
+ module2.exports = compareBuild;
25375
+ }
25376
+ });
25377
+
25378
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js
25379
+ var require_sort = __commonJS({
25380
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js"(exports, module2) {
25381
+ var compareBuild = require_compare_build();
25382
+ var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
25383
+ module2.exports = sort;
25384
+ }
25385
+ });
25386
+
25387
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js
25388
+ var require_rsort = __commonJS({
25389
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js"(exports, module2) {
25390
+ var compareBuild = require_compare_build();
25391
+ var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
25392
+ module2.exports = rsort;
25393
+ }
25394
+ });
25395
+
25396
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js
25397
+ var require_gt = __commonJS({
25398
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js"(exports, module2) {
25399
+ var compare = require_compare();
25400
+ var gt = (a, b, loose) => compare(a, b, loose) > 0;
25401
+ module2.exports = gt;
25402
+ }
25403
+ });
25404
+
25405
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js
25406
+ var require_lt = __commonJS({
25407
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js"(exports, module2) {
25408
+ var compare = require_compare();
25409
+ var lt = (a, b, loose) => compare(a, b, loose) < 0;
25410
+ module2.exports = lt;
25411
+ }
25412
+ });
25413
+
25414
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js
25415
+ var require_eq = __commonJS({
25416
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js"(exports, module2) {
25417
+ var compare = require_compare();
25418
+ var eq = (a, b, loose) => compare(a, b, loose) === 0;
25419
+ module2.exports = eq;
25420
+ }
25421
+ });
25422
+
25423
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js
25424
+ var require_neq = __commonJS({
25425
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js"(exports, module2) {
25426
+ var compare = require_compare();
25427
+ var neq = (a, b, loose) => compare(a, b, loose) !== 0;
25428
+ module2.exports = neq;
25429
+ }
25430
+ });
25431
+
25432
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js
25433
+ var require_gte = __commonJS({
25434
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js"(exports, module2) {
25435
+ var compare = require_compare();
25436
+ var gte = (a, b, loose) => compare(a, b, loose) >= 0;
25437
+ module2.exports = gte;
25438
+ }
25439
+ });
25440
+
25441
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js
25442
+ var require_lte = __commonJS({
25443
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js"(exports, module2) {
25444
+ var compare = require_compare();
25445
+ var lte = (a, b, loose) => compare(a, b, loose) <= 0;
25446
+ module2.exports = lte;
25447
+ }
25448
+ });
25449
+
25450
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js
25451
+ var require_cmp = __commonJS({
25452
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js"(exports, module2) {
25453
+ var eq = require_eq();
25454
+ var neq = require_neq();
25455
+ var gt = require_gt();
25456
+ var gte = require_gte();
25457
+ var lt = require_lt();
25458
+ var lte = require_lte();
25459
+ var cmp = (a, op, b, loose) => {
25460
+ switch (op) {
25461
+ case "===":
25462
+ if (typeof a === "object") {
25463
+ a = a.version;
25464
+ }
25465
+ if (typeof b === "object") {
25466
+ b = b.version;
25467
+ }
25468
+ return a === b;
25469
+ case "!==":
25470
+ if (typeof a === "object") {
25471
+ a = a.version;
25472
+ }
25473
+ if (typeof b === "object") {
25474
+ b = b.version;
25475
+ }
25476
+ return a !== b;
25477
+ case "":
25478
+ case "=":
25479
+ case "==":
25480
+ return eq(a, b, loose);
25481
+ case "!=":
25482
+ return neq(a, b, loose);
25483
+ case ">":
25484
+ return gt(a, b, loose);
25485
+ case ">=":
25486
+ return gte(a, b, loose);
25487
+ case "<":
25488
+ return lt(a, b, loose);
25489
+ case "<=":
25490
+ return lte(a, b, loose);
25491
+ default:
25492
+ throw new TypeError(`Invalid operator: ${op}`);
24945
25493
  }
24946
- if (chunkIndex === 0) {
24947
- return "'" + val + "'";
25494
+ };
25495
+ module2.exports = cmp;
25496
+ }
25497
+ });
25498
+
25499
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js
25500
+ var require_coerce = __commonJS({
25501
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js"(exports, module2) {
25502
+ var SemVer = require_semver();
25503
+ var parse = require_parse();
25504
+ var { safeRe: re, t } = require_re();
25505
+ var coerce2 = (version, options) => {
25506
+ if (version instanceof SemVer) {
25507
+ return version;
24948
25508
  }
24949
- if (chunkIndex < val.length) {
24950
- return "'" + escapedVal + val.slice(chunkIndex) + "'";
25509
+ if (typeof version === "number") {
25510
+ version = String(version);
24951
25511
  }
24952
- return "'" + escapedVal + "'";
24953
- }
24954
- function zeroPad(number, length) {
24955
- number = number.toString();
24956
- while (number.length < length) {
24957
- number = "0" + number;
25512
+ if (typeof version !== "string") {
25513
+ return null;
24958
25514
  }
24959
- return number;
24960
- }
24961
- function convertTimezone(tz) {
24962
- if (tz === "Z") {
24963
- return 0;
25515
+ options = options || {};
25516
+ let match2 = null;
25517
+ if (!options.rtl) {
25518
+ match2 = version.match(re[t.COERCE]);
25519
+ } else {
25520
+ let next;
25521
+ while ((next = re[t.COERCERTL].exec(version)) && (!match2 || match2.index + match2[0].length !== version.length)) {
25522
+ if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) {
25523
+ match2 = next;
25524
+ }
25525
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
25526
+ }
25527
+ re[t.COERCERTL].lastIndex = -1;
24964
25528
  }
24965
- var m = tz.match(/([\+\-\s])(\d\d):?(\d\d)?/);
24966
- if (m) {
24967
- return (m[1] === "-" ? -1 : 1) * (parseInt(m[2], 10) + (m[3] ? parseInt(m[3], 10) : 0) / 60) * 60;
25529
+ if (match2 === null) {
25530
+ return null;
24968
25531
  }
24969
- return false;
24970
- }
25532
+ return parse(`${match2[2]}.${match2[3] || "0"}.${match2[4] || "0"}`, options);
25533
+ };
25534
+ module2.exports = coerce2;
24971
25535
  }
24972
25536
  });
24973
25537
 
24974
- // node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js
24975
- var require_sqlstring = __commonJS({
24976
- "node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js"(exports, module2) {
24977
- module2.exports = require_SqlString();
25538
+ // node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js
25539
+ var require_iterator = __commonJS({
25540
+ "node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports, module2) {
25541
+ "use strict";
25542
+ module2.exports = function(Yallist) {
25543
+ Yallist.prototype[Symbol.iterator] = function* () {
25544
+ for (let walker = this.head; walker; walker = walker.next) {
25545
+ yield walker.value;
25546
+ }
25547
+ };
25548
+ };
24978
25549
  }
24979
25550
  });
24980
25551
 
24981
- // node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js
24982
- var require_denque = __commonJS({
24983
- "node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js"(exports, module2) {
25552
+ // node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js
25553
+ var require_yallist = __commonJS({
25554
+ "node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports, module2) {
24984
25555
  "use strict";
24985
- function Denque(array, options) {
24986
- var options = options || {};
24987
- this._capacity = options.capacity;
24988
- this._head = 0;
24989
- this._tail = 0;
24990
- if (Array.isArray(array)) {
24991
- this._fromArray(array);
24992
- } else {
24993
- this._capacityMask = 3;
24994
- this._list = new Array(4);
25556
+ module2.exports = Yallist;
25557
+ Yallist.Node = Node;
25558
+ Yallist.create = Yallist;
25559
+ function Yallist(list) {
25560
+ var self2 = this;
25561
+ if (!(self2 instanceof Yallist)) {
25562
+ self2 = new Yallist();
25563
+ }
25564
+ self2.tail = null;
25565
+ self2.head = null;
25566
+ self2.length = 0;
25567
+ if (list && typeof list.forEach === "function") {
25568
+ list.forEach(function(item) {
25569
+ self2.push(item);
25570
+ });
25571
+ } else if (arguments.length > 0) {
25572
+ for (var i = 0, l = arguments.length; i < l; i++) {
25573
+ self2.push(arguments[i]);
25574
+ }
24995
25575
  }
25576
+ return self2;
24996
25577
  }
24997
- Denque.prototype.peekAt = function peekAt(index4) {
24998
- var i = index4;
24999
- if (i !== (i | 0)) {
25000
- return void 0;
25578
+ Yallist.prototype.removeNode = function(node) {
25579
+ if (node.list !== this) {
25580
+ throw new Error("removing node which does not belong to this list");
25001
25581
  }
25002
- var len = this.size();
25003
- if (i >= len || i < -len)
25004
- return void 0;
25005
- if (i < 0)
25006
- i += len;
25007
- i = this._head + i & this._capacityMask;
25008
- return this._list[i];
25009
- };
25010
- Denque.prototype.get = function get(i) {
25011
- return this.peekAt(i);
25582
+ var next = node.next;
25583
+ var prev = node.prev;
25584
+ if (next) {
25585
+ next.prev = prev;
25586
+ }
25587
+ if (prev) {
25588
+ prev.next = next;
25589
+ }
25590
+ if (node === this.head) {
25591
+ this.head = next;
25592
+ }
25593
+ if (node === this.tail) {
25594
+ this.tail = prev;
25595
+ }
25596
+ node.list.length--;
25597
+ node.next = null;
25598
+ node.prev = null;
25599
+ node.list = null;
25600
+ return next;
25012
25601
  };
25013
- Denque.prototype.peek = function peek() {
25014
- if (this._head === this._tail)
25015
- return void 0;
25016
- return this._list[this._head];
25602
+ Yallist.prototype.unshiftNode = function(node) {
25603
+ if (node === this.head) {
25604
+ return;
25605
+ }
25606
+ if (node.list) {
25607
+ node.list.removeNode(node);
25608
+ }
25609
+ var head = this.head;
25610
+ node.list = this;
25611
+ node.next = head;
25612
+ if (head) {
25613
+ head.prev = node;
25614
+ }
25615
+ this.head = node;
25616
+ if (!this.tail) {
25617
+ this.tail = node;
25618
+ }
25619
+ this.length++;
25017
25620
  };
25018
- Denque.prototype.peekFront = function peekFront() {
25019
- return this.peek();
25621
+ Yallist.prototype.pushNode = function(node) {
25622
+ if (node === this.tail) {
25623
+ return;
25624
+ }
25625
+ if (node.list) {
25626
+ node.list.removeNode(node);
25627
+ }
25628
+ var tail = this.tail;
25629
+ node.list = this;
25630
+ node.prev = tail;
25631
+ if (tail) {
25632
+ tail.next = node;
25633
+ }
25634
+ this.tail = node;
25635
+ if (!this.head) {
25636
+ this.head = node;
25637
+ }
25638
+ this.length++;
25020
25639
  };
25021
- Denque.prototype.peekBack = function peekBack() {
25022
- return this.peekAt(-1);
25640
+ Yallist.prototype.push = function() {
25641
+ for (var i = 0, l = arguments.length; i < l; i++) {
25642
+ push(this, arguments[i]);
25643
+ }
25644
+ return this.length;
25023
25645
  };
25024
- Object.defineProperty(Denque.prototype, "length", {
25025
- get: function length() {
25026
- return this.size();
25027
- }
25028
- });
25029
- Denque.prototype.size = function size() {
25030
- if (this._head === this._tail)
25031
- return 0;
25032
- if (this._head < this._tail)
25033
- return this._tail - this._head;
25034
- else
25035
- return this._capacityMask + 1 - (this._head - this._tail);
25036
- };
25037
- Denque.prototype.unshift = function unshift(item) {
25038
- if (arguments.length === 0)
25039
- return this.size();
25040
- var len = this._list.length;
25041
- this._head = this._head - 1 + len & this._capacityMask;
25042
- this._list[this._head] = item;
25043
- if (this._tail === this._head)
25044
- this._growArray();
25045
- if (this._capacity && this.size() > this._capacity)
25046
- this.pop();
25047
- if (this._head < this._tail)
25048
- return this._tail - this._head;
25049
- else
25050
- return this._capacityMask + 1 - (this._head - this._tail);
25051
- };
25052
- Denque.prototype.shift = function shift() {
25053
- var head = this._head;
25054
- if (head === this._tail)
25055
- return void 0;
25056
- var item = this._list[head];
25057
- this._list[head] = void 0;
25058
- this._head = head + 1 & this._capacityMask;
25059
- if (head < 2 && this._tail > 1e4 && this._tail <= this._list.length >>> 2)
25060
- this._shrinkArray();
25061
- return item;
25062
- };
25063
- Denque.prototype.push = function push(item) {
25064
- if (arguments.length === 0)
25065
- return this.size();
25066
- var tail = this._tail;
25067
- this._list[tail] = item;
25068
- this._tail = tail + 1 & this._capacityMask;
25069
- if (this._tail === this._head) {
25070
- this._growArray();
25071
- }
25072
- if (this._capacity && this.size() > this._capacity) {
25073
- this.shift();
25074
- }
25075
- if (this._head < this._tail)
25076
- return this._tail - this._head;
25077
- else
25078
- return this._capacityMask + 1 - (this._head - this._tail);
25079
- };
25080
- Denque.prototype.pop = function pop() {
25081
- var tail = this._tail;
25082
- if (tail === this._head)
25083
- return void 0;
25084
- var len = this._list.length;
25085
- this._tail = tail - 1 + len & this._capacityMask;
25086
- var item = this._list[this._tail];
25087
- this._list[this._tail] = void 0;
25088
- if (this._head < 2 && tail > 1e4 && tail <= len >>> 2)
25089
- this._shrinkArray();
25090
- return item;
25091
- };
25092
- Denque.prototype.removeOne = function removeOne(index4) {
25093
- var i = index4;
25094
- if (i !== (i | 0)) {
25095
- return void 0;
25096
- }
25097
- if (this._head === this._tail)
25098
- return void 0;
25099
- var size = this.size();
25100
- var len = this._list.length;
25101
- if (i >= size || i < -size)
25102
- return void 0;
25103
- if (i < 0)
25104
- i += size;
25105
- i = this._head + i & this._capacityMask;
25106
- var item = this._list[i];
25107
- var k;
25108
- if (index4 < size / 2) {
25109
- for (k = index4; k > 0; k--) {
25110
- this._list[i] = this._list[i = i - 1 + len & this._capacityMask];
25111
- }
25112
- this._list[i] = void 0;
25113
- this._head = this._head + 1 + len & this._capacityMask;
25114
- } else {
25115
- for (k = size - 1 - index4; k > 0; k--) {
25116
- this._list[i] = this._list[i = i + 1 + len & this._capacityMask];
25117
- }
25118
- this._list[i] = void 0;
25119
- this._tail = this._tail - 1 + len & this._capacityMask;
25120
- }
25121
- return item;
25122
- };
25123
- Denque.prototype.remove = function remove(index4, count) {
25124
- var i = index4;
25125
- var removed;
25126
- var del_count = count;
25127
- if (i !== (i | 0)) {
25128
- return void 0;
25129
- }
25130
- if (this._head === this._tail)
25131
- return void 0;
25132
- var size = this.size();
25133
- var len = this._list.length;
25134
- if (i >= size || i < -size || count < 1)
25135
- return void 0;
25136
- if (i < 0)
25137
- i += size;
25138
- if (count === 1 || !count) {
25139
- removed = new Array(1);
25140
- removed[0] = this.removeOne(i);
25141
- return removed;
25142
- }
25143
- if (i === 0 && i + count >= size) {
25144
- removed = this.toArray();
25145
- this.clear();
25146
- return removed;
25147
- }
25148
- if (i + count > size)
25149
- count = size - i;
25150
- var k;
25151
- removed = new Array(count);
25152
- for (k = 0; k < count; k++) {
25153
- removed[k] = this._list[this._head + i + k & this._capacityMask];
25154
- }
25155
- i = this._head + i & this._capacityMask;
25156
- if (index4 + count === size) {
25157
- this._tail = this._tail - count + len & this._capacityMask;
25158
- for (k = count; k > 0; k--) {
25159
- this._list[i = i + 1 + len & this._capacityMask] = void 0;
25160
- }
25161
- return removed;
25162
- }
25163
- if (index4 === 0) {
25164
- this._head = this._head + count + len & this._capacityMask;
25165
- for (k = count - 1; k > 0; k--) {
25166
- this._list[i = i + 1 + len & this._capacityMask] = void 0;
25167
- }
25168
- return removed;
25169
- }
25170
- if (i < size / 2) {
25171
- this._head = this._head + index4 + count + len & this._capacityMask;
25172
- for (k = index4; k > 0; k--) {
25173
- this.unshift(this._list[i = i - 1 + len & this._capacityMask]);
25174
- }
25175
- i = this._head - 1 + len & this._capacityMask;
25176
- while (del_count > 0) {
25177
- this._list[i = i - 1 + len & this._capacityMask] = void 0;
25178
- del_count--;
25179
- }
25180
- if (index4 < 0)
25181
- this._tail = i;
25182
- } else {
25183
- this._tail = i;
25184
- i = i + count + len & this._capacityMask;
25185
- for (k = size - (count + index4); k > 0; k--) {
25186
- this.push(this._list[i++]);
25187
- }
25188
- i = this._tail;
25189
- while (del_count > 0) {
25190
- this._list[i = i + 1 + len & this._capacityMask] = void 0;
25191
- del_count--;
25192
- }
25193
- }
25194
- if (this._head < 2 && this._tail > 1e4 && this._tail <= len >>> 2)
25195
- this._shrinkArray();
25196
- return removed;
25197
- };
25198
- Denque.prototype.splice = function splice(index4, count) {
25199
- var i = index4;
25200
- if (i !== (i | 0)) {
25201
- return void 0;
25202
- }
25203
- var size = this.size();
25204
- if (i < 0)
25205
- i += size;
25206
- if (i > size)
25207
- return void 0;
25208
- if (arguments.length > 2) {
25209
- var k;
25210
- var temp;
25211
- var removed;
25212
- var arg_len = arguments.length;
25213
- var len = this._list.length;
25214
- var arguments_index = 2;
25215
- if (!size || i < size / 2) {
25216
- temp = new Array(i);
25217
- for (k = 0; k < i; k++) {
25218
- temp[k] = this._list[this._head + k & this._capacityMask];
25219
- }
25220
- if (count === 0) {
25221
- removed = [];
25222
- if (i > 0) {
25223
- this._head = this._head + i + len & this._capacityMask;
25224
- }
25225
- } else {
25226
- removed = this.remove(i, count);
25227
- this._head = this._head + i + len & this._capacityMask;
25228
- }
25229
- while (arg_len > arguments_index) {
25230
- this.unshift(arguments[--arg_len]);
25231
- }
25232
- for (k = i; k > 0; k--) {
25233
- this.unshift(temp[k - 1]);
25234
- }
25235
- } else {
25236
- temp = new Array(size - (i + count));
25237
- var leng = temp.length;
25238
- for (k = 0; k < leng; k++) {
25239
- temp[k] = this._list[this._head + i + count + k & this._capacityMask];
25240
- }
25241
- if (count === 0) {
25242
- removed = [];
25243
- if (i != size) {
25244
- this._tail = this._head + i + len & this._capacityMask;
25245
- }
25246
- } else {
25247
- removed = this.remove(i, count);
25248
- this._tail = this._tail - leng + len & this._capacityMask;
25249
- }
25250
- while (arguments_index < arg_len) {
25251
- this.push(arguments[arguments_index++]);
25252
- }
25253
- for (k = 0; k < leng; k++) {
25254
- this.push(temp[k]);
25255
- }
25256
- }
25257
- return removed;
25258
- } else {
25259
- return this.remove(i, count);
25260
- }
25261
- };
25262
- Denque.prototype.clear = function clear() {
25263
- this._list = new Array(this._list.length);
25264
- this._head = 0;
25265
- this._tail = 0;
25266
- };
25267
- Denque.prototype.isEmpty = function isEmpty() {
25268
- return this._head === this._tail;
25269
- };
25270
- Denque.prototype.toArray = function toArray() {
25271
- return this._copyArray(false);
25272
- };
25273
- Denque.prototype._fromArray = function _fromArray(array) {
25274
- var length = array.length;
25275
- var capacity = this._nextPowerOf2(length);
25276
- this._list = new Array(capacity);
25277
- this._capacityMask = capacity - 1;
25278
- this._tail = length;
25279
- for (var i = 0; i < length; i++)
25280
- this._list[i] = array[i];
25281
- };
25282
- Denque.prototype._copyArray = function _copyArray(fullCopy, size) {
25283
- var src = this._list;
25284
- var capacity = src.length;
25285
- var length = this.length;
25286
- size = size | length;
25287
- if (size == length && this._head < this._tail) {
25288
- return this._list.slice(this._head, this._tail);
25289
- }
25290
- var dest = new Array(size);
25291
- var k = 0;
25292
- var i;
25293
- if (fullCopy || this._head > this._tail) {
25294
- for (i = this._head; i < capacity; i++)
25295
- dest[k++] = src[i];
25296
- for (i = 0; i < this._tail; i++)
25297
- dest[k++] = src[i];
25298
- } else {
25299
- for (i = this._head; i < this._tail; i++)
25300
- dest[k++] = src[i];
25301
- }
25302
- return dest;
25303
- };
25304
- Denque.prototype._growArray = function _growArray() {
25305
- if (this._head != 0) {
25306
- var newList = this._copyArray(true, this._list.length << 1);
25307
- this._tail = this._list.length;
25308
- this._head = 0;
25309
- this._list = newList;
25310
- } else {
25311
- this._tail = this._list.length;
25312
- this._list.length <<= 1;
25313
- }
25314
- this._capacityMask = this._capacityMask << 1 | 1;
25315
- };
25316
- Denque.prototype._shrinkArray = function _shrinkArray() {
25317
- this._list.length >>>= 1;
25318
- this._capacityMask >>>= 1;
25319
- };
25320
- Denque.prototype._nextPowerOf2 = function _nextPowerOf2(num) {
25321
- var log2 = Math.log(num) / Math.log(2);
25322
- var nextPow2 = 1 << log2 + 1;
25323
- return Math.max(nextPow2, 4);
25324
- };
25325
- module2.exports = Denque;
25326
- }
25327
- });
25328
-
25329
- // node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js
25330
- var require_iterator = __commonJS({
25331
- "node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports, module2) {
25332
- "use strict";
25333
- module2.exports = function(Yallist) {
25334
- Yallist.prototype[Symbol.iterator] = function* () {
25335
- for (let walker = this.head; walker; walker = walker.next) {
25336
- yield walker.value;
25337
- }
25338
- };
25339
- };
25340
- }
25341
- });
25342
-
25343
- // node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js
25344
- var require_yallist = __commonJS({
25345
- "node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports, module2) {
25346
- "use strict";
25347
- module2.exports = Yallist;
25348
- Yallist.Node = Node;
25349
- Yallist.create = Yallist;
25350
- function Yallist(list) {
25351
- var self2 = this;
25352
- if (!(self2 instanceof Yallist)) {
25353
- self2 = new Yallist();
25354
- }
25355
- self2.tail = null;
25356
- self2.head = null;
25357
- self2.length = 0;
25358
- if (list && typeof list.forEach === "function") {
25359
- list.forEach(function(item) {
25360
- self2.push(item);
25361
- });
25362
- } else if (arguments.length > 0) {
25363
- for (var i = 0, l = arguments.length; i < l; i++) {
25364
- self2.push(arguments[i]);
25365
- }
25366
- }
25367
- return self2;
25368
- }
25369
- Yallist.prototype.removeNode = function(node) {
25370
- if (node.list !== this) {
25371
- throw new Error("removing node which does not belong to this list");
25372
- }
25373
- var next = node.next;
25374
- var prev = node.prev;
25375
- if (next) {
25376
- next.prev = prev;
25377
- }
25378
- if (prev) {
25379
- prev.next = next;
25380
- }
25381
- if (node === this.head) {
25382
- this.head = next;
25383
- }
25384
- if (node === this.tail) {
25385
- this.tail = prev;
25386
- }
25387
- node.list.length--;
25388
- node.next = null;
25389
- node.prev = null;
25390
- node.list = null;
25391
- return next;
25392
- };
25393
- Yallist.prototype.unshiftNode = function(node) {
25394
- if (node === this.head) {
25395
- return;
25396
- }
25397
- if (node.list) {
25398
- node.list.removeNode(node);
25399
- }
25400
- var head = this.head;
25401
- node.list = this;
25402
- node.next = head;
25403
- if (head) {
25404
- head.prev = node;
25405
- }
25406
- this.head = node;
25407
- if (!this.tail) {
25408
- this.tail = node;
25409
- }
25410
- this.length++;
25411
- };
25412
- Yallist.prototype.pushNode = function(node) {
25413
- if (node === this.tail) {
25414
- return;
25415
- }
25416
- if (node.list) {
25417
- node.list.removeNode(node);
25418
- }
25419
- var tail = this.tail;
25420
- node.list = this;
25421
- node.prev = tail;
25422
- if (tail) {
25423
- tail.next = node;
25424
- }
25425
- this.tail = node;
25426
- if (!this.head) {
25427
- this.head = node;
25428
- }
25429
- this.length++;
25430
- };
25431
- Yallist.prototype.push = function() {
25432
- for (var i = 0, l = arguments.length; i < l; i++) {
25433
- push(this, arguments[i]);
25434
- }
25435
- return this.length;
25436
- };
25437
- Yallist.prototype.unshift = function() {
25438
- for (var i = 0, l = arguments.length; i < l; i++) {
25439
- unshift(this, arguments[i]);
25646
+ Yallist.prototype.unshift = function() {
25647
+ for (var i = 0, l = arguments.length; i < l; i++) {
25648
+ unshift(this, arguments[i]);
25440
25649
  }
25441
25650
  return this.length;
25442
25651
  };
@@ -25787,195 +25996,1780 @@ var require_lru_cache = __commonJS({
25787
25996
  get lengthCalculator() {
25788
25997
  return this[LENGTH_CALCULATOR];
25789
25998
  }
25790
- get length() {
25791
- return this[LENGTH];
25999
+ get length() {
26000
+ return this[LENGTH];
26001
+ }
26002
+ get itemCount() {
26003
+ return this[LRU_LIST].length;
26004
+ }
26005
+ rforEach(fn, thisp) {
26006
+ thisp = thisp || this;
26007
+ for (let walker = this[LRU_LIST].tail; walker !== null; ) {
26008
+ const prev = walker.prev;
26009
+ forEachStep(this, fn, walker, thisp);
26010
+ walker = prev;
26011
+ }
26012
+ }
26013
+ forEach(fn, thisp) {
26014
+ thisp = thisp || this;
26015
+ for (let walker = this[LRU_LIST].head; walker !== null; ) {
26016
+ const next = walker.next;
26017
+ forEachStep(this, fn, walker, thisp);
26018
+ walker = next;
26019
+ }
26020
+ }
26021
+ keys() {
26022
+ return this[LRU_LIST].toArray().map((k) => k.key);
26023
+ }
26024
+ values() {
26025
+ return this[LRU_LIST].toArray().map((k) => k.value);
26026
+ }
26027
+ reset() {
26028
+ if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
26029
+ this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
26030
+ }
26031
+ this[CACHE] = /* @__PURE__ */ new Map();
26032
+ this[LRU_LIST] = new Yallist();
26033
+ this[LENGTH] = 0;
26034
+ }
26035
+ dump() {
26036
+ return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
26037
+ k: hit.key,
26038
+ v: hit.value,
26039
+ e: hit.now + (hit.maxAge || 0)
26040
+ }).toArray().filter((h) => h);
26041
+ }
26042
+ dumpLru() {
26043
+ return this[LRU_LIST];
26044
+ }
26045
+ set(key, value, maxAge) {
26046
+ maxAge = maxAge || this[MAX_AGE];
26047
+ if (maxAge && typeof maxAge !== "number")
26048
+ throw new TypeError("maxAge must be a number");
26049
+ const now = maxAge ? Date.now() : 0;
26050
+ const len = this[LENGTH_CALCULATOR](value, key);
26051
+ if (this[CACHE].has(key)) {
26052
+ if (len > this[MAX]) {
26053
+ del(this, this[CACHE].get(key));
26054
+ return false;
26055
+ }
26056
+ const node = this[CACHE].get(key);
26057
+ const item = node.value;
26058
+ if (this[DISPOSE]) {
26059
+ if (!this[NO_DISPOSE_ON_SET])
26060
+ this[DISPOSE](key, item.value);
26061
+ }
26062
+ item.now = now;
26063
+ item.maxAge = maxAge;
26064
+ item.value = value;
26065
+ this[LENGTH] += len - item.length;
26066
+ item.length = len;
26067
+ this.get(key);
26068
+ trim(this);
26069
+ return true;
26070
+ }
26071
+ const hit = new Entry(key, value, len, now, maxAge);
26072
+ if (hit.length > this[MAX]) {
26073
+ if (this[DISPOSE])
26074
+ this[DISPOSE](key, value);
26075
+ return false;
26076
+ }
26077
+ this[LENGTH] += hit.length;
26078
+ this[LRU_LIST].unshift(hit);
26079
+ this[CACHE].set(key, this[LRU_LIST].head);
26080
+ trim(this);
26081
+ return true;
26082
+ }
26083
+ has(key) {
26084
+ if (!this[CACHE].has(key))
26085
+ return false;
26086
+ const hit = this[CACHE].get(key).value;
26087
+ return !isStale(this, hit);
26088
+ }
26089
+ get(key) {
26090
+ return get(this, key, true);
26091
+ }
26092
+ peek(key) {
26093
+ return get(this, key, false);
26094
+ }
26095
+ pop() {
26096
+ const node = this[LRU_LIST].tail;
26097
+ if (!node)
26098
+ return null;
26099
+ del(this, node);
26100
+ return node.value;
26101
+ }
26102
+ del(key) {
26103
+ del(this, this[CACHE].get(key));
26104
+ }
26105
+ load(arr) {
26106
+ this.reset();
26107
+ const now = Date.now();
26108
+ for (let l = arr.length - 1; l >= 0; l--) {
26109
+ const hit = arr[l];
26110
+ const expiresAt = hit.e || 0;
26111
+ if (expiresAt === 0)
26112
+ this.set(hit.k, hit.v);
26113
+ else {
26114
+ const maxAge = expiresAt - now;
26115
+ if (maxAge > 0) {
26116
+ this.set(hit.k, hit.v, maxAge);
26117
+ }
26118
+ }
26119
+ }
26120
+ }
26121
+ prune() {
26122
+ this[CACHE].forEach((value, key) => get(this, key, false));
26123
+ }
26124
+ };
26125
+ var get = (self2, key, doUse) => {
26126
+ const node = self2[CACHE].get(key);
26127
+ if (node) {
26128
+ const hit = node.value;
26129
+ if (isStale(self2, hit)) {
26130
+ del(self2, node);
26131
+ if (!self2[ALLOW_STALE])
26132
+ return void 0;
26133
+ } else {
26134
+ if (doUse) {
26135
+ if (self2[UPDATE_AGE_ON_GET])
26136
+ node.value.now = Date.now();
26137
+ self2[LRU_LIST].unshiftNode(node);
26138
+ }
26139
+ }
26140
+ return hit.value;
26141
+ }
26142
+ };
26143
+ var isStale = (self2, hit) => {
26144
+ if (!hit || !hit.maxAge && !self2[MAX_AGE])
26145
+ return false;
26146
+ const diff2 = Date.now() - hit.now;
26147
+ return hit.maxAge ? diff2 > hit.maxAge : self2[MAX_AGE] && diff2 > self2[MAX_AGE];
26148
+ };
26149
+ var trim = (self2) => {
26150
+ if (self2[LENGTH] > self2[MAX]) {
26151
+ for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
26152
+ const prev = walker.prev;
26153
+ del(self2, walker);
26154
+ walker = prev;
26155
+ }
26156
+ }
26157
+ };
26158
+ var del = (self2, node) => {
26159
+ if (node) {
26160
+ const hit = node.value;
26161
+ if (self2[DISPOSE])
26162
+ self2[DISPOSE](hit.key, hit.value);
26163
+ self2[LENGTH] -= hit.length;
26164
+ self2[CACHE].delete(hit.key);
26165
+ self2[LRU_LIST].removeNode(node);
26166
+ }
26167
+ };
26168
+ var Entry = class {
26169
+ constructor(key, value, length, now, maxAge) {
26170
+ this.key = key;
26171
+ this.value = value;
26172
+ this.length = length;
26173
+ this.now = now;
26174
+ this.maxAge = maxAge || 0;
26175
+ }
26176
+ };
26177
+ var forEachStep = (self2, fn, node, thisp) => {
26178
+ let hit = node.value;
26179
+ if (isStale(self2, hit)) {
26180
+ del(self2, node);
26181
+ if (!self2[ALLOW_STALE])
26182
+ hit = void 0;
26183
+ }
26184
+ if (hit)
26185
+ fn.call(thisp, hit.value, hit.key, self2);
26186
+ };
26187
+ module2.exports = LRUCache;
26188
+ }
26189
+ });
26190
+
26191
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js
26192
+ var require_range = __commonJS({
26193
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js"(exports, module2) {
26194
+ var Range = class _Range {
26195
+ constructor(range, options) {
26196
+ options = parseOptions(options);
26197
+ if (range instanceof _Range) {
26198
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
26199
+ return range;
26200
+ } else {
26201
+ return new _Range(range.raw, options);
26202
+ }
26203
+ }
26204
+ if (range instanceof Comparator) {
26205
+ this.raw = range.value;
26206
+ this.set = [[range]];
26207
+ this.format();
26208
+ return this;
26209
+ }
26210
+ this.options = options;
26211
+ this.loose = !!options.loose;
26212
+ this.includePrerelease = !!options.includePrerelease;
26213
+ this.raw = range.trim().split(/\s+/).join(" ");
26214
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
26215
+ if (!this.set.length) {
26216
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
26217
+ }
26218
+ if (this.set.length > 1) {
26219
+ const first = this.set[0];
26220
+ this.set = this.set.filter((c) => !isNullSet(c[0]));
26221
+ if (this.set.length === 0) {
26222
+ this.set = [first];
26223
+ } else if (this.set.length > 1) {
26224
+ for (const c of this.set) {
26225
+ if (c.length === 1 && isAny(c[0])) {
26226
+ this.set = [c];
26227
+ break;
26228
+ }
26229
+ }
26230
+ }
26231
+ }
26232
+ this.format();
26233
+ }
26234
+ format() {
26235
+ this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
26236
+ return this.range;
26237
+ }
26238
+ toString() {
26239
+ return this.range;
26240
+ }
26241
+ parseRange(range) {
26242
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
26243
+ const memoKey = memoOpts + ":" + range;
26244
+ const cached = cache.get(memoKey);
26245
+ if (cached) {
26246
+ return cached;
26247
+ }
26248
+ const loose = this.options.loose;
26249
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
26250
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
26251
+ debug("hyphen replace", range);
26252
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
26253
+ debug("comparator trim", range);
26254
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
26255
+ debug("tilde trim", range);
26256
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
26257
+ debug("caret trim", range);
26258
+ let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
26259
+ if (loose) {
26260
+ rangeList = rangeList.filter((comp) => {
26261
+ debug("loose invalid filter", comp, this.options);
26262
+ return !!comp.match(re[t.COMPARATORLOOSE]);
26263
+ });
26264
+ }
26265
+ debug("range list", rangeList);
26266
+ const rangeMap = /* @__PURE__ */ new Map();
26267
+ const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
26268
+ for (const comp of comparators) {
26269
+ if (isNullSet(comp)) {
26270
+ return [comp];
26271
+ }
26272
+ rangeMap.set(comp.value, comp);
26273
+ }
26274
+ if (rangeMap.size > 1 && rangeMap.has("")) {
26275
+ rangeMap.delete("");
26276
+ }
26277
+ const result = [...rangeMap.values()];
26278
+ cache.set(memoKey, result);
26279
+ return result;
26280
+ }
26281
+ intersects(range, options) {
26282
+ if (!(range instanceof _Range)) {
26283
+ throw new TypeError("a Range is required");
26284
+ }
26285
+ return this.set.some((thisComparators) => {
26286
+ return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
26287
+ return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
26288
+ return rangeComparators.every((rangeComparator) => {
26289
+ return thisComparator.intersects(rangeComparator, options);
26290
+ });
26291
+ });
26292
+ });
26293
+ });
26294
+ }
26295
+ // if ANY of the sets match ALL of its comparators, then pass
26296
+ test(version) {
26297
+ if (!version) {
26298
+ return false;
26299
+ }
26300
+ if (typeof version === "string") {
26301
+ try {
26302
+ version = new SemVer(version, this.options);
26303
+ } catch (er) {
26304
+ return false;
26305
+ }
26306
+ }
26307
+ for (let i = 0; i < this.set.length; i++) {
26308
+ if (testSet(this.set[i], version, this.options)) {
26309
+ return true;
26310
+ }
26311
+ }
26312
+ return false;
26313
+ }
26314
+ };
26315
+ module2.exports = Range;
26316
+ var LRU = require_lru_cache();
26317
+ var cache = new LRU({ max: 1e3 });
26318
+ var parseOptions = require_parse_options();
26319
+ var Comparator = require_comparator();
26320
+ var debug = require_debug();
26321
+ var SemVer = require_semver();
26322
+ var {
26323
+ safeRe: re,
26324
+ t,
26325
+ comparatorTrimReplace,
26326
+ tildeTrimReplace,
26327
+ caretTrimReplace
26328
+ } = require_re();
26329
+ var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
26330
+ var isNullSet = (c) => c.value === "<0.0.0-0";
26331
+ var isAny = (c) => c.value === "";
26332
+ var isSatisfiable = (comparators, options) => {
26333
+ let result = true;
26334
+ const remainingComparators = comparators.slice();
26335
+ let testComparator = remainingComparators.pop();
26336
+ while (result && remainingComparators.length) {
26337
+ result = remainingComparators.every((otherComparator) => {
26338
+ return testComparator.intersects(otherComparator, options);
26339
+ });
26340
+ testComparator = remainingComparators.pop();
26341
+ }
26342
+ return result;
26343
+ };
26344
+ var parseComparator = (comp, options) => {
26345
+ debug("comp", comp, options);
26346
+ comp = replaceCarets(comp, options);
26347
+ debug("caret", comp);
26348
+ comp = replaceTildes(comp, options);
26349
+ debug("tildes", comp);
26350
+ comp = replaceXRanges(comp, options);
26351
+ debug("xrange", comp);
26352
+ comp = replaceStars(comp, options);
26353
+ debug("stars", comp);
26354
+ return comp;
26355
+ };
26356
+ var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
26357
+ var replaceTildes = (comp, options) => {
26358
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
26359
+ };
26360
+ var replaceTilde = (comp, options) => {
26361
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
26362
+ return comp.replace(r, (_, M, m, p, pr) => {
26363
+ debug("tilde", comp, _, M, m, p, pr);
26364
+ let ret;
26365
+ if (isX(M)) {
26366
+ ret = "";
26367
+ } else if (isX(m)) {
26368
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
26369
+ } else if (isX(p)) {
26370
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
26371
+ } else if (pr) {
26372
+ debug("replaceTilde pr", pr);
26373
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
26374
+ } else {
26375
+ ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
26376
+ }
26377
+ debug("tilde return", ret);
26378
+ return ret;
26379
+ });
26380
+ };
26381
+ var replaceCarets = (comp, options) => {
26382
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
26383
+ };
26384
+ var replaceCaret = (comp, options) => {
26385
+ debug("caret", comp, options);
26386
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
26387
+ const z2 = options.includePrerelease ? "-0" : "";
26388
+ return comp.replace(r, (_, M, m, p, pr) => {
26389
+ debug("caret", comp, _, M, m, p, pr);
26390
+ let ret;
26391
+ if (isX(M)) {
26392
+ ret = "";
26393
+ } else if (isX(m)) {
26394
+ ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
26395
+ } else if (isX(p)) {
26396
+ if (M === "0") {
26397
+ ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`;
26398
+ } else {
26399
+ ret = `>=${M}.${m}.0${z2} <${+M + 1}.0.0-0`;
26400
+ }
26401
+ } else if (pr) {
26402
+ debug("replaceCaret pr", pr);
26403
+ if (M === "0") {
26404
+ if (m === "0") {
26405
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
26406
+ } else {
26407
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
26408
+ }
26409
+ } else {
26410
+ ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
26411
+ }
26412
+ } else {
26413
+ debug("no pr");
26414
+ if (M === "0") {
26415
+ if (m === "0") {
26416
+ ret = `>=${M}.${m}.${p}${z2} <${M}.${m}.${+p + 1}-0`;
26417
+ } else {
26418
+ ret = `>=${M}.${m}.${p}${z2} <${M}.${+m + 1}.0-0`;
26419
+ }
26420
+ } else {
26421
+ ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
26422
+ }
26423
+ }
26424
+ debug("caret return", ret);
26425
+ return ret;
26426
+ });
26427
+ };
26428
+ var replaceXRanges = (comp, options) => {
26429
+ debug("replaceXRanges", comp, options);
26430
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
26431
+ };
26432
+ var replaceXRange = (comp, options) => {
26433
+ comp = comp.trim();
26434
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
26435
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
26436
+ debug("xRange", comp, ret, gtlt, M, m, p, pr);
26437
+ const xM = isX(M);
26438
+ const xm = xM || isX(m);
26439
+ const xp = xm || isX(p);
26440
+ const anyX = xp;
26441
+ if (gtlt === "=" && anyX) {
26442
+ gtlt = "";
26443
+ }
26444
+ pr = options.includePrerelease ? "-0" : "";
26445
+ if (xM) {
26446
+ if (gtlt === ">" || gtlt === "<") {
26447
+ ret = "<0.0.0-0";
26448
+ } else {
26449
+ ret = "*";
26450
+ }
26451
+ } else if (gtlt && anyX) {
26452
+ if (xm) {
26453
+ m = 0;
26454
+ }
26455
+ p = 0;
26456
+ if (gtlt === ">") {
26457
+ gtlt = ">=";
26458
+ if (xm) {
26459
+ M = +M + 1;
26460
+ m = 0;
26461
+ p = 0;
26462
+ } else {
26463
+ m = +m + 1;
26464
+ p = 0;
26465
+ }
26466
+ } else if (gtlt === "<=") {
26467
+ gtlt = "<";
26468
+ if (xm) {
26469
+ M = +M + 1;
26470
+ } else {
26471
+ m = +m + 1;
26472
+ }
26473
+ }
26474
+ if (gtlt === "<") {
26475
+ pr = "-0";
26476
+ }
26477
+ ret = `${gtlt + M}.${m}.${p}${pr}`;
26478
+ } else if (xm) {
26479
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
26480
+ } else if (xp) {
26481
+ ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
26482
+ }
26483
+ debug("xRange return", ret);
26484
+ return ret;
26485
+ });
26486
+ };
26487
+ var replaceStars = (comp, options) => {
26488
+ debug("replaceStars", comp, options);
26489
+ return comp.trim().replace(re[t.STAR], "");
26490
+ };
26491
+ var replaceGTE0 = (comp, options) => {
26492
+ debug("replaceGTE0", comp, options);
26493
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
26494
+ };
26495
+ var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
26496
+ if (isX(fM)) {
26497
+ from = "";
26498
+ } else if (isX(fm)) {
26499
+ from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
26500
+ } else if (isX(fp)) {
26501
+ from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
26502
+ } else if (fpr) {
26503
+ from = `>=${from}`;
26504
+ } else {
26505
+ from = `>=${from}${incPr ? "-0" : ""}`;
26506
+ }
26507
+ if (isX(tM)) {
26508
+ to = "";
26509
+ } else if (isX(tm)) {
26510
+ to = `<${+tM + 1}.0.0-0`;
26511
+ } else if (isX(tp)) {
26512
+ to = `<${tM}.${+tm + 1}.0-0`;
26513
+ } else if (tpr) {
26514
+ to = `<=${tM}.${tm}.${tp}-${tpr}`;
26515
+ } else if (incPr) {
26516
+ to = `<${tM}.${tm}.${+tp + 1}-0`;
26517
+ } else {
26518
+ to = `<=${to}`;
26519
+ }
26520
+ return `${from} ${to}`.trim();
26521
+ };
26522
+ var testSet = (set, version, options) => {
26523
+ for (let i = 0; i < set.length; i++) {
26524
+ if (!set[i].test(version)) {
26525
+ return false;
26526
+ }
26527
+ }
26528
+ if (version.prerelease.length && !options.includePrerelease) {
26529
+ for (let i = 0; i < set.length; i++) {
26530
+ debug(set[i].semver);
26531
+ if (set[i].semver === Comparator.ANY) {
26532
+ continue;
26533
+ }
26534
+ if (set[i].semver.prerelease.length > 0) {
26535
+ const allowed = set[i].semver;
26536
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
26537
+ return true;
26538
+ }
26539
+ }
26540
+ }
26541
+ return false;
26542
+ }
26543
+ return true;
26544
+ };
26545
+ }
26546
+ });
26547
+
26548
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js
26549
+ var require_comparator = __commonJS({
26550
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js"(exports, module2) {
26551
+ var ANY = Symbol("SemVer ANY");
26552
+ var Comparator = class _Comparator {
26553
+ static get ANY() {
26554
+ return ANY;
26555
+ }
26556
+ constructor(comp, options) {
26557
+ options = parseOptions(options);
26558
+ if (comp instanceof _Comparator) {
26559
+ if (comp.loose === !!options.loose) {
26560
+ return comp;
26561
+ } else {
26562
+ comp = comp.value;
26563
+ }
26564
+ }
26565
+ comp = comp.trim().split(/\s+/).join(" ");
26566
+ debug("comparator", comp, options);
26567
+ this.options = options;
26568
+ this.loose = !!options.loose;
26569
+ this.parse(comp);
26570
+ if (this.semver === ANY) {
26571
+ this.value = "";
26572
+ } else {
26573
+ this.value = this.operator + this.semver.version;
26574
+ }
26575
+ debug("comp", this);
26576
+ }
26577
+ parse(comp) {
26578
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
26579
+ const m = comp.match(r);
26580
+ if (!m) {
26581
+ throw new TypeError(`Invalid comparator: ${comp}`);
26582
+ }
26583
+ this.operator = m[1] !== void 0 ? m[1] : "";
26584
+ if (this.operator === "=") {
26585
+ this.operator = "";
26586
+ }
26587
+ if (!m[2]) {
26588
+ this.semver = ANY;
26589
+ } else {
26590
+ this.semver = new SemVer(m[2], this.options.loose);
26591
+ }
26592
+ }
26593
+ toString() {
26594
+ return this.value;
26595
+ }
26596
+ test(version) {
26597
+ debug("Comparator.test", version, this.options.loose);
26598
+ if (this.semver === ANY || version === ANY) {
26599
+ return true;
26600
+ }
26601
+ if (typeof version === "string") {
26602
+ try {
26603
+ version = new SemVer(version, this.options);
26604
+ } catch (er) {
26605
+ return false;
26606
+ }
26607
+ }
26608
+ return cmp(version, this.operator, this.semver, this.options);
26609
+ }
26610
+ intersects(comp, options) {
26611
+ if (!(comp instanceof _Comparator)) {
26612
+ throw new TypeError("a Comparator is required");
26613
+ }
26614
+ if (this.operator === "") {
26615
+ if (this.value === "") {
26616
+ return true;
26617
+ }
26618
+ return new Range(comp.value, options).test(this.value);
26619
+ } else if (comp.operator === "") {
26620
+ if (comp.value === "") {
26621
+ return true;
26622
+ }
26623
+ return new Range(this.value, options).test(comp.semver);
26624
+ }
26625
+ options = parseOptions(options);
26626
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
26627
+ return false;
26628
+ }
26629
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
26630
+ return false;
26631
+ }
26632
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
26633
+ return true;
26634
+ }
26635
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
26636
+ return true;
26637
+ }
26638
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
26639
+ return true;
26640
+ }
26641
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
26642
+ return true;
26643
+ }
26644
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
26645
+ return true;
26646
+ }
26647
+ return false;
26648
+ }
26649
+ };
26650
+ module2.exports = Comparator;
26651
+ var parseOptions = require_parse_options();
26652
+ var { safeRe: re, t } = require_re();
26653
+ var cmp = require_cmp();
26654
+ var debug = require_debug();
26655
+ var SemVer = require_semver();
26656
+ var Range = require_range();
26657
+ }
26658
+ });
26659
+
26660
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js
26661
+ var require_satisfies = __commonJS({
26662
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js"(exports, module2) {
26663
+ var Range = require_range();
26664
+ var satisfies = (version, range, options) => {
26665
+ try {
26666
+ range = new Range(range, options);
26667
+ } catch (er) {
26668
+ return false;
26669
+ }
26670
+ return range.test(version);
26671
+ };
26672
+ module2.exports = satisfies;
26673
+ }
26674
+ });
26675
+
26676
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js
26677
+ var require_to_comparators = __commonJS({
26678
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js"(exports, module2) {
26679
+ var Range = require_range();
26680
+ var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
26681
+ module2.exports = toComparators;
26682
+ }
26683
+ });
26684
+
26685
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js
26686
+ var require_max_satisfying = __commonJS({
26687
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
26688
+ var SemVer = require_semver();
26689
+ var Range = require_range();
26690
+ var maxSatisfying = (versions, range, options) => {
26691
+ let max = null;
26692
+ let maxSV = null;
26693
+ let rangeObj = null;
26694
+ try {
26695
+ rangeObj = new Range(range, options);
26696
+ } catch (er) {
26697
+ return null;
26698
+ }
26699
+ versions.forEach((v) => {
26700
+ if (rangeObj.test(v)) {
26701
+ if (!max || maxSV.compare(v) === -1) {
26702
+ max = v;
26703
+ maxSV = new SemVer(max, options);
26704
+ }
26705
+ }
26706
+ });
26707
+ return max;
26708
+ };
26709
+ module2.exports = maxSatisfying;
26710
+ }
26711
+ });
26712
+
26713
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js
26714
+ var require_min_satisfying = __commonJS({
26715
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
26716
+ var SemVer = require_semver();
26717
+ var Range = require_range();
26718
+ var minSatisfying = (versions, range, options) => {
26719
+ let min = null;
26720
+ let minSV = null;
26721
+ let rangeObj = null;
26722
+ try {
26723
+ rangeObj = new Range(range, options);
26724
+ } catch (er) {
26725
+ return null;
26726
+ }
26727
+ versions.forEach((v) => {
26728
+ if (rangeObj.test(v)) {
26729
+ if (!min || minSV.compare(v) === 1) {
26730
+ min = v;
26731
+ minSV = new SemVer(min, options);
26732
+ }
26733
+ }
26734
+ });
26735
+ return min;
26736
+ };
26737
+ module2.exports = minSatisfying;
26738
+ }
26739
+ });
26740
+
26741
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js
26742
+ var require_min_version = __commonJS({
26743
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js"(exports, module2) {
26744
+ var SemVer = require_semver();
26745
+ var Range = require_range();
26746
+ var gt = require_gt();
26747
+ var minVersion = (range, loose) => {
26748
+ range = new Range(range, loose);
26749
+ let minver = new SemVer("0.0.0");
26750
+ if (range.test(minver)) {
26751
+ return minver;
26752
+ }
26753
+ minver = new SemVer("0.0.0-0");
26754
+ if (range.test(minver)) {
26755
+ return minver;
26756
+ }
26757
+ minver = null;
26758
+ for (let i = 0; i < range.set.length; ++i) {
26759
+ const comparators = range.set[i];
26760
+ let setMin = null;
26761
+ comparators.forEach((comparator) => {
26762
+ const compver = new SemVer(comparator.semver.version);
26763
+ switch (comparator.operator) {
26764
+ case ">":
26765
+ if (compver.prerelease.length === 0) {
26766
+ compver.patch++;
26767
+ } else {
26768
+ compver.prerelease.push(0);
26769
+ }
26770
+ compver.raw = compver.format();
26771
+ case "":
26772
+ case ">=":
26773
+ if (!setMin || gt(compver, setMin)) {
26774
+ setMin = compver;
26775
+ }
26776
+ break;
26777
+ case "<":
26778
+ case "<=":
26779
+ break;
26780
+ default:
26781
+ throw new Error(`Unexpected operation: ${comparator.operator}`);
26782
+ }
26783
+ });
26784
+ if (setMin && (!minver || gt(minver, setMin))) {
26785
+ minver = setMin;
26786
+ }
26787
+ }
26788
+ if (minver && range.test(minver)) {
26789
+ return minver;
26790
+ }
26791
+ return null;
26792
+ };
26793
+ module2.exports = minVersion;
26794
+ }
26795
+ });
26796
+
26797
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js
26798
+ var require_valid2 = __commonJS({
26799
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js"(exports, module2) {
26800
+ var Range = require_range();
26801
+ var validRange = (range, options) => {
26802
+ try {
26803
+ return new Range(range, options).range || "*";
26804
+ } catch (er) {
26805
+ return null;
26806
+ }
26807
+ };
26808
+ module2.exports = validRange;
26809
+ }
26810
+ });
26811
+
26812
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js
26813
+ var require_outside = __commonJS({
26814
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js"(exports, module2) {
26815
+ var SemVer = require_semver();
26816
+ var Comparator = require_comparator();
26817
+ var { ANY } = Comparator;
26818
+ var Range = require_range();
26819
+ var satisfies = require_satisfies();
26820
+ var gt = require_gt();
26821
+ var lt = require_lt();
26822
+ var lte = require_lte();
26823
+ var gte = require_gte();
26824
+ var outside = (version, range, hilo, options) => {
26825
+ version = new SemVer(version, options);
26826
+ range = new Range(range, options);
26827
+ let gtfn, ltefn, ltfn, comp, ecomp;
26828
+ switch (hilo) {
26829
+ case ">":
26830
+ gtfn = gt;
26831
+ ltefn = lte;
26832
+ ltfn = lt;
26833
+ comp = ">";
26834
+ ecomp = ">=";
26835
+ break;
26836
+ case "<":
26837
+ gtfn = lt;
26838
+ ltefn = gte;
26839
+ ltfn = gt;
26840
+ comp = "<";
26841
+ ecomp = "<=";
26842
+ break;
26843
+ default:
26844
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
26845
+ }
26846
+ if (satisfies(version, range, options)) {
26847
+ return false;
26848
+ }
26849
+ for (let i = 0; i < range.set.length; ++i) {
26850
+ const comparators = range.set[i];
26851
+ let high = null;
26852
+ let low = null;
26853
+ comparators.forEach((comparator) => {
26854
+ if (comparator.semver === ANY) {
26855
+ comparator = new Comparator(">=0.0.0");
26856
+ }
26857
+ high = high || comparator;
26858
+ low = low || comparator;
26859
+ if (gtfn(comparator.semver, high.semver, options)) {
26860
+ high = comparator;
26861
+ } else if (ltfn(comparator.semver, low.semver, options)) {
26862
+ low = comparator;
26863
+ }
26864
+ });
26865
+ if (high.operator === comp || high.operator === ecomp) {
26866
+ return false;
26867
+ }
26868
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
26869
+ return false;
26870
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
26871
+ return false;
26872
+ }
26873
+ }
26874
+ return true;
26875
+ };
26876
+ module2.exports = outside;
26877
+ }
26878
+ });
26879
+
26880
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js
26881
+ var require_gtr = __commonJS({
26882
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js"(exports, module2) {
26883
+ var outside = require_outside();
26884
+ var gtr = (version, range, options) => outside(version, range, ">", options);
26885
+ module2.exports = gtr;
26886
+ }
26887
+ });
26888
+
26889
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js
26890
+ var require_ltr = __commonJS({
26891
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js"(exports, module2) {
26892
+ var outside = require_outside();
26893
+ var ltr = (version, range, options) => outside(version, range, "<", options);
26894
+ module2.exports = ltr;
26895
+ }
26896
+ });
26897
+
26898
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js
26899
+ var require_intersects = __commonJS({
26900
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js"(exports, module2) {
26901
+ var Range = require_range();
26902
+ var intersects = (r1, r2, options) => {
26903
+ r1 = new Range(r1, options);
26904
+ r2 = new Range(r2, options);
26905
+ return r1.intersects(r2, options);
26906
+ };
26907
+ module2.exports = intersects;
26908
+ }
26909
+ });
26910
+
26911
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js
26912
+ var require_simplify = __commonJS({
26913
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js"(exports, module2) {
26914
+ var satisfies = require_satisfies();
26915
+ var compare = require_compare();
26916
+ module2.exports = (versions, range, options) => {
26917
+ const set = [];
26918
+ let first = null;
26919
+ let prev = null;
26920
+ const v = versions.sort((a, b) => compare(a, b, options));
26921
+ for (const version of v) {
26922
+ const included = satisfies(version, range, options);
26923
+ if (included) {
26924
+ prev = version;
26925
+ if (!first) {
26926
+ first = version;
26927
+ }
26928
+ } else {
26929
+ if (prev) {
26930
+ set.push([first, prev]);
26931
+ }
26932
+ prev = null;
26933
+ first = null;
26934
+ }
26935
+ }
26936
+ if (first) {
26937
+ set.push([first, null]);
26938
+ }
26939
+ const ranges = [];
26940
+ for (const [min, max] of set) {
26941
+ if (min === max) {
26942
+ ranges.push(min);
26943
+ } else if (!max && min === v[0]) {
26944
+ ranges.push("*");
26945
+ } else if (!max) {
26946
+ ranges.push(`>=${min}`);
26947
+ } else if (min === v[0]) {
26948
+ ranges.push(`<=${max}`);
26949
+ } else {
26950
+ ranges.push(`${min} - ${max}`);
26951
+ }
26952
+ }
26953
+ const simplified = ranges.join(" || ");
26954
+ const original = typeof range.raw === "string" ? range.raw : String(range);
26955
+ return simplified.length < original.length ? simplified : range;
26956
+ };
26957
+ }
26958
+ });
26959
+
26960
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js
26961
+ var require_subset = __commonJS({
26962
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js"(exports, module2) {
26963
+ var Range = require_range();
26964
+ var Comparator = require_comparator();
26965
+ var { ANY } = Comparator;
26966
+ var satisfies = require_satisfies();
26967
+ var compare = require_compare();
26968
+ var subset = (sub, dom, options = {}) => {
26969
+ if (sub === dom) {
26970
+ return true;
26971
+ }
26972
+ sub = new Range(sub, options);
26973
+ dom = new Range(dom, options);
26974
+ let sawNonNull = false;
26975
+ OUTER:
26976
+ for (const simpleSub of sub.set) {
26977
+ for (const simpleDom of dom.set) {
26978
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
26979
+ sawNonNull = sawNonNull || isSub !== null;
26980
+ if (isSub) {
26981
+ continue OUTER;
26982
+ }
26983
+ }
26984
+ if (sawNonNull) {
26985
+ return false;
26986
+ }
26987
+ }
26988
+ return true;
26989
+ };
26990
+ var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
26991
+ var minimumVersion = [new Comparator(">=0.0.0")];
26992
+ var simpleSubset = (sub, dom, options) => {
26993
+ if (sub === dom) {
26994
+ return true;
26995
+ }
26996
+ if (sub.length === 1 && sub[0].semver === ANY) {
26997
+ if (dom.length === 1 && dom[0].semver === ANY) {
26998
+ return true;
26999
+ } else if (options.includePrerelease) {
27000
+ sub = minimumVersionWithPreRelease;
27001
+ } else {
27002
+ sub = minimumVersion;
27003
+ }
27004
+ }
27005
+ if (dom.length === 1 && dom[0].semver === ANY) {
27006
+ if (options.includePrerelease) {
27007
+ return true;
27008
+ } else {
27009
+ dom = minimumVersion;
27010
+ }
27011
+ }
27012
+ const eqSet = /* @__PURE__ */ new Set();
27013
+ let gt, lt;
27014
+ for (const c of sub) {
27015
+ if (c.operator === ">" || c.operator === ">=") {
27016
+ gt = higherGT(gt, c, options);
27017
+ } else if (c.operator === "<" || c.operator === "<=") {
27018
+ lt = lowerLT(lt, c, options);
27019
+ } else {
27020
+ eqSet.add(c.semver);
27021
+ }
27022
+ }
27023
+ if (eqSet.size > 1) {
27024
+ return null;
27025
+ }
27026
+ let gtltComp;
27027
+ if (gt && lt) {
27028
+ gtltComp = compare(gt.semver, lt.semver, options);
27029
+ if (gtltComp > 0) {
27030
+ return null;
27031
+ } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
27032
+ return null;
27033
+ }
27034
+ }
27035
+ for (const eq of eqSet) {
27036
+ if (gt && !satisfies(eq, String(gt), options)) {
27037
+ return null;
27038
+ }
27039
+ if (lt && !satisfies(eq, String(lt), options)) {
27040
+ return null;
27041
+ }
27042
+ for (const c of dom) {
27043
+ if (!satisfies(eq, String(c), options)) {
27044
+ return false;
27045
+ }
27046
+ }
27047
+ return true;
27048
+ }
27049
+ let higher, lower;
27050
+ let hasDomLT, hasDomGT;
27051
+ let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
27052
+ let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
27053
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
27054
+ needDomLTPre = false;
27055
+ }
27056
+ for (const c of dom) {
27057
+ hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
27058
+ hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
27059
+ if (gt) {
27060
+ if (needDomGTPre) {
27061
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
27062
+ needDomGTPre = false;
27063
+ }
27064
+ }
27065
+ if (c.operator === ">" || c.operator === ">=") {
27066
+ higher = higherGT(gt, c, options);
27067
+ if (higher === c && higher !== gt) {
27068
+ return false;
27069
+ }
27070
+ } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
27071
+ return false;
27072
+ }
27073
+ }
27074
+ if (lt) {
27075
+ if (needDomLTPre) {
27076
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
27077
+ needDomLTPre = false;
27078
+ }
27079
+ }
27080
+ if (c.operator === "<" || c.operator === "<=") {
27081
+ lower = lowerLT(lt, c, options);
27082
+ if (lower === c && lower !== lt) {
27083
+ return false;
27084
+ }
27085
+ } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
27086
+ return false;
27087
+ }
27088
+ }
27089
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
27090
+ return false;
27091
+ }
27092
+ }
27093
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
27094
+ return false;
27095
+ }
27096
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
27097
+ return false;
27098
+ }
27099
+ if (needDomGTPre || needDomLTPre) {
27100
+ return false;
27101
+ }
27102
+ return true;
27103
+ };
27104
+ var higherGT = (a, b, options) => {
27105
+ if (!a) {
27106
+ return b;
27107
+ }
27108
+ const comp = compare(a.semver, b.semver, options);
27109
+ return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
27110
+ };
27111
+ var lowerLT = (a, b, options) => {
27112
+ if (!a) {
27113
+ return b;
27114
+ }
27115
+ const comp = compare(a.semver, b.semver, options);
27116
+ return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
27117
+ };
27118
+ module2.exports = subset;
27119
+ }
27120
+ });
27121
+
27122
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js
27123
+ var require_semver2 = __commonJS({
27124
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js"(exports, module2) {
27125
+ var internalRe = require_re();
27126
+ var constants = require_constants();
27127
+ var SemVer = require_semver();
27128
+ var identifiers = require_identifiers();
27129
+ var parse = require_parse();
27130
+ var valid = require_valid();
27131
+ var clean = require_clean();
27132
+ var inc = require_inc();
27133
+ var diff2 = require_diff();
27134
+ var major = require_major();
27135
+ var minor = require_minor();
27136
+ var patch = require_patch();
27137
+ var prerelease = require_prerelease();
27138
+ var compare = require_compare();
27139
+ var rcompare = require_rcompare();
27140
+ var compareLoose = require_compare_loose();
27141
+ var compareBuild = require_compare_build();
27142
+ var sort = require_sort();
27143
+ var rsort = require_rsort();
27144
+ var gt = require_gt();
27145
+ var lt = require_lt();
27146
+ var eq = require_eq();
27147
+ var neq = require_neq();
27148
+ var gte = require_gte();
27149
+ var lte = require_lte();
27150
+ var cmp = require_cmp();
27151
+ var coerce2 = require_coerce();
27152
+ var Comparator = require_comparator();
27153
+ var Range = require_range();
27154
+ var satisfies = require_satisfies();
27155
+ var toComparators = require_to_comparators();
27156
+ var maxSatisfying = require_max_satisfying();
27157
+ var minSatisfying = require_min_satisfying();
27158
+ var minVersion = require_min_version();
27159
+ var validRange = require_valid2();
27160
+ var outside = require_outside();
27161
+ var gtr = require_gtr();
27162
+ var ltr = require_ltr();
27163
+ var intersects = require_intersects();
27164
+ var simplifyRange = require_simplify();
27165
+ var subset = require_subset();
27166
+ module2.exports = {
27167
+ parse,
27168
+ valid,
27169
+ clean,
27170
+ inc,
27171
+ diff: diff2,
27172
+ major,
27173
+ minor,
27174
+ patch,
27175
+ prerelease,
27176
+ compare,
27177
+ rcompare,
27178
+ compareLoose,
27179
+ compareBuild,
27180
+ sort,
27181
+ rsort,
27182
+ gt,
27183
+ lt,
27184
+ eq,
27185
+ neq,
27186
+ gte,
27187
+ lte,
27188
+ cmp,
27189
+ coerce: coerce2,
27190
+ Comparator,
27191
+ Range,
27192
+ satisfies,
27193
+ toComparators,
27194
+ maxSatisfying,
27195
+ minSatisfying,
27196
+ minVersion,
27197
+ validRange,
27198
+ outside,
27199
+ gtr,
27200
+ ltr,
27201
+ intersects,
27202
+ simplifyRange,
27203
+ subset,
27204
+ SemVer,
27205
+ re: internalRe.re,
27206
+ src: internalRe.src,
27207
+ tokens: internalRe.t,
27208
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
27209
+ RELEASE_TYPES: constants.RELEASE_TYPES,
27210
+ compareIdentifiers: identifiers.compareIdentifiers,
27211
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
27212
+ };
27213
+ }
27214
+ });
27215
+
27216
+ // src/cli/utils.ts
27217
+ var import_semver;
27218
+ var init_utils3 = __esm({
27219
+ "src/cli/utils.ts"() {
27220
+ init_views();
27221
+ import_semver = __toESM(require_semver2());
27222
+ }
27223
+ });
27224
+
27225
+ // node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/lib/SqlString.js
27226
+ var require_SqlString = __commonJS({
27227
+ "node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/lib/SqlString.js"(exports) {
27228
+ var SqlString = exports;
27229
+ var ID_GLOBAL_REGEXP = /`/g;
27230
+ var QUAL_GLOBAL_REGEXP = /\./g;
27231
+ var CHARS_GLOBAL_REGEXP = /[\0\b\t\n\r\x1a\"\'\\]/g;
27232
+ var CHARS_ESCAPE_MAP = {
27233
+ "\0": "\\0",
27234
+ "\b": "\\b",
27235
+ " ": "\\t",
27236
+ "\n": "\\n",
27237
+ "\r": "\\r",
27238
+ "": "\\Z",
27239
+ '"': '\\"',
27240
+ "'": "\\'",
27241
+ "\\": "\\\\"
27242
+ };
27243
+ SqlString.escapeId = function escapeId(val, forbidQualified) {
27244
+ if (Array.isArray(val)) {
27245
+ var sql2 = "";
27246
+ for (var i = 0; i < val.length; i++) {
27247
+ sql2 += (i === 0 ? "" : ", ") + SqlString.escapeId(val[i], forbidQualified);
27248
+ }
27249
+ return sql2;
27250
+ } else if (forbidQualified) {
27251
+ return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``") + "`";
27252
+ } else {
27253
+ return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``").replace(QUAL_GLOBAL_REGEXP, "`.`") + "`";
27254
+ }
27255
+ };
27256
+ SqlString.escape = function escape2(val, stringifyObjects, timeZone) {
27257
+ if (val === void 0 || val === null) {
27258
+ return "NULL";
27259
+ }
27260
+ switch (typeof val) {
27261
+ case "boolean":
27262
+ return val ? "true" : "false";
27263
+ case "number":
27264
+ return val + "";
27265
+ case "object":
27266
+ if (Object.prototype.toString.call(val) === "[object Date]") {
27267
+ return SqlString.dateToString(val, timeZone || "local");
27268
+ } else if (Array.isArray(val)) {
27269
+ return SqlString.arrayToList(val, timeZone);
27270
+ } else if (Buffer.isBuffer(val)) {
27271
+ return SqlString.bufferToString(val);
27272
+ } else if (typeof val.toSqlString === "function") {
27273
+ return String(val.toSqlString());
27274
+ } else if (stringifyObjects) {
27275
+ return escapeString(val.toString());
27276
+ } else {
27277
+ return SqlString.objectToValues(val, timeZone);
27278
+ }
27279
+ default:
27280
+ return escapeString(val);
27281
+ }
27282
+ };
27283
+ SqlString.arrayToList = function arrayToList(array, timeZone) {
27284
+ var sql2 = "";
27285
+ for (var i = 0; i < array.length; i++) {
27286
+ var val = array[i];
27287
+ if (Array.isArray(val)) {
27288
+ sql2 += (i === 0 ? "" : ", ") + "(" + SqlString.arrayToList(val, timeZone) + ")";
27289
+ } else {
27290
+ sql2 += (i === 0 ? "" : ", ") + SqlString.escape(val, true, timeZone);
27291
+ }
27292
+ }
27293
+ return sql2;
27294
+ };
27295
+ SqlString.format = function format(sql2, values, stringifyObjects, timeZone) {
27296
+ if (values == null) {
27297
+ return sql2;
27298
+ }
27299
+ if (!Array.isArray(values)) {
27300
+ values = [values];
27301
+ }
27302
+ var chunkIndex = 0;
27303
+ var placeholdersRegex = /\?+/g;
27304
+ var result = "";
27305
+ var valuesIndex = 0;
27306
+ var match2;
27307
+ while (valuesIndex < values.length && (match2 = placeholdersRegex.exec(sql2))) {
27308
+ var len = match2[0].length;
27309
+ if (len > 2) {
27310
+ continue;
27311
+ }
27312
+ var value = len === 2 ? SqlString.escapeId(values[valuesIndex]) : SqlString.escape(values[valuesIndex], stringifyObjects, timeZone);
27313
+ result += sql2.slice(chunkIndex, match2.index) + value;
27314
+ chunkIndex = placeholdersRegex.lastIndex;
27315
+ valuesIndex++;
27316
+ }
27317
+ if (chunkIndex === 0) {
27318
+ return sql2;
27319
+ }
27320
+ if (chunkIndex < sql2.length) {
27321
+ return result + sql2.slice(chunkIndex);
27322
+ }
27323
+ return result;
27324
+ };
27325
+ SqlString.dateToString = function dateToString(date, timeZone) {
27326
+ var dt = new Date(date);
27327
+ if (isNaN(dt.getTime())) {
27328
+ return "NULL";
27329
+ }
27330
+ var year;
27331
+ var month;
27332
+ var day;
27333
+ var hour;
27334
+ var minute;
27335
+ var second;
27336
+ var millisecond;
27337
+ if (timeZone === "local") {
27338
+ year = dt.getFullYear();
27339
+ month = dt.getMonth() + 1;
27340
+ day = dt.getDate();
27341
+ hour = dt.getHours();
27342
+ minute = dt.getMinutes();
27343
+ second = dt.getSeconds();
27344
+ millisecond = dt.getMilliseconds();
27345
+ } else {
27346
+ var tz = convertTimezone(timeZone);
27347
+ if (tz !== false && tz !== 0) {
27348
+ dt.setTime(dt.getTime() + tz * 6e4);
27349
+ }
27350
+ year = dt.getUTCFullYear();
27351
+ month = dt.getUTCMonth() + 1;
27352
+ day = dt.getUTCDate();
27353
+ hour = dt.getUTCHours();
27354
+ minute = dt.getUTCMinutes();
27355
+ second = dt.getUTCSeconds();
27356
+ millisecond = dt.getUTCMilliseconds();
27357
+ }
27358
+ var str = zeroPad(year, 4) + "-" + zeroPad(month, 2) + "-" + zeroPad(day, 2) + " " + zeroPad(hour, 2) + ":" + zeroPad(minute, 2) + ":" + zeroPad(second, 2) + "." + zeroPad(millisecond, 3);
27359
+ return escapeString(str);
27360
+ };
27361
+ SqlString.bufferToString = function bufferToString(buffer) {
27362
+ return "X" + escapeString(buffer.toString("hex"));
27363
+ };
27364
+ SqlString.objectToValues = function objectToValues(object, timeZone) {
27365
+ var sql2 = "";
27366
+ for (var key in object) {
27367
+ var val = object[key];
27368
+ if (typeof val === "function") {
27369
+ continue;
27370
+ }
27371
+ sql2 += (sql2.length === 0 ? "" : ", ") + SqlString.escapeId(key) + " = " + SqlString.escape(val, true, timeZone);
27372
+ }
27373
+ return sql2;
27374
+ };
27375
+ SqlString.raw = function raw(sql2) {
27376
+ if (typeof sql2 !== "string") {
27377
+ throw new TypeError("argument sql must be a string");
27378
+ }
27379
+ return {
27380
+ toSqlString: function toSqlString() {
27381
+ return sql2;
27382
+ }
27383
+ };
27384
+ };
27385
+ function escapeString(val) {
27386
+ var chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex = 0;
27387
+ var escapedVal = "";
27388
+ var match2;
27389
+ while (match2 = CHARS_GLOBAL_REGEXP.exec(val)) {
27390
+ escapedVal += val.slice(chunkIndex, match2.index) + CHARS_ESCAPE_MAP[match2[0]];
27391
+ chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex;
27392
+ }
27393
+ if (chunkIndex === 0) {
27394
+ return "'" + val + "'";
27395
+ }
27396
+ if (chunkIndex < val.length) {
27397
+ return "'" + escapedVal + val.slice(chunkIndex) + "'";
27398
+ }
27399
+ return "'" + escapedVal + "'";
27400
+ }
27401
+ function zeroPad(number, length) {
27402
+ number = number.toString();
27403
+ while (number.length < length) {
27404
+ number = "0" + number;
25792
27405
  }
25793
- get itemCount() {
25794
- return this[LRU_LIST].length;
27406
+ return number;
27407
+ }
27408
+ function convertTimezone(tz) {
27409
+ if (tz === "Z") {
27410
+ return 0;
25795
27411
  }
25796
- rforEach(fn, thisp) {
25797
- thisp = thisp || this;
25798
- for (let walker = this[LRU_LIST].tail; walker !== null; ) {
25799
- const prev = walker.prev;
25800
- forEachStep(this, fn, walker, thisp);
25801
- walker = prev;
25802
- }
27412
+ var m = tz.match(/([\+\-\s])(\d\d):?(\d\d)?/);
27413
+ if (m) {
27414
+ return (m[1] === "-" ? -1 : 1) * (parseInt(m[2], 10) + (m[3] ? parseInt(m[3], 10) : 0) / 60) * 60;
25803
27415
  }
25804
- forEach(fn, thisp) {
25805
- thisp = thisp || this;
25806
- for (let walker = this[LRU_LIST].head; walker !== null; ) {
25807
- const next = walker.next;
25808
- forEachStep(this, fn, walker, thisp);
25809
- walker = next;
25810
- }
27416
+ return false;
27417
+ }
27418
+ }
27419
+ });
27420
+
27421
+ // node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js
27422
+ var require_sqlstring = __commonJS({
27423
+ "node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js"(exports, module2) {
27424
+ module2.exports = require_SqlString();
27425
+ }
27426
+ });
27427
+
27428
+ // node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js
27429
+ var require_denque = __commonJS({
27430
+ "node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js"(exports, module2) {
27431
+ "use strict";
27432
+ function Denque(array, options) {
27433
+ var options = options || {};
27434
+ this._capacity = options.capacity;
27435
+ this._head = 0;
27436
+ this._tail = 0;
27437
+ if (Array.isArray(array)) {
27438
+ this._fromArray(array);
27439
+ } else {
27440
+ this._capacityMask = 3;
27441
+ this._list = new Array(4);
25811
27442
  }
25812
- keys() {
25813
- return this[LRU_LIST].toArray().map((k) => k.key);
27443
+ }
27444
+ Denque.prototype.peekAt = function peekAt(index4) {
27445
+ var i = index4;
27446
+ if (i !== (i | 0)) {
27447
+ return void 0;
25814
27448
  }
25815
- values() {
25816
- return this[LRU_LIST].toArray().map((k) => k.value);
27449
+ var len = this.size();
27450
+ if (i >= len || i < -len)
27451
+ return void 0;
27452
+ if (i < 0)
27453
+ i += len;
27454
+ i = this._head + i & this._capacityMask;
27455
+ return this._list[i];
27456
+ };
27457
+ Denque.prototype.get = function get(i) {
27458
+ return this.peekAt(i);
27459
+ };
27460
+ Denque.prototype.peek = function peek() {
27461
+ if (this._head === this._tail)
27462
+ return void 0;
27463
+ return this._list[this._head];
27464
+ };
27465
+ Denque.prototype.peekFront = function peekFront() {
27466
+ return this.peek();
27467
+ };
27468
+ Denque.prototype.peekBack = function peekBack() {
27469
+ return this.peekAt(-1);
27470
+ };
27471
+ Object.defineProperty(Denque.prototype, "length", {
27472
+ get: function length() {
27473
+ return this.size();
25817
27474
  }
25818
- reset() {
25819
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
25820
- this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
25821
- }
25822
- this[CACHE] = /* @__PURE__ */ new Map();
25823
- this[LRU_LIST] = new Yallist();
25824
- this[LENGTH] = 0;
27475
+ });
27476
+ Denque.prototype.size = function size() {
27477
+ if (this._head === this._tail)
27478
+ return 0;
27479
+ if (this._head < this._tail)
27480
+ return this._tail - this._head;
27481
+ else
27482
+ return this._capacityMask + 1 - (this._head - this._tail);
27483
+ };
27484
+ Denque.prototype.unshift = function unshift(item) {
27485
+ if (arguments.length === 0)
27486
+ return this.size();
27487
+ var len = this._list.length;
27488
+ this._head = this._head - 1 + len & this._capacityMask;
27489
+ this._list[this._head] = item;
27490
+ if (this._tail === this._head)
27491
+ this._growArray();
27492
+ if (this._capacity && this.size() > this._capacity)
27493
+ this.pop();
27494
+ if (this._head < this._tail)
27495
+ return this._tail - this._head;
27496
+ else
27497
+ return this._capacityMask + 1 - (this._head - this._tail);
27498
+ };
27499
+ Denque.prototype.shift = function shift() {
27500
+ var head = this._head;
27501
+ if (head === this._tail)
27502
+ return void 0;
27503
+ var item = this._list[head];
27504
+ this._list[head] = void 0;
27505
+ this._head = head + 1 & this._capacityMask;
27506
+ if (head < 2 && this._tail > 1e4 && this._tail <= this._list.length >>> 2)
27507
+ this._shrinkArray();
27508
+ return item;
27509
+ };
27510
+ Denque.prototype.push = function push(item) {
27511
+ if (arguments.length === 0)
27512
+ return this.size();
27513
+ var tail = this._tail;
27514
+ this._list[tail] = item;
27515
+ this._tail = tail + 1 & this._capacityMask;
27516
+ if (this._tail === this._head) {
27517
+ this._growArray();
25825
27518
  }
25826
- dump() {
25827
- return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
25828
- k: hit.key,
25829
- v: hit.value,
25830
- e: hit.now + (hit.maxAge || 0)
25831
- }).toArray().filter((h) => h);
27519
+ if (this._capacity && this.size() > this._capacity) {
27520
+ this.shift();
25832
27521
  }
25833
- dumpLru() {
25834
- return this[LRU_LIST];
27522
+ if (this._head < this._tail)
27523
+ return this._tail - this._head;
27524
+ else
27525
+ return this._capacityMask + 1 - (this._head - this._tail);
27526
+ };
27527
+ Denque.prototype.pop = function pop() {
27528
+ var tail = this._tail;
27529
+ if (tail === this._head)
27530
+ return void 0;
27531
+ var len = this._list.length;
27532
+ this._tail = tail - 1 + len & this._capacityMask;
27533
+ var item = this._list[this._tail];
27534
+ this._list[this._tail] = void 0;
27535
+ if (this._head < 2 && tail > 1e4 && tail <= len >>> 2)
27536
+ this._shrinkArray();
27537
+ return item;
27538
+ };
27539
+ Denque.prototype.removeOne = function removeOne(index4) {
27540
+ var i = index4;
27541
+ if (i !== (i | 0)) {
27542
+ return void 0;
25835
27543
  }
25836
- set(key, value, maxAge) {
25837
- maxAge = maxAge || this[MAX_AGE];
25838
- if (maxAge && typeof maxAge !== "number")
25839
- throw new TypeError("maxAge must be a number");
25840
- const now = maxAge ? Date.now() : 0;
25841
- const len = this[LENGTH_CALCULATOR](value, key);
25842
- if (this[CACHE].has(key)) {
25843
- if (len > this[MAX]) {
25844
- del(this, this[CACHE].get(key));
25845
- return false;
25846
- }
25847
- const node = this[CACHE].get(key);
25848
- const item = node.value;
25849
- if (this[DISPOSE]) {
25850
- if (!this[NO_DISPOSE_ON_SET])
25851
- this[DISPOSE](key, item.value);
25852
- }
25853
- item.now = now;
25854
- item.maxAge = maxAge;
25855
- item.value = value;
25856
- this[LENGTH] += len - item.length;
25857
- item.length = len;
25858
- this.get(key);
25859
- trim(this);
25860
- return true;
27544
+ if (this._head === this._tail)
27545
+ return void 0;
27546
+ var size = this.size();
27547
+ var len = this._list.length;
27548
+ if (i >= size || i < -size)
27549
+ return void 0;
27550
+ if (i < 0)
27551
+ i += size;
27552
+ i = this._head + i & this._capacityMask;
27553
+ var item = this._list[i];
27554
+ var k;
27555
+ if (index4 < size / 2) {
27556
+ for (k = index4; k > 0; k--) {
27557
+ this._list[i] = this._list[i = i - 1 + len & this._capacityMask];
25861
27558
  }
25862
- const hit = new Entry(key, value, len, now, maxAge);
25863
- if (hit.length > this[MAX]) {
25864
- if (this[DISPOSE])
25865
- this[DISPOSE](key, value);
25866
- return false;
27559
+ this._list[i] = void 0;
27560
+ this._head = this._head + 1 + len & this._capacityMask;
27561
+ } else {
27562
+ for (k = size - 1 - index4; k > 0; k--) {
27563
+ this._list[i] = this._list[i = i + 1 + len & this._capacityMask];
25867
27564
  }
25868
- this[LENGTH] += hit.length;
25869
- this[LRU_LIST].unshift(hit);
25870
- this[CACHE].set(key, this[LRU_LIST].head);
25871
- trim(this);
25872
- return true;
27565
+ this._list[i] = void 0;
27566
+ this._tail = this._tail - 1 + len & this._capacityMask;
25873
27567
  }
25874
- has(key) {
25875
- if (!this[CACHE].has(key))
25876
- return false;
25877
- const hit = this[CACHE].get(key).value;
25878
- return !isStale(this, hit);
27568
+ return item;
27569
+ };
27570
+ Denque.prototype.remove = function remove(index4, count) {
27571
+ var i = index4;
27572
+ var removed;
27573
+ var del_count = count;
27574
+ if (i !== (i | 0)) {
27575
+ return void 0;
25879
27576
  }
25880
- get(key) {
25881
- return get(this, key, true);
27577
+ if (this._head === this._tail)
27578
+ return void 0;
27579
+ var size = this.size();
27580
+ var len = this._list.length;
27581
+ if (i >= size || i < -size || count < 1)
27582
+ return void 0;
27583
+ if (i < 0)
27584
+ i += size;
27585
+ if (count === 1 || !count) {
27586
+ removed = new Array(1);
27587
+ removed[0] = this.removeOne(i);
27588
+ return removed;
25882
27589
  }
25883
- peek(key) {
25884
- return get(this, key, false);
27590
+ if (i === 0 && i + count >= size) {
27591
+ removed = this.toArray();
27592
+ this.clear();
27593
+ return removed;
25885
27594
  }
25886
- pop() {
25887
- const node = this[LRU_LIST].tail;
25888
- if (!node)
25889
- return null;
25890
- del(this, node);
25891
- return node.value;
27595
+ if (i + count > size)
27596
+ count = size - i;
27597
+ var k;
27598
+ removed = new Array(count);
27599
+ for (k = 0; k < count; k++) {
27600
+ removed[k] = this._list[this._head + i + k & this._capacityMask];
25892
27601
  }
25893
- del(key) {
25894
- del(this, this[CACHE].get(key));
27602
+ i = this._head + i & this._capacityMask;
27603
+ if (index4 + count === size) {
27604
+ this._tail = this._tail - count + len & this._capacityMask;
27605
+ for (k = count; k > 0; k--) {
27606
+ this._list[i = i + 1 + len & this._capacityMask] = void 0;
27607
+ }
27608
+ return removed;
25895
27609
  }
25896
- load(arr) {
25897
- this.reset();
25898
- const now = Date.now();
25899
- for (let l = arr.length - 1; l >= 0; l--) {
25900
- const hit = arr[l];
25901
- const expiresAt = hit.e || 0;
25902
- if (expiresAt === 0)
25903
- this.set(hit.k, hit.v);
25904
- else {
25905
- const maxAge = expiresAt - now;
25906
- if (maxAge > 0) {
25907
- this.set(hit.k, hit.v, maxAge);
25908
- }
25909
- }
27610
+ if (index4 === 0) {
27611
+ this._head = this._head + count + len & this._capacityMask;
27612
+ for (k = count - 1; k > 0; k--) {
27613
+ this._list[i = i + 1 + len & this._capacityMask] = void 0;
25910
27614
  }
27615
+ return removed;
25911
27616
  }
25912
- prune() {
25913
- this[CACHE].forEach((value, key) => get(this, key, false));
27617
+ if (i < size / 2) {
27618
+ this._head = this._head + index4 + count + len & this._capacityMask;
27619
+ for (k = index4; k > 0; k--) {
27620
+ this.unshift(this._list[i = i - 1 + len & this._capacityMask]);
27621
+ }
27622
+ i = this._head - 1 + len & this._capacityMask;
27623
+ while (del_count > 0) {
27624
+ this._list[i = i - 1 + len & this._capacityMask] = void 0;
27625
+ del_count--;
27626
+ }
27627
+ if (index4 < 0)
27628
+ this._tail = i;
27629
+ } else {
27630
+ this._tail = i;
27631
+ i = i + count + len & this._capacityMask;
27632
+ for (k = size - (count + index4); k > 0; k--) {
27633
+ this.push(this._list[i++]);
27634
+ }
27635
+ i = this._tail;
27636
+ while (del_count > 0) {
27637
+ this._list[i = i + 1 + len & this._capacityMask] = void 0;
27638
+ del_count--;
27639
+ }
25914
27640
  }
27641
+ if (this._head < 2 && this._tail > 1e4 && this._tail <= len >>> 2)
27642
+ this._shrinkArray();
27643
+ return removed;
25915
27644
  };
25916
- var get = (self2, key, doUse) => {
25917
- const node = self2[CACHE].get(key);
25918
- if (node) {
25919
- const hit = node.value;
25920
- if (isStale(self2, hit)) {
25921
- del(self2, node);
25922
- if (!self2[ALLOW_STALE])
25923
- return void 0;
27645
+ Denque.prototype.splice = function splice(index4, count) {
27646
+ var i = index4;
27647
+ if (i !== (i | 0)) {
27648
+ return void 0;
27649
+ }
27650
+ var size = this.size();
27651
+ if (i < 0)
27652
+ i += size;
27653
+ if (i > size)
27654
+ return void 0;
27655
+ if (arguments.length > 2) {
27656
+ var k;
27657
+ var temp;
27658
+ var removed;
27659
+ var arg_len = arguments.length;
27660
+ var len = this._list.length;
27661
+ var arguments_index = 2;
27662
+ if (!size || i < size / 2) {
27663
+ temp = new Array(i);
27664
+ for (k = 0; k < i; k++) {
27665
+ temp[k] = this._list[this._head + k & this._capacityMask];
27666
+ }
27667
+ if (count === 0) {
27668
+ removed = [];
27669
+ if (i > 0) {
27670
+ this._head = this._head + i + len & this._capacityMask;
27671
+ }
27672
+ } else {
27673
+ removed = this.remove(i, count);
27674
+ this._head = this._head + i + len & this._capacityMask;
27675
+ }
27676
+ while (arg_len > arguments_index) {
27677
+ this.unshift(arguments[--arg_len]);
27678
+ }
27679
+ for (k = i; k > 0; k--) {
27680
+ this.unshift(temp[k - 1]);
27681
+ }
25924
27682
  } else {
25925
- if (doUse) {
25926
- if (self2[UPDATE_AGE_ON_GET])
25927
- node.value.now = Date.now();
25928
- self2[LRU_LIST].unshiftNode(node);
27683
+ temp = new Array(size - (i + count));
27684
+ var leng = temp.length;
27685
+ for (k = 0; k < leng; k++) {
27686
+ temp[k] = this._list[this._head + i + count + k & this._capacityMask];
27687
+ }
27688
+ if (count === 0) {
27689
+ removed = [];
27690
+ if (i != size) {
27691
+ this._tail = this._head + i + len & this._capacityMask;
27692
+ }
27693
+ } else {
27694
+ removed = this.remove(i, count);
27695
+ this._tail = this._tail - leng + len & this._capacityMask;
27696
+ }
27697
+ while (arguments_index < arg_len) {
27698
+ this.push(arguments[arguments_index++]);
27699
+ }
27700
+ for (k = 0; k < leng; k++) {
27701
+ this.push(temp[k]);
25929
27702
  }
25930
27703
  }
25931
- return hit.value;
27704
+ return removed;
27705
+ } else {
27706
+ return this.remove(i, count);
25932
27707
  }
25933
27708
  };
25934
- var isStale = (self2, hit) => {
25935
- if (!hit || !hit.maxAge && !self2[MAX_AGE])
25936
- return false;
25937
- const diff2 = Date.now() - hit.now;
25938
- return hit.maxAge ? diff2 > hit.maxAge : self2[MAX_AGE] && diff2 > self2[MAX_AGE];
27709
+ Denque.prototype.clear = function clear() {
27710
+ this._list = new Array(this._list.length);
27711
+ this._head = 0;
27712
+ this._tail = 0;
25939
27713
  };
25940
- var trim = (self2) => {
25941
- if (self2[LENGTH] > self2[MAX]) {
25942
- for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
25943
- const prev = walker.prev;
25944
- del(self2, walker);
25945
- walker = prev;
25946
- }
25947
- }
27714
+ Denque.prototype.isEmpty = function isEmpty() {
27715
+ return this._head === this._tail;
25948
27716
  };
25949
- var del = (self2, node) => {
25950
- if (node) {
25951
- const hit = node.value;
25952
- if (self2[DISPOSE])
25953
- self2[DISPOSE](hit.key, hit.value);
25954
- self2[LENGTH] -= hit.length;
25955
- self2[CACHE].delete(hit.key);
25956
- self2[LRU_LIST].removeNode(node);
25957
- }
27717
+ Denque.prototype.toArray = function toArray() {
27718
+ return this._copyArray(false);
25958
27719
  };
25959
- var Entry = class {
25960
- constructor(key, value, length, now, maxAge) {
25961
- this.key = key;
25962
- this.value = value;
25963
- this.length = length;
25964
- this.now = now;
25965
- this.maxAge = maxAge || 0;
27720
+ Denque.prototype._fromArray = function _fromArray(array) {
27721
+ var length = array.length;
27722
+ var capacity = this._nextPowerOf2(length);
27723
+ this._list = new Array(capacity);
27724
+ this._capacityMask = capacity - 1;
27725
+ this._tail = length;
27726
+ for (var i = 0; i < length; i++)
27727
+ this._list[i] = array[i];
27728
+ };
27729
+ Denque.prototype._copyArray = function _copyArray(fullCopy, size) {
27730
+ var src = this._list;
27731
+ var capacity = src.length;
27732
+ var length = this.length;
27733
+ size = size | length;
27734
+ if (size == length && this._head < this._tail) {
27735
+ return this._list.slice(this._head, this._tail);
27736
+ }
27737
+ var dest = new Array(size);
27738
+ var k = 0;
27739
+ var i;
27740
+ if (fullCopy || this._head > this._tail) {
27741
+ for (i = this._head; i < capacity; i++)
27742
+ dest[k++] = src[i];
27743
+ for (i = 0; i < this._tail; i++)
27744
+ dest[k++] = src[i];
27745
+ } else {
27746
+ for (i = this._head; i < this._tail; i++)
27747
+ dest[k++] = src[i];
25966
27748
  }
27749
+ return dest;
25967
27750
  };
25968
- var forEachStep = (self2, fn, node, thisp) => {
25969
- let hit = node.value;
25970
- if (isStale(self2, hit)) {
25971
- del(self2, node);
25972
- if (!self2[ALLOW_STALE])
25973
- hit = void 0;
27751
+ Denque.prototype._growArray = function _growArray() {
27752
+ if (this._head != 0) {
27753
+ var newList = this._copyArray(true, this._list.length << 1);
27754
+ this._tail = this._list.length;
27755
+ this._head = 0;
27756
+ this._list = newList;
27757
+ } else {
27758
+ this._tail = this._list.length;
27759
+ this._list.length <<= 1;
25974
27760
  }
25975
- if (hit)
25976
- fn.call(thisp, hit.value, hit.key, self2);
27761
+ this._capacityMask = this._capacityMask << 1 | 1;
25977
27762
  };
25978
- module2.exports = LRUCache;
27763
+ Denque.prototype._shrinkArray = function _shrinkArray() {
27764
+ this._list.length >>>= 1;
27765
+ this._capacityMask >>>= 1;
27766
+ };
27767
+ Denque.prototype._nextPowerOf2 = function _nextPowerOf2(num) {
27768
+ var log2 = Math.log(num) / Math.log(2);
27769
+ var nextPow2 = 1 << log2 + 1;
27770
+ return Math.max(nextPow2, 4);
27771
+ };
27772
+ module2.exports = Denque;
25979
27773
  }
25980
27774
  });
25981
27775
 
@@ -44245,7 +46039,7 @@ var require_expand = __commonJS({
44245
46039
  });
44246
46040
 
44247
46041
  // node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js
44248
- var require_constants = __commonJS({
46042
+ var require_constants2 = __commonJS({
44249
46043
  "node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js"(exports, module2) {
44250
46044
  "use strict";
44251
46045
  module2.exports = {
@@ -44346,7 +46140,7 @@ var require_constants = __commonJS({
44346
46140
  });
44347
46141
 
44348
46142
  // node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js
44349
- var require_parse = __commonJS({
46143
+ var require_parse2 = __commonJS({
44350
46144
  "node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js"(exports, module2) {
44351
46145
  "use strict";
44352
46146
  var stringify = require_stringify();
@@ -44378,7 +46172,7 @@ var require_parse = __commonJS({
44378
46172
  /* ' */
44379
46173
  CHAR_NO_BREAK_SPACE,
44380
46174
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
44381
- } = require_constants();
46175
+ } = require_constants2();
44382
46176
  var parse = (input, options = {}) => {
44383
46177
  if (typeof input !== "string") {
44384
46178
  throw new TypeError("Expected a string");
@@ -44596,7 +46390,7 @@ var require_braces = __commonJS({
44596
46390
  var stringify = require_stringify();
44597
46391
  var compile = require_compile();
44598
46392
  var expand2 = require_expand();
44599
- var parse = require_parse();
46393
+ var parse = require_parse2();
44600
46394
  var braces = (input, options = {}) => {
44601
46395
  let output = [];
44602
46396
  if (Array.isArray(input)) {
@@ -44653,7 +46447,7 @@ var require_braces = __commonJS({
44653
46447
  });
44654
46448
 
44655
46449
  // node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
44656
- var require_constants2 = __commonJS({
46450
+ var require_constants3 = __commonJS({
44657
46451
  "node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports, module2) {
44658
46452
  "use strict";
44659
46453
  var path4 = require("path");
@@ -44860,7 +46654,7 @@ var require_utils5 = __commonJS({
44860
46654
  REGEX_REMOVE_BACKSLASH,
44861
46655
  REGEX_SPECIAL_CHARS,
44862
46656
  REGEX_SPECIAL_CHARS_GLOBAL
44863
- } = require_constants2();
46657
+ } = require_constants3();
44864
46658
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
44865
46659
  exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
44866
46660
  exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
@@ -44948,7 +46742,7 @@ var require_scan = __commonJS({
44948
46742
  /* ) */
44949
46743
  CHAR_RIGHT_SQUARE_BRACKET
44950
46744
  /* ] */
44951
- } = require_constants2();
46745
+ } = require_constants3();
44952
46746
  var isPathSeparator = (code) => {
44953
46747
  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
44954
46748
  };
@@ -45246,10 +47040,10 @@ var require_scan = __commonJS({
45246
47040
  });
45247
47041
 
45248
47042
  // node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js
45249
- var require_parse2 = __commonJS({
47043
+ var require_parse3 = __commonJS({
45250
47044
  "node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"(exports, module2) {
45251
47045
  "use strict";
45252
- var constants = require_constants2();
47046
+ var constants = require_constants3();
45253
47047
  var utils = require_utils5();
45254
47048
  var {
45255
47049
  MAX_LENGTH,
@@ -46032,9 +47826,9 @@ var require_picomatch = __commonJS({
46032
47826
  "use strict";
46033
47827
  var path4 = require("path");
46034
47828
  var scan = require_scan();
46035
- var parse = require_parse2();
47829
+ var parse = require_parse3();
46036
47830
  var utils = require_utils5();
46037
- var constants = require_constants2();
47831
+ var constants = require_constants3();
46038
47832
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
46039
47833
  var picomatch = (glob2, options, returnState = false) => {
46040
47834
  if (Array.isArray(glob2)) {
@@ -46858,7 +48652,7 @@ var require_run_parallel = __commonJS({
46858
48652
  });
46859
48653
 
46860
48654
  // node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js
46861
- var require_constants3 = __commonJS({
48655
+ var require_constants4 = __commonJS({
46862
48656
  "node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
46863
48657
  "use strict";
46864
48658
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -46937,7 +48731,7 @@ var require_async2 = __commonJS({
46937
48731
  exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
46938
48732
  var fsStat = require_out();
46939
48733
  var rpl = require_run_parallel();
46940
- var constants_1 = require_constants3();
48734
+ var constants_1 = require_constants4();
46941
48735
  var utils = require_utils7();
46942
48736
  var common = require_common2();
46943
48737
  function read(directory, settings, callback) {
@@ -47046,7 +48840,7 @@ var require_sync2 = __commonJS({
47046
48840
  Object.defineProperty(exports, "__esModule", { value: true });
47047
48841
  exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
47048
48842
  var fsStat = require_out();
47049
- var constants_1 = require_constants3();
48843
+ var constants_1 = require_constants4();
47050
48844
  var utils = require_utils7();
47051
48845
  var common = require_common2();
47052
48846
  function read(directory, settings) {
@@ -48040,7 +49834,7 @@ var require_partial = __commonJS({
48040
49834
  match(filepath) {
48041
49835
  const parts = filepath.split("/");
48042
49836
  const levels = parts.length;
48043
- const patterns = this._storage.filter((info2) => !info2.complete || info2.segments.length > levels);
49837
+ const patterns = this._storage.filter((info3) => !info3.complete || info3.segments.length > levels);
48044
49838
  for (const pattern of patterns) {
48045
49839
  const section = pattern.sections[0];
48046
49840
  if (!pattern.complete && levels > section.length) {