drizzle-kit 0.20.3 → 0.20.4-2a3dc47

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