flowdular 0.4.0 → 0.4.3

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.
Files changed (3) hide show
  1. package/dist/distribution.js +434 -2064
  2. package/dist/index.js +4209 -5554
  3. package/package.json +2 -2
@@ -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/module-compatibility.ts
1982
- var import_semver = __toESM(require_semver2(), 1);
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 = {
@@ -2326,8 +435,12 @@ var module_spec_schema_default = {
2326
435
  "locales"
2327
436
  ],
2328
437
  properties: {
2329
- $schema: { type: "string" },
2330
- schemaVersion: { enum: [1, 2] },
438
+ $schema: {
439
+ type: "string"
440
+ },
441
+ schemaVersion: {
442
+ enum: [1, 2]
443
+ },
2331
444
  id: {
2332
445
  type: "string",
2333
446
  pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
@@ -2339,9 +452,17 @@ var module_spec_schema_default = {
2339
452
  status: {
2340
453
  enum: ["draft", "in-review", "approved", "implemented", "deprecated"]
2341
454
  },
2342
- name: { type: "string", minLength: 1 },
2343
- description: { type: "string", minLength: 1 },
2344
- profile: { enum: ["full", "headless", "ui", "integration"] },
455
+ name: {
456
+ type: "string",
457
+ minLength: 1
458
+ },
459
+ description: {
460
+ type: "string",
461
+ minLength: 1
462
+ },
463
+ profile: {
464
+ enum: ["full", "headless", "ui", "integration"]
465
+ },
2345
466
  capabilities: {
2346
467
  type: "array",
2347
468
  items: {
@@ -2363,8 +484,12 @@ var module_spec_schema_default = {
2363
484
  additionalProperties: false,
2364
485
  required: ["id", "range"],
2365
486
  properties: {
2366
- id: { type: "string" },
2367
- range: { type: "string" }
487
+ id: {
488
+ type: "string"
489
+ },
490
+ range: {
491
+ type: "string"
492
+ }
2368
493
  }
2369
494
  }
2370
495
  },
@@ -2387,20 +512,29 @@ var module_spec_schema_default = {
2387
512
  type: "string",
2388
513
  pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
2389
514
  },
2390
- optional: { type: "boolean" }
515
+ optional: {
516
+ type: "boolean"
517
+ }
2391
518
  }
2392
519
  }
2393
520
  },
2394
- tenancy: { enum: ["required", "optional", "none"] },
521
+ tenancy: {
522
+ enum: ["required", "optional", "none"]
523
+ },
2395
524
  locales: {
2396
525
  type: "array",
2397
526
  minItems: 1,
2398
- items: { type: "string" },
527
+ items: {
528
+ type: "string"
529
+ },
2399
530
  uniqueItems: true
2400
531
  },
2401
532
  invariants: {
2402
533
  type: "array",
2403
- items: { type: "string", minLength: 1 },
534
+ items: {
535
+ type: "string",
536
+ minLength: 1
537
+ },
2404
538
  uniqueItems: true
2405
539
  },
2406
540
  permissions: {
@@ -2414,14 +548,20 @@ var module_spec_schema_default = {
2414
548
  type: "string",
2415
549
  pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
2416
550
  },
2417
- description: { type: "string", minLength: 1 }
551
+ description: {
552
+ type: "string",
553
+ minLength: 1
554
+ }
2418
555
  }
2419
556
  },
2420
557
  uniqueItems: true
2421
558
  },
2422
559
  dataOwnership: {
2423
560
  type: "array",
2424
- items: { type: "string", minLength: 1 },
561
+ items: {
562
+ type: "string",
563
+ minLength: 1
564
+ },
2425
565
  uniqueItems: true
2426
566
  },
2427
567
  acceptanceScenarios: {
@@ -2431,63 +571,98 @@ var module_spec_schema_default = {
2431
571
  additionalProperties: false,
2432
572
  required: ["id", "given", "when", "then"],
2433
573
  properties: {
2434
- id: { type: "string", pattern: "^[A-Z][A-Z0-9-]+$" },
2435
- given: { type: "string", minLength: 1 },
2436
- when: { type: "string", minLength: 1 },
2437
- then: { type: "string", minLength: 1 }
574
+ id: {
575
+ type: "string",
576
+ pattern: "^[A-Z][A-Z0-9-]+$"
577
+ },
578
+ given: {
579
+ type: "string",
580
+ minLength: 1
581
+ },
582
+ when: {
583
+ type: "string",
584
+ minLength: 1
585
+ },
586
+ then: {
587
+ type: "string",
588
+ minLength: 1
589
+ }
2438
590
  }
2439
591
  },
2440
592
  uniqueItems: true
2441
593
  },
