@stardeck-customer-apps/compose 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -6,22 +6,2019 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ };
9
12
  var __copyProps = (to, from, except, desc) => {
10
13
  if (from && typeof from === "object" || typeof from === "function") {
11
14
  for (let key of __getOwnPropNames(from))
12
15
  if (!__hasOwnProp.call(to, key) && key !== except)
13
16
  __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
17
  }
15
- return to;
16
- };
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
- // If the importer is in node compatibility mode or this is not an ESM
19
- // file that has been converted to a CommonJS file using a Babel-
20
- // compatible transform (i.e. "__esModule" has not been set), then set
21
- // "default" to the CommonJS "module.exports" for node compatibility.
22
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
- mod
24
- ));
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+
29
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
30
+ var require_constants = __commonJS({
31
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports2, module2) {
32
+ "use strict";
33
+ var SEMVER_SPEC_VERSION = "2.0.0";
34
+ var MAX_LENGTH = 256;
35
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
36
+ 9007199254740991;
37
+ var MAX_SAFE_COMPONENT_LENGTH = 16;
38
+ var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
39
+ var RELEASE_TYPES = [
40
+ "major",
41
+ "premajor",
42
+ "minor",
43
+ "preminor",
44
+ "patch",
45
+ "prepatch",
46
+ "prerelease"
47
+ ];
48
+ module2.exports = {
49
+ MAX_LENGTH,
50
+ MAX_SAFE_COMPONENT_LENGTH,
51
+ MAX_SAFE_BUILD_LENGTH,
52
+ MAX_SAFE_INTEGER,
53
+ RELEASE_TYPES,
54
+ SEMVER_SPEC_VERSION,
55
+ FLAG_INCLUDE_PRERELEASE: 1,
56
+ FLAG_LOOSE: 2
57
+ };
58
+ }
59
+ });
60
+
61
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
62
+ var require_debug = __commonJS({
63
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports2, module2) {
64
+ "use strict";
65
+ var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
66
+ };
67
+ module2.exports = debug;
68
+ }
69
+ });
70
+
71
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
72
+ var require_re = __commonJS({
73
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports2, module2) {
74
+ "use strict";
75
+ var {
76
+ MAX_SAFE_COMPONENT_LENGTH,
77
+ MAX_SAFE_BUILD_LENGTH,
78
+ MAX_LENGTH
79
+ } = require_constants();
80
+ var debug = require_debug();
81
+ exports2 = module2.exports = {};
82
+ var re = exports2.re = [];
83
+ var safeRe = exports2.safeRe = [];
84
+ var src = exports2.src = [];
85
+ var safeSrc = exports2.safeSrc = [];
86
+ var t = exports2.t = {};
87
+ var R = 0;
88
+ var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
89
+ var safeRegexReplacements = [
90
+ ["\\s", 1],
91
+ ["\\d", MAX_LENGTH],
92
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
93
+ ];
94
+ var makeSafeRegex = (value) => {
95
+ for (const [token, max] of safeRegexReplacements) {
96
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
97
+ }
98
+ return value;
99
+ };
100
+ var createToken = (name, value, isGlobal) => {
101
+ const safe = makeSafeRegex(value);
102
+ const index = R++;
103
+ debug(name, index, value);
104
+ t[name] = index;
105
+ src[index] = value;
106
+ safeSrc[index] = safe;
107
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
108
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
109
+ };
110
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
111
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
112
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
113
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
114
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
115
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
116
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
117
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
118
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
119
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
120
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
121
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
122
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
123
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
124
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
125
+ createToken("GTLT", "((?:<|>)?=?)");
126
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
127
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
128
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
129
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
130
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
131
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
132
+ createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
133
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
134
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
135
+ createToken("COERCERTL", src[t.COERCE], true);
136
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
137
+ createToken("LONETILDE", "(?:~>?)");
138
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
139
+ exports2.tildeTrimReplace = "$1~";
140
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
141
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
142
+ createToken("LONECARET", "(?:\\^)");
143
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
144
+ exports2.caretTrimReplace = "$1^";
145
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
146
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
147
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
148
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
149
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
150
+ exports2.comparatorTrimReplace = "$1$2$3";
151
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
152
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
153
+ createToken("STAR", "(<|>)?=?\\s*\\*");
154
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
155
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
156
+ }
157
+ });
158
+
159
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
160
+ var require_parse_options = __commonJS({
161
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports2, module2) {
162
+ "use strict";
163
+ var looseOption = Object.freeze({ loose: true });
164
+ var emptyOpts = Object.freeze({});
165
+ var parseOptions = (options) => {
166
+ if (!options) {
167
+ return emptyOpts;
168
+ }
169
+ if (typeof options !== "object") {
170
+ return looseOption;
171
+ }
172
+ return options;
173
+ };
174
+ module2.exports = parseOptions;
175
+ }
176
+ });
177
+
178
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
179
+ var require_identifiers = __commonJS({
180
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports2, module2) {
181
+ "use strict";
182
+ var numeric = /^[0-9]+$/;
183
+ var compareIdentifiers = (a, b) => {
184
+ if (typeof a === "number" && typeof b === "number") {
185
+ return a === b ? 0 : a < b ? -1 : 1;
186
+ }
187
+ const anum = numeric.test(a);
188
+ const bnum = numeric.test(b);
189
+ if (anum && bnum) {
190
+ a = +a;
191
+ b = +b;
192
+ }
193
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
194
+ };
195
+ var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
196
+ module2.exports = {
197
+ compareIdentifiers,
198
+ rcompareIdentifiers
199
+ };
200
+ }
201
+ });
202
+
203
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
204
+ var require_semver = __commonJS({
205
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports2, module2) {
206
+ "use strict";
207
+ var debug = require_debug();
208
+ var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
209
+ var { safeRe: re, t } = require_re();
210
+ var parseOptions = require_parse_options();
211
+ var { compareIdentifiers } = require_identifiers();
212
+ var isPrereleaseIdentifier = (prerelease, identifier) => {
213
+ const identifiers = identifier.split(".");
214
+ if (identifiers.length > prerelease.length) {
215
+ return false;
216
+ }
217
+ for (let i = 0; i < identifiers.length; i++) {
218
+ if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
219
+ return false;
220
+ }
221
+ }
222
+ return true;
223
+ };
224
+ var SemVer = class _SemVer {
225
+ constructor(version, options) {
226
+ options = parseOptions(options);
227
+ if (version instanceof _SemVer) {
228
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
229
+ return version;
230
+ } else {
231
+ version = version.version;
232
+ }
233
+ } else if (typeof version !== "string") {
234
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
235
+ }
236
+ if (version.length > MAX_LENGTH) {
237
+ throw new TypeError(
238
+ `version is longer than ${MAX_LENGTH} characters`
239
+ );
240
+ }
241
+ debug("SemVer", version, options);
242
+ this.options = options;
243
+ this.loose = !!options.loose;
244
+ this.includePrerelease = !!options.includePrerelease;
245
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
246
+ if (!m) {
247
+ throw new TypeError(`Invalid Version: ${version}`);
248
+ }
249
+ this.raw = version;
250
+ this.major = +m[1];
251
+ this.minor = +m[2];
252
+ this.patch = +m[3];
253
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
254
+ throw new TypeError("Invalid major version");
255
+ }
256
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
257
+ throw new TypeError("Invalid minor version");
258
+ }
259
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
260
+ throw new TypeError("Invalid patch version");
261
+ }
262
+ if (!m[4]) {
263
+ this.prerelease = [];
264
+ } else {
265
+ this.prerelease = m[4].split(".").map((id) => {
266
+ if (/^[0-9]+$/.test(id)) {
267
+ const num = +id;
268
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
269
+ return num;
270
+ }
271
+ }
272
+ return id;
273
+ });
274
+ }
275
+ this.build = m[5] ? m[5].split(".") : [];
276
+ this.format();
277
+ }
278
+ format() {
279
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
280
+ if (this.prerelease.length) {
281
+ this.version += `-${this.prerelease.join(".")}`;
282
+ }
283
+ return this.version;
284
+ }
285
+ toString() {
286
+ return this.version;
287
+ }
288
+ compare(other) {
289
+ debug("SemVer.compare", this.version, this.options, other);
290
+ if (!(other instanceof _SemVer)) {
291
+ if (typeof other === "string" && other === this.version) {
292
+ return 0;
293
+ }
294
+ other = new _SemVer(other, this.options);
295
+ }
296
+ if (other.version === this.version) {
297
+ return 0;
298
+ }
299
+ return this.compareMain(other) || this.comparePre(other);
300
+ }
301
+ compareMain(other) {
302
+ if (!(other instanceof _SemVer)) {
303
+ other = new _SemVer(other, this.options);
304
+ }
305
+ if (this.major < other.major) {
306
+ return -1;
307
+ }
308
+ if (this.major > other.major) {
309
+ return 1;
310
+ }
311
+ if (this.minor < other.minor) {
312
+ return -1;
313
+ }
314
+ if (this.minor > other.minor) {
315
+ return 1;
316
+ }
317
+ if (this.patch < other.patch) {
318
+ return -1;
319
+ }
320
+ if (this.patch > other.patch) {
321
+ return 1;
322
+ }
323
+ return 0;
324
+ }
325
+ comparePre(other) {
326
+ if (!(other instanceof _SemVer)) {
327
+ other = new _SemVer(other, this.options);
328
+ }
329
+ if (this.prerelease.length && !other.prerelease.length) {
330
+ return -1;
331
+ } else if (!this.prerelease.length && other.prerelease.length) {
332
+ return 1;
333
+ } else if (!this.prerelease.length && !other.prerelease.length) {
334
+ return 0;
335
+ }
336
+ let i = 0;
337
+ do {
338
+ const a = this.prerelease[i];
339
+ const b = other.prerelease[i];
340
+ debug("prerelease compare", i, a, b);
341
+ if (a === void 0 && b === void 0) {
342
+ return 0;
343
+ } else if (b === void 0) {
344
+ return 1;
345
+ } else if (a === void 0) {
346
+ return -1;
347
+ } else if (a === b) {
348
+ continue;
349
+ } else {
350
+ return compareIdentifiers(a, b);
351
+ }
352
+ } while (++i);
353
+ }
354
+ compareBuild(other) {
355
+ if (!(other instanceof _SemVer)) {
356
+ other = new _SemVer(other, this.options);
357
+ }
358
+ let i = 0;
359
+ do {
360
+ const a = this.build[i];
361
+ const b = other.build[i];
362
+ debug("build compare", i, a, b);
363
+ if (a === void 0 && b === void 0) {
364
+ return 0;
365
+ } else if (b === void 0) {
366
+ return 1;
367
+ } else if (a === void 0) {
368
+ return -1;
369
+ } else if (a === b) {
370
+ continue;
371
+ } else {
372
+ return compareIdentifiers(a, b);
373
+ }
374
+ } while (++i);
375
+ }
376
+ // preminor will bump the version up to the next minor release, and immediately
377
+ // down to pre-release. premajor and prepatch work the same way.
378
+ inc(release, identifier, identifierBase) {
379
+ if (release.startsWith("pre")) {
380
+ if (!identifier && identifierBase === false) {
381
+ throw new Error("invalid increment argument: identifier is empty");
382
+ }
383
+ if (identifier) {
384
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
385
+ if (!match || match[1] !== identifier) {
386
+ throw new Error(`invalid identifier: ${identifier}`);
387
+ }
388
+ }
389
+ }
390
+ switch (release) {
391
+ case "premajor":
392
+ this.prerelease.length = 0;
393
+ this.patch = 0;
394
+ this.minor = 0;
395
+ this.major++;
396
+ this.inc("pre", identifier, identifierBase);
397
+ break;
398
+ case "preminor":
399
+ this.prerelease.length = 0;
400
+ this.patch = 0;
401
+ this.minor++;
402
+ this.inc("pre", identifier, identifierBase);
403
+ break;
404
+ case "prepatch":
405
+ this.prerelease.length = 0;
406
+ this.inc("patch", identifier, identifierBase);
407
+ this.inc("pre", identifier, identifierBase);
408
+ break;
409
+ // If the input is a non-prerelease version, this acts the same as
410
+ // prepatch.
411
+ case "prerelease":
412
+ if (this.prerelease.length === 0) {
413
+ this.inc("patch", identifier, identifierBase);
414
+ }
415
+ this.inc("pre", identifier, identifierBase);
416
+ break;
417
+ case "release":
418
+ if (this.prerelease.length === 0) {
419
+ throw new Error(`version ${this.raw} is not a prerelease`);
420
+ }
421
+ this.prerelease.length = 0;
422
+ break;
423
+ case "major":
424
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
425
+ this.major++;
426
+ }
427
+ this.minor = 0;
428
+ this.patch = 0;
429
+ this.prerelease = [];
430
+ break;
431
+ case "minor":
432
+ if (this.patch !== 0 || this.prerelease.length === 0) {
433
+ this.minor++;
434
+ }
435
+ this.patch = 0;
436
+ this.prerelease = [];
437
+ break;
438
+ case "patch":
439
+ if (this.prerelease.length === 0) {
440
+ this.patch++;
441
+ }
442
+ this.prerelease = [];
443
+ break;
444
+ // This probably shouldn't be used publicly.
445
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
446
+ case "pre": {
447
+ const base = Number(identifierBase) ? 1 : 0;
448
+ if (this.prerelease.length === 0) {
449
+ this.prerelease = [base];
450
+ } else {
451
+ let i = this.prerelease.length;
452
+ while (--i >= 0) {
453
+ if (typeof this.prerelease[i] === "number") {
454
+ this.prerelease[i]++;
455
+ i = -2;
456
+ }
457
+ }
458
+ if (i === -1) {
459
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
460
+ throw new Error("invalid increment argument: identifier already exists");
461
+ }
462
+ this.prerelease.push(base);
463
+ }
464
+ }
465
+ if (identifier) {
466
+ let prerelease = [identifier, base];
467
+ if (identifierBase === false) {
468
+ prerelease = [identifier];
469
+ }
470
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
471
+ const prereleaseBase = this.prerelease[identifier.split(".").length];
472
+ if (isNaN(prereleaseBase)) {
473
+ this.prerelease = prerelease;
474
+ }
475
+ } else {
476
+ this.prerelease = prerelease;
477
+ }
478
+ }
479
+ break;
480
+ }
481
+ default:
482
+ throw new Error(`invalid increment argument: ${release}`);
483
+ }
484
+ this.raw = this.format();
485
+ if (this.build.length) {
486
+ this.raw += `+${this.build.join(".")}`;
487
+ }
488
+ return this;
489
+ }
490
+ };
491
+ module2.exports = SemVer;
492
+ }
493
+ });
494
+
495
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
496
+ var require_parse = __commonJS({
497
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports2, module2) {
498
+ "use strict";
499
+ var SemVer = require_semver();
500
+ var parse = (version, options, throwErrors = false) => {
501
+ if (version instanceof SemVer) {
502
+ return version;
503
+ }
504
+ try {
505
+ return new SemVer(version, options);
506
+ } catch (er) {
507
+ if (!throwErrors) {
508
+ return null;
509
+ }
510
+ throw er;
511
+ }
512
+ };
513
+ module2.exports = parse;
514
+ }
515
+ });
516
+
517
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
518
+ var require_valid = __commonJS({
519
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports2, module2) {
520
+ "use strict";
521
+ var parse = require_parse();
522
+ var valid = (version, options) => {
523
+ const v = parse(version, options);
524
+ return v ? v.version : null;
525
+ };
526
+ module2.exports = valid;
527
+ }
528
+ });
529
+
530
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
531
+ var require_clean = __commonJS({
532
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports2, module2) {
533
+ "use strict";
534
+ var parse = require_parse();
535
+ var clean = (version, options) => {
536
+ const s = parse(version.trim().replace(/^[=v]+/, ""), options);
537
+ return s ? s.version : null;
538
+ };
539
+ module2.exports = clean;
540
+ }
541
+ });
542
+
543
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
544
+ var require_inc = __commonJS({
545
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports2, module2) {
546
+ "use strict";
547
+ var SemVer = require_semver();
548
+ var inc = (version, release, options, identifier, identifierBase) => {
549
+ if (typeof options === "string") {
550
+ identifierBase = identifier;
551
+ identifier = options;
552
+ options = void 0;
553
+ }
554
+ try {
555
+ return new SemVer(
556
+ version instanceof SemVer ? version.version : version,
557
+ options
558
+ ).inc(release, identifier, identifierBase).version;
559
+ } catch (er) {
560
+ return null;
561
+ }
562
+ };
563
+ module2.exports = inc;
564
+ }
565
+ });
566
+
567
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
568
+ var require_diff = __commonJS({
569
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports2, module2) {
570
+ "use strict";
571
+ var parse = require_parse();
572
+ var diff = (version1, version2) => {
573
+ const v1 = parse(version1, null, true);
574
+ const v2 = parse(version2, null, true);
575
+ const comparison = v1.compare(v2);
576
+ if (comparison === 0) {
577
+ return null;
578
+ }
579
+ const v1Higher = comparison > 0;
580
+ const highVersion = v1Higher ? v1 : v2;
581
+ const lowVersion = v1Higher ? v2 : v1;
582
+ const highHasPre = !!highVersion.prerelease.length;
583
+ const lowHasPre = !!lowVersion.prerelease.length;
584
+ if (lowHasPre && !highHasPre) {
585
+ if (!lowVersion.patch && !lowVersion.minor) {
586
+ return "major";
587
+ }
588
+ if (lowVersion.compareMain(highVersion) === 0) {
589
+ if (lowVersion.minor && !lowVersion.patch) {
590
+ return "minor";
591
+ }
592
+ return "patch";
593
+ }
594
+ }
595
+ const prefix = highHasPre ? "pre" : "";
596
+ if (v1.major !== v2.major) {
597
+ return prefix + "major";
598
+ }
599
+ if (v1.minor !== v2.minor) {
600
+ return prefix + "minor";
601
+ }
602
+ if (v1.patch !== v2.patch) {
603
+ return prefix + "patch";
604
+ }
605
+ return "prerelease";
606
+ };
607
+ module2.exports = diff;
608
+ }
609
+ });
610
+
611
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
612
+ var require_major = __commonJS({
613
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports2, module2) {
614
+ "use strict";
615
+ var SemVer = require_semver();
616
+ var major = (a, loose) => new SemVer(a, loose).major;
617
+ module2.exports = major;
618
+ }
619
+ });
620
+
621
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
622
+ var require_minor = __commonJS({
623
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports2, module2) {
624
+ "use strict";
625
+ var SemVer = require_semver();
626
+ var minor = (a, loose) => new SemVer(a, loose).minor;
627
+ module2.exports = minor;
628
+ }
629
+ });
630
+
631
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
632
+ var require_patch = __commonJS({
633
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports2, module2) {
634
+ "use strict";
635
+ var SemVer = require_semver();
636
+ var patch = (a, loose) => new SemVer(a, loose).patch;
637
+ module2.exports = patch;
638
+ }
639
+ });
640
+
641
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
642
+ var require_prerelease = __commonJS({
643
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports2, module2) {
644
+ "use strict";
645
+ var parse = require_parse();
646
+ var prerelease = (version, options) => {
647
+ const parsed = parse(version, options);
648
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
649
+ };
650
+ module2.exports = prerelease;
651
+ }
652
+ });
653
+
654
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
655
+ var require_compare = __commonJS({
656
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports2, module2) {
657
+ "use strict";
658
+ var SemVer = require_semver();
659
+ var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
660
+ module2.exports = compare;
661
+ }
662
+ });
663
+
664
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
665
+ var require_rcompare = __commonJS({
666
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports2, module2) {
667
+ "use strict";
668
+ var compare = require_compare();
669
+ var rcompare = (a, b, loose) => compare(b, a, loose);
670
+ module2.exports = rcompare;
671
+ }
672
+ });
673
+
674
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
675
+ var require_compare_loose = __commonJS({
676
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
677
+ "use strict";
678
+ var compare = require_compare();
679
+ var compareLoose = (a, b) => compare(a, b, true);
680
+ module2.exports = compareLoose;
681
+ }
682
+ });
683
+
684
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
685
+ var require_compare_build = __commonJS({
686
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports2, module2) {
687
+ "use strict";
688
+ var SemVer = require_semver();
689
+ var compareBuild = (a, b, loose) => {
690
+ const versionA = new SemVer(a, loose);
691
+ const versionB = new SemVer(b, loose);
692
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
693
+ };
694
+ module2.exports = compareBuild;
695
+ }
696
+ });
697
+
698
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
699
+ var require_sort = __commonJS({
700
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports2, module2) {
701
+ "use strict";
702
+ var compareBuild = require_compare_build();
703
+ var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
704
+ module2.exports = sort;
705
+ }
706
+ });
707
+
708
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
709
+ var require_rsort = __commonJS({
710
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports2, module2) {
711
+ "use strict";
712
+ var compareBuild = require_compare_build();
713
+ var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
714
+ module2.exports = rsort;
715
+ }
716
+ });
717
+
718
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
719
+ var require_gt = __commonJS({
720
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports2, module2) {
721
+ "use strict";
722
+ var compare = require_compare();
723
+ var gt = (a, b, loose) => compare(a, b, loose) > 0;
724
+ module2.exports = gt;
725
+ }
726
+ });
727
+
728
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
729
+ var require_lt = __commonJS({
730
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports2, module2) {
731
+ "use strict";
732
+ var compare = require_compare();
733
+ var lt = (a, b, loose) => compare(a, b, loose) < 0;
734
+ module2.exports = lt;
735
+ }
736
+ });
737
+
738
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
739
+ var require_eq = __commonJS({
740
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports2, module2) {
741
+ "use strict";
742
+ var compare = require_compare();
743
+ var eq = (a, b, loose) => compare(a, b, loose) === 0;
744
+ module2.exports = eq;
745
+ }
746
+ });
747
+
748
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
749
+ var require_neq = __commonJS({
750
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports2, module2) {
751
+ "use strict";
752
+ var compare = require_compare();
753
+ var neq = (a, b, loose) => compare(a, b, loose) !== 0;
754
+ module2.exports = neq;
755
+ }
756
+ });
757
+
758
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
759
+ var require_gte = __commonJS({
760
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports2, module2) {
761
+ "use strict";
762
+ var compare = require_compare();
763
+ var gte = (a, b, loose) => compare(a, b, loose) >= 0;
764
+ module2.exports = gte;
765
+ }
766
+ });
767
+
768
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
769
+ var require_lte = __commonJS({
770
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports2, module2) {
771
+ "use strict";
772
+ var compare = require_compare();
773
+ var lte = (a, b, loose) => compare(a, b, loose) <= 0;
774
+ module2.exports = lte;
775
+ }
776
+ });
777
+
778
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
779
+ var require_cmp = __commonJS({
780
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports2, module2) {
781
+ "use strict";
782
+ var eq = require_eq();
783
+ var neq = require_neq();
784
+ var gt = require_gt();
785
+ var gte = require_gte();
786
+ var lt = require_lt();
787
+ var lte = require_lte();
788
+ var cmp = (a, op, b, loose) => {
789
+ switch (op) {
790
+ case "===":
791
+ if (typeof a === "object") {
792
+ a = a.version;
793
+ }
794
+ if (typeof b === "object") {
795
+ b = b.version;
796
+ }
797
+ return a === b;
798
+ case "!==":
799
+ if (typeof a === "object") {
800
+ a = a.version;
801
+ }
802
+ if (typeof b === "object") {
803
+ b = b.version;
804
+ }
805
+ return a !== b;
806
+ case "":
807
+ case "=":
808
+ case "==":
809
+ return eq(a, b, loose);
810
+ case "!=":
811
+ return neq(a, b, loose);
812
+ case ">":
813
+ return gt(a, b, loose);
814
+ case ">=":
815
+ return gte(a, b, loose);
816
+ case "<":
817
+ return lt(a, b, loose);
818
+ case "<=":
819
+ return lte(a, b, loose);
820
+ default:
821
+ throw new TypeError(`Invalid operator: ${op}`);
822
+ }
823
+ };
824
+ module2.exports = cmp;
825
+ }
826
+ });
827
+
828
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
829
+ var require_coerce = __commonJS({
830
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports2, module2) {
831
+ "use strict";
832
+ var SemVer = require_semver();
833
+ var parse = require_parse();
834
+ var { safeRe: re, t } = require_re();
835
+ var coerce = (version, options) => {
836
+ if (version instanceof SemVer) {
837
+ return version;
838
+ }
839
+ if (typeof version === "number") {
840
+ version = String(version);
841
+ }
842
+ if (typeof version !== "string") {
843
+ return null;
844
+ }
845
+ options = options || {};
846
+ let match = null;
847
+ if (!options.rtl) {
848
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
849
+ } else {
850
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
851
+ let next;
852
+ while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
853
+ if (!match || next.index + next[0].length !== match.index + match[0].length) {
854
+ match = next;
855
+ }
856
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
857
+ }
858
+ coerceRtlRegex.lastIndex = -1;
859
+ }
860
+ if (match === null) {
861
+ return null;
862
+ }
863
+ const major = match[2];
864
+ const minor = match[3] || "0";
865
+ const patch = match[4] || "0";
866
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
867
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
868
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
869
+ };
870
+ module2.exports = coerce;
871
+ }
872
+ });
873
+
874
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
875
+ var require_truncate = __commonJS({
876
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports2, module2) {
877
+ "use strict";
878
+ var parse = require_parse();
879
+ var constants = require_constants();
880
+ var SemVer = require_semver();
881
+ var truncate = (version, truncation, options) => {
882
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
883
+ return null;
884
+ }
885
+ const clonedVersion = cloneInputVersion(version, options);
886
+ return clonedVersion && doTruncation(clonedVersion, truncation);
887
+ };
888
+ var cloneInputVersion = (version, options) => {
889
+ const versionStringToParse = version instanceof SemVer ? version.version : version;
890
+ return parse(versionStringToParse, options);
891
+ };
892
+ var doTruncation = (version, truncation) => {
893
+ if (isPrerelease(truncation)) {
894
+ return version.version;
895
+ }
896
+ version.prerelease = [];
897
+ switch (truncation) {
898
+ case "major":
899
+ version.minor = 0;
900
+ version.patch = 0;
901
+ break;
902
+ case "minor":
903
+ version.patch = 0;
904
+ break;
905
+ }
906
+ return version.format();
907
+ };
908
+ var isPrerelease = (type) => {
909
+ return type.startsWith("pre");
910
+ };
911
+ module2.exports = truncate;
912
+ }
913
+ });
914
+
915
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
916
+ var require_lrucache = __commonJS({
917
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports2, module2) {
918
+ "use strict";
919
+ var LRUCache = class {
920
+ constructor() {
921
+ this.max = 1e3;
922
+ this.map = /* @__PURE__ */ new Map();
923
+ }
924
+ get(key) {
925
+ const value = this.map.get(key);
926
+ if (value === void 0) {
927
+ return void 0;
928
+ } else {
929
+ this.map.delete(key);
930
+ this.map.set(key, value);
931
+ return value;
932
+ }
933
+ }
934
+ delete(key) {
935
+ return this.map.delete(key);
936
+ }
937
+ set(key, value) {
938
+ const deleted = this.delete(key);
939
+ if (!deleted && value !== void 0) {
940
+ if (this.map.size >= this.max) {
941
+ const firstKey = this.map.keys().next().value;
942
+ this.delete(firstKey);
943
+ }
944
+ this.map.set(key, value);
945
+ }
946
+ return this;
947
+ }
948
+ };
949
+ module2.exports = LRUCache;
950
+ }
951
+ });
952
+
953
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
954
+ var require_range = __commonJS({
955
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports2, module2) {
956
+ "use strict";
957
+ var SPACE_CHARACTERS = /\s+/g;
958
+ var Range = class _Range {
959
+ constructor(range, options) {
960
+ options = parseOptions(options);
961
+ if (range instanceof _Range) {
962
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
963
+ return range;
964
+ } else {
965
+ return new _Range(range.raw, options);
966
+ }
967
+ }
968
+ if (range instanceof Comparator) {
969
+ this.raw = range.value;
970
+ this.set = [[range]];
971
+ this.formatted = void 0;
972
+ return this;
973
+ }
974
+ this.options = options;
975
+ this.loose = !!options.loose;
976
+ this.includePrerelease = !!options.includePrerelease;
977
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
978
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
979
+ if (!this.set.length) {
980
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
981
+ }
982
+ if (this.set.length > 1) {
983
+ const first = this.set[0];
984
+ this.set = this.set.filter((c) => !isNullSet(c[0]));
985
+ if (this.set.length === 0) {
986
+ this.set = [first];
987
+ } else if (this.set.length > 1) {
988
+ for (const c of this.set) {
989
+ if (c.length === 1 && isAny(c[0])) {
990
+ this.set = [c];
991
+ break;
992
+ }
993
+ }
994
+ }
995
+ }
996
+ this.formatted = void 0;
997
+ }
998
+ get range() {
999
+ if (this.formatted === void 0) {
1000
+ this.formatted = "";
1001
+ for (let i = 0; i < this.set.length; i++) {
1002
+ if (i > 0) {
1003
+ this.formatted += "||";
1004
+ }
1005
+ const comps = this.set[i];
1006
+ for (let k = 0; k < comps.length; k++) {
1007
+ if (k > 0) {
1008
+ this.formatted += " ";
1009
+ }
1010
+ this.formatted += comps[k].toString().trim();
1011
+ }
1012
+ }
1013
+ }
1014
+ return this.formatted;
1015
+ }
1016
+ format() {
1017
+ return this.range;
1018
+ }
1019
+ toString() {
1020
+ return this.range;
1021
+ }
1022
+ parseRange(range) {
1023
+ range = range.replace(BUILDSTRIPRE, "");
1024
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
1025
+ const memoKey = memoOpts + ":" + range;
1026
+ const cached = cache.get(memoKey);
1027
+ if (cached) {
1028
+ return cached;
1029
+ }
1030
+ const loose = this.options.loose;
1031
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
1032
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
1033
+ debug("hyphen replace", range);
1034
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
1035
+ debug("comparator trim", range);
1036
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
1037
+ debug("tilde trim", range);
1038
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
1039
+ debug("caret trim", range);
1040
+ let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
1041
+ if (loose) {
1042
+ rangeList = rangeList.filter((comp) => {
1043
+ debug("loose invalid filter", comp, this.options);
1044
+ return !!comp.match(re[t.COMPARATORLOOSE]);
1045
+ });
1046
+ }
1047
+ debug("range list", rangeList);
1048
+ const rangeMap = /* @__PURE__ */ new Map();
1049
+ const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
1050
+ for (const comp of comparators) {
1051
+ if (isNullSet(comp)) {
1052
+ return [comp];
1053
+ }
1054
+ rangeMap.set(comp.value, comp);
1055
+ }
1056
+ if (rangeMap.size > 1 && rangeMap.has("")) {
1057
+ rangeMap.delete("");
1058
+ }
1059
+ const result = [...rangeMap.values()];
1060
+ cache.set(memoKey, result);
1061
+ return result;
1062
+ }
1063
+ intersects(range, options) {
1064
+ if (!(range instanceof _Range)) {
1065
+ throw new TypeError("a Range is required");
1066
+ }
1067
+ return this.set.some((thisComparators) => {
1068
+ return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
1069
+ return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
1070
+ return rangeComparators.every((rangeComparator) => {
1071
+ return thisComparator.intersects(rangeComparator, options);
1072
+ });
1073
+ });
1074
+ });
1075
+ });
1076
+ }
1077
+ // if ANY of the sets match ALL of its comparators, then pass
1078
+ test(version) {
1079
+ if (!version) {
1080
+ return false;
1081
+ }
1082
+ if (typeof version === "string") {
1083
+ try {
1084
+ version = new SemVer(version, this.options);
1085
+ } catch (er) {
1086
+ return false;
1087
+ }
1088
+ }
1089
+ for (let i = 0; i < this.set.length; i++) {
1090
+ if (testSet(this.set[i], version, this.options)) {
1091
+ return true;
1092
+ }
1093
+ }
1094
+ return false;
1095
+ }
1096
+ };
1097
+ module2.exports = Range;
1098
+ var LRU = require_lrucache();
1099
+ var cache = new LRU();
1100
+ var parseOptions = require_parse_options();
1101
+ var Comparator = require_comparator();
1102
+ var debug = require_debug();
1103
+ var SemVer = require_semver();
1104
+ var {
1105
+ safeRe: re,
1106
+ src,
1107
+ t,
1108
+ comparatorTrimReplace,
1109
+ tildeTrimReplace,
1110
+ caretTrimReplace
1111
+ } = require_re();
1112
+ var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
1113
+ var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
1114
+ var isNullSet = (c) => c.value === "<0.0.0-0";
1115
+ var isAny = (c) => c.value === "";
1116
+ var isSatisfiable = (comparators, options) => {
1117
+ let result = true;
1118
+ const remainingComparators = comparators.slice();
1119
+ let testComparator = remainingComparators.pop();
1120
+ while (result && remainingComparators.length) {
1121
+ result = remainingComparators.every((otherComparator) => {
1122
+ return testComparator.intersects(otherComparator, options);
1123
+ });
1124
+ testComparator = remainingComparators.pop();
1125
+ }
1126
+ return result;
1127
+ };
1128
+ var parseComparator = (comp, options) => {
1129
+ comp = comp.replace(re[t.BUILD], "");
1130
+ debug("comp", comp, options);
1131
+ comp = replaceCarets(comp, options);
1132
+ debug("caret", comp);
1133
+ comp = replaceTildes(comp, options);
1134
+ debug("tildes", comp);
1135
+ comp = replaceXRanges(comp, options);
1136
+ debug("xrange", comp);
1137
+ comp = replaceStars(comp, options);
1138
+ debug("stars", comp);
1139
+ return comp;
1140
+ };
1141
+ var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
1142
+ var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
1143
+ var replaceTildes = (comp, options) => {
1144
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
1145
+ };
1146
+ var replaceTilde = (comp, options) => {
1147
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
1148
+ const z10 = options.includePrerelease ? "-0" : "";
1149
+ return comp.replace(r, (_, M, m, p, pr) => {
1150
+ debug("tilde", comp, _, M, m, p, pr);
1151
+ let ret;
1152
+ if (isX(M)) {
1153
+ ret = "";
1154
+ } else if (isX(m)) {
1155
+ ret = `>=${M}.0.0${z10} <${+M + 1}.0.0-0`;
1156
+ } else if (isX(p)) {
1157
+ ret = `>=${M}.${m}.0${z10} <${M}.${+m + 1}.0-0`;
1158
+ } else if (pr) {
1159
+ debug("replaceTilde pr", pr);
1160
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
1161
+ } else {
1162
+ ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
1163
+ }
1164
+ debug("tilde return", ret);
1165
+ return ret;
1166
+ });
1167
+ };
1168
+ var replaceCarets = (comp, options) => {
1169
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
1170
+ };
1171
+ var replaceCaret = (comp, options) => {
1172
+ debug("caret", comp, options);
1173
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
1174
+ const z10 = options.includePrerelease ? "-0" : "";
1175
+ return comp.replace(r, (_, M, m, p, pr) => {
1176
+ debug("caret", comp, _, M, m, p, pr);
1177
+ let ret;
1178
+ if (isX(M)) {
1179
+ ret = "";
1180
+ } else if (isX(m)) {
1181
+ ret = `>=${M}.0.0${z10} <${+M + 1}.0.0-0`;
1182
+ } else if (isX(p)) {
1183
+ if (M === "0") {
1184
+ ret = `>=${M}.${m}.0${z10} <${M}.${+m + 1}.0-0`;
1185
+ } else {
1186
+ ret = `>=${M}.${m}.0${z10} <${+M + 1}.0.0-0`;
1187
+ }
1188
+ } else if (pr) {
1189
+ debug("replaceCaret pr", pr);
1190
+ if (M === "0") {
1191
+ if (m === "0") {
1192
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
1193
+ } else {
1194
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
1195
+ }
1196
+ } else {
1197
+ ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
1198
+ }
1199
+ } else {
1200
+ debug("no pr");
1201
+ if (M === "0") {
1202
+ if (m === "0") {
1203
+ ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
1204
+ } else {
1205
+ ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
1206
+ }
1207
+ } else {
1208
+ ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
1209
+ }
1210
+ }
1211
+ debug("caret return", ret);
1212
+ return ret;
1213
+ });
1214
+ };
1215
+ var replaceXRanges = (comp, options) => {
1216
+ debug("replaceXRanges", comp, options);
1217
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
1218
+ };
1219
+ var replaceXRange = (comp, options) => {
1220
+ comp = comp.trim();
1221
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
1222
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
1223
+ debug("xRange", comp, ret, gtlt, M, m, p, pr);
1224
+ if (invalidXRangeOrder(M, m, p)) {
1225
+ return comp;
1226
+ }
1227
+ const xM = isX(M);
1228
+ const xm = xM || isX(m);
1229
+ const xp = xm || isX(p);
1230
+ const anyX = xp;
1231
+ if (gtlt === "=" && anyX) {
1232
+ gtlt = "";
1233
+ }
1234
+ pr = options.includePrerelease ? "-0" : "";
1235
+ if (xM) {
1236
+ if (gtlt === ">" || gtlt === "<") {
1237
+ ret = "<0.0.0-0";
1238
+ } else {
1239
+ ret = "*";
1240
+ }
1241
+ } else if (gtlt && anyX) {
1242
+ if (xm) {
1243
+ m = 0;
1244
+ }
1245
+ p = 0;
1246
+ if (gtlt === ">") {
1247
+ gtlt = ">=";
1248
+ if (xm) {
1249
+ M = +M + 1;
1250
+ m = 0;
1251
+ p = 0;
1252
+ } else {
1253
+ m = +m + 1;
1254
+ p = 0;
1255
+ }
1256
+ } else if (gtlt === "<=") {
1257
+ gtlt = "<";
1258
+ if (xm) {
1259
+ M = +M + 1;
1260
+ } else {
1261
+ m = +m + 1;
1262
+ }
1263
+ }
1264
+ if (gtlt === "<") {
1265
+ pr = "-0";
1266
+ }
1267
+ ret = `${gtlt + M}.${m}.${p}${pr}`;
1268
+ } else if (xm) {
1269
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
1270
+ } else if (xp) {
1271
+ ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
1272
+ }
1273
+ debug("xRange return", ret);
1274
+ return ret;
1275
+ });
1276
+ };
1277
+ var replaceStars = (comp, options) => {
1278
+ debug("replaceStars", comp, options);
1279
+ return comp.trim().replace(re[t.STAR], "");
1280
+ };
1281
+ var replaceGTE0 = (comp, options) => {
1282
+ debug("replaceGTE0", comp, options);
1283
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
1284
+ };
1285
+ var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
1286
+ if (isX(fM)) {
1287
+ from = "";
1288
+ } else if (isX(fm)) {
1289
+ from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
1290
+ } else if (isX(fp)) {
1291
+ from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
1292
+ } else if (fpr) {
1293
+ from = `>=${from}`;
1294
+ } else {
1295
+ from = `>=${from}${incPr ? "-0" : ""}`;
1296
+ }
1297
+ if (isX(tM)) {
1298
+ to = "";
1299
+ } else if (isX(tm)) {
1300
+ to = `<${+tM + 1}.0.0-0`;
1301
+ } else if (isX(tp)) {
1302
+ to = `<${tM}.${+tm + 1}.0-0`;
1303
+ } else if (tpr) {
1304
+ to = `<=${tM}.${tm}.${tp}-${tpr}`;
1305
+ } else if (incPr) {
1306
+ to = `<${tM}.${tm}.${+tp + 1}-0`;
1307
+ } else {
1308
+ to = `<=${to}`;
1309
+ }
1310
+ return `${from} ${to}`.trim();
1311
+ };
1312
+ var testSet = (set, version, options) => {
1313
+ for (let i = 0; i < set.length; i++) {
1314
+ if (!set[i].test(version)) {
1315
+ return false;
1316
+ }
1317
+ }
1318
+ if (version.prerelease.length && !options.includePrerelease) {
1319
+ for (let i = 0; i < set.length; i++) {
1320
+ debug(set[i].semver);
1321
+ if (set[i].semver === Comparator.ANY) {
1322
+ continue;
1323
+ }
1324
+ if (set[i].semver.prerelease.length > 0) {
1325
+ const allowed = set[i].semver;
1326
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
1327
+ return true;
1328
+ }
1329
+ }
1330
+ }
1331
+ return false;
1332
+ }
1333
+ return true;
1334
+ };
1335
+ }
1336
+ });
1337
+
1338
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
1339
+ var require_comparator = __commonJS({
1340
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports2, module2) {
1341
+ "use strict";
1342
+ var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
1343
+ var Comparator = class _Comparator {
1344
+ static get ANY() {
1345
+ return ANY;
1346
+ }
1347
+ constructor(comp, options) {
1348
+ options = parseOptions(options);
1349
+ if (comp instanceof _Comparator) {
1350
+ if (comp.loose === !!options.loose) {
1351
+ return comp;
1352
+ } else {
1353
+ comp = comp.value;
1354
+ }
1355
+ }
1356
+ comp = comp.trim().split(/\s+/).join(" ");
1357
+ debug("comparator", comp, options);
1358
+ this.options = options;
1359
+ this.loose = !!options.loose;
1360
+ this.parse(comp);
1361
+ if (this.semver === ANY) {
1362
+ this.value = "";
1363
+ } else {
1364
+ this.value = this.operator + this.semver.version;
1365
+ }
1366
+ debug("comp", this);
1367
+ }
1368
+ parse(comp) {
1369
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
1370
+ const m = comp.match(r);
1371
+ if (!m) {
1372
+ throw new TypeError(`Invalid comparator: ${comp}`);
1373
+ }
1374
+ this.operator = m[1] !== void 0 ? m[1] : "";
1375
+ if (this.operator === "=") {
1376
+ this.operator = "";
1377
+ }
1378
+ if (!m[2]) {
1379
+ this.semver = ANY;
1380
+ } else {
1381
+ this.semver = new SemVer(m[2], this.options.loose);
1382
+ }
1383
+ }
1384
+ toString() {
1385
+ return this.value;
1386
+ }
1387
+ test(version) {
1388
+ debug("Comparator.test", version, this.options.loose);
1389
+ if (this.semver === ANY || version === ANY) {
1390
+ return true;
1391
+ }
1392
+ if (typeof version === "string") {
1393
+ try {
1394
+ version = new SemVer(version, this.options);
1395
+ } catch (er) {
1396
+ return false;
1397
+ }
1398
+ }
1399
+ return cmp(version, this.operator, this.semver, this.options);
1400
+ }
1401
+ intersects(comp, options) {
1402
+ if (!(comp instanceof _Comparator)) {
1403
+ throw new TypeError("a Comparator is required");
1404
+ }
1405
+ if (this.operator === "") {
1406
+ if (this.value === "") {
1407
+ return true;
1408
+ }
1409
+ return new Range(comp.value, options).test(this.value);
1410
+ } else if (comp.operator === "") {
1411
+ if (comp.value === "") {
1412
+ return true;
1413
+ }
1414
+ return new Range(this.value, options).test(comp.semver);
1415
+ }
1416
+ options = parseOptions(options);
1417
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
1418
+ return false;
1419
+ }
1420
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
1421
+ return false;
1422
+ }
1423
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
1424
+ return true;
1425
+ }
1426
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
1427
+ return true;
1428
+ }
1429
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
1430
+ return true;
1431
+ }
1432
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
1433
+ return true;
1434
+ }
1435
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
1436
+ return true;
1437
+ }
1438
+ return false;
1439
+ }
1440
+ };
1441
+ module2.exports = Comparator;
1442
+ var parseOptions = require_parse_options();
1443
+ var { safeRe: re, t } = require_re();
1444
+ var cmp = require_cmp();
1445
+ var debug = require_debug();
1446
+ var SemVer = require_semver();
1447
+ var Range = require_range();
1448
+ }
1449
+ });
1450
+
1451
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
1452
+ var require_satisfies = __commonJS({
1453
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports2, module2) {
1454
+ "use strict";
1455
+ var Range = require_range();
1456
+ var satisfies = (version, range, options) => {
1457
+ try {
1458
+ range = new Range(range, options);
1459
+ } catch (er) {
1460
+ return false;
1461
+ }
1462
+ return range.test(version);
1463
+ };
1464
+ module2.exports = satisfies;
1465
+ }
1466
+ });
1467
+
1468
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
1469
+ var require_to_comparators = __commonJS({
1470
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
1471
+ "use strict";
1472
+ var Range = require_range();
1473
+ var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
1474
+ module2.exports = toComparators;
1475
+ }
1476
+ });
1477
+
1478
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
1479
+ var require_max_satisfying = __commonJS({
1480
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
1481
+ "use strict";
1482
+ var SemVer = require_semver();
1483
+ var Range = require_range();
1484
+ var maxSatisfying = (versions, range, options) => {
1485
+ let max = null;
1486
+ let maxSV = null;
1487
+ let rangeObj = null;
1488
+ try {
1489
+ rangeObj = new Range(range, options);
1490
+ } catch (er) {
1491
+ return null;
1492
+ }
1493
+ versions.forEach((v) => {
1494
+ if (rangeObj.test(v)) {
1495
+ if (!max || maxSV.compare(v) === -1) {
1496
+ max = v;
1497
+ maxSV = new SemVer(max, options);
1498
+ }
1499
+ }
1500
+ });
1501
+ return max;
1502
+ };
1503
+ module2.exports = maxSatisfying;
1504
+ }
1505
+ });
1506
+
1507
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
1508
+ var require_min_satisfying = __commonJS({
1509
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
1510
+ "use strict";
1511
+ var SemVer = require_semver();
1512
+ var Range = require_range();
1513
+ var minSatisfying = (versions, range, options) => {
1514
+ let min = null;
1515
+ let minSV = null;
1516
+ let rangeObj = null;
1517
+ try {
1518
+ rangeObj = new Range(range, options);
1519
+ } catch (er) {
1520
+ return null;
1521
+ }
1522
+ versions.forEach((v) => {
1523
+ if (rangeObj.test(v)) {
1524
+ if (!min || minSV.compare(v) === 1) {
1525
+ min = v;
1526
+ minSV = new SemVer(min, options);
1527
+ }
1528
+ }
1529
+ });
1530
+ return min;
1531
+ };
1532
+ module2.exports = minSatisfying;
1533
+ }
1534
+ });
1535
+
1536
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
1537
+ var require_min_version = __commonJS({
1538
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports2, module2) {
1539
+ "use strict";
1540
+ var SemVer = require_semver();
1541
+ var Range = require_range();
1542
+ var gt = require_gt();
1543
+ var minVersion = (range, loose) => {
1544
+ range = new Range(range, loose);
1545
+ let minver = new SemVer("0.0.0");
1546
+ if (range.test(minver)) {
1547
+ return minver;
1548
+ }
1549
+ minver = new SemVer("0.0.0-0");
1550
+ if (range.test(minver)) {
1551
+ return minver;
1552
+ }
1553
+ minver = null;
1554
+ for (let i = 0; i < range.set.length; ++i) {
1555
+ const comparators = range.set[i];
1556
+ let setMin = null;
1557
+ comparators.forEach((comparator) => {
1558
+ const compver = new SemVer(comparator.semver.version);
1559
+ switch (comparator.operator) {
1560
+ case ">":
1561
+ if (compver.prerelease.length === 0) {
1562
+ compver.patch++;
1563
+ } else {
1564
+ compver.prerelease.push(0);
1565
+ }
1566
+ compver.raw = compver.format();
1567
+ /* fallthrough */
1568
+ case "":
1569
+ case ">=":
1570
+ if (!setMin || gt(compver, setMin)) {
1571
+ setMin = compver;
1572
+ }
1573
+ break;
1574
+ case "<":
1575
+ case "<=":
1576
+ break;
1577
+ /* istanbul ignore next */
1578
+ default:
1579
+ throw new Error(`Unexpected operation: ${comparator.operator}`);
1580
+ }
1581
+ });
1582
+ if (setMin && (!minver || gt(minver, setMin))) {
1583
+ minver = setMin;
1584
+ }
1585
+ }
1586
+ if (minver && range.test(minver)) {
1587
+ return minver;
1588
+ }
1589
+ return null;
1590
+ };
1591
+ module2.exports = minVersion;
1592
+ }
1593
+ });
1594
+
1595
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
1596
+ var require_valid2 = __commonJS({
1597
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports2, module2) {
1598
+ "use strict";
1599
+ var Range = require_range();
1600
+ var validRange = (range, options) => {
1601
+ try {
1602
+ return new Range(range, options).range || "*";
1603
+ } catch (er) {
1604
+ return null;
1605
+ }
1606
+ };
1607
+ module2.exports = validRange;
1608
+ }
1609
+ });
1610
+
1611
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
1612
+ var require_outside = __commonJS({
1613
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports2, module2) {
1614
+ "use strict";
1615
+ var SemVer = require_semver();
1616
+ var Comparator = require_comparator();
1617
+ var { ANY } = Comparator;
1618
+ var Range = require_range();
1619
+ var satisfies = require_satisfies();
1620
+ var gt = require_gt();
1621
+ var lt = require_lt();
1622
+ var lte = require_lte();
1623
+ var gte = require_gte();
1624
+ var outside = (version, range, hilo, options) => {
1625
+ version = new SemVer(version, options);
1626
+ range = new Range(range, options);
1627
+ let gtfn, ltefn, ltfn, comp, ecomp;
1628
+ switch (hilo) {
1629
+ case ">":
1630
+ gtfn = gt;
1631
+ ltefn = lte;
1632
+ ltfn = lt;
1633
+ comp = ">";
1634
+ ecomp = ">=";
1635
+ break;
1636
+ case "<":
1637
+ gtfn = lt;
1638
+ ltefn = gte;
1639
+ ltfn = gt;
1640
+ comp = "<";
1641
+ ecomp = "<=";
1642
+ break;
1643
+ default:
1644
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
1645
+ }
1646
+ if (satisfies(version, range, options)) {
1647
+ return false;
1648
+ }
1649
+ for (let i = 0; i < range.set.length; ++i) {
1650
+ const comparators = range.set[i];
1651
+ let high = null;
1652
+ let low = null;
1653
+ comparators.forEach((comparator) => {
1654
+ if (comparator.semver === ANY) {
1655
+ comparator = new Comparator(">=0.0.0");
1656
+ }
1657
+ high = high || comparator;
1658
+ low = low || comparator;
1659
+ if (gtfn(comparator.semver, high.semver, options)) {
1660
+ high = comparator;
1661
+ } else if (ltfn(comparator.semver, low.semver, options)) {
1662
+ low = comparator;
1663
+ }
1664
+ });
1665
+ if (high.operator === comp || high.operator === ecomp) {
1666
+ return false;
1667
+ }
1668
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
1669
+ return false;
1670
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
1671
+ return false;
1672
+ }
1673
+ }
1674
+ return true;
1675
+ };
1676
+ module2.exports = outside;
1677
+ }
1678
+ });
1679
+
1680
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
1681
+ var require_gtr = __commonJS({
1682
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports2, module2) {
1683
+ "use strict";
1684
+ var outside = require_outside();
1685
+ var gtr = (version, range, options) => outside(version, range, ">", options);
1686
+ module2.exports = gtr;
1687
+ }
1688
+ });
1689
+
1690
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
1691
+ var require_ltr = __commonJS({
1692
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports2, module2) {
1693
+ "use strict";
1694
+ var outside = require_outside();
1695
+ var ltr = (version, range, options) => outside(version, range, "<", options);
1696
+ module2.exports = ltr;
1697
+ }
1698
+ });
1699
+
1700
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
1701
+ var require_intersects = __commonJS({
1702
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports2, module2) {
1703
+ "use strict";
1704
+ var Range = require_range();
1705
+ var intersects = (r1, r2, options) => {
1706
+ r1 = new Range(r1, options);
1707
+ r2 = new Range(r2, options);
1708
+ return r1.intersects(r2, options);
1709
+ };
1710
+ module2.exports = intersects;
1711
+ }
1712
+ });
1713
+
1714
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
1715
+ var require_simplify = __commonJS({
1716
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports2, module2) {
1717
+ "use strict";
1718
+ var satisfies = require_satisfies();
1719
+ var compare = require_compare();
1720
+ module2.exports = (versions, range, options) => {
1721
+ const set = [];
1722
+ let first = null;
1723
+ let prev = null;
1724
+ const v = versions.sort((a, b) => compare(a, b, options));
1725
+ for (const version of v) {
1726
+ const included = satisfies(version, range, options);
1727
+ if (included) {
1728
+ prev = version;
1729
+ if (!first) {
1730
+ first = version;
1731
+ }
1732
+ } else {
1733
+ if (prev) {
1734
+ set.push([first, prev]);
1735
+ }
1736
+ prev = null;
1737
+ first = null;
1738
+ }
1739
+ }
1740
+ if (first) {
1741
+ set.push([first, null]);
1742
+ }
1743
+ const ranges = [];
1744
+ for (const [min, max] of set) {
1745
+ if (min === max) {
1746
+ ranges.push(min);
1747
+ } else if (!max && min === v[0]) {
1748
+ ranges.push("*");
1749
+ } else if (!max) {
1750
+ ranges.push(`>=${min}`);
1751
+ } else if (min === v[0]) {
1752
+ ranges.push(`<=${max}`);
1753
+ } else {
1754
+ ranges.push(`${min} - ${max}`);
1755
+ }
1756
+ }
1757
+ const simplified = ranges.join(" || ");
1758
+ const original = typeof range.raw === "string" ? range.raw : String(range);
1759
+ return simplified.length < original.length ? simplified : range;
1760
+ };
1761
+ }
1762
+ });
1763
+
1764
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
1765
+ var require_subset = __commonJS({
1766
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports2, module2) {
1767
+ "use strict";
1768
+ var Range = require_range();
1769
+ var Comparator = require_comparator();
1770
+ var { ANY } = Comparator;
1771
+ var satisfies = require_satisfies();
1772
+ var compare = require_compare();
1773
+ var subset = (sub, dom, options = {}) => {
1774
+ if (sub === dom) {
1775
+ return true;
1776
+ }
1777
+ sub = new Range(sub, options);
1778
+ dom = new Range(dom, options);
1779
+ let sawNonNull = false;
1780
+ OUTER: for (const simpleSub of sub.set) {
1781
+ for (const simpleDom of dom.set) {
1782
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
1783
+ sawNonNull = sawNonNull || isSub !== null;
1784
+ if (isSub) {
1785
+ continue OUTER;
1786
+ }
1787
+ }
1788
+ if (sawNonNull) {
1789
+ return false;
1790
+ }
1791
+ }
1792
+ return true;
1793
+ };
1794
+ var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
1795
+ var minimumVersion = [new Comparator(">=0.0.0")];
1796
+ var simpleSubset = (sub, dom, options) => {
1797
+ if (sub === dom) {
1798
+ return true;
1799
+ }
1800
+ if (sub.length === 1 && sub[0].semver === ANY) {
1801
+ if (dom.length === 1 && dom[0].semver === ANY) {
1802
+ return true;
1803
+ } else if (options.includePrerelease) {
1804
+ sub = minimumVersionWithPreRelease;
1805
+ } else {
1806
+ sub = minimumVersion;
1807
+ }
1808
+ }
1809
+ if (dom.length === 1 && dom[0].semver === ANY) {
1810
+ if (options.includePrerelease) {
1811
+ return true;
1812
+ } else {
1813
+ dom = minimumVersion;
1814
+ }
1815
+ }
1816
+ const eqSet = /* @__PURE__ */ new Set();
1817
+ let gt, lt;
1818
+ for (const c of sub) {
1819
+ if (c.operator === ">" || c.operator === ">=") {
1820
+ gt = higherGT(gt, c, options);
1821
+ } else if (c.operator === "<" || c.operator === "<=") {
1822
+ lt = lowerLT(lt, c, options);
1823
+ } else {
1824
+ eqSet.add(c.semver);
1825
+ }
1826
+ }
1827
+ if (eqSet.size > 1) {
1828
+ return null;
1829
+ }
1830
+ let gtltComp;
1831
+ if (gt && lt) {
1832
+ gtltComp = compare(gt.semver, lt.semver, options);
1833
+ if (gtltComp > 0) {
1834
+ return null;
1835
+ } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
1836
+ return null;
1837
+ }
1838
+ }
1839
+ for (const eq of eqSet) {
1840
+ if (gt && !satisfies(eq, String(gt), options)) {
1841
+ return null;
1842
+ }
1843
+ if (lt && !satisfies(eq, String(lt), options)) {
1844
+ return null;
1845
+ }
1846
+ for (const c of dom) {
1847
+ if (!satisfies(eq, String(c), options)) {
1848
+ return false;
1849
+ }
1850
+ }
1851
+ return true;
1852
+ }
1853
+ let higher, lower;
1854
+ let hasDomLT, hasDomGT;
1855
+ let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
1856
+ let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
1857
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
1858
+ needDomLTPre = false;
1859
+ }
1860
+ for (const c of dom) {
1861
+ hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
1862
+ hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
1863
+ if (gt) {
1864
+ if (needDomGTPre) {
1865
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
1866
+ needDomGTPre = false;
1867
+ }
1868
+ }
1869
+ if (c.operator === ">" || c.operator === ">=") {
1870
+ higher = higherGT(gt, c, options);
1871
+ if (higher === c && higher !== gt) {
1872
+ return false;
1873
+ }
1874
+ } else if (gt.operator === ">=" && !c.test(gt.semver)) {
1875
+ return false;
1876
+ }
1877
+ }
1878
+ if (lt) {
1879
+ if (needDomLTPre) {
1880
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
1881
+ needDomLTPre = false;
1882
+ }
1883
+ }
1884
+ if (c.operator === "<" || c.operator === "<=") {
1885
+ lower = lowerLT(lt, c, options);
1886
+ if (lower === c && lower !== lt) {
1887
+ return false;
1888
+ }
1889
+ } else if (lt.operator === "<=" && !c.test(lt.semver)) {
1890
+ return false;
1891
+ }
1892
+ }
1893
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
1894
+ return false;
1895
+ }
1896
+ }
1897
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
1898
+ return false;
1899
+ }
1900
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
1901
+ return false;
1902
+ }
1903
+ if (needDomGTPre || needDomLTPre) {
1904
+ return false;
1905
+ }
1906
+ return true;
1907
+ };
1908
+ var higherGT = (a, b, options) => {
1909
+ if (!a) {
1910
+ return b;
1911
+ }
1912
+ const comp = compare(a.semver, b.semver, options);
1913
+ return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
1914
+ };
1915
+ var lowerLT = (a, b, options) => {
1916
+ if (!a) {
1917
+ return b;
1918
+ }
1919
+ const comp = compare(a.semver, b.semver, options);
1920
+ return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
1921
+ };
1922
+ module2.exports = subset;
1923
+ }
1924
+ });
1925
+
1926
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
1927
+ var require_semver2 = __commonJS({
1928
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports2, module2) {
1929
+ "use strict";
1930
+ var internalRe = require_re();
1931
+ var constants = require_constants();
1932
+ var SemVer = require_semver();
1933
+ var identifiers = require_identifiers();
1934
+ var parse = require_parse();
1935
+ var valid = require_valid();
1936
+ var clean = require_clean();
1937
+ var inc = require_inc();
1938
+ var diff = require_diff();
1939
+ var major = require_major();
1940
+ var minor = require_minor();
1941
+ var patch = require_patch();
1942
+ var prerelease = require_prerelease();
1943
+ var compare = require_compare();
1944
+ var rcompare = require_rcompare();
1945
+ var compareLoose = require_compare_loose();
1946
+ var compareBuild = require_compare_build();
1947
+ var sort = require_sort();
1948
+ var rsort = require_rsort();
1949
+ var gt = require_gt();
1950
+ var lt = require_lt();
1951
+ var eq = require_eq();
1952
+ var neq = require_neq();
1953
+ var gte = require_gte();
1954
+ var lte = require_lte();
1955
+ var cmp = require_cmp();
1956
+ var coerce = require_coerce();
1957
+ var truncate = require_truncate();
1958
+ var Comparator = require_comparator();
1959
+ var Range = require_range();
1960
+ var satisfies = require_satisfies();
1961
+ var toComparators = require_to_comparators();
1962
+ var maxSatisfying = require_max_satisfying();
1963
+ var minSatisfying = require_min_satisfying();
1964
+ var minVersion = require_min_version();
1965
+ var validRange = require_valid2();
1966
+ var outside = require_outside();
1967
+ var gtr = require_gtr();
1968
+ var ltr = require_ltr();
1969
+ var intersects = require_intersects();
1970
+ var simplifyRange = require_simplify();
1971
+ var subset = require_subset();
1972
+ module2.exports = {
1973
+ parse,
1974
+ valid,
1975
+ clean,
1976
+ inc,
1977
+ diff,
1978
+ major,
1979
+ minor,
1980
+ patch,
1981
+ prerelease,
1982
+ compare,
1983
+ rcompare,
1984
+ compareLoose,
1985
+ compareBuild,
1986
+ sort,
1987
+ rsort,
1988
+ gt,
1989
+ lt,
1990
+ eq,
1991
+ neq,
1992
+ gte,
1993
+ lte,
1994
+ cmp,
1995
+ coerce,
1996
+ truncate,
1997
+ Comparator,
1998
+ Range,
1999
+ satisfies,
2000
+ toComparators,
2001
+ maxSatisfying,
2002
+ minSatisfying,
2003
+ minVersion,
2004
+ validRange,
2005
+ outside,
2006
+ gtr,
2007
+ ltr,
2008
+ intersects,
2009
+ simplifyRange,
2010
+ subset,
2011
+ SemVer,
2012
+ re: internalRe.re,
2013
+ src: internalRe.src,
2014
+ tokens: internalRe.t,
2015
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
2016
+ RELEASE_TYPES: constants.RELEASE_TYPES,
2017
+ compareIdentifiers: identifiers.compareIdentifiers,
2018
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
2019
+ };
2020
+ }
2021
+ });
25
2022
 
