storybook 9.1.0-alpha.4 → 9.1.0-alpha.6
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/bin/index.cjs +62 -69
- package/dist/bin/index.js +43 -50
- package/dist/cli/bin/index.cjs +604 -604
- package/dist/cli/bin/index.js +151 -150
- package/dist/cli/index.cjs +13787 -13796
- package/dist/cli/index.d.ts +706 -15
- package/dist/cli/index.js +12363 -12371
- package/dist/common/index.cjs +10988 -10891
- package/dist/common/index.d.ts +342 -69
- package/dist/common/index.js +24631 -24531
- package/dist/components/index.cjs +5 -3
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +5 -3
- package/dist/controls/preview.cjs +14 -14
- package/dist/controls/preview.d.ts +1 -1
- package/dist/controls/preview.js +2 -2
- package/dist/core-server/index.cjs +4838 -4791
- package/dist/core-server/index.d.ts +10 -1
- package/dist/core-server/index.js +5746 -5699
- package/dist/core-server/presets/common-manager.js +46 -32
- package/dist/core-server/presets/common-preset.cjs +1047 -1045
- package/dist/core-server/presets/common-preset.js +2053 -2048
- package/dist/csf/index.d.ts +2 -1
- package/dist/csf-tools/index.cjs +226 -224
- package/dist/csf-tools/index.js +116 -112
- package/dist/manager/globals-runtime.js +6 -4
- package/dist/manager-api/index.cjs +73 -73
- package/dist/manager-api/index.js +140 -140
- package/dist/node-logger/index.cjs +8520 -994
- package/dist/node-logger/index.d.ts +395 -2
- package/dist/node-logger/index.js +8535 -995
- package/dist/server-errors.cjs +201 -242
- package/dist/server-errors.d.ts +1 -12
- package/dist/server-errors.js +182 -223
- package/dist/telemetry/index.cjs +1326 -1325
- package/dist/telemetry/index.d.ts +3 -2
- package/dist/telemetry/index.js +1217 -1214
- package/dist/types/index.d.ts +3 -3
- package/package.json +18 -9
package/dist/telemetry/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
|
4
4
|
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
6
6
|
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
7
|
-
var
|
|
7
|
+
var Oi = Object.create;
|
|
8
8
|
var Gt = Object.defineProperty;
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
9
|
+
var Ri = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var Ni = Object.getOwnPropertyNames;
|
|
11
|
+
var Zi = Object.getPrototypeOf, Mi = Object.prototype.hasOwnProperty;
|
|
12
12
|
var i = (t, e) => Gt(t, "name", { value: e, configurable: !0 }), O = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
|
|
13
13
|
"u" ? new Proxy(t, {
|
|
14
14
|
get: (e, r) => (typeof require < "u" ? require : e)[r]
|
|
@@ -16,15 +16,15 @@ var i = (t, e) => Gt(t, "name", { value: e, configurable: !0 }), O = /* @__PURE_
|
|
|
16
16
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
17
17
|
throw Error('Dynamic require of "' + t + '" is not supported');
|
|
18
18
|
});
|
|
19
|
-
var
|
|
19
|
+
var on = (t, e) => () => (t && (e = t(t = 0)), e);
|
|
20
20
|
var I = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
|
|
21
|
-
var
|
|
21
|
+
var Di = (t, e, r, n) => {
|
|
22
22
|
if (e && typeof e == "object" || typeof e == "function")
|
|
23
|
-
for (let s of
|
|
24
|
-
!
|
|
23
|
+
for (let s of Ni(e))
|
|
24
|
+
!Mi.call(t, s) && s !== r && Gt(t, s, { get: () => e[s], enumerable: !(n = Ri(e, s)) || n.enumerable });
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var z = (t, e, r) => (r = t != null ? Oi(Zi(t)) : {}, Di(
|
|
28
28
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
29
|
// file that has been converted to a CommonJS file using a Babel-
|
|
30
30
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -34,19 +34,19 @@ var G = (t, e, r) => (r = t != null ? ji(Ri(t)) : {}, Zi(
|
|
|
34
34
|
));
|
|
35
35
|
|
|
36
36
|
// ../node_modules/picocolors/picocolors.js
|
|
37
|
-
var
|
|
38
|
-
var tt = process || {},
|
|
39
|
-
includes("--color") || tt.platform === "win32" || (tt.stdout || {}).isTTY && et.TERM !== "dumb" || !!et.CI),
|
|
37
|
+
var dn = I((jl, zt) => {
|
|
38
|
+
var tt = process || {}, an = tt.argv || [], et = tt.env || {}, Li = !(et.NO_COLOR || an.includes("--no-color")) && (!!et.FORCE_COLOR || an.
|
|
39
|
+
includes("--color") || tt.platform === "win32" || (tt.stdout || {}).isTTY && et.TERM !== "dumb" || !!et.CI), Ui = /* @__PURE__ */ i((t, e, r = t) => (n) => {
|
|
40
40
|
let s = "" + n, o = s.indexOf(e, t.length);
|
|
41
|
-
return ~o ? t +
|
|
42
|
-
}, "formatter"),
|
|
41
|
+
return ~o ? t + $i(s, e, r, o) + e : t + s + e;
|
|
42
|
+
}, "formatter"), $i = /* @__PURE__ */ i((t, e, r, n) => {
|
|
43
43
|
let s = "", o = 0;
|
|
44
44
|
do
|
|
45
45
|
s += t.substring(o, n) + r, o = n + e.length, n = t.indexOf(e, o);
|
|
46
46
|
while (~n);
|
|
47
47
|
return s + t.substring(o);
|
|
48
|
-
}, "replaceClose"),
|
|
49
|
-
let e = t ?
|
|
48
|
+
}, "replaceClose"), cn = /* @__PURE__ */ i((t = Li) => {
|
|
49
|
+
let e = t ? Ui : () => String;
|
|
50
50
|
return {
|
|
51
51
|
isColorSupported: t,
|
|
52
52
|
reset: e("\x1B[0m", "\x1B[0m"),
|
|
@@ -92,25 +92,25 @@ var cn = I((Cl, zt) => {
|
|
|
92
92
|
bgWhiteBright: e("\x1B[107m", "\x1B[49m")
|
|
93
93
|
};
|
|
94
94
|
}, "createColors");
|
|
95
|
-
zt.exports =
|
|
96
|
-
zt.exports.createColors =
|
|
95
|
+
zt.exports = cn();
|
|
96
|
+
zt.exports.createColors = cn;
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
// ../node_modules/walk-up-path/dist/cjs/index.js
|
|
100
|
-
var
|
|
100
|
+
var vn = I((st) => {
|
|
101
101
|
"use strict";
|
|
102
102
|
Object.defineProperty(st, "__esModule", { value: !0 });
|
|
103
103
|
st.walkUp = void 0;
|
|
104
|
-
var
|
|
105
|
-
for (t = (0,
|
|
104
|
+
var gn = O("path"), Fi = /* @__PURE__ */ i(function* (t) {
|
|
105
|
+
for (t = (0, gn.resolve)(t); t; ) {
|
|
106
106
|
yield t;
|
|
107
|
-
let e = (0,
|
|
107
|
+
let e = (0, gn.dirname)(t);
|
|
108
108
|
if (e === t)
|
|
109
109
|
break;
|
|
110
110
|
t = e;
|
|
111
111
|
}
|
|
112
112
|
}, "walkUp");
|
|
113
|
-
st.walkUp =
|
|
113
|
+
st.walkUp = Fi;
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
// ../node_modules/zod/lib/helpers/util.js
|
|
@@ -155,14 +155,14 @@ var Ne = I((E) => {
|
|
|
155
155
|
}
|
|
156
156
|
i(n, "joinValues"), t.joinValues = n, t.jsonStringifyReplacer = (s, o) => typeof o == "bigint" ? o.toString() : o;
|
|
157
157
|
})(Qt || (E.util = Qt = {}));
|
|
158
|
-
var
|
|
158
|
+
var Tn;
|
|
159
159
|
(function(t) {
|
|
160
160
|
t.mergeShapes = (e, r) => ({
|
|
161
161
|
...e,
|
|
162
162
|
...r
|
|
163
163
|
// second overwrites first
|
|
164
164
|
});
|
|
165
|
-
})(
|
|
165
|
+
})(Tn || (E.objectUtil = Tn = {}));
|
|
166
166
|
E.ZodParsedType = Qt.arrayToEnum([
|
|
167
167
|
"string",
|
|
168
168
|
"nan",
|
|
@@ -185,7 +185,7 @@ var Ne = I((E) => {
|
|
|
185
185
|
"map",
|
|
186
186
|
"set"
|
|
187
187
|
]);
|
|
188
|
-
var
|
|
188
|
+
var Qi = /* @__PURE__ */ i((t) => {
|
|
189
189
|
switch (typeof t) {
|
|
190
190
|
case "undefined":
|
|
191
191
|
return E.ZodParsedType.undefined;
|
|
@@ -209,16 +209,16 @@ u" && t instanceof Set ? E.ZodParsedType.set : typeof Date < "u" && t instanceof
|
|
|
209
209
|
return E.ZodParsedType.unknown;
|
|
210
210
|
}
|
|
211
211
|
}, "getParsedType");
|
|
212
|
-
E.getParsedType =
|
|
212
|
+
E.getParsedType = Qi;
|
|
213
213
|
});
|
|
214
214
|
|
|
215
215
|
// ../node_modules/zod/lib/ZodError.js
|
|
216
|
-
var it = I((
|
|
216
|
+
var it = I((K) => {
|
|
217
217
|
"use strict";
|
|
218
|
-
Object.defineProperty(
|
|
219
|
-
|
|
220
|
-
var
|
|
221
|
-
|
|
218
|
+
Object.defineProperty(K, "__esModule", { value: !0 });
|
|
219
|
+
K.ZodError = K.quotelessJson = K.ZodIssueCode = void 0;
|
|
220
|
+
var In = Ne();
|
|
221
|
+
K.ZodIssueCode = In.util.arrayToEnum([
|
|
222
222
|
"invalid_type",
|
|
223
223
|
"invalid_literal",
|
|
224
224
|
"custom",
|
|
@@ -236,8 +236,8 @@ var it = I((z) => {
|
|
|
236
236
|
"not_multiple_of",
|
|
237
237
|
"not_finite"
|
|
238
238
|
]);
|
|
239
|
-
var
|
|
240
|
-
|
|
239
|
+
var ea = /* @__PURE__ */ i((t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:"), "quotelessJson");
|
|
240
|
+
K.quotelessJson = ea;
|
|
241
241
|
var Ze = class t extends Error {
|
|
242
242
|
static {
|
|
243
243
|
i(this, "ZodError");
|
|
@@ -286,7 +286,7 @@ var it = I((z) => {
|
|
|
286
286
|
return this.message;
|
|
287
287
|
}
|
|
288
288
|
get message() {
|
|
289
|
-
return JSON.stringify(this.issues,
|
|
289
|
+
return JSON.stringify(this.issues, In.util.jsonStringifyReplacer, 2);
|
|
290
290
|
}
|
|
291
291
|
get isEmpty() {
|
|
292
292
|
return this.issues.length === 0;
|
|
@@ -301,7 +301,7 @@ var it = I((z) => {
|
|
|
301
301
|
return this.flatten();
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
-
|
|
304
|
+
K.ZodError = Ze;
|
|
305
305
|
Ze.create = (t) => new Ze(t);
|
|
306
306
|
});
|
|
307
307
|
|
|
@@ -309,7 +309,7 @@ var it = I((z) => {
|
|
|
309
309
|
var tr = I((er) => {
|
|
310
310
|
"use strict";
|
|
311
311
|
Object.defineProperty(er, "__esModule", { value: !0 });
|
|
312
|
-
var ee = Ne(), A = it(),
|
|
312
|
+
var ee = Ne(), A = it(), ta = /* @__PURE__ */ i((t, e) => {
|
|
313
313
|
let r;
|
|
314
314
|
switch (t.code) {
|
|
315
315
|
case A.ZodIssueCode.invalid_type:
|
|
@@ -378,42 +378,42 @@ ater than "}${new Date(Number(t.minimum))}` : r = "Invalid input";
|
|
|
378
378
|
}
|
|
379
379
|
return { message: r };
|
|
380
380
|
}, "errorMap");
|
|
381
|
-
er.default =
|
|
381
|
+
er.default = ta;
|
|
382
382
|
});
|
|
383
383
|
|
|
384
384
|
// ../node_modules/zod/lib/errors.js
|
|
385
|
-
var at = I((
|
|
385
|
+
var at = I((V) => {
|
|
386
386
|
"use strict";
|
|
387
|
-
var
|
|
387
|
+
var ra = V && V.__importDefault || function(t) {
|
|
388
388
|
return t && t.__esModule ? t : { default: t };
|
|
389
389
|
};
|
|
390
|
-
Object.defineProperty(
|
|
391
|
-
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
var
|
|
395
|
-
function
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
i(
|
|
399
|
-
|
|
400
|
-
function
|
|
401
|
-
return
|
|
402
|
-
}
|
|
403
|
-
i(
|
|
404
|
-
|
|
390
|
+
Object.defineProperty(V, "__esModule", { value: !0 });
|
|
391
|
+
V.getErrorMap = V.setErrorMap = V.defaultErrorMap = void 0;
|
|
392
|
+
var Sn = ra(tr());
|
|
393
|
+
V.defaultErrorMap = Sn.default;
|
|
394
|
+
var En = Sn.default;
|
|
395
|
+
function na(t) {
|
|
396
|
+
En = t;
|
|
397
|
+
}
|
|
398
|
+
i(na, "setErrorMap");
|
|
399
|
+
V.setErrorMap = na;
|
|
400
|
+
function sa() {
|
|
401
|
+
return En;
|
|
402
|
+
}
|
|
403
|
+
i(sa, "getErrorMap");
|
|
404
|
+
V.getErrorMap = sa;
|
|
405
405
|
});
|
|
406
406
|
|
|
407
407
|
// ../node_modules/zod/lib/helpers/parseUtil.js
|
|
408
408
|
var nr = I((T) => {
|
|
409
409
|
"use strict";
|
|
410
|
-
var
|
|
410
|
+
var oa = T && T.__importDefault || function(t) {
|
|
411
411
|
return t && t.__esModule ? t : { default: t };
|
|
412
412
|
};
|
|
413
413
|
Object.defineProperty(T, "__esModule", { value: !0 });
|
|
414
414
|
T.isAsync = T.isValid = T.isDirty = T.isAborted = T.OK = T.DIRTY = T.INVALID = T.ParseStatus = T.addIssueToContext = T.EMPTY_PATH = T.makeIssue =
|
|
415
415
|
void 0;
|
|
416
|
-
var
|
|
416
|
+
var ia = at(), Cn = oa(tr()), aa = /* @__PURE__ */ i((t) => {
|
|
417
417
|
let { data: e, path: r, errorMaps: n, issueData: s } = t, o = [...r, ...s.path || []], a = {
|
|
418
418
|
...s,
|
|
419
419
|
path: o
|
|
@@ -433,10 +433,10 @@ var nr = I((T) => {
|
|
|
433
433
|
message: c
|
|
434
434
|
};
|
|
435
435
|
}, "makeIssue");
|
|
436
|
-
T.makeIssue =
|
|
436
|
+
T.makeIssue = aa;
|
|
437
437
|
T.EMPTY_PATH = [];
|
|
438
|
-
function
|
|
439
|
-
let r = (0,
|
|
438
|
+
function ca(t, e) {
|
|
439
|
+
let r = (0, ia.getErrorMap)(), n = (0, T.makeIssue)({
|
|
440
440
|
issueData: e,
|
|
441
441
|
data: t.data,
|
|
442
442
|
path: t.path,
|
|
@@ -447,14 +447,14 @@ var nr = I((T) => {
|
|
|
447
447
|
// then schema-bound map if available
|
|
448
448
|
r,
|
|
449
449
|
// then global override map
|
|
450
|
-
r ===
|
|
450
|
+
r === Cn.default ? void 0 : Cn.default
|
|
451
451
|
// then global default map
|
|
452
452
|
].filter((s) => !!s)
|
|
453
453
|
});
|
|
454
454
|
t.common.issues.push(n);
|
|
455
455
|
}
|
|
456
|
-
i(
|
|
457
|
-
T.addIssueToContext =
|
|
456
|
+
i(ca, "addIssueToContext");
|
|
457
|
+
T.addIssueToContext = ca;
|
|
458
458
|
var rr = class t {
|
|
459
459
|
static {
|
|
460
460
|
i(this, "ParseStatus");
|
|
@@ -504,46 +504,46 @@ var nr = I((T) => {
|
|
|
504
504
|
T.INVALID = Object.freeze({
|
|
505
505
|
status: "aborted"
|
|
506
506
|
});
|
|
507
|
-
var
|
|
508
|
-
T.DIRTY =
|
|
509
|
-
var
|
|
510
|
-
T.OK =
|
|
511
|
-
var
|
|
512
|
-
T.isAborted =
|
|
513
|
-
var
|
|
514
|
-
T.isDirty =
|
|
515
|
-
var
|
|
516
|
-
T.isValid =
|
|
517
|
-
var
|
|
518
|
-
T.isAsync =
|
|
507
|
+
var da = /* @__PURE__ */ i((t) => ({ status: "dirty", value: t }), "DIRTY");
|
|
508
|
+
T.DIRTY = da;
|
|
509
|
+
var ua = /* @__PURE__ */ i((t) => ({ status: "valid", value: t }), "OK");
|
|
510
|
+
T.OK = ua;
|
|
511
|
+
var la = /* @__PURE__ */ i((t) => t.status === "aborted", "isAborted");
|
|
512
|
+
T.isAborted = la;
|
|
513
|
+
var pa = /* @__PURE__ */ i((t) => t.status === "dirty", "isDirty");
|
|
514
|
+
T.isDirty = pa;
|
|
515
|
+
var fa = /* @__PURE__ */ i((t) => t.status === "valid", "isValid");
|
|
516
|
+
T.isValid = fa;
|
|
517
|
+
var ma = /* @__PURE__ */ i((t) => typeof Promise < "u" && t instanceof Promise, "isAsync");
|
|
518
|
+
T.isAsync = ma;
|
|
519
519
|
});
|
|
520
520
|
|
|
521
521
|
// ../node_modules/zod/lib/helpers/typeAliases.js
|
|
522
|
-
var
|
|
522
|
+
var jn = I((Pn) => {
|
|
523
523
|
"use strict";
|
|
524
|
-
Object.defineProperty(
|
|
524
|
+
Object.defineProperty(Pn, "__esModule", { value: !0 });
|
|
525
525
|
});
|
|
526
526
|
|
|
527
527
|
// ../node_modules/zod/lib/helpers/errorUtil.js
|
|
528
|
-
var
|
|
528
|
+
var On = I((ct) => {
|
|
529
529
|
"use strict";
|
|
530
530
|
Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
531
531
|
ct.errorUtil = void 0;
|
|
532
|
-
var
|
|
532
|
+
var An;
|
|
533
533
|
(function(t) {
|
|
534
534
|
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
535
|
-
})(
|
|
535
|
+
})(An || (ct.errorUtil = An = {}));
|
|
536
536
|
});
|
|
537
537
|
|
|
538
538
|
// ../node_modules/zod/lib/types.js
|
|
539
|
-
var
|
|
539
|
+
var Wn = I((d) => {
|
|
540
540
|
"use strict";
|
|
541
541
|
var ut = d && d.__classPrivateFieldGet || function(t, e, r, n) {
|
|
542
542
|
if (r === "a" && !n) throw new TypeError("Private accessor was defined without a getter");
|
|
543
543
|
if (typeof e == "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did n\
|
|
544
544
|
ot declare it");
|
|
545
545
|
return r === "m" ? n : r === "a" ? n.call(t) : n ? n.value : e.get(t);
|
|
546
|
-
},
|
|
546
|
+
}, Zn = d && d.__classPrivateFieldSet || function(t, e, r, n, s) {
|
|
547
547
|
if (n === "m") throw new TypeError("Private method is not writable");
|
|
548
548
|
if (n === "a" && !s) throw new TypeError("Private accessor was defined without a setter");
|
|
549
549
|
if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did no\
|
|
@@ -560,7 +560,7 @@ t declare it");
|
|
|
560
560
|
d.promise = d.preprocess = d.pipeline = d.ostring = d.optional = d.onumber = d.oboolean = d.object = d.number = d.nullable = d.null = d.never =
|
|
561
561
|
d.nativeEnum = d.nan = d.map = d.literal = d.lazy = d.intersection = d.instanceof = d.function = d.enum = d.effect = d.discriminatedUnion =
|
|
562
562
|
d.date = void 0;
|
|
563
|
-
var dt = at(), y =
|
|
563
|
+
var dt = at(), y = On(), u = nr(), h = Ne(), m = it(), D = class {
|
|
564
564
|
static {
|
|
565
565
|
i(this, "ParseInputLazyPath");
|
|
566
566
|
}
|
|
@@ -571,7 +571,7 @@ t declare it");
|
|
|
571
571
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.
|
|
572
572
|
push(...this._path, this._key)), this._cachedPath;
|
|
573
573
|
}
|
|
574
|
-
},
|
|
574
|
+
}, Rn = /* @__PURE__ */ i((t, e) => {
|
|
575
575
|
if ((0, u.isValid)(e))
|
|
576
576
|
return { success: !0, data: e.value };
|
|
577
577
|
if (!t.common.issues.length)
|
|
@@ -586,7 +586,7 @@ t declare it");
|
|
|
586
586
|
}
|
|
587
587
|
};
|
|
588
588
|
}, "handleResult");
|
|
589
|
-
function
|
|
589
|
+
function b(t) {
|
|
590
590
|
if (!t)
|
|
591
591
|
return {};
|
|
592
592
|
let { errorMap: e, invalid_type_error: r, required_error: n, description: s } = t;
|
|
@@ -600,8 +600,8 @@ t declare it");
|
|
|
600
600
|
p : c.defaultError };
|
|
601
601
|
}, "customMap"), description: s };
|
|
602
602
|
}
|
|
603
|
-
i(
|
|
604
|
-
var
|
|
603
|
+
i(b, "processCreateParams");
|
|
604
|
+
var w = class {
|
|
605
605
|
static {
|
|
606
606
|
i(this, "ZodType");
|
|
607
607
|
}
|
|
@@ -664,7 +664,7 @@ t declare it");
|
|
|
664
664
|
data: e,
|
|
665
665
|
parsedType: (0, h.getParsedType)(e)
|
|
666
666
|
}, o = this._parseSync({ data: e, path: s.path, parent: s });
|
|
667
|
-
return
|
|
667
|
+
return Rn(s, o);
|
|
668
668
|
}
|
|
669
669
|
"~validate"(e) {
|
|
670
670
|
var r, n;
|
|
@@ -719,7 +719,7 @@ t declare it");
|
|
|
719
719
|
data: e,
|
|
720
720
|
parsedType: (0, h.getParsedType)(e)
|
|
721
721
|
}, s = this._parse({ data: e, path: n.path, parent: n }), o = await ((0, u.isAsync)(s) ? s : Promise.resolve(s));
|
|
722
|
-
return
|
|
722
|
+
return Rn(n, o);
|
|
723
723
|
}
|
|
724
724
|
refine(e, r) {
|
|
725
725
|
let n = /* @__PURE__ */ i((s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r, "getIssu\
|
|
@@ -763,13 +763,13 @@ eProperties");
|
|
|
763
763
|
return M.create(this, this._def);
|
|
764
764
|
}
|
|
765
765
|
nullable() {
|
|
766
|
-
return
|
|
766
|
+
return B.create(this, this._def);
|
|
767
767
|
}
|
|
768
768
|
nullish() {
|
|
769
769
|
return this.nullable().optional();
|
|
770
770
|
}
|
|
771
771
|
array() {
|
|
772
|
-
return
|
|
772
|
+
return G.create(this);
|
|
773
773
|
}
|
|
774
774
|
promise() {
|
|
775
775
|
return Y.create(this, this._def);
|
|
@@ -782,7 +782,7 @@ eProperties");
|
|
|
782
782
|
}
|
|
783
783
|
transform(e) {
|
|
784
784
|
return new Z({
|
|
785
|
-
...
|
|
785
|
+
...b(this._def),
|
|
786
786
|
schema: this,
|
|
787
787
|
typeName: g.ZodEffects,
|
|
788
788
|
effect: { type: "transform", transform: e }
|
|
@@ -791,7 +791,7 @@ eProperties");
|
|
|
791
791
|
default(e) {
|
|
792
792
|
let r = typeof e == "function" ? e : () => e;
|
|
793
793
|
return new fe({
|
|
794
|
-
...
|
|
794
|
+
...b(this._def),
|
|
795
795
|
innerType: this,
|
|
796
796
|
defaultValue: r,
|
|
797
797
|
typeName: g.ZodDefault
|
|
@@ -801,13 +801,13 @@ eProperties");
|
|
|
801
801
|
return new Le({
|
|
802
802
|
typeName: g.ZodBranded,
|
|
803
803
|
type: this,
|
|
804
|
-
...
|
|
804
|
+
...b(this._def)
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
catch(e) {
|
|
808
808
|
let r = typeof e == "function" ? e : () => e;
|
|
809
809
|
return new me({
|
|
810
|
-
...
|
|
810
|
+
...b(this._def),
|
|
811
811
|
innerType: this,
|
|
812
812
|
catchValue: r,
|
|
813
813
|
typeName: g.ZodCatch
|
|
@@ -833,39 +833,39 @@ eProperties");
|
|
|
833
833
|
return this.safeParse(null).success;
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
|
-
d.ZodType =
|
|
837
|
-
d.Schema =
|
|
838
|
-
d.ZodSchema =
|
|
839
|
-
var
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
onent})+$", sr,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",
|
|
848
|
-
function
|
|
836
|
+
d.ZodType = w;
|
|
837
|
+
d.Schema = w;
|
|
838
|
+
d.ZodSchema = w;
|
|
839
|
+
var ha = /^c[^\s-]{8,}$/i, ya = /^[0-9a-z]+$/, ga = /^[0-9A-HJKMNP-TV-Z]{26}$/i, va = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,
|
|
840
|
+
xa = /^[a-z0-9_-]{21}$/i, ba = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, wa = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,
|
|
841
|
+
_a = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ka = "^(\\p{Extended_Pictographic}|\\p{Emoji_Comp\
|
|
842
|
+
onent})+$", sr, Ta = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ia = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
843
|
+
Sa = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,
|
|
844
|
+
Ea = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
845
|
+
Ca = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Pa = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
846
|
+
Mn = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469\
|
|
847
|
+
]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ja = new RegExp(`^${Mn}$`);
|
|
848
|
+
function Dn(t) {
|
|
849
849
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
850
850
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
851
851
|
}
|
|
852
|
-
i(
|
|
853
|
-
function
|
|
854
|
-
return new RegExp(`^${
|
|
852
|
+
i(Dn, "timeRegexSource");
|
|
853
|
+
function Aa(t) {
|
|
854
|
+
return new RegExp(`^${Dn(t)}$`);
|
|
855
855
|
}
|
|
856
|
-
i(
|
|
857
|
-
function
|
|
858
|
-
let e = `${
|
|
856
|
+
i(Aa, "timeRegex");
|
|
857
|
+
function Ln(t) {
|
|
858
|
+
let e = `${Mn}T${Dn(t)}`, r = [];
|
|
859
859
|
return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
860
860
|
}
|
|
861
|
-
i(
|
|
862
|
-
d.datetimeRegex =
|
|
863
|
-
function
|
|
864
|
-
return !!((e === "v4" || !e) &&
|
|
861
|
+
i(Ln, "datetimeRegex");
|
|
862
|
+
d.datetimeRegex = Ln;
|
|
863
|
+
function Oa(t, e) {
|
|
864
|
+
return !!((e === "v4" || !e) && Ta.test(t) || (e === "v6" || !e) && Sa.test(t));
|
|
865
865
|
}
|
|
866
|
-
i(
|
|
867
|
-
function
|
|
868
|
-
if (!
|
|
866
|
+
i(Oa, "isValidIP");
|
|
867
|
+
function Ra(t, e) {
|
|
868
|
+
if (!ba.test(t))
|
|
869
869
|
return !1;
|
|
870
870
|
try {
|
|
871
871
|
let [r] = t.split("."), n = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), s = JSON.parse(atob(
|
|
@@ -875,12 +875,12 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
875
875
|
return !1;
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
i(
|
|
879
|
-
function
|
|
880
|
-
return !!((e === "v4" || !e) &&
|
|
878
|
+
i(Ra, "isValidJWT");
|
|
879
|
+
function Na(t, e) {
|
|
880
|
+
return !!((e === "v4" || !e) && Ia.test(t) || (e === "v6" || !e) && Ea.test(t));
|
|
881
881
|
}
|
|
882
|
-
i(
|
|
883
|
-
var
|
|
882
|
+
i(Na, "isValidCidr");
|
|
883
|
+
var J = class t extends w {
|
|
884
884
|
static {
|
|
885
885
|
i(this, "ZodString");
|
|
886
886
|
}
|
|
@@ -931,43 +931,43 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
931
931
|
message: o.message
|
|
932
932
|
}), n.dirty());
|
|
933
933
|
} else if (o.kind === "email")
|
|
934
|
-
|
|
934
|
+
_a.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
935
935
|
validation: "email",
|
|
936
936
|
code: m.ZodIssueCode.invalid_string,
|
|
937
937
|
message: o.message
|
|
938
938
|
}), n.dirty());
|
|
939
939
|
else if (o.kind === "emoji")
|
|
940
|
-
sr || (sr = new RegExp(
|
|
940
|
+
sr || (sr = new RegExp(ka, "u")), sr.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
941
941
|
validation: "emoji",
|
|
942
942
|
code: m.ZodIssueCode.invalid_string,
|
|
943
943
|
message: o.message
|
|
944
944
|
}), n.dirty());
|
|
945
945
|
else if (o.kind === "uuid")
|
|
946
|
-
|
|
946
|
+
va.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
947
947
|
validation: "uuid",
|
|
948
948
|
code: m.ZodIssueCode.invalid_string,
|
|
949
949
|
message: o.message
|
|
950
950
|
}), n.dirty());
|
|
951
951
|
else if (o.kind === "nanoid")
|
|
952
|
-
|
|
952
|
+
xa.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
953
953
|
validation: "nanoid",
|
|
954
954
|
code: m.ZodIssueCode.invalid_string,
|
|
955
955
|
message: o.message
|
|
956
956
|
}), n.dirty());
|
|
957
957
|
else if (o.kind === "cuid")
|
|
958
|
-
|
|
958
|
+
ha.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
959
959
|
validation: "cuid",
|
|
960
960
|
code: m.ZodIssueCode.invalid_string,
|
|
961
961
|
message: o.message
|
|
962
962
|
}), n.dirty());
|
|
963
963
|
else if (o.kind === "cuid2")
|
|
964
|
-
|
|
964
|
+
ya.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
965
965
|
validation: "cuid2",
|
|
966
966
|
code: m.ZodIssueCode.invalid_string,
|
|
967
967
|
message: o.message
|
|
968
968
|
}), n.dirty());
|
|
969
969
|
else if (o.kind === "ulid")
|
|
970
|
-
|
|
970
|
+
ga.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
971
971
|
validation: "ulid",
|
|
972
972
|
code: m.ZodIssueCode.invalid_string,
|
|
973
973
|
message: o.message
|
|
@@ -1001,39 +1001,39 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1001
1001
|
code: m.ZodIssueCode.invalid_string,
|
|
1002
1002
|
validation: { endsWith: o.value },
|
|
1003
1003
|
message: o.message
|
|
1004
|
-
}), n.dirty()) : o.kind === "datetime" ?
|
|
1004
|
+
}), n.dirty()) : o.kind === "datetime" ? Ln(o).test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1005
1005
|
code: m.ZodIssueCode.invalid_string,
|
|
1006
1006
|
validation: "datetime",
|
|
1007
1007
|
message: o.message
|
|
1008
|
-
}), n.dirty()) : o.kind === "date" ?
|
|
1008
|
+
}), n.dirty()) : o.kind === "date" ? ja.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1009
1009
|
code: m.ZodIssueCode.invalid_string,
|
|
1010
1010
|
validation: "date",
|
|
1011
1011
|
message: o.message
|
|
1012
|
-
}), n.dirty()) : o.kind === "time" ?
|
|
1012
|
+
}), n.dirty()) : o.kind === "time" ? Aa(o).test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1013
1013
|
code: m.ZodIssueCode.invalid_string,
|
|
1014
1014
|
validation: "time",
|
|
1015
1015
|
message: o.message
|
|
1016
|
-
}), n.dirty()) : o.kind === "duration" ?
|
|
1016
|
+
}), n.dirty()) : o.kind === "duration" ? wa.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1017
1017
|
validation: "duration",
|
|
1018
1018
|
code: m.ZodIssueCode.invalid_string,
|
|
1019
1019
|
message: o.message
|
|
1020
|
-
}), n.dirty()) : o.kind === "ip" ?
|
|
1020
|
+
}), n.dirty()) : o.kind === "ip" ? Oa(e.data, o.version) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1021
1021
|
validation: "ip",
|
|
1022
1022
|
code: m.ZodIssueCode.invalid_string,
|
|
1023
1023
|
message: o.message
|
|
1024
|
-
}), n.dirty()) : o.kind === "jwt" ?
|
|
1024
|
+
}), n.dirty()) : o.kind === "jwt" ? Ra(e.data, o.alg) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1025
1025
|
validation: "jwt",
|
|
1026
1026
|
code: m.ZodIssueCode.invalid_string,
|
|
1027
1027
|
message: o.message
|
|
1028
|
-
}), n.dirty()) : o.kind === "cidr" ?
|
|
1028
|
+
}), n.dirty()) : o.kind === "cidr" ? Na(e.data, o.version) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1029
1029
|
validation: "cidr",
|
|
1030
1030
|
code: m.ZodIssueCode.invalid_string,
|
|
1031
1031
|
message: o.message
|
|
1032
|
-
}), n.dirty()) : o.kind === "base64" ?
|
|
1032
|
+
}), n.dirty()) : o.kind === "base64" ? Ca.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1033
1033
|
validation: "base64",
|
|
1034
1034
|
code: m.ZodIssueCode.invalid_string,
|
|
1035
1035
|
message: o.message
|
|
1036
|
-
}), n.dirty()) : o.kind === "base64url" ?
|
|
1036
|
+
}), n.dirty()) : o.kind === "base64url" ? Pa.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1037
1037
|
validation: "base64url",
|
|
1038
1038
|
code: m.ZodIssueCode.invalid_string,
|
|
1039
1039
|
message: o.message
|
|
@@ -1263,23 +1263,23 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1263
1263
|
return e;
|
|
1264
1264
|
}
|
|
1265
1265
|
};
|
|
1266
|
-
d.ZodString =
|
|
1267
|
-
|
|
1266
|
+
d.ZodString = J;
|
|
1267
|
+
J.create = (t) => {
|
|
1268
1268
|
var e;
|
|
1269
|
-
return new
|
|
1269
|
+
return new J({
|
|
1270
1270
|
checks: [],
|
|
1271
1271
|
typeName: g.ZodString,
|
|
1272
1272
|
coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
|
|
1273
|
-
...
|
|
1273
|
+
...b(t)
|
|
1274
1274
|
});
|
|
1275
1275
|
};
|
|
1276
|
-
function
|
|
1276
|
+
function Za(t, e) {
|
|
1277
1277
|
let r = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = r > n ? r : n, o = parseInt(t.toFixed(
|
|
1278
1278
|
s).replace(".", "")), a = parseInt(e.toFixed(s).replace(".", ""));
|
|
1279
1279
|
return o % a / Math.pow(10, s);
|
|
1280
1280
|
}
|
|
1281
|
-
i(
|
|
1282
|
-
var te = class t extends
|
|
1281
|
+
i(Za, "floatSafeRemainder");
|
|
1282
|
+
var te = class t extends w {
|
|
1283
1283
|
static {
|
|
1284
1284
|
i(this, "ZodNumber");
|
|
1285
1285
|
}
|
|
@@ -1318,7 +1318,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1318
1318
|
inclusive: o.inclusive,
|
|
1319
1319
|
exact: !1,
|
|
1320
1320
|
message: o.message
|
|
1321
|
-
}), s.dirty()) : o.kind === "multipleOf" ?
|
|
1321
|
+
}), s.dirty()) : o.kind === "multipleOf" ? Za(e.data, o.value) !== 0 && (n = this._getOrReturnCtx(e, n), (0, u.addIssueToContext)(n,
|
|
1322
1322
|
{
|
|
1323
1323
|
code: m.ZodIssueCode.not_multiple_of,
|
|
1324
1324
|
multipleOf: o.value,
|
|
@@ -1455,9 +1455,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1455
1455
|
checks: [],
|
|
1456
1456
|
typeName: g.ZodNumber,
|
|
1457
1457
|
coerce: t?.coerce || !1,
|
|
1458
|
-
...
|
|
1458
|
+
...b(t)
|
|
1459
1459
|
});
|
|
1460
|
-
var re = class t extends
|
|
1460
|
+
var re = class t extends w {
|
|
1461
1461
|
static {
|
|
1462
1462
|
i(this, "ZodBigInt");
|
|
1463
1463
|
}
|
|
@@ -1596,10 +1596,10 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1596
1596
|
checks: [],
|
|
1597
1597
|
typeName: g.ZodBigInt,
|
|
1598
1598
|
coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
|
|
1599
|
-
...
|
|
1599
|
+
...b(t)
|
|
1600
1600
|
});
|
|
1601
1601
|
};
|
|
1602
|
-
var ne = class extends
|
|
1602
|
+
var ne = class extends w {
|
|
1603
1603
|
static {
|
|
1604
1604
|
i(this, "ZodBoolean");
|
|
1605
1605
|
}
|
|
@@ -1619,9 +1619,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1619
1619
|
ne.create = (t) => new ne({
|
|
1620
1620
|
typeName: g.ZodBoolean,
|
|
1621
1621
|
coerce: t?.coerce || !1,
|
|
1622
|
-
...
|
|
1622
|
+
...b(t)
|
|
1623
1623
|
});
|
|
1624
|
-
var se = class t extends
|
|
1624
|
+
var se = class t extends w {
|
|
1625
1625
|
static {
|
|
1626
1626
|
i(this, "ZodDate");
|
|
1627
1627
|
}
|
|
@@ -1700,9 +1700,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1700
1700
|
checks: [],
|
|
1701
1701
|
coerce: t?.coerce || !1,
|
|
1702
1702
|
typeName: g.ZodDate,
|
|
1703
|
-
...
|
|
1703
|
+
...b(t)
|
|
1704
1704
|
});
|
|
1705
|
-
var
|
|
1705
|
+
var be = class extends w {
|
|
1706
1706
|
static {
|
|
1707
1707
|
i(this, "ZodSymbol");
|
|
1708
1708
|
}
|
|
@@ -1718,12 +1718,12 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1718
1718
|
return (0, u.OK)(e.data);
|
|
1719
1719
|
}
|
|
1720
1720
|
};
|
|
1721
|
-
d.ZodSymbol =
|
|
1722
|
-
|
|
1721
|
+
d.ZodSymbol = be;
|
|
1722
|
+
be.create = (t) => new be({
|
|
1723
1723
|
typeName: g.ZodSymbol,
|
|
1724
|
-
...
|
|
1724
|
+
...b(t)
|
|
1725
1725
|
});
|
|
1726
|
-
var oe = class extends
|
|
1726
|
+
var oe = class extends w {
|
|
1727
1727
|
static {
|
|
1728
1728
|
i(this, "ZodUndefined");
|
|
1729
1729
|
}
|
|
@@ -1742,9 +1742,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1742
1742
|
d.ZodUndefined = oe;
|
|
1743
1743
|
oe.create = (t) => new oe({
|
|
1744
1744
|
typeName: g.ZodUndefined,
|
|
1745
|
-
...
|
|
1745
|
+
...b(t)
|
|
1746
1746
|
});
|
|
1747
|
-
var ie = class extends
|
|
1747
|
+
var ie = class extends w {
|
|
1748
1748
|
static {
|
|
1749
1749
|
i(this, "ZodNull");
|
|
1750
1750
|
}
|
|
@@ -1763,9 +1763,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1763
1763
|
d.ZodNull = ie;
|
|
1764
1764
|
ie.create = (t) => new ie({
|
|
1765
1765
|
typeName: g.ZodNull,
|
|
1766
|
-
...
|
|
1766
|
+
...b(t)
|
|
1767
1767
|
});
|
|
1768
|
-
var
|
|
1768
|
+
var H = class extends w {
|
|
1769
1769
|
static {
|
|
1770
1770
|
i(this, "ZodAny");
|
|
1771
1771
|
}
|
|
@@ -1776,12 +1776,12 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1776
1776
|
return (0, u.OK)(e.data);
|
|
1777
1777
|
}
|
|
1778
1778
|
};
|
|
1779
|
-
d.ZodAny =
|
|
1780
|
-
|
|
1779
|
+
d.ZodAny = H;
|
|
1780
|
+
H.create = (t) => new H({
|
|
1781
1781
|
typeName: g.ZodAny,
|
|
1782
|
-
...
|
|
1782
|
+
...b(t)
|
|
1783
1783
|
});
|
|
1784
|
-
var
|
|
1784
|
+
var W = class extends w {
|
|
1785
1785
|
static {
|
|
1786
1786
|
i(this, "ZodUnknown");
|
|
1787
1787
|
}
|
|
@@ -1792,12 +1792,12 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1792
1792
|
return (0, u.OK)(e.data);
|
|
1793
1793
|
}
|
|
1794
1794
|
};
|
|
1795
|
-
d.ZodUnknown =
|
|
1796
|
-
|
|
1795
|
+
d.ZodUnknown = W;
|
|
1796
|
+
W.create = (t) => new W({
|
|
1797
1797
|
typeName: g.ZodUnknown,
|
|
1798
|
-
...
|
|
1798
|
+
...b(t)
|
|
1799
1799
|
});
|
|
1800
|
-
var U = class extends
|
|
1800
|
+
var U = class extends w {
|
|
1801
1801
|
static {
|
|
1802
1802
|
i(this, "ZodNever");
|
|
1803
1803
|
}
|
|
@@ -1813,9 +1813,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1813
1813
|
d.ZodNever = U;
|
|
1814
1814
|
U.create = (t) => new U({
|
|
1815
1815
|
typeName: g.ZodNever,
|
|
1816
|
-
...
|
|
1816
|
+
...b(t)
|
|
1817
1817
|
});
|
|
1818
|
-
var
|
|
1818
|
+
var we = class extends w {
|
|
1819
1819
|
static {
|
|
1820
1820
|
i(this, "ZodVoid");
|
|
1821
1821
|
}
|
|
@@ -1831,12 +1831,12 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1831
1831
|
return (0, u.OK)(e.data);
|
|
1832
1832
|
}
|
|
1833
1833
|
};
|
|
1834
|
-
d.ZodVoid =
|
|
1835
|
-
|
|
1834
|
+
d.ZodVoid = we;
|
|
1835
|
+
we.create = (t) => new we({
|
|
1836
1836
|
typeName: g.ZodVoid,
|
|
1837
|
-
...
|
|
1837
|
+
...b(t)
|
|
1838
1838
|
});
|
|
1839
|
-
var
|
|
1839
|
+
var G = class t extends w {
|
|
1840
1840
|
static {
|
|
1841
1841
|
i(this, "ZodArray");
|
|
1842
1842
|
}
|
|
@@ -1904,34 +1904,34 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1904
1904
|
return this.min(1, e);
|
|
1905
1905
|
}
|
|
1906
1906
|
};
|
|
1907
|
-
d.ZodArray =
|
|
1908
|
-
|
|
1907
|
+
d.ZodArray = G;
|
|
1908
|
+
G.create = (t, e) => new G({
|
|
1909
1909
|
type: t,
|
|
1910
1910
|
minLength: null,
|
|
1911
1911
|
maxLength: null,
|
|
1912
1912
|
exactLength: null,
|
|
1913
1913
|
typeName: g.ZodArray,
|
|
1914
|
-
...
|
|
1914
|
+
...b(e)
|
|
1915
1915
|
});
|
|
1916
|
-
function
|
|
1916
|
+
function xe(t) {
|
|
1917
1917
|
if (t instanceof R) {
|
|
1918
1918
|
let e = {};
|
|
1919
1919
|
for (let r in t.shape) {
|
|
1920
1920
|
let n = t.shape[r];
|
|
1921
|
-
e[r] = M.create(
|
|
1921
|
+
e[r] = M.create(xe(n));
|
|
1922
1922
|
}
|
|
1923
1923
|
return new R({
|
|
1924
1924
|
...t._def,
|
|
1925
1925
|
shape: /* @__PURE__ */ i(() => e, "shape")
|
|
1926
1926
|
});
|
|
1927
|
-
} else return t instanceof
|
|
1927
|
+
} else return t instanceof G ? new G({
|
|
1928
1928
|
...t._def,
|
|
1929
|
-
type:
|
|
1930
|
-
}) : t instanceof M ? M.create(
|
|
1929
|
+
type: xe(t.element)
|
|
1930
|
+
}) : t instanceof M ? M.create(xe(t.unwrap())) : t instanceof B ? B.create(xe(t.unwrap())) : t instanceof F ? F.create(t.items.map((e) => xe(
|
|
1931
1931
|
e))) : t;
|
|
1932
1932
|
}
|
|
1933
|
-
i(
|
|
1934
|
-
var R = class t extends
|
|
1933
|
+
i(xe, "deepPartialify");
|
|
1934
|
+
var R = class t extends w {
|
|
1935
1935
|
static {
|
|
1936
1936
|
i(this, "ZodObject");
|
|
1937
1937
|
}
|
|
@@ -1959,10 +1959,10 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1959
1959
|
a.includes(p) || c.push(p);
|
|
1960
1960
|
let l = [];
|
|
1961
1961
|
for (let p of a) {
|
|
1962
|
-
let f = o[p],
|
|
1962
|
+
let f = o[p], v = s.data[p];
|
|
1963
1963
|
l.push({
|
|
1964
1964
|
key: { status: "valid", value: p },
|
|
1965
|
-
value: f._parse(new D(s,
|
|
1965
|
+
value: f._parse(new D(s, v, s.path, p)),
|
|
1966
1966
|
alwaysSet: p in s.data
|
|
1967
1967
|
});
|
|
1968
1968
|
}
|
|
@@ -1984,11 +1984,11 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1984
1984
|
} else {
|
|
1985
1985
|
let p = this._def.catchall;
|
|
1986
1986
|
for (let f of c) {
|
|
1987
|
-
let
|
|
1987
|
+
let v = s.data[f];
|
|
1988
1988
|
l.push({
|
|
1989
1989
|
key: { status: "valid", value: f },
|
|
1990
1990
|
value: p._parse(
|
|
1991
|
-
new D(s,
|
|
1991
|
+
new D(s, v, s.path, f)
|
|
1992
1992
|
//, ctx.child(key), value, getParsedType(value)
|
|
1993
1993
|
),
|
|
1994
1994
|
alwaysSet: f in s.data
|
|
@@ -1998,10 +1998,10 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1998
1998
|
return s.common.async ? Promise.resolve().then(async () => {
|
|
1999
1999
|
let p = [];
|
|
2000
2000
|
for (let f of l) {
|
|
2001
|
-
let
|
|
2001
|
+
let v = await f.key, k = await f.value;
|
|
2002
2002
|
p.push({
|
|
2003
|
-
key:
|
|
2004
|
-
value:
|
|
2003
|
+
key: v,
|
|
2004
|
+
value: k,
|
|
2005
2005
|
alwaysSet: f.alwaysSet
|
|
2006
2006
|
});
|
|
2007
2007
|
}
|
|
@@ -2170,7 +2170,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2170
2170
|
* @deprecated
|
|
2171
2171
|
*/
|
|
2172
2172
|
deepPartial() {
|
|
2173
|
-
return
|
|
2173
|
+
return xe(this);
|
|
2174
2174
|
}
|
|
2175
2175
|
partial(e) {
|
|
2176
2176
|
let r = {};
|
|
@@ -2199,7 +2199,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2199
2199
|
});
|
|
2200
2200
|
}
|
|
2201
2201
|
keyof() {
|
|
2202
|
-
return
|
|
2202
|
+
return Un(h.util.objectKeys(this.shape));
|
|
2203
2203
|
}
|
|
2204
2204
|
};
|
|
2205
2205
|
d.ZodObject = R;
|
|
@@ -2208,23 +2208,23 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2208
2208
|
unknownKeys: "strip",
|
|
2209
2209
|
catchall: U.create(),
|
|
2210
2210
|
typeName: g.ZodObject,
|
|
2211
|
-
...
|
|
2211
|
+
...b(e)
|
|
2212
2212
|
});
|
|
2213
2213
|
R.strictCreate = (t, e) => new R({
|
|
2214
2214
|
shape: /* @__PURE__ */ i(() => t, "shape"),
|
|
2215
2215
|
unknownKeys: "strict",
|
|
2216
2216
|
catchall: U.create(),
|
|
2217
2217
|
typeName: g.ZodObject,
|
|
2218
|
-
...
|
|
2218
|
+
...b(e)
|
|
2219
2219
|
});
|
|
2220
2220
|
R.lazycreate = (t, e) => new R({
|
|
2221
2221
|
shape: t,
|
|
2222
2222
|
unknownKeys: "strip",
|
|
2223
2223
|
catchall: U.create(),
|
|
2224
2224
|
typeName: g.ZodObject,
|
|
2225
|
-
...
|
|
2225
|
+
...b(e)
|
|
2226
2226
|
});
|
|
2227
|
-
var ae = class extends
|
|
2227
|
+
var ae = class extends w {
|
|
2228
2228
|
static {
|
|
2229
2229
|
i(this, "ZodUnion");
|
|
2230
2230
|
}
|
|
@@ -2298,12 +2298,12 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2298
2298
|
ae.create = (t, e) => new ae({
|
|
2299
2299
|
options: t,
|
|
2300
2300
|
typeName: g.ZodUnion,
|
|
2301
|
-
...
|
|
2301
|
+
...b(e)
|
|
2302
2302
|
});
|
|
2303
|
-
var
|
|
2304
|
-
le ? t.options : t instanceof pe ? h.util.objectValues(t.enum) : t instanceof fe ?
|
|
2305
|
-
ie ? [null] : t instanceof M ? [void 0, ...
|
|
2306
|
-
|
|
2303
|
+
var q = /* @__PURE__ */ i((t) => t instanceof de ? q(t.schema) : t instanceof Z ? q(t.innerType()) : t instanceof ue ? [t.value] : t instanceof
|
|
2304
|
+
le ? t.options : t instanceof pe ? h.util.objectValues(t.enum) : t instanceof fe ? q(t._def.innerType) : t instanceof oe ? [void 0] : t instanceof
|
|
2305
|
+
ie ? [null] : t instanceof M ? [void 0, ...q(t.unwrap())] : t instanceof B ? [null, ...q(t.unwrap())] : t instanceof Le || t instanceof he ?
|
|
2306
|
+
q(t.unwrap()) : t instanceof me ? q(t._def.innerType) : [], "getDiscriminator"), lt = class t extends w {
|
|
2307
2307
|
static {
|
|
2308
2308
|
i(this, "ZodDiscriminatedUnion");
|
|
2309
2309
|
}
|
|
@@ -2350,7 +2350,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2350
2350
|
static create(e, r, n) {
|
|
2351
2351
|
let s = /* @__PURE__ */ new Map();
|
|
2352
2352
|
for (let o of r) {
|
|
2353
|
-
let a =
|
|
2353
|
+
let a = q(o.shape[e]);
|
|
2354
2354
|
if (!a.length)
|
|
2355
2355
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
2356
2356
|
for (let c of a) {
|
|
@@ -2364,7 +2364,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2364
2364
|
discriminator: e,
|
|
2365
2365
|
options: r,
|
|
2366
2366
|
optionsMap: s,
|
|
2367
|
-
...
|
|
2367
|
+
...b(n)
|
|
2368
2368
|
});
|
|
2369
2369
|
}
|
|
2370
2370
|
};
|
|
@@ -2396,7 +2396,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2396
2396
|
} else return r === h.ZodParsedType.date && n === h.ZodParsedType.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
|
|
2397
2397
|
}
|
|
2398
2398
|
i(or, "mergeValues");
|
|
2399
|
-
var ce = class extends
|
|
2399
|
+
var ce = class extends w {
|
|
2400
2400
|
static {
|
|
2401
2401
|
i(this, "ZodIntersection");
|
|
2402
2402
|
}
|
|
@@ -2437,9 +2437,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2437
2437
|
left: t,
|
|
2438
2438
|
right: e,
|
|
2439
2439
|
typeName: g.ZodIntersection,
|
|
2440
|
-
...
|
|
2440
|
+
...b(r)
|
|
2441
2441
|
});
|
|
2442
|
-
var
|
|
2442
|
+
var F = class t extends w {
|
|
2443
2443
|
static {
|
|
2444
2444
|
i(this, "ZodTuple");
|
|
2445
2445
|
}
|
|
@@ -2482,18 +2482,18 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2482
2482
|
});
|
|
2483
2483
|
}
|
|
2484
2484
|
};
|
|
2485
|
-
d.ZodTuple =
|
|
2486
|
-
|
|
2485
|
+
d.ZodTuple = F;
|
|
2486
|
+
F.create = (t, e) => {
|
|
2487
2487
|
if (!Array.isArray(t))
|
|
2488
2488
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2489
|
-
return new
|
|
2489
|
+
return new F({
|
|
2490
2490
|
items: t,
|
|
2491
2491
|
typeName: g.ZodTuple,
|
|
2492
2492
|
rest: null,
|
|
2493
|
-
...
|
|
2493
|
+
...b(e)
|
|
2494
2494
|
});
|
|
2495
2495
|
};
|
|
2496
|
-
var pt = class t extends
|
|
2496
|
+
var pt = class t extends w {
|
|
2497
2497
|
static {
|
|
2498
2498
|
i(this, "ZodRecord");
|
|
2499
2499
|
}
|
|
@@ -2524,21 +2524,21 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2524
2524
|
return this._def.valueType;
|
|
2525
2525
|
}
|
|
2526
2526
|
static create(e, r, n) {
|
|
2527
|
-
return r instanceof
|
|
2527
|
+
return r instanceof w ? new t({
|
|
2528
2528
|
keyType: e,
|
|
2529
2529
|
valueType: r,
|
|
2530
2530
|
typeName: g.ZodRecord,
|
|
2531
|
-
...
|
|
2531
|
+
...b(n)
|
|
2532
2532
|
}) : new t({
|
|
2533
|
-
keyType:
|
|
2533
|
+
keyType: J.create(),
|
|
2534
2534
|
valueType: e,
|
|
2535
2535
|
typeName: g.ZodRecord,
|
|
2536
|
-
...
|
|
2536
|
+
...b(r)
|
|
2537
2537
|
});
|
|
2538
2538
|
}
|
|
2539
2539
|
};
|
|
2540
2540
|
d.ZodRecord = pt;
|
|
2541
|
-
var
|
|
2541
|
+
var _e = class extends w {
|
|
2542
2542
|
static {
|
|
2543
2543
|
i(this, "ZodMap");
|
|
2544
2544
|
}
|
|
@@ -2583,14 +2583,14 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2583
2583
|
}
|
|
2584
2584
|
}
|
|
2585
2585
|
};
|
|
2586
|
-
d.ZodMap =
|
|
2587
|
-
|
|
2586
|
+
d.ZodMap = _e;
|
|
2587
|
+
_e.create = (t, e, r) => new _e({
|
|
2588
2588
|
valueType: e,
|
|
2589
2589
|
keyType: t,
|
|
2590
2590
|
typeName: g.ZodMap,
|
|
2591
|
-
...
|
|
2591
|
+
...b(r)
|
|
2592
2592
|
});
|
|
2593
|
-
var
|
|
2593
|
+
var ke = class t extends w {
|
|
2594
2594
|
static {
|
|
2595
2595
|
i(this, "ZodSet");
|
|
2596
2596
|
}
|
|
@@ -2651,15 +2651,15 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2651
2651
|
return this.min(1, e);
|
|
2652
2652
|
}
|
|
2653
2653
|
};
|
|
2654
|
-
d.ZodSet =
|
|
2655
|
-
|
|
2654
|
+
d.ZodSet = ke;
|
|
2655
|
+
ke.create = (t, e) => new ke({
|
|
2656
2656
|
valueType: t,
|
|
2657
2657
|
minSize: null,
|
|
2658
2658
|
maxSize: null,
|
|
2659
2659
|
typeName: g.ZodSet,
|
|
2660
|
-
...
|
|
2660
|
+
...b(e)
|
|
2661
2661
|
});
|
|
2662
|
-
var ft = class t extends
|
|
2662
|
+
var ft = class t extends w {
|
|
2663
2663
|
static {
|
|
2664
2664
|
i(this, "ZodFunction");
|
|
2665
2665
|
}
|
|
@@ -2712,11 +2712,11 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2712
2712
|
if (this._def.returns instanceof Y) {
|
|
2713
2713
|
let c = this;
|
|
2714
2714
|
return (0, u.OK)(async function(...l) {
|
|
2715
|
-
let p = new m.ZodError([]), f = await c._def.args.parseAsync(l, o).catch((
|
|
2716
|
-
throw p.addIssue(n(l,
|
|
2717
|
-
}),
|
|
2718
|
-
return await c._def.returns._def.type.parseAsync(
|
|
2719
|
-
throw p.addIssue(s(
|
|
2715
|
+
let p = new m.ZodError([]), f = await c._def.args.parseAsync(l, o).catch((_) => {
|
|
2716
|
+
throw p.addIssue(n(l, _)), p;
|
|
2717
|
+
}), v = await Reflect.apply(a, this, f);
|
|
2718
|
+
return await c._def.returns._def.type.parseAsync(v, o).catch((_) => {
|
|
2719
|
+
throw p.addIssue(s(v, _)), p;
|
|
2720
2720
|
});
|
|
2721
2721
|
});
|
|
2722
2722
|
} else {
|
|
@@ -2725,10 +2725,10 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2725
2725
|
let p = c._def.args.safeParse(l, o);
|
|
2726
2726
|
if (!p.success)
|
|
2727
2727
|
throw new m.ZodError([n(l, p.error)]);
|
|
2728
|
-
let f = Reflect.apply(a, this, p.data),
|
|
2729
|
-
if (!
|
|
2730
|
-
throw new m.ZodError([s(f,
|
|
2731
|
-
return
|
|
2728
|
+
let f = Reflect.apply(a, this, p.data), v = c._def.returns.safeParse(f, o);
|
|
2729
|
+
if (!v.success)
|
|
2730
|
+
throw new m.ZodError([s(f, v.error)]);
|
|
2731
|
+
return v.data;
|
|
2732
2732
|
});
|
|
2733
2733
|
}
|
|
2734
2734
|
}
|
|
@@ -2741,7 +2741,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2741
2741
|
args(...e) {
|
|
2742
2742
|
return new t({
|
|
2743
2743
|
...this._def,
|
|
2744
|
-
args:
|
|
2744
|
+
args: F.create(e).rest(W.create())
|
|
2745
2745
|
});
|
|
2746
2746
|
}
|
|
2747
2747
|
returns(e) {
|
|
@@ -2758,15 +2758,15 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2758
2758
|
}
|
|
2759
2759
|
static create(e, r, n) {
|
|
2760
2760
|
return new t({
|
|
2761
|
-
args: e ||
|
|
2762
|
-
returns: r ||
|
|
2761
|
+
args: e || F.create([]).rest(W.create()),
|
|
2762
|
+
returns: r || W.create(),
|
|
2763
2763
|
typeName: g.ZodFunction,
|
|
2764
|
-
...
|
|
2764
|
+
...b(n)
|
|
2765
2765
|
});
|
|
2766
2766
|
}
|
|
2767
2767
|
};
|
|
2768
2768
|
d.ZodFunction = ft;
|
|
2769
|
-
var de = class extends
|
|
2769
|
+
var de = class extends w {
|
|
2770
2770
|
static {
|
|
2771
2771
|
i(this, "ZodLazy");
|
|
2772
2772
|
}
|
|
@@ -2782,9 +2782,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2782
2782
|
de.create = (t, e) => new de({
|
|
2783
2783
|
getter: t,
|
|
2784
2784
|
typeName: g.ZodLazy,
|
|
2785
|
-
...
|
|
2785
|
+
...b(e)
|
|
2786
2786
|
});
|
|
2787
|
-
var ue = class extends
|
|
2787
|
+
var ue = class extends w {
|
|
2788
2788
|
static {
|
|
2789
2789
|
i(this, "ZodLiteral");
|
|
2790
2790
|
}
|
|
@@ -2807,17 +2807,17 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2807
2807
|
ue.create = (t, e) => new ue({
|
|
2808
2808
|
value: t,
|
|
2809
2809
|
typeName: g.ZodLiteral,
|
|
2810
|
-
...
|
|
2810
|
+
...b(e)
|
|
2811
2811
|
});
|
|
2812
|
-
function
|
|
2812
|
+
function Un(t, e) {
|
|
2813
2813
|
return new le({
|
|
2814
2814
|
values: t,
|
|
2815
2815
|
typeName: g.ZodEnum,
|
|
2816
|
-
...
|
|
2816
|
+
...b(e)
|
|
2817
2817
|
});
|
|
2818
2818
|
}
|
|
2819
|
-
i(
|
|
2820
|
-
var le = class t extends
|
|
2819
|
+
i(Un, "createZodEnum");
|
|
2820
|
+
var le = class t extends w {
|
|
2821
2821
|
static {
|
|
2822
2822
|
i(this, "ZodEnum");
|
|
2823
2823
|
}
|
|
@@ -2833,7 +2833,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2833
2833
|
code: m.ZodIssueCode.invalid_type
|
|
2834
2834
|
}), u.INVALID;
|
|
2835
2835
|
}
|
|
2836
|
-
if (ut(this, Me, "f") ||
|
|
2836
|
+
if (ut(this, Me, "f") || Zn(this, Me, new Set(this._def.values), "f"), !ut(this, Me, "f").has(e.data)) {
|
|
2837
2837
|
let r = this._getOrReturnCtx(e), n = this._def.values;
|
|
2838
2838
|
return (0, u.addIssueToContext)(r, {
|
|
2839
2839
|
received: r.data,
|
|
@@ -2879,8 +2879,8 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2879
2879
|
};
|
|
2880
2880
|
d.ZodEnum = le;
|
|
2881
2881
|
Me = /* @__PURE__ */ new WeakMap();
|
|
2882
|
-
le.create =
|
|
2883
|
-
var pe = class extends
|
|
2882
|
+
le.create = Un;
|
|
2883
|
+
var pe = class extends w {
|
|
2884
2884
|
static {
|
|
2885
2885
|
i(this, "ZodNativeEnum");
|
|
2886
2886
|
}
|
|
@@ -2897,7 +2897,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2897
2897
|
code: m.ZodIssueCode.invalid_type
|
|
2898
2898
|
}), u.INVALID;
|
|
2899
2899
|
}
|
|
2900
|
-
if (ut(this, De, "f") ||
|
|
2900
|
+
if (ut(this, De, "f") || Zn(this, De, new Set(h.util.getValidEnumValues(this._def.values)), "f"), !ut(this, De, "f").has(e.data)) {
|
|
2901
2901
|
let s = h.util.objectValues(r);
|
|
2902
2902
|
return (0, u.addIssueToContext)(n, {
|
|
2903
2903
|
received: n.data,
|
|
@@ -2916,9 +2916,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2916
2916
|
pe.create = (t, e) => new pe({
|
|
2917
2917
|
values: t,
|
|
2918
2918
|
typeName: g.ZodNativeEnum,
|
|
2919
|
-
...
|
|
2919
|
+
...b(e)
|
|
2920
2920
|
});
|
|
2921
|
-
var Y = class extends
|
|
2921
|
+
var Y = class extends w {
|
|
2922
2922
|
static {
|
|
2923
2923
|
i(this, "ZodPromise");
|
|
2924
2924
|
}
|
|
@@ -2944,9 +2944,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2944
2944
|
Y.create = (t, e) => new Y({
|
|
2945
2945
|
type: t,
|
|
2946
2946
|
typeName: g.ZodPromise,
|
|
2947
|
-
...
|
|
2947
|
+
...b(e)
|
|
2948
2948
|
});
|
|
2949
|
-
var Z = class extends
|
|
2949
|
+
var Z = class extends w {
|
|
2950
2950
|
static {
|
|
2951
2951
|
i(this, "ZodEffects");
|
|
2952
2952
|
}
|
|
@@ -3034,15 +3034,15 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3034
3034
|
schema: t,
|
|
3035
3035
|
typeName: g.ZodEffects,
|
|
3036
3036
|
effect: e,
|
|
3037
|
-
...
|
|
3037
|
+
...b(r)
|
|
3038
3038
|
});
|
|
3039
3039
|
Z.createWithPreprocess = (t, e, r) => new Z({
|
|
3040
3040
|
schema: e,
|
|
3041
3041
|
effect: { type: "preprocess", transform: t },
|
|
3042
3042
|
typeName: g.ZodEffects,
|
|
3043
|
-
...
|
|
3043
|
+
...b(r)
|
|
3044
3044
|
});
|
|
3045
|
-
var M = class extends
|
|
3045
|
+
var M = class extends w {
|
|
3046
3046
|
static {
|
|
3047
3047
|
i(this, "ZodOptional");
|
|
3048
3048
|
}
|
|
@@ -3057,9 +3057,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3057
3057
|
M.create = (t, e) => new M({
|
|
3058
3058
|
innerType: t,
|
|
3059
3059
|
typeName: g.ZodOptional,
|
|
3060
|
-
...
|
|
3060
|
+
...b(e)
|
|
3061
3061
|
});
|
|
3062
|
-
var
|
|
3062
|
+
var B = class extends w {
|
|
3063
3063
|
static {
|
|
3064
3064
|
i(this, "ZodNullable");
|
|
3065
3065
|
}
|
|
@@ -3070,13 +3070,13 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3070
3070
|
return this._def.innerType;
|
|
3071
3071
|
}
|
|
3072
3072
|
};
|
|
3073
|
-
d.ZodNullable =
|
|
3074
|
-
|
|
3073
|
+
d.ZodNullable = B;
|
|
3074
|
+
B.create = (t, e) => new B({
|
|
3075
3075
|
innerType: t,
|
|
3076
3076
|
typeName: g.ZodNullable,
|
|
3077
|
-
...
|
|
3077
|
+
...b(e)
|
|
3078
3078
|
});
|
|
3079
|
-
var fe = class extends
|
|
3079
|
+
var fe = class extends w {
|
|
3080
3080
|
static {
|
|
3081
3081
|
i(this, "ZodDefault");
|
|
3082
3082
|
}
|
|
@@ -3097,9 +3097,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3097
3097
|
innerType: t,
|
|
3098
3098
|
typeName: g.ZodDefault,
|
|
3099
3099
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
3100
|
-
...
|
|
3100
|
+
...b(e)
|
|
3101
3101
|
});
|
|
3102
|
-
var me = class extends
|
|
3102
|
+
var me = class extends w {
|
|
3103
3103
|
static {
|
|
3104
3104
|
i(this, "ZodCatch");
|
|
3105
3105
|
}
|
|
@@ -3144,9 +3144,9 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3144
3144
|
innerType: t,
|
|
3145
3145
|
typeName: g.ZodCatch,
|
|
3146
3146
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
3147
|
-
...
|
|
3147
|
+
...b(e)
|
|
3148
3148
|
});
|
|
3149
|
-
var
|
|
3149
|
+
var Te = class extends w {
|
|
3150
3150
|
static {
|
|
3151
3151
|
i(this, "ZodNaN");
|
|
3152
3152
|
}
|
|
@@ -3162,13 +3162,13 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3162
3162
|
return { status: "valid", value: e.data };
|
|
3163
3163
|
}
|
|
3164
3164
|
};
|
|
3165
|
-
d.ZodNaN =
|
|
3166
|
-
|
|
3165
|
+
d.ZodNaN = Te;
|
|
3166
|
+
Te.create = (t) => new Te({
|
|
3167
3167
|
typeName: g.ZodNaN,
|
|
3168
|
-
...
|
|
3168
|
+
...b(t)
|
|
3169
3169
|
});
|
|
3170
3170
|
d.BRAND = Symbol("zod_brand");
|
|
3171
|
-
var Le = class extends
|
|
3171
|
+
var Le = class extends w {
|
|
3172
3172
|
static {
|
|
3173
3173
|
i(this, "ZodBranded");
|
|
3174
3174
|
}
|
|
@@ -3185,7 +3185,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3185
3185
|
}
|
|
3186
3186
|
};
|
|
3187
3187
|
d.ZodBranded = Le;
|
|
3188
|
-
var Ue = class t extends
|
|
3188
|
+
var Ue = class t extends w {
|
|
3189
3189
|
static {
|
|
3190
3190
|
i(this, "ZodPipeline");
|
|
3191
3191
|
}
|
|
@@ -3230,7 +3230,7 @@ onent})+$", sr, wa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3230
3230
|
}
|
|
3231
3231
|
};
|
|
3232
3232
|
d.ZodPipeline = Ue;
|
|
3233
|
-
var he = class extends
|
|
3233
|
+
var he = class extends w {
|
|
3234
3234
|
static {
|
|
3235
3235
|
i(this, "ZodReadonly");
|
|
3236
3236
|
}
|
|
@@ -3247,33 +3247,33 @@ eze");
|
|
|
3247
3247
|
he.create = (t, e) => new he({
|
|
3248
3248
|
innerType: t,
|
|
3249
3249
|
typeName: g.ZodReadonly,
|
|
3250
|
-
...
|
|
3250
|
+
...b(e)
|
|
3251
3251
|
});
|
|
3252
|
-
function
|
|
3252
|
+
function Nn(t, e) {
|
|
3253
3253
|
let r = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
3254
3254
|
return typeof r == "string" ? { message: r } : r;
|
|
3255
3255
|
}
|
|
3256
|
-
i(
|
|
3257
|
-
function
|
|
3258
|
-
return t ?
|
|
3256
|
+
i(Nn, "cleanParams");
|
|
3257
|
+
function $n(t, e = {}, r) {
|
|
3258
|
+
return t ? H.create().superRefine((n, s) => {
|
|
3259
3259
|
var o, a;
|
|
3260
3260
|
let c = t(n);
|
|
3261
3261
|
if (c instanceof Promise)
|
|
3262
3262
|
return c.then((l) => {
|
|
3263
3263
|
var p, f;
|
|
3264
3264
|
if (!l) {
|
|
3265
|
-
let
|
|
3266
|
-
s.addIssue({ code: "custom", ...
|
|
3265
|
+
let v = Nn(e, n), k = (f = (p = v.fatal) !== null && p !== void 0 ? p : r) !== null && f !== void 0 ? f : !0;
|
|
3266
|
+
s.addIssue({ code: "custom", ...v, fatal: k });
|
|
3267
3267
|
}
|
|
3268
3268
|
});
|
|
3269
3269
|
if (!c) {
|
|
3270
|
-
let l =
|
|
3270
|
+
let l = Nn(e, n), p = (a = (o = l.fatal) !== null && o !== void 0 ? o : r) !== null && a !== void 0 ? a : !0;
|
|
3271
3271
|
s.addIssue({ code: "custom", ...l, fatal: p });
|
|
3272
3272
|
}
|
|
3273
|
-
}) :
|
|
3273
|
+
}) : H.create();
|
|
3274
3274
|
}
|
|
3275
|
-
i(
|
|
3276
|
-
d.custom =
|
|
3275
|
+
i($n, "custom");
|
|
3276
|
+
d.custom = $n;
|
|
3277
3277
|
d.late = {
|
|
3278
3278
|
object: R.lazycreate
|
|
3279
3279
|
};
|
|
@@ -3288,87 +3288,87 @@ known", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray",
|
|
|
3288
3288
|
t", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodRe\
|
|
3289
3289
|
adonly";
|
|
3290
3290
|
})(g || (d.ZodFirstPartyTypeKind = g = {}));
|
|
3291
|
-
var
|
|
3291
|
+
var Ma = /* @__PURE__ */ i((t, e = {
|
|
3292
3292
|
message: `Input not instance of ${t.name}`
|
|
3293
|
-
}) =>
|
|
3294
|
-
d.instanceof =
|
|
3295
|
-
var
|
|
3296
|
-
d.string =
|
|
3297
|
-
var
|
|
3298
|
-
d.number =
|
|
3299
|
-
var
|
|
3300
|
-
d.nan =
|
|
3301
|
-
var
|
|
3302
|
-
d.bigint =
|
|
3303
|
-
var
|
|
3304
|
-
d.boolean =
|
|
3305
|
-
var
|
|
3306
|
-
d.date =
|
|
3307
|
-
var
|
|
3308
|
-
d.symbol =
|
|
3309
|
-
var
|
|
3310
|
-
d.undefined =
|
|
3311
|
-
var
|
|
3312
|
-
d.null =
|
|
3313
|
-
var
|
|
3314
|
-
d.any =
|
|
3315
|
-
var Va = q.create;
|
|
3316
|
-
d.unknown = Va;
|
|
3317
|
-
var Fa = U.create;
|
|
3318
|
-
d.never = Fa;
|
|
3319
|
-
var Ba = _e.create;
|
|
3320
|
-
d.void = Ba;
|
|
3293
|
+
}) => $n((r) => r instanceof t, e), "instanceOfType");
|
|
3294
|
+
d.instanceof = Ma;
|
|
3295
|
+
var Vn = J.create;
|
|
3296
|
+
d.string = Vn;
|
|
3297
|
+
var Fn = te.create;
|
|
3298
|
+
d.number = Fn;
|
|
3299
|
+
var Da = Te.create;
|
|
3300
|
+
d.nan = Da;
|
|
3301
|
+
var La = re.create;
|
|
3302
|
+
d.bigint = La;
|
|
3303
|
+
var Bn = ne.create;
|
|
3304
|
+
d.boolean = Bn;
|
|
3305
|
+
var Ua = se.create;
|
|
3306
|
+
d.date = Ua;
|
|
3307
|
+
var $a = be.create;
|
|
3308
|
+
d.symbol = $a;
|
|
3309
|
+
var Va = oe.create;
|
|
3310
|
+
d.undefined = Va;
|
|
3311
|
+
var Fa = ie.create;
|
|
3312
|
+
d.null = Fa;
|
|
3313
|
+
var Ba = H.create;
|
|
3314
|
+
d.any = Ba;
|
|
3321
3315
|
var qa = W.create;
|
|
3322
|
-
d.
|
|
3323
|
-
var Wa =
|
|
3324
|
-
d.
|
|
3325
|
-
var Ga =
|
|
3326
|
-
d.
|
|
3327
|
-
var za =
|
|
3328
|
-
d.
|
|
3329
|
-
var Ka =
|
|
3330
|
-
d.
|
|
3331
|
-
var Ja =
|
|
3332
|
-
d.
|
|
3333
|
-
var
|
|
3334
|
-
d.
|
|
3335
|
-
var
|
|
3336
|
-
d.
|
|
3337
|
-
var Xa =
|
|
3338
|
-
d.
|
|
3339
|
-
var Qa =
|
|
3340
|
-
d.
|
|
3341
|
-
var ec =
|
|
3342
|
-
d.
|
|
3343
|
-
var tc =
|
|
3344
|
-
d.
|
|
3345
|
-
var rc =
|
|
3346
|
-
d.
|
|
3347
|
-
var nc =
|
|
3348
|
-
d.
|
|
3349
|
-
var sc =
|
|
3350
|
-
d.
|
|
3351
|
-
var oc =
|
|
3352
|
-
d.
|
|
3353
|
-
var
|
|
3354
|
-
d.
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
d.
|
|
3362
|
-
var dc =
|
|
3363
|
-
d.
|
|
3364
|
-
var uc =
|
|
3365
|
-
d.
|
|
3366
|
-
var lc =
|
|
3367
|
-
d.
|
|
3368
|
-
var pc =
|
|
3369
|
-
d.
|
|
3316
|
+
d.unknown = qa;
|
|
3317
|
+
var Wa = U.create;
|
|
3318
|
+
d.never = Wa;
|
|
3319
|
+
var Ga = we.create;
|
|
3320
|
+
d.void = Ga;
|
|
3321
|
+
var za = G.create;
|
|
3322
|
+
d.array = za;
|
|
3323
|
+
var Ka = R.create;
|
|
3324
|
+
d.object = Ka;
|
|
3325
|
+
var Ja = R.strictCreate;
|
|
3326
|
+
d.strictObject = Ja;
|
|
3327
|
+
var Ha = ae.create;
|
|
3328
|
+
d.union = Ha;
|
|
3329
|
+
var Ya = lt.create;
|
|
3330
|
+
d.discriminatedUnion = Ya;
|
|
3331
|
+
var Xa = ce.create;
|
|
3332
|
+
d.intersection = Xa;
|
|
3333
|
+
var Qa = F.create;
|
|
3334
|
+
d.tuple = Qa;
|
|
3335
|
+
var ec = pt.create;
|
|
3336
|
+
d.record = ec;
|
|
3337
|
+
var tc = _e.create;
|
|
3338
|
+
d.map = tc;
|
|
3339
|
+
var rc = ke.create;
|
|
3340
|
+
d.set = rc;
|
|
3341
|
+
var nc = ft.create;
|
|
3342
|
+
d.function = nc;
|
|
3343
|
+
var sc = de.create;
|
|
3344
|
+
d.lazy = sc;
|
|
3345
|
+
var oc = ue.create;
|
|
3346
|
+
d.literal = oc;
|
|
3347
|
+
var ic = le.create;
|
|
3348
|
+
d.enum = ic;
|
|
3349
|
+
var ac = pe.create;
|
|
3350
|
+
d.nativeEnum = ac;
|
|
3351
|
+
var cc = Y.create;
|
|
3352
|
+
d.promise = cc;
|
|
3353
|
+
var qn = Z.create;
|
|
3354
|
+
d.effect = qn;
|
|
3355
|
+
d.transformer = qn;
|
|
3356
|
+
var dc = M.create;
|
|
3357
|
+
d.optional = dc;
|
|
3358
|
+
var uc = B.create;
|
|
3359
|
+
d.nullable = uc;
|
|
3360
|
+
var lc = Z.createWithPreprocess;
|
|
3361
|
+
d.preprocess = lc;
|
|
3362
|
+
var pc = Ue.create;
|
|
3363
|
+
d.pipeline = pc;
|
|
3364
|
+
var fc = /* @__PURE__ */ i(() => Vn().optional(), "ostring");
|
|
3365
|
+
d.ostring = fc;
|
|
3366
|
+
var mc = /* @__PURE__ */ i(() => Fn().optional(), "onumber");
|
|
3367
|
+
d.onumber = mc;
|
|
3368
|
+
var hc = /* @__PURE__ */ i(() => Bn().optional(), "oboolean");
|
|
3369
|
+
d.oboolean = hc;
|
|
3370
3370
|
d.coerce = {
|
|
3371
|
-
string: /* @__PURE__ */ i((t) =>
|
|
3371
|
+
string: /* @__PURE__ */ i((t) => J.create({ ...t, coerce: !0 }), "string"),
|
|
3372
3372
|
number: /* @__PURE__ */ i((t) => te.create({ ...t, coerce: !0 }), "number"),
|
|
3373
3373
|
boolean: /* @__PURE__ */ i((t) => ne.create({
|
|
3374
3374
|
...t,
|
|
@@ -3383,7 +3383,7 @@ adonly";
|
|
|
3383
3383
|
// ../node_modules/zod/lib/external.js
|
|
3384
3384
|
var ir = I((L) => {
|
|
3385
3385
|
"use strict";
|
|
3386
|
-
var
|
|
3386
|
+
var yc = L && L.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
3387
3387
|
n === void 0 && (n = r);
|
|
3388
3388
|
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
3389
3389
|
(!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: /* @__PURE__ */ i(function() {
|
|
@@ -3391,22 +3391,22 @@ var ir = I((L) => {
|
|
|
3391
3391
|
}, "get") }), Object.defineProperty(t, n, s);
|
|
3392
3392
|
} : function(t, e, r, n) {
|
|
3393
3393
|
n === void 0 && (n = r), t[n] = e[r];
|
|
3394
|
-
}),
|
|
3395
|
-
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) &&
|
|
3394
|
+
}), Ie = L && L.__exportStar || function(t, e) {
|
|
3395
|
+
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) && yc(e, t, r);
|
|
3396
3396
|
};
|
|
3397
3397
|
Object.defineProperty(L, "__esModule", { value: !0 });
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3398
|
+
Ie(at(), L);
|
|
3399
|
+
Ie(nr(), L);
|
|
3400
|
+
Ie(jn(), L);
|
|
3401
|
+
Ie(Ne(), L);
|
|
3402
|
+
Ie(Wn(), L);
|
|
3403
|
+
Ie(it(), L);
|
|
3404
3404
|
});
|
|
3405
3405
|
|
|
3406
3406
|
// ../node_modules/zod/lib/index.js
|
|
3407
|
-
var
|
|
3407
|
+
var Kn = I((N) => {
|
|
3408
3408
|
"use strict";
|
|
3409
|
-
var
|
|
3409
|
+
var Gn = N && N.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
3410
3410
|
n === void 0 && (n = r);
|
|
3411
3411
|
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
3412
3412
|
(!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: /* @__PURE__ */ i(function() {
|
|
@@ -3414,32 +3414,32 @@ var Gn = I((N) => {
|
|
|
3414
3414
|
}, "get") }), Object.defineProperty(t, n, s);
|
|
3415
3415
|
} : function(t, e, r, n) {
|
|
3416
3416
|
n === void 0 && (n = r), t[n] = e[r];
|
|
3417
|
-
}),
|
|
3417
|
+
}), gc = N && N.__setModuleDefault || (Object.create ? function(t, e) {
|
|
3418
3418
|
Object.defineProperty(t, "default", { enumerable: !0, value: e });
|
|
3419
3419
|
} : function(t, e) {
|
|
3420
3420
|
t.default = e;
|
|
3421
|
-
}),
|
|
3421
|
+
}), vc = N && N.__importStar || function(t) {
|
|
3422
3422
|
if (t && t.__esModule) return t;
|
|
3423
3423
|
var e = {};
|
|
3424
|
-
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) &&
|
|
3425
|
-
return
|
|
3426
|
-
},
|
|
3427
|
-
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) &&
|
|
3424
|
+
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) && Gn(e, t, r);
|
|
3425
|
+
return gc(e, t), e;
|
|
3426
|
+
}, xc = N && N.__exportStar || function(t, e) {
|
|
3427
|
+
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) && Gn(e, t, r);
|
|
3428
3428
|
};
|
|
3429
3429
|
Object.defineProperty(N, "__esModule", { value: !0 });
|
|
3430
3430
|
N.z = void 0;
|
|
3431
|
-
var
|
|
3432
|
-
N.z =
|
|
3433
|
-
|
|
3434
|
-
N.default =
|
|
3431
|
+
var zn = vc(ir());
|
|
3432
|
+
N.z = zn;
|
|
3433
|
+
xc(ir(), N);
|
|
3434
|
+
N.default = zn;
|
|
3435
3435
|
});
|
|
3436
3436
|
|
|
3437
3437
|
// ../node_modules/ts-dedent/dist/index.js
|
|
3438
|
-
var
|
|
3438
|
+
var Hn = I(($e) => {
|
|
3439
3439
|
"use strict";
|
|
3440
3440
|
Object.defineProperty($e, "__esModule", { value: !0 });
|
|
3441
3441
|
$e.dedent = void 0;
|
|
3442
|
-
function
|
|
3442
|
+
function Jn(t) {
|
|
3443
3443
|
for (var e = [], r = 1; r < arguments.length; r++)
|
|
3444
3444
|
e[r - 1] = arguments[r];
|
|
3445
3445
|
var n = Array.from(typeof t == "string" ? [t] : t);
|
|
@@ -3447,8 +3447,8 @@ var Kn = I(($e) => {
|
|
|
3447
3447
|
var s = n.reduce(function(c, l) {
|
|
3448
3448
|
var p = l.match(/\n([\t ]+|(?!\s).)/g);
|
|
3449
3449
|
return p ? c.concat(p.map(function(f) {
|
|
3450
|
-
var
|
|
3451
|
-
return (
|
|
3450
|
+
var v, k;
|
|
3451
|
+
return (k = (v = f.match(/[\t ]/g)) === null || v === void 0 ? void 0 : v.length) !== null && k !== void 0 ? k : 0;
|
|
3452
3452
|
})) : c;
|
|
3453
3453
|
}, []);
|
|
3454
3454
|
if (s.length) {
|
|
@@ -3462,26 +3462,26 @@ var Kn = I(($e) => {
|
|
|
3462
3462
|
n[0] = n[0].replace(/^\r?\n/, "");
|
|
3463
3463
|
var a = n[0];
|
|
3464
3464
|
return e.forEach(function(c, l) {
|
|
3465
|
-
var p = a.match(/(?:^|\n)( *)$/), f = p ? p[1] : "",
|
|
3465
|
+
var p = a.match(/(?:^|\n)( *)$/), f = p ? p[1] : "", v = c;
|
|
3466
3466
|
typeof c == "string" && c.includes(`
|
|
3467
|
-
`) && (
|
|
3468
|
-
`).map(function(
|
|
3469
|
-
return
|
|
3467
|
+
`) && (v = String(c).split(`
|
|
3468
|
+
`).map(function(k, _) {
|
|
3469
|
+
return _ === 0 ? k : "" + f + k;
|
|
3470
3470
|
}).join(`
|
|
3471
|
-
`)), a +=
|
|
3471
|
+
`)), a += v + n[l + 1];
|
|
3472
3472
|
}), a;
|
|
3473
3473
|
}
|
|
3474
|
-
i(
|
|
3475
|
-
$e.dedent =
|
|
3476
|
-
$e.default =
|
|
3474
|
+
i(Jn, "dedent");
|
|
3475
|
+
$e.dedent = Jn;
|
|
3476
|
+
$e.default = Jn;
|
|
3477
3477
|
});
|
|
3478
3478
|
|
|
3479
3479
|
// ../node_modules/isexe/windows.js
|
|
3480
|
-
var
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
var
|
|
3484
|
-
function
|
|
3480
|
+
var ss = I((Up, ns) => {
|
|
3481
|
+
ns.exports = rs;
|
|
3482
|
+
rs.sync = Ec;
|
|
3483
|
+
var es = O("fs");
|
|
3484
|
+
function Sc(t, e) {
|
|
3485
3485
|
var r = e.pathExt !== void 0 ? e.pathExt : process.env.PATHEXT;
|
|
3486
3486
|
if (!r || (r = r.split(";"), r.indexOf("") !== -1))
|
|
3487
3487
|
return !0;
|
|
@@ -3492,57 +3492,57 @@ var rs = I((Mp, ts) => {
|
|
|
3492
3492
|
}
|
|
3493
3493
|
return !1;
|
|
3494
3494
|
}
|
|
3495
|
-
i(
|
|
3496
|
-
function
|
|
3497
|
-
return !t.isSymbolicLink() && !t.isFile() ? !1 :
|
|
3495
|
+
i(Sc, "checkPathExt");
|
|
3496
|
+
function ts(t, e, r) {
|
|
3497
|
+
return !t.isSymbolicLink() && !t.isFile() ? !1 : Sc(e, r);
|
|
3498
3498
|
}
|
|
3499
|
-
i(
|
|
3500
|
-
function
|
|
3501
|
-
|
|
3502
|
-
r(n, n ? !1 :
|
|
3499
|
+
i(ts, "checkStat");
|
|
3500
|
+
function rs(t, e, r) {
|
|
3501
|
+
es.stat(t, function(n, s) {
|
|
3502
|
+
r(n, n ? !1 : ts(s, t, e));
|
|
3503
3503
|
});
|
|
3504
3504
|
}
|
|
3505
|
-
i(
|
|
3506
|
-
function
|
|
3507
|
-
return
|
|
3505
|
+
i(rs, "isexe");
|
|
3506
|
+
function Ec(t, e) {
|
|
3507
|
+
return ts(es.statSync(t), t, e);
|
|
3508
3508
|
}
|
|
3509
|
-
i(
|
|
3509
|
+
i(Ec, "sync");
|
|
3510
3510
|
});
|
|
3511
3511
|
|
|
3512
3512
|
// ../node_modules/isexe/mode.js
|
|
3513
|
-
var
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
var
|
|
3517
|
-
function
|
|
3518
|
-
|
|
3519
|
-
r(n, n ? !1 :
|
|
3513
|
+
var ds = I((Vp, cs) => {
|
|
3514
|
+
cs.exports = is;
|
|
3515
|
+
is.sync = Cc;
|
|
3516
|
+
var os = O("fs");
|
|
3517
|
+
function is(t, e, r) {
|
|
3518
|
+
os.stat(t, function(n, s) {
|
|
3519
|
+
r(n, n ? !1 : as(s, e));
|
|
3520
3520
|
});
|
|
3521
3521
|
}
|
|
3522
|
-
i(
|
|
3523
|
-
function
|
|
3524
|
-
return os
|
|
3522
|
+
i(is, "isexe");
|
|
3523
|
+
function Cc(t, e) {
|
|
3524
|
+
return as(os.statSync(t), e);
|
|
3525
3525
|
}
|
|
3526
|
-
i(
|
|
3527
|
-
function
|
|
3528
|
-
return t.isFile() &&
|
|
3526
|
+
i(Cc, "sync");
|
|
3527
|
+
function as(t, e) {
|
|
3528
|
+
return t.isFile() && Pc(t, e);
|
|
3529
3529
|
}
|
|
3530
|
-
i(
|
|
3531
|
-
function
|
|
3530
|
+
i(as, "checkStat");
|
|
3531
|
+
function Pc(t, e) {
|
|
3532
3532
|
var r = t.mode, n = t.uid, s = t.gid, o = e.uid !== void 0 ? e.uid : process.getuid && process.getuid(), a = e.gid !== void 0 ? e.gid : process.
|
|
3533
|
-
getgid && process.getgid(), c = parseInt("100", 8), l = parseInt("010", 8), p = parseInt("001", 8), f = c | l,
|
|
3533
|
+
getgid && process.getgid(), c = parseInt("100", 8), l = parseInt("010", 8), p = parseInt("001", 8), f = c | l, v = r & p || r & l && s ===
|
|
3534
3534
|
a || r & c && n === o || r & f && o === 0;
|
|
3535
|
-
return
|
|
3535
|
+
return v;
|
|
3536
3536
|
}
|
|
3537
|
-
i(
|
|
3537
|
+
i(Pc, "checkMode");
|
|
3538
3538
|
});
|
|
3539
3539
|
|
|
3540
3540
|
// ../node_modules/isexe/index.js
|
|
3541
|
-
var
|
|
3542
|
-
var
|
|
3543
|
-
process.platform === "win32" || global.TESTING_WINDOWS ? gt =
|
|
3544
|
-
|
|
3545
|
-
cr.sync =
|
|
3541
|
+
var ls = I((qp, us) => {
|
|
3542
|
+
var Bp = O("fs"), gt;
|
|
3543
|
+
process.platform === "win32" || global.TESTING_WINDOWS ? gt = ss() : gt = ds();
|
|
3544
|
+
us.exports = cr;
|
|
3545
|
+
cr.sync = jc;
|
|
3546
3546
|
function cr(t, e, r) {
|
|
3547
3547
|
if (typeof e == "function" && (r = e, e = {}), !r) {
|
|
3548
3548
|
if (typeof Promise != "function")
|
|
@@ -3558,7 +3558,7 @@ var ds = I((Vp, cs) => {
|
|
|
3558
3558
|
});
|
|
3559
3559
|
}
|
|
3560
3560
|
i(cr, "isexe");
|
|
3561
|
-
function
|
|
3561
|
+
function jc(t, e) {
|
|
3562
3562
|
try {
|
|
3563
3563
|
return gt.sync(t, e || {});
|
|
3564
3564
|
} catch (r) {
|
|
@@ -3567,59 +3567,59 @@ var ds = I((Vp, cs) => {
|
|
|
3567
3567
|
throw r;
|
|
3568
3568
|
}
|
|
3569
3569
|
}
|
|
3570
|
-
i(
|
|
3570
|
+
i(jc, "sync");
|
|
3571
3571
|
});
|
|
3572
3572
|
|
|
3573
3573
|
// ../node_modules/which/which.js
|
|
3574
|
-
var
|
|
3575
|
-
var
|
|
3576
|
-
":",
|
|
3574
|
+
var vs = I((Gp, gs) => {
|
|
3575
|
+
var Ce = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", ps = O("path"), Ac = Ce ? ";" :
|
|
3576
|
+
":", fs = ls(), ms = /* @__PURE__ */ i((t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), "getNotFoundError"), hs = /* @__PURE__ */ i(
|
|
3577
3577
|
(t, e) => {
|
|
3578
|
-
let r = e.colon ||
|
|
3578
|
+
let r = e.colon || Ac, n = t.match(/\//) || Ce && t.match(/\\/) ? [""] : [
|
|
3579
3579
|
// windows always checks the cwd first
|
|
3580
|
-
...
|
|
3580
|
+
...Ce ? [process.cwd()] : [],
|
|
3581
3581
|
...(e.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
3582
3582
|
"").split(r)
|
|
3583
|
-
], s =
|
|
3584
|
-
return
|
|
3583
|
+
], s = Ce ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = Ce ? s.split(r) : [""];
|
|
3584
|
+
return Ce && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
3585
3585
|
pathEnv: n,
|
|
3586
3586
|
pathExt: o,
|
|
3587
3587
|
pathExtExe: s
|
|
3588
3588
|
};
|
|
3589
|
-
}, "getPathInfo"),
|
|
3589
|
+
}, "getPathInfo"), ys = /* @__PURE__ */ i((t, e, r) => {
|
|
3590
3590
|
typeof e == "function" && (r = e, e = {}), e || (e = {});
|
|
3591
|
-
let { pathEnv: n, pathExt: s, pathExtExe: o } =
|
|
3591
|
+
let { pathEnv: n, pathExt: s, pathExtExe: o } = hs(t, e), a = [], c = /* @__PURE__ */ i((p) => new Promise((f, v) => {
|
|
3592
3592
|
if (p === n.length)
|
|
3593
|
-
return e.all && a.length ? f(a) :
|
|
3594
|
-
let
|
|
3593
|
+
return e.all && a.length ? f(a) : v(ms(t));
|
|
3594
|
+
let k = n[p], _ = /^".*"$/.test(k) ? k.slice(1, -1) : k, C = ps.join(_, t), S = !_ && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + C : C;
|
|
3595
3595
|
f(l(S, p, 0));
|
|
3596
|
-
}), "step"), l = /* @__PURE__ */ i((p, f,
|
|
3597
|
-
if (
|
|
3598
|
-
return
|
|
3599
|
-
let
|
|
3600
|
-
|
|
3601
|
-
if (!S &&
|
|
3596
|
+
}), "step"), l = /* @__PURE__ */ i((p, f, v) => new Promise((k, _) => {
|
|
3597
|
+
if (v === s.length)
|
|
3598
|
+
return k(c(f + 1));
|
|
3599
|
+
let C = s[v];
|
|
3600
|
+
fs(p + C, { pathExt: o }, (S, P) => {
|
|
3601
|
+
if (!S && P)
|
|
3602
3602
|
if (e.all)
|
|
3603
|
-
a.push(p +
|
|
3603
|
+
a.push(p + C);
|
|
3604
3604
|
else
|
|
3605
|
-
return
|
|
3606
|
-
return
|
|
3605
|
+
return k(p + C);
|
|
3606
|
+
return k(l(p, f, v + 1));
|
|
3607
3607
|
});
|
|
3608
3608
|
}), "subStep");
|
|
3609
3609
|
return r ? c(0).then((p) => r(null, p), r) : c(0);
|
|
3610
|
-
}, "which"),
|
|
3610
|
+
}, "which"), Oc = /* @__PURE__ */ i((t, e) => {
|
|
3611
3611
|
e = e || {};
|
|
3612
|
-
let { pathEnv: r, pathExt: n, pathExtExe: s } =
|
|
3612
|
+
let { pathEnv: r, pathExt: n, pathExtExe: s } = hs(t, e), o = [];
|
|
3613
3613
|
for (let a = 0; a < r.length; a++) {
|
|
3614
|
-
let c = r[a], l = /^".*"$/.test(c) ? c.slice(1, -1) : c, p =
|
|
3615
|
-
for (let
|
|
3616
|
-
let
|
|
3614
|
+
let c = r[a], l = /^".*"$/.test(c) ? c.slice(1, -1) : c, p = ps.join(l, t), f = !l && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + p : p;
|
|
3615
|
+
for (let v = 0; v < n.length; v++) {
|
|
3616
|
+
let k = f + n[v];
|
|
3617
3617
|
try {
|
|
3618
|
-
if (
|
|
3618
|
+
if (fs.sync(k, { pathExt: s }))
|
|
3619
3619
|
if (e.all)
|
|
3620
|
-
o.push(
|
|
3620
|
+
o.push(k);
|
|
3621
3621
|
else
|
|
3622
|
-
return
|
|
3622
|
+
return k;
|
|
3623
3623
|
} catch {
|
|
3624
3624
|
}
|
|
3625
3625
|
}
|
|
@@ -3628,28 +3628,28 @@ var ys = I((Bp, hs) => {
|
|
|
3628
3628
|
return o;
|
|
3629
3629
|
if (e.nothrow)
|
|
3630
3630
|
return null;
|
|
3631
|
-
throw
|
|
3631
|
+
throw ms(t);
|
|
3632
3632
|
}, "whichSync");
|
|
3633
|
-
|
|
3634
|
-
|
|
3633
|
+
gs.exports = ys;
|
|
3634
|
+
ys.sync = Oc;
|
|
3635
3635
|
});
|
|
3636
3636
|
|
|
3637
3637
|
// ../node_modules/path-key/index.js
|
|
3638
|
-
var
|
|
3638
|
+
var bs = I((Kp, dr) => {
|
|
3639
3639
|
"use strict";
|
|
3640
|
-
var
|
|
3640
|
+
var xs = /* @__PURE__ */ i((t = {}) => {
|
|
3641
3641
|
let e = t.env || process.env;
|
|
3642
3642
|
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(e).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
3643
3643
|
}, "pathKey");
|
|
3644
|
-
dr.exports =
|
|
3645
|
-
dr.exports.default =
|
|
3644
|
+
dr.exports = xs;
|
|
3645
|
+
dr.exports.default = xs;
|
|
3646
3646
|
});
|
|
3647
3647
|
|
|
3648
3648
|
// ../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
3649
|
-
var
|
|
3649
|
+
var Ts = I((Hp, ks) => {
|
|
3650
3650
|
"use strict";
|
|
3651
|
-
var
|
|
3652
|
-
function
|
|
3651
|
+
var ws = O("path"), Rc = vs(), Nc = bs();
|
|
3652
|
+
function _s(t, e) {
|
|
3653
3653
|
let r = t.options.env || process.env, n = process.cwd(), s = t.options.cwd != null, o = s && process.chdir !== void 0 && !process.chdir.
|
|
3654
3654
|
disabled;
|
|
3655
3655
|
if (o)
|
|
@@ -3659,53 +3659,53 @@ var _s = I((zp, ws) => {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
let a;
|
|
3661
3661
|
try {
|
|
3662
|
-
a =
|
|
3663
|
-
path: r[
|
|
3664
|
-
pathExt: e ?
|
|
3662
|
+
a = Rc.sync(t.command, {
|
|
3663
|
+
path: r[Nc({ env: r })],
|
|
3664
|
+
pathExt: e ? ws.delimiter : void 0
|
|
3665
3665
|
});
|
|
3666
3666
|
} catch {
|
|
3667
3667
|
} finally {
|
|
3668
3668
|
o && process.chdir(n);
|
|
3669
3669
|
}
|
|
3670
|
-
return a && (a =
|
|
3670
|
+
return a && (a = ws.resolve(s ? t.options.cwd : "", a)), a;
|
|
3671
3671
|
}
|
|
3672
|
-
i(
|
|
3673
|
-
function
|
|
3674
|
-
return
|
|
3672
|
+
i(_s, "resolveCommandAttempt");
|
|
3673
|
+
function Zc(t) {
|
|
3674
|
+
return _s(t) || _s(t, !0);
|
|
3675
3675
|
}
|
|
3676
|
-
i(
|
|
3677
|
-
|
|
3676
|
+
i(Zc, "resolveCommand");
|
|
3677
|
+
ks.exports = Zc;
|
|
3678
3678
|
});
|
|
3679
3679
|
|
|
3680
3680
|
// ../node_modules/cross-spawn/lib/util/escape.js
|
|
3681
|
-
var
|
|
3681
|
+
var Is = I((Xp, lr) => {
|
|
3682
3682
|
"use strict";
|
|
3683
3683
|
var ur = /([()\][%!^"`<>&|;, *?])/g;
|
|
3684
|
-
function
|
|
3684
|
+
function Mc(t) {
|
|
3685
3685
|
return t = t.replace(ur, "^$1"), t;
|
|
3686
3686
|
}
|
|
3687
|
-
i(
|
|
3688
|
-
function
|
|
3687
|
+
i(Mc, "escapeCommand");
|
|
3688
|
+
function Dc(t, e) {
|
|
3689
3689
|
return t = `${t}`, t = t.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), t = t.replace(/(?=(\\+?)?)\1$/, "$1$1"), t = `"${t}"`, t = t.replace(ur,
|
|
3690
3690
|
"^$1"), e && (t = t.replace(ur, "^$1")), t;
|
|
3691
3691
|
}
|
|
3692
|
-
i(
|
|
3693
|
-
lr.exports.command =
|
|
3694
|
-
lr.exports.argument =
|
|
3692
|
+
i(Dc, "escapeArgument");
|
|
3693
|
+
lr.exports.command = Mc;
|
|
3694
|
+
lr.exports.argument = Dc;
|
|
3695
3695
|
});
|
|
3696
3696
|
|
|
3697
3697
|
// ../node_modules/shebang-regex/index.js
|
|
3698
|
-
var
|
|
3698
|
+
var Es = I((ef, Ss) => {
|
|
3699
3699
|
"use strict";
|
|
3700
|
-
|
|
3700
|
+
Ss.exports = /^#!(.*)/;
|
|
3701
3701
|
});
|
|
3702
3702
|
|
|
3703
3703
|
// ../node_modules/shebang-command/index.js
|
|
3704
|
-
var
|
|
3704
|
+
var Ps = I((tf, Cs) => {
|
|
3705
3705
|
"use strict";
|
|
3706
|
-
var
|
|
3707
|
-
|
|
3708
|
-
let e = t.match(
|
|
3706
|
+
var Lc = Es();
|
|
3707
|
+
Cs.exports = (t = "") => {
|
|
3708
|
+
let e = t.match(Lc);
|
|
3709
3709
|
if (!e)
|
|
3710
3710
|
return null;
|
|
3711
3711
|
let [r, n] = e[0].replace(/#! ?/, "").split(" "), s = r.split("/").pop();
|
|
@@ -3714,45 +3714,45 @@ var Es = I((Xp, Ss) => {
|
|
|
3714
3714
|
});
|
|
3715
3715
|
|
|
3716
3716
|
// ../node_modules/cross-spawn/lib/util/readShebang.js
|
|
3717
|
-
var
|
|
3717
|
+
var As = I((rf, js) => {
|
|
3718
3718
|
"use strict";
|
|
3719
|
-
var pr = O("fs"),
|
|
3720
|
-
function
|
|
3719
|
+
var pr = O("fs"), Uc = Ps();
|
|
3720
|
+
function $c(t) {
|
|
3721
3721
|
let r = Buffer.alloc(150), n;
|
|
3722
3722
|
try {
|
|
3723
3723
|
n = pr.openSync(t, "r"), pr.readSync(n, r, 0, 150, 0), pr.closeSync(n);
|
|
3724
3724
|
} catch {
|
|
3725
3725
|
}
|
|
3726
|
-
return
|
|
3726
|
+
return Uc(r.toString());
|
|
3727
3727
|
}
|
|
3728
|
-
i(
|
|
3729
|
-
|
|
3728
|
+
i($c, "readShebang");
|
|
3729
|
+
js.exports = $c;
|
|
3730
3730
|
});
|
|
3731
3731
|
|
|
3732
3732
|
// ../node_modules/cross-spawn/lib/parse.js
|
|
3733
|
-
var
|
|
3733
|
+
var Zs = I((sf, Ns) => {
|
|
3734
3734
|
"use strict";
|
|
3735
|
-
var
|
|
3736
|
-
function
|
|
3737
|
-
t.file =
|
|
3738
|
-
let e = t.file &&
|
|
3739
|
-
return e ? (t.args.unshift(t.file), t.command = e,
|
|
3740
|
-
}
|
|
3741
|
-
i(
|
|
3742
|
-
function
|
|
3743
|
-
if (
|
|
3735
|
+
var Vc = O("path"), Os = Ts(), Rs = Is(), Fc = As(), Bc = process.platform === "win32", qc = /\.(?:com|exe)$/i, Wc = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
3736
|
+
function Gc(t) {
|
|
3737
|
+
t.file = Os(t);
|
|
3738
|
+
let e = t.file && Fc(t.file);
|
|
3739
|
+
return e ? (t.args.unshift(t.file), t.command = e, Os(t)) : t.file;
|
|
3740
|
+
}
|
|
3741
|
+
i(Gc, "detectShebang");
|
|
3742
|
+
function zc(t) {
|
|
3743
|
+
if (!Bc)
|
|
3744
3744
|
return t;
|
|
3745
|
-
let e =
|
|
3745
|
+
let e = Gc(t), r = !qc.test(e);
|
|
3746
3746
|
if (t.options.forceShell || r) {
|
|
3747
|
-
let n =
|
|
3748
|
-
t.command =
|
|
3747
|
+
let n = Wc.test(e);
|
|
3748
|
+
t.command = Vc.normalize(t.command), t.command = Rs.command(t.command), t.args = t.args.map((o) => Rs.argument(o, n));
|
|
3749
3749
|
let s = [t.command].concat(t.args).join(" ");
|
|
3750
3750
|
t.args = ["/d", "/s", "/c", `"${s}"`], t.command = process.env.comspec || "cmd.exe", t.options.windowsVerbatimArguments = !0;
|
|
3751
3751
|
}
|
|
3752
3752
|
return t;
|
|
3753
3753
|
}
|
|
3754
|
-
i(
|
|
3755
|
-
function
|
|
3754
|
+
i(zc, "parseNonShell");
|
|
3755
|
+
function Kc(t, e, r) {
|
|
3756
3756
|
e && !Array.isArray(e) && (r = e, e = null), e = e ? e.slice(0) : [], r = Object.assign({}, r);
|
|
3757
3757
|
let n = {
|
|
3758
3758
|
command: t,
|
|
@@ -3764,14 +3764,14 @@ var Rs = I((tf, Os) => {
|
|
|
3764
3764
|
args: e
|
|
3765
3765
|
}
|
|
3766
3766
|
};
|
|
3767
|
-
return r.shell ? n :
|
|
3767
|
+
return r.shell ? n : zc(n);
|
|
3768
3768
|
}
|
|
3769
|
-
i(
|
|
3770
|
-
|
|
3769
|
+
i(Kc, "parse");
|
|
3770
|
+
Ns.exports = Kc;
|
|
3771
3771
|
});
|
|
3772
3772
|
|
|
3773
3773
|
// ../node_modules/cross-spawn/lib/enoent.js
|
|
3774
|
-
var
|
|
3774
|
+
var Ls = I((af, Ds) => {
|
|
3775
3775
|
"use strict";
|
|
3776
3776
|
var fr = process.platform === "win32";
|
|
3777
3777
|
function mr(t, e) {
|
|
@@ -3784,63 +3784,63 @@ var Ms = I((nf, Zs) => {
|
|
|
3784
3784
|
});
|
|
3785
3785
|
}
|
|
3786
3786
|
i(mr, "notFoundError");
|
|
3787
|
-
function
|
|
3787
|
+
function Jc(t, e) {
|
|
3788
3788
|
if (!fr)
|
|
3789
3789
|
return;
|
|
3790
3790
|
let r = t.emit;
|
|
3791
3791
|
t.emit = function(n, s) {
|
|
3792
3792
|
if (n === "exit") {
|
|
3793
|
-
let o =
|
|
3793
|
+
let o = Ms(s, e);
|
|
3794
3794
|
if (o)
|
|
3795
3795
|
return r.call(t, "error", o);
|
|
3796
3796
|
}
|
|
3797
3797
|
return r.apply(t, arguments);
|
|
3798
3798
|
};
|
|
3799
3799
|
}
|
|
3800
|
-
i(
|
|
3801
|
-
function
|
|
3800
|
+
i(Jc, "hookChildProcess");
|
|
3801
|
+
function Ms(t, e) {
|
|
3802
3802
|
return fr && t === 1 && !e.file ? mr(e.original, "spawn") : null;
|
|
3803
3803
|
}
|
|
3804
|
-
i(
|
|
3805
|
-
function
|
|
3804
|
+
i(Ms, "verifyENOENT");
|
|
3805
|
+
function Hc(t, e) {
|
|
3806
3806
|
return fr && t === 1 && !e.file ? mr(e.original, "spawnSync") : null;
|
|
3807
3807
|
}
|
|
3808
|
-
i(
|
|
3809
|
-
|
|
3810
|
-
hookChildProcess:
|
|
3811
|
-
verifyENOENT:
|
|
3812
|
-
verifyENOENTSync:
|
|
3808
|
+
i(Hc, "verifyENOENTSync");
|
|
3809
|
+
Ds.exports = {
|
|
3810
|
+
hookChildProcess: Jc,
|
|
3811
|
+
verifyENOENT: Ms,
|
|
3812
|
+
verifyENOENTSync: Hc,
|
|
3813
3813
|
notFoundError: mr
|
|
3814
3814
|
};
|
|
3815
3815
|
});
|
|
3816
3816
|
|
|
3817
3817
|
// ../node_modules/cross-spawn/index.js
|
|
3818
|
-
var
|
|
3818
|
+
var Vs = I((df, Pe) => {
|
|
3819
3819
|
"use strict";
|
|
3820
|
-
var
|
|
3821
|
-
function
|
|
3822
|
-
let n = hr(t, e, r), s =
|
|
3820
|
+
var Us = O("child_process"), hr = Zs(), yr = Ls();
|
|
3821
|
+
function $s(t, e, r) {
|
|
3822
|
+
let n = hr(t, e, r), s = Us.spawn(n.command, n.args, n.options);
|
|
3823
3823
|
return yr.hookChildProcess(s, n), s;
|
|
3824
3824
|
}
|
|
3825
|
-
i(
|
|
3826
|
-
function
|
|
3827
|
-
let n = hr(t, e, r), s =
|
|
3825
|
+
i($s, "spawn");
|
|
3826
|
+
function Yc(t, e, r) {
|
|
3827
|
+
let n = hr(t, e, r), s = Us.spawnSync(n.command, n.args, n.options);
|
|
3828
3828
|
return s.error = s.error || yr.verifyENOENTSync(s.status, n), s;
|
|
3829
3829
|
}
|
|
3830
|
-
i(
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3830
|
+
i(Yc, "spawnSync");
|
|
3831
|
+
Pe.exports = $s;
|
|
3832
|
+
Pe.exports.spawn = $s;
|
|
3833
|
+
Pe.exports.sync = Yc;
|
|
3834
|
+
Pe.exports._parse = hr;
|
|
3835
|
+
Pe.exports._enoent = yr;
|
|
3836
3836
|
});
|
|
3837
3837
|
|
|
3838
3838
|
// ../node_modules/merge-stream/index.js
|
|
3839
|
-
var
|
|
3839
|
+
var ho = I((Zm, mo) => {
|
|
3840
3840
|
"use strict";
|
|
3841
|
-
var { PassThrough:
|
|
3842
|
-
|
|
3843
|
-
var t = [], e = new
|
|
3841
|
+
var { PassThrough: Jd } = O("stream");
|
|
3842
|
+
mo.exports = function() {
|
|
3843
|
+
var t = [], e = new Jd({ objectMode: !0 });
|
|
3844
3844
|
return e.setMaxListeners(0), e.add = r, e.isEmpty = n, e.on("unpipe", s), Array.prototype.slice.call(arguments).forEach(r), e;
|
|
3845
3845
|
function r(o) {
|
|
3846
3846
|
return Array.isArray(o) ? (o.forEach(r), this) : (t.push(o), o.once("end", s.bind(null, o)), o.once("error", e.emit.bind(e, "error")),
|
|
@@ -3864,21 +3864,21 @@ var fo = I((Om, po) => {
|
|
|
3864
3864
|
function Fr(t) {
|
|
3865
3865
|
return t.startsWith("\\\\?\\") ? t : t.replace(/\\/g, "/");
|
|
3866
3866
|
}
|
|
3867
|
-
var
|
|
3867
|
+
var Zo = on(() => {
|
|
3868
3868
|
i(Fr, "slash");
|
|
3869
3869
|
});
|
|
3870
3870
|
|
|
3871
3871
|
// ../node_modules/common-path-prefix/index.js
|
|
3872
|
-
var
|
|
3872
|
+
var Fo = I((Ah, Vo) => {
|
|
3873
3873
|
"use strict";
|
|
3874
|
-
var { sep:
|
|
3874
|
+
var { sep: Iu } = O("path"), Su = /* @__PURE__ */ i((t) => {
|
|
3875
3875
|
for (let e of t) {
|
|
3876
3876
|
let r = /(\/|\\)/.exec(e);
|
|
3877
3877
|
if (r !== null) return r[0];
|
|
3878
3878
|
}
|
|
3879
|
-
return
|
|
3879
|
+
return Iu;
|
|
3880
3880
|
}, "determineSeparator");
|
|
3881
|
-
|
|
3881
|
+
Vo.exports = /* @__PURE__ */ i(function(e, r = Su(e)) {
|
|
3882
3882
|
let [n = "", ...s] = e;
|
|
3883
3883
|
if (n === "" || s.length === 0) return "";
|
|
3884
3884
|
let o = n.split(r), a = o.length;
|
|
@@ -3894,7 +3894,7 @@ var $o = I((Ch, Uo) => {
|
|
|
3894
3894
|
});
|
|
3895
3895
|
|
|
3896
3896
|
// ../node_modules/yocto-queue/index.js
|
|
3897
|
-
var Wr, Ge,
|
|
3897
|
+
var Wr, Ge, Bo = on(() => {
|
|
3898
3898
|
Wr = class {
|
|
3899
3899
|
static {
|
|
3900
3900
|
i(this, "Node");
|
|
@@ -3946,19 +3946,19 @@ var Wr, Ge, Vo = sn(() => {
|
|
|
3946
3946
|
});
|
|
3947
3947
|
|
|
3948
3948
|
// ../node_modules/fetch-retry/index.js
|
|
3949
|
-
var
|
|
3949
|
+
var bi = I((Iv, xi) => {
|
|
3950
3950
|
"use strict";
|
|
3951
|
-
|
|
3951
|
+
xi.exports = function(t, e) {
|
|
3952
3952
|
if (e = e || {}, typeof t != "function")
|
|
3953
|
-
throw new
|
|
3953
|
+
throw new X("fetch must be a function");
|
|
3954
3954
|
if (typeof e != "object")
|
|
3955
|
-
throw new
|
|
3955
|
+
throw new X("defaults must be an object");
|
|
3956
3956
|
if (e.retries !== void 0 && !Bt(e.retries))
|
|
3957
|
-
throw new
|
|
3957
|
+
throw new X("retries must be a positive integer");
|
|
3958
3958
|
if (e.retryDelay !== void 0 && !Bt(e.retryDelay) && typeof e.retryDelay != "function")
|
|
3959
|
-
throw new
|
|
3959
|
+
throw new X("retryDelay must be a positive integer or a function returning a positive integer");
|
|
3960
3960
|
if (e.retryOn !== void 0 && !Array.isArray(e.retryOn) && typeof e.retryOn != "function")
|
|
3961
|
-
throw new
|
|
3961
|
+
throw new X("retryOn property expects an array or function");
|
|
3962
3962
|
var r = {
|
|
3963
3963
|
retries: 3,
|
|
3964
3964
|
retryDelay: 1e3,
|
|
@@ -3970,54 +3970,54 @@ var xi = I((_x, gi) => {
|
|
|
3970
3970
|
if (Bt(o.retries))
|
|
3971
3971
|
a = o.retries;
|
|
3972
3972
|
else
|
|
3973
|
-
throw new
|
|
3973
|
+
throw new X("retries must be a positive integer");
|
|
3974
3974
|
if (o && o.retryDelay !== void 0)
|
|
3975
3975
|
if (Bt(o.retryDelay) || typeof o.retryDelay == "function")
|
|
3976
3976
|
c = o.retryDelay;
|
|
3977
3977
|
else
|
|
3978
|
-
throw new
|
|
3978
|
+
throw new X("retryDelay must be a positive integer or a function returning a positive integer");
|
|
3979
3979
|
if (o && o.retryOn)
|
|
3980
3980
|
if (Array.isArray(o.retryOn) || typeof o.retryOn == "function")
|
|
3981
3981
|
l = o.retryOn;
|
|
3982
3982
|
else
|
|
3983
|
-
throw new
|
|
3983
|
+
throw new X("retryOn property expects an array or function");
|
|
3984
3984
|
return new Promise(function(p, f) {
|
|
3985
|
-
var
|
|
3986
|
-
var
|
|
3987
|
-
t(
|
|
3985
|
+
var v = /* @__PURE__ */ i(function(_) {
|
|
3986
|
+
var C = typeof Request < "u" && s instanceof Request ? s.clone() : s;
|
|
3987
|
+
t(C, o).then(function(S) {
|
|
3988
3988
|
if (Array.isArray(l) && l.indexOf(S.status) === -1)
|
|
3989
3989
|
p(S);
|
|
3990
3990
|
else if (typeof l == "function")
|
|
3991
3991
|
try {
|
|
3992
|
-
return Promise.resolve(l(
|
|
3993
|
-
|
|
3992
|
+
return Promise.resolve(l(_, null, S)).then(function(P) {
|
|
3993
|
+
P ? k(_, null, S) : p(S);
|
|
3994
3994
|
}).catch(f);
|
|
3995
|
-
} catch (
|
|
3996
|
-
f(
|
|
3995
|
+
} catch (P) {
|
|
3996
|
+
f(P);
|
|
3997
3997
|
}
|
|
3998
3998
|
else
|
|
3999
|
-
|
|
3999
|
+
_ < a ? k(_, null, S) : p(S);
|
|
4000
4000
|
}).catch(function(S) {
|
|
4001
4001
|
if (typeof l == "function")
|
|
4002
4002
|
try {
|
|
4003
|
-
Promise.resolve(l(
|
|
4004
|
-
|
|
4005
|
-
}).catch(function(
|
|
4006
|
-
f(
|
|
4003
|
+
Promise.resolve(l(_, S, null)).then(function(P) {
|
|
4004
|
+
P ? k(_, S, null) : f(S);
|
|
4005
|
+
}).catch(function(P) {
|
|
4006
|
+
f(P);
|
|
4007
4007
|
});
|
|
4008
|
-
} catch (
|
|
4009
|
-
f(
|
|
4008
|
+
} catch (P) {
|
|
4009
|
+
f(P);
|
|
4010
4010
|
}
|
|
4011
|
-
else
|
|
4011
|
+
else _ < a ? k(_, S, null) : f(S);
|
|
4012
4012
|
});
|
|
4013
4013
|
}, "wrappedFetch");
|
|
4014
|
-
function
|
|
4015
|
-
var
|
|
4014
|
+
function k(_, C, S) {
|
|
4015
|
+
var P = typeof c == "function" ? c(_, C, S) : c;
|
|
4016
4016
|
setTimeout(function() {
|
|
4017
|
-
|
|
4018
|
-
},
|
|
4017
|
+
v(++_);
|
|
4018
|
+
}, P);
|
|
4019
4019
|
}
|
|
4020
|
-
i(
|
|
4020
|
+
i(k, "retry"), v(0);
|
|
4021
4021
|
});
|
|
4022
4022
|
}, "fetchRetry");
|
|
4023
4023
|
};
|
|
@@ -4025,57 +4025,57 @@ var xi = I((_x, gi) => {
|
|
|
4025
4025
|
return Number.isInteger(t) && t >= 0;
|
|
4026
4026
|
}
|
|
4027
4027
|
i(Bt, "isPositiveInteger");
|
|
4028
|
-
function
|
|
4028
|
+
function X(t) {
|
|
4029
4029
|
this.name = "ArgumentError", this.message = t;
|
|
4030
4030
|
}
|
|
4031
|
-
i(
|
|
4031
|
+
i(X, "ArgumentError");
|
|
4032
4032
|
});
|
|
4033
4033
|
|
|
4034
4034
|
// src/telemetry/index.ts
|
|
4035
|
-
import { logger as
|
|
4035
|
+
import { logger as Ai } from "storybook/internal/node-logger";
|
|
4036
4036
|
|
|
4037
4037
|
// src/telemetry/notify.ts
|
|
4038
|
-
var
|
|
4039
|
-
import { cache as
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
),
|
|
4038
|
+
var pn = z(dn(), 1);
|
|
4039
|
+
import { cache as un } from "storybook/internal/common";
|
|
4040
|
+
import { CLI_COLORS as Vi, logger as rt } from "storybook/internal/node-logger";
|
|
4041
|
+
var ln = "telemetry-notification-date", fn = /* @__PURE__ */ i(async () => {
|
|
4042
|
+
await un.get(ln, null) || (un.set(ln, Date.now()), rt.log(
|
|
4043
|
+
`${Vi.info("Attention:")} Storybook now collects completely anonymous telemetry regarding usage. This information is used to shape Story\
|
|
4044
|
+
book's roadmap and prioritize features.`
|
|
4045
|
+
), rt.log(
|
|
4046
4046
|
"You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"
|
|
4047
|
-
),
|
|
4047
|
+
), rt.log(pn.default.cyan("https://storybook.js.org/telemetry")), rt.log(""));
|
|
4048
4048
|
}, "notify");
|
|
4049
4049
|
|
|
4050
4050
|
// src/telemetry/sanitize.ts
|
|
4051
|
-
import
|
|
4052
|
-
function
|
|
4051
|
+
import yn from "node:path";
|
|
4052
|
+
function mn(t) {
|
|
4053
4053
|
return t.replace(/[-[/{}()*+?.\\^$|]/g, "\\$&");
|
|
4054
4054
|
}
|
|
4055
|
-
i(
|
|
4056
|
-
function
|
|
4055
|
+
i(mn, "regexpEscape");
|
|
4056
|
+
function hn(t = "") {
|
|
4057
4057
|
return t.replace(/\u001B\[[0-9;]*m/g, "");
|
|
4058
4058
|
}
|
|
4059
|
-
i(
|
|
4060
|
-
function Re(t, e =
|
|
4059
|
+
i(hn, "removeAnsiEscapeCodes");
|
|
4060
|
+
function Re(t, e = yn.sep) {
|
|
4061
4061
|
if (!t)
|
|
4062
4062
|
return t;
|
|
4063
4063
|
let r = process.cwd().split(e);
|
|
4064
4064
|
for (; r.length > 1; ) {
|
|
4065
|
-
let n = r.join(e), s = new RegExp(
|
|
4065
|
+
let n = r.join(e), s = new RegExp(mn(n), "gi");
|
|
4066
4066
|
t = t.replace(s, "$SNIP");
|
|
4067
|
-
let o = r.join(e + e), a = new RegExp(
|
|
4067
|
+
let o = r.join(e + e), a = new RegExp(mn(o), "gi");
|
|
4068
4068
|
t = t.replace(a, "$SNIP"), r.pop();
|
|
4069
4069
|
}
|
|
4070
4070
|
return t;
|
|
4071
4071
|
}
|
|
4072
4072
|
i(Re, "cleanPaths");
|
|
4073
|
-
function nt(t, e =
|
|
4073
|
+
function nt(t, e = yn.sep) {
|
|
4074
4074
|
try {
|
|
4075
4075
|
t = {
|
|
4076
4076
|
...JSON.parse(JSON.stringify(t)),
|
|
4077
|
-
message:
|
|
4078
|
-
stack:
|
|
4077
|
+
message: hn(t.message),
|
|
4078
|
+
stack: hn(t.stack),
|
|
4079
4079
|
cause: t.cause,
|
|
4080
4080
|
name: t.name
|
|
4081
4081
|
};
|
|
@@ -4088,53 +4088,53 @@ function nt(t, e = mn.sep) {
|
|
|
4088
4088
|
i(nt, "sanitizeError");
|
|
4089
4089
|
|
|
4090
4090
|
// src/telemetry/storybook-metadata.ts
|
|
4091
|
-
import { dirname as
|
|
4091
|
+
import { dirname as tl } from "node:path";
|
|
4092
4092
|
import {
|
|
4093
|
-
getProjectRoot as
|
|
4094
|
-
getStorybookConfiguration as
|
|
4095
|
-
getStorybookInfo as
|
|
4096
|
-
loadMainConfig as
|
|
4097
|
-
versions as
|
|
4093
|
+
getProjectRoot as rl,
|
|
4094
|
+
getStorybookConfiguration as nl,
|
|
4095
|
+
getStorybookInfo as sl,
|
|
4096
|
+
loadMainConfig as ol,
|
|
4097
|
+
versions as il
|
|
4098
4098
|
} from "storybook/internal/common";
|
|
4099
|
-
import { readConfig as
|
|
4099
|
+
import { readConfig as al } from "storybook/internal/csf-tools";
|
|
4100
4100
|
|
|
4101
4101
|
// ../node_modules/fd-package-json/dist/esm/main.js
|
|
4102
|
-
var
|
|
4103
|
-
import { resolve as
|
|
4104
|
-
import { stat as
|
|
4105
|
-
import { statSync as
|
|
4106
|
-
async function
|
|
4102
|
+
var xn = z(vn(), 1);
|
|
4103
|
+
import { resolve as Bi } from "node:path";
|
|
4104
|
+
import { stat as qi, readFile as Wi } from "node:fs/promises";
|
|
4105
|
+
import { statSync as ql, readFileSync as Wl } from "node:fs";
|
|
4106
|
+
async function Gi(t) {
|
|
4107
4107
|
try {
|
|
4108
|
-
return (await
|
|
4108
|
+
return (await qi(t)).isFile();
|
|
4109
4109
|
} catch {
|
|
4110
4110
|
return !1;
|
|
4111
4111
|
}
|
|
4112
4112
|
}
|
|
4113
|
-
i(
|
|
4113
|
+
i(Gi, "fileExists");
|
|
4114
4114
|
async function Kt(t) {
|
|
4115
|
-
for (let e of (0,
|
|
4116
|
-
let r =
|
|
4117
|
-
if (await
|
|
4115
|
+
for (let e of (0, xn.walkUp)(t)) {
|
|
4116
|
+
let r = Bi(e, "package.json");
|
|
4117
|
+
if (await Gi(r))
|
|
4118
4118
|
return r;
|
|
4119
4119
|
}
|
|
4120
4120
|
return null;
|
|
4121
4121
|
}
|
|
4122
4122
|
i(Kt, "findPackagePath");
|
|
4123
|
-
async function
|
|
4123
|
+
async function bn(t) {
|
|
4124
4124
|
let e = await Kt(t);
|
|
4125
4125
|
if (!e)
|
|
4126
4126
|
return null;
|
|
4127
4127
|
try {
|
|
4128
|
-
let r = await
|
|
4128
|
+
let r = await Wi(e, { encoding: "utf8" });
|
|
4129
4129
|
return JSON.parse(r);
|
|
4130
4130
|
} catch {
|
|
4131
4131
|
return null;
|
|
4132
4132
|
}
|
|
4133
4133
|
}
|
|
4134
|
-
i(
|
|
4134
|
+
i(bn, "findPackage");
|
|
4135
4135
|
|
|
4136
4136
|
// ../node_modules/package-manager-detector/dist/constants.mjs
|
|
4137
|
-
var
|
|
4137
|
+
var wn = [
|
|
4138
4138
|
"npm",
|
|
4139
4139
|
"yarn",
|
|
4140
4140
|
"yarn@berry",
|
|
@@ -4151,7 +4151,7 @@ var vn = [
|
|
|
4151
4151
|
"yarn.lock": "yarn",
|
|
4152
4152
|
"package-lock.json": "npm",
|
|
4153
4153
|
"npm-shrinkwrap.json": "npm"
|
|
4154
|
-
},
|
|
4154
|
+
}, Ht = {
|
|
4155
4155
|
"node_modules/.deno/": "deno",
|
|
4156
4156
|
"node_modules/.pnpm/": "pnpm",
|
|
4157
4157
|
"node_modules/.yarn-state.yml": "yarn",
|
|
@@ -4168,53 +4168,53 @@ var vn = [
|
|
|
4168
4168
|
};
|
|
4169
4169
|
|
|
4170
4170
|
// ../node_modules/package-manager-detector/dist/detect.mjs
|
|
4171
|
-
import
|
|
4171
|
+
import kn from "node:fs/promises";
|
|
4172
4172
|
import Q from "node:path";
|
|
4173
|
-
import
|
|
4174
|
-
async function
|
|
4173
|
+
import zi from "node:process";
|
|
4174
|
+
async function Yt(t, e) {
|
|
4175
4175
|
try {
|
|
4176
|
-
let r = await
|
|
4176
|
+
let r = await kn.stat(t);
|
|
4177
4177
|
return e === "file" ? r.isFile() : r.isDirectory();
|
|
4178
4178
|
} catch {
|
|
4179
4179
|
return !1;
|
|
4180
4180
|
}
|
|
4181
4181
|
}
|
|
4182
|
-
i(
|
|
4183
|
-
function*
|
|
4182
|
+
i(Yt, "pathExists");
|
|
4183
|
+
function* Ki(t = zi.cwd()) {
|
|
4184
4184
|
let e = Q.resolve(t), { root: r } = Q.parse(e);
|
|
4185
4185
|
for (; e && e !== r; )
|
|
4186
4186
|
yield e, e = Q.dirname(e);
|
|
4187
4187
|
}
|
|
4188
|
-
i(
|
|
4189
|
-
async function
|
|
4190
|
-
return !t || !
|
|
4188
|
+
i(Ki, "lookup");
|
|
4189
|
+
async function _n(t, e) {
|
|
4190
|
+
return !t || !Yt(t, "file") ? null : await Hi(t, e);
|
|
4191
4191
|
}
|
|
4192
|
-
i(
|
|
4192
|
+
i(_n, "parsePackageJson");
|
|
4193
4193
|
async function Xt(t = {}) {
|
|
4194
4194
|
let { cwd: e, strategies: r = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown: n } = t;
|
|
4195
|
-
for (let s of
|
|
4195
|
+
for (let s of Ki(e))
|
|
4196
4196
|
for (let o of r)
|
|
4197
4197
|
switch (o) {
|
|
4198
4198
|
case "lockfile": {
|
|
4199
4199
|
for (let a of Object.keys(Jt))
|
|
4200
|
-
if (await
|
|
4201
|
-
let c = Jt[a], l = await
|
|
4200
|
+
if (await Yt(Q.join(s, a), "file")) {
|
|
4201
|
+
let c = Jt[a], l = await _n(Q.join(s, "package.json"), n);
|
|
4202
4202
|
return l || { name: c, agent: c };
|
|
4203
4203
|
}
|
|
4204
4204
|
break;
|
|
4205
4205
|
}
|
|
4206
4206
|
case "packageManager-field":
|
|
4207
4207
|
case "devEngines-field": {
|
|
4208
|
-
let a = await
|
|
4208
|
+
let a = await _n(Q.join(s, "package.json"), n);
|
|
4209
4209
|
if (a)
|
|
4210
4210
|
return a;
|
|
4211
4211
|
break;
|
|
4212
4212
|
}
|
|
4213
4213
|
case "install-metadata": {
|
|
4214
|
-
for (let a of Object.keys(
|
|
4214
|
+
for (let a of Object.keys(Ht)) {
|
|
4215
4215
|
let c = a.endsWith("/") ? "dir" : "file";
|
|
4216
|
-
if (await
|
|
4217
|
-
let l =
|
|
4216
|
+
if (await Yt(Q.join(s, a), c)) {
|
|
4217
|
+
let l = Ht[a], p = l === "yarn" ? Yi(a) ? "yarn" : "yarn@berry" : l;
|
|
4218
4218
|
return { name: l, agent: p };
|
|
4219
4219
|
}
|
|
4220
4220
|
}
|
|
@@ -4224,7 +4224,7 @@ async function Xt(t = {}) {
|
|
|
4224
4224
|
return null;
|
|
4225
4225
|
}
|
|
4226
4226
|
i(Xt, "detect");
|
|
4227
|
-
function
|
|
4227
|
+
function Ji(t) {
|
|
4228
4228
|
let e = /* @__PURE__ */ i((r) => r?.match(/\d+(\.\d+){0,2}/)?.[0] ?? r, "handelVer");
|
|
4229
4229
|
if (typeof t.packageManager == "string") {
|
|
4230
4230
|
let [r, n] = t.packageManager.replace(/^\^/, "").split("@");
|
|
@@ -4236,25 +4236,25 @@ function Gi(t) {
|
|
|
4236
4236
|
ver: e(t.devEngines.packageManager.version)
|
|
4237
4237
|
};
|
|
4238
4238
|
}
|
|
4239
|
-
i(
|
|
4240
|
-
async function
|
|
4239
|
+
i(Ji, "getNameAndVer");
|
|
4240
|
+
async function Hi(t, e) {
|
|
4241
4241
|
try {
|
|
4242
|
-
let r = JSON.parse(await
|
|
4242
|
+
let r = JSON.parse(await kn.readFile(t, "utf8")), n, s = Ji(r);
|
|
4243
4243
|
if (s) {
|
|
4244
4244
|
let o = s.name, a = s.ver, c = a;
|
|
4245
4245
|
return o === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: o, agent: n, version: c }) : o === "pnpm" &&
|
|
4246
|
-
a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: o, agent: n, version: c }) :
|
|
4246
|
+
a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: o, agent: n, version: c }) : wn.includes(o) ? (n = o, { name: o, agent: n, version: c }) :
|
|
4247
4247
|
e?.(r.packageManager) ?? null;
|
|
4248
4248
|
}
|
|
4249
4249
|
} catch {
|
|
4250
4250
|
}
|
|
4251
4251
|
return null;
|
|
4252
4252
|
}
|
|
4253
|
-
i(
|
|
4254
|
-
function
|
|
4253
|
+
i(Hi, "handlePackageManager");
|
|
4254
|
+
function Yi(t) {
|
|
4255
4255
|
return t.endsWith(".yarn_integrity");
|
|
4256
4256
|
}
|
|
4257
|
-
i(
|
|
4257
|
+
i(Yi, "isMetadataYarnClassic");
|
|
4258
4258
|
|
|
4259
4259
|
// ../node_modules/package-manager-detector/dist/index.mjs
|
|
4260
4260
|
import "node:fs/promises";
|
|
@@ -4262,26 +4262,26 @@ import "node:path";
|
|
|
4262
4262
|
import "node:process";
|
|
4263
4263
|
|
|
4264
4264
|
// package.json
|
|
4265
|
-
var ot = "9.1.0-alpha.
|
|
4265
|
+
var ot = "9.1.0-alpha.6";
|
|
4266
4266
|
|
|
4267
4267
|
// src/cli/globalSettings.ts
|
|
4268
|
-
var
|
|
4268
|
+
var Ee = z(Kn(), 1);
|
|
4269
4269
|
import ar from "node:fs/promises";
|
|
4270
|
-
import { homedir as
|
|
4271
|
-
import { dirname as
|
|
4270
|
+
import { homedir as bc } from "node:os";
|
|
4271
|
+
import { dirname as wc, join as _c } from "node:path";
|
|
4272
4272
|
|
|
4273
4273
|
// src/server-errors.ts
|
|
4274
|
-
var
|
|
4274
|
+
var Xn = z(Hn(), 1);
|
|
4275
4275
|
|
|
4276
4276
|
// src/storybook-error.ts
|
|
4277
|
-
function
|
|
4277
|
+
function Yn({
|
|
4278
4278
|
code: t,
|
|
4279
4279
|
category: e
|
|
4280
4280
|
}) {
|
|
4281
4281
|
let r = String(t).padStart(4, "0");
|
|
4282
4282
|
return `SB_${e}_${r}`;
|
|
4283
4283
|
}
|
|
4284
|
-
i(
|
|
4284
|
+
i(Yn, "parseErrorCode");
|
|
4285
4285
|
var mt = class t extends Error {
|
|
4286
4286
|
constructor(r) {
|
|
4287
4287
|
super(t.getFullMessage(r));
|
|
@@ -4298,7 +4298,7 @@ var mt = class t extends Error {
|
|
|
4298
4298
|
i(this, "StorybookError");
|
|
4299
4299
|
}
|
|
4300
4300
|
get fullErrorCode() {
|
|
4301
|
-
return
|
|
4301
|
+
return Yn({ code: this.code, category: this.category });
|
|
4302
4302
|
}
|
|
4303
4303
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
4304
4304
|
get name() {
|
|
@@ -4313,7 +4313,7 @@ var mt = class t extends Error {
|
|
|
4313
4313
|
message: o
|
|
4314
4314
|
}) {
|
|
4315
4315
|
let a;
|
|
4316
|
-
return r === !0 ? a = `https://storybook.js.org/error/${
|
|
4316
|
+
return r === !0 ? a = `https://storybook.js.org/error/${Yn({ code: n, category: s })}` : typeof r == "string" ? a = r : Array.isArray(r) &&
|
|
4317
4317
|
(a = `
|
|
4318
4318
|
${r.map((c) => ` - ${c}`).join(`
|
|
4319
4319
|
`)}`), `${o}${a != null ? `
|
|
@@ -4329,7 +4329,7 @@ var ht = class extends mt {
|
|
|
4329
4329
|
super({
|
|
4330
4330
|
category: "CORE-SERVER",
|
|
4331
4331
|
code: 1,
|
|
4332
|
-
message:
|
|
4332
|
+
message: Xn.dedent`
|
|
4333
4333
|
Unable to save global settings file to ${r.filePath}
|
|
4334
4334
|
${r.error && `Reason: ${r.error}`}`
|
|
4335
4335
|
});
|
|
@@ -4341,25 +4341,25 @@ var ht = class extends mt {
|
|
|
4341
4341
|
};
|
|
4342
4342
|
|
|
4343
4343
|
// src/cli/globalSettings.ts
|
|
4344
|
-
var
|
|
4345
|
-
version:
|
|
4344
|
+
var kc = _c(bc(), ".storybook", "settings.json"), Tc = 1, Ic = Ee.z.object({
|
|
4345
|
+
version: Ee.z.number(),
|
|
4346
4346
|
// NOTE: every key (and subkey) below must be optional, for forwards compatibility reasons
|
|
4347
4347
|
// (we can remove keys once they are deprecated)
|
|
4348
|
-
userSince:
|
|
4349
|
-
init:
|
|
4350
|
-
}),
|
|
4351
|
-
async function
|
|
4352
|
-
if (
|
|
4353
|
-
return
|
|
4348
|
+
userSince: Ee.z.number().optional(),
|
|
4349
|
+
init: Ee.z.object({ skipOnboarding: Ee.z.boolean().optional() }).optional()
|
|
4350
|
+
}), Se;
|
|
4351
|
+
async function Qn(t = kc) {
|
|
4352
|
+
if (Se)
|
|
4353
|
+
return Se;
|
|
4354
4354
|
try {
|
|
4355
|
-
let e = await ar.readFile(t, "utf8"), r =
|
|
4356
|
-
|
|
4355
|
+
let e = await ar.readFile(t, "utf8"), r = Ic.parse(JSON.parse(e));
|
|
4356
|
+
Se = new yt(t, r);
|
|
4357
4357
|
} catch {
|
|
4358
|
-
|
|
4358
|
+
Se = new yt(t, { version: Tc, userSince: Date.now() }), await Se.save();
|
|
4359
4359
|
}
|
|
4360
|
-
return
|
|
4360
|
+
return Se;
|
|
4361
4361
|
}
|
|
4362
|
-
i(
|
|
4362
|
+
i(Qn, "globalSettings");
|
|
4363
4363
|
var yt = class {
|
|
4364
4364
|
static {
|
|
4365
4365
|
i(this, "Settings");
|
|
@@ -4376,7 +4376,7 @@ var yt = class {
|
|
|
4376
4376
|
/** Save settings to the file */
|
|
4377
4377
|
async save() {
|
|
4378
4378
|
try {
|
|
4379
|
-
await ar.mkdir(
|
|
4379
|
+
await ar.mkdir(wc(this.filePath), { recursive: !0 }), await ar.writeFile(this.filePath, JSON.stringify(this.value, null, 2));
|
|
4380
4380
|
} catch (e) {
|
|
4381
4381
|
throw new ht({
|
|
4382
4382
|
filePath: this.filePath,
|
|
@@ -4387,15 +4387,15 @@ var yt = class {
|
|
|
4387
4387
|
};
|
|
4388
4388
|
|
|
4389
4389
|
// src/telemetry/get-application-file-count.ts
|
|
4390
|
-
import { sep as
|
|
4390
|
+
import { sep as Vu } from "node:path";
|
|
4391
4391
|
|
|
4392
4392
|
// src/telemetry/exec-command-count-lines.ts
|
|
4393
|
-
import { createInterface as
|
|
4393
|
+
import { createInterface as vu } from "node:readline";
|
|
4394
4394
|
|
|
4395
4395
|
// node_modules/execa/index.js
|
|
4396
|
-
var
|
|
4397
|
-
import { Buffer as
|
|
4398
|
-
import
|
|
4396
|
+
var jo = z(Vs(), 1);
|
|
4397
|
+
import { Buffer as pu } from "node:buffer";
|
|
4398
|
+
import fu from "node:path";
|
|
4399
4399
|
import Vr from "node:child_process";
|
|
4400
4400
|
import At from "node:process";
|
|
4401
4401
|
|
|
@@ -4408,71 +4408,71 @@ function gr(t) {
|
|
|
4408
4408
|
i(gr, "stripFinalNewline");
|
|
4409
4409
|
|
|
4410
4410
|
// node_modules/npm-run-path/index.js
|
|
4411
|
-
import
|
|
4411
|
+
import xt from "node:process";
|
|
4412
4412
|
import Ve from "node:path";
|
|
4413
|
-
import { fileURLToPath as
|
|
4413
|
+
import { fileURLToPath as Fs } from "node:url";
|
|
4414
4414
|
|
|
4415
4415
|
// node_modules/path-key/index.js
|
|
4416
|
-
function
|
|
4416
|
+
function vt(t = {}) {
|
|
4417
4417
|
let {
|
|
4418
4418
|
env: e = process.env,
|
|
4419
4419
|
platform: r = process.platform
|
|
4420
4420
|
} = t;
|
|
4421
4421
|
return r !== "win32" ? "PATH" : Object.keys(e).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
4422
4422
|
}
|
|
4423
|
-
i(
|
|
4423
|
+
i(vt, "pathKey");
|
|
4424
4424
|
|
|
4425
4425
|
// node_modules/npm-run-path/index.js
|
|
4426
|
-
var
|
|
4427
|
-
cwd: t =
|
|
4428
|
-
path: e =
|
|
4426
|
+
var Xc = /* @__PURE__ */ i(({
|
|
4427
|
+
cwd: t = xt.cwd(),
|
|
4428
|
+
path: e = xt.env[vt()],
|
|
4429
4429
|
preferLocal: r = !0,
|
|
4430
|
-
execPath: n =
|
|
4430
|
+
execPath: n = xt.execPath,
|
|
4431
4431
|
addExecPath: s = !0
|
|
4432
4432
|
} = {}) => {
|
|
4433
|
-
let o = t instanceof URL ?
|
|
4434
|
-
return r &&
|
|
4435
|
-
}, "npmRunPath"),
|
|
4433
|
+
let o = t instanceof URL ? Fs(t) : t, a = Ve.resolve(o), c = [];
|
|
4434
|
+
return r && Qc(c, a), s && ed(c, n, a), [...c, e].join(Ve.delimiter);
|
|
4435
|
+
}, "npmRunPath"), Qc = /* @__PURE__ */ i((t, e) => {
|
|
4436
4436
|
let r;
|
|
4437
4437
|
for (; r !== e; )
|
|
4438
4438
|
t.push(Ve.join(e, "node_modules/.bin")), r = e, e = Ve.resolve(e, "..");
|
|
4439
|
-
}, "applyPreferLocal"),
|
|
4440
|
-
let n = e instanceof URL ?
|
|
4439
|
+
}, "applyPreferLocal"), ed = /* @__PURE__ */ i((t, e, r) => {
|
|
4440
|
+
let n = e instanceof URL ? Fs(e) : e;
|
|
4441
4441
|
t.push(Ve.resolve(r, n, ".."));
|
|
4442
|
-
}, "applyExecPath"),
|
|
4442
|
+
}, "applyExecPath"), Bs = /* @__PURE__ */ i(({ env: t = xt.env, ...e } = {}) => {
|
|
4443
4443
|
t = { ...t };
|
|
4444
|
-
let r =
|
|
4445
|
-
return e.path = t[r], t[r] =
|
|
4444
|
+
let r = vt({ env: t });
|
|
4445
|
+
return e.path = t[r], t[r] = Xc(e), t;
|
|
4446
4446
|
}, "npmRunPathEnv");
|
|
4447
4447
|
|
|
4448
4448
|
// node_modules/mimic-fn/index.js
|
|
4449
|
-
var
|
|
4449
|
+
var td = /* @__PURE__ */ i((t, e, r, n) => {
|
|
4450
4450
|
if (r === "length" || r === "prototype" || r === "arguments" || r === "caller")
|
|
4451
4451
|
return;
|
|
4452
4452
|
let s = Object.getOwnPropertyDescriptor(t, r), o = Object.getOwnPropertyDescriptor(e, r);
|
|
4453
|
-
!
|
|
4454
|
-
}, "copyProperty"),
|
|
4453
|
+
!rd(s, o) && n || Object.defineProperty(t, r, o);
|
|
4454
|
+
}, "copyProperty"), rd = /* @__PURE__ */ i(function(t, e) {
|
|
4455
4455
|
return t === void 0 || t.configurable || t.writable === e.writable && t.enumerable === e.enumerable && t.configurable === e.configurable &&
|
|
4456
4456
|
(t.writable || t.value === e.value);
|
|
4457
|
-
}, "canCopyProperty"),
|
|
4457
|
+
}, "canCopyProperty"), nd = /* @__PURE__ */ i((t, e) => {
|
|
4458
4458
|
let r = Object.getPrototypeOf(e);
|
|
4459
4459
|
r !== Object.getPrototypeOf(t) && Object.setPrototypeOf(t, r);
|
|
4460
|
-
}, "changePrototype"),
|
|
4461
|
-
${e}`, "wrappedToString"),
|
|
4462
|
-
prototype.toString, "name"),
|
|
4463
|
-
let n = r === "" ? "" : `with ${r.trim()}() `, s =
|
|
4464
|
-
Object.defineProperty(s, "name",
|
|
4460
|
+
}, "changePrototype"), sd = /* @__PURE__ */ i((t, e) => `/* Wrapped ${t}*/
|
|
4461
|
+
${e}`, "wrappedToString"), od = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), id = Object.getOwnPropertyDescriptor(Function.
|
|
4462
|
+
prototype.toString, "name"), ad = /* @__PURE__ */ i((t, e, r) => {
|
|
4463
|
+
let n = r === "" ? "" : `with ${r.trim()}() `, s = sd.bind(null, n, e.toString());
|
|
4464
|
+
Object.defineProperty(s, "name", id), Object.defineProperty(t, "toString", { ...od, value: s });
|
|
4465
4465
|
}, "changeToString");
|
|
4466
|
-
function
|
|
4466
|
+
function vr(t, e, { ignoreNonConfigurable: r = !1 } = {}) {
|
|
4467
4467
|
let { name: n } = t;
|
|
4468
4468
|
for (let s of Reflect.ownKeys(e))
|
|
4469
|
-
|
|
4470
|
-
return
|
|
4469
|
+
td(t, e, s, r);
|
|
4470
|
+
return nd(t, e), ad(t, e, n), t;
|
|
4471
4471
|
}
|
|
4472
|
-
i(
|
|
4472
|
+
i(vr, "mimicFunction");
|
|
4473
4473
|
|
|
4474
4474
|
// node_modules/onetime/index.js
|
|
4475
|
-
var bt = /* @__PURE__ */ new WeakMap(),
|
|
4475
|
+
var bt = /* @__PURE__ */ new WeakMap(), qs = /* @__PURE__ */ i((t, e = {}) => {
|
|
4476
4476
|
if (typeof t != "function")
|
|
4477
4477
|
throw new TypeError("Expected a function");
|
|
4478
4478
|
let r, n = 0, s = t.displayName || t.name || "<anonymous>", o = /* @__PURE__ */ i(function(...a) {
|
|
@@ -4482,38 +4482,38 @@ var bt = /* @__PURE__ */ new WeakMap(), Fs = /* @__PURE__ */ i((t, e = {}) => {
|
|
|
4482
4482
|
throw new Error(`Function \`${s}\` can only be called once`);
|
|
4483
4483
|
return r;
|
|
4484
4484
|
}, "onetime");
|
|
4485
|
-
return
|
|
4485
|
+
return vr(o, t), bt.set(o, n), o;
|
|
4486
4486
|
}, "onetime");
|
|
4487
|
-
|
|
4487
|
+
qs.callCount = (t) => {
|
|
4488
4488
|
if (!bt.has(t))
|
|
4489
4489
|
throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);
|
|
4490
4490
|
return bt.get(t);
|
|
4491
4491
|
};
|
|
4492
|
-
var
|
|
4492
|
+
var Ws = qs;
|
|
4493
4493
|
|
|
4494
4494
|
// node_modules/execa/lib/error.js
|
|
4495
|
-
import
|
|
4495
|
+
import gd from "node:process";
|
|
4496
4496
|
|
|
4497
4497
|
// node_modules/human-signals/build/src/main.js
|
|
4498
|
-
import { constants as
|
|
4498
|
+
import { constants as ld } from "node:os";
|
|
4499
4499
|
|
|
4500
4500
|
// node_modules/human-signals/build/src/realtime.js
|
|
4501
|
-
var
|
|
4502
|
-
let t =
|
|
4503
|
-
return Array.from({ length: t },
|
|
4504
|
-
}, "getRealtimeSignals"),
|
|
4501
|
+
var Gs = /* @__PURE__ */ i(() => {
|
|
4502
|
+
let t = xr - zs + 1;
|
|
4503
|
+
return Array.from({ length: t }, cd);
|
|
4504
|
+
}, "getRealtimeSignals"), cd = /* @__PURE__ */ i((t, e) => ({
|
|
4505
4505
|
name: `SIGRT${e + 1}`,
|
|
4506
|
-
number:
|
|
4506
|
+
number: zs + e,
|
|
4507
4507
|
action: "terminate",
|
|
4508
4508
|
description: "Application-specific signal (realtime)",
|
|
4509
4509
|
standard: "posix"
|
|
4510
|
-
}), "getRealtimeSignal"),
|
|
4510
|
+
}), "getRealtimeSignal"), zs = 34, xr = 64;
|
|
4511
4511
|
|
|
4512
4512
|
// node_modules/human-signals/build/src/signals.js
|
|
4513
|
-
import { constants as
|
|
4513
|
+
import { constants as dd } from "node:os";
|
|
4514
4514
|
|
|
4515
4515
|
// node_modules/human-signals/build/src/core.js
|
|
4516
|
-
var
|
|
4516
|
+
var Ks = [
|
|
4517
4517
|
{
|
|
4518
4518
|
name: "SIGHUP",
|
|
4519
4519
|
number: 1,
|
|
@@ -4787,9 +4787,9 @@ var Gs = [
|
|
|
4787
4787
|
|
|
4788
4788
|
// node_modules/human-signals/build/src/signals.js
|
|
4789
4789
|
var br = /* @__PURE__ */ i(() => {
|
|
4790
|
-
let t =
|
|
4791
|
-
return [...
|
|
4792
|
-
}, "getSignals"),
|
|
4790
|
+
let t = Gs();
|
|
4791
|
+
return [...Ks, ...t].map(ud);
|
|
4792
|
+
}, "getSignals"), ud = /* @__PURE__ */ i(({
|
|
4793
4793
|
name: t,
|
|
4794
4794
|
number: e,
|
|
4795
4795
|
description: r,
|
|
@@ -4799,15 +4799,15 @@ var br = /* @__PURE__ */ i(() => {
|
|
|
4799
4799
|
}) => {
|
|
4800
4800
|
let {
|
|
4801
4801
|
signals: { [t]: a }
|
|
4802
|
-
} =
|
|
4802
|
+
} = dd, c = a !== void 0;
|
|
4803
4803
|
return { name: t, number: c ? a : e, description: r, supported: c, action: n, forced: s, standard: o };
|
|
4804
4804
|
}, "normalizeSignal");
|
|
4805
4805
|
|
|
4806
4806
|
// node_modules/human-signals/build/src/main.js
|
|
4807
|
-
var
|
|
4807
|
+
var pd = /* @__PURE__ */ i(() => {
|
|
4808
4808
|
let t = br();
|
|
4809
|
-
return Object.fromEntries(t.map(
|
|
4810
|
-
}, "getSignalsByName"),
|
|
4809
|
+
return Object.fromEntries(t.map(fd));
|
|
4810
|
+
}, "getSignalsByName"), fd = /* @__PURE__ */ i(({
|
|
4811
4811
|
name: t,
|
|
4812
4812
|
number: e,
|
|
4813
4813
|
description: r,
|
|
@@ -4815,15 +4815,15 @@ var dd = /* @__PURE__ */ i(() => {
|
|
|
4815
4815
|
action: s,
|
|
4816
4816
|
forced: o,
|
|
4817
4817
|
standard: a
|
|
4818
|
-
}) => [t, { name: t, number: e, description: r, supported: n, action: s, forced: o, standard: a }], "getSignalByName"),
|
|
4818
|
+
}) => [t, { name: t, number: e, description: r, supported: n, action: s, forced: o, standard: a }], "getSignalByName"), Js = pd(), md = /* @__PURE__ */ i(
|
|
4819
4819
|
() => {
|
|
4820
|
-
let t = br(), e =
|
|
4820
|
+
let t = br(), e = xr + 1, r = Array.from(
|
|
4821
4821
|
{ length: e },
|
|
4822
|
-
(n, s) =>
|
|
4822
|
+
(n, s) => hd(s, t)
|
|
4823
4823
|
);
|
|
4824
4824
|
return Object.assign({}, ...r);
|
|
4825
|
-
}, "getSignalsByNumber"),
|
|
4826
|
-
let r =
|
|
4825
|
+
}, "getSignalsByNumber"), hd = /* @__PURE__ */ i((t, e) => {
|
|
4826
|
+
let r = yd(t, e);
|
|
4827
4827
|
if (r === void 0)
|
|
4828
4828
|
return {};
|
|
4829
4829
|
let { name: n, description: s, supported: o, action: a, forced: c, standard: l } = r;
|
|
@@ -4838,13 +4838,13 @@ var dd = /* @__PURE__ */ i(() => {
|
|
|
4838
4838
|
standard: l
|
|
4839
4839
|
}
|
|
4840
4840
|
};
|
|
4841
|
-
}, "getSignalByNumber"),
|
|
4842
|
-
let r = e.find(({ name: n }) =>
|
|
4841
|
+
}, "getSignalByNumber"), yd = /* @__PURE__ */ i((t, e) => {
|
|
4842
|
+
let r = e.find(({ name: n }) => ld.signals[n] === t);
|
|
4843
4843
|
return r !== void 0 ? r : e.find((n) => n.number === t);
|
|
4844
|
-
}, "findSignalByNumber"),
|
|
4844
|
+
}, "findSignalByNumber"), Df = md();
|
|
4845
4845
|
|
|
4846
4846
|
// node_modules/execa/lib/error.js
|
|
4847
|
-
var
|
|
4847
|
+
var vd = /* @__PURE__ */ i(({ timedOut: t, timeout: e, errorCode: r, signal: n, signalDescription: s, exitCode: o, isCanceled: a }) => t ? `\
|
|
4848
4848
|
timed out after ${e} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${s})` :
|
|
4849
4849
|
o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), Fe = /* @__PURE__ */ i(({
|
|
4850
4850
|
stdout: t,
|
|
@@ -4858,26 +4858,26 @@ o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), Fe =
|
|
|
4858
4858
|
timedOut: l,
|
|
4859
4859
|
isCanceled: p,
|
|
4860
4860
|
killed: f,
|
|
4861
|
-
parsed: { options: { timeout:
|
|
4861
|
+
parsed: { options: { timeout: v, cwd: k = gd.cwd() } }
|
|
4862
4862
|
}) => {
|
|
4863
4863
|
o = o === null ? void 0 : o, s = s === null ? void 0 : s;
|
|
4864
|
-
let
|
|
4865
|
-
exitCode: o, isCanceled: p })}: ${a}`,
|
|
4866
|
-
${n.message}` :
|
|
4864
|
+
let _ = s === void 0 ? void 0 : Js[s].description, C = n && n.code, P = `Command ${vd({ timedOut: l, timeout: v, errorCode: C, signal: s, signalDescription: _,
|
|
4865
|
+
exitCode: o, isCanceled: p })}: ${a}`, $ = Object.prototype.toString.call(n) === "[object Error]", Ae = $ ? `${P}
|
|
4866
|
+
${n.message}` : P, ve = [Ae, e, t].filter(Boolean).join(`
|
|
4867
4867
|
`);
|
|
4868
|
-
return
|
|
4869
|
-
exitCode = o, n.signal = s, n.signalDescription =
|
|
4868
|
+
return $ ? (n.originalMessage = n.message, n.message = ve) : n = new Error(ve), n.shortMessage = Ae, n.command = a, n.escapedCommand = c, n.
|
|
4869
|
+
exitCode = o, n.signal = s, n.signalDescription = _, n.stdout = t, n.stderr = e, n.cwd = k, r !== void 0 && (n.all = r), "bufferedData" in
|
|
4870
4870
|
n && delete n.bufferedData, n.failed = !0, n.timedOut = !!l, n.isCanceled = p, n.killed = f && !l, n;
|
|
4871
4871
|
}, "makeError");
|
|
4872
4872
|
|
|
4873
4873
|
// node_modules/execa/lib/stdio.js
|
|
4874
|
-
var wt = ["stdin", "stdout", "stderr"],
|
|
4874
|
+
var wt = ["stdin", "stdout", "stderr"], xd = /* @__PURE__ */ i((t) => wt.some((e) => t[e] !== void 0), "hasAlias"), Hs = /* @__PURE__ */ i((t) => {
|
|
4875
4875
|
if (!t)
|
|
4876
4876
|
return;
|
|
4877
4877
|
let { stdio: e } = t;
|
|
4878
4878
|
if (e === void 0)
|
|
4879
4879
|
return wt.map((n) => t[n]);
|
|
4880
|
-
if (
|
|
4880
|
+
if (xd(t))
|
|
4881
4881
|
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${wt.map((n) => `\`${n}\``).join(", ")}`);
|
|
4882
4882
|
if (typeof e == "string")
|
|
4883
4883
|
return e;
|
|
@@ -4888,7 +4888,7 @@ var wt = ["stdin", "stdout", "stderr"], yd = /* @__PURE__ */ i((t) => wt.some((e
|
|
|
4888
4888
|
}, "normalizeStdio");
|
|
4889
4889
|
|
|
4890
4890
|
// node_modules/execa/lib/kill.js
|
|
4891
|
-
import
|
|
4891
|
+
import _d from "node:os";
|
|
4892
4892
|
|
|
4893
4893
|
// node_modules/signal-exit/dist/mjs/signals.js
|
|
4894
4894
|
var ye = [];
|
|
@@ -4913,7 +4913,7 @@ process.platform === "linux" && ye.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT
|
|
|
4913
4913
|
// node_modules/signal-exit/dist/mjs/index.js
|
|
4914
4914
|
var _t = /* @__PURE__ */ i((t) => !!t && typeof t == "object" && typeof t.removeListener == "function" && typeof t.emit == "function" && typeof t.
|
|
4915
4915
|
reallyExit == "function" && typeof t.listeners == "function" && typeof t.kill == "function" && typeof t.pid == "number" && typeof t.on == "f\
|
|
4916
|
-
unction", "processOk"), wr = Symbol.for("signal-exit emitter"), _r = globalThis,
|
|
4916
|
+
unction", "processOk"), wr = Symbol.for("signal-exit emitter"), _r = globalThis, bd = Object.defineProperty.bind(Object), kr = class {
|
|
4917
4917
|
static {
|
|
4918
4918
|
i(this, "Emitter");
|
|
4919
4919
|
}
|
|
@@ -4930,7 +4930,7 @@ unction", "processOk"), wr = Symbol.for("signal-exit emitter"), _r = globalThis,
|
|
|
4930
4930
|
constructor() {
|
|
4931
4931
|
if (_r[wr])
|
|
4932
4932
|
return _r[wr];
|
|
4933
|
-
|
|
4933
|
+
bd(_r, wr, {
|
|
4934
4934
|
value: this,
|
|
4935
4935
|
writable: !1,
|
|
4936
4936
|
enumerable: !1,
|
|
@@ -4957,7 +4957,7 @@ unction", "processOk"), wr = Symbol.for("signal-exit emitter"), _r = globalThis,
|
|
|
4957
4957
|
static {
|
|
4958
4958
|
i(this, "SignalExitBase");
|
|
4959
4959
|
}
|
|
4960
|
-
},
|
|
4960
|
+
}, wd = /* @__PURE__ */ i((t) => ({
|
|
4961
4961
|
onExit(e, r) {
|
|
4962
4962
|
return t.onExit(e, r);
|
|
4963
4963
|
},
|
|
@@ -5064,7 +5064,7 @@ unction", "processOk"), wr = Symbol.for("signal-exit emitter"), _r = globalThis,
|
|
|
5064
5064
|
*
|
|
5065
5065
|
* Returns a function that may be used to unload signal-exit.
|
|
5066
5066
|
*/
|
|
5067
|
-
onExit:
|
|
5067
|
+
onExit: Ys,
|
|
5068
5068
|
/**
|
|
5069
5069
|
* Load the listeners. Likely you never need to call this, unless
|
|
5070
5070
|
* doing a rather deep integration with signal-exit functionality.
|
|
@@ -5072,7 +5072,7 @@ unction", "processOk"), wr = Symbol.for("signal-exit emitter"), _r = globalThis,
|
|
|
5072
5072
|
*
|
|
5073
5073
|
* @internal
|
|
5074
5074
|
*/
|
|
5075
|
-
load:
|
|
5075
|
+
load: Kf,
|
|
5076
5076
|
/**
|
|
5077
5077
|
* Unload the listeners. Likely you never need to call this, unless
|
|
5078
5078
|
* doing a rather deep integration with signal-exit functionality.
|
|
@@ -5080,49 +5080,49 @@ unction", "processOk"), wr = Symbol.for("signal-exit emitter"), _r = globalThis,
|
|
|
5080
5080
|
*
|
|
5081
5081
|
* @internal
|
|
5082
5082
|
*/
|
|
5083
|
-
unload:
|
|
5084
|
-
} =
|
|
5083
|
+
unload: Jf
|
|
5084
|
+
} = wd(_t(Sr) ? new Ir(Sr) : new Tr());
|
|
5085
5085
|
|
|
5086
5086
|
// node_modules/execa/lib/kill.js
|
|
5087
|
-
var
|
|
5087
|
+
var kd = 1e3 * 5, Xs = /* @__PURE__ */ i((t, e = "SIGTERM", r = {}) => {
|
|
5088
5088
|
let n = t(e);
|
|
5089
|
-
return
|
|
5090
|
-
}, "spawnedKill"),
|
|
5091
|
-
if (!
|
|
5089
|
+
return Td(t, e, r, n), n;
|
|
5090
|
+
}, "spawnedKill"), Td = /* @__PURE__ */ i((t, e, r, n) => {
|
|
5091
|
+
if (!Id(e, r, n))
|
|
5092
5092
|
return;
|
|
5093
|
-
let s =
|
|
5093
|
+
let s = Ed(r), o = setTimeout(() => {
|
|
5094
5094
|
t("SIGKILL");
|
|
5095
5095
|
}, s);
|
|
5096
5096
|
o.unref && o.unref();
|
|
5097
|
-
}, "setKillTimeout"),
|
|
5098
|
-
(t) => t ===
|
|
5097
|
+
}, "setKillTimeout"), Id = /* @__PURE__ */ i((t, { forceKillAfterTimeout: e }, r) => Sd(t) && e !== !1 && r, "shouldForceKill"), Sd = /* @__PURE__ */ i(
|
|
5098
|
+
(t) => t === _d.constants.signals.SIGTERM || typeof t == "string" && t.toUpperCase() === "SIGTERM", "isSigterm"), Ed = /* @__PURE__ */ i(({ forceKillAfterTimeout: t = !0 }) => {
|
|
5099
5099
|
if (t === !0)
|
|
5100
|
-
return
|
|
5100
|
+
return kd;
|
|
5101
5101
|
if (!Number.isFinite(t) || t < 0)
|
|
5102
5102
|
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);
|
|
5103
5103
|
return t;
|
|
5104
|
-
}, "getForceKillAfterTimeout"),
|
|
5104
|
+
}, "getForceKillAfterTimeout"), Qs = /* @__PURE__ */ i((t, e) => {
|
|
5105
5105
|
t.kill() && (e.isCanceled = !0);
|
|
5106
|
-
}, "spawnedCancel"),
|
|
5106
|
+
}, "spawnedCancel"), Cd = /* @__PURE__ */ i((t, e, r) => {
|
|
5107
5107
|
t.kill(e), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: e }));
|
|
5108
|
-
}, "timeoutKill"),
|
|
5108
|
+
}, "timeoutKill"), eo = /* @__PURE__ */ i((t, { timeout: e, killSignal: r = "SIGTERM" }, n) => {
|
|
5109
5109
|
if (e === 0 || e === void 0)
|
|
5110
5110
|
return n;
|
|
5111
5111
|
let s, o = new Promise((c, l) => {
|
|
5112
5112
|
s = setTimeout(() => {
|
|
5113
|
-
|
|
5113
|
+
Cd(t, r, l);
|
|
5114
5114
|
}, e);
|
|
5115
5115
|
}), a = n.finally(() => {
|
|
5116
5116
|
clearTimeout(s);
|
|
5117
5117
|
});
|
|
5118
5118
|
return Promise.race([o, a]);
|
|
5119
|
-
}, "setupTimeout"),
|
|
5119
|
+
}, "setupTimeout"), to = /* @__PURE__ */ i(({ timeout: t }) => {
|
|
5120
5120
|
if (t !== void 0 && (!Number.isFinite(t) || t < 0))
|
|
5121
5121
|
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);
|
|
5122
|
-
}, "validateTimeout"),
|
|
5122
|
+
}, "validateTimeout"), ro = /* @__PURE__ */ i(async (t, { cleanup: e, detached: r }, n) => {
|
|
5123
5123
|
if (!e || r)
|
|
5124
5124
|
return n;
|
|
5125
|
-
let s =
|
|
5125
|
+
let s = Ys(() => {
|
|
5126
5126
|
t.kill();
|
|
5127
5127
|
});
|
|
5128
5128
|
return n.finally(() => {
|
|
@@ -5131,8 +5131,8 @@ var bd = 1e3 * 5, Ys = /* @__PURE__ */ i((t, e = "SIGTERM", r = {}) => {
|
|
|
5131
5131
|
}, "setExitHandler");
|
|
5132
5132
|
|
|
5133
5133
|
// node_modules/execa/lib/pipe.js
|
|
5134
|
-
import { createWriteStream as
|
|
5135
|
-
import { ChildProcess as
|
|
5134
|
+
import { createWriteStream as Pd } from "node:fs";
|
|
5135
|
+
import { ChildProcess as jd } from "node:child_process";
|
|
5136
5136
|
|
|
5137
5137
|
// node_modules/is-stream/index.js
|
|
5138
5138
|
function Tt(t) {
|
|
@@ -5145,56 +5145,56 @@ function Er(t) {
|
|
|
5145
5145
|
i(Er, "isWritableStream");
|
|
5146
5146
|
|
|
5147
5147
|
// node_modules/execa/lib/pipe.js
|
|
5148
|
-
var
|
|
5148
|
+
var Ad = /* @__PURE__ */ i((t) => t instanceof jd && typeof t.then == "function", "isExecaChildProcess"), Cr = /* @__PURE__ */ i((t, e, r) => {
|
|
5149
5149
|
if (typeof r == "string")
|
|
5150
|
-
return t[e].pipe(
|
|
5150
|
+
return t[e].pipe(Pd(r)), t;
|
|
5151
5151
|
if (Er(r))
|
|
5152
5152
|
return t[e].pipe(r), t;
|
|
5153
|
-
if (!
|
|
5153
|
+
if (!Ad(r))
|
|
5154
5154
|
throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
|
|
5155
5155
|
if (!Er(r.stdin))
|
|
5156
5156
|
throw new TypeError("The target child process's stdin must be available.");
|
|
5157
5157
|
return t[e].pipe(r.stdin), r;
|
|
5158
|
-
}, "pipeToTarget"),
|
|
5158
|
+
}, "pipeToTarget"), no = /* @__PURE__ */ i((t) => {
|
|
5159
5159
|
t.stdout !== null && (t.pipeStdout = Cr.bind(void 0, t, "stdout")), t.stderr !== null && (t.pipeStderr = Cr.bind(void 0, t, "stderr")), t.
|
|
5160
5160
|
all !== void 0 && (t.pipeAll = Cr.bind(void 0, t, "all"));
|
|
5161
5161
|
}, "addPipeMethods");
|
|
5162
5162
|
|
|
5163
5163
|
// node_modules/execa/lib/stream.js
|
|
5164
|
-
import { createReadStream as
|
|
5165
|
-
import { setTimeout as
|
|
5164
|
+
import { createReadStream as Hd, readFileSync as Yd } from "node:fs";
|
|
5165
|
+
import { setTimeout as Xd } from "node:timers/promises";
|
|
5166
5166
|
|
|
5167
5167
|
// node_modules/get-stream/source/contents.js
|
|
5168
5168
|
var Be = /* @__PURE__ */ i(async (t, { init: e, convertChunk: r, getSize: n, truncateChunk: s, addChunk: o, getFinalChunk: a, finalize: c }, {
|
|
5169
5169
|
maxBuffer: l = Number.POSITIVE_INFINITY } = {}) => {
|
|
5170
|
-
if (!
|
|
5170
|
+
if (!Rd(t))
|
|
5171
5171
|
throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
5172
5172
|
let p = e();
|
|
5173
5173
|
p.length = 0;
|
|
5174
5174
|
try {
|
|
5175
5175
|
for await (let f of t) {
|
|
5176
|
-
let
|
|
5177
|
-
|
|
5176
|
+
let v = Nd(f), k = r[v](f, p);
|
|
5177
|
+
io({ convertedChunk: k, state: p, getSize: n, truncateChunk: s, addChunk: o, maxBuffer: l });
|
|
5178
5178
|
}
|
|
5179
|
-
return
|
|
5179
|
+
return Od({ state: p, convertChunk: r, getSize: n, truncateChunk: s, addChunk: o, getFinalChunk: a, maxBuffer: l }), c(p);
|
|
5180
5180
|
} catch (f) {
|
|
5181
5181
|
throw f.bufferedData = c(p), f;
|
|
5182
5182
|
}
|
|
5183
|
-
}, "getStreamContents"),
|
|
5183
|
+
}, "getStreamContents"), Od = /* @__PURE__ */ i(({ state: t, getSize: e, truncateChunk: r, addChunk: n, getFinalChunk: s, maxBuffer: o }) => {
|
|
5184
5184
|
let a = s(t);
|
|
5185
|
-
a !== void 0 &&
|
|
5186
|
-
}, "appendFinalChunk"),
|
|
5185
|
+
a !== void 0 && io({ convertedChunk: a, state: t, getSize: e, truncateChunk: r, addChunk: n, maxBuffer: o });
|
|
5186
|
+
}, "appendFinalChunk"), io = /* @__PURE__ */ i(({ convertedChunk: t, state: e, getSize: r, truncateChunk: n, addChunk: s, maxBuffer: o }) => {
|
|
5187
5187
|
let a = r(t), c = e.length + a;
|
|
5188
5188
|
if (c <= o) {
|
|
5189
|
-
|
|
5189
|
+
so(t, e, s, c);
|
|
5190
5190
|
return;
|
|
5191
5191
|
}
|
|
5192
5192
|
let l = n(t, o - e.length);
|
|
5193
|
-
throw l !== void 0 &&
|
|
5194
|
-
}, "appendChunk"),
|
|
5193
|
+
throw l !== void 0 && so(l, e, s, o), new It();
|
|
5194
|
+
}, "appendChunk"), so = /* @__PURE__ */ i((t, e, r, n) => {
|
|
5195
5195
|
e.contents = r(t, e, n), e.length = n;
|
|
5196
|
-
}, "addNewChunk"),
|
|
5197
|
-
cIterable"),
|
|
5196
|
+
}, "addNewChunk"), Rd = /* @__PURE__ */ i((t) => typeof t == "object" && t !== null && typeof t[Symbol.asyncIterator] == "function", "isAsyn\
|
|
5197
|
+
cIterable"), Nd = /* @__PURE__ */ i((t) => {
|
|
5198
5198
|
let e = typeof t;
|
|
5199
5199
|
if (e === "string")
|
|
5200
5200
|
return "string";
|
|
@@ -5202,10 +5202,10 @@ cIterable"), Ad = /* @__PURE__ */ i((t) => {
|
|
|
5202
5202
|
return "others";
|
|
5203
5203
|
if (globalThis.Buffer?.isBuffer(t))
|
|
5204
5204
|
return "buffer";
|
|
5205
|
-
let r =
|
|
5205
|
+
let r = oo.call(t);
|
|
5206
5206
|
return r === "[object ArrayBuffer]" ? "arrayBuffer" : r === "[object DataView]" ? "dataView" : Number.isInteger(t.byteLength) && Number.isInteger(
|
|
5207
|
-
t.byteOffset) &&
|
|
5208
|
-
}, "getChunkType"), { toString:
|
|
5207
|
+
t.byteOffset) && oo.call(t.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
|
|
5208
|
+
}, "getChunkType"), { toString: oo } = Object.prototype, It = class extends Error {
|
|
5209
5209
|
static {
|
|
5210
5210
|
i(this, "MaxBufferError");
|
|
5211
5211
|
}
|
|
@@ -5223,42 +5223,42 @@ var Pr = /* @__PURE__ */ i((t) => t, "identity"), jr = /* @__PURE__ */ i(() => {
|
|
|
5223
5223
|
|
|
5224
5224
|
// node_modules/get-stream/source/array-buffer.js
|
|
5225
5225
|
async function Or(t, e) {
|
|
5226
|
-
return Be(t,
|
|
5226
|
+
return Be(t, Bd, e);
|
|
5227
5227
|
}
|
|
5228
5228
|
i(Or, "getStreamAsArrayBuffer");
|
|
5229
|
-
var
|
|
5230
|
-
tEncoder"),
|
|
5231
|
-
t.buffer, t.byteOffset, t.byteLength), "useUint8ArrayWithOffset"),
|
|
5232
|
-
|
|
5233
|
-
let s =
|
|
5229
|
+
var Zd = /* @__PURE__ */ i(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), Md = /* @__PURE__ */ i((t) => Dd.encode(t), "useTex\
|
|
5230
|
+
tEncoder"), Dd = new TextEncoder(), ao = /* @__PURE__ */ i((t) => new Uint8Array(t), "useUint8Array"), co = /* @__PURE__ */ i((t) => new Uint8Array(
|
|
5231
|
+
t.buffer, t.byteOffset, t.byteLength), "useUint8ArrayWithOffset"), Ld = /* @__PURE__ */ i((t, e) => t.slice(0, e), "truncateArrayBufferChunk"),
|
|
5232
|
+
Ud = /* @__PURE__ */ i((t, { contents: e, length: r }, n) => {
|
|
5233
|
+
let s = po() ? Vd(e, n) : $d(e, n);
|
|
5234
5234
|
return new Uint8Array(s).set(t, r), s;
|
|
5235
|
-
}, "addArrayBufferChunk"),
|
|
5235
|
+
}, "addArrayBufferChunk"), $d = /* @__PURE__ */ i((t, e) => {
|
|
5236
5236
|
if (e <= t.byteLength)
|
|
5237
5237
|
return t;
|
|
5238
|
-
let r = new ArrayBuffer(
|
|
5238
|
+
let r = new ArrayBuffer(lo(e));
|
|
5239
5239
|
return new Uint8Array(r).set(new Uint8Array(t), 0), r;
|
|
5240
|
-
}, "resizeArrayBufferSlow"),
|
|
5240
|
+
}, "resizeArrayBufferSlow"), Vd = /* @__PURE__ */ i((t, e) => {
|
|
5241
5241
|
if (e <= t.maxByteLength)
|
|
5242
5242
|
return t.resize(e), t;
|
|
5243
|
-
let r = new ArrayBuffer(e, { maxByteLength:
|
|
5243
|
+
let r = new ArrayBuffer(e, { maxByteLength: lo(e) });
|
|
5244
5244
|
return new Uint8Array(r).set(new Uint8Array(t), 0), r;
|
|
5245
|
-
}, "resizeArrayBuffer"),
|
|
5246
|
-
({ contents: t, length: e }) =>
|
|
5247
|
-
"hasArrayBufferResize"),
|
|
5248
|
-
init:
|
|
5245
|
+
}, "resizeArrayBuffer"), lo = /* @__PURE__ */ i((t) => uo ** Math.ceil(Math.log(t) / Math.log(uo)), "getNewContentsLength"), uo = 2, Fd = /* @__PURE__ */ i(
|
|
5246
|
+
({ contents: t, length: e }) => po() ? t : t.slice(0, e), "finalizeArrayBuffer"), po = /* @__PURE__ */ i(() => "resize" in ArrayBuffer.prototype,
|
|
5247
|
+
"hasArrayBufferResize"), Bd = {
|
|
5248
|
+
init: Zd,
|
|
5249
5249
|
convertChunk: {
|
|
5250
|
-
string:
|
|
5251
|
-
buffer:
|
|
5252
|
-
arrayBuffer:
|
|
5253
|
-
dataView:
|
|
5254
|
-
typedArray:
|
|
5250
|
+
string: Md,
|
|
5251
|
+
buffer: ao,
|
|
5252
|
+
arrayBuffer: ao,
|
|
5253
|
+
dataView: co,
|
|
5254
|
+
typedArray: co,
|
|
5255
5255
|
others: St
|
|
5256
5256
|
},
|
|
5257
5257
|
getSize: Et,
|
|
5258
|
-
truncateChunk:
|
|
5259
|
-
addChunk:
|
|
5258
|
+
truncateChunk: Ld,
|
|
5259
|
+
addChunk: Ud,
|
|
5260
5260
|
getFinalChunk: jr,
|
|
5261
|
-
finalize:
|
|
5261
|
+
finalize: Fd
|
|
5262
5262
|
};
|
|
5263
5263
|
|
|
5264
5264
|
// node_modules/get-stream/source/buffer.js
|
|
@@ -5266,26 +5266,26 @@ async function Ct(t, e) {
|
|
|
5266
5266
|
if (!("Buffer" in globalThis))
|
|
5267
5267
|
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
|
5268
5268
|
try {
|
|
5269
|
-
return
|
|
5269
|
+
return fo(await Or(t, e));
|
|
5270
5270
|
} catch (r) {
|
|
5271
|
-
throw r.bufferedData !== void 0 && (r.bufferedData =
|
|
5271
|
+
throw r.bufferedData !== void 0 && (r.bufferedData = fo(r.bufferedData)), r;
|
|
5272
5272
|
}
|
|
5273
5273
|
}
|
|
5274
5274
|
i(Ct, "getStreamAsBuffer");
|
|
5275
|
-
var
|
|
5275
|
+
var fo = /* @__PURE__ */ i((t) => globalThis.Buffer.from(t), "arrayBufferToNodeBuffer");
|
|
5276
5276
|
|
|
5277
5277
|
// node_modules/get-stream/source/string.js
|
|
5278
5278
|
async function Rr(t, e) {
|
|
5279
|
-
return Be(t,
|
|
5279
|
+
return Be(t, Kd, e);
|
|
5280
5280
|
}
|
|
5281
5281
|
i(Rr, "getStreamAsString");
|
|
5282
|
-
var
|
|
5283
|
-
decode(t, { stream: !0 }), "useTextDecoder"),
|
|
5284
|
-
(t, e) => t.slice(0, e), "truncateStringChunk"),
|
|
5282
|
+
var qd = /* @__PURE__ */ i(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), Pt = /* @__PURE__ */ i((t, { textDecoder: e }) => e.
|
|
5283
|
+
decode(t, { stream: !0 }), "useTextDecoder"), Wd = /* @__PURE__ */ i((t, { contents: e }) => e + t, "addStringChunk"), Gd = /* @__PURE__ */ i(
|
|
5284
|
+
(t, e) => t.slice(0, e), "truncateStringChunk"), zd = /* @__PURE__ */ i(({ textDecoder: t }) => {
|
|
5285
5285
|
let e = t.decode();
|
|
5286
5286
|
return e === "" ? void 0 : e;
|
|
5287
|
-
}, "getFinalStringChunk"),
|
|
5288
|
-
init:
|
|
5287
|
+
}, "getFinalStringChunk"), Kd = {
|
|
5288
|
+
init: qd,
|
|
5289
5289
|
convertChunk: {
|
|
5290
5290
|
string: Pr,
|
|
5291
5291
|
buffer: Pt,
|
|
@@ -5295,35 +5295,35 @@ decode(t, { stream: !0 }), "useTextDecoder"), Fd = /* @__PURE__ */ i((t, { conte
|
|
|
5295
5295
|
others: St
|
|
5296
5296
|
},
|
|
5297
5297
|
getSize: Et,
|
|
5298
|
-
truncateChunk:
|
|
5299
|
-
addChunk:
|
|
5300
|
-
getFinalChunk:
|
|
5298
|
+
truncateChunk: Gd,
|
|
5299
|
+
addChunk: Wd,
|
|
5300
|
+
getFinalChunk: zd,
|
|
5301
5301
|
finalize: Ar
|
|
5302
5302
|
};
|
|
5303
5303
|
|
|
5304
5304
|
// node_modules/execa/lib/stream.js
|
|
5305
|
-
var
|
|
5306
|
-
var
|
|
5305
|
+
var yo = z(ho(), 1);
|
|
5306
|
+
var go = /* @__PURE__ */ i((t) => {
|
|
5307
5307
|
if (t !== void 0)
|
|
5308
5308
|
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
5309
|
-
}, "validateInputOptions"),
|
|
5310
|
-
|
|
5311
|
-
let e =
|
|
5309
|
+
}, "validateInputOptions"), Qd = /* @__PURE__ */ i(({ input: t, inputFile: e }) => typeof e != "string" ? t : (go(t), Yd(e)), "getInputSync"),
|
|
5310
|
+
vo = /* @__PURE__ */ i((t) => {
|
|
5311
|
+
let e = Qd(t);
|
|
5312
5312
|
if (Tt(e))
|
|
5313
5313
|
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
5314
5314
|
return e;
|
|
5315
|
-
}, "handleInputSync"),
|
|
5315
|
+
}, "handleInputSync"), eu = /* @__PURE__ */ i(({ input: t, inputFile: e }) => typeof e != "string" ? t : (go(t), Hd(e)), "getInput"), xo = /* @__PURE__ */ i(
|
|
5316
5316
|
(t, e) => {
|
|
5317
|
-
let r =
|
|
5317
|
+
let r = eu(e);
|
|
5318
5318
|
r !== void 0 && (Tt(r) ? r.pipe(t.stdin) : t.stdin.end(r));
|
|
5319
|
-
}, "handleInput"),
|
|
5319
|
+
}, "handleInput"), bo = /* @__PURE__ */ i((t, { all: e }) => {
|
|
5320
5320
|
if (!e || !t.stdout && !t.stderr)
|
|
5321
5321
|
return;
|
|
5322
|
-
let r = (0,
|
|
5322
|
+
let r = (0, yo.default)();
|
|
5323
5323
|
return t.stdout && r.add(t.stdout), t.stderr && r.add(t.stderr), r;
|
|
5324
5324
|
}, "makeAllStream"), Nr = /* @__PURE__ */ i(async (t, e) => {
|
|
5325
5325
|
if (!(!t || e === void 0)) {
|
|
5326
|
-
await
|
|
5326
|
+
await Xd(0), t.destroy();
|
|
5327
5327
|
try {
|
|
5328
5328
|
return await e;
|
|
5329
5329
|
} catch (r) {
|
|
@@ -5332,8 +5332,8 @@ yo = /* @__PURE__ */ i((t) => {
|
|
|
5332
5332
|
}
|
|
5333
5333
|
}, "getBufferedData"), Zr = /* @__PURE__ */ i((t, { encoding: e, buffer: r, maxBuffer: n }) => {
|
|
5334
5334
|
if (!(!t || !r))
|
|
5335
|
-
return e === "utf8" || e === "utf-8" ? Rr(t, { maxBuffer: n }) : e === null || e === "buffer" ? Ct(t, { maxBuffer: n }) :
|
|
5336
|
-
}, "getStreamPromise"),
|
|
5335
|
+
return e === "utf8" || e === "utf-8" ? Rr(t, { maxBuffer: n }) : e === null || e === "buffer" ? Ct(t, { maxBuffer: n }) : tu(t, n, e);
|
|
5336
|
+
}, "getStreamPromise"), tu = /* @__PURE__ */ i(async (t, e, r) => (await Ct(t, { maxBuffer: e })).toString(r), "applyEncoding"), wo = /* @__PURE__ */ i(
|
|
5337
5337
|
async ({ stdout: t, stderr: e, all: r }, { encoding: n, buffer: s, maxBuffer: o }, a) => {
|
|
5338
5338
|
let c = Zr(t, { encoding: n, buffer: s, maxBuffer: o }), l = Zr(e, { encoding: n, buffer: s, maxBuffer: o }), p = Zr(r, { encoding: n, buffer: s,
|
|
5339
5339
|
maxBuffer: o * 2 });
|
|
@@ -5350,16 +5350,16 @@ async ({ stdout: t, stderr: e, all: r }, { encoding: n, buffer: s, maxBuffer: o
|
|
|
5350
5350
|
}, "getSpawnedResult");
|
|
5351
5351
|
|
|
5352
5352
|
// node_modules/execa/lib/promise.js
|
|
5353
|
-
var
|
|
5354
|
-
})().constructor.prototype,
|
|
5353
|
+
var ru = (async () => {
|
|
5354
|
+
})().constructor.prototype, nu = ["then", "catch", "finally"].map((t) => [
|
|
5355
5355
|
t,
|
|
5356
|
-
Reflect.getOwnPropertyDescriptor(
|
|
5356
|
+
Reflect.getOwnPropertyDescriptor(ru, t)
|
|
5357
5357
|
]), Mr = /* @__PURE__ */ i((t, e) => {
|
|
5358
|
-
for (let [r, n] of
|
|
5358
|
+
for (let [r, n] of nu) {
|
|
5359
5359
|
let s = typeof e == "function" ? (...o) => Reflect.apply(n.value, e(), o) : n.value.bind(e);
|
|
5360
5360
|
Reflect.defineProperty(t, r, { ...n, value: s });
|
|
5361
5361
|
}
|
|
5362
|
-
}, "mergePromise"),
|
|
5362
|
+
}, "mergePromise"), _o = /* @__PURE__ */ i((t) => new Promise((e, r) => {
|
|
5363
5363
|
t.on("exit", (n, s) => {
|
|
5364
5364
|
e({ exitCode: n, signal: s });
|
|
5365
5365
|
}), t.on("error", (n) => {
|
|
@@ -5370,46 +5370,46 @@ var Qd = (async () => {
|
|
|
5370
5370
|
}), "getSpawnedPromise");
|
|
5371
5371
|
|
|
5372
5372
|
// node_modules/execa/lib/command.js
|
|
5373
|
-
import { Buffer as
|
|
5374
|
-
import { ChildProcess as
|
|
5375
|
-
var
|
|
5376
|
-
"string" ||
|
|
5377
|
-
d"), Lr = /* @__PURE__ */ i((t, e) =>
|
|
5373
|
+
import { Buffer as su } from "node:buffer";
|
|
5374
|
+
import { ChildProcess as ou } from "node:child_process";
|
|
5375
|
+
var Io = /* @__PURE__ */ i((t, e = []) => Array.isArray(e) ? [t, ...e] : [t], "normalizeArgs"), iu = /^[\w.-]+$/, au = /* @__PURE__ */ i((t) => typeof t !=
|
|
5376
|
+
"string" || iu.test(t) ? t : `"${t.replaceAll('"', '\\"')}"`, "escapeArg"), Dr = /* @__PURE__ */ i((t, e) => Io(t, e).join(" "), "joinComman\
|
|
5377
|
+
d"), Lr = /* @__PURE__ */ i((t, e) => Io(t, e).map((r) => au(r)).join(" "), "getEscapedCommand"), So = / +/g, Eo = /* @__PURE__ */ i((t) => {
|
|
5378
5378
|
let e = [];
|
|
5379
|
-
for (let r of t.trim().split(
|
|
5379
|
+
for (let r of t.trim().split(So)) {
|
|
5380
5380
|
let n = e.at(-1);
|
|
5381
5381
|
n && n.endsWith("\\") ? e[e.length - 1] = `${n.slice(0, -1)} ${r}` : e.push(r);
|
|
5382
5382
|
}
|
|
5383
5383
|
return e;
|
|
5384
|
-
}, "parseCommand"),
|
|
5384
|
+
}, "parseCommand"), ko = /* @__PURE__ */ i((t) => {
|
|
5385
5385
|
let e = typeof t;
|
|
5386
5386
|
if (e === "string")
|
|
5387
5387
|
return t;
|
|
5388
5388
|
if (e === "number")
|
|
5389
5389
|
return String(t);
|
|
5390
|
-
if (e === "object" && t !== null && !(t instanceof
|
|
5390
|
+
if (e === "object" && t !== null && !(t instanceof ou) && "stdout" in t) {
|
|
5391
5391
|
let r = typeof t.stdout;
|
|
5392
5392
|
if (r === "string")
|
|
5393
5393
|
return t.stdout;
|
|
5394
|
-
if (
|
|
5394
|
+
if (su.isBuffer(t.stdout))
|
|
5395
5395
|
return t.stdout.toString();
|
|
5396
5396
|
throw new TypeError(`Unexpected "${r}" stdout in template expression`);
|
|
5397
5397
|
}
|
|
5398
5398
|
throw new TypeError(`Unexpected "${e}" in template expression`);
|
|
5399
|
-
}, "parseExpression"),
|
|
5399
|
+
}, "parseExpression"), To = /* @__PURE__ */ i((t, e, r) => r || t.length === 0 || e.length === 0 ? [...t, ...e] : [
|
|
5400
5400
|
...t.slice(0, -1),
|
|
5401
5401
|
`${t.at(-1)}${e[0]}`,
|
|
5402
5402
|
...e.slice(1)
|
|
5403
|
-
], "concatTokens"),
|
|
5404
|
-
let o = s ?? t.raw[n], a = o.split(
|
|
5403
|
+
], "concatTokens"), cu = /* @__PURE__ */ i(({ templates: t, expressions: e, tokens: r, index: n, template: s }) => {
|
|
5404
|
+
let o = s ?? t.raw[n], a = o.split(So).filter(Boolean), c = To(
|
|
5405
5405
|
r,
|
|
5406
5406
|
a,
|
|
5407
5407
|
o.startsWith(" ")
|
|
5408
5408
|
);
|
|
5409
5409
|
if (n === e.length)
|
|
5410
5410
|
return c;
|
|
5411
|
-
let l = e[n], p = Array.isArray(l) ? l.map((f) =>
|
|
5412
|
-
return
|
|
5411
|
+
let l = e[n], p = Array.isArray(l) ? l.map((f) => ko(f)) : [ko(l)];
|
|
5412
|
+
return To(
|
|
5413
5413
|
c,
|
|
5414
5414
|
p,
|
|
5415
5415
|
o.endsWith(" ")
|
|
@@ -5417,29 +5417,29 @@ d"), Lr = /* @__PURE__ */ i((t, e) => ko(t, e).map((r) => su(r)).join(" "), "get
|
|
|
5417
5417
|
}, "parseTemplate"), Ur = /* @__PURE__ */ i((t, e) => {
|
|
5418
5418
|
let r = [];
|
|
5419
5419
|
for (let [n, s] of t.entries())
|
|
5420
|
-
r =
|
|
5420
|
+
r = cu({ templates: t, expressions: e, tokens: r, index: n, template: s });
|
|
5421
5421
|
return r;
|
|
5422
5422
|
}, "parseTemplates");
|
|
5423
5423
|
|
|
5424
5424
|
// node_modules/execa/lib/verbose.js
|
|
5425
|
-
import { debuglog as
|
|
5426
|
-
import
|
|
5427
|
-
var
|
|
5425
|
+
import { debuglog as du } from "node:util";
|
|
5426
|
+
import uu from "node:process";
|
|
5427
|
+
var Co = du("execa").enabled, jt = /* @__PURE__ */ i((t, e) => String(t).padStart(e, "0"), "padField"), lu = /* @__PURE__ */ i(() => {
|
|
5428
5428
|
let t = /* @__PURE__ */ new Date();
|
|
5429
5429
|
return `${jt(t.getHours(), 2)}:${jt(t.getMinutes(), 2)}:${jt(t.getSeconds(), 2)}.${jt(t.getMilliseconds(), 3)}`;
|
|
5430
5430
|
}, "getTimestamp"), $r = /* @__PURE__ */ i((t, { verbose: e }) => {
|
|
5431
|
-
e &&
|
|
5431
|
+
e && uu.stderr.write(`[${lu()}] ${t}
|
|
5432
5432
|
`);
|
|
5433
5433
|
}, "logCommand");
|
|
5434
5434
|
|
|
5435
5435
|
// node_modules/execa/index.js
|
|
5436
|
-
var
|
|
5436
|
+
var mu = 1e3 * 1e3 * 100, hu = /* @__PURE__ */ i(({ env: t, extendEnv: e, preferLocal: r, localDir: n, execPath: s }) => {
|
|
5437
5437
|
let o = e ? { ...At.env, ...t } : t;
|
|
5438
|
-
return r ?
|
|
5439
|
-
}, "getEnv"),
|
|
5440
|
-
let n =
|
|
5438
|
+
return r ? Bs({ env: o, cwd: n, execPath: s }) : o;
|
|
5439
|
+
}, "getEnv"), Ao = /* @__PURE__ */ i((t, e, r = {}) => {
|
|
5440
|
+
let n = jo.default._parse(t, e, r);
|
|
5441
5441
|
return t = n.command, e = n.args, r = n.options, r = {
|
|
5442
|
-
maxBuffer:
|
|
5442
|
+
maxBuffer: mu,
|
|
5443
5443
|
buffer: !0,
|
|
5444
5444
|
stripFinalNewline: !0,
|
|
5445
5445
|
extendEnv: !0,
|
|
@@ -5451,21 +5451,21 @@ var lu = 1e3 * 1e3 * 100, pu = /* @__PURE__ */ i(({ env: t, extendEnv: e, prefer
|
|
|
5451
5451
|
cleanup: !0,
|
|
5452
5452
|
all: !1,
|
|
5453
5453
|
windowsHide: !0,
|
|
5454
|
-
verbose:
|
|
5454
|
+
verbose: Co,
|
|
5455
5455
|
...r
|
|
5456
|
-
}, r.env =
|
|
5456
|
+
}, r.env = hu(r), r.stdio = Hs(r), At.platform === "win32" && fu.basename(t, ".exe") === "cmd" && e.unshift("/q"), { file: t, args: e, options: r,
|
|
5457
5457
|
parsed: n };
|
|
5458
|
-
}, "handleArguments"), qe = /* @__PURE__ */ i((t, e, r) => typeof e != "string" && !
|
|
5458
|
+
}, "handleArguments"), qe = /* @__PURE__ */ i((t, e, r) => typeof e != "string" && !pu.isBuffer(e) ? r === void 0 ? void 0 : "" : t.stripFinalNewline ?
|
|
5459
5459
|
gr(e) : e, "handleOutput");
|
|
5460
|
-
function
|
|
5461
|
-
let n =
|
|
5462
|
-
$r(o, n.options),
|
|
5460
|
+
function Oo(t, e, r) {
|
|
5461
|
+
let n = Ao(t, e, r), s = Dr(t, e), o = Lr(t, e);
|
|
5462
|
+
$r(o, n.options), to(n.options);
|
|
5463
5463
|
let a;
|
|
5464
5464
|
try {
|
|
5465
5465
|
a = Vr.spawn(n.file, n.args, n.options);
|
|
5466
|
-
} catch (
|
|
5467
|
-
let
|
|
5468
|
-
error:
|
|
5466
|
+
} catch (_) {
|
|
5467
|
+
let C = new Vr.ChildProcess(), S = Promise.reject(Fe({
|
|
5468
|
+
error: _,
|
|
5469
5469
|
stdout: "",
|
|
5470
5470
|
stderr: "",
|
|
5471
5471
|
all: "",
|
|
@@ -5476,52 +5476,52 @@ function jo(t, e, r) {
|
|
|
5476
5476
|
isCanceled: !1,
|
|
5477
5477
|
killed: !1
|
|
5478
5478
|
}));
|
|
5479
|
-
return Mr(
|
|
5480
|
-
}
|
|
5481
|
-
let c =
|
|
5482
|
-
a.kill =
|
|
5483
|
-
let
|
|
5484
|
-
let [{ error:
|
|
5485
|
-
|
|
5486
|
-
if (
|
|
5487
|
-
let
|
|
5488
|
-
error:
|
|
5489
|
-
exitCode:
|
|
5479
|
+
return Mr(C, S), C;
|
|
5480
|
+
}
|
|
5481
|
+
let c = _o(a), l = eo(a, n.options, c), p = ro(a, n.options, l), f = { isCanceled: !1 };
|
|
5482
|
+
a.kill = Xs.bind(null, a.kill.bind(a)), a.cancel = Qs.bind(null, a, f);
|
|
5483
|
+
let k = Ws(/* @__PURE__ */ i(async () => {
|
|
5484
|
+
let [{ error: _, exitCode: C, signal: S, timedOut: P }, $, Ae, ve] = await wo(a, n.options, p), Oe = qe(n.options, $), Ye = qe(n.options,
|
|
5485
|
+
Ae), Xe = qe(n.options, ve);
|
|
5486
|
+
if (_ || C !== 0 || S !== null) {
|
|
5487
|
+
let x = Fe({
|
|
5488
|
+
error: _,
|
|
5489
|
+
exitCode: C,
|
|
5490
5490
|
signal: S,
|
|
5491
|
-
stdout:
|
|
5492
|
-
stderr:
|
|
5493
|
-
all:
|
|
5491
|
+
stdout: Oe,
|
|
5492
|
+
stderr: Ye,
|
|
5493
|
+
all: Xe,
|
|
5494
5494
|
command: s,
|
|
5495
5495
|
escapedCommand: o,
|
|
5496
5496
|
parsed: n,
|
|
5497
|
-
timedOut:
|
|
5497
|
+
timedOut: P,
|
|
5498
5498
|
isCanceled: f.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
|
|
5499
5499
|
killed: a.killed
|
|
5500
5500
|
});
|
|
5501
5501
|
if (!n.options.reject)
|
|
5502
|
-
return
|
|
5503
|
-
throw
|
|
5502
|
+
return x;
|
|
5503
|
+
throw x;
|
|
5504
5504
|
}
|
|
5505
5505
|
return {
|
|
5506
5506
|
command: s,
|
|
5507
5507
|
escapedCommand: o,
|
|
5508
5508
|
exitCode: 0,
|
|
5509
|
-
stdout:
|
|
5510
|
-
stderr:
|
|
5511
|
-
all:
|
|
5509
|
+
stdout: Oe,
|
|
5510
|
+
stderr: Ye,
|
|
5511
|
+
all: Xe,
|
|
5512
5512
|
failed: !1,
|
|
5513
5513
|
timedOut: !1,
|
|
5514
5514
|
isCanceled: !1,
|
|
5515
5515
|
killed: !1
|
|
5516
5516
|
};
|
|
5517
5517
|
}, "handlePromise"));
|
|
5518
|
-
return
|
|
5518
|
+
return xo(a, n.options), a.all = bo(a, n.options), no(a), Mr(a, k), a;
|
|
5519
5519
|
}
|
|
5520
|
-
i(
|
|
5521
|
-
function
|
|
5522
|
-
let n =
|
|
5520
|
+
i(Oo, "execa");
|
|
5521
|
+
function yu(t, e, r) {
|
|
5522
|
+
let n = Ao(t, e, r), s = Dr(t, e), o = Lr(t, e);
|
|
5523
5523
|
$r(o, n.options);
|
|
5524
|
-
let a =
|
|
5524
|
+
let a = vo(n.options), c;
|
|
5525
5525
|
try {
|
|
5526
5526
|
c = Vr.spawnSync(n.file, n.args, { ...n.options, input: a });
|
|
5527
5527
|
} catch (f) {
|
|
@@ -5569,41 +5569,41 @@ function fu(t, e, r) {
|
|
|
5569
5569
|
killed: !1
|
|
5570
5570
|
};
|
|
5571
5571
|
}
|
|
5572
|
-
i(
|
|
5573
|
-
var
|
|
5574
|
-
"normalizeScriptStdin"),
|
|
5572
|
+
i(yu, "execaSync");
|
|
5573
|
+
var gu = /* @__PURE__ */ i(({ input: t, inputFile: e, stdio: r }) => t === void 0 && e === void 0 && r === void 0 ? { stdin: "inherit" } : {},
|
|
5574
|
+
"normalizeScriptStdin"), Po = /* @__PURE__ */ i((t = {}) => ({
|
|
5575
5575
|
preferLocal: !0,
|
|
5576
|
-
...
|
|
5576
|
+
...gu(t),
|
|
5577
5577
|
...t
|
|
5578
5578
|
}), "normalizeScriptOptions");
|
|
5579
|
-
function
|
|
5579
|
+
function Ro(t) {
|
|
5580
5580
|
function e(r, ...n) {
|
|
5581
5581
|
if (!Array.isArray(r))
|
|
5582
|
-
return
|
|
5582
|
+
return Ro({ ...t, ...r });
|
|
5583
5583
|
let [s, ...o] = Ur(r, n);
|
|
5584
|
-
return
|
|
5584
|
+
return Oo(s, o, Po(t));
|
|
5585
5585
|
}
|
|
5586
5586
|
return i(e, "$"), e.sync = (r, ...n) => {
|
|
5587
5587
|
if (!Array.isArray(r))
|
|
5588
5588
|
throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
|
|
5589
5589
|
let [s, ...o] = Ur(r, n);
|
|
5590
|
-
return
|
|
5590
|
+
return yu(s, o, Po(t));
|
|
5591
5591
|
}, e;
|
|
5592
5592
|
}
|
|
5593
|
-
i(
|
|
5594
|
-
var
|
|
5595
|
-
function
|
|
5596
|
-
let [r, ...n] =
|
|
5597
|
-
return
|
|
5593
|
+
i(Ro, "create$");
|
|
5594
|
+
var hh = Ro();
|
|
5595
|
+
function No(t, e) {
|
|
5596
|
+
let [r, ...n] = Eo(t);
|
|
5597
|
+
return Oo(r, n, e);
|
|
5598
5598
|
}
|
|
5599
|
-
i(
|
|
5599
|
+
i(No, "execaCommand");
|
|
5600
5600
|
|
|
5601
5601
|
// src/telemetry/exec-command-count-lines.ts
|
|
5602
5602
|
async function Ot(t, e) {
|
|
5603
|
-
let r =
|
|
5603
|
+
let r = No(t, { shell: !0, buffer: !1, ...e });
|
|
5604
5604
|
if (!r.stdout)
|
|
5605
5605
|
throw new Error("Unexpected missing stdout");
|
|
5606
|
-
let n = 0, s =
|
|
5606
|
+
let n = 0, s = vu(r.stdout);
|
|
5607
5607
|
return s.on("line", () => {
|
|
5608
5608
|
n += 1;
|
|
5609
5609
|
}), await r, s.close(), n;
|
|
@@ -5611,21 +5611,21 @@ async function Ot(t, e) {
|
|
|
5611
5611
|
i(Ot, "execCommandCountLines");
|
|
5612
5612
|
|
|
5613
5613
|
// src/common/utils/file-cache.ts
|
|
5614
|
-
import { createHash as
|
|
5615
|
-
import { mkdirSync as Br, readFileSync as
|
|
5616
|
-
import { readFile as
|
|
5617
|
-
import { tmpdir as
|
|
5614
|
+
import { createHash as Mo, randomBytes as xu } from "node:crypto";
|
|
5615
|
+
import { mkdirSync as Br, readFileSync as bu, readdirSync as wu, rmSync as Do, writeFileSync as _u } from "node:fs";
|
|
5616
|
+
import { readFile as Lo, readdir as Uo, rm as $o, writeFile as ku } from "node:fs/promises";
|
|
5617
|
+
import { tmpdir as Tu } from "node:os";
|
|
5618
5618
|
import { join as We } from "node:path";
|
|
5619
5619
|
var Rt = class {
|
|
5620
5620
|
static {
|
|
5621
5621
|
i(this, "FileSystemCache");
|
|
5622
5622
|
}
|
|
5623
5623
|
constructor(e = {}) {
|
|
5624
|
-
this.prefix = (e.ns || e.prefix || "") + "-", this.hash_alg = e.hash_alg || "md5", this.cache_dir = e.basePath || We(
|
|
5625
|
-
"base64").replace(/\//g, "-")), this.ttl = e.ttl || 0,
|
|
5624
|
+
this.prefix = (e.ns || e.prefix || "") + "-", this.hash_alg = e.hash_alg || "md5", this.cache_dir = e.basePath || We(Tu(), xu(15).toString(
|
|
5625
|
+
"base64").replace(/\//g, "-")), this.ttl = e.ttl || 0, Mo(this.hash_alg), Br(this.cache_dir, { recursive: !0 });
|
|
5626
5626
|
}
|
|
5627
5627
|
generateHash(e) {
|
|
5628
|
-
return We(this.cache_dir, this.prefix +
|
|
5628
|
+
return We(this.cache_dir, this.prefix + Mo(this.hash_alg).update(e).digest("hex"));
|
|
5629
5629
|
}
|
|
5630
5630
|
isExpired(e, r) {
|
|
5631
5631
|
return e.ttl != null && r > e.ttl;
|
|
@@ -5640,7 +5640,7 @@ var Rt = class {
|
|
|
5640
5640
|
}
|
|
5641
5641
|
async get(e, r) {
|
|
5642
5642
|
try {
|
|
5643
|
-
let n = await
|
|
5643
|
+
let n = await Lo(this.generateHash(e), "utf8");
|
|
5644
5644
|
return this.parseCacheData(n, r);
|
|
5645
5645
|
} catch {
|
|
5646
5646
|
return r;
|
|
@@ -5648,7 +5648,7 @@ var Rt = class {
|
|
|
5648
5648
|
}
|
|
5649
5649
|
getSync(e, r) {
|
|
5650
5650
|
try {
|
|
5651
|
-
let n =
|
|
5651
|
+
let n = bu(this.generateHash(e), "utf8");
|
|
5652
5652
|
return this.parseCacheData(n, r);
|
|
5653
5653
|
} catch {
|
|
5654
5654
|
return r;
|
|
@@ -5656,13 +5656,13 @@ var Rt = class {
|
|
|
5656
5656
|
}
|
|
5657
5657
|
async set(e, r, n = {}) {
|
|
5658
5658
|
let s = typeof n == "number" ? { ttl: n } : n;
|
|
5659
|
-
Br(this.cache_dir, { recursive: !0 }), await
|
|
5659
|
+
Br(this.cache_dir, { recursive: !0 }), await ku(this.generateHash(e), this.parseSetData(e, r, s), {
|
|
5660
5660
|
encoding: s.encoding || "utf8"
|
|
5661
5661
|
});
|
|
5662
5662
|
}
|
|
5663
5663
|
setSync(e, r, n = {}) {
|
|
5664
5664
|
let s = typeof n == "number" ? { ttl: n } : n;
|
|
5665
|
-
Br(this.cache_dir, { recursive: !0 }),
|
|
5665
|
+
Br(this.cache_dir, { recursive: !0 }), _u(this.generateHash(e), this.parseSetData(e, r, s), {
|
|
5666
5666
|
encoding: s.encoding || "utf8"
|
|
5667
5667
|
});
|
|
5668
5668
|
}
|
|
@@ -5673,24 +5673,24 @@ var Rt = class {
|
|
|
5673
5673
|
e.forEach((n) => this.setSync(n.key, n.content ?? n.value, r));
|
|
5674
5674
|
}
|
|
5675
5675
|
async remove(e) {
|
|
5676
|
-
await
|
|
5676
|
+
await $o(this.generateHash(e), { force: !0 });
|
|
5677
5677
|
}
|
|
5678
5678
|
removeSync(e) {
|
|
5679
|
-
|
|
5679
|
+
Do(this.generateHash(e), { force: !0 });
|
|
5680
5680
|
}
|
|
5681
5681
|
async clear() {
|
|
5682
|
-
let e = await
|
|
5682
|
+
let e = await Uo(this.cache_dir);
|
|
5683
5683
|
await Promise.all(
|
|
5684
|
-
e.filter((r) => r.startsWith(this.prefix)).map((r) =>
|
|
5684
|
+
e.filter((r) => r.startsWith(this.prefix)).map((r) => $o(We(this.cache_dir, r), { force: !0 }))
|
|
5685
5685
|
);
|
|
5686
5686
|
}
|
|
5687
5687
|
clearSync() {
|
|
5688
|
-
|
|
5688
|
+
wu(this.cache_dir).filter((e) => e.startsWith(this.prefix)).forEach((e) => Do(We(this.cache_dir, e), { force: !0 }));
|
|
5689
5689
|
}
|
|
5690
5690
|
async getAll() {
|
|
5691
|
-
let e = Date.now(), r = await
|
|
5691
|
+
let e = Date.now(), r = await Uo(this.cache_dir);
|
|
5692
5692
|
return (await Promise.all(
|
|
5693
|
-
r.filter((s) => s.startsWith(this.prefix)).map((s) =>
|
|
5693
|
+
r.filter((s) => s.startsWith(this.prefix)).map((s) => Lo(We(this.cache_dir, s), "utf8"))
|
|
5694
5694
|
)).map((s) => JSON.parse(s)).filter((s) => s.content && !this.isExpired(s, e));
|
|
5695
5695
|
}
|
|
5696
5696
|
async load() {
|
|
@@ -5709,29 +5709,29 @@ function qr(t) {
|
|
|
5709
5709
|
i(qr, "createFileSystemCache");
|
|
5710
5710
|
|
|
5711
5711
|
// src/common/utils/resolve-path-in-sb-cache.ts
|
|
5712
|
-
import { join as
|
|
5712
|
+
import { join as ni } from "node:path";
|
|
5713
5713
|
|
|
5714
5714
|
// node_modules/find-cache-dir/index.js
|
|
5715
|
-
var
|
|
5716
|
-
import
|
|
5715
|
+
var ri = z(Fo(), 1);
|
|
5716
|
+
import Zu from "node:process";
|
|
5717
5717
|
import ze from "node:path";
|
|
5718
5718
|
import Ut from "node:fs";
|
|
5719
5719
|
|
|
5720
5720
|
// ../node_modules/pkg-dir/index.js
|
|
5721
|
-
import
|
|
5721
|
+
import Nu from "node:path";
|
|
5722
5722
|
|
|
5723
5723
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
5724
5724
|
import Lt from "node:path";
|
|
5725
|
-
import { fileURLToPath as
|
|
5725
|
+
import { fileURLToPath as ju } from "node:url";
|
|
5726
5726
|
|
|
5727
5727
|
// ../node_modules/locate-path/index.js
|
|
5728
|
-
import
|
|
5729
|
-
import
|
|
5730
|
-
import
|
|
5731
|
-
import { fileURLToPath as
|
|
5728
|
+
import Go from "node:process";
|
|
5729
|
+
import zo from "node:path";
|
|
5730
|
+
import qo, { promises as Wo } from "node:fs";
|
|
5731
|
+
import { fileURLToPath as Pu } from "node:url";
|
|
5732
5732
|
|
|
5733
5733
|
// ../node_modules/locate-path/node_modules/p-limit/index.js
|
|
5734
|
-
|
|
5734
|
+
Bo();
|
|
5735
5735
|
function Nt(t) {
|
|
5736
5736
|
if (!((Number.isInteger(t) || t === Number.POSITIVE_INFINITY) && t > 0))
|
|
5737
5737
|
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
@@ -5775,7 +5775,7 @@ var Zt = class extends Error {
|
|
|
5775
5775
|
constructor(e) {
|
|
5776
5776
|
super(), this.value = e;
|
|
5777
5777
|
}
|
|
5778
|
-
},
|
|
5778
|
+
}, Eu = /* @__PURE__ */ i(async (t, e) => e(await t), "testElement"), Cu = /* @__PURE__ */ i(async (t) => {
|
|
5779
5779
|
let e = await Promise.all(t);
|
|
5780
5780
|
if (e[1] === !0)
|
|
5781
5781
|
throw new Zt(e[0]);
|
|
@@ -5785,9 +5785,9 @@ async function Gr(t, e, {
|
|
|
5785
5785
|
concurrency: r = Number.POSITIVE_INFINITY,
|
|
5786
5786
|
preserveOrder: n = !0
|
|
5787
5787
|
} = {}) {
|
|
5788
|
-
let s = Nt(r), o = [...t].map((c) => [c, s(
|
|
5788
|
+
let s = Nt(r), o = [...t].map((c) => [c, s(Eu, c, e)]), a = Nt(n ? 1 : Number.POSITIVE_INFINITY);
|
|
5789
5789
|
try {
|
|
5790
|
-
await Promise.all(o.map((c) => a(
|
|
5790
|
+
await Promise.all(o.map((c) => a(Cu, c)));
|
|
5791
5791
|
} catch (c) {
|
|
5792
5792
|
if (c instanceof Zt)
|
|
5793
5793
|
return c.value;
|
|
@@ -5797,29 +5797,29 @@ async function Gr(t, e, {
|
|
|
5797
5797
|
i(Gr, "pLocate");
|
|
5798
5798
|
|
|
5799
5799
|
// ../node_modules/locate-path/index.js
|
|
5800
|
-
var
|
|
5800
|
+
var Ko = {
|
|
5801
5801
|
directory: "isDirectory",
|
|
5802
5802
|
file: "isFile"
|
|
5803
5803
|
};
|
|
5804
|
-
function
|
|
5805
|
-
if (!Object.hasOwnProperty.call(
|
|
5804
|
+
function Jo(t) {
|
|
5805
|
+
if (!Object.hasOwnProperty.call(Ko, t))
|
|
5806
5806
|
throw new Error(`Invalid type specified: ${t}`);
|
|
5807
5807
|
}
|
|
5808
|
-
i(
|
|
5809
|
-
var
|
|
5808
|
+
i(Jo, "checkType");
|
|
5809
|
+
var Ho = /* @__PURE__ */ i((t, e) => e[Ko[t]](), "matchType"), Yo = /* @__PURE__ */ i((t) => t instanceof URL ? Pu(t) : t, "toPath");
|
|
5810
5810
|
async function Mt(t, {
|
|
5811
|
-
cwd: e =
|
|
5811
|
+
cwd: e = Go.cwd(),
|
|
5812
5812
|
type: r = "file",
|
|
5813
5813
|
allowSymlinks: n = !0,
|
|
5814
5814
|
concurrency: s,
|
|
5815
5815
|
preserveOrder: o
|
|
5816
5816
|
} = {}) {
|
|
5817
|
-
|
|
5818
|
-
let a = n ?
|
|
5817
|
+
Jo(r), e = Yo(e);
|
|
5818
|
+
let a = n ? Wo.stat : Wo.lstat;
|
|
5819
5819
|
return Gr(t, async (c) => {
|
|
5820
5820
|
try {
|
|
5821
|
-
let l = await a(
|
|
5822
|
-
return
|
|
5821
|
+
let l = await a(zo.resolve(e, c));
|
|
5822
|
+
return Ho(r, l);
|
|
5823
5823
|
} catch {
|
|
5824
5824
|
return !1;
|
|
5825
5825
|
}
|
|
@@ -5827,20 +5827,20 @@ async function Mt(t, {
|
|
|
5827
5827
|
}
|
|
5828
5828
|
i(Mt, "locatePath");
|
|
5829
5829
|
function Dt(t, {
|
|
5830
|
-
cwd: e =
|
|
5830
|
+
cwd: e = Go.cwd(),
|
|
5831
5831
|
type: r = "file",
|
|
5832
5832
|
allowSymlinks: n = !0
|
|
5833
5833
|
} = {}) {
|
|
5834
|
-
|
|
5835
|
-
let s = n ?
|
|
5834
|
+
Jo(r), e = Yo(e);
|
|
5835
|
+
let s = n ? qo.statSync : qo.lstatSync;
|
|
5836
5836
|
for (let o of t)
|
|
5837
5837
|
try {
|
|
5838
|
-
let a = s(
|
|
5838
|
+
let a = s(zo.resolve(e, o), {
|
|
5839
5839
|
throwIfNoEntry: !1
|
|
5840
5840
|
});
|
|
5841
5841
|
if (!a)
|
|
5842
5842
|
continue;
|
|
5843
|
-
if (
|
|
5843
|
+
if (Ho(r, a))
|
|
5844
5844
|
return o;
|
|
5845
5845
|
} catch {
|
|
5846
5846
|
}
|
|
@@ -5848,12 +5848,12 @@ function Dt(t, {
|
|
|
5848
5848
|
i(Dt, "locatePathSync");
|
|
5849
5849
|
|
|
5850
5850
|
// ../node_modules/pkg-dir/node_modules/path-exists/index.js
|
|
5851
|
-
import
|
|
5851
|
+
import Jh, { promises as Hh } from "node:fs";
|
|
5852
5852
|
|
|
5853
5853
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
5854
|
-
var
|
|
5855
|
-
function
|
|
5856
|
-
let r = Lt.resolve(
|
|
5854
|
+
var Au = /* @__PURE__ */ i((t) => t instanceof URL ? ju(t) : t, "toPath"), Ou = Symbol("findUpStop");
|
|
5855
|
+
function Ru(t, e = {}) {
|
|
5856
|
+
let r = Lt.resolve(Au(e.cwd) || ""), { root: n } = Lt.parse(r), s = e.stopAt || n, o = e.limit || Number.POSITIVE_INFINITY, a = [t].flat(),
|
|
5857
5857
|
c = /* @__PURE__ */ i((p) => {
|
|
5858
5858
|
if (typeof t != "function")
|
|
5859
5859
|
return Dt(a, p);
|
|
@@ -5862,80 +5862,80 @@ function ju(t, e = {}) {
|
|
|
5862
5862
|
}, "runMatcher"), l = [];
|
|
5863
5863
|
for (; ; ) {
|
|
5864
5864
|
let p = c({ ...e, cwd: r });
|
|
5865
|
-
if (p ===
|
|
5865
|
+
if (p === Ou || (p && l.push(Lt.resolve(r, p)), r === s || l.length >= o))
|
|
5866
5866
|
break;
|
|
5867
5867
|
r = Lt.dirname(r);
|
|
5868
5868
|
}
|
|
5869
5869
|
return l;
|
|
5870
5870
|
}
|
|
5871
|
-
i(
|
|
5872
|
-
function
|
|
5873
|
-
return
|
|
5871
|
+
i(Ru, "findUpMultipleSync");
|
|
5872
|
+
function Xo(t, e = {}) {
|
|
5873
|
+
return Ru(t, { ...e, limit: 1 })[0];
|
|
5874
5874
|
}
|
|
5875
|
-
i(
|
|
5875
|
+
i(Xo, "findUpSync");
|
|
5876
5876
|
|
|
5877
5877
|
// ../node_modules/pkg-dir/index.js
|
|
5878
|
-
function
|
|
5879
|
-
let e =
|
|
5880
|
-
return e &&
|
|
5878
|
+
function Qo({ cwd: t } = {}) {
|
|
5879
|
+
let e = Xo("package.json", { cwd: t });
|
|
5880
|
+
return e && Nu.dirname(e);
|
|
5881
5881
|
}
|
|
5882
|
-
i(
|
|
5882
|
+
i(Qo, "packageDirectorySync");
|
|
5883
5883
|
|
|
5884
5884
|
// node_modules/find-cache-dir/index.js
|
|
5885
|
-
var { env: zr, cwd:
|
|
5885
|
+
var { env: zr, cwd: Mu } = Zu, ei = /* @__PURE__ */ i((t) => {
|
|
5886
5886
|
try {
|
|
5887
5887
|
return Ut.accessSync(t, Ut.constants.W_OK), !0;
|
|
5888
5888
|
} catch {
|
|
5889
5889
|
return !1;
|
|
5890
5890
|
}
|
|
5891
5891
|
}, "isWritable");
|
|
5892
|
-
function
|
|
5892
|
+
function ti(t, e) {
|
|
5893
5893
|
return e.create && Ut.mkdirSync(t, { recursive: !0 }), t;
|
|
5894
5894
|
}
|
|
5895
|
-
i(
|
|
5896
|
-
function
|
|
5895
|
+
i(ti, "useDirectory");
|
|
5896
|
+
function Du(t) {
|
|
5897
5897
|
let e = ze.join(t, "node_modules");
|
|
5898
|
-
if (!(!
|
|
5898
|
+
if (!(!ei(e) && (Ut.existsSync(e) || !ei(ze.join(t)))))
|
|
5899
5899
|
return e;
|
|
5900
5900
|
}
|
|
5901
|
-
i(
|
|
5901
|
+
i(Du, "getNodeModuleDirectory");
|
|
5902
5902
|
function Kr(t = {}) {
|
|
5903
5903
|
if (zr.CACHE_DIR && !["true", "false", "1", "0"].includes(zr.CACHE_DIR))
|
|
5904
|
-
return
|
|
5905
|
-
let { cwd: e =
|
|
5904
|
+
return ti(ze.join(zr.CACHE_DIR, t.name), t);
|
|
5905
|
+
let { cwd: e = Mu(), files: r } = t;
|
|
5906
5906
|
if (r) {
|
|
5907
5907
|
if (!Array.isArray(r))
|
|
5908
5908
|
throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof r}\`.`);
|
|
5909
|
-
e = (0,
|
|
5909
|
+
e = (0, ri.default)(r.map((s) => ze.resolve(e, s)));
|
|
5910
5910
|
}
|
|
5911
|
-
if (e =
|
|
5912
|
-
return
|
|
5911
|
+
if (e = Qo({ cwd: e }), !(!e || !Du(e)))
|
|
5912
|
+
return ti(ze.join(e, "node_modules", ".cache", t.name), t);
|
|
5913
5913
|
}
|
|
5914
5914
|
i(Kr, "findCacheDirectory");
|
|
5915
5915
|
|
|
5916
5916
|
// src/common/utils/resolve-path-in-sb-cache.ts
|
|
5917
|
-
function
|
|
5917
|
+
function si(t, e = "default") {
|
|
5918
5918
|
let r = Kr({ name: "storybook" });
|
|
5919
|
-
return r ||=
|
|
5919
|
+
return r ||= ni(process.cwd(), "node_modules", ".cache", "storybook"), ni(r, e, t);
|
|
5920
5920
|
}
|
|
5921
|
-
i(
|
|
5921
|
+
i(si, "resolvePathInStorybookCache");
|
|
5922
5922
|
|
|
5923
|
-
// node_modules/find-up/index.js
|
|
5923
|
+
// ../node_modules/find-up/index.js
|
|
5924
5924
|
import Ke from "node:path";
|
|
5925
5925
|
|
|
5926
|
-
// node_modules/unicorn-magic/node.js
|
|
5927
|
-
import { fileURLToPath as
|
|
5926
|
+
// ../node_modules/find-up/node_modules/unicorn-magic/node.js
|
|
5927
|
+
import { fileURLToPath as Lu } from "node:url";
|
|
5928
5928
|
function Jr(t) {
|
|
5929
|
-
return t instanceof URL ?
|
|
5929
|
+
return t instanceof URL ? Lu(t) : t;
|
|
5930
5930
|
}
|
|
5931
5931
|
i(Jr, "toPath");
|
|
5932
5932
|
|
|
5933
|
-
// node_modules/path-exists/index.js
|
|
5934
|
-
import
|
|
5933
|
+
// ../node_modules/find-up/node_modules/path-exists/index.js
|
|
5934
|
+
import Ey, { promises as Cy } from "node:fs";
|
|
5935
5935
|
|
|
5936
|
-
// node_modules/find-up/index.js
|
|
5937
|
-
var
|
|
5938
|
-
async function
|
|
5936
|
+
// ../node_modules/find-up/index.js
|
|
5937
|
+
var Uu = Symbol("findUpStop");
|
|
5938
|
+
async function $u(t, e = {}) {
|
|
5939
5939
|
let r = Ke.resolve(Jr(e.cwd) ?? ""), { root: n } = Ke.parse(r), s = Ke.resolve(r, Jr(e.stopAt ?? n)), o = e.limit ?? Number.POSITIVE_INFINITY,
|
|
5940
5940
|
a = [t].flat(), c = /* @__PURE__ */ i(async (p) => {
|
|
5941
5941
|
if (typeof t != "function")
|
|
@@ -5945,36 +5945,36 @@ async function Du(t, e = {}) {
|
|
|
5945
5945
|
}, "runMatcher"), l = [];
|
|
5946
5946
|
for (; ; ) {
|
|
5947
5947
|
let p = await c({ ...e, cwd: r });
|
|
5948
|
-
if (p ===
|
|
5948
|
+
if (p === Uu || (p && l.push(Ke.resolve(r, p)), r === s || l.length >= o))
|
|
5949
5949
|
break;
|
|
5950
5950
|
r = Ke.dirname(r);
|
|
5951
5951
|
}
|
|
5952
5952
|
return l;
|
|
5953
5953
|
}
|
|
5954
|
-
i(
|
|
5955
|
-
async function
|
|
5956
|
-
return (await
|
|
5954
|
+
i($u, "findUpMultiple");
|
|
5955
|
+
async function oi(t, e = {}) {
|
|
5956
|
+
return (await $u(t, { ...e, limit: 1 }))[0];
|
|
5957
5957
|
}
|
|
5958
|
-
i(
|
|
5958
|
+
i(oi, "findUp");
|
|
5959
5959
|
|
|
5960
5960
|
// src/telemetry/run-telemetry-operation.ts
|
|
5961
|
-
var
|
|
5962
|
-
basePath:
|
|
5961
|
+
var ii = qr({
|
|
5962
|
+
basePath: si("telemetry"),
|
|
5963
5963
|
ns: "storybook",
|
|
5964
5964
|
ttl: 24 * 60 * 60 * 1e3
|
|
5965
5965
|
// 24h
|
|
5966
5966
|
}), $t = /* @__PURE__ */ i(async (t, e) => {
|
|
5967
|
-
let r = await
|
|
5968
|
-
return r === void 0 && (r = await e(), r !== void 0 && await
|
|
5967
|
+
let r = await ii.get(t);
|
|
5968
|
+
return r === void 0 && (r = await e(), r !== void 0 && await ii.set(t, r)), r;
|
|
5969
5969
|
}, "runTelemetryOperation");
|
|
5970
5970
|
|
|
5971
5971
|
// src/telemetry/get-application-file-count.ts
|
|
5972
|
-
var
|
|
5973
|
-
let r =
|
|
5972
|
+
var Fu = ["page", "screen"], Bu = ["js", "jsx", "ts", "tsx"], qu = /* @__PURE__ */ i(async (t) => {
|
|
5973
|
+
let r = Fu.flatMap((n) => [
|
|
5974
5974
|
n,
|
|
5975
5975
|
[n[0].toUpperCase(), ...n.slice(1)].join("")
|
|
5976
5976
|
]).flatMap(
|
|
5977
|
-
(n) =>
|
|
5977
|
+
(n) => Bu.map((s) => `"${t}${Vu}*${n}*.${s}"`)
|
|
5978
5978
|
);
|
|
5979
5979
|
try {
|
|
5980
5980
|
let n = `git ls-files -- ${r.join(" ")}`;
|
|
@@ -5982,31 +5982,31 @@ var Uu = ["page", "screen"], $u = ["js", "jsx", "ts", "tsx"], Vu = /* @__PURE__
|
|
|
5982
5982
|
} catch {
|
|
5983
5983
|
return;
|
|
5984
5984
|
}
|
|
5985
|
-
}, "getApplicationFilesCountUncached"),
|
|
5985
|
+
}, "getApplicationFilesCountUncached"), ai = /* @__PURE__ */ i(async (t) => $t(
|
|
5986
5986
|
"applicationFiles",
|
|
5987
|
-
async () =>
|
|
5987
|
+
async () => qu(t)
|
|
5988
5988
|
), "getApplicationFileCount");
|
|
5989
5989
|
|
|
5990
5990
|
// src/telemetry/get-chromatic-version.ts
|
|
5991
|
-
function
|
|
5991
|
+
function ci(t) {
|
|
5992
5992
|
let e = t.dependencies?.chromatic || t.devDependencies?.chromatic || t.peerDependencies?.chromatic;
|
|
5993
5993
|
return e || (t.scripts && Object.values(t.scripts).find((r) => r?.match(/chromatic/)) ? "latest" : void 0);
|
|
5994
5994
|
}
|
|
5995
|
-
i(
|
|
5995
|
+
i(ci, "getChromaticVersionSpecifier");
|
|
5996
5996
|
|
|
5997
5997
|
// src/telemetry/get-framework-info.ts
|
|
5998
|
-
import { normalize as
|
|
5999
|
-
import { frameworkPackages as
|
|
5998
|
+
import { normalize as zu } from "node:path";
|
|
5999
|
+
import { frameworkPackages as Ku } from "storybook/internal/common";
|
|
6000
6000
|
|
|
6001
6001
|
// src/telemetry/package-json.ts
|
|
6002
|
-
import { readFile as
|
|
6003
|
-
import { join as
|
|
6004
|
-
var
|
|
6002
|
+
import { readFile as Wu } from "node:fs/promises";
|
|
6003
|
+
import { join as Gu } from "node:path";
|
|
6004
|
+
var Hr = /* @__PURE__ */ i(async (t) => {
|
|
6005
6005
|
let e = Object.keys(t);
|
|
6006
6006
|
return Promise.all(e.map(Vt));
|
|
6007
6007
|
}, "getActualPackageVersions"), Vt = /* @__PURE__ */ i(async (t) => {
|
|
6008
6008
|
try {
|
|
6009
|
-
let e = await
|
|
6009
|
+
let e = await Yr(t);
|
|
6010
6010
|
return {
|
|
6011
6011
|
name: e?.name || t,
|
|
6012
6012
|
version: e?.version || null
|
|
@@ -6017,19 +6017,19 @@ var Yr = /* @__PURE__ */ i(async (t) => {
|
|
|
6017
6017
|
version: null
|
|
6018
6018
|
};
|
|
6019
6019
|
}
|
|
6020
|
-
}, "getActualPackageVersion"),
|
|
6020
|
+
}, "getActualPackageVersion"), Yr = /* @__PURE__ */ i(async (t) => {
|
|
6021
6021
|
try {
|
|
6022
|
-
let e = await
|
|
6023
|
-
return e || (e = O.resolve(
|
|
6022
|
+
let e = await oi("package.json", { cwd: O.resolve(t) });
|
|
6023
|
+
return e || (e = O.resolve(Gu(t, "package.json"), {
|
|
6024
6024
|
paths: [process.cwd()]
|
|
6025
|
-
})), JSON.parse(await
|
|
6025
|
+
})), JSON.parse(await Wu(e, { encoding: "utf8" }));
|
|
6026
6026
|
} catch {
|
|
6027
6027
|
return;
|
|
6028
6028
|
}
|
|
6029
6029
|
}, "getActualPackageJson");
|
|
6030
6030
|
|
|
6031
6031
|
// src/telemetry/get-framework-info.ts
|
|
6032
|
-
var
|
|
6032
|
+
var Ju = [
|
|
6033
6033
|
"html",
|
|
6034
6034
|
"react",
|
|
6035
6035
|
"svelte",
|
|
@@ -6040,8 +6040,8 @@ var Gu = [
|
|
|
6040
6040
|
"web-components",
|
|
6041
6041
|
"angular",
|
|
6042
6042
|
"ember"
|
|
6043
|
-
],
|
|
6044
|
-
function
|
|
6043
|
+
], Hu = ["builder-webpack5", "builder-vite"];
|
|
6044
|
+
function di(t, e) {
|
|
6045
6045
|
let { name: r = "", version: n, dependencies: s, devDependencies: o, peerDependencies: a } = t, c = {
|
|
6046
6046
|
// We include the framework itself because it may be a renderer too (e.g. angular)
|
|
6047
6047
|
[r]: n,
|
|
@@ -6051,21 +6051,21 @@ function ai(t, e) {
|
|
|
6051
6051
|
};
|
|
6052
6052
|
return e.map((l) => `@storybook/${l}`).find((l) => c[l]);
|
|
6053
6053
|
}
|
|
6054
|
-
i(
|
|
6055
|
-
var
|
|
6056
|
-
let e =
|
|
6057
|
-
return Object.keys(
|
|
6054
|
+
i(di, "findMatchingPackage");
|
|
6055
|
+
var Yu = /* @__PURE__ */ i((t) => {
|
|
6056
|
+
let e = zu(t).replace(new RegExp(/\\/, "g"), "/");
|
|
6057
|
+
return Object.keys(Ku).find((n) => e.endsWith(n)) || Re(t).replace(/.*node_modules[\\/]/, "");
|
|
6058
6058
|
}, "getFrameworkPackageName");
|
|
6059
|
-
async function
|
|
6059
|
+
async function ui(t) {
|
|
6060
6060
|
if (!t?.framework)
|
|
6061
6061
|
return {};
|
|
6062
6062
|
let e = typeof t.framework == "string" ? t.framework : t.framework?.name;
|
|
6063
6063
|
if (!e)
|
|
6064
6064
|
return {};
|
|
6065
|
-
let r = await
|
|
6065
|
+
let r = await Yr(e);
|
|
6066
6066
|
if (!r)
|
|
6067
6067
|
return {};
|
|
6068
|
-
let n =
|
|
6068
|
+
let n = di(r, Hu), s = di(r, Ju), o = Yu(e), a = typeof t.framework == "object" ? t.framework.options : {};
|
|
6069
6069
|
return {
|
|
6070
6070
|
framework: {
|
|
6071
6071
|
name: o,
|
|
@@ -6075,10 +6075,10 @@ async function ci(t) {
|
|
|
6075
6075
|
renderer: s
|
|
6076
6076
|
};
|
|
6077
6077
|
}
|
|
6078
|
-
i(
|
|
6078
|
+
i(ui, "getFrameworkInfo");
|
|
6079
6079
|
|
|
6080
6080
|
// src/telemetry/get-has-router-package.ts
|
|
6081
|
-
var
|
|
6081
|
+
var Xu = /* @__PURE__ */ new Set([
|
|
6082
6082
|
"react-router",
|
|
6083
6083
|
"react-router-dom",
|
|
6084
6084
|
"remix",
|
|
@@ -6101,56 +6101,53 @@ var Ju = /* @__PURE__ */ new Set([
|
|
|
6101
6101
|
"nuxt",
|
|
6102
6102
|
"@sveltejs/kit"
|
|
6103
6103
|
]);
|
|
6104
|
-
function
|
|
6104
|
+
function li(t) {
|
|
6105
6105
|
return Object.keys(t?.dependencies ?? {}).some(
|
|
6106
|
-
(e) =>
|
|
6106
|
+
(e) => Xu.has(e)
|
|
6107
6107
|
);
|
|
6108
6108
|
}
|
|
6109
|
-
i(
|
|
6109
|
+
i(li, "getHasRouterPackage");
|
|
6110
6110
|
|
|
6111
6111
|
// src/telemetry/get-monorepo-type.ts
|
|
6112
|
-
import { existsSync as
|
|
6112
|
+
import { existsSync as pi, readFileSync as Qu } from "node:fs";
|
|
6113
6113
|
import { join as Xr } from "node:path";
|
|
6114
|
-
import { getProjectRoot as
|
|
6115
|
-
var
|
|
6114
|
+
import { getProjectRoot as Qr } from "storybook/internal/common";
|
|
6115
|
+
var fi = {
|
|
6116
6116
|
Nx: "nx.json",
|
|
6117
6117
|
Turborepo: "turbo.json",
|
|
6118
6118
|
Lerna: "lerna.json",
|
|
6119
6119
|
Rush: "rush.json",
|
|
6120
6120
|
Lage: "lage.config.json"
|
|
6121
|
-
},
|
|
6122
|
-
let
|
|
6123
|
-
|
|
6124
|
-
return;
|
|
6125
|
-
let r = Object.keys(li).find((s) => {
|
|
6126
|
-
let o = Xr(t, li[s]);
|
|
6127
|
-
return ui(o);
|
|
6121
|
+
}, mi = /* @__PURE__ */ i(() => {
|
|
6122
|
+
let e = Object.keys(fi).find((n) => {
|
|
6123
|
+
let s = Xr(Qr(), fi[n]);
|
|
6124
|
+
return pi(s);
|
|
6128
6125
|
});
|
|
6129
|
-
if (
|
|
6130
|
-
return
|
|
6131
|
-
if (!
|
|
6126
|
+
if (e)
|
|
6127
|
+
return e;
|
|
6128
|
+
if (!pi(Xr(Qr(), "package.json")))
|
|
6132
6129
|
return;
|
|
6133
6130
|
if (JSON.parse(
|
|
6134
|
-
|
|
6131
|
+
Qu(Xr(Qr(), "package.json"), { encoding: "utf8" })
|
|
6135
6132
|
)?.workspaces)
|
|
6136
6133
|
return "Workspaces";
|
|
6137
6134
|
}, "getMonorepoType");
|
|
6138
6135
|
|
|
6139
6136
|
// src/telemetry/get-portable-stories-usage.ts
|
|
6140
|
-
var
|
|
6137
|
+
var el = /* @__PURE__ */ i(async (t) => {
|
|
6141
6138
|
try {
|
|
6142
6139
|
let e = "git grep -l composeStor" + (t ? ` -- ${t}` : "");
|
|
6143
6140
|
return await Ot(e);
|
|
6144
6141
|
} catch (e) {
|
|
6145
6142
|
return e.exitCode === 1 ? 0 : void 0;
|
|
6146
6143
|
}
|
|
6147
|
-
}, "getPortableStoriesFileCountUncached"),
|
|
6144
|
+
}, "getPortableStoriesFileCountUncached"), hi = /* @__PURE__ */ i(async (t) => $t(
|
|
6148
6145
|
"portableStories",
|
|
6149
|
-
async () =>
|
|
6146
|
+
async () => el(t)
|
|
6150
6147
|
), "getPortableStoriesFileCount");
|
|
6151
6148
|
|
|
6152
6149
|
// src/telemetry/storybook-metadata.ts
|
|
6153
|
-
var
|
|
6150
|
+
var yi = {
|
|
6154
6151
|
next: "Next",
|
|
6155
6152
|
"react-scripts": "CRA",
|
|
6156
6153
|
gatsby: "Gatsby",
|
|
@@ -6158,34 +6155,35 @@ var mi = {
|
|
|
6158
6155
|
"@nrwl/storybook": "nx",
|
|
6159
6156
|
"@vue/cli-service": "vue-cli",
|
|
6160
6157
|
"@sveltejs/kit": "sveltekit"
|
|
6161
|
-
},
|
|
6162
|
-
"").replace(/\/preset$/, ""), "sanitizeAddonName"),
|
|
6158
|
+
}, gi = /* @__PURE__ */ i((t) => Re(t).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
|
|
6159
|
+
"").replace(/\/preset$/, ""), "sanitizeAddonName"), cl = /* @__PURE__ */ i(async ({
|
|
6163
6160
|
packageJsonPath: t,
|
|
6164
6161
|
packageJson: e,
|
|
6165
|
-
mainConfig: r
|
|
6162
|
+
mainConfig: r,
|
|
6163
|
+
configDir: n
|
|
6166
6164
|
}) => {
|
|
6167
|
-
let
|
|
6165
|
+
let s = await Qn(), o = {
|
|
6168
6166
|
generatedAt: (/* @__PURE__ */ new Date()).getTime(),
|
|
6169
|
-
userSince:
|
|
6167
|
+
userSince: s.value.userSince,
|
|
6170
6168
|
hasCustomBabel: !1,
|
|
6171
6169
|
hasCustomWebpack: !1,
|
|
6172
6170
|
hasStaticDirs: !1,
|
|
6173
6171
|
hasStorybookEslint: !1,
|
|
6174
6172
|
refCount: 0
|
|
6175
|
-
},
|
|
6173
|
+
}, a = {
|
|
6176
6174
|
...e?.dependencies,
|
|
6177
6175
|
...e?.devDependencies,
|
|
6178
6176
|
...e?.peerDependencies
|
|
6179
|
-
},
|
|
6180
|
-
if (
|
|
6181
|
-
let { version:
|
|
6182
|
-
|
|
6183
|
-
name:
|
|
6184
|
-
packageName:
|
|
6185
|
-
version:
|
|
6177
|
+
}, c = Object.keys(a).find((x) => !!yi[x]);
|
|
6178
|
+
if (c) {
|
|
6179
|
+
let { version: x } = await Vt(c);
|
|
6180
|
+
o.metaFramework = {
|
|
6181
|
+
name: yi[c],
|
|
6182
|
+
packageName: c,
|
|
6183
|
+
version: x || "unknown"
|
|
6186
6184
|
};
|
|
6187
6185
|
}
|
|
6188
|
-
let
|
|
6186
|
+
let l = [
|
|
6189
6187
|
"playwright",
|
|
6190
6188
|
"vitest",
|
|
6191
6189
|
"jest",
|
|
@@ -6204,177 +6202,182 @@ var mi = {
|
|
|
6204
6202
|
"miragejs",
|
|
6205
6203
|
"sinon",
|
|
6206
6204
|
"chromatic"
|
|
6207
|
-
],
|
|
6208
|
-
(
|
|
6205
|
+
], p = Object.keys(a).filter(
|
|
6206
|
+
(x) => l.find((j) => x.includes(j))
|
|
6209
6207
|
);
|
|
6210
|
-
|
|
6208
|
+
o.testPackages = Object.fromEntries(
|
|
6211
6209
|
await Promise.all(
|
|
6212
|
-
|
|
6210
|
+
p.map(async (x) => [x, (await Vt(x))?.version])
|
|
6213
6211
|
)
|
|
6214
|
-
),
|
|
6215
|
-
let
|
|
6216
|
-
|
|
6212
|
+
), o.hasRouterPackage = li(e);
|
|
6213
|
+
let f = mi();
|
|
6214
|
+
f && (o.monorepo = f);
|
|
6217
6215
|
try {
|
|
6218
|
-
let
|
|
6219
|
-
|
|
6220
|
-
type:
|
|
6221
|
-
version:
|
|
6222
|
-
agent:
|
|
6216
|
+
let x = await Xt({ cwd: rl() });
|
|
6217
|
+
x && (o.packageManager = {
|
|
6218
|
+
type: x.name,
|
|
6219
|
+
version: x.version,
|
|
6220
|
+
agent: x.agent
|
|
6223
6221
|
});
|
|
6224
6222
|
} catch {
|
|
6225
6223
|
}
|
|
6226
|
-
let
|
|
6224
|
+
let v = a.typescript ? "typescript" : "javascript";
|
|
6227
6225
|
if (!r)
|
|
6228
6226
|
return {
|
|
6229
|
-
...
|
|
6230
|
-
storybookVersionSpecifier:
|
|
6231
|
-
language:
|
|
6227
|
+
...o,
|
|
6228
|
+
storybookVersionSpecifier: il.storybook,
|
|
6229
|
+
language: v
|
|
6232
6230
|
};
|
|
6233
|
-
|
|
6231
|
+
o.hasCustomBabel = !!r.babel, o.hasCustomWebpack = !!r.webpackFinal, o.hasStaticDirs = !!r.staticDirs, typeof r.typescript == "object" && (o.
|
|
6234
6232
|
typescriptOptions = r.typescript);
|
|
6235
|
-
let
|
|
6236
|
-
typeof r.refs == "object" && (
|
|
6237
|
-
let
|
|
6238
|
-
r.addons && r.addons.forEach((
|
|
6233
|
+
let k = await ui(r);
|
|
6234
|
+
typeof r.refs == "object" && (o.refCount = Object.keys(r.refs).length), typeof r.features == "object" && (o.features = r.features);
|
|
6235
|
+
let _ = {};
|
|
6236
|
+
r.addons && r.addons.forEach((x) => {
|
|
6239
6237
|
let j, Qe;
|
|
6240
|
-
typeof
|
|
6238
|
+
typeof x == "string" ? j = gi(x) : (x.name.includes("addon-essentials") && (Qe = x.options), j = gi(x.name)), _[j] = {
|
|
6241
6239
|
options: Qe,
|
|
6242
6240
|
version: void 0
|
|
6243
6241
|
};
|
|
6244
6242
|
});
|
|
6245
|
-
let
|
|
6246
|
-
|
|
6243
|
+
let C = ci(e);
|
|
6244
|
+
C && (_.chromatic = {
|
|
6247
6245
|
version: void 0,
|
|
6248
|
-
versionSpecifier:
|
|
6246
|
+
versionSpecifier: C,
|
|
6249
6247
|
options: void 0
|
|
6250
|
-
}), (await
|
|
6251
|
-
|
|
6252
|
-
name:
|
|
6248
|
+
}), (await Hr(_)).forEach(({ name: x, version: j }) => {
|
|
6249
|
+
_[x] = _[x] || {
|
|
6250
|
+
name: x,
|
|
6253
6251
|
version: j
|
|
6254
|
-
},
|
|
6252
|
+
}, _[x].version = j || void 0;
|
|
6255
6253
|
});
|
|
6256
|
-
let
|
|
6257
|
-
...
|
|
6254
|
+
let P = Object.keys(_), $ = Object.keys(a).filter((x) => x.includes("storybook") && !P.includes(x)).reduce((x, j) => ({
|
|
6255
|
+
...x,
|
|
6258
6256
|
[j]: { version: void 0 }
|
|
6259
6257
|
}), {});
|
|
6260
|
-
(await
|
|
6261
|
-
|
|
6262
|
-
name:
|
|
6258
|
+
(await Hr($)).forEach(({ name: x, version: j }) => {
|
|
6259
|
+
$[x] = $[x] || {
|
|
6260
|
+
name: x,
|
|
6263
6261
|
version: j
|
|
6264
|
-
},
|
|
6262
|
+
}, $[x].version = j || void 0;
|
|
6265
6263
|
});
|
|
6266
|
-
let
|
|
6264
|
+
let ve = !!a["eslint-plugin-storybook"], Oe = sl(n);
|
|
6267
6265
|
try {
|
|
6268
|
-
let {
|
|
6269
|
-
if (
|
|
6270
|
-
let j = await
|
|
6271
|
-
|
|
6266
|
+
let { previewConfigPath: x } = Oe;
|
|
6267
|
+
if (x) {
|
|
6268
|
+
let j = await al(x), Qe = !!(j.getFieldNode(["globals"]) || j.getFieldNode(["globalTypes"]));
|
|
6269
|
+
o.preview = { ...o.preview, usesGlobals: Qe };
|
|
6272
6270
|
}
|
|
6273
6271
|
} catch {
|
|
6274
6272
|
}
|
|
6275
|
-
let
|
|
6273
|
+
let Ye = await hi(), Xe = await ai(tl(t));
|
|
6276
6274
|
return {
|
|
6277
|
-
...
|
|
6278
|
-
...
|
|
6279
|
-
portableStoriesFileCount:
|
|
6275
|
+
...o,
|
|
6276
|
+
...k,
|
|
6277
|
+
portableStoriesFileCount: Ye,
|
|
6280
6278
|
applicationFileCount: Xe,
|
|
6281
6279
|
storybookVersion: ot,
|
|
6282
|
-
storybookVersionSpecifier:
|
|
6283
|
-
language:
|
|
6284
|
-
storybookPackages:
|
|
6285
|
-
addons:
|
|
6286
|
-
hasStorybookEslint:
|
|
6280
|
+
storybookVersionSpecifier: Oe.version,
|
|
6281
|
+
language: v,
|
|
6282
|
+
storybookPackages: $,
|
|
6283
|
+
addons: _,
|
|
6284
|
+
hasStorybookEslint: ve
|
|
6287
6285
|
};
|
|
6288
6286
|
}, "computeStorybookMetadata");
|
|
6289
|
-
async function
|
|
6287
|
+
async function dl() {
|
|
6290
6288
|
let t = await Kt(process.cwd());
|
|
6291
6289
|
return t ? {
|
|
6292
6290
|
packageJsonPath: t,
|
|
6293
|
-
packageJson: await
|
|
6291
|
+
packageJson: await bn(t) || {}
|
|
6294
6292
|
} : {
|
|
6295
6293
|
packageJsonPath: process.cwd(),
|
|
6296
6294
|
packageJson: {}
|
|
6297
6295
|
};
|
|
6298
6296
|
}
|
|
6299
|
-
i(
|
|
6300
|
-
var Ft,
|
|
6297
|
+
i(dl, "getPackageJsonDetails");
|
|
6298
|
+
var Ft, vi = /* @__PURE__ */ i(async (t) => {
|
|
6301
6299
|
if (Ft)
|
|
6302
6300
|
return Ft;
|
|
6303
|
-
let { packageJson: e, packageJsonPath: r } = await
|
|
6301
|
+
let { packageJson: e, packageJsonPath: r } = await dl(), n = (t || nl(
|
|
6304
6302
|
String(e?.scripts?.storybook || ""),
|
|
6305
6303
|
"-c",
|
|
6306
6304
|
"--config-dir"
|
|
6307
|
-
)) ?? ".storybook", s = await
|
|
6305
|
+
)) ?? ".storybook", s = await ol({ configDir: n }).catch(() => {
|
|
6308
6306
|
});
|
|
6309
|
-
return Ft = await
|
|
6307
|
+
return Ft = await cl({
|
|
6308
|
+
mainConfig: s,
|
|
6309
|
+
packageJson: e,
|
|
6310
|
+
packageJsonPath: r,
|
|
6311
|
+
configDir: n
|
|
6312
|
+
}), Ft;
|
|
6310
6313
|
}, "getStorybookMetadata");
|
|
6311
6314
|
|
|
6312
6315
|
// src/telemetry/telemetry.ts
|
|
6313
|
-
var
|
|
6314
|
-
import * as
|
|
6316
|
+
var Pi = z(bi(), 1);
|
|
6317
|
+
import * as Ci from "node:os";
|
|
6315
6318
|
|
|
6316
6319
|
// ../node_modules/nanoid/index.js
|
|
6317
|
-
import { randomFillSync as
|
|
6320
|
+
import { randomFillSync as _i } from "crypto";
|
|
6318
6321
|
|
|
6319
6322
|
// ../node_modules/nanoid/url-alphabet/index.js
|
|
6320
|
-
var
|
|
6323
|
+
var wi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
6321
6324
|
|
|
6322
6325
|
// ../node_modules/nanoid/index.js
|
|
6323
|
-
var
|
|
6324
|
-
!ge || ge.length < t ? (ge = Buffer.allocUnsafe(t *
|
|
6326
|
+
var ul = 128, ge, je, ll = /* @__PURE__ */ i((t) => {
|
|
6327
|
+
!ge || ge.length < t ? (ge = Buffer.allocUnsafe(t * ul), _i(ge), je = 0) : je + t > ge.length && (_i(ge), je = 0), je += t;
|
|
6325
6328
|
}, "fillPool");
|
|
6326
6329
|
var Je = /* @__PURE__ */ i((t = 21) => {
|
|
6327
|
-
|
|
6330
|
+
ll(t -= 0);
|
|
6328
6331
|
let e = "";
|
|
6329
|
-
for (let r =
|
|
6330
|
-
e +=
|
|
6332
|
+
for (let r = je - t; r < je; r++)
|
|
6333
|
+
e += wi[ge[r] & 63];
|
|
6331
6334
|
return e;
|
|
6332
6335
|
}, "nanoid");
|
|
6333
6336
|
|
|
6334
6337
|
// src/telemetry/anonymous-id.ts
|
|
6335
|
-
|
|
6336
|
-
import { relative as
|
|
6337
|
-
import { getProjectRoot as
|
|
6338
|
-
import { execSync as
|
|
6338
|
+
Zo();
|
|
6339
|
+
import { relative as fl } from "node:path";
|
|
6340
|
+
import { getProjectRoot as ml } from "storybook/internal/common";
|
|
6341
|
+
import { execSync as hl } from "child_process";
|
|
6339
6342
|
|
|
6340
6343
|
// src/telemetry/one-way-hash.ts
|
|
6341
|
-
import { createHash as
|
|
6342
|
-
var
|
|
6343
|
-
let e =
|
|
6344
|
+
import { createHash as pl } from "crypto";
|
|
6345
|
+
var en = /* @__PURE__ */ i((t) => {
|
|
6346
|
+
let e = pl("sha256");
|
|
6344
6347
|
return e.update("storybook-telemetry-salt"), e.update(t), e.digest("hex");
|
|
6345
6348
|
}, "oneWayHash");
|
|
6346
6349
|
|
|
6347
6350
|
// src/telemetry/anonymous-id.ts
|
|
6348
|
-
function
|
|
6351
|
+
function yl(t) {
|
|
6349
6352
|
let n = t.trim().replace(/#.*$/, "").replace(/^.*@/, "").replace(/^.*\/\//, "");
|
|
6350
6353
|
return (n.endsWith(".git") ? n : `${n}.git`).replace(":", "/");
|
|
6351
6354
|
}
|
|
6352
|
-
i(
|
|
6353
|
-
function
|
|
6354
|
-
return `${
|
|
6355
|
+
i(yl, "normalizeGitUrl");
|
|
6356
|
+
function gl(t, e) {
|
|
6357
|
+
return `${yl(t)}${Fr(e)}`;
|
|
6355
6358
|
}
|
|
6356
|
-
i(
|
|
6357
|
-
var qt,
|
|
6359
|
+
i(gl, "unhashedProjectId");
|
|
6360
|
+
var qt, ki = /* @__PURE__ */ i(() => {
|
|
6358
6361
|
if (qt)
|
|
6359
6362
|
return qt;
|
|
6360
6363
|
try {
|
|
6361
|
-
let t =
|
|
6364
|
+
let t = fl(ml(), process.cwd()), e = hl("git config --local --get remote.origin.url", {
|
|
6362
6365
|
timeout: 1e3,
|
|
6363
6366
|
stdio: "pipe"
|
|
6364
6367
|
});
|
|
6365
|
-
qt =
|
|
6368
|
+
qt = en(gl(String(e), t));
|
|
6366
6369
|
} catch {
|
|
6367
6370
|
}
|
|
6368
6371
|
return qt;
|
|
6369
6372
|
}, "getAnonymousProjectId");
|
|
6370
6373
|
|
|
6371
6374
|
// src/telemetry/event-cache.ts
|
|
6372
|
-
import { cache as
|
|
6373
|
-
var
|
|
6374
|
-
let r = await
|
|
6375
|
-
r[t] = { body: e, timestamp: Date.now() }, await
|
|
6376
|
-
}, "setHelper"),
|
|
6377
|
-
var
|
|
6375
|
+
import { cache as rn } from "storybook/internal/common";
|
|
6376
|
+
var tn = Promise.resolve(), vl = /* @__PURE__ */ i(async (t, e) => {
|
|
6377
|
+
let r = await rn.get("lastEvents") || {};
|
|
6378
|
+
r[t] = { body: e, timestamp: Date.now() }, await rn.set("lastEvents", r);
|
|
6379
|
+
}, "setHelper"), Ii = /* @__PURE__ */ i(async (t, e) => (await tn, tn = vl(t, e), tn), "set");
|
|
6380
|
+
var xl = /* @__PURE__ */ i((t) => {
|
|
6378
6381
|
let { body: e, timestamp: r } = t;
|
|
6379
6382
|
return {
|
|
6380
6383
|
timestamp: r,
|
|
@@ -6382,51 +6385,51 @@ var gl = /* @__PURE__ */ i((t) => {
|
|
|
6382
6385
|
eventId: e?.eventId,
|
|
6383
6386
|
sessionId: e?.sessionId
|
|
6384
6387
|
};
|
|
6385
|
-
}, "upgradeFields"),
|
|
6388
|
+
}, "upgradeFields"), bl = ["init", "upgrade"], wl = ["build", "dev", "error"], Ti = /* @__PURE__ */ i((t, e) => {
|
|
6386
6389
|
let r = e.map((n) => t?.[n]).filter(Boolean).sort((n, s) => s.timestamp - n.timestamp);
|
|
6387
6390
|
return r.length > 0 ? r[0] : void 0;
|
|
6388
|
-
}, "lastEvent"),
|
|
6389
|
-
let e = t || await
|
|
6391
|
+
}, "lastEvent"), _l = /* @__PURE__ */ i(async (t = void 0) => {
|
|
6392
|
+
let e = t || await rn.get("lastEvents") || {}, r = Ti(e, bl), n = Ti(e, wl);
|
|
6390
6393
|
if (r)
|
|
6391
|
-
return !n?.timestamp || r.timestamp > n.timestamp ?
|
|
6394
|
+
return !n?.timestamp || r.timestamp > n.timestamp ? xl(r) : void 0;
|
|
6392
6395
|
}, "getPrecedingUpgrade");
|
|
6393
6396
|
|
|
6394
6397
|
// src/telemetry/fetch.ts
|
|
6395
|
-
var
|
|
6398
|
+
var Si = global.fetch;
|
|
6396
6399
|
|
|
6397
6400
|
// src/telemetry/session-id.ts
|
|
6398
|
-
import { cache as
|
|
6399
|
-
var
|
|
6400
|
-
var
|
|
6401
|
+
import { cache as Ei } from "storybook/internal/common";
|
|
6402
|
+
var kl = 1e3 * 60 * 60 * 2, He;
|
|
6403
|
+
var nn = /* @__PURE__ */ i(async () => {
|
|
6401
6404
|
let t = Date.now();
|
|
6402
|
-
if (!
|
|
6403
|
-
let e = await
|
|
6404
|
-
e && e.lastUsed >= t -
|
|
6405
|
+
if (!He) {
|
|
6406
|
+
let e = await Ei.get("session");
|
|
6407
|
+
e && e.lastUsed >= t - kl ? He = e.id : He = Je();
|
|
6405
6408
|
}
|
|
6406
|
-
return await
|
|
6409
|
+
return await Ei.set("session", { id: He, lastUsed: t }), He;
|
|
6407
6410
|
}, "getSessionId");
|
|
6408
6411
|
|
|
6409
6412
|
// src/telemetry/telemetry.ts
|
|
6410
|
-
var
|
|
6413
|
+
var Tl = (0, Pi.default)(Si), Il = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Wt = [], Sl = /* @__PURE__ */ i(
|
|
6411
6414
|
(t, e) => {
|
|
6412
|
-
|
|
6413
|
-
}, "addToGlobalContext"),
|
|
6415
|
+
sn[t] = e;
|
|
6416
|
+
}, "addToGlobalContext"), El = /* @__PURE__ */ i(() => {
|
|
6414
6417
|
try {
|
|
6415
|
-
let t =
|
|
6418
|
+
let t = Ci.platform();
|
|
6416
6419
|
return t === "win32" ? "Windows" : t === "darwin" ? "macOS" : t === "linux" ? "Linux" : `Other: ${t}`;
|
|
6417
6420
|
} catch {
|
|
6418
6421
|
return "Unknown";
|
|
6419
6422
|
}
|
|
6420
|
-
}, "getOperatingSystem"),
|
|
6423
|
+
}, "getOperatingSystem"), sn = {
|
|
6421
6424
|
inCI: !!process.env.CI,
|
|
6422
6425
|
isTTY: process.stdout.isTTY,
|
|
6423
|
-
platform:
|
|
6426
|
+
platform: El(),
|
|
6424
6427
|
nodeVersion: process.versions.node,
|
|
6425
6428
|
storybookVersion: ot
|
|
6426
|
-
},
|
|
6427
|
-
let { eventType: n, payload: s, metadata: o, ...a } = t, c = await
|
|
6429
|
+
}, Cl = /* @__PURE__ */ i(async (t, e, r) => {
|
|
6430
|
+
let { eventType: n, payload: s, metadata: o, ...a } = t, c = await nn(), l = Je(), p = { ...a, eventType: n, eventId: l, sessionId: c, metadata: o,
|
|
6428
6431
|
payload: s, context: e };
|
|
6429
|
-
return
|
|
6432
|
+
return Tl(Il, {
|
|
6430
6433
|
method: "post",
|
|
6431
6434
|
body: JSON.stringify(p),
|
|
6432
6435
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6436,51 +6439,51 @@ var _l = (0, Ei.default)(Ti), kl = process.env.STORYBOOK_TELEMETRY_URL || "https
|
|
|
6436
6439
|
retryDelay")
|
|
6437
6440
|
});
|
|
6438
6441
|
}, "prepareRequest");
|
|
6439
|
-
async function
|
|
6440
|
-
let { eventType: r, payload: n, metadata: s, ...o } = t, a = e.stripMetadata ?
|
|
6441
|
-
...
|
|
6442
|
-
anonymousId:
|
|
6442
|
+
async function ji(t, e = { retryDelay: 1e3, immediate: !1 }) {
|
|
6443
|
+
let { eventType: r, payload: n, metadata: s, ...o } = t, a = e.stripMetadata ? sn : {
|
|
6444
|
+
...sn,
|
|
6445
|
+
anonymousId: ki()
|
|
6443
6446
|
}, c;
|
|
6444
6447
|
try {
|
|
6445
|
-
c =
|
|
6446
|
-
let l = await
|
|
6447
|
-
await
|
|
6448
|
+
c = Cl(t, a, e), Wt.push(c), e.immediate ? await Promise.all(Wt) : await c;
|
|
6449
|
+
let l = await nn(), p = Je(), f = { ...o, eventType: r, eventId: p, sessionId: l, metadata: s, payload: n, context: a };
|
|
6450
|
+
await Ii(r, f);
|
|
6448
6451
|
} catch {
|
|
6449
6452
|
} finally {
|
|
6450
6453
|
Wt = Wt.filter((l) => l !== c);
|
|
6451
6454
|
}
|
|
6452
6455
|
}
|
|
6453
|
-
i(
|
|
6456
|
+
i(ji, "sendTelemetry");
|
|
6454
6457
|
|
|
6455
6458
|
// src/telemetry/index.ts
|
|
6456
|
-
var
|
|
6457
|
-
sExampleStoryId"),
|
|
6458
|
-
t !== "boot" && r.notify !== !1 && await
|
|
6459
|
+
var dx = /* @__PURE__ */ i((t) => t.startsWith("example-button--") || t.startsWith("example-header--") || t.startsWith("example-page--"), "i\
|
|
6460
|
+
sExampleStoryId"), ux = /* @__PURE__ */ i(async (t, e = {}, r = {}) => {
|
|
6461
|
+
t !== "boot" && r.notify !== !1 && await fn();
|
|
6459
6462
|
let n = {
|
|
6460
6463
|
eventType: t,
|
|
6461
6464
|
payload: e
|
|
6462
6465
|
};
|
|
6463
6466
|
try {
|
|
6464
|
-
r?.stripMetadata || (n.metadata = await
|
|
6467
|
+
r?.stripMetadata || (n.metadata = await vi(r?.configDir));
|
|
6465
6468
|
} catch (s) {
|
|
6466
6469
|
n.payload.metadataErrorMessage = nt(s).message, r?.enableCrashReports && (n.payload.metadataError = nt(s));
|
|
6467
6470
|
} finally {
|
|
6468
6471
|
let { error: s } = n.payload;
|
|
6469
|
-
s && (n.payload.error = nt(s)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (
|
|
6470
|
-
[telemetry]`),
|
|
6472
|
+
s && (n.payload.error = nt(s)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (Ai.info(`
|
|
6473
|
+
[telemetry]`), Ai.info(JSON.stringify(n, null, 2))), await ji(n, r));
|
|
6471
6474
|
}
|
|
6472
6475
|
}, "telemetry");
|
|
6473
6476
|
export {
|
|
6474
|
-
|
|
6477
|
+
Sl as addToGlobalContext,
|
|
6475
6478
|
Re as cleanPaths,
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6479
|
+
cl as computeStorybookMetadata,
|
|
6480
|
+
_l as getPrecedingUpgrade,
|
|
6481
|
+
vi as getStorybookMetadata,
|
|
6482
|
+
dx as isExampleStoryId,
|
|
6483
|
+
yi as metaFrameworks,
|
|
6484
|
+
en as oneWayHash,
|
|
6485
|
+
hn as removeAnsiEscapeCodes,
|
|
6486
|
+
gi as sanitizeAddonName,
|
|
6484
6487
|
nt as sanitizeError,
|
|
6485
|
-
|
|
6488
|
+
ux as telemetry
|
|
6486
6489
|
};
|