@storybook/addon-vitest 0.0.0-pr-32047-sha-3b23261a → 0.0.0-pr-31819-sha-8c855eb3
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 +1170 -93
- package/dist/preset.js +268 -27
- package/dist/vitest-plugin/global-setup.js +146 -6
- package/dist/vitest-plugin/index.d.ts +0 -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/manager.js +1 -1
- package/package.json +17 -95
- package/preset.js +1 -1
- 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/playwright-utils.d.ts +0 -42649
- package/dist/vitest-plugin/playwright-utils.js +0 -34
- package/dist/vitest-plugin/playwright-utils.mjs +0 -29
- 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.mjs +0 -1
- package/postinstall.js +0 -1
- package/postinstall.mjs +0 -1
- package/preset.mjs +0 -1
package/dist/postinstall.js
CHANGED
|
@@ -1,151 +1,1228 @@
|
|
|
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 me
|
|
17
|
+
} from "./_node-chunks/chunk-CIKGVIS6.js";
|
|
18
|
+
import {
|
|
19
|
+
c as C,
|
|
20
|
+
e as Ge,
|
|
21
|
+
m as He
|
|
22
|
+
} from "./_node-chunks/chunk-FMQIQP6D.js";
|
|
23
|
+
import {
|
|
24
|
+
c as Be,
|
|
25
|
+
d as F,
|
|
26
|
+
e as L,
|
|
27
|
+
f as W
|
|
28
|
+
} from "./_node-chunks/chunk-W26ZMSD3.js";
|
|
29
|
+
import {
|
|
30
|
+
a as Xe,
|
|
31
|
+
b as Je,
|
|
32
|
+
c as Q,
|
|
33
|
+
d as Ke,
|
|
34
|
+
e as Br,
|
|
35
|
+
f as b,
|
|
36
|
+
g as S,
|
|
37
|
+
h as de
|
|
38
|
+
} from "./_node-chunks/chunk-C4NXJJA3.js";
|
|
39
|
+
import {
|
|
40
|
+
a as i,
|
|
41
|
+
c as h,
|
|
42
|
+
e as Yr
|
|
43
|
+
} from "./_node-chunks/chunk-KVKHJ5OL.js";
|
|
44
|
+
|
|
45
|
+
// ../../node_modules/semver/functions/parse.js
|
|
46
|
+
var V = h((Fn, Qe) => {
|
|
47
|
+
"use strict";
|
|
48
|
+
var ze = b(), Hr = /* @__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 = Hr;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// ../../node_modules/semver/functions/valid.js
|
|
63
|
+
var Me = h((Wn, Ze) => {
|
|
64
|
+
"use strict";
|
|
65
|
+
var Ur = V(), Xr = /* @__PURE__ */ i((r, e) => {
|
|
66
|
+
let t = Ur(r, e);
|
|
67
|
+
return t ? t.version : null;
|
|
68
|
+
}, "valid");
|
|
69
|
+
Ze.exports = Xr;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// ../../node_modules/semver/functions/clean.js
|
|
73
|
+
var tt = h((Gn, et) => {
|
|
74
|
+
"use strict";
|
|
75
|
+
var Jr = V(), Kr = /* @__PURE__ */ i((r, e) => {
|
|
76
|
+
let t = Jr(r.trim().replace(/^[=v]+/, ""), e);
|
|
77
|
+
return t ? t.version : null;
|
|
78
|
+
}, "clean");
|
|
79
|
+
et.exports = Kr;
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// ../../node_modules/semver/functions/inc.js
|
|
83
|
+
var ot = h((Bn, st) => {
|
|
84
|
+
"use strict";
|
|
85
|
+
var rt = b(), zr = /* @__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 = zr;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// ../../node_modules/semver/functions/diff.js
|
|
100
|
+
var at = h((Un, it) => {
|
|
101
|
+
"use strict";
|
|
102
|
+
var nt = V(), Qr = /* @__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 = Qr;
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// ../../node_modules/semver/functions/major.js
|
|
120
|
+
var ct = h((Jn, lt) => {
|
|
121
|
+
"use strict";
|
|
122
|
+
var Zr = b(), Mr = /* @__PURE__ */ i((r, e) => new Zr(r, e).major, "major");
|
|
123
|
+
lt.exports = Mr;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// ../../node_modules/semver/functions/minor.js
|
|
127
|
+
var pt = h((zn, ut) => {
|
|
128
|
+
"use strict";
|
|
129
|
+
var es = b(), ts = /* @__PURE__ */ i((r, e) => new es(r, e).minor, "minor");
|
|
130
|
+
ut.exports = ts;
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// ../../node_modules/semver/functions/patch.js
|
|
134
|
+
var mt = h((Zn, ft) => {
|
|
135
|
+
"use strict";
|
|
136
|
+
var rs = b(), ss = /* @__PURE__ */ i((r, e) => new rs(r, e).patch, "patch");
|
|
137
|
+
ft.exports = ss;
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// ../../node_modules/semver/functions/prerelease.js
|
|
141
|
+
var ht = h((ei, dt) => {
|
|
142
|
+
"use strict";
|
|
143
|
+
var os = V(), ns = /* @__PURE__ */ i((r, e) => {
|
|
144
|
+
let t = os(r, e);
|
|
145
|
+
return t && t.prerelease.length ? t.prerelease : null;
|
|
146
|
+
}, "prerelease");
|
|
147
|
+
dt.exports = ns;
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// ../../node_modules/semver/functions/rcompare.js
|
|
151
|
+
var yt = h((ri, gt) => {
|
|
152
|
+
"use strict";
|
|
153
|
+
var is = S(), as = /* @__PURE__ */ i((r, e, t) => is(e, r, t), "rcompare");
|
|
154
|
+
gt.exports = as;
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// ../../node_modules/semver/functions/compare-loose.js
|
|
158
|
+
var vt = h((oi, wt) => {
|
|
159
|
+
"use strict";
|
|
160
|
+
var ls = S(), cs = /* @__PURE__ */ i((r, e) => ls(r, e, !0), "compareLoose");
|
|
161
|
+
wt.exports = cs;
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// ../../node_modules/semver/functions/compare-build.js
|
|
165
|
+
var Z = h((ii, $t) => {
|
|
166
|
+
"use strict";
|
|
167
|
+
var xt = b(), us = /* @__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 = us;
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// ../../node_modules/semver/functions/sort.js
|
|
175
|
+
var bt = h((li, kt) => {
|
|
176
|
+
"use strict";
|
|
177
|
+
var ps = Z(), fs = /* @__PURE__ */ i((r, e) => r.sort((t, s) => ps(t, s, e)), "sort");
|
|
178
|
+
kt.exports = fs;
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// ../../node_modules/semver/functions/rsort.js
|
|
182
|
+
var Et = h((ui, qt) => {
|
|
183
|
+
"use strict";
|
|
184
|
+
var ms = Z(), ds = /* @__PURE__ */ i((r, e) => r.sort((t, s) => ms(s, t, e)), "rsort");
|
|
185
|
+
qt.exports = ds;
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// ../../node_modules/semver/functions/gt.js
|
|
189
|
+
var _ = h((fi, jt) => {
|
|
190
|
+
"use strict";
|
|
191
|
+
var hs = S(), gs = /* @__PURE__ */ i((r, e, t) => hs(r, e, t) > 0, "gt");
|
|
192
|
+
jt.exports = gs;
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
// ../../node_modules/semver/functions/lt.js
|
|
196
|
+
var M = h((di, St) => {
|
|
197
|
+
"use strict";
|
|
198
|
+
var ys = S(), ws = /* @__PURE__ */ i((r, e, t) => ys(r, e, t) < 0, "lt");
|
|
199
|
+
St.exports = ws;
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// ../../node_modules/semver/functions/eq.js
|
|
203
|
+
var he = h((gi, Pt) => {
|
|
204
|
+
"use strict";
|
|
205
|
+
var vs = S(), xs = /* @__PURE__ */ i((r, e, t) => vs(r, e, t) === 0, "eq");
|
|
206
|
+
Pt.exports = xs;
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// ../../node_modules/semver/functions/neq.js
|
|
210
|
+
var ge = h((wi, Rt) => {
|
|
211
|
+
"use strict";
|
|
212
|
+
var $s = S(), ks = /* @__PURE__ */ i((r, e, t) => $s(r, e, t) !== 0, "neq");
|
|
213
|
+
Rt.exports = ks;
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// ../../node_modules/semver/functions/lte.js
|
|
217
|
+
var ee = h((xi, Ct) => {
|
|
218
|
+
"use strict";
|
|
219
|
+
var bs = S(), qs = /* @__PURE__ */ i((r, e, t) => bs(r, e, t) <= 0, "lte");
|
|
220
|
+
Ct.exports = qs;
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// ../../node_modules/semver/functions/cmp.js
|
|
224
|
+
var ye = h((ki, Ot) => {
|
|
225
|
+
"use strict";
|
|
226
|
+
var Es = he(), js = ge(), Ss = _(), Ps = de(), Rs = M(), Cs = ee(), Os = /* @__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 Es(r, t, s);
|
|
236
|
+
case "!=":
|
|
237
|
+
return js(r, t, s);
|
|
238
|
+
case ">":
|
|
239
|
+
return Ss(r, t, s);
|
|
240
|
+
case ">=":
|
|
241
|
+
return Ps(r, t, s);
|
|
242
|
+
case "<":
|
|
243
|
+
return Rs(r, t, s);
|
|
244
|
+
case "<=":
|
|
245
|
+
return Cs(r, t, s);
|
|
246
|
+
default:
|
|
247
|
+
throw new TypeError(`Invalid operator: ${e}`);
|
|
248
|
+
}
|
|
249
|
+
}, "cmp");
|
|
250
|
+
Ot.exports = Os;
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// ../../node_modules/semver/functions/coerce.js
|
|
254
|
+
var Tt = h((qi, It) => {
|
|
255
|
+
"use strict";
|
|
256
|
+
var Is = b(), Ts = V(), { safeRe: te, t: re } = Q(), Vs = /* @__PURE__ */ i((r, e) => {
|
|
257
|
+
if (r instanceof Is)
|
|
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 ? te[re.COERCEFULL] : te[re.COERCE]);
|
|
265
|
+
else {
|
|
266
|
+
let c = e.includePrerelease ? te[re.COERCERTLFULL] : te[re.COERCERTL], f;
|
|
267
|
+
for (; (f = c.exec(r)) && (!t || t.index + t[0].length !== r.length); )
|
|
268
|
+
(!t || f.index + f[0].length !== t.index + t[0].length) && (t = f), c.lastIndex = f.index + f[1].length + f[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 Ts(`${s}.${o}.${n}${a}${l}`, e);
|
|
275
|
+
}, "coerce");
|
|
276
|
+
It.exports = Vs;
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
// ../../node_modules/semver/internal/lrucache.js
|
|
280
|
+
var At = h((ji, Vt) => {
|
|
281
|
+
"use strict";
|
|
282
|
+
var we = 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 = we;
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// ../../node_modules/semver/classes/range.js
|
|
312
|
+
var j = h((Pi, Lt) => {
|
|
313
|
+
"use strict";
|
|
314
|
+
var As = /\s+/g, ve = class r {
|
|
315
|
+
static {
|
|
316
|
+
i(this, "Range");
|
|
317
|
+
}
|
|
318
|
+
constructor(e, t) {
|
|
319
|
+
if (t = Ds(t), e instanceof r)
|
|
320
|
+
return e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease ? e : new r(e.raw, t);
|
|
321
|
+
if (e instanceof xe)
|
|
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(As, " "), 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 && Bs(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 && Gs) | (this.options.loose && Ys)) + ":" + e, o = Nt.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, eo(this.options.includePrerelease)), y("hyphen replace", e), e = e.replace(q[x.COMPARATORTRIM], Ls), y("comparator trim", e), e = e.replace(q[x.TILDETRIM], Ws), y("tilde trim", e), e = e.replace(q[x.CARETTRIM], _s), y("caret trim", e);
|
|
363
|
+
let l = e.split(" ").map((p) => Hs(p, this.options)).join(" ").split(/\s+/).map((p) => Ms(p, this.options));
|
|
364
|
+
n && (l = l.filter((p) => (y("loose invalid filter", p, this.options), !!p.match(q[x.COMPARATORLOOSE])))), y("range list", l);
|
|
365
|
+
let c = /* @__PURE__ */ new Map(), f = l.map((p) => new xe(p, this.options));
|
|
366
|
+
for (let p of f) {
|
|
367
|
+
if (Dt(p))
|
|
368
|
+
return [p];
|
|
369
|
+
c.set(p.value, p);
|
|
370
|
+
}
|
|
371
|
+
c.size > 1 && c.has("") && c.delete("");
|
|
372
|
+
let d = [...c.values()];
|
|
373
|
+
return Nt.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 Fs(e, this.options);
|
|
387
|
+
} catch {
|
|
388
|
+
return !1;
|
|
389
|
+
}
|
|
390
|
+
for (let t = 0; t < this.set.length; t++)
|
|
391
|
+
if (to(this.set[t], e, this.options))
|
|
392
|
+
return !0;
|
|
393
|
+
return !1;
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
Lt.exports = ve;
|
|
397
|
+
var Ns = At(), Nt = new Ns(), Ds = Ke(), xe = G(), y = Je(), Fs = b(), {
|
|
398
|
+
safeRe: q,
|
|
399
|
+
t: x,
|
|
400
|
+
comparatorTrimReplace: Ls,
|
|
401
|
+
tildeTrimReplace: Ws,
|
|
402
|
+
caretTrimReplace: _s
|
|
403
|
+
} = Q(), { FLAG_INCLUDE_PRERELEASE: Gs, FLAG_LOOSE: Ys } = Xe(), Dt = /* @__PURE__ */ i((r) => r.value === "<0.0.0-0", "isNullSet"), Bs = /* @__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"), Hs = /* @__PURE__ */ i((r, e) => (y("comp", r, e), r = Js(r, e), y("caret", r), r = Us(r, e), y("tildes", r), r = zs(r, e), y("xrange", r), r = Zs(r, e), y("stars", r), r), "parseComparator"), $ = /* @__PURE__ */ i((r) => !r || r.toLowerCase() === "x" || r === "*", "isX"), Us = /* @__PURE__ */ i((r, e) => r.trim().split(/\s+/).map((t) => Xs(t, e)).join(" "), "replaceTildes"), Xs = /* @__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"), Js = /* @__PURE__ */ i((r, e) => r.trim().split(/\s+/).map((t) => Ks(t, e)).join(" "), "replaceCarets"), Ks = /* @__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 f;
|
|
421
|
+
return $(n) ? f = "" : $(a) ? f = `>=${n}.0.0${s} <${+n + 1}.0.0-0` : $(l) ? n === "0" ? f = `>=${n}.${a}.0${s} <${n}.${+a + 1}.0-0` : f = `>=${n}.${a}.0${s} <${+n + 1}.0.0-0` : c ? (y("replaceCaret pr", c), n === "0" ? a === "0" ? f = `>=${n}.${a}.${l}-${c} <${n}.${a}.${+l + 1}-0` : f = `>=${n}.${a}.${l}-${c} <${n}.${+a + 1}.0-0` : f = `>=${n}.${a}.${l}-${c} <${+n + 1}.0.0-0`) : (y("no pr"), n === "0" ? a === "0" ? f = `>=${n}.${a}.${l}${s} <${n}.${a}.${+l + 1}-0` : f = `>=${n}.${a}.${l}${s} <${n}.${+a + 1}.0-0` : f = `>=${n}.${a}.${l} <${+n + 1}.0.0-0`), y("caret return", f), f;
|
|
422
|
+
});
|
|
423
|
+
}, "replaceCaret"), zs = /* @__PURE__ */ i((r, e) => (y("replaceXRanges", r, e), r.split(/\s+/).map((t) => Qs(t, e)).join(" ")), "replaceXRanges"), Qs = /* @__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 f = $(n), d = f || $(a), p = d || $(l), g = p;
|
|
429
|
+
return o === "=" && g && (o = ""), c = e.includePrerelease ? "-0" : "", f ? 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` : p && (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"), Ms = /* @__PURE__ */ i((r, e) => (y("replaceGTE0", r, e), r.trim().replace(q[e.includePrerelease ? x.GTE0PRE : x.GTE0], "")), "replaceGTE0"), eo = /* @__PURE__ */ i((r) => (e, t, s, o, n, a, l, c, f, d, p, g) => ($(s) ? t = "" : $(o) ? t = `>=${s}.0.0${r ? "-0" : ""}` : $(n) ? t = `>=${s}.${o}.0${r ? "-0" : ""}` : a ? t = `>=${t}` : t = `>=${t}${r ? "-0" : ""}`, $(f) ? c = "" : $(d) ? c = `<${+f + 1}.0.0-0` : $(p) ? c = `<${f}.${+d + 1}.0-0` : g ? c = `<=${f}.${d}.${p}-${g}` : r ? c = `<${f}.${d}.${+p + 1}-0` : c = `<=${c}`, `${t} ${c}`.trim()), "hyphenReplace"), to = /* @__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 !== xe.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 G = h((Ci, Ht) => {
|
|
450
|
+
"use strict";
|
|
451
|
+
var Y = Symbol("SemVer ANY"), be = class r {
|
|
452
|
+
static {
|
|
453
|
+
i(this, "Comparator");
|
|
454
|
+
}
|
|
455
|
+
static get ANY() {
|
|
456
|
+
return Y;
|
|
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(" "), ke("comparator", e, t), this.options = t, this.loose = !!t.loose, this.parse(e), this.semver === Y ? this.value = "" : this.value = this.operator + this.semver.version, ke("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 = Y;
|
|
471
|
+
}
|
|
472
|
+
toString() {
|
|
473
|
+
return this.value;
|
|
474
|
+
}
|
|
475
|
+
test(e) {
|
|
476
|
+
if (ke("Comparator.test", e, this.options.loose), this.semver === Y || e === Y)
|
|
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 $e(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("=") || $e(this.semver, "<", e.semver, t) && this.operator.startsWith(">") && e.operator.startsWith("<") || $e(this.semver, ">", e.semver, t) && this.operator.startsWith("<") && e.operator.startsWith(">")));
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
Ht.exports = be;
|
|
493
|
+
var Wt = Ke(), { safeRe: _t, t: Gt } = Q(), $e = ye(), ke = Je(), Yt = b(), Bt = j();
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
// ../../node_modules/semver/functions/satisfies.js
|
|
497
|
+
var B = h((Ii, Ut) => {
|
|
498
|
+
"use strict";
|
|
499
|
+
var ro = j(), so = /* @__PURE__ */ i((r, e, t) => {
|
|
500
|
+
try {
|
|
501
|
+
e = new ro(e, t);
|
|
502
|
+
} catch {
|
|
503
|
+
return !1;
|
|
504
|
+
}
|
|
505
|
+
return e.test(r);
|
|
506
|
+
}, "satisfies");
|
|
507
|
+
Ut.exports = so;
|
|
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/angular","@storybook/nextjs","@storybook/nextjs-vite","@storybook/react-vite","@storybook/react-webpack5","@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 Jt = h((Vi, Xt) => {
|
|
512
|
+
"use strict";
|
|
513
|
+
var oo = j(), no = /* @__PURE__ */ i((r, e) => new oo(r, e).set.map((t) => t.map((s) => s.value).join(" ").trim().split(" ")), "toComparators");
|
|
514
|
+
Xt.exports = no;
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
// ../../node_modules/semver/ranges/max-satisfying.js
|
|
518
|
+
var zt = h((Ni, Kt) => {
|
|
519
|
+
"use strict";
|
|
520
|
+
var io = b(), ao = j(), lo = /* @__PURE__ */ i((r, e, t) => {
|
|
521
|
+
let s = null, o = null, n = null;
|
|
522
|
+
try {
|
|
523
|
+
n = new ao(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 io(s, t));
|
|
529
|
+
}), s;
|
|
530
|
+
}, "maxSatisfying");
|
|
531
|
+
Kt.exports = lo;
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
// ../../node_modules/semver/ranges/min-satisfying.js
|
|
535
|
+
var Zt = h((Fi, Qt) => {
|
|
536
|
+
"use strict";
|
|
537
|
+
var co = b(), uo = j(), po = /* @__PURE__ */ i((r, e, t) => {
|
|
538
|
+
let s = null, o = null, n = null;
|
|
539
|
+
try {
|
|
540
|
+
n = new uo(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 co(s, t));
|
|
546
|
+
}), s;
|
|
547
|
+
}, "minSatisfying");
|
|
548
|
+
Qt.exports = po;
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
// ../../node_modules/semver/ranges/min-version.js
|
|
552
|
+
var tr = h((Wi, er) => {
|
|
553
|
+
"use strict";
|
|
554
|
+
var qe = b(), fo = j(), Mt = _(), mo = /* @__PURE__ */ i((r, e) => {
|
|
555
|
+
r = new fo(r, e);
|
|
556
|
+
let t = new qe("0.0.0");
|
|
557
|
+
if (r.test(t) || (t = new qe("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 qe(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 = mo;
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
// ../../node_modules/semver/ranges/valid.js
|
|
587
|
+
var sr = h((Gi, rr) => {
|
|
588
|
+
"use strict";
|
|
589
|
+
var ho = j(), go = /* @__PURE__ */ i((r, e) => {
|
|
590
|
+
try {
|
|
591
|
+
return new ho(r, e).range || "*";
|
|
592
|
+
} catch {
|
|
593
|
+
return null;
|
|
594
|
+
}
|
|
595
|
+
}, "validRange");
|
|
596
|
+
rr.exports = go;
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
// ../../node_modules/semver/ranges/outside.js
|
|
600
|
+
var se = h((Bi, ar) => {
|
|
601
|
+
"use strict";
|
|
602
|
+
var yo = b(), ir = G(), { ANY: wo } = ir, vo = j(), xo = B(), or = _(), nr = M(), $o = ee(), ko = de(), bo = /* @__PURE__ */ i((r, e, t, s) => {
|
|
603
|
+
r = new yo(r, s), e = new vo(e, s);
|
|
604
|
+
let o, n, a, l, c;
|
|
605
|
+
switch (t) {
|
|
606
|
+
case ">":
|
|
607
|
+
o = or, n = $o, a = nr, l = ">", c = ">=";
|
|
608
|
+
break;
|
|
609
|
+
case "<":
|
|
610
|
+
o = nr, n = ko, a = or, l = "<", c = "<=";
|
|
611
|
+
break;
|
|
612
|
+
default:
|
|
613
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
614
|
+
}
|
|
615
|
+
if (xo(r, e, s))
|
|
616
|
+
return !1;
|
|
617
|
+
for (let f = 0; f < e.set.length; ++f) {
|
|
618
|
+
let d = e.set[f], p = null, g = null;
|
|
619
|
+
if (d.forEach((m) => {
|
|
620
|
+
m.semver === wo && (m = new ir(">=0.0.0")), p = p || m, g = g || m, o(m.semver, p.semver, s) ? p = m : a(m.semver, g.semver, s) && (g = m);
|
|
621
|
+
}), p.operator === l || p.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 = bo;
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
// ../../node_modules/semver/ranges/gtr.js
|
|
632
|
+
var cr = h((Ui, lr) => {
|
|
633
|
+
"use strict";
|
|
634
|
+
var qo = se(), Eo = /* @__PURE__ */ i((r, e, t) => qo(r, e, ">", t), "gtr");
|
|
635
|
+
lr.exports = Eo;
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
// ../../node_modules/semver/ranges/ltr.js
|
|
639
|
+
var pr = h((Ji, ur) => {
|
|
640
|
+
"use strict";
|
|
641
|
+
var jo = se(), So = /* @__PURE__ */ i((r, e, t) => jo(r, e, "<", t), "ltr");
|
|
642
|
+
ur.exports = So;
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
// ../../node_modules/semver/ranges/intersects.js
|
|
646
|
+
var dr = h((zi, mr) => {
|
|
647
|
+
"use strict";
|
|
648
|
+
var fr = j(), Po = /* @__PURE__ */ i((r, e, t) => (r = new fr(r, t), e = new fr(e, t), r.intersects(e, t)), "intersects");
|
|
649
|
+
mr.exports = Po;
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
// ../../node_modules/semver/ranges/simplify.js
|
|
653
|
+
var gr = h((Zi, hr) => {
|
|
654
|
+
"use strict";
|
|
655
|
+
var Ro = B(), Co = S();
|
|
656
|
+
hr.exports = (r, e, t) => {
|
|
657
|
+
let s = [], o = null, n = null, a = r.sort((d, p) => Co(d, p, t));
|
|
658
|
+
for (let d of a)
|
|
659
|
+
Ro(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, p] of s)
|
|
663
|
+
d === p ? l.push(d) : !p && d === a[0] ? l.push("*") : p ? d === a[0] ? l.push(`<=${p}`) : l.push(`${d} - ${p}`) : l.push(`>=${d}`);
|
|
664
|
+
let c = l.join(" || "), f = typeof e.raw == "string" ? e.raw : String(e);
|
|
665
|
+
return c.length < f.length ? c : e;
|
|
666
|
+
};
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
// ../../node_modules/semver/ranges/subset.js
|
|
670
|
+
var kr = h((Mi, $r) => {
|
|
671
|
+
"use strict";
|
|
672
|
+
var yr = j(), je = G(), { ANY: Ee } = je, H = B(), Se = S(), Oo = /* @__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 = To(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"), Io = [new je(">=0.0.0-0")], wr = [new je(">=0.0.0")], To = /* @__PURE__ */ i((r, e, t) => {
|
|
688
|
+
if (r === e)
|
|
689
|
+
return !0;
|
|
690
|
+
if (r.length === 1 && r[0].semver === Ee) {
|
|
691
|
+
if (e.length === 1 && e[0].semver === Ee)
|
|
692
|
+
return !0;
|
|
693
|
+
t.includePrerelease ? r = Io : r = wr;
|
|
694
|
+
}
|
|
695
|
+
if (e.length === 1 && e[0].semver === Ee) {
|
|
696
|
+
if (t.includePrerelease)
|
|
697
|
+
return !0;
|
|
698
|
+
e = wr;
|
|
699
|
+
}
|
|
700
|
+
let s = /* @__PURE__ */ new Set(), o, n;
|
|
701
|
+
for (let m of r)
|
|
702
|
+
m.operator === ">" || m.operator === ">=" ? o = vr(o, m, t) : m.operator === "<" || m.operator === "<=" ? n = xr(n, m, t) : s.add(m.semver);
|
|
703
|
+
if (s.size > 1)
|
|
704
|
+
return null;
|
|
705
|
+
let a;
|
|
706
|
+
if (o && n) {
|
|
707
|
+
if (a = Se(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 m of s) {
|
|
713
|
+
if (o && !H(m, String(o), t) || n && !H(m, String(n), t))
|
|
714
|
+
return null;
|
|
715
|
+
for (let De of e)
|
|
716
|
+
if (!H(m, String(De), t))
|
|
717
|
+
return !1;
|
|
718
|
+
return !0;
|
|
719
|
+
}
|
|
720
|
+
let l, c, f, d, p = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1, g = o && !t.includePrerelease && o.semver.prerelease.length ? o.semver : !1;
|
|
721
|
+
p && p.prerelease.length === 1 && n.operator === "<" && p.prerelease[0] === 0 && (p = !1);
|
|
722
|
+
for (let m of e) {
|
|
723
|
+
if (d = d || m.operator === ">" || m.operator === ">=", f = f || m.operator === "<" || m.operator === "<=", o) {
|
|
724
|
+
if (g && m.semver.prerelease && m.semver.prerelease.length && m.semver.major === g.major && m.semver.minor === g.minor && m.semver.patch === g.patch && (g = !1), m.operator === ">" || m.operator === ">=") {
|
|
725
|
+
if (l = vr(o, m, t), l === m && l !== o)
|
|
726
|
+
return !1;
|
|
727
|
+
} else if (o.operator === ">=" && !H(o.semver, String(m), t))
|
|
728
|
+
return !1;
|
|
729
|
+
}
|
|
730
|
+
if (n) {
|
|
731
|
+
if (p && m.semver.prerelease && m.semver.prerelease.length && m.semver.major === p.major && m.semver.minor === p.minor && m.semver.patch === p.patch && (p = !1), m.operator === "<" || m.operator === "<=") {
|
|
732
|
+
if (c = xr(n, m, t), c === m && c !== n)
|
|
733
|
+
return !1;
|
|
734
|
+
} else if (n.operator === "<=" && !H(n.semver, String(m), t))
|
|
735
|
+
return !1;
|
|
736
|
+
}
|
|
737
|
+
if (!m.operator && (n || o) && a !== 0)
|
|
738
|
+
return !1;
|
|
739
|
+
}
|
|
740
|
+
return !(o && f && !n && a !== 0 || n && d && !o && a !== 0 || g || p);
|
|
741
|
+
}, "simpleSubset"), vr = /* @__PURE__ */ i((r, e, t) => {
|
|
742
|
+
if (!r)
|
|
743
|
+
return e;
|
|
744
|
+
let s = Se(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 = Se(r.semver, e.semver, t);
|
|
750
|
+
return s < 0 ? r : s > 0 || e.operator === "<" && r.operator === "<=" ? e : r;
|
|
751
|
+
}, "lowerLT");
|
|
752
|
+
$r.exports = Oo;
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
// ../../node_modules/semver/index.js
|
|
756
|
+
var jr = h((ta, Er) => {
|
|
757
|
+
"use strict";
|
|
758
|
+
var Pe = Q(), br = Xe(), Vo = b(), qr = Br(), Ao = V(), No = Me(), Do = tt(), Fo = ot(), Lo = at(), Wo = ct(), _o = pt(), Go = mt(), Yo = ht(), Bo = S(), Ho = yt(), Uo = vt(), Xo = Z(), Jo = bt(), Ko = Et(), zo = _(), Qo = M(), Zo = he(), Mo = ge(), en = de(), tn = ee(), rn = ye(), sn = Tt(), on = G(), nn = j(), an = B(), ln = Jt(), cn = zt(), un = Zt(), pn = tr(), fn = sr(), mn = se(), dn = cr(), hn = pr(), gn = dr(), yn = gr(), wn = kr();
|
|
759
|
+
Er.exports = {
|
|
760
|
+
parse: Ao,
|
|
761
|
+
valid: No,
|
|
762
|
+
clean: Do,
|
|
763
|
+
inc: Fo,
|
|
764
|
+
diff: Lo,
|
|
765
|
+
major: Wo,
|
|
766
|
+
minor: _o,
|
|
767
|
+
patch: Go,
|
|
768
|
+
prerelease: Yo,
|
|
769
|
+
compare: Bo,
|
|
770
|
+
rcompare: Ho,
|
|
771
|
+
compareLoose: Uo,
|
|
772
|
+
compareBuild: Xo,
|
|
773
|
+
sort: Jo,
|
|
774
|
+
rsort: Ko,
|
|
775
|
+
gt: zo,
|
|
776
|
+
lt: Qo,
|
|
777
|
+
eq: Zo,
|
|
778
|
+
neq: Mo,
|
|
779
|
+
gte: en,
|
|
780
|
+
lte: tn,
|
|
781
|
+
cmp: rn,
|
|
782
|
+
coerce: sn,
|
|
783
|
+
Comparator: on,
|
|
784
|
+
Range: nn,
|
|
785
|
+
satisfies: an,
|
|
786
|
+
toComparators: ln,
|
|
787
|
+
maxSatisfying: cn,
|
|
788
|
+
minSatisfying: un,
|
|
789
|
+
minVersion: pn,
|
|
790
|
+
validRange: fn,
|
|
791
|
+
outside: mn,
|
|
792
|
+
gtr: dn,
|
|
793
|
+
ltr: hn,
|
|
794
|
+
intersects: gn,
|
|
795
|
+
simplifyRange: yn,
|
|
796
|
+
subset: wn,
|
|
797
|
+
SemVer: Vo,
|
|
798
|
+
re: Pe.re,
|
|
799
|
+
src: Pe.src,
|
|
800
|
+
tokens: Pe.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 Ae from "node:fs/promises";
|
|
811
|
+
import { writeFile as X } from "node:fs/promises";
|
|
812
|
+
import { isAbsolute as xn, posix as $n, sep as kn } from "node:path";
|
|
813
|
+
import { fileURLToPath as bn } from "node:url";
|
|
814
|
+
import { babelParse as ae, generate as Vr, traverse as qn } from "storybook/internal/babel";
|
|
815
|
+
import {
|
|
816
|
+
JsPackageManagerFactory as Nr,
|
|
817
|
+
formatFileContent as Ie,
|
|
818
|
+
getInterpretedFile as En,
|
|
819
|
+
getProjectRoot as jn,
|
|
820
|
+
loadMainConfig as Sn,
|
|
821
|
+
scanAndTransformFiles as Pn,
|
|
822
|
+
transformImportFiles as Rn
|
|
823
|
+
} from "storybook/internal/common";
|
|
824
|
+
import { experimental_loadStorybook as Cn } from "storybook/internal/core-server";
|
|
825
|
+
import { readConfig as On, writeConfig as In } from "storybook/internal/csf-tools";
|
|
826
|
+
import { logger as w } from "storybook/internal/node-logger";
|
|
827
|
+
var A = Yr(jr(), 1);
|
|
828
|
+
import Tn from "prompts";
|
|
829
|
+
import { dedent as v } from "ts-dedent";
|
|
830
|
+
|
|
831
|
+
// src/postinstall-logger.ts
|
|
832
|
+
import { colors as U, logger as Sr } from "storybook/internal/node-logger";
|
|
833
|
+
var oe = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color", O = U.gray("\u203A"), sa = U.blue(oe ? "\u2139" : "i"), oa = U.green(oe ? "\u2714" : "\u221A"), na = U.orange(oe ? "\u26A0" : "\u203C"), ia = U.red(oe ? "\u2716" : "\xD7"), vn = {
|
|
834
|
+
borderStyle: "round",
|
|
835
|
+
padding: 1
|
|
836
|
+
}, ne = /* @__PURE__ */ i((r, e) => {
|
|
837
|
+
Sr.line(1), Sr.logBox(r, { ...vn, ...e });
|
|
838
|
+
}, "print"), Re = /* @__PURE__ */ i((r, e, t) => ne(e, { borderColor: "blue", title: r, ...t }), "printInfo"), Pr = /* @__PURE__ */ i((r, e, t) => ne(e, { borderColor: "yellow", title: r, ...t }), "printWarning"), Rr = /* @__PURE__ */ i((r, e, t) => ne(e, { borderColor: "red", title: r, ...t }), "printError"), Ce = /* @__PURE__ */ i((r, e, t) => ne(e, { borderColor: "green", title: r, ...t }), "printSuccess");
|
|
839
|
+
|
|
840
|
+
// src/updateVitestFile.ts
|
|
841
|
+
import * as Cr from "node:fs/promises";
|
|
842
|
+
var ie = /* @__PURE__ */ i(async (r, e) => {
|
|
843
|
+
let t = await Cr.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"), Oe = /* @__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" ? Oe(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"), Or = /* @__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" ? (Oe(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" && (Oe(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 Ar = "@storybook/addon-vitest", Ne = [".ts", ".tsx", ".js", ".jsx", ".cts", ".mts", ".cjs", ".mjs"], Te = "@storybook/addon-a11y", Dr = !1;
|
|
914
|
+
function J(r, e) {
|
|
915
|
+
return !!(r === e || r.includes(`${e}${kn}`) || r.includes(`${e}${$n.sep}`));
|
|
916
|
+
}
|
|
917
|
+
i(J, "nameMatches");
|
|
918
|
+
var K = /* @__PURE__ */ i((...r) => {
|
|
919
|
+
Dr = !0, Rr(...r);
|
|
920
|
+
}, "logErrors"), D = /* @__PURE__ */ i(async (r, e = Ne) => me(
|
|
921
|
+
e.map((t) => r + t),
|
|
922
|
+
{ stopAt: jn() }
|
|
923
|
+
), "findFile");
|
|
924
|
+
async function Vn(r) {
|
|
925
|
+
Ce(
|
|
926
|
+
"\u{1F44B} Howdy!",
|
|
927
|
+
v`
|
|
928
|
+
I'm the installation helper for ${Ar}
|
|
54
929
|
|
|
55
930
|
Hold on for a moment while I look at your project and get it set up...
|
|
56
|
-
`
|
|
931
|
+
`
|
|
932
|
+
);
|
|
933
|
+
let e = Nr.getPackageManager({
|
|
934
|
+
force: r.packageManager
|
|
935
|
+
}), t = await An(r), s = e.getAllDependencies(), o = ["vitest", "@vitest/browser", "playwright"].filter((u) => !s[u]), n = await e.getInstalledVersion("vitest"), a = n ? (0, A.coerce)(n) : null, l = n ? (0, A.satisfies)(n, ">=3.2.0") : !0, c = En(F(r.configDir, "main")), f = await On(c), d = !!f.getFieldNode(["webpackFinal"]), p = process.stdout.isTTY && !process.env.CI;
|
|
936
|
+
J(t.frameworkPackageName, "@storybook/nextjs") && !d && (r.yes || !p ? { migrateToNextjsVite: !!r.yes } : await Tn({
|
|
937
|
+
type: "confirm",
|
|
938
|
+
name: "migrateToNextjsVite",
|
|
939
|
+
message: v`
|
|
57
940
|
The addon requires the use of @storybook/nextjs-vite to work with Next.js.
|
|
58
|
-
https://storybook.js.org/docs/next/${
|
|
941
|
+
https://storybook.js.org/docs/next/${C}#install-and-set-up
|
|
59
942
|
|
|
60
943
|
Do you want to migrate?
|
|
61
|
-
`,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
944
|
+
`,
|
|
945
|
+
initial: !0
|
|
946
|
+
})).migrateToNextjsVite && (await e.addDependencies({ type: "devDependencies", skipInstall: !0 }, [
|
|
947
|
+
"@storybook/nextjs-vite"
|
|
948
|
+
]), await e.removeDependencies(["@storybook/nextjs"]), qn(f._ast, {
|
|
949
|
+
StringLiteral(k) {
|
|
950
|
+
k.node.value === "@storybook/nextjs" && (k.node.value = "@storybook/nextjs-vite");
|
|
951
|
+
}
|
|
952
|
+
}), await In(f, c), t.frameworkPackageName = "@storybook/nextjs-vite", t.builderPackageName = "@storybook/builder-vite", await Pn({
|
|
953
|
+
promptMessage: "Enter a glob to scan for all @storybook/nextjs imports to substitute with @storybook/nextjs-vite:",
|
|
954
|
+
force: r.yes,
|
|
955
|
+
dryRun: !1,
|
|
956
|
+
transformFn: /* @__PURE__ */ i((k, E, P) => Rn(k, E, P), "transformFn"),
|
|
957
|
+
transformOptions: {
|
|
958
|
+
"@storybook/nextjs": "@storybook/nextjs-vite"
|
|
959
|
+
}
|
|
960
|
+
}));
|
|
961
|
+
let g = Ge.find(
|
|
962
|
+
(u) => J(t.frameworkPackageName, u)
|
|
963
|
+
) ? t.frameworkPackageName === "@storybook/nextjs" ? "@storybook/nextjs-vite" : t.frameworkPackageName : null, m = !!g, Fe = await (/* @__PURE__ */ i(async () => {
|
|
964
|
+
let u = [];
|
|
965
|
+
d && u.push("\u2022 The addon can not be used with a custom Webpack configuration."), !J(t.frameworkPackageName, "@storybook/nextjs") && !J(t.builderPackageName, "@storybook/builder-vite") && u.push(
|
|
966
|
+
"\u2022 The addon can only be used with a Vite-based Storybook framework or Next.js."
|
|
967
|
+
), m || u.push(v`
|
|
968
|
+
• The addon cannot yet be used with ${t.frameworkPackageName}
|
|
969
|
+
`), a && !(0, A.satisfies)(a, ">=3.0.0") && u.push(v`
|
|
970
|
+
• The addon requires Vitest 3.0.0 or higher. You are currently using ${n}.
|
|
65
971
|
Please update all of your Vitest dependencies and try again.
|
|
66
|
-
`);
|
|
67
|
-
|
|
972
|
+
`);
|
|
973
|
+
let k = await e.getInstalledVersion("msw"), E = k ? (0, A.coerce)(k) : null;
|
|
974
|
+
return E && !(0, A.satisfies)(E, ">=2.0.0") && u.push(v`
|
|
975
|
+
• 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
976
|
Please update the 'msw' package and try again.
|
|
69
|
-
`),
|
|
977
|
+
`), J(t.frameworkPackageName, "@storybook/nextjs") && (await e.getInstalledVersion("next") || u.push(v`
|
|
70
978
|
• You are using @storybook/nextjs without having "next" installed.
|
|
71
979
|
Please install "next" or use a different Storybook framework integration and try again.
|
|
72
|
-
`)),
|
|
73
|
-
|
|
980
|
+
`)), u.length > 0 ? (u.unshift(
|
|
981
|
+
"@storybook/addon-vitest's automated setup failed due to the following package incompatibilities:"
|
|
982
|
+
), u.push("--------------------------------"), u.push(
|
|
983
|
+
v`
|
|
984
|
+
You can fix these issues and rerun the command to reinstall. If you wish to roll back the installation, remove ${Ar} from the "addons" array
|
|
74
985
|
in your main Storybook config file and remove the dependency from your package.json file.
|
|
75
|
-
`
|
|
986
|
+
`
|
|
987
|
+
), m ? u.push(
|
|
988
|
+
v`
|
|
76
989
|
Fear not, however, you can follow the manual installation process instead at:
|
|
77
|
-
https://storybook.js.org/docs/next/${
|
|
78
|
-
`
|
|
990
|
+
https://storybook.js.org/docs/next/${C}#manual-setup
|
|
991
|
+
`
|
|
992
|
+
) : u.push(
|
|
993
|
+
v`
|
|
79
994
|
Please check the documentation for more information about its requirements and installation:
|
|
80
|
-
https://storybook.js.org/docs/next/${
|
|
81
|
-
`
|
|
995
|
+
https://storybook.js.org/docs/next/${C}
|
|
996
|
+
`
|
|
997
|
+
), u.map((P) => P.trim()).join(`
|
|
82
998
|
|
|
83
|
-
`)):null
|
|
999
|
+
`)) : null;
|
|
1000
|
+
}, "prerequisiteCheck"))();
|
|
1001
|
+
if (Fe) {
|
|
1002
|
+
K("\u26D4\uFE0F Sorry!", Fe), w.line(1);
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
if (t.frameworkPackageName === "@storybook/nextjs") {
|
|
1006
|
+
Re(
|
|
1007
|
+
"\u{1F37F} Just so you know...",
|
|
1008
|
+
v`
|
|
84
1009
|
It looks like you're using Next.js.
|
|
85
1010
|
|
|
86
1011
|
Adding "@storybook/nextjs-vite/vite-plugin" so you can use it with Vitest.
|
|
87
1012
|
|
|
88
1013
|
More info about the plugin at https://github.com/storybookjs/vite-plugin-storybook-nextjs
|
|
89
|
-
`
|
|
1014
|
+
`
|
|
1015
|
+
);
|
|
1016
|
+
try {
|
|
1017
|
+
let u = await e.getInstalledVersion("storybook");
|
|
1018
|
+
o.push(`@storybook/nextjs-vite@^${u}`);
|
|
1019
|
+
} catch {
|
|
1020
|
+
console.error("Failed to install @storybook/nextjs-vite. Please install it manually");
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
let Fr = await e.getInstalledVersion("@vitest/coverage-v8"), Lr = await e.getInstalledVersion("@vitest/coverage-istanbul");
|
|
1024
|
+
!Fr && !Lr && (Re(
|
|
1025
|
+
"\u{1F648} Let me cover this for you",
|
|
1026
|
+
v`
|
|
90
1027
|
You don't seem to have a coverage reporter installed. Vitest needs either V8 or Istanbul to generate coverage reports.
|
|
91
1028
|
|
|
92
1029
|
Adding "@vitest/coverage-v8" to enable coverage reporting.
|
|
93
1030
|
Read more about Vitest coverage providers at https://vitest.dev/guide/coverage.html#coverage-providers
|
|
94
|
-
`
|
|
1031
|
+
`
|
|
1032
|
+
), o.push("@vitest/coverage-v8"));
|
|
1033
|
+
let le = o.map((u) => u.includes("vitest") && n ? `${u}@${n}` : u);
|
|
1034
|
+
le.length > 0 && (await e.addDependencies(
|
|
1035
|
+
{ type: "devDependencies", skipInstall: !0 },
|
|
1036
|
+
le
|
|
1037
|
+
), w.line(1), w.plain(`${O} Installing dependencies:`), w.plain(" " + le.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(`${O} Configuring Playwright with Chromium (this might take some time):`), w.plain(" npx playwright install chromium --with-deps"), await e.executeCommand({
|
|
1038
|
+
command: "npx",
|
|
1039
|
+
args: ["playwright", "install", "chromium", "--with-deps"]
|
|
1040
|
+
}));
|
|
1041
|
+
let ce = s.typescript || await D("tsconfig", [...Ne, ".json"]) ? "ts" : "js", I = F(r.configDir, `vitest.setup.${ce}`);
|
|
1042
|
+
if (Tr(I)) {
|
|
1043
|
+
K(
|
|
1044
|
+
"\u{1F6A8} Oh no!",
|
|
1045
|
+
v`
|
|
95
1046
|
Found an existing Vitest setup file:
|
|
96
|
-
${
|
|
1047
|
+
${I}
|
|
97
1048
|
|
|
98
1049
|
Please refer to the documentation to complete the setup manually:
|
|
99
|
-
https://storybook.js.org/docs/next/${
|
|
100
|
-
`
|
|
101
|
-
|
|
1050
|
+
https://storybook.js.org/docs/next/${C}#manual-setup
|
|
1051
|
+
`
|
|
1052
|
+
), w.line(1);
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
w.line(1), w.plain(`${O} Creating a Vitest setup file for Storybook:`), w.plain(` ${I}`);
|
|
1056
|
+
let Wr = Ne.map((u) => F(r.configDir, `preview${u}`)).some(
|
|
1057
|
+
Tr
|
|
1058
|
+
), Le = [`import { setProjectAnnotations } from '${g}';`], We = [];
|
|
1059
|
+
Wr && (Le.push("import * as projectAnnotations from './preview';"), We.push("projectAnnotations")), await X(
|
|
1060
|
+
I,
|
|
1061
|
+
v`
|
|
1062
|
+
${Le.join(`
|
|
102
1063
|
`)}
|
|
103
1064
|
|
|
104
1065
|
// This is an important step to apply the right configuration when testing your stories.
|
|
105
1066
|
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
|
|
106
|
-
setProjectAnnotations([${
|
|
107
|
-
`
|
|
1067
|
+
setProjectAnnotations([${We.join(", ")}]);
|
|
1068
|
+
`
|
|
1069
|
+
);
|
|
1070
|
+
let R = await D("vitest.workspace", [".ts", ".js", ".json"]) || await D("vitest.projects", [".ts", ".js", ".json"]), ue = await D("vite.config"), pe = await D("vitest.config"), _r = await D("vitest.shims.d"), T = pe || ue, fe = `{
|
|
108
1071
|
enabled: true,
|
|
109
1072
|
headless: true,
|
|
110
1073
|
provider: 'playwright',
|
|
111
1074
|
instances: [{ browser: 'chromium' }]
|
|
112
|
-
}`;
|
|
113
|
-
|
|
1075
|
+
}`;
|
|
1076
|
+
if (ce === "ts" && !_r && await X(
|
|
1077
|
+
"vitest.shims.d.ts",
|
|
1078
|
+
'/// <reference types="@vitest/browser/providers/playwright" />'
|
|
1079
|
+
), R) {
|
|
1080
|
+
let u = await ie("vitest.workspace.template.ts", {
|
|
1081
|
+
EXTENDS_WORKSPACE: ue ? L(W(R), ue) : "",
|
|
1082
|
+
CONFIG_DIR: r.configDir,
|
|
1083
|
+
BROWSER_CONFIG: fe,
|
|
1084
|
+
SETUP_FILE: L(W(R), I)
|
|
1085
|
+
}).then((N) => N.replace(`
|
|
1086
|
+
'ROOT_CONFIG',`, "").replace(/\s+extends: '',/, "")), k = await Ae.readFile(R, "utf8"), E = ae(u), P = ae(k);
|
|
1087
|
+
if (Ir(E, P)) {
|
|
1088
|
+
w.line(1), w.plain(`${O} Updating your Vitest workspace file:`), w.plain(` ${R}`);
|
|
1089
|
+
let N = await Ie(R, Vr(P).code);
|
|
1090
|
+
await X(R, N);
|
|
1091
|
+
} else {
|
|
1092
|
+
K(
|
|
1093
|
+
"\u{1F6A8} Oh no!",
|
|
1094
|
+
v`
|
|
114
1095
|
Could not update existing Vitest workspace file:
|
|
115
|
-
${
|
|
1096
|
+
${R}
|
|
116
1097
|
|
|
117
1098
|
I was able to configure most of the addon but could not safely extend
|
|
118
1099
|
your existing workspace file automatically, you must do it yourself.
|
|
119
1100
|
|
|
120
1101
|
Please refer to the documentation to complete the setup manually:
|
|
121
|
-
https://storybook.js.org/docs/next/${
|
|
122
|
-
`
|
|
123
|
-
|
|
124
|
-
|
|
1102
|
+
https://storybook.js.org/docs/next/${C}#manual-setup
|
|
1103
|
+
`
|
|
1104
|
+
), w.line(1);
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
} else if (T) {
|
|
1108
|
+
let u, k, E = await Ae.readFile(T, "utf8"), P = E.includes("projects:"), _e = E.match(
|
|
1109
|
+
/\/\/\/\s*<reference\s+types=["']vitest\/config["']\s*\/>/
|
|
1110
|
+
), N = P || l ? "vitest.config.3.2.template.ts" : "vitest.config.template.ts";
|
|
1111
|
+
if (N) {
|
|
1112
|
+
let z = await ie(N, {
|
|
1113
|
+
CONFIG_DIR: r.configDir,
|
|
1114
|
+
BROWSER_CONFIG: fe,
|
|
1115
|
+
SETUP_FILE: L(W(T), I)
|
|
1116
|
+
}), Gr = ae(z);
|
|
1117
|
+
u = ae(E), k = Or(Gr, u);
|
|
1118
|
+
}
|
|
1119
|
+
if (u && k) {
|
|
1120
|
+
w.line(1), w.plain(`${O} Updating your ${pe ? "Vitest" : "Vite"} config file:`), w.plain(` ${T}`);
|
|
1121
|
+
let z = await Ie(T, Vr(u).code);
|
|
1122
|
+
await X(
|
|
1123
|
+
T,
|
|
1124
|
+
_e ? z : `/// <reference types="vitest/config" />
|
|
1125
|
+
` + z
|
|
1126
|
+
);
|
|
1127
|
+
} else
|
|
1128
|
+
K(
|
|
1129
|
+
"\u{1F6A8} Oh no!",
|
|
1130
|
+
v`
|
|
1131
|
+
We were unable to update your existing ${pe ? "Vitest" : "Vite"} config file.
|
|
125
1132
|
|
|
126
1133
|
Please refer to the documentation to complete the setup manually:
|
|
127
1134
|
https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup
|
|
128
|
-
`
|
|
129
|
-
|
|
1135
|
+
`
|
|
1136
|
+
);
|
|
1137
|
+
} else {
|
|
1138
|
+
let u = F(`vitest.config.${ce}`), k = await ie(
|
|
1139
|
+
l ? "vitest.config.3.2.template.ts" : "vitest.config.template.ts",
|
|
1140
|
+
{
|
|
1141
|
+
CONFIG_DIR: r.configDir,
|
|
1142
|
+
BROWSER_CONFIG: fe,
|
|
1143
|
+
SETUP_FILE: L(W(u), I)
|
|
1144
|
+
}
|
|
1145
|
+
);
|
|
1146
|
+
w.line(1), w.plain(`${O} Creating a Vitest config file:`), w.plain(` ${u}`);
|
|
1147
|
+
let E = await Ie(u, k);
|
|
1148
|
+
await X(u, E);
|
|
1149
|
+
}
|
|
1150
|
+
if (t.addons.find((u) => u.includes(Te)))
|
|
1151
|
+
try {
|
|
1152
|
+
w.plain(`${O} Setting up ${Te} for @storybook/addon-vitest:`);
|
|
1153
|
+
let u = ["automigrate", "addon-a11y-addon-test"];
|
|
1154
|
+
u.push("--loglevel", "silent"), u.push("--yes", "--skip-doctor"), r.packageManager && u.push("--package-manager", r.packageManager), r.skipInstall && u.push("--skip-install"), r.configDir !== ".storybook" && u.push("--config-dir", r.configDir), await Ye("storybook", u, {
|
|
1155
|
+
stdio: "inherit"
|
|
1156
|
+
});
|
|
1157
|
+
} catch (u) {
|
|
1158
|
+
K(
|
|
1159
|
+
"\u{1F6A8} Oh no!",
|
|
1160
|
+
v`
|
|
1161
|
+
We have detected that you have ${Te} installed but could not automatically set it up for @storybook/addon-vitest:
|
|
130
1162
|
|
|
131
|
-
${
|
|
1163
|
+
${u instanceof Error ? u.message : String(u)}
|
|
132
1164
|
|
|
133
1165
|
Please refer to the documentation to complete the setup manually:
|
|
134
1166
|
https://storybook.js.org/docs/writing-tests/accessibility-testing#test-addon-integration
|
|
135
|
-
`
|
|
1167
|
+
`
|
|
1168
|
+
);
|
|
1169
|
+
}
|
|
1170
|
+
Dr ? Pr(
|
|
1171
|
+
"\u26A0\uFE0F Done, but with errors!",
|
|
1172
|
+
v`
|
|
136
1173
|
@storybook/addon-vitest was installed successfully, but there were some errors during the setup process.
|
|
137
1174
|
|
|
138
1175
|
Please refer to the documentation to complete the setup manually and check the errors above:
|
|
139
|
-
https://storybook.js.org/docs/next/${
|
|
140
|
-
`
|
|
1176
|
+
https://storybook.js.org/docs/next/${C}#manual-setup
|
|
1177
|
+
`
|
|
1178
|
+
) : Ce(
|
|
1179
|
+
"\u{1F389} All done!",
|
|
1180
|
+
v`
|
|
141
1181
|
@storybook/addon-vitest is now configured and you're ready to run your tests!
|
|
142
1182
|
|
|
143
1183
|
Here are a couple of tips to get you started:
|
|
144
|
-
• You can run tests with "${
|
|
1184
|
+
• You can run tests with "${T ? "npx vitest --project=storybook" : "npx vitest"}"
|
|
145
1185
|
• When using the Vitest extension in your editor, all of your stories will be shown as tests!
|
|
146
1186
|
|
|
147
1187
|
Check the documentation for more information about its features and options at:
|
|
148
|
-
https://storybook.js.org/docs/next/${
|
|
149
|
-
`
|
|
150
|
-
|
|
151
|
-
|
|
1188
|
+
https://storybook.js.org/docs/next/${C}
|
|
1189
|
+
`
|
|
1190
|
+
), w.line(1);
|
|
1191
|
+
}
|
|
1192
|
+
i(Vn, "postInstall");
|
|
1193
|
+
async function Ve(r) {
|
|
1194
|
+
let e = r.startsWith("file://") ? bn(r) : r;
|
|
1195
|
+
if (!xn(e))
|
|
1196
|
+
return e;
|
|
1197
|
+
let t = await me("package.json", {
|
|
1198
|
+
cwd: e
|
|
1199
|
+
});
|
|
1200
|
+
if (!t)
|
|
1201
|
+
throw new Error(`Could not find package.json in path: ${e}`);
|
|
1202
|
+
let { default: s } = await import(t, { with: { type: "json" } });
|
|
1203
|
+
return s.name;
|
|
1204
|
+
}
|
|
1205
|
+
i(Ve, "getPackageNameFromPath");
|
|
1206
|
+
async function An({ configDir: r, packageManager: e }) {
|
|
1207
|
+
let t = Nr.getPackageManager({ force: e, configDir: r }), { packageJson: s } = t.primaryPackageJson, o = await Sn({ configDir: r }), { presets: n } = await Cn({
|
|
1208
|
+
configDir: r,
|
|
1209
|
+
packageJson: s
|
|
1210
|
+
}), a = await n.apply("framework", {}), l = await n.apply("core", {}), { builder: c, renderer: f } = l;
|
|
1211
|
+
if (!c)
|
|
1212
|
+
throw new Error("Could not detect your Storybook builder.");
|
|
1213
|
+
let d = await Ve(
|
|
1214
|
+
typeof a == "string" ? a : a.name
|
|
1215
|
+
), p = await Ve(
|
|
1216
|
+
typeof c == "string" ? c : c.name
|
|
1217
|
+
), g;
|
|
1218
|
+
return f && (g = await Ve(f)), {
|
|
1219
|
+
frameworkPackageName: d,
|
|
1220
|
+
builderPackageName: p,
|
|
1221
|
+
rendererPackageName: g,
|
|
1222
|
+
addons: Ue(o)
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
i(An, "getStorybookInfo");
|
|
1226
|
+
export {
|
|
1227
|
+
Vn as default
|
|
1228
|
+
};
|