@hot-updater/postgres 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +527 -528
- package/dist/index.d.cts +4 -3
- package/dist/{index.d.ts → index.d.mts} +4 -3
- package/dist/{index.js → index.mjs} +515 -513
- package/package.json +14 -7
- package/sql/bundles.sql +7 -2
- package/sql/get_update_info.spec.ts +48 -12
- package/sql/get_update_info_by_app_version.sql +61 -25
- package/sql/get_update_info_by_fingerprint_hash.sql +61 -27
- package/sql/hash_user_id.sql +30 -0
- package/sql/is_device_eligible.sql +236 -0
|
@@ -3,17 +3,14 @@ import { NIL_UUID } from "@hot-updater/core";
|
|
|
3
3
|
import { calculatePagination, createDatabasePlugin } from "@hot-updater/plugin-core";
|
|
4
4
|
import { Kysely, PostgresDialect } from "kysely";
|
|
5
5
|
import { Pool } from "pg";
|
|
6
|
-
|
|
7
|
-
//#region rolldown:runtime
|
|
6
|
+
//#region \0rolldown/runtime.js
|
|
8
7
|
var __create$1 = Object.create;
|
|
9
8
|
var __defProp$1 = Object.defineProperty;
|
|
10
9
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
11
10
|
var __getOwnPropNames$1 = Object.getOwnPropertyNames;
|
|
12
11
|
var __getProtoOf$1 = Object.getPrototypeOf;
|
|
13
12
|
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
14
|
-
var
|
|
15
|
-
return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
-
};
|
|
13
|
+
var __commonJSMin$1 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
17
14
|
var __copyProps$1 = (to, from, except, desc) => {
|
|
18
15
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
16
|
key = keys[i];
|
|
@@ -29,18 +26,15 @@ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(
|
|
|
29
26
|
enumerable: true
|
|
30
27
|
}) : target, mod));
|
|
31
28
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
32
|
-
|
|
33
29
|
//#endregion
|
|
34
|
-
//#region ../js/dist/index.
|
|
30
|
+
//#region ../js/dist/index.mjs
|
|
35
31
|
var __create = Object.create;
|
|
36
32
|
var __defProp = Object.defineProperty;
|
|
37
33
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
38
34
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
39
35
|
var __getProtoOf = Object.getPrototypeOf;
|
|
40
36
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
41
|
-
var
|
|
42
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
43
|
-
};
|
|
37
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
44
38
|
var __copyProps = (to, from, except, desc) => {
|
|
45
39
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
46
40
|
key = keys[i];
|
|
@@ -55,15 +49,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
55
49
|
value: mod,
|
|
56
50
|
enumerable: true
|
|
57
51
|
}) : target, mod));
|
|
58
|
-
var require_constants = /* @__PURE__ */
|
|
52
|
+
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59
53
|
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
60
|
-
const MAX_LENGTH
|
|
61
|
-
const MAX_SAFE_INTEGER
|
|
62
|
-
module
|
|
63
|
-
MAX_LENGTH
|
|
54
|
+
const MAX_LENGTH = 256;
|
|
55
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
56
|
+
module.exports = {
|
|
57
|
+
MAX_LENGTH,
|
|
64
58
|
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
65
|
-
MAX_SAFE_BUILD_LENGTH: MAX_LENGTH
|
|
66
|
-
MAX_SAFE_INTEGER
|
|
59
|
+
MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
|
|
60
|
+
MAX_SAFE_INTEGER,
|
|
67
61
|
RELEASE_TYPES: [
|
|
68
62
|
"major",
|
|
69
63
|
"premajor",
|
|
@@ -77,24 +71,24 @@ var require_constants = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/s
|
|
|
77
71
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
78
72
|
FLAG_LOOSE: 2
|
|
79
73
|
};
|
|
80
|
-
})
|
|
81
|
-
var require_debug = /* @__PURE__ */
|
|
82
|
-
module
|
|
83
|
-
})
|
|
84
|
-
var require_re = /* @__PURE__ */
|
|
85
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH
|
|
86
|
-
const debug
|
|
87
|
-
exports = module
|
|
88
|
-
const re
|
|
74
|
+
}));
|
|
75
|
+
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
76
|
+
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
77
|
+
}));
|
|
78
|
+
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
79
|
+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
80
|
+
const debug = require_debug();
|
|
81
|
+
exports = module.exports = {};
|
|
82
|
+
const re = exports.re = [];
|
|
89
83
|
const safeRe = exports.safeRe = [];
|
|
90
84
|
const src = exports.src = [];
|
|
91
85
|
const safeSrc = exports.safeSrc = [];
|
|
92
|
-
const t
|
|
86
|
+
const t = exports.t = {};
|
|
93
87
|
let R = 0;
|
|
94
88
|
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
95
89
|
const safeRegexReplacements = [
|
|
96
90
|
["\\s", 1],
|
|
97
|
-
["\\d", MAX_LENGTH
|
|
91
|
+
["\\d", MAX_LENGTH],
|
|
98
92
|
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
99
93
|
];
|
|
100
94
|
const makeSafeRegex = (value) => {
|
|
@@ -104,73 +98,73 @@ var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7
|
|
|
104
98
|
const createToken = (name, value, isGlobal) => {
|
|
105
99
|
const safe = makeSafeRegex(value);
|
|
106
100
|
const index = R++;
|
|
107
|
-
debug
|
|
108
|
-
t
|
|
101
|
+
debug(name, index, value);
|
|
102
|
+
t[name] = index;
|
|
109
103
|
src[index] = value;
|
|
110
104
|
safeSrc[index] = safe;
|
|
111
|
-
re
|
|
105
|
+
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
112
106
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
113
107
|
};
|
|
114
108
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
115
109
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
116
110
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
117
|
-
createToken("MAINVERSION", `(${src[t
|
|
118
|
-
createToken("MAINVERSIONLOOSE", `(${src[t
|
|
119
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t
|
|
120
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t
|
|
121
|
-
createToken("PRERELEASE", `(?:-(${src[t
|
|
122
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t
|
|
111
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
112
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
113
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
114
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
115
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
116
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
123
117
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
124
|
-
createToken("BUILD", `(?:\\+(${src[t
|
|
125
|
-
createToken("FULLPLAIN", `v?${src[t
|
|
126
|
-
createToken("FULL", `^${src[t
|
|
127
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t
|
|
128
|
-
createToken("LOOSE", `^${src[t
|
|
118
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
119
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
120
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
121
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
122
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
129
123
|
createToken("GTLT", "((?:<|>)?=?)");
|
|
130
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t
|
|
131
|
-
createToken("XRANGEIDENTIFIER", `${src[t
|
|
132
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t
|
|
133
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t
|
|
134
|
-
createToken("XRANGE", `^${src[t
|
|
135
|
-
createToken("XRANGELOOSE", `^${src[t
|
|
124
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
125
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
126
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
127
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
128
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
129
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
136
130
|
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
137
|
-
createToken("COERCE", `${src[t
|
|
138
|
-
createToken("COERCEFULL", src[t
|
|
139
|
-
createToken("COERCERTL", src[t
|
|
140
|
-
createToken("COERCERTLFULL", src[t
|
|
131
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
132
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
133
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
134
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
141
135
|
createToken("LONETILDE", "(?:~>?)");
|
|
142
|
-
createToken("TILDETRIM", `(\\s*)${src[t
|
|
136
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
143
137
|
exports.tildeTrimReplace = "$1~";
|
|
144
|
-
createToken("TILDE", `^${src[t
|
|
145
|
-
createToken("TILDELOOSE", `^${src[t
|
|
138
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
139
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
146
140
|
createToken("LONECARET", "(?:\\^)");
|
|
147
|
-
createToken("CARETTRIM", `(\\s*)${src[t
|
|
141
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
148
142
|
exports.caretTrimReplace = "$1^";
|
|
149
|
-
createToken("CARET", `^${src[t
|
|
150
|
-
createToken("CARETLOOSE", `^${src[t
|
|
151
|
-
createToken("COMPARATORLOOSE", `^${src[t
|
|
152
|
-
createToken("COMPARATOR", `^${src[t
|
|
153
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t
|
|
143
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
144
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
145
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
146
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
147
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
154
148
|
exports.comparatorTrimReplace = "$1$2$3";
|
|
155
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t
|
|
156
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t
|
|
149
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
150
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
157
151
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
158
152
|
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
159
153
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
160
|
-
})
|
|
161
|
-
var require_parse_options = /* @__PURE__ */
|
|
154
|
+
}));
|
|
155
|
+
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
162
156
|
const looseOption = Object.freeze({ loose: true });
|
|
163
157
|
const emptyOpts = Object.freeze({});
|
|
164
|
-
const parseOptions
|
|
158
|
+
const parseOptions = (options) => {
|
|
165
159
|
if (!options) return emptyOpts;
|
|
166
160
|
if (typeof options !== "object") return looseOption;
|
|
167
161
|
return options;
|
|
168
162
|
};
|
|
169
|
-
module
|
|
170
|
-
})
|
|
171
|
-
var require_identifiers = /* @__PURE__ */
|
|
163
|
+
module.exports = parseOptions;
|
|
164
|
+
}));
|
|
165
|
+
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
172
166
|
const numeric = /^[0-9]+$/;
|
|
173
|
-
const compareIdentifiers
|
|
167
|
+
const compareIdentifiers = (a, b) => {
|
|
174
168
|
const anum = numeric.test(a);
|
|
175
169
|
const bnum = numeric.test(b);
|
|
176
170
|
if (anum && bnum) {
|
|
@@ -179,30 +173,30 @@ var require_identifiers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
179
173
|
}
|
|
180
174
|
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
181
175
|
};
|
|
182
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers
|
|
183
|
-
module
|
|
184
|
-
compareIdentifiers
|
|
176
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
177
|
+
module.exports = {
|
|
178
|
+
compareIdentifiers,
|
|
185
179
|
rcompareIdentifiers
|
|
186
180
|
};
|
|
187
|
-
})
|
|
188
|
-
var require_semver$1 = /* @__PURE__ */
|
|
189
|
-
const debug
|
|
181
|
+
}));
|
|
182
|
+
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
183
|
+
const debug = require_debug();
|
|
190
184
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
191
|
-
const { safeRe: re
|
|
192
|
-
const parseOptions
|
|
185
|
+
const { safeRe: re, t } = require_re();
|
|
186
|
+
const parseOptions = require_parse_options();
|
|
193
187
|
const { compareIdentifiers } = require_identifiers();
|
|
194
|
-
module
|
|
188
|
+
module.exports = class SemVer {
|
|
195
189
|
constructor(version, options) {
|
|
196
|
-
options = parseOptions
|
|
197
|
-
if (version instanceof SemVer
|
|
190
|
+
options = parseOptions(options);
|
|
191
|
+
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
198
192
|
else version = version.version;
|
|
199
193
|
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
200
194
|
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
201
|
-
debug
|
|
195
|
+
debug("SemVer", version, options);
|
|
202
196
|
this.options = options;
|
|
203
197
|
this.loose = !!options.loose;
|
|
204
198
|
this.includePrerelease = !!options.includePrerelease;
|
|
205
|
-
const m = version.trim().match(options.loose ? re
|
|
199
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
206
200
|
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
207
201
|
this.raw = version;
|
|
208
202
|
this.major = +m[1];
|
|
@@ -231,20 +225,20 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
231
225
|
return this.version;
|
|
232
226
|
}
|
|
233
227
|
compare(other) {
|
|
234
|
-
debug
|
|
235
|
-
if (!(other instanceof SemVer
|
|
228
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
229
|
+
if (!(other instanceof SemVer)) {
|
|
236
230
|
if (typeof other === "string" && other === this.version) return 0;
|
|
237
|
-
other = new SemVer
|
|
231
|
+
other = new SemVer(other, this.options);
|
|
238
232
|
}
|
|
239
233
|
if (other.version === this.version) return 0;
|
|
240
234
|
return this.compareMain(other) || this.comparePre(other);
|
|
241
235
|
}
|
|
242
236
|
compareMain(other) {
|
|
243
|
-
if (!(other instanceof SemVer
|
|
237
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
244
238
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
245
239
|
}
|
|
246
240
|
comparePre(other) {
|
|
247
|
-
if (!(other instanceof SemVer
|
|
241
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
248
242
|
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
249
243
|
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
250
244
|
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
@@ -252,7 +246,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
252
246
|
do {
|
|
253
247
|
const a = this.prerelease[i];
|
|
254
248
|
const b = other.prerelease[i];
|
|
255
|
-
debug
|
|
249
|
+
debug("prerelease compare", i, a, b);
|
|
256
250
|
if (a === void 0 && b === void 0) return 0;
|
|
257
251
|
else if (b === void 0) return 1;
|
|
258
252
|
else if (a === void 0) return -1;
|
|
@@ -261,12 +255,12 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
261
255
|
} while (++i);
|
|
262
256
|
}
|
|
263
257
|
compareBuild(other) {
|
|
264
|
-
if (!(other instanceof SemVer
|
|
258
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
265
259
|
let i = 0;
|
|
266
260
|
do {
|
|
267
261
|
const a = this.build[i];
|
|
268
262
|
const b = other.build[i];
|
|
269
|
-
debug
|
|
263
|
+
debug("build compare", i, a, b);
|
|
270
264
|
if (a === void 0 && b === void 0) return 0;
|
|
271
265
|
else if (b === void 0) return 1;
|
|
272
266
|
else if (a === void 0) return -1;
|
|
@@ -278,7 +272,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
278
272
|
if (release.startsWith("pre")) {
|
|
279
273
|
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
280
274
|
if (identifier) {
|
|
281
|
-
const match = `-${identifier}`.match(this.options.loose ? re
|
|
275
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
282
276
|
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
283
277
|
}
|
|
284
278
|
}
|
|
@@ -339,11 +333,11 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
339
333
|
}
|
|
340
334
|
}
|
|
341
335
|
if (identifier) {
|
|
342
|
-
let prerelease
|
|
343
|
-
if (identifierBase === false) prerelease
|
|
336
|
+
let prerelease = [identifier, base];
|
|
337
|
+
if (identifierBase === false) prerelease = [identifier];
|
|
344
338
|
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
345
|
-
if (isNaN(this.prerelease[1])) this.prerelease = prerelease
|
|
346
|
-
} else this.prerelease = prerelease
|
|
339
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
|
|
340
|
+
} else this.prerelease = prerelease;
|
|
347
341
|
}
|
|
348
342
|
break;
|
|
349
343
|
}
|
|
@@ -354,57 +348,57 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
354
348
|
return this;
|
|
355
349
|
}
|
|
356
350
|
};
|
|
357
|
-
})
|
|
358
|
-
var require_parse = /* @__PURE__ */
|
|
359
|
-
const SemVer
|
|
360
|
-
const parse
|
|
361
|
-
if (version instanceof SemVer
|
|
351
|
+
}));
|
|
352
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
353
|
+
const SemVer = require_semver$1();
|
|
354
|
+
const parse = (version, options, throwErrors = false) => {
|
|
355
|
+
if (version instanceof SemVer) return version;
|
|
362
356
|
try {
|
|
363
|
-
return new SemVer
|
|
357
|
+
return new SemVer(version, options);
|
|
364
358
|
} catch (er) {
|
|
365
359
|
if (!throwErrors) return null;
|
|
366
360
|
throw er;
|
|
367
361
|
}
|
|
368
362
|
};
|
|
369
|
-
module
|
|
370
|
-
})
|
|
371
|
-
var require_valid$1 = /* @__PURE__ */
|
|
372
|
-
const parse
|
|
373
|
-
const valid
|
|
374
|
-
const v = parse
|
|
363
|
+
module.exports = parse;
|
|
364
|
+
}));
|
|
365
|
+
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
366
|
+
const parse = require_parse();
|
|
367
|
+
const valid = (version, options) => {
|
|
368
|
+
const v = parse(version, options);
|
|
375
369
|
return v ? v.version : null;
|
|
376
370
|
};
|
|
377
|
-
module
|
|
378
|
-
})
|
|
379
|
-
var require_clean = /* @__PURE__ */
|
|
380
|
-
const parse
|
|
381
|
-
const clean
|
|
382
|
-
const s = parse
|
|
371
|
+
module.exports = valid;
|
|
372
|
+
}));
|
|
373
|
+
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
374
|
+
const parse = require_parse();
|
|
375
|
+
const clean = (version, options) => {
|
|
376
|
+
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
383
377
|
return s ? s.version : null;
|
|
384
378
|
};
|
|
385
|
-
module
|
|
386
|
-
})
|
|
387
|
-
var require_inc = /* @__PURE__ */
|
|
388
|
-
const SemVer
|
|
389
|
-
const inc
|
|
379
|
+
module.exports = clean;
|
|
380
|
+
}));
|
|
381
|
+
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
382
|
+
const SemVer = require_semver$1();
|
|
383
|
+
const inc = (version, release, options, identifier, identifierBase) => {
|
|
390
384
|
if (typeof options === "string") {
|
|
391
385
|
identifierBase = identifier;
|
|
392
386
|
identifier = options;
|
|
393
387
|
options = void 0;
|
|
394
388
|
}
|
|
395
389
|
try {
|
|
396
|
-
return new SemVer
|
|
390
|
+
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
397
391
|
} catch (er) {
|
|
398
392
|
return null;
|
|
399
393
|
}
|
|
400
394
|
};
|
|
401
|
-
module
|
|
402
|
-
})
|
|
403
|
-
var require_diff = /* @__PURE__ */
|
|
404
|
-
const parse
|
|
405
|
-
const diff
|
|
406
|
-
const v1 = parse
|
|
407
|
-
const v2 = parse
|
|
395
|
+
module.exports = inc;
|
|
396
|
+
}));
|
|
397
|
+
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
398
|
+
const parse = require_parse();
|
|
399
|
+
const diff = (version1, version2) => {
|
|
400
|
+
const v1 = parse(version1, null, true);
|
|
401
|
+
const v2 = parse(version2, null, true);
|
|
408
402
|
const comparison = v1.compare(v2);
|
|
409
403
|
if (comparison === 0) return null;
|
|
410
404
|
const v1Higher = comparison > 0;
|
|
@@ -424,103 +418,103 @@ var require_diff = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver
|
|
|
424
418
|
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
425
419
|
return "prerelease";
|
|
426
420
|
};
|
|
427
|
-
module
|
|
428
|
-
})
|
|
429
|
-
var require_major = /* @__PURE__ */
|
|
430
|
-
const SemVer
|
|
431
|
-
const major
|
|
432
|
-
module
|
|
433
|
-
})
|
|
434
|
-
var require_minor = /* @__PURE__ */
|
|
435
|
-
const SemVer
|
|
436
|
-
const minor
|
|
437
|
-
module
|
|
438
|
-
})
|
|
439
|
-
var require_patch = /* @__PURE__ */
|
|
440
|
-
const SemVer
|
|
441
|
-
const patch
|
|
442
|
-
module
|
|
443
|
-
})
|
|
444
|
-
var require_prerelease = /* @__PURE__ */
|
|
445
|
-
const parse
|
|
446
|
-
const prerelease
|
|
447
|
-
const parsed = parse
|
|
421
|
+
module.exports = diff;
|
|
422
|
+
}));
|
|
423
|
+
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
424
|
+
const SemVer = require_semver$1();
|
|
425
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
426
|
+
module.exports = major;
|
|
427
|
+
}));
|
|
428
|
+
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
429
|
+
const SemVer = require_semver$1();
|
|
430
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
431
|
+
module.exports = minor;
|
|
432
|
+
}));
|
|
433
|
+
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
434
|
+
const SemVer = require_semver$1();
|
|
435
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
436
|
+
module.exports = patch;
|
|
437
|
+
}));
|
|
438
|
+
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
439
|
+
const parse = require_parse();
|
|
440
|
+
const prerelease = (version, options) => {
|
|
441
|
+
const parsed = parse(version, options);
|
|
448
442
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
449
443
|
};
|
|
450
|
-
module
|
|
451
|
-
})
|
|
452
|
-
var require_compare = /* @__PURE__ */
|
|
453
|
-
const SemVer
|
|
454
|
-
const compare
|
|
455
|
-
module
|
|
456
|
-
})
|
|
457
|
-
var require_rcompare = /* @__PURE__ */
|
|
458
|
-
const compare
|
|
459
|
-
const rcompare
|
|
460
|
-
module
|
|
461
|
-
})
|
|
462
|
-
var require_compare_loose = /* @__PURE__ */
|
|
463
|
-
const compare
|
|
464
|
-
const compareLoose
|
|
465
|
-
module
|
|
466
|
-
})
|
|
467
|
-
var require_compare_build = /* @__PURE__ */
|
|
468
|
-
const SemVer
|
|
469
|
-
const compareBuild
|
|
470
|
-
const versionA = new SemVer
|
|
471
|
-
const versionB = new SemVer
|
|
444
|
+
module.exports = prerelease;
|
|
445
|
+
}));
|
|
446
|
+
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
447
|
+
const SemVer = require_semver$1();
|
|
448
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
449
|
+
module.exports = compare;
|
|
450
|
+
}));
|
|
451
|
+
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
452
|
+
const compare = require_compare();
|
|
453
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
454
|
+
module.exports = rcompare;
|
|
455
|
+
}));
|
|
456
|
+
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
457
|
+
const compare = require_compare();
|
|
458
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
459
|
+
module.exports = compareLoose;
|
|
460
|
+
}));
|
|
461
|
+
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
462
|
+
const SemVer = require_semver$1();
|
|
463
|
+
const compareBuild = (a, b, loose) => {
|
|
464
|
+
const versionA = new SemVer(a, loose);
|
|
465
|
+
const versionB = new SemVer(b, loose);
|
|
472
466
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
473
467
|
};
|
|
474
|
-
module
|
|
475
|
-
})
|
|
476
|
-
var require_sort = /* @__PURE__ */
|
|
477
|
-
const compareBuild
|
|
478
|
-
const sort
|
|
479
|
-
module
|
|
480
|
-
})
|
|
481
|
-
var require_rsort = /* @__PURE__ */
|
|
482
|
-
const compareBuild
|
|
483
|
-
const rsort
|
|
484
|
-
module
|
|
485
|
-
})
|
|
486
|
-
var require_gt = /* @__PURE__ */
|
|
487
|
-
const compare
|
|
488
|
-
const gt
|
|
489
|
-
module
|
|
490
|
-
})
|
|
491
|
-
var require_lt = /* @__PURE__ */
|
|
492
|
-
const compare
|
|
493
|
-
const lt
|
|
494
|
-
module
|
|
495
|
-
})
|
|
496
|
-
var require_eq = /* @__PURE__ */
|
|
497
|
-
const compare
|
|
498
|
-
const eq
|
|
499
|
-
module
|
|
500
|
-
})
|
|
501
|
-
var require_neq = /* @__PURE__ */
|
|
502
|
-
const compare
|
|
503
|
-
const neq
|
|
504
|
-
module
|
|
505
|
-
})
|
|
506
|
-
var require_gte = /* @__PURE__ */
|
|
507
|
-
const compare
|
|
508
|
-
const gte
|
|
509
|
-
module
|
|
510
|
-
})
|
|
511
|
-
var require_lte = /* @__PURE__ */
|
|
512
|
-
const compare
|
|
513
|
-
const lte
|
|
514
|
-
module
|
|
515
|
-
})
|
|
516
|
-
var require_cmp = /* @__PURE__ */
|
|
517
|
-
const eq
|
|
518
|
-
const neq
|
|
519
|
-
const gt
|
|
520
|
-
const gte
|
|
521
|
-
const lt
|
|
522
|
-
const lte
|
|
523
|
-
const cmp
|
|
468
|
+
module.exports = compareBuild;
|
|
469
|
+
}));
|
|
470
|
+
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
471
|
+
const compareBuild = require_compare_build();
|
|
472
|
+
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
473
|
+
module.exports = sort;
|
|
474
|
+
}));
|
|
475
|
+
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
476
|
+
const compareBuild = require_compare_build();
|
|
477
|
+
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
478
|
+
module.exports = rsort;
|
|
479
|
+
}));
|
|
480
|
+
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
481
|
+
const compare = require_compare();
|
|
482
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
483
|
+
module.exports = gt;
|
|
484
|
+
}));
|
|
485
|
+
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
486
|
+
const compare = require_compare();
|
|
487
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
488
|
+
module.exports = lt;
|
|
489
|
+
}));
|
|
490
|
+
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
491
|
+
const compare = require_compare();
|
|
492
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
493
|
+
module.exports = eq;
|
|
494
|
+
}));
|
|
495
|
+
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
496
|
+
const compare = require_compare();
|
|
497
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
498
|
+
module.exports = neq;
|
|
499
|
+
}));
|
|
500
|
+
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
501
|
+
const compare = require_compare();
|
|
502
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
503
|
+
module.exports = gte;
|
|
504
|
+
}));
|
|
505
|
+
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
506
|
+
const compare = require_compare();
|
|
507
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
508
|
+
module.exports = lte;
|
|
509
|
+
}));
|
|
510
|
+
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
511
|
+
const eq = require_eq();
|
|
512
|
+
const neq = require_neq();
|
|
513
|
+
const gt = require_gt();
|
|
514
|
+
const gte = require_gte();
|
|
515
|
+
const lt = require_lt();
|
|
516
|
+
const lte = require_lte();
|
|
517
|
+
const cmp = (a, op, b, loose) => {
|
|
524
518
|
switch (op) {
|
|
525
519
|
case "===":
|
|
526
520
|
if (typeof a === "object") a = a.version;
|
|
@@ -532,30 +526,30 @@ var require_cmp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@
|
|
|
532
526
|
return a !== b;
|
|
533
527
|
case "":
|
|
534
528
|
case "=":
|
|
535
|
-
case "==": return eq
|
|
536
|
-
case "!=": return neq
|
|
537
|
-
case ">": return gt
|
|
538
|
-
case ">=": return gte
|
|
539
|
-
case "<": return lt
|
|
540
|
-
case "<=": return lte
|
|
529
|
+
case "==": return eq(a, b, loose);
|
|
530
|
+
case "!=": return neq(a, b, loose);
|
|
531
|
+
case ">": return gt(a, b, loose);
|
|
532
|
+
case ">=": return gte(a, b, loose);
|
|
533
|
+
case "<": return lt(a, b, loose);
|
|
534
|
+
case "<=": return lte(a, b, loose);
|
|
541
535
|
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
542
536
|
}
|
|
543
537
|
};
|
|
544
|
-
module
|
|
545
|
-
})
|
|
546
|
-
var require_coerce = /* @__PURE__ */
|
|
547
|
-
const SemVer
|
|
548
|
-
const parse
|
|
549
|
-
const { safeRe: re
|
|
550
|
-
const coerce
|
|
551
|
-
if (version instanceof SemVer
|
|
538
|
+
module.exports = cmp;
|
|
539
|
+
}));
|
|
540
|
+
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
541
|
+
const SemVer = require_semver$1();
|
|
542
|
+
const parse = require_parse();
|
|
543
|
+
const { safeRe: re, t } = require_re();
|
|
544
|
+
const coerce = (version, options) => {
|
|
545
|
+
if (version instanceof SemVer) return version;
|
|
552
546
|
if (typeof version === "number") version = String(version);
|
|
553
547
|
if (typeof version !== "string") return null;
|
|
554
548
|
options = options || {};
|
|
555
549
|
let match = null;
|
|
556
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re
|
|
550
|
+
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
557
551
|
else {
|
|
558
|
-
const coerceRtlRegex = options.includePrerelease ? re
|
|
552
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
559
553
|
let next;
|
|
560
554
|
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
561
555
|
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
@@ -564,12 +558,12 @@ var require_coerce = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
564
558
|
coerceRtlRegex.lastIndex = -1;
|
|
565
559
|
}
|
|
566
560
|
if (match === null) return null;
|
|
567
|
-
const major
|
|
568
|
-
return parse
|
|
561
|
+
const major = match[2];
|
|
562
|
+
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
569
563
|
};
|
|
570
|
-
module
|
|
571
|
-
})
|
|
572
|
-
var require_lrucache = /* @__PURE__ */
|
|
564
|
+
module.exports = coerce;
|
|
565
|
+
}));
|
|
566
|
+
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
573
567
|
var LRUCache = class {
|
|
574
568
|
constructor() {
|
|
575
569
|
this.max = 1e3;
|
|
@@ -598,16 +592,16 @@ var require_lrucache = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
598
592
|
return this;
|
|
599
593
|
}
|
|
600
594
|
};
|
|
601
|
-
module
|
|
602
|
-
})
|
|
603
|
-
var require_range = /* @__PURE__ */
|
|
595
|
+
module.exports = LRUCache;
|
|
596
|
+
}));
|
|
597
|
+
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
604
598
|
const SPACE_CHARACTERS = /\s+/g;
|
|
605
|
-
module
|
|
599
|
+
module.exports = class Range {
|
|
606
600
|
constructor(range, options) {
|
|
607
|
-
options = parseOptions
|
|
608
|
-
if (range instanceof Range
|
|
609
|
-
else return new Range
|
|
610
|
-
if (range instanceof Comparator
|
|
601
|
+
options = parseOptions(options);
|
|
602
|
+
if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
603
|
+
else return new Range(range.raw, options);
|
|
604
|
+
if (range instanceof Comparator) {
|
|
611
605
|
this.raw = range.value;
|
|
612
606
|
this.set = [[range]];
|
|
613
607
|
this.formatted = void 0;
|
|
@@ -654,37 +648,37 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
654
648
|
}
|
|
655
649
|
parseRange(range) {
|
|
656
650
|
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
|
|
657
|
-
const cached = cache
|
|
651
|
+
const cached = cache.get(memoKey);
|
|
658
652
|
if (cached) return cached;
|
|
659
653
|
const loose = this.options.loose;
|
|
660
|
-
const hr = loose ? re
|
|
654
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
661
655
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
662
|
-
debug
|
|
663
|
-
range = range.replace(re
|
|
664
|
-
debug
|
|
665
|
-
range = range.replace(re
|
|
666
|
-
debug
|
|
667
|
-
range = range.replace(re
|
|
668
|
-
debug
|
|
656
|
+
debug("hyphen replace", range);
|
|
657
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
658
|
+
debug("comparator trim", range);
|
|
659
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
660
|
+
debug("tilde trim", range);
|
|
661
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
662
|
+
debug("caret trim", range);
|
|
669
663
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
670
664
|
if (loose) rangeList = rangeList.filter((comp) => {
|
|
671
|
-
debug
|
|
672
|
-
return !!comp.match(re
|
|
665
|
+
debug("loose invalid filter", comp, this.options);
|
|
666
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
673
667
|
});
|
|
674
|
-
debug
|
|
668
|
+
debug("range list", rangeList);
|
|
675
669
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
676
|
-
const comparators = rangeList.map((comp) => new Comparator
|
|
670
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
677
671
|
for (const comp of comparators) {
|
|
678
672
|
if (isNullSet(comp)) return [comp];
|
|
679
673
|
rangeMap.set(comp.value, comp);
|
|
680
674
|
}
|
|
681
675
|
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
682
676
|
const result = [...rangeMap.values()];
|
|
683
|
-
cache
|
|
677
|
+
cache.set(memoKey, result);
|
|
684
678
|
return result;
|
|
685
679
|
}
|
|
686
680
|
intersects(range, options) {
|
|
687
|
-
if (!(range instanceof Range
|
|
681
|
+
if (!(range instanceof Range)) throw new TypeError("a Range is required");
|
|
688
682
|
return this.set.some((thisComparators) => {
|
|
689
683
|
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
690
684
|
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
@@ -698,7 +692,7 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
698
692
|
test(version) {
|
|
699
693
|
if (!version) return false;
|
|
700
694
|
if (typeof version === "string") try {
|
|
701
|
-
version = new SemVer
|
|
695
|
+
version = new SemVer(version, this.options);
|
|
702
696
|
} catch (er) {
|
|
703
697
|
return false;
|
|
704
698
|
}
|
|
@@ -706,12 +700,12 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
706
700
|
return false;
|
|
707
701
|
}
|
|
708
702
|
};
|
|
709
|
-
const cache
|
|
710
|
-
const parseOptions
|
|
711
|
-
const Comparator
|
|
712
|
-
const debug
|
|
713
|
-
const SemVer
|
|
714
|
-
const { safeRe: re
|
|
703
|
+
const cache = new (require_lrucache())();
|
|
704
|
+
const parseOptions = require_parse_options();
|
|
705
|
+
const Comparator = require_comparator();
|
|
706
|
+
const debug = require_debug();
|
|
707
|
+
const SemVer = require_semver$1();
|
|
708
|
+
const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
715
709
|
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
716
710
|
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
717
711
|
const isAny = (c) => c.value === "";
|
|
@@ -728,15 +722,15 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
728
722
|
return result;
|
|
729
723
|
};
|
|
730
724
|
const parseComparator = (comp, options) => {
|
|
731
|
-
debug
|
|
725
|
+
debug("comp", comp, options);
|
|
732
726
|
comp = replaceCarets(comp, options);
|
|
733
|
-
debug
|
|
727
|
+
debug("caret", comp);
|
|
734
728
|
comp = replaceTildes(comp, options);
|
|
735
|
-
debug
|
|
729
|
+
debug("tildes", comp);
|
|
736
730
|
comp = replaceXRanges(comp, options);
|
|
737
|
-
debug
|
|
731
|
+
debug("xrange", comp);
|
|
738
732
|
comp = replaceStars(comp, options);
|
|
739
|
-
debug
|
|
733
|
+
debug("stars", comp);
|
|
740
734
|
return comp;
|
|
741
735
|
};
|
|
742
736
|
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
@@ -744,18 +738,18 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
744
738
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
745
739
|
};
|
|
746
740
|
const replaceTilde = (comp, options) => {
|
|
747
|
-
const r = options.loose ? re
|
|
741
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
748
742
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
749
|
-
debug
|
|
743
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
750
744
|
let ret;
|
|
751
745
|
if (isX(M)) ret = "";
|
|
752
746
|
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
753
747
|
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
754
748
|
else if (pr) {
|
|
755
|
-
debug
|
|
749
|
+
debug("replaceTilde pr", pr);
|
|
756
750
|
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
757
751
|
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
758
|
-
debug
|
|
752
|
+
debug("tilde return", ret);
|
|
759
753
|
return ret;
|
|
760
754
|
});
|
|
761
755
|
};
|
|
@@ -763,40 +757,40 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
763
757
|
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
764
758
|
};
|
|
765
759
|
const replaceCaret = (comp, options) => {
|
|
766
|
-
debug
|
|
767
|
-
const r = options.loose ? re
|
|
760
|
+
debug("caret", comp, options);
|
|
761
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
768
762
|
const z = options.includePrerelease ? "-0" : "";
|
|
769
763
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
770
|
-
debug
|
|
764
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
771
765
|
let ret;
|
|
772
766
|
if (isX(M)) ret = "";
|
|
773
767
|
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
774
768
|
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
775
769
|
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
776
770
|
else if (pr) {
|
|
777
|
-
debug
|
|
771
|
+
debug("replaceCaret pr", pr);
|
|
778
772
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
779
773
|
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
780
774
|
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
781
775
|
} else {
|
|
782
|
-
debug
|
|
776
|
+
debug("no pr");
|
|
783
777
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
784
778
|
else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
785
779
|
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
786
780
|
}
|
|
787
|
-
debug
|
|
781
|
+
debug("caret return", ret);
|
|
788
782
|
return ret;
|
|
789
783
|
});
|
|
790
784
|
};
|
|
791
785
|
const replaceXRanges = (comp, options) => {
|
|
792
|
-
debug
|
|
786
|
+
debug("replaceXRanges", comp, options);
|
|
793
787
|
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
794
788
|
};
|
|
795
789
|
const replaceXRange = (comp, options) => {
|
|
796
790
|
comp = comp.trim();
|
|
797
|
-
const r = options.loose ? re
|
|
791
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
798
792
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
799
|
-
debug
|
|
793
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
800
794
|
const xM = isX(M);
|
|
801
795
|
const xm = xM || isX(m);
|
|
802
796
|
const xp = xm || isX(p);
|
|
@@ -827,17 +821,17 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
827
821
|
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
828
822
|
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
829
823
|
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
830
|
-
debug
|
|
824
|
+
debug("xRange return", ret);
|
|
831
825
|
return ret;
|
|
832
826
|
});
|
|
833
827
|
};
|
|
834
828
|
const replaceStars = (comp, options) => {
|
|
835
|
-
debug
|
|
836
|
-
return comp.trim().replace(re
|
|
829
|
+
debug("replaceStars", comp, options);
|
|
830
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
837
831
|
};
|
|
838
832
|
const replaceGTE0 = (comp, options) => {
|
|
839
|
-
debug
|
|
840
|
-
return comp.trim().replace(re
|
|
833
|
+
debug("replaceGTE0", comp, options);
|
|
834
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
841
835
|
};
|
|
842
836
|
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
843
837
|
if (isX(fM)) from = "";
|
|
@@ -857,8 +851,8 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
857
851
|
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
858
852
|
if (version.prerelease.length && !options.includePrerelease) {
|
|
859
853
|
for (let i = 0; i < set.length; i++) {
|
|
860
|
-
debug
|
|
861
|
-
if (set[i].semver === Comparator
|
|
854
|
+
debug(set[i].semver);
|
|
855
|
+
if (set[i].semver === Comparator.ANY) continue;
|
|
862
856
|
if (set[i].semver.prerelease.length > 0) {
|
|
863
857
|
const allowed = set[i].semver;
|
|
864
858
|
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
@@ -868,23 +862,23 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
868
862
|
}
|
|
869
863
|
return true;
|
|
870
864
|
};
|
|
871
|
-
})
|
|
872
|
-
var require_comparator = /* @__PURE__ */
|
|
873
|
-
const ANY
|
|
874
|
-
module
|
|
865
|
+
}));
|
|
866
|
+
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
867
|
+
const ANY = Symbol("SemVer ANY");
|
|
868
|
+
module.exports = class Comparator {
|
|
875
869
|
static get ANY() {
|
|
876
|
-
return ANY
|
|
870
|
+
return ANY;
|
|
877
871
|
}
|
|
878
872
|
constructor(comp, options) {
|
|
879
873
|
options = parseOptions(options);
|
|
880
|
-
if (comp instanceof Comparator
|
|
874
|
+
if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
|
|
881
875
|
else comp = comp.value;
|
|
882
876
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
883
877
|
debug("comparator", comp, options);
|
|
884
878
|
this.options = options;
|
|
885
879
|
this.loose = !!options.loose;
|
|
886
880
|
this.parse(comp);
|
|
887
|
-
if (this.semver === ANY
|
|
881
|
+
if (this.semver === ANY) this.value = "";
|
|
888
882
|
else this.value = this.operator + this.semver.version;
|
|
889
883
|
debug("comp", this);
|
|
890
884
|
}
|
|
@@ -894,30 +888,30 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
894
888
|
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
895
889
|
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
896
890
|
if (this.operator === "=") this.operator = "";
|
|
897
|
-
if (!m[2]) this.semver = ANY
|
|
898
|
-
else this.semver = new SemVer
|
|
891
|
+
if (!m[2]) this.semver = ANY;
|
|
892
|
+
else this.semver = new SemVer(m[2], this.options.loose);
|
|
899
893
|
}
|
|
900
894
|
toString() {
|
|
901
895
|
return this.value;
|
|
902
896
|
}
|
|
903
897
|
test(version) {
|
|
904
898
|
debug("Comparator.test", version, this.options.loose);
|
|
905
|
-
if (this.semver === ANY
|
|
899
|
+
if (this.semver === ANY || version === ANY) return true;
|
|
906
900
|
if (typeof version === "string") try {
|
|
907
|
-
version = new SemVer
|
|
901
|
+
version = new SemVer(version, this.options);
|
|
908
902
|
} catch (er) {
|
|
909
903
|
return false;
|
|
910
904
|
}
|
|
911
|
-
return cmp
|
|
905
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
912
906
|
}
|
|
913
907
|
intersects(comp, options) {
|
|
914
|
-
if (!(comp instanceof Comparator
|
|
908
|
+
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
915
909
|
if (this.operator === "") {
|
|
916
910
|
if (this.value === "") return true;
|
|
917
|
-
return new Range
|
|
911
|
+
return new Range(comp.value, options).test(this.value);
|
|
918
912
|
} else if (comp.operator === "") {
|
|
919
913
|
if (comp.value === "") return true;
|
|
920
|
-
return new Range
|
|
914
|
+
return new Range(this.value, options).test(comp.semver);
|
|
921
915
|
}
|
|
922
916
|
options = parseOptions(options);
|
|
923
917
|
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
@@ -925,44 +919,44 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
925
919
|
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
926
920
|
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
927
921
|
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
928
|
-
if (cmp
|
|
929
|
-
if (cmp
|
|
922
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
923
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
930
924
|
return false;
|
|
931
925
|
}
|
|
932
926
|
};
|
|
933
927
|
const parseOptions = require_parse_options();
|
|
934
928
|
const { safeRe: re, t } = require_re();
|
|
935
|
-
const cmp
|
|
929
|
+
const cmp = require_cmp();
|
|
936
930
|
const debug = require_debug();
|
|
937
|
-
const SemVer
|
|
938
|
-
const Range
|
|
939
|
-
})
|
|
940
|
-
var require_satisfies = /* @__PURE__ */
|
|
941
|
-
const Range
|
|
942
|
-
const satisfies
|
|
931
|
+
const SemVer = require_semver$1();
|
|
932
|
+
const Range = require_range();
|
|
933
|
+
}));
|
|
934
|
+
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
935
|
+
const Range = require_range();
|
|
936
|
+
const satisfies = (version, range, options) => {
|
|
943
937
|
try {
|
|
944
|
-
range = new Range
|
|
938
|
+
range = new Range(range, options);
|
|
945
939
|
} catch (er) {
|
|
946
940
|
return false;
|
|
947
941
|
}
|
|
948
942
|
return range.test(version);
|
|
949
943
|
};
|
|
950
|
-
module
|
|
951
|
-
})
|
|
952
|
-
var require_to_comparators = /* @__PURE__ */
|
|
953
|
-
const Range
|
|
954
|
-
const toComparators
|
|
955
|
-
module
|
|
956
|
-
})
|
|
957
|
-
var require_max_satisfying = /* @__PURE__ */
|
|
958
|
-
const SemVer
|
|
959
|
-
const Range
|
|
960
|
-
const maxSatisfying
|
|
944
|
+
module.exports = satisfies;
|
|
945
|
+
}));
|
|
946
|
+
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
947
|
+
const Range = require_range();
|
|
948
|
+
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
949
|
+
module.exports = toComparators;
|
|
950
|
+
}));
|
|
951
|
+
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
952
|
+
const SemVer = require_semver$1();
|
|
953
|
+
const Range = require_range();
|
|
954
|
+
const maxSatisfying = (versions, range, options) => {
|
|
961
955
|
let max = null;
|
|
962
956
|
let maxSV = null;
|
|
963
957
|
let rangeObj = null;
|
|
964
958
|
try {
|
|
965
|
-
rangeObj = new Range
|
|
959
|
+
rangeObj = new Range(range, options);
|
|
966
960
|
} catch (er) {
|
|
967
961
|
return null;
|
|
968
962
|
}
|
|
@@ -970,23 +964,23 @@ var require_max_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
970
964
|
if (rangeObj.test(v)) {
|
|
971
965
|
if (!max || maxSV.compare(v) === -1) {
|
|
972
966
|
max = v;
|
|
973
|
-
maxSV = new SemVer
|
|
967
|
+
maxSV = new SemVer(max, options);
|
|
974
968
|
}
|
|
975
969
|
}
|
|
976
970
|
});
|
|
977
971
|
return max;
|
|
978
972
|
};
|
|
979
|
-
module
|
|
980
|
-
})
|
|
981
|
-
var require_min_satisfying = /* @__PURE__ */
|
|
982
|
-
const SemVer
|
|
983
|
-
const Range
|
|
984
|
-
const minSatisfying
|
|
973
|
+
module.exports = maxSatisfying;
|
|
974
|
+
}));
|
|
975
|
+
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
976
|
+
const SemVer = require_semver$1();
|
|
977
|
+
const Range = require_range();
|
|
978
|
+
const minSatisfying = (versions, range, options) => {
|
|
985
979
|
let min = null;
|
|
986
980
|
let minSV = null;
|
|
987
981
|
let rangeObj = null;
|
|
988
982
|
try {
|
|
989
|
-
rangeObj = new Range
|
|
983
|
+
rangeObj = new Range(range, options);
|
|
990
984
|
} catch (er) {
|
|
991
985
|
return null;
|
|
992
986
|
}
|
|
@@ -994,30 +988,30 @@ var require_min_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
994
988
|
if (rangeObj.test(v)) {
|
|
995
989
|
if (!min || minSV.compare(v) === 1) {
|
|
996
990
|
min = v;
|
|
997
|
-
minSV = new SemVer
|
|
991
|
+
minSV = new SemVer(min, options);
|
|
998
992
|
}
|
|
999
993
|
}
|
|
1000
994
|
});
|
|
1001
995
|
return min;
|
|
1002
996
|
};
|
|
1003
|
-
module
|
|
1004
|
-
})
|
|
1005
|
-
var require_min_version = /* @__PURE__ */
|
|
1006
|
-
const SemVer
|
|
1007
|
-
const Range
|
|
1008
|
-
const gt
|
|
1009
|
-
const minVersion
|
|
1010
|
-
range = new Range
|
|
1011
|
-
let minver = new SemVer
|
|
997
|
+
module.exports = minSatisfying;
|
|
998
|
+
}));
|
|
999
|
+
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1000
|
+
const SemVer = require_semver$1();
|
|
1001
|
+
const Range = require_range();
|
|
1002
|
+
const gt = require_gt();
|
|
1003
|
+
const minVersion = (range, loose) => {
|
|
1004
|
+
range = new Range(range, loose);
|
|
1005
|
+
let minver = new SemVer("0.0.0");
|
|
1012
1006
|
if (range.test(minver)) return minver;
|
|
1013
|
-
minver = new SemVer
|
|
1007
|
+
minver = new SemVer("0.0.0-0");
|
|
1014
1008
|
if (range.test(minver)) return minver;
|
|
1015
1009
|
minver = null;
|
|
1016
1010
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1017
1011
|
const comparators = range.set[i];
|
|
1018
1012
|
let setMin = null;
|
|
1019
1013
|
comparators.forEach((comparator) => {
|
|
1020
|
-
const compver = new SemVer
|
|
1014
|
+
const compver = new SemVer(comparator.semver.version);
|
|
1021
1015
|
switch (comparator.operator) {
|
|
1022
1016
|
case ">":
|
|
1023
1017
|
if (compver.prerelease.length === 0) compver.patch++;
|
|
@@ -1025,69 +1019,69 @@ var require_min_version = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
1025
1019
|
compver.raw = compver.format();
|
|
1026
1020
|
case "":
|
|
1027
1021
|
case ">=":
|
|
1028
|
-
if (!setMin || gt
|
|
1022
|
+
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
1029
1023
|
break;
|
|
1030
1024
|
case "<":
|
|
1031
1025
|
case "<=": break;
|
|
1032
1026
|
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1033
1027
|
}
|
|
1034
1028
|
});
|
|
1035
|
-
if (setMin && (!minver || gt
|
|
1029
|
+
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
1036
1030
|
}
|
|
1037
1031
|
if (minver && range.test(minver)) return minver;
|
|
1038
1032
|
return null;
|
|
1039
1033
|
};
|
|
1040
|
-
module
|
|
1041
|
-
})
|
|
1042
|
-
var require_valid = /* @__PURE__ */
|
|
1043
|
-
const Range
|
|
1044
|
-
const validRange
|
|
1034
|
+
module.exports = minVersion;
|
|
1035
|
+
}));
|
|
1036
|
+
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1037
|
+
const Range = require_range();
|
|
1038
|
+
const validRange = (range, options) => {
|
|
1045
1039
|
try {
|
|
1046
|
-
return new Range
|
|
1040
|
+
return new Range(range, options).range || "*";
|
|
1047
1041
|
} catch (er) {
|
|
1048
1042
|
return null;
|
|
1049
1043
|
}
|
|
1050
1044
|
};
|
|
1051
|
-
module
|
|
1052
|
-
})
|
|
1053
|
-
var require_outside = /* @__PURE__ */
|
|
1054
|
-
const SemVer
|
|
1055
|
-
const Comparator
|
|
1056
|
-
const { ANY
|
|
1057
|
-
const Range
|
|
1058
|
-
const satisfies
|
|
1059
|
-
const gt
|
|
1060
|
-
const lt
|
|
1061
|
-
const lte
|
|
1062
|
-
const gte
|
|
1063
|
-
const outside
|
|
1064
|
-
version = new SemVer
|
|
1065
|
-
range = new Range
|
|
1045
|
+
module.exports = validRange;
|
|
1046
|
+
}));
|
|
1047
|
+
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1048
|
+
const SemVer = require_semver$1();
|
|
1049
|
+
const Comparator = require_comparator();
|
|
1050
|
+
const { ANY } = Comparator;
|
|
1051
|
+
const Range = require_range();
|
|
1052
|
+
const satisfies = require_satisfies();
|
|
1053
|
+
const gt = require_gt();
|
|
1054
|
+
const lt = require_lt();
|
|
1055
|
+
const lte = require_lte();
|
|
1056
|
+
const gte = require_gte();
|
|
1057
|
+
const outside = (version, range, hilo, options) => {
|
|
1058
|
+
version = new SemVer(version, options);
|
|
1059
|
+
range = new Range(range, options);
|
|
1066
1060
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1067
1061
|
switch (hilo) {
|
|
1068
1062
|
case ">":
|
|
1069
|
-
gtfn = gt
|
|
1070
|
-
ltefn = lte
|
|
1071
|
-
ltfn = lt
|
|
1063
|
+
gtfn = gt;
|
|
1064
|
+
ltefn = lte;
|
|
1065
|
+
ltfn = lt;
|
|
1072
1066
|
comp = ">";
|
|
1073
1067
|
ecomp = ">=";
|
|
1074
1068
|
break;
|
|
1075
1069
|
case "<":
|
|
1076
|
-
gtfn = lt
|
|
1077
|
-
ltefn = gte
|
|
1078
|
-
ltfn = gt
|
|
1070
|
+
gtfn = lt;
|
|
1071
|
+
ltefn = gte;
|
|
1072
|
+
ltfn = gt;
|
|
1079
1073
|
comp = "<";
|
|
1080
1074
|
ecomp = "<=";
|
|
1081
1075
|
break;
|
|
1082
1076
|
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1083
1077
|
}
|
|
1084
|
-
if (satisfies
|
|
1078
|
+
if (satisfies(version, range, options)) return false;
|
|
1085
1079
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1086
1080
|
const comparators = range.set[i];
|
|
1087
1081
|
let high = null;
|
|
1088
1082
|
let low = null;
|
|
1089
1083
|
comparators.forEach((comparator) => {
|
|
1090
|
-
if (comparator.semver === ANY
|
|
1084
|
+
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
1091
1085
|
high = high || comparator;
|
|
1092
1086
|
low = low || comparator;
|
|
1093
1087
|
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
@@ -1099,36 +1093,36 @@ var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sem
|
|
|
1099
1093
|
}
|
|
1100
1094
|
return true;
|
|
1101
1095
|
};
|
|
1102
|
-
module
|
|
1103
|
-
})
|
|
1104
|
-
var require_gtr = /* @__PURE__ */
|
|
1105
|
-
const outside
|
|
1106
|
-
const gtr
|
|
1107
|
-
module
|
|
1108
|
-
})
|
|
1109
|
-
var require_ltr = /* @__PURE__ */
|
|
1110
|
-
const outside
|
|
1111
|
-
const ltr
|
|
1112
|
-
module
|
|
1113
|
-
})
|
|
1114
|
-
var require_intersects = /* @__PURE__ */
|
|
1115
|
-
const Range
|
|
1116
|
-
const intersects
|
|
1117
|
-
r1 = new Range
|
|
1118
|
-
r2 = new Range
|
|
1096
|
+
module.exports = outside;
|
|
1097
|
+
}));
|
|
1098
|
+
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1099
|
+
const outside = require_outside();
|
|
1100
|
+
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1101
|
+
module.exports = gtr;
|
|
1102
|
+
}));
|
|
1103
|
+
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1104
|
+
const outside = require_outside();
|
|
1105
|
+
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1106
|
+
module.exports = ltr;
|
|
1107
|
+
}));
|
|
1108
|
+
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1109
|
+
const Range = require_range();
|
|
1110
|
+
const intersects = (r1, r2, options) => {
|
|
1111
|
+
r1 = new Range(r1, options);
|
|
1112
|
+
r2 = new Range(r2, options);
|
|
1119
1113
|
return r1.intersects(r2, options);
|
|
1120
1114
|
};
|
|
1121
|
-
module
|
|
1122
|
-
})
|
|
1123
|
-
var require_simplify = /* @__PURE__ */
|
|
1124
|
-
const satisfies
|
|
1125
|
-
const compare
|
|
1126
|
-
module
|
|
1115
|
+
module.exports = intersects;
|
|
1116
|
+
}));
|
|
1117
|
+
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1118
|
+
const satisfies = require_satisfies();
|
|
1119
|
+
const compare = require_compare();
|
|
1120
|
+
module.exports = (versions, range, options) => {
|
|
1127
1121
|
const set = [];
|
|
1128
1122
|
let first = null;
|
|
1129
1123
|
let prev = null;
|
|
1130
|
-
const v = versions.sort((a, b) => compare
|
|
1131
|
-
for (const version of v) if (satisfies
|
|
1124
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1125
|
+
for (const version of v) if (satisfies(version, range, options)) {
|
|
1132
1126
|
prev = version;
|
|
1133
1127
|
if (!first) first = version;
|
|
1134
1128
|
} else {
|
|
@@ -1147,17 +1141,17 @@ var require_simplify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
1147
1141
|
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1148
1142
|
return simplified.length < original.length ? simplified : range;
|
|
1149
1143
|
};
|
|
1150
|
-
})
|
|
1151
|
-
var require_subset = /* @__PURE__ */
|
|
1152
|
-
const Range
|
|
1153
|
-
const Comparator
|
|
1154
|
-
const { ANY } = Comparator
|
|
1155
|
-
const satisfies
|
|
1156
|
-
const compare
|
|
1157
|
-
const subset
|
|
1144
|
+
}));
|
|
1145
|
+
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1146
|
+
const Range = require_range();
|
|
1147
|
+
const Comparator = require_comparator();
|
|
1148
|
+
const { ANY } = Comparator;
|
|
1149
|
+
const satisfies = require_satisfies();
|
|
1150
|
+
const compare = require_compare();
|
|
1151
|
+
const subset = (sub, dom, options = {}) => {
|
|
1158
1152
|
if (sub === dom) return true;
|
|
1159
|
-
sub = new Range
|
|
1160
|
-
dom = new Range
|
|
1153
|
+
sub = new Range(sub, options);
|
|
1154
|
+
dom = new Range(dom, options);
|
|
1161
1155
|
let sawNonNull = false;
|
|
1162
1156
|
OUTER: for (const simpleSub of sub.set) {
|
|
1163
1157
|
for (const simpleDom of dom.set) {
|
|
@@ -1169,8 +1163,8 @@ var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
1169
1163
|
}
|
|
1170
1164
|
return true;
|
|
1171
1165
|
};
|
|
1172
|
-
const minimumVersionWithPreRelease = [new Comparator
|
|
1173
|
-
const minimumVersion = [new Comparator
|
|
1166
|
+
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1167
|
+
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
1174
1168
|
const simpleSubset = (sub, dom, options) => {
|
|
1175
1169
|
if (sub === dom) return true;
|
|
1176
1170
|
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
@@ -1179,74 +1173,74 @@ var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
1179
1173
|
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1180
1174
|
else dom = minimumVersion;
|
|
1181
1175
|
const eqSet = /* @__PURE__ */ new Set();
|
|
1182
|
-
let gt
|
|
1183
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt
|
|
1184
|
-
else if (c.operator === "<" || c.operator === "<=") lt
|
|
1176
|
+
let gt, lt;
|
|
1177
|
+
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
1178
|
+
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
1185
1179
|
else eqSet.add(c.semver);
|
|
1186
1180
|
if (eqSet.size > 1) return null;
|
|
1187
1181
|
let gtltComp;
|
|
1188
|
-
if (gt
|
|
1189
|
-
gtltComp = compare
|
|
1182
|
+
if (gt && lt) {
|
|
1183
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1190
1184
|
if (gtltComp > 0) return null;
|
|
1191
|
-
else if (gtltComp === 0 && (gt
|
|
1185
|
+
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
1192
1186
|
}
|
|
1193
|
-
for (const eq
|
|
1194
|
-
if (gt
|
|
1195
|
-
if (lt
|
|
1196
|
-
for (const c of dom) if (!satisfies
|
|
1187
|
+
for (const eq of eqSet) {
|
|
1188
|
+
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
1189
|
+
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
1190
|
+
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
1197
1191
|
return true;
|
|
1198
1192
|
}
|
|
1199
1193
|
let higher, lower;
|
|
1200
1194
|
let hasDomLT, hasDomGT;
|
|
1201
|
-
let needDomLTPre = lt
|
|
1202
|
-
let needDomGTPre = gt
|
|
1203
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt
|
|
1195
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1196
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1197
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1204
1198
|
for (const c of dom) {
|
|
1205
1199
|
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1206
1200
|
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1207
|
-
if (gt
|
|
1201
|
+
if (gt) {
|
|
1208
1202
|
if (needDomGTPre) {
|
|
1209
1203
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
1210
1204
|
}
|
|
1211
1205
|
if (c.operator === ">" || c.operator === ">=") {
|
|
1212
|
-
higher = higherGT(gt
|
|
1213
|
-
if (higher === c && higher !== gt
|
|
1214
|
-
} else if (gt
|
|
1206
|
+
higher = higherGT(gt, c, options);
|
|
1207
|
+
if (higher === c && higher !== gt) return false;
|
|
1208
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
|
|
1215
1209
|
}
|
|
1216
|
-
if (lt
|
|
1210
|
+
if (lt) {
|
|
1217
1211
|
if (needDomLTPre) {
|
|
1218
1212
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
1219
1213
|
}
|
|
1220
1214
|
if (c.operator === "<" || c.operator === "<=") {
|
|
1221
|
-
lower = lowerLT(lt
|
|
1222
|
-
if (lower === c && lower !== lt
|
|
1223
|
-
} else if (lt
|
|
1215
|
+
lower = lowerLT(lt, c, options);
|
|
1216
|
+
if (lower === c && lower !== lt) return false;
|
|
1217
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
|
|
1224
1218
|
}
|
|
1225
|
-
if (!c.operator && (lt
|
|
1219
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
1226
1220
|
}
|
|
1227
|
-
if (gt
|
|
1228
|
-
if (lt
|
|
1221
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
1222
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
1229
1223
|
if (needDomGTPre || needDomLTPre) return false;
|
|
1230
1224
|
return true;
|
|
1231
1225
|
};
|
|
1232
1226
|
const higherGT = (a, b, options) => {
|
|
1233
1227
|
if (!a) return b;
|
|
1234
|
-
const comp = compare
|
|
1228
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1235
1229
|
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1236
1230
|
};
|
|
1237
1231
|
const lowerLT = (a, b, options) => {
|
|
1238
1232
|
if (!a) return b;
|
|
1239
|
-
const comp = compare
|
|
1233
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1240
1234
|
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1241
1235
|
};
|
|
1242
|
-
module
|
|
1243
|
-
})
|
|
1244
|
-
var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */
|
|
1236
|
+
module.exports = subset;
|
|
1237
|
+
}));
|
|
1238
|
+
var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1245
1239
|
const internalRe = require_re();
|
|
1246
1240
|
const constants = require_constants();
|
|
1247
1241
|
const SemVer = require_semver$1();
|
|
1248
1242
|
const identifiers = require_identifiers();
|
|
1249
|
-
module
|
|
1243
|
+
module.exports = {
|
|
1250
1244
|
parse: require_parse(),
|
|
1251
1245
|
valid: require_valid$1(),
|
|
1252
1246
|
clean: require_clean(),
|
|
@@ -1293,7 +1287,7 @@ var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJS({ "../..
|
|
|
1293
1287
|
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1294
1288
|
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1295
1289
|
};
|
|
1296
|
-
})
|
|
1290
|
+
})))(), 1);
|
|
1297
1291
|
const semverSatisfies = (targetAppVersion, currentVersion) => {
|
|
1298
1292
|
const currentCoerce = import_semver.default.coerce(currentVersion);
|
|
1299
1293
|
if (!currentCoerce) return false;
|
|
@@ -1310,14 +1304,11 @@ const semverSatisfies = (targetAppVersion, currentVersion) => {
|
|
|
1310
1304
|
const filterCompatibleAppVersions = (targetAppVersionList, currentVersion) => {
|
|
1311
1305
|
return targetAppVersionList.filter((version) => semverSatisfies(version, currentVersion)).sort((a, b) => b.localeCompare(a));
|
|
1312
1306
|
};
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
const week = day * 7;
|
|
1319
|
-
const year = day * 365.25;
|
|
1320
|
-
|
|
1307
|
+
new TextEncoder();
|
|
1308
|
+
new TextDecoder();
|
|
1309
|
+
const day = 3600 * 24;
|
|
1310
|
+
day * 7;
|
|
1311
|
+
day * 365.25;
|
|
1321
1312
|
//#endregion
|
|
1322
1313
|
//#region ../../node_modules/.pnpm/map-obj@5.0.0/node_modules/map-obj/index.js
|
|
1323
1314
|
const isObject$1 = (value) => typeof value === "object" && value !== null;
|
|
@@ -1349,7 +1340,6 @@ function mapObject(object, mapper, options) {
|
|
|
1349
1340
|
if (!isObject$1(object)) throw new TypeError(`Expected an object, got \`${object}\` (${typeof object})`);
|
|
1350
1341
|
return _mapObject(object, mapper, options);
|
|
1351
1342
|
}
|
|
1352
|
-
|
|
1353
1343
|
//#endregion
|
|
1354
1344
|
//#region ../../node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.js
|
|
1355
1345
|
const UPPERCASE = /[\p{Lu}]/u;
|
|
@@ -1357,10 +1347,10 @@ const LOWERCASE = /[\p{Ll}]/u;
|
|
|
1357
1347
|
const LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
|
1358
1348
|
const IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
|
1359
1349
|
const SEPARATORS = /[_.\- ]+/;
|
|
1360
|
-
const LEADING_SEPARATORS =
|
|
1350
|
+
const LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
|
|
1361
1351
|
const SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
|
1362
1352
|
const NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
|
1363
|
-
const preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase
|
|
1353
|
+
const preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {
|
|
1364
1354
|
let isLastCharLower = false;
|
|
1365
1355
|
let isLastCharUpper = false;
|
|
1366
1356
|
let isLastLastCharUpper = false;
|
|
@@ -1374,7 +1364,7 @@ const preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutive
|
|
|
1374
1364
|
isLastLastCharUpper = isLastCharUpper;
|
|
1375
1365
|
isLastCharUpper = true;
|
|
1376
1366
|
index++;
|
|
1377
|
-
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase
|
|
1367
|
+
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {
|
|
1378
1368
|
string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
|
|
1379
1369
|
isLastLastCharUpper = isLastCharUpper;
|
|
1380
1370
|
isLastCharUpper = false;
|
|
@@ -1418,7 +1408,6 @@ function camelCase(input, options) {
|
|
|
1418
1408
|
if (options.pascalCase) input = toUpperCase(input.charAt(0)) + input.slice(1);
|
|
1419
1409
|
return postProcess(input, toUpperCase);
|
|
1420
1410
|
}
|
|
1421
|
-
|
|
1422
1411
|
//#endregion
|
|
1423
1412
|
//#region ../../node_modules/.pnpm/quick-lru@6.1.2/node_modules/quick-lru/index.js
|
|
1424
1413
|
var QuickLRU = class extends Map {
|
|
@@ -1433,9 +1422,9 @@ var QuickLRU = class extends Map {
|
|
|
1433
1422
|
this.oldCache = /* @__PURE__ */ new Map();
|
|
1434
1423
|
this._size = 0;
|
|
1435
1424
|
}
|
|
1436
|
-
_emitEvictions(cache
|
|
1425
|
+
_emitEvictions(cache) {
|
|
1437
1426
|
if (typeof this.onEviction !== "function") return;
|
|
1438
|
-
for (const [key, item] of cache
|
|
1427
|
+
for (const [key, item] of cache) this.onEviction(key, item.value);
|
|
1439
1428
|
}
|
|
1440
1429
|
_deleteIfExpired(key, item) {
|
|
1441
1430
|
if (typeof item.expiry === "number" && item.expiry <= Date.now()) {
|
|
@@ -1450,8 +1439,8 @@ var QuickLRU = class extends Map {
|
|
|
1450
1439
|
_getItemValue(key, item) {
|
|
1451
1440
|
return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
|
|
1452
1441
|
}
|
|
1453
|
-
_peek(key, cache
|
|
1454
|
-
const item = cache
|
|
1442
|
+
_peek(key, cache) {
|
|
1443
|
+
const item = cache.get(key);
|
|
1455
1444
|
return this._getItemValue(key, item);
|
|
1456
1445
|
}
|
|
1457
1446
|
_set(key, value) {
|
|
@@ -1591,7 +1580,6 @@ var QuickLRU = class extends Map {
|
|
|
1591
1580
|
return JSON.stringify([...this.entriesAscending()]);
|
|
1592
1581
|
}
|
|
1593
1582
|
};
|
|
1594
|
-
|
|
1595
1583
|
//#endregion
|
|
1596
1584
|
//#region ../../node_modules/.pnpm/camelcase-keys@9.1.3/node_modules/camelcase-keys/index.js
|
|
1597
1585
|
const has = (array, key) => array.some((element) => {
|
|
@@ -1603,7 +1591,7 @@ const cache = new QuickLRU({ maxSize: 1e5 });
|
|
|
1603
1591
|
const isObject = (value) => typeof value === "object" && value !== null && !(value instanceof RegExp) && !(value instanceof Error) && !(value instanceof Date);
|
|
1604
1592
|
const transform = (input, options = {}) => {
|
|
1605
1593
|
if (!isObject(input)) return input;
|
|
1606
|
-
const { exclude, pascalCase = false, stopPaths, deep = false, preserveConsecutiveUppercase
|
|
1594
|
+
const { exclude, pascalCase = false, stopPaths, deep = false, preserveConsecutiveUppercase = false } = options;
|
|
1607
1595
|
const stopPathsSet = new Set(stopPaths);
|
|
1608
1596
|
const makeMapper = (parentPath) => (key, value) => {
|
|
1609
1597
|
if (deep && isObject(value)) {
|
|
@@ -1617,7 +1605,7 @@ const transform = (input, options = {}) => {
|
|
|
1617
1605
|
const returnValue = camelCase(key, {
|
|
1618
1606
|
pascalCase,
|
|
1619
1607
|
locale: false,
|
|
1620
|
-
preserveConsecutiveUppercase
|
|
1608
|
+
preserveConsecutiveUppercase
|
|
1621
1609
|
});
|
|
1622
1610
|
if (key.length < 100) cache.set(cacheKey, returnValue);
|
|
1623
1611
|
key = returnValue;
|
|
@@ -1631,12 +1619,11 @@ function camelcaseKeys(input, options) {
|
|
|
1631
1619
|
if (Array.isArray(input)) return Object.keys(input).map((key) => transform(input[key], options));
|
|
1632
1620
|
return transform(input, options);
|
|
1633
1621
|
}
|
|
1634
|
-
|
|
1635
1622
|
//#endregion
|
|
1636
1623
|
//#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/utils.js
|
|
1637
|
-
var require_utils = /* @__PURE__ */
|
|
1624
|
+
var require_utils = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1638
1625
|
const { inspect } = __require("util");
|
|
1639
|
-
function getIndexPos
|
|
1626
|
+
function getIndexPos(text, index) {
|
|
1640
1627
|
let lineIdx = 0, colIdx = index, pos = 0;
|
|
1641
1628
|
do {
|
|
1642
1629
|
pos = text.indexOf("\n", pos);
|
|
@@ -1650,31 +1637,30 @@ var require_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/pg-
|
|
|
1650
1637
|
column: colIdx + 1
|
|
1651
1638
|
};
|
|
1652
1639
|
}
|
|
1653
|
-
function messageGap
|
|
1640
|
+
function messageGap(level) {
|
|
1654
1641
|
return " ".repeat(level * 4);
|
|
1655
1642
|
}
|
|
1656
|
-
function addInspection
|
|
1643
|
+
function addInspection(type, cb) {
|
|
1657
1644
|
type[inspect.custom] = cb;
|
|
1658
1645
|
}
|
|
1659
1646
|
module.exports = {
|
|
1660
|
-
getIndexPos
|
|
1661
|
-
messageGap
|
|
1662
|
-
addInspection
|
|
1647
|
+
getIndexPos,
|
|
1648
|
+
messageGap,
|
|
1649
|
+
addInspection
|
|
1663
1650
|
};
|
|
1664
|
-
})
|
|
1665
|
-
|
|
1651
|
+
}));
|
|
1666
1652
|
//#endregion
|
|
1667
1653
|
//#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/error.js
|
|
1668
|
-
var require_error = /* @__PURE__ */
|
|
1654
|
+
var require_error = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1669
1655
|
const { EOL } = __require("os");
|
|
1670
1656
|
const { addInspection, messageGap } = require_utils();
|
|
1671
|
-
const parsingErrorCode
|
|
1657
|
+
const parsingErrorCode = {
|
|
1672
1658
|
unclosedMLC: 0,
|
|
1673
1659
|
unclosedText: 1,
|
|
1674
1660
|
unclosedQI: 2,
|
|
1675
1661
|
multiLineQI: 3
|
|
1676
1662
|
};
|
|
1677
|
-
Object.freeze(parsingErrorCode
|
|
1663
|
+
Object.freeze(parsingErrorCode);
|
|
1678
1664
|
const errorMessages = [
|
|
1679
1665
|
{
|
|
1680
1666
|
name: "unclosedMLC",
|
|
@@ -1693,7 +1679,7 @@ var require_error = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/pg-
|
|
|
1693
1679
|
message: "Multi-line quoted identifiers are not supported."
|
|
1694
1680
|
}
|
|
1695
1681
|
];
|
|
1696
|
-
var SQLParsingError
|
|
1682
|
+
var SQLParsingError = class extends Error {
|
|
1697
1683
|
constructor(code, position) {
|
|
1698
1684
|
const err = errorMessages[code].message;
|
|
1699
1685
|
const message = `Error parsing SQL at {line:${position.line},col:${position.column}}: ${err}`;
|
|
@@ -1705,7 +1691,7 @@ var require_error = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/pg-
|
|
|
1705
1691
|
Error.captureStackTrace(this, this.constructor);
|
|
1706
1692
|
}
|
|
1707
1693
|
};
|
|
1708
|
-
SQLParsingError
|
|
1694
|
+
SQLParsingError.prototype.toString = function(level) {
|
|
1709
1695
|
level = level > 0 ? parseInt(level) : 0;
|
|
1710
1696
|
const gap = messageGap(level + 1);
|
|
1711
1697
|
return [
|
|
@@ -1716,22 +1702,21 @@ var require_error = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/pg-
|
|
|
1716
1702
|
`${messageGap(level)}}`
|
|
1717
1703
|
].join(EOL);
|
|
1718
1704
|
};
|
|
1719
|
-
addInspection(SQLParsingError
|
|
1705
|
+
addInspection(SQLParsingError.prototype, function() {
|
|
1720
1706
|
return this.toString();
|
|
1721
1707
|
});
|
|
1722
1708
|
module.exports = {
|
|
1723
|
-
SQLParsingError
|
|
1724
|
-
parsingErrorCode
|
|
1709
|
+
SQLParsingError,
|
|
1710
|
+
parsingErrorCode
|
|
1725
1711
|
};
|
|
1726
|
-
})
|
|
1727
|
-
|
|
1712
|
+
}));
|
|
1728
1713
|
//#endregion
|
|
1729
1714
|
//#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/parser.js
|
|
1730
|
-
var require_parser = /* @__PURE__ */
|
|
1715
|
+
var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1731
1716
|
const { parsingErrorCode, SQLParsingError } = require_error();
|
|
1732
1717
|
const { getIndexPos } = require_utils();
|
|
1733
1718
|
const compressors = ".,;:()[]=<>+-*/|!?@#";
|
|
1734
|
-
function minify
|
|
1719
|
+
function minify(sql, options) {
|
|
1735
1720
|
if (typeof sql !== "string") throw new TypeError("Input SQL must be a text string.");
|
|
1736
1721
|
if (!sql.length) return "";
|
|
1737
1722
|
sql = sql.replace(/\r\n/g, "\n");
|
|
@@ -1855,23 +1840,18 @@ var require_parser = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/pg
|
|
|
1855
1840
|
function isGap(s) {
|
|
1856
1841
|
return s === " " || s === " " || s === "\r" || s === "\n";
|
|
1857
1842
|
}
|
|
1858
|
-
module.exports = minify
|
|
1859
|
-
})
|
|
1860
|
-
|
|
1843
|
+
module.exports = minify;
|
|
1844
|
+
}));
|
|
1861
1845
|
//#endregion
|
|
1862
|
-
//#region
|
|
1863
|
-
var
|
|
1846
|
+
//#region src/getUpdateInfo.ts
|
|
1847
|
+
var import_lib = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
1864
1848
|
const parser = require_parser();
|
|
1865
1849
|
const error = require_error();
|
|
1866
1850
|
parser.SQLParsingError = error.SQLParsingError;
|
|
1867
1851
|
parser.parsingErrorCode = error.parsingErrorCode;
|
|
1868
1852
|
module.exports = parser;
|
|
1869
|
-
})
|
|
1870
|
-
|
|
1871
|
-
//#endregion
|
|
1872
|
-
//#region src/getUpdateInfo.ts
|
|
1873
|
-
var import_lib = /* @__PURE__ */ __toESM$1(require_lib(), 1);
|
|
1874
|
-
const appVersionStrategy = async (pool, { platform, appVersion, bundleId, minBundleId = NIL_UUID, channel = "production" }) => {
|
|
1853
|
+
})))(), 1);
|
|
1854
|
+
const appVersionStrategy = async (pool, { platform, appVersion, bundleId, minBundleId = NIL_UUID, channel = "production", cohort }) => {
|
|
1875
1855
|
const sqlGetTargetAppVersionList = (0, import_lib.default)(`
|
|
1876
1856
|
SELECT target_app_version
|
|
1877
1857
|
FROM get_target_app_version_list($1, $2);
|
|
@@ -1880,13 +1860,14 @@ const appVersionStrategy = async (pool, { platform, appVersion, bundleId, minBun
|
|
|
1880
1860
|
const targetAppVersionList = filterCompatibleAppVersions(appVersionList?.map((group) => group.target_app_version) ?? [], appVersion);
|
|
1881
1861
|
const sqlGetUpdateInfo = (0, import_lib.default)(`
|
|
1882
1862
|
SELECT *
|
|
1883
|
-
FROM
|
|
1863
|
+
FROM get_update_info_by_app_version(
|
|
1884
1864
|
$1, -- platform
|
|
1885
1865
|
$2, -- appVersion
|
|
1886
1866
|
$3, -- bundleId
|
|
1887
1867
|
$4, -- minBundleId (nullable)
|
|
1888
1868
|
$5, -- channel
|
|
1889
|
-
$6 -- targetAppVersionList (text array)
|
|
1869
|
+
$6, -- targetAppVersionList (text array)
|
|
1870
|
+
$7 -- cohort (nullable)
|
|
1890
1871
|
);
|
|
1891
1872
|
`);
|
|
1892
1873
|
const result = await pool.query(sqlGetUpdateInfo, [
|
|
@@ -1895,7 +1876,8 @@ const appVersionStrategy = async (pool, { platform, appVersion, bundleId, minBun
|
|
|
1895
1876
|
bundleId,
|
|
1896
1877
|
minBundleId ?? NIL_UUID,
|
|
1897
1878
|
channel,
|
|
1898
|
-
targetAppVersionList
|
|
1879
|
+
targetAppVersionList,
|
|
1880
|
+
cohort ?? null
|
|
1899
1881
|
]);
|
|
1900
1882
|
return result.rows[0] ? camelcaseKeys(result.rows[0]) : null;
|
|
1901
1883
|
};
|
|
@@ -1903,7 +1885,6 @@ const getUpdateInfo = (pool, args) => {
|
|
|
1903
1885
|
if (args._updateStrategy === "appVersion") return appVersionStrategy(pool, args);
|
|
1904
1886
|
return null;
|
|
1905
1887
|
};
|
|
1906
|
-
|
|
1907
1888
|
//#endregion
|
|
1908
1889
|
//#region src/postgres.ts
|
|
1909
1890
|
const postgres = createDatabasePlugin({
|
|
@@ -1934,14 +1915,36 @@ const postgres = createDatabasePlugin({
|
|
|
1934
1915
|
};
|
|
1935
1916
|
},
|
|
1936
1917
|
async getBundles(options) {
|
|
1937
|
-
const { where, limit, offset } = options ?? {};
|
|
1918
|
+
const { where, limit, offset, orderBy } = options ?? {};
|
|
1938
1919
|
let countQuery = db.selectFrom("bundles");
|
|
1939
1920
|
if (where?.channel) countQuery = countQuery.where("channel", "=", where.channel);
|
|
1940
1921
|
if (where?.platform) countQuery = countQuery.where("platform", "=", where.platform);
|
|
1922
|
+
if (where?.enabled !== void 0) countQuery = countQuery.where("enabled", "=", where.enabled);
|
|
1923
|
+
if (where?.fingerprintHash !== void 0) countQuery = where.fingerprintHash === null ? countQuery.where("fingerprint_hash", "is", null) : countQuery.where("fingerprint_hash", "=", where.fingerprintHash);
|
|
1924
|
+
if (where?.targetAppVersion !== void 0) countQuery = where.targetAppVersion === null ? countQuery.where("target_app_version", "is", null) : countQuery.where("target_app_version", "=", where.targetAppVersion);
|
|
1925
|
+
if (where?.targetAppVersionIn) countQuery = countQuery.where("target_app_version", "in", where.targetAppVersionIn);
|
|
1926
|
+
if (where?.targetAppVersionNotNull) countQuery = countQuery.where("target_app_version", "is not", null);
|
|
1927
|
+
if (where?.id?.eq) countQuery = countQuery.where("id", "=", where.id.eq);
|
|
1928
|
+
if (where?.id?.gt) countQuery = countQuery.where("id", ">", where.id.gt);
|
|
1929
|
+
if (where?.id?.gte) countQuery = countQuery.where("id", ">=", where.id.gte);
|
|
1930
|
+
if (where?.id?.lt) countQuery = countQuery.where("id", "<", where.id.lt);
|
|
1931
|
+
if (where?.id?.lte) countQuery = countQuery.where("id", "<=", where.id.lte);
|
|
1932
|
+
if (where?.id?.in) countQuery = countQuery.where("id", "in", where.id.in);
|
|
1941
1933
|
const total = (await countQuery.select(db.fn.count("id").as("total")).executeTakeFirst())?.total || 0;
|
|
1942
|
-
let query = db.selectFrom("bundles").orderBy("id", "desc");
|
|
1934
|
+
let query = db.selectFrom("bundles").orderBy("id", orderBy?.direction === "asc" ? "asc" : "desc");
|
|
1943
1935
|
if (where?.channel) query = query.where("channel", "=", where.channel);
|
|
1944
1936
|
if (where?.platform) query = query.where("platform", "=", where.platform);
|
|
1937
|
+
if (where?.enabled !== void 0) query = query.where("enabled", "=", where.enabled);
|
|
1938
|
+
if (where?.fingerprintHash !== void 0) query = where.fingerprintHash === null ? query.where("fingerprint_hash", "is", null) : query.where("fingerprint_hash", "=", where.fingerprintHash);
|
|
1939
|
+
if (where?.targetAppVersion !== void 0) query = where.targetAppVersion === null ? query.where("target_app_version", "is", null) : query.where("target_app_version", "=", where.targetAppVersion);
|
|
1940
|
+
if (where?.targetAppVersionIn) query = query.where("target_app_version", "in", where.targetAppVersionIn);
|
|
1941
|
+
if (where?.targetAppVersionNotNull) query = query.where("target_app_version", "is not", null);
|
|
1942
|
+
if (where?.id?.eq) query = query.where("id", "=", where.id.eq);
|
|
1943
|
+
if (where?.id?.gt) query = query.where("id", ">", where.id.gt);
|
|
1944
|
+
if (where?.id?.gte) query = query.where("id", ">=", where.id.gte);
|
|
1945
|
+
if (where?.id?.lt) query = query.where("id", "<", where.id.lt);
|
|
1946
|
+
if (where?.id?.lte) query = query.where("id", "<=", where.id.lte);
|
|
1947
|
+
if (where?.id?.in) query = query.where("id", "in", where.id.in);
|
|
1945
1948
|
if (limit) query = query.limit(limit);
|
|
1946
1949
|
if (offset) query = query.offset(offset);
|
|
1947
1950
|
return {
|
|
@@ -2004,6 +2007,5 @@ const postgres = createDatabasePlugin({
|
|
|
2004
2007
|
};
|
|
2005
2008
|
}
|
|
2006
2009
|
});
|
|
2007
|
-
|
|
2008
2010
|
//#endregion
|
|
2009
|
-
export { appVersionStrategy, getUpdateInfo, postgres };
|
|
2011
|
+
export { appVersionStrategy, getUpdateInfo, postgres };
|