2442
594
  entities: {
2443
595
  type: "array",
2444
- items: { $ref: "#/$defs/entity" },
596
+ items: {
597
+ $ref: "#/$defs/entity"
598
+ },
2445
599
  uniqueItems: true
2446
600
  },
2447
601
  screens: {
2448
602
  type: "array",
2449
- items: { $ref: "#/$defs/screen" },
603
+ items: {
604
+ $ref: "#/$defs/screen"
605
+ },
2450
606
  uniqueItems: true
2451
607
  },
2452
608
  actions: {
2453
609
  type: "array",
2454
- items: { $ref: "#/$defs/action" },
610
+ items: {
611
+ $ref: "#/$defs/action"
612
+ },
2455
613
  uniqueItems: true
2456
614
  },
2457
615
  widgets: {
2458
616
  type: "array",
2459
- items: { $ref: "#/$defs/widget" },
617
+ items: {
618
+ $ref: "#/$defs/widget"
619
+ },
2460
620
  uniqueItems: true
2461
621
  },
2462
622
  settings: {
2463
623
  type: "array",
2464
- items: { $ref: "#/$defs/setting" },
624
+ items: {
625
+ $ref: "#/$defs/setting"
626
+ },
2465
627
  uniqueItems: true
2466
628
  },
2467
629
  agentTools: {
2468
630
  type: "array",
2469
- items: { $ref: "#/$defs/agentTool" },
631
+ items: {
632
+ $ref: "#/$defs/agentTool"
633
+ },
2470
634
  uniqueItems: true
2471
635
  },
2472
636
  outOfScope: {
2473
637
  type: "array",
2474
- items: { type: "string", minLength: 1 },
638
+ items: {
639
+ type: "string",
640
+ minLength: 1
641
+ },
2475
642
  uniqueItems: true
2476
643
  },
2477
644
  decisions: {
2478
645
  type: "array",
2479
- items: { $ref: "#/$defs/decision" },
646
+ items: {
647
+ $ref: "#/$defs/decision"
648
+ },
2480
649
  uniqueItems: true
2481
650
  },
2482
- research: { $ref: "#/$defs/research" },
651
+ research: {
652
+ $ref: "#/$defs/research"
653
+ },
2483
654
  adapters: {
2484
655
  type: "array",
2485
- items: { $ref: "#/$defs/adapter" },
656
+ items: {
657
+ $ref: "#/$defs/adapter"
658
+ },
2486
659
  uniqueItems: true
2487
660
  },
2488
661
  templates: {
2489
662
  type: "array",
2490
- items: { $ref: "#/$defs/template" },
663
+ items: {
664
+ $ref: "#/$defs/template"
665
+ },
2491
666
  uniqueItems: true
2492
667
  }
2493
668
  },
