@storybook/addon-vitest 0.0.0-pr-32020-sha-d6522800 → 0.0.0-pr-31819-sha-dabbbfde
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/_browser-chunks/chunk-A47P2DCZ.js +11 -0
- package/dist/_browser-chunks/chunk-VMSW5DPM.js +60 -0
- package/dist/_node-chunks/chunk-C4NXJJA3.js +324 -0
- package/dist/_node-chunks/chunk-CIKGVIS6.js +223 -0
- package/dist/_node-chunks/chunk-FMQIQP6D.js +96 -0
- package/dist/_node-chunks/chunk-KVKHJ5OL.js +46 -0
- package/dist/_node-chunks/chunk-N3OFRDD3.js +80 -0
- package/dist/_node-chunks/chunk-VFT2PRGV.js +5002 -0
- package/dist/_node-chunks/chunk-W26ZMSD3.js +143 -0
- package/dist/_node-chunks/chunk-XWQZZ2C3.js +1586 -0
- package/dist/index.js +9 -6
- package/dist/manager.js +5571 -8
- package/dist/node/coverage-reporter.js +1395 -4
- package/dist/node/vitest.js +564 -17
- package/dist/postinstall.js +1162 -93
- package/dist/preset.js +268 -32
- package/dist/vitest-plugin/global-setup.js +146 -6
- package/dist/vitest-plugin/index.js +2589 -43
- package/dist/vitest-plugin/setup-file.js +28 -9
- package/dist/vitest-plugin/test-utils.js +68 -8
- package/package.json +17 -89
- package/static/coverage-reporter.cjs +10 -0
- package/dist/chunk-55WZLVGN.mjs +0 -11
- package/dist/chunk-JKRQGT2U.mjs +0 -10
- package/dist/index.mjs +0 -5
- package/dist/node/coverage-reporter.d.ts +0 -184
- package/dist/node/coverage-reporter.mjs +0 -12
- package/dist/node/vitest.d.ts +0 -2
- package/dist/node/vitest.mjs +0 -19
- package/dist/vitest-plugin/global-setup.d.ts +0 -6
- package/dist/vitest-plugin/global-setup.mjs +0 -13
- package/dist/vitest-plugin/index.mjs +0 -28
- package/dist/vitest-plugin/setup-file.d.ts +0 -14
- package/dist/vitest-plugin/setup-file.mjs +0 -9
- package/dist/vitest-plugin/test-utils.d.ts +0 -20
- package/dist/vitest-plugin/test-utils.mjs +0 -8
- package/manager.js +0 -1
- package/manager.mjs +0 -1
- package/postinstall.js +0 -1
- package/postinstall.mjs +0 -1
- package/preset.js +0 -1
- package/preset.mjs +0 -1
package/dist/postinstall.js
CHANGED
|
@@ -1,151 +1,1220 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
4
|
+
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
import {
|
|
12
|
+
a as Ye
|
|
13
|
+
} from "./_node-chunks/chunk-XWQZZ2C3.js";
|
|
14
|
+
import {
|
|
15
|
+
a as Ue,
|
|
16
|
+
c as re
|
|
17
|
+
} from "./_node-chunks/chunk-CIKGVIS6.js";
|
|
18
|
+
import {
|
|
19
|
+
c as O,
|
|
20
|
+
e as Ge,
|
|
21
|
+
m as He
|
|
22
|
+
} from "./_node-chunks/chunk-FMQIQP6D.js";
|
|
23
|
+
import {
|
|
24
|
+
c as Be,
|
|
25
|
+
d as L,
|
|
26
|
+
e as W,
|
|
27
|
+
f as _
|
|
28
|
+
} from "./_node-chunks/chunk-W26ZMSD3.js";
|
|
29
|
+
import {
|
|
30
|
+
a as Je,
|
|
31
|
+
b as Xe,
|
|
32
|
+
c as se,
|
|
33
|
+
d as Ke,
|
|
34
|
+
e as Gr,
|
|
35
|
+
f as b,
|
|
36
|
+
g as S,
|
|
37
|
+
h as we
|
|
38
|
+
} from "./_node-chunks/chunk-C4NXJJA3.js";
|
|
39
|
+
import {
|
|
40
|
+
a as i,
|
|
41
|
+
c as h,
|
|
42
|
+
e as _r
|
|
43
|
+
} from "./_node-chunks/chunk-KVKHJ5OL.js";
|
|
44
|
+
|
|
45
|
+
// ../../node_modules/semver/functions/parse.js
|
|
46
|
+
var V = h((Vn, Qe) => {
|
|
47
|
+
"use strict";
|
|
48
|
+
var ze = b(), Yr = /* @__PURE__ */ i((r, e, t = !1) => {
|
|
49
|
+
if (r instanceof ze)
|
|
50
|
+
return r;
|
|
51
|
+
try {
|
|
52
|
+
return new ze(r, e);
|
|
53
|
+
} catch (s) {
|
|
54
|
+
if (!t)
|
|
55
|
+
return null;
|
|
56
|
+
throw s;
|
|
57
|
+
}
|
|
58
|
+
}, "parse");
|
|
59
|
+
Qe.exports = Yr;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// ../../node_modules/semver/functions/valid.js
|
|
63
|
+
var Me = h((An, Ze) => {
|
|
64
|
+
"use strict";
|
|
65
|
+
var Br = V(), Hr = /* @__PURE__ */ i((r, e) => {
|
|
66
|
+
let t = Br(r, e);
|
|
67
|
+
return t ? t.version : null;
|
|
68
|
+
}, "valid");
|
|
69
|
+
Ze.exports = Hr;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// ../../node_modules/semver/functions/clean.js
|
|
73
|
+
var tt = h((Fn, et) => {
|
|
74
|
+
"use strict";
|
|
75
|
+
var Ur = V(), Jr = /* @__PURE__ */ i((r, e) => {
|
|
76
|
+
let t = Ur(r.trim().replace(/^[=v]+/, ""), e);
|
|
77
|
+
return t ? t.version : null;
|
|
78
|
+
}, "clean");
|
|
79
|
+
et.exports = Jr;
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// ../../node_modules/semver/functions/inc.js
|
|
83
|
+
var ot = h((Wn, st) => {
|
|
84
|
+
"use strict";
|
|
85
|
+
var rt = b(), Xr = /* @__PURE__ */ i((r, e, t, s, o) => {
|
|
86
|
+
typeof t == "string" && (o = s, s = t, t = void 0);
|
|
87
|
+
try {
|
|
88
|
+
return new rt(
|
|
89
|
+
r instanceof rt ? r.version : r,
|
|
90
|
+
t
|
|
91
|
+
).inc(e, s, o).version;
|
|
92
|
+
} catch {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}, "inc");
|
|
96
|
+
st.exports = Xr;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// ../../node_modules/semver/functions/diff.js
|
|
100
|
+
var at = h((Gn, it) => {
|
|
101
|
+
"use strict";
|
|
102
|
+
var nt = V(), Kr = /* @__PURE__ */ i((r, e) => {
|
|
103
|
+
let t = nt(r, null, !0), s = nt(e, null, !0), o = t.compare(s);
|
|
104
|
+
if (o === 0)
|
|
105
|
+
return null;
|
|
106
|
+
let n = o > 0, a = n ? t : s, l = n ? s : t, c = !!a.prerelease.length;
|
|
107
|
+
if (!!l.prerelease.length && !c) {
|
|
108
|
+
if (!l.patch && !l.minor)
|
|
109
|
+
return "major";
|
|
110
|
+
if (l.compareMain(a) === 0)
|
|
111
|
+
return l.minor && !l.patch ? "minor" : "patch";
|
|
112
|
+
}
|
|
113
|
+
let d = c ? "pre" : "";
|
|
114
|
+
return t.major !== s.major ? d + "major" : t.minor !== s.minor ? d + "minor" : t.patch !== s.patch ? d + "patch" : "prerelease";
|
|
115
|
+
}, "diff");
|
|
116
|
+
it.exports = Kr;
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// ../../node_modules/semver/functions/major.js
|
|
120
|
+
var ct = h((Bn, lt) => {
|
|
121
|
+
"use strict";
|
|
122
|
+
var zr = b(), Qr = /* @__PURE__ */ i((r, e) => new zr(r, e).major, "major");
|
|
123
|
+
lt.exports = Qr;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// ../../node_modules/semver/functions/minor.js
|
|
127
|
+
var pt = h((Un, ut) => {
|
|
128
|
+
"use strict";
|
|
129
|
+
var Zr = b(), Mr = /* @__PURE__ */ i((r, e) => new Zr(r, e).minor, "minor");
|
|
130
|
+
ut.exports = Mr;
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// ../../node_modules/semver/functions/patch.js
|
|
134
|
+
var mt = h((Xn, ft) => {
|
|
135
|
+
"use strict";
|
|
136
|
+
var es = b(), ts = /* @__PURE__ */ i((r, e) => new es(r, e).patch, "patch");
|
|
137
|
+
ft.exports = ts;
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// ../../node_modules/semver/functions/prerelease.js
|
|
141
|
+
var ht = h((zn, dt) => {
|
|
142
|
+
"use strict";
|
|
143
|
+
var rs = V(), ss = /* @__PURE__ */ i((r, e) => {
|
|
144
|
+
let t = rs(r, e);
|
|
145
|
+
return t && t.prerelease.length ? t.prerelease : null;
|
|
146
|
+
}, "prerelease");
|
|
147
|
+
dt.exports = ss;
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// ../../node_modules/semver/functions/rcompare.js
|
|
151
|
+
var yt = h((Zn, gt) => {
|
|
152
|
+
"use strict";
|
|
153
|
+
var os = S(), ns = /* @__PURE__ */ i((r, e, t) => os(e, r, t), "rcompare");
|
|
154
|
+
gt.exports = ns;
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// ../../node_modules/semver/functions/compare-loose.js
|
|
158
|
+
var vt = h((ei, wt) => {
|
|
159
|
+
"use strict";
|
|
160
|
+
var is = S(), as = /* @__PURE__ */ i((r, e) => is(r, e, !0), "compareLoose");
|
|
161
|
+
wt.exports = as;
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// ../../node_modules/semver/functions/compare-build.js
|
|
165
|
+
var oe = h((ri, $t) => {
|
|
166
|
+
"use strict";
|
|
167
|
+
var xt = b(), ls = /* @__PURE__ */ i((r, e, t) => {
|
|
168
|
+
let s = new xt(r, t), o = new xt(e, t);
|
|
169
|
+
return s.compare(o) || s.compareBuild(o);
|
|
170
|
+
}, "compareBuild");
|
|
171
|
+
$t.exports = ls;
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// ../../node_modules/semver/functions/sort.js
|
|
175
|
+
var bt = h((oi, kt) => {
|
|
176
|
+
"use strict";
|
|
177
|
+
var cs = oe(), us = /* @__PURE__ */ i((r, e) => r.sort((t, s) => cs(t, s, e)), "sort");
|
|
178
|
+
kt.exports = us;
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// ../../node_modules/semver/functions/rsort.js
|
|
182
|
+
var Et = h((ii, qt) => {
|
|
183
|
+
"use strict";
|
|
184
|
+
var ps = oe(), fs = /* @__PURE__ */ i((r, e) => r.sort((t, s) => ps(s, t, e)), "rsort");
|
|
185
|
+
qt.exports = fs;
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// ../../node_modules/semver/functions/gt.js
|
|
189
|
+
var G = h((li, jt) => {
|
|
190
|
+
"use strict";
|
|
191
|
+
var ms = S(), ds = /* @__PURE__ */ i((r, e, t) => ms(r, e, t) > 0, "gt");
|
|
192
|
+
jt.exports = ds;
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
// ../../node_modules/semver/functions/lt.js
|
|
196
|
+
var ne = h((ui, St) => {
|
|
197
|
+
"use strict";
|
|
198
|
+
var hs = S(), gs = /* @__PURE__ */ i((r, e, t) => hs(r, e, t) < 0, "lt");
|
|
199
|
+
St.exports = gs;
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// ../../node_modules/semver/functions/eq.js
|
|
203
|
+
var ve = h((fi, Pt) => {
|
|
204
|
+
"use strict";
|
|
205
|
+
var ys = S(), ws = /* @__PURE__ */ i((r, e, t) => ys(r, e, t) === 0, "eq");
|
|
206
|
+
Pt.exports = ws;
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// ../../node_modules/semver/functions/neq.js
|
|
210
|
+
var xe = h((di, Rt) => {
|
|
211
|
+
"use strict";
|
|
212
|
+
var vs = S(), xs = /* @__PURE__ */ i((r, e, t) => vs(r, e, t) !== 0, "neq");
|
|
213
|
+
Rt.exports = xs;
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// ../../node_modules/semver/functions/lte.js
|
|
217
|
+
var ie = h((gi, Ot) => {
|
|
218
|
+
"use strict";
|
|
219
|
+
var $s = S(), ks = /* @__PURE__ */ i((r, e, t) => $s(r, e, t) <= 0, "lte");
|
|
220
|
+
Ot.exports = ks;
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// ../../node_modules/semver/functions/cmp.js
|
|
224
|
+
var $e = h((wi, Ct) => {
|
|
225
|
+
"use strict";
|
|
226
|
+
var bs = ve(), qs = xe(), Es = G(), js = we(), Ss = ne(), Ps = ie(), Rs = /* @__PURE__ */ i((r, e, t, s) => {
|
|
227
|
+
switch (e) {
|
|
228
|
+
case "===":
|
|
229
|
+
return typeof r == "object" && (r = r.version), typeof t == "object" && (t = t.version), r === t;
|
|
230
|
+
case "!==":
|
|
231
|
+
return typeof r == "object" && (r = r.version), typeof t == "object" && (t = t.version), r !== t;
|
|
232
|
+
case "":
|
|
233
|
+
case "=":
|
|
234
|
+
case "==":
|
|
235
|
+
return bs(r, t, s);
|
|
236
|
+
case "!=":
|
|
237
|
+
return qs(r, t, s);
|
|
238
|
+
case ">":
|
|
239
|
+
return Es(r, t, s);
|
|
240
|
+
case ">=":
|
|
241
|
+
return js(r, t, s);
|
|
242
|
+
case "<":
|
|
243
|
+
return Ss(r, t, s);
|
|
244
|
+
case "<=":
|
|
245
|
+
return Ps(r, t, s);
|
|
246
|
+
default:
|
|
247
|
+
throw new TypeError(`Invalid operator: ${e}`);
|
|
248
|
+
}
|
|
249
|
+
}, "cmp");
|
|
250
|
+
Ct.exports = Rs;
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// ../../node_modules/semver/functions/coerce.js
|
|
254
|
+
var Tt = h((xi, It) => {
|
|
255
|
+
"use strict";
|
|
256
|
+
var Os = b(), Cs = V(), { safeRe: ae, t: le } = se(), Is = /* @__PURE__ */ i((r, e) => {
|
|
257
|
+
if (r instanceof Os)
|
|
258
|
+
return r;
|
|
259
|
+
if (typeof r == "number" && (r = String(r)), typeof r != "string")
|
|
260
|
+
return null;
|
|
261
|
+
e = e || {};
|
|
262
|
+
let t = null;
|
|
263
|
+
if (!e.rtl)
|
|
264
|
+
t = r.match(e.includePrerelease ? ae[le.COERCEFULL] : ae[le.COERCE]);
|
|
265
|
+
else {
|
|
266
|
+
let c = e.includePrerelease ? ae[le.COERCERTLFULL] : ae[le.COERCERTL], m;
|
|
267
|
+
for (; (m = c.exec(r)) && (!t || t.index + t[0].length !== r.length); )
|
|
268
|
+
(!t || m.index + m[0].length !== t.index + t[0].length) && (t = m), c.lastIndex = m.index + m[1].length + m[2].length;
|
|
269
|
+
c.lastIndex = -1;
|
|
270
|
+
}
|
|
271
|
+
if (t === null)
|
|
272
|
+
return null;
|
|
273
|
+
let s = t[2], o = t[3] || "0", n = t[4] || "0", a = e.includePrerelease && t[5] ? `-${t[5]}` : "", l = e.includePrerelease && t[6] ? `+${t[6]}` : "";
|
|
274
|
+
return Cs(`${s}.${o}.${n}${a}${l}`, e);
|
|
275
|
+
}, "coerce");
|
|
276
|
+
It.exports = Is;
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
// ../../node_modules/semver/internal/lrucache.js
|
|
280
|
+
var Nt = h((ki, Vt) => {
|
|
281
|
+
"use strict";
|
|
282
|
+
var ke = class {
|
|
283
|
+
static {
|
|
284
|
+
i(this, "LRUCache");
|
|
285
|
+
}
|
|
286
|
+
constructor() {
|
|
287
|
+
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
288
|
+
}
|
|
289
|
+
get(e) {
|
|
290
|
+
let t = this.map.get(e);
|
|
291
|
+
if (t !== void 0)
|
|
292
|
+
return this.map.delete(e), this.map.set(e, t), t;
|
|
293
|
+
}
|
|
294
|
+
delete(e) {
|
|
295
|
+
return this.map.delete(e);
|
|
296
|
+
}
|
|
297
|
+
set(e, t) {
|
|
298
|
+
if (!this.delete(e) && t !== void 0) {
|
|
299
|
+
if (this.map.size >= this.max) {
|
|
300
|
+
let o = this.map.keys().next().value;
|
|
301
|
+
this.delete(o);
|
|
302
|
+
}
|
|
303
|
+
this.map.set(e, t);
|
|
304
|
+
}
|
|
305
|
+
return this;
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
Vt.exports = ke;
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// ../../node_modules/semver/classes/range.js
|
|
312
|
+
var j = h((qi, Lt) => {
|
|
313
|
+
"use strict";
|
|
314
|
+
var Ts = /\s+/g, be = class r {
|
|
315
|
+
static {
|
|
316
|
+
i(this, "Range");
|
|
317
|
+
}
|
|
318
|
+
constructor(e, t) {
|
|
319
|
+
if (t = Ns(t), e instanceof r)
|
|
320
|
+
return e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease ? e : new r(e.raw, t);
|
|
321
|
+
if (e instanceof qe)
|
|
322
|
+
return this.raw = e.value, this.set = [[e]], this.formatted = void 0, this;
|
|
323
|
+
if (this.options = t, this.loose = !!t.loose, this.includePrerelease = !!t.includePrerelease, this.raw = e.trim().replace(Ts, " "), this.set = this.raw.split("||").map((s) => this.parseRange(s.trim())).filter((s) => s.length), !this.set.length)
|
|
324
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
325
|
+
if (this.set.length > 1) {
|
|
326
|
+
let s = this.set[0];
|
|
327
|
+
if (this.set = this.set.filter((o) => !Dt(o[0])), this.set.length === 0)
|
|
328
|
+
this.set = [s];
|
|
329
|
+
else if (this.set.length > 1) {
|
|
330
|
+
for (let o of this.set)
|
|
331
|
+
if (o.length === 1 && Gs(o[0])) {
|
|
332
|
+
this.set = [o];
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
this.formatted = void 0;
|
|
338
|
+
}
|
|
339
|
+
get range() {
|
|
340
|
+
if (this.formatted === void 0) {
|
|
341
|
+
this.formatted = "";
|
|
342
|
+
for (let e = 0; e < this.set.length; e++) {
|
|
343
|
+
e > 0 && (this.formatted += "||");
|
|
344
|
+
let t = this.set[e];
|
|
345
|
+
for (let s = 0; s < t.length; s++)
|
|
346
|
+
s > 0 && (this.formatted += " "), this.formatted += t[s].toString().trim();
|
|
347
|
+
}
|
|
33
348
|
}
|
|
349
|
+
return this.formatted;
|
|
350
|
+
}
|
|
351
|
+
format() {
|
|
352
|
+
return this.range;
|
|
353
|
+
}
|
|
354
|
+
toString() {
|
|
355
|
+
return this.range;
|
|
356
|
+
}
|
|
357
|
+
parseRange(e) {
|
|
358
|
+
let s = ((this.options.includePrerelease && Ws) | (this.options.loose && _s)) + ":" + e, o = At.get(s);
|
|
359
|
+
if (o)
|
|
360
|
+
return o;
|
|
361
|
+
let n = this.options.loose, a = n ? q[x.HYPHENRANGELOOSE] : q[x.HYPHENRANGE];
|
|
362
|
+
e = e.replace(a, Zs(this.options.includePrerelease)), y("hyphen replace", e), e = e.replace(q[x.COMPARATORTRIM], Ds), y("comparator trim", e), e = e.replace(q[x.TILDETRIM], Fs), y("tilde trim", e), e = e.replace(q[x.CARETTRIM], Ls), y("caret trim", e);
|
|
363
|
+
let l = e.split(" ").map((u) => Ys(u, this.options)).join(" ").split(/\s+/).map((u) => Qs(u, this.options));
|
|
364
|
+
n && (l = l.filter((u) => (y("loose invalid filter", u, this.options), !!u.match(q[x.COMPARATORLOOSE])))), y("range list", l);
|
|
365
|
+
let c = /* @__PURE__ */ new Map(), m = l.map((u) => new qe(u, this.options));
|
|
366
|
+
for (let u of m) {
|
|
367
|
+
if (Dt(u))
|
|
368
|
+
return [u];
|
|
369
|
+
c.set(u.value, u);
|
|
370
|
+
}
|
|
371
|
+
c.size > 1 && c.has("") && c.delete("");
|
|
372
|
+
let d = [...c.values()];
|
|
373
|
+
return At.set(s, d), d;
|
|
374
|
+
}
|
|
375
|
+
intersects(e, t) {
|
|
376
|
+
if (!(e instanceof r))
|
|
377
|
+
throw new TypeError("a Range is required");
|
|
378
|
+
return this.set.some((s) => Ft(s, t) && e.set.some((o) => Ft(o, t) && s.every((n) => o.every((a) => n.intersects(a, t)))));
|
|
379
|
+
}
|
|
380
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
381
|
+
test(e) {
|
|
382
|
+
if (!e)
|
|
383
|
+
return !1;
|
|
384
|
+
if (typeof e == "string")
|
|
385
|
+
try {
|
|
386
|
+
e = new As(e, this.options);
|
|
387
|
+
} catch {
|
|
388
|
+
return !1;
|
|
389
|
+
}
|
|
390
|
+
for (let t = 0; t < this.set.length; t++)
|
|
391
|
+
if (Ms(this.set[t], e, this.options))
|
|
392
|
+
return !0;
|
|
393
|
+
return !1;
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
Lt.exports = be;
|
|
397
|
+
var Vs = Nt(), At = new Vs(), Ns = Ke(), qe = Y(), y = Xe(), As = b(), {
|
|
398
|
+
safeRe: q,
|
|
399
|
+
t: x,
|
|
400
|
+
comparatorTrimReplace: Ds,
|
|
401
|
+
tildeTrimReplace: Fs,
|
|
402
|
+
caretTrimReplace: Ls
|
|
403
|
+
} = se(), { FLAG_INCLUDE_PRERELEASE: Ws, FLAG_LOOSE: _s } = Je(), Dt = /* @__PURE__ */ i((r) => r.value === "<0.0.0-0", "isNullSet"), Gs = /* @__PURE__ */ i((r) => r.value === "", "isAny"), Ft = /* @__PURE__ */ i((r, e) => {
|
|
404
|
+
let t = !0, s = r.slice(), o = s.pop();
|
|
405
|
+
for (; t && s.length; )
|
|
406
|
+
t = s.every((n) => o.intersects(n, e)), o = s.pop();
|
|
407
|
+
return t;
|
|
408
|
+
}, "isSatisfiable"), Ys = /* @__PURE__ */ i((r, e) => (y("comp", r, e), r = Us(r, e), y("caret", r), r = Bs(r, e), y("tildes", r), r = Xs(r, e), y("xrange", r), r = zs(r, e), y("stars", r), r), "parseComparator"), $ = /* @__PURE__ */ i((r) => !r || r.toLowerCase() === "x" || r === "*", "isX"), Bs = /* @__PURE__ */ i((r, e) => r.trim().split(/\s+/).map((t) => Hs(t, e)).join(" "), "replaceTildes"), Hs = /* @__PURE__ */ i((r, e) => {
|
|
409
|
+
let t = e.loose ? q[x.TILDELOOSE] : q[x.TILDE];
|
|
410
|
+
return r.replace(t, (s, o, n, a, l) => {
|
|
411
|
+
y("tilde", r, s, o, n, a, l);
|
|
412
|
+
let c;
|
|
413
|
+
return $(o) ? c = "" : $(n) ? c = `>=${o}.0.0 <${+o + 1}.0.0-0` : $(a) ? c = `>=${o}.${n}.0 <${o}.${+n + 1}.0-0` : l ? (y("replaceTilde pr", l), c = `>=${o}.${n}.${a}-${l} <${o}.${+n + 1}.0-0`) : c = `>=${o}.${n}.${a} <${o}.${+n + 1}.0-0`, y("tilde return", c), c;
|
|
34
414
|
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
415
|
+
}, "replaceTilde"), Us = /* @__PURE__ */ i((r, e) => r.trim().split(/\s+/).map((t) => Js(t, e)).join(" "), "replaceCarets"), Js = /* @__PURE__ */ i((r, e) => {
|
|
416
|
+
y("caret", r, e);
|
|
417
|
+
let t = e.loose ? q[x.CARETLOOSE] : q[x.CARET], s = e.includePrerelease ? "-0" : "";
|
|
418
|
+
return r.replace(t, (o, n, a, l, c) => {
|
|
419
|
+
y("caret", r, o, n, a, l, c);
|
|
420
|
+
let m;
|
|
421
|
+
return $(n) ? m = "" : $(a) ? m = `>=${n}.0.0${s} <${+n + 1}.0.0-0` : $(l) ? n === "0" ? m = `>=${n}.${a}.0${s} <${n}.${+a + 1}.0-0` : m = `>=${n}.${a}.0${s} <${+n + 1}.0.0-0` : c ? (y("replaceCaret pr", c), n === "0" ? a === "0" ? m = `>=${n}.${a}.${l}-${c} <${n}.${a}.${+l + 1}-0` : m = `>=${n}.${a}.${l}-${c} <${n}.${+a + 1}.0-0` : m = `>=${n}.${a}.${l}-${c} <${+n + 1}.0.0-0`) : (y("no pr"), n === "0" ? a === "0" ? m = `>=${n}.${a}.${l}${s} <${n}.${a}.${+l + 1}-0` : m = `>=${n}.${a}.${l}${s} <${n}.${+a + 1}.0-0` : m = `>=${n}.${a}.${l} <${+n + 1}.0.0-0`), y("caret return", m), m;
|
|
422
|
+
});
|
|
423
|
+
}, "replaceCaret"), Xs = /* @__PURE__ */ i((r, e) => (y("replaceXRanges", r, e), r.split(/\s+/).map((t) => Ks(t, e)).join(" ")), "replaceXRanges"), Ks = /* @__PURE__ */ i((r, e) => {
|
|
424
|
+
r = r.trim();
|
|
425
|
+
let t = e.loose ? q[x.XRANGELOOSE] : q[x.XRANGE];
|
|
426
|
+
return r.replace(t, (s, o, n, a, l, c) => {
|
|
427
|
+
y("xRange", r, s, o, n, a, l, c);
|
|
428
|
+
let m = $(n), d = m || $(a), u = d || $(l), g = u;
|
|
429
|
+
return o === "=" && g && (o = ""), c = e.includePrerelease ? "-0" : "", m ? o === ">" || o === "<" ? s = "<0.0.0-0" : s = "*" : o && g ? (d && (a = 0), l = 0, o === ">" ? (o = ">=", d ? (n = +n + 1, a = 0, l = 0) : (a = +a + 1, l = 0)) : o === "<=" && (o = "<", d ? n = +n + 1 : a = +a + 1), o === "<" && (c = "-0"), s = `${o + n}.${a}.${l}${c}`) : d ? s = `>=${n}.0.0${c} <${+n + 1}.0.0-0` : u && (s = `>=${n}.${a}.0${c} <${n}.${+a + 1}.0-0`), y("xRange return", s), s;
|
|
430
|
+
});
|
|
431
|
+
}, "replaceXRange"), zs = /* @__PURE__ */ i((r, e) => (y("replaceStars", r, e), r.trim().replace(q[x.STAR], "")), "replaceStars"), Qs = /* @__PURE__ */ i((r, e) => (y("replaceGTE0", r, e), r.trim().replace(q[e.includePrerelease ? x.GTE0PRE : x.GTE0], "")), "replaceGTE0"), Zs = /* @__PURE__ */ i((r) => (e, t, s, o, n, a, l, c, m, d, u, g) => ($(s) ? t = "" : $(o) ? t = `>=${s}.0.0${r ? "-0" : ""}` : $(n) ? t = `>=${s}.${o}.0${r ? "-0" : ""}` : a ? t = `>=${t}` : t = `>=${t}${r ? "-0" : ""}`, $(m) ? c = "" : $(d) ? c = `<${+m + 1}.0.0-0` : $(u) ? c = `<${m}.${+d + 1}.0-0` : g ? c = `<=${m}.${d}.${u}-${g}` : r ? c = `<${m}.${d}.${+u + 1}-0` : c = `<=${c}`, `${t} ${c}`.trim()), "hyphenReplace"), Ms = /* @__PURE__ */ i((r, e, t) => {
|
|
432
|
+
for (let s = 0; s < r.length; s++)
|
|
433
|
+
if (!r[s].test(e))
|
|
434
|
+
return !1;
|
|
435
|
+
if (e.prerelease.length && !t.includePrerelease) {
|
|
436
|
+
for (let s = 0; s < r.length; s++)
|
|
437
|
+
if (y(r[s].semver), r[s].semver !== qe.ANY && r[s].semver.prerelease.length > 0) {
|
|
438
|
+
let o = r[s].semver;
|
|
439
|
+
if (o.major === e.major && o.minor === e.minor && o.patch === e.patch)
|
|
440
|
+
return !0;
|
|
441
|
+
}
|
|
442
|
+
return !1;
|
|
443
|
+
}
|
|
444
|
+
return !0;
|
|
445
|
+
}, "testSet");
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
// ../../node_modules/semver/classes/comparator.js
|
|
449
|
+
var Y = h((ji, Ht) => {
|
|
450
|
+
"use strict";
|
|
451
|
+
var B = Symbol("SemVer ANY"), Se = class r {
|
|
452
|
+
static {
|
|
453
|
+
i(this, "Comparator");
|
|
454
|
+
}
|
|
455
|
+
static get ANY() {
|
|
456
|
+
return B;
|
|
457
|
+
}
|
|
458
|
+
constructor(e, t) {
|
|
459
|
+
if (t = Wt(t), e instanceof r) {
|
|
460
|
+
if (e.loose === !!t.loose)
|
|
461
|
+
return e;
|
|
462
|
+
e = e.value;
|
|
463
|
+
}
|
|
464
|
+
e = e.trim().split(/\s+/).join(" "), je("comparator", e, t), this.options = t, this.loose = !!t.loose, this.parse(e), this.semver === B ? this.value = "" : this.value = this.operator + this.semver.version, je("comp", this);
|
|
465
|
+
}
|
|
466
|
+
parse(e) {
|
|
467
|
+
let t = this.options.loose ? _t[Gt.COMPARATORLOOSE] : _t[Gt.COMPARATOR], s = e.match(t);
|
|
468
|
+
if (!s)
|
|
469
|
+
throw new TypeError(`Invalid comparator: ${e}`);
|
|
470
|
+
this.operator = s[1] !== void 0 ? s[1] : "", this.operator === "=" && (this.operator = ""), s[2] ? this.semver = new Yt(s[2], this.options.loose) : this.semver = B;
|
|
471
|
+
}
|
|
472
|
+
toString() {
|
|
473
|
+
return this.value;
|
|
474
|
+
}
|
|
475
|
+
test(e) {
|
|
476
|
+
if (je("Comparator.test", e, this.options.loose), this.semver === B || e === B)
|
|
477
|
+
return !0;
|
|
478
|
+
if (typeof e == "string")
|
|
479
|
+
try {
|
|
480
|
+
e = new Yt(e, this.options);
|
|
481
|
+
} catch {
|
|
482
|
+
return !1;
|
|
483
|
+
}
|
|
484
|
+
return Ee(e, this.operator, this.semver, this.options);
|
|
485
|
+
}
|
|
486
|
+
intersects(e, t) {
|
|
487
|
+
if (!(e instanceof r))
|
|
488
|
+
throw new TypeError("a Comparator is required");
|
|
489
|
+
return this.operator === "" ? this.value === "" ? !0 : new Bt(e.value, t).test(this.value) : e.operator === "" ? e.value === "" ? !0 : new Bt(this.value, t).test(e.semver) : (t = Wt(t), t.includePrerelease && (this.value === "<0.0.0-0" || e.value === "<0.0.0-0") || !t.includePrerelease && (this.value.startsWith("<0.0.0") || e.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && e.operator.startsWith(">") || this.operator.startsWith("<") && e.operator.startsWith("<") || this.semver.version === e.semver.version && this.operator.includes("=") && e.operator.includes("=") || Ee(this.semver, "<", e.semver, t) && this.operator.startsWith(">") && e.operator.startsWith("<") || Ee(this.semver, ">", e.semver, t) && this.operator.startsWith("<") && e.operator.startsWith(">")));
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
Ht.exports = Se;
|
|
493
|
+
var Wt = Ke(), { safeRe: _t, t: Gt } = se(), Ee = $e(), je = Xe(), Yt = b(), Bt = j();
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
// ../../node_modules/semver/functions/satisfies.js
|
|
497
|
+
var H = h((Pi, Ut) => {
|
|
498
|
+
"use strict";
|
|
499
|
+
var eo = j(), to = /* @__PURE__ */ i((r, e, t) => {
|
|
500
|
+
try {
|
|
501
|
+
e = new eo(e, t);
|
|
502
|
+
} catch {
|
|
503
|
+
return !1;
|
|
504
|
+
}
|
|
505
|
+
return e.test(r);
|
|
506
|
+
}, "satisfies");
|
|
507
|
+
Ut.exports = to;
|
|
508
|
+
});
|
|
39
509
|
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __require=(x=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(a,b)=>(typeof require<"u"?require:a)[b]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});var __commonJS=(cb,mod)=>function(){return mod||(0, cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));var require_windows=__commonJS({"../../node_modules/isexe/windows.js"(exports,module){module.exports=isexe;isexe.sync=sync;var fs5=__require("fs");function checkPathExt(path6,options){var pathext=options.pathExt!==void 0?options.pathExt:process.env.PATHEXT;if(!pathext||(pathext=pathext.split(";"),pathext.indexOf("")!==-1))return !0;for(var i=0;i<pathext.length;i++){var p=pathext[i].toLowerCase();if(p&&path6.substr(-p.length).toLowerCase()===p)return !0}return !1}function checkStat(stat,path6,options){return !stat.isSymbolicLink()&&!stat.isFile()?!1:checkPathExt(path6,options)}function isexe(path6,options,cb){fs5.stat(path6,function(er,stat){cb(er,er?!1:checkStat(stat,path6,options));});}function sync(path6,options){return checkStat(fs5.statSync(path6),path6,options)}}});var require_mode=__commonJS({"../../node_modules/isexe/mode.js"(exports,module){module.exports=isexe;isexe.sync=sync;var fs5=__require("fs");function isexe(path6,options,cb){fs5.stat(path6,function(er,stat){cb(er,er?!1:checkStat(stat,options));});}function sync(path6,options){return checkStat(fs5.statSync(path6),options)}function checkStat(stat,options){return stat.isFile()&&checkMode(stat,options)}function checkMode(stat,options){var mod=stat.mode,uid=stat.uid,gid=stat.gid,myUid=options.uid!==void 0?options.uid:process.getuid&&process.getuid(),myGid=options.gid!==void 0?options.gid:process.getgid&&process.getgid(),u=parseInt("100",8),g=parseInt("010",8),o=parseInt("001",8),ug=u|g,ret=mod&o||mod&g&&gid===myGid||mod&u&&uid===myUid||mod&ug&&myUid===0;return ret}}});var require_isexe=__commonJS({"../../node_modules/isexe/index.js"(exports,module){__require("fs");var core;process.platform==="win32"||global.TESTING_WINDOWS?core=require_windows():core=require_mode();module.exports=isexe;isexe.sync=sync;function isexe(path6,options,cb){if(typeof options=="function"&&(cb=options,options={}),!cb){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(resolve2,reject){isexe(path6,options||{},function(er,is){er?reject(er):resolve2(is);});})}core(path6,options||{},function(er,is){er&&(er.code==="EACCES"||options&&options.ignoreErrors)&&(er=null,is=!1),cb(er,is);});}function sync(path6,options){try{return core.sync(path6,options||{})}catch(er){if(options&&options.ignoreErrors||er.code==="EACCES")return !1;throw er}}}});var require_which=__commonJS({"../../node_modules/which/which.js"(exports,module){var isWindows=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",path6=__require("path"),COLON=isWindows?";":":",isexe=require_isexe(),getNotFoundError=cmd=>Object.assign(new Error(`not found: ${cmd}`),{code:"ENOENT"}),getPathInfo=(cmd,opt)=>{let colon=opt.colon||COLON,pathEnv=cmd.match(/\//)||isWindows&&cmd.match(/\\/)?[""]:[...isWindows?[process.cwd()]:[],...(opt.path||process.env.PATH||"").split(colon)],pathExtExe=isWindows?opt.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",pathExt=isWindows?pathExtExe.split(colon):[""];return isWindows&&cmd.indexOf(".")!==-1&&pathExt[0]!==""&&pathExt.unshift(""),{pathEnv,pathExt,pathExtExe}},which=(cmd,opt,cb)=>{typeof opt=="function"&&(cb=opt,opt={}),opt||(opt={});let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[],step2=i=>new Promise((resolve2,reject)=>{if(i===pathEnv.length)return opt.all&&found.length?resolve2(found):reject(getNotFoundError(cmd));let ppRaw=pathEnv[i],pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw,pCmd=path6.join(pathPart,cmd),p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;resolve2(subStep(p,i,0));}),subStep=(p,i,ii)=>new Promise((resolve2,reject)=>{if(ii===pathExt.length)return resolve2(step2(i+1));let ext=pathExt[ii];isexe(p+ext,{pathExt:pathExtExe},(er,is)=>{if(!er&&is)if(opt.all)found.push(p+ext);else return resolve2(p+ext);return resolve2(subStep(p,i,ii+1))});});return cb?step2(0).then(res=>cb(null,res),cb):step2(0)},whichSync=(cmd,opt)=>{opt=opt||{};let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[];for(let i=0;i<pathEnv.length;i++){let ppRaw=pathEnv[i],pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw,pCmd=path6.join(pathPart,cmd),p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;for(let j=0;j<pathExt.length;j++){let cur=p+pathExt[j];try{if(isexe.sync(cur,{pathExt:pathExtExe}))if(opt.all)found.push(cur);else return cur}catch{}}}if(opt.all&&found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)};module.exports=which;which.sync=whichSync;}});var require_path_key=__commonJS({"../../node_modules/path-key/index.js"(exports,module){var pathKey2=(options={})=>{let environment=options.env||process.env;return (options.platform||process.platform)!=="win32"?"PATH":Object.keys(environment).reverse().find(key=>key.toUpperCase()==="PATH")||"Path"};module.exports=pathKey2;module.exports.default=pathKey2;}});var require_resolveCommand=__commonJS({"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports,module){var path6=__require("path"),which=require_which(),getPathKey=require_path_key();function resolveCommandAttempt(parsed,withoutPathExt){let env=parsed.options.env||process.env,cwd2=process.cwd(),hasCustomCwd=parsed.options.cwd!=null,shouldSwitchCwd=hasCustomCwd&&process.chdir!==void 0&&!process.chdir.disabled;if(shouldSwitchCwd)try{process.chdir(parsed.options.cwd);}catch{}let resolved;try{resolved=which.sync(parsed.command,{path:env[getPathKey({env})],pathExt:withoutPathExt?path6.delimiter:void 0});}catch{}finally{shouldSwitchCwd&&process.chdir(cwd2);}return resolved&&(resolved=path6.resolve(hasCustomCwd?parsed.options.cwd:"",resolved)),resolved}function resolveCommand(parsed){return resolveCommandAttempt(parsed)||resolveCommandAttempt(parsed,!0)}module.exports=resolveCommand;}});var require_escape=__commonJS({"../../node_modules/cross-spawn/lib/util/escape.js"(exports,module){var metaCharsRegExp=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(arg){return arg=arg.replace(metaCharsRegExp,"^$1"),arg}function escapeArgument(arg,doubleEscapeMetaChars){return arg=`${arg}`,arg=arg.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),arg=arg.replace(/(?=(\\+?)?)\1$/,"$1$1"),arg=`"${arg}"`,arg=arg.replace(metaCharsRegExp,"^$1"),doubleEscapeMetaChars&&(arg=arg.replace(metaCharsRegExp,"^$1")),arg}module.exports.command=escapeCommand;module.exports.argument=escapeArgument;}});var require_shebang_regex=__commonJS({"../../node_modules/shebang-regex/index.js"(exports,module){module.exports=/^#!(.*)/;}});var require_shebang_command=__commonJS({"../../node_modules/shebang-command/index.js"(exports,module){var shebangRegex=require_shebang_regex();module.exports=(string="")=>{let match=string.match(shebangRegex);if(!match)return null;let[path6,argument]=match[0].replace(/#! ?/,"").split(" "),binary=path6.split("/").pop();return binary==="env"?argument:argument?`${binary} ${argument}`:binary};}});var require_readShebang=__commonJS({"../../node_modules/cross-spawn/lib/util/readShebang.js"(exports,module){var fs5=__require("fs"),shebangCommand=require_shebang_command();function readShebang(command){let buffer=Buffer.alloc(150),fd;try{fd=fs5.openSync(command,"r"),fs5.readSync(fd,buffer,0,150,0),fs5.closeSync(fd);}catch{}return shebangCommand(buffer.toString())}module.exports=readShebang;}});var require_parse=__commonJS({"../../node_modules/cross-spawn/lib/parse.js"(exports,module){var path6=__require("path"),resolveCommand=require_resolveCommand(),escape=require_escape(),readShebang=require_readShebang(),isWin=process.platform==="win32",isExecutableRegExp=/\.(?:com|exe)$/i,isCmdShimRegExp=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(parsed){parsed.file=resolveCommand(parsed);let shebang=parsed.file&&readShebang(parsed.file);return shebang?(parsed.args.unshift(parsed.file),parsed.command=shebang,resolveCommand(parsed)):parsed.file}function parseNonShell(parsed){if(!isWin)return parsed;let commandFile=detectShebang(parsed),needsShell=!isExecutableRegExp.test(commandFile);if(parsed.options.forceShell||needsShell){let needsDoubleEscapeMetaChars=isCmdShimRegExp.test(commandFile);parsed.command=path6.normalize(parsed.command),parsed.command=escape.command(parsed.command),parsed.args=parsed.args.map(arg=>escape.argument(arg,needsDoubleEscapeMetaChars));let shellCommand=[parsed.command].concat(parsed.args).join(" ");parsed.args=["/d","/s","/c",`"${shellCommand}"`],parsed.command=process.env.comspec||"cmd.exe",parsed.options.windowsVerbatimArguments=!0;}return parsed}function parse2(command,args,options){args&&!Array.isArray(args)&&(options=args,args=null),args=args?args.slice(0):[],options=Object.assign({},options);let parsed={command,args,options,file:void 0,original:{command,args}};return options.shell?parsed:parseNonShell(parsed)}module.exports=parse2;}});var require_enoent=__commonJS({"../../node_modules/cross-spawn/lib/enoent.js"(exports,module){var isWin=process.platform==="win32";function notFoundError(original,syscall){return Object.assign(new Error(`${syscall} ${original.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${syscall} ${original.command}`,path:original.command,spawnargs:original.args})}function hookChildProcess(cp,parsed){if(!isWin)return;let originalEmit=cp.emit;cp.emit=function(name,arg1){if(name==="exit"){let err=verifyENOENT(arg1,parsed);if(err)return originalEmit.call(cp,"error",err)}return originalEmit.apply(cp,arguments)};}function verifyENOENT(status,parsed){return isWin&&status===1&&!parsed.file?notFoundError(parsed.original,"spawn"):null}function verifyENOENTSync(status,parsed){return isWin&&status===1&&!parsed.file?notFoundError(parsed.original,"spawnSync"):null}module.exports={hookChildProcess,verifyENOENT,verifyENOENTSync,notFoundError};}});var require_cross_spawn=__commonJS({"../../node_modules/cross-spawn/index.js"(exports,module){var cp=__require("child_process"),parse2=require_parse(),enoent=require_enoent();function spawn(command,args,options){let parsed=parse2(command,args,options),spawned=cp.spawn(parsed.command,parsed.args,parsed.options);return enoent.hookChildProcess(spawned,parsed),spawned}function spawnSync(command,args,options){let parsed=parse2(command,args,options),result=cp.spawnSync(parsed.command,parsed.args,parsed.options);return result.error=result.error||enoent.verifyENOENTSync(result.status,parsed),result}module.exports=spawn;module.exports.spawn=spawn;module.exports.sync=spawnSync;module.exports._parse=parse2;module.exports._enoent=enoent;}});var require_merge_stream=__commonJS({"../../node_modules/merge-stream/index.js"(exports,module){var{PassThrough}=__require("stream");module.exports=function(){var sources=[],output=new PassThrough({objectMode:!0});return output.setMaxListeners(0),output.add=add,output.isEmpty=isEmpty,output.on("unpipe",remove),Array.prototype.slice.call(arguments).forEach(add),output;function add(source){return Array.isArray(source)?(source.forEach(add),this):(sources.push(source),source.once("end",remove.bind(null,source)),source.once("error",output.emit.bind(output,"error")),source.pipe(output,{end:!1}),this)}function isEmpty(){return sources.length==0}function remove(source){sources=sources.filter(function(it){return it!==source}),!sources.length&&output.readable&&output.end();}};}});var require_constants=__commonJS({"../../node_modules/semver/internal/constants.js"(exports,module){var SEMVER_SPEC_VERSION="2.0.0",MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];module.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_SAFE_INTEGER,RELEASE_TYPES,SEMVER_SPEC_VERSION,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};}});var require_debug=__commonJS({"../../node_modules/semver/internal/debug.js"(exports,module){var debug=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...args)=>console.error("SEMVER",...args):()=>{};module.exports=debug;}});var require_re=__commonJS({"../../node_modules/semver/internal/re.js"(exports,module){var{MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_LENGTH}=require_constants(),debug=require_debug();exports=module.exports={};var re=exports.re=[],safeRe=exports.safeRe=[],src=exports.src=[],safeSrc=exports.safeSrc=[],t=exports.t={},R=0,LETTERDASHNUMBER="[a-zA-Z0-9-]",safeRegexReplacements=[["\\s",1],["\\d",MAX_LENGTH],[LETTERDASHNUMBER,MAX_SAFE_BUILD_LENGTH]],makeSafeRegex=value=>{for(let[token,max]of safeRegexReplacements)value=value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);return value},createToken=(name,value,isGlobal)=>{let safe=makeSafeRegex(value),index=R++;debug(name,index,value),t[name]=index,src[index]=value,safeSrc[index]=safe,re[index]=new RegExp(value,isGlobal?"g":void 0),safeRe[index]=new RegExp(safe,isGlobal?"g":void 0);};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);createToken("MAINVERSION",`(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${LETTERDASHNUMBER}+`);createToken("BUILD",`(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);createToken("FULL",`^${src[t.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);createToken("LOOSE",`^${src[t.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);createToken("XRANGE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);createToken("COERCE",`${src[t.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",src[t.COERCEPLAIN]+`(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);createToken("COERCERTL",src[t.COERCE],!0);createToken("COERCERTLFULL",src[t.COERCEFULL],!0);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${src[t.LONETILDE]}\\s+`,!0);exports.tildeTrimReplace="$1~";createToken("TILDE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${src[t.LONECARET]}\\s+`,!0);exports.caretTrimReplace="$1^";createToken("CARET",`^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`,!0);exports.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$");}});var require_parse_options=__commonJS({"../../node_modules/semver/internal/parse-options.js"(exports,module){var looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions=options=>options?typeof options!="object"?looseOption:options:emptyOpts;module.exports=parseOptions;}});var require_identifiers=__commonJS({"../../node_modules/semver/internal/identifiers.js"(exports,module){var numeric=/^[0-9]+$/,compareIdentifiers=(a,b)=>{let anum=numeric.test(a),bnum=numeric.test(b);return anum&&bnum&&(a=+a,b=+b),a===b?0:anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:1},rcompareIdentifiers=(a,b)=>compareIdentifiers(b,a);module.exports={compareIdentifiers,rcompareIdentifiers};}});var require_semver=__commonJS({"../../node_modules/semver/classes/semver.js"(exports,module){var debug=require_debug(),{MAX_LENGTH,MAX_SAFE_INTEGER}=require_constants(),{safeRe:re,t}=require_re(),parseOptions=require_parse_options(),{compareIdentifiers}=require_identifiers(),SemVer=class _SemVer{constructor(version,options){if(options=parseOptions(options),version instanceof _SemVer){if(version.loose===!!options.loose&&version.includePrerelease===!!options.includePrerelease)return version;version=version.version;}else if(typeof version!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);if(version.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug("SemVer",version,options),this.options=options,this.loose=!!options.loose,this.includePrerelease=!!options.includePrerelease;let m=version.trim().match(options.loose?re[t.LOOSE]:re[t.FULL]);if(!m)throw new TypeError(`Invalid Version: ${version}`);if(this.raw=version,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(id=>{if(/^[0-9]+$/.test(id)){let num=+id;if(num>=0&&num<MAX_SAFE_INTEGER)return num}return id}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format();}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(other){if(debug("SemVer.compare",this.version,this.options,other),!(other instanceof _SemVer)){if(typeof other=="string"&&other===this.version)return 0;other=new _SemVer(other,this.options);}return other.version===this.version?0:this.compareMain(other)||this.comparePre(other)}compareMain(other){return other instanceof _SemVer||(other=new _SemVer(other,this.options)),compareIdentifiers(this.major,other.major)||compareIdentifiers(this.minor,other.minor)||compareIdentifiers(this.patch,other.patch)}comparePre(other){if(other instanceof _SemVer||(other=new _SemVer(other,this.options)),this.prerelease.length&&!other.prerelease.length)return -1;if(!this.prerelease.length&&other.prerelease.length)return 1;if(!this.prerelease.length&&!other.prerelease.length)return 0;let i=0;do{let a=this.prerelease[i],b=other.prerelease[i];if(debug("prerelease compare",i,a,b),a===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(a===void 0)return -1;if(a===b)continue;return compareIdentifiers(a,b)}while(++i)}compareBuild(other){other instanceof _SemVer||(other=new _SemVer(other,this.options));let i=0;do{let a=this.build[i],b=other.build[i];if(debug("build compare",i,a,b),a===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(a===void 0)return -1;if(a===b)continue;return compareIdentifiers(a,b)}while(++i)}inc(release,identifier,identifierBase){if(release.startsWith("pre")){if(!identifier&&identifierBase===!1)throw new Error("invalid increment argument: identifier is empty");if(identifier){let match=`-${identifier}`.match(this.options.loose?re[t.PRERELEASELOOSE]:re[t.PRERELEASE]);if(!match||match[1]!==identifier)throw new Error(`invalid identifier: ${identifier}`)}}switch(release){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",identifier,identifierBase);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",identifier,identifierBase);break;case"prepatch":this.prerelease.length=0,this.inc("patch",identifier,identifierBase),this.inc("pre",identifier,identifierBase);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",identifier,identifierBase),this.inc("pre",identifier,identifierBase);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let base=Number(identifierBase)?1:0;if(this.prerelease.length===0)this.prerelease=[base];else {let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(identifier===this.prerelease.join(".")&&identifierBase===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(base);}}if(identifier){let prerelease=[identifier,base];identifierBase===!1&&(prerelease=[identifier]),compareIdentifiers(this.prerelease[0],identifier)===0?isNaN(this.prerelease[1])&&(this.prerelease=prerelease):this.prerelease=prerelease;}break}default:throw new Error(`invalid increment argument: ${release}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};module.exports=SemVer;}});var require_parse2=__commonJS({"../../node_modules/semver/functions/parse.js"(exports,module){var SemVer=require_semver(),parse2=(version,options,throwErrors=!1)=>{if(version instanceof SemVer)return version;try{return new SemVer(version,options)}catch(er){if(!throwErrors)return null;throw er}};module.exports=parse2;}});var require_valid=__commonJS({"../../node_modules/semver/functions/valid.js"(exports,module){var parse2=require_parse2(),valid=(version,options)=>{let v=parse2(version,options);return v?v.version:null};module.exports=valid;}});var require_clean=__commonJS({"../../node_modules/semver/functions/clean.js"(exports,module){var parse2=require_parse2(),clean=(version,options)=>{let s=parse2(version.trim().replace(/^[=v]+/,""),options);return s?s.version:null};module.exports=clean;}});var require_inc=__commonJS({"../../node_modules/semver/functions/inc.js"(exports,module){var SemVer=require_semver(),inc=(version,release,options,identifier,identifierBase)=>{typeof options=="string"&&(identifierBase=identifier,identifier=options,options=void 0);try{return new SemVer(version instanceof SemVer?version.version:version,options).inc(release,identifier,identifierBase).version}catch{return null}};module.exports=inc;}});var require_diff=__commonJS({"../../node_modules/semver/functions/diff.js"(exports,module){var parse2=require_parse2(),diff=(version1,version2)=>{let v1=parse2(version1,null,!0),v2=parse2(version2,null,!0),comparison=v1.compare(v2);if(comparison===0)return null;let v1Higher=comparison>0,highVersion=v1Higher?v1:v2,lowVersion=v1Higher?v2:v1,highHasPre=!!highVersion.prerelease.length;if(!!lowVersion.prerelease.length&&!highHasPre){if(!lowVersion.patch&&!lowVersion.minor)return "major";if(lowVersion.compareMain(highVersion)===0)return lowVersion.minor&&!lowVersion.patch?"minor":"patch"}let prefix=highHasPre?"pre":"";return v1.major!==v2.major?prefix+"major":v1.minor!==v2.minor?prefix+"minor":v1.patch!==v2.patch?prefix+"patch":"prerelease"};module.exports=diff;}});var require_major=__commonJS({"../../node_modules/semver/functions/major.js"(exports,module){var SemVer=require_semver(),major=(a,loose)=>new SemVer(a,loose).major;module.exports=major;}});var require_minor=__commonJS({"../../node_modules/semver/functions/minor.js"(exports,module){var SemVer=require_semver(),minor=(a,loose)=>new SemVer(a,loose).minor;module.exports=minor;}});var require_patch=__commonJS({"../../node_modules/semver/functions/patch.js"(exports,module){var SemVer=require_semver(),patch=(a,loose)=>new SemVer(a,loose).patch;module.exports=patch;}});var require_prerelease=__commonJS({"../../node_modules/semver/functions/prerelease.js"(exports,module){var parse2=require_parse2(),prerelease=(version,options)=>{let parsed=parse2(version,options);return parsed&&parsed.prerelease.length?parsed.prerelease:null};module.exports=prerelease;}});var require_compare=__commonJS({"../../node_modules/semver/functions/compare.js"(exports,module){var SemVer=require_semver(),compare=(a,b,loose)=>new SemVer(a,loose).compare(new SemVer(b,loose));module.exports=compare;}});var require_rcompare=__commonJS({"../../node_modules/semver/functions/rcompare.js"(exports,module){var compare=require_compare(),rcompare=(a,b,loose)=>compare(b,a,loose);module.exports=rcompare;}});var require_compare_loose=__commonJS({"../../node_modules/semver/functions/compare-loose.js"(exports,module){var compare=require_compare(),compareLoose=(a,b)=>compare(a,b,!0);module.exports=compareLoose;}});var require_compare_build=__commonJS({"../../node_modules/semver/functions/compare-build.js"(exports,module){var SemVer=require_semver(),compareBuild=(a,b,loose)=>{let versionA=new SemVer(a,loose),versionB=new SemVer(b,loose);return versionA.compare(versionB)||versionA.compareBuild(versionB)};module.exports=compareBuild;}});var require_sort=__commonJS({"../../node_modules/semver/functions/sort.js"(exports,module){var compareBuild=require_compare_build(),sort=(list,loose)=>list.sort((a,b)=>compareBuild(a,b,loose));module.exports=sort;}});var require_rsort=__commonJS({"../../node_modules/semver/functions/rsort.js"(exports,module){var compareBuild=require_compare_build(),rsort=(list,loose)=>list.sort((a,b)=>compareBuild(b,a,loose));module.exports=rsort;}});var require_gt=__commonJS({"../../node_modules/semver/functions/gt.js"(exports,module){var compare=require_compare(),gt=(a,b,loose)=>compare(a,b,loose)>0;module.exports=gt;}});var require_lt=__commonJS({"../../node_modules/semver/functions/lt.js"(exports,module){var compare=require_compare(),lt=(a,b,loose)=>compare(a,b,loose)<0;module.exports=lt;}});var require_eq=__commonJS({"../../node_modules/semver/functions/eq.js"(exports,module){var compare=require_compare(),eq=(a,b,loose)=>compare(a,b,loose)===0;module.exports=eq;}});var require_neq=__commonJS({"../../node_modules/semver/functions/neq.js"(exports,module){var compare=require_compare(),neq=(a,b,loose)=>compare(a,b,loose)!==0;module.exports=neq;}});var require_gte=__commonJS({"../../node_modules/semver/functions/gte.js"(exports,module){var compare=require_compare(),gte=(a,b,loose)=>compare(a,b,loose)>=0;module.exports=gte;}});var require_lte=__commonJS({"../../node_modules/semver/functions/lte.js"(exports,module){var compare=require_compare(),lte=(a,b,loose)=>compare(a,b,loose)<=0;module.exports=lte;}});var require_cmp=__commonJS({"../../node_modules/semver/functions/cmp.js"(exports,module){var eq=require_eq(),neq=require_neq(),gt=require_gt(),gte=require_gte(),lt=require_lt(),lte=require_lte(),cmp=(a,op,b,loose)=>{switch(op){case"===":return typeof a=="object"&&(a=a.version),typeof b=="object"&&(b=b.version),a===b;case"!==":return typeof a=="object"&&(a=a.version),typeof b=="object"&&(b=b.version),a!==b;case"":case"=":case"==":return eq(a,b,loose);case"!=":return neq(a,b,loose);case">":return gt(a,b,loose);case">=":return gte(a,b,loose);case"<":return lt(a,b,loose);case"<=":return lte(a,b,loose);default:throw new TypeError(`Invalid operator: ${op}`)}};module.exports=cmp;}});var require_coerce=__commonJS({"../../node_modules/semver/functions/coerce.js"(exports,module){var SemVer=require_semver(),parse2=require_parse2(),{safeRe:re,t}=require_re(),coerce2=(version,options)=>{if(version instanceof SemVer)return version;if(typeof version=="number"&&(version=String(version)),typeof version!="string")return null;options=options||{};let match=null;if(!options.rtl)match=version.match(options.includePrerelease?re[t.COERCEFULL]:re[t.COERCE]);else {let coerceRtlRegex=options.includePrerelease?re[t.COERCERTLFULL]:re[t.COERCERTL],next;for(;(next=coerceRtlRegex.exec(version))&&(!match||match.index+match[0].length!==version.length);)(!match||next.index+next[0].length!==match.index+match[0].length)&&(match=next),coerceRtlRegex.lastIndex=next.index+next[1].length+next[2].length;coerceRtlRegex.lastIndex=-1;}if(match===null)return null;let major=match[2],minor=match[3]||"0",patch=match[4]||"0",prerelease=options.includePrerelease&&match[5]?`-${match[5]}`:"",build=options.includePrerelease&&match[6]?`+${match[6]}`:"";return parse2(`${major}.${minor}.${patch}${prerelease}${build}`,options)};module.exports=coerce2;}});var require_lrucache=__commonJS({"../../node_modules/semver/internal/lrucache.js"(exports,module){var LRUCache=class{constructor(){this.max=1e3,this.map=new Map;}get(key){let value=this.map.get(key);if(value!==void 0)return this.map.delete(key),this.map.set(key,value),value}delete(key){return this.map.delete(key)}set(key,value){if(!this.delete(key)&&value!==void 0){if(this.map.size>=this.max){let firstKey=this.map.keys().next().value;this.delete(firstKey);}this.map.set(key,value);}return this}};module.exports=LRUCache;}});var require_range=__commonJS({"../../node_modules/semver/classes/range.js"(exports,module){var SPACE_CHARACTERS=/\s+/g,Range=class _Range{constructor(range,options){if(options=parseOptions(options),range instanceof _Range)return range.loose===!!options.loose&&range.includePrerelease===!!options.includePrerelease?range:new _Range(range.raw,options);if(range instanceof Comparator)return this.raw=range.value,this.set=[[range]],this.formatted=void 0,this;if(this.options=options,this.loose=!!options.loose,this.includePrerelease=!!options.includePrerelease,this.raw=range.trim().replace(SPACE_CHARACTERS," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(c=>c.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let first=this.set[0];if(this.set=this.set.filter(c=>!isNullSet(c[0])),this.set.length===0)this.set=[first];else if(this.set.length>1){for(let c of this.set)if(c.length===1&&isAny(c[0])){this.set=[c];break}}}this.formatted=void 0;}get range(){if(this.formatted===void 0){this.formatted="";for(let i=0;i<this.set.length;i++){i>0&&(this.formatted+="||");let comps=this.set[i];for(let k=0;k<comps.length;k++)k>0&&(this.formatted+=" "),this.formatted+=comps[k].toString().trim();}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(range){let memoKey=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+range,cached=cache.get(memoKey);if(cached)return cached;let loose=this.options.loose,hr=loose?re[t.HYPHENRANGELOOSE]:re[t.HYPHENRANGE];range=range.replace(hr,hyphenReplace(this.options.includePrerelease)),debug("hyphen replace",range),range=range.replace(re[t.COMPARATORTRIM],comparatorTrimReplace),debug("comparator trim",range),range=range.replace(re[t.TILDETRIM],tildeTrimReplace),debug("tilde trim",range),range=range.replace(re[t.CARETTRIM],caretTrimReplace),debug("caret trim",range);let rangeList=range.split(" ").map(comp=>parseComparator(comp,this.options)).join(" ").split(/\s+/).map(comp=>replaceGTE0(comp,this.options));loose&&(rangeList=rangeList.filter(comp=>(debug("loose invalid filter",comp,this.options),!!comp.match(re[t.COMPARATORLOOSE])))),debug("range list",rangeList);let rangeMap=new Map,comparators=rangeList.map(comp=>new Comparator(comp,this.options));for(let comp of comparators){if(isNullSet(comp))return [comp];rangeMap.set(comp.value,comp);}rangeMap.size>1&&rangeMap.has("")&&rangeMap.delete("");let result=[...rangeMap.values()];return cache.set(memoKey,result),result}intersects(range,options){if(!(range instanceof _Range))throw new TypeError("a Range is required");return this.set.some(thisComparators=>isSatisfiable(thisComparators,options)&&range.set.some(rangeComparators=>isSatisfiable(rangeComparators,options)&&thisComparators.every(thisComparator=>rangeComparators.every(rangeComparator=>thisComparator.intersects(rangeComparator,options)))))}test(version){if(!version)return !1;if(typeof version=="string")try{version=new SemVer(version,this.options);}catch{return !1}for(let i=0;i<this.set.length;i++)if(testSet(this.set[i],version,this.options))return !0;return !1}};module.exports=Range;var LRU=require_lrucache(),cache=new LRU,parseOptions=require_parse_options(),Comparator=require_comparator(),debug=require_debug(),SemVer=require_semver(),{safeRe:re,t,comparatorTrimReplace,tildeTrimReplace,caretTrimReplace}=require_re(),{FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE}=require_constants(),isNullSet=c=>c.value==="<0.0.0-0",isAny=c=>c.value==="",isSatisfiable=(comparators,options)=>{let result=!0,remainingComparators=comparators.slice(),testComparator=remainingComparators.pop();for(;result&&remainingComparators.length;)result=remainingComparators.every(otherComparator=>testComparator.intersects(otherComparator,options)),testComparator=remainingComparators.pop();return result},parseComparator=(comp,options)=>(debug("comp",comp,options),comp=replaceCarets(comp,options),debug("caret",comp),comp=replaceTildes(comp,options),debug("tildes",comp),comp=replaceXRanges(comp,options),debug("xrange",comp),comp=replaceStars(comp,options),debug("stars",comp),comp),isX=id=>!id||id.toLowerCase()==="x"||id==="*",replaceTildes=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceTilde(c,options)).join(" "),replaceTilde=(comp,options)=>{let r=options.loose?re[t.TILDELOOSE]:re[t.TILDE];return comp.replace(r,(_,M,m,p,pr)=>{debug("tilde",comp,_,M,m,p,pr);let ret;return isX(M)?ret="":isX(m)?ret=`>=${M}.0.0 <${+M+1}.0.0-0`:isX(p)?ret=`>=${M}.${m}.0 <${M}.${+m+1}.0-0`:pr?(debug("replaceTilde pr",pr),ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`):ret=`>=${M}.${m}.${p} <${M}.${+m+1}.0-0`,debug("tilde return",ret),ret})},replaceCarets=(comp,options)=>comp.trim().split(/\s+/).map(c=>replaceCaret(c,options)).join(" "),replaceCaret=(comp,options)=>{debug("caret",comp,options);let r=options.loose?re[t.CARETLOOSE]:re[t.CARET],z=options.includePrerelease?"-0":"";return comp.replace(r,(_,M,m,p,pr)=>{debug("caret",comp,_,M,m,p,pr);let ret;return isX(M)?ret="":isX(m)?ret=`>=${M}.0.0${z} <${+M+1}.0.0-0`:isX(p)?M==="0"?ret=`>=${M}.${m}.0${z} <${M}.${+m+1}.0-0`:ret=`>=${M}.${m}.0${z} <${+M+1}.0.0-0`:pr?(debug("replaceCaret pr",pr),M==="0"?m==="0"?ret=`>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p+1}-0`:ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`:ret=`>=${M}.${m}.${p}-${pr} <${+M+1}.0.0-0`):(debug("no pr"),M==="0"?m==="0"?ret=`>=${M}.${m}.${p}${z} <${M}.${m}.${+p+1}-0`:ret=`>=${M}.${m}.${p}${z} <${M}.${+m+1}.0-0`:ret=`>=${M}.${m}.${p} <${+M+1}.0.0-0`),debug("caret return",ret),ret})},replaceXRanges=(comp,options)=>(debug("replaceXRanges",comp,options),comp.split(/\s+/).map(c=>replaceXRange(c,options)).join(" ")),replaceXRange=(comp,options)=>{comp=comp.trim();let r=options.loose?re[t.XRANGELOOSE]:re[t.XRANGE];return comp.replace(r,(ret,gtlt,M,m,p,pr)=>{debug("xRange",comp,ret,gtlt,M,m,p,pr);let xM=isX(M),xm=xM||isX(m),xp=xm||isX(p),anyX=xp;return gtlt==="="&&anyX&&(gtlt=""),pr=options.includePrerelease?"-0":"",xM?gtlt===">"||gtlt==="<"?ret="<0.0.0-0":ret="*":gtlt&&anyX?(xm&&(m=0),p=0,gtlt===">"?(gtlt=">=",xm?(M=+M+1,m=0,p=0):(m=+m+1,p=0)):gtlt==="<="&&(gtlt="<",xm?M=+M+1:m=+m+1),gtlt==="<"&&(pr="-0"),ret=`${gtlt+M}.${m}.${p}${pr}`):xm?ret=`>=${M}.0.0${pr} <${+M+1}.0.0-0`:xp&&(ret=`>=${M}.${m}.0${pr} <${M}.${+m+1}.0-0`),debug("xRange return",ret),ret})},replaceStars=(comp,options)=>(debug("replaceStars",comp,options),comp.trim().replace(re[t.STAR],"")),replaceGTE0=(comp,options)=>(debug("replaceGTE0",comp,options),comp.trim().replace(re[options.includePrerelease?t.GTE0PRE:t.GTE0],"")),hyphenReplace=incPr=>($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr)=>(isX(fM)?from="":isX(fm)?from=`>=${fM}.0.0${incPr?"-0":""}`:isX(fp)?from=`>=${fM}.${fm}.0${incPr?"-0":""}`:fpr?from=`>=${from}`:from=`>=${from}${incPr?"-0":""}`,isX(tM)?to="":isX(tm)?to=`<${+tM+1}.0.0-0`:isX(tp)?to=`<${tM}.${+tm+1}.0-0`:tpr?to=`<=${tM}.${tm}.${tp}-${tpr}`:incPr?to=`<${tM}.${tm}.${+tp+1}-0`:to=`<=${to}`,`${from} ${to}`.trim()),testSet=(set,version,options)=>{for(let i=0;i<set.length;i++)if(!set[i].test(version))return !1;if(version.prerelease.length&&!options.includePrerelease){for(let i=0;i<set.length;i++)if(debug(set[i].semver),set[i].semver!==Comparator.ANY&&set[i].semver.prerelease.length>0){let allowed=set[i].semver;if(allowed.major===version.major&&allowed.minor===version.minor&&allowed.patch===version.patch)return !0}return !1}return !0};}});var require_comparator=__commonJS({"../../node_modules/semver/classes/comparator.js"(exports,module){var ANY=Symbol("SemVer ANY"),Comparator=class _Comparator{static get ANY(){return ANY}constructor(comp,options){if(options=parseOptions(options),comp instanceof _Comparator){if(comp.loose===!!options.loose)return comp;comp=comp.value;}comp=comp.trim().split(/\s+/).join(" "),debug("comparator",comp,options),this.options=options,this.loose=!!options.loose,this.parse(comp),this.semver===ANY?this.value="":this.value=this.operator+this.semver.version,debug("comp",this);}parse(comp){let r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],m=comp.match(r);if(!m)throw new TypeError(`Invalid comparator: ${comp}`);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new SemVer(m[2],this.options.loose):this.semver=ANY;}toString(){return this.value}test(version){if(debug("Comparator.test",version,this.options.loose),this.semver===ANY||version===ANY)return !0;if(typeof version=="string")try{version=new SemVer(version,this.options);}catch{return !1}return cmp(version,this.operator,this.semver,this.options)}intersects(comp,options){if(!(comp instanceof _Comparator))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Range(comp.value,options).test(this.value):comp.operator===""?comp.value===""?!0:new Range(this.value,options).test(comp.semver):(options=parseOptions(options),options.includePrerelease&&(this.value==="<0.0.0-0"||comp.value==="<0.0.0-0")||!options.includePrerelease&&(this.value.startsWith("<0.0.0")||comp.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&comp.operator.startsWith(">")||this.operator.startsWith("<")&&comp.operator.startsWith("<")||this.semver.version===comp.semver.version&&this.operator.includes("=")&&comp.operator.includes("=")||cmp(this.semver,"<",comp.semver,options)&&this.operator.startsWith(">")&&comp.operator.startsWith("<")||cmp(this.semver,">",comp.semver,options)&&this.operator.startsWith("<")&&comp.operator.startsWith(">")))}};module.exports=Comparator;var parseOptions=require_parse_options(),{safeRe:re,t}=require_re(),cmp=require_cmp(),debug=require_debug(),SemVer=require_semver(),Range=require_range();}});var require_satisfies=__commonJS({"../../node_modules/semver/functions/satisfies.js"(exports,module){var Range=require_range(),satisfies2=(version,range,options)=>{try{range=new Range(range,options);}catch{return !1}return range.test(version)};module.exports=satisfies2;}});var require_to_comparators=__commonJS({"../../node_modules/semver/ranges/to-comparators.js"(exports,module){var Range=require_range(),toComparators=(range,options)=>new Range(range,options).set.map(comp=>comp.map(c=>c.value).join(" ").trim().split(" "));module.exports=toComparators;}});var require_max_satisfying=__commonJS({"../../node_modules/semver/ranges/max-satisfying.js"(exports,module){var SemVer=require_semver(),Range=require_range(),maxSatisfying=(versions,range,options)=>{let max=null,maxSV=null,rangeObj=null;try{rangeObj=new Range(range,options);}catch{return null}return versions.forEach(v=>{rangeObj.test(v)&&(!max||maxSV.compare(v)===-1)&&(max=v,maxSV=new SemVer(max,options));}),max};module.exports=maxSatisfying;}});var require_min_satisfying=__commonJS({"../../node_modules/semver/ranges/min-satisfying.js"(exports,module){var SemVer=require_semver(),Range=require_range(),minSatisfying=(versions,range,options)=>{let min=null,minSV=null,rangeObj=null;try{rangeObj=new Range(range,options);}catch{return null}return versions.forEach(v=>{rangeObj.test(v)&&(!min||minSV.compare(v)===1)&&(min=v,minSV=new SemVer(min,options));}),min};module.exports=minSatisfying;}});var require_min_version=__commonJS({"../../node_modules/semver/ranges/min-version.js"(exports,module){var SemVer=require_semver(),Range=require_range(),gt=require_gt(),minVersion=(range,loose)=>{range=new Range(range,loose);let minver=new SemVer("0.0.0");if(range.test(minver)||(minver=new SemVer("0.0.0-0"),range.test(minver)))return minver;minver=null;for(let i=0;i<range.set.length;++i){let comparators=range.set[i],setMin=null;comparators.forEach(comparator=>{let compver=new SemVer(comparator.semver.version);switch(comparator.operator){case">":compver.prerelease.length===0?compver.patch++:compver.prerelease.push(0),compver.raw=compver.format();case"":case">=":(!setMin||gt(compver,setMin))&&(setMin=compver);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${comparator.operator}`)}}),setMin&&(!minver||gt(minver,setMin))&&(minver=setMin);}return minver&&range.test(minver)?minver:null};module.exports=minVersion;}});var require_valid2=__commonJS({"../../node_modules/semver/ranges/valid.js"(exports,module){var Range=require_range(),validRange=(range,options)=>{try{return new Range(range,options).range||"*"}catch{return null}};module.exports=validRange;}});var require_outside=__commonJS({"../../node_modules/semver/ranges/outside.js"(exports,module){var SemVer=require_semver(),Comparator=require_comparator(),{ANY}=Comparator,Range=require_range(),satisfies2=require_satisfies(),gt=require_gt(),lt=require_lt(),lte=require_lte(),gte=require_gte(),outside=(version,range,hilo,options)=>{version=new SemVer(version,options),range=new Range(range,options);let gtfn,ltefn,ltfn,comp,ecomp;switch(hilo){case">":gtfn=gt,ltefn=lte,ltfn=lt,comp=">",ecomp=">=";break;case"<":gtfn=lt,ltefn=gte,ltfn=gt,comp="<",ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies2(version,range,options))return !1;for(let i=0;i<range.set.length;++i){let comparators=range.set[i],high=null,low=null;if(comparators.forEach(comparator=>{comparator.semver===ANY&&(comparator=new Comparator(">=0.0.0")),high=high||comparator,low=low||comparator,gtfn(comparator.semver,high.semver,options)?high=comparator:ltfn(comparator.semver,low.semver,options)&&(low=comparator);}),high.operator===comp||high.operator===ecomp||(!low.operator||low.operator===comp)&<efn(version,low.semver))return !1;if(low.operator===ecomp&<fn(version,low.semver))return !1}return !0};module.exports=outside;}});var require_gtr=__commonJS({"../../node_modules/semver/ranges/gtr.js"(exports,module){var outside=require_outside(),gtr=(version,range,options)=>outside(version,range,">",options);module.exports=gtr;}});var require_ltr=__commonJS({"../../node_modules/semver/ranges/ltr.js"(exports,module){var outside=require_outside(),ltr=(version,range,options)=>outside(version,range,"<",options);module.exports=ltr;}});var require_intersects=__commonJS({"../../node_modules/semver/ranges/intersects.js"(exports,module){var Range=require_range(),intersects=(r1,r2,options)=>(r1=new Range(r1,options),r2=new Range(r2,options),r1.intersects(r2,options));module.exports=intersects;}});var require_simplify=__commonJS({"../../node_modules/semver/ranges/simplify.js"(exports,module){var satisfies2=require_satisfies(),compare=require_compare();module.exports=(versions,range,options)=>{let set=[],first=null,prev=null,v=versions.sort((a,b)=>compare(a,b,options));for(let version of v)satisfies2(version,range,options)?(prev=version,first||(first=version)):(prev&&set.push([first,prev]),prev=null,first=null);first&&set.push([first,null]);let ranges=[];for(let[min,max]of set)min===max?ranges.push(min):!max&&min===v[0]?ranges.push("*"):max?min===v[0]?ranges.push(`<=${max}`):ranges.push(`${min} - ${max}`):ranges.push(`>=${min}`);let simplified=ranges.join(" || "),original=typeof range.raw=="string"?range.raw:String(range);return simplified.length<original.length?simplified:range};}});var require_subset=__commonJS({"../../node_modules/semver/ranges/subset.js"(exports,module){var Range=require_range(),Comparator=require_comparator(),{ANY}=Comparator,satisfies2=require_satisfies(),compare=require_compare(),subset=(sub,dom,options={})=>{if(sub===dom)return !0;sub=new Range(sub,options),dom=new Range(dom,options);let sawNonNull=!1;OUTER:for(let simpleSub of sub.set){for(let simpleDom of dom.set){let isSub=simpleSubset(simpleSub,simpleDom,options);if(sawNonNull=sawNonNull||isSub!==null,isSub)continue OUTER}if(sawNonNull)return !1}return !0},minimumVersionWithPreRelease=[new Comparator(">=0.0.0-0")],minimumVersion=[new Comparator(">=0.0.0")],simpleSubset=(sub,dom,options)=>{if(sub===dom)return !0;if(sub.length===1&&sub[0].semver===ANY){if(dom.length===1&&dom[0].semver===ANY)return !0;options.includePrerelease?sub=minimumVersionWithPreRelease:sub=minimumVersion;}if(dom.length===1&&dom[0].semver===ANY){if(options.includePrerelease)return !0;dom=minimumVersion;}let eqSet=new Set,gt,lt;for(let c of sub)c.operator===">"||c.operator===">="?gt=higherGT(gt,c,options):c.operator==="<"||c.operator==="<="?lt=lowerLT(lt,c,options):eqSet.add(c.semver);if(eqSet.size>1)return null;let gtltComp;if(gt&<){if(gtltComp=compare(gt.semver,lt.semver,options),gtltComp>0)return null;if(gtltComp===0&&(gt.operator!==">="||lt.operator!=="<="))return null}for(let eq of eqSet){if(gt&&!satisfies2(eq,String(gt),options)||lt&&!satisfies2(eq,String(lt),options))return null;for(let c of dom)if(!satisfies2(eq,String(c),options))return !1;return !0}let higher,lower,hasDomLT,hasDomGT,needDomLTPre=lt&&!options.includePrerelease&<.semver.prerelease.length?lt.semver:!1,needDomGTPre=gt&&!options.includePrerelease&>.semver.prerelease.length?gt.semver:!1;needDomLTPre&&needDomLTPre.prerelease.length===1&<.operator==="<"&&needDomLTPre.prerelease[0]===0&&(needDomLTPre=!1);for(let c of dom){if(hasDomGT=hasDomGT||c.operator===">"||c.operator===">=",hasDomLT=hasDomLT||c.operator==="<"||c.operator==="<=",gt){if(needDomGTPre&&c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomGTPre.major&&c.semver.minor===needDomGTPre.minor&&c.semver.patch===needDomGTPre.patch&&(needDomGTPre=!1),c.operator===">"||c.operator===">="){if(higher=higherGT(gt,c,options),higher===c&&higher!==gt)return !1}else if(gt.operator===">="&&!satisfies2(gt.semver,String(c),options))return !1}if(lt){if(needDomLTPre&&c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomLTPre.major&&c.semver.minor===needDomLTPre.minor&&c.semver.patch===needDomLTPre.patch&&(needDomLTPre=!1),c.operator==="<"||c.operator==="<="){if(lower=lowerLT(lt,c,options),lower===c&&lower!==lt)return !1}else if(lt.operator==="<="&&!satisfies2(lt.semver,String(c),options))return !1}if(!c.operator&&(lt||gt)&>ltComp!==0)return !1}return !(gt&&hasDomLT&&!lt&>ltComp!==0||lt&&hasDomGT&&!gt&>ltComp!==0||needDomGTPre||needDomLTPre)},higherGT=(a,b,options)=>{if(!a)return b;let comp=compare(a.semver,b.semver,options);return comp>0?a:comp<0||b.operator===">"&&a.operator===">="?b:a},lowerLT=(a,b,options)=>{if(!a)return b;let comp=compare(a.semver,b.semver,options);return comp<0?a:comp>0||b.operator==="<"&&a.operator==="<="?b:a};module.exports=subset;}});var require_semver2=__commonJS({"../../node_modules/semver/index.js"(exports,module){var internalRe=require_re(),constants3=require_constants(),SemVer=require_semver(),identifiers=require_identifiers(),parse2=require_parse2(),valid=require_valid(),clean=require_clean(),inc=require_inc(),diff=require_diff(),major=require_major(),minor=require_minor(),patch=require_patch(),prerelease=require_prerelease(),compare=require_compare(),rcompare=require_rcompare(),compareLoose=require_compare_loose(),compareBuild=require_compare_build(),sort=require_sort(),rsort=require_rsort(),gt=require_gt(),lt=require_lt(),eq=require_eq(),neq=require_neq(),gte=require_gte(),lte=require_lte(),cmp=require_cmp(),coerce2=require_coerce(),Comparator=require_comparator(),Range=require_range(),satisfies2=require_satisfies(),toComparators=require_to_comparators(),maxSatisfying=require_max_satisfying(),minSatisfying=require_min_satisfying(),minVersion=require_min_version(),validRange=require_valid2(),outside=require_outside(),gtr=require_gtr(),ltr=require_ltr(),intersects=require_intersects(),simplifyRange=require_simplify(),subset=require_subset();module.exports={parse:parse2,valid,clean,inc,diff,major,minor,patch,prerelease,compare,rcompare,compareLoose,compareBuild,sort,rsort,gt,lt,eq,neq,gte,lte,cmp,coerce:coerce2,Comparator,Range,satisfies:satisfies2,toComparators,maxSatisfying,minSatisfying,minVersion,validRange,outside,gtr,ltr,intersects,simplifyRange,subset,SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants3.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants3.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers};}});var import_cross_spawn=__toESM(require_cross_spawn(),1);function stripFinalNewline(input){let LF=typeof input=="string"?`
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`);return isError?(error2.originalMessage=error2.message,error2.message=message):error2=new Error(message),error2.shortMessage=shortMessage,error2.command=command,error2.escapedCommand=escapedCommand,error2.exitCode=exitCode,error2.signal=signal,error2.signalDescription=signalDescription,error2.stdout=stdout,error2.stderr=stderr,error2.cwd=cwd2,all!==void 0&&(error2.all=all),"bufferedData"in error2&&delete error2.bufferedData,error2.failed=!0,error2.timedOut=!!timedOut,error2.isCanceled=isCanceled,error2.killed=killed&&!timedOut,error2};var aliases=["stdin","stdout","stderr"],hasAlias=options=>aliases.some(alias=>options[alias]!==void 0),normalizeStdio=options=>{if(!options)return;let{stdio}=options;if(stdio===void 0)return aliases.map(alias=>options[alias]);if(hasAlias(options))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias=>`\`${alias}\``).join(", ")}`);if(typeof stdio=="string")return stdio;if(!Array.isArray(stdio))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);let length=Math.max(stdio.length,aliases.length);return Array.from({length},(value,index)=>stdio[index])};var signals=[];signals.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&signals.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&signals.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var processOk=process8=>!!process8&&typeof process8=="object"&&typeof process8.removeListener=="function"&&typeof process8.emit=="function"&&typeof process8.reallyExit=="function"&&typeof process8.listeners=="function"&&typeof process8.kill=="function"&&typeof process8.pid=="number"&&typeof process8.on=="function",kExitEmitter=Symbol.for("signal-exit emitter"),global2=globalThis,ObjectDefineProperty=Object.defineProperty.bind(Object),Emitter=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(global2[kExitEmitter])return global2[kExitEmitter];ObjectDefineProperty(global2,kExitEmitter,{value:this,writable:!1,enumerable:!1,configurable:!1});}on(ev,fn){this.listeners[ev].push(fn);}removeListener(ev,fn){let list=this.listeners[ev],i=list.indexOf(fn);i!==-1&&(i===0&&list.length===1?list.length=0:list.splice(i,1));}emit(ev,code,signal){if(this.emitted[ev])return !1;this.emitted[ev]=!0;let ret=!1;for(let fn of this.listeners[ev])ret=fn(code,signal)===!0||ret;return ev==="exit"&&(ret=this.emit("afterExit",code,signal)||ret),ret}},SignalExitBase=class{},signalExitWrap=handler=>({onExit(cb,opts){return handler.onExit(cb,opts)},load(){return handler.load()},unload(){return handler.unload()}}),SignalExitFallback=class extends SignalExitBase{onExit(){return ()=>{}}load(){}unload(){}},SignalExit=class extends SignalExitBase{#hupSig=process4.platform==="win32"?"SIGINT":"SIGHUP";#emitter=new Emitter;#process;#originalProcessEmit;#originalProcessReallyExit;#sigListeners={};#loaded=!1;constructor(process8){super(),this.#process=process8,this.#sigListeners={};for(let sig of signals)this.#sigListeners[sig]=()=>{let listeners=this.#process.listeners(sig),{count}=this.#emitter,p=process8;if(typeof p.__signal_exit_emitter__=="object"&&typeof p.__signal_exit_emitter__.count=="number"&&(count+=p.__signal_exit_emitter__.count),listeners.length===count){this.unload();let ret=this.#emitter.emit("exit",null,sig),s=sig==="SIGHUP"?this.#hupSig:sig;ret||process8.kill(process8.pid,s);}};this.#originalProcessReallyExit=process8.reallyExit,this.#originalProcessEmit=process8.emit;}onExit(cb,opts){if(!processOk(this.#process))return ()=>{};this.#loaded===!1&&this.load();let ev=opts?.alwaysLast?"afterExit":"exit";return this.#emitter.on(ev,cb),()=>{this.#emitter.removeListener(ev,cb),this.#emitter.listeners.exit.length===0&&this.#emitter.listeners.afterExit.length===0&&this.unload();}}load(){if(!this.#loaded){this.#loaded=!0,this.#emitter.count+=1;for(let sig of signals)try{let fn=this.#sigListeners[sig];fn&&this.#process.on(sig,fn);}catch{}this.#process.emit=(ev,...a)=>this.#processEmit(ev,...a),this.#process.reallyExit=code=>this.#processReallyExit(code);}}unload(){this.#loaded&&(this.#loaded=!1,signals.forEach(sig=>{let listener=this.#sigListeners[sig];if(!listener)throw new Error("Listener not defined for signal: "+sig);try{this.#process.removeListener(sig,listener);}catch{}}),this.#process.emit=this.#originalProcessEmit,this.#process.reallyExit=this.#originalProcessReallyExit,this.#emitter.count-=1);}#processReallyExit(code){return processOk(this.#process)?(this.#process.exitCode=code||0,this.#emitter.emit("exit",this.#process.exitCode,null),this.#originalProcessReallyExit.call(this.#process,this.#process.exitCode)):0}#processEmit(ev,...args){let og=this.#originalProcessEmit;if(ev==="exit"&&processOk(this.#process)){typeof args[0]=="number"&&(this.#process.exitCode=args[0]);let ret=og.call(this.#process,ev,...args);return this.#emitter.emit("exit",this.#process.exitCode,null),ret}else return og.call(this.#process,ev,...args)}},process4=globalThis.process,{onExit,load,unload}=signalExitWrap(processOk(process4)?new SignalExit(process4):new SignalExitFallback);var DEFAULT_FORCE_KILL_TIMEOUT=1e3*5,spawnedKill=(kill,signal="SIGTERM",options={})=>{let killResult=kill(signal);return setKillTimeout(kill,signal,options,killResult),killResult},setKillTimeout=(kill,signal,options,killResult)=>{if(!shouldForceKill(signal,options,killResult))return;let timeout=getForceKillAfterTimeout(options),t=setTimeout(()=>{kill("SIGKILL");},timeout);t.unref&&t.unref();},shouldForceKill=(signal,{forceKillAfterTimeout},killResult)=>isSigterm(signal)&&forceKillAfterTimeout!==!1&&killResult,isSigterm=signal=>signal===os__default.default.constants.signals.SIGTERM||typeof signal=="string"&&signal.toUpperCase()==="SIGTERM",getForceKillAfterTimeout=({forceKillAfterTimeout=!0})=>{if(forceKillAfterTimeout===!0)return DEFAULT_FORCE_KILL_TIMEOUT;if(!Number.isFinite(forceKillAfterTimeout)||forceKillAfterTimeout<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);return forceKillAfterTimeout},spawnedCancel=(spawned,context)=>{spawned.kill()&&(context.isCanceled=!0);},timeoutKill=(spawned,signal,reject)=>{spawned.kill(signal),reject(Object.assign(new Error("Timed out"),{timedOut:!0,signal}));},setupTimeout=(spawned,{timeout,killSignal="SIGTERM"},spawnedPromise)=>{if(timeout===0||timeout===void 0)return spawnedPromise;let timeoutId,timeoutPromise=new Promise((resolve2,reject)=>{timeoutId=setTimeout(()=>{timeoutKill(spawned,killSignal,reject);},timeout);}),safeSpawnedPromise=spawnedPromise.finally(()=>{clearTimeout(timeoutId);});return Promise.race([timeoutPromise,safeSpawnedPromise])},validateTimeout=({timeout})=>{if(timeout!==void 0&&(!Number.isFinite(timeout)||timeout<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`)},setExitHandler=async(spawned,{cleanup,detached},timedPromise)=>{if(!cleanup||detached)return timedPromise;let removeExitHandler=onExit(()=>{spawned.kill();});return timedPromise.finally(()=>{removeExitHandler();})};function isStream(stream){return stream!==null&&typeof stream=="object"&&typeof stream.pipe=="function"}function isWritableStream(stream){return isStream(stream)&&stream.writable!==!1&&typeof stream._write=="function"&&typeof stream._writableState=="object"}var isExecaChildProcess=target=>target instanceof childProcess.ChildProcess&&typeof target.then=="function",pipeToTarget=(spawned,streamName,target)=>{if(typeof target=="string")return spawned[streamName].pipe(fs.createWriteStream(target)),spawned;if(isWritableStream(target))return spawned[streamName].pipe(target),spawned;if(!isExecaChildProcess(target))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!isWritableStream(target.stdin))throw new TypeError("The target child process's stdin must be available.");return spawned[streamName].pipe(target.stdin),target},addPipeMethods=spawned=>{spawned.stdout!==null&&(spawned.pipeStdout=pipeToTarget.bind(void 0,spawned,"stdout")),spawned.stderr!==null&&(spawned.pipeStderr=pipeToTarget.bind(void 0,spawned,"stderr")),spawned.all!==void 0&&(spawned.pipeAll=pipeToTarget.bind(void 0,spawned,"all"));};var getStreamContents=async(stream,{init,convertChunk,getSize,truncateChunk,addChunk,getFinalChunk,finalize},{maxBuffer=Number.POSITIVE_INFINITY}={})=>{if(!isAsyncIterable(stream))throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let state=init();state.length=0;try{for await(let chunk of stream){let chunkType=getChunkType(chunk),convertedChunk=convertChunk[chunkType](chunk,state);appendChunk({convertedChunk,state,getSize,truncateChunk,addChunk,maxBuffer});}return appendFinalChunk({state,convertChunk,getSize,truncateChunk,addChunk,getFinalChunk,maxBuffer}),finalize(state)}catch(error2){throw error2.bufferedData=finalize(state),error2}},appendFinalChunk=({state,getSize,truncateChunk,addChunk,getFinalChunk,maxBuffer})=>{let convertedChunk=getFinalChunk(state);convertedChunk!==void 0&&appendChunk({convertedChunk,state,getSize,truncateChunk,addChunk,maxBuffer});},appendChunk=({convertedChunk,state,getSize,truncateChunk,addChunk,maxBuffer})=>{let chunkSize=getSize(convertedChunk),newLength=state.length+chunkSize;if(newLength<=maxBuffer){addNewChunk(convertedChunk,state,addChunk,newLength);return}let truncatedChunk=truncateChunk(convertedChunk,maxBuffer-state.length);throw truncatedChunk!==void 0&&addNewChunk(truncatedChunk,state,addChunk,maxBuffer),new MaxBufferError},addNewChunk=(convertedChunk,state,addChunk,newLength)=>{state.contents=addChunk(convertedChunk,state,newLength),state.length=newLength;},isAsyncIterable=stream=>typeof stream=="object"&&stream!==null&&typeof stream[Symbol.asyncIterator]=="function",getChunkType=chunk=>{let typeOfChunk=typeof chunk;if(typeOfChunk==="string")return "string";if(typeOfChunk!=="object"||chunk===null)return "others";if(globalThis.Buffer?.isBuffer(chunk))return "buffer";let prototypeName=objectToString.call(chunk);return prototypeName==="[object ArrayBuffer]"?"arrayBuffer":prototypeName==="[object DataView]"?"dataView":Number.isInteger(chunk.byteLength)&&Number.isInteger(chunk.byteOffset)&&objectToString.call(chunk.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:objectToString}=Object.prototype,MaxBufferError=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded");}};var identity=value=>value,noop=()=>{},getContentsProp=({contents})=>contents,throwObjectStream=chunk=>{throw new Error(`Streams in object mode are not supported: ${String(chunk)}`)},getLengthProp=convertedChunk=>convertedChunk.length;async function getStreamAsArrayBuffer(stream,options){return getStreamContents(stream,arrayBufferMethods,options)}var initArrayBuffer=()=>({contents:new ArrayBuffer(0)}),useTextEncoder=chunk=>textEncoder.encode(chunk),textEncoder=new TextEncoder,useUint8Array=chunk=>new Uint8Array(chunk),useUint8ArrayWithOffset=chunk=>new Uint8Array(chunk.buffer,chunk.byteOffset,chunk.byteLength),truncateArrayBufferChunk=(convertedChunk,chunkSize)=>convertedChunk.slice(0,chunkSize),addArrayBufferChunk=(convertedChunk,{contents,length:previousLength},length)=>{let newContents=hasArrayBufferResize()?resizeArrayBuffer(contents,length):resizeArrayBufferSlow(contents,length);return new Uint8Array(newContents).set(convertedChunk,previousLength),newContents},resizeArrayBufferSlow=(contents,length)=>{if(length<=contents.byteLength)return contents;let arrayBuffer=new ArrayBuffer(getNewContentsLength(length));return new Uint8Array(arrayBuffer).set(new Uint8Array(contents),0),arrayBuffer},resizeArrayBuffer=(contents,length)=>{if(length<=contents.maxByteLength)return contents.resize(length),contents;let arrayBuffer=new ArrayBuffer(length,{maxByteLength:getNewContentsLength(length)});return new Uint8Array(arrayBuffer).set(new Uint8Array(contents),0),arrayBuffer},getNewContentsLength=length=>SCALE_FACTOR**Math.ceil(Math.log(length)/Math.log(SCALE_FACTOR)),SCALE_FACTOR=2,finalizeArrayBuffer=({contents,length})=>hasArrayBufferResize()?contents:contents.slice(0,length),hasArrayBufferResize=()=>"resize"in ArrayBuffer.prototype,arrayBufferMethods={init:initArrayBuffer,convertChunk:{string:useTextEncoder,buffer:useUint8Array,arrayBuffer:useUint8Array,dataView:useUint8ArrayWithOffset,typedArray:useUint8ArrayWithOffset,others:throwObjectStream},getSize:getLengthProp,truncateChunk:truncateArrayBufferChunk,addChunk:addArrayBufferChunk,getFinalChunk:noop,finalize:finalizeArrayBuffer};async function getStreamAsBuffer(stream,options){if(!("Buffer"in globalThis))throw new Error("getStreamAsBuffer() is only supported in Node.js");try{return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream,options))}catch(error2){throw error2.bufferedData!==void 0&&(error2.bufferedData=arrayBufferToNodeBuffer(error2.bufferedData)),error2}}var arrayBufferToNodeBuffer=arrayBuffer=>globalThis.Buffer.from(arrayBuffer);async function getStreamAsString(stream,options){return getStreamContents(stream,stringMethods,options)}var initString=()=>({contents:"",textDecoder:new TextDecoder}),useTextDecoder=(chunk,{textDecoder})=>textDecoder.decode(chunk,{stream:!0}),addStringChunk=(convertedChunk,{contents})=>contents+convertedChunk,truncateStringChunk=(convertedChunk,chunkSize)=>convertedChunk.slice(0,chunkSize),getFinalStringChunk=({textDecoder})=>{let finalChunk=textDecoder.decode();return finalChunk===""?void 0:finalChunk},stringMethods={init:initString,convertChunk:{string:identity,buffer:useTextDecoder,arrayBuffer:useTextDecoder,dataView:useTextDecoder,typedArray:useTextDecoder,others:throwObjectStream},getSize:getLengthProp,truncateChunk:truncateStringChunk,addChunk:addStringChunk,getFinalChunk:getFinalStringChunk,finalize:getContentsProp};var import_merge_stream=__toESM(require_merge_stream(),1),validateInputOptions=input=>{if(input!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},getInput=({input,inputFile})=>typeof inputFile!="string"?input:(validateInputOptions(input),fs.createReadStream(inputFile)),handleInput=(spawned,options)=>{let input=getInput(options);input!==void 0&&(isStream(input)?input.pipe(spawned.stdin):spawned.stdin.end(input));},makeAllStream=(spawned,{all})=>{if(!all||!spawned.stdout&&!spawned.stderr)return;let mixed=(0, import_merge_stream.default)();return spawned.stdout&&mixed.add(spawned.stdout),spawned.stderr&&mixed.add(spawned.stderr),mixed},getBufferedData=async(stream,streamPromise)=>{if(!(!stream||streamPromise===void 0)){await promises.setTimeout(0),stream.destroy();try{return await streamPromise}catch(error2){return error2.bufferedData}}},getStreamPromise=(stream,{encoding,buffer,maxBuffer})=>{if(!(!stream||!buffer))return encoding==="utf8"||encoding==="utf-8"?getStreamAsString(stream,{maxBuffer}):encoding===null||encoding==="buffer"?getStreamAsBuffer(stream,{maxBuffer}):applyEncoding(stream,maxBuffer,encoding)},applyEncoding=async(stream,maxBuffer,encoding)=>(await getStreamAsBuffer(stream,{maxBuffer})).toString(encoding),getSpawnedResult=async({stdout,stderr,all},{encoding,buffer,maxBuffer},processDone)=>{let stdoutPromise=getStreamPromise(stdout,{encoding,buffer,maxBuffer}),stderrPromise=getStreamPromise(stderr,{encoding,buffer,maxBuffer}),allPromise=getStreamPromise(all,{encoding,buffer,maxBuffer:maxBuffer*2});try{return await Promise.all([processDone,stdoutPromise,stderrPromise,allPromise])}catch(error2){return Promise.all([{error:error2,signal:error2.signal,timedOut:error2.timedOut},getBufferedData(stdout,stdoutPromise),getBufferedData(stderr,stderrPromise),getBufferedData(all,allPromise)])}};var nativePromisePrototype=(async()=>{})().constructor.prototype,descriptors=["then","catch","finally"].map(property=>[property,Reflect.getOwnPropertyDescriptor(nativePromisePrototype,property)]),mergePromise=(spawned,promise)=>{for(let[property,descriptor]of descriptors){let value=typeof promise=="function"?(...args)=>Reflect.apply(descriptor.value,promise(),args):descriptor.value.bind(promise);Reflect.defineProperty(spawned,property,{...descriptor,value});}},getSpawnedPromise=spawned=>new Promise((resolve2,reject)=>{spawned.on("exit",(exitCode,signal)=>{resolve2({exitCode,signal});}),spawned.on("error",error2=>{reject(error2);}),spawned.stdin&&spawned.stdin.on("error",error2=>{reject(error2);});});var normalizeArgs=(file,args=[])=>Array.isArray(args)?[file,...args]:[file],NO_ESCAPE_REGEXP=/^[\w.-]+$/,escapeArg=arg=>typeof arg!="string"||NO_ESCAPE_REGEXP.test(arg)?arg:`"${arg.replaceAll('"','\\"')}"`,joinCommand=(file,args)=>normalizeArgs(file,args).join(" "),getEscapedCommand=(file,args)=>normalizeArgs(file,args).map(arg=>escapeArg(arg)).join(" ");var verboseDefault=util.debuglog("execa").enabled,padField=(field,padding)=>String(field).padStart(padding,"0"),getTimestamp=()=>{let date=new Date;return `${padField(date.getHours(),2)}:${padField(date.getMinutes(),2)}:${padField(date.getSeconds(),2)}.${padField(date.getMilliseconds(),3)}`},logCommand=(escapedCommand,{verbose})=>{verbose&&process2__default.default.stderr.write(`[${getTimestamp()}] ${escapedCommand}
|
|
52
|
-
`);};var DEFAULT_MAX_BUFFER=1e3*1e3*100,getEnv=({env:envOption,extendEnv,preferLocal,localDir,execPath})=>{let env=extendEnv?{...process2__default.default.env,...envOption}:envOption;return preferLocal?npmRunPathEnv({env,cwd:localDir,execPath}):env},handleArguments=(file,args,options={})=>{let parsed=import_cross_spawn.default._parse(file,args,options);return file=parsed.command,args=parsed.args,options=parsed.options,options={maxBuffer:DEFAULT_MAX_BUFFER,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:options.cwd||process2__default.default.cwd(),execPath:process2__default.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:verboseDefault,...options},options.env=getEnv(options),options.stdio=normalizeStdio(options),process2__default.default.platform==="win32"&&path__default.default.basename(file,".exe")==="cmd"&&args.unshift("/q"),{file,args,options,parsed}},handleOutput=(options,value,error2)=>typeof value!="string"&&!buffer.Buffer.isBuffer(value)?error2===void 0?void 0:"":options.stripFinalNewline?stripFinalNewline(value):value;function execa(file,args,options){let parsed=handleArguments(file,args,options),command=joinCommand(file,args),escapedCommand=getEscapedCommand(file,args);logCommand(escapedCommand,parsed.options),validateTimeout(parsed.options);let spawned;try{spawned=childProcess__default.default.spawn(parsed.file,parsed.args,parsed.options);}catch(error2){let dummySpawned=new childProcess__default.default.ChildProcess,errorPromise=Promise.reject(makeError({error:error2,stdout:"",stderr:"",all:"",command,escapedCommand,parsed,timedOut:!1,isCanceled:!1,killed:!1}));return mergePromise(dummySpawned,errorPromise),dummySpawned}let spawnedPromise=getSpawnedPromise(spawned),timedPromise=setupTimeout(spawned,parsed.options,spawnedPromise),processDone=setExitHandler(spawned,parsed.options,timedPromise),context={isCanceled:!1};spawned.kill=spawnedKill.bind(null,spawned.kill.bind(spawned)),spawned.cancel=spawnedCancel.bind(null,spawned,context);let handlePromiseOnce=onetime_default(async()=>{let[{error:error2,exitCode,signal,timedOut},stdoutResult,stderrResult,allResult]=await getSpawnedResult(spawned,parsed.options,processDone),stdout=handleOutput(parsed.options,stdoutResult),stderr=handleOutput(parsed.options,stderrResult),all=handleOutput(parsed.options,allResult);if(error2||exitCode!==0||signal!==null){let returnedError=makeError({error:error2,exitCode,signal,stdout,stderr,all,command,escapedCommand,parsed,timedOut,isCanceled:(parsed.options.signal?parsed.options.signal.aborted:!1),killed:spawned.killed});if(!parsed.options.reject)return returnedError;throw returnedError}return {command,escapedCommand,exitCode:0,stdout,stderr,all,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return handleInput(spawned,parsed.options),spawned.all=makeAllStream(spawned,parsed.options),addPipeMethods(spawned),mergePromise(spawned,handlePromiseOnce),spawned}var Node=class{value;next;constructor(value){this.value=value;}},Queue=class{#head;#tail;#size;constructor(){this.clear();}enqueue(value){let node=new Node(value);this.#head?(this.#tail.next=node,this.#tail=node):(this.#head=node,this.#tail=node),this.#size++;}dequeue(){let current=this.#head;if(current)return this.#head=this.#head.next,this.#size--,current.value}peek(){if(this.#head)return this.#head.value}clear(){this.#head=void 0,this.#tail=void 0,this.#size=0;}get size(){return this.#size}*[Symbol.iterator](){let current=this.#head;for(;current;)yield current.value,current=current.next;}*drain(){for(;this.#head;)yield this.dequeue();}};function pLimit(concurrency){if(!((Number.isInteger(concurrency)||concurrency===Number.POSITIVE_INFINITY)&&concurrency>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let queue=new Queue,activeCount=0,next=()=>{activeCount--,queue.size>0&&queue.dequeue()();},run=async(fn,resolve2,args)=>{activeCount++;let result=(async()=>fn(...args))();resolve2(result);try{await result;}catch{}next();},enqueue=(fn,resolve2,args)=>{queue.enqueue(run.bind(void 0,fn,resolve2,args)),(async()=>(await Promise.resolve(),activeCount<concurrency&&queue.size>0&&queue.dequeue()()))();},generator=(fn,...args)=>new Promise(resolve2=>{enqueue(fn,resolve2,args);});return Object.defineProperties(generator,{activeCount:{get:()=>activeCount},pendingCount:{get:()=>queue.size},clearQueue:{value:()=>{queue.clear();}}}),generator}var EndError=class extends Error{constructor(value){super(),this.value=value;}},testElement=async(element,tester)=>tester(await element),finder=async element=>{let values=await Promise.all(element);if(values[1]===!0)throw new EndError(values[0]);return !1};async function pLocate(iterable,tester,{concurrency=Number.POSITIVE_INFINITY,preserveOrder=!0}={}){let limit=pLimit(concurrency),items=[...iterable].map(element=>[element,limit(testElement,element,tester)]),checkLimit=pLimit(preserveOrder?1:Number.POSITIVE_INFINITY);try{await Promise.all(items.map(element=>checkLimit(finder,element)));}catch(error2){if(error2 instanceof EndError)return error2.value;throw error2}}var typeMappings={directory:"isDirectory",file:"isFile"};function checkType(type){if(!Object.hasOwnProperty.call(typeMappings,type))throw new Error(`Invalid type specified: ${type}`)}var matchType=(type,stat)=>stat[typeMappings[type]](),toPath=urlOrPath=>urlOrPath instanceof URL?url.fileURLToPath(urlOrPath):urlOrPath;async function locatePath(paths,{cwd:cwd2=process2__default.default.cwd(),type="file",allowSymlinks=!0,concurrency,preserveOrder}={}){checkType(type),cwd2=toPath(cwd2);let statFunction=allowSymlinks?fs.promises.stat:fs.promises.lstat;return pLocate(paths,async path_=>{try{let stat=await statFunction(path__default.default.resolve(cwd2,path_));return matchType(type,stat)}catch{return !1}},{concurrency,preserveOrder})}function toPath2(urlOrPath){return urlOrPath instanceof URL?url.fileURLToPath(urlOrPath):urlOrPath}var findUpStop=Symbol("findUpStop");async function findUpMultiple(name,options={}){let directory=path__default.default.resolve(toPath2(options.cwd)??""),{root}=path__default.default.parse(directory),stopAt=path__default.default.resolve(directory,toPath2(options.stopAt??root)),limit=options.limit??Number.POSITIVE_INFINITY,paths=[name].flat(),runMatcher=async locateOptions=>{if(typeof name!="function")return locatePath(paths,locateOptions);let foundPath=await name(locateOptions.cwd);return typeof foundPath=="string"?locatePath([foundPath],locateOptions):foundPath},matches=[];for(;;){let foundPath=await runMatcher({...options,cwd:directory});if(foundPath===findUpStop||(foundPath&&matches.push(path__default.default.resolve(directory,foundPath)),directory===stopAt||matches.length>=limit))break;directory=path__default.default.dirname(directory);}return matches}async function findUp(name,options={}){return (await findUpMultiple(name,{...options,limit:1}))[0]}var _DRIVE_LETTER_START_RE=/^[A-Za-z]:\//;function normalizeWindowsPath(input=""){return input&&input.replace(/\\/g,"/").replace(_DRIVE_LETTER_START_RE,r=>r.toUpperCase())}var _UNC_REGEX=/^[/\\]{2}/,_IS_ABSOLUTE_RE=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,_DRIVE_LETTER_RE=/^[A-Za-z]:$/,_ROOT_FOLDER_RE=/^\/([A-Za-z]:)?$/;var normalize=function(path6){if(path6.length===0)return ".";path6=normalizeWindowsPath(path6);let isUNCPath=path6.match(_UNC_REGEX),isPathAbsolute=isAbsolute(path6),trailingSeparator=path6[path6.length-1]==="/";return path6=normalizeString(path6,!isPathAbsolute),path6.length===0?isPathAbsolute?"/":trailingSeparator?"./":".":(trailingSeparator&&(path6+="/"),_DRIVE_LETTER_RE.test(path6)&&(path6+="/"),isUNCPath?isPathAbsolute?`//${path6}`:`//./${path6}`:isPathAbsolute&&!isAbsolute(path6)?`/${path6}`:path6)},join=function(...arguments_){if(arguments_.length===0)return ".";let joined;for(let argument of arguments_)argument&&argument.length>0&&(joined===void 0?joined=argument:joined+=`/${argument}`);return joined===void 0?".":normalize(joined.replace(/\/\/+/g,"/"))};function cwd(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var resolve=function(...arguments_){arguments_=arguments_.map(argument=>normalizeWindowsPath(argument));let resolvedPath="",resolvedAbsolute=!1;for(let index=arguments_.length-1;index>=-1&&!resolvedAbsolute;index--){let path6=index>=0?arguments_[index]:cwd();!path6||path6.length===0||(resolvedPath=`${path6}/${resolvedPath}`,resolvedAbsolute=isAbsolute(path6));}return resolvedPath=normalizeString(resolvedPath,!resolvedAbsolute),resolvedAbsolute&&!isAbsolute(resolvedPath)?`/${resolvedPath}`:resolvedPath.length>0?resolvedPath:"."};function normalizeString(path6,allowAboveRoot){let res="",lastSegmentLength=0,lastSlash=-1,dots=0,char=null;for(let index=0;index<=path6.length;++index){if(index<path6.length)char=path6[index];else {if(char==="/")break;char="/";}if(char==="/"){if(!(lastSlash===index-1||dots===1))if(dots===2){if(res.length<2||lastSegmentLength!==2||res[res.length-1]!=="."||res[res.length-2]!=="."){if(res.length>2){let lastSlashIndex=res.lastIndexOf("/");lastSlashIndex===-1?(res="",lastSegmentLength=0):(res=res.slice(0,lastSlashIndex),lastSegmentLength=res.length-1-res.lastIndexOf("/")),lastSlash=index,dots=0;continue}else if(res.length>0){res="",lastSegmentLength=0,lastSlash=index,dots=0;continue}}allowAboveRoot&&(res+=res.length>0?"/..":"..",lastSegmentLength=2);}else res.length>0?res+=`/${path6.slice(lastSlash+1,index)}`:res=path6.slice(lastSlash+1,index),lastSegmentLength=index-lastSlash-1;lastSlash=index,dots=0;}else char==="."&&dots!==-1?++dots:dots=-1;}return res}var isAbsolute=function(p){return _IS_ABSOLUTE_RE.test(p)};var relative=function(from,to){let _from=resolve(from).replace(_ROOT_FOLDER_RE,"$1").split("/"),_to=resolve(to).replace(_ROOT_FOLDER_RE,"$1").split("/");if(_to[0][1]===":"&&_from[0][1]===":"&&_from[0]!==_to[0])return _to.join("/");let _fromCopy=[..._from];for(let segment of _fromCopy){if(_to[0]!==segment)break;_from.shift(),_to.shift();}return [..._from.map(()=>".."),..._to].join("/")},dirname=function(p){let segments=normalizeWindowsPath(p).replace(/\/$/,"").split("/").slice(0,-1);return segments.length===1&&_DRIVE_LETTER_RE.test(segments[0])&&(segments[0]+="/"),segments.join("/")||(isAbsolute(p)?"/":".")};var import_semver=__toESM(require_semver2());var DOCUMENTATION_LINK2="writing-tests/integrations/vitest-addon";var SUPPORTED_FRAMEWORKS=["@storybook/nextjs","@storybook/nextjs-vite","@storybook/react-vite","@storybook/svelte-vite","@storybook/vue3-vite","@storybook/html-vite","@storybook/web-components-vite","@storybook/sveltekit","@storybook/react-native-web-vite"];var fancy=process.platform!=="win32"||process.env.CI||process.env.TERM==="xterm-256color",step=nodeLogger.colors.gray("\u203A");nodeLogger.colors.blue(fancy?"\u2139":"i");nodeLogger.colors.green(fancy?"\u2714":"\u221A");nodeLogger.colors.orange(fancy?"\u26A0":"\u203C");nodeLogger.colors.red(fancy?"\u2716":"\xD7");var baseOptions={borderStyle:"round",padding:1},print=(message,options)=>{nodeLogger.logger.line(1),nodeLogger.logger.logBox(message,{...baseOptions,...options});},printInfo=(title,message,options)=>print(message,{borderColor:"blue",title,...options}),printWarning=(title,message,options)=>print(message,{borderColor:"yellow",title,...options}),printError=(title,message,options)=>print(message,{borderColor:"red",title,...options}),printSuccess=(title,message,options)=>print(message,{borderColor:"green",title,...options});var loadTemplate=async(name,replacements)=>{let template=await fs4__namespace.readFile(join(dirname(__require.resolve("@storybook/addon-vitest/package.json")),"templates",name),"utf8");return Object.entries(replacements).forEach(([key,value])=>template=template.replace(key,value)),template},mergeProperties=(source,target)=>{for(let sourceProp of source)if(sourceProp.type==="ObjectProperty"){let targetProp=target.find(p=>sourceProp.key.type==="Identifier"&&p.type==="ObjectProperty"&&p.key.type==="Identifier"&&p.key.name===sourceProp.key.name);targetProp&&targetProp.type==="ObjectProperty"?sourceProp.value.type==="ObjectExpression"&&targetProp.value.type==="ObjectExpression"?mergeProperties(sourceProp.value.properties,targetProp.value.properties):sourceProp.value.type==="ArrayExpression"&&targetProp.value.type==="ArrayExpression"?targetProp.value.elements.push(...sourceProp.value.elements):targetProp.value=sourceProp.value:target.push(sourceProp);}},updateConfigFile=(source,target)=>{let updated=!1;for(let sourceNode of source.program.body)if(sourceNode.type==="ImportDeclaration"){if(!target.program.body.some(targetNode=>targetNode.type===sourceNode.type&&targetNode.specifiers.some(s=>s.local.name===sourceNode.specifiers[0].local.name))){let lastImport=target.program.body.findLastIndex(n=>n.type==="ImportDeclaration");target.program.body.splice(lastImport+1,0,sourceNode);}}else if(sourceNode.type==="VariableDeclaration"){if(!target.program.body.some(targetNode=>targetNode.type===sourceNode.type&&targetNode.declarations.some(d=>"name"in d.id&&"name"in sourceNode.declarations[0].id&&d.id.name===sourceNode.declarations[0].id.name))){let lastImport=target.program.body.findLastIndex(n=>n.type==="ImportDeclaration");target.program.body.splice(lastImport+1,0,sourceNode);}}else if(sourceNode.type==="ExportDefaultDeclaration"){let exportDefault=target.program.body.find(n=>n.type==="ExportDefaultDeclaration");if(exportDefault&&sourceNode.declaration.type==="CallExpression"&&sourceNode.declaration.arguments.length>0&&sourceNode.declaration.arguments[0].type==="ObjectExpression"){let{properties}=sourceNode.declaration.arguments[0];exportDefault.declaration.type==="ObjectExpression"?(mergeProperties(properties,exportDefault.declaration.properties),updated=!0):exportDefault.declaration.type==="CallExpression"&&exportDefault.declaration.callee.type==="Identifier"&&exportDefault.declaration.callee.name==="defineConfig"&&exportDefault.declaration.arguments[0]?.type==="ObjectExpression"&&(mergeProperties(properties,exportDefault.declaration.arguments[0].properties),updated=!0);}}return updated},updateWorkspaceFile=(source,target)=>{let updated=!1;for(let sourceNode of source.program.body)if(sourceNode.type==="ImportDeclaration"){if(!target.program.body.some(targetNode=>targetNode.type===sourceNode.type&&targetNode.source.value===sourceNode.source.value&&targetNode.specifiers.some(s=>s.local.name===sourceNode.specifiers[0].local.name))){let lastImport=target.program.body.findLastIndex(n=>n.type==="ImportDeclaration");target.program.body.splice(lastImport+1,0,sourceNode);}}else if(sourceNode.type==="VariableDeclaration"){if(!target.program.body.some(targetNode=>targetNode.type===sourceNode.type&&targetNode.declarations.some(d=>"name"in d.id&&"name"in sourceNode.declarations[0].id&&d.id.name===sourceNode.declarations[0].id.name))){let lastImport=target.program.body.findLastIndex(n=>n.type==="ImportDeclaration");target.program.body.splice(lastImport+1,0,sourceNode);}}else if(sourceNode.type==="ExportDefaultDeclaration"){let exportDefault=target.program.body.find(n=>n.type==="ExportDefaultDeclaration");if(exportDefault&&sourceNode.declaration.type==="CallExpression"&&sourceNode.declaration.arguments.length>0&&sourceNode.declaration.arguments[0].type==="ArrayExpression"&&sourceNode.declaration.arguments[0].elements.length>0){let{elements}=sourceNode.declaration.arguments[0];exportDefault.declaration.type==="ArrayExpression"?(exportDefault.declaration.elements.push(...elements),updated=!0):exportDefault.declaration.type==="CallExpression"&&exportDefault.declaration.callee.type==="Identifier"&&exportDefault.declaration.callee.name==="defineWorkspace"&&exportDefault.declaration.arguments[0]?.type==="ArrayExpression"&&(exportDefault.declaration.arguments[0].elements.push(...elements),updated=!0);}}return updated};function getAddonNames(mainConfig){return (mainConfig.addons||[]).map(addon=>{let name="";return typeof addon=="string"?name=addon:typeof addon=="object"&&(name=addon.name),name}).filter(item=>item!=null)}var ADDON_NAME="@storybook/addon-vitest",EXTENSIONS=[".ts",".tsx",".js",".jsx",".cts",".mts",".cjs",".mjs"],addonA11yName="@storybook/addon-a11y",hasErrors=!1,logErrors=(...args)=>{hasErrors=!0,printError(...args);},findFile=async(basename2,extensions=EXTENSIONS)=>findUp(extensions.map(ext=>basename2+ext),{stopAt:common.getProjectRoot()});async function postInstall(options){printSuccess("\u{1F44B} Howdy!",tsDedent.dedent`
|
|
53
|
-
|
|
510
|
+
// ../../node_modules/semver/ranges/to-comparators.js
|
|
511
|
+
var Xt = h((Oi, Jt) => {
|
|
512
|
+
"use strict";
|
|
513
|
+
var ro = j(), so = /* @__PURE__ */ i((r, e) => new ro(r, e).set.map((t) => t.map((s) => s.value).join(" ").trim().split(" ")), "toComparators");
|
|
514
|
+
Jt.exports = so;
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
// ../../node_modules/semver/ranges/max-satisfying.js
|
|
518
|
+
var zt = h((Ii, Kt) => {
|
|
519
|
+
"use strict";
|
|
520
|
+
var oo = b(), no = j(), io = /* @__PURE__ */ i((r, e, t) => {
|
|
521
|
+
let s = null, o = null, n = null;
|
|
522
|
+
try {
|
|
523
|
+
n = new no(e, t);
|
|
524
|
+
} catch {
|
|
525
|
+
return null;
|
|
526
|
+
}
|
|
527
|
+
return r.forEach((a) => {
|
|
528
|
+
n.test(a) && (!s || o.compare(a) === -1) && (s = a, o = new oo(s, t));
|
|
529
|
+
}), s;
|
|
530
|
+
}, "maxSatisfying");
|
|
531
|
+
Kt.exports = io;
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
// ../../node_modules/semver/ranges/min-satisfying.js
|
|
535
|
+
var Zt = h((Vi, Qt) => {
|
|
536
|
+
"use strict";
|
|
537
|
+
var ao = b(), lo = j(), co = /* @__PURE__ */ i((r, e, t) => {
|
|
538
|
+
let s = null, o = null, n = null;
|
|
539
|
+
try {
|
|
540
|
+
n = new lo(e, t);
|
|
541
|
+
} catch {
|
|
542
|
+
return null;
|
|
543
|
+
}
|
|
544
|
+
return r.forEach((a) => {
|
|
545
|
+
n.test(a) && (!s || o.compare(a) === 1) && (s = a, o = new ao(s, t));
|
|
546
|
+
}), s;
|
|
547
|
+
}, "minSatisfying");
|
|
548
|
+
Qt.exports = co;
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
// ../../node_modules/semver/ranges/min-version.js
|
|
552
|
+
var tr = h((Ai, er) => {
|
|
553
|
+
"use strict";
|
|
554
|
+
var Pe = b(), uo = j(), Mt = G(), po = /* @__PURE__ */ i((r, e) => {
|
|
555
|
+
r = new uo(r, e);
|
|
556
|
+
let t = new Pe("0.0.0");
|
|
557
|
+
if (r.test(t) || (t = new Pe("0.0.0-0"), r.test(t)))
|
|
558
|
+
return t;
|
|
559
|
+
t = null;
|
|
560
|
+
for (let s = 0; s < r.set.length; ++s) {
|
|
561
|
+
let o = r.set[s], n = null;
|
|
562
|
+
o.forEach((a) => {
|
|
563
|
+
let l = new Pe(a.semver.version);
|
|
564
|
+
switch (a.operator) {
|
|
565
|
+
case ">":
|
|
566
|
+
l.prerelease.length === 0 ? l.patch++ : l.prerelease.push(0), l.raw = l.format();
|
|
567
|
+
/* fallthrough */
|
|
568
|
+
case "":
|
|
569
|
+
case ">=":
|
|
570
|
+
(!n || Mt(l, n)) && (n = l);
|
|
571
|
+
break;
|
|
572
|
+
case "<":
|
|
573
|
+
case "<=":
|
|
574
|
+
break;
|
|
575
|
+
/* istanbul ignore next */
|
|
576
|
+
default:
|
|
577
|
+
throw new Error(`Unexpected operation: ${a.operator}`);
|
|
578
|
+
}
|
|
579
|
+
}), n && (!t || Mt(t, n)) && (t = n);
|
|
580
|
+
}
|
|
581
|
+
return t && r.test(t) ? t : null;
|
|
582
|
+
}, "minVersion");
|
|
583
|
+
er.exports = po;
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
// ../../node_modules/semver/ranges/valid.js
|
|
587
|
+
var sr = h((Fi, rr) => {
|
|
588
|
+
"use strict";
|
|
589
|
+
var fo = j(), mo = /* @__PURE__ */ i((r, e) => {
|
|
590
|
+
try {
|
|
591
|
+
return new fo(r, e).range || "*";
|
|
592
|
+
} catch {
|
|
593
|
+
return null;
|
|
594
|
+
}
|
|
595
|
+
}, "validRange");
|
|
596
|
+
rr.exports = mo;
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
// ../../node_modules/semver/ranges/outside.js
|
|
600
|
+
var ce = h((Wi, ar) => {
|
|
601
|
+
"use strict";
|
|
602
|
+
var ho = b(), ir = Y(), { ANY: go } = ir, yo = j(), wo = H(), or = G(), nr = ne(), vo = ie(), xo = we(), $o = /* @__PURE__ */ i((r, e, t, s) => {
|
|
603
|
+
r = new ho(r, s), e = new yo(e, s);
|
|
604
|
+
let o, n, a, l, c;
|
|
605
|
+
switch (t) {
|
|
606
|
+
case ">":
|
|
607
|
+
o = or, n = vo, a = nr, l = ">", c = ">=";
|
|
608
|
+
break;
|
|
609
|
+
case "<":
|
|
610
|
+
o = nr, n = xo, a = or, l = "<", c = "<=";
|
|
611
|
+
break;
|
|
612
|
+
default:
|
|
613
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
614
|
+
}
|
|
615
|
+
if (wo(r, e, s))
|
|
616
|
+
return !1;
|
|
617
|
+
for (let m = 0; m < e.set.length; ++m) {
|
|
618
|
+
let d = e.set[m], u = null, g = null;
|
|
619
|
+
if (d.forEach((p) => {
|
|
620
|
+
p.semver === go && (p = new ir(">=0.0.0")), u = u || p, g = g || p, o(p.semver, u.semver, s) ? u = p : a(p.semver, g.semver, s) && (g = p);
|
|
621
|
+
}), u.operator === l || u.operator === c || (!g.operator || g.operator === l) && n(r, g.semver))
|
|
622
|
+
return !1;
|
|
623
|
+
if (g.operator === c && a(r, g.semver))
|
|
624
|
+
return !1;
|
|
625
|
+
}
|
|
626
|
+
return !0;
|
|
627
|
+
}, "outside");
|
|
628
|
+
ar.exports = $o;
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
// ../../node_modules/semver/ranges/gtr.js
|
|
632
|
+
var cr = h((Gi, lr) => {
|
|
633
|
+
"use strict";
|
|
634
|
+
var ko = ce(), bo = /* @__PURE__ */ i((r, e, t) => ko(r, e, ">", t), "gtr");
|
|
635
|
+
lr.exports = bo;
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
// ../../node_modules/semver/ranges/ltr.js
|
|
639
|
+
var pr = h((Bi, ur) => {
|
|
640
|
+
"use strict";
|
|
641
|
+
var qo = ce(), Eo = /* @__PURE__ */ i((r, e, t) => qo(r, e, "<", t), "ltr");
|
|
642
|
+
ur.exports = Eo;
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
// ../../node_modules/semver/ranges/intersects.js
|
|
646
|
+
var dr = h((Ui, mr) => {
|
|
647
|
+
"use strict";
|
|
648
|
+
var fr = j(), jo = /* @__PURE__ */ i((r, e, t) => (r = new fr(r, t), e = new fr(e, t), r.intersects(e, t)), "intersects");
|
|
649
|
+
mr.exports = jo;
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
// ../../node_modules/semver/ranges/simplify.js
|
|
653
|
+
var gr = h((Xi, hr) => {
|
|
654
|
+
"use strict";
|
|
655
|
+
var So = H(), Po = S();
|
|
656
|
+
hr.exports = (r, e, t) => {
|
|
657
|
+
let s = [], o = null, n = null, a = r.sort((d, u) => Po(d, u, t));
|
|
658
|
+
for (let d of a)
|
|
659
|
+
So(d, e, t) ? (n = d, o || (o = d)) : (n && s.push([o, n]), n = null, o = null);
|
|
660
|
+
o && s.push([o, null]);
|
|
661
|
+
let l = [];
|
|
662
|
+
for (let [d, u] of s)
|
|
663
|
+
d === u ? l.push(d) : !u && d === a[0] ? l.push("*") : u ? d === a[0] ? l.push(`<=${u}`) : l.push(`${d} - ${u}`) : l.push(`>=${d}`);
|
|
664
|
+
let c = l.join(" || "), m = typeof e.raw == "string" ? e.raw : String(e);
|
|
665
|
+
return c.length < m.length ? c : e;
|
|
666
|
+
};
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
// ../../node_modules/semver/ranges/subset.js
|
|
670
|
+
var kr = h((Ki, $r) => {
|
|
671
|
+
"use strict";
|
|
672
|
+
var yr = j(), Oe = Y(), { ANY: Re } = Oe, U = H(), Ce = S(), Ro = /* @__PURE__ */ i((r, e, t = {}) => {
|
|
673
|
+
if (r === e)
|
|
674
|
+
return !0;
|
|
675
|
+
r = new yr(r, t), e = new yr(e, t);
|
|
676
|
+
let s = !1;
|
|
677
|
+
e: for (let o of r.set) {
|
|
678
|
+
for (let n of e.set) {
|
|
679
|
+
let a = Co(o, n, t);
|
|
680
|
+
if (s = s || a !== null, a)
|
|
681
|
+
continue e;
|
|
682
|
+
}
|
|
683
|
+
if (s)
|
|
684
|
+
return !1;
|
|
685
|
+
}
|
|
686
|
+
return !0;
|
|
687
|
+
}, "subset"), Oo = [new Oe(">=0.0.0-0")], wr = [new Oe(">=0.0.0")], Co = /* @__PURE__ */ i((r, e, t) => {
|
|
688
|
+
if (r === e)
|
|
689
|
+
return !0;
|
|
690
|
+
if (r.length === 1 && r[0].semver === Re) {
|
|
691
|
+
if (e.length === 1 && e[0].semver === Re)
|
|
692
|
+
return !0;
|
|
693
|
+
t.includePrerelease ? r = Oo : r = wr;
|
|
694
|
+
}
|
|
695
|
+
if (e.length === 1 && e[0].semver === Re) {
|
|
696
|
+
if (t.includePrerelease)
|
|
697
|
+
return !0;
|
|
698
|
+
e = wr;
|
|
699
|
+
}
|
|
700
|
+
let s = /* @__PURE__ */ new Set(), o, n;
|
|
701
|
+
for (let p of r)
|
|
702
|
+
p.operator === ">" || p.operator === ">=" ? o = vr(o, p, t) : p.operator === "<" || p.operator === "<=" ? n = xr(n, p, t) : s.add(p.semver);
|
|
703
|
+
if (s.size > 1)
|
|
704
|
+
return null;
|
|
705
|
+
let a;
|
|
706
|
+
if (o && n) {
|
|
707
|
+
if (a = Ce(o.semver, n.semver, t), a > 0)
|
|
708
|
+
return null;
|
|
709
|
+
if (a === 0 && (o.operator !== ">=" || n.operator !== "<="))
|
|
710
|
+
return null;
|
|
711
|
+
}
|
|
712
|
+
for (let p of s) {
|
|
713
|
+
if (o && !U(p, String(o), t) || n && !U(p, String(n), t))
|
|
714
|
+
return null;
|
|
715
|
+
for (let Q of e)
|
|
716
|
+
if (!U(p, String(Q), t))
|
|
717
|
+
return !1;
|
|
718
|
+
return !0;
|
|
719
|
+
}
|
|
720
|
+
let l, c, m, d, u = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1, g = o && !t.includePrerelease && o.semver.prerelease.length ? o.semver : !1;
|
|
721
|
+
u && u.prerelease.length === 1 && n.operator === "<" && u.prerelease[0] === 0 && (u = !1);
|
|
722
|
+
for (let p of e) {
|
|
723
|
+
if (d = d || p.operator === ">" || p.operator === ">=", m = m || p.operator === "<" || p.operator === "<=", o) {
|
|
724
|
+
if (g && p.semver.prerelease && p.semver.prerelease.length && p.semver.major === g.major && p.semver.minor === g.minor && p.semver.patch === g.patch && (g = !1), p.operator === ">" || p.operator === ">=") {
|
|
725
|
+
if (l = vr(o, p, t), l === p && l !== o)
|
|
726
|
+
return !1;
|
|
727
|
+
} else if (o.operator === ">=" && !U(o.semver, String(p), t))
|
|
728
|
+
return !1;
|
|
729
|
+
}
|
|
730
|
+
if (n) {
|
|
731
|
+
if (u && p.semver.prerelease && p.semver.prerelease.length && p.semver.major === u.major && p.semver.minor === u.minor && p.semver.patch === u.patch && (u = !1), p.operator === "<" || p.operator === "<=") {
|
|
732
|
+
if (c = xr(n, p, t), c === p && c !== n)
|
|
733
|
+
return !1;
|
|
734
|
+
} else if (n.operator === "<=" && !U(n.semver, String(p), t))
|
|
735
|
+
return !1;
|
|
736
|
+
}
|
|
737
|
+
if (!p.operator && (n || o) && a !== 0)
|
|
738
|
+
return !1;
|
|
739
|
+
}
|
|
740
|
+
return !(o && m && !n && a !== 0 || n && d && !o && a !== 0 || g || u);
|
|
741
|
+
}, "simpleSubset"), vr = /* @__PURE__ */ i((r, e, t) => {
|
|
742
|
+
if (!r)
|
|
743
|
+
return e;
|
|
744
|
+
let s = Ce(r.semver, e.semver, t);
|
|
745
|
+
return s > 0 ? r : s < 0 || e.operator === ">" && r.operator === ">=" ? e : r;
|
|
746
|
+
}, "higherGT"), xr = /* @__PURE__ */ i((r, e, t) => {
|
|
747
|
+
if (!r)
|
|
748
|
+
return e;
|
|
749
|
+
let s = Ce(r.semver, e.semver, t);
|
|
750
|
+
return s < 0 ? r : s > 0 || e.operator === "<" && r.operator === "<=" ? e : r;
|
|
751
|
+
}, "lowerLT");
|
|
752
|
+
$r.exports = Ro;
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
// ../../node_modules/semver/index.js
|
|
756
|
+
var jr = h((Qi, Er) => {
|
|
757
|
+
"use strict";
|
|
758
|
+
var Ie = se(), br = Je(), Io = b(), qr = Gr(), To = V(), Vo = Me(), No = tt(), Ao = ot(), Do = at(), Fo = ct(), Lo = pt(), Wo = mt(), _o = ht(), Go = S(), Yo = yt(), Bo = vt(), Ho = oe(), Uo = bt(), Jo = Et(), Xo = G(), Ko = ne(), zo = ve(), Qo = xe(), Zo = we(), Mo = ie(), en = $e(), tn = Tt(), rn = Y(), sn = j(), on = H(), nn = Xt(), an = zt(), ln = Zt(), cn = tr(), un = sr(), pn = ce(), fn = cr(), mn = pr(), dn = dr(), hn = gr(), gn = kr();
|
|
759
|
+
Er.exports = {
|
|
760
|
+
parse: To,
|
|
761
|
+
valid: Vo,
|
|
762
|
+
clean: No,
|
|
763
|
+
inc: Ao,
|
|
764
|
+
diff: Do,
|
|
765
|
+
major: Fo,
|
|
766
|
+
minor: Lo,
|
|
767
|
+
patch: Wo,
|
|
768
|
+
prerelease: _o,
|
|
769
|
+
compare: Go,
|
|
770
|
+
rcompare: Yo,
|
|
771
|
+
compareLoose: Bo,
|
|
772
|
+
compareBuild: Ho,
|
|
773
|
+
sort: Uo,
|
|
774
|
+
rsort: Jo,
|
|
775
|
+
gt: Xo,
|
|
776
|
+
lt: Ko,
|
|
777
|
+
eq: zo,
|
|
778
|
+
neq: Qo,
|
|
779
|
+
gte: Zo,
|
|
780
|
+
lte: Mo,
|
|
781
|
+
cmp: en,
|
|
782
|
+
coerce: tn,
|
|
783
|
+
Comparator: rn,
|
|
784
|
+
Range: sn,
|
|
785
|
+
satisfies: on,
|
|
786
|
+
toComparators: nn,
|
|
787
|
+
maxSatisfying: an,
|
|
788
|
+
minSatisfying: ln,
|
|
789
|
+
minVersion: cn,
|
|
790
|
+
validRange: un,
|
|
791
|
+
outside: pn,
|
|
792
|
+
gtr: fn,
|
|
793
|
+
ltr: mn,
|
|
794
|
+
intersects: dn,
|
|
795
|
+
simplifyRange: hn,
|
|
796
|
+
subset: gn,
|
|
797
|
+
SemVer: Io,
|
|
798
|
+
re: Ie.re,
|
|
799
|
+
src: Ie.src,
|
|
800
|
+
tokens: Ie.t,
|
|
801
|
+
SEMVER_SPEC_VERSION: br.SEMVER_SPEC_VERSION,
|
|
802
|
+
RELEASE_TYPES: br.RELEASE_TYPES,
|
|
803
|
+
compareIdentifiers: qr.compareIdentifiers,
|
|
804
|
+
rcompareIdentifiers: qr.rcompareIdentifiers
|
|
805
|
+
};
|
|
806
|
+
});
|
|
807
|
+
|
|
808
|
+
// src/postinstall.ts
|
|
809
|
+
import { existsSync as Tr } from "node:fs";
|
|
810
|
+
import * as z from "node:fs/promises";
|
|
811
|
+
import { writeFile as X } from "node:fs/promises";
|
|
812
|
+
import { babelParse as me, generate as Vr, traverse as wn } from "storybook/internal/babel";
|
|
813
|
+
import {
|
|
814
|
+
JsPackageManagerFactory as Ar,
|
|
815
|
+
extractProperFrameworkName as vn,
|
|
816
|
+
formatFileContent as Ae,
|
|
817
|
+
getInterpretedFile as xn,
|
|
818
|
+
getProjectRoot as $n,
|
|
819
|
+
loadMainConfig as kn,
|
|
820
|
+
scanAndTransformFiles as bn,
|
|
821
|
+
transformImportFiles as qn,
|
|
822
|
+
validateFrameworkName as En
|
|
823
|
+
} from "storybook/internal/common";
|
|
824
|
+
import { experimental_loadStorybook as jn } from "storybook/internal/core-server";
|
|
825
|
+
import { readConfig as Sn, writeConfig as Pn } from "storybook/internal/csf-tools";
|
|
826
|
+
import { logger as w } from "storybook/internal/node-logger";
|
|
827
|
+
var N = _r(jr(), 1);
|
|
828
|
+
import Rn from "prompts";
|
|
829
|
+
import { dedent as v } from "ts-dedent";
|
|
830
|
+
|
|
831
|
+
// src/postinstall-logger.ts
|
|
832
|
+
import { colors as J, logger as Sr } from "storybook/internal/node-logger";
|
|
833
|
+
var ue = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color", C = J.gray("\u203A"), Mi = J.blue(ue ? "\u2139" : "i"), ea = J.green(ue ? "\u2714" : "\u221A"), ta = J.orange(ue ? "\u26A0" : "\u203C"), ra = J.red(ue ? "\u2716" : "\xD7"), yn = {
|
|
834
|
+
borderStyle: "round",
|
|
835
|
+
padding: 1
|
|
836
|
+
}, pe = /* @__PURE__ */ i((r, e) => {
|
|
837
|
+
Sr.line(1), Sr.logBox(r, { ...yn, ...e });
|
|
838
|
+
}, "print"), Te = /* @__PURE__ */ i((r, e, t) => pe(e, { borderColor: "blue", title: r, ...t }), "printInfo"), Pr = /* @__PURE__ */ i((r, e, t) => pe(e, { borderColor: "yellow", title: r, ...t }), "printWarning"), Rr = /* @__PURE__ */ i((r, e, t) => pe(e, { borderColor: "red", title: r, ...t }), "printError"), Ve = /* @__PURE__ */ i((r, e, t) => pe(e, { borderColor: "green", title: r, ...t }), "printSuccess");
|
|
839
|
+
|
|
840
|
+
// src/updateVitestFile.ts
|
|
841
|
+
import * as Or from "node:fs/promises";
|
|
842
|
+
var fe = /* @__PURE__ */ i(async (r, e) => {
|
|
843
|
+
let t = await Or.readFile(
|
|
844
|
+
Be(He("@storybook/addon-vitest"), "templates", r),
|
|
845
|
+
"utf8"
|
|
846
|
+
);
|
|
847
|
+
return Object.entries(e).forEach(([s, o]) => t = t.replace(s, o)), t;
|
|
848
|
+
}, "loadTemplate"), Ne = /* @__PURE__ */ i((r, e) => {
|
|
849
|
+
for (let t of r)
|
|
850
|
+
if (t.type === "ObjectProperty") {
|
|
851
|
+
let s = e.find(
|
|
852
|
+
(o) => t.key.type === "Identifier" && o.type === "ObjectProperty" && o.key.type === "Identifier" && o.key.name === t.key.name
|
|
853
|
+
);
|
|
854
|
+
s && s.type === "ObjectProperty" ? t.value.type === "ObjectExpression" && s.value.type === "ObjectExpression" ? Ne(t.value.properties, s.value.properties) : t.value.type === "ArrayExpression" && s.value.type === "ArrayExpression" ? s.value.elements.push(...t.value.elements) : s.value = t.value : e.push(t);
|
|
855
|
+
}
|
|
856
|
+
}, "mergeProperties"), Cr = /* @__PURE__ */ i((r, e) => {
|
|
857
|
+
let t = !1;
|
|
858
|
+
for (let s of r.program.body)
|
|
859
|
+
if (s.type === "ImportDeclaration") {
|
|
860
|
+
if (!e.program.body.some(
|
|
861
|
+
(o) => o.type === s.type && o.specifiers.some((n) => n.local.name === s.specifiers[0].local.name)
|
|
862
|
+
)) {
|
|
863
|
+
let o = e.program.body.findLastIndex((n) => n.type === "ImportDeclaration");
|
|
864
|
+
e.program.body.splice(o + 1, 0, s);
|
|
865
|
+
}
|
|
866
|
+
} else if (s.type === "VariableDeclaration") {
|
|
867
|
+
if (!e.program.body.some(
|
|
868
|
+
(o) => o.type === s.type && o.declarations.some(
|
|
869
|
+
(n) => "name" in n.id && "name" in s.declarations[0].id && n.id.name === s.declarations[0].id.name
|
|
870
|
+
)
|
|
871
|
+
)) {
|
|
872
|
+
let o = e.program.body.findLastIndex((n) => n.type === "ImportDeclaration");
|
|
873
|
+
e.program.body.splice(o + 1, 0, s);
|
|
874
|
+
}
|
|
875
|
+
} else if (s.type === "ExportDefaultDeclaration") {
|
|
876
|
+
let o = e.program.body.find((n) => n.type === "ExportDefaultDeclaration");
|
|
877
|
+
if (o && s.declaration.type === "CallExpression" && s.declaration.arguments.length > 0 && s.declaration.arguments[0].type === "ObjectExpression") {
|
|
878
|
+
let { properties: n } = s.declaration.arguments[0];
|
|
879
|
+
o.declaration.type === "ObjectExpression" ? (Ne(n, o.declaration.properties), t = !0) : o.declaration.type === "CallExpression" && o.declaration.callee.type === "Identifier" && o.declaration.callee.name === "defineConfig" && o.declaration.arguments[0]?.type === "ObjectExpression" && (Ne(n, o.declaration.arguments[0].properties), t = !0);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return t;
|
|
883
|
+
}, "updateConfigFile"), Ir = /* @__PURE__ */ i((r, e) => {
|
|
884
|
+
let t = !1;
|
|
885
|
+
for (let s of r.program.body)
|
|
886
|
+
if (s.type === "ImportDeclaration") {
|
|
887
|
+
if (!e.program.body.some(
|
|
888
|
+
(o) => o.type === s.type && o.source.value === s.source.value && o.specifiers.some((n) => n.local.name === s.specifiers[0].local.name)
|
|
889
|
+
)) {
|
|
890
|
+
let o = e.program.body.findLastIndex((n) => n.type === "ImportDeclaration");
|
|
891
|
+
e.program.body.splice(o + 1, 0, s);
|
|
892
|
+
}
|
|
893
|
+
} else if (s.type === "VariableDeclaration") {
|
|
894
|
+
if (!e.program.body.some(
|
|
895
|
+
(o) => o.type === s.type && o.declarations.some(
|
|
896
|
+
(n) => "name" in n.id && "name" in s.declarations[0].id && n.id.name === s.declarations[0].id.name
|
|
897
|
+
)
|
|
898
|
+
)) {
|
|
899
|
+
let o = e.program.body.findLastIndex((n) => n.type === "ImportDeclaration");
|
|
900
|
+
e.program.body.splice(o + 1, 0, s);
|
|
901
|
+
}
|
|
902
|
+
} else if (s.type === "ExportDefaultDeclaration") {
|
|
903
|
+
let o = e.program.body.find((n) => n.type === "ExportDefaultDeclaration");
|
|
904
|
+
if (o && s.declaration.type === "CallExpression" && s.declaration.arguments.length > 0 && s.declaration.arguments[0].type === "ArrayExpression" && s.declaration.arguments[0].elements.length > 0) {
|
|
905
|
+
let { elements: n } = s.declaration.arguments[0];
|
|
906
|
+
o.declaration.type === "ArrayExpression" ? (o.declaration.elements.push(...n), t = !0) : o.declaration.type === "CallExpression" && o.declaration.callee.type === "Identifier" && o.declaration.callee.name === "defineWorkspace" && o.declaration.arguments[0]?.type === "ArrayExpression" && (o.declaration.arguments[0].elements.push(...n), t = !0);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
return t;
|
|
910
|
+
}, "updateWorkspaceFile");
|
|
911
|
+
|
|
912
|
+
// src/postinstall.ts
|
|
913
|
+
var Nr = "@storybook/addon-vitest", Fe = [".ts", ".tsx", ".js", ".jsx", ".cts", ".mts", ".cjs", ".mjs"], De = "@storybook/addon-a11y", Dr = !1, K = /* @__PURE__ */ i((...r) => {
|
|
914
|
+
Dr = !0, Rr(...r);
|
|
915
|
+
}, "logErrors"), D = /* @__PURE__ */ i(async (r, e = Fe) => re(
|
|
916
|
+
e.map((t) => r + t),
|
|
917
|
+
{ stopAt: $n() }
|
|
918
|
+
), "findFile");
|
|
919
|
+
async function On(r) {
|
|
920
|
+
Ve(
|
|
921
|
+
"\u{1F44B} Howdy!",
|
|
922
|
+
v`
|
|
923
|
+
I'm the installation helper for ${Nr}
|
|
54
924
|
|
|
55
925
|
Hold on for a moment while I look at your project and get it set up...
|
|
56
|
-
`
|
|
926
|
+
`
|
|
927
|
+
);
|
|
928
|
+
let e = Ar.getPackageManager({
|
|
929
|
+
force: r.packageManager
|
|
930
|
+
}), t = await Cn(r), s = e.getAllDependencies(), o = ["vitest", "@vitest/browser", "playwright"].filter((f) => !s[f]), n = await e.getInstalledVersion("vitest"), a = n ? (0, N.coerce)(n) : null, l = n ? (0, N.satisfies)(n, ">=3.2.0") : !0, c = xn(L(r.configDir, "main")), m = await Sn(c), d = !!m.getFieldNode(["webpackFinal"]), u = process.stdout.isTTY && !process.env.CI;
|
|
931
|
+
t.frameworkPackageName === "@storybook/nextjs" && !d && (r.yes || !u ? { migrateToNextjsVite: !!r.yes } : await Rn({
|
|
932
|
+
type: "confirm",
|
|
933
|
+
name: "migrateToNextjsVite",
|
|
934
|
+
message: v`
|
|
57
935
|
The addon requires the use of @storybook/nextjs-vite to work with Next.js.
|
|
58
|
-
https://storybook.js.org/docs/next/${
|
|
936
|
+
https://storybook.js.org/docs/next/${O}#install-and-set-up
|
|
59
937
|
|
|
60
938
|
Do you want to migrate?
|
|
61
|
-
`,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
939
|
+
`,
|
|
940
|
+
initial: !0
|
|
941
|
+
})).migrateToNextjsVite && (await e.addDependencies({ type: "devDependencies", skipInstall: !0 }, [
|
|
942
|
+
"@storybook/nextjs-vite"
|
|
943
|
+
]), await e.removeDependencies(["@storybook/nextjs"]), wn(m._ast, {
|
|
944
|
+
StringLiteral(k) {
|
|
945
|
+
k.node.value === "@storybook/nextjs" && (k.node.value = "@storybook/nextjs-vite");
|
|
946
|
+
}
|
|
947
|
+
}), await Pn(m, c), t.frameworkPackageName = "@storybook/nextjs-vite", t.builderPackageName = "@storybook/builder-vite", await bn({
|
|
948
|
+
promptMessage: "Enter a glob to scan for all @storybook/nextjs imports to substitute with @storybook/nextjs-vite:",
|
|
949
|
+
force: r.yes,
|
|
950
|
+
dryRun: !1,
|
|
951
|
+
transformFn: /* @__PURE__ */ i((k, E, P) => qn(k, E, P), "transformFn"),
|
|
952
|
+
transformOptions: {
|
|
953
|
+
"@storybook/nextjs": "@storybook/nextjs-vite"
|
|
954
|
+
}
|
|
955
|
+
}));
|
|
956
|
+
let g = Ge.includes(t.frameworkPackageName) ? t.frameworkPackageName === "@storybook/nextjs" ? "@storybook/nextjs-vite" : t.frameworkPackageName : null, p = !!g, Z = await (/* @__PURE__ */ i(async () => {
|
|
957
|
+
let f = [];
|
|
958
|
+
d && f.push("\u2022 The addon can not be used with a custom Webpack configuration."), t.frameworkPackageName !== "@storybook/nextjs" && t.builderPackageName !== "@storybook/builder-vite" && f.push(
|
|
959
|
+
"\u2022 The addon can only be used with a Vite-based Storybook framework or Next.js."
|
|
960
|
+
), p || f.push(v`
|
|
961
|
+
• The addon cannot yet be used with ${t.frameworkPackageName}
|
|
962
|
+
`), a && !(0, N.satisfies)(a, ">=3.0.0") && f.push(v`
|
|
963
|
+
• The addon requires Vitest 3.0.0 or higher. You are currently using ${n}.
|
|
65
964
|
Please update all of your Vitest dependencies and try again.
|
|
66
|
-
`);
|
|
67
|
-
|
|
965
|
+
`);
|
|
966
|
+
let k = await e.getInstalledVersion("msw"), E = k ? (0, N.coerce)(k) : null;
|
|
967
|
+
return E && !(0, N.satisfies)(E, ">=2.0.0") && f.push(v`
|
|
968
|
+
• The addon uses Vitest behind the scenes, which supports only version 2 and above of MSW. However, we have detected version ${E.version} in this project.
|
|
68
969
|
Please update the 'msw' package and try again.
|
|
69
|
-
`),
|
|
970
|
+
`), t.frameworkPackageName === "@storybook/nextjs" && (await e.getInstalledVersion("next") || f.push(v`
|
|
70
971
|
• You are using @storybook/nextjs without having "next" installed.
|
|
71
972
|
Please install "next" or use a different Storybook framework integration and try again.
|
|
72
|
-
`)),
|
|
73
|
-
|
|
973
|
+
`)), f.length > 0 ? (f.unshift(
|
|
974
|
+
"@storybook/addon-vitest's automated setup failed due to the following package incompatibilities:"
|
|
975
|
+
), f.push("--------------------------------"), f.push(
|
|
976
|
+
v`
|
|
977
|
+
You can fix these issues and rerun the command to reinstall. If you wish to roll back the installation, remove ${Nr} from the "addons" array
|
|
74
978
|
in your main Storybook config file and remove the dependency from your package.json file.
|
|
75
|
-
`
|
|
979
|
+
`
|
|
980
|
+
), p ? f.push(
|
|
981
|
+
v`
|
|
76
982
|
Fear not, however, you can follow the manual installation process instead at:
|
|
77
|
-
https://storybook.js.org/docs/next/${
|
|
78
|
-
`
|
|
983
|
+
https://storybook.js.org/docs/next/${O}#manual-setup
|
|
984
|
+
`
|
|
985
|
+
) : f.push(
|
|
986
|
+
v`
|
|
79
987
|
Please check the documentation for more information about its requirements and installation:
|
|
80
|
-
https://storybook.js.org/docs/next/${
|
|
81
|
-
`
|
|
988
|
+
https://storybook.js.org/docs/next/${O}
|
|
989
|
+
`
|
|
990
|
+
), f.map((P) => P.trim()).join(`
|
|
82
991
|
|
|
83
|
-
`)):null
|
|
992
|
+
`)) : null;
|
|
993
|
+
}, "prerequisiteCheck"))();
|
|
994
|
+
if (Z) {
|
|
995
|
+
K("\u26D4\uFE0F Sorry!", Z), w.line(1);
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
if (t.frameworkPackageName === "@storybook/nextjs") {
|
|
999
|
+
Te(
|
|
1000
|
+
"\u{1F37F} Just so you know...",
|
|
1001
|
+
v`
|
|
84
1002
|
It looks like you're using Next.js.
|
|
85
1003
|
|
|
86
1004
|
Adding "@storybook/nextjs-vite/vite-plugin" so you can use it with Vitest.
|
|
87
1005
|
|
|
88
1006
|
More info about the plugin at https://github.com/storybookjs/vite-plugin-storybook-nextjs
|
|
89
|
-
`
|
|
1007
|
+
`
|
|
1008
|
+
);
|
|
1009
|
+
try {
|
|
1010
|
+
let f = await e.getInstalledVersion("storybook");
|
|
1011
|
+
o.push(`@storybook/nextjs-vite@^${f}`);
|
|
1012
|
+
} catch {
|
|
1013
|
+
console.error("Failed to install @storybook/nextjs-vite. Please install it manually");
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
let M = await e.getInstalledVersion("@vitest/coverage-v8"), ee = await e.getInstalledVersion("@vitest/coverage-istanbul");
|
|
1017
|
+
!M && !ee && (Te(
|
|
1018
|
+
"\u{1F648} Let me cover this for you",
|
|
1019
|
+
v`
|
|
90
1020
|
You don't seem to have a coverage reporter installed. Vitest needs either V8 or Istanbul to generate coverage reports.
|
|
91
1021
|
|
|
92
1022
|
Adding "@vitest/coverage-v8" to enable coverage reporting.
|
|
93
1023
|
Read more about Vitest coverage providers at https://vitest.dev/guide/coverage.html#coverage-providers
|
|
94
|
-
`
|
|
1024
|
+
`
|
|
1025
|
+
), o.push("@vitest/coverage-v8"));
|
|
1026
|
+
let F = o.map((f) => f.includes("vitest") && n ? `${f}@${n}` : f);
|
|
1027
|
+
F.length > 0 && (await e.addDependencies(
|
|
1028
|
+
{ type: "devDependencies", skipInstall: !0 },
|
|
1029
|
+
F
|
|
1030
|
+
), w.line(1), w.plain(`${C} Installing dependencies:`), w.plain(" " + F.join(", "))), await e.installDependencies(), w.line(1), r.skipInstall ? (w.plain("Skipping Playwright installation, please run this command manually:"), w.plain(" npx playwright install chromium --with-deps")) : (w.plain(`${C} Configuring Playwright with Chromium (this might take some time):`), w.plain(" npx playwright install chromium --with-deps"), await e.executeCommand({
|
|
1031
|
+
command: "npx",
|
|
1032
|
+
args: ["playwright", "install", "chromium", "--with-deps"]
|
|
1033
|
+
}));
|
|
1034
|
+
let de = s.typescript || await D("tsconfig", [...Fe, ".json"]) ? "ts" : "js", I = L(r.configDir, `vitest.setup.${de}`);
|
|
1035
|
+
if (Tr(I)) {
|
|
1036
|
+
K(
|
|
1037
|
+
"\u{1F6A8} Oh no!",
|
|
1038
|
+
v`
|
|
95
1039
|
Found an existing Vitest setup file:
|
|
96
|
-
${
|
|
1040
|
+
${I}
|
|
97
1041
|
|
|
98
1042
|
Please refer to the documentation to complete the setup manually:
|
|
99
|
-
https://storybook.js.org/docs/next/${
|
|
100
|
-
`
|
|
101
|
-
|
|
1043
|
+
https://storybook.js.org/docs/next/${O}#manual-setup
|
|
1044
|
+
`
|
|
1045
|
+
), w.line(1);
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
w.line(1), w.plain(`${C} Creating a Vitest setup file for Storybook:`), w.plain(` ${I}`);
|
|
1049
|
+
let Fr = Fe.map((f) => L(r.configDir, `preview${f}`)).some(
|
|
1050
|
+
Tr
|
|
1051
|
+
), Le = [`import { setProjectAnnotations } from '${g}';`], We = [];
|
|
1052
|
+
Fr && (Le.push("import * as projectAnnotations from './preview';"), We.push("projectAnnotations")), await X(
|
|
1053
|
+
I,
|
|
1054
|
+
v`
|
|
1055
|
+
${Le.join(`
|
|
102
1056
|
`)}
|
|
103
1057
|
|
|
104
1058
|
// This is an important step to apply the right configuration when testing your stories.
|
|
105
1059
|
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
|
|
106
|
-
setProjectAnnotations([${
|
|
107
|
-
`
|
|
1060
|
+
setProjectAnnotations([${We.join(", ")}]);
|
|
1061
|
+
`
|
|
1062
|
+
);
|
|
1063
|
+
let R = await D("vitest.workspace", [".ts", ".js", ".json"]) || await D("vitest.projects", [".ts", ".js", ".json"]), he = await D("vite.config"), ge = await D("vitest.config"), Lr = await D("vitest.shims.d"), T = ge || he, ye = `{
|
|
108
1064
|
enabled: true,
|
|
109
1065
|
headless: true,
|
|
110
1066
|
provider: 'playwright',
|
|
111
1067
|
instances: [{ browser: 'chromium' }]
|
|
112
|
-
}`;
|
|
113
|
-
|
|
1068
|
+
}`;
|
|
1069
|
+
if (de === "ts" && !Lr && await X(
|
|
1070
|
+
"vitest.shims.d.ts",
|
|
1071
|
+
'/// <reference types="@vitest/browser/providers/playwright" />'
|
|
1072
|
+
), R) {
|
|
1073
|
+
let f = await fe("vitest.workspace.template.ts", {
|
|
1074
|
+
EXTENDS_WORKSPACE: he ? W(_(R), he) : "",
|
|
1075
|
+
CONFIG_DIR: r.configDir,
|
|
1076
|
+
BROWSER_CONFIG: ye,
|
|
1077
|
+
SETUP_FILE: W(_(R), I)
|
|
1078
|
+
}).then((A) => A.replace(`
|
|
1079
|
+
'ROOT_CONFIG',`, "").replace(/\s+extends: '',/, "")), k = await z.readFile(R, "utf8"), E = me(f), P = me(k);
|
|
1080
|
+
if (Ir(E, P)) {
|
|
1081
|
+
w.line(1), w.plain(`${C} Updating your Vitest workspace file:`), w.plain(` ${R}`);
|
|
1082
|
+
let A = await Ae(R, Vr(P).code);
|
|
1083
|
+
await X(R, A);
|
|
1084
|
+
} else {
|
|
1085
|
+
K(
|
|
1086
|
+
"\u{1F6A8} Oh no!",
|
|
1087
|
+
v`
|
|
114
1088
|
Could not update existing Vitest workspace file:
|
|
115
|
-
${
|
|
1089
|
+
${R}
|
|
116
1090
|
|
|
117
1091
|
I was able to configure most of the addon but could not safely extend
|
|
118
1092
|
your existing workspace file automatically, you must do it yourself.
|
|
119
1093
|
|
|
120
1094
|
Please refer to the documentation to complete the setup manually:
|
|
121
|
-
https://storybook.js.org/docs/next/${
|
|
122
|
-
`
|
|
123
|
-
|
|
124
|
-
|
|
1095
|
+
https://storybook.js.org/docs/next/${O}#manual-setup
|
|
1096
|
+
`
|
|
1097
|
+
), w.line(1);
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
} else if (T) {
|
|
1101
|
+
let f, k, E = await z.readFile(T, "utf8"), P = E.includes("projects:"), _e = E.match(
|
|
1102
|
+
/\/\/\/\s*<reference\s+types=["']vitest\/config["']\s*\/>/
|
|
1103
|
+
), A = P || l ? "vitest.config.3.2.template.ts" : "vitest.config.template.ts";
|
|
1104
|
+
if (A) {
|
|
1105
|
+
let te = await fe(A, {
|
|
1106
|
+
CONFIG_DIR: r.configDir,
|
|
1107
|
+
BROWSER_CONFIG: ye,
|
|
1108
|
+
SETUP_FILE: W(_(T), I)
|
|
1109
|
+
}), Wr = me(te);
|
|
1110
|
+
f = me(E), k = Cr(Wr, f);
|
|
1111
|
+
}
|
|
1112
|
+
if (f && k) {
|
|
1113
|
+
w.line(1), w.plain(`${C} Updating your ${ge ? "Vitest" : "Vite"} config file:`), w.plain(` ${T}`);
|
|
1114
|
+
let te = await Ae(T, Vr(f).code);
|
|
1115
|
+
await X(
|
|
1116
|
+
T,
|
|
1117
|
+
_e ? te : `/// <reference types="vitest/config" />
|
|
1118
|
+
` + te
|
|
1119
|
+
);
|
|
1120
|
+
} else
|
|
1121
|
+
K(
|
|
1122
|
+
"\u{1F6A8} Oh no!",
|
|
1123
|
+
v`
|
|
1124
|
+
We were unable to update your existing ${ge ? "Vitest" : "Vite"} config file.
|
|
125
1125
|
|
|
126
1126
|
Please refer to the documentation to complete the setup manually:
|
|
127
1127
|
https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup
|
|
128
|
-
`
|
|
129
|
-
|
|
1128
|
+
`
|
|
1129
|
+
);
|
|
1130
|
+
} else {
|
|
1131
|
+
let f = L(`vitest.config.${de}`), k = await fe(
|
|
1132
|
+
l ? "vitest.config.3.2.template.ts" : "vitest.config.template.ts",
|
|
1133
|
+
{
|
|
1134
|
+
CONFIG_DIR: r.configDir,
|
|
1135
|
+
BROWSER_CONFIG: ye,
|
|
1136
|
+
SETUP_FILE: W(_(f), I)
|
|
1137
|
+
}
|
|
1138
|
+
);
|
|
1139
|
+
w.line(1), w.plain(`${C} Creating a Vitest config file:`), w.plain(` ${f}`);
|
|
1140
|
+
let E = await Ae(f, k);
|
|
1141
|
+
await X(f, E);
|
|
1142
|
+
}
|
|
1143
|
+
if (t.addons.find((f) => f.includes(De)))
|
|
1144
|
+
try {
|
|
1145
|
+
w.plain(`${C} Setting up ${De} for @storybook/addon-vitest:`);
|
|
1146
|
+
let f = ["automigrate", "addon-a11y-addon-test"];
|
|
1147
|
+
f.push("--loglevel", "silent"), f.push("--yes", "--skip-doctor"), r.packageManager && f.push("--package-manager", r.packageManager), r.skipInstall && f.push("--skip-install"), r.configDir !== ".storybook" && f.push("--config-dir", r.configDir), await Ye("storybook", f, {
|
|
1148
|
+
stdio: "inherit"
|
|
1149
|
+
});
|
|
1150
|
+
} catch (f) {
|
|
1151
|
+
K(
|
|
1152
|
+
"\u{1F6A8} Oh no!",
|
|
1153
|
+
v`
|
|
1154
|
+
We have detected that you have ${De} installed but could not automatically set it up for @storybook/addon-vitest:
|
|
130
1155
|
|
|
131
|
-
${
|
|
1156
|
+
${f instanceof Error ? f.message : String(f)}
|
|
132
1157
|
|
|
133
1158
|
Please refer to the documentation to complete the setup manually:
|
|
134
1159
|
https://storybook.js.org/docs/writing-tests/accessibility-testing#test-addon-integration
|
|
135
|
-
`
|
|
1160
|
+
`
|
|
1161
|
+
);
|
|
1162
|
+
}
|
|
1163
|
+
Dr ? Pr(
|
|
1164
|
+
"\u26A0\uFE0F Done, but with errors!",
|
|
1165
|
+
v`
|
|
136
1166
|
@storybook/addon-vitest was installed successfully, but there were some errors during the setup process.
|
|
137
1167
|
|
|
138
1168
|
Please refer to the documentation to complete the setup manually and check the errors above:
|
|
139
|
-
https://storybook.js.org/docs/next/${
|
|
140
|
-
`
|
|
1169
|
+
https://storybook.js.org/docs/next/${O}#manual-setup
|
|
1170
|
+
`
|
|
1171
|
+
) : Ve(
|
|
1172
|
+
"\u{1F389} All done!",
|
|
1173
|
+
v`
|
|
141
1174
|
@storybook/addon-vitest is now configured and you're ready to run your tests!
|
|
142
1175
|
|
|
143
1176
|
Here are a couple of tips to get you started:
|
|
144
|
-
• You can run tests with "${
|
|
1177
|
+
• You can run tests with "${T ? "npx vitest --project=storybook" : "npx vitest"}"
|
|
145
1178
|
• When using the Vitest extension in your editor, all of your stories will be shown as tests!
|
|
146
1179
|
|
|
147
1180
|
Check the documentation for more information about its features and options at:
|
|
148
|
-
https://storybook.js.org/docs/next/${
|
|
149
|
-
`
|
|
150
|
-
|
|
151
|
-
|
|
1181
|
+
https://storybook.js.org/docs/next/${O}
|
|
1182
|
+
`
|
|
1183
|
+
), w.line(1);
|
|
1184
|
+
}
|
|
1185
|
+
i(On, "postInstall");
|
|
1186
|
+
async function Cn({ configDir: r, packageManager: e }) {
|
|
1187
|
+
let t = Ar.getPackageManager({ force: e, configDir: r }), { packageJson: s } = t.primaryPackageJson, o = await kn({ configDir: r }), { framework: n } = o, a = typeof n == "string" ? n : n?.name;
|
|
1188
|
+
En(a);
|
|
1189
|
+
let l = vn(a), { presets: c } = await jn({
|
|
1190
|
+
configDir: r,
|
|
1191
|
+
packageJson: s
|
|
1192
|
+
}), m = await c.apply("core", {}), { builder: d, renderer: u } = m;
|
|
1193
|
+
if (!d)
|
|
1194
|
+
throw new Error("Could not detect your Storybook builder.");
|
|
1195
|
+
let g = typeof d == "string" ? d : d.name, p = await re("package.json", {
|
|
1196
|
+
cwd: g
|
|
1197
|
+
});
|
|
1198
|
+
if (!p)
|
|
1199
|
+
throw new Error("Could not detect your Storybook builder.");
|
|
1200
|
+
let Q = await z.readFile(p, "utf8"), Z = JSON.parse(Q).name, M;
|
|
1201
|
+
if (u) {
|
|
1202
|
+
let ee = await re("package.json", {
|
|
1203
|
+
cwd: u
|
|
1204
|
+
});
|
|
1205
|
+
if (ee) {
|
|
1206
|
+
let F = await z.readFile(ee, "utf8");
|
|
1207
|
+
M = JSON.parse(F).name;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
return {
|
|
1211
|
+
frameworkPackageName: l,
|
|
1212
|
+
builderPackageName: Z,
|
|
1213
|
+
rendererPackageName: M,
|
|
1214
|
+
addons: Ue(o)
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
i(Cn, "getStorybookInfo");
|
|
1218
|
+
export {
|
|
1219
|
+
On as default
|
|
1220
|
+
};
|