26
2023
  // src/cli.ts
27
2024
  var import_node_util = require("util");
@@ -239,6 +2236,14 @@ var datastoreRequirementSchema = import_zod.z.object({
239
2236
  id: tableNameSchema,
240
2237
  /** "app" = this project's app-local store; "org" = an org-level shared store. */
241
2238
  scope: import_zod.z.enum(["app", "org"]).default("app"),
2239
+ /**
2240
+ * Which kind of connected store satisfies this requirement. A "database"
2241
+ * requirement only ever binds to a database store and a "storage" one
2242
+ * (file/object storage — uploads, images) only to a storage store; the
2243
+ * rail never crosses the two. Defaults to "database", the only kind the
2244
+ * rail resolved before this field existed.
2245
+ */
2246
+ type: import_zod.z.enum(["database", "storage"]).default("database"),
242
2247
  /** true → install fails when no store resolves; false → binding omitted, module degrades. */
243
2248
  required: import_zod.z.boolean().default(true),
244
2249
  /** Checked against the connected store's accessLevel at install. */
@@ -342,7 +2347,14 @@ var moduleManifestSchema = import_zod.z.object({
342
2347
  */
343
2348
  seeds: import_zod.z.array(seedBundleSchema).optional(),
344
2349
  /** npm packages the source imports beyond the base app. Names only; the rail installs each at the home app's range. */
345
- packages: import_zod.z.array(npmPackageNameSchema).optional()
2350
+ packages: import_zod.z.array(npmPackageNameSchema).optional(),
2351
+ /**
2352
+ * UI-layer contract. `separable: true` asserts the Module's components/ and
2353
+ * routes/ hold presentation only — the Blueprint's
2354
+ * `module-boundaries/ui-layer` lint rule enforces it — so a fork may
2355
+ * soft-eject them. See docs/module-ui-soft-eject-plan.md.
2356
+ */
2357
+ ui: import_zod.z.object({ separable: import_zod.z.boolean() }).strict().optional()
346
2358
  }).strict().superRefine((manifest, ctx) => {
347
2359
  if (manifest.uses.includes(manifest.name)) {
348
2360
  ctx.addIssue({
@@ -2080,7 +4092,11 @@ var composeInputsSchema = import_zod7.z.strictObject({
2080
4092
  // A row with an empty binding key must not fail a deploy: the rail
2081
4093
  // treats falsy as "no binding key", so normalise rather than reject.
2082
4094
  bindingKey: import_zod7.z.string().nullish().transform((value) => value || null),
2083
- accessLevel: import_zod7.z.enum(["read", "write", "admin"])
4095
+ accessLevel: import_zod7.z.enum(["read", "write", "admin"]),
4096
+ // Defaulted so a file written before the platform emitted store types
4097
+ // (database rows only) still parses. The platform starts writing
4098
+ // storage rows, with `type` set, once forks run a compose that reads it.
4099
+ type: import_zod7.z.enum(["database", "storage"]).default("database")
2084
4100
  })
2085
4101
  ).default([]),
2086
4102
  installs: import_zod7.z.record(
@@ -2091,6 +4107,17 @@ var composeInputsSchema = import_zod7.z.strictObject({
2091
4107
  })
2092
4108
  ).default({})
2093
4109
  });
4110
+ var STUB_IGNORE_PATH = "apps/web/src/app/.gitignore";
4111
+ var STUB_IGNORE_HEADER = "# Generated by stardeck-compose \u2014 Module-rail stubs are build outputs; do not edit or commit them.";
4112
+ function escapeStubIgnorePattern(pattern) {
4113
+ const escaped = pattern.replace(/[\\[\]*?]/g, (char) => `\\${char}`);
4114
+ return /^[#!]/.test(escaped) ? `\\${escaped}` : escaped;
4115
+ }
4116
+ function buildStubIgnore(artifactPaths) {
4117
+ const prefix = "apps/web/src/app/";
4118
+ const entries = artifactPaths.filter((artifact) => artifact.startsWith(prefix)).map((artifact) => escapeStubIgnorePattern(`/${artifact.slice(prefix.length)}`)).sort();
4119
+ return [STUB_IGNORE_HEADER, ...entries].join("\n") + "\n";
4120
+ }
2094
4121
 
2095
4122
  // ../../packages/lib/src/shared/module-enablement.ts
2096
4123
  function isModuleEnabledByList(raw, name, kindOf) {
@@ -3583,9 +5610,27 @@ function dirnamePosix(filePath) {
3583
5610
  }
3584
5611
 
3585
5612
  // ../../packages/lib/src/server/module-rail/compose-inputs.ts
5613
+ var import_semver = __toESM(require_semver2(), 1);
5614
+ var TYPED_STORES_MIN_COMPOSE_VERSION = "0.4.0";
5615
+ var COMPOSE_PACKAGE = "@stardeck-customer-apps/compose";
5616
+ var APP_PACKAGE_JSON_PATH = "apps/web/package.json";
5617
+ async function checkoutParsesTypedStores(sandbox) {
5618
+ try {
5619
+ if (!await sandbox.fileExists(APP_PACKAGE_JSON_PATH)) return false;
5620
+ const pkg = JSON.parse(await sandbox.readFile(APP_PACKAGE_JSON_PATH));
5621
+ const range = pkg.devDependencies?.[COMPOSE_PACKAGE] ?? pkg.dependencies?.[COMPOSE_PACKAGE];
5622
+ if (!range) return false;
5623
+ const lowest = import_semver.default.minVersion(range);
5624
+ return lowest != null && import_semver.default.gte(lowest, TYPED_STORES_MIN_COMPOSE_VERSION);
5625
+ } catch {
5626
+ return false;
5627
+ }
5628
+ }
3586
5629
  async function buildComposeInputs(input) {
3587
- const { db, projectId, deps } = input;
3588
- const connectedStores = await deps.listDatabaseStoresForProject(db, projectId);
5630
+ const { db, projectId, deps, typedStores } = input;
5631
+ console.log(`[ComposeInputs] project=${projectId} typedStores=${typedStores}`);
5632
+ const allStores = await deps.listConnectedStoresForProject(db, projectId);
5633
+ const connectedStores = typedStores ? allStores : allStores.filter((store) => store.type === "database");
3589
5634
  const installRows = await Promise.all(
3590
5635
  input.moduleNames.map(async (moduleName) => ({
3591
5636
  moduleName,
@@ -3600,7 +5645,12 @@ async function buildComposeInputs(input) {
3600
5645
  datastoreBindings: install.datastoreBindings ?? null
3601
5646
  };
3602
5647
  }
3603
- return composeInputsSchema.parse({ connectedStores, installs });
5648
+ const parsed = composeInputsSchema.parse({ connectedStores, installs });
5649
+ if (typedStores) return parsed;
5650
+ return {
5651
+ ...parsed,
5652
+ connectedStores: parsed.connectedStores.map(({ type: _type, ...store }) => store)
5653
+ };
3604
5654
  }
3605
5655
 
3606
5656
  // ../../packages/lib/src/shared/data-store-manifest.ts
@@ -3626,7 +5676,7 @@ function compareStores(a, b) {
3626
5676
  function describeCandidates(stores) {
3627
5677
  if (stores.length === 0) return "none";
3628
5678
  return stores.map(
3629
- (store) => `${store.storeId} (slug=${store.slug}, bindingKey=${store.bindingKey ?? "none"}, access=${store.accessLevel})`
5679
+ (store) => `${store.storeId} (type=${store.type}, slug=${store.slug}, bindingKey=${store.bindingKey ?? "none"}, access=${store.accessLevel})`
3630
5680
  ).join(", ");
3631
5681
  }
3632
5682
  function groupStoresById(stores) {
@@ -3657,14 +5707,15 @@ function accessLevelForBinding(group, binding) {
3657
5707
  );
3658
5708
  }
3659
5709
  function resolveModuleDataStoreBindings(input) {
3660
- const stores = [...input.connectedStores].sort(compareStores);
3661
- const storeGroups = groupStoresById(stores);
5710
+ const allStores = [...input.connectedStores].sort(compareStores);
3662
5711
  const requirements = [...input.requirements].sort((a, b) => compareStrings(a.id, b.id));
3663
5712
  const overrides = input.explicitOverrides ?? {};
3664
5713
  const bindings = {};
3665
5714
  const errors = [];
3666
- const candidates = describeCandidates(stores);
3667
5715
  for (const requirement of requirements) {
5716
+ const stores = allStores.filter((store) => store.type === requirement.type);
5717
+ const storeGroups = groupStoresById(stores);
5718
+ const candidates = describeCandidates(allStores);
3668
5719
  const logicalSlug = dataStoreSlug(requirement.id);
3669
5720
  let selected;
3670
5721
  if (Object.prototype.hasOwnProperty.call(overrides, requirement.id)) {
@@ -3677,7 +5728,7 @@ function resolveModuleDataStoreBindings(input) {
3677
5728
  moduleName: input.moduleName,
3678
5729
  logicalId: requirement.id,
3679
5730
  kind: "explicit-override",
3680
- message: matches.length === 0 ? `Module "${input.moduleName}" data store "${requirement.id}" override "${override}" did not match a connected database store; candidates: ${candidates}` : `Module "${input.moduleName}" data store "${requirement.id}" override "${override}" is ambiguous; matches: ${describeCandidates(matches.flatMap((group) => group.stores))}`
5731
+ message: matches.length === 0 ? `Module "${input.moduleName}" data store "${requirement.id}" override "${override}" did not match a connected ${requirement.type} store; candidates: ${candidates}` : `Module "${input.moduleName}" data store "${requirement.id}" override "${override}" is ambiguous; matches: ${describeCandidates(matches.flatMap((group) => group.stores))}`
3681
5732
  });
3682
5733
  continue;
3683
5734
  }
@@ -3688,6 +5739,8 @@ function resolveModuleDataStoreBindings(input) {
3688
5739
  );
3689
5740
  if (conventionMatches.length === 1) {
3690
5741
  selected = conventionMatches[0];
5742
+ } else if (conventionMatches.length === 0 && requirement.type === "storage") {
5743
+ if (storeGroups.length === 1) selected = storeGroups[0];
3691
5744
  } else if (conventionMatches.length === 0 && requirement.scope === "app") {
3692
5745
  if (storeGroups.length === 1) {
3693
5746
  selected = storeGroups[0];
@@ -4046,7 +6099,7 @@ async function resolveCompositionDataStoreBindings(context, presentNames, manife
4046
6099
  if (modulesWithRequirements.length === 0) return bindingsByModule;
4047
6100
  const deps = context.deps;
4048
6101
  if (!deps) throw new Error("Module rail dependencies are required for data-store bindings");
4049
- const connectedStores = await deps.listDatabaseStoresForProject(context.db, context.projectId);
6102
+ const connectedStores = await deps.listConnectedStoresForProject(context.db, context.projectId);
4050
6103
  const installs = await Promise.all(
4051
6104
  modulesWithRequirements.map(
4052
6105
  (moduleName) => deps.getModuleInstall(context.db, context.projectId, moduleName)
@@ -4324,7 +6377,8 @@ async function writeComposeInputs(target) {
4324
6377
  db: target.db,
4325
6378
  projectId: target.projectId,
4326
6379
  deps: target.deps,
4327
- moduleNames
6380
+ moduleNames,
6381
+ typedStores: await checkoutParsesTypedStores(target.sandbox)
4328
6382
  });
4329
6383
  const content = `${JSON.stringify(inputs, null, 2)}
4330
6384
  `;
@@ -4336,6 +6390,21 @@ async function writeComposeInputs(target) {
4336
6390
  );
4337
6391
  return written;
4338
6392
  }
6393
+ async function readStubIgnore(context) {
6394
+ const existing = await context.sandbox.fileExists(STUB_IGNORE_PATH) ? await context.sandbox.readFile(STUB_IGNORE_PATH) : null;
6395
+ if (existing !== null && existing.split("\n", 1)[0] !== STUB_IGNORE_HEADER) {
6396
+ throw new Error(
6397
+ `[ModuleRail] refusing to overwrite ${STUB_IGNORE_PATH}: it is not compose-generated (line 1 is not the generated header)`
6398
+ );
6399
+ }
6400
+ return existing;
6401
+ }
6402
+ async function writeStubIgnore(context, existing, artifactPaths) {
6403
+ const content = buildStubIgnore(artifactPaths);
6404
+ const written = existing === null || existing.trimEnd() !== content.trimEnd();
6405
+ if (written) await writeSandboxFileAtomic(context, STUB_IGNORE_PATH, content);
6406
+ return written;
6407
+ }
4339
6408
  async function applyCompositionArtifactMutations(context, plan, existingFiles) {
4340
6409
  const appliedWrites = [];
4341
6410
  const appliedDeletes = [];
@@ -5200,9 +7269,17 @@ async function reconcileCompositionArtifacts(context, options = {}) {
5200
7269
  deps
5201
7270
  });
5202
7271
  }
7272
+ const maintainIgnore = !options.dryRun && !options.enabledModulesRaw;
7273
+ const existingIgnore = maintainIgnore ? await readStubIgnore(context) : null;
5203
7274
  if (changed && !options.dryRun) {
5204
7275
  await applyCompositionArtifactMutations(context, planned.plan, existingFiles);
5205
7276
  }
7277
+ if (maintainIgnore) {
7278
+ const wroteIgnore = await writeStubIgnore(context, existingIgnore, planned.plan.desiredPaths);
7279
+ console.log(
7280
+ `[ModuleRail] runId=${context.runId} stub ignore list entries=${planned.plan.desiredPaths.length} written=${wroteIgnore}`
7281
+ );
7282
+ }
5206
7283
  return {
5207
7284
  registryPath: planned.plan.registryPath,
5208
7285
  writePaths: planned.plan.writes.map((w) => w.path),
@@ -5239,7 +7316,8 @@ function readComposeInputs(cwd) {
5239
7316
  storeId: store.storeId,
5240
7317
  slug: store.slug,
5241
7318
  bindingKey: store.bindingKey ?? null,
5242
- accessLevel: store.accessLevel
7319
+ accessLevel: store.accessLevel,
7320
+ type: store.type
5243
7321
  })),
5244
7322
  installs: parsed.data.installs
5245
7323
  };
@@ -5373,7 +7451,7 @@ async function compose(options) {
5373
7451
  const deps = {
5374
7452
  sandbox,
5375
7453
  getModuleInstall: async (_db, _projectId, moduleName) => inputs.installs[moduleName] ?? null,
5376
- listDatabaseStoresForProject: async () => inputs.connectedStores
7454
+ listConnectedStoresForProject: async () => inputs.connectedStores
5377
7455
  };
5378
7456
  const context = {
5379
7457
  db: {},