drizzle-kit 0.20.2 → 0.20.4-2a3dc47
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +2888 -974
- package/cli/commands/pgIntrospect.d.ts +6 -1
- package/cli/commands/sqliteIntrospect.d.ts +6 -1
- package/cli/utils.d.ts +1 -0
- package/introspect-pg.d.ts +9 -0
- package/introspect-sqlite.d.ts +10 -0
- package/package.json +19 -4
- package/serializer/studioUtils.d.ts +15 -3
- package/utils-studio.d.mts +5 -0
- package/utils-studio.d.ts +1 -1
- package/utils-studio.js +13 -3
- package/utils-studio.mjs +3410 -0
- package/utils.js +2600 -814
- package/introspect.d.ts +0 -4
- package/sqlite-introspect.d.ts +0 -5
package/bin.cjs
CHANGED
@@ -6815,11 +6815,11 @@ var require_node2 = __commonJS({
|
|
6815
6815
|
this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
6816
6816
|
}
|
6817
6817
|
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
6818
|
-
var
|
6818
|
+
var set2 = new ArraySet();
|
6819
6819
|
for (var i = 0, len = aArray.length; i < len; i++) {
|
6820
|
-
|
6820
|
+
set2.add(aArray[i], aAllowDuplicates);
|
6821
6821
|
}
|
6822
|
-
return
|
6822
|
+
return set2;
|
6823
6823
|
};
|
6824
6824
|
ArraySet.prototype.size = function ArraySet_size() {
|
6825
6825
|
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
@@ -9380,7 +9380,7 @@ var require_node2 = __commonJS({
|
|
9380
9380
|
return /[0-9A-Fa-f]/.test(c);
|
9381
9381
|
}
|
9382
9382
|
});
|
9383
|
-
var
|
9383
|
+
var require_parse4 = __commonJS2((exports2, module22) => {
|
9384
9384
|
"use strict";
|
9385
9385
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
9386
9386
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
@@ -10463,7 +10463,7 @@ var require_node2 = __commonJS({
|
|
10463
10463
|
var require_lib32 = __commonJS2((exports2, module22) => {
|
10464
10464
|
"use strict";
|
10465
10465
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
10466
|
-
var _parse =
|
10466
|
+
var _parse = require_parse4();
|
10467
10467
|
var _parse2 = _interopRequireDefault(_parse);
|
10468
10468
|
var _stringify = require_stringify3();
|
10469
10469
|
var _stringify2 = _interopRequireDefault(_stringify);
|
@@ -13295,6 +13295,14 @@ WHERE
|
|
13295
13295
|
});
|
13296
13296
|
|
13297
13297
|
// src/serializer/index.ts
|
13298
|
+
var serializer_exports = {};
|
13299
|
+
__export(serializer_exports, {
|
13300
|
+
prepareFilenames: () => prepareFilenames,
|
13301
|
+
serializeMySql: () => serializeMySql,
|
13302
|
+
serializePg: () => serializePg,
|
13303
|
+
serializeSQLite: () => serializeSQLite,
|
13304
|
+
sqlToStr: () => sqlToStr
|
13305
|
+
});
|
13298
13306
|
var import_fs2, import_path2, glob, sqlToStr, serializeMySql, serializePg, serializeSQLite, prepareFilenames;
|
13299
13307
|
var init_serializer = __esm({
|
13300
13308
|
"src/serializer/index.ts"() {
|
@@ -18785,10 +18793,14 @@ var init_utils2 = __esm({
|
|
18785
18793
|
}
|
18786
18794
|
});
|
18787
18795
|
|
18788
|
-
// src/introspect.ts
|
18796
|
+
// src/introspect-pg.ts
|
18797
|
+
var introspect_pg_exports = {};
|
18798
|
+
__export(introspect_pg_exports, {
|
18799
|
+
schemaToTypeScript: () => schemaToTypeScript
|
18800
|
+
});
|
18789
18801
|
var pgImportsList, objToStatement2, timeConfig, possibleIntervals, intervalStrToObj, intervalConfig, importsPatch, relations, withCasing, schemaToTypeScript, isCyclic, isSelf, column4, dimensionsInArray, createTableColumns, createTableIndexes, createTablePKs, createTableUniques, createTableFKs;
|
18790
|
-
var
|
18791
|
-
"src/introspect.ts"() {
|
18802
|
+
var init_introspect_pg = __esm({
|
18803
|
+
"src/introspect-pg.ts"() {
|
18792
18804
|
init_utils2();
|
18793
18805
|
init_pgSerializer();
|
18794
18806
|
pgImportsList = /* @__PURE__ */ new Set([
|
@@ -18946,7 +18958,7 @@ var init_introspect = __esm({
|
|
18946
18958
|
res.pg.push("pgEnum");
|
18947
18959
|
}
|
18948
18960
|
const columnImports = Object.values(it.columns).map((col) => {
|
18949
|
-
let patched = importsPatch[col.type]
|
18961
|
+
let patched = importsPatch[col.type] || col.type;
|
18950
18962
|
patched = patched.startsWith("varchar(") ? "varchar" : patched;
|
18951
18963
|
patched = patched.startsWith("char(") ? "char" : patched;
|
18952
18964
|
patched = patched.startsWith("numeric(") ? "numeric" : patched;
|
@@ -19015,18 +19027,23 @@ var init_introspect = __esm({
|
|
19015
19027
|
return statement;
|
19016
19028
|
});
|
19017
19029
|
const uniquePgImports = ["pgTable", ...new Set(imports.pg)];
|
19018
|
-
|
19030
|
+
const importsTs = `import { ${uniquePgImports.join(
|
19019
19031
|
", "
|
19020
19032
|
)} } from "drizzle-orm/pg-core"
|
19033
|
+
import { sql } from "drizzle-orm"
|
19021
19034
|
|
19022
19035
|
`;
|
19023
|
-
|
19024
|
-
|
19025
|
-
|
19026
|
-
|
19027
|
-
|
19028
|
-
|
19029
|
-
|
19036
|
+
let decalrations = enumStatements;
|
19037
|
+
decalrations += schemaStatements;
|
19038
|
+
decalrations += "\n";
|
19039
|
+
decalrations += tableStatements.join("\n\n");
|
19040
|
+
const file = importsTs + decalrations;
|
19041
|
+
const schemaEntry = `
|
19042
|
+
{
|
19043
|
+
${Object.values(schema4.tables).map((it) => withCasing(it.name, casing)).join(",\n")}
|
19044
|
+
}
|
19045
|
+
`;
|
19046
|
+
return { file, imports: importsTs, decalrations, schemaEntry };
|
19030
19047
|
};
|
19031
19048
|
isCyclic = (fk4) => {
|
19032
19049
|
const key = `${fk4.tableFrom}-${fk4.tableTo}`;
|
@@ -19803,9 +19820,9 @@ var init_mjs = __esm({
|
|
19803
19820
|
star = qmark + "*?";
|
19804
19821
|
twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
19805
19822
|
twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
19806
|
-
charSet = (s) => s.split("").reduce((
|
19807
|
-
|
19808
|
-
return
|
19823
|
+
charSet = (s) => s.split("").reduce((set2, c) => {
|
19824
|
+
set2[c] = true;
|
19825
|
+
return set2;
|
19809
19826
|
}, {});
|
19810
19827
|
reSpecials = charSet("().*{}+?[]^$\\!");
|
19811
19828
|
addPatternStartSet = charSet("[.(");
|
@@ -19947,7 +19964,7 @@ var init_mjs = __esm({
|
|
19947
19964
|
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
19948
19965
|
this.globParts = this.preprocess(rawGlobParts);
|
19949
19966
|
this.debug(this.pattern, this.globParts);
|
19950
|
-
let
|
19967
|
+
let set2 = this.globParts.map((s, _, __) => {
|
19951
19968
|
if (this.isWindows && this.windowsNoMagicRoot) {
|
19952
19969
|
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
19953
19970
|
const isDrive = /^[a-z]:/i.test(s[0]);
|
@@ -19959,8 +19976,8 @@ var init_mjs = __esm({
|
|
19959
19976
|
}
|
19960
19977
|
return s.map((ss) => this.parse(ss));
|
19961
19978
|
});
|
19962
|
-
this.debug(this.pattern,
|
19963
|
-
this.set =
|
19979
|
+
this.debug(this.pattern, set2);
|
19980
|
+
this.set = set2.filter((s) => s.indexOf(false) === -1);
|
19964
19981
|
if (this.isWindows) {
|
19965
19982
|
for (let i = 0; i < this.set.length; i++) {
|
19966
19983
|
const p = this.set[i];
|
@@ -20016,19 +20033,19 @@ var init_mjs = __esm({
|
|
20016
20033
|
// get rid of adjascent ** and resolve .. portions
|
20017
20034
|
levelOneOptimize(globParts) {
|
20018
20035
|
return globParts.map((parts) => {
|
20019
|
-
parts = parts.reduce((
|
20020
|
-
const prev =
|
20036
|
+
parts = parts.reduce((set2, part) => {
|
20037
|
+
const prev = set2[set2.length - 1];
|
20021
20038
|
if (part === "**" && prev === "**") {
|
20022
|
-
return
|
20039
|
+
return set2;
|
20023
20040
|
}
|
20024
20041
|
if (part === "..") {
|
20025
20042
|
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
20026
|
-
|
20027
|
-
return
|
20043
|
+
set2.pop();
|
20044
|
+
return set2;
|
20028
20045
|
}
|
20029
20046
|
}
|
20030
|
-
|
20031
|
-
return
|
20047
|
+
set2.push(part);
|
20048
|
+
return set2;
|
20032
20049
|
}, []);
|
20033
20050
|
return parts.length === 0 ? [""] : parts;
|
20034
20051
|
});
|
@@ -20546,15 +20563,15 @@ var init_mjs = __esm({
|
|
20546
20563
|
makeRe() {
|
20547
20564
|
if (this.regexp || this.regexp === false)
|
20548
20565
|
return this.regexp;
|
20549
|
-
const
|
20550
|
-
if (!
|
20566
|
+
const set2 = this.set;
|
20567
|
+
if (!set2.length) {
|
20551
20568
|
this.regexp = false;
|
20552
20569
|
return this.regexp;
|
20553
20570
|
}
|
20554
20571
|
const options = this.options;
|
20555
20572
|
const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
|
20556
20573
|
const flags = options.nocase ? "i" : "";
|
20557
|
-
let re =
|
20574
|
+
let re = set2.map((pattern) => {
|
20558
20575
|
const pp = pattern.map((p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src);
|
20559
20576
|
pp.forEach((p, i) => {
|
20560
20577
|
const next = pp[i + 1];
|
@@ -20613,16 +20630,16 @@ var init_mjs = __esm({
|
|
20613
20630
|
}
|
20614
20631
|
const ff = this.slashSplit(f);
|
20615
20632
|
this.debug(this.pattern, "split", ff);
|
20616
|
-
const
|
20617
|
-
this.debug(this.pattern, "set",
|
20633
|
+
const set2 = this.set;
|
20634
|
+
this.debug(this.pattern, "set", set2);
|
20618
20635
|
let filename = ff[ff.length - 1];
|
20619
20636
|
if (!filename) {
|
20620
20637
|
for (let i = ff.length - 2; !filename && i >= 0; i--) {
|
20621
20638
|
filename = ff[i];
|
20622
20639
|
}
|
20623
20640
|
}
|
20624
|
-
for (let i = 0; i <
|
20625
|
-
const pattern =
|
20641
|
+
for (let i = 0; i < set2.length; i++) {
|
20642
|
+
const pattern = set2[i];
|
20626
20643
|
let file = ff;
|
20627
20644
|
if (options.matchBase && pattern.length === 1) {
|
20628
20645
|
file = [filename];
|
@@ -25382,7 +25399,7 @@ var init_pgIntrospect = __esm({
|
|
25382
25399
|
import_hanji4 = __toESM(require_hanji());
|
25383
25400
|
init_views();
|
25384
25401
|
init_pgSerializer();
|
25385
|
-
|
25402
|
+
init_introspect_pg();
|
25386
25403
|
init_global();
|
25387
25404
|
init_mjs();
|
25388
25405
|
pgSchemas = async (client) => {
|
@@ -25709,10 +25726,15 @@ var init_pgPushUtils = __esm({
|
|
25709
25726
|
}
|
25710
25727
|
});
|
25711
25728
|
|
25712
|
-
// src/sqlite
|
25729
|
+
// src/introspect-sqlite.ts
|
25730
|
+
var introspect_sqlite_exports = {};
|
25731
|
+
__export(introspect_sqlite_exports, {
|
25732
|
+
indexName: () => indexName3,
|
25733
|
+
schemaToTypeScript: () => schemaToTypeScript2
|
25734
|
+
});
|
25713
25735
|
var sqliteImportsList, indexName3, objToStatement22, relations2, withCasing2, schemaToTypeScript2, isCyclic2, isSelf2, mapColumnDefault, column5, createTableColumns2, createTableIndexes2, createTableUniques2, createTablePKs2, createTableFKs2;
|
25714
|
-
var
|
25715
|
-
"src/sqlite
|
25736
|
+
var init_introspect_sqlite = __esm({
|
25737
|
+
"src/introspect-sqlite.ts"() {
|
25716
25738
|
init_utils2();
|
25717
25739
|
sqliteImportsList = /* @__PURE__ */ new Set([
|
25718
25740
|
"sqliteTable",
|
@@ -25829,15 +25851,20 @@ var init_sqlite_introspect = __esm({
|
|
25829
25851
|
"AnySQLiteColumn",
|
25830
25852
|
...new Set(imports.sqlite)
|
25831
25853
|
];
|
25832
|
-
|
25854
|
+
const importsTs = `import { ${uniqueSqliteImports.join(
|
25833
25855
|
", "
|
25834
25856
|
)} } from "drizzle-orm/sqlite-core"
|
25835
|
-
import { sql } from "drizzle-orm"
|
25857
|
+
import { sql } from "drizzle-orm"
|
25836
25858
|
|
25837
25859
|
`;
|
25838
|
-
|
25839
|
-
|
25840
|
-
|
25860
|
+
const decalrations = tableStatements.join("\n\n");
|
25861
|
+
const file = importsTs + decalrations;
|
25862
|
+
const schemaEntry = `
|
25863
|
+
{
|
25864
|
+
${Object.values(schema4.tables).map((it) => withCasing2(it.name, casing)).join(",")}
|
25865
|
+
}
|
25866
|
+
`;
|
25867
|
+
return { file, imports: importsTs, decalrations, schemaEntry };
|
25841
25868
|
};
|
25842
25869
|
isCyclic2 = (fk4) => {
|
25843
25870
|
const key = `${fk4.tableFrom}-${fk4.tableTo}`;
|
@@ -26011,7 +26038,7 @@ var init_sqliteIntrospect = __esm({
|
|
26011
26038
|
init_views();
|
26012
26039
|
init_global();
|
26013
26040
|
init_sqliteSerializer();
|
26014
|
-
|
26041
|
+
init_introspect_sqlite();
|
26015
26042
|
init_mjs();
|
26016
26043
|
import_hanji7 = __toESM(require_hanji());
|
26017
26044
|
connectToSQLite = async (config) => {
|
@@ -26091,673 +26118,827 @@ var init_sqliteIntrospect = __esm({
|
|
26091
26118
|
}
|
26092
26119
|
});
|
26093
26120
|
|
26094
|
-
//
|
26095
|
-
var
|
26096
|
-
|
26097
|
-
|
26098
|
-
|
26099
|
-
|
26100
|
-
|
26101
|
-
|
26102
|
-
|
26103
|
-
|
26104
|
-
|
26105
|
-
|
26106
|
-
|
26107
|
-
|
26108
|
-
|
26109
|
-
|
26110
|
-
|
26121
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
|
26122
|
+
var require_constants = __commonJS({
|
26123
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js"(exports, module2) {
|
26124
|
+
var SEMVER_SPEC_VERSION = "2.0.0";
|
26125
|
+
var MAX_LENGTH = 256;
|
26126
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
26127
|
+
9007199254740991;
|
26128
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
26129
|
+
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
26130
|
+
var RELEASE_TYPES = [
|
26131
|
+
"major",
|
26132
|
+
"premajor",
|
26133
|
+
"minor",
|
26134
|
+
"preminor",
|
26135
|
+
"patch",
|
26136
|
+
"prepatch",
|
26137
|
+
"prerelease"
|
26138
|
+
];
|
26139
|
+
module2.exports = {
|
26140
|
+
MAX_LENGTH,
|
26141
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
26142
|
+
MAX_SAFE_BUILD_LENGTH,
|
26143
|
+
MAX_SAFE_INTEGER,
|
26144
|
+
RELEASE_TYPES,
|
26145
|
+
SEMVER_SPEC_VERSION,
|
26146
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
26147
|
+
FLAG_LOOSE: 2
|
26111
26148
|
};
|
26112
|
-
|
26113
|
-
|
26114
|
-
|
26115
|
-
|
26116
|
-
|
26117
|
-
|
26118
|
-
|
26119
|
-
|
26120
|
-
|
26121
|
-
|
26122
|
-
|
26123
|
-
|
26124
|
-
|
26125
|
-
|
26126
|
-
|
26127
|
-
|
26128
|
-
|
26149
|
+
}
|
26150
|
+
});
|
26151
|
+
|
26152
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js
|
26153
|
+
var require_debug = __commonJS({
|
26154
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js"(exports, module2) {
|
26155
|
+
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
26156
|
+
};
|
26157
|
+
module2.exports = debug;
|
26158
|
+
}
|
26159
|
+
});
|
26160
|
+
|
26161
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js
|
26162
|
+
var require_re = __commonJS({
|
26163
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js"(exports, module2) {
|
26164
|
+
var {
|
26165
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
26166
|
+
MAX_SAFE_BUILD_LENGTH,
|
26167
|
+
MAX_LENGTH
|
26168
|
+
} = require_constants();
|
26169
|
+
var debug = require_debug();
|
26170
|
+
exports = module2.exports = {};
|
26171
|
+
var re = exports.re = [];
|
26172
|
+
var safeRe = exports.safeRe = [];
|
26173
|
+
var src = exports.src = [];
|
26174
|
+
var t = exports.t = {};
|
26175
|
+
var R = 0;
|
26176
|
+
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
26177
|
+
var safeRegexReplacements = [
|
26178
|
+
["\\s", 1],
|
26179
|
+
["\\d", MAX_LENGTH],
|
26180
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
26181
|
+
];
|
26182
|
+
var makeSafeRegex = (value) => {
|
26183
|
+
for (const [token, max] of safeRegexReplacements) {
|
26184
|
+
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
26129
26185
|
}
|
26130
|
-
|
26186
|
+
return value;
|
26131
26187
|
};
|
26132
|
-
|
26133
|
-
|
26134
|
-
|
26135
|
-
|
26136
|
-
|
26137
|
-
|
26188
|
+
var createToken = (name, value, isGlobal) => {
|
26189
|
+
const safe = makeSafeRegex(value);
|
26190
|
+
const index4 = R++;
|
26191
|
+
debug(name, index4, value);
|
26192
|
+
t[name] = index4;
|
26193
|
+
src[index4] = value;
|
26194
|
+
re[index4] = new RegExp(value, isGlobal ? "g" : void 0);
|
26195
|
+
safeRe[index4] = new RegExp(safe, isGlobal ? "g" : void 0);
|
26196
|
+
};
|
26197
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
26198
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
26199
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
26200
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
26201
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
26202
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
26203
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
26204
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
26205
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
26206
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
26207
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
26208
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
26209
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
26210
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
26211
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
26212
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
26213
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
26214
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
26215
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
26216
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
26217
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
26218
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
26219
|
+
createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
|
26220
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
26221
|
+
createToken("LONETILDE", "(?:~>?)");
|
26222
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
26223
|
+
exports.tildeTrimReplace = "$1~";
|
26224
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
26225
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
26226
|
+
createToken("LONECARET", "(?:\\^)");
|
26227
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
26228
|
+
exports.caretTrimReplace = "$1^";
|
26229
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
26230
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
26231
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
26232
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
26233
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
26234
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
26235
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
26236
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
26237
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
26238
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
26239
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
26240
|
+
}
|
26241
|
+
});
|
26242
|
+
|
26243
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js
|
26244
|
+
var require_parse_options = __commonJS({
|
26245
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js"(exports, module2) {
|
26246
|
+
var looseOption = Object.freeze({ loose: true });
|
26247
|
+
var emptyOpts = Object.freeze({});
|
26248
|
+
var parseOptions = (options) => {
|
26249
|
+
if (!options) {
|
26250
|
+
return emptyOpts;
|
26251
|
+
}
|
26252
|
+
if (typeof options !== "object") {
|
26253
|
+
return looseOption;
|
26138
26254
|
}
|
26255
|
+
return options;
|
26139
26256
|
};
|
26257
|
+
module2.exports = parseOptions;
|
26140
26258
|
}
|
26141
26259
|
});
|
26142
26260
|
|
26143
|
-
// node_modules/.pnpm/
|
26144
|
-
var
|
26145
|
-
"node_modules/.pnpm/
|
26146
|
-
var
|
26147
|
-
var
|
26148
|
-
|
26149
|
-
|
26150
|
-
|
26151
|
-
|
26152
|
-
|
26153
|
-
" ": "\\t",
|
26154
|
-
"\n": "\\n",
|
26155
|
-
"\r": "\\r",
|
26156
|
-
"": "\\Z",
|
26157
|
-
'"': '\\"',
|
26158
|
-
"'": "\\'",
|
26159
|
-
"\\": "\\\\"
|
26160
|
-
};
|
26161
|
-
SqlString.escapeId = function escapeId(val, forbidQualified) {
|
26162
|
-
if (Array.isArray(val)) {
|
26163
|
-
var sql2 = "";
|
26164
|
-
for (var i = 0; i < val.length; i++) {
|
26165
|
-
sql2 += (i === 0 ? "" : ", ") + SqlString.escapeId(val[i], forbidQualified);
|
26166
|
-
}
|
26167
|
-
return sql2;
|
26168
|
-
} else if (forbidQualified) {
|
26169
|
-
return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``") + "`";
|
26170
|
-
} else {
|
26171
|
-
return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``").replace(QUAL_GLOBAL_REGEXP, "`.`") + "`";
|
26261
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js
|
26262
|
+
var require_identifiers = __commonJS({
|
26263
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js"(exports, module2) {
|
26264
|
+
var numeric = /^[0-9]+$/;
|
26265
|
+
var compareIdentifiers = (a, b) => {
|
26266
|
+
const anum = numeric.test(a);
|
26267
|
+
const bnum = numeric.test(b);
|
26268
|
+
if (anum && bnum) {
|
26269
|
+
a = +a;
|
26270
|
+
b = +b;
|
26172
26271
|
}
|
26272
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
26173
26273
|
};
|
26174
|
-
|
26175
|
-
|
26176
|
-
|
26177
|
-
|
26178
|
-
|
26179
|
-
|
26180
|
-
|
26181
|
-
|
26182
|
-
|
26183
|
-
|
26184
|
-
|
26185
|
-
|
26186
|
-
|
26187
|
-
|
26188
|
-
|
26189
|
-
|
26190
|
-
|
26191
|
-
|
26192
|
-
|
26193
|
-
|
26274
|
+
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
26275
|
+
module2.exports = {
|
26276
|
+
compareIdentifiers,
|
26277
|
+
rcompareIdentifiers
|
26278
|
+
};
|
26279
|
+
}
|
26280
|
+
});
|
26281
|
+
|
26282
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js
|
26283
|
+
var require_semver = __commonJS({
|
26284
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js"(exports, module2) {
|
26285
|
+
var debug = require_debug();
|
26286
|
+
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
26287
|
+
var { safeRe: re, t } = require_re();
|
26288
|
+
var parseOptions = require_parse_options();
|
26289
|
+
var { compareIdentifiers } = require_identifiers();
|
26290
|
+
var SemVer = class _SemVer {
|
26291
|
+
constructor(version, options) {
|
26292
|
+
options = parseOptions(options);
|
26293
|
+
if (version instanceof _SemVer) {
|
26294
|
+
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
26295
|
+
return version;
|
26194
26296
|
} else {
|
26195
|
-
|
26297
|
+
version = version.version;
|
26196
26298
|
}
|
26197
|
-
|
26198
|
-
|
26199
|
-
|
26200
|
-
|
26201
|
-
|
26202
|
-
|
26203
|
-
|
26204
|
-
|
26205
|
-
|
26206
|
-
|
26299
|
+
} else if (typeof version !== "string") {
|
26300
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
26301
|
+
}
|
26302
|
+
if (version.length > MAX_LENGTH) {
|
26303
|
+
throw new TypeError(
|
26304
|
+
`version is longer than ${MAX_LENGTH} characters`
|
26305
|
+
);
|
26306
|
+
}
|
26307
|
+
debug("SemVer", version, options);
|
26308
|
+
this.options = options;
|
26309
|
+
this.loose = !!options.loose;
|
26310
|
+
this.includePrerelease = !!options.includePrerelease;
|
26311
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
26312
|
+
if (!m) {
|
26313
|
+
throw new TypeError(`Invalid Version: ${version}`);
|
26314
|
+
}
|
26315
|
+
this.raw = version;
|
26316
|
+
this.major = +m[1];
|
26317
|
+
this.minor = +m[2];
|
26318
|
+
this.patch = +m[3];
|
26319
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
26320
|
+
throw new TypeError("Invalid major version");
|
26321
|
+
}
|
26322
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
26323
|
+
throw new TypeError("Invalid minor version");
|
26324
|
+
}
|
26325
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
26326
|
+
throw new TypeError("Invalid patch version");
|
26327
|
+
}
|
26328
|
+
if (!m[4]) {
|
26329
|
+
this.prerelease = [];
|
26207
26330
|
} else {
|
26208
|
-
|
26331
|
+
this.prerelease = m[4].split(".").map((id) => {
|
26332
|
+
if (/^[0-9]+$/.test(id)) {
|
26333
|
+
const num = +id;
|
26334
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
26335
|
+
return num;
|
26336
|
+
}
|
26337
|
+
}
|
26338
|
+
return id;
|
26339
|
+
});
|
26209
26340
|
}
|
26341
|
+
this.build = m[5] ? m[5].split(".") : [];
|
26342
|
+
this.format();
|
26210
26343
|
}
|
26211
|
-
|
26212
|
-
|
26213
|
-
|
26214
|
-
|
26215
|
-
|
26344
|
+
format() {
|
26345
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
26346
|
+
if (this.prerelease.length) {
|
26347
|
+
this.version += `-${this.prerelease.join(".")}`;
|
26348
|
+
}
|
26349
|
+
return this.version;
|
26216
26350
|
}
|
26217
|
-
|
26218
|
-
|
26351
|
+
toString() {
|
26352
|
+
return this.version;
|
26219
26353
|
}
|
26220
|
-
|
26221
|
-
|
26222
|
-
|
26223
|
-
|
26224
|
-
|
26225
|
-
|
26226
|
-
|
26227
|
-
if (len > 2) {
|
26228
|
-
continue;
|
26354
|
+
compare(other) {
|
26355
|
+
debug("SemVer.compare", this.version, this.options, other);
|
26356
|
+
if (!(other instanceof _SemVer)) {
|
26357
|
+
if (typeof other === "string" && other === this.version) {
|
26358
|
+
return 0;
|
26359
|
+
}
|
26360
|
+
other = new _SemVer(other, this.options);
|
26229
26361
|
}
|
26230
|
-
|
26231
|
-
|
26232
|
-
|
26233
|
-
|
26362
|
+
if (other.version === this.version) {
|
26363
|
+
return 0;
|
26364
|
+
}
|
26365
|
+
return this.compareMain(other) || this.comparePre(other);
|
26234
26366
|
}
|
26235
|
-
|
26236
|
-
|
26367
|
+
compareMain(other) {
|
26368
|
+
if (!(other instanceof _SemVer)) {
|
26369
|
+
other = new _SemVer(other, this.options);
|
26370
|
+
}
|
26371
|
+
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
26237
26372
|
}
|
26238
|
-
|
26239
|
-
|
26373
|
+
comparePre(other) {
|
26374
|
+
if (!(other instanceof _SemVer)) {
|
26375
|
+
other = new _SemVer(other, this.options);
|
26376
|
+
}
|
26377
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
26378
|
+
return -1;
|
26379
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
26380
|
+
return 1;
|
26381
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
26382
|
+
return 0;
|
26383
|
+
}
|
26384
|
+
let i = 0;
|
26385
|
+
do {
|
26386
|
+
const a = this.prerelease[i];
|
26387
|
+
const b = other.prerelease[i];
|
26388
|
+
debug("prerelease compare", i, a, b);
|
26389
|
+
if (a === void 0 && b === void 0) {
|
26390
|
+
return 0;
|
26391
|
+
} else if (b === void 0) {
|
26392
|
+
return 1;
|
26393
|
+
} else if (a === void 0) {
|
26394
|
+
return -1;
|
26395
|
+
} else if (a === b) {
|
26396
|
+
continue;
|
26397
|
+
} else {
|
26398
|
+
return compareIdentifiers(a, b);
|
26399
|
+
}
|
26400
|
+
} while (++i);
|
26401
|
+
}
|
26402
|
+
compareBuild(other) {
|
26403
|
+
if (!(other instanceof _SemVer)) {
|
26404
|
+
other = new _SemVer(other, this.options);
|
26405
|
+
}
|
26406
|
+
let i = 0;
|
26407
|
+
do {
|
26408
|
+
const a = this.build[i];
|
26409
|
+
const b = other.build[i];
|
26410
|
+
debug("prerelease compare", i, a, b);
|
26411
|
+
if (a === void 0 && b === void 0) {
|
26412
|
+
return 0;
|
26413
|
+
} else if (b === void 0) {
|
26414
|
+
return 1;
|
26415
|
+
} else if (a === void 0) {
|
26416
|
+
return -1;
|
26417
|
+
} else if (a === b) {
|
26418
|
+
continue;
|
26419
|
+
} else {
|
26420
|
+
return compareIdentifiers(a, b);
|
26421
|
+
}
|
26422
|
+
} while (++i);
|
26423
|
+
}
|
26424
|
+
// preminor will bump the version up to the next minor release, and immediately
|
26425
|
+
// down to pre-release. premajor and prepatch work the same way.
|
26426
|
+
inc(release, identifier, identifierBase) {
|
26427
|
+
switch (release) {
|
26428
|
+
case "premajor":
|
26429
|
+
this.prerelease.length = 0;
|
26430
|
+
this.patch = 0;
|
26431
|
+
this.minor = 0;
|
26432
|
+
this.major++;
|
26433
|
+
this.inc("pre", identifier, identifierBase);
|
26434
|
+
break;
|
26435
|
+
case "preminor":
|
26436
|
+
this.prerelease.length = 0;
|
26437
|
+
this.patch = 0;
|
26438
|
+
this.minor++;
|
26439
|
+
this.inc("pre", identifier, identifierBase);
|
26440
|
+
break;
|
26441
|
+
case "prepatch":
|
26442
|
+
this.prerelease.length = 0;
|
26443
|
+
this.inc("patch", identifier, identifierBase);
|
26444
|
+
this.inc("pre", identifier, identifierBase);
|
26445
|
+
break;
|
26446
|
+
case "prerelease":
|
26447
|
+
if (this.prerelease.length === 0) {
|
26448
|
+
this.inc("patch", identifier, identifierBase);
|
26449
|
+
}
|
26450
|
+
this.inc("pre", identifier, identifierBase);
|
26451
|
+
break;
|
26452
|
+
case "major":
|
26453
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
26454
|
+
this.major++;
|
26455
|
+
}
|
26456
|
+
this.minor = 0;
|
26457
|
+
this.patch = 0;
|
26458
|
+
this.prerelease = [];
|
26459
|
+
break;
|
26460
|
+
case "minor":
|
26461
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
26462
|
+
this.minor++;
|
26463
|
+
}
|
26464
|
+
this.patch = 0;
|
26465
|
+
this.prerelease = [];
|
26466
|
+
break;
|
26467
|
+
case "patch":
|
26468
|
+
if (this.prerelease.length === 0) {
|
26469
|
+
this.patch++;
|
26470
|
+
}
|
26471
|
+
this.prerelease = [];
|
26472
|
+
break;
|
26473
|
+
case "pre": {
|
26474
|
+
const base = Number(identifierBase) ? 1 : 0;
|
26475
|
+
if (!identifier && identifierBase === false) {
|
26476
|
+
throw new Error("invalid increment argument: identifier is empty");
|
26477
|
+
}
|
26478
|
+
if (this.prerelease.length === 0) {
|
26479
|
+
this.prerelease = [base];
|
26480
|
+
} else {
|
26481
|
+
let i = this.prerelease.length;
|
26482
|
+
while (--i >= 0) {
|
26483
|
+
if (typeof this.prerelease[i] === "number") {
|
26484
|
+
this.prerelease[i]++;
|
26485
|
+
i = -2;
|
26486
|
+
}
|
26487
|
+
}
|
26488
|
+
if (i === -1) {
|
26489
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
26490
|
+
throw new Error("invalid increment argument: identifier already exists");
|
26491
|
+
}
|
26492
|
+
this.prerelease.push(base);
|
26493
|
+
}
|
26494
|
+
}
|
26495
|
+
if (identifier) {
|
26496
|
+
let prerelease = [identifier, base];
|
26497
|
+
if (identifierBase === false) {
|
26498
|
+
prerelease = [identifier];
|
26499
|
+
}
|
26500
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
26501
|
+
if (isNaN(this.prerelease[1])) {
|
26502
|
+
this.prerelease = prerelease;
|
26503
|
+
}
|
26504
|
+
} else {
|
26505
|
+
this.prerelease = prerelease;
|
26506
|
+
}
|
26507
|
+
}
|
26508
|
+
break;
|
26509
|
+
}
|
26510
|
+
default:
|
26511
|
+
throw new Error(`invalid increment argument: ${release}`);
|
26512
|
+
}
|
26513
|
+
this.raw = this.format();
|
26514
|
+
if (this.build.length) {
|
26515
|
+
this.raw += `+${this.build.join(".")}`;
|
26516
|
+
}
|
26517
|
+
return this;
|
26240
26518
|
}
|
26241
|
-
return result;
|
26242
26519
|
};
|
26243
|
-
|
26244
|
-
|
26245
|
-
|
26246
|
-
|
26520
|
+
module2.exports = SemVer;
|
26521
|
+
}
|
26522
|
+
});
|
26523
|
+
|
26524
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js
|
26525
|
+
var require_parse = __commonJS({
|
26526
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js"(exports, module2) {
|
26527
|
+
var SemVer = require_semver();
|
26528
|
+
var parse = (version, options, throwErrors = false) => {
|
26529
|
+
if (version instanceof SemVer) {
|
26530
|
+
return version;
|
26247
26531
|
}
|
26248
|
-
|
26249
|
-
|
26250
|
-
|
26251
|
-
|
26252
|
-
|
26253
|
-
var second;
|
26254
|
-
var millisecond;
|
26255
|
-
if (timeZone === "local") {
|
26256
|
-
year = dt.getFullYear();
|
26257
|
-
month = dt.getMonth() + 1;
|
26258
|
-
day = dt.getDate();
|
26259
|
-
hour = dt.getHours();
|
26260
|
-
minute = dt.getMinutes();
|
26261
|
-
second = dt.getSeconds();
|
26262
|
-
millisecond = dt.getMilliseconds();
|
26263
|
-
} else {
|
26264
|
-
var tz = convertTimezone(timeZone);
|
26265
|
-
if (tz !== false && tz !== 0) {
|
26266
|
-
dt.setTime(dt.getTime() + tz * 6e4);
|
26532
|
+
try {
|
26533
|
+
return new SemVer(version, options);
|
26534
|
+
} catch (er) {
|
26535
|
+
if (!throwErrors) {
|
26536
|
+
return null;
|
26267
26537
|
}
|
26268
|
-
|
26269
|
-
month = dt.getUTCMonth() + 1;
|
26270
|
-
day = dt.getUTCDate();
|
26271
|
-
hour = dt.getUTCHours();
|
26272
|
-
minute = dt.getUTCMinutes();
|
26273
|
-
second = dt.getUTCSeconds();
|
26274
|
-
millisecond = dt.getUTCMilliseconds();
|
26538
|
+
throw er;
|
26275
26539
|
}
|
26276
|
-
var str = zeroPad(year, 4) + "-" + zeroPad(month, 2) + "-" + zeroPad(day, 2) + " " + zeroPad(hour, 2) + ":" + zeroPad(minute, 2) + ":" + zeroPad(second, 2) + "." + zeroPad(millisecond, 3);
|
26277
|
-
return escapeString(str);
|
26278
26540
|
};
|
26279
|
-
|
26280
|
-
|
26541
|
+
module2.exports = parse;
|
26542
|
+
}
|
26543
|
+
});
|
26544
|
+
|
26545
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js
|
26546
|
+
var require_valid = __commonJS({
|
26547
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js"(exports, module2) {
|
26548
|
+
var parse = require_parse();
|
26549
|
+
var valid = (version, options) => {
|
26550
|
+
const v = parse(version, options);
|
26551
|
+
return v ? v.version : null;
|
26281
26552
|
};
|
26282
|
-
|
26283
|
-
|
26284
|
-
|
26285
|
-
|
26286
|
-
|
26287
|
-
|
26288
|
-
|
26289
|
-
|
26553
|
+
module2.exports = valid;
|
26554
|
+
}
|
26555
|
+
});
|
26556
|
+
|
26557
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js
|
26558
|
+
var require_clean = __commonJS({
|
26559
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js"(exports, module2) {
|
26560
|
+
var parse = require_parse();
|
26561
|
+
var clean = (version, options) => {
|
26562
|
+
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
26563
|
+
return s ? s.version : null;
|
26564
|
+
};
|
26565
|
+
module2.exports = clean;
|
26566
|
+
}
|
26567
|
+
});
|
26568
|
+
|
26569
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js
|
26570
|
+
var require_inc = __commonJS({
|
26571
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js"(exports, module2) {
|
26572
|
+
var SemVer = require_semver();
|
26573
|
+
var inc = (version, release, options, identifier, identifierBase) => {
|
26574
|
+
if (typeof options === "string") {
|
26575
|
+
identifierBase = identifier;
|
26576
|
+
identifier = options;
|
26577
|
+
options = void 0;
|
26578
|
+
}
|
26579
|
+
try {
|
26580
|
+
return new SemVer(
|
26581
|
+
version instanceof SemVer ? version.version : version,
|
26582
|
+
options
|
26583
|
+
).inc(release, identifier, identifierBase).version;
|
26584
|
+
} catch (er) {
|
26585
|
+
return null;
|
26290
26586
|
}
|
26291
|
-
return sql2;
|
26292
26587
|
};
|
26293
|
-
|
26294
|
-
|
26295
|
-
|
26588
|
+
module2.exports = inc;
|
26589
|
+
}
|
26590
|
+
});
|
26591
|
+
|
26592
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js
|
26593
|
+
var require_diff = __commonJS({
|
26594
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js"(exports, module2) {
|
26595
|
+
var parse = require_parse();
|
26596
|
+
var diff2 = (version1, version2) => {
|
26597
|
+
const v1 = parse(version1, null, true);
|
26598
|
+
const v2 = parse(version2, null, true);
|
26599
|
+
const comparison = v1.compare(v2);
|
26600
|
+
if (comparison === 0) {
|
26601
|
+
return null;
|
26296
26602
|
}
|
26297
|
-
|
26298
|
-
|
26299
|
-
|
26603
|
+
const v1Higher = comparison > 0;
|
26604
|
+
const highVersion = v1Higher ? v1 : v2;
|
26605
|
+
const lowVersion = v1Higher ? v2 : v1;
|
26606
|
+
const highHasPre = !!highVersion.prerelease.length;
|
26607
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
26608
|
+
if (lowHasPre && !highHasPre) {
|
26609
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
26610
|
+
return "major";
|
26300
26611
|
}
|
26301
|
-
|
26612
|
+
if (highVersion.patch) {
|
26613
|
+
return "patch";
|
26614
|
+
}
|
26615
|
+
if (highVersion.minor) {
|
26616
|
+
return "minor";
|
26617
|
+
}
|
26618
|
+
return "major";
|
26619
|
+
}
|
26620
|
+
const prefix = highHasPre ? "pre" : "";
|
26621
|
+
if (v1.major !== v2.major) {
|
26622
|
+
return prefix + "major";
|
26623
|
+
}
|
26624
|
+
if (v1.minor !== v2.minor) {
|
26625
|
+
return prefix + "minor";
|
26626
|
+
}
|
26627
|
+
if (v1.patch !== v2.patch) {
|
26628
|
+
return prefix + "patch";
|
26629
|
+
}
|
26630
|
+
return "prerelease";
|
26302
26631
|
};
|
26303
|
-
|
26304
|
-
|
26305
|
-
|
26306
|
-
|
26307
|
-
|
26308
|
-
|
26309
|
-
|
26632
|
+
module2.exports = diff2;
|
26633
|
+
}
|
26634
|
+
});
|
26635
|
+
|
26636
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js
|
26637
|
+
var require_major = __commonJS({
|
26638
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js"(exports, module2) {
|
26639
|
+
var SemVer = require_semver();
|
26640
|
+
var major = (a, loose) => new SemVer(a, loose).major;
|
26641
|
+
module2.exports = major;
|
26642
|
+
}
|
26643
|
+
});
|
26644
|
+
|
26645
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js
|
26646
|
+
var require_minor = __commonJS({
|
26647
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js"(exports, module2) {
|
26648
|
+
var SemVer = require_semver();
|
26649
|
+
var minor = (a, loose) => new SemVer(a, loose).minor;
|
26650
|
+
module2.exports = minor;
|
26651
|
+
}
|
26652
|
+
});
|
26653
|
+
|
26654
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js
|
26655
|
+
var require_patch = __commonJS({
|
26656
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js"(exports, module2) {
|
26657
|
+
var SemVer = require_semver();
|
26658
|
+
var patch = (a, loose) => new SemVer(a, loose).patch;
|
26659
|
+
module2.exports = patch;
|
26660
|
+
}
|
26661
|
+
});
|
26662
|
+
|
26663
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js
|
26664
|
+
var require_prerelease = __commonJS({
|
26665
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js"(exports, module2) {
|
26666
|
+
var parse = require_parse();
|
26667
|
+
var prerelease = (version, options) => {
|
26668
|
+
const parsed = parse(version, options);
|
26669
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
26670
|
+
};
|
26671
|
+
module2.exports = prerelease;
|
26672
|
+
}
|
26673
|
+
});
|
26674
|
+
|
26675
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js
|
26676
|
+
var require_compare = __commonJS({
|
26677
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js"(exports, module2) {
|
26678
|
+
var SemVer = require_semver();
|
26679
|
+
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
26680
|
+
module2.exports = compare;
|
26681
|
+
}
|
26682
|
+
});
|
26683
|
+
|
26684
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js
|
26685
|
+
var require_rcompare = __commonJS({
|
26686
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js"(exports, module2) {
|
26687
|
+
var compare = require_compare();
|
26688
|
+
var rcompare = (a, b, loose) => compare(b, a, loose);
|
26689
|
+
module2.exports = rcompare;
|
26690
|
+
}
|
26691
|
+
});
|
26692
|
+
|
26693
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js
|
26694
|
+
var require_compare_loose = __commonJS({
|
26695
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js"(exports, module2) {
|
26696
|
+
var compare = require_compare();
|
26697
|
+
var compareLoose = (a, b) => compare(a, b, true);
|
26698
|
+
module2.exports = compareLoose;
|
26699
|
+
}
|
26700
|
+
});
|
26701
|
+
|
26702
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js
|
26703
|
+
var require_compare_build = __commonJS({
|
26704
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js"(exports, module2) {
|
26705
|
+
var SemVer = require_semver();
|
26706
|
+
var compareBuild = (a, b, loose) => {
|
26707
|
+
const versionA = new SemVer(a, loose);
|
26708
|
+
const versionB = new SemVer(b, loose);
|
26709
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
26710
|
+
};
|
26711
|
+
module2.exports = compareBuild;
|
26712
|
+
}
|
26713
|
+
});
|
26714
|
+
|
26715
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js
|
26716
|
+
var require_sort = __commonJS({
|
26717
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js"(exports, module2) {
|
26718
|
+
var compareBuild = require_compare_build();
|
26719
|
+
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
26720
|
+
module2.exports = sort;
|
26721
|
+
}
|
26722
|
+
});
|
26723
|
+
|
26724
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js
|
26725
|
+
var require_rsort = __commonJS({
|
26726
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js"(exports, module2) {
|
26727
|
+
var compareBuild = require_compare_build();
|
26728
|
+
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
26729
|
+
module2.exports = rsort;
|
26730
|
+
}
|
26731
|
+
});
|
26732
|
+
|
26733
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js
|
26734
|
+
var require_gt = __commonJS({
|
26735
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js"(exports, module2) {
|
26736
|
+
var compare = require_compare();
|
26737
|
+
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
26738
|
+
module2.exports = gt;
|
26739
|
+
}
|
26740
|
+
});
|
26741
|
+
|
26742
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js
|
26743
|
+
var require_lt = __commonJS({
|
26744
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js"(exports, module2) {
|
26745
|
+
var compare = require_compare();
|
26746
|
+
var lt = (a, b, loose) => compare(a, b, loose) < 0;
|
26747
|
+
module2.exports = lt;
|
26748
|
+
}
|
26749
|
+
});
|
26750
|
+
|
26751
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js
|
26752
|
+
var require_eq = __commonJS({
|
26753
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js"(exports, module2) {
|
26754
|
+
var compare = require_compare();
|
26755
|
+
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
26756
|
+
module2.exports = eq;
|
26757
|
+
}
|
26758
|
+
});
|
26759
|
+
|
26760
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js
|
26761
|
+
var require_neq = __commonJS({
|
26762
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js"(exports, module2) {
|
26763
|
+
var compare = require_compare();
|
26764
|
+
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
26765
|
+
module2.exports = neq;
|
26766
|
+
}
|
26767
|
+
});
|
26768
|
+
|
26769
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js
|
26770
|
+
var require_gte = __commonJS({
|
26771
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js"(exports, module2) {
|
26772
|
+
var compare = require_compare();
|
26773
|
+
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
26774
|
+
module2.exports = gte;
|
26775
|
+
}
|
26776
|
+
});
|
26777
|
+
|
26778
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js
|
26779
|
+
var require_lte = __commonJS({
|
26780
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js"(exports, module2) {
|
26781
|
+
var compare = require_compare();
|
26782
|
+
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
26783
|
+
module2.exports = lte;
|
26784
|
+
}
|
26785
|
+
});
|
26786
|
+
|
26787
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js
|
26788
|
+
var require_cmp = __commonJS({
|
26789
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js"(exports, module2) {
|
26790
|
+
var eq = require_eq();
|
26791
|
+
var neq = require_neq();
|
26792
|
+
var gt = require_gt();
|
26793
|
+
var gte = require_gte();
|
26794
|
+
var lt = require_lt();
|
26795
|
+
var lte = require_lte();
|
26796
|
+
var cmp = (a, op, b, loose) => {
|
26797
|
+
switch (op) {
|
26798
|
+
case "===":
|
26799
|
+
if (typeof a === "object") {
|
26800
|
+
a = a.version;
|
26801
|
+
}
|
26802
|
+
if (typeof b === "object") {
|
26803
|
+
b = b.version;
|
26804
|
+
}
|
26805
|
+
return a === b;
|
26806
|
+
case "!==":
|
26807
|
+
if (typeof a === "object") {
|
26808
|
+
a = a.version;
|
26809
|
+
}
|
26810
|
+
if (typeof b === "object") {
|
26811
|
+
b = b.version;
|
26812
|
+
}
|
26813
|
+
return a !== b;
|
26814
|
+
case "":
|
26815
|
+
case "=":
|
26816
|
+
case "==":
|
26817
|
+
return eq(a, b, loose);
|
26818
|
+
case "!=":
|
26819
|
+
return neq(a, b, loose);
|
26820
|
+
case ">":
|
26821
|
+
return gt(a, b, loose);
|
26822
|
+
case ">=":
|
26823
|
+
return gte(a, b, loose);
|
26824
|
+
case "<":
|
26825
|
+
return lt(a, b, loose);
|
26826
|
+
case "<=":
|
26827
|
+
return lte(a, b, loose);
|
26828
|
+
default:
|
26829
|
+
throw new TypeError(`Invalid operator: ${op}`);
|
26310
26830
|
}
|
26311
|
-
|
26312
|
-
|
26831
|
+
};
|
26832
|
+
module2.exports = cmp;
|
26833
|
+
}
|
26834
|
+
});
|
26835
|
+
|
26836
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js
|
26837
|
+
var require_coerce = __commonJS({
|
26838
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js"(exports, module2) {
|
26839
|
+
var SemVer = require_semver();
|
26840
|
+
var parse = require_parse();
|
26841
|
+
var { safeRe: re, t } = require_re();
|
26842
|
+
var coerce2 = (version, options) => {
|
26843
|
+
if (version instanceof SemVer) {
|
26844
|
+
return version;
|
26313
26845
|
}
|
26314
|
-
if (
|
26315
|
-
|
26846
|
+
if (typeof version === "number") {
|
26847
|
+
version = String(version);
|
26316
26848
|
}
|
26317
|
-
|
26318
|
-
|
26319
|
-
function zeroPad(number, length) {
|
26320
|
-
number = number.toString();
|
26321
|
-
while (number.length < length) {
|
26322
|
-
number = "0" + number;
|
26849
|
+
if (typeof version !== "string") {
|
26850
|
+
return null;
|
26323
26851
|
}
|
26324
|
-
|
26325
|
-
|
26326
|
-
|
26327
|
-
|
26328
|
-
|
26852
|
+
options = options || {};
|
26853
|
+
let match2 = null;
|
26854
|
+
if (!options.rtl) {
|
26855
|
+
match2 = version.match(re[t.COERCE]);
|
26856
|
+
} else {
|
26857
|
+
let next;
|
26858
|
+
while ((next = re[t.COERCERTL].exec(version)) && (!match2 || match2.index + match2[0].length !== version.length)) {
|
26859
|
+
if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) {
|
26860
|
+
match2 = next;
|
26861
|
+
}
|
26862
|
+
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
|
26863
|
+
}
|
26864
|
+
re[t.COERCERTL].lastIndex = -1;
|
26329
26865
|
}
|
26330
|
-
|
26331
|
-
|
26332
|
-
return (m[1] === "-" ? -1 : 1) * (parseInt(m[2], 10) + (m[3] ? parseInt(m[3], 10) : 0) / 60) * 60;
|
26866
|
+
if (match2 === null) {
|
26867
|
+
return null;
|
26333
26868
|
}
|
26334
|
-
return
|
26335
|
-
}
|
26869
|
+
return parse(`${match2[2]}.${match2[3] || "0"}.${match2[4] || "0"}`, options);
|
26870
|
+
};
|
26871
|
+
module2.exports = coerce2;
|
26336
26872
|
}
|
26337
26873
|
});
|
26338
26874
|
|
26339
|
-
// node_modules/.pnpm/
|
26340
|
-
var
|
26341
|
-
"node_modules/.pnpm/
|
26342
|
-
|
26875
|
+
// node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js
|
26876
|
+
var require_iterator = __commonJS({
|
26877
|
+
"node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports, module2) {
|
26878
|
+
"use strict";
|
26879
|
+
module2.exports = function(Yallist) {
|
26880
|
+
Yallist.prototype[Symbol.iterator] = function* () {
|
26881
|
+
for (let walker = this.head; walker; walker = walker.next) {
|
26882
|
+
yield walker.value;
|
26883
|
+
}
|
26884
|
+
};
|
26885
|
+
};
|
26343
26886
|
}
|
26344
26887
|
});
|
26345
26888
|
|
26346
|
-
// node_modules/.pnpm/
|
26347
|
-
var
|
26348
|
-
"node_modules/.pnpm/
|
26889
|
+
// node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js
|
26890
|
+
var require_yallist = __commonJS({
|
26891
|
+
"node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports, module2) {
|
26349
26892
|
"use strict";
|
26350
|
-
|
26351
|
-
|
26352
|
-
|
26353
|
-
|
26354
|
-
|
26355
|
-
if (
|
26356
|
-
|
26357
|
-
}
|
26358
|
-
|
26359
|
-
|
26893
|
+
module2.exports = Yallist;
|
26894
|
+
Yallist.Node = Node;
|
26895
|
+
Yallist.create = Yallist;
|
26896
|
+
function Yallist(list) {
|
26897
|
+
var self2 = this;
|
26898
|
+
if (!(self2 instanceof Yallist)) {
|
26899
|
+
self2 = new Yallist();
|
26900
|
+
}
|
26901
|
+
self2.tail = null;
|
26902
|
+
self2.head = null;
|
26903
|
+
self2.length = 0;
|
26904
|
+
if (list && typeof list.forEach === "function") {
|
26905
|
+
list.forEach(function(item) {
|
26906
|
+
self2.push(item);
|
26907
|
+
});
|
26908
|
+
} else if (arguments.length > 0) {
|
26909
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
26910
|
+
self2.push(arguments[i]);
|
26911
|
+
}
|
26360
26912
|
}
|
26913
|
+
return self2;
|
26361
26914
|
}
|
26362
|
-
|
26363
|
-
|
26364
|
-
|
26365
|
-
return void 0;
|
26915
|
+
Yallist.prototype.removeNode = function(node) {
|
26916
|
+
if (node.list !== this) {
|
26917
|
+
throw new Error("removing node which does not belong to this list");
|
26366
26918
|
}
|
26367
|
-
var
|
26368
|
-
|
26369
|
-
|
26370
|
-
|
26371
|
-
|
26372
|
-
|
26373
|
-
|
26374
|
-
|
26375
|
-
|
26376
|
-
|
26377
|
-
|
26378
|
-
|
26379
|
-
|
26380
|
-
|
26381
|
-
|
26382
|
-
|
26383
|
-
|
26384
|
-
|
26385
|
-
|
26386
|
-
Denque.prototype.peekBack = function peekBack() {
|
26387
|
-
return this.peekAt(-1);
|
26919
|
+
var next = node.next;
|
26920
|
+
var prev = node.prev;
|
26921
|
+
if (next) {
|
26922
|
+
next.prev = prev;
|
26923
|
+
}
|
26924
|
+
if (prev) {
|
26925
|
+
prev.next = next;
|
26926
|
+
}
|
26927
|
+
if (node === this.head) {
|
26928
|
+
this.head = next;
|
26929
|
+
}
|
26930
|
+
if (node === this.tail) {
|
26931
|
+
this.tail = prev;
|
26932
|
+
}
|
26933
|
+
node.list.length--;
|
26934
|
+
node.next = null;
|
26935
|
+
node.prev = null;
|
26936
|
+
node.list = null;
|
26937
|
+
return next;
|
26388
26938
|
};
|
26389
|
-
|
26390
|
-
|
26391
|
-
return
|
26392
|
-
}
|
26393
|
-
});
|
26394
|
-
Denque.prototype.size = function size() {
|
26395
|
-
if (this._head === this._tail)
|
26396
|
-
return 0;
|
26397
|
-
if (this._head < this._tail)
|
26398
|
-
return this._tail - this._head;
|
26399
|
-
else
|
26400
|
-
return this._capacityMask + 1 - (this._head - this._tail);
|
26401
|
-
};
|
26402
|
-
Denque.prototype.unshift = function unshift(item) {
|
26403
|
-
if (arguments.length === 0)
|
26404
|
-
return this.size();
|
26405
|
-
var len = this._list.length;
|
26406
|
-
this._head = this._head - 1 + len & this._capacityMask;
|
26407
|
-
this._list[this._head] = item;
|
26408
|
-
if (this._tail === this._head)
|
26409
|
-
this._growArray();
|
26410
|
-
if (this._capacity && this.size() > this._capacity)
|
26411
|
-
this.pop();
|
26412
|
-
if (this._head < this._tail)
|
26413
|
-
return this._tail - this._head;
|
26414
|
-
else
|
26415
|
-
return this._capacityMask + 1 - (this._head - this._tail);
|
26416
|
-
};
|
26417
|
-
Denque.prototype.shift = function shift() {
|
26418
|
-
var head = this._head;
|
26419
|
-
if (head === this._tail)
|
26420
|
-
return void 0;
|
26421
|
-
var item = this._list[head];
|
26422
|
-
this._list[head] = void 0;
|
26423
|
-
this._head = head + 1 & this._capacityMask;
|
26424
|
-
if (head < 2 && this._tail > 1e4 && this._tail <= this._list.length >>> 2)
|
26425
|
-
this._shrinkArray();
|
26426
|
-
return item;
|
26427
|
-
};
|
26428
|
-
Denque.prototype.push = function push(item) {
|
26429
|
-
if (arguments.length === 0)
|
26430
|
-
return this.size();
|
26431
|
-
var tail = this._tail;
|
26432
|
-
this._list[tail] = item;
|
26433
|
-
this._tail = tail + 1 & this._capacityMask;
|
26434
|
-
if (this._tail === this._head) {
|
26435
|
-
this._growArray();
|
26436
|
-
}
|
26437
|
-
if (this._capacity && this.size() > this._capacity) {
|
26438
|
-
this.shift();
|
26439
|
-
}
|
26440
|
-
if (this._head < this._tail)
|
26441
|
-
return this._tail - this._head;
|
26442
|
-
else
|
26443
|
-
return this._capacityMask + 1 - (this._head - this._tail);
|
26444
|
-
};
|
26445
|
-
Denque.prototype.pop = function pop() {
|
26446
|
-
var tail = this._tail;
|
26447
|
-
if (tail === this._head)
|
26448
|
-
return void 0;
|
26449
|
-
var len = this._list.length;
|
26450
|
-
this._tail = tail - 1 + len & this._capacityMask;
|
26451
|
-
var item = this._list[this._tail];
|
26452
|
-
this._list[this._tail] = void 0;
|
26453
|
-
if (this._head < 2 && tail > 1e4 && tail <= len >>> 2)
|
26454
|
-
this._shrinkArray();
|
26455
|
-
return item;
|
26456
|
-
};
|
26457
|
-
Denque.prototype.removeOne = function removeOne(index4) {
|
26458
|
-
var i = index4;
|
26459
|
-
if (i !== (i | 0)) {
|
26460
|
-
return void 0;
|
26461
|
-
}
|
26462
|
-
if (this._head === this._tail)
|
26463
|
-
return void 0;
|
26464
|
-
var size = this.size();
|
26465
|
-
var len = this._list.length;
|
26466
|
-
if (i >= size || i < -size)
|
26467
|
-
return void 0;
|
26468
|
-
if (i < 0)
|
26469
|
-
i += size;
|
26470
|
-
i = this._head + i & this._capacityMask;
|
26471
|
-
var item = this._list[i];
|
26472
|
-
var k;
|
26473
|
-
if (index4 < size / 2) {
|
26474
|
-
for (k = index4; k > 0; k--) {
|
26475
|
-
this._list[i] = this._list[i = i - 1 + len & this._capacityMask];
|
26476
|
-
}
|
26477
|
-
this._list[i] = void 0;
|
26478
|
-
this._head = this._head + 1 + len & this._capacityMask;
|
26479
|
-
} else {
|
26480
|
-
for (k = size - 1 - index4; k > 0; k--) {
|
26481
|
-
this._list[i] = this._list[i = i + 1 + len & this._capacityMask];
|
26482
|
-
}
|
26483
|
-
this._list[i] = void 0;
|
26484
|
-
this._tail = this._tail - 1 + len & this._capacityMask;
|
26485
|
-
}
|
26486
|
-
return item;
|
26487
|
-
};
|
26488
|
-
Denque.prototype.remove = function remove(index4, count) {
|
26489
|
-
var i = index4;
|
26490
|
-
var removed;
|
26491
|
-
var del_count = count;
|
26492
|
-
if (i !== (i | 0)) {
|
26493
|
-
return void 0;
|
26494
|
-
}
|
26495
|
-
if (this._head === this._tail)
|
26496
|
-
return void 0;
|
26497
|
-
var size = this.size();
|
26498
|
-
var len = this._list.length;
|
26499
|
-
if (i >= size || i < -size || count < 1)
|
26500
|
-
return void 0;
|
26501
|
-
if (i < 0)
|
26502
|
-
i += size;
|
26503
|
-
if (count === 1 || !count) {
|
26504
|
-
removed = new Array(1);
|
26505
|
-
removed[0] = this.removeOne(i);
|
26506
|
-
return removed;
|
26507
|
-
}
|
26508
|
-
if (i === 0 && i + count >= size) {
|
26509
|
-
removed = this.toArray();
|
26510
|
-
this.clear();
|
26511
|
-
return removed;
|
26512
|
-
}
|
26513
|
-
if (i + count > size)
|
26514
|
-
count = size - i;
|
26515
|
-
var k;
|
26516
|
-
removed = new Array(count);
|
26517
|
-
for (k = 0; k < count; k++) {
|
26518
|
-
removed[k] = this._list[this._head + i + k & this._capacityMask];
|
26519
|
-
}
|
26520
|
-
i = this._head + i & this._capacityMask;
|
26521
|
-
if (index4 + count === size) {
|
26522
|
-
this._tail = this._tail - count + len & this._capacityMask;
|
26523
|
-
for (k = count; k > 0; k--) {
|
26524
|
-
this._list[i = i + 1 + len & this._capacityMask] = void 0;
|
26525
|
-
}
|
26526
|
-
return removed;
|
26527
|
-
}
|
26528
|
-
if (index4 === 0) {
|
26529
|
-
this._head = this._head + count + len & this._capacityMask;
|
26530
|
-
for (k = count - 1; k > 0; k--) {
|
26531
|
-
this._list[i = i + 1 + len & this._capacityMask] = void 0;
|
26532
|
-
}
|
26533
|
-
return removed;
|
26534
|
-
}
|
26535
|
-
if (i < size / 2) {
|
26536
|
-
this._head = this._head + index4 + count + len & this._capacityMask;
|
26537
|
-
for (k = index4; k > 0; k--) {
|
26538
|
-
this.unshift(this._list[i = i - 1 + len & this._capacityMask]);
|
26539
|
-
}
|
26540
|
-
i = this._head - 1 + len & this._capacityMask;
|
26541
|
-
while (del_count > 0) {
|
26542
|
-
this._list[i = i - 1 + len & this._capacityMask] = void 0;
|
26543
|
-
del_count--;
|
26544
|
-
}
|
26545
|
-
if (index4 < 0)
|
26546
|
-
this._tail = i;
|
26547
|
-
} else {
|
26548
|
-
this._tail = i;
|
26549
|
-
i = i + count + len & this._capacityMask;
|
26550
|
-
for (k = size - (count + index4); k > 0; k--) {
|
26551
|
-
this.push(this._list[i++]);
|
26552
|
-
}
|
26553
|
-
i = this._tail;
|
26554
|
-
while (del_count > 0) {
|
26555
|
-
this._list[i = i + 1 + len & this._capacityMask] = void 0;
|
26556
|
-
del_count--;
|
26557
|
-
}
|
26558
|
-
}
|
26559
|
-
if (this._head < 2 && this._tail > 1e4 && this._tail <= len >>> 2)
|
26560
|
-
this._shrinkArray();
|
26561
|
-
return removed;
|
26562
|
-
};
|
26563
|
-
Denque.prototype.splice = function splice(index4, count) {
|
26564
|
-
var i = index4;
|
26565
|
-
if (i !== (i | 0)) {
|
26566
|
-
return void 0;
|
26567
|
-
}
|
26568
|
-
var size = this.size();
|
26569
|
-
if (i < 0)
|
26570
|
-
i += size;
|
26571
|
-
if (i > size)
|
26572
|
-
return void 0;
|
26573
|
-
if (arguments.length > 2) {
|
26574
|
-
var k;
|
26575
|
-
var temp;
|
26576
|
-
var removed;
|
26577
|
-
var arg_len = arguments.length;
|
26578
|
-
var len = this._list.length;
|
26579
|
-
var arguments_index = 2;
|
26580
|
-
if (!size || i < size / 2) {
|
26581
|
-
temp = new Array(i);
|
26582
|
-
for (k = 0; k < i; k++) {
|
26583
|
-
temp[k] = this._list[this._head + k & this._capacityMask];
|
26584
|
-
}
|
26585
|
-
if (count === 0) {
|
26586
|
-
removed = [];
|
26587
|
-
if (i > 0) {
|
26588
|
-
this._head = this._head + i + len & this._capacityMask;
|
26589
|
-
}
|
26590
|
-
} else {
|
26591
|
-
removed = this.remove(i, count);
|
26592
|
-
this._head = this._head + i + len & this._capacityMask;
|
26593
|
-
}
|
26594
|
-
while (arg_len > arguments_index) {
|
26595
|
-
this.unshift(arguments[--arg_len]);
|
26596
|
-
}
|
26597
|
-
for (k = i; k > 0; k--) {
|
26598
|
-
this.unshift(temp[k - 1]);
|
26599
|
-
}
|
26600
|
-
} else {
|
26601
|
-
temp = new Array(size - (i + count));
|
26602
|
-
var leng = temp.length;
|
26603
|
-
for (k = 0; k < leng; k++) {
|
26604
|
-
temp[k] = this._list[this._head + i + count + k & this._capacityMask];
|
26605
|
-
}
|
26606
|
-
if (count === 0) {
|
26607
|
-
removed = [];
|
26608
|
-
if (i != size) {
|
26609
|
-
this._tail = this._head + i + len & this._capacityMask;
|
26610
|
-
}
|
26611
|
-
} else {
|
26612
|
-
removed = this.remove(i, count);
|
26613
|
-
this._tail = this._tail - leng + len & this._capacityMask;
|
26614
|
-
}
|
26615
|
-
while (arguments_index < arg_len) {
|
26616
|
-
this.push(arguments[arguments_index++]);
|
26617
|
-
}
|
26618
|
-
for (k = 0; k < leng; k++) {
|
26619
|
-
this.push(temp[k]);
|
26620
|
-
}
|
26621
|
-
}
|
26622
|
-
return removed;
|
26623
|
-
} else {
|
26624
|
-
return this.remove(i, count);
|
26625
|
-
}
|
26626
|
-
};
|
26627
|
-
Denque.prototype.clear = function clear() {
|
26628
|
-
this._list = new Array(this._list.length);
|
26629
|
-
this._head = 0;
|
26630
|
-
this._tail = 0;
|
26631
|
-
};
|
26632
|
-
Denque.prototype.isEmpty = function isEmpty() {
|
26633
|
-
return this._head === this._tail;
|
26634
|
-
};
|
26635
|
-
Denque.prototype.toArray = function toArray() {
|
26636
|
-
return this._copyArray(false);
|
26637
|
-
};
|
26638
|
-
Denque.prototype._fromArray = function _fromArray(array) {
|
26639
|
-
var length = array.length;
|
26640
|
-
var capacity = this._nextPowerOf2(length);
|
26641
|
-
this._list = new Array(capacity);
|
26642
|
-
this._capacityMask = capacity - 1;
|
26643
|
-
this._tail = length;
|
26644
|
-
for (var i = 0; i < length; i++)
|
26645
|
-
this._list[i] = array[i];
|
26646
|
-
};
|
26647
|
-
Denque.prototype._copyArray = function _copyArray(fullCopy, size) {
|
26648
|
-
var src = this._list;
|
26649
|
-
var capacity = src.length;
|
26650
|
-
var length = this.length;
|
26651
|
-
size = size | length;
|
26652
|
-
if (size == length && this._head < this._tail) {
|
26653
|
-
return this._list.slice(this._head, this._tail);
|
26654
|
-
}
|
26655
|
-
var dest = new Array(size);
|
26656
|
-
var k = 0;
|
26657
|
-
var i;
|
26658
|
-
if (fullCopy || this._head > this._tail) {
|
26659
|
-
for (i = this._head; i < capacity; i++)
|
26660
|
-
dest[k++] = src[i];
|
26661
|
-
for (i = 0; i < this._tail; i++)
|
26662
|
-
dest[k++] = src[i];
|
26663
|
-
} else {
|
26664
|
-
for (i = this._head; i < this._tail; i++)
|
26665
|
-
dest[k++] = src[i];
|
26666
|
-
}
|
26667
|
-
return dest;
|
26668
|
-
};
|
26669
|
-
Denque.prototype._growArray = function _growArray() {
|
26670
|
-
if (this._head != 0) {
|
26671
|
-
var newList = this._copyArray(true, this._list.length << 1);
|
26672
|
-
this._tail = this._list.length;
|
26673
|
-
this._head = 0;
|
26674
|
-
this._list = newList;
|
26675
|
-
} else {
|
26676
|
-
this._tail = this._list.length;
|
26677
|
-
this._list.length <<= 1;
|
26678
|
-
}
|
26679
|
-
this._capacityMask = this._capacityMask << 1 | 1;
|
26680
|
-
};
|
26681
|
-
Denque.prototype._shrinkArray = function _shrinkArray() {
|
26682
|
-
this._list.length >>>= 1;
|
26683
|
-
this._capacityMask >>>= 1;
|
26684
|
-
};
|
26685
|
-
Denque.prototype._nextPowerOf2 = function _nextPowerOf2(num) {
|
26686
|
-
var log2 = Math.log(num) / Math.log(2);
|
26687
|
-
var nextPow2 = 1 << log2 + 1;
|
26688
|
-
return Math.max(nextPow2, 4);
|
26689
|
-
};
|
26690
|
-
module2.exports = Denque;
|
26691
|
-
}
|
26692
|
-
});
|
26693
|
-
|
26694
|
-
// node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js
|
26695
|
-
var require_iterator = __commonJS({
|
26696
|
-
"node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports, module2) {
|
26697
|
-
"use strict";
|
26698
|
-
module2.exports = function(Yallist) {
|
26699
|
-
Yallist.prototype[Symbol.iterator] = function* () {
|
26700
|
-
for (let walker = this.head; walker; walker = walker.next) {
|
26701
|
-
yield walker.value;
|
26702
|
-
}
|
26703
|
-
};
|
26704
|
-
};
|
26705
|
-
}
|
26706
|
-
});
|
26707
|
-
|
26708
|
-
// node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js
|
26709
|
-
var require_yallist = __commonJS({
|
26710
|
-
"node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports, module2) {
|
26711
|
-
"use strict";
|
26712
|
-
module2.exports = Yallist;
|
26713
|
-
Yallist.Node = Node;
|
26714
|
-
Yallist.create = Yallist;
|
26715
|
-
function Yallist(list) {
|
26716
|
-
var self2 = this;
|
26717
|
-
if (!(self2 instanceof Yallist)) {
|
26718
|
-
self2 = new Yallist();
|
26719
|
-
}
|
26720
|
-
self2.tail = null;
|
26721
|
-
self2.head = null;
|
26722
|
-
self2.length = 0;
|
26723
|
-
if (list && typeof list.forEach === "function") {
|
26724
|
-
list.forEach(function(item) {
|
26725
|
-
self2.push(item);
|
26726
|
-
});
|
26727
|
-
} else if (arguments.length > 0) {
|
26728
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
26729
|
-
self2.push(arguments[i]);
|
26730
|
-
}
|
26731
|
-
}
|
26732
|
-
return self2;
|
26733
|
-
}
|
26734
|
-
Yallist.prototype.removeNode = function(node) {
|
26735
|
-
if (node.list !== this) {
|
26736
|
-
throw new Error("removing node which does not belong to this list");
|
26737
|
-
}
|
26738
|
-
var next = node.next;
|
26739
|
-
var prev = node.prev;
|
26740
|
-
if (next) {
|
26741
|
-
next.prev = prev;
|
26742
|
-
}
|
26743
|
-
if (prev) {
|
26744
|
-
prev.next = next;
|
26745
|
-
}
|
26746
|
-
if (node === this.head) {
|
26747
|
-
this.head = next;
|
26748
|
-
}
|
26749
|
-
if (node === this.tail) {
|
26750
|
-
this.tail = prev;
|
26751
|
-
}
|
26752
|
-
node.list.length--;
|
26753
|
-
node.next = null;
|
26754
|
-
node.prev = null;
|
26755
|
-
node.list = null;
|
26756
|
-
return next;
|
26757
|
-
};
|
26758
|
-
Yallist.prototype.unshiftNode = function(node) {
|
26759
|
-
if (node === this.head) {
|
26760
|
-
return;
|
26939
|
+
Yallist.prototype.unshiftNode = function(node) {
|
26940
|
+
if (node === this.head) {
|
26941
|
+
return;
|
26761
26942
|
}
|
26762
26943
|
if (node.list) {
|
26763
26944
|
node.list.removeNode(node);
|
@@ -27126,221 +27307,1853 @@ var require_lru_cache = __commonJS({
|
|
27126
27307
|
get allowStale() {
|
27127
27308
|
return this[ALLOW_STALE];
|
27128
27309
|
}
|
27129
|
-
set maxAge(mA) {
|
27130
|
-
if (typeof mA !== "number")
|
27131
|
-
throw new TypeError("maxAge must be a non-negative number");
|
27132
|
-
this[MAX_AGE] = mA;
|
27133
|
-
trim(this);
|
27310
|
+
set maxAge(mA) {
|
27311
|
+
if (typeof mA !== "number")
|
27312
|
+
throw new TypeError("maxAge must be a non-negative number");
|
27313
|
+
this[MAX_AGE] = mA;
|
27314
|
+
trim(this);
|
27315
|
+
}
|
27316
|
+
get maxAge() {
|
27317
|
+
return this[MAX_AGE];
|
27318
|
+
}
|
27319
|
+
// resize the cache when the lengthCalculator changes.
|
27320
|
+
set lengthCalculator(lC) {
|
27321
|
+
if (typeof lC !== "function")
|
27322
|
+
lC = naiveLength;
|
27323
|
+
if (lC !== this[LENGTH_CALCULATOR]) {
|
27324
|
+
this[LENGTH_CALCULATOR] = lC;
|
27325
|
+
this[LENGTH] = 0;
|
27326
|
+
this[LRU_LIST].forEach((hit) => {
|
27327
|
+
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
|
27328
|
+
this[LENGTH] += hit.length;
|
27329
|
+
});
|
27330
|
+
}
|
27331
|
+
trim(this);
|
27332
|
+
}
|
27333
|
+
get lengthCalculator() {
|
27334
|
+
return this[LENGTH_CALCULATOR];
|
27335
|
+
}
|
27336
|
+
get length() {
|
27337
|
+
return this[LENGTH];
|
27338
|
+
}
|
27339
|
+
get itemCount() {
|
27340
|
+
return this[LRU_LIST].length;
|
27341
|
+
}
|
27342
|
+
rforEach(fn, thisp) {
|
27343
|
+
thisp = thisp || this;
|
27344
|
+
for (let walker = this[LRU_LIST].tail; walker !== null; ) {
|
27345
|
+
const prev = walker.prev;
|
27346
|
+
forEachStep(this, fn, walker, thisp);
|
27347
|
+
walker = prev;
|
27348
|
+
}
|
27349
|
+
}
|
27350
|
+
forEach(fn, thisp) {
|
27351
|
+
thisp = thisp || this;
|
27352
|
+
for (let walker = this[LRU_LIST].head; walker !== null; ) {
|
27353
|
+
const next = walker.next;
|
27354
|
+
forEachStep(this, fn, walker, thisp);
|
27355
|
+
walker = next;
|
27356
|
+
}
|
27357
|
+
}
|
27358
|
+
keys() {
|
27359
|
+
return this[LRU_LIST].toArray().map((k) => k.key);
|
27360
|
+
}
|
27361
|
+
values() {
|
27362
|
+
return this[LRU_LIST].toArray().map((k) => k.value);
|
27363
|
+
}
|
27364
|
+
reset() {
|
27365
|
+
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
|
27366
|
+
this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
|
27367
|
+
}
|
27368
|
+
this[CACHE] = /* @__PURE__ */ new Map();
|
27369
|
+
this[LRU_LIST] = new Yallist();
|
27370
|
+
this[LENGTH] = 0;
|
27371
|
+
}
|
27372
|
+
dump() {
|
27373
|
+
return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
|
27374
|
+
k: hit.key,
|
27375
|
+
v: hit.value,
|
27376
|
+
e: hit.now + (hit.maxAge || 0)
|
27377
|
+
}).toArray().filter((h) => h);
|
27378
|
+
}
|
27379
|
+
dumpLru() {
|
27380
|
+
return this[LRU_LIST];
|
27381
|
+
}
|
27382
|
+
set(key, value, maxAge) {
|
27383
|
+
maxAge = maxAge || this[MAX_AGE];
|
27384
|
+
if (maxAge && typeof maxAge !== "number")
|
27385
|
+
throw new TypeError("maxAge must be a number");
|
27386
|
+
const now = maxAge ? Date.now() : 0;
|
27387
|
+
const len = this[LENGTH_CALCULATOR](value, key);
|
27388
|
+
if (this[CACHE].has(key)) {
|
27389
|
+
if (len > this[MAX]) {
|
27390
|
+
del(this, this[CACHE].get(key));
|
27391
|
+
return false;
|
27392
|
+
}
|
27393
|
+
const node = this[CACHE].get(key);
|
27394
|
+
const item = node.value;
|
27395
|
+
if (this[DISPOSE]) {
|
27396
|
+
if (!this[NO_DISPOSE_ON_SET])
|
27397
|
+
this[DISPOSE](key, item.value);
|
27398
|
+
}
|
27399
|
+
item.now = now;
|
27400
|
+
item.maxAge = maxAge;
|
27401
|
+
item.value = value;
|
27402
|
+
this[LENGTH] += len - item.length;
|
27403
|
+
item.length = len;
|
27404
|
+
this.get(key);
|
27405
|
+
trim(this);
|
27406
|
+
return true;
|
27407
|
+
}
|
27408
|
+
const hit = new Entry(key, value, len, now, maxAge);
|
27409
|
+
if (hit.length > this[MAX]) {
|
27410
|
+
if (this[DISPOSE])
|
27411
|
+
this[DISPOSE](key, value);
|
27412
|
+
return false;
|
27413
|
+
}
|
27414
|
+
this[LENGTH] += hit.length;
|
27415
|
+
this[LRU_LIST].unshift(hit);
|
27416
|
+
this[CACHE].set(key, this[LRU_LIST].head);
|
27417
|
+
trim(this);
|
27418
|
+
return true;
|
27419
|
+
}
|
27420
|
+
has(key) {
|
27421
|
+
if (!this[CACHE].has(key))
|
27422
|
+
return false;
|
27423
|
+
const hit = this[CACHE].get(key).value;
|
27424
|
+
return !isStale(this, hit);
|
27425
|
+
}
|
27426
|
+
get(key) {
|
27427
|
+
return get(this, key, true);
|
27428
|
+
}
|
27429
|
+
peek(key) {
|
27430
|
+
return get(this, key, false);
|
27431
|
+
}
|
27432
|
+
pop() {
|
27433
|
+
const node = this[LRU_LIST].tail;
|
27434
|
+
if (!node)
|
27435
|
+
return null;
|
27436
|
+
del(this, node);
|
27437
|
+
return node.value;
|
27438
|
+
}
|
27439
|
+
del(key) {
|
27440
|
+
del(this, this[CACHE].get(key));
|
27441
|
+
}
|
27442
|
+
load(arr) {
|
27443
|
+
this.reset();
|
27444
|
+
const now = Date.now();
|
27445
|
+
for (let l = arr.length - 1; l >= 0; l--) {
|
27446
|
+
const hit = arr[l];
|
27447
|
+
const expiresAt = hit.e || 0;
|
27448
|
+
if (expiresAt === 0)
|
27449
|
+
this.set(hit.k, hit.v);
|
27450
|
+
else {
|
27451
|
+
const maxAge = expiresAt - now;
|
27452
|
+
if (maxAge > 0) {
|
27453
|
+
this.set(hit.k, hit.v, maxAge);
|
27454
|
+
}
|
27455
|
+
}
|
27456
|
+
}
|
27457
|
+
}
|
27458
|
+
prune() {
|
27459
|
+
this[CACHE].forEach((value, key) => get(this, key, false));
|
27460
|
+
}
|
27461
|
+
};
|
27462
|
+
var get = (self2, key, doUse) => {
|
27463
|
+
const node = self2[CACHE].get(key);
|
27464
|
+
if (node) {
|
27465
|
+
const hit = node.value;
|
27466
|
+
if (isStale(self2, hit)) {
|
27467
|
+
del(self2, node);
|
27468
|
+
if (!self2[ALLOW_STALE])
|
27469
|
+
return void 0;
|
27470
|
+
} else {
|
27471
|
+
if (doUse) {
|
27472
|
+
if (self2[UPDATE_AGE_ON_GET])
|
27473
|
+
node.value.now = Date.now();
|
27474
|
+
self2[LRU_LIST].unshiftNode(node);
|
27475
|
+
}
|
27476
|
+
}
|
27477
|
+
return hit.value;
|
27478
|
+
}
|
27479
|
+
};
|
27480
|
+
var isStale = (self2, hit) => {
|
27481
|
+
if (!hit || !hit.maxAge && !self2[MAX_AGE])
|
27482
|
+
return false;
|
27483
|
+
const diff2 = Date.now() - hit.now;
|
27484
|
+
return hit.maxAge ? diff2 > hit.maxAge : self2[MAX_AGE] && diff2 > self2[MAX_AGE];
|
27485
|
+
};
|
27486
|
+
var trim = (self2) => {
|
27487
|
+
if (self2[LENGTH] > self2[MAX]) {
|
27488
|
+
for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
|
27489
|
+
const prev = walker.prev;
|
27490
|
+
del(self2, walker);
|
27491
|
+
walker = prev;
|
27492
|
+
}
|
27493
|
+
}
|
27494
|
+
};
|
27495
|
+
var del = (self2, node) => {
|
27496
|
+
if (node) {
|
27497
|
+
const hit = node.value;
|
27498
|
+
if (self2[DISPOSE])
|
27499
|
+
self2[DISPOSE](hit.key, hit.value);
|
27500
|
+
self2[LENGTH] -= hit.length;
|
27501
|
+
self2[CACHE].delete(hit.key);
|
27502
|
+
self2[LRU_LIST].removeNode(node);
|
27503
|
+
}
|
27504
|
+
};
|
27505
|
+
var Entry = class {
|
27506
|
+
constructor(key, value, length, now, maxAge) {
|
27507
|
+
this.key = key;
|
27508
|
+
this.value = value;
|
27509
|
+
this.length = length;
|
27510
|
+
this.now = now;
|
27511
|
+
this.maxAge = maxAge || 0;
|
27512
|
+
}
|
27513
|
+
};
|
27514
|
+
var forEachStep = (self2, fn, node, thisp) => {
|
27515
|
+
let hit = node.value;
|
27516
|
+
if (isStale(self2, hit)) {
|
27517
|
+
del(self2, node);
|
27518
|
+
if (!self2[ALLOW_STALE])
|
27519
|
+
hit = void 0;
|
27520
|
+
}
|
27521
|
+
if (hit)
|
27522
|
+
fn.call(thisp, hit.value, hit.key, self2);
|
27523
|
+
};
|
27524
|
+
module2.exports = LRUCache;
|
27525
|
+
}
|
27526
|
+
});
|
27527
|
+
|
27528
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js
|
27529
|
+
var require_range = __commonJS({
|
27530
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js"(exports, module2) {
|
27531
|
+
var Range = class _Range {
|
27532
|
+
constructor(range, options) {
|
27533
|
+
options = parseOptions(options);
|
27534
|
+
if (range instanceof _Range) {
|
27535
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
27536
|
+
return range;
|
27537
|
+
} else {
|
27538
|
+
return new _Range(range.raw, options);
|
27539
|
+
}
|
27540
|
+
}
|
27541
|
+
if (range instanceof Comparator) {
|
27542
|
+
this.raw = range.value;
|
27543
|
+
this.set = [[range]];
|
27544
|
+
this.format();
|
27545
|
+
return this;
|
27546
|
+
}
|
27547
|
+
this.options = options;
|
27548
|
+
this.loose = !!options.loose;
|
27549
|
+
this.includePrerelease = !!options.includePrerelease;
|
27550
|
+
this.raw = range.trim().split(/\s+/).join(" ");
|
27551
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
27552
|
+
if (!this.set.length) {
|
27553
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
27554
|
+
}
|
27555
|
+
if (this.set.length > 1) {
|
27556
|
+
const first = this.set[0];
|
27557
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
27558
|
+
if (this.set.length === 0) {
|
27559
|
+
this.set = [first];
|
27560
|
+
} else if (this.set.length > 1) {
|
27561
|
+
for (const c of this.set) {
|
27562
|
+
if (c.length === 1 && isAny(c[0])) {
|
27563
|
+
this.set = [c];
|
27564
|
+
break;
|
27565
|
+
}
|
27566
|
+
}
|
27567
|
+
}
|
27568
|
+
}
|
27569
|
+
this.format();
|
27570
|
+
}
|
27571
|
+
format() {
|
27572
|
+
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
|
27573
|
+
return this.range;
|
27574
|
+
}
|
27575
|
+
toString() {
|
27576
|
+
return this.range;
|
27577
|
+
}
|
27578
|
+
parseRange(range) {
|
27579
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
27580
|
+
const memoKey = memoOpts + ":" + range;
|
27581
|
+
const cached = cache.get(memoKey);
|
27582
|
+
if (cached) {
|
27583
|
+
return cached;
|
27584
|
+
}
|
27585
|
+
const loose = this.options.loose;
|
27586
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
27587
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
27588
|
+
debug("hyphen replace", range);
|
27589
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
27590
|
+
debug("comparator trim", range);
|
27591
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
27592
|
+
debug("tilde trim", range);
|
27593
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
27594
|
+
debug("caret trim", range);
|
27595
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
27596
|
+
if (loose) {
|
27597
|
+
rangeList = rangeList.filter((comp) => {
|
27598
|
+
debug("loose invalid filter", comp, this.options);
|
27599
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
27600
|
+
});
|
27601
|
+
}
|
27602
|
+
debug("range list", rangeList);
|
27603
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
27604
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
27605
|
+
for (const comp of comparators) {
|
27606
|
+
if (isNullSet(comp)) {
|
27607
|
+
return [comp];
|
27608
|
+
}
|
27609
|
+
rangeMap.set(comp.value, comp);
|
27610
|
+
}
|
27611
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
27612
|
+
rangeMap.delete("");
|
27613
|
+
}
|
27614
|
+
const result = [...rangeMap.values()];
|
27615
|
+
cache.set(memoKey, result);
|
27616
|
+
return result;
|
27617
|
+
}
|
27618
|
+
intersects(range, options) {
|
27619
|
+
if (!(range instanceof _Range)) {
|
27620
|
+
throw new TypeError("a Range is required");
|
27621
|
+
}
|
27622
|
+
return this.set.some((thisComparators) => {
|
27623
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
27624
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
27625
|
+
return rangeComparators.every((rangeComparator) => {
|
27626
|
+
return thisComparator.intersects(rangeComparator, options);
|
27627
|
+
});
|
27628
|
+
});
|
27629
|
+
});
|
27630
|
+
});
|
27631
|
+
}
|
27632
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
27633
|
+
test(version) {
|
27634
|
+
if (!version) {
|
27635
|
+
return false;
|
27636
|
+
}
|
27637
|
+
if (typeof version === "string") {
|
27638
|
+
try {
|
27639
|
+
version = new SemVer(version, this.options);
|
27640
|
+
} catch (er) {
|
27641
|
+
return false;
|
27642
|
+
}
|
27643
|
+
}
|
27644
|
+
for (let i = 0; i < this.set.length; i++) {
|
27645
|
+
if (testSet(this.set[i], version, this.options)) {
|
27646
|
+
return true;
|
27647
|
+
}
|
27648
|
+
}
|
27649
|
+
return false;
|
27650
|
+
}
|
27651
|
+
};
|
27652
|
+
module2.exports = Range;
|
27653
|
+
var LRU = require_lru_cache();
|
27654
|
+
var cache = new LRU({ max: 1e3 });
|
27655
|
+
var parseOptions = require_parse_options();
|
27656
|
+
var Comparator = require_comparator();
|
27657
|
+
var debug = require_debug();
|
27658
|
+
var SemVer = require_semver();
|
27659
|
+
var {
|
27660
|
+
safeRe: re,
|
27661
|
+
t,
|
27662
|
+
comparatorTrimReplace,
|
27663
|
+
tildeTrimReplace,
|
27664
|
+
caretTrimReplace
|
27665
|
+
} = require_re();
|
27666
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
27667
|
+
var isNullSet = (c) => c.value === "<0.0.0-0";
|
27668
|
+
var isAny = (c) => c.value === "";
|
27669
|
+
var isSatisfiable = (comparators, options) => {
|
27670
|
+
let result = true;
|
27671
|
+
const remainingComparators = comparators.slice();
|
27672
|
+
let testComparator = remainingComparators.pop();
|
27673
|
+
while (result && remainingComparators.length) {
|
27674
|
+
result = remainingComparators.every((otherComparator) => {
|
27675
|
+
return testComparator.intersects(otherComparator, options);
|
27676
|
+
});
|
27677
|
+
testComparator = remainingComparators.pop();
|
27678
|
+
}
|
27679
|
+
return result;
|
27680
|
+
};
|
27681
|
+
var parseComparator = (comp, options) => {
|
27682
|
+
debug("comp", comp, options);
|
27683
|
+
comp = replaceCarets(comp, options);
|
27684
|
+
debug("caret", comp);
|
27685
|
+
comp = replaceTildes(comp, options);
|
27686
|
+
debug("tildes", comp);
|
27687
|
+
comp = replaceXRanges(comp, options);
|
27688
|
+
debug("xrange", comp);
|
27689
|
+
comp = replaceStars(comp, options);
|
27690
|
+
debug("stars", comp);
|
27691
|
+
return comp;
|
27692
|
+
};
|
27693
|
+
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
27694
|
+
var replaceTildes = (comp, options) => {
|
27695
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
27696
|
+
};
|
27697
|
+
var replaceTilde = (comp, options) => {
|
27698
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
27699
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
27700
|
+
debug("tilde", comp, _, M, m, p, pr);
|
27701
|
+
let ret;
|
27702
|
+
if (isX(M)) {
|
27703
|
+
ret = "";
|
27704
|
+
} else if (isX(m)) {
|
27705
|
+
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
27706
|
+
} else if (isX(p)) {
|
27707
|
+
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
27708
|
+
} else if (pr) {
|
27709
|
+
debug("replaceTilde pr", pr);
|
27710
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
27711
|
+
} else {
|
27712
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
27713
|
+
}
|
27714
|
+
debug("tilde return", ret);
|
27715
|
+
return ret;
|
27716
|
+
});
|
27717
|
+
};
|
27718
|
+
var replaceCarets = (comp, options) => {
|
27719
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
27720
|
+
};
|
27721
|
+
var replaceCaret = (comp, options) => {
|
27722
|
+
debug("caret", comp, options);
|
27723
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
27724
|
+
const z2 = options.includePrerelease ? "-0" : "";
|
27725
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
27726
|
+
debug("caret", comp, _, M, m, p, pr);
|
27727
|
+
let ret;
|
27728
|
+
if (isX(M)) {
|
27729
|
+
ret = "";
|
27730
|
+
} else if (isX(m)) {
|
27731
|
+
ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
|
27732
|
+
} else if (isX(p)) {
|
27733
|
+
if (M === "0") {
|
27734
|
+
ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`;
|
27735
|
+
} else {
|
27736
|
+
ret = `>=${M}.${m}.0${z2} <${+M + 1}.0.0-0`;
|
27737
|
+
}
|
27738
|
+
} else if (pr) {
|
27739
|
+
debug("replaceCaret pr", pr);
|
27740
|
+
if (M === "0") {
|
27741
|
+
if (m === "0") {
|
27742
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
27743
|
+
} else {
|
27744
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
27745
|
+
}
|
27746
|
+
} else {
|
27747
|
+
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
27748
|
+
}
|
27749
|
+
} else {
|
27750
|
+
debug("no pr");
|
27751
|
+
if (M === "0") {
|
27752
|
+
if (m === "0") {
|
27753
|
+
ret = `>=${M}.${m}.${p}${z2} <${M}.${m}.${+p + 1}-0`;
|
27754
|
+
} else {
|
27755
|
+
ret = `>=${M}.${m}.${p}${z2} <${M}.${+m + 1}.0-0`;
|
27756
|
+
}
|
27757
|
+
} else {
|
27758
|
+
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
27759
|
+
}
|
27760
|
+
}
|
27761
|
+
debug("caret return", ret);
|
27762
|
+
return ret;
|
27763
|
+
});
|
27764
|
+
};
|
27765
|
+
var replaceXRanges = (comp, options) => {
|
27766
|
+
debug("replaceXRanges", comp, options);
|
27767
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
27768
|
+
};
|
27769
|
+
var replaceXRange = (comp, options) => {
|
27770
|
+
comp = comp.trim();
|
27771
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
27772
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
27773
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
27774
|
+
const xM = isX(M);
|
27775
|
+
const xm = xM || isX(m);
|
27776
|
+
const xp = xm || isX(p);
|
27777
|
+
const anyX = xp;
|
27778
|
+
if (gtlt === "=" && anyX) {
|
27779
|
+
gtlt = "";
|
27780
|
+
}
|
27781
|
+
pr = options.includePrerelease ? "-0" : "";
|
27782
|
+
if (xM) {
|
27783
|
+
if (gtlt === ">" || gtlt === "<") {
|
27784
|
+
ret = "<0.0.0-0";
|
27785
|
+
} else {
|
27786
|
+
ret = "*";
|
27787
|
+
}
|
27788
|
+
} else if (gtlt && anyX) {
|
27789
|
+
if (xm) {
|
27790
|
+
m = 0;
|
27791
|
+
}
|
27792
|
+
p = 0;
|
27793
|
+
if (gtlt === ">") {
|
27794
|
+
gtlt = ">=";
|
27795
|
+
if (xm) {
|
27796
|
+
M = +M + 1;
|
27797
|
+
m = 0;
|
27798
|
+
p = 0;
|
27799
|
+
} else {
|
27800
|
+
m = +m + 1;
|
27801
|
+
p = 0;
|
27802
|
+
}
|
27803
|
+
} else if (gtlt === "<=") {
|
27804
|
+
gtlt = "<";
|
27805
|
+
if (xm) {
|
27806
|
+
M = +M + 1;
|
27807
|
+
} else {
|
27808
|
+
m = +m + 1;
|
27809
|
+
}
|
27810
|
+
}
|
27811
|
+
if (gtlt === "<") {
|
27812
|
+
pr = "-0";
|
27813
|
+
}
|
27814
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
27815
|
+
} else if (xm) {
|
27816
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
27817
|
+
} else if (xp) {
|
27818
|
+
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
27819
|
+
}
|
27820
|
+
debug("xRange return", ret);
|
27821
|
+
return ret;
|
27822
|
+
});
|
27823
|
+
};
|
27824
|
+
var replaceStars = (comp, options) => {
|
27825
|
+
debug("replaceStars", comp, options);
|
27826
|
+
return comp.trim().replace(re[t.STAR], "");
|
27827
|
+
};
|
27828
|
+
var replaceGTE0 = (comp, options) => {
|
27829
|
+
debug("replaceGTE0", comp, options);
|
27830
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
27831
|
+
};
|
27832
|
+
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
|
27833
|
+
if (isX(fM)) {
|
27834
|
+
from = "";
|
27835
|
+
} else if (isX(fm)) {
|
27836
|
+
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
27837
|
+
} else if (isX(fp)) {
|
27838
|
+
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
27839
|
+
} else if (fpr) {
|
27840
|
+
from = `>=${from}`;
|
27841
|
+
} else {
|
27842
|
+
from = `>=${from}${incPr ? "-0" : ""}`;
|
27843
|
+
}
|
27844
|
+
if (isX(tM)) {
|
27845
|
+
to = "";
|
27846
|
+
} else if (isX(tm)) {
|
27847
|
+
to = `<${+tM + 1}.0.0-0`;
|
27848
|
+
} else if (isX(tp)) {
|
27849
|
+
to = `<${tM}.${+tm + 1}.0-0`;
|
27850
|
+
} else if (tpr) {
|
27851
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
27852
|
+
} else if (incPr) {
|
27853
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
27854
|
+
} else {
|
27855
|
+
to = `<=${to}`;
|
27856
|
+
}
|
27857
|
+
return `${from} ${to}`.trim();
|
27858
|
+
};
|
27859
|
+
var testSet = (set2, version, options) => {
|
27860
|
+
for (let i = 0; i < set2.length; i++) {
|
27861
|
+
if (!set2[i].test(version)) {
|
27862
|
+
return false;
|
27863
|
+
}
|
27864
|
+
}
|
27865
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
27866
|
+
for (let i = 0; i < set2.length; i++) {
|
27867
|
+
debug(set2[i].semver);
|
27868
|
+
if (set2[i].semver === Comparator.ANY) {
|
27869
|
+
continue;
|
27870
|
+
}
|
27871
|
+
if (set2[i].semver.prerelease.length > 0) {
|
27872
|
+
const allowed = set2[i].semver;
|
27873
|
+
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
27874
|
+
return true;
|
27875
|
+
}
|
27876
|
+
}
|
27877
|
+
}
|
27878
|
+
return false;
|
27879
|
+
}
|
27880
|
+
return true;
|
27881
|
+
};
|
27882
|
+
}
|
27883
|
+
});
|
27884
|
+
|
27885
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js
|
27886
|
+
var require_comparator = __commonJS({
|
27887
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js"(exports, module2) {
|
27888
|
+
var ANY = Symbol("SemVer ANY");
|
27889
|
+
var Comparator = class _Comparator {
|
27890
|
+
static get ANY() {
|
27891
|
+
return ANY;
|
27892
|
+
}
|
27893
|
+
constructor(comp, options) {
|
27894
|
+
options = parseOptions(options);
|
27895
|
+
if (comp instanceof _Comparator) {
|
27896
|
+
if (comp.loose === !!options.loose) {
|
27897
|
+
return comp;
|
27898
|
+
} else {
|
27899
|
+
comp = comp.value;
|
27900
|
+
}
|
27901
|
+
}
|
27902
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
27903
|
+
debug("comparator", comp, options);
|
27904
|
+
this.options = options;
|
27905
|
+
this.loose = !!options.loose;
|
27906
|
+
this.parse(comp);
|
27907
|
+
if (this.semver === ANY) {
|
27908
|
+
this.value = "";
|
27909
|
+
} else {
|
27910
|
+
this.value = this.operator + this.semver.version;
|
27911
|
+
}
|
27912
|
+
debug("comp", this);
|
27913
|
+
}
|
27914
|
+
parse(comp) {
|
27915
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
27916
|
+
const m = comp.match(r);
|
27917
|
+
if (!m) {
|
27918
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
27919
|
+
}
|
27920
|
+
this.operator = m[1] !== void 0 ? m[1] : "";
|
27921
|
+
if (this.operator === "=") {
|
27922
|
+
this.operator = "";
|
27923
|
+
}
|
27924
|
+
if (!m[2]) {
|
27925
|
+
this.semver = ANY;
|
27926
|
+
} else {
|
27927
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
27928
|
+
}
|
27929
|
+
}
|
27930
|
+
toString() {
|
27931
|
+
return this.value;
|
27932
|
+
}
|
27933
|
+
test(version) {
|
27934
|
+
debug("Comparator.test", version, this.options.loose);
|
27935
|
+
if (this.semver === ANY || version === ANY) {
|
27936
|
+
return true;
|
27937
|
+
}
|
27938
|
+
if (typeof version === "string") {
|
27939
|
+
try {
|
27940
|
+
version = new SemVer(version, this.options);
|
27941
|
+
} catch (er) {
|
27942
|
+
return false;
|
27943
|
+
}
|
27944
|
+
}
|
27945
|
+
return cmp(version, this.operator, this.semver, this.options);
|
27946
|
+
}
|
27947
|
+
intersects(comp, options) {
|
27948
|
+
if (!(comp instanceof _Comparator)) {
|
27949
|
+
throw new TypeError("a Comparator is required");
|
27950
|
+
}
|
27951
|
+
if (this.operator === "") {
|
27952
|
+
if (this.value === "") {
|
27953
|
+
return true;
|
27954
|
+
}
|
27955
|
+
return new Range(comp.value, options).test(this.value);
|
27956
|
+
} else if (comp.operator === "") {
|
27957
|
+
if (comp.value === "") {
|
27958
|
+
return true;
|
27959
|
+
}
|
27960
|
+
return new Range(this.value, options).test(comp.semver);
|
27961
|
+
}
|
27962
|
+
options = parseOptions(options);
|
27963
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
27964
|
+
return false;
|
27965
|
+
}
|
27966
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
27967
|
+
return false;
|
27968
|
+
}
|
27969
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
27970
|
+
return true;
|
27971
|
+
}
|
27972
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
27973
|
+
return true;
|
27974
|
+
}
|
27975
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
27976
|
+
return true;
|
27977
|
+
}
|
27978
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
27979
|
+
return true;
|
27980
|
+
}
|
27981
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
27982
|
+
return true;
|
27983
|
+
}
|
27984
|
+
return false;
|
27985
|
+
}
|
27986
|
+
};
|
27987
|
+
module2.exports = Comparator;
|
27988
|
+
var parseOptions = require_parse_options();
|
27989
|
+
var { safeRe: re, t } = require_re();
|
27990
|
+
var cmp = require_cmp();
|
27991
|
+
var debug = require_debug();
|
27992
|
+
var SemVer = require_semver();
|
27993
|
+
var Range = require_range();
|
27994
|
+
}
|
27995
|
+
});
|
27996
|
+
|
27997
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js
|
27998
|
+
var require_satisfies = __commonJS({
|
27999
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js"(exports, module2) {
|
28000
|
+
var Range = require_range();
|
28001
|
+
var satisfies = (version, range, options) => {
|
28002
|
+
try {
|
28003
|
+
range = new Range(range, options);
|
28004
|
+
} catch (er) {
|
28005
|
+
return false;
|
28006
|
+
}
|
28007
|
+
return range.test(version);
|
28008
|
+
};
|
28009
|
+
module2.exports = satisfies;
|
28010
|
+
}
|
28011
|
+
});
|
28012
|
+
|
28013
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js
|
28014
|
+
var require_to_comparators = __commonJS({
|
28015
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js"(exports, module2) {
|
28016
|
+
var Range = require_range();
|
28017
|
+
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
28018
|
+
module2.exports = toComparators;
|
28019
|
+
}
|
28020
|
+
});
|
28021
|
+
|
28022
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js
|
28023
|
+
var require_max_satisfying = __commonJS({
|
28024
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
|
28025
|
+
var SemVer = require_semver();
|
28026
|
+
var Range = require_range();
|
28027
|
+
var maxSatisfying = (versions2, range, options) => {
|
28028
|
+
let max = null;
|
28029
|
+
let maxSV = null;
|
28030
|
+
let rangeObj = null;
|
28031
|
+
try {
|
28032
|
+
rangeObj = new Range(range, options);
|
28033
|
+
} catch (er) {
|
28034
|
+
return null;
|
28035
|
+
}
|
28036
|
+
versions2.forEach((v) => {
|
28037
|
+
if (rangeObj.test(v)) {
|
28038
|
+
if (!max || maxSV.compare(v) === -1) {
|
28039
|
+
max = v;
|
28040
|
+
maxSV = new SemVer(max, options);
|
28041
|
+
}
|
28042
|
+
}
|
28043
|
+
});
|
28044
|
+
return max;
|
28045
|
+
};
|
28046
|
+
module2.exports = maxSatisfying;
|
28047
|
+
}
|
28048
|
+
});
|
28049
|
+
|
28050
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js
|
28051
|
+
var require_min_satisfying = __commonJS({
|
28052
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
|
28053
|
+
var SemVer = require_semver();
|
28054
|
+
var Range = require_range();
|
28055
|
+
var minSatisfying = (versions2, range, options) => {
|
28056
|
+
let min = null;
|
28057
|
+
let minSV = null;
|
28058
|
+
let rangeObj = null;
|
28059
|
+
try {
|
28060
|
+
rangeObj = new Range(range, options);
|
28061
|
+
} catch (er) {
|
28062
|
+
return null;
|
28063
|
+
}
|
28064
|
+
versions2.forEach((v) => {
|
28065
|
+
if (rangeObj.test(v)) {
|
28066
|
+
if (!min || minSV.compare(v) === 1) {
|
28067
|
+
min = v;
|
28068
|
+
minSV = new SemVer(min, options);
|
28069
|
+
}
|
28070
|
+
}
|
28071
|
+
});
|
28072
|
+
return min;
|
28073
|
+
};
|
28074
|
+
module2.exports = minSatisfying;
|
28075
|
+
}
|
28076
|
+
});
|
28077
|
+
|
28078
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js
|
28079
|
+
var require_min_version = __commonJS({
|
28080
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js"(exports, module2) {
|
28081
|
+
var SemVer = require_semver();
|
28082
|
+
var Range = require_range();
|
28083
|
+
var gt = require_gt();
|
28084
|
+
var minVersion = (range, loose) => {
|
28085
|
+
range = new Range(range, loose);
|
28086
|
+
let minver = new SemVer("0.0.0");
|
28087
|
+
if (range.test(minver)) {
|
28088
|
+
return minver;
|
28089
|
+
}
|
28090
|
+
minver = new SemVer("0.0.0-0");
|
28091
|
+
if (range.test(minver)) {
|
28092
|
+
return minver;
|
28093
|
+
}
|
28094
|
+
minver = null;
|
28095
|
+
for (let i = 0; i < range.set.length; ++i) {
|
28096
|
+
const comparators = range.set[i];
|
28097
|
+
let setMin = null;
|
28098
|
+
comparators.forEach((comparator) => {
|
28099
|
+
const compver = new SemVer(comparator.semver.version);
|
28100
|
+
switch (comparator.operator) {
|
28101
|
+
case ">":
|
28102
|
+
if (compver.prerelease.length === 0) {
|
28103
|
+
compver.patch++;
|
28104
|
+
} else {
|
28105
|
+
compver.prerelease.push(0);
|
28106
|
+
}
|
28107
|
+
compver.raw = compver.format();
|
28108
|
+
case "":
|
28109
|
+
case ">=":
|
28110
|
+
if (!setMin || gt(compver, setMin)) {
|
28111
|
+
setMin = compver;
|
28112
|
+
}
|
28113
|
+
break;
|
28114
|
+
case "<":
|
28115
|
+
case "<=":
|
28116
|
+
break;
|
28117
|
+
default:
|
28118
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
28119
|
+
}
|
28120
|
+
});
|
28121
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
28122
|
+
minver = setMin;
|
28123
|
+
}
|
28124
|
+
}
|
28125
|
+
if (minver && range.test(minver)) {
|
28126
|
+
return minver;
|
28127
|
+
}
|
28128
|
+
return null;
|
28129
|
+
};
|
28130
|
+
module2.exports = minVersion;
|
28131
|
+
}
|
28132
|
+
});
|
28133
|
+
|
28134
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js
|
28135
|
+
var require_valid2 = __commonJS({
|
28136
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js"(exports, module2) {
|
28137
|
+
var Range = require_range();
|
28138
|
+
var validRange = (range, options) => {
|
28139
|
+
try {
|
28140
|
+
return new Range(range, options).range || "*";
|
28141
|
+
} catch (er) {
|
28142
|
+
return null;
|
28143
|
+
}
|
28144
|
+
};
|
28145
|
+
module2.exports = validRange;
|
28146
|
+
}
|
28147
|
+
});
|
28148
|
+
|
28149
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js
|
28150
|
+
var require_outside = __commonJS({
|
28151
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js"(exports, module2) {
|
28152
|
+
var SemVer = require_semver();
|
28153
|
+
var Comparator = require_comparator();
|
28154
|
+
var { ANY } = Comparator;
|
28155
|
+
var Range = require_range();
|
28156
|
+
var satisfies = require_satisfies();
|
28157
|
+
var gt = require_gt();
|
28158
|
+
var lt = require_lt();
|
28159
|
+
var lte = require_lte();
|
28160
|
+
var gte = require_gte();
|
28161
|
+
var outside = (version, range, hilo, options) => {
|
28162
|
+
version = new SemVer(version, options);
|
28163
|
+
range = new Range(range, options);
|
28164
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
28165
|
+
switch (hilo) {
|
28166
|
+
case ">":
|
28167
|
+
gtfn = gt;
|
28168
|
+
ltefn = lte;
|
28169
|
+
ltfn = lt;
|
28170
|
+
comp = ">";
|
28171
|
+
ecomp = ">=";
|
28172
|
+
break;
|
28173
|
+
case "<":
|
28174
|
+
gtfn = lt;
|
28175
|
+
ltefn = gte;
|
28176
|
+
ltfn = gt;
|
28177
|
+
comp = "<";
|
28178
|
+
ecomp = "<=";
|
28179
|
+
break;
|
28180
|
+
default:
|
28181
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
28182
|
+
}
|
28183
|
+
if (satisfies(version, range, options)) {
|
28184
|
+
return false;
|
28185
|
+
}
|
28186
|
+
for (let i = 0; i < range.set.length; ++i) {
|
28187
|
+
const comparators = range.set[i];
|
28188
|
+
let high = null;
|
28189
|
+
let low = null;
|
28190
|
+
comparators.forEach((comparator) => {
|
28191
|
+
if (comparator.semver === ANY) {
|
28192
|
+
comparator = new Comparator(">=0.0.0");
|
28193
|
+
}
|
28194
|
+
high = high || comparator;
|
28195
|
+
low = low || comparator;
|
28196
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
28197
|
+
high = comparator;
|
28198
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
28199
|
+
low = comparator;
|
28200
|
+
}
|
28201
|
+
});
|
28202
|
+
if (high.operator === comp || high.operator === ecomp) {
|
28203
|
+
return false;
|
28204
|
+
}
|
28205
|
+
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
28206
|
+
return false;
|
28207
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
28208
|
+
return false;
|
28209
|
+
}
|
28210
|
+
}
|
28211
|
+
return true;
|
28212
|
+
};
|
28213
|
+
module2.exports = outside;
|
28214
|
+
}
|
28215
|
+
});
|
28216
|
+
|
28217
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js
|
28218
|
+
var require_gtr = __commonJS({
|
28219
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js"(exports, module2) {
|
28220
|
+
var outside = require_outside();
|
28221
|
+
var gtr = (version, range, options) => outside(version, range, ">", options);
|
28222
|
+
module2.exports = gtr;
|
28223
|
+
}
|
28224
|
+
});
|
28225
|
+
|
28226
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js
|
28227
|
+
var require_ltr = __commonJS({
|
28228
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js"(exports, module2) {
|
28229
|
+
var outside = require_outside();
|
28230
|
+
var ltr = (version, range, options) => outside(version, range, "<", options);
|
28231
|
+
module2.exports = ltr;
|
28232
|
+
}
|
28233
|
+
});
|
28234
|
+
|
28235
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js
|
28236
|
+
var require_intersects = __commonJS({
|
28237
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js"(exports, module2) {
|
28238
|
+
var Range = require_range();
|
28239
|
+
var intersects = (r1, r2, options) => {
|
28240
|
+
r1 = new Range(r1, options);
|
28241
|
+
r2 = new Range(r2, options);
|
28242
|
+
return r1.intersects(r2, options);
|
28243
|
+
};
|
28244
|
+
module2.exports = intersects;
|
28245
|
+
}
|
28246
|
+
});
|
28247
|
+
|
28248
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js
|
28249
|
+
var require_simplify = __commonJS({
|
28250
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js"(exports, module2) {
|
28251
|
+
var satisfies = require_satisfies();
|
28252
|
+
var compare = require_compare();
|
28253
|
+
module2.exports = (versions2, range, options) => {
|
28254
|
+
const set2 = [];
|
28255
|
+
let first = null;
|
28256
|
+
let prev = null;
|
28257
|
+
const v = versions2.sort((a, b) => compare(a, b, options));
|
28258
|
+
for (const version of v) {
|
28259
|
+
const included = satisfies(version, range, options);
|
28260
|
+
if (included) {
|
28261
|
+
prev = version;
|
28262
|
+
if (!first) {
|
28263
|
+
first = version;
|
28264
|
+
}
|
28265
|
+
} else {
|
28266
|
+
if (prev) {
|
28267
|
+
set2.push([first, prev]);
|
28268
|
+
}
|
28269
|
+
prev = null;
|
28270
|
+
first = null;
|
28271
|
+
}
|
28272
|
+
}
|
28273
|
+
if (first) {
|
28274
|
+
set2.push([first, null]);
|
28275
|
+
}
|
28276
|
+
const ranges = [];
|
28277
|
+
for (const [min, max] of set2) {
|
28278
|
+
if (min === max) {
|
28279
|
+
ranges.push(min);
|
28280
|
+
} else if (!max && min === v[0]) {
|
28281
|
+
ranges.push("*");
|
28282
|
+
} else if (!max) {
|
28283
|
+
ranges.push(`>=${min}`);
|
28284
|
+
} else if (min === v[0]) {
|
28285
|
+
ranges.push(`<=${max}`);
|
28286
|
+
} else {
|
28287
|
+
ranges.push(`${min} - ${max}`);
|
28288
|
+
}
|
28289
|
+
}
|
28290
|
+
const simplified = ranges.join(" || ");
|
28291
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
28292
|
+
return simplified.length < original.length ? simplified : range;
|
28293
|
+
};
|
28294
|
+
}
|
28295
|
+
});
|
28296
|
+
|
28297
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js
|
28298
|
+
var require_subset = __commonJS({
|
28299
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js"(exports, module2) {
|
28300
|
+
var Range = require_range();
|
28301
|
+
var Comparator = require_comparator();
|
28302
|
+
var { ANY } = Comparator;
|
28303
|
+
var satisfies = require_satisfies();
|
28304
|
+
var compare = require_compare();
|
28305
|
+
var subset = (sub, dom, options = {}) => {
|
28306
|
+
if (sub === dom) {
|
28307
|
+
return true;
|
28308
|
+
}
|
28309
|
+
sub = new Range(sub, options);
|
28310
|
+
dom = new Range(dom, options);
|
28311
|
+
let sawNonNull = false;
|
28312
|
+
OUTER:
|
28313
|
+
for (const simpleSub of sub.set) {
|
28314
|
+
for (const simpleDom of dom.set) {
|
28315
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
28316
|
+
sawNonNull = sawNonNull || isSub !== null;
|
28317
|
+
if (isSub) {
|
28318
|
+
continue OUTER;
|
28319
|
+
}
|
28320
|
+
}
|
28321
|
+
if (sawNonNull) {
|
28322
|
+
return false;
|
28323
|
+
}
|
28324
|
+
}
|
28325
|
+
return true;
|
28326
|
+
};
|
28327
|
+
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
28328
|
+
var minimumVersion = [new Comparator(">=0.0.0")];
|
28329
|
+
var simpleSubset = (sub, dom, options) => {
|
28330
|
+
if (sub === dom) {
|
28331
|
+
return true;
|
28332
|
+
}
|
28333
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
28334
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
28335
|
+
return true;
|
28336
|
+
} else if (options.includePrerelease) {
|
28337
|
+
sub = minimumVersionWithPreRelease;
|
28338
|
+
} else {
|
28339
|
+
sub = minimumVersion;
|
28340
|
+
}
|
28341
|
+
}
|
28342
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
28343
|
+
if (options.includePrerelease) {
|
28344
|
+
return true;
|
28345
|
+
} else {
|
28346
|
+
dom = minimumVersion;
|
28347
|
+
}
|
28348
|
+
}
|
28349
|
+
const eqSet = /* @__PURE__ */ new Set();
|
28350
|
+
let gt, lt;
|
28351
|
+
for (const c of sub) {
|
28352
|
+
if (c.operator === ">" || c.operator === ">=") {
|
28353
|
+
gt = higherGT(gt, c, options);
|
28354
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
28355
|
+
lt = lowerLT(lt, c, options);
|
28356
|
+
} else {
|
28357
|
+
eqSet.add(c.semver);
|
28358
|
+
}
|
28359
|
+
}
|
28360
|
+
if (eqSet.size > 1) {
|
28361
|
+
return null;
|
28362
|
+
}
|
28363
|
+
let gtltComp;
|
28364
|
+
if (gt && lt) {
|
28365
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
28366
|
+
if (gtltComp > 0) {
|
28367
|
+
return null;
|
28368
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
28369
|
+
return null;
|
28370
|
+
}
|
28371
|
+
}
|
28372
|
+
for (const eq of eqSet) {
|
28373
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
28374
|
+
return null;
|
28375
|
+
}
|
28376
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
28377
|
+
return null;
|
28378
|
+
}
|
28379
|
+
for (const c of dom) {
|
28380
|
+
if (!satisfies(eq, String(c), options)) {
|
28381
|
+
return false;
|
28382
|
+
}
|
28383
|
+
}
|
28384
|
+
return true;
|
28385
|
+
}
|
28386
|
+
let higher, lower;
|
28387
|
+
let hasDomLT, hasDomGT;
|
28388
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
28389
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
28390
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
28391
|
+
needDomLTPre = false;
|
28392
|
+
}
|
28393
|
+
for (const c of dom) {
|
28394
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
28395
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
28396
|
+
if (gt) {
|
28397
|
+
if (needDomGTPre) {
|
28398
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
28399
|
+
needDomGTPre = false;
|
28400
|
+
}
|
28401
|
+
}
|
28402
|
+
if (c.operator === ">" || c.operator === ">=") {
|
28403
|
+
higher = higherGT(gt, c, options);
|
28404
|
+
if (higher === c && higher !== gt) {
|
28405
|
+
return false;
|
28406
|
+
}
|
28407
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
|
28408
|
+
return false;
|
28409
|
+
}
|
28410
|
+
}
|
28411
|
+
if (lt) {
|
28412
|
+
if (needDomLTPre) {
|
28413
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
28414
|
+
needDomLTPre = false;
|
28415
|
+
}
|
28416
|
+
}
|
28417
|
+
if (c.operator === "<" || c.operator === "<=") {
|
28418
|
+
lower = lowerLT(lt, c, options);
|
28419
|
+
if (lower === c && lower !== lt) {
|
28420
|
+
return false;
|
28421
|
+
}
|
28422
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
|
28423
|
+
return false;
|
28424
|
+
}
|
28425
|
+
}
|
28426
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
28427
|
+
return false;
|
28428
|
+
}
|
28429
|
+
}
|
28430
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
28431
|
+
return false;
|
28432
|
+
}
|
28433
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
28434
|
+
return false;
|
28435
|
+
}
|
28436
|
+
if (needDomGTPre || needDomLTPre) {
|
28437
|
+
return false;
|
28438
|
+
}
|
28439
|
+
return true;
|
28440
|
+
};
|
28441
|
+
var higherGT = (a, b, options) => {
|
28442
|
+
if (!a) {
|
28443
|
+
return b;
|
28444
|
+
}
|
28445
|
+
const comp = compare(a.semver, b.semver, options);
|
28446
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
28447
|
+
};
|
28448
|
+
var lowerLT = (a, b, options) => {
|
28449
|
+
if (!a) {
|
28450
|
+
return b;
|
28451
|
+
}
|
28452
|
+
const comp = compare(a.semver, b.semver, options);
|
28453
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
28454
|
+
};
|
28455
|
+
module2.exports = subset;
|
28456
|
+
}
|
28457
|
+
});
|
28458
|
+
|
28459
|
+
// node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js
|
28460
|
+
var require_semver2 = __commonJS({
|
28461
|
+
"node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js"(exports, module2) {
|
28462
|
+
var internalRe = require_re();
|
28463
|
+
var constants = require_constants();
|
28464
|
+
var SemVer = require_semver();
|
28465
|
+
var identifiers = require_identifiers();
|
28466
|
+
var parse = require_parse();
|
28467
|
+
var valid = require_valid();
|
28468
|
+
var clean = require_clean();
|
28469
|
+
var inc = require_inc();
|
28470
|
+
var diff2 = require_diff();
|
28471
|
+
var major = require_major();
|
28472
|
+
var minor = require_minor();
|
28473
|
+
var patch = require_patch();
|
28474
|
+
var prerelease = require_prerelease();
|
28475
|
+
var compare = require_compare();
|
28476
|
+
var rcompare = require_rcompare();
|
28477
|
+
var compareLoose = require_compare_loose();
|
28478
|
+
var compareBuild = require_compare_build();
|
28479
|
+
var sort = require_sort();
|
28480
|
+
var rsort = require_rsort();
|
28481
|
+
var gt = require_gt();
|
28482
|
+
var lt = require_lt();
|
28483
|
+
var eq = require_eq();
|
28484
|
+
var neq = require_neq();
|
28485
|
+
var gte = require_gte();
|
28486
|
+
var lte = require_lte();
|
28487
|
+
var cmp = require_cmp();
|
28488
|
+
var coerce2 = require_coerce();
|
28489
|
+
var Comparator = require_comparator();
|
28490
|
+
var Range = require_range();
|
28491
|
+
var satisfies = require_satisfies();
|
28492
|
+
var toComparators = require_to_comparators();
|
28493
|
+
var maxSatisfying = require_max_satisfying();
|
28494
|
+
var minSatisfying = require_min_satisfying();
|
28495
|
+
var minVersion = require_min_version();
|
28496
|
+
var validRange = require_valid2();
|
28497
|
+
var outside = require_outside();
|
28498
|
+
var gtr = require_gtr();
|
28499
|
+
var ltr = require_ltr();
|
28500
|
+
var intersects = require_intersects();
|
28501
|
+
var simplifyRange = require_simplify();
|
28502
|
+
var subset = require_subset();
|
28503
|
+
module2.exports = {
|
28504
|
+
parse,
|
28505
|
+
valid,
|
28506
|
+
clean,
|
28507
|
+
inc,
|
28508
|
+
diff: diff2,
|
28509
|
+
major,
|
28510
|
+
minor,
|
28511
|
+
patch,
|
28512
|
+
prerelease,
|
28513
|
+
compare,
|
28514
|
+
rcompare,
|
28515
|
+
compareLoose,
|
28516
|
+
compareBuild,
|
28517
|
+
sort,
|
28518
|
+
rsort,
|
28519
|
+
gt,
|
28520
|
+
lt,
|
28521
|
+
eq,
|
28522
|
+
neq,
|
28523
|
+
gte,
|
28524
|
+
lte,
|
28525
|
+
cmp,
|
28526
|
+
coerce: coerce2,
|
28527
|
+
Comparator,
|
28528
|
+
Range,
|
28529
|
+
satisfies,
|
28530
|
+
toComparators,
|
28531
|
+
maxSatisfying,
|
28532
|
+
minSatisfying,
|
28533
|
+
minVersion,
|
28534
|
+
validRange,
|
28535
|
+
outside,
|
28536
|
+
gtr,
|
28537
|
+
ltr,
|
28538
|
+
intersects,
|
28539
|
+
simplifyRange,
|
28540
|
+
subset,
|
28541
|
+
SemVer,
|
28542
|
+
re: internalRe.re,
|
28543
|
+
src: internalRe.src,
|
28544
|
+
tokens: internalRe.t,
|
28545
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
28546
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
28547
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
28548
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
28549
|
+
};
|
28550
|
+
}
|
28551
|
+
});
|
28552
|
+
|
28553
|
+
// src/cli/utils.ts
|
28554
|
+
var import_semver, assertStudioNodeVersion, assertPackages, requiredApiVersion, assertOrmCoreVersion, ormCoreVersions;
|
28555
|
+
var init_utils3 = __esm({
|
28556
|
+
"src/cli/utils.ts"() {
|
28557
|
+
init_views();
|
28558
|
+
import_semver = __toESM(require_semver2());
|
28559
|
+
assertStudioNodeVersion = () => {
|
28560
|
+
if (import_semver.default.gte(process.version, "18.0.0"))
|
28561
|
+
return;
|
28562
|
+
err("Drizzle Studio requires NodeJS v18 or above");
|
28563
|
+
process.exit(1);
|
28564
|
+
};
|
28565
|
+
assertPackages = async (...pkgs) => {
|
28566
|
+
try {
|
28567
|
+
for (let i = 0; i < pkgs.length; i++) {
|
28568
|
+
const it = pkgs[i];
|
28569
|
+
await import(it);
|
28570
|
+
}
|
28571
|
+
} catch (e) {
|
28572
|
+
err(
|
28573
|
+
`please install required packages: ${pkgs.map((it) => `'${it}'`).join(" ")}`
|
28574
|
+
);
|
28575
|
+
process.exit(1);
|
28576
|
+
}
|
28577
|
+
};
|
28578
|
+
requiredApiVersion = 6;
|
28579
|
+
assertOrmCoreVersion = async () => {
|
28580
|
+
try {
|
28581
|
+
const { compatibilityVersion } = await import("drizzle-orm/version");
|
28582
|
+
if (compatibilityVersion && compatibilityVersion === requiredApiVersion)
|
28583
|
+
return;
|
28584
|
+
if (!compatibilityVersion || compatibilityVersion < requiredApiVersion) {
|
28585
|
+
console.log(
|
28586
|
+
"This version of drizzle-kit requires newer version of drizzle-orm\nPlease update drizzle-orm package to the latest version \u{1F44D}"
|
28587
|
+
);
|
28588
|
+
} else {
|
28589
|
+
console.log(
|
28590
|
+
"This version of drizzle-kit is outdated\nPlease update drizzle-kit package to the latest version \u{1F44D}"
|
28591
|
+
);
|
28592
|
+
}
|
28593
|
+
} catch (e) {
|
28594
|
+
console.log("Please install latest version of drizzle-orm");
|
28595
|
+
}
|
28596
|
+
process.exit(1);
|
28597
|
+
};
|
28598
|
+
ormCoreVersions = async () => {
|
28599
|
+
try {
|
28600
|
+
const { compatibilityVersion, npmVersion } = await import("drizzle-orm/version");
|
28601
|
+
return { compatibilityVersion, npmVersion };
|
28602
|
+
} catch (e) {
|
28603
|
+
return {};
|
28604
|
+
}
|
28605
|
+
};
|
28606
|
+
}
|
28607
|
+
});
|
28608
|
+
|
28609
|
+
// node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/lib/SqlString.js
|
28610
|
+
var require_SqlString = __commonJS({
|
28611
|
+
"node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/lib/SqlString.js"(exports) {
|
28612
|
+
var SqlString = exports;
|
28613
|
+
var ID_GLOBAL_REGEXP = /`/g;
|
28614
|
+
var QUAL_GLOBAL_REGEXP = /\./g;
|
28615
|
+
var CHARS_GLOBAL_REGEXP = /[\0\b\t\n\r\x1a\"\'\\]/g;
|
28616
|
+
var CHARS_ESCAPE_MAP = {
|
28617
|
+
"\0": "\\0",
|
28618
|
+
"\b": "\\b",
|
28619
|
+
" ": "\\t",
|
28620
|
+
"\n": "\\n",
|
28621
|
+
"\r": "\\r",
|
28622
|
+
"": "\\Z",
|
28623
|
+
'"': '\\"',
|
28624
|
+
"'": "\\'",
|
28625
|
+
"\\": "\\\\"
|
28626
|
+
};
|
28627
|
+
SqlString.escapeId = function escapeId(val, forbidQualified) {
|
28628
|
+
if (Array.isArray(val)) {
|
28629
|
+
var sql2 = "";
|
28630
|
+
for (var i = 0; i < val.length; i++) {
|
28631
|
+
sql2 += (i === 0 ? "" : ", ") + SqlString.escapeId(val[i], forbidQualified);
|
28632
|
+
}
|
28633
|
+
return sql2;
|
28634
|
+
} else if (forbidQualified) {
|
28635
|
+
return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``") + "`";
|
28636
|
+
} else {
|
28637
|
+
return "`" + String(val).replace(ID_GLOBAL_REGEXP, "``").replace(QUAL_GLOBAL_REGEXP, "`.`") + "`";
|
28638
|
+
}
|
28639
|
+
};
|
28640
|
+
SqlString.escape = function escape2(val, stringifyObjects, timeZone) {
|
28641
|
+
if (val === void 0 || val === null) {
|
28642
|
+
return "NULL";
|
28643
|
+
}
|
28644
|
+
switch (typeof val) {
|
28645
|
+
case "boolean":
|
28646
|
+
return val ? "true" : "false";
|
28647
|
+
case "number":
|
28648
|
+
return val + "";
|
28649
|
+
case "object":
|
28650
|
+
if (Object.prototype.toString.call(val) === "[object Date]") {
|
28651
|
+
return SqlString.dateToString(val, timeZone || "local");
|
28652
|
+
} else if (Array.isArray(val)) {
|
28653
|
+
return SqlString.arrayToList(val, timeZone);
|
28654
|
+
} else if (Buffer.isBuffer(val)) {
|
28655
|
+
return SqlString.bufferToString(val);
|
28656
|
+
} else if (typeof val.toSqlString === "function") {
|
28657
|
+
return String(val.toSqlString());
|
28658
|
+
} else if (stringifyObjects) {
|
28659
|
+
return escapeString(val.toString());
|
28660
|
+
} else {
|
28661
|
+
return SqlString.objectToValues(val, timeZone);
|
28662
|
+
}
|
28663
|
+
default:
|
28664
|
+
return escapeString(val);
|
28665
|
+
}
|
28666
|
+
};
|
28667
|
+
SqlString.arrayToList = function arrayToList(array, timeZone) {
|
28668
|
+
var sql2 = "";
|
28669
|
+
for (var i = 0; i < array.length; i++) {
|
28670
|
+
var val = array[i];
|
28671
|
+
if (Array.isArray(val)) {
|
28672
|
+
sql2 += (i === 0 ? "" : ", ") + "(" + SqlString.arrayToList(val, timeZone) + ")";
|
28673
|
+
} else {
|
28674
|
+
sql2 += (i === 0 ? "" : ", ") + SqlString.escape(val, true, timeZone);
|
28675
|
+
}
|
28676
|
+
}
|
28677
|
+
return sql2;
|
28678
|
+
};
|
28679
|
+
SqlString.format = function format(sql2, values, stringifyObjects, timeZone) {
|
28680
|
+
if (values == null) {
|
28681
|
+
return sql2;
|
28682
|
+
}
|
28683
|
+
if (!Array.isArray(values)) {
|
28684
|
+
values = [values];
|
28685
|
+
}
|
28686
|
+
var chunkIndex = 0;
|
28687
|
+
var placeholdersRegex = /\?+/g;
|
28688
|
+
var result = "";
|
28689
|
+
var valuesIndex = 0;
|
28690
|
+
var match2;
|
28691
|
+
while (valuesIndex < values.length && (match2 = placeholdersRegex.exec(sql2))) {
|
28692
|
+
var len = match2[0].length;
|
28693
|
+
if (len > 2) {
|
28694
|
+
continue;
|
28695
|
+
}
|
28696
|
+
var value = len === 2 ? SqlString.escapeId(values[valuesIndex]) : SqlString.escape(values[valuesIndex], stringifyObjects, timeZone);
|
28697
|
+
result += sql2.slice(chunkIndex, match2.index) + value;
|
28698
|
+
chunkIndex = placeholdersRegex.lastIndex;
|
28699
|
+
valuesIndex++;
|
28700
|
+
}
|
28701
|
+
if (chunkIndex === 0) {
|
28702
|
+
return sql2;
|
28703
|
+
}
|
28704
|
+
if (chunkIndex < sql2.length) {
|
28705
|
+
return result + sql2.slice(chunkIndex);
|
28706
|
+
}
|
28707
|
+
return result;
|
28708
|
+
};
|
28709
|
+
SqlString.dateToString = function dateToString(date, timeZone) {
|
28710
|
+
var dt = new Date(date);
|
28711
|
+
if (isNaN(dt.getTime())) {
|
28712
|
+
return "NULL";
|
28713
|
+
}
|
28714
|
+
var year;
|
28715
|
+
var month;
|
28716
|
+
var day;
|
28717
|
+
var hour;
|
28718
|
+
var minute;
|
28719
|
+
var second;
|
28720
|
+
var millisecond;
|
28721
|
+
if (timeZone === "local") {
|
28722
|
+
year = dt.getFullYear();
|
28723
|
+
month = dt.getMonth() + 1;
|
28724
|
+
day = dt.getDate();
|
28725
|
+
hour = dt.getHours();
|
28726
|
+
minute = dt.getMinutes();
|
28727
|
+
second = dt.getSeconds();
|
28728
|
+
millisecond = dt.getMilliseconds();
|
28729
|
+
} else {
|
28730
|
+
var tz = convertTimezone(timeZone);
|
28731
|
+
if (tz !== false && tz !== 0) {
|
28732
|
+
dt.setTime(dt.getTime() + tz * 6e4);
|
28733
|
+
}
|
28734
|
+
year = dt.getUTCFullYear();
|
28735
|
+
month = dt.getUTCMonth() + 1;
|
28736
|
+
day = dt.getUTCDate();
|
28737
|
+
hour = dt.getUTCHours();
|
28738
|
+
minute = dt.getUTCMinutes();
|
28739
|
+
second = dt.getUTCSeconds();
|
28740
|
+
millisecond = dt.getUTCMilliseconds();
|
28741
|
+
}
|
28742
|
+
var str = zeroPad(year, 4) + "-" + zeroPad(month, 2) + "-" + zeroPad(day, 2) + " " + zeroPad(hour, 2) + ":" + zeroPad(minute, 2) + ":" + zeroPad(second, 2) + "." + zeroPad(millisecond, 3);
|
28743
|
+
return escapeString(str);
|
28744
|
+
};
|
28745
|
+
SqlString.bufferToString = function bufferToString(buffer) {
|
28746
|
+
return "X" + escapeString(buffer.toString("hex"));
|
28747
|
+
};
|
28748
|
+
SqlString.objectToValues = function objectToValues(object, timeZone) {
|
28749
|
+
var sql2 = "";
|
28750
|
+
for (var key in object) {
|
28751
|
+
var val = object[key];
|
28752
|
+
if (typeof val === "function") {
|
28753
|
+
continue;
|
28754
|
+
}
|
28755
|
+
sql2 += (sql2.length === 0 ? "" : ", ") + SqlString.escapeId(key) + " = " + SqlString.escape(val, true, timeZone);
|
28756
|
+
}
|
28757
|
+
return sql2;
|
28758
|
+
};
|
28759
|
+
SqlString.raw = function raw(sql2) {
|
28760
|
+
if (typeof sql2 !== "string") {
|
28761
|
+
throw new TypeError("argument sql must be a string");
|
28762
|
+
}
|
28763
|
+
return {
|
28764
|
+
toSqlString: function toSqlString() {
|
28765
|
+
return sql2;
|
28766
|
+
}
|
28767
|
+
};
|
28768
|
+
};
|
28769
|
+
function escapeString(val) {
|
28770
|
+
var chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex = 0;
|
28771
|
+
var escapedVal = "";
|
28772
|
+
var match2;
|
28773
|
+
while (match2 = CHARS_GLOBAL_REGEXP.exec(val)) {
|
28774
|
+
escapedVal += val.slice(chunkIndex, match2.index) + CHARS_ESCAPE_MAP[match2[0]];
|
28775
|
+
chunkIndex = CHARS_GLOBAL_REGEXP.lastIndex;
|
28776
|
+
}
|
28777
|
+
if (chunkIndex === 0) {
|
28778
|
+
return "'" + val + "'";
|
28779
|
+
}
|
28780
|
+
if (chunkIndex < val.length) {
|
28781
|
+
return "'" + escapedVal + val.slice(chunkIndex) + "'";
|
28782
|
+
}
|
28783
|
+
return "'" + escapedVal + "'";
|
28784
|
+
}
|
28785
|
+
function zeroPad(number, length) {
|
28786
|
+
number = number.toString();
|
28787
|
+
while (number.length < length) {
|
28788
|
+
number = "0" + number;
|
28789
|
+
}
|
28790
|
+
return number;
|
28791
|
+
}
|
28792
|
+
function convertTimezone(tz) {
|
28793
|
+
if (tz === "Z") {
|
28794
|
+
return 0;
|
28795
|
+
}
|
28796
|
+
var m = tz.match(/([\+\-\s])(\d\d):?(\d\d)?/);
|
28797
|
+
if (m) {
|
28798
|
+
return (m[1] === "-" ? -1 : 1) * (parseInt(m[2], 10) + (m[3] ? parseInt(m[3], 10) : 0) / 60) * 60;
|
28799
|
+
}
|
28800
|
+
return false;
|
28801
|
+
}
|
28802
|
+
}
|
28803
|
+
});
|
28804
|
+
|
28805
|
+
// node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js
|
28806
|
+
var require_sqlstring = __commonJS({
|
28807
|
+
"node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js"(exports, module2) {
|
28808
|
+
module2.exports = require_SqlString();
|
28809
|
+
}
|
28810
|
+
});
|
28811
|
+
|
28812
|
+
// node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js
|
28813
|
+
var require_denque = __commonJS({
|
28814
|
+
"node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js"(exports, module2) {
|
28815
|
+
"use strict";
|
28816
|
+
function Denque(array, options) {
|
28817
|
+
var options = options || {};
|
28818
|
+
this._capacity = options.capacity;
|
28819
|
+
this._head = 0;
|
28820
|
+
this._tail = 0;
|
28821
|
+
if (Array.isArray(array)) {
|
28822
|
+
this._fromArray(array);
|
28823
|
+
} else {
|
28824
|
+
this._capacityMask = 3;
|
28825
|
+
this._list = new Array(4);
|
28826
|
+
}
|
28827
|
+
}
|
28828
|
+
Denque.prototype.peekAt = function peekAt(index4) {
|
28829
|
+
var i = index4;
|
28830
|
+
if (i !== (i | 0)) {
|
28831
|
+
return void 0;
|
28832
|
+
}
|
28833
|
+
var len = this.size();
|
28834
|
+
if (i >= len || i < -len)
|
28835
|
+
return void 0;
|
28836
|
+
if (i < 0)
|
28837
|
+
i += len;
|
28838
|
+
i = this._head + i & this._capacityMask;
|
28839
|
+
return this._list[i];
|
28840
|
+
};
|
28841
|
+
Denque.prototype.get = function get(i) {
|
28842
|
+
return this.peekAt(i);
|
28843
|
+
};
|
28844
|
+
Denque.prototype.peek = function peek() {
|
28845
|
+
if (this._head === this._tail)
|
28846
|
+
return void 0;
|
28847
|
+
return this._list[this._head];
|
28848
|
+
};
|
28849
|
+
Denque.prototype.peekFront = function peekFront() {
|
28850
|
+
return this.peek();
|
28851
|
+
};
|
28852
|
+
Denque.prototype.peekBack = function peekBack() {
|
28853
|
+
return this.peekAt(-1);
|
28854
|
+
};
|
28855
|
+
Object.defineProperty(Denque.prototype, "length", {
|
28856
|
+
get: function length() {
|
28857
|
+
return this.size();
|
28858
|
+
}
|
28859
|
+
});
|
28860
|
+
Denque.prototype.size = function size() {
|
28861
|
+
if (this._head === this._tail)
|
28862
|
+
return 0;
|
28863
|
+
if (this._head < this._tail)
|
28864
|
+
return this._tail - this._head;
|
28865
|
+
else
|
28866
|
+
return this._capacityMask + 1 - (this._head - this._tail);
|
28867
|
+
};
|
28868
|
+
Denque.prototype.unshift = function unshift(item) {
|
28869
|
+
if (arguments.length === 0)
|
28870
|
+
return this.size();
|
28871
|
+
var len = this._list.length;
|
28872
|
+
this._head = this._head - 1 + len & this._capacityMask;
|
28873
|
+
this._list[this._head] = item;
|
28874
|
+
if (this._tail === this._head)
|
28875
|
+
this._growArray();
|
28876
|
+
if (this._capacity && this.size() > this._capacity)
|
28877
|
+
this.pop();
|
28878
|
+
if (this._head < this._tail)
|
28879
|
+
return this._tail - this._head;
|
28880
|
+
else
|
28881
|
+
return this._capacityMask + 1 - (this._head - this._tail);
|
28882
|
+
};
|
28883
|
+
Denque.prototype.shift = function shift() {
|
28884
|
+
var head = this._head;
|
28885
|
+
if (head === this._tail)
|
28886
|
+
return void 0;
|
28887
|
+
var item = this._list[head];
|
28888
|
+
this._list[head] = void 0;
|
28889
|
+
this._head = head + 1 & this._capacityMask;
|
28890
|
+
if (head < 2 && this._tail > 1e4 && this._tail <= this._list.length >>> 2)
|
28891
|
+
this._shrinkArray();
|
28892
|
+
return item;
|
28893
|
+
};
|
28894
|
+
Denque.prototype.push = function push(item) {
|
28895
|
+
if (arguments.length === 0)
|
28896
|
+
return this.size();
|
28897
|
+
var tail = this._tail;
|
28898
|
+
this._list[tail] = item;
|
28899
|
+
this._tail = tail + 1 & this._capacityMask;
|
28900
|
+
if (this._tail === this._head) {
|
28901
|
+
this._growArray();
|
28902
|
+
}
|
28903
|
+
if (this._capacity && this.size() > this._capacity) {
|
28904
|
+
this.shift();
|
27134
28905
|
}
|
27135
|
-
|
27136
|
-
return this
|
28906
|
+
if (this._head < this._tail)
|
28907
|
+
return this._tail - this._head;
|
28908
|
+
else
|
28909
|
+
return this._capacityMask + 1 - (this._head - this._tail);
|
28910
|
+
};
|
28911
|
+
Denque.prototype.pop = function pop() {
|
28912
|
+
var tail = this._tail;
|
28913
|
+
if (tail === this._head)
|
28914
|
+
return void 0;
|
28915
|
+
var len = this._list.length;
|
28916
|
+
this._tail = tail - 1 + len & this._capacityMask;
|
28917
|
+
var item = this._list[this._tail];
|
28918
|
+
this._list[this._tail] = void 0;
|
28919
|
+
if (this._head < 2 && tail > 1e4 && tail <= len >>> 2)
|
28920
|
+
this._shrinkArray();
|
28921
|
+
return item;
|
28922
|
+
};
|
28923
|
+
Denque.prototype.removeOne = function removeOne(index4) {
|
28924
|
+
var i = index4;
|
28925
|
+
if (i !== (i | 0)) {
|
28926
|
+
return void 0;
|
27137
28927
|
}
|
27138
|
-
|
27139
|
-
|
27140
|
-
|
27141
|
-
|
27142
|
-
|
27143
|
-
|
27144
|
-
|
27145
|
-
|
27146
|
-
|
27147
|
-
|
27148
|
-
|
28928
|
+
if (this._head === this._tail)
|
28929
|
+
return void 0;
|
28930
|
+
var size = this.size();
|
28931
|
+
var len = this._list.length;
|
28932
|
+
if (i >= size || i < -size)
|
28933
|
+
return void 0;
|
28934
|
+
if (i < 0)
|
28935
|
+
i += size;
|
28936
|
+
i = this._head + i & this._capacityMask;
|
28937
|
+
var item = this._list[i];
|
28938
|
+
var k;
|
28939
|
+
if (index4 < size / 2) {
|
28940
|
+
for (k = index4; k > 0; k--) {
|
28941
|
+
this._list[i] = this._list[i = i - 1 + len & this._capacityMask];
|
27149
28942
|
}
|
27150
|
-
|
28943
|
+
this._list[i] = void 0;
|
28944
|
+
this._head = this._head + 1 + len & this._capacityMask;
|
28945
|
+
} else {
|
28946
|
+
for (k = size - 1 - index4; k > 0; k--) {
|
28947
|
+
this._list[i] = this._list[i = i + 1 + len & this._capacityMask];
|
28948
|
+
}
|
28949
|
+
this._list[i] = void 0;
|
28950
|
+
this._tail = this._tail - 1 + len & this._capacityMask;
|
27151
28951
|
}
|
27152
|
-
|
27153
|
-
|
28952
|
+
return item;
|
28953
|
+
};
|
28954
|
+
Denque.prototype.remove = function remove(index4, count) {
|
28955
|
+
var i = index4;
|
28956
|
+
var removed;
|
28957
|
+
var del_count = count;
|
28958
|
+
if (i !== (i | 0)) {
|
28959
|
+
return void 0;
|
27154
28960
|
}
|
27155
|
-
|
27156
|
-
return
|
28961
|
+
if (this._head === this._tail)
|
28962
|
+
return void 0;
|
28963
|
+
var size = this.size();
|
28964
|
+
var len = this._list.length;
|
28965
|
+
if (i >= size || i < -size || count < 1)
|
28966
|
+
return void 0;
|
28967
|
+
if (i < 0)
|
28968
|
+
i += size;
|
28969
|
+
if (count === 1 || !count) {
|
28970
|
+
removed = new Array(1);
|
28971
|
+
removed[0] = this.removeOne(i);
|
28972
|
+
return removed;
|
27157
28973
|
}
|
27158
|
-
|
27159
|
-
|
28974
|
+
if (i === 0 && i + count >= size) {
|
28975
|
+
removed = this.toArray();
|
28976
|
+
this.clear();
|
28977
|
+
return removed;
|
27160
28978
|
}
|
27161
|
-
|
27162
|
-
|
27163
|
-
|
27164
|
-
|
27165
|
-
|
27166
|
-
|
27167
|
-
}
|
28979
|
+
if (i + count > size)
|
28980
|
+
count = size - i;
|
28981
|
+
var k;
|
28982
|
+
removed = new Array(count);
|
28983
|
+
for (k = 0; k < count; k++) {
|
28984
|
+
removed[k] = this._list[this._head + i + k & this._capacityMask];
|
27168
28985
|
}
|
27169
|
-
|
27170
|
-
|
27171
|
-
|
27172
|
-
|
27173
|
-
|
27174
|
-
walker = next;
|
28986
|
+
i = this._head + i & this._capacityMask;
|
28987
|
+
if (index4 + count === size) {
|
28988
|
+
this._tail = this._tail - count + len & this._capacityMask;
|
28989
|
+
for (k = count; k > 0; k--) {
|
28990
|
+
this._list[i = i + 1 + len & this._capacityMask] = void 0;
|
27175
28991
|
}
|
28992
|
+
return removed;
|
27176
28993
|
}
|
27177
|
-
|
27178
|
-
|
27179
|
-
|
27180
|
-
|
27181
|
-
return this[LRU_LIST].toArray().map((k) => k.value);
|
27182
|
-
}
|
27183
|
-
reset() {
|
27184
|
-
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
|
27185
|
-
this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
|
28994
|
+
if (index4 === 0) {
|
28995
|
+
this._head = this._head + count + len & this._capacityMask;
|
28996
|
+
for (k = count - 1; k > 0; k--) {
|
28997
|
+
this._list[i = i + 1 + len & this._capacityMask] = void 0;
|
27186
28998
|
}
|
27187
|
-
|
27188
|
-
this[LRU_LIST] = new Yallist();
|
27189
|
-
this[LENGTH] = 0;
|
27190
|
-
}
|
27191
|
-
dump() {
|
27192
|
-
return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
|
27193
|
-
k: hit.key,
|
27194
|
-
v: hit.value,
|
27195
|
-
e: hit.now + (hit.maxAge || 0)
|
27196
|
-
}).toArray().filter((h) => h);
|
27197
|
-
}
|
27198
|
-
dumpLru() {
|
27199
|
-
return this[LRU_LIST];
|
28999
|
+
return removed;
|
27200
29000
|
}
|
27201
|
-
|
27202
|
-
|
27203
|
-
|
27204
|
-
|
27205
|
-
const now = maxAge ? Date.now() : 0;
|
27206
|
-
const len = this[LENGTH_CALCULATOR](value, key);
|
27207
|
-
if (this[CACHE].has(key)) {
|
27208
|
-
if (len > this[MAX]) {
|
27209
|
-
del(this, this[CACHE].get(key));
|
27210
|
-
return false;
|
27211
|
-
}
|
27212
|
-
const node = this[CACHE].get(key);
|
27213
|
-
const item = node.value;
|
27214
|
-
if (this[DISPOSE]) {
|
27215
|
-
if (!this[NO_DISPOSE_ON_SET])
|
27216
|
-
this[DISPOSE](key, item.value);
|
27217
|
-
}
|
27218
|
-
item.now = now;
|
27219
|
-
item.maxAge = maxAge;
|
27220
|
-
item.value = value;
|
27221
|
-
this[LENGTH] += len - item.length;
|
27222
|
-
item.length = len;
|
27223
|
-
this.get(key);
|
27224
|
-
trim(this);
|
27225
|
-
return true;
|
29001
|
+
if (i < size / 2) {
|
29002
|
+
this._head = this._head + index4 + count + len & this._capacityMask;
|
29003
|
+
for (k = index4; k > 0; k--) {
|
29004
|
+
this.unshift(this._list[i = i - 1 + len & this._capacityMask]);
|
27226
29005
|
}
|
27227
|
-
|
27228
|
-
|
27229
|
-
|
27230
|
-
|
27231
|
-
|
29006
|
+
i = this._head - 1 + len & this._capacityMask;
|
29007
|
+
while (del_count > 0) {
|
29008
|
+
this._list[i = i - 1 + len & this._capacityMask] = void 0;
|
29009
|
+
del_count--;
|
29010
|
+
}
|
29011
|
+
if (index4 < 0)
|
29012
|
+
this._tail = i;
|
29013
|
+
} else {
|
29014
|
+
this._tail = i;
|
29015
|
+
i = i + count + len & this._capacityMask;
|
29016
|
+
for (k = size - (count + index4); k > 0; k--) {
|
29017
|
+
this.push(this._list[i++]);
|
29018
|
+
}
|
29019
|
+
i = this._tail;
|
29020
|
+
while (del_count > 0) {
|
29021
|
+
this._list[i = i + 1 + len & this._capacityMask] = void 0;
|
29022
|
+
del_count--;
|
27232
29023
|
}
|
27233
|
-
this[LENGTH] += hit.length;
|
27234
|
-
this[LRU_LIST].unshift(hit);
|
27235
|
-
this[CACHE].set(key, this[LRU_LIST].head);
|
27236
|
-
trim(this);
|
27237
|
-
return true;
|
27238
|
-
}
|
27239
|
-
has(key) {
|
27240
|
-
if (!this[CACHE].has(key))
|
27241
|
-
return false;
|
27242
|
-
const hit = this[CACHE].get(key).value;
|
27243
|
-
return !isStale(this, hit);
|
27244
|
-
}
|
27245
|
-
get(key) {
|
27246
|
-
return get(this, key, true);
|
27247
|
-
}
|
27248
|
-
peek(key) {
|
27249
|
-
return get(this, key, false);
|
27250
|
-
}
|
27251
|
-
pop() {
|
27252
|
-
const node = this[LRU_LIST].tail;
|
27253
|
-
if (!node)
|
27254
|
-
return null;
|
27255
|
-
del(this, node);
|
27256
|
-
return node.value;
|
27257
29024
|
}
|
27258
|
-
|
27259
|
-
|
29025
|
+
if (this._head < 2 && this._tail > 1e4 && this._tail <= len >>> 2)
|
29026
|
+
this._shrinkArray();
|
29027
|
+
return removed;
|
29028
|
+
};
|
29029
|
+
Denque.prototype.splice = function splice(index4, count) {
|
29030
|
+
var i = index4;
|
29031
|
+
if (i !== (i | 0)) {
|
29032
|
+
return void 0;
|
27260
29033
|
}
|
27261
|
-
|
27262
|
-
|
27263
|
-
|
27264
|
-
|
27265
|
-
|
27266
|
-
|
27267
|
-
|
27268
|
-
|
27269
|
-
|
27270
|
-
|
27271
|
-
|
27272
|
-
|
29034
|
+
var size = this.size();
|
29035
|
+
if (i < 0)
|
29036
|
+
i += size;
|
29037
|
+
if (i > size)
|
29038
|
+
return void 0;
|
29039
|
+
if (arguments.length > 2) {
|
29040
|
+
var k;
|
29041
|
+
var temp;
|
29042
|
+
var removed;
|
29043
|
+
var arg_len = arguments.length;
|
29044
|
+
var len = this._list.length;
|
29045
|
+
var arguments_index = 2;
|
29046
|
+
if (!size || i < size / 2) {
|
29047
|
+
temp = new Array(i);
|
29048
|
+
for (k = 0; k < i; k++) {
|
29049
|
+
temp[k] = this._list[this._head + k & this._capacityMask];
|
29050
|
+
}
|
29051
|
+
if (count === 0) {
|
29052
|
+
removed = [];
|
29053
|
+
if (i > 0) {
|
29054
|
+
this._head = this._head + i + len & this._capacityMask;
|
27273
29055
|
}
|
29056
|
+
} else {
|
29057
|
+
removed = this.remove(i, count);
|
29058
|
+
this._head = this._head + i + len & this._capacityMask;
|
29059
|
+
}
|
29060
|
+
while (arg_len > arguments_index) {
|
29061
|
+
this.unshift(arguments[--arg_len]);
|
29062
|
+
}
|
29063
|
+
for (k = i; k > 0; k--) {
|
29064
|
+
this.unshift(temp[k - 1]);
|
27274
29065
|
}
|
27275
|
-
}
|
27276
|
-
}
|
27277
|
-
prune() {
|
27278
|
-
this[CACHE].forEach((value, key) => get(this, key, false));
|
27279
|
-
}
|
27280
|
-
};
|
27281
|
-
var get = (self2, key, doUse) => {
|
27282
|
-
const node = self2[CACHE].get(key);
|
27283
|
-
if (node) {
|
27284
|
-
const hit = node.value;
|
27285
|
-
if (isStale(self2, hit)) {
|
27286
|
-
del(self2, node);
|
27287
|
-
if (!self2[ALLOW_STALE])
|
27288
|
-
return void 0;
|
27289
29066
|
} else {
|
27290
|
-
|
27291
|
-
|
27292
|
-
|
27293
|
-
|
29067
|
+
temp = new Array(size - (i + count));
|
29068
|
+
var leng = temp.length;
|
29069
|
+
for (k = 0; k < leng; k++) {
|
29070
|
+
temp[k] = this._list[this._head + i + count + k & this._capacityMask];
|
29071
|
+
}
|
29072
|
+
if (count === 0) {
|
29073
|
+
removed = [];
|
29074
|
+
if (i != size) {
|
29075
|
+
this._tail = this._head + i + len & this._capacityMask;
|
29076
|
+
}
|
29077
|
+
} else {
|
29078
|
+
removed = this.remove(i, count);
|
29079
|
+
this._tail = this._tail - leng + len & this._capacityMask;
|
29080
|
+
}
|
29081
|
+
while (arguments_index < arg_len) {
|
29082
|
+
this.push(arguments[arguments_index++]);
|
29083
|
+
}
|
29084
|
+
for (k = 0; k < leng; k++) {
|
29085
|
+
this.push(temp[k]);
|
27294
29086
|
}
|
27295
29087
|
}
|
27296
|
-
return
|
29088
|
+
return removed;
|
29089
|
+
} else {
|
29090
|
+
return this.remove(i, count);
|
27297
29091
|
}
|
27298
29092
|
};
|
27299
|
-
|
27300
|
-
|
27301
|
-
|
27302
|
-
|
27303
|
-
return hit.maxAge ? diff2 > hit.maxAge : self2[MAX_AGE] && diff2 > self2[MAX_AGE];
|
29093
|
+
Denque.prototype.clear = function clear() {
|
29094
|
+
this._list = new Array(this._list.length);
|
29095
|
+
this._head = 0;
|
29096
|
+
this._tail = 0;
|
27304
29097
|
};
|
27305
|
-
|
27306
|
-
|
27307
|
-
for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
|
27308
|
-
const prev = walker.prev;
|
27309
|
-
del(self2, walker);
|
27310
|
-
walker = prev;
|
27311
|
-
}
|
27312
|
-
}
|
29098
|
+
Denque.prototype.isEmpty = function isEmpty() {
|
29099
|
+
return this._head === this._tail;
|
27313
29100
|
};
|
27314
|
-
|
27315
|
-
|
27316
|
-
const hit = node.value;
|
27317
|
-
if (self2[DISPOSE])
|
27318
|
-
self2[DISPOSE](hit.key, hit.value);
|
27319
|
-
self2[LENGTH] -= hit.length;
|
27320
|
-
self2[CACHE].delete(hit.key);
|
27321
|
-
self2[LRU_LIST].removeNode(node);
|
27322
|
-
}
|
29101
|
+
Denque.prototype.toArray = function toArray() {
|
29102
|
+
return this._copyArray(false);
|
27323
29103
|
};
|
27324
|
-
|
27325
|
-
|
27326
|
-
|
27327
|
-
|
27328
|
-
|
27329
|
-
|
27330
|
-
|
29104
|
+
Denque.prototype._fromArray = function _fromArray(array) {
|
29105
|
+
var length = array.length;
|
29106
|
+
var capacity = this._nextPowerOf2(length);
|
29107
|
+
this._list = new Array(capacity);
|
29108
|
+
this._capacityMask = capacity - 1;
|
29109
|
+
this._tail = length;
|
29110
|
+
for (var i = 0; i < length; i++)
|
29111
|
+
this._list[i] = array[i];
|
29112
|
+
};
|
29113
|
+
Denque.prototype._copyArray = function _copyArray(fullCopy, size) {
|
29114
|
+
var src = this._list;
|
29115
|
+
var capacity = src.length;
|
29116
|
+
var length = this.length;
|
29117
|
+
size = size | length;
|
29118
|
+
if (size == length && this._head < this._tail) {
|
29119
|
+
return this._list.slice(this._head, this._tail);
|
29120
|
+
}
|
29121
|
+
var dest = new Array(size);
|
29122
|
+
var k = 0;
|
29123
|
+
var i;
|
29124
|
+
if (fullCopy || this._head > this._tail) {
|
29125
|
+
for (i = this._head; i < capacity; i++)
|
29126
|
+
dest[k++] = src[i];
|
29127
|
+
for (i = 0; i < this._tail; i++)
|
29128
|
+
dest[k++] = src[i];
|
29129
|
+
} else {
|
29130
|
+
for (i = this._head; i < this._tail; i++)
|
29131
|
+
dest[k++] = src[i];
|
27331
29132
|
}
|
29133
|
+
return dest;
|
27332
29134
|
};
|
27333
|
-
|
27334
|
-
|
27335
|
-
|
27336
|
-
|
27337
|
-
|
27338
|
-
|
29135
|
+
Denque.prototype._growArray = function _growArray() {
|
29136
|
+
if (this._head != 0) {
|
29137
|
+
var newList = this._copyArray(true, this._list.length << 1);
|
29138
|
+
this._tail = this._list.length;
|
29139
|
+
this._head = 0;
|
29140
|
+
this._list = newList;
|
29141
|
+
} else {
|
29142
|
+
this._tail = this._list.length;
|
29143
|
+
this._list.length <<= 1;
|
27339
29144
|
}
|
27340
|
-
|
27341
|
-
fn.call(thisp, hit.value, hit.key, self2);
|
29145
|
+
this._capacityMask = this._capacityMask << 1 | 1;
|
27342
29146
|
};
|
27343
|
-
|
29147
|
+
Denque.prototype._shrinkArray = function _shrinkArray() {
|
29148
|
+
this._list.length >>>= 1;
|
29149
|
+
this._capacityMask >>>= 1;
|
29150
|
+
};
|
29151
|
+
Denque.prototype._nextPowerOf2 = function _nextPowerOf2(num) {
|
29152
|
+
var log2 = Math.log(num) / Math.log(2);
|
29153
|
+
var nextPow2 = 1 << log2 + 1;
|
29154
|
+
return Math.max(nextPow2, 4);
|
29155
|
+
};
|
29156
|
+
module2.exports = Denque;
|
27344
29157
|
}
|
27345
29158
|
});
|
27346
29159
|
|
@@ -45610,7 +47423,7 @@ var require_expand = __commonJS({
|
|
45610
47423
|
});
|
45611
47424
|
|
45612
47425
|
// node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js
|
45613
|
-
var
|
47426
|
+
var require_constants2 = __commonJS({
|
45614
47427
|
"node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js"(exports, module2) {
|
45615
47428
|
"use strict";
|
45616
47429
|
module2.exports = {
|
@@ -45711,7 +47524,7 @@ var require_constants = __commonJS({
|
|
45711
47524
|
});
|
45712
47525
|
|
45713
47526
|
// node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js
|
45714
|
-
var
|
47527
|
+
var require_parse2 = __commonJS({
|
45715
47528
|
"node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js"(exports, module2) {
|
45716
47529
|
"use strict";
|
45717
47530
|
var stringify = require_stringify();
|
@@ -45743,7 +47556,7 @@ var require_parse = __commonJS({
|
|
45743
47556
|
/* ' */
|
45744
47557
|
CHAR_NO_BREAK_SPACE,
|
45745
47558
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
45746
|
-
} =
|
47559
|
+
} = require_constants2();
|
45747
47560
|
var parse = (input, options = {}) => {
|
45748
47561
|
if (typeof input !== "string") {
|
45749
47562
|
throw new TypeError("Expected a string");
|
@@ -45961,7 +47774,7 @@ var require_braces = __commonJS({
|
|
45961
47774
|
var stringify = require_stringify();
|
45962
47775
|
var compile = require_compile();
|
45963
47776
|
var expand2 = require_expand();
|
45964
|
-
var parse =
|
47777
|
+
var parse = require_parse2();
|
45965
47778
|
var braces = (input, options = {}) => {
|
45966
47779
|
let output = [];
|
45967
47780
|
if (Array.isArray(input)) {
|
@@ -46018,7 +47831,7 @@ var require_braces = __commonJS({
|
|
46018
47831
|
});
|
46019
47832
|
|
46020
47833
|
// node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
|
46021
|
-
var
|
47834
|
+
var require_constants3 = __commonJS({
|
46022
47835
|
"node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports, module2) {
|
46023
47836
|
"use strict";
|
46024
47837
|
var path4 = require("path");
|
@@ -46225,7 +48038,7 @@ var require_utils5 = __commonJS({
|
|
46225
48038
|
REGEX_REMOVE_BACKSLASH,
|
46226
48039
|
REGEX_SPECIAL_CHARS,
|
46227
48040
|
REGEX_SPECIAL_CHARS_GLOBAL
|
46228
|
-
} =
|
48041
|
+
} = require_constants3();
|
46229
48042
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
46230
48043
|
exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
46231
48044
|
exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
|
@@ -46313,7 +48126,7 @@ var require_scan = __commonJS({
|
|
46313
48126
|
/* ) */
|
46314
48127
|
CHAR_RIGHT_SQUARE_BRACKET
|
46315
48128
|
/* ] */
|
46316
|
-
} =
|
48129
|
+
} = require_constants3();
|
46317
48130
|
var isPathSeparator = (code) => {
|
46318
48131
|
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
46319
48132
|
};
|
@@ -46611,10 +48424,10 @@ var require_scan = __commonJS({
|
|
46611
48424
|
});
|
46612
48425
|
|
46613
48426
|
// node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js
|
46614
|
-
var
|
48427
|
+
var require_parse3 = __commonJS({
|
46615
48428
|
"node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"(exports, module2) {
|
46616
48429
|
"use strict";
|
46617
|
-
var constants =
|
48430
|
+
var constants = require_constants3();
|
46618
48431
|
var utils = require_utils5();
|
46619
48432
|
var {
|
46620
48433
|
MAX_LENGTH,
|
@@ -47397,9 +49210,9 @@ var require_picomatch = __commonJS({
|
|
47397
49210
|
"use strict";
|
47398
49211
|
var path4 = require("path");
|
47399
49212
|
var scan = require_scan();
|
47400
|
-
var parse =
|
49213
|
+
var parse = require_parse3();
|
47401
49214
|
var utils = require_utils5();
|
47402
|
-
var constants =
|
49215
|
+
var constants = require_constants3();
|
47403
49216
|
var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
47404
49217
|
var picomatch = (glob2, options, returnState = false) => {
|
47405
49218
|
if (Array.isArray(glob2)) {
|
@@ -48223,7 +50036,7 @@ var require_run_parallel = __commonJS({
|
|
48223
50036
|
});
|
48224
50037
|
|
48225
50038
|
// node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js
|
48226
|
-
var
|
50039
|
+
var require_constants4 = __commonJS({
|
48227
50040
|
"node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
|
48228
50041
|
"use strict";
|
48229
50042
|
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -48302,7 +50115,7 @@ var require_async2 = __commonJS({
|
|
48302
50115
|
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
48303
50116
|
var fsStat = require_out();
|
48304
50117
|
var rpl = require_run_parallel();
|
48305
|
-
var constants_1 =
|
50118
|
+
var constants_1 = require_constants4();
|
48306
50119
|
var utils = require_utils7();
|
48307
50120
|
var common = require_common2();
|
48308
50121
|
function read(directory, settings, callback) {
|
@@ -48411,7 +50224,7 @@ var require_sync2 = __commonJS({
|
|
48411
50224
|
Object.defineProperty(exports, "__esModule", { value: true });
|
48412
50225
|
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
48413
50226
|
var fsStat = require_out();
|
48414
|
-
var constants_1 =
|
50227
|
+
var constants_1 = require_constants4();
|
48415
50228
|
var utils = require_utils7();
|
48416
50229
|
var common = require_common2();
|
48417
50230
|
function read(directory, settings) {
|
@@ -53900,18 +55713,18 @@ var require_set = __commonJS({
|
|
53900
55713
|
}
|
53901
55714
|
static from(schema4, iterable, ctx) {
|
53902
55715
|
const { replacer } = ctx;
|
53903
|
-
const
|
55716
|
+
const set3 = new this(schema4);
|
53904
55717
|
if (iterable && Symbol.iterator in Object(iterable))
|
53905
55718
|
for (let value of iterable) {
|
53906
55719
|
if (typeof replacer === "function")
|
53907
55720
|
value = replacer.call(iterable, value, value);
|
53908
|
-
|
55721
|
+
set3.items.push(Pair.createPair(value, null, ctx));
|
53909
55722
|
}
|
53910
|
-
return
|
55723
|
+
return set3;
|
53911
55724
|
}
|
53912
55725
|
};
|
53913
55726
|
YAMLSet.tag = "tag:yaml.org,2002:set";
|
53914
|
-
var
|
55727
|
+
var set2 = {
|
53915
55728
|
collection: "map",
|
53916
55729
|
identify: (value) => value instanceof Set,
|
53917
55730
|
nodeClass: YAMLSet,
|
@@ -53930,7 +55743,7 @@ var require_set = __commonJS({
|
|
53930
55743
|
}
|
53931
55744
|
};
|
53932
55745
|
exports.YAMLSet = YAMLSet;
|
53933
|
-
exports.set =
|
55746
|
+
exports.set = set2;
|
53934
55747
|
}
|
53935
55748
|
});
|
53936
55749
|
|
@@ -54036,7 +55849,7 @@ var require_schema3 = __commonJS({
|
|
54036
55849
|
var int = require_int2();
|
54037
55850
|
var omap = require_omap();
|
54038
55851
|
var pairs = require_pairs();
|
54039
|
-
var
|
55852
|
+
var set2 = require_set();
|
54040
55853
|
var timestamp = require_timestamp();
|
54041
55854
|
var schema4 = [
|
54042
55855
|
map.map,
|
@@ -54055,7 +55868,7 @@ var require_schema3 = __commonJS({
|
|
54055
55868
|
binary.binary,
|
54056
55869
|
omap.omap,
|
54057
55870
|
pairs.pairs,
|
54058
|
-
|
55871
|
+
set2.set,
|
54059
55872
|
timestamp.intTime,
|
54060
55873
|
timestamp.floatTime,
|
54061
55874
|
timestamp.timestamp
|
@@ -54081,7 +55894,7 @@ var require_tags = __commonJS({
|
|
54081
55894
|
var omap = require_omap();
|
54082
55895
|
var pairs = require_pairs();
|
54083
55896
|
var schema$2 = require_schema3();
|
54084
|
-
var
|
55897
|
+
var set2 = require_set();
|
54085
55898
|
var timestamp = require_timestamp();
|
54086
55899
|
var schemas = /* @__PURE__ */ new Map([
|
54087
55900
|
["core", schema4.schema],
|
@@ -54106,14 +55919,14 @@ var require_tags = __commonJS({
|
|
54106
55919
|
omap: omap.omap,
|
54107
55920
|
pairs: pairs.pairs,
|
54108
55921
|
seq: seq.seq,
|
54109
|
-
set:
|
55922
|
+
set: set2.set,
|
54110
55923
|
timestamp: timestamp.timestamp
|
54111
55924
|
};
|
54112
55925
|
var coreKnownTags = {
|
54113
55926
|
"tag:yaml.org,2002:binary": binary.binary,
|
54114
55927
|
"tag:yaml.org,2002:omap": omap.omap,
|
54115
55928
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
54116
|
-
"tag:yaml.org,2002:set":
|
55929
|
+
"tag:yaml.org,2002:set": set2.set,
|
54117
55930
|
"tag:yaml.org,2002:timestamp": timestamp.timestamp
|
54118
55931
|
};
|
54119
55932
|
function getTags(customTags, schemaName) {
|
@@ -58233,7 +60046,9 @@ var init_studioUtils = __esm({
|
|
58233
60046
|
};
|
58234
60047
|
prepareMySqlSchema = async (path4) => {
|
58235
60048
|
const imports = prepareFilenames(path4);
|
58236
|
-
const mysqlSchema4 = {
|
60049
|
+
const mysqlSchema4 = {
|
60050
|
+
public: {}
|
60051
|
+
};
|
58237
60052
|
const relations4 = {};
|
58238
60053
|
const { unregister } = await safeRegister();
|
58239
60054
|
for (let i = 0; i < imports.length; i++) {
|
@@ -58255,7 +60070,9 @@ var init_studioUtils = __esm({
|
|
58255
60070
|
};
|
58256
60071
|
prepareSQLiteSchema = async (path4) => {
|
58257
60072
|
const imports = prepareFilenames(path4);
|
58258
|
-
const sqliteSchema2 = {
|
60073
|
+
const sqliteSchema2 = {
|
60074
|
+
public: {}
|
60075
|
+
};
|
58259
60076
|
const relations4 = {};
|
58260
60077
|
const { unregister } = await safeRegister();
|
58261
60078
|
for (let i = 0; i < imports.length; i++) {
|
@@ -58305,34 +60122,55 @@ var init_studioUtils = __esm({
|
|
58305
60122
|
unregister();
|
58306
60123
|
return { pgSchema: pgSchema4, mysqlSchema: mysqlSchema4, sqliteSchema: sqliteSchema2 };
|
58307
60124
|
};
|
58308
|
-
drizzleForPostgres = async (connectionConfig, pgSchema4, relations4, verbose) => {
|
60125
|
+
drizzleForPostgres = async (connectionConfig, pgSchema4, relations4, ts, verbose) => {
|
58309
60126
|
assertPackages("pg");
|
58310
60127
|
const { drizzle: drizzle2 } = await import("drizzle-orm/node-postgres");
|
58311
60128
|
const pg = await Promise.resolve().then(() => __toESM(require_lib2()));
|
58312
|
-
const
|
60129
|
+
const client = new pg.default.Pool(connectionConfig.dbCredentials);
|
60130
|
+
const db = drizzle2(client, {
|
58313
60131
|
logger: verbose
|
58314
60132
|
});
|
60133
|
+
const proxy = async (params) => {
|
60134
|
+
const result = await client.query({
|
60135
|
+
text: params.sql,
|
60136
|
+
values: params.params,
|
60137
|
+
rowMode: "array"
|
60138
|
+
});
|
60139
|
+
return result.rows;
|
60140
|
+
};
|
58315
60141
|
return {
|
58316
|
-
|
60142
|
+
dialect: "pg",
|
58317
60143
|
db,
|
60144
|
+
proxy,
|
58318
60145
|
schema: pgSchema4,
|
58319
|
-
relations: relations4
|
60146
|
+
relations: relations4,
|
60147
|
+
ts
|
58320
60148
|
};
|
58321
60149
|
};
|
58322
|
-
drizzleForMySQL = async (config, mysqlSchema4, relations4, verbose) => {
|
60150
|
+
drizzleForMySQL = async (config, mysqlSchema4, relations4, ts, verbose) => {
|
58323
60151
|
assertPackages("mysql2");
|
58324
60152
|
const { drizzle: drizzle2 } = await import("drizzle-orm/mysql2");
|
58325
60153
|
const { createPool } = await Promise.resolve().then(() => __toESM(require_promise()));
|
58326
60154
|
const client = createPool({ ...config.dbCredentials, connectionLimit: 1 });
|
58327
60155
|
const db = drizzle2(client, { logger: verbose });
|
60156
|
+
const proxy = async (params) => {
|
60157
|
+
const result = await client.query({
|
60158
|
+
sql: params.sql,
|
60159
|
+
values: params.params,
|
60160
|
+
rowsAsArray: true
|
60161
|
+
});
|
60162
|
+
return result[0];
|
60163
|
+
};
|
58328
60164
|
return {
|
58329
|
-
|
60165
|
+
dialect: "mysql",
|
58330
60166
|
db,
|
60167
|
+
proxy,
|
58331
60168
|
schema: mysqlSchema4,
|
58332
|
-
relations: relations4
|
60169
|
+
relations: relations4,
|
60170
|
+
ts
|
58333
60171
|
};
|
58334
60172
|
};
|
58335
|
-
drizzleForSQLite = async (config, sqliteSchema2, relations4, verbose) => {
|
60173
|
+
drizzleForSQLite = async (config, sqliteSchema2, relations4, ts, verbose) => {
|
58336
60174
|
const { driver, dbCredentials: creds } = config;
|
58337
60175
|
if (driver === "d1") {
|
58338
60176
|
const { drizzle: drizzle2 } = await Promise.resolve().then(() => (init_driver(), driver_exports));
|
@@ -58340,11 +60178,16 @@ var init_studioUtils = __esm({
|
|
58340
60178
|
const db = drizzle2(execute2, creds.wranglerConfigPath, creds.dbName, {
|
58341
60179
|
logger: verbose
|
58342
60180
|
});
|
60181
|
+
const proxy = async (params) => {
|
60182
|
+
throw new Error("Proxy is not implemented for D1");
|
60183
|
+
};
|
58343
60184
|
return {
|
58344
|
-
|
60185
|
+
dialect: "sqlite",
|
58345
60186
|
db,
|
60187
|
+
proxy,
|
58346
60188
|
schema: sqliteSchema2,
|
58347
|
-
relations: relations4
|
60189
|
+
relations: relations4,
|
60190
|
+
ts
|
58348
60191
|
};
|
58349
60192
|
}
|
58350
60193
|
if (driver === "better-sqlite") {
|
@@ -58353,11 +60196,17 @@ var init_studioUtils = __esm({
|
|
58353
60196
|
const Database = await import("better-sqlite3");
|
58354
60197
|
const client = new Database.default(creds.url);
|
58355
60198
|
const db = drizzle2(client, { logger: verbose });
|
60199
|
+
const proxy = async (params) => {
|
60200
|
+
const sql2 = params.sql;
|
60201
|
+
return client.prepare(sql2).raw().all(params.params);
|
60202
|
+
};
|
58356
60203
|
return {
|
58357
|
-
|
60204
|
+
dialect: "sqlite",
|
58358
60205
|
db,
|
60206
|
+
proxy,
|
58359
60207
|
schema: sqliteSchema2,
|
58360
|
-
relations: relations4
|
60208
|
+
relations: relations4,
|
60209
|
+
ts
|
58361
60210
|
};
|
58362
60211
|
}
|
58363
60212
|
if (driver === "libsql" || driver === "turso") {
|
@@ -58369,11 +60218,19 @@ var init_studioUtils = __esm({
|
|
58369
60218
|
client,
|
58370
60219
|
{ logger: verbose }
|
58371
60220
|
);
|
60221
|
+
const proxy = async (params) => {
|
60222
|
+
return client.execute({
|
60223
|
+
sql: params.sql,
|
60224
|
+
args: params.params
|
60225
|
+
}).then((it) => it.rows.map((row) => Object.values(row)));
|
60226
|
+
};
|
58372
60227
|
return {
|
58373
|
-
|
60228
|
+
dialect: "sqlite",
|
58374
60229
|
db,
|
60230
|
+
proxy,
|
58375
60231
|
schema: sqliteSchema2,
|
58376
|
-
relations: relations4
|
60232
|
+
relations: relations4,
|
60233
|
+
ts
|
58377
60234
|
};
|
58378
60235
|
}
|
58379
60236
|
assertUnreachable(driver);
|
@@ -59379,10 +61236,14 @@ var require_cli_options = __commonJS({
|
|
59379
61236
|
}
|
59380
61237
|
});
|
59381
61238
|
|
59382
|
-
// src/mysql
|
59383
|
-
var
|
59384
|
-
|
59385
|
-
|
61239
|
+
// src/introspect-mysql.ts
|
61240
|
+
var introspect_mysql_exports = {};
|
61241
|
+
__export(introspect_mysql_exports, {
|
61242
|
+
schemaToTypeScript: () => schemaToTypeScript3
|
61243
|
+
});
|
61244
|
+
var mysqlImportsList, objToStatement23, timeConfig2, binaryConfig, importsPatch2, relations3, prepareCasing, schemaToTypeScript3, isCyclic3, isSelf3, mapColumnDefault2, mapColumnDefaultForJson, column6, createTableColumns3, createTableIndexes3, createTableUniques3, createTablePKs3, createTableFKs3;
|
61245
|
+
var init_introspect_mysql = __esm({
|
61246
|
+
"src/introspect-mysql.ts"() {
|
59386
61247
|
init_utils2();
|
59387
61248
|
init_mysqlSerializer();
|
59388
61249
|
mysqlImportsList = /* @__PURE__ */ new Set([
|
@@ -59450,7 +61311,7 @@ var init_mysql_introspect = __esm({
|
|
59450
61311
|
"timestamp without time zone": "timestamp"
|
59451
61312
|
};
|
59452
61313
|
relations3 = /* @__PURE__ */ new Set();
|
59453
|
-
|
61314
|
+
prepareCasing = (casing) => (value) => {
|
59454
61315
|
if (typeof casing === "undefined") {
|
59455
61316
|
return value;
|
59456
61317
|
}
|
@@ -59460,6 +61321,7 @@ var init_mysql_introspect = __esm({
|
|
59460
61321
|
return value;
|
59461
61322
|
};
|
59462
61323
|
schemaToTypeScript3 = (schema4, casing) => {
|
61324
|
+
const withCasing3 = prepareCasing(casing);
|
59463
61325
|
Object.values(schema4.tables).forEach((table4) => {
|
59464
61326
|
Object.values(table4.foreignKeys).forEach((fk4) => {
|
59465
61327
|
const relation = `${fk4.tableFrom}-${fk4.tableTo}`;
|
@@ -59468,7 +61330,7 @@ var init_mysql_introspect = __esm({
|
|
59468
61330
|
});
|
59469
61331
|
const schemas = Object.fromEntries(
|
59470
61332
|
Object.entries(schema4.schemas).map((it) => {
|
59471
|
-
return [it[0], withCasing3(it[1]
|
61333
|
+
return [it[0], withCasing3(it[1])];
|
59472
61334
|
})
|
59473
61335
|
);
|
59474
61336
|
const imports = Object.values(schema4.tables).reduce(
|
@@ -59515,20 +61377,19 @@ var init_mysql_introspect = __esm({
|
|
59515
61377
|
const tableSchema = schemas[table4.schema];
|
59516
61378
|
const func = tableSchema ? tableSchema : "mysqlTable";
|
59517
61379
|
let statement = "";
|
59518
|
-
if (imports.mysql.includes(withCasing3(table4.name
|
61380
|
+
if (imports.mysql.includes(withCasing3(table4.name))) {
|
59519
61381
|
statement = `// Table name is in conflict with ${withCasing3(
|
59520
|
-
table4.name
|
59521
|
-
casing
|
61382
|
+
table4.name
|
59522
61383
|
)} import.
|
59523
61384
|
// Please change to any other name, that is not in imports list
|
59524
61385
|
`;
|
59525
61386
|
}
|
59526
|
-
statement += `export const ${withCasing3(table4.name
|
61387
|
+
statement += `export const ${withCasing3(table4.name)} = ${func}("${table4.name}", {
|
59527
61388
|
`;
|
59528
61389
|
statement += createTableColumns3(
|
59529
61390
|
Object.values(table4.columns),
|
59530
61391
|
Object.values(table4.foreignKeys),
|
59531
|
-
|
61392
|
+
withCasing3,
|
59532
61393
|
table4.name,
|
59533
61394
|
schema4
|
59534
61395
|
);
|
@@ -59543,16 +61404,16 @@ var init_mysql_introspect = __esm({
|
|
59543
61404
|
statement += createTableIndexes3(
|
59544
61405
|
table4.name,
|
59545
61406
|
Object.values(table4.indexes),
|
59546
|
-
|
61407
|
+
withCasing3
|
59547
61408
|
);
|
59548
|
-
statement += createTableFKs3(Object.values(filteredFKs),
|
61409
|
+
statement += createTableFKs3(Object.values(filteredFKs), withCasing3);
|
59549
61410
|
statement += createTablePKs3(
|
59550
61411
|
Object.values(table4.compositePrimaryKeys),
|
59551
|
-
|
61412
|
+
withCasing3
|
59552
61413
|
);
|
59553
61414
|
statement += createTableUniques3(
|
59554
61415
|
Object.values(table4.uniqueConstraints),
|
59555
|
-
|
61416
|
+
withCasing3
|
59556
61417
|
);
|
59557
61418
|
statement += " }\n";
|
59558
61419
|
statement += "}";
|
@@ -59566,16 +61427,28 @@ var init_mysql_introspect = __esm({
|
|
59566
61427
|
"AnyMySqlColumn",
|
59567
61428
|
...new Set(imports.mysql)
|
59568
61429
|
];
|
59569
|
-
|
61430
|
+
const importsTs = `import { ${uniqueMySqlImports.join(
|
59570
61431
|
", "
|
59571
61432
|
)} } from "drizzle-orm/mysql-core"
|
59572
61433
|
import { sql } from "drizzle-orm"
|
59573
61434
|
|
59574
61435
|
`;
|
59575
|
-
|
59576
|
-
|
59577
|
-
|
59578
|
-
|
61436
|
+
let decalrations = schemaStatements;
|
61437
|
+
decalrations += "\n";
|
61438
|
+
decalrations += tableStatements.join("\n\n");
|
61439
|
+
const file = importsTs + decalrations;
|
61440
|
+
const schemaEntry = `
|
61441
|
+
{
|
61442
|
+
${Object.values(schema4.tables).map((it) => withCasing3(it.name)).join(",")}
|
61443
|
+
}
|
61444
|
+
`;
|
61445
|
+
return {
|
61446
|
+
file,
|
61447
|
+
// backward compatible, print to file
|
61448
|
+
imports: importsTs,
|
61449
|
+
decalrations,
|
61450
|
+
schemaEntry
|
61451
|
+
};
|
59579
61452
|
};
|
59580
61453
|
isCyclic3 = (fk4) => {
|
59581
61454
|
const key = `${fk4.tableFrom}-${fk4.tableTo}`;
|
@@ -59597,51 +61470,51 @@ import { sql } from "drizzle-orm"
|
|
59597
61470
|
}
|
59598
61471
|
return defaultValue;
|
59599
61472
|
};
|
59600
|
-
column6 = (type, name, defaultValue, autoincrement, onUpdate,
|
61473
|
+
column6 = (type, name, casing, defaultValue, autoincrement, onUpdate, isExpression) => {
|
59601
61474
|
let lowered = type;
|
59602
61475
|
if (!type.startsWith("enum(")) {
|
59603
61476
|
lowered = type.toLowerCase();
|
59604
61477
|
}
|
59605
61478
|
if (lowered === "serial") {
|
59606
|
-
return `${
|
61479
|
+
return `${casing(name)}: serial("${name}")`;
|
59607
61480
|
}
|
59608
61481
|
if (lowered.startsWith("int")) {
|
59609
61482
|
const isUnsigned = lowered.startsWith("int unsigned");
|
59610
|
-
let out = `${
|
61483
|
+
let out = `${casing(name)}: int("${name}"${isUnsigned ? ", { unsigned: true }" : ""})`;
|
59611
61484
|
out += autoincrement ? `.autoincrement()` : "";
|
59612
61485
|
out += typeof defaultValue !== "undefined" ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59613
61486
|
return out;
|
59614
61487
|
}
|
59615
61488
|
if (lowered.startsWith("tinyint")) {
|
59616
61489
|
const isUnsigned = lowered.startsWith("tinyint unsigned");
|
59617
|
-
let out = `${
|
61490
|
+
let out = `${casing(name)}: tinyint("${name}"${isUnsigned ? ", { unsigned: true }" : ""})`;
|
59618
61491
|
out += autoincrement ? `.autoincrement()` : "";
|
59619
61492
|
out += typeof defaultValue !== "undefined" ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59620
61493
|
return out;
|
59621
61494
|
}
|
59622
61495
|
if (lowered.startsWith("smallint")) {
|
59623
61496
|
const isUnsigned = lowered.startsWith("smallint unsigned");
|
59624
|
-
let out = `${
|
61497
|
+
let out = `${casing(name)}: smallint("${name}"${isUnsigned ? ", { unsigned: true }" : ""})`;
|
59625
61498
|
out += autoincrement ? `.autoincrement()` : "";
|
59626
61499
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59627
61500
|
return out;
|
59628
61501
|
}
|
59629
61502
|
if (lowered.startsWith("mediumint")) {
|
59630
61503
|
const isUnsigned = lowered.startsWith("mediumint unsigned");
|
59631
|
-
let out = `${
|
61504
|
+
let out = `${casing(name)}: mediumint("${name}"${isUnsigned ? ", { unsigned: true }" : ""})`;
|
59632
61505
|
out += autoincrement ? `.autoincrement()` : "";
|
59633
61506
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59634
61507
|
return out;
|
59635
61508
|
}
|
59636
61509
|
if (lowered.startsWith("bigint")) {
|
59637
61510
|
const isUnsigned = lowered.startsWith("bigint unsigned");
|
59638
|
-
let out = `${
|
61511
|
+
let out = `${casing(name)}: bigint("${name}", { mode: "number"${isUnsigned ? ", unsigned: true" : ""} })`;
|
59639
61512
|
out += autoincrement ? `.autoincrement()` : "";
|
59640
61513
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59641
61514
|
return out;
|
59642
61515
|
}
|
59643
61516
|
if (lowered === "boolean") {
|
59644
|
-
let out = `${
|
61517
|
+
let out = `${casing(name)}: boolean("${name}")`;
|
59645
61518
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59646
61519
|
return out;
|
59647
61520
|
}
|
@@ -59651,17 +61524,17 @@ import { sql } from "drizzle-orm"
|
|
59651
61524
|
const [precision, scale] = lowered.slice(7, lowered.length - 1).split(",");
|
59652
61525
|
params = { precision, scale };
|
59653
61526
|
}
|
59654
|
-
let out = params ? `${
|
61527
|
+
let out = params ? `${casing(name)}: double("${name}", ${timeConfig2(params)})` : `${casing(name)}: double("${name}")`;
|
59655
61528
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59656
61529
|
return out;
|
59657
61530
|
}
|
59658
61531
|
if (lowered === "float") {
|
59659
|
-
let out = `${
|
61532
|
+
let out = `${casing(name)}: float("${name}")`;
|
59660
61533
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59661
61534
|
return out;
|
59662
61535
|
}
|
59663
61536
|
if (lowered === "real") {
|
59664
|
-
let out = `${
|
61537
|
+
let out = `${casing(name)}: real("${name}")`;
|
59665
61538
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59666
61539
|
return out;
|
59667
61540
|
}
|
@@ -59670,7 +61543,7 @@ import { sql } from "drizzle-orm"
|
|
59670
61543
|
let fsp = lowered.length > keyLength ? Number(lowered.substring(keyLength, lowered.length - 1)) : null;
|
59671
61544
|
fsp = fsp ? fsp : null;
|
59672
61545
|
const params = timeConfig2({ fsp, mode: "'string'" });
|
59673
|
-
let out = params ? `${
|
61546
|
+
let out = params ? `${casing(name)}: timestamp("${name}", ${params})` : `${casing(name)}: timestamp("${name}")`;
|
59674
61547
|
defaultValue = defaultValue === "now()" || defaultValue === "(CURRENT_TIMESTAMP)" ? ".defaultNow()" : defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59675
61548
|
out += defaultValue;
|
59676
61549
|
let onUpdateNow = onUpdate ? ".onUpdateNow()" : "";
|
@@ -59682,55 +61555,53 @@ import { sql } from "drizzle-orm"
|
|
59682
61555
|
let fsp = lowered.length > keyLength ? Number(lowered.substring(keyLength, lowered.length - 1)) : null;
|
59683
61556
|
fsp = fsp ? fsp : null;
|
59684
61557
|
const params = timeConfig2({ fsp });
|
59685
|
-
let out = params ? `${
|
61558
|
+
let out = params ? `${casing(name)}: time("${name}", ${params})` : `${casing(name)}: time("${name}")`;
|
59686
61559
|
defaultValue = defaultValue === "now()" ? ".defaultNow()" : defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59687
61560
|
out += defaultValue;
|
59688
61561
|
return out;
|
59689
61562
|
}
|
59690
61563
|
if (lowered === "date") {
|
59691
61564
|
let out = `// you can use { mode: 'date' }, if you want to have Date as type for this column
|
59692
|
-
${
|
59693
|
-
name
|
59694
|
-
casing
|
61565
|
+
${casing(
|
61566
|
+
name
|
59695
61567
|
)}: date("${name}", { mode: 'string' })`;
|
59696
61568
|
defaultValue = defaultValue === "now()" ? ".defaultNow()" : defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59697
61569
|
out += defaultValue;
|
59698
61570
|
return out;
|
59699
61571
|
}
|
59700
61572
|
if (lowered === "text") {
|
59701
|
-
let out = `${
|
61573
|
+
let out = `${casing(name)}: text("${name}")`;
|
59702
61574
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59703
61575
|
return out;
|
59704
61576
|
}
|
59705
61577
|
if (lowered === "tinytext") {
|
59706
|
-
let out = `${
|
61578
|
+
let out = `${casing(name)}: tinytext("${name}")`;
|
59707
61579
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59708
61580
|
return out;
|
59709
61581
|
}
|
59710
61582
|
if (lowered === "mediumtext") {
|
59711
|
-
let out = `${
|
61583
|
+
let out = `${casing(name)}: mediumtext("${name}")`;
|
59712
61584
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59713
61585
|
return out;
|
59714
61586
|
}
|
59715
61587
|
if (lowered === "longtext") {
|
59716
|
-
let out = `${
|
61588
|
+
let out = `${casing(name)}: longtext("${name}")`;
|
59717
61589
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59718
61590
|
return out;
|
59719
61591
|
}
|
59720
61592
|
if (lowered === "year") {
|
59721
|
-
let out = `${
|
61593
|
+
let out = `${casing(name)}: year("${name}")`;
|
59722
61594
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59723
61595
|
return out;
|
59724
61596
|
}
|
59725
61597
|
if (lowered === "json") {
|
59726
|
-
let out = `${
|
61598
|
+
let out = `${casing(name)}: json("${name}")`;
|
59727
61599
|
out += defaultValue ? `.default(${mapColumnDefaultForJson(defaultValue)})` : "";
|
59728
61600
|
return out;
|
59729
61601
|
}
|
59730
61602
|
if (lowered.startsWith("varchar")) {
|
59731
|
-
let out = `${
|
59732
|
-
name
|
59733
|
-
casing
|
61603
|
+
let out = `${casing(
|
61604
|
+
name
|
59734
61605
|
)}: varchar("${name}", { length: ${lowered.substring(
|
59735
61606
|
"varchar".length + 1,
|
59736
61607
|
lowered.length - 1
|
@@ -59739,9 +61610,8 @@ import { sql } from "drizzle-orm"
|
|
59739
61610
|
return out;
|
59740
61611
|
}
|
59741
61612
|
if (lowered.startsWith("char")) {
|
59742
|
-
let out = `${
|
59743
|
-
name
|
59744
|
-
casing
|
61613
|
+
let out = `${casing(
|
61614
|
+
name
|
59745
61615
|
)}: char("${name}", { length: ${lowered.substring(
|
59746
61616
|
"char".length + 1,
|
59747
61617
|
lowered.length - 1
|
@@ -59753,13 +61623,12 @@ import { sql } from "drizzle-orm"
|
|
59753
61623
|
let out = `// you can use { mode: 'date' }, if you want to have Date as type for this column
|
59754
61624
|
`;
|
59755
61625
|
const fsp = lowered.startsWith("datetime(") ? lowered.substring("datetime".length + 1, lowered.length - 1) : void 0;
|
59756
|
-
out = fsp ? `${
|
59757
|
-
name
|
59758
|
-
casing
|
61626
|
+
out = fsp ? `${casing(
|
61627
|
+
name
|
59759
61628
|
)}: datetime("${name}", { mode: 'string', fsp: ${lowered.substring(
|
59760
61629
|
"datetime".length + 1,
|
59761
61630
|
lowered.length - 1
|
59762
|
-
)} })` : `${
|
61631
|
+
)} })` : `${casing(name)}: datetime("${name}", { mode: 'string'})`;
|
59763
61632
|
defaultValue = defaultValue === "now()" ? ".defaultNow()" : defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59764
61633
|
out += defaultValue;
|
59765
61634
|
return out;
|
@@ -59770,7 +61639,7 @@ import { sql } from "drizzle-orm"
|
|
59770
61639
|
const [precision, scale] = lowered.slice(8, lowered.length - 1).split(",");
|
59771
61640
|
params = { precision, scale };
|
59772
61641
|
}
|
59773
|
-
let out = params ? `${
|
61642
|
+
let out = params ? `${casing(name)}: decimal("${name}", ${timeConfig2(params)})` : `${casing(name)}: decimal("${name}")`;
|
59774
61643
|
defaultValue = typeof defaultValue !== "undefined" ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59775
61644
|
out += defaultValue;
|
59776
61645
|
return out;
|
@@ -59780,14 +61649,14 @@ import { sql } from "drizzle-orm"
|
|
59780
61649
|
let length = lowered.length > keyLength ? Number(lowered.substring(keyLength, lowered.length - 1)) : null;
|
59781
61650
|
length = length ? length : null;
|
59782
61651
|
const params = binaryConfig({ length });
|
59783
|
-
let out = params ? `${
|
61652
|
+
let out = params ? `${casing(name)}: binary("${name}", ${params})` : `${casing(name)}: binary("${name}")`;
|
59784
61653
|
defaultValue = defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59785
61654
|
out += defaultValue;
|
59786
61655
|
return out;
|
59787
61656
|
}
|
59788
61657
|
if (lowered.startsWith("enum")) {
|
59789
61658
|
const values = lowered.substring("enum".length + 1, lowered.length - 1);
|
59790
|
-
let out = `${
|
61659
|
+
let out = `${casing(name)}: mysqlEnum("${name}", [${values}])`;
|
59791
61660
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59792
61661
|
return out;
|
59793
61662
|
}
|
@@ -59796,7 +61665,7 @@ import { sql } from "drizzle-orm"
|
|
59796
61665
|
let length = lowered.length > keyLength ? Number(lowered.substring(keyLength, lowered.length - 1)) : null;
|
59797
61666
|
length = length ? length : null;
|
59798
61667
|
const params = binaryConfig({ length });
|
59799
|
-
let out = params ? `${
|
61668
|
+
let out = params ? `${casing(name)}: varbinary("${name}", ${params})` : `${casing(name)}: varbinary("${name}")`;
|
59800
61669
|
defaultValue = defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
59801
61670
|
out += defaultValue;
|
59802
61671
|
return out;
|
@@ -59822,10 +61691,10 @@ import { sql } from "drizzle-orm"
|
|
59822
61691
|
statement += column6(
|
59823
61692
|
it.type,
|
59824
61693
|
it.name,
|
61694
|
+
casing,
|
59825
61695
|
it.default,
|
59826
61696
|
it.autoincrement,
|
59827
61697
|
it.onUpdate,
|
59828
|
-
casing,
|
59829
61698
|
((_c = (_b = (_a3 = schema4.internal) == null ? void 0 : _a3.tables[tableName]) == null ? void 0 : _b.columns[it.name]) == null ? void 0 : _c.isDefaultAnExpression) ?? false
|
59830
61699
|
);
|
59831
61700
|
statement += it.primaryKey ? ".primaryKey()" : "";
|
@@ -59839,15 +61708,13 @@ import { sql } from "drizzle-orm"
|
|
59839
61708
|
const typeSuffix = isCyclic3(it2) ? ": AnyMySqlColumn" : "";
|
59840
61709
|
const paramsStr = objToStatement23(params);
|
59841
61710
|
if (paramsStr) {
|
59842
|
-
return `.references(()${typeSuffix} => ${
|
59843
|
-
it2.tableTo
|
59844
|
-
|
59845
|
-
)}.${withCasing3(it2.columnsTo[0], casing)}, ${paramsStr} )`;
|
61711
|
+
return `.references(()${typeSuffix} => ${casing(
|
61712
|
+
it2.tableTo
|
61713
|
+
)}.${casing(it2.columnsTo[0])}, ${paramsStr} )`;
|
59846
61714
|
}
|
59847
|
-
return `.references(()${typeSuffix} => ${
|
59848
|
-
it2.
|
59849
|
-
|
59850
|
-
)}.${withCasing3(it2.columnsTo[0], casing)})`;
|
61715
|
+
return `.references(()${typeSuffix} => ${casing(it2.tableTo)}.${casing(
|
61716
|
+
it2.columnsTo[0]
|
61717
|
+
)})`;
|
59851
61718
|
}).join("");
|
59852
61719
|
statement += fksStatement;
|
59853
61720
|
}
|
@@ -59860,13 +61727,13 @@ import { sql } from "drizzle-orm"
|
|
59860
61727
|
idxs.forEach((it) => {
|
59861
61728
|
let idxKey = it.name.startsWith(tableName) && it.name !== tableName ? it.name.slice(tableName.length + 1) : it.name;
|
59862
61729
|
idxKey = idxKey.endsWith("_index") ? idxKey.slice(0, -"_index".length) + "_idx" : idxKey;
|
59863
|
-
idxKey =
|
61730
|
+
idxKey = casing(idxKey);
|
59864
61731
|
const indexGeneratedName = indexName(tableName, it.columns);
|
59865
61732
|
const escapedIndexName = indexGeneratedName === it.name ? "" : `"${it.name}"`;
|
59866
61733
|
statement += ` ${idxKey}: `;
|
59867
61734
|
statement += it.isUnique ? "uniqueIndex(" : "index(";
|
59868
61735
|
statement += `${escapedIndexName})`;
|
59869
|
-
statement += `.on(${it.columns.map((it2) => `table.${
|
61736
|
+
statement += `.on(${it.columns.map((it2) => `table.${casing(it2)}`).join(", ")}),`;
|
59870
61737
|
statement += `
|
59871
61738
|
`;
|
59872
61739
|
});
|
@@ -59875,11 +61742,11 @@ import { sql } from "drizzle-orm"
|
|
59875
61742
|
createTableUniques3 = (unqs, casing) => {
|
59876
61743
|
let statement = "";
|
59877
61744
|
unqs.forEach((it) => {
|
59878
|
-
const idxKey =
|
61745
|
+
const idxKey = casing(it.name);
|
59879
61746
|
statement += ` ${idxKey}: `;
|
59880
61747
|
statement += "unique(";
|
59881
61748
|
statement += `"${it.name}")`;
|
59882
|
-
statement += `.on(${it.columns.map((it2) => `table.${
|
61749
|
+
statement += `.on(${it.columns.map((it2) => `table.${casing(it2)}`).join(", ")}),`;
|
59883
61750
|
statement += `
|
59884
61751
|
`;
|
59885
61752
|
});
|
@@ -59888,11 +61755,11 @@ import { sql } from "drizzle-orm"
|
|
59888
61755
|
createTablePKs3 = (pks, casing) => {
|
59889
61756
|
let statement = "";
|
59890
61757
|
pks.forEach((it) => {
|
59891
|
-
let idxKey =
|
61758
|
+
let idxKey = casing(it.name);
|
59892
61759
|
statement += ` ${idxKey}: `;
|
59893
61760
|
statement += "primaryKey({ columns: [";
|
59894
61761
|
statement += `${it.columns.map((c) => {
|
59895
|
-
return `table.${
|
61762
|
+
return `table.${casing(c)}`;
|
59896
61763
|
}).join(", ")}]${it.name ? `, name: "${it.name}"` : ""}}`;
|
59897
61764
|
statement += "),";
|
59898
61765
|
statement += `
|
@@ -59904,12 +61771,12 @@ import { sql } from "drizzle-orm"
|
|
59904
61771
|
let statement = "";
|
59905
61772
|
fks.forEach((it) => {
|
59906
61773
|
const isSelf4 = it.tableTo === it.tableFrom;
|
59907
|
-
const tableTo = isSelf4 ? "table" : `${
|
59908
|
-
statement += ` ${
|
61774
|
+
const tableTo = isSelf4 ? "table" : `${casing(it.tableTo)}`;
|
61775
|
+
statement += ` ${casing(it.name)}: foreignKey({
|
59909
61776
|
`;
|
59910
|
-
statement += ` columns: [${it.columnsFrom.map((i) => `table.${
|
61777
|
+
statement += ` columns: [${it.columnsFrom.map((i) => `table.${casing(i)}`).join(", ")}],
|
59911
61778
|
`;
|
59912
|
-
statement += ` foreignColumns: [${it.columnsTo.map((i) => `${tableTo}.${
|
61779
|
+
statement += ` foreignColumns: [${it.columnsTo.map((i) => `${tableTo}.${casing(i)}`).join(", ")}],
|
59913
61780
|
`;
|
59914
61781
|
statement += ` name: "${it.name}"
|
59915
61782
|
`;
|
@@ -59938,7 +61805,7 @@ var init_mysqlIntrospect = __esm({
|
|
59938
61805
|
init_views();
|
59939
61806
|
import_promise = __toESM(require_promise());
|
59940
61807
|
init_mysqlSerializer();
|
59941
|
-
|
61808
|
+
init_introspect_mysql();
|
59942
61809
|
init_global();
|
59943
61810
|
init_mjs();
|
59944
61811
|
connectToMySQL = async (config) => {
|
@@ -60141,7 +62008,7 @@ init_source();
|
|
60141
62008
|
// package.json
|
60142
62009
|
var package_default = {
|
60143
62010
|
name: "drizzle-kit",
|
60144
|
-
version: "0.20.
|
62011
|
+
version: "0.20.4",
|
60145
62012
|
repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
|
60146
62013
|
author: "Drizzle Team",
|
60147
62014
|
license: "MIT",
|
@@ -60176,12 +62043,13 @@ var package_default = {
|
|
60176
62043
|
sim: "node -r esbuild-register ./dev/simulate.ts",
|
60177
62044
|
"sim:sqlite": "node -r esbuild-register ./dev/sqlite/index.ts",
|
60178
62045
|
test: "ava test --timeout=60s",
|
60179
|
-
build: "rm -rf ./dist && tsc -p tsconfig.cli-types.json &&
|
62046
|
+
build: "rm -rf ./dist && tsc -p tsconfig.cli-types.json && pnpm mts && tsx build.ts",
|
62047
|
+
mts: "cp dist/index.d.ts dist/index.d.mts && cp dist/utils-studio.d.ts dist/utils-studio.d.mts",
|
60180
62048
|
"build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
|
60181
62049
|
packit: "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
|
60182
62050
|
tsc: "tsc -p tsconfig.build.json",
|
60183
62051
|
pub: "cp package.json readme.md dist/ && cd dist && npm publish",
|
60184
|
-
studio: "./
|
62052
|
+
studio: "tsx ./src/cli/index.ts studio --verbose --port=3000",
|
60185
62053
|
"studio:dev": "tsx ./src/cli/index.ts studio --verbose"
|
60186
62054
|
},
|
60187
62055
|
ava: {
|
@@ -60196,7 +62064,7 @@ var package_default = {
|
|
60196
62064
|
]
|
60197
62065
|
},
|
60198
62066
|
dependencies: {
|
60199
|
-
"@drizzle-team/studio": "^0.0.
|
62067
|
+
"@drizzle-team/studio": "^0.0.34",
|
60200
62068
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
60201
62069
|
camelcase: "^7.0.1",
|
60202
62070
|
chalk: "^5.2.0",
|
@@ -60207,6 +62075,7 @@ var package_default = {
|
|
60207
62075
|
hanji: "^0.0.5",
|
60208
62076
|
"json-diff": "0.9.0",
|
60209
62077
|
minimatch: "^7.4.3",
|
62078
|
+
semver: "^7.5.4",
|
60210
62079
|
wrangler: "^3.7.0",
|
60211
62080
|
zod: "^3.20.2"
|
60212
62081
|
},
|
@@ -60219,6 +62088,7 @@ var package_default = {
|
|
60219
62088
|
"@types/minimatch": "^5.1.2",
|
60220
62089
|
"@types/node": "^18.11.15",
|
60221
62090
|
"@types/pg": "^8.10.7",
|
62091
|
+
"@types/semver": "^7.5.5",
|
60222
62092
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
60223
62093
|
"@typescript-eslint/parser": "^5.46.1",
|
60224
62094
|
ava: "^5.1.0",
|
@@ -60252,6 +62122,18 @@ var package_default = {
|
|
60252
62122
|
},
|
60253
62123
|
types: "./index.d.mts",
|
60254
62124
|
default: "./index.mjs"
|
62125
|
+
},
|
62126
|
+
"./utils-studio": {
|
62127
|
+
import: {
|
62128
|
+
types: "./utils-studio.d.mts",
|
62129
|
+
default: "./utils-studio.mjs"
|
62130
|
+
},
|
62131
|
+
require: {
|
62132
|
+
types: "./utils-studio.d.ts",
|
62133
|
+
default: "./utils-studio.js"
|
62134
|
+
},
|
62135
|
+
types: "./utils-studio.d.mts",
|
62136
|
+
default: "./utils-studio.mjs"
|
60255
62137
|
}
|
60256
62138
|
}
|
60257
62139
|
};
|
@@ -60874,6 +62756,7 @@ init_sqlgenerator();
|
|
60874
62756
|
|
60875
62757
|
// src/cli/index.ts
|
60876
62758
|
init_selector_ui();
|
62759
|
+
var import_studio = require("@drizzle-team/studio");
|
60877
62760
|
init_global();
|
60878
62761
|
var printVersions = async () => {
|
60879
62762
|
const v = await versions();
|
@@ -61405,7 +63288,7 @@ var introspectPgCommand = new import_commander.Command("introspect:pg").option("
|
|
61405
63288
|
schemasFilter
|
61406
63289
|
);
|
61407
63290
|
const schemaFile = import_path7.default.join(validatedConfig.out, "schema.ts");
|
61408
|
-
(0, import_fs11.writeFileSync)(schemaFile, ts);
|
63291
|
+
(0, import_fs11.writeFileSync)(schemaFile, ts.file);
|
61409
63292
|
console.log();
|
61410
63293
|
if (snapshots.length === 0) {
|
61411
63294
|
const { sqlStatements, _meta } = await prepareSQL(
|
@@ -61458,7 +63341,7 @@ var introspectMySqlCommand = new import_commander.Command("introspect:mysql").op
|
|
61458
63341
|
const tablesFilter = filterConfig ? typeof filterConfig === "string" ? [filterConfig] : filterConfig : [];
|
61459
63342
|
const { schema: schema4, ts } = await mysqlIntrospect2(res, tablesFilter);
|
61460
63343
|
const schemaFile = import_path7.default.join(out, "schema.ts");
|
61461
|
-
(0, import_fs11.writeFileSync)(schemaFile, ts);
|
63344
|
+
(0, import_fs11.writeFileSync)(schemaFile, ts.file);
|
61462
63345
|
console.log();
|
61463
63346
|
if (snapshots.length === 0) {
|
61464
63347
|
const { sqlStatements, _meta } = await prepareSQL(
|
@@ -61511,7 +63394,7 @@ var introspectSQLiteCommand = new import_commander.Command("introspect:sqlite").
|
|
61511
63394
|
const tablesFilter = filterConfig ? typeof filterConfig === "string" ? [filterConfig] : filterConfig : [];
|
61512
63395
|
const { schema: schema4, ts } = await sqliteIntrospect2(res, tablesFilter);
|
61513
63396
|
const schemaFile = import_path7.default.join(out, "schema.ts");
|
61514
|
-
(0, import_fs11.writeFileSync)(schemaFile, ts);
|
63397
|
+
(0, import_fs11.writeFileSync)(schemaFile, ts.file);
|
61515
63398
|
console.log();
|
61516
63399
|
if (snapshots.length === 0) {
|
61517
63400
|
const { sqlStatements, _meta } = await prepareSQL(
|
@@ -61565,6 +63448,7 @@ var dropCommand = new import_commander.Command("drop").option("--out <out>", `Ou
|
|
61565
63448
|
var studioCommand = new import_commander.Command("studio").option("--port <port>", "Custom port for drizzle studio [default=4983]").option("--host <host>", "Custom host for drizzle studio [default=0.0.0.0]").option("--verbose", "Print all stataments that are executed by Studio").option("--config <config>", `Config path [default=drizzle.config.ts]`).action(async (options) => {
|
61566
63449
|
await printVersions();
|
61567
63450
|
await assertOrmCoreVersion();
|
63451
|
+
assertStudioNodeVersion();
|
61568
63452
|
const { validateStudio: validateStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
|
61569
63453
|
const drizzleConfig = await validateStudio2(options);
|
61570
63454
|
const {
|
@@ -61578,33 +63462,63 @@ var studioCommand = new import_commander.Command("studio").option("--port <port>
|
|
61578
63462
|
const { driver, schema: schemaPath } = drizzleConfig;
|
61579
63463
|
let setup;
|
61580
63464
|
if (driver === "pg") {
|
63465
|
+
const { schemaToTypeScript: schemaToTypeScript4 } = await Promise.resolve().then(() => (init_introspect_pg(), introspect_pg_exports));
|
63466
|
+
const { serializePg: serializePg2 } = await Promise.resolve().then(() => (init_serializer(), serializer_exports));
|
61581
63467
|
const { schema: schema4, relations: relations4 } = await preparePgSchema2(schemaPath);
|
63468
|
+
const internalSchema = await serializePg2(schemaPath);
|
63469
|
+
const ts = schemaToTypeScript4(internalSchema, { casing: "camel" });
|
61582
63470
|
setup = await drizzleForPostgres2(
|
61583
63471
|
drizzleConfig,
|
61584
63472
|
schema4,
|
61585
63473
|
relations4,
|
63474
|
+
{
|
63475
|
+
imports: ts.imports,
|
63476
|
+
declarations: ts.decalrations,
|
63477
|
+
schemaEntry: ts.schemaEntry
|
63478
|
+
},
|
61586
63479
|
Boolean(options.verbose)
|
61587
63480
|
);
|
61588
63481
|
} else if (driver === "mysql2") {
|
63482
|
+
const { schemaToTypeScript: schemaToTypeScript4 } = await Promise.resolve().then(() => (init_introspect_mysql(), introspect_mysql_exports));
|
61589
63483
|
const { schema: schema4, relations: relations4 } = await prepareMySqlSchema2(schemaPath);
|
63484
|
+
const { serializeMySql: serializeMySql2 } = await Promise.resolve().then(() => (init_serializer(), serializer_exports));
|
63485
|
+
const internalSchema = await serializeMySql2(schemaPath);
|
63486
|
+
const ts = schemaToTypeScript4(internalSchema, "camel");
|
61590
63487
|
setup = await drizzleForMySQL2(
|
61591
63488
|
drizzleConfig,
|
61592
63489
|
schema4,
|
61593
63490
|
relations4,
|
63491
|
+
{
|
63492
|
+
imports: ts.imports,
|
63493
|
+
declarations: ts.decalrations,
|
63494
|
+
schemaEntry: ts.schemaEntry
|
63495
|
+
},
|
61594
63496
|
Boolean(options.verbose)
|
61595
63497
|
);
|
61596
63498
|
} else if (driver === "better-sqlite" || driver === "d1" || driver === "libsql" || driver === "turso") {
|
63499
|
+
const { schemaToTypeScript: schemaToTypeScript4 } = await Promise.resolve().then(() => (init_introspect_sqlite(), introspect_sqlite_exports));
|
61597
63500
|
const { schema: schema4, relations: relations4 } = await prepareSQLiteSchema2(schemaPath);
|
63501
|
+
const { serializeSQLite: serializeSQLite2 } = await Promise.resolve().then(() => (init_serializer(), serializer_exports));
|
63502
|
+
const internalSchema = await serializeSQLite2(schemaPath);
|
63503
|
+
const ts = schemaToTypeScript4(internalSchema, "camel");
|
61598
63504
|
setup = await drizzleForSQLite2(
|
61599
63505
|
drizzleConfig,
|
61600
63506
|
schema4,
|
61601
63507
|
relations4,
|
63508
|
+
{
|
63509
|
+
imports: ts.imports,
|
63510
|
+
declarations: ts.decalrations,
|
63511
|
+
schemaEntry: ts.schemaEntry
|
63512
|
+
},
|
61602
63513
|
Boolean(options.verbose)
|
61603
63514
|
);
|
61604
63515
|
} else {
|
61605
63516
|
assertUnreachable(driver);
|
61606
63517
|
}
|
61607
|
-
const
|
63518
|
+
const qeueryEngine = (0, import_studio.queryEngineForSetup)(setup);
|
63519
|
+
const server = await (0, import_server.prepareServer)((_) => {
|
63520
|
+
return qeueryEngine;
|
63521
|
+
});
|
61608
63522
|
const port = options.port ?? 4983;
|
61609
63523
|
const host = options.host ?? "127.0.0.1";
|
61610
63524
|
console.log();
|