flowdular 0.3.2 → 0.4.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/distribution.js +453 -1972
- package/dist/index.js +741 -2009
- package/package.json +2 -2
package/dist/distribution.js
CHANGED
|
@@ -1,1963 +1,3 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
try {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
} catch (e) {
|
|
11
|
-
throw mod = 0, e;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
-
mod
|
|
29
|
-
));
|
|
30
|
-
|
|
31
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js
|
|
32
|
-
var require_constants = __commonJS({
|
|
33
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js"(exports, module) {
|
|
34
|
-
"use strict";
|
|
35
|
-
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
36
|
-
var MAX_LENGTH = 256;
|
|
37
|
-
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
38
|
-
9007199254740991;
|
|
39
|
-
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
40
|
-
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
41
|
-
var RELEASE_TYPES = [
|
|
42
|
-
"major",
|
|
43
|
-
"premajor",
|
|
44
|
-
"minor",
|
|
45
|
-
"preminor",
|
|
46
|
-
"patch",
|
|
47
|
-
"prepatch",
|
|
48
|
-
"prerelease"
|
|
49
|
-
];
|
|
50
|
-
module.exports = {
|
|
51
|
-
MAX_LENGTH,
|
|
52
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
53
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
54
|
-
MAX_SAFE_INTEGER,
|
|
55
|
-
RELEASE_TYPES,
|
|
56
|
-
SEMVER_SPEC_VERSION,
|
|
57
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
58
|
-
FLAG_LOOSE: 2
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js
|
|
64
|
-
var require_debug = __commonJS({
|
|
65
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js"(exports, module) {
|
|
66
|
-
"use strict";
|
|
67
|
-
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
68
|
-
};
|
|
69
|
-
module.exports = debug;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js
|
|
74
|
-
var require_re = __commonJS({
|
|
75
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js"(exports, module) {
|
|
76
|
-
"use strict";
|
|
77
|
-
var {
|
|
78
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
79
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
80
|
-
MAX_LENGTH
|
|
81
|
-
} = require_constants();
|
|
82
|
-
var debug = require_debug();
|
|
83
|
-
exports = module.exports = {};
|
|
84
|
-
var re = exports.re = [];
|
|
85
|
-
var safeRe = exports.safeRe = [];
|
|
86
|
-
var src = exports.src = [];
|
|
87
|
-
var safeSrc = exports.safeSrc = [];
|
|
88
|
-
var t = exports.t = {};
|
|
89
|
-
var R = 0;
|
|
90
|
-
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
91
|
-
var safeRegexReplacements = [
|
|
92
|
-
["\\s", 1],
|
|
93
|
-
["\\d", MAX_LENGTH],
|
|
94
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
95
|
-
];
|
|
96
|
-
var makeSafeRegex = (value) => {
|
|
97
|
-
for (const [token, max] of safeRegexReplacements) {
|
|
98
|
-
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
99
|
-
}
|
|
100
|
-
return value;
|
|
101
|
-
};
|
|
102
|
-
var createToken = (name, value, isGlobal) => {
|
|
103
|
-
const safe = makeSafeRegex(value);
|
|
104
|
-
const index = R++;
|
|
105
|
-
debug(name, index, value);
|
|
106
|
-
t[name] = index;
|
|
107
|
-
src[index] = value;
|
|
108
|
-
safeSrc[index] = safe;
|
|
109
|
-
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
110
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
111
|
-
};
|
|
112
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
113
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
114
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
115
|
-
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
116
|
-
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
117
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
118
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
119
|
-
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
120
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
121
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
122
|
-
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
123
|
-
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
124
|
-
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
125
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
126
|
-
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
127
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
128
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
129
|
-
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
130
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
131
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
132
|
-
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
133
|
-
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
134
|
-
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
135
|
-
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
136
|
-
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
137
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
138
|
-
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
139
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
140
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
141
|
-
exports.tildeTrimReplace = "$1~";
|
|
142
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
143
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
144
|
-
createToken("LONECARET", "(?:\\^)");
|
|
145
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
146
|
-
exports.caretTrimReplace = "$1^";
|
|
147
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
148
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
149
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
150
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
151
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
152
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
153
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
154
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
155
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
156
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
157
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js
|
|
162
|
-
var require_parse_options = __commonJS({
|
|
163
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js"(exports, module) {
|
|
164
|
-
"use strict";
|
|
165
|
-
var looseOption = Object.freeze({ loose: true });
|
|
166
|
-
var emptyOpts = Object.freeze({});
|
|
167
|
-
var parseOptions = (options) => {
|
|
168
|
-
if (!options) {
|
|
169
|
-
return emptyOpts;
|
|
170
|
-
}
|
|
171
|
-
if (typeof options !== "object") {
|
|
172
|
-
return looseOption;
|
|
173
|
-
}
|
|
174
|
-
return options;
|
|
175
|
-
};
|
|
176
|
-
module.exports = parseOptions;
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js
|
|
181
|
-
var require_identifiers = __commonJS({
|
|
182
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js"(exports, module) {
|
|
183
|
-
"use strict";
|
|
184
|
-
var numeric = /^[0-9]+$/;
|
|
185
|
-
var compareIdentifiers = (a, b) => {
|
|
186
|
-
if (typeof a === "number" && typeof b === "number") {
|
|
187
|
-
return a === b ? 0 : a < b ? -1 : 1;
|
|
188
|
-
}
|
|
189
|
-
const anum = numeric.test(a);
|
|
190
|
-
const bnum = numeric.test(b);
|
|
191
|
-
if (anum && bnum) {
|
|
192
|
-
a = +a;
|
|
193
|
-
b = +b;
|
|
194
|
-
}
|
|
195
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
196
|
-
};
|
|
197
|
-
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
198
|
-
module.exports = {
|
|
199
|
-
compareIdentifiers,
|
|
200
|
-
rcompareIdentifiers
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js
|
|
206
|
-
var require_semver = __commonJS({
|
|
207
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js"(exports, module) {
|
|
208
|
-
"use strict";
|
|
209
|
-
var debug = require_debug();
|
|
210
|
-
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
211
|
-
var { safeRe: re, t } = require_re();
|
|
212
|
-
var parseOptions = require_parse_options();
|
|
213
|
-
var { compareIdentifiers } = require_identifiers();
|
|
214
|
-
var SemVer = class _SemVer {
|
|
215
|
-
constructor(version, options) {
|
|
216
|
-
options = parseOptions(options);
|
|
217
|
-
if (version instanceof _SemVer) {
|
|
218
|
-
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
219
|
-
return version;
|
|
220
|
-
} else {
|
|
221
|
-
version = version.version;
|
|
222
|
-
}
|
|
223
|
-
} else if (typeof version !== "string") {
|
|
224
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
225
|
-
}
|
|
226
|
-
if (version.length > MAX_LENGTH) {
|
|
227
|
-
throw new TypeError(
|
|
228
|
-
`version is longer than ${MAX_LENGTH} characters`
|
|
229
|
-
);
|
|
230
|
-
}
|
|
231
|
-
debug("SemVer", version, options);
|
|
232
|
-
this.options = options;
|
|
233
|
-
this.loose = !!options.loose;
|
|
234
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
235
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
236
|
-
if (!m) {
|
|
237
|
-
throw new TypeError(`Invalid Version: ${version}`);
|
|
238
|
-
}
|
|
239
|
-
this.raw = version;
|
|
240
|
-
this.major = +m[1];
|
|
241
|
-
this.minor = +m[2];
|
|
242
|
-
this.patch = +m[3];
|
|
243
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
244
|
-
throw new TypeError("Invalid major version");
|
|
245
|
-
}
|
|
246
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
247
|
-
throw new TypeError("Invalid minor version");
|
|
248
|
-
}
|
|
249
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
250
|
-
throw new TypeError("Invalid patch version");
|
|
251
|
-
}
|
|
252
|
-
if (!m[4]) {
|
|
253
|
-
this.prerelease = [];
|
|
254
|
-
} else {
|
|
255
|
-
this.prerelease = m[4].split(".").map((id) => {
|
|
256
|
-
if (/^[0-9]+$/.test(id)) {
|
|
257
|
-
const num = +id;
|
|
258
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
259
|
-
return num;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return id;
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
266
|
-
this.format();
|
|
267
|
-
}
|
|
268
|
-
format() {
|
|
269
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
270
|
-
if (this.prerelease.length) {
|
|
271
|
-
this.version += `-${this.prerelease.join(".")}`;
|
|
272
|
-
}
|
|
273
|
-
return this.version;
|
|
274
|
-
}
|
|
275
|
-
toString() {
|
|
276
|
-
return this.version;
|
|
277
|
-
}
|
|
278
|
-
compare(other) {
|
|
279
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
280
|
-
if (!(other instanceof _SemVer)) {
|
|
281
|
-
if (typeof other === "string" && other === this.version) {
|
|
282
|
-
return 0;
|
|
283
|
-
}
|
|
284
|
-
other = new _SemVer(other, this.options);
|
|
285
|
-
}
|
|
286
|
-
if (other.version === this.version) {
|
|
287
|
-
return 0;
|
|
288
|
-
}
|
|
289
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
290
|
-
}
|
|
291
|
-
compareMain(other) {
|
|
292
|
-
if (!(other instanceof _SemVer)) {
|
|
293
|
-
other = new _SemVer(other, this.options);
|
|
294
|
-
}
|
|
295
|
-
if (this.major < other.major) {
|
|
296
|
-
return -1;
|
|
297
|
-
}
|
|
298
|
-
if (this.major > other.major) {
|
|
299
|
-
return 1;
|
|
300
|
-
}
|
|
301
|
-
if (this.minor < other.minor) {
|
|
302
|
-
return -1;
|
|
303
|
-
}
|
|
304
|
-
if (this.minor > other.minor) {
|
|
305
|
-
return 1;
|
|
306
|
-
}
|
|
307
|
-
if (this.patch < other.patch) {
|
|
308
|
-
return -1;
|
|
309
|
-
}
|
|
310
|
-
if (this.patch > other.patch) {
|
|
311
|
-
return 1;
|
|
312
|
-
}
|
|
313
|
-
return 0;
|
|
314
|
-
}
|
|
315
|
-
comparePre(other) {
|
|
316
|
-
if (!(other instanceof _SemVer)) {
|
|
317
|
-
other = new _SemVer(other, this.options);
|
|
318
|
-
}
|
|
319
|
-
if (this.prerelease.length && !other.prerelease.length) {
|
|
320
|
-
return -1;
|
|
321
|
-
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
322
|
-
return 1;
|
|
323
|
-
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
324
|
-
return 0;
|
|
325
|
-
}
|
|
326
|
-
let i = 0;
|
|
327
|
-
do {
|
|
328
|
-
const a = this.prerelease[i];
|
|
329
|
-
const b = other.prerelease[i];
|
|
330
|
-
debug("prerelease compare", i, a, b);
|
|
331
|
-
if (a === void 0 && b === void 0) {
|
|
332
|
-
return 0;
|
|
333
|
-
} else if (b === void 0) {
|
|
334
|
-
return 1;
|
|
335
|
-
} else if (a === void 0) {
|
|
336
|
-
return -1;
|
|
337
|
-
} else if (a === b) {
|
|
338
|
-
continue;
|
|
339
|
-
} else {
|
|
340
|
-
return compareIdentifiers(a, b);
|
|
341
|
-
}
|
|
342
|
-
} while (++i);
|
|
343
|
-
}
|
|
344
|
-
compareBuild(other) {
|
|
345
|
-
if (!(other instanceof _SemVer)) {
|
|
346
|
-
other = new _SemVer(other, this.options);
|
|
347
|
-
}
|
|
348
|
-
let i = 0;
|
|
349
|
-
do {
|
|
350
|
-
const a = this.build[i];
|
|
351
|
-
const b = other.build[i];
|
|
352
|
-
debug("build compare", i, a, b);
|
|
353
|
-
if (a === void 0 && b === void 0) {
|
|
354
|
-
return 0;
|
|
355
|
-
} else if (b === void 0) {
|
|
356
|
-
return 1;
|
|
357
|
-
} else if (a === void 0) {
|
|
358
|
-
return -1;
|
|
359
|
-
} else if (a === b) {
|
|
360
|
-
continue;
|
|
361
|
-
} else {
|
|
362
|
-
return compareIdentifiers(a, b);
|
|
363
|
-
}
|
|
364
|
-
} while (++i);
|
|
365
|
-
}
|
|
366
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
367
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
368
|
-
inc(release, identifier2, identifierBase) {
|
|
369
|
-
if (release.startsWith("pre")) {
|
|
370
|
-
if (!identifier2 && identifierBase === false) {
|
|
371
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
372
|
-
}
|
|
373
|
-
if (identifier2) {
|
|
374
|
-
const match = `-${identifier2}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
375
|
-
if (!match || match[1] !== identifier2) {
|
|
376
|
-
throw new Error(`invalid identifier: ${identifier2}`);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
switch (release) {
|
|
381
|
-
case "premajor":
|
|
382
|
-
this.prerelease.length = 0;
|
|
383
|
-
this.patch = 0;
|
|
384
|
-
this.minor = 0;
|
|
385
|
-
this.major++;
|
|
386
|
-
this.inc("pre", identifier2, identifierBase);
|
|
387
|
-
break;
|
|
388
|
-
case "preminor":
|
|
389
|
-
this.prerelease.length = 0;
|
|
390
|
-
this.patch = 0;
|
|
391
|
-
this.minor++;
|
|
392
|
-
this.inc("pre", identifier2, identifierBase);
|
|
393
|
-
break;
|
|
394
|
-
case "prepatch":
|
|
395
|
-
this.prerelease.length = 0;
|
|
396
|
-
this.inc("patch", identifier2, identifierBase);
|
|
397
|
-
this.inc("pre", identifier2, identifierBase);
|
|
398
|
-
break;
|
|
399
|
-
// If the input is a non-prerelease version, this acts the same as
|
|
400
|
-
// prepatch.
|
|
401
|
-
case "prerelease":
|
|
402
|
-
if (this.prerelease.length === 0) {
|
|
403
|
-
this.inc("patch", identifier2, identifierBase);
|
|
404
|
-
}
|
|
405
|
-
this.inc("pre", identifier2, identifierBase);
|
|
406
|
-
break;
|
|
407
|
-
case "release":
|
|
408
|
-
if (this.prerelease.length === 0) {
|
|
409
|
-
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
410
|
-
}
|
|
411
|
-
this.prerelease.length = 0;
|
|
412
|
-
break;
|
|
413
|
-
case "major":
|
|
414
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
415
|
-
this.major++;
|
|
416
|
-
}
|
|
417
|
-
this.minor = 0;
|
|
418
|
-
this.patch = 0;
|
|
419
|
-
this.prerelease = [];
|
|
420
|
-
break;
|
|
421
|
-
case "minor":
|
|
422
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
423
|
-
this.minor++;
|
|
424
|
-
}
|
|
425
|
-
this.patch = 0;
|
|
426
|
-
this.prerelease = [];
|
|
427
|
-
break;
|
|
428
|
-
case "patch":
|
|
429
|
-
if (this.prerelease.length === 0) {
|
|
430
|
-
this.patch++;
|
|
431
|
-
}
|
|
432
|
-
this.prerelease = [];
|
|
433
|
-
break;
|
|
434
|
-
// This probably shouldn't be used publicly.
|
|
435
|
-
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
436
|
-
case "pre": {
|
|
437
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
438
|
-
if (this.prerelease.length === 0) {
|
|
439
|
-
this.prerelease = [base];
|
|
440
|
-
} else {
|
|
441
|
-
let i = this.prerelease.length;
|
|
442
|
-
while (--i >= 0) {
|
|
443
|
-
if (typeof this.prerelease[i] === "number") {
|
|
444
|
-
this.prerelease[i]++;
|
|
445
|
-
i = -2;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
if (i === -1) {
|
|
449
|
-
if (identifier2 === this.prerelease.join(".") && identifierBase === false) {
|
|
450
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
451
|
-
}
|
|
452
|
-
this.prerelease.push(base);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
if (identifier2) {
|
|
456
|
-
let prerelease = [identifier2, base];
|
|
457
|
-
if (identifierBase === false) {
|
|
458
|
-
prerelease = [identifier2];
|
|
459
|
-
}
|
|
460
|
-
if (compareIdentifiers(this.prerelease[0], identifier2) === 0) {
|
|
461
|
-
if (isNaN(this.prerelease[1])) {
|
|
462
|
-
this.prerelease = prerelease;
|
|
463
|
-
}
|
|
464
|
-
} else {
|
|
465
|
-
this.prerelease = prerelease;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
break;
|
|
469
|
-
}
|
|
470
|
-
default:
|
|
471
|
-
throw new Error(`invalid increment argument: ${release}`);
|
|
472
|
-
}
|
|
473
|
-
this.raw = this.format();
|
|
474
|
-
if (this.build.length) {
|
|
475
|
-
this.raw += `+${this.build.join(".")}`;
|
|
476
|
-
}
|
|
477
|
-
return this;
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
module.exports = SemVer;
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js
|
|
485
|
-
var require_parse = __commonJS({
|
|
486
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js"(exports, module) {
|
|
487
|
-
"use strict";
|
|
488
|
-
var SemVer = require_semver();
|
|
489
|
-
var parse = (version, options, throwErrors = false) => {
|
|
490
|
-
if (version instanceof SemVer) {
|
|
491
|
-
return version;
|
|
492
|
-
}
|
|
493
|
-
try {
|
|
494
|
-
return new SemVer(version, options);
|
|
495
|
-
} catch (er) {
|
|
496
|
-
if (!throwErrors) {
|
|
497
|
-
return null;
|
|
498
|
-
}
|
|
499
|
-
throw er;
|
|
500
|
-
}
|
|
501
|
-
};
|
|
502
|
-
module.exports = parse;
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
|
|
506
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js
|
|
507
|
-
var require_valid = __commonJS({
|
|
508
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js"(exports, module) {
|
|
509
|
-
"use strict";
|
|
510
|
-
var parse = require_parse();
|
|
511
|
-
var valid2 = (version, options) => {
|
|
512
|
-
const v = parse(version, options);
|
|
513
|
-
return v ? v.version : null;
|
|
514
|
-
};
|
|
515
|
-
module.exports = valid2;
|
|
516
|
-
}
|
|
517
|
-
});
|
|
518
|
-
|
|
519
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js
|
|
520
|
-
var require_clean = __commonJS({
|
|
521
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js"(exports, module) {
|
|
522
|
-
"use strict";
|
|
523
|
-
var parse = require_parse();
|
|
524
|
-
var clean = (version, options) => {
|
|
525
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
526
|
-
return s ? s.version : null;
|
|
527
|
-
};
|
|
528
|
-
module.exports = clean;
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
|
-
|
|
532
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js
|
|
533
|
-
var require_inc = __commonJS({
|
|
534
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js"(exports, module) {
|
|
535
|
-
"use strict";
|
|
536
|
-
var SemVer = require_semver();
|
|
537
|
-
var inc2 = (version, release, options, identifier2, identifierBase) => {
|
|
538
|
-
if (typeof options === "string") {
|
|
539
|
-
identifierBase = identifier2;
|
|
540
|
-
identifier2 = options;
|
|
541
|
-
options = void 0;
|
|
542
|
-
}
|
|
543
|
-
try {
|
|
544
|
-
return new SemVer(
|
|
545
|
-
version instanceof SemVer ? version.version : version,
|
|
546
|
-
options
|
|
547
|
-
).inc(release, identifier2, identifierBase).version;
|
|
548
|
-
} catch (er) {
|
|
549
|
-
return null;
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
module.exports = inc2;
|
|
553
|
-
}
|
|
554
|
-
});
|
|
555
|
-
|
|
556
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js
|
|
557
|
-
var require_diff = __commonJS({
|
|
558
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js"(exports, module) {
|
|
559
|
-
"use strict";
|
|
560
|
-
var parse = require_parse();
|
|
561
|
-
var diff = (version1, version2) => {
|
|
562
|
-
const v1 = parse(version1, null, true);
|
|
563
|
-
const v2 = parse(version2, null, true);
|
|
564
|
-
const comparison = v1.compare(v2);
|
|
565
|
-
if (comparison === 0) {
|
|
566
|
-
return null;
|
|
567
|
-
}
|
|
568
|
-
const v1Higher = comparison > 0;
|
|
569
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
570
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
571
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
572
|
-
const lowHasPre = !!lowVersion.prerelease.length;
|
|
573
|
-
if (lowHasPre && !highHasPre) {
|
|
574
|
-
if (!lowVersion.patch && !lowVersion.minor) {
|
|
575
|
-
return "major";
|
|
576
|
-
}
|
|
577
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
578
|
-
if (lowVersion.minor && !lowVersion.patch) {
|
|
579
|
-
return "minor";
|
|
580
|
-
}
|
|
581
|
-
return "patch";
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
const prefix = highHasPre ? "pre" : "";
|
|
585
|
-
if (v1.major !== v2.major) {
|
|
586
|
-
return prefix + "major";
|
|
587
|
-
}
|
|
588
|
-
if (v1.minor !== v2.minor) {
|
|
589
|
-
return prefix + "minor";
|
|
590
|
-
}
|
|
591
|
-
if (v1.patch !== v2.patch) {
|
|
592
|
-
return prefix + "patch";
|
|
593
|
-
}
|
|
594
|
-
return "prerelease";
|
|
595
|
-
};
|
|
596
|
-
module.exports = diff;
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
|
|
600
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js
|
|
601
|
-
var require_major = __commonJS({
|
|
602
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js"(exports, module) {
|
|
603
|
-
"use strict";
|
|
604
|
-
var SemVer = require_semver();
|
|
605
|
-
var major = (a, loose) => new SemVer(a, loose).major;
|
|
606
|
-
module.exports = major;
|
|
607
|
-
}
|
|
608
|
-
});
|
|
609
|
-
|
|
610
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js
|
|
611
|
-
var require_minor = __commonJS({
|
|
612
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js"(exports, module) {
|
|
613
|
-
"use strict";
|
|
614
|
-
var SemVer = require_semver();
|
|
615
|
-
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
616
|
-
module.exports = minor;
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
|
|
620
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js
|
|
621
|
-
var require_patch = __commonJS({
|
|
622
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js"(exports, module) {
|
|
623
|
-
"use strict";
|
|
624
|
-
var SemVer = require_semver();
|
|
625
|
-
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
626
|
-
module.exports = patch;
|
|
627
|
-
}
|
|
628
|
-
});
|
|
629
|
-
|
|
630
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js
|
|
631
|
-
var require_prerelease = __commonJS({
|
|
632
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js"(exports, module) {
|
|
633
|
-
"use strict";
|
|
634
|
-
var parse = require_parse();
|
|
635
|
-
var prerelease = (version, options) => {
|
|
636
|
-
const parsed = parse(version, options);
|
|
637
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
638
|
-
};
|
|
639
|
-
module.exports = prerelease;
|
|
640
|
-
}
|
|
641
|
-
});
|
|
642
|
-
|
|
643
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js
|
|
644
|
-
var require_compare = __commonJS({
|
|
645
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js"(exports, module) {
|
|
646
|
-
"use strict";
|
|
647
|
-
var SemVer = require_semver();
|
|
648
|
-
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
649
|
-
module.exports = compare;
|
|
650
|
-
}
|
|
651
|
-
});
|
|
652
|
-
|
|
653
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js
|
|
654
|
-
var require_rcompare = __commonJS({
|
|
655
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js"(exports, module) {
|
|
656
|
-
"use strict";
|
|
657
|
-
var compare = require_compare();
|
|
658
|
-
var rcompare2 = (a, b, loose) => compare(b, a, loose);
|
|
659
|
-
module.exports = rcompare2;
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
|
|
663
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js
|
|
664
|
-
var require_compare_loose = __commonJS({
|
|
665
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js"(exports, module) {
|
|
666
|
-
"use strict";
|
|
667
|
-
var compare = require_compare();
|
|
668
|
-
var compareLoose = (a, b) => compare(a, b, true);
|
|
669
|
-
module.exports = compareLoose;
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
|
|
673
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js
|
|
674
|
-
var require_compare_build = __commonJS({
|
|
675
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js"(exports, module) {
|
|
676
|
-
"use strict";
|
|
677
|
-
var SemVer = require_semver();
|
|
678
|
-
var compareBuild = (a, b, loose) => {
|
|
679
|
-
const versionA = new SemVer(a, loose);
|
|
680
|
-
const versionB = new SemVer(b, loose);
|
|
681
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
682
|
-
};
|
|
683
|
-
module.exports = compareBuild;
|
|
684
|
-
}
|
|
685
|
-
});
|
|
686
|
-
|
|
687
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js
|
|
688
|
-
var require_sort = __commonJS({
|
|
689
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js"(exports, module) {
|
|
690
|
-
"use strict";
|
|
691
|
-
var compareBuild = require_compare_build();
|
|
692
|
-
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
693
|
-
module.exports = sort;
|
|
694
|
-
}
|
|
695
|
-
});
|
|
696
|
-
|
|
697
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js
|
|
698
|
-
var require_rsort = __commonJS({
|
|
699
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js"(exports, module) {
|
|
700
|
-
"use strict";
|
|
701
|
-
var compareBuild = require_compare_build();
|
|
702
|
-
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
703
|
-
module.exports = rsort;
|
|
704
|
-
}
|
|
705
|
-
});
|
|
706
|
-
|
|
707
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js
|
|
708
|
-
var require_gt = __commonJS({
|
|
709
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js"(exports, module) {
|
|
710
|
-
"use strict";
|
|
711
|
-
var compare = require_compare();
|
|
712
|
-
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
713
|
-
module.exports = gt;
|
|
714
|
-
}
|
|
715
|
-
});
|
|
716
|
-
|
|
717
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js
|
|
718
|
-
var require_lt = __commonJS({
|
|
719
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js"(exports, module) {
|
|
720
|
-
"use strict";
|
|
721
|
-
var compare = require_compare();
|
|
722
|
-
var lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
723
|
-
module.exports = lt;
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
|
|
727
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js
|
|
728
|
-
var require_eq = __commonJS({
|
|
729
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js"(exports, module) {
|
|
730
|
-
"use strict";
|
|
731
|
-
var compare = require_compare();
|
|
732
|
-
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
733
|
-
module.exports = eq;
|
|
734
|
-
}
|
|
735
|
-
});
|
|
736
|
-
|
|
737
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js
|
|
738
|
-
var require_neq = __commonJS({
|
|
739
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js"(exports, module) {
|
|
740
|
-
"use strict";
|
|
741
|
-
var compare = require_compare();
|
|
742
|
-
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
743
|
-
module.exports = neq;
|
|
744
|
-
}
|
|
745
|
-
});
|
|
746
|
-
|
|
747
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js
|
|
748
|
-
var require_gte = __commonJS({
|
|
749
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js"(exports, module) {
|
|
750
|
-
"use strict";
|
|
751
|
-
var compare = require_compare();
|
|
752
|
-
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
753
|
-
module.exports = gte;
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
|
|
757
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js
|
|
758
|
-
var require_lte = __commonJS({
|
|
759
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js"(exports, module) {
|
|
760
|
-
"use strict";
|
|
761
|
-
var compare = require_compare();
|
|
762
|
-
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
763
|
-
module.exports = lte;
|
|
764
|
-
}
|
|
765
|
-
});
|
|
766
|
-
|
|
767
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js
|
|
768
|
-
var require_cmp = __commonJS({
|
|
769
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js"(exports, module) {
|
|
770
|
-
"use strict";
|
|
771
|
-
var eq = require_eq();
|
|
772
|
-
var neq = require_neq();
|
|
773
|
-
var gt = require_gt();
|
|
774
|
-
var gte = require_gte();
|
|
775
|
-
var lt = require_lt();
|
|
776
|
-
var lte = require_lte();
|
|
777
|
-
var cmp = (a, op, b, loose) => {
|
|
778
|
-
switch (op) {
|
|
779
|
-
case "===":
|
|
780
|
-
if (typeof a === "object") {
|
|
781
|
-
a = a.version;
|
|
782
|
-
}
|
|
783
|
-
if (typeof b === "object") {
|
|
784
|
-
b = b.version;
|
|
785
|
-
}
|
|
786
|
-
return a === b;
|
|
787
|
-
case "!==":
|
|
788
|
-
if (typeof a === "object") {
|
|
789
|
-
a = a.version;
|
|
790
|
-
}
|
|
791
|
-
if (typeof b === "object") {
|
|
792
|
-
b = b.version;
|
|
793
|
-
}
|
|
794
|
-
return a !== b;
|
|
795
|
-
case "":
|
|
796
|
-
case "=":
|
|
797
|
-
case "==":
|
|
798
|
-
return eq(a, b, loose);
|
|
799
|
-
case "!=":
|
|
800
|
-
return neq(a, b, loose);
|
|
801
|
-
case ">":
|
|
802
|
-
return gt(a, b, loose);
|
|
803
|
-
case ">=":
|
|
804
|
-
return gte(a, b, loose);
|
|
805
|
-
case "<":
|
|
806
|
-
return lt(a, b, loose);
|
|
807
|
-
case "<=":
|
|
808
|
-
return lte(a, b, loose);
|
|
809
|
-
default:
|
|
810
|
-
throw new TypeError(`Invalid operator: ${op}`);
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
module.exports = cmp;
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
|
|
817
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js
|
|
818
|
-
var require_coerce = __commonJS({
|
|
819
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js"(exports, module) {
|
|
820
|
-
"use strict";
|
|
821
|
-
var SemVer = require_semver();
|
|
822
|
-
var parse = require_parse();
|
|
823
|
-
var { safeRe: re, t } = require_re();
|
|
824
|
-
var coerce = (version, options) => {
|
|
825
|
-
if (version instanceof SemVer) {
|
|
826
|
-
return version;
|
|
827
|
-
}
|
|
828
|
-
if (typeof version === "number") {
|
|
829
|
-
version = String(version);
|
|
830
|
-
}
|
|
831
|
-
if (typeof version !== "string") {
|
|
832
|
-
return null;
|
|
833
|
-
}
|
|
834
|
-
options = options || {};
|
|
835
|
-
let match = null;
|
|
836
|
-
if (!options.rtl) {
|
|
837
|
-
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
838
|
-
} else {
|
|
839
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
840
|
-
let next;
|
|
841
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
842
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
843
|
-
match = next;
|
|
844
|
-
}
|
|
845
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
846
|
-
}
|
|
847
|
-
coerceRtlRegex.lastIndex = -1;
|
|
848
|
-
}
|
|
849
|
-
if (match === null) {
|
|
850
|
-
return null;
|
|
851
|
-
}
|
|
852
|
-
const major = match[2];
|
|
853
|
-
const minor = match[3] || "0";
|
|
854
|
-
const patch = match[4] || "0";
|
|
855
|
-
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
856
|
-
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
857
|
-
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
858
|
-
};
|
|
859
|
-
module.exports = coerce;
|
|
860
|
-
}
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js
|
|
864
|
-
var require_lrucache = __commonJS({
|
|
865
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js"(exports, module) {
|
|
866
|
-
"use strict";
|
|
867
|
-
var LRUCache = class {
|
|
868
|
-
constructor() {
|
|
869
|
-
this.max = 1e3;
|
|
870
|
-
this.map = /* @__PURE__ */ new Map();
|
|
871
|
-
}
|
|
872
|
-
get(key) {
|
|
873
|
-
const value = this.map.get(key);
|
|
874
|
-
if (value === void 0) {
|
|
875
|
-
return void 0;
|
|
876
|
-
} else {
|
|
877
|
-
this.map.delete(key);
|
|
878
|
-
this.map.set(key, value);
|
|
879
|
-
return value;
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
delete(key) {
|
|
883
|
-
return this.map.delete(key);
|
|
884
|
-
}
|
|
885
|
-
set(key, value) {
|
|
886
|
-
const deleted = this.delete(key);
|
|
887
|
-
if (!deleted && value !== void 0) {
|
|
888
|
-
if (this.map.size >= this.max) {
|
|
889
|
-
const firstKey = this.map.keys().next().value;
|
|
890
|
-
this.delete(firstKey);
|
|
891
|
-
}
|
|
892
|
-
this.map.set(key, value);
|
|
893
|
-
}
|
|
894
|
-
return this;
|
|
895
|
-
}
|
|
896
|
-
};
|
|
897
|
-
module.exports = LRUCache;
|
|
898
|
-
}
|
|
899
|
-
});
|
|
900
|
-
|
|
901
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js
|
|
902
|
-
var require_range = __commonJS({
|
|
903
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js"(exports, module) {
|
|
904
|
-
"use strict";
|
|
905
|
-
var SPACE_CHARACTERS = /\s+/g;
|
|
906
|
-
var Range = class _Range {
|
|
907
|
-
constructor(range, options) {
|
|
908
|
-
options = parseOptions(options);
|
|
909
|
-
if (range instanceof _Range) {
|
|
910
|
-
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
911
|
-
return range;
|
|
912
|
-
} else {
|
|
913
|
-
return new _Range(range.raw, options);
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
if (range instanceof Comparator) {
|
|
917
|
-
this.raw = range.value;
|
|
918
|
-
this.set = [[range]];
|
|
919
|
-
this.formatted = void 0;
|
|
920
|
-
return this;
|
|
921
|
-
}
|
|
922
|
-
this.options = options;
|
|
923
|
-
this.loose = !!options.loose;
|
|
924
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
925
|
-
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
926
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
927
|
-
if (!this.set.length) {
|
|
928
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
929
|
-
}
|
|
930
|
-
if (this.set.length > 1) {
|
|
931
|
-
const first = this.set[0];
|
|
932
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
933
|
-
if (this.set.length === 0) {
|
|
934
|
-
this.set = [first];
|
|
935
|
-
} else if (this.set.length > 1) {
|
|
936
|
-
for (const c of this.set) {
|
|
937
|
-
if (c.length === 1 && isAny(c[0])) {
|
|
938
|
-
this.set = [c];
|
|
939
|
-
break;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
this.formatted = void 0;
|
|
945
|
-
}
|
|
946
|
-
get range() {
|
|
947
|
-
if (this.formatted === void 0) {
|
|
948
|
-
this.formatted = "";
|
|
949
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
950
|
-
if (i > 0) {
|
|
951
|
-
this.formatted += "||";
|
|
952
|
-
}
|
|
953
|
-
const comps = this.set[i];
|
|
954
|
-
for (let k = 0; k < comps.length; k++) {
|
|
955
|
-
if (k > 0) {
|
|
956
|
-
this.formatted += " ";
|
|
957
|
-
}
|
|
958
|
-
this.formatted += comps[k].toString().trim();
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
return this.formatted;
|
|
963
|
-
}
|
|
964
|
-
format() {
|
|
965
|
-
return this.range;
|
|
966
|
-
}
|
|
967
|
-
toString() {
|
|
968
|
-
return this.range;
|
|
969
|
-
}
|
|
970
|
-
parseRange(range) {
|
|
971
|
-
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
972
|
-
const memoKey = memoOpts + ":" + range;
|
|
973
|
-
const cached = cache.get(memoKey);
|
|
974
|
-
if (cached) {
|
|
975
|
-
return cached;
|
|
976
|
-
}
|
|
977
|
-
const loose = this.options.loose;
|
|
978
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
979
|
-
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
980
|
-
debug("hyphen replace", range);
|
|
981
|
-
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
982
|
-
debug("comparator trim", range);
|
|
983
|
-
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
984
|
-
debug("tilde trim", range);
|
|
985
|
-
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
986
|
-
debug("caret trim", range);
|
|
987
|
-
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
988
|
-
if (loose) {
|
|
989
|
-
rangeList = rangeList.filter((comp) => {
|
|
990
|
-
debug("loose invalid filter", comp, this.options);
|
|
991
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
debug("range list", rangeList);
|
|
995
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
996
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
997
|
-
for (const comp of comparators) {
|
|
998
|
-
if (isNullSet(comp)) {
|
|
999
|
-
return [comp];
|
|
1000
|
-
}
|
|
1001
|
-
rangeMap.set(comp.value, comp);
|
|
1002
|
-
}
|
|
1003
|
-
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
1004
|
-
rangeMap.delete("");
|
|
1005
|
-
}
|
|
1006
|
-
const result = [...rangeMap.values()];
|
|
1007
|
-
cache.set(memoKey, result);
|
|
1008
|
-
return result;
|
|
1009
|
-
}
|
|
1010
|
-
intersects(range, options) {
|
|
1011
|
-
if (!(range instanceof _Range)) {
|
|
1012
|
-
throw new TypeError("a Range is required");
|
|
1013
|
-
}
|
|
1014
|
-
return this.set.some((thisComparators) => {
|
|
1015
|
-
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
1016
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
1017
|
-
return rangeComparators.every((rangeComparator) => {
|
|
1018
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
1019
|
-
});
|
|
1020
|
-
});
|
|
1021
|
-
});
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
1025
|
-
test(version) {
|
|
1026
|
-
if (!version) {
|
|
1027
|
-
return false;
|
|
1028
|
-
}
|
|
1029
|
-
if (typeof version === "string") {
|
|
1030
|
-
try {
|
|
1031
|
-
version = new SemVer(version, this.options);
|
|
1032
|
-
} catch (er) {
|
|
1033
|
-
return false;
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
1037
|
-
if (testSet(this.set[i], version, this.options)) {
|
|
1038
|
-
return true;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
return false;
|
|
1042
|
-
}
|
|
1043
|
-
};
|
|
1044
|
-
module.exports = Range;
|
|
1045
|
-
var LRU = require_lrucache();
|
|
1046
|
-
var cache = new LRU();
|
|
1047
|
-
var parseOptions = require_parse_options();
|
|
1048
|
-
var Comparator = require_comparator();
|
|
1049
|
-
var debug = require_debug();
|
|
1050
|
-
var SemVer = require_semver();
|
|
1051
|
-
var {
|
|
1052
|
-
safeRe: re,
|
|
1053
|
-
t,
|
|
1054
|
-
comparatorTrimReplace,
|
|
1055
|
-
tildeTrimReplace,
|
|
1056
|
-
caretTrimReplace
|
|
1057
|
-
} = require_re();
|
|
1058
|
-
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
1059
|
-
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
1060
|
-
var isAny = (c) => c.value === "";
|
|
1061
|
-
var isSatisfiable = (comparators, options) => {
|
|
1062
|
-
let result = true;
|
|
1063
|
-
const remainingComparators = comparators.slice();
|
|
1064
|
-
let testComparator = remainingComparators.pop();
|
|
1065
|
-
while (result && remainingComparators.length) {
|
|
1066
|
-
result = remainingComparators.every((otherComparator) => {
|
|
1067
|
-
return testComparator.intersects(otherComparator, options);
|
|
1068
|
-
});
|
|
1069
|
-
testComparator = remainingComparators.pop();
|
|
1070
|
-
}
|
|
1071
|
-
return result;
|
|
1072
|
-
};
|
|
1073
|
-
var parseComparator = (comp, options) => {
|
|
1074
|
-
comp = comp.replace(re[t.BUILD], "");
|
|
1075
|
-
debug("comp", comp, options);
|
|
1076
|
-
comp = replaceCarets(comp, options);
|
|
1077
|
-
debug("caret", comp);
|
|
1078
|
-
comp = replaceTildes(comp, options);
|
|
1079
|
-
debug("tildes", comp);
|
|
1080
|
-
comp = replaceXRanges(comp, options);
|
|
1081
|
-
debug("xrange", comp);
|
|
1082
|
-
comp = replaceStars(comp, options);
|
|
1083
|
-
debug("stars", comp);
|
|
1084
|
-
return comp;
|
|
1085
|
-
};
|
|
1086
|
-
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
1087
|
-
var replaceTildes = (comp, options) => {
|
|
1088
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
1089
|
-
};
|
|
1090
|
-
var replaceTilde = (comp, options) => {
|
|
1091
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
1092
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1093
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
1094
|
-
let ret;
|
|
1095
|
-
if (isX(M)) {
|
|
1096
|
-
ret = "";
|
|
1097
|
-
} else if (isX(m)) {
|
|
1098
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
1099
|
-
} else if (isX(p)) {
|
|
1100
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
1101
|
-
} else if (pr) {
|
|
1102
|
-
debug("replaceTilde pr", pr);
|
|
1103
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1104
|
-
} else {
|
|
1105
|
-
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
1106
|
-
}
|
|
1107
|
-
debug("tilde return", ret);
|
|
1108
|
-
return ret;
|
|
1109
|
-
});
|
|
1110
|
-
};
|
|
1111
|
-
var replaceCarets = (comp, options) => {
|
|
1112
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
1113
|
-
};
|
|
1114
|
-
var replaceCaret = (comp, options) => {
|
|
1115
|
-
debug("caret", comp, options);
|
|
1116
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
1117
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
1118
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1119
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
1120
|
-
let ret;
|
|
1121
|
-
if (isX(M)) {
|
|
1122
|
-
ret = "";
|
|
1123
|
-
} else if (isX(m)) {
|
|
1124
|
-
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
1125
|
-
} else if (isX(p)) {
|
|
1126
|
-
if (M === "0") {
|
|
1127
|
-
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
1128
|
-
} else {
|
|
1129
|
-
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
1130
|
-
}
|
|
1131
|
-
} else if (pr) {
|
|
1132
|
-
debug("replaceCaret pr", pr);
|
|
1133
|
-
if (M === "0") {
|
|
1134
|
-
if (m === "0") {
|
|
1135
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
1136
|
-
} else {
|
|
1137
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1138
|
-
}
|
|
1139
|
-
} else {
|
|
1140
|
-
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
1141
|
-
}
|
|
1142
|
-
} else {
|
|
1143
|
-
debug("no pr");
|
|
1144
|
-
if (M === "0") {
|
|
1145
|
-
if (m === "0") {
|
|
1146
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
1147
|
-
} else {
|
|
1148
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
1149
|
-
}
|
|
1150
|
-
} else {
|
|
1151
|
-
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
debug("caret return", ret);
|
|
1155
|
-
return ret;
|
|
1156
|
-
});
|
|
1157
|
-
};
|
|
1158
|
-
var replaceXRanges = (comp, options) => {
|
|
1159
|
-
debug("replaceXRanges", comp, options);
|
|
1160
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
1161
|
-
};
|
|
1162
|
-
var replaceXRange = (comp, options) => {
|
|
1163
|
-
comp = comp.trim();
|
|
1164
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
1165
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
1166
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
1167
|
-
const xM = isX(M);
|
|
1168
|
-
const xm = xM || isX(m);
|
|
1169
|
-
const xp = xm || isX(p);
|
|
1170
|
-
const anyX = xp;
|
|
1171
|
-
if (gtlt === "=" && anyX) {
|
|
1172
|
-
gtlt = "";
|
|
1173
|
-
}
|
|
1174
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
1175
|
-
if (xM) {
|
|
1176
|
-
if (gtlt === ">" || gtlt === "<") {
|
|
1177
|
-
ret = "<0.0.0-0";
|
|
1178
|
-
} else {
|
|
1179
|
-
ret = "*";
|
|
1180
|
-
}
|
|
1181
|
-
} else if (gtlt && anyX) {
|
|
1182
|
-
if (xm) {
|
|
1183
|
-
m = 0;
|
|
1184
|
-
}
|
|
1185
|
-
p = 0;
|
|
1186
|
-
if (gtlt === ">") {
|
|
1187
|
-
gtlt = ">=";
|
|
1188
|
-
if (xm) {
|
|
1189
|
-
M = +M + 1;
|
|
1190
|
-
m = 0;
|
|
1191
|
-
p = 0;
|
|
1192
|
-
} else {
|
|
1193
|
-
m = +m + 1;
|
|
1194
|
-
p = 0;
|
|
1195
|
-
}
|
|
1196
|
-
} else if (gtlt === "<=") {
|
|
1197
|
-
gtlt = "<";
|
|
1198
|
-
if (xm) {
|
|
1199
|
-
M = +M + 1;
|
|
1200
|
-
} else {
|
|
1201
|
-
m = +m + 1;
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
if (gtlt === "<") {
|
|
1205
|
-
pr = "-0";
|
|
1206
|
-
}
|
|
1207
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
1208
|
-
} else if (xm) {
|
|
1209
|
-
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
1210
|
-
} else if (xp) {
|
|
1211
|
-
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
1212
|
-
}
|
|
1213
|
-
debug("xRange return", ret);
|
|
1214
|
-
return ret;
|
|
1215
|
-
});
|
|
1216
|
-
};
|
|
1217
|
-
var replaceStars = (comp, options) => {
|
|
1218
|
-
debug("replaceStars", comp, options);
|
|
1219
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
1220
|
-
};
|
|
1221
|
-
var replaceGTE0 = (comp, options) => {
|
|
1222
|
-
debug("replaceGTE0", comp, options);
|
|
1223
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
1224
|
-
};
|
|
1225
|
-
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
1226
|
-
if (isX(fM)) {
|
|
1227
|
-
from = "";
|
|
1228
|
-
} else if (isX(fm)) {
|
|
1229
|
-
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
1230
|
-
} else if (isX(fp)) {
|
|
1231
|
-
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
1232
|
-
} else if (fpr) {
|
|
1233
|
-
from = `>=${from}`;
|
|
1234
|
-
} else {
|
|
1235
|
-
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
1236
|
-
}
|
|
1237
|
-
if (isX(tM)) {
|
|
1238
|
-
to = "";
|
|
1239
|
-
} else if (isX(tm)) {
|
|
1240
|
-
to = `<${+tM + 1}.0.0-0`;
|
|
1241
|
-
} else if (isX(tp)) {
|
|
1242
|
-
to = `<${tM}.${+tm + 1}.0-0`;
|
|
1243
|
-
} else if (tpr) {
|
|
1244
|
-
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
1245
|
-
} else if (incPr) {
|
|
1246
|
-
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
1247
|
-
} else {
|
|
1248
|
-
to = `<=${to}`;
|
|
1249
|
-
}
|
|
1250
|
-
return `${from} ${to}`.trim();
|
|
1251
|
-
};
|
|
1252
|
-
var testSet = (set, version, options) => {
|
|
1253
|
-
for (let i = 0; i < set.length; i++) {
|
|
1254
|
-
if (!set[i].test(version)) {
|
|
1255
|
-
return false;
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
1259
|
-
for (let i = 0; i < set.length; i++) {
|
|
1260
|
-
debug(set[i].semver);
|
|
1261
|
-
if (set[i].semver === Comparator.ANY) {
|
|
1262
|
-
continue;
|
|
1263
|
-
}
|
|
1264
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
1265
|
-
const allowed = set[i].semver;
|
|
1266
|
-
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
|
1267
|
-
return true;
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
return false;
|
|
1272
|
-
}
|
|
1273
|
-
return true;
|
|
1274
|
-
};
|
|
1275
|
-
}
|
|
1276
|
-
});
|
|
1277
|
-
|
|
1278
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js
|
|
1279
|
-
var require_comparator = __commonJS({
|
|
1280
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js"(exports, module) {
|
|
1281
|
-
"use strict";
|
|
1282
|
-
var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
|
|
1283
|
-
var Comparator = class _Comparator {
|
|
1284
|
-
static get ANY() {
|
|
1285
|
-
return ANY;
|
|
1286
|
-
}
|
|
1287
|
-
constructor(comp, options) {
|
|
1288
|
-
options = parseOptions(options);
|
|
1289
|
-
if (comp instanceof _Comparator) {
|
|
1290
|
-
if (comp.loose === !!options.loose) {
|
|
1291
|
-
return comp;
|
|
1292
|
-
} else {
|
|
1293
|
-
comp = comp.value;
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
1297
|
-
debug("comparator", comp, options);
|
|
1298
|
-
this.options = options;
|
|
1299
|
-
this.loose = !!options.loose;
|
|
1300
|
-
this.parse(comp);
|
|
1301
|
-
if (this.semver === ANY) {
|
|
1302
|
-
this.value = "";
|
|
1303
|
-
} else {
|
|
1304
|
-
this.value = this.operator + this.semver.version;
|
|
1305
|
-
}
|
|
1306
|
-
debug("comp", this);
|
|
1307
|
-
}
|
|
1308
|
-
parse(comp) {
|
|
1309
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
1310
|
-
const m = comp.match(r);
|
|
1311
|
-
if (!m) {
|
|
1312
|
-
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
1313
|
-
}
|
|
1314
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
1315
|
-
if (this.operator === "=") {
|
|
1316
|
-
this.operator = "";
|
|
1317
|
-
}
|
|
1318
|
-
if (!m[2]) {
|
|
1319
|
-
this.semver = ANY;
|
|
1320
|
-
} else {
|
|
1321
|
-
this.semver = new SemVer(m[2], this.options.loose);
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
toString() {
|
|
1325
|
-
return this.value;
|
|
1326
|
-
}
|
|
1327
|
-
test(version) {
|
|
1328
|
-
debug("Comparator.test", version, this.options.loose);
|
|
1329
|
-
if (this.semver === ANY || version === ANY) {
|
|
1330
|
-
return true;
|
|
1331
|
-
}
|
|
1332
|
-
if (typeof version === "string") {
|
|
1333
|
-
try {
|
|
1334
|
-
version = new SemVer(version, this.options);
|
|
1335
|
-
} catch (er) {
|
|
1336
|
-
return false;
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
1340
|
-
}
|
|
1341
|
-
intersects(comp, options) {
|
|
1342
|
-
if (!(comp instanceof _Comparator)) {
|
|
1343
|
-
throw new TypeError("a Comparator is required");
|
|
1344
|
-
}
|
|
1345
|
-
if (this.operator === "") {
|
|
1346
|
-
if (this.value === "") {
|
|
1347
|
-
return true;
|
|
1348
|
-
}
|
|
1349
|
-
return new Range(comp.value, options).test(this.value);
|
|
1350
|
-
} else if (comp.operator === "") {
|
|
1351
|
-
if (comp.value === "") {
|
|
1352
|
-
return true;
|
|
1353
|
-
}
|
|
1354
|
-
return new Range(this.value, options).test(comp.semver);
|
|
1355
|
-
}
|
|
1356
|
-
options = parseOptions(options);
|
|
1357
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
1358
|
-
return false;
|
|
1359
|
-
}
|
|
1360
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
1361
|
-
return false;
|
|
1362
|
-
}
|
|
1363
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
1364
|
-
return true;
|
|
1365
|
-
}
|
|
1366
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
1367
|
-
return true;
|
|
1368
|
-
}
|
|
1369
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
1370
|
-
return true;
|
|
1371
|
-
}
|
|
1372
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
1373
|
-
return true;
|
|
1374
|
-
}
|
|
1375
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
1376
|
-
return true;
|
|
1377
|
-
}
|
|
1378
|
-
return false;
|
|
1379
|
-
}
|
|
1380
|
-
};
|
|
1381
|
-
module.exports = Comparator;
|
|
1382
|
-
var parseOptions = require_parse_options();
|
|
1383
|
-
var { safeRe: re, t } = require_re();
|
|
1384
|
-
var cmp = require_cmp();
|
|
1385
|
-
var debug = require_debug();
|
|
1386
|
-
var SemVer = require_semver();
|
|
1387
|
-
var Range = require_range();
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
|
|
1391
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js
|
|
1392
|
-
var require_satisfies = __commonJS({
|
|
1393
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js"(exports, module) {
|
|
1394
|
-
"use strict";
|
|
1395
|
-
var Range = require_range();
|
|
1396
|
-
var satisfies2 = (version, range, options) => {
|
|
1397
|
-
try {
|
|
1398
|
-
range = new Range(range, options);
|
|
1399
|
-
} catch (er) {
|
|
1400
|
-
return false;
|
|
1401
|
-
}
|
|
1402
|
-
return range.test(version);
|
|
1403
|
-
};
|
|
1404
|
-
module.exports = satisfies2;
|
|
1405
|
-
}
|
|
1406
|
-
});
|
|
1407
|
-
|
|
1408
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js
|
|
1409
|
-
var require_to_comparators = __commonJS({
|
|
1410
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js"(exports, module) {
|
|
1411
|
-
"use strict";
|
|
1412
|
-
var Range = require_range();
|
|
1413
|
-
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1414
|
-
module.exports = toComparators;
|
|
1415
|
-
}
|
|
1416
|
-
});
|
|
1417
|
-
|
|
1418
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js
|
|
1419
|
-
var require_max_satisfying = __commonJS({
|
|
1420
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
|
|
1421
|
-
"use strict";
|
|
1422
|
-
var SemVer = require_semver();
|
|
1423
|
-
var Range = require_range();
|
|
1424
|
-
var maxSatisfying = (versions, range, options) => {
|
|
1425
|
-
let max = null;
|
|
1426
|
-
let maxSV = null;
|
|
1427
|
-
let rangeObj = null;
|
|
1428
|
-
try {
|
|
1429
|
-
rangeObj = new Range(range, options);
|
|
1430
|
-
} catch (er) {
|
|
1431
|
-
return null;
|
|
1432
|
-
}
|
|
1433
|
-
versions.forEach((v) => {
|
|
1434
|
-
if (rangeObj.test(v)) {
|
|
1435
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
1436
|
-
max = v;
|
|
1437
|
-
maxSV = new SemVer(max, options);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
});
|
|
1441
|
-
return max;
|
|
1442
|
-
};
|
|
1443
|
-
module.exports = maxSatisfying;
|
|
1444
|
-
}
|
|
1445
|
-
});
|
|
1446
|
-
|
|
1447
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js
|
|
1448
|
-
var require_min_satisfying = __commonJS({
|
|
1449
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
|
|
1450
|
-
"use strict";
|
|
1451
|
-
var SemVer = require_semver();
|
|
1452
|
-
var Range = require_range();
|
|
1453
|
-
var minSatisfying = (versions, range, options) => {
|
|
1454
|
-
let min = null;
|
|
1455
|
-
let minSV = null;
|
|
1456
|
-
let rangeObj = null;
|
|
1457
|
-
try {
|
|
1458
|
-
rangeObj = new Range(range, options);
|
|
1459
|
-
} catch (er) {
|
|
1460
|
-
return null;
|
|
1461
|
-
}
|
|
1462
|
-
versions.forEach((v) => {
|
|
1463
|
-
if (rangeObj.test(v)) {
|
|
1464
|
-
if (!min || minSV.compare(v) === 1) {
|
|
1465
|
-
min = v;
|
|
1466
|
-
minSV = new SemVer(min, options);
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
});
|
|
1470
|
-
return min;
|
|
1471
|
-
};
|
|
1472
|
-
module.exports = minSatisfying;
|
|
1473
|
-
}
|
|
1474
|
-
});
|
|
1475
|
-
|
|
1476
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js
|
|
1477
|
-
var require_min_version = __commonJS({
|
|
1478
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js"(exports, module) {
|
|
1479
|
-
"use strict";
|
|
1480
|
-
var SemVer = require_semver();
|
|
1481
|
-
var Range = require_range();
|
|
1482
|
-
var gt = require_gt();
|
|
1483
|
-
var minVersion = (range, loose) => {
|
|
1484
|
-
range = new Range(range, loose);
|
|
1485
|
-
let minver = new SemVer("0.0.0");
|
|
1486
|
-
if (range.test(minver)) {
|
|
1487
|
-
return minver;
|
|
1488
|
-
}
|
|
1489
|
-
minver = new SemVer("0.0.0-0");
|
|
1490
|
-
if (range.test(minver)) {
|
|
1491
|
-
return minver;
|
|
1492
|
-
}
|
|
1493
|
-
minver = null;
|
|
1494
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1495
|
-
const comparators = range.set[i];
|
|
1496
|
-
let setMin = null;
|
|
1497
|
-
comparators.forEach((comparator) => {
|
|
1498
|
-
const compver = new SemVer(comparator.semver.version);
|
|
1499
|
-
switch (comparator.operator) {
|
|
1500
|
-
case ">":
|
|
1501
|
-
if (compver.prerelease.length === 0) {
|
|
1502
|
-
compver.patch++;
|
|
1503
|
-
} else {
|
|
1504
|
-
compver.prerelease.push(0);
|
|
1505
|
-
}
|
|
1506
|
-
compver.raw = compver.format();
|
|
1507
|
-
/* fallthrough */
|
|
1508
|
-
case "":
|
|
1509
|
-
case ">=":
|
|
1510
|
-
if (!setMin || gt(compver, setMin)) {
|
|
1511
|
-
setMin = compver;
|
|
1512
|
-
}
|
|
1513
|
-
break;
|
|
1514
|
-
case "<":
|
|
1515
|
-
case "<=":
|
|
1516
|
-
break;
|
|
1517
|
-
/* istanbul ignore next */
|
|
1518
|
-
default:
|
|
1519
|
-
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1520
|
-
}
|
|
1521
|
-
});
|
|
1522
|
-
if (setMin && (!minver || gt(minver, setMin))) {
|
|
1523
|
-
minver = setMin;
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
if (minver && range.test(minver)) {
|
|
1527
|
-
return minver;
|
|
1528
|
-
}
|
|
1529
|
-
return null;
|
|
1530
|
-
};
|
|
1531
|
-
module.exports = minVersion;
|
|
1532
|
-
}
|
|
1533
|
-
});
|
|
1534
|
-
|
|
1535
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js
|
|
1536
|
-
var require_valid2 = __commonJS({
|
|
1537
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js"(exports, module) {
|
|
1538
|
-
"use strict";
|
|
1539
|
-
var Range = require_range();
|
|
1540
|
-
var validRange2 = (range, options) => {
|
|
1541
|
-
try {
|
|
1542
|
-
return new Range(range, options).range || "*";
|
|
1543
|
-
} catch (er) {
|
|
1544
|
-
return null;
|
|
1545
|
-
}
|
|
1546
|
-
};
|
|
1547
|
-
module.exports = validRange2;
|
|
1548
|
-
}
|
|
1549
|
-
});
|
|
1550
|
-
|
|
1551
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js
|
|
1552
|
-
var require_outside = __commonJS({
|
|
1553
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js"(exports, module) {
|
|
1554
|
-
"use strict";
|
|
1555
|
-
var SemVer = require_semver();
|
|
1556
|
-
var Comparator = require_comparator();
|
|
1557
|
-
var { ANY } = Comparator;
|
|
1558
|
-
var Range = require_range();
|
|
1559
|
-
var satisfies2 = require_satisfies();
|
|
1560
|
-
var gt = require_gt();
|
|
1561
|
-
var lt = require_lt();
|
|
1562
|
-
var lte = require_lte();
|
|
1563
|
-
var gte = require_gte();
|
|
1564
|
-
var outside = (version, range, hilo, options) => {
|
|
1565
|
-
version = new SemVer(version, options);
|
|
1566
|
-
range = new Range(range, options);
|
|
1567
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1568
|
-
switch (hilo) {
|
|
1569
|
-
case ">":
|
|
1570
|
-
gtfn = gt;
|
|
1571
|
-
ltefn = lte;
|
|
1572
|
-
ltfn = lt;
|
|
1573
|
-
comp = ">";
|
|
1574
|
-
ecomp = ">=";
|
|
1575
|
-
break;
|
|
1576
|
-
case "<":
|
|
1577
|
-
gtfn = lt;
|
|
1578
|
-
ltefn = gte;
|
|
1579
|
-
ltfn = gt;
|
|
1580
|
-
comp = "<";
|
|
1581
|
-
ecomp = "<=";
|
|
1582
|
-
break;
|
|
1583
|
-
default:
|
|
1584
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
1585
|
-
}
|
|
1586
|
-
if (satisfies2(version, range, options)) {
|
|
1587
|
-
return false;
|
|
1588
|
-
}
|
|
1589
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1590
|
-
const comparators = range.set[i];
|
|
1591
|
-
let high = null;
|
|
1592
|
-
let low = null;
|
|
1593
|
-
comparators.forEach((comparator) => {
|
|
1594
|
-
if (comparator.semver === ANY) {
|
|
1595
|
-
comparator = new Comparator(">=0.0.0");
|
|
1596
|
-
}
|
|
1597
|
-
high = high || comparator;
|
|
1598
|
-
low = low || comparator;
|
|
1599
|
-
if (gtfn(comparator.semver, high.semver, options)) {
|
|
1600
|
-
high = comparator;
|
|
1601
|
-
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
1602
|
-
low = comparator;
|
|
1603
|
-
}
|
|
1604
|
-
});
|
|
1605
|
-
if (high.operator === comp || high.operator === ecomp) {
|
|
1606
|
-
return false;
|
|
1607
|
-
}
|
|
1608
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
|
1609
|
-
return false;
|
|
1610
|
-
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
1611
|
-
return false;
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
return true;
|
|
1615
|
-
};
|
|
1616
|
-
module.exports = outside;
|
|
1617
|
-
}
|
|
1618
|
-
});
|
|
1619
|
-
|
|
1620
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js
|
|
1621
|
-
var require_gtr = __commonJS({
|
|
1622
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js"(exports, module) {
|
|
1623
|
-
"use strict";
|
|
1624
|
-
var outside = require_outside();
|
|
1625
|
-
var gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1626
|
-
module.exports = gtr;
|
|
1627
|
-
}
|
|
1628
|
-
});
|
|
1629
|
-
|
|
1630
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js
|
|
1631
|
-
var require_ltr = __commonJS({
|
|
1632
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js"(exports, module) {
|
|
1633
|
-
"use strict";
|
|
1634
|
-
var outside = require_outside();
|
|
1635
|
-
var ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1636
|
-
module.exports = ltr;
|
|
1637
|
-
}
|
|
1638
|
-
});
|
|
1639
|
-
|
|
1640
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js
|
|
1641
|
-
var require_intersects = __commonJS({
|
|
1642
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js"(exports, module) {
|
|
1643
|
-
"use strict";
|
|
1644
|
-
var Range = require_range();
|
|
1645
|
-
var intersects = (r1, r2, options) => {
|
|
1646
|
-
r1 = new Range(r1, options);
|
|
1647
|
-
r2 = new Range(r2, options);
|
|
1648
|
-
return r1.intersects(r2, options);
|
|
1649
|
-
};
|
|
1650
|
-
module.exports = intersects;
|
|
1651
|
-
}
|
|
1652
|
-
});
|
|
1653
|
-
|
|
1654
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js
|
|
1655
|
-
var require_simplify = __commonJS({
|
|
1656
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js"(exports, module) {
|
|
1657
|
-
"use strict";
|
|
1658
|
-
var satisfies2 = require_satisfies();
|
|
1659
|
-
var compare = require_compare();
|
|
1660
|
-
module.exports = (versions, range, options) => {
|
|
1661
|
-
const set = [];
|
|
1662
|
-
let first = null;
|
|
1663
|
-
let prev = null;
|
|
1664
|
-
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1665
|
-
for (const version of v) {
|
|
1666
|
-
const included = satisfies2(version, range, options);
|
|
1667
|
-
if (included) {
|
|
1668
|
-
prev = version;
|
|
1669
|
-
if (!first) {
|
|
1670
|
-
first = version;
|
|
1671
|
-
}
|
|
1672
|
-
} else {
|
|
1673
|
-
if (prev) {
|
|
1674
|
-
set.push([first, prev]);
|
|
1675
|
-
}
|
|
1676
|
-
prev = null;
|
|
1677
|
-
first = null;
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
if (first) {
|
|
1681
|
-
set.push([first, null]);
|
|
1682
|
-
}
|
|
1683
|
-
const ranges = [];
|
|
1684
|
-
for (const [min, max] of set) {
|
|
1685
|
-
if (min === max) {
|
|
1686
|
-
ranges.push(min);
|
|
1687
|
-
} else if (!max && min === v[0]) {
|
|
1688
|
-
ranges.push("*");
|
|
1689
|
-
} else if (!max) {
|
|
1690
|
-
ranges.push(`>=${min}`);
|
|
1691
|
-
} else if (min === v[0]) {
|
|
1692
|
-
ranges.push(`<=${max}`);
|
|
1693
|
-
} else {
|
|
1694
|
-
ranges.push(`${min} - ${max}`);
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
const simplified = ranges.join(" || ");
|
|
1698
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1699
|
-
return simplified.length < original.length ? simplified : range;
|
|
1700
|
-
};
|
|
1701
|
-
}
|
|
1702
|
-
});
|
|
1703
|
-
|
|
1704
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js
|
|
1705
|
-
var require_subset = __commonJS({
|
|
1706
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js"(exports, module) {
|
|
1707
|
-
"use strict";
|
|
1708
|
-
var Range = require_range();
|
|
1709
|
-
var Comparator = require_comparator();
|
|
1710
|
-
var { ANY } = Comparator;
|
|
1711
|
-
var satisfies2 = require_satisfies();
|
|
1712
|
-
var compare = require_compare();
|
|
1713
|
-
var subset = (sub, dom, options = {}) => {
|
|
1714
|
-
if (sub === dom) {
|
|
1715
|
-
return true;
|
|
1716
|
-
}
|
|
1717
|
-
sub = new Range(sub, options);
|
|
1718
|
-
dom = new Range(dom, options);
|
|
1719
|
-
let sawNonNull = false;
|
|
1720
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
1721
|
-
for (const simpleDom of dom.set) {
|
|
1722
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
1723
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
1724
|
-
if (isSub) {
|
|
1725
|
-
continue OUTER;
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
if (sawNonNull) {
|
|
1729
|
-
return false;
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
return true;
|
|
1733
|
-
};
|
|
1734
|
-
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1735
|
-
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
1736
|
-
var simpleSubset = (sub, dom, options) => {
|
|
1737
|
-
if (sub === dom) {
|
|
1738
|
-
return true;
|
|
1739
|
-
}
|
|
1740
|
-
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
1741
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
1742
|
-
return true;
|
|
1743
|
-
} else if (options.includePrerelease) {
|
|
1744
|
-
sub = minimumVersionWithPreRelease;
|
|
1745
|
-
} else {
|
|
1746
|
-
sub = minimumVersion;
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
1750
|
-
if (options.includePrerelease) {
|
|
1751
|
-
return true;
|
|
1752
|
-
} else {
|
|
1753
|
-
dom = minimumVersion;
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
1757
|
-
let gt, lt;
|
|
1758
|
-
for (const c of sub) {
|
|
1759
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
1760
|
-
gt = higherGT(gt, c, options);
|
|
1761
|
-
} else if (c.operator === "<" || c.operator === "<=") {
|
|
1762
|
-
lt = lowerLT(lt, c, options);
|
|
1763
|
-
} else {
|
|
1764
|
-
eqSet.add(c.semver);
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
if (eqSet.size > 1) {
|
|
1768
|
-
return null;
|
|
1769
|
-
}
|
|
1770
|
-
let gtltComp;
|
|
1771
|
-
if (gt && lt) {
|
|
1772
|
-
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1773
|
-
if (gtltComp > 0) {
|
|
1774
|
-
return null;
|
|
1775
|
-
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
1776
|
-
return null;
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
for (const eq of eqSet) {
|
|
1780
|
-
if (gt && !satisfies2(eq, String(gt), options)) {
|
|
1781
|
-
return null;
|
|
1782
|
-
}
|
|
1783
|
-
if (lt && !satisfies2(eq, String(lt), options)) {
|
|
1784
|
-
return null;
|
|
1785
|
-
}
|
|
1786
|
-
for (const c of dom) {
|
|
1787
|
-
if (!satisfies2(eq, String(c), options)) {
|
|
1788
|
-
return false;
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
return true;
|
|
1792
|
-
}
|
|
1793
|
-
let higher, lower;
|
|
1794
|
-
let hasDomLT, hasDomGT;
|
|
1795
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1796
|
-
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1797
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
1798
|
-
needDomLTPre = false;
|
|
1799
|
-
}
|
|
1800
|
-
for (const c of dom) {
|
|
1801
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1802
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1803
|
-
if (gt) {
|
|
1804
|
-
if (needDomGTPre) {
|
|
1805
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
1806
|
-
needDomGTPre = false;
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
1810
|
-
higher = higherGT(gt, c, options);
|
|
1811
|
-
if (higher === c && higher !== gt) {
|
|
1812
|
-
return false;
|
|
1813
|
-
}
|
|
1814
|
-
} else if (gt.operator === ">=" && !satisfies2(gt.semver, String(c), options)) {
|
|
1815
|
-
return false;
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
if (lt) {
|
|
1819
|
-
if (needDomLTPre) {
|
|
1820
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
1821
|
-
needDomLTPre = false;
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
1825
|
-
lower = lowerLT(lt, c, options);
|
|
1826
|
-
if (lower === c && lower !== lt) {
|
|
1827
|
-
return false;
|
|
1828
|
-
}
|
|
1829
|
-
} else if (lt.operator === "<=" && !satisfies2(lt.semver, String(c), options)) {
|
|
1830
|
-
return false;
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
1834
|
-
return false;
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
1838
|
-
return false;
|
|
1839
|
-
}
|
|
1840
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
1841
|
-
return false;
|
|
1842
|
-
}
|
|
1843
|
-
if (needDomGTPre || needDomLTPre) {
|
|
1844
|
-
return false;
|
|
1845
|
-
}
|
|
1846
|
-
return true;
|
|
1847
|
-
};
|
|
1848
|
-
var higherGT = (a, b, options) => {
|
|
1849
|
-
if (!a) {
|
|
1850
|
-
return b;
|
|
1851
|
-
}
|
|
1852
|
-
const comp = compare(a.semver, b.semver, options);
|
|
1853
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1854
|
-
};
|
|
1855
|
-
var lowerLT = (a, b, options) => {
|
|
1856
|
-
if (!a) {
|
|
1857
|
-
return b;
|
|
1858
|
-
}
|
|
1859
|
-
const comp = compare(a.semver, b.semver, options);
|
|
1860
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1861
|
-
};
|
|
1862
|
-
module.exports = subset;
|
|
1863
|
-
}
|
|
1864
|
-
});
|
|
1865
|
-
|
|
1866
|
-
// ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js
|
|
1867
|
-
var require_semver2 = __commonJS({
|
|
1868
|
-
"../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js"(exports, module) {
|
|
1869
|
-
"use strict";
|
|
1870
|
-
var internalRe = require_re();
|
|
1871
|
-
var constants = require_constants();
|
|
1872
|
-
var SemVer = require_semver();
|
|
1873
|
-
var identifiers = require_identifiers();
|
|
1874
|
-
var parse = require_parse();
|
|
1875
|
-
var valid2 = require_valid();
|
|
1876
|
-
var clean = require_clean();
|
|
1877
|
-
var inc2 = require_inc();
|
|
1878
|
-
var diff = require_diff();
|
|
1879
|
-
var major = require_major();
|
|
1880
|
-
var minor = require_minor();
|
|
1881
|
-
var patch = require_patch();
|
|
1882
|
-
var prerelease = require_prerelease();
|
|
1883
|
-
var compare = require_compare();
|
|
1884
|
-
var rcompare2 = require_rcompare();
|
|
1885
|
-
var compareLoose = require_compare_loose();
|
|
1886
|
-
var compareBuild = require_compare_build();
|
|
1887
|
-
var sort = require_sort();
|
|
1888
|
-
var rsort = require_rsort();
|
|
1889
|
-
var gt = require_gt();
|
|
1890
|
-
var lt = require_lt();
|
|
1891
|
-
var eq = require_eq();
|
|
1892
|
-
var neq = require_neq();
|
|
1893
|
-
var gte = require_gte();
|
|
1894
|
-
var lte = require_lte();
|
|
1895
|
-
var cmp = require_cmp();
|
|
1896
|
-
var coerce = require_coerce();
|
|
1897
|
-
var Comparator = require_comparator();
|
|
1898
|
-
var Range = require_range();
|
|
1899
|
-
var satisfies2 = require_satisfies();
|
|
1900
|
-
var toComparators = require_to_comparators();
|
|
1901
|
-
var maxSatisfying = require_max_satisfying();
|
|
1902
|
-
var minSatisfying = require_min_satisfying();
|
|
1903
|
-
var minVersion = require_min_version();
|
|
1904
|
-
var validRange2 = require_valid2();
|
|
1905
|
-
var outside = require_outside();
|
|
1906
|
-
var gtr = require_gtr();
|
|
1907
|
-
var ltr = require_ltr();
|
|
1908
|
-
var intersects = require_intersects();
|
|
1909
|
-
var simplifyRange = require_simplify();
|
|
1910
|
-
var subset = require_subset();
|
|
1911
|
-
module.exports = {
|
|
1912
|
-
parse,
|
|
1913
|
-
valid: valid2,
|
|
1914
|
-
clean,
|
|
1915
|
-
inc: inc2,
|
|
1916
|
-
diff,
|
|
1917
|
-
major,
|
|
1918
|
-
minor,
|
|
1919
|
-
patch,
|
|
1920
|
-
prerelease,
|
|
1921
|
-
compare,
|
|
1922
|
-
rcompare: rcompare2,
|
|
1923
|
-
compareLoose,
|
|
1924
|
-
compareBuild,
|
|
1925
|
-
sort,
|
|
1926
|
-
rsort,
|
|
1927
|
-
gt,
|
|
1928
|
-
lt,
|
|
1929
|
-
eq,
|
|
1930
|
-
neq,
|
|
1931
|
-
gte,
|
|
1932
|
-
lte,
|
|
1933
|
-
cmp,
|
|
1934
|
-
coerce,
|
|
1935
|
-
Comparator,
|
|
1936
|
-
Range,
|
|
1937
|
-
satisfies: satisfies2,
|
|
1938
|
-
toComparators,
|
|
1939
|
-
maxSatisfying,
|
|
1940
|
-
minSatisfying,
|
|
1941
|
-
minVersion,
|
|
1942
|
-
validRange: validRange2,
|
|
1943
|
-
outside,
|
|
1944
|
-
gtr,
|
|
1945
|
-
ltr,
|
|
1946
|
-
intersects,
|
|
1947
|
-
simplifyRange,
|
|
1948
|
-
subset,
|
|
1949
|
-
SemVer,
|
|
1950
|
-
re: internalRe.re,
|
|
1951
|
-
src: internalRe.src,
|
|
1952
|
-
tokens: internalRe.t,
|
|
1953
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
1954
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
1955
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1956
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1957
|
-
};
|
|
1958
|
-
}
|
|
1959
|
-
});
|
|
1960
|
-
|
|
1961
1
|
// src/module-artifact.ts
|
|
1962
2
|
import { parse as parseYaml2 } from "yaml";
|
|
1963
3
|
import { createHash } from "node:crypto";
|
|
@@ -1978,8 +18,77 @@ var RegistryError = class extends Error {
|
|
|
1978
18
|
var ALLOWED = Object.freeze({ allowed: true });
|
|
1979
19
|
var NO_POLICIES = Object.freeze([]);
|
|
1980
20
|
|
|
1981
|
-
// ../kernel/src/
|
|
1982
|
-
var
|
|
21
|
+
// ../kernel/src/version-range.ts
|
|
22
|
+
var VERSION = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
23
|
+
var COMPARATOR = /^(\^|~|>=|<=|>|<|=)?\s*(.+)$/;
|
|
24
|
+
function parseVersion(value) {
|
|
25
|
+
const found = VERSION.exec(value.trim());
|
|
26
|
+
return found ? [Number(found[1]), Number(found[2]), Number(found[3])] : null;
|
|
27
|
+
}
|
|
28
|
+
function compareVersions(left, right) {
|
|
29
|
+
for (let part = 0; part < 3; part += 1) {
|
|
30
|
+
if (left[part] !== right[part]) return left[part] - right[part];
|
|
31
|
+
}
|
|
32
|
+
return 0;
|
|
33
|
+
}
|
|
34
|
+
function upperBound(prefix, version) {
|
|
35
|
+
const [major, minor] = version;
|
|
36
|
+
if (prefix === "~") return [major, minor + 1, 0];
|
|
37
|
+
if (major > 0) return [major + 1, 0, 0];
|
|
38
|
+
if (minor > 0) return [major, minor + 1, 0];
|
|
39
|
+
return [major, minor, version[2] + 1];
|
|
40
|
+
}
|
|
41
|
+
function comparatorMatches(version, comparator) {
|
|
42
|
+
const found = COMPARATOR.exec(comparator);
|
|
43
|
+
if (!found) return false;
|
|
44
|
+
const operator = found[1] ?? "=";
|
|
45
|
+
const bound = parseVersion(found[2]);
|
|
46
|
+
if (!bound) return false;
|
|
47
|
+
const order = compareVersions(version, bound);
|
|
48
|
+
switch (operator) {
|
|
49
|
+
case "^":
|
|
50
|
+
case "~":
|
|
51
|
+
return order >= 0 && compareVersions(version, upperBound(operator, bound)) < 0;
|
|
52
|
+
case ">=":
|
|
53
|
+
return order >= 0;
|
|
54
|
+
case "<=":
|
|
55
|
+
return order <= 0;
|
|
56
|
+
case ">":
|
|
57
|
+
return order > 0;
|
|
58
|
+
case "<":
|
|
59
|
+
return order < 0;
|
|
60
|
+
default:
|
|
61
|
+
return order === 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function comparators(range) {
|
|
65
|
+
const alternatives = range.split("||").map((part) => part.trim());
|
|
66
|
+
const parsed = [];
|
|
67
|
+
for (const alternative of alternatives) {
|
|
68
|
+
if (alternative === "" || alternative === "*") {
|
|
69
|
+
parsed.push([]);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const terms = alternative.split(/\s+/);
|
|
73
|
+
for (const term of terms) {
|
|
74
|
+
const found = COMPARATOR.exec(term);
|
|
75
|
+
if (!found || parseVersion(found[2]) === null) return null;
|
|
76
|
+
}
|
|
77
|
+
parsed.push(terms);
|
|
78
|
+
}
|
|
79
|
+
return parsed;
|
|
80
|
+
}
|
|
81
|
+
function isValidRange(range) {
|
|
82
|
+
return comparators(range) !== null;
|
|
83
|
+
}
|
|
84
|
+
function rangeSatisfies(version, range) {
|
|
85
|
+
const parsed = parseVersion(version);
|
|
86
|
+
const alternatives = comparators(range);
|
|
87
|
+
if (!parsed || !alternatives) return false;
|
|
88
|
+
return alternatives.some(
|
|
89
|
+
(terms) => terms.every((term) => comparatorMatches(parsed, term))
|
|
90
|
+
);
|
|
91
|
+
}
|
|
1983
92
|
|
|
1984
93
|
// ../contracts/schemas/blueprint.schema.json
|
|
1985
94
|
var blueprint_schema_default = {
|
|
@@ -2478,6 +587,17 @@ var module_spec_schema_default = {
|
|
|
2478
587
|
type: "array",
|
|
2479
588
|
items: { $ref: "#/$defs/decision" },
|
|
2480
589
|
uniqueItems: true
|
|
590
|
+
},
|
|
591
|
+
research: { $ref: "#/$defs/research" },
|
|
592
|
+
adapters: {
|
|
593
|
+
type: "array",
|
|
594
|
+
items: { $ref: "#/$defs/adapter" },
|
|
595
|
+
uniqueItems: true
|
|
596
|
+
},
|
|
597
|
+
templates: {
|
|
598
|
+
type: "array",
|
|
599
|
+
items: { $ref: "#/$defs/template" },
|
|
600
|
+
uniqueItems: true
|
|
2481
601
|
}
|
|
2482
602
|
},
|
|
2483
603
|
allOf: [
|
|
@@ -2495,7 +615,10 @@ var module_spec_schema_default = {
|
|
|
2495
615
|
settings: false,
|
|
2496
616
|
agentTools: false,
|
|
2497
617
|
outOfScope: false,
|
|
2498
|
-
decisions: false
|
|
618
|
+
decisions: false,
|
|
619
|
+
research: false,
|
|
620
|
+
adapters: false,
|
|
621
|
+
templates: false
|
|
2499
622
|
}
|
|
2500
623
|
}
|
|
2501
624
|
}
|
|
@@ -2701,6 +824,113 @@ var module_spec_schema_default = {
|
|
|
2701
824
|
answer: { type: "string", minLength: 1 },
|
|
2702
825
|
decidedBy: { enum: ["user", "default"] }
|
|
2703
826
|
}
|
|
827
|
+
},
|
|
828
|
+
domain: {
|
|
829
|
+
type: "string",
|
|
830
|
+
maxLength: 253,
|
|
831
|
+
pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"
|
|
832
|
+
},
|
|
833
|
+
research: {
|
|
834
|
+
type: "object",
|
|
835
|
+
additionalProperties: false,
|
|
836
|
+
required: ["adapter", "evidenceOwner"],
|
|
837
|
+
properties: {
|
|
838
|
+
adapter: {
|
|
839
|
+
enum: [
|
|
840
|
+
"model-native",
|
|
841
|
+
"searxng",
|
|
842
|
+
"firecrawl",
|
|
843
|
+
"connector",
|
|
844
|
+
"recorded"
|
|
845
|
+
]
|
|
846
|
+
},
|
|
847
|
+
allowDomains: {
|
|
848
|
+
type: "array",
|
|
849
|
+
items: { $ref: "#/$defs/domain" },
|
|
850
|
+
uniqueItems: true
|
|
851
|
+
},
|
|
852
|
+
denyDomains: {
|
|
853
|
+
type: "array",
|
|
854
|
+
items: { $ref: "#/$defs/domain" },
|
|
855
|
+
uniqueItems: true
|
|
856
|
+
},
|
|
857
|
+
monthlyQueryBudget: { type: "integer", minimum: 1 },
|
|
858
|
+
evidenceOwner: { $ref: "#/$defs/entityId" }
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
adapter: {
|
|
862
|
+
type: "object",
|
|
863
|
+
additionalProperties: false,
|
|
864
|
+
required: [
|
|
865
|
+
"id",
|
|
866
|
+
"direction",
|
|
867
|
+
"connector",
|
|
868
|
+
"operation",
|
|
869
|
+
"port",
|
|
870
|
+
"mapping"
|
|
871
|
+
],
|
|
872
|
+
properties: {
|
|
873
|
+
id: {
|
|
874
|
+
type: "string",
|
|
875
|
+
pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
|
|
876
|
+
},
|
|
877
|
+
direction: { enum: ["source", "sink"] },
|
|
878
|
+
connector: { type: "string", pattern: "^[a-z][a-z0-9-]{0,95}$" },
|
|
879
|
+
operation: { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" },
|
|
880
|
+
port: {
|
|
881
|
+
type: "string",
|
|
882
|
+
maxLength: 96,
|
|
883
|
+
pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
|
|
884
|
+
},
|
|
885
|
+
schedule: {
|
|
886
|
+
anyOf: [
|
|
887
|
+
{ type: "null" },
|
|
888
|
+
{
|
|
889
|
+
type: "string",
|
|
890
|
+
maxLength: 100,
|
|
891
|
+
pattern: "^[0-9a-z*,/-]+( [0-9a-z*,/-]+){4}$"
|
|
892
|
+
}
|
|
893
|
+
]
|
|
894
|
+
},
|
|
895
|
+
mapping: {
|
|
896
|
+
type: "array",
|
|
897
|
+
minItems: 1,
|
|
898
|
+
items: { $ref: "#/$defs/adapterMapping" },
|
|
899
|
+
uniqueItems: true
|
|
900
|
+
},
|
|
901
|
+
recorded: {
|
|
902
|
+
type: "string",
|
|
903
|
+
pattern: "^adapters/[a-z0-9][a-z0-9-]*\\.recorded\\.json$"
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
adapterMapping: {
|
|
908
|
+
type: "object",
|
|
909
|
+
additionalProperties: false,
|
|
910
|
+
required: ["to", "transform"],
|
|
911
|
+
properties: {
|
|
912
|
+
from: { type: "string", minLength: 1 },
|
|
913
|
+
to: { type: "string", minLength: 1 },
|
|
914
|
+
transform: { enum: ["rename", "constant", "format", "lookup"] },
|
|
915
|
+
value: {
|
|
916
|
+
anyOf: [{ type: "null" }, { type: "string", minLength: 1 }]
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
},
|
|
920
|
+
template: {
|
|
921
|
+
type: "object",
|
|
922
|
+
additionalProperties: false,
|
|
923
|
+
required: ["id", "title", "inputEntity", "format", "body"],
|
|
924
|
+
properties: {
|
|
925
|
+
id: { $ref: "#/$defs/entityId" },
|
|
926
|
+
title: { type: "string", minLength: 1 },
|
|
927
|
+
inputEntity: { $ref: "#/$defs/entityId" },
|
|
928
|
+
format: { enum: ["pdf", "docx"] },
|
|
929
|
+
body: {
|
|
930
|
+
type: "string",
|
|
931
|
+
pattern: "^templates/[a-z][a-z0-9-]*\\.md$"
|
|
932
|
+
}
|
|
933
|
+
}
|
|
2704
934
|
}
|
|
2705
935
|
}
|
|
2706
936
|
};
|
|
@@ -2867,6 +1097,15 @@ var project_schema_default = {
|
|
|
2867
1097
|
$ref: "#/$defs/githubAccount"
|
|
2868
1098
|
},
|
|
2869
1099
|
uniqueItems: true
|
|
1100
|
+
},
|
|
1101
|
+
labels: {
|
|
1102
|
+
type: "array",
|
|
1103
|
+
maxItems: 10,
|
|
1104
|
+
items: {
|
|
1105
|
+
type: "string",
|
|
1106
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9 ._:-]{0,49}$"
|
|
1107
|
+
},
|
|
1108
|
+
uniqueItems: true
|
|
2870
1109
|
}
|
|
2871
1110
|
}
|
|
2872
1111
|
},
|
|
@@ -3114,23 +1353,101 @@ var projectSchema = project_schema_default;
|
|
|
3114
1353
|
var moduleCatalogSchema = module_catalog_schema_default;
|
|
3115
1354
|
var moduleArtifactSchema = module_artifact_schema_default;
|
|
3116
1355
|
|
|
1356
|
+
// ../contracts/src/translations.ts
|
|
1357
|
+
var PLURAL_CATEGORIES = [
|
|
1358
|
+
"zero",
|
|
1359
|
+
"one",
|
|
1360
|
+
"two",
|
|
1361
|
+
"few",
|
|
1362
|
+
"many",
|
|
1363
|
+
"other"
|
|
1364
|
+
];
|
|
1365
|
+
var WHOLE_NUMBER_SAMPLES = [
|
|
1366
|
+
...Array.from({ length: 200 }, (_, index) => index),
|
|
1367
|
+
1e3,
|
|
1368
|
+
1e4,
|
|
1369
|
+
1e5,
|
|
1370
|
+
1e6,
|
|
1371
|
+
1e7,
|
|
1372
|
+
1e8,
|
|
1373
|
+
1e9
|
|
1374
|
+
];
|
|
1375
|
+
function requiredPluralCategories(locale) {
|
|
1376
|
+
const rules = new Intl.PluralRules(locale);
|
|
1377
|
+
const selected = /* @__PURE__ */ new Set(["other"]);
|
|
1378
|
+
for (const sample of WHOLE_NUMBER_SAMPLES) selected.add(rules.select(sample));
|
|
1379
|
+
return PLURAL_CATEGORIES.filter((category) => selected.has(category));
|
|
1380
|
+
}
|
|
1381
|
+
function pluralMember(bundle, key) {
|
|
1382
|
+
const dot = key.lastIndexOf(".");
|
|
1383
|
+
if (dot <= 0) return null;
|
|
1384
|
+
const category = key.slice(dot + 1);
|
|
1385
|
+
if (!PLURAL_CATEGORIES.includes(category)) return null;
|
|
1386
|
+
const base = key.slice(0, dot);
|
|
1387
|
+
if (!Object.hasOwn(bundle, base + ".other")) return null;
|
|
1388
|
+
const inflected = PLURAL_CATEGORIES.some(
|
|
1389
|
+
(other) => other !== "other" && Object.hasOwn(bundle, base + "." + other)
|
|
1390
|
+
);
|
|
1391
|
+
return inflected ? { base, category } : null;
|
|
1392
|
+
}
|
|
1393
|
+
function translationKeys(bundle) {
|
|
1394
|
+
const keys = /* @__PURE__ */ new Set();
|
|
1395
|
+
for (const key of Object.keys(bundle)) {
|
|
1396
|
+
keys.add(pluralMember(bundle, key)?.base ?? key);
|
|
1397
|
+
}
|
|
1398
|
+
return [...keys].sort();
|
|
1399
|
+
}
|
|
1400
|
+
function pluralFamilyIssues(bundle, locale) {
|
|
1401
|
+
const families = /* @__PURE__ */ new Map();
|
|
1402
|
+
for (const key of Object.keys(bundle)) {
|
|
1403
|
+
const member = pluralMember(bundle, key);
|
|
1404
|
+
if (member === null) continue;
|
|
1405
|
+
const categories = families.get(member.base) ?? /* @__PURE__ */ new Set();
|
|
1406
|
+
categories.add(member.category);
|
|
1407
|
+
families.set(member.base, categories);
|
|
1408
|
+
}
|
|
1409
|
+
const required = requiredPluralCategories(locale);
|
|
1410
|
+
const known = new Intl.PluralRules(
|
|
1411
|
+
locale
|
|
1412
|
+
).resolvedOptions().pluralCategories;
|
|
1413
|
+
const issues = [];
|
|
1414
|
+
for (const base of [...families.keys()].sort()) {
|
|
1415
|
+
const categories = families.get(base);
|
|
1416
|
+
const missing = required.filter((category) => !categories.has(category));
|
|
1417
|
+
if (missing.length > 0) {
|
|
1418
|
+
issues.push(
|
|
1419
|
+
`${base} lacks ${missing.map((category) => base + "." + category).join(", ")} for ${locale}`
|
|
1420
|
+
);
|
|
1421
|
+
}
|
|
1422
|
+
for (const category of categories) {
|
|
1423
|
+
if (!known.includes(category)) {
|
|
1424
|
+
issues.push(`${base}.${category} is never selected for ${locale}`);
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
return issues;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
3117
1431
|
// ../contracts/src/index.ts
|
|
3118
|
-
var PLATFORM_API_VERSION = "0.1.
|
|
1432
|
+
var PLATFORM_API_VERSION = "0.1.22";
|
|
3119
1433
|
|
|
3120
1434
|
// ../kernel/src/module-compatibility.ts
|
|
3121
1435
|
function satisfiesModuleVersion(version, range) {
|
|
3122
|
-
return (
|
|
1436
|
+
return rangeSatisfies(version, range);
|
|
3123
1437
|
}
|
|
3124
1438
|
function compareModuleVersions(left, right) {
|
|
3125
|
-
|
|
1439
|
+
const first = parseVersion(left);
|
|
1440
|
+
const second = parseVersion(right);
|
|
1441
|
+
if (!first || !second) return 0;
|
|
1442
|
+
return compareVersions(second, first);
|
|
3126
1443
|
}
|
|
3127
1444
|
function assertModuleCompatibility(manifest, platformVersion = PLATFORM_API_VERSION) {
|
|
3128
|
-
if (
|
|
1445
|
+
if (parseVersion(manifest.version) === null)
|
|
3129
1446
|
throw new RegistryError(
|
|
3130
1447
|
"MODULE_VERSION_INVALID",
|
|
3131
1448
|
`Invalid version for ${manifest.id}: ${manifest.version}`
|
|
3132
1449
|
);
|
|
3133
|
-
if (manifest.platformApi !== void 0 && (!(
|
|
1450
|
+
if (manifest.platformApi !== void 0 && (!isValidRange(manifest.platformApi) || platformVersion !== null && !satisfiesModuleVersion(platformVersion, manifest.platformApi))) {
|
|
3134
1451
|
throw new RegistryError(
|
|
3135
1452
|
"MODULE_PLATFORM_INCOMPATIBLE",
|
|
3136
1453
|
`${manifest.id} requires platform API ${manifest.platformApi}; available ${PLATFORM_API_VERSION}.`
|
|
@@ -3138,7 +1455,7 @@ function assertModuleCompatibility(manifest, platformVersion = PLATFORM_API_VERS
|
|
|
3138
1455
|
}
|
|
3139
1456
|
const ids = /* @__PURE__ */ new Set();
|
|
3140
1457
|
for (const dependency of manifest.dependencies) {
|
|
3141
|
-
if (!dependency.range.trim() || !(
|
|
1458
|
+
if (!dependency.range.trim() || !isValidRange(dependency.range))
|
|
3142
1459
|
throw new RegistryError(
|
|
3143
1460
|
"MODULE_RANGE_INVALID",
|
|
3144
1461
|
`${manifest.id} declares an invalid range for ${dependency.id}: ${dependency.range}`
|
|
@@ -3298,6 +1615,10 @@ var validators = {
|
|
|
3298
1615
|
cliExtension: ajv.compile(cliExtensionSchema),
|
|
3299
1616
|
platformSpec: ajv.compile(platformSpecSchema)
|
|
3300
1617
|
};
|
|
1618
|
+
var MONTH_NAMES = "jan feb mar apr may jun jul aug sep oct nov dec".split(
|
|
1619
|
+
" "
|
|
1620
|
+
);
|
|
1621
|
+
var WEEKDAY_NAMES = "sun mon tue wed thu fri sat".split(" ");
|
|
3301
1622
|
var SKIPPED_DIRECTORIES = /* @__PURE__ */ new Set([
|
|
3302
1623
|
".git",
|
|
3303
1624
|
".flowdular",
|
|
@@ -3796,7 +2117,7 @@ import { dirname as dirname6, join as join6, relative as relative5 } from "node:
|
|
|
3796
2117
|
import { createRequire } from "node:module";
|
|
3797
2118
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
3798
2119
|
import { dirname as dirname4, join as join3 } from "node:path";
|
|
3799
|
-
var SDK_VERSION = "0.
|
|
2120
|
+
var SDK_VERSION = "0.4.1";
|
|
3800
2121
|
function npmPackage(specifier) {
|
|
3801
2122
|
return specifier.startsWith("@") ? specifier.split("/").slice(0, 2).join("/") : specifier.split("/")[0];
|
|
3802
2123
|
}
|
|
@@ -3900,6 +2221,115 @@ async function findModuleFiles(workspace) {
|
|
|
3900
2221
|
import { access as access2, readFile as readFile7, readdir as readdir3 } from "node:fs/promises";
|
|
3901
2222
|
import { dirname as dirname5, join as join5, relative as relative4 } from "node:path";
|
|
3902
2223
|
import { parse as parseYaml3 } from "yaml";
|
|
2224
|
+
|
|
2225
|
+
// src/dom-properties.ts
|
|
2226
|
+
var DOM_PROPERTY_SPELLINGS = [
|
|
2227
|
+
"acceptCharset",
|
|
2228
|
+
"allowFullScreen",
|
|
2229
|
+
"autoCapitalize",
|
|
2230
|
+
"autoComplete",
|
|
2231
|
+
"autoCorrect",
|
|
2232
|
+
"autoFocus",
|
|
2233
|
+
"autoPlay",
|
|
2234
|
+
"charSet",
|
|
2235
|
+
"contentEditable",
|
|
2236
|
+
"crossOrigin",
|
|
2237
|
+
"defaultChecked",
|
|
2238
|
+
"defaultValue",
|
|
2239
|
+
"disablePictureInPicture",
|
|
2240
|
+
"disableRemotePlayback",
|
|
2241
|
+
"encType",
|
|
2242
|
+
"fetchPriority",
|
|
2243
|
+
"formAction",
|
|
2244
|
+
"formEncType",
|
|
2245
|
+
"formMethod",
|
|
2246
|
+
"formNoValidate",
|
|
2247
|
+
"formTarget",
|
|
2248
|
+
"httpEquiv",
|
|
2249
|
+
"imageSizes",
|
|
2250
|
+
"imageSrcSet",
|
|
2251
|
+
"inputMode",
|
|
2252
|
+
"itemID",
|
|
2253
|
+
"itemProp",
|
|
2254
|
+
"itemRef",
|
|
2255
|
+
"itemScope",
|
|
2256
|
+
"itemType",
|
|
2257
|
+
"maxLength",
|
|
2258
|
+
"noModule",
|
|
2259
|
+
"noValidate",
|
|
2260
|
+
"playsInline",
|
|
2261
|
+
"readOnly",
|
|
2262
|
+
"referrerPolicy",
|
|
2263
|
+
"spellCheck",
|
|
2264
|
+
"srcDoc",
|
|
2265
|
+
"srcLang",
|
|
2266
|
+
"srcSet",
|
|
2267
|
+
"tabIndex",
|
|
2268
|
+
"viewBox"
|
|
2269
|
+
];
|
|
2270
|
+
var SPELLINGS = new Map(
|
|
2271
|
+
DOM_PROPERTY_SPELLINGS.map((name) => [name.toLowerCase(), name])
|
|
2272
|
+
);
|
|
2273
|
+
function hostTagAttributes(source) {
|
|
2274
|
+
const tags = [];
|
|
2275
|
+
for (const match of source.matchAll(/<[a-z][a-z0-9-]*/g)) {
|
|
2276
|
+
const start = match.index + match[0].length;
|
|
2277
|
+
let depth = 0;
|
|
2278
|
+
let quote = "";
|
|
2279
|
+
let text = "";
|
|
2280
|
+
let end = start;
|
|
2281
|
+
for (; end < source.length; end += 1) {
|
|
2282
|
+
const character = source[end];
|
|
2283
|
+
if (quote !== "") {
|
|
2284
|
+
if (character === quote) quote = "";
|
|
2285
|
+
text += " ";
|
|
2286
|
+
continue;
|
|
2287
|
+
}
|
|
2288
|
+
if (depth > 0) {
|
|
2289
|
+
if (character === "{") depth += 1;
|
|
2290
|
+
else if (character === "}") depth -= 1;
|
|
2291
|
+
text += depth === 0 ? character : " ";
|
|
2292
|
+
continue;
|
|
2293
|
+
}
|
|
2294
|
+
if (character === "{") {
|
|
2295
|
+
depth = 1;
|
|
2296
|
+
text += character;
|
|
2297
|
+
continue;
|
|
2298
|
+
}
|
|
2299
|
+
if (character === '"' || character === "'") {
|
|
2300
|
+
quote = character;
|
|
2301
|
+
text += character;
|
|
2302
|
+
continue;
|
|
2303
|
+
}
|
|
2304
|
+
if (character === ">") break;
|
|
2305
|
+
text += character;
|
|
2306
|
+
}
|
|
2307
|
+
tags.push({ start, text });
|
|
2308
|
+
}
|
|
2309
|
+
return tags;
|
|
2310
|
+
}
|
|
2311
|
+
function domPropertyMisspellings(source) {
|
|
2312
|
+
const found = [];
|
|
2313
|
+
for (const tag of hostTagAttributes(source)) {
|
|
2314
|
+
for (const attribute of tag.text.matchAll(
|
|
2315
|
+
/(?<=\s)([A-Za-z][A-Za-z-]*)=/g
|
|
2316
|
+
)) {
|
|
2317
|
+
const name = attribute[1];
|
|
2318
|
+
const expected = SPELLINGS.get(name.toLowerCase());
|
|
2319
|
+
if (expected === void 0 || expected === name) continue;
|
|
2320
|
+
const index = tag.start + attribute.index;
|
|
2321
|
+
found.push({
|
|
2322
|
+
name,
|
|
2323
|
+
expected,
|
|
2324
|
+
index,
|
|
2325
|
+
line: source.slice(0, index).split("\n").length
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
return found.sort((left, right) => left.index - right.index);
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
// src/module-validate.ts
|
|
3903
2333
|
function issue(code, message, path, severity = "error") {
|
|
3904
2334
|
return { code, message, path, severity };
|
|
3905
2335
|
}
|
|
@@ -4088,6 +2518,7 @@ async function translationIssues(moduleRoot, manifest, projectLocales) {
|
|
|
4088
2518
|
}
|
|
4089
2519
|
if (!manifest.capabilities.includes("translations")) return issues;
|
|
4090
2520
|
const keySets = /* @__PURE__ */ new Map();
|
|
2521
|
+
const referenceBundleKeys = /* @__PURE__ */ new Set();
|
|
4091
2522
|
for (const locale of manifest.locales) {
|
|
4092
2523
|
const path = `translations/${locale}.json`;
|
|
4093
2524
|
if (!await exists(join5(moduleRoot, path))) {
|
|
@@ -4105,7 +2536,21 @@ async function translationIssues(moduleRoot, manifest, projectLocales) {
|
|
|
4105
2536
|
if (!bundle || typeof bundle !== "object" || Array.isArray(bundle)) {
|
|
4106
2537
|
throw new Error("Expected a JSON object.");
|
|
4107
2538
|
}
|
|
4108
|
-
|
|
2539
|
+
const strings = bundle;
|
|
2540
|
+
keySets.set(locale, translationKeys(strings));
|
|
2541
|
+
if (keySets.size === 1) {
|
|
2542
|
+
for (const key of Object.keys(strings)) referenceBundleKeys.add(key);
|
|
2543
|
+
}
|
|
2544
|
+
const plurals = pluralFamilyIssues(strings, locale);
|
|
2545
|
+
if (plurals.length > 0) {
|
|
2546
|
+
issues.push(
|
|
2547
|
+
issue(
|
|
2548
|
+
"TRANSLATION_PLURAL_INCOMPLETE",
|
|
2549
|
+
`${path} plural families do not match the ${locale} plural rules: ${plurals.join("; ")}.`,
|
|
2550
|
+
path
|
|
2551
|
+
)
|
|
2552
|
+
);
|
|
2553
|
+
}
|
|
4109
2554
|
} catch (error) {
|
|
4110
2555
|
issues.push(
|
|
4111
2556
|
issue(
|
|
@@ -4134,7 +2579,7 @@ async function translationIssues(moduleRoot, manifest, projectLocales) {
|
|
|
4134
2579
|
)
|
|
4135
2580
|
);
|
|
4136
2581
|
}
|
|
4137
|
-
const referenceKeys = new Set(reference[1]);
|
|
2582
|
+
const referenceKeys = /* @__PURE__ */ new Set([...reference[1], ...referenceBundleKeys]);
|
|
4138
2583
|
const files = await clientSourceFiles(moduleRoot);
|
|
4139
2584
|
if (files.length > 0) {
|
|
4140
2585
|
const namespace = manifest.id.split(".")[0] ?? manifest.id;
|
|
@@ -4166,6 +2611,21 @@ async function translationIssues(moduleRoot, manifest, projectLocales) {
|
|
|
4166
2611
|
}
|
|
4167
2612
|
return issues;
|
|
4168
2613
|
}
|
|
2614
|
+
function filtersTags(source) {
|
|
2615
|
+
const tags = [];
|
|
2616
|
+
for (const match of source.matchAll(/<Filters\b/g)) {
|
|
2617
|
+
let depth = 0;
|
|
2618
|
+
let end = match.index + match[0].length;
|
|
2619
|
+
for (; end < source.length; end += 1) {
|
|
2620
|
+
const character = source[end];
|
|
2621
|
+
if (character === "{") depth += 1;
|
|
2622
|
+
else if (character === "}") depth -= 1;
|
|
2623
|
+
else if (character === ">" && depth === 0) break;
|
|
2624
|
+
}
|
|
2625
|
+
tags.push(source.slice(match.index, end));
|
|
2626
|
+
}
|
|
2627
|
+
return tags;
|
|
2628
|
+
}
|
|
4169
2629
|
async function userInterfaceIssues(moduleRoot) {
|
|
4170
2630
|
const issues = [];
|
|
4171
2631
|
for (const file of await clientSourceFiles(moduleRoot)) {
|
|
@@ -4189,6 +2649,27 @@ async function userInterfaceIssues(moduleRoot) {
|
|
|
4189
2649
|
)
|
|
4190
2650
|
);
|
|
4191
2651
|
}
|
|
2652
|
+
const misspelled = domPropertyMisspellings(source);
|
|
2653
|
+
if (misspelled.length > 0) {
|
|
2654
|
+
issues.push(
|
|
2655
|
+
issue(
|
|
2656
|
+
"DOM_PROPERTY_CASING",
|
|
2657
|
+
"Host elements use Octane's DOM property spelling: " + misspelled.map(
|
|
2658
|
+
(found) => `line ${found.line} ${found.name} as ${found.expected}`
|
|
2659
|
+
).join(", ") + ".",
|
|
2660
|
+
path
|
|
2661
|
+
)
|
|
2662
|
+
);
|
|
2663
|
+
}
|
|
2664
|
+
if (filtersTags(source).some((tag) => !/\slabel=/.test(tag))) {
|
|
2665
|
+
issues.push(
|
|
2666
|
+
issue(
|
|
2667
|
+
"FILTERS_LABEL_MISSING",
|
|
2668
|
+
'Filters from @flowdular/ui needs a translated label; without one it shows the English word "Filters" in every locale.',
|
|
2669
|
+
path
|
|
2670
|
+
)
|
|
2671
|
+
);
|
|
2672
|
+
}
|
|
4192
2673
|
}
|
|
4193
2674
|
return issues;
|
|
4194
2675
|
}
|