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