@@ -2495,7 +670,11 @@ var module_spec_schema_default = {
2495
670
  {
2496
671
  if: {
2497
672
  required: ["schemaVersion"],
2498
- properties: { schemaVersion: { const: 1 } }
673
+ properties: {
674
+ schemaVersion: {
675
+ const: 1
676
+ }
677
+ }
2499
678
  },
2500
679
  then: {
2501
680
  properties: {
@@ -2515,21 +694,40 @@ var module_spec_schema_default = {
2515
694
  }
2516
695
  ],
2517
696
  $defs: {
2518
- entityId: { type: "string", pattern: "^[a-z][a-z0-9-]*$" },
2519
- fieldId: { type: "string", pattern: "^[a-z][a-zA-Z0-9]*$" },
2520
- enumValue: { type: "string", pattern: "^[a-z][a-z0-9_-]*$" },
697
+ entityId: {
698
+ type: "string",
699
+ pattern: "^[a-z][a-z0-9-]*$"
700
+ },
701
+ fieldId: {
702
+ type: "string",
703
+ pattern: "^[a-z][a-zA-Z0-9]*$"
704
+ },
705
+ enumValue: {
706
+ type: "string",
707
+ pattern: "^[a-z][a-z0-9_-]*$"
708
+ },
2521
709
  entity: {
2522
710
  type: "object",
2523
711
  additionalProperties: false,
2524
712
  required: ["id", "name", "fields"],
2525
713
  properties: {
2526
- id: { $ref: "#/$defs/entityId" },
2527
- name: { type: "string", minLength: 1 },
2528
- description: { type: "string", minLength: 1 },
714
+ id: {
715
+ $ref: "#/$defs/entityId"
716
+ },
717
+ name: {
718
+ type: "string",
719
+ minLength: 1
720
+ },
721
+ description: {
722
+ type: "string",
723
+ minLength: 1
724
+ },
2529
725
  fields: {
2530
726
  type: "array",
2531
727
  minItems: 1,
2532
- items: { $ref: "#/$defs/field" },
728
+ items: {
729
+ $ref: "#/$defs/field"
730
+ },
2533
731
  uniqueItems: true
2534
732
  },
2535
733
  states: {
@@ -2537,11 +735,15 @@ var module_spec_schema_default = {
2537
735
  additionalProperties: false,
2538
736
  required: ["field", "values"],
2539
737
  properties: {
2540
- field: { $ref: "#/$defs/fieldId" },
738
+ field: {
739
+ $ref: "#/$defs/fieldId"
740
+ },
2541
741
  values: {
2542
742
  type: "array",
2543
743
  minItems: 1,
2544
- items: { $ref: "#/$defs/enumValue" },
744
+ items: {
745
+ $ref: "#/$defs/enumValue"
746
+ },
2545
747
  uniqueItems: true
2546
748
  },
2547
749
  transitions: {
@@ -2551,9 +753,18 @@ var module_spec_schema_default = {
2551
753
  additionalProperties: false,
2552
754
  required: ["from", "to"],
2553
755
  properties: {
2554
- from: { type: "string", minLength: 1 },
2555
- to: { type: "string", minLength: 1 },
2556
- permission: { type: "string", minLength: 1 }
756
+ from: {
757
+ type: "string",
758
+ minLength: 1
759
+ },
760
+ to: {
761
+ type: "string",
762
+ minLength: 1
763
+ },
764
+ permission: {
765
+ type: "string",
766
+ minLength: 1
767
+ }
2557
768
  }
2558
769
  },
2559
770
  uniqueItems: true
@@ -2567,7 +778,9 @@ var module_spec_schema_default = {
2567
778
  additionalProperties: false,
2568
779
  required: ["id", "type"],
2569
780
  properties: {
2570
- id: { $ref: "#/$defs/fieldId" },
781
+ id: {
782
+ $ref: "#/$defs/fieldId"
783
+ },
2571
784
  type: {
2572
785
  enum: [
2573
786
  "string",
@@ -2582,20 +795,32 @@ var module_spec_schema_default = {
2582
795
  "json"
2583
796
  ]
2584
797
  },
2585
- required: { type: "boolean" },
2586
- unique: { enum: ["tenant", "none"] },
2587
- maxLength: { type: "integer", minimum: 1 },
798
+ required: {
799
+ type: "boolean"
800
+ },
801
+ unique: {
802
+ enum: ["tenant", "none"]
803
+ },
804
+ maxLength: {
805
+ type: "integer",
806
+ minimum: 1
807
+ },
2588
808
  values: {
2589
809
  type: "array",
2590
810
  minItems: 1,
2591
- items: { $ref: "#/$defs/enumValue" },
811
+ items: {
812
+ $ref: "#/$defs/enumValue"
813
+ },
2592
814
  uniqueItems: true
2593
815
  },
2594
816
  reference: {
2595
817
  type: "string",
2596
818
  pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)*$"
2597
819
  },
2598
- description: { type: "string", minLength: 1 }
820
+ description: {
821
+ type: "string",
822
+ minLength: 1
823
+ }
2599
824
  }
2600
825
  },
2601
826
  screen: {
@@ -2603,21 +828,37 @@ var module_spec_schema_default = {
2603
828
  additionalProperties: false,
2604
829
  required: ["id", "kind"],
2605
830
  properties: {
2606
- id: { $ref: "#/$defs/entityId" },
2607
- kind: { enum: ["list", "record", "form", "dashboard"] },
2608
- entity: { $ref: "#/$defs/entityId" },
2609
- title: { type: "string", minLength: 1 },
831
+ id: {
832
+ $ref: "#/$defs/entityId"
833
+ },
834
+ kind: {
835
+ enum: ["list", "record", "form", "dashboard"]
836
+ },
837
+ entity: {
838
+ $ref: "#/$defs/entityId"
839
+ },
840
+ title: {
841
+ type: "string",
842
+ minLength: 1
843
+ },
2610
844
  columns: {
2611
845
  type: "array",
2612
- items: { $ref: "#/$defs/fieldId" },
846
+ items: {
847
+ $ref: "#/$defs/fieldId"
848
+ },
2613
849
  uniqueItems: true
2614
850
  },
2615
851
  filters: {
2616
852
  type: "array",
2617
- items: { $ref: "#/$defs/fieldId" },
853
+ items: {
854
+ $ref: "#/$defs/fieldId"
855
+ },
2618
856
  uniqueItems: true
2619
857
  },
2620
- navigationGroup: { type: "string", minLength: 1 }
858
+ navigationGroup: {
859
+ type: "string",
860
+ minLength: 1
861
+ }
2621
862
  }
2622
863
  },
2623
864
  action: {
@@ -2632,18 +873,29 @@ var module_spec_schema_default = {
2632
873
  "description"
2633
874
  ],
2634
875
  properties: {
2635
- id: { $ref: "#/$defs/entityId" },
2636
- entity: { $ref: "#/$defs/entityId" },
876
+ id: {
877
+ $ref: "#/$defs/entityId"
878
+ },
879
+ entity: {
880
+ $ref: "#/$defs/entityId"
881
+ },
2637
882
  permission: {
2638
883
  type: "string",
2639
884
  pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
2640
885
  },
2641
- kind: { enum: ["create", "update", "delete", "custom"] },
886
+ kind: {
887
+ enum: ["create", "update", "delete", "custom"]
888
+ },
2642
889
  risk: {
2643
890
  enum: ["read", "workspace-write", "external", "destructive"]
2644
891
  },
2645
- idempotent: { type: "boolean" },
2646
- description: { type: "string", minLength: 1 }
892
+ idempotent: {
893
+ type: "boolean"
894
+ },
895
+ description: {
896
+ type: "string",
897
+ minLength: 1
898
+ }
2647
899
  }
2648
900
  },
2649
901
  widget: {
@@ -2651,7 +903,9 @@ var module_spec_schema_default = {
2651
903
  additionalProperties: false,
2652
904
  required: ["id", "slot", "description"],
2653
905
  properties: {
2654
- id: { $ref: "#/$defs/entityId" },
906
+ id: {
907
+ $ref: "#/$defs/entityId"
908
+ },
2655
909
  slot: {
2656
910
  enum: [
2657
911
  "dashboard.metrics",
@@ -2660,8 +914,13 @@ var module_spec_schema_default = {
2660
914
  "topbar.actions"
2661
915
  ]
2662
916
  },
2663
- entity: { $ref: "#/$defs/entityId" },
2664
- description: { type: "string", minLength: 1 }
917
+ entity: {
918
+ $ref: "#/$defs/entityId"
919
+ },
920
+ description: {
921
+ type: "string",
922
+ minLength: 1
923
+ }
2665
924
  }
2666
925
  },
2667
926
  setting: {
@@ -2669,23 +928,44 @@ var module_spec_schema_default = {
2669
928
  additionalProperties: false,
2670
929
  required: ["key", "type", "scope", "description"],
2671
930
  properties: {
2672
- key: { $ref: "#/$defs/fieldId" },
2673
- type: { enum: ["string", "integer", "boolean", "enum"] },
2674
- scope: { enum: ["tenant", "platform"] },
931
+ key: {
932
+ $ref: "#/$defs/fieldId"
933
+ },
934
+ type: {
935
+ enum: ["string", "integer", "boolean", "enum"]
936
+ },
937
+ scope: {
938
+ enum: ["tenant", "platform"]
939
+ },
940
+ kind: {
941
+ enum: ["setting", "flag"]
942
+ },
2675
943
  default: {
2676
944
  oneOf: [
2677
- { type: "string" },
2678
- { type: "integer" },
2679
- { type: "boolean" }
945
+ {
946
+ type: "string"
947
+ },
948
+ {
949
+ type: "integer"
950
+ },
951
+ {
952
+ type: "boolean"
953
+ }
2680
954
  ]
2681
955
  },
2682
956
  values: {
2683
957
  type: "array",
2684
958
  minItems: 1,
2685
- items: { type: "string", minLength: 1 },
959
+ items: {
960
+ type: "string",
961
+ minLength: 1
962
+ },
2686
963
  uniqueItems: true
2687
964
  },
2688
- description: { type: "string", minLength: 1 }
965
+ description: {
966
+ type: "string",
967
+ minLength: 1
968
+ }
2689
969
  }
2690
970
  },
2691
971
  agentTool: {
@@ -2701,8 +981,13 @@ var module_spec_schema_default = {
2701
981
  type: "string",
2702
982
  pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
2703
983
  },
2704
- description: { type: "string", minLength: 1 },
2705
- risk: { enum: ["read", "workspace-write"] }
984
+ description: {
985
+ type: "string",
986
+ minLength: 1
987
+ },
988
+ risk: {
989
+ enum: ["read", "workspace-write"]
990
+ }
2706
991
  }
2707
992
  },
2708
993
  decision: {
@@ -2710,10 +995,21 @@ var module_spec_schema_default = {
2710
995
  additionalProperties: false,
2711
996
  required: ["id", "question", "answer", "decidedBy"],
2712
997
  properties: {
2713
- id: { type: "string", pattern: "^[A-Z][A-Z0-9-]+$" },
2714
- question: { type: "string", minLength: 1 },
2715
- answer: { type: "string", minLength: 1 },
2716
- decidedBy: { enum: ["user", "default"] }
998
+ id: {
999
+ type: "string",
1000
+ pattern: "^[A-Z][A-Z0-9-]+$"
1001
+ },
1002
+ question: {
1003
+ type: "string",
1004
+ minLength: 1
1005
+ },
1006
+ answer: {
1007
+ type: "string",
1008
+ minLength: 1
1009
+ },
1010
+ decidedBy: {
1011
+ enum: ["user", "default"]
1012
+ }
2717
1013
  }
2718
1014
  },
2719
1015
  domain: {
@@ -2737,16 +1033,25 @@ var module_spec_schema_default = {
2737
1033
  },
2738
1034
  allowDomains: {
2739
1035
  type: "array",
2740
- items: { $ref: "#/$defs/domain" },
1036
+ items: {
1037
+ $ref: "#/$defs/domain"
1038
+ },
2741
1039
  uniqueItems: true
2742
1040
  },
2743
1041
  denyDomains: {
2744
1042
  type: "array",
2745
- items: { $ref: "#/$defs/domain" },
1043
+ items: {
1044
+ $ref: "#/$defs/domain"
1045
+ },
2746
1046
  uniqueItems: true
2747
1047
  },
2748
- monthlyQueryBudget: { type: "integer", minimum: 1 },
2749
- evidenceOwner: { $ref: "#/$defs/entityId" }
1048
+ monthlyQueryBudget: {
1049
+ type: "integer",
1050
+ minimum: 1
1051
+ },
1052
+ evidenceOwner: {
1053
+ $ref: "#/$defs/entityId"
1054
+ }
2750
1055
  }
2751
1056
  },
2752
1057
  adapter: {
@@ -2765,9 +1070,17 @@ var module_spec_schema_default = {
2765
1070
  type: "string",
2766
1071
  pattern: "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
2767
1072
  },
2768
- direction: { enum: ["source", "sink"] },
2769
- connector: { type: "string", pattern: "^[a-z][a-z0-9-]{0,95}$" },
2770
- operation: { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" },
1073
+ direction: {
1074
+ enum: ["source", "sink"]
1075
+ },
1076
+ connector: {
1077
+ type: "string",
1078
+ pattern: "^[a-z][a-z0-9-]{0,95}$"
1079
+ },
1080
+ operation: {
1081
+ type: "string",
1082
+ pattern: "^[a-z][a-z0-9-]{0,63}$"
1083
+ },
2771
1084
  port: {
2772
1085
  type: "string",
2773
1086
  maxLength: 96,
@@ -2775,7 +1088,9 @@ var module_spec_schema_default = {
2775
1088
  },
2776
1089
  schedule: {
2777
1090
  anyOf: [
2778
- { type: "null" },
1091
+ {
1092
+ type: "null"
1093
+ },
2779
1094
  {
2780
1095
  type: "string",
2781
1096
  maxLength: 100,
@@ -2786,7 +1101,9 @@ var module_spec_schema_default = {
2786
1101
  mapping: {
2787
1102
  type: "array",
2788
1103
  minItems: 1,
2789
- items: { $ref: "#/$defs/adapterMapping" },
1104
+ items: {
1105
+ $ref: "#/$defs/adapterMapping"
1106
+ },
2790
1107
  uniqueItems: true
2791
1108
  },
2792
1109
  recorded: {
@@ -2800,11 +1117,27 @@ var module_spec_schema_default = {
2800
1117
  additionalProperties: false,
2801
1118
  required: ["to", "transform"],
2802
1119
  properties: {
2803
- from: { type: "string", minLength: 1 },
2804
- to: { type: "string", minLength: 1 },
2805
- transform: { enum: ["rename", "constant", "format", "lookup"] },
1120
+ from: {
1121
+ type: "string",
1122
+ minLength: 1
1123
+ },
1124
+ to: {
1125
+ type: "string",
1126
+ minLength: 1
1127
+ },
1128
+ transform: {
1129
+ enum: ["rename", "constant", "format", "lookup"]
1130
+ },
2806
1131
  value: {
2807
- anyOf: [{ type: "null" }, { type: "string", minLength: 1 }]
1132
+ anyOf: [
1133
+ {
1134
+ type: "null"
1135
+ },
1136
+ {
1137
+ type: "string",
1138
+ minLength: 1
1139
+ }
1140
+ ]
2808
1141
  }
2809
1142
  }
2810
1143
  },
@@ -2813,10 +1146,19 @@ var module_spec_schema_default = {
2813
1146
  additionalProperties: false,
2814
1147
  required: ["id", "title", "inputEntity", "format", "body"],
2815
1148
  properties: {
2816
- id: { $ref: "#/$defs/entityId" },
2817
- title: { type: "string", minLength: 1 },
2818
- inputEntity: { $ref: "#/$defs/entityId" },
2819
- format: { enum: ["pdf", "docx"] },
1149
+ id: {
1150
+ $ref: "#/$defs/entityId"
1151
+ },
1152
+ title: {
1153
+ type: "string",
1154
+ minLength: 1
1155
+ },
1156
+ inputEntity: {
1157
+ $ref: "#/$defs/entityId"
1158
+ },
1159
+ format: {
1160
+ enum: ["pdf", "docx"]
1161
+ },
2820
1162
  body: {
2821
1163
  type: "string",
2822
1164
  pattern: "^templates/[a-z][a-z0-9-]*\\.md$"
@@ -3036,7 +1378,7 @@ var project_schema_default = {
3036
1378
  path: {
3037
1379
  type: "string",
3038
1380
  maxLength: 256,
3039
- pattern: "^(/|/[a-z0-9-]+(/[a-z0-9-]+)*)$"
1381
+ pattern: "^(/|/[a-z0-9-]+([.][a-z0-9-]+)*(/[a-z0-9-]+([.][a-z0-9-]+)*)*)$"
3040
1382
  },
3041
1383
  tenantId: {
3042
1384
  type: "string",
@@ -3275,7 +1617,11 @@ function pluralMember(bundle, key) {
3275
1617
  const category = key.slice(dot + 1);
3276
1618
  if (!PLURAL_CATEGORIES.includes(category)) return null;
3277
1619
  const base = key.slice(0, dot);
3278
- return Object.hasOwn(bundle, base + ".other") ? { base, category } : null;
1620
+ if (!Object.hasOwn(bundle, base + ".other")) return null;
1621
+ const inflected = PLURAL_CATEGORIES.some(
1622
+ (other) => other !== "other" && Object.hasOwn(bundle, base + "." + other)
1623
+ );
1624
+ return inflected ? { base, category } : null;
3279
1625
  }
3280
1626
  function translationKeys(bundle) {
3281
1627
  const keys = /* @__PURE__ */ new Set();
@@ -3315,23 +1661,47 @@ function pluralFamilyIssues(bundle, locale) {
3315
1661
  return issues;
3316
1662
  }
3317
1663
 
1664
+ // ../contracts/src/web.ts
1665
+ var RESERVED_WEB_SEGMENTS = Object.freeze([
1666
+ "setup",
1667
+ "health",
1668
+ "ready",
1669
+ "assets",
1670
+ "app",
1671
+ "api",
1672
+ "auth",
1673
+ "sign-in",
1674
+ "sign-up",
1675
+ "forgot-password",
1676
+ "reset-password",
1677
+ "accept-invitation"
1678
+ ]);
1679
+ var SEGMENT = "[a-z0-9-]+(?:\\.[a-z0-9-]+)*";
1680
+ var WEB_MOUNT_PATH = new RegExp(`^(?:/|/${SEGMENT}(?:/${SEGMENT})*)$`);
1681
+ var WEB_PAGE_PATH = new RegExp(
1682
+ `^(?:/|(?:/(?:${SEGMENT}|:[a-z][a-zA-Z0-9]*))+)$`
1683
+ );
1684
+
3318
1685
  // ../contracts/src/index.ts
3319
- var PLATFORM_API_VERSION = "0.1.21";
1686
+ var PLATFORM_API_VERSION = "0.1.26";
3320
1687
 
3321
1688
  // ../kernel/src/module-compatibility.ts
3322
1689
  function satisfiesModuleVersion(version, range) {
3323
- return (0, import_semver.valid)(version) !== null && (0, import_semver.validRange)(range) !== null && (0, import_semver.satisfies)(version, range);
1690
+ return rangeSatisfies(version, range);
3324
1691
  }
3325
1692
  function compareModuleVersions(left, right) {
3326
- return (0, import_semver.rcompare)(left, right);
1693
+ const first = parseVersion(left);
1694
+ const second = parseVersion(right);
1695
+ if (!first || !second) return 0;
1696
+ return compareVersions(second, first);
3327
1697
  }
3328
1698
  function assertModuleCompatibility(manifest, platformVersion = PLATFORM_API_VERSION) {
3329
- if (!(0, import_semver.valid)(manifest.version))
1699
+ if (parseVersion(manifest.version) === null)
3330
1700
  throw new RegistryError(
3331
1701
  "MODULE_VERSION_INVALID",
3332
1702
  `Invalid version for ${manifest.id}: ${manifest.version}`
3333
1703
  );
3334
- if (manifest.platformApi !== void 0 && (!(0, import_semver.validRange)(manifest.platformApi) || platformVersion !== null && !satisfiesModuleVersion(platformVersion, manifest.platformApi))) {
1704
+ if (manifest.platformApi !== void 0 && (!isValidRange(manifest.platformApi) || platformVersion !== null && !satisfiesModuleVersion(platformVersion, manifest.platformApi))) {
3335
1705
  throw new RegistryError(
3336
1706
  "MODULE_PLATFORM_INCOMPATIBLE",
3337
1707
  `${manifest.id} requires platform API ${manifest.platformApi}; available ${PLATFORM_API_VERSION}.`
@@ -3339,7 +1709,7 @@ function assertModuleCompatibility(manifest, platformVersion = PLATFORM_API_VERS
3339
1709
  }
3340
1710
  const ids = /* @__PURE__ */ new Set();
3341
1711
  for (const dependency of manifest.dependencies) {
3342
- if (!dependency.range.trim() || !(0, import_semver.validRange)(dependency.range))
1712
+ if (!dependency.range.trim() || !isValidRange(dependency.range))
3343
1713
  throw new RegistryError(
3344
1714
  "MODULE_RANGE_INVALID",
3345
1715
  `${manifest.id} declares an invalid range for ${dependency.id}: ${dependency.range}`
@@ -4001,7 +2371,7 @@ import { dirname as dirname6, join as join6, relative as relative5 } from "node:
4001
2371
  import { createRequire } from "node:module";
4002
2372
  import { readFile as readFile5 } from "node:fs/promises";
4003
2373
  import { dirname as dirname4, join as join3 } from "node:path";
4004
- var SDK_VERSION = "0.4.0";
2374
+ var SDK_VERSION = "0.4.3";
4005
2375
  function npmPackage(specifier) {
4006
2376
  return specifier.startsWith("@") ? specifier.split("/").slice(0, 2).join("/") : specifier.split("/")[0];
4007
2377
  }