storybook 9.1.0-alpha.9 → 9.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.cjs +66 -66
- package/dist/bin/index.js +65 -65
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +2097 -2097
- package/dist/common/index.js +3192 -3192
- package/dist/components/index.cjs +289 -290
- package/dist/components/index.js +2 -3
- package/dist/core-server/presets/common-manager.js +2243 -2228
- package/dist/core-server/presets/common-preset.cjs +4761 -4759
- package/dist/core-server/presets/common-preset.js +9645 -9643
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.cjs +2 -1
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +2 -1
- package/dist/csf/index.cjs +40 -41
- package/dist/csf/index.js +2 -3
- package/dist/instrumenter/index.cjs +370 -352
- package/dist/instrumenter/index.d.ts +24 -3
- package/dist/instrumenter/index.js +268 -250
- package/dist/manager/globals-runtime.js +38 -21
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/preview/runtime.js +3894 -3870
- package/dist/preview-api/index.cjs +43 -37
- package/dist/preview-api/index.d.ts +3 -1
- package/dist/preview-api/index.js +234 -227
- package/dist/telemetry/index.cjs +506 -507
- package/dist/telemetry/index.js +974 -975
- package/package.json +1 -1
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 $i = Object.create;
|
|
8
8
|
var Xt = Object.defineProperty;
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
9
|
+
var Vi = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var Fi = Object.getOwnPropertyNames;
|
|
11
|
+
var Bi = Object.getPrototypeOf, Wi = Object.prototype.hasOwnProperty;
|
|
12
12
|
var i = (t, e) => Xt(t, "name", { value: e, configurable: !0 }), j = /* @__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]
|
|
@@ -18,13 +18,13 @@ var i = (t, e) => Xt(t, "name", { value: e, configurable: !0 }), j = /* @__PURE_
|
|
|
18
18
|
});
|
|
19
19
|
var ln = (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 qi = (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 Fi(e))
|
|
24
|
+
!Wi.call(t, s) && s !== r && Xt(t, s, { get: () => e[s], enumerable: !(n = Vi(e, s)) || n.enumerable });
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var J = (t, e, r) => (r = t != null ? $i(Bi(t)) : {}, qi(
|
|
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 z = (t, e, r) => (r = t != null ? Ui(Fi(t)) : {}, Wi(
|
|
|
34
34
|
));
|
|
35
35
|
|
|
36
36
|
// ../node_modules/picocolors/picocolors.js
|
|
37
|
-
var mn = I((
|
|
38
|
-
var
|
|
39
|
-
includes("--color") ||
|
|
37
|
+
var mn = I((Bl, Qt) => {
|
|
38
|
+
var it = process || {}, pn = it.argv || [], ot = it.env || {}, Gi = !(ot.NO_COLOR || pn.includes("--no-color")) && (!!ot.FORCE_COLOR || pn.
|
|
39
|
+
includes("--color") || it.platform === "win32" || (it.stdout || {}).isTTY && ot.TERM !== "dumb" || !!ot.CI), Ki = /* @__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 + zi(s, e, r, o) + e : t + s + e;
|
|
42
|
+
}, "formatter"), zi = /* @__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"), fn = /* @__PURE__ */ i((t =
|
|
49
|
-
let e = t ?
|
|
48
|
+
}, "replaceClose"), fn = /* @__PURE__ */ i((t = Gi) => {
|
|
49
|
+
let e = t ? Ki : () => String;
|
|
50
50
|
return {
|
|
51
51
|
isColorSupported: t,
|
|
52
52
|
reset: e("\x1B[0m", "\x1B[0m"),
|
|
@@ -97,11 +97,11 @@ var mn = I((Fl, Qt) => {
|
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
// ../node_modules/walk-up-path/dist/cjs/index.js
|
|
100
|
-
var kn = I((
|
|
100
|
+
var kn = I((dt) => {
|
|
101
101
|
"use strict";
|
|
102
|
-
Object.defineProperty(
|
|
103
|
-
|
|
104
|
-
var wn = j("path"),
|
|
102
|
+
Object.defineProperty(dt, "__esModule", { value: !0 });
|
|
103
|
+
dt.walkUp = void 0;
|
|
104
|
+
var wn = j("path"), Yi = /* @__PURE__ */ i(function* (t) {
|
|
105
105
|
for (t = (0, wn.resolve)(t); t; ) {
|
|
106
106
|
yield t;
|
|
107
107
|
let e = (0, wn.dirname)(t);
|
|
@@ -110,11 +110,11 @@ var kn = I((ct) => {
|
|
|
110
110
|
t = e;
|
|
111
111
|
}
|
|
112
112
|
}, "walkUp");
|
|
113
|
-
|
|
113
|
+
dt.walkUp = Yi;
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
// ../node_modules/zod/lib/helpers/util.js
|
|
117
|
-
var
|
|
117
|
+
var Le = I((E) => {
|
|
118
118
|
"use strict";
|
|
119
119
|
Object.defineProperty(E, "__esModule", { value: !0 });
|
|
120
120
|
E.getParsedType = E.ZodParsedType = E.objectUtil = E.util = void 0;
|
|
@@ -185,7 +185,7 @@ var Me = I((E) => {
|
|
|
185
185
|
"map",
|
|
186
186
|
"set"
|
|
187
187
|
]);
|
|
188
|
-
var
|
|
188
|
+
var ra = /* @__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 = ra;
|
|
213
213
|
});
|
|
214
214
|
|
|
215
215
|
// ../node_modules/zod/lib/ZodError.js
|
|
216
|
-
var
|
|
216
|
+
var lt = I((Y) => {
|
|
217
217
|
"use strict";
|
|
218
|
-
Object.defineProperty(
|
|
219
|
-
|
|
220
|
-
var En =
|
|
221
|
-
|
|
218
|
+
Object.defineProperty(Y, "__esModule", { value: !0 });
|
|
219
|
+
Y.ZodError = Y.quotelessJson = Y.ZodIssueCode = void 0;
|
|
220
|
+
var En = Le();
|
|
221
|
+
Y.ZodIssueCode = En.util.arrayToEnum([
|
|
222
222
|
"invalid_type",
|
|
223
223
|
"invalid_literal",
|
|
224
224
|
"custom",
|
|
@@ -236,9 +236,9 @@ var ut = I((J) => {
|
|
|
236
236
|
"not_multiple_of",
|
|
237
237
|
"not_finite"
|
|
238
238
|
]);
|
|
239
|
-
var
|
|
240
|
-
|
|
241
|
-
var
|
|
239
|
+
var na = /* @__PURE__ */ i((t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:"), "quotelessJson");
|
|
240
|
+
Y.quotelessJson = na;
|
|
241
|
+
var De = class t extends Error {
|
|
242
242
|
static {
|
|
243
243
|
i(this, "ZodError");
|
|
244
244
|
}
|
|
@@ -301,34 +301,34 @@ var ut = I((J) => {
|
|
|
301
301
|
return this.flatten();
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
Y.ZodError = De;
|
|
305
|
+
De.create = (t) => new De(t);
|
|
306
306
|
});
|
|
307
307
|
|
|
308
308
|
// ../node_modules/zod/lib/locales/en.js
|
|
309
309
|
var nr = I((rr) => {
|
|
310
310
|
"use strict";
|
|
311
311
|
Object.defineProperty(rr, "__esModule", { value: !0 });
|
|
312
|
-
var
|
|
312
|
+
var te = Le(), O = lt(), sa = /* @__PURE__ */ i((t, e) => {
|
|
313
313
|
let r;
|
|
314
314
|
switch (t.code) {
|
|
315
315
|
case O.ZodIssueCode.invalid_type:
|
|
316
|
-
t.received ===
|
|
316
|
+
t.received === te.ZodParsedType.undefined ? r = "Required" : r = `Expected ${t.expected}, received ${t.received}`;
|
|
317
317
|
break;
|
|
318
318
|
case O.ZodIssueCode.invalid_literal:
|
|
319
|
-
r = `Invalid literal value, expected ${JSON.stringify(t.expected,
|
|
319
|
+
r = `Invalid literal value, expected ${JSON.stringify(t.expected, te.util.jsonStringifyReplacer)}`;
|
|
320
320
|
break;
|
|
321
321
|
case O.ZodIssueCode.unrecognized_keys:
|
|
322
|
-
r = `Unrecognized key(s) in object: ${
|
|
322
|
+
r = `Unrecognized key(s) in object: ${te.util.joinValues(t.keys, ", ")}`;
|
|
323
323
|
break;
|
|
324
324
|
case O.ZodIssueCode.invalid_union:
|
|
325
325
|
r = "Invalid input";
|
|
326
326
|
break;
|
|
327
327
|
case O.ZodIssueCode.invalid_union_discriminator:
|
|
328
|
-
r = `Invalid discriminator value. Expected ${
|
|
328
|
+
r = `Invalid discriminator value. Expected ${te.util.joinValues(t.options)}`;
|
|
329
329
|
break;
|
|
330
330
|
case O.ZodIssueCode.invalid_enum_value:
|
|
331
|
-
r = `Invalid enum value. Expected ${
|
|
331
|
+
r = `Invalid enum value. Expected ${te.util.joinValues(t.options)}, received '${t.received}'`;
|
|
332
332
|
break;
|
|
333
333
|
case O.ZodIssueCode.invalid_arguments:
|
|
334
334
|
r = "Invalid function arguments";
|
|
@@ -343,7 +343,7 @@ var nr = I((rr) => {
|
|
|
343
343
|
typeof t.validation == "object" ? "includes" in t.validation ? (r = `Invalid input: must include "${t.validation.includes}"`, typeof t.
|
|
344
344
|
validation.position == "number" && (r = `${r} at one or more positions greater than or equal to ${t.validation.position}`)) : "start\
|
|
345
345
|
sWith" in t.validation ? r = `Invalid input: must start with "${t.validation.startsWith}"` : "endsWith" in t.validation ? r = `Invalid input\
|
|
346
|
-
: must end with "${t.validation.endsWith}"` :
|
|
346
|
+
: must end with "${t.validation.endsWith}"` : te.util.assertNever(t.validation) : t.validation !== "regex" ? r = `Invalid ${t.validation}` :
|
|
347
347
|
r = "Invalid";
|
|
348
348
|
break;
|
|
349
349
|
case O.ZodIssueCode.too_small:
|
|
@@ -374,46 +374,46 @@ ater than "}${new Date(Number(t.minimum))}` : r = "Invalid input";
|
|
|
374
374
|
r = "Number must be finite";
|
|
375
375
|
break;
|
|
376
376
|
default:
|
|
377
|
-
r = e.defaultError,
|
|
377
|
+
r = e.defaultError, te.util.assertNever(t);
|
|
378
378
|
}
|
|
379
379
|
return { message: r };
|
|
380
380
|
}, "errorMap");
|
|
381
|
-
rr.default =
|
|
381
|
+
rr.default = sa;
|
|
382
382
|
});
|
|
383
383
|
|
|
384
384
|
// ../node_modules/zod/lib/errors.js
|
|
385
|
-
var
|
|
385
|
+
var pt = I((V) => {
|
|
386
386
|
"use strict";
|
|
387
|
-
var
|
|
387
|
+
var oa = V && V.__importDefault || function(t) {
|
|
388
388
|
return t && t.__esModule ? t : { default: t };
|
|
389
389
|
};
|
|
390
390
|
Object.defineProperty(V, "__esModule", { value: !0 });
|
|
391
391
|
V.getErrorMap = V.setErrorMap = V.defaultErrorMap = void 0;
|
|
392
|
-
var Cn =
|
|
392
|
+
var Cn = oa(nr());
|
|
393
393
|
V.defaultErrorMap = Cn.default;
|
|
394
394
|
var Pn = Cn.default;
|
|
395
|
-
function
|
|
395
|
+
function ia(t) {
|
|
396
396
|
Pn = t;
|
|
397
397
|
}
|
|
398
|
-
i(
|
|
399
|
-
V.setErrorMap =
|
|
400
|
-
function
|
|
398
|
+
i(ia, "setErrorMap");
|
|
399
|
+
V.setErrorMap = ia;
|
|
400
|
+
function aa() {
|
|
401
401
|
return Pn;
|
|
402
402
|
}
|
|
403
|
-
i(
|
|
404
|
-
V.getErrorMap =
|
|
403
|
+
i(aa, "getErrorMap");
|
|
404
|
+
V.getErrorMap = aa;
|
|
405
405
|
});
|
|
406
406
|
|
|
407
407
|
// ../node_modules/zod/lib/helpers/parseUtil.js
|
|
408
408
|
var or = I((T) => {
|
|
409
409
|
"use strict";
|
|
410
|
-
var
|
|
410
|
+
var ca = 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 da = pt(), An = ca(nr()), ua = /* @__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 or = I((T) => {
|
|
|
433
433
|
message: c
|
|
434
434
|
};
|
|
435
435
|
}, "makeIssue");
|
|
436
|
-
T.makeIssue =
|
|
436
|
+
T.makeIssue = ua;
|
|
437
437
|
T.EMPTY_PATH = [];
|
|
438
|
-
function
|
|
439
|
-
let r = (0,
|
|
438
|
+
function la(t, e) {
|
|
439
|
+
let r = (0, da.getErrorMap)(), n = (0, T.makeIssue)({
|
|
440
440
|
issueData: e,
|
|
441
441
|
data: t.data,
|
|
442
442
|
path: t.path,
|
|
@@ -453,8 +453,8 @@ var or = I((T) => {
|
|
|
453
453
|
});
|
|
454
454
|
t.common.issues.push(n);
|
|
455
455
|
}
|
|
456
|
-
i(
|
|
457
|
-
T.addIssueToContext =
|
|
456
|
+
i(la, "addIssueToContext");
|
|
457
|
+
T.addIssueToContext = la;
|
|
458
458
|
var sr = class t {
|
|
459
459
|
static {
|
|
460
460
|
i(this, "ParseStatus");
|
|
@@ -504,18 +504,18 @@ var or = 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 pa = /* @__PURE__ */ i((t) => ({ status: "dirty", value: t }), "DIRTY");
|
|
508
|
+
T.DIRTY = pa;
|
|
509
|
+
var fa = /* @__PURE__ */ i((t) => ({ status: "valid", value: t }), "OK");
|
|
510
|
+
T.OK = fa;
|
|
511
|
+
var ma = /* @__PURE__ */ i((t) => t.status === "aborted", "isAborted");
|
|
512
|
+
T.isAborted = ma;
|
|
513
|
+
var ha = /* @__PURE__ */ i((t) => t.status === "dirty", "isDirty");
|
|
514
|
+
T.isDirty = ha;
|
|
515
|
+
var ya = /* @__PURE__ */ i((t) => t.status === "valid", "isValid");
|
|
516
|
+
T.isValid = ya;
|
|
517
|
+
var ga = /* @__PURE__ */ i((t) => typeof Promise < "u" && t instanceof Promise, "isAsync");
|
|
518
|
+
T.isAsync = ga;
|
|
519
519
|
});
|
|
520
520
|
|
|
521
521
|
// ../node_modules/zod/lib/helpers/typeAliases.js
|
|
@@ -525,20 +525,20 @@ var jn = I((On) => {
|
|
|
525
525
|
});
|
|
526
526
|
|
|
527
527
|
// ../node_modules/zod/lib/helpers/errorUtil.js
|
|
528
|
-
var Nn = I((
|
|
528
|
+
var Nn = I((ft) => {
|
|
529
529
|
"use strict";
|
|
530
|
-
Object.defineProperty(
|
|
531
|
-
|
|
530
|
+
Object.defineProperty(ft, "__esModule", { value: !0 });
|
|
531
|
+
ft.errorUtil = void 0;
|
|
532
532
|
var Rn;
|
|
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
|
-
})(Rn || (
|
|
535
|
+
})(Rn || (ft.errorUtil = Rn = {}));
|
|
536
536
|
});
|
|
537
537
|
|
|
538
538
|
// ../node_modules/zod/lib/types.js
|
|
539
539
|
var Kn = I((d) => {
|
|
540
540
|
"use strict";
|
|
541
|
-
var
|
|
541
|
+
var ht = 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");
|
|
@@ -549,7 +549,7 @@ ot declare it");
|
|
|
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\
|
|
550
550
|
t declare it");
|
|
551
551
|
return n === "a" ? s.call(t, r) : s ? s.value = r : e.set(t, r), r;
|
|
552
|
-
},
|
|
552
|
+
}, Ue, $e;
|
|
553
553
|
Object.defineProperty(d, "__esModule", { value: !0 });
|
|
554
554
|
d.boolean = d.bigint = d.array = d.any = d.coerce = d.ZodFirstPartyTypeKind = d.late = d.ZodSchema = d.Schema = d.custom = d.ZodReadonly =
|
|
555
555
|
d.ZodPipeline = d.ZodBranded = d.BRAND = d.ZodNaN = d.ZodCatch = d.ZodDefault = d.ZodNullable = d.ZodOptional = d.ZodTransformer = d.ZodEffects =
|
|
@@ -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
|
|
563
|
+
var mt = pt(), y = Nn(), u = or(), h = Le(), m = lt(), L = class {
|
|
564
564
|
static {
|
|
565
565
|
i(this, "ParseInputLazyPath");
|
|
566
566
|
}
|
|
@@ -769,16 +769,16 @@ eProperties");
|
|
|
769
769
|
return this.nullable().optional();
|
|
770
770
|
}
|
|
771
771
|
array() {
|
|
772
|
-
return
|
|
772
|
+
return z.create(this);
|
|
773
773
|
}
|
|
774
774
|
promise() {
|
|
775
|
-
return
|
|
775
|
+
return Q.create(this, this._def);
|
|
776
776
|
}
|
|
777
777
|
or(e) {
|
|
778
|
-
return
|
|
778
|
+
return ce.create([this, e], this._def);
|
|
779
779
|
}
|
|
780
780
|
and(e) {
|
|
781
|
-
return
|
|
781
|
+
return de.create(this, e, this._def);
|
|
782
782
|
}
|
|
783
783
|
transform(e) {
|
|
784
784
|
return new Z({
|
|
@@ -790,7 +790,7 @@ eProperties");
|
|
|
790
790
|
}
|
|
791
791
|
default(e) {
|
|
792
792
|
let r = typeof e == "function" ? e : () => e;
|
|
793
|
-
return new
|
|
793
|
+
return new me({
|
|
794
794
|
...b(this._def),
|
|
795
795
|
innerType: this,
|
|
796
796
|
defaultValue: r,
|
|
@@ -798,7 +798,7 @@ eProperties");
|
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
800
|
brand() {
|
|
801
|
-
return new
|
|
801
|
+
return new Ve({
|
|
802
802
|
typeName: g.ZodBranded,
|
|
803
803
|
type: this,
|
|
804
804
|
...b(this._def)
|
|
@@ -806,7 +806,7 @@ eProperties");
|
|
|
806
806
|
}
|
|
807
807
|
catch(e) {
|
|
808
808
|
let r = typeof e == "function" ? e : () => e;
|
|
809
|
-
return new
|
|
809
|
+
return new he({
|
|
810
810
|
...b(this._def),
|
|
811
811
|
innerType: this,
|
|
812
812
|
catchValue: r,
|
|
@@ -821,10 +821,10 @@ eProperties");
|
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
823
|
pipe(e) {
|
|
824
|
-
return
|
|
824
|
+
return Fe.create(this, e);
|
|
825
825
|
}
|
|
826
826
|
readonly() {
|
|
827
|
-
return
|
|
827
|
+
return ye.create(this);
|
|
828
828
|
}
|
|
829
829
|
isOptional() {
|
|
830
830
|
return this.safeParse(void 0).success;
|
|
@@ -836,36 +836,36 @@ eProperties");
|
|
|
836
836
|
d.ZodType = v;
|
|
837
837
|
d.Schema = v;
|
|
838
838
|
d.ZodSchema = v;
|
|
839
|
-
var
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
onent})+$", ir,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
839
|
+
var xa = /^c[^\s-]{8,}$/i, ba = /^[0-9a-z]+$/, va = /^[0-9A-HJKMNP-TV-Z]{26}$/i, _a = /^[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
|
+
wa = /^[a-z0-9_-]{21}$/i, ka = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ta = /^[-+]?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
|
+
Ia = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Sa = "^(\\p{Extended_Pictographic}|\\p{Emoji_Comp\
|
|
842
|
+
onent})+$", ir, Ea = /^(?:(?: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])$/, Ca = /^(?:(?: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
|
+
Pa = /^(([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
|
+
Aa = /^(([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
|
+
Oa = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ja = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
846
846
|
Dn = "((\\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])))",
|
|
847
|
+
]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ra = new RegExp(`^${Dn}$`);
|
|
848
848
|
function Un(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
852
|
i(Un, "timeRegexSource");
|
|
853
|
-
function
|
|
853
|
+
function Na(t) {
|
|
854
854
|
return new RegExp(`^${Un(t)}$`);
|
|
855
855
|
}
|
|
856
|
-
i(
|
|
856
|
+
i(Na, "timeRegex");
|
|
857
857
|
function $n(t) {
|
|
858
858
|
let e = `${Dn}T${Un(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
861
|
i($n, "datetimeRegex");
|
|
862
862
|
d.datetimeRegex = $n;
|
|
863
|
-
function Na(t, e) {
|
|
864
|
-
return !!((e === "v4" || !e) && Sa.test(t) || (e === "v6" || !e) && Ca.test(t));
|
|
865
|
-
}
|
|
866
|
-
i(Na, "isValidIP");
|
|
867
863
|
function Za(t, e) {
|
|
868
|
-
|
|
864
|
+
return !!((e === "v4" || !e) && Ea.test(t) || (e === "v6" || !e) && Pa.test(t));
|
|
865
|
+
}
|
|
866
|
+
i(Za, "isValidIP");
|
|
867
|
+
function Ma(t, e) {
|
|
868
|
+
if (!ka.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})+$", ir, Sa = /^(?:(?: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(Ma, "isValidJWT");
|
|
879
|
+
function La(t, e) {
|
|
880
|
+
return !!((e === "v4" || !e) && Ca.test(t) || (e === "v6" || !e) && Aa.test(t));
|
|
881
881
|
}
|
|
882
|
-
i(
|
|
883
|
-
var
|
|
882
|
+
i(La, "isValidCidr");
|
|
883
|
+
var H = class t extends v {
|
|
884
884
|
static {
|
|
885
885
|
i(this, "ZodString");
|
|
886
886
|
}
|
|
@@ -931,43 +931,43 @@ onent})+$", ir, Sa = /^(?:(?: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
|
+
Ia.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
|
-
ir || (ir = new RegExp(
|
|
940
|
+
ir || (ir = new RegExp(Sa, "u")), ir.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
|
+
_a.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
|
+
wa.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
|
+
xa.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
|
+
ba.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
|
+
va.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
|
|
@@ -1005,35 +1005,35 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
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" ? Ra.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" ? Na(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" ? Ta.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" ? Za(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" ? Ma(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" ? La(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" ? Oa.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" ? ja.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})+$", ir, Sa = /^(?:(?: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 = H;
|
|
1267
|
+
H.create = (t) => {
|
|
1268
1268
|
var e;
|
|
1269
|
-
return new
|
|
1269
|
+
return new H({
|
|
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 Da(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
|
|
1281
|
+
i(Da, "floatSafeRemainder");
|
|
1282
|
+
var re = class t extends v {
|
|
1283
1283
|
static {
|
|
1284
1284
|
i(this, "ZodNumber");
|
|
1285
1285
|
}
|
|
@@ -1318,7 +1318,7 @@ onent})+$", ir, Sa = /^(?:(?: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" ? Da(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,
|
|
@@ -1450,14 +1450,14 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1450
1450
|
return Number.isFinite(r) && Number.isFinite(e);
|
|
1451
1451
|
}
|
|
1452
1452
|
};
|
|
1453
|
-
d.ZodNumber =
|
|
1454
|
-
|
|
1453
|
+
d.ZodNumber = re;
|
|
1454
|
+
re.create = (t) => new re({
|
|
1455
1455
|
checks: [],
|
|
1456
1456
|
typeName: g.ZodNumber,
|
|
1457
1457
|
coerce: t?.coerce || !1,
|
|
1458
1458
|
...b(t)
|
|
1459
1459
|
});
|
|
1460
|
-
var
|
|
1460
|
+
var ne = class t extends v {
|
|
1461
1461
|
static {
|
|
1462
1462
|
i(this, "ZodBigInt");
|
|
1463
1463
|
}
|
|
@@ -1589,17 +1589,17 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1589
1589
|
return e;
|
|
1590
1590
|
}
|
|
1591
1591
|
};
|
|
1592
|
-
d.ZodBigInt =
|
|
1593
|
-
|
|
1592
|
+
d.ZodBigInt = ne;
|
|
1593
|
+
ne.create = (t) => {
|
|
1594
1594
|
var e;
|
|
1595
|
-
return new
|
|
1595
|
+
return new ne({
|
|
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
|
|
1602
|
+
var se = class extends v {
|
|
1603
1603
|
static {
|
|
1604
1604
|
i(this, "ZodBoolean");
|
|
1605
1605
|
}
|
|
@@ -1615,13 +1615,13 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1615
1615
|
return (0, u.OK)(e.data);
|
|
1616
1616
|
}
|
|
1617
1617
|
};
|
|
1618
|
-
d.ZodBoolean =
|
|
1619
|
-
|
|
1618
|
+
d.ZodBoolean = se;
|
|
1619
|
+
se.create = (t) => new se({
|
|
1620
1620
|
typeName: g.ZodBoolean,
|
|
1621
1621
|
coerce: t?.coerce || !1,
|
|
1622
1622
|
...b(t)
|
|
1623
1623
|
});
|
|
1624
|
-
var
|
|
1624
|
+
var oe = class t extends v {
|
|
1625
1625
|
static {
|
|
1626
1626
|
i(this, "ZodDate");
|
|
1627
1627
|
}
|
|
@@ -1695,14 +1695,14 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1695
1695
|
return e != null ? new Date(e) : null;
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
|
-
d.ZodDate =
|
|
1699
|
-
|
|
1698
|
+
d.ZodDate = oe;
|
|
1699
|
+
oe.create = (t) => new oe({
|
|
1700
1700
|
checks: [],
|
|
1701
1701
|
coerce: t?.coerce || !1,
|
|
1702
1702
|
typeName: g.ZodDate,
|
|
1703
1703
|
...b(t)
|
|
1704
1704
|
});
|
|
1705
|
-
var
|
|
1705
|
+
var we = class extends v {
|
|
1706
1706
|
static {
|
|
1707
1707
|
i(this, "ZodSymbol");
|
|
1708
1708
|
}
|
|
@@ -1718,12 +1718,12 @@ onent})+$", ir, Sa = /^(?:(?: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 = we;
|
|
1722
|
+
we.create = (t) => new we({
|
|
1723
1723
|
typeName: g.ZodSymbol,
|
|
1724
1724
|
...b(t)
|
|
1725
1725
|
});
|
|
1726
|
-
var
|
|
1726
|
+
var ie = class extends v {
|
|
1727
1727
|
static {
|
|
1728
1728
|
i(this, "ZodUndefined");
|
|
1729
1729
|
}
|
|
@@ -1739,12 +1739,12 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1739
1739
|
return (0, u.OK)(e.data);
|
|
1740
1740
|
}
|
|
1741
1741
|
};
|
|
1742
|
-
d.ZodUndefined =
|
|
1743
|
-
|
|
1742
|
+
d.ZodUndefined = ie;
|
|
1743
|
+
ie.create = (t) => new ie({
|
|
1744
1744
|
typeName: g.ZodUndefined,
|
|
1745
1745
|
...b(t)
|
|
1746
1746
|
});
|
|
1747
|
-
var
|
|
1747
|
+
var ae = class extends v {
|
|
1748
1748
|
static {
|
|
1749
1749
|
i(this, "ZodNull");
|
|
1750
1750
|
}
|
|
@@ -1760,12 +1760,12 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1760
1760
|
return (0, u.OK)(e.data);
|
|
1761
1761
|
}
|
|
1762
1762
|
};
|
|
1763
|
-
d.ZodNull =
|
|
1764
|
-
|
|
1763
|
+
d.ZodNull = ae;
|
|
1764
|
+
ae.create = (t) => new ae({
|
|
1765
1765
|
typeName: g.ZodNull,
|
|
1766
1766
|
...b(t)
|
|
1767
1767
|
});
|
|
1768
|
-
var
|
|
1768
|
+
var X = class extends v {
|
|
1769
1769
|
static {
|
|
1770
1770
|
i(this, "ZodAny");
|
|
1771
1771
|
}
|
|
@@ -1776,12 +1776,12 @@ onent})+$", ir, Sa = /^(?:(?: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 = X;
|
|
1780
|
+
X.create = (t) => new X({
|
|
1781
1781
|
typeName: g.ZodAny,
|
|
1782
1782
|
...b(t)
|
|
1783
1783
|
});
|
|
1784
|
-
var
|
|
1784
|
+
var K = class extends v {
|
|
1785
1785
|
static {
|
|
1786
1786
|
i(this, "ZodUnknown");
|
|
1787
1787
|
}
|
|
@@ -1792,8 +1792,8 @@ onent})+$", ir, Sa = /^(?:(?: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 = K;
|
|
1796
|
+
K.create = (t) => new K({
|
|
1797
1797
|
typeName: g.ZodUnknown,
|
|
1798
1798
|
...b(t)
|
|
1799
1799
|
});
|
|
@@ -1815,7 +1815,7 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1815
1815
|
typeName: g.ZodNever,
|
|
1816
1816
|
...b(t)
|
|
1817
1817
|
});
|
|
1818
|
-
var
|
|
1818
|
+
var ke = class extends v {
|
|
1819
1819
|
static {
|
|
1820
1820
|
i(this, "ZodVoid");
|
|
1821
1821
|
}
|
|
@@ -1831,12 +1831,12 @@ onent})+$", ir, Sa = /^(?:(?: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 = ke;
|
|
1835
|
+
ke.create = (t) => new ke({
|
|
1836
1836
|
typeName: g.ZodVoid,
|
|
1837
1837
|
...b(t)
|
|
1838
1838
|
});
|
|
1839
|
-
var
|
|
1839
|
+
var z = class t extends v {
|
|
1840
1840
|
static {
|
|
1841
1841
|
i(this, "ZodArray");
|
|
1842
1842
|
}
|
|
@@ -1904,8 +1904,8 @@ onent})+$", ir, Sa = /^(?:(?: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 = z;
|
|
1908
|
+
z.create = (t, e) => new z({
|
|
1909
1909
|
type: t,
|
|
1910
1910
|
minLength: null,
|
|
1911
1911
|
maxLength: null,
|
|
@@ -1913,24 +1913,24 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1913
1913
|
typeName: g.ZodArray,
|
|
1914
1914
|
...b(e)
|
|
1915
1915
|
});
|
|
1916
|
-
function
|
|
1916
|
+
function _e(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(_e(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 z ? new z({
|
|
1928
1928
|
...t._def,
|
|
1929
|
-
type:
|
|
1930
|
-
}) : t instanceof M ? M.create(
|
|
1929
|
+
type: _e(t.element)
|
|
1930
|
+
}) : t instanceof M ? M.create(_e(t.unwrap())) : t instanceof B ? B.create(_e(t.unwrap())) : t instanceof F ? F.create(t.items.map((e) => _e(
|
|
1931
1931
|
e))) : t;
|
|
1932
1932
|
}
|
|
1933
|
-
i(
|
|
1933
|
+
i(_e, "deepPartialify");
|
|
1934
1934
|
var R = class t extends v {
|
|
1935
1935
|
static {
|
|
1936
1936
|
i(this, "ZodObject");
|
|
@@ -2170,7 +2170,7 @@ onent})+$", ir, Sa = /^(?:(?: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 _e(this);
|
|
2174
2174
|
}
|
|
2175
2175
|
partial(e) {
|
|
2176
2176
|
let r = {};
|
|
@@ -2224,7 +2224,7 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2224
2224
|
typeName: g.ZodObject,
|
|
2225
2225
|
...b(e)
|
|
2226
2226
|
});
|
|
2227
|
-
var
|
|
2227
|
+
var ce = class extends v {
|
|
2228
2228
|
static {
|
|
2229
2229
|
i(this, "ZodUnion");
|
|
2230
2230
|
}
|
|
@@ -2294,16 +2294,16 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2294
2294
|
return this._def.options;
|
|
2295
2295
|
}
|
|
2296
2296
|
};
|
|
2297
|
-
d.ZodUnion =
|
|
2298
|
-
|
|
2297
|
+
d.ZodUnion = ce;
|
|
2298
|
+
ce.create = (t, e) => new ce({
|
|
2299
2299
|
options: t,
|
|
2300
2300
|
typeName: g.ZodUnion,
|
|
2301
2301
|
...b(e)
|
|
2302
2302
|
});
|
|
2303
|
-
var
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2303
|
+
var G = /* @__PURE__ */ i((t) => t instanceof ue ? G(t.schema) : t instanceof Z ? G(t.innerType()) : t instanceof le ? [t.value] : t instanceof
|
|
2304
|
+
pe ? t.options : t instanceof fe ? h.util.objectValues(t.enum) : t instanceof me ? G(t._def.innerType) : t instanceof ie ? [void 0] : t instanceof
|
|
2305
|
+
ae ? [null] : t instanceof M ? [void 0, ...G(t.unwrap())] : t instanceof B ? [null, ...G(t.unwrap())] : t instanceof Ve || t instanceof ye ?
|
|
2306
|
+
G(t.unwrap()) : t instanceof he ? G(t._def.innerType) : [], "getDiscriminator"), yt = class t extends v {
|
|
2307
2307
|
static {
|
|
2308
2308
|
i(this, "ZodDiscriminatedUnion");
|
|
2309
2309
|
}
|
|
@@ -2350,7 +2350,7 @@ onent})+$", ir, Sa = /^(?:(?: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 = G(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) {
|
|
@@ -2368,7 +2368,7 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2368
2368
|
});
|
|
2369
2369
|
}
|
|
2370
2370
|
};
|
|
2371
|
-
d.ZodDiscriminatedUnion =
|
|
2371
|
+
d.ZodDiscriminatedUnion = yt;
|
|
2372
2372
|
function ar(t, e) {
|
|
2373
2373
|
let r = (0, h.getParsedType)(t), n = (0, h.getParsedType)(e);
|
|
2374
2374
|
if (t === e)
|
|
@@ -2396,7 +2396,7 @@ onent})+$", ir, Sa = /^(?:(?: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(ar, "mergeValues");
|
|
2399
|
-
var
|
|
2399
|
+
var de = class extends v {
|
|
2400
2400
|
static {
|
|
2401
2401
|
i(this, "ZodIntersection");
|
|
2402
2402
|
}
|
|
@@ -2432,8 +2432,8 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2432
2432
|
}));
|
|
2433
2433
|
}
|
|
2434
2434
|
};
|
|
2435
|
-
d.ZodIntersection =
|
|
2436
|
-
|
|
2435
|
+
d.ZodIntersection = de;
|
|
2436
|
+
de.create = (t, e, r) => new de({
|
|
2437
2437
|
left: t,
|
|
2438
2438
|
right: e,
|
|
2439
2439
|
typeName: g.ZodIntersection,
|
|
@@ -2493,7 +2493,7 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2493
2493
|
...b(e)
|
|
2494
2494
|
});
|
|
2495
2495
|
};
|
|
2496
|
-
var
|
|
2496
|
+
var gt = class t extends v {
|
|
2497
2497
|
static {
|
|
2498
2498
|
i(this, "ZodRecord");
|
|
2499
2499
|
}
|
|
@@ -2530,15 +2530,15 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2530
2530
|
typeName: g.ZodRecord,
|
|
2531
2531
|
...b(n)
|
|
2532
2532
|
}) : new t({
|
|
2533
|
-
keyType:
|
|
2533
|
+
keyType: H.create(),
|
|
2534
2534
|
valueType: e,
|
|
2535
2535
|
typeName: g.ZodRecord,
|
|
2536
2536
|
...b(r)
|
|
2537
2537
|
});
|
|
2538
2538
|
}
|
|
2539
2539
|
};
|
|
2540
|
-
d.ZodRecord =
|
|
2541
|
-
var
|
|
2540
|
+
d.ZodRecord = gt;
|
|
2541
|
+
var Te = class extends v {
|
|
2542
2542
|
static {
|
|
2543
2543
|
i(this, "ZodMap");
|
|
2544
2544
|
}
|
|
@@ -2583,14 +2583,14 @@ onent})+$", ir, Sa = /^(?:(?: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 = Te;
|
|
2587
|
+
Te.create = (t, e, r) => new Te({
|
|
2588
2588
|
valueType: e,
|
|
2589
2589
|
keyType: t,
|
|
2590
2590
|
typeName: g.ZodMap,
|
|
2591
2591
|
...b(r)
|
|
2592
2592
|
});
|
|
2593
|
-
var
|
|
2593
|
+
var Ie = class t extends v {
|
|
2594
2594
|
static {
|
|
2595
2595
|
i(this, "ZodSet");
|
|
2596
2596
|
}
|
|
@@ -2651,15 +2651,15 @@ onent})+$", ir, Sa = /^(?:(?: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 = Ie;
|
|
2655
|
+
Ie.create = (t, e) => new Ie({
|
|
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
|
|
2662
|
+
var xt = class t extends v {
|
|
2663
2663
|
static {
|
|
2664
2664
|
i(this, "ZodFunction");
|
|
2665
2665
|
}
|
|
@@ -2681,8 +2681,8 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2681
2681
|
errorMaps: [
|
|
2682
2682
|
r.common.contextualErrorMap,
|
|
2683
2683
|
r.schemaErrorMap,
|
|
2684
|
-
(0,
|
|
2685
|
-
|
|
2684
|
+
(0, mt.getErrorMap)(),
|
|
2685
|
+
mt.defaultErrorMap
|
|
2686
2686
|
].filter((l) => !!l),
|
|
2687
2687
|
issueData: {
|
|
2688
2688
|
code: m.ZodIssueCode.invalid_arguments,
|
|
@@ -2698,8 +2698,8 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2698
2698
|
errorMaps: [
|
|
2699
2699
|
r.common.contextualErrorMap,
|
|
2700
2700
|
r.schemaErrorMap,
|
|
2701
|
-
(0,
|
|
2702
|
-
|
|
2701
|
+
(0, mt.getErrorMap)(),
|
|
2702
|
+
mt.defaultErrorMap
|
|
2703
2703
|
].filter((l) => !!l),
|
|
2704
2704
|
issueData: {
|
|
2705
2705
|
code: m.ZodIssueCode.invalid_return_type,
|
|
@@ -2709,7 +2709,7 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2709
2709
|
}
|
|
2710
2710
|
i(s, "makeReturnsIssue");
|
|
2711
2711
|
let o = { errorMap: r.common.contextualErrorMap }, a = r.data;
|
|
2712
|
-
if (this._def.returns instanceof
|
|
2712
|
+
if (this._def.returns instanceof Q) {
|
|
2713
2713
|
let c = this;
|
|
2714
2714
|
return (0, u.OK)(async function(...p) {
|
|
2715
2715
|
let l = new m.ZodError([]), f = await c._def.args.parseAsync(p, o).catch((_) => {
|
|
@@ -2741,7 +2741,7 @@ onent})+$", ir, Sa = /^(?:(?: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: F.create(e).rest(
|
|
2744
|
+
args: F.create(e).rest(K.create())
|
|
2745
2745
|
});
|
|
2746
2746
|
}
|
|
2747
2747
|
returns(e) {
|
|
@@ -2758,15 +2758,15 @@ onent})+$", ir, Sa = /^(?:(?: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 || F.create([]).rest(
|
|
2762
|
-
returns: r ||
|
|
2761
|
+
args: e || F.create([]).rest(K.create()),
|
|
2762
|
+
returns: r || K.create(),
|
|
2763
2763
|
typeName: g.ZodFunction,
|
|
2764
2764
|
...b(n)
|
|
2765
2765
|
});
|
|
2766
2766
|
}
|
|
2767
2767
|
};
|
|
2768
|
-
d.ZodFunction =
|
|
2769
|
-
var
|
|
2768
|
+
d.ZodFunction = xt;
|
|
2769
|
+
var ue = class extends v {
|
|
2770
2770
|
static {
|
|
2771
2771
|
i(this, "ZodLazy");
|
|
2772
2772
|
}
|
|
@@ -2778,13 +2778,13 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2778
2778
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
2779
2779
|
}
|
|
2780
2780
|
};
|
|
2781
|
-
d.ZodLazy =
|
|
2782
|
-
|
|
2781
|
+
d.ZodLazy = ue;
|
|
2782
|
+
ue.create = (t, e) => new ue({
|
|
2783
2783
|
getter: t,
|
|
2784
2784
|
typeName: g.ZodLazy,
|
|
2785
2785
|
...b(e)
|
|
2786
2786
|
});
|
|
2787
|
-
var
|
|
2787
|
+
var le = class extends v {
|
|
2788
2788
|
static {
|
|
2789
2789
|
i(this, "ZodLiteral");
|
|
2790
2790
|
}
|
|
@@ -2803,26 +2803,26 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2803
2803
|
return this._def.value;
|
|
2804
2804
|
}
|
|
2805
2805
|
};
|
|
2806
|
-
d.ZodLiteral =
|
|
2807
|
-
|
|
2806
|
+
d.ZodLiteral = le;
|
|
2807
|
+
le.create = (t, e) => new le({
|
|
2808
2808
|
value: t,
|
|
2809
2809
|
typeName: g.ZodLiteral,
|
|
2810
2810
|
...b(e)
|
|
2811
2811
|
});
|
|
2812
2812
|
function Vn(t, e) {
|
|
2813
|
-
return new
|
|
2813
|
+
return new pe({
|
|
2814
2814
|
values: t,
|
|
2815
2815
|
typeName: g.ZodEnum,
|
|
2816
2816
|
...b(e)
|
|
2817
2817
|
});
|
|
2818
2818
|
}
|
|
2819
2819
|
i(Vn, "createZodEnum");
|
|
2820
|
-
var
|
|
2820
|
+
var pe = class t extends v {
|
|
2821
2821
|
static {
|
|
2822
2822
|
i(this, "ZodEnum");
|
|
2823
2823
|
}
|
|
2824
2824
|
constructor() {
|
|
2825
|
-
super(...arguments),
|
|
2825
|
+
super(...arguments), Ue.set(this, void 0);
|
|
2826
2826
|
}
|
|
2827
2827
|
_parse(e) {
|
|
2828
2828
|
if (typeof e.data != "string") {
|
|
@@ -2833,7 +2833,7 @@ onent})+$", ir, Sa = /^(?:(?: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 (
|
|
2836
|
+
if (ht(this, Ue, "f") || Ln(this, Ue, new Set(this._def.values), "f"), !ht(this, Ue, "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,
|
|
@@ -2877,15 +2877,15 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2877
2877
|
});
|
|
2878
2878
|
}
|
|
2879
2879
|
};
|
|
2880
|
-
d.ZodEnum =
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
var
|
|
2880
|
+
d.ZodEnum = pe;
|
|
2881
|
+
Ue = /* @__PURE__ */ new WeakMap();
|
|
2882
|
+
pe.create = Vn;
|
|
2883
|
+
var fe = class extends v {
|
|
2884
2884
|
static {
|
|
2885
2885
|
i(this, "ZodNativeEnum");
|
|
2886
2886
|
}
|
|
2887
2887
|
constructor() {
|
|
2888
|
-
super(...arguments),
|
|
2888
|
+
super(...arguments), $e.set(this, void 0);
|
|
2889
2889
|
}
|
|
2890
2890
|
_parse(e) {
|
|
2891
2891
|
let r = h.util.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -2897,7 +2897,7 @@ onent})+$", ir, Sa = /^(?:(?: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 (
|
|
2900
|
+
if (ht(this, $e, "f") || Ln(this, $e, new Set(h.util.getValidEnumValues(this._def.values)), "f"), !ht(this, $e, "f").has(e.data)) {
|
|
2901
2901
|
let s = h.util.objectValues(r);
|
|
2902
2902
|
return (0, u.addIssueToContext)(n, {
|
|
2903
2903
|
received: n.data,
|
|
@@ -2911,14 +2911,14 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2911
2911
|
return this._def.values;
|
|
2912
2912
|
}
|
|
2913
2913
|
};
|
|
2914
|
-
d.ZodNativeEnum =
|
|
2915
|
-
|
|
2916
|
-
|
|
2914
|
+
d.ZodNativeEnum = fe;
|
|
2915
|
+
$e = /* @__PURE__ */ new WeakMap();
|
|
2916
|
+
fe.create = (t, e) => new fe({
|
|
2917
2917
|
values: t,
|
|
2918
2918
|
typeName: g.ZodNativeEnum,
|
|
2919
2919
|
...b(e)
|
|
2920
2920
|
});
|
|
2921
|
-
var
|
|
2921
|
+
var Q = class extends v {
|
|
2922
2922
|
static {
|
|
2923
2923
|
i(this, "ZodPromise");
|
|
2924
2924
|
}
|
|
@@ -2940,8 +2940,8 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2940
2940
|
})));
|
|
2941
2941
|
}
|
|
2942
2942
|
};
|
|
2943
|
-
d.ZodPromise =
|
|
2944
|
-
|
|
2943
|
+
d.ZodPromise = Q;
|
|
2944
|
+
Q.create = (t, e) => new Q({
|
|
2945
2945
|
type: t,
|
|
2946
2946
|
typeName: g.ZodPromise,
|
|
2947
2947
|
...b(e)
|
|
@@ -3076,7 +3076,7 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3076
3076
|
typeName: g.ZodNullable,
|
|
3077
3077
|
...b(e)
|
|
3078
3078
|
});
|
|
3079
|
-
var
|
|
3079
|
+
var me = class extends v {
|
|
3080
3080
|
static {
|
|
3081
3081
|
i(this, "ZodDefault");
|
|
3082
3082
|
}
|
|
@@ -3092,14 +3092,14 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3092
3092
|
return this._def.innerType;
|
|
3093
3093
|
}
|
|
3094
3094
|
};
|
|
3095
|
-
d.ZodDefault =
|
|
3096
|
-
|
|
3095
|
+
d.ZodDefault = me;
|
|
3096
|
+
me.create = (t, e) => new me({
|
|
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
|
|
3102
|
+
var he = class extends v {
|
|
3103
3103
|
static {
|
|
3104
3104
|
i(this, "ZodCatch");
|
|
3105
3105
|
}
|
|
@@ -3139,14 +3139,14 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3139
3139
|
return this._def.innerType;
|
|
3140
3140
|
}
|
|
3141
3141
|
};
|
|
3142
|
-
d.ZodCatch =
|
|
3143
|
-
|
|
3142
|
+
d.ZodCatch = he;
|
|
3143
|
+
he.create = (t, e) => new he({
|
|
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 Se = class extends v {
|
|
3150
3150
|
static {
|
|
3151
3151
|
i(this, "ZodNaN");
|
|
3152
3152
|
}
|
|
@@ -3162,13 +3162,13 @@ onent})+$", ir, Sa = /^(?:(?: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 = Se;
|
|
3166
|
+
Se.create = (t) => new Se({
|
|
3167
3167
|
typeName: g.ZodNaN,
|
|
3168
3168
|
...b(t)
|
|
3169
3169
|
});
|
|
3170
3170
|
d.BRAND = Symbol("zod_brand");
|
|
3171
|
-
var
|
|
3171
|
+
var Ve = class extends v {
|
|
3172
3172
|
static {
|
|
3173
3173
|
i(this, "ZodBranded");
|
|
3174
3174
|
}
|
|
@@ -3184,8 +3184,8 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3184
3184
|
return this._def.type;
|
|
3185
3185
|
}
|
|
3186
3186
|
};
|
|
3187
|
-
d.ZodBranded =
|
|
3188
|
-
var
|
|
3187
|
+
d.ZodBranded = Ve;
|
|
3188
|
+
var Fe = class t extends v {
|
|
3189
3189
|
static {
|
|
3190
3190
|
i(this, "ZodPipeline");
|
|
3191
3191
|
}
|
|
@@ -3229,8 +3229,8 @@ onent})+$", ir, Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3229
3229
|
});
|
|
3230
3230
|
}
|
|
3231
3231
|
};
|
|
3232
|
-
d.ZodPipeline =
|
|
3233
|
-
var
|
|
3232
|
+
d.ZodPipeline = Fe;
|
|
3233
|
+
var ye = class extends v {
|
|
3234
3234
|
static {
|
|
3235
3235
|
i(this, "ZodReadonly");
|
|
3236
3236
|
}
|
|
@@ -3243,8 +3243,8 @@ eze");
|
|
|
3243
3243
|
return this._def.innerType;
|
|
3244
3244
|
}
|
|
3245
3245
|
};
|
|
3246
|
-
d.ZodReadonly =
|
|
3247
|
-
|
|
3246
|
+
d.ZodReadonly = ye;
|
|
3247
|
+
ye.create = (t, e) => new ye({
|
|
3248
3248
|
innerType: t,
|
|
3249
3249
|
typeName: g.ZodReadonly,
|
|
3250
3250
|
...b(e)
|
|
@@ -3255,7 +3255,7 @@ eze");
|
|
|
3255
3255
|
}
|
|
3256
3256
|
i(Mn, "cleanParams");
|
|
3257
3257
|
function Fn(t, e = {}, r) {
|
|
3258
|
-
return t ?
|
|
3258
|
+
return t ? X.create().superRefine((n, s) => {
|
|
3259
3259
|
var o, a;
|
|
3260
3260
|
let c = t(n);
|
|
3261
3261
|
if (c instanceof Promise)
|
|
@@ -3270,7 +3270,7 @@ eze");
|
|
|
3270
3270
|
let p = Mn(e, n), l = (a = (o = p.fatal) !== null && o !== void 0 ? o : r) !== null && a !== void 0 ? a : !0;
|
|
3271
3271
|
s.addIssue({ code: "custom", ...p, fatal: l });
|
|
3272
3272
|
}
|
|
3273
|
-
}) :
|
|
3273
|
+
}) : X.create();
|
|
3274
3274
|
}
|
|
3275
3275
|
i(Fn, "custom");
|
|
3276
3276
|
d.custom = Fn;
|
|
@@ -3288,94 +3288,94 @@ 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 Ua = /* @__PURE__ */ i((t, e = {
|
|
3292
3292
|
message: `Input not instance of ${t.name}`
|
|
3293
3293
|
}) => Fn((r) => r instanceof t, e), "instanceOfType");
|
|
3294
|
-
d.instanceof =
|
|
3295
|
-
var Bn =
|
|
3294
|
+
d.instanceof = Ua;
|
|
3295
|
+
var Bn = H.create;
|
|
3296
3296
|
d.string = Bn;
|
|
3297
|
-
var Wn =
|
|
3297
|
+
var Wn = re.create;
|
|
3298
3298
|
d.number = Wn;
|
|
3299
|
-
var
|
|
3300
|
-
d.nan =
|
|
3301
|
-
var
|
|
3302
|
-
d.bigint =
|
|
3303
|
-
var qn =
|
|
3299
|
+
var $a = Se.create;
|
|
3300
|
+
d.nan = $a;
|
|
3301
|
+
var Va = ne.create;
|
|
3302
|
+
d.bigint = Va;
|
|
3303
|
+
var qn = se.create;
|
|
3304
3304
|
d.boolean = qn;
|
|
3305
|
-
var
|
|
3306
|
-
d.date =
|
|
3307
|
-
var
|
|
3308
|
-
d.symbol =
|
|
3309
|
-
var Ba = oe.create;
|
|
3310
|
-
d.undefined = Ba;
|
|
3305
|
+
var Fa = oe.create;
|
|
3306
|
+
d.date = Fa;
|
|
3307
|
+
var Ba = we.create;
|
|
3308
|
+
d.symbol = Ba;
|
|
3311
3309
|
var Wa = ie.create;
|
|
3312
|
-
d.
|
|
3313
|
-
var qa =
|
|
3314
|
-
d.
|
|
3315
|
-
var Ga =
|
|
3316
|
-
d.
|
|
3317
|
-
var Ka =
|
|
3318
|
-
d.
|
|
3319
|
-
var za =
|
|
3320
|
-
d.
|
|
3321
|
-
var Ja =
|
|
3322
|
-
d.
|
|
3323
|
-
var Ya =
|
|
3324
|
-
d.
|
|
3325
|
-
var Ha = R.
|
|
3326
|
-
d.
|
|
3327
|
-
var Xa =
|
|
3328
|
-
d.
|
|
3329
|
-
var Qa =
|
|
3330
|
-
d.
|
|
3331
|
-
var ec =
|
|
3332
|
-
d.
|
|
3333
|
-
var tc =
|
|
3334
|
-
d.
|
|
3335
|
-
var rc =
|
|
3336
|
-
d.
|
|
3337
|
-
var nc =
|
|
3338
|
-
d.
|
|
3310
|
+
d.undefined = Wa;
|
|
3311
|
+
var qa = ae.create;
|
|
3312
|
+
d.null = qa;
|
|
3313
|
+
var Ga = X.create;
|
|
3314
|
+
d.any = Ga;
|
|
3315
|
+
var Ka = K.create;
|
|
3316
|
+
d.unknown = Ka;
|
|
3317
|
+
var za = U.create;
|
|
3318
|
+
d.never = za;
|
|
3319
|
+
var Ja = ke.create;
|
|
3320
|
+
d.void = Ja;
|
|
3321
|
+
var Ya = z.create;
|
|
3322
|
+
d.array = Ya;
|
|
3323
|
+
var Ha = R.create;
|
|
3324
|
+
d.object = Ha;
|
|
3325
|
+
var Xa = R.strictCreate;
|
|
3326
|
+
d.strictObject = Xa;
|
|
3327
|
+
var Qa = ce.create;
|
|
3328
|
+
d.union = Qa;
|
|
3329
|
+
var ec = yt.create;
|
|
3330
|
+
d.discriminatedUnion = ec;
|
|
3331
|
+
var tc = de.create;
|
|
3332
|
+
d.intersection = tc;
|
|
3333
|
+
var rc = F.create;
|
|
3334
|
+
d.tuple = rc;
|
|
3335
|
+
var nc = gt.create;
|
|
3336
|
+
d.record = nc;
|
|
3339
3337
|
var sc = Te.create;
|
|
3340
|
-
d.
|
|
3341
|
-
var oc =
|
|
3342
|
-
d.
|
|
3343
|
-
var ic =
|
|
3344
|
-
d.
|
|
3338
|
+
d.map = sc;
|
|
3339
|
+
var oc = Ie.create;
|
|
3340
|
+
d.set = oc;
|
|
3341
|
+
var ic = xt.create;
|
|
3342
|
+
d.function = ic;
|
|
3345
3343
|
var ac = ue.create;
|
|
3346
|
-
d.
|
|
3344
|
+
d.lazy = ac;
|
|
3347
3345
|
var cc = le.create;
|
|
3348
|
-
d.
|
|
3346
|
+
d.literal = cc;
|
|
3349
3347
|
var dc = pe.create;
|
|
3350
|
-
d.
|
|
3351
|
-
var uc =
|
|
3352
|
-
d.
|
|
3348
|
+
d.enum = dc;
|
|
3349
|
+
var uc = fe.create;
|
|
3350
|
+
d.nativeEnum = uc;
|
|
3351
|
+
var lc = Q.create;
|
|
3352
|
+
d.promise = lc;
|
|
3353
3353
|
var Gn = Z.create;
|
|
3354
3354
|
d.effect = Gn;
|
|
3355
3355
|
d.transformer = Gn;
|
|
3356
|
-
var
|
|
3357
|
-
d.optional =
|
|
3358
|
-
var
|
|
3359
|
-
d.nullable =
|
|
3360
|
-
var
|
|
3361
|
-
d.preprocess =
|
|
3362
|
-
var
|
|
3363
|
-
d.pipeline =
|
|
3364
|
-
var
|
|
3365
|
-
d.ostring =
|
|
3366
|
-
var
|
|
3367
|
-
d.onumber =
|
|
3368
|
-
var
|
|
3369
|
-
d.oboolean =
|
|
3356
|
+
var pc = M.create;
|
|
3357
|
+
d.optional = pc;
|
|
3358
|
+
var fc = B.create;
|
|
3359
|
+
d.nullable = fc;
|
|
3360
|
+
var mc = Z.createWithPreprocess;
|
|
3361
|
+
d.preprocess = mc;
|
|
3362
|
+
var hc = Fe.create;
|
|
3363
|
+
d.pipeline = hc;
|
|
3364
|
+
var yc = /* @__PURE__ */ i(() => Bn().optional(), "ostring");
|
|
3365
|
+
d.ostring = yc;
|
|
3366
|
+
var gc = /* @__PURE__ */ i(() => Wn().optional(), "onumber");
|
|
3367
|
+
d.onumber = gc;
|
|
3368
|
+
var xc = /* @__PURE__ */ i(() => qn().optional(), "oboolean");
|
|
3369
|
+
d.oboolean = xc;
|
|
3370
3370
|
d.coerce = {
|
|
3371
|
-
string: /* @__PURE__ */ i((t) =>
|
|
3372
|
-
number: /* @__PURE__ */ i((t) =>
|
|
3373
|
-
boolean: /* @__PURE__ */ i((t) =>
|
|
3371
|
+
string: /* @__PURE__ */ i((t) => H.create({ ...t, coerce: !0 }), "string"),
|
|
3372
|
+
number: /* @__PURE__ */ i((t) => re.create({ ...t, coerce: !0 }), "number"),
|
|
3373
|
+
boolean: /* @__PURE__ */ i((t) => se.create({
|
|
3374
3374
|
...t,
|
|
3375
3375
|
coerce: !0
|
|
3376
3376
|
}), "boolean"),
|
|
3377
|
-
bigint: /* @__PURE__ */ i((t) =>
|
|
3378
|
-
date: /* @__PURE__ */ i((t) =>
|
|
3377
|
+
bigint: /* @__PURE__ */ i((t) => ne.create({ ...t, coerce: !0 }), "bigint"),
|
|
3378
|
+
date: /* @__PURE__ */ i((t) => oe.create({ ...t, coerce: !0 }), "date")
|
|
3379
3379
|
};
|
|
3380
3380
|
d.NEVER = u.INVALID;
|
|
3381
3381
|
});
|
|
@@ -3383,7 +3383,7 @@ adonly";
|
|
|
3383
3383
|
// ../node_modules/zod/lib/external.js
|
|
3384
3384
|
var cr = I((D) => {
|
|
3385
3385
|
"use strict";
|
|
3386
|
-
var
|
|
3386
|
+
var bc = D && D.__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,16 +3391,16 @@ var cr = I((D) => {
|
|
|
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
|
+
}), Ee = D && D.__exportStar || function(t, e) {
|
|
3395
|
+
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) && bc(e, t, r);
|
|
3396
3396
|
};
|
|
3397
3397
|
Object.defineProperty(D, "__esModule", { value: !0 });
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3398
|
+
Ee(pt(), D);
|
|
3399
|
+
Ee(or(), D);
|
|
3400
|
+
Ee(jn(), D);
|
|
3401
|
+
Ee(Le(), D);
|
|
3402
|
+
Ee(Kn(), D);
|
|
3403
|
+
Ee(lt(), D);
|
|
3404
3404
|
});
|
|
3405
3405
|
|
|
3406
3406
|
// ../node_modules/zod/lib/index.js
|
|
@@ -3414,31 +3414,31 @@ var Yn = 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
|
+
}), vc = 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
|
+
}), _c = N && N.__importStar || function(t) {
|
|
3422
3422
|
if (t && t.__esModule) return t;
|
|
3423
3423
|
var e = {};
|
|
3424
3424
|
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) && zn(e, t, r);
|
|
3425
|
-
return
|
|
3426
|
-
},
|
|
3425
|
+
return vc(e, t), e;
|
|
3426
|
+
}, wc = N && N.__exportStar || function(t, e) {
|
|
3427
3427
|
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) && zn(e, t, r);
|
|
3428
3428
|
};
|
|
3429
3429
|
Object.defineProperty(N, "__esModule", { value: !0 });
|
|
3430
3430
|
N.z = void 0;
|
|
3431
|
-
var Jn =
|
|
3431
|
+
var Jn = _c(cr());
|
|
3432
3432
|
N.z = Jn;
|
|
3433
|
-
|
|
3433
|
+
wc(cr(), N);
|
|
3434
3434
|
N.default = Jn;
|
|
3435
3435
|
});
|
|
3436
3436
|
|
|
3437
3437
|
// ../node_modules/ts-dedent/dist/index.js
|
|
3438
|
-
var Xn = I((
|
|
3438
|
+
var Xn = I((Be) => {
|
|
3439
3439
|
"use strict";
|
|
3440
|
-
Object.defineProperty(
|
|
3441
|
-
|
|
3440
|
+
Object.defineProperty(Be, "__esModule", { value: !0 });
|
|
3441
|
+
Be.dedent = void 0;
|
|
3442
3442
|
function Hn(t) {
|
|
3443
3443
|
for (var e = [], r = 1; r < arguments.length; r++)
|
|
3444
3444
|
e[r - 1] = arguments[r];
|
|
@@ -3472,16 +3472,16 @@ var Xn = I((Fe) => {
|
|
|
3472
3472
|
}), a;
|
|
3473
3473
|
}
|
|
3474
3474
|
i(Hn, "dedent");
|
|
3475
|
-
|
|
3476
|
-
|
|
3475
|
+
Be.dedent = Hn;
|
|
3476
|
+
Be.default = Hn;
|
|
3477
3477
|
});
|
|
3478
3478
|
|
|
3479
3479
|
// ../node_modules/isexe/windows.js
|
|
3480
|
-
var is = I((
|
|
3480
|
+
var is = I((Up, os) => {
|
|
3481
3481
|
os.exports = ss;
|
|
3482
|
-
ss.sync =
|
|
3482
|
+
ss.sync = Ac;
|
|
3483
3483
|
var rs = j("fs");
|
|
3484
|
-
function
|
|
3484
|
+
function Pc(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,9 +3492,9 @@ var is = I((Dp, os) => {
|
|
|
3492
3492
|
}
|
|
3493
3493
|
return !1;
|
|
3494
3494
|
}
|
|
3495
|
-
i(
|
|
3495
|
+
i(Pc, "checkPathExt");
|
|
3496
3496
|
function ns(t, e, r) {
|
|
3497
|
-
return !t.isSymbolicLink() && !t.isFile() ? !1 :
|
|
3497
|
+
return !t.isSymbolicLink() && !t.isFile() ? !1 : Pc(e, r);
|
|
3498
3498
|
}
|
|
3499
3499
|
i(ns, "checkStat");
|
|
3500
3500
|
function ss(t, e, r) {
|
|
@@ -3503,16 +3503,16 @@ var is = I((Dp, os) => {
|
|
|
3503
3503
|
});
|
|
3504
3504
|
}
|
|
3505
3505
|
i(ss, "isexe");
|
|
3506
|
-
function
|
|
3506
|
+
function Ac(t, e) {
|
|
3507
3507
|
return ns(rs.statSync(t), t, e);
|
|
3508
3508
|
}
|
|
3509
|
-
i(
|
|
3509
|
+
i(Ac, "sync");
|
|
3510
3510
|
});
|
|
3511
3511
|
|
|
3512
3512
|
// ../node_modules/isexe/mode.js
|
|
3513
|
-
var ls = I((
|
|
3513
|
+
var ls = I((Vp, us) => {
|
|
3514
3514
|
us.exports = cs;
|
|
3515
|
-
cs.sync =
|
|
3515
|
+
cs.sync = Oc;
|
|
3516
3516
|
var as = j("fs");
|
|
3517
3517
|
function cs(t, e, r) {
|
|
3518
3518
|
as.stat(t, function(n, s) {
|
|
@@ -3520,29 +3520,29 @@ var ls = I(($p, us) => {
|
|
|
3520
3520
|
});
|
|
3521
3521
|
}
|
|
3522
3522
|
i(cs, "isexe");
|
|
3523
|
-
function
|
|
3523
|
+
function Oc(t, e) {
|
|
3524
3524
|
return ds(as.statSync(t), e);
|
|
3525
3525
|
}
|
|
3526
|
-
i(
|
|
3526
|
+
i(Oc, "sync");
|
|
3527
3527
|
function ds(t, e) {
|
|
3528
|
-
return t.isFile() &&
|
|
3528
|
+
return t.isFile() && jc(t, e);
|
|
3529
3529
|
}
|
|
3530
3530
|
i(ds, "checkStat");
|
|
3531
|
-
function
|
|
3531
|
+
function jc(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
3533
|
getgid && process.getgid(), c = parseInt("100", 8), p = parseInt("010", 8), l = parseInt("001", 8), f = c | p, x = r & l || r & p && s ===
|
|
3534
3534
|
a || r & c && n === o || r & f && o === 0;
|
|
3535
3535
|
return x;
|
|
3536
3536
|
}
|
|
3537
|
-
i(
|
|
3537
|
+
i(jc, "checkMode");
|
|
3538
3538
|
});
|
|
3539
3539
|
|
|
3540
3540
|
// ../node_modules/isexe/index.js
|
|
3541
|
-
var fs = I((
|
|
3542
|
-
var
|
|
3543
|
-
process.platform === "win32" || global.TESTING_WINDOWS ?
|
|
3541
|
+
var fs = I((Wp, ps) => {
|
|
3542
|
+
var Bp = j("fs"), wt;
|
|
3543
|
+
process.platform === "win32" || global.TESTING_WINDOWS ? wt = is() : wt = ls();
|
|
3544
3544
|
ps.exports = ur;
|
|
3545
|
-
ur.sync =
|
|
3545
|
+
ur.sync = Rc;
|
|
3546
3546
|
function ur(t, e, r) {
|
|
3547
3547
|
if (typeof e == "function" && (r = e, e = {}), !r) {
|
|
3548
3548
|
if (typeof Promise != "function")
|
|
@@ -3553,35 +3553,35 @@ var fs = I((Bp, ps) => {
|
|
|
3553
3553
|
});
|
|
3554
3554
|
});
|
|
3555
3555
|
}
|
|
3556
|
-
|
|
3556
|
+
wt(t, e || {}, function(n, s) {
|
|
3557
3557
|
n && (n.code === "EACCES" || e && e.ignoreErrors) && (n = null, s = !1), r(n, s);
|
|
3558
3558
|
});
|
|
3559
3559
|
}
|
|
3560
3560
|
i(ur, "isexe");
|
|
3561
|
-
function
|
|
3561
|
+
function Rc(t, e) {
|
|
3562
3562
|
try {
|
|
3563
|
-
return
|
|
3563
|
+
return wt.sync(t, e || {});
|
|
3564
3564
|
} catch (r) {
|
|
3565
3565
|
if (e && e.ignoreErrors || r.code === "EACCES")
|
|
3566
3566
|
return !1;
|
|
3567
3567
|
throw r;
|
|
3568
3568
|
}
|
|
3569
3569
|
}
|
|
3570
|
-
i(
|
|
3570
|
+
i(Rc, "sync");
|
|
3571
3571
|
});
|
|
3572
3572
|
|
|
3573
3573
|
// ../node_modules/which/which.js
|
|
3574
|
-
var vs = I((
|
|
3575
|
-
var
|
|
3574
|
+
var vs = I((Gp, bs) => {
|
|
3575
|
+
var Ae = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", ms = j("path"), Nc = Ae ? ";" :
|
|
3576
3576
|
":", hs = fs(), ys = /* @__PURE__ */ i((t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), "getNotFoundError"), gs = /* @__PURE__ */ i(
|
|
3577
3577
|
(t, e) => {
|
|
3578
|
-
let r = e.colon ||
|
|
3578
|
+
let r = e.colon || Nc, n = t.match(/\//) || Ae && t.match(/\\/) ? [""] : [
|
|
3579
3579
|
// windows always checks the cwd first
|
|
3580
|
-
...
|
|
3580
|
+
...Ae ? [process.cwd()] : [],
|
|
3581
3581
|
...(e.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
3582
3582
|
"").split(r)
|
|
3583
|
-
], s =
|
|
3584
|
-
return
|
|
3583
|
+
], s = Ae ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = Ae ? s.split(r) : [""];
|
|
3584
|
+
return Ae && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
3585
3585
|
pathEnv: n,
|
|
3586
3586
|
pathExt: o,
|
|
3587
3587
|
pathExtExe: s
|
|
@@ -3607,7 +3607,7 @@ var vs = I((qp, bs) => {
|
|
|
3607
3607
|
});
|
|
3608
3608
|
}), "subStep");
|
|
3609
3609
|
return r ? c(0).then((l) => r(null, l), r) : c(0);
|
|
3610
|
-
}, "which"),
|
|
3610
|
+
}, "which"), Zc = /* @__PURE__ */ i((t, e) => {
|
|
3611
3611
|
e = e || {};
|
|
3612
3612
|
let { pathEnv: r, pathExt: n, pathExtExe: s } = gs(t, e), o = [];
|
|
3613
3613
|
for (let a = 0; a < r.length; a++) {
|
|
@@ -3631,11 +3631,11 @@ var vs = I((qp, bs) => {
|
|
|
3631
3631
|
throw ys(t);
|
|
3632
3632
|
}, "whichSync");
|
|
3633
3633
|
bs.exports = xs;
|
|
3634
|
-
xs.sync =
|
|
3634
|
+
xs.sync = Zc;
|
|
3635
3635
|
});
|
|
3636
3636
|
|
|
3637
3637
|
// ../node_modules/path-key/index.js
|
|
3638
|
-
var ws = I((
|
|
3638
|
+
var ws = I((zp, lr) => {
|
|
3639
3639
|
"use strict";
|
|
3640
3640
|
var _s = /* @__PURE__ */ i((t = {}) => {
|
|
3641
3641
|
let e = t.env || process.env;
|
|
@@ -3646,9 +3646,9 @@ var ws = I((Kp, lr) => {
|
|
|
3646
3646
|
});
|
|
3647
3647
|
|
|
3648
3648
|
// ../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
3649
|
-
var Ss = I((
|
|
3649
|
+
var Ss = I((Yp, Is) => {
|
|
3650
3650
|
"use strict";
|
|
3651
|
-
var ks = j("path"),
|
|
3651
|
+
var ks = j("path"), Mc = vs(), Lc = ws();
|
|
3652
3652
|
function Ts(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;
|
|
@@ -3659,8 +3659,8 @@ var Ss = I((Jp, Is) => {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
let a;
|
|
3661
3661
|
try {
|
|
3662
|
-
a =
|
|
3663
|
-
path: r[
|
|
3662
|
+
a = Mc.sync(t.command, {
|
|
3663
|
+
path: r[Lc({ env: r })],
|
|
3664
3664
|
pathExt: e ? ks.delimiter : void 0
|
|
3665
3665
|
});
|
|
3666
3666
|
} catch {
|
|
@@ -3670,42 +3670,42 @@ var Ss = I((Jp, Is) => {
|
|
|
3670
3670
|
return a && (a = ks.resolve(s ? t.options.cwd : "", a)), a;
|
|
3671
3671
|
}
|
|
3672
3672
|
i(Ts, "resolveCommandAttempt");
|
|
3673
|
-
function
|
|
3673
|
+
function Dc(t) {
|
|
3674
3674
|
return Ts(t) || Ts(t, !0);
|
|
3675
3675
|
}
|
|
3676
|
-
i(
|
|
3677
|
-
Is.exports =
|
|
3676
|
+
i(Dc, "resolveCommand");
|
|
3677
|
+
Is.exports = Dc;
|
|
3678
3678
|
});
|
|
3679
3679
|
|
|
3680
3680
|
// ../node_modules/cross-spawn/lib/util/escape.js
|
|
3681
|
-
var Es = I((
|
|
3681
|
+
var Es = I((Xp, fr) => {
|
|
3682
3682
|
"use strict";
|
|
3683
3683
|
var pr = /([()\][%!^"`<>&|;, *?])/g;
|
|
3684
|
-
function
|
|
3684
|
+
function Uc(t) {
|
|
3685
3685
|
return t = t.replace(pr, "^$1"), t;
|
|
3686
3686
|
}
|
|
3687
|
-
i(
|
|
3688
|
-
function
|
|
3687
|
+
i(Uc, "escapeCommand");
|
|
3688
|
+
function $c(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(pr,
|
|
3690
3690
|
"^$1"), e && (t = t.replace(pr, "^$1")), t;
|
|
3691
3691
|
}
|
|
3692
|
-
i(
|
|
3693
|
-
fr.exports.command =
|
|
3694
|
-
fr.exports.argument =
|
|
3692
|
+
i($c, "escapeArgument");
|
|
3693
|
+
fr.exports.command = Uc;
|
|
3694
|
+
fr.exports.argument = $c;
|
|
3695
3695
|
});
|
|
3696
3696
|
|
|
3697
3697
|
// ../node_modules/shebang-regex/index.js
|
|
3698
|
-
var Ps = I((
|
|
3698
|
+
var Ps = I((ef, Cs) => {
|
|
3699
3699
|
"use strict";
|
|
3700
3700
|
Cs.exports = /^#!(.*)/;
|
|
3701
3701
|
});
|
|
3702
3702
|
|
|
3703
3703
|
// ../node_modules/shebang-command/index.js
|
|
3704
|
-
var Os = I((
|
|
3704
|
+
var Os = I((tf, As) => {
|
|
3705
3705
|
"use strict";
|
|
3706
|
-
var
|
|
3706
|
+
var Vc = Ps();
|
|
3707
3707
|
As.exports = (t = "") => {
|
|
3708
|
-
let e = t.match(
|
|
3708
|
+
let e = t.match(Vc);
|
|
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 Os = I((ef, As) => {
|
|
|
3714
3714
|
});
|
|
3715
3715
|
|
|
3716
3716
|
// ../node_modules/cross-spawn/lib/util/readShebang.js
|
|
3717
|
-
var Rs = I((
|
|
3717
|
+
var Rs = I((rf, js) => {
|
|
3718
3718
|
"use strict";
|
|
3719
|
-
var mr = j("fs"),
|
|
3720
|
-
function
|
|
3719
|
+
var mr = j("fs"), Fc = Os();
|
|
3720
|
+
function Bc(t) {
|
|
3721
3721
|
let r = Buffer.alloc(150), n;
|
|
3722
3722
|
try {
|
|
3723
3723
|
n = mr.openSync(t, "r"), mr.readSync(n, r, 0, 150, 0), mr.closeSync(n);
|
|
3724
3724
|
} catch {
|
|
3725
3725
|
}
|
|
3726
|
-
return
|
|
3726
|
+
return Fc(r.toString());
|
|
3727
3727
|
}
|
|
3728
|
-
i(
|
|
3729
|
-
js.exports =
|
|
3728
|
+
i(Bc, "readShebang");
|
|
3729
|
+
js.exports = Bc;
|
|
3730
3730
|
});
|
|
3731
3731
|
|
|
3732
3732
|
// ../node_modules/cross-spawn/lib/parse.js
|
|
3733
|
-
var Ls = I((
|
|
3733
|
+
var Ls = I((sf, Ms) => {
|
|
3734
3734
|
"use strict";
|
|
3735
|
-
var
|
|
3736
|
-
function
|
|
3735
|
+
var Wc = j("path"), Ns = Ss(), Zs = Es(), qc = Rs(), Gc = process.platform === "win32", Kc = /\.(?:com|exe)$/i, zc = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
3736
|
+
function Jc(t) {
|
|
3737
3737
|
t.file = Ns(t);
|
|
3738
|
-
let e = t.file &&
|
|
3738
|
+
let e = t.file && qc(t.file);
|
|
3739
3739
|
return e ? (t.args.unshift(t.file), t.command = e, Ns(t)) : t.file;
|
|
3740
3740
|
}
|
|
3741
|
-
i(
|
|
3742
|
-
function
|
|
3743
|
-
if (!
|
|
3741
|
+
i(Jc, "detectShebang");
|
|
3742
|
+
function Yc(t) {
|
|
3743
|
+
if (!Gc)
|
|
3744
3744
|
return t;
|
|
3745
|
-
let e =
|
|
3745
|
+
let e = Jc(t), r = !Kc.test(e);
|
|
3746
3746
|
if (t.options.forceShell || r) {
|
|
3747
|
-
let n =
|
|
3748
|
-
t.command =
|
|
3747
|
+
let n = zc.test(e);
|
|
3748
|
+
t.command = Wc.normalize(t.command), t.command = Zs.command(t.command), t.args = t.args.map((o) => Zs.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(Yc, "parseNonShell");
|
|
3755
|
+
function Hc(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 Ls = I((nf, Ms) => {
|
|
|
3764
3764
|
args: e
|
|
3765
3765
|
}
|
|
3766
3766
|
};
|
|
3767
|
-
return r.shell ? n :
|
|
3767
|
+
return r.shell ? n : Yc(n);
|
|
3768
3768
|
}
|
|
3769
|
-
i(
|
|
3770
|
-
Ms.exports =
|
|
3769
|
+
i(Hc, "parse");
|
|
3770
|
+
Ms.exports = Hc;
|
|
3771
3771
|
});
|
|
3772
3772
|
|
|
3773
3773
|
// ../node_modules/cross-spawn/lib/enoent.js
|
|
3774
|
-
var $s = I((
|
|
3774
|
+
var $s = I((af, Us) => {
|
|
3775
3775
|
"use strict";
|
|
3776
3776
|
var hr = process.platform === "win32";
|
|
3777
3777
|
function yr(t, e) {
|
|
@@ -3784,7 +3784,7 @@ var $s = I((of, Us) => {
|
|
|
3784
3784
|
});
|
|
3785
3785
|
}
|
|
3786
3786
|
i(yr, "notFoundError");
|
|
3787
|
-
function
|
|
3787
|
+
function Xc(t, e) {
|
|
3788
3788
|
if (!hr)
|
|
3789
3789
|
return;
|
|
3790
3790
|
let r = t.emit;
|
|
@@ -3797,25 +3797,25 @@ var $s = I((of, Us) => {
|
|
|
3797
3797
|
return r.apply(t, arguments);
|
|
3798
3798
|
};
|
|
3799
3799
|
}
|
|
3800
|
-
i(
|
|
3800
|
+
i(Xc, "hookChildProcess");
|
|
3801
3801
|
function Ds(t, e) {
|
|
3802
3802
|
return hr && t === 1 && !e.file ? yr(e.original, "spawn") : null;
|
|
3803
3803
|
}
|
|
3804
3804
|
i(Ds, "verifyENOENT");
|
|
3805
|
-
function
|
|
3805
|
+
function Qc(t, e) {
|
|
3806
3806
|
return hr && t === 1 && !e.file ? yr(e.original, "spawnSync") : null;
|
|
3807
3807
|
}
|
|
3808
|
-
i(
|
|
3808
|
+
i(Qc, "verifyENOENTSync");
|
|
3809
3809
|
Us.exports = {
|
|
3810
|
-
hookChildProcess:
|
|
3810
|
+
hookChildProcess: Xc,
|
|
3811
3811
|
verifyENOENT: Ds,
|
|
3812
|
-
verifyENOENTSync:
|
|
3812
|
+
verifyENOENTSync: Qc,
|
|
3813
3813
|
notFoundError: yr
|
|
3814
3814
|
};
|
|
3815
3815
|
});
|
|
3816
3816
|
|
|
3817
3817
|
// ../node_modules/cross-spawn/index.js
|
|
3818
|
-
var Bs = I((
|
|
3818
|
+
var Bs = I((df, Oe) => {
|
|
3819
3819
|
"use strict";
|
|
3820
3820
|
var Vs = j("child_process"), gr = Ls(), xr = $s();
|
|
3821
3821
|
function Fs(t, e, r) {
|
|
@@ -3823,24 +3823,24 @@ var Bs = I((cf, Ae) => {
|
|
|
3823
3823
|
return xr.hookChildProcess(s, n), s;
|
|
3824
3824
|
}
|
|
3825
3825
|
i(Fs, "spawn");
|
|
3826
|
-
function
|
|
3826
|
+
function ed(t, e, r) {
|
|
3827
3827
|
let n = gr(t, e, r), s = Vs.spawnSync(n.command, n.args, n.options);
|
|
3828
3828
|
return s.error = s.error || xr.verifyENOENTSync(s.status, n), s;
|
|
3829
3829
|
}
|
|
3830
|
-
i(
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3830
|
+
i(ed, "spawnSync");
|
|
3831
|
+
Oe.exports = Fs;
|
|
3832
|
+
Oe.exports.spawn = Fs;
|
|
3833
|
+
Oe.exports.sync = ed;
|
|
3834
|
+
Oe.exports._parse = gr;
|
|
3835
|
+
Oe.exports._enoent = xr;
|
|
3836
3836
|
});
|
|
3837
3837
|
|
|
3838
3838
|
// ../node_modules/merge-stream/index.js
|
|
3839
|
-
var go = I((
|
|
3839
|
+
var go = I((Zm, yo) => {
|
|
3840
3840
|
"use strict";
|
|
3841
|
-
var { PassThrough:
|
|
3841
|
+
var { PassThrough: Xd } = j("stream");
|
|
3842
3842
|
yo.exports = function() {
|
|
3843
|
-
var t = [], e = new
|
|
3843
|
+
var t = [], e = new Xd({ 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")),
|
|
@@ -3869,16 +3869,16 @@ var Mo = ln(() => {
|
|
|
3869
3869
|
});
|
|
3870
3870
|
|
|
3871
3871
|
// ../node_modules/common-path-prefix/index.js
|
|
3872
|
-
var Bo = I((
|
|
3872
|
+
var Bo = I((Oh, Fo) => {
|
|
3873
3873
|
"use strict";
|
|
3874
|
-
var { sep:
|
|
3874
|
+
var { sep: Cu } = j("path"), Pu = /* @__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 Cu;
|
|
3880
3880
|
}, "determineSeparator");
|
|
3881
|
-
Fo.exports = /* @__PURE__ */ i(function(e, r =
|
|
3881
|
+
Fo.exports = /* @__PURE__ */ i(function(e, r = Pu(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 Bo = I((Ah, Fo) => {
|
|
|
3894
3894
|
});
|
|
3895
3895
|
|
|
3896
3896
|
// ../node_modules/yocto-queue/index.js
|
|
3897
|
-
var Kr,
|
|
3897
|
+
var Kr, Ye, Wo = ln(() => {
|
|
3898
3898
|
Kr = class {
|
|
3899
3899
|
static {
|
|
3900
3900
|
i(this, "Node");
|
|
@@ -3904,7 +3904,7 @@ var Kr, Je, Wo = ln(() => {
|
|
|
3904
3904
|
constructor(e) {
|
|
3905
3905
|
this.value = e;
|
|
3906
3906
|
}
|
|
3907
|
-
},
|
|
3907
|
+
}, Ye = class {
|
|
3908
3908
|
static {
|
|
3909
3909
|
i(this, "Queue");
|
|
3910
3910
|
}
|
|
@@ -3946,19 +3946,19 @@ var Kr, Je, Wo = ln(() => {
|
|
|
3946
3946
|
});
|
|
3947
3947
|
|
|
3948
3948
|
// ../node_modules/fetch-retry/index.js
|
|
3949
|
-
var
|
|
3949
|
+
var Ci = I((Yx, Ei) => {
|
|
3950
3950
|
"use strict";
|
|
3951
|
-
|
|
3951
|
+
Ei.exports = function(t, e) {
|
|
3952
3952
|
if (e = e || {}, typeof t != "function")
|
|
3953
|
-
throw new
|
|
3953
|
+
throw new ee("fetch must be a function");
|
|
3954
3954
|
if (typeof e != "object")
|
|
3955
|
-
throw new
|
|
3955
|
+
throw new ee("defaults must be an object");
|
|
3956
3956
|
if (e.retries !== void 0 && !Jt(e.retries))
|
|
3957
|
-
throw new
|
|
3957
|
+
throw new ee("retries must be a positive integer");
|
|
3958
3958
|
if (e.retryDelay !== void 0 && !Jt(e.retryDelay) && typeof e.retryDelay != "function")
|
|
3959
|
-
throw new
|
|
3959
|
+
throw new ee("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 ee("retryOn property expects an array or function");
|
|
3962
3962
|
var r = {
|
|
3963
3963
|
retries: 3,
|
|
3964
3964
|
retryDelay: 1e3,
|
|
@@ -3970,17 +3970,17 @@ var Ei = I((Yx, Si) => {
|
|
|
3970
3970
|
if (Jt(o.retries))
|
|
3971
3971
|
a = o.retries;
|
|
3972
3972
|
else
|
|
3973
|
-
throw new
|
|
3973
|
+
throw new ee("retries must be a positive integer");
|
|
3974
3974
|
if (o && o.retryDelay !== void 0)
|
|
3975
3975
|
if (Jt(o.retryDelay) || typeof o.retryDelay == "function")
|
|
3976
3976
|
c = o.retryDelay;
|
|
3977
3977
|
else
|
|
3978
|
-
throw new
|
|
3978
|
+
throw new ee("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
|
p = o.retryOn;
|
|
3982
3982
|
else
|
|
3983
|
-
throw new
|
|
3983
|
+
throw new ee("retryOn property expects an array or function");
|
|
3984
3984
|
return new Promise(function(l, f) {
|
|
3985
3985
|
var x = /* @__PURE__ */ i(function(_) {
|
|
3986
3986
|
var C = typeof Request < "u" && s instanceof Request ? s.clone() : s;
|
|
@@ -4025,26 +4025,26 @@ var Ei = I((Yx, Si) => {
|
|
|
4025
4025
|
return Number.isInteger(t) && t >= 0;
|
|
4026
4026
|
}
|
|
4027
4027
|
i(Jt, "isPositiveInteger");
|
|
4028
|
-
function
|
|
4028
|
+
function ee(t) {
|
|
4029
4029
|
this.name = "ArgumentError", this.message = t;
|
|
4030
4030
|
}
|
|
4031
|
-
i(
|
|
4031
|
+
i(ee, "ArgumentError");
|
|
4032
4032
|
});
|
|
4033
4033
|
|
|
4034
4034
|
// src/telemetry/index.ts
|
|
4035
|
-
import { logger as
|
|
4035
|
+
import { logger as Ui } from "storybook/internal/node-logger";
|
|
4036
4036
|
|
|
4037
4037
|
// src/telemetry/notify.ts
|
|
4038
|
-
var gn =
|
|
4038
|
+
var gn = J(mn(), 1);
|
|
4039
4039
|
import { cache as hn } from "storybook/internal/common";
|
|
4040
|
-
import { CLI_COLORS as
|
|
4040
|
+
import { CLI_COLORS as Ji, logger as at } from "storybook/internal/node-logger";
|
|
4041
4041
|
var yn = "telemetry-notification-date", xn = /* @__PURE__ */ i(async () => {
|
|
4042
|
-
await hn.get(yn, null) || (hn.set(yn, Date.now()),
|
|
4043
|
-
`${
|
|
4042
|
+
await hn.get(yn, null) || (hn.set(yn, Date.now()), at.log(
|
|
4043
|
+
`${Ji.info("Attention:")} Storybook now collects completely anonymous telemetry regarding usage. This information is used to shape Story\
|
|
4044
4044
|
book's roadmap and prioritize features.`
|
|
4045
|
-
),
|
|
4045
|
+
), at.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
|
+
), at.log(gn.default.cyan("https://storybook.js.org/telemetry")), at.log(""));
|
|
4048
4048
|
}, "notify");
|
|
4049
4049
|
|
|
4050
4050
|
// src/telemetry/sanitize.ts
|
|
@@ -4057,7 +4057,7 @@ function vn(t = "") {
|
|
|
4057
4057
|
return t.replace(/\u001B\[[0-9;]*m/g, "");
|
|
4058
4058
|
}
|
|
4059
4059
|
i(vn, "removeAnsiEscapeCodes");
|
|
4060
|
-
function
|
|
4060
|
+
function Me(t, e = _n.sep) {
|
|
4061
4061
|
if (!t)
|
|
4062
4062
|
return t;
|
|
4063
4063
|
let r = process.cwd().split(e);
|
|
@@ -4069,8 +4069,8 @@ function Ze(t, e = _n.sep) {
|
|
|
4069
4069
|
}
|
|
4070
4070
|
return t;
|
|
4071
4071
|
}
|
|
4072
|
-
i(
|
|
4073
|
-
function
|
|
4072
|
+
i(Me, "cleanPaths");
|
|
4073
|
+
function ct(t, e = _n.sep) {
|
|
4074
4074
|
try {
|
|
4075
4075
|
t = {
|
|
4076
4076
|
...JSON.parse(JSON.stringify(t)),
|
|
@@ -4079,41 +4079,41 @@ function at(t, e = _n.sep) {
|
|
|
4079
4079
|
cause: t.cause,
|
|
4080
4080
|
name: t.name
|
|
4081
4081
|
};
|
|
4082
|
-
let r =
|
|
4082
|
+
let r = Me(JSON.stringify(t), e);
|
|
4083
4083
|
return JSON.parse(r);
|
|
4084
4084
|
} catch (r) {
|
|
4085
4085
|
return `Sanitization error: ${r?.message}`;
|
|
4086
4086
|
}
|
|
4087
4087
|
}
|
|
4088
|
-
i(
|
|
4088
|
+
i(ct, "sanitizeError");
|
|
4089
4089
|
|
|
4090
4090
|
// src/telemetry/storybook-metadata.ts
|
|
4091
|
-
import { dirname as
|
|
4091
|
+
import { dirname as hl } from "node:path";
|
|
4092
4092
|
import {
|
|
4093
|
-
getStorybookConfiguration as
|
|
4094
|
-
getStorybookInfo as
|
|
4095
|
-
loadMainConfig as
|
|
4096
|
-
versions as
|
|
4093
|
+
getStorybookConfiguration as yl,
|
|
4094
|
+
getStorybookInfo as gl,
|
|
4095
|
+
loadMainConfig as xl,
|
|
4096
|
+
versions as bl
|
|
4097
4097
|
} from "storybook/internal/common";
|
|
4098
|
-
import { readConfig as
|
|
4098
|
+
import { readConfig as vl } from "storybook/internal/csf-tools";
|
|
4099
4099
|
|
|
4100
4100
|
// ../node_modules/fd-package-json/dist/esm/main.js
|
|
4101
|
-
var Tn =
|
|
4102
|
-
import { resolve as
|
|
4103
|
-
import { stat as
|
|
4104
|
-
import { statSync as
|
|
4105
|
-
async function
|
|
4101
|
+
var Tn = J(kn(), 1);
|
|
4102
|
+
import { resolve as Hi } from "node:path";
|
|
4103
|
+
import { stat as Xi, readFile as Qi } from "node:fs/promises";
|
|
4104
|
+
import { statSync as np, readFileSync as sp } from "node:fs";
|
|
4105
|
+
async function ea(t) {
|
|
4106
4106
|
try {
|
|
4107
|
-
return (await
|
|
4107
|
+
return (await Xi(t)).isFile();
|
|
4108
4108
|
} catch {
|
|
4109
4109
|
return !1;
|
|
4110
4110
|
}
|
|
4111
4111
|
}
|
|
4112
|
-
i(
|
|
4112
|
+
i(ea, "fileExists");
|
|
4113
4113
|
async function er(t) {
|
|
4114
4114
|
for (let e of (0, Tn.walkUp)(t)) {
|
|
4115
|
-
let r =
|
|
4116
|
-
if (await
|
|
4115
|
+
let r = Hi(e, "package.json");
|
|
4116
|
+
if (await ea(r))
|
|
4117
4117
|
return r;
|
|
4118
4118
|
}
|
|
4119
4119
|
return null;
|
|
@@ -4124,7 +4124,7 @@ async function In(t) {
|
|
|
4124
4124
|
if (!e)
|
|
4125
4125
|
return null;
|
|
4126
4126
|
try {
|
|
4127
|
-
let r = await
|
|
4127
|
+
let r = await Qi(e, { encoding: "utf8" });
|
|
4128
4128
|
return JSON.parse(r);
|
|
4129
4129
|
} catch {
|
|
4130
4130
|
return null;
|
|
@@ -4133,16 +4133,16 @@ async function In(t) {
|
|
|
4133
4133
|
i(In, "findPackage");
|
|
4134
4134
|
|
|
4135
4135
|
// package.json
|
|
4136
|
-
var
|
|
4136
|
+
var ut = "9.1.0-beta.0";
|
|
4137
4137
|
|
|
4138
4138
|
// src/cli/globalSettings.ts
|
|
4139
|
-
var
|
|
4139
|
+
var Pe = J(Yn(), 1);
|
|
4140
4140
|
import dr from "node:fs/promises";
|
|
4141
|
-
import { homedir as
|
|
4142
|
-
import { dirname as
|
|
4141
|
+
import { homedir as kc } from "node:os";
|
|
4142
|
+
import { dirname as Tc, join as Ic } from "node:path";
|
|
4143
4143
|
|
|
4144
4144
|
// src/server-errors.ts
|
|
4145
|
-
var es =
|
|
4145
|
+
var es = J(Xn(), 1);
|
|
4146
4146
|
|
|
4147
4147
|
// src/storybook-error.ts
|
|
4148
4148
|
function Qn({
|
|
@@ -4153,7 +4153,7 @@ function Qn({
|
|
|
4153
4153
|
return `SB_${e}_${r}`;
|
|
4154
4154
|
}
|
|
4155
4155
|
i(Qn, "parseErrorCode");
|
|
4156
|
-
var
|
|
4156
|
+
var bt = class t extends Error {
|
|
4157
4157
|
constructor(r) {
|
|
4158
4158
|
super(t.getFullMessage(r));
|
|
4159
4159
|
/**
|
|
@@ -4195,7 +4195,7 @@ More info: ${a}
|
|
|
4195
4195
|
};
|
|
4196
4196
|
|
|
4197
4197
|
// src/server-errors.ts
|
|
4198
|
-
var
|
|
4198
|
+
var vt = class extends bt {
|
|
4199
4199
|
constructor(r) {
|
|
4200
4200
|
super({
|
|
4201
4201
|
category: "CORE-SERVER",
|
|
@@ -4212,26 +4212,26 @@ var bt = class extends xt {
|
|
|
4212
4212
|
};
|
|
4213
4213
|
|
|
4214
4214
|
// src/cli/globalSettings.ts
|
|
4215
|
-
var
|
|
4216
|
-
version:
|
|
4215
|
+
var Sc = Ic(kc(), ".storybook", "settings.json"), Ec = 1, Cc = Pe.z.object({
|
|
4216
|
+
version: Pe.z.number(),
|
|
4217
4217
|
// NOTE: every key (and subkey) below must be optional, for forwards compatibility reasons
|
|
4218
4218
|
// (we can remove keys once they are deprecated)
|
|
4219
|
-
userSince:
|
|
4220
|
-
init:
|
|
4221
|
-
}),
|
|
4222
|
-
async function ts(t =
|
|
4223
|
-
if (
|
|
4224
|
-
return
|
|
4219
|
+
userSince: Pe.z.number().optional(),
|
|
4220
|
+
init: Pe.z.object({ skipOnboarding: Pe.z.boolean().optional() }).optional()
|
|
4221
|
+
}), Ce;
|
|
4222
|
+
async function ts(t = Sc) {
|
|
4223
|
+
if (Ce)
|
|
4224
|
+
return Ce;
|
|
4225
4225
|
try {
|
|
4226
|
-
let e = await dr.readFile(t, "utf8"), r =
|
|
4227
|
-
|
|
4226
|
+
let e = await dr.readFile(t, "utf8"), r = Cc.parse(JSON.parse(e));
|
|
4227
|
+
Ce = new _t(t, r);
|
|
4228
4228
|
} catch {
|
|
4229
|
-
|
|
4229
|
+
Ce = new _t(t, { version: Ec, userSince: Date.now() }), await Ce.save();
|
|
4230
4230
|
}
|
|
4231
|
-
return
|
|
4231
|
+
return Ce;
|
|
4232
4232
|
}
|
|
4233
4233
|
i(ts, "globalSettings");
|
|
4234
|
-
var
|
|
4234
|
+
var _t = class {
|
|
4235
4235
|
static {
|
|
4236
4236
|
i(this, "Settings");
|
|
4237
4237
|
}
|
|
@@ -4247,9 +4247,9 @@ var vt = class {
|
|
|
4247
4247
|
/** Save settings to the file */
|
|
4248
4248
|
async save() {
|
|
4249
4249
|
try {
|
|
4250
|
-
await dr.mkdir(
|
|
4250
|
+
await dr.mkdir(Tc(this.filePath), { recursive: !0 }), await dr.writeFile(this.filePath, JSON.stringify(this.value, null, 2));
|
|
4251
4251
|
} catch (e) {
|
|
4252
|
-
throw new
|
|
4252
|
+
throw new vt({
|
|
4253
4253
|
filePath: this.filePath,
|
|
4254
4254
|
error: e
|
|
4255
4255
|
});
|
|
@@ -4258,17 +4258,17 @@ var vt = class {
|
|
|
4258
4258
|
};
|
|
4259
4259
|
|
|
4260
4260
|
// src/telemetry/get-application-file-count.ts
|
|
4261
|
-
import { sep as
|
|
4261
|
+
import { sep as Yu } from "node:path";
|
|
4262
4262
|
|
|
4263
4263
|
// src/telemetry/exec-command-count-lines.ts
|
|
4264
|
-
import { createInterface as
|
|
4264
|
+
import { createInterface as _u } from "node:readline";
|
|
4265
4265
|
|
|
4266
4266
|
// node_modules/execa/index.js
|
|
4267
|
-
var jo =
|
|
4268
|
-
import { Buffer as
|
|
4269
|
-
import
|
|
4267
|
+
var jo = J(Bs(), 1);
|
|
4268
|
+
import { Buffer as hu } from "node:buffer";
|
|
4269
|
+
import yu from "node:path";
|
|
4270
4270
|
import Br from "node:child_process";
|
|
4271
|
-
import
|
|
4271
|
+
import Mt from "node:process";
|
|
4272
4272
|
|
|
4273
4273
|
// ../node_modules/strip-final-newline/index.js
|
|
4274
4274
|
function br(t) {
|
|
@@ -4279,100 +4279,100 @@ function br(t) {
|
|
|
4279
4279
|
i(br, "stripFinalNewline");
|
|
4280
4280
|
|
|
4281
4281
|
// node_modules/npm-run-path/index.js
|
|
4282
|
-
import
|
|
4283
|
-
import
|
|
4282
|
+
import Tt from "node:process";
|
|
4283
|
+
import We from "node:path";
|
|
4284
4284
|
import { fileURLToPath as Ws } from "node:url";
|
|
4285
4285
|
|
|
4286
4286
|
// node_modules/path-key/index.js
|
|
4287
|
-
function
|
|
4287
|
+
function kt(t = {}) {
|
|
4288
4288
|
let {
|
|
4289
4289
|
env: e = process.env,
|
|
4290
4290
|
platform: r = process.platform
|
|
4291
4291
|
} = t;
|
|
4292
4292
|
return r !== "win32" ? "PATH" : Object.keys(e).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
4293
4293
|
}
|
|
4294
|
-
i(
|
|
4294
|
+
i(kt, "pathKey");
|
|
4295
4295
|
|
|
4296
4296
|
// node_modules/npm-run-path/index.js
|
|
4297
|
-
var
|
|
4298
|
-
cwd: t =
|
|
4299
|
-
path: e =
|
|
4297
|
+
var td = /* @__PURE__ */ i(({
|
|
4298
|
+
cwd: t = Tt.cwd(),
|
|
4299
|
+
path: e = Tt.env[kt()],
|
|
4300
4300
|
preferLocal: r = !0,
|
|
4301
|
-
execPath: n =
|
|
4301
|
+
execPath: n = Tt.execPath,
|
|
4302
4302
|
addExecPath: s = !0
|
|
4303
4303
|
} = {}) => {
|
|
4304
|
-
let o = t instanceof URL ? Ws(t) : t, a =
|
|
4305
|
-
return r &&
|
|
4306
|
-
}, "npmRunPath"),
|
|
4304
|
+
let o = t instanceof URL ? Ws(t) : t, a = We.resolve(o), c = [];
|
|
4305
|
+
return r && rd(c, a), s && nd(c, n, a), [...c, e].join(We.delimiter);
|
|
4306
|
+
}, "npmRunPath"), rd = /* @__PURE__ */ i((t, e) => {
|
|
4307
4307
|
let r;
|
|
4308
4308
|
for (; r !== e; )
|
|
4309
|
-
t.push(
|
|
4310
|
-
}, "applyPreferLocal"),
|
|
4309
|
+
t.push(We.join(e, "node_modules/.bin")), r = e, e = We.resolve(e, "..");
|
|
4310
|
+
}, "applyPreferLocal"), nd = /* @__PURE__ */ i((t, e, r) => {
|
|
4311
4311
|
let n = e instanceof URL ? Ws(e) : e;
|
|
4312
|
-
t.push(
|
|
4313
|
-
}, "applyExecPath"), qs = /* @__PURE__ */ i(({ env: t =
|
|
4312
|
+
t.push(We.resolve(r, n, ".."));
|
|
4313
|
+
}, "applyExecPath"), qs = /* @__PURE__ */ i(({ env: t = Tt.env, ...e } = {}) => {
|
|
4314
4314
|
t = { ...t };
|
|
4315
|
-
let r =
|
|
4316
|
-
return e.path = t[r], t[r] =
|
|
4315
|
+
let r = kt({ env: t });
|
|
4316
|
+
return e.path = t[r], t[r] = td(e), t;
|
|
4317
4317
|
}, "npmRunPathEnv");
|
|
4318
4318
|
|
|
4319
4319
|
// node_modules/mimic-fn/index.js
|
|
4320
|
-
var
|
|
4320
|
+
var sd = /* @__PURE__ */ i((t, e, r, n) => {
|
|
4321
4321
|
if (r === "length" || r === "prototype" || r === "arguments" || r === "caller")
|
|
4322
4322
|
return;
|
|
4323
4323
|
let s = Object.getOwnPropertyDescriptor(t, r), o = Object.getOwnPropertyDescriptor(e, r);
|
|
4324
|
-
!
|
|
4325
|
-
}, "copyProperty"),
|
|
4324
|
+
!od(s, o) && n || Object.defineProperty(t, r, o);
|
|
4325
|
+
}, "copyProperty"), od = /* @__PURE__ */ i(function(t, e) {
|
|
4326
4326
|
return t === void 0 || t.configurable || t.writable === e.writable && t.enumerable === e.enumerable && t.configurable === e.configurable &&
|
|
4327
4327
|
(t.writable || t.value === e.value);
|
|
4328
|
-
}, "canCopyProperty"),
|
|
4328
|
+
}, "canCopyProperty"), id = /* @__PURE__ */ i((t, e) => {
|
|
4329
4329
|
let r = Object.getPrototypeOf(e);
|
|
4330
4330
|
r !== Object.getPrototypeOf(t) && Object.setPrototypeOf(t, r);
|
|
4331
|
-
}, "changePrototype"),
|
|
4332
|
-
${e}`, "wrappedToString"),
|
|
4333
|
-
prototype.toString, "name"),
|
|
4334
|
-
let n = r === "" ? "" : `with ${r.trim()}() `, s =
|
|
4335
|
-
Object.defineProperty(s, "name",
|
|
4331
|
+
}, "changePrototype"), ad = /* @__PURE__ */ i((t, e) => `/* Wrapped ${t}*/
|
|
4332
|
+
${e}`, "wrappedToString"), cd = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), dd = Object.getOwnPropertyDescriptor(Function.
|
|
4333
|
+
prototype.toString, "name"), ud = /* @__PURE__ */ i((t, e, r) => {
|
|
4334
|
+
let n = r === "" ? "" : `with ${r.trim()}() `, s = ad.bind(null, n, e.toString());
|
|
4335
|
+
Object.defineProperty(s, "name", dd), Object.defineProperty(t, "toString", { ...cd, value: s });
|
|
4336
4336
|
}, "changeToString");
|
|
4337
4337
|
function vr(t, e, { ignoreNonConfigurable: r = !1 } = {}) {
|
|
4338
4338
|
let { name: n } = t;
|
|
4339
4339
|
for (let s of Reflect.ownKeys(e))
|
|
4340
|
-
|
|
4341
|
-
return
|
|
4340
|
+
sd(t, e, s, r);
|
|
4341
|
+
return id(t, e), ud(t, e, n), t;
|
|
4342
4342
|
}
|
|
4343
4343
|
i(vr, "mimicFunction");
|
|
4344
4344
|
|
|
4345
4345
|
// node_modules/onetime/index.js
|
|
4346
|
-
var
|
|
4346
|
+
var It = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ i((t, e = {}) => {
|
|
4347
4347
|
if (typeof t != "function")
|
|
4348
4348
|
throw new TypeError("Expected a function");
|
|
4349
4349
|
let r, n = 0, s = t.displayName || t.name || "<anonymous>", o = /* @__PURE__ */ i(function(...a) {
|
|
4350
|
-
if (
|
|
4350
|
+
if (It.set(o, ++n), n === 1)
|
|
4351
4351
|
r = t.apply(this, a), t = null;
|
|
4352
4352
|
else if (e.throw === !0)
|
|
4353
4353
|
throw new Error(`Function \`${s}\` can only be called once`);
|
|
4354
4354
|
return r;
|
|
4355
4355
|
}, "onetime");
|
|
4356
|
-
return vr(o, t),
|
|
4356
|
+
return vr(o, t), It.set(o, n), o;
|
|
4357
4357
|
}, "onetime");
|
|
4358
4358
|
Gs.callCount = (t) => {
|
|
4359
|
-
if (!
|
|
4359
|
+
if (!It.has(t))
|
|
4360
4360
|
throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);
|
|
4361
|
-
return
|
|
4361
|
+
return It.get(t);
|
|
4362
4362
|
};
|
|
4363
4363
|
var Ks = Gs;
|
|
4364
4364
|
|
|
4365
4365
|
// node_modules/execa/lib/error.js
|
|
4366
|
-
import
|
|
4366
|
+
import vd from "node:process";
|
|
4367
4367
|
|
|
4368
4368
|
// node_modules/human-signals/build/src/main.js
|
|
4369
|
-
import { constants as
|
|
4369
|
+
import { constants as md } from "node:os";
|
|
4370
4370
|
|
|
4371
4371
|
// node_modules/human-signals/build/src/realtime.js
|
|
4372
4372
|
var zs = /* @__PURE__ */ i(() => {
|
|
4373
4373
|
let t = _r - Js + 1;
|
|
4374
|
-
return Array.from({ length: t },
|
|
4375
|
-
}, "getRealtimeSignals"),
|
|
4374
|
+
return Array.from({ length: t }, ld);
|
|
4375
|
+
}, "getRealtimeSignals"), ld = /* @__PURE__ */ i((t, e) => ({
|
|
4376
4376
|
name: `SIGRT${e + 1}`,
|
|
4377
4377
|
number: Js + e,
|
|
4378
4378
|
action: "terminate",
|
|
@@ -4381,7 +4381,7 @@ var zs = /* @__PURE__ */ i(() => {
|
|
|
4381
4381
|
}), "getRealtimeSignal"), Js = 34, _r = 64;
|
|
4382
4382
|
|
|
4383
4383
|
// node_modules/human-signals/build/src/signals.js
|
|
4384
|
-
import { constants as
|
|
4384
|
+
import { constants as pd } from "node:os";
|
|
4385
4385
|
|
|
4386
4386
|
// node_modules/human-signals/build/src/core.js
|
|
4387
4387
|
var Ys = [
|
|
@@ -4659,8 +4659,8 @@ var Ys = [
|
|
|
4659
4659
|
// node_modules/human-signals/build/src/signals.js
|
|
4660
4660
|
var wr = /* @__PURE__ */ i(() => {
|
|
4661
4661
|
let t = zs();
|
|
4662
|
-
return [...Ys, ...t].map(
|
|
4663
|
-
}, "getSignals"),
|
|
4662
|
+
return [...Ys, ...t].map(fd);
|
|
4663
|
+
}, "getSignals"), fd = /* @__PURE__ */ i(({
|
|
4664
4664
|
name: t,
|
|
4665
4665
|
number: e,
|
|
4666
4666
|
description: r,
|
|
@@ -4670,15 +4670,15 @@ var wr = /* @__PURE__ */ i(() => {
|
|
|
4670
4670
|
}) => {
|
|
4671
4671
|
let {
|
|
4672
4672
|
signals: { [t]: a }
|
|
4673
|
-
} =
|
|
4673
|
+
} = pd, c = a !== void 0;
|
|
4674
4674
|
return { name: t, number: c ? a : e, description: r, supported: c, action: n, forced: s, standard: o };
|
|
4675
4675
|
}, "normalizeSignal");
|
|
4676
4676
|
|
|
4677
4677
|
// node_modules/human-signals/build/src/main.js
|
|
4678
|
-
var
|
|
4678
|
+
var hd = /* @__PURE__ */ i(() => {
|
|
4679
4679
|
let t = wr();
|
|
4680
|
-
return Object.fromEntries(t.map(
|
|
4681
|
-
}, "getSignalsByName"),
|
|
4680
|
+
return Object.fromEntries(t.map(yd));
|
|
4681
|
+
}, "getSignalsByName"), yd = /* @__PURE__ */ i(({
|
|
4682
4682
|
name: t,
|
|
4683
4683
|
number: e,
|
|
4684
4684
|
description: r,
|
|
@@ -4686,15 +4686,15 @@ var md = /* @__PURE__ */ i(() => {
|
|
|
4686
4686
|
action: s,
|
|
4687
4687
|
forced: o,
|
|
4688
4688
|
standard: a
|
|
4689
|
-
}) => [t, { name: t, number: e, description: r, supported: n, action: s, forced: o, standard: a }], "getSignalByName"), Hs =
|
|
4689
|
+
}) => [t, { name: t, number: e, description: r, supported: n, action: s, forced: o, standard: a }], "getSignalByName"), Hs = hd(), gd = /* @__PURE__ */ i(
|
|
4690
4690
|
() => {
|
|
4691
4691
|
let t = wr(), e = _r + 1, r = Array.from(
|
|
4692
4692
|
{ length: e },
|
|
4693
|
-
(n, s) =>
|
|
4693
|
+
(n, s) => xd(s, t)
|
|
4694
4694
|
);
|
|
4695
4695
|
return Object.assign({}, ...r);
|
|
4696
|
-
}, "getSignalsByNumber"),
|
|
4697
|
-
let r =
|
|
4696
|
+
}, "getSignalsByNumber"), xd = /* @__PURE__ */ i((t, e) => {
|
|
4697
|
+
let r = bd(t, e);
|
|
4698
4698
|
if (r === void 0)
|
|
4699
4699
|
return {};
|
|
4700
4700
|
let { name: n, description: s, supported: o, action: a, forced: c, standard: p } = r;
|
|
@@ -4709,15 +4709,15 @@ var md = /* @__PURE__ */ i(() => {
|
|
|
4709
4709
|
standard: p
|
|
4710
4710
|
}
|
|
4711
4711
|
};
|
|
4712
|
-
}, "getSignalByNumber"),
|
|
4713
|
-
let r = e.find(({ name: n }) =>
|
|
4712
|
+
}, "getSignalByNumber"), bd = /* @__PURE__ */ i((t, e) => {
|
|
4713
|
+
let r = e.find(({ name: n }) => md.signals[n] === t);
|
|
4714
4714
|
return r !== void 0 ? r : e.find((n) => n.number === t);
|
|
4715
|
-
}, "findSignalByNumber"),
|
|
4715
|
+
}, "findSignalByNumber"), Lf = gd();
|
|
4716
4716
|
|
|
4717
4717
|
// node_modules/execa/lib/error.js
|
|
4718
|
-
var
|
|
4718
|
+
var _d = /* @__PURE__ */ i(({ timedOut: t, timeout: e, errorCode: r, signal: n, signalDescription: s, exitCode: o, isCanceled: a }) => t ? `\
|
|
4719
4719
|
timed out after ${e} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${s})` :
|
|
4720
|
-
o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"),
|
|
4720
|
+
o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), qe = /* @__PURE__ */ i(({
|
|
4721
4721
|
stdout: t,
|
|
4722
4722
|
stderr: e,
|
|
4723
4723
|
all: r,
|
|
@@ -4729,42 +4729,42 @@ o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), We =
|
|
|
4729
4729
|
timedOut: p,
|
|
4730
4730
|
isCanceled: l,
|
|
4731
4731
|
killed: f,
|
|
4732
|
-
parsed: { options: { timeout: x, cwd: w =
|
|
4732
|
+
parsed: { options: { timeout: x, cwd: w = vd.cwd() } }
|
|
4733
4733
|
}) => {
|
|
4734
4734
|
o = o === null ? void 0 : o, s = s === null ? void 0 : s;
|
|
4735
|
-
let _ = s === void 0 ? void 0 : Hs[s].description, C = n && n.code, P = `Command ${
|
|
4736
|
-
exitCode: o, isCanceled: l })}: ${a}`, $ = Object.prototype.toString.call(n) === "[object Error]",
|
|
4737
|
-
${n.message}` : P,
|
|
4735
|
+
let _ = s === void 0 ? void 0 : Hs[s].description, C = n && n.code, P = `Command ${_d({ timedOut: p, timeout: x, errorCode: C, signal: s, signalDescription: _,
|
|
4736
|
+
exitCode: o, isCanceled: l })}: ${a}`, $ = Object.prototype.toString.call(n) === "[object Error]", Ne = $ ? `${P}
|
|
4737
|
+
${n.message}` : P, ve = [Ne, e, t].filter(Boolean).join(`
|
|
4738
4738
|
`);
|
|
4739
|
-
return $ ? (n.originalMessage = n.message, n.message =
|
|
4739
|
+
return $ ? (n.originalMessage = n.message, n.message = ve) : n = new Error(ve), n.shortMessage = Ne, n.command = a, n.escapedCommand = c, n.
|
|
4740
4740
|
exitCode = o, n.signal = s, n.signalDescription = _, n.stdout = t, n.stderr = e, n.cwd = w, r !== void 0 && (n.all = r), "bufferedData" in
|
|
4741
4741
|
n && delete n.bufferedData, n.failed = !0, n.timedOut = !!p, n.isCanceled = l, n.killed = f && !p, n;
|
|
4742
4742
|
}, "makeError");
|
|
4743
4743
|
|
|
4744
4744
|
// node_modules/execa/lib/stdio.js
|
|
4745
|
-
var
|
|
4745
|
+
var St = ["stdin", "stdout", "stderr"], wd = /* @__PURE__ */ i((t) => St.some((e) => t[e] !== void 0), "hasAlias"), Xs = /* @__PURE__ */ i((t) => {
|
|
4746
4746
|
if (!t)
|
|
4747
4747
|
return;
|
|
4748
4748
|
let { stdio: e } = t;
|
|
4749
4749
|
if (e === void 0)
|
|
4750
|
-
return
|
|
4751
|
-
if (
|
|
4752
|
-
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${
|
|
4750
|
+
return St.map((n) => t[n]);
|
|
4751
|
+
if (wd(t))
|
|
4752
|
+
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${St.map((n) => `\`${n}\``).join(", ")}`);
|
|
4753
4753
|
if (typeof e == "string")
|
|
4754
4754
|
return e;
|
|
4755
4755
|
if (!Array.isArray(e))
|
|
4756
4756
|
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);
|
|
4757
|
-
let r = Math.max(e.length,
|
|
4757
|
+
let r = Math.max(e.length, St.length);
|
|
4758
4758
|
return Array.from({ length: r }, (n, s) => e[s]);
|
|
4759
4759
|
}, "normalizeStdio");
|
|
4760
4760
|
|
|
4761
4761
|
// node_modules/execa/lib/kill.js
|
|
4762
|
-
import
|
|
4762
|
+
import Id from "node:os";
|
|
4763
4763
|
|
|
4764
4764
|
// node_modules/signal-exit/dist/mjs/signals.js
|
|
4765
|
-
var
|
|
4766
|
-
|
|
4767
|
-
process.platform !== "win32" &&
|
|
4765
|
+
var ge = [];
|
|
4766
|
+
ge.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
4767
|
+
process.platform !== "win32" && ge.push(
|
|
4768
4768
|
"SIGALRM",
|
|
4769
4769
|
"SIGABRT",
|
|
4770
4770
|
"SIGVTALRM",
|
|
@@ -4779,12 +4779,12 @@ process.platform !== "win32" && ye.push(
|
|
|
4779
4779
|
// see #21
|
|
4780
4780
|
// 'SIGPROF'
|
|
4781
4781
|
);
|
|
4782
|
-
process.platform === "linux" &&
|
|
4782
|
+
process.platform === "linux" && ge.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
4783
4783
|
|
|
4784
4784
|
// node_modules/signal-exit/dist/mjs/index.js
|
|
4785
|
-
var
|
|
4785
|
+
var Et = /* @__PURE__ */ i((t) => !!t && typeof t == "object" && typeof t.removeListener == "function" && typeof t.emit == "function" && typeof t.
|
|
4786
4786
|
reallyExit == "function" && typeof t.listeners == "function" && typeof t.kill == "function" && typeof t.pid == "number" && typeof t.on == "f\
|
|
4787
|
-
unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
4787
|
+
unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis, kd = Object.defineProperty.bind(Object), Ir = class {
|
|
4788
4788
|
static {
|
|
4789
4789
|
i(this, "Emitter");
|
|
4790
4790
|
}
|
|
@@ -4801,7 +4801,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4801
4801
|
constructor() {
|
|
4802
4802
|
if (Tr[kr])
|
|
4803
4803
|
return Tr[kr];
|
|
4804
|
-
|
|
4804
|
+
kd(Tr, kr, {
|
|
4805
4805
|
value: this,
|
|
4806
4806
|
writable: !1,
|
|
4807
4807
|
enumerable: !1,
|
|
@@ -4824,11 +4824,11 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4824
4824
|
s = o(r, n) === !0 || s;
|
|
4825
4825
|
return e === "exit" && (s = this.emit("afterExit", r, n) || s), s;
|
|
4826
4826
|
}
|
|
4827
|
-
},
|
|
4827
|
+
}, Ct = class {
|
|
4828
4828
|
static {
|
|
4829
4829
|
i(this, "SignalExitBase");
|
|
4830
4830
|
}
|
|
4831
|
-
},
|
|
4831
|
+
}, Td = /* @__PURE__ */ i((t) => ({
|
|
4832
4832
|
onExit(e, r) {
|
|
4833
4833
|
return t.onExit(e, r);
|
|
4834
4834
|
},
|
|
@@ -4838,7 +4838,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4838
4838
|
unload() {
|
|
4839
4839
|
return t.unload();
|
|
4840
4840
|
}
|
|
4841
|
-
}), "signalExitWrap"), Sr = class extends
|
|
4841
|
+
}), "signalExitWrap"), Sr = class extends Ct {
|
|
4842
4842
|
static {
|
|
4843
4843
|
i(this, "SignalExitFallback");
|
|
4844
4844
|
}
|
|
@@ -4850,7 +4850,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4850
4850
|
}
|
|
4851
4851
|
unload() {
|
|
4852
4852
|
}
|
|
4853
|
-
}, Er = class extends
|
|
4853
|
+
}, Er = class extends Ct {
|
|
4854
4854
|
static {
|
|
4855
4855
|
i(this, "SignalExit");
|
|
4856
4856
|
}
|
|
@@ -4867,7 +4867,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4867
4867
|
#n = !1;
|
|
4868
4868
|
constructor(e) {
|
|
4869
4869
|
super(), this.#e = e, this.#s = {};
|
|
4870
|
-
for (let r of
|
|
4870
|
+
for (let r of ge)
|
|
4871
4871
|
this.#s[r] = () => {
|
|
4872
4872
|
let n = this.#e.listeners(r), { count: s } = this.#t, o = e;
|
|
4873
4873
|
if (typeof o.__signal_exit_emitter__ == "object" && typeof o.__signal_exit_emitter__.count == "number" && (s += o.__signal_exit_emitter__.
|
|
@@ -4880,7 +4880,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4880
4880
|
this.#i = e.reallyExit, this.#o = e.emit;
|
|
4881
4881
|
}
|
|
4882
4882
|
onExit(e, r) {
|
|
4883
|
-
if (!
|
|
4883
|
+
if (!Et(this.#e))
|
|
4884
4884
|
return () => {
|
|
4885
4885
|
};
|
|
4886
4886
|
this.#n === !1 && this.load();
|
|
@@ -4892,7 +4892,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4892
4892
|
load() {
|
|
4893
4893
|
if (!this.#n) {
|
|
4894
4894
|
this.#n = !0, this.#t.count += 1;
|
|
4895
|
-
for (let e of
|
|
4895
|
+
for (let e of ge)
|
|
4896
4896
|
try {
|
|
4897
4897
|
let r = this.#s[e];
|
|
4898
4898
|
r && this.#e.on(e, r);
|
|
@@ -4902,7 +4902,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4902
4902
|
}
|
|
4903
4903
|
}
|
|
4904
4904
|
unload() {
|
|
4905
|
-
this.#n && (this.#n = !1,
|
|
4905
|
+
this.#n && (this.#n = !1, ge.forEach((e) => {
|
|
4906
4906
|
let r = this.#s[e];
|
|
4907
4907
|
if (!r)
|
|
4908
4908
|
throw new Error("Listener not defined for signal: " + e);
|
|
@@ -4913,12 +4913,12 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4913
4913
|
}), this.#e.emit = this.#o, this.#e.reallyExit = this.#i, this.#t.count -= 1);
|
|
4914
4914
|
}
|
|
4915
4915
|
#a(e) {
|
|
4916
|
-
return
|
|
4916
|
+
return Et(this.#e) ? (this.#e.exitCode = e || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#i.call(this.#e, this.#e.exitCode)) :
|
|
4917
4917
|
0;
|
|
4918
4918
|
}
|
|
4919
4919
|
#c(e, ...r) {
|
|
4920
4920
|
let n = this.#o;
|
|
4921
|
-
if (e === "exit" &&
|
|
4921
|
+
if (e === "exit" && Et(this.#e)) {
|
|
4922
4922
|
typeof r[0] == "number" && (this.#e.exitCode = r[0]);
|
|
4923
4923
|
let s = n.call(this.#e, e, ...r);
|
|
4924
4924
|
return this.#t.emit("exit", this.#e.exitCode, null), s;
|
|
@@ -4943,7 +4943,7 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4943
4943
|
*
|
|
4944
4944
|
* @internal
|
|
4945
4945
|
*/
|
|
4946
|
-
load:
|
|
4946
|
+
load: zf,
|
|
4947
4947
|
/**
|
|
4948
4948
|
* Unload the listeners. Likely you never need to call this, unless
|
|
4949
4949
|
* doing a rather deep integration with signal-exit functionality.
|
|
@@ -4951,37 +4951,37 @@ unction", "processOk"), kr = Symbol.for("signal-exit emitter"), Tr = globalThis,
|
|
|
4951
4951
|
*
|
|
4952
4952
|
* @internal
|
|
4953
4953
|
*/
|
|
4954
|
-
unload:
|
|
4955
|
-
} =
|
|
4954
|
+
unload: Jf
|
|
4955
|
+
} = Td(Et(Cr) ? new Er(Cr) : new Sr());
|
|
4956
4956
|
|
|
4957
4957
|
// node_modules/execa/lib/kill.js
|
|
4958
|
-
var
|
|
4958
|
+
var Sd = 1e3 * 5, eo = /* @__PURE__ */ i((t, e = "SIGTERM", r = {}) => {
|
|
4959
4959
|
let n = t(e);
|
|
4960
|
-
return
|
|
4961
|
-
}, "spawnedKill"),
|
|
4962
|
-
if (!
|
|
4960
|
+
return Ed(t, e, r, n), n;
|
|
4961
|
+
}, "spawnedKill"), Ed = /* @__PURE__ */ i((t, e, r, n) => {
|
|
4962
|
+
if (!Cd(e, r, n))
|
|
4963
4963
|
return;
|
|
4964
|
-
let s =
|
|
4964
|
+
let s = Ad(r), o = setTimeout(() => {
|
|
4965
4965
|
t("SIGKILL");
|
|
4966
4966
|
}, s);
|
|
4967
4967
|
o.unref && o.unref();
|
|
4968
|
-
}, "setKillTimeout"),
|
|
4969
|
-
(t) => t ===
|
|
4968
|
+
}, "setKillTimeout"), Cd = /* @__PURE__ */ i((t, { forceKillAfterTimeout: e }, r) => Pd(t) && e !== !1 && r, "shouldForceKill"), Pd = /* @__PURE__ */ i(
|
|
4969
|
+
(t) => t === Id.constants.signals.SIGTERM || typeof t == "string" && t.toUpperCase() === "SIGTERM", "isSigterm"), Ad = /* @__PURE__ */ i(({ forceKillAfterTimeout: t = !0 }) => {
|
|
4970
4970
|
if (t === !0)
|
|
4971
|
-
return
|
|
4971
|
+
return Sd;
|
|
4972
4972
|
if (!Number.isFinite(t) || t < 0)
|
|
4973
4973
|
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);
|
|
4974
4974
|
return t;
|
|
4975
4975
|
}, "getForceKillAfterTimeout"), to = /* @__PURE__ */ i((t, e) => {
|
|
4976
4976
|
t.kill() && (e.isCanceled = !0);
|
|
4977
|
-
}, "spawnedCancel"),
|
|
4977
|
+
}, "spawnedCancel"), Od = /* @__PURE__ */ i((t, e, r) => {
|
|
4978
4978
|
t.kill(e), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: e }));
|
|
4979
4979
|
}, "timeoutKill"), ro = /* @__PURE__ */ i((t, { timeout: e, killSignal: r = "SIGTERM" }, n) => {
|
|
4980
4980
|
if (e === 0 || e === void 0)
|
|
4981
4981
|
return n;
|
|
4982
4982
|
let s, o = new Promise((c, p) => {
|
|
4983
4983
|
s = setTimeout(() => {
|
|
4984
|
-
|
|
4984
|
+
Od(t, r, p);
|
|
4985
4985
|
}, e);
|
|
4986
4986
|
}), a = n.finally(() => {
|
|
4987
4987
|
clearTimeout(s);
|
|
@@ -5002,26 +5002,26 @@ var Id = 1e3 * 5, eo = /* @__PURE__ */ i((t, e = "SIGTERM", r = {}) => {
|
|
|
5002
5002
|
}, "setExitHandler");
|
|
5003
5003
|
|
|
5004
5004
|
// node_modules/execa/lib/pipe.js
|
|
5005
|
-
import { createWriteStream as
|
|
5006
|
-
import { ChildProcess as
|
|
5005
|
+
import { createWriteStream as jd } from "node:fs";
|
|
5006
|
+
import { ChildProcess as Rd } from "node:child_process";
|
|
5007
5007
|
|
|
5008
5008
|
// node_modules/is-stream/index.js
|
|
5009
|
-
function
|
|
5009
|
+
function Pt(t) {
|
|
5010
5010
|
return t !== null && typeof t == "object" && typeof t.pipe == "function";
|
|
5011
5011
|
}
|
|
5012
|
-
i(
|
|
5012
|
+
i(Pt, "isStream");
|
|
5013
5013
|
function Pr(t) {
|
|
5014
|
-
return
|
|
5014
|
+
return Pt(t) && t.writable !== !1 && typeof t._write == "function" && typeof t._writableState == "object";
|
|
5015
5015
|
}
|
|
5016
5016
|
i(Pr, "isWritableStream");
|
|
5017
5017
|
|
|
5018
5018
|
// node_modules/execa/lib/pipe.js
|
|
5019
|
-
var
|
|
5019
|
+
var Nd = /* @__PURE__ */ i((t) => t instanceof Rd && typeof t.then == "function", "isExecaChildProcess"), Ar = /* @__PURE__ */ i((t, e, r) => {
|
|
5020
5020
|
if (typeof r == "string")
|
|
5021
|
-
return t[e].pipe(
|
|
5021
|
+
return t[e].pipe(jd(r)), t;
|
|
5022
5022
|
if (Pr(r))
|
|
5023
5023
|
return t[e].pipe(r), t;
|
|
5024
|
-
if (!
|
|
5024
|
+
if (!Nd(r))
|
|
5025
5025
|
throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
|
|
5026
5026
|
if (!Pr(r.stdin))
|
|
5027
5027
|
throw new TypeError("The target child process's stdin must be available.");
|
|
@@ -5032,26 +5032,26 @@ var Rd = /* @__PURE__ */ i((t) => t instanceof jd && typeof t.then == "function"
|
|
|
5032
5032
|
}, "addPipeMethods");
|
|
5033
5033
|
|
|
5034
5034
|
// node_modules/execa/lib/stream.js
|
|
5035
|
-
import { createReadStream as
|
|
5036
|
-
import { setTimeout as
|
|
5035
|
+
import { createReadStream as Qd, readFileSync as eu } from "node:fs";
|
|
5036
|
+
import { setTimeout as tu } from "node:timers/promises";
|
|
5037
5037
|
|
|
5038
5038
|
// node_modules/get-stream/source/contents.js
|
|
5039
|
-
var
|
|
5039
|
+
var Ge = /* @__PURE__ */ i(async (t, { init: e, convertChunk: r, getSize: n, truncateChunk: s, addChunk: o, getFinalChunk: a, finalize: c }, {
|
|
5040
5040
|
maxBuffer: p = Number.POSITIVE_INFINITY } = {}) => {
|
|
5041
|
-
if (!
|
|
5041
|
+
if (!Md(t))
|
|
5042
5042
|
throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
5043
5043
|
let l = e();
|
|
5044
5044
|
l.length = 0;
|
|
5045
5045
|
try {
|
|
5046
5046
|
for await (let f of t) {
|
|
5047
|
-
let x =
|
|
5047
|
+
let x = Ld(f), w = r[x](f, l);
|
|
5048
5048
|
co({ convertedChunk: w, state: l, getSize: n, truncateChunk: s, addChunk: o, maxBuffer: p });
|
|
5049
5049
|
}
|
|
5050
|
-
return
|
|
5050
|
+
return Zd({ state: l, convertChunk: r, getSize: n, truncateChunk: s, addChunk: o, getFinalChunk: a, maxBuffer: p }), c(l);
|
|
5051
5051
|
} catch (f) {
|
|
5052
5052
|
throw f.bufferedData = c(l), f;
|
|
5053
5053
|
}
|
|
5054
|
-
}, "getStreamContents"),
|
|
5054
|
+
}, "getStreamContents"), Zd = /* @__PURE__ */ i(({ state: t, getSize: e, truncateChunk: r, addChunk: n, getFinalChunk: s, maxBuffer: o }) => {
|
|
5055
5055
|
let a = s(t);
|
|
5056
5056
|
a !== void 0 && co({ convertedChunk: a, state: t, getSize: e, truncateChunk: r, addChunk: n, maxBuffer: o });
|
|
5057
5057
|
}, "appendFinalChunk"), co = /* @__PURE__ */ i(({ convertedChunk: t, state: e, getSize: r, truncateChunk: n, addChunk: s, maxBuffer: o }) => {
|
|
@@ -5061,11 +5061,11 @@ maxBuffer: p = Number.POSITIVE_INFINITY } = {}) => {
|
|
|
5061
5061
|
return;
|
|
5062
5062
|
}
|
|
5063
5063
|
let p = n(t, o - e.length);
|
|
5064
|
-
throw p !== void 0 && io(p, e, s, o), new
|
|
5064
|
+
throw p !== void 0 && io(p, e, s, o), new At();
|
|
5065
5065
|
}, "appendChunk"), io = /* @__PURE__ */ i((t, e, r, n) => {
|
|
5066
5066
|
e.contents = r(t, e, n), e.length = n;
|
|
5067
|
-
}, "addNewChunk"),
|
|
5068
|
-
cIterable"),
|
|
5067
|
+
}, "addNewChunk"), Md = /* @__PURE__ */ i((t) => typeof t == "object" && t !== null && typeof t[Symbol.asyncIterator] == "function", "isAsyn\
|
|
5068
|
+
cIterable"), Ld = /* @__PURE__ */ i((t) => {
|
|
5069
5069
|
let e = typeof t;
|
|
5070
5070
|
if (e === "string")
|
|
5071
5071
|
return "string";
|
|
@@ -5076,7 +5076,7 @@ cIterable"), Md = /* @__PURE__ */ i((t) => {
|
|
|
5076
5076
|
let r = ao.call(t);
|
|
5077
5077
|
return r === "[object ArrayBuffer]" ? "arrayBuffer" : r === "[object DataView]" ? "dataView" : Number.isInteger(t.byteLength) && Number.isInteger(
|
|
5078
5078
|
t.byteOffset) && ao.call(t.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
|
|
5079
|
-
}, "getChunkType"), { toString: ao } = Object.prototype,
|
|
5079
|
+
}, "getChunkType"), { toString: ao } = Object.prototype, At = class extends Error {
|
|
5080
5080
|
static {
|
|
5081
5081
|
i(this, "MaxBufferError");
|
|
5082
5082
|
}
|
|
@@ -5088,52 +5088,52 @@ cIterable"), Md = /* @__PURE__ */ i((t) => {
|
|
|
5088
5088
|
|
|
5089
5089
|
// node_modules/get-stream/source/utils.js
|
|
5090
5090
|
var Or = /* @__PURE__ */ i((t) => t, "identity"), jr = /* @__PURE__ */ i(() => {
|
|
5091
|
-
}, "noop"), Rr = /* @__PURE__ */ i(({ contents: t }) => t, "getContentsProp"),
|
|
5091
|
+
}, "noop"), Rr = /* @__PURE__ */ i(({ contents: t }) => t, "getContentsProp"), Ot = /* @__PURE__ */ i((t) => {
|
|
5092
5092
|
throw new Error(`Streams in object mode are not supported: ${String(t)}`);
|
|
5093
|
-
}, "throwObjectStream"),
|
|
5093
|
+
}, "throwObjectStream"), jt = /* @__PURE__ */ i((t) => t.length, "getLengthProp");
|
|
5094
5094
|
|
|
5095
5095
|
// node_modules/get-stream/source/array-buffer.js
|
|
5096
5096
|
async function Nr(t, e) {
|
|
5097
|
-
return
|
|
5097
|
+
return Ge(t, Gd, e);
|
|
5098
5098
|
}
|
|
5099
5099
|
i(Nr, "getStreamAsArrayBuffer");
|
|
5100
|
-
var
|
|
5101
|
-
tEncoder"),
|
|
5102
|
-
t.buffer, t.byteOffset, t.byteLength), "useUint8ArrayWithOffset"),
|
|
5103
|
-
|
|
5104
|
-
let s = mo() ?
|
|
5100
|
+
var Dd = /* @__PURE__ */ i(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), Ud = /* @__PURE__ */ i((t) => $d.encode(t), "useTex\
|
|
5101
|
+
tEncoder"), $d = new TextEncoder(), uo = /* @__PURE__ */ i((t) => new Uint8Array(t), "useUint8Array"), lo = /* @__PURE__ */ i((t) => new Uint8Array(
|
|
5102
|
+
t.buffer, t.byteOffset, t.byteLength), "useUint8ArrayWithOffset"), Vd = /* @__PURE__ */ i((t, e) => t.slice(0, e), "truncateArrayBufferChunk"),
|
|
5103
|
+
Fd = /* @__PURE__ */ i((t, { contents: e, length: r }, n) => {
|
|
5104
|
+
let s = mo() ? Wd(e, n) : Bd(e, n);
|
|
5105
5105
|
return new Uint8Array(s).set(t, r), s;
|
|
5106
|
-
}, "addArrayBufferChunk"),
|
|
5106
|
+
}, "addArrayBufferChunk"), Bd = /* @__PURE__ */ i((t, e) => {
|
|
5107
5107
|
if (e <= t.byteLength)
|
|
5108
5108
|
return t;
|
|
5109
5109
|
let r = new ArrayBuffer(fo(e));
|
|
5110
5110
|
return new Uint8Array(r).set(new Uint8Array(t), 0), r;
|
|
5111
|
-
}, "resizeArrayBufferSlow"),
|
|
5111
|
+
}, "resizeArrayBufferSlow"), Wd = /* @__PURE__ */ i((t, e) => {
|
|
5112
5112
|
if (e <= t.maxByteLength)
|
|
5113
5113
|
return t.resize(e), t;
|
|
5114
5114
|
let r = new ArrayBuffer(e, { maxByteLength: fo(e) });
|
|
5115
5115
|
return new Uint8Array(r).set(new Uint8Array(t), 0), r;
|
|
5116
|
-
}, "resizeArrayBuffer"), fo = /* @__PURE__ */ i((t) => po ** Math.ceil(Math.log(t) / Math.log(po)), "getNewContentsLength"), po = 2,
|
|
5116
|
+
}, "resizeArrayBuffer"), fo = /* @__PURE__ */ i((t) => po ** Math.ceil(Math.log(t) / Math.log(po)), "getNewContentsLength"), po = 2, qd = /* @__PURE__ */ i(
|
|
5117
5117
|
({ contents: t, length: e }) => mo() ? t : t.slice(0, e), "finalizeArrayBuffer"), mo = /* @__PURE__ */ i(() => "resize" in ArrayBuffer.prototype,
|
|
5118
|
-
"hasArrayBufferResize"),
|
|
5119
|
-
init:
|
|
5118
|
+
"hasArrayBufferResize"), Gd = {
|
|
5119
|
+
init: Dd,
|
|
5120
5120
|
convertChunk: {
|
|
5121
|
-
string:
|
|
5121
|
+
string: Ud,
|
|
5122
5122
|
buffer: uo,
|
|
5123
5123
|
arrayBuffer: uo,
|
|
5124
5124
|
dataView: lo,
|
|
5125
5125
|
typedArray: lo,
|
|
5126
|
-
others:
|
|
5126
|
+
others: Ot
|
|
5127
5127
|
},
|
|
5128
|
-
getSize:
|
|
5129
|
-
truncateChunk:
|
|
5130
|
-
addChunk:
|
|
5128
|
+
getSize: jt,
|
|
5129
|
+
truncateChunk: Vd,
|
|
5130
|
+
addChunk: Fd,
|
|
5131
5131
|
getFinalChunk: jr,
|
|
5132
|
-
finalize:
|
|
5132
|
+
finalize: qd
|
|
5133
5133
|
};
|
|
5134
5134
|
|
|
5135
5135
|
// node_modules/get-stream/source/buffer.js
|
|
5136
|
-
async function
|
|
5136
|
+
async function Rt(t, e) {
|
|
5137
5137
|
if (!("Buffer" in globalThis))
|
|
5138
5138
|
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
|
5139
5139
|
try {
|
|
@@ -5142,51 +5142,51 @@ async function jt(t, e) {
|
|
|
5142
5142
|
throw r.bufferedData !== void 0 && (r.bufferedData = ho(r.bufferedData)), r;
|
|
5143
5143
|
}
|
|
5144
5144
|
}
|
|
5145
|
-
i(
|
|
5145
|
+
i(Rt, "getStreamAsBuffer");
|
|
5146
5146
|
var ho = /* @__PURE__ */ i((t) => globalThis.Buffer.from(t), "arrayBufferToNodeBuffer");
|
|
5147
5147
|
|
|
5148
5148
|
// node_modules/get-stream/source/string.js
|
|
5149
5149
|
async function Zr(t, e) {
|
|
5150
|
-
return
|
|
5150
|
+
return Ge(t, Hd, e);
|
|
5151
5151
|
}
|
|
5152
5152
|
i(Zr, "getStreamAsString");
|
|
5153
|
-
var
|
|
5154
|
-
decode(t, { stream: !0 }), "useTextDecoder"),
|
|
5155
|
-
(t, e) => t.slice(0, e), "truncateStringChunk"),
|
|
5153
|
+
var Kd = /* @__PURE__ */ i(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), Nt = /* @__PURE__ */ i((t, { textDecoder: e }) => e.
|
|
5154
|
+
decode(t, { stream: !0 }), "useTextDecoder"), zd = /* @__PURE__ */ i((t, { contents: e }) => e + t, "addStringChunk"), Jd = /* @__PURE__ */ i(
|
|
5155
|
+
(t, e) => t.slice(0, e), "truncateStringChunk"), Yd = /* @__PURE__ */ i(({ textDecoder: t }) => {
|
|
5156
5156
|
let e = t.decode();
|
|
5157
5157
|
return e === "" ? void 0 : e;
|
|
5158
|
-
}, "getFinalStringChunk"),
|
|
5159
|
-
init:
|
|
5158
|
+
}, "getFinalStringChunk"), Hd = {
|
|
5159
|
+
init: Kd,
|
|
5160
5160
|
convertChunk: {
|
|
5161
5161
|
string: Or,
|
|
5162
|
-
buffer:
|
|
5163
|
-
arrayBuffer:
|
|
5164
|
-
dataView:
|
|
5165
|
-
typedArray:
|
|
5166
|
-
others:
|
|
5162
|
+
buffer: Nt,
|
|
5163
|
+
arrayBuffer: Nt,
|
|
5164
|
+
dataView: Nt,
|
|
5165
|
+
typedArray: Nt,
|
|
5166
|
+
others: Ot
|
|
5167
5167
|
},
|
|
5168
|
-
getSize:
|
|
5169
|
-
truncateChunk:
|
|
5170
|
-
addChunk:
|
|
5171
|
-
getFinalChunk:
|
|
5168
|
+
getSize: jt,
|
|
5169
|
+
truncateChunk: Jd,
|
|
5170
|
+
addChunk: zd,
|
|
5171
|
+
getFinalChunk: Yd,
|
|
5172
5172
|
finalize: Rr
|
|
5173
5173
|
};
|
|
5174
5174
|
|
|
5175
5175
|
// node_modules/execa/lib/stream.js
|
|
5176
|
-
var xo =
|
|
5176
|
+
var xo = J(go(), 1);
|
|
5177
5177
|
var bo = /* @__PURE__ */ i((t) => {
|
|
5178
5178
|
if (t !== void 0)
|
|
5179
5179
|
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
5180
|
-
}, "validateInputOptions"),
|
|
5180
|
+
}, "validateInputOptions"), ru = /* @__PURE__ */ i(({ input: t, inputFile: e }) => typeof e != "string" ? t : (bo(t), eu(e)), "getInputSync"),
|
|
5181
5181
|
vo = /* @__PURE__ */ i((t) => {
|
|
5182
|
-
let e =
|
|
5183
|
-
if (
|
|
5182
|
+
let e = ru(t);
|
|
5183
|
+
if (Pt(e))
|
|
5184
5184
|
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
5185
5185
|
return e;
|
|
5186
|
-
}, "handleInputSync"),
|
|
5186
|
+
}, "handleInputSync"), nu = /* @__PURE__ */ i(({ input: t, inputFile: e }) => typeof e != "string" ? t : (bo(t), Qd(e)), "getInput"), _o = /* @__PURE__ */ i(
|
|
5187
5187
|
(t, e) => {
|
|
5188
|
-
let r =
|
|
5189
|
-
r !== void 0 && (
|
|
5188
|
+
let r = nu(e);
|
|
5189
|
+
r !== void 0 && (Pt(r) ? r.pipe(t.stdin) : t.stdin.end(r));
|
|
5190
5190
|
}, "handleInput"), wo = /* @__PURE__ */ i((t, { all: e }) => {
|
|
5191
5191
|
if (!e || !t.stdout && !t.stderr)
|
|
5192
5192
|
return;
|
|
@@ -5194,7 +5194,7 @@ vo = /* @__PURE__ */ i((t) => {
|
|
|
5194
5194
|
return t.stdout && r.add(t.stdout), t.stderr && r.add(t.stderr), r;
|
|
5195
5195
|
}, "makeAllStream"), Mr = /* @__PURE__ */ i(async (t, e) => {
|
|
5196
5196
|
if (!(!t || e === void 0)) {
|
|
5197
|
-
await
|
|
5197
|
+
await tu(0), t.destroy();
|
|
5198
5198
|
try {
|
|
5199
5199
|
return await e;
|
|
5200
5200
|
} catch (r) {
|
|
@@ -5203,8 +5203,8 @@ vo = /* @__PURE__ */ i((t) => {
|
|
|
5203
5203
|
}
|
|
5204
5204
|
}, "getBufferedData"), Lr = /* @__PURE__ */ i((t, { encoding: e, buffer: r, maxBuffer: n }) => {
|
|
5205
5205
|
if (!(!t || !r))
|
|
5206
|
-
return e === "utf8" || e === "utf-8" ? Zr(t, { maxBuffer: n }) : e === null || e === "buffer" ?
|
|
5207
|
-
}, "getStreamPromise"),
|
|
5206
|
+
return e === "utf8" || e === "utf-8" ? Zr(t, { maxBuffer: n }) : e === null || e === "buffer" ? Rt(t, { maxBuffer: n }) : su(t, n, e);
|
|
5207
|
+
}, "getStreamPromise"), su = /* @__PURE__ */ i(async (t, e, r) => (await Rt(t, { maxBuffer: e })).toString(r), "applyEncoding"), ko = /* @__PURE__ */ i(
|
|
5208
5208
|
async ({ stdout: t, stderr: e, all: r }, { encoding: n, buffer: s, maxBuffer: o }, a) => {
|
|
5209
5209
|
let c = Lr(t, { encoding: n, buffer: s, maxBuffer: o }), p = Lr(e, { encoding: n, buffer: s, maxBuffer: o }), l = Lr(r, { encoding: n, buffer: s,
|
|
5210
5210
|
maxBuffer: o * 2 });
|
|
@@ -5221,12 +5221,12 @@ async ({ stdout: t, stderr: e, all: r }, { encoding: n, buffer: s, maxBuffer: o
|
|
|
5221
5221
|
}, "getSpawnedResult");
|
|
5222
5222
|
|
|
5223
5223
|
// node_modules/execa/lib/promise.js
|
|
5224
|
-
var
|
|
5225
|
-
})().constructor.prototype,
|
|
5224
|
+
var ou = (async () => {
|
|
5225
|
+
})().constructor.prototype, iu = ["then", "catch", "finally"].map((t) => [
|
|
5226
5226
|
t,
|
|
5227
|
-
Reflect.getOwnPropertyDescriptor(
|
|
5227
|
+
Reflect.getOwnPropertyDescriptor(ou, t)
|
|
5228
5228
|
]), Dr = /* @__PURE__ */ i((t, e) => {
|
|
5229
|
-
for (let [r, n] of
|
|
5229
|
+
for (let [r, n] of iu) {
|
|
5230
5230
|
let s = typeof e == "function" ? (...o) => Reflect.apply(n.value, e(), o) : n.value.bind(e);
|
|
5231
5231
|
Reflect.defineProperty(t, r, { ...n, value: s });
|
|
5232
5232
|
}
|
|
@@ -5241,11 +5241,11 @@ var su = (async () => {
|
|
|
5241
5241
|
}), "getSpawnedPromise");
|
|
5242
5242
|
|
|
5243
5243
|
// node_modules/execa/lib/command.js
|
|
5244
|
-
import { Buffer as
|
|
5245
|
-
import { ChildProcess as
|
|
5246
|
-
var Eo = /* @__PURE__ */ i((t, e = []) => Array.isArray(e) ? [t, ...e] : [t], "normalizeArgs"),
|
|
5247
|
-
"string" ||
|
|
5248
|
-
d"), $r = /* @__PURE__ */ i((t, e) => Eo(t, e).map((r) =>
|
|
5244
|
+
import { Buffer as au } from "node:buffer";
|
|
5245
|
+
import { ChildProcess as cu } from "node:child_process";
|
|
5246
|
+
var Eo = /* @__PURE__ */ i((t, e = []) => Array.isArray(e) ? [t, ...e] : [t], "normalizeArgs"), du = /^[\w.-]+$/, uu = /* @__PURE__ */ i((t) => typeof t !=
|
|
5247
|
+
"string" || du.test(t) ? t : `"${t.replaceAll('"', '\\"')}"`, "escapeArg"), Ur = /* @__PURE__ */ i((t, e) => Eo(t, e).join(" "), "joinComman\
|
|
5248
|
+
d"), $r = /* @__PURE__ */ i((t, e) => Eo(t, e).map((r) => uu(r)).join(" "), "getEscapedCommand"), Co = / +/g, Po = /* @__PURE__ */ i((t) => {
|
|
5249
5249
|
let e = [];
|
|
5250
5250
|
for (let r of t.trim().split(Co)) {
|
|
5251
5251
|
let n = e.at(-1);
|
|
@@ -5258,11 +5258,11 @@ d"), $r = /* @__PURE__ */ i((t, e) => Eo(t, e).map((r) => du(r)).join(" "), "get
|
|
|
5258
5258
|
return t;
|
|
5259
5259
|
if (e === "number")
|
|
5260
5260
|
return String(t);
|
|
5261
|
-
if (e === "object" && t !== null && !(t instanceof
|
|
5261
|
+
if (e === "object" && t !== null && !(t instanceof cu) && "stdout" in t) {
|
|
5262
5262
|
let r = typeof t.stdout;
|
|
5263
5263
|
if (r === "string")
|
|
5264
5264
|
return t.stdout;
|
|
5265
|
-
if (
|
|
5265
|
+
if (au.isBuffer(t.stdout))
|
|
5266
5266
|
return t.stdout.toString();
|
|
5267
5267
|
throw new TypeError(`Unexpected "${r}" stdout in template expression`);
|
|
5268
5268
|
}
|
|
@@ -5271,7 +5271,7 @@ d"), $r = /* @__PURE__ */ i((t, e) => Eo(t, e).map((r) => du(r)).join(" "), "get
|
|
|
5271
5271
|
...t.slice(0, -1),
|
|
5272
5272
|
`${t.at(-1)}${e[0]}`,
|
|
5273
5273
|
...e.slice(1)
|
|
5274
|
-
], "concatTokens"),
|
|
5274
|
+
], "concatTokens"), lu = /* @__PURE__ */ i(({ templates: t, expressions: e, tokens: r, index: n, template: s }) => {
|
|
5275
5275
|
let o = s ?? t.raw[n], a = o.split(Co).filter(Boolean), c = So(
|
|
5276
5276
|
r,
|
|
5277
5277
|
a,
|
|
@@ -5288,35 +5288,35 @@ d"), $r = /* @__PURE__ */ i((t, e) => Eo(t, e).map((r) => du(r)).join(" "), "get
|
|
|
5288
5288
|
}, "parseTemplate"), Vr = /* @__PURE__ */ i((t, e) => {
|
|
5289
5289
|
let r = [];
|
|
5290
5290
|
for (let [n, s] of t.entries())
|
|
5291
|
-
r =
|
|
5291
|
+
r = lu({ templates: t, expressions: e, tokens: r, index: n, template: s });
|
|
5292
5292
|
return r;
|
|
5293
5293
|
}, "parseTemplates");
|
|
5294
5294
|
|
|
5295
5295
|
// node_modules/execa/lib/verbose.js
|
|
5296
|
-
import { debuglog as
|
|
5297
|
-
import
|
|
5298
|
-
var Ao =
|
|
5296
|
+
import { debuglog as pu } from "node:util";
|
|
5297
|
+
import fu from "node:process";
|
|
5298
|
+
var Ao = pu("execa").enabled, Zt = /* @__PURE__ */ i((t, e) => String(t).padStart(e, "0"), "padField"), mu = /* @__PURE__ */ i(() => {
|
|
5299
5299
|
let t = /* @__PURE__ */ new Date();
|
|
5300
|
-
return `${
|
|
5300
|
+
return `${Zt(t.getHours(), 2)}:${Zt(t.getMinutes(), 2)}:${Zt(t.getSeconds(), 2)}.${Zt(t.getMilliseconds(), 3)}`;
|
|
5301
5301
|
}, "getTimestamp"), Fr = /* @__PURE__ */ i((t, { verbose: e }) => {
|
|
5302
|
-
e &&
|
|
5302
|
+
e && fu.stderr.write(`[${mu()}] ${t}
|
|
5303
5303
|
`);
|
|
5304
5304
|
}, "logCommand");
|
|
5305
5305
|
|
|
5306
5306
|
// node_modules/execa/index.js
|
|
5307
|
-
var
|
|
5308
|
-
let o = e ? { ...
|
|
5307
|
+
var gu = 1e3 * 1e3 * 100, xu = /* @__PURE__ */ i(({ env: t, extendEnv: e, preferLocal: r, localDir: n, execPath: s }) => {
|
|
5308
|
+
let o = e ? { ...Mt.env, ...t } : t;
|
|
5309
5309
|
return r ? qs({ env: o, cwd: n, execPath: s }) : o;
|
|
5310
5310
|
}, "getEnv"), Ro = /* @__PURE__ */ i((t, e, r = {}) => {
|
|
5311
5311
|
let n = jo.default._parse(t, e, r);
|
|
5312
5312
|
return t = n.command, e = n.args, r = n.options, r = {
|
|
5313
|
-
maxBuffer:
|
|
5313
|
+
maxBuffer: gu,
|
|
5314
5314
|
buffer: !0,
|
|
5315
5315
|
stripFinalNewline: !0,
|
|
5316
5316
|
extendEnv: !0,
|
|
5317
5317
|
preferLocal: !1,
|
|
5318
|
-
localDir: r.cwd ||
|
|
5319
|
-
execPath:
|
|
5318
|
+
localDir: r.cwd || Mt.cwd(),
|
|
5319
|
+
execPath: Mt.execPath,
|
|
5320
5320
|
encoding: "utf8",
|
|
5321
5321
|
reject: !0,
|
|
5322
5322
|
cleanup: !0,
|
|
@@ -5324,9 +5324,9 @@ var yu = 1e3 * 1e3 * 100, gu = /* @__PURE__ */ i(({ env: t, extendEnv: e, prefer
|
|
|
5324
5324
|
windowsHide: !0,
|
|
5325
5325
|
verbose: Ao,
|
|
5326
5326
|
...r
|
|
5327
|
-
}, r.env =
|
|
5327
|
+
}, r.env = xu(r), r.stdio = Xs(r), Mt.platform === "win32" && yu.basename(t, ".exe") === "cmd" && e.unshift("/q"), { file: t, args: e, options: r,
|
|
5328
5328
|
parsed: n };
|
|
5329
|
-
}, "handleArguments"),
|
|
5329
|
+
}, "handleArguments"), Ke = /* @__PURE__ */ i((t, e, r) => typeof e != "string" && !hu.isBuffer(e) ? r === void 0 ? void 0 : "" : t.stripFinalNewline ?
|
|
5330
5330
|
br(e) : e, "handleOutput");
|
|
5331
5331
|
function No(t, e, r) {
|
|
5332
5332
|
let n = Ro(t, e, r), s = Ur(t, e), o = $r(t, e);
|
|
@@ -5335,7 +5335,7 @@ function No(t, e, r) {
|
|
|
5335
5335
|
try {
|
|
5336
5336
|
a = Br.spawn(n.file, n.args, n.options);
|
|
5337
5337
|
} catch (_) {
|
|
5338
|
-
let C = new Br.ChildProcess(), S = Promise.reject(
|
|
5338
|
+
let C = new Br.ChildProcess(), S = Promise.reject(qe({
|
|
5339
5339
|
error: _,
|
|
5340
5340
|
stdout: "",
|
|
5341
5341
|
stderr: "",
|
|
@@ -5352,16 +5352,16 @@ function No(t, e, r) {
|
|
|
5352
5352
|
let c = To(a), p = ro(a, n.options, c), l = so(a, n.options, p), f = { isCanceled: !1 };
|
|
5353
5353
|
a.kill = eo.bind(null, a.kill.bind(a)), a.cancel = to.bind(null, a, f);
|
|
5354
5354
|
let w = Ks(/* @__PURE__ */ i(async () => {
|
|
5355
|
-
let [{ error: _, exitCode: C, signal: S, timedOut: P }, $,
|
|
5356
|
-
|
|
5355
|
+
let [{ error: _, exitCode: C, signal: S, timedOut: P }, $, Ne, ve] = await ko(a, n.options, l), Ze = Ke(n.options, $), rt = Ke(n.options,
|
|
5356
|
+
Ne), nt = Ke(n.options, ve);
|
|
5357
5357
|
if (_ || C !== 0 || S !== null) {
|
|
5358
|
-
let k =
|
|
5358
|
+
let k = qe({
|
|
5359
5359
|
error: _,
|
|
5360
5360
|
exitCode: C,
|
|
5361
5361
|
signal: S,
|
|
5362
|
-
stdout:
|
|
5363
|
-
stderr:
|
|
5364
|
-
all:
|
|
5362
|
+
stdout: Ze,
|
|
5363
|
+
stderr: rt,
|
|
5364
|
+
all: nt,
|
|
5365
5365
|
command: s,
|
|
5366
5366
|
escapedCommand: o,
|
|
5367
5367
|
parsed: n,
|
|
@@ -5377,9 +5377,9 @@ function No(t, e, r) {
|
|
|
5377
5377
|
command: s,
|
|
5378
5378
|
escapedCommand: o,
|
|
5379
5379
|
exitCode: 0,
|
|
5380
|
-
stdout:
|
|
5381
|
-
stderr:
|
|
5382
|
-
all:
|
|
5380
|
+
stdout: Ze,
|
|
5381
|
+
stderr: rt,
|
|
5382
|
+
all: nt,
|
|
5383
5383
|
failed: !1,
|
|
5384
5384
|
timedOut: !1,
|
|
5385
5385
|
isCanceled: !1,
|
|
@@ -5389,14 +5389,14 @@ function No(t, e, r) {
|
|
|
5389
5389
|
return _o(a, n.options), a.all = wo(a, n.options), oo(a), Dr(a, w), a;
|
|
5390
5390
|
}
|
|
5391
5391
|
i(No, "execa");
|
|
5392
|
-
function
|
|
5392
|
+
function bu(t, e, r) {
|
|
5393
5393
|
let n = Ro(t, e, r), s = Ur(t, e), o = $r(t, e);
|
|
5394
5394
|
Fr(o, n.options);
|
|
5395
5395
|
let a = vo(n.options), c;
|
|
5396
5396
|
try {
|
|
5397
5397
|
c = Br.spawnSync(n.file, n.args, { ...n.options, input: a });
|
|
5398
5398
|
} catch (f) {
|
|
5399
|
-
throw
|
|
5399
|
+
throw qe({
|
|
5400
5400
|
error: f,
|
|
5401
5401
|
stdout: "",
|
|
5402
5402
|
stderr: "",
|
|
@@ -5409,9 +5409,9 @@ function xu(t, e, r) {
|
|
|
5409
5409
|
killed: !1
|
|
5410
5410
|
});
|
|
5411
5411
|
}
|
|
5412
|
-
let p =
|
|
5412
|
+
let p = Ke(n.options, c.stdout, c.error), l = Ke(n.options, c.stderr, c.error);
|
|
5413
5413
|
if (c.error || c.status !== 0 || c.signal !== null) {
|
|
5414
|
-
let f =
|
|
5414
|
+
let f = qe({
|
|
5415
5415
|
stdout: p,
|
|
5416
5416
|
stderr: l,
|
|
5417
5417
|
error: c.error,
|
|
@@ -5440,11 +5440,11 @@ function xu(t, e, r) {
|
|
|
5440
5440
|
killed: !1
|
|
5441
5441
|
};
|
|
5442
5442
|
}
|
|
5443
|
-
i(
|
|
5444
|
-
var
|
|
5443
|
+
i(bu, "execaSync");
|
|
5444
|
+
var vu = /* @__PURE__ */ i(({ input: t, inputFile: e, stdio: r }) => t === void 0 && e === void 0 && r === void 0 ? { stdin: "inherit" } : {},
|
|
5445
5445
|
"normalizeScriptStdin"), Oo = /* @__PURE__ */ i((t = {}) => ({
|
|
5446
5446
|
preferLocal: !0,
|
|
5447
|
-
...
|
|
5447
|
+
...vu(t),
|
|
5448
5448
|
...t
|
|
5449
5449
|
}), "normalizeScriptOptions");
|
|
5450
5450
|
function Zo(t) {
|
|
@@ -5458,45 +5458,45 @@ function Zo(t) {
|
|
|
5458
5458
|
if (!Array.isArray(r))
|
|
5459
5459
|
throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
|
|
5460
5460
|
let [s, ...o] = Vr(r, n);
|
|
5461
|
-
return
|
|
5461
|
+
return bu(s, o, Oo(t));
|
|
5462
5462
|
}, e;
|
|
5463
5463
|
}
|
|
5464
5464
|
i(Zo, "create$");
|
|
5465
|
-
var
|
|
5466
|
-
function
|
|
5465
|
+
var hh = Zo();
|
|
5466
|
+
function ze(t, e) {
|
|
5467
5467
|
let [r, ...n] = Po(t);
|
|
5468
5468
|
return No(r, n, e);
|
|
5469
5469
|
}
|
|
5470
|
-
i(
|
|
5470
|
+
i(ze, "execaCommand");
|
|
5471
5471
|
|
|
5472
5472
|
// src/telemetry/exec-command-count-lines.ts
|
|
5473
|
-
async function
|
|
5474
|
-
let r =
|
|
5473
|
+
async function Lt(t, e) {
|
|
5474
|
+
let r = ze(t, { shell: !0, buffer: !1, ...e });
|
|
5475
5475
|
if (!r.stdout)
|
|
5476
5476
|
throw new Error("Unexpected missing stdout");
|
|
5477
|
-
let n = 0, s =
|
|
5477
|
+
let n = 0, s = _u(r.stdout);
|
|
5478
5478
|
return s.on("line", () => {
|
|
5479
5479
|
n += 1;
|
|
5480
5480
|
}), await r, s.close(), n;
|
|
5481
5481
|
}
|
|
5482
|
-
i(
|
|
5482
|
+
i(Lt, "execCommandCountLines");
|
|
5483
5483
|
|
|
5484
5484
|
// src/common/utils/file-cache.ts
|
|
5485
|
-
import { createHash as Lo, randomBytes as
|
|
5486
|
-
import { mkdirSync as qr, readFileSync as
|
|
5487
|
-
import { readFile as Uo, readdir as $o, rm as Vo, writeFile as
|
|
5488
|
-
import { tmpdir as
|
|
5489
|
-
import { join as
|
|
5490
|
-
var
|
|
5485
|
+
import { createHash as Lo, randomBytes as wu } from "node:crypto";
|
|
5486
|
+
import { mkdirSync as qr, readFileSync as ku, readdirSync as Tu, rmSync as Do, writeFileSync as Iu } from "node:fs";
|
|
5487
|
+
import { readFile as Uo, readdir as $o, rm as Vo, writeFile as Su } from "node:fs/promises";
|
|
5488
|
+
import { tmpdir as Eu } from "node:os";
|
|
5489
|
+
import { join as Je } from "node:path";
|
|
5490
|
+
var Dt = class {
|
|
5491
5491
|
static {
|
|
5492
5492
|
i(this, "FileSystemCache");
|
|
5493
5493
|
}
|
|
5494
5494
|
constructor(e = {}) {
|
|
5495
|
-
this.prefix = (e.ns || e.prefix || "") + "-", this.hash_alg = e.hash_alg || "sha256", this.cache_dir = e.basePath ||
|
|
5495
|
+
this.prefix = (e.ns || e.prefix || "") + "-", this.hash_alg = e.hash_alg || "sha256", this.cache_dir = e.basePath || Je(Eu(), wu(15).toString(
|
|
5496
5496
|
"base64").replace(/\//g, "-")), this.ttl = e.ttl || 0, Lo(this.hash_alg), qr(this.cache_dir, { recursive: !0 });
|
|
5497
5497
|
}
|
|
5498
5498
|
generateHash(e) {
|
|
5499
|
-
return
|
|
5499
|
+
return Je(this.cache_dir, this.prefix + Lo(this.hash_alg).update(e).digest("hex"));
|
|
5500
5500
|
}
|
|
5501
5501
|
isExpired(e, r) {
|
|
5502
5502
|
return e.ttl != null && r > e.ttl;
|
|
@@ -5519,7 +5519,7 @@ var Lt = class {
|
|
|
5519
5519
|
}
|
|
5520
5520
|
getSync(e, r) {
|
|
5521
5521
|
try {
|
|
5522
|
-
let n =
|
|
5522
|
+
let n = ku(this.generateHash(e), "utf8");
|
|
5523
5523
|
return this.parseCacheData(n, r);
|
|
5524
5524
|
} catch {
|
|
5525
5525
|
return r;
|
|
@@ -5527,13 +5527,13 @@ var Lt = class {
|
|
|
5527
5527
|
}
|
|
5528
5528
|
async set(e, r, n = {}) {
|
|
5529
5529
|
let s = typeof n == "number" ? { ttl: n } : n;
|
|
5530
|
-
qr(this.cache_dir, { recursive: !0 }), await
|
|
5530
|
+
qr(this.cache_dir, { recursive: !0 }), await Su(this.generateHash(e), this.parseSetData(e, r, s), {
|
|
5531
5531
|
encoding: s.encoding || "utf8"
|
|
5532
5532
|
});
|
|
5533
5533
|
}
|
|
5534
5534
|
setSync(e, r, n = {}) {
|
|
5535
5535
|
let s = typeof n == "number" ? { ttl: n } : n;
|
|
5536
|
-
qr(this.cache_dir, { recursive: !0 }),
|
|
5536
|
+
qr(this.cache_dir, { recursive: !0 }), Iu(this.generateHash(e), this.parseSetData(e, r, s), {
|
|
5537
5537
|
encoding: s.encoding || "utf8"
|
|
5538
5538
|
});
|
|
5539
5539
|
}
|
|
@@ -5552,16 +5552,16 @@ var Lt = class {
|
|
|
5552
5552
|
async clear() {
|
|
5553
5553
|
let e = await $o(this.cache_dir);
|
|
5554
5554
|
await Promise.all(
|
|
5555
|
-
e.filter((r) => r.startsWith(this.prefix)).map((r) => Vo(
|
|
5555
|
+
e.filter((r) => r.startsWith(this.prefix)).map((r) => Vo(Je(this.cache_dir, r), { force: !0 }))
|
|
5556
5556
|
);
|
|
5557
5557
|
}
|
|
5558
5558
|
clearSync() {
|
|
5559
|
-
|
|
5559
|
+
Tu(this.cache_dir).filter((e) => e.startsWith(this.prefix)).forEach((e) => Do(Je(this.cache_dir, e), { force: !0 }));
|
|
5560
5560
|
}
|
|
5561
5561
|
async getAll() {
|
|
5562
5562
|
let e = Date.now(), r = await $o(this.cache_dir);
|
|
5563
5563
|
return (await Promise.all(
|
|
5564
|
-
r.filter((s) => s.startsWith(this.prefix)).map((s) => Uo(
|
|
5564
|
+
r.filter((s) => s.startsWith(this.prefix)).map((s) => Uo(Je(this.cache_dir, s), "utf8"))
|
|
5565
5565
|
)).map((s) => JSON.parse(s)).filter((s) => s.content && !this.isExpired(s, e));
|
|
5566
5566
|
}
|
|
5567
5567
|
async load() {
|
|
@@ -5575,7 +5575,7 @@ var Lt = class {
|
|
|
5575
5575
|
}
|
|
5576
5576
|
};
|
|
5577
5577
|
function Gr(t) {
|
|
5578
|
-
return new
|
|
5578
|
+
return new Dt(t);
|
|
5579
5579
|
}
|
|
5580
5580
|
i(Gr, "createFileSystemCache");
|
|
5581
5581
|
|
|
@@ -5583,30 +5583,30 @@ i(Gr, "createFileSystemCache");
|
|
|
5583
5583
|
import { join as si } from "node:path";
|
|
5584
5584
|
|
|
5585
5585
|
// node_modules/find-cache-dir/index.js
|
|
5586
|
-
var ni =
|
|
5587
|
-
import
|
|
5588
|
-
import
|
|
5589
|
-
import
|
|
5586
|
+
var ni = J(Bo(), 1);
|
|
5587
|
+
import Du from "node:process";
|
|
5588
|
+
import He from "node:path";
|
|
5589
|
+
import Bt from "node:fs";
|
|
5590
5590
|
|
|
5591
5591
|
// ../node_modules/pkg-dir/index.js
|
|
5592
|
-
import
|
|
5592
|
+
import Lu from "node:path";
|
|
5593
5593
|
|
|
5594
5594
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
5595
|
-
import
|
|
5596
|
-
import { fileURLToPath as
|
|
5595
|
+
import Ft from "node:path";
|
|
5596
|
+
import { fileURLToPath as Ru } from "node:url";
|
|
5597
5597
|
|
|
5598
5598
|
// ../node_modules/locate-path/index.js
|
|
5599
5599
|
import Ko from "node:process";
|
|
5600
5600
|
import zo from "node:path";
|
|
5601
5601
|
import qo, { promises as Go } from "node:fs";
|
|
5602
|
-
import { fileURLToPath as
|
|
5602
|
+
import { fileURLToPath as ju } from "node:url";
|
|
5603
5603
|
|
|
5604
5604
|
// ../node_modules/locate-path/node_modules/p-limit/index.js
|
|
5605
5605
|
Wo();
|
|
5606
|
-
function
|
|
5606
|
+
function Ut(t) {
|
|
5607
5607
|
if (!((Number.isInteger(t) || t === Number.POSITIVE_INFINITY) && t > 0))
|
|
5608
5608
|
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
5609
|
-
let e = new
|
|
5609
|
+
let e = new Ye(), r = 0, n = /* @__PURE__ */ i(() => {
|
|
5610
5610
|
r--, e.size > 0 && e.dequeue()();
|
|
5611
5611
|
}, "next"), s = /* @__PURE__ */ i(async (c, p, l) => {
|
|
5612
5612
|
r++;
|
|
@@ -5636,31 +5636,31 @@ function Dt(t) {
|
|
|
5636
5636
|
}
|
|
5637
5637
|
}), a;
|
|
5638
5638
|
}
|
|
5639
|
-
i(
|
|
5639
|
+
i(Ut, "pLimit");
|
|
5640
5640
|
|
|
5641
5641
|
// ../node_modules/locate-path/node_modules/p-locate/index.js
|
|
5642
|
-
var
|
|
5642
|
+
var $t = class extends Error {
|
|
5643
5643
|
static {
|
|
5644
5644
|
i(this, "EndError");
|
|
5645
5645
|
}
|
|
5646
5646
|
constructor(e) {
|
|
5647
5647
|
super(), this.value = e;
|
|
5648
5648
|
}
|
|
5649
|
-
},
|
|
5649
|
+
}, Au = /* @__PURE__ */ i(async (t, e) => e(await t), "testElement"), Ou = /* @__PURE__ */ i(async (t) => {
|
|
5650
5650
|
let e = await Promise.all(t);
|
|
5651
5651
|
if (e[1] === !0)
|
|
5652
|
-
throw new
|
|
5652
|
+
throw new $t(e[0]);
|
|
5653
5653
|
return !1;
|
|
5654
5654
|
}, "finder");
|
|
5655
5655
|
async function zr(t, e, {
|
|
5656
5656
|
concurrency: r = Number.POSITIVE_INFINITY,
|
|
5657
5657
|
preserveOrder: n = !0
|
|
5658
5658
|
} = {}) {
|
|
5659
|
-
let s =
|
|
5659
|
+
let s = Ut(r), o = [...t].map((c) => [c, s(Au, c, e)]), a = Ut(n ? 1 : Number.POSITIVE_INFINITY);
|
|
5660
5660
|
try {
|
|
5661
|
-
await Promise.all(o.map((c) => a(
|
|
5661
|
+
await Promise.all(o.map((c) => a(Ou, c)));
|
|
5662
5662
|
} catch (c) {
|
|
5663
|
-
if (c instanceof
|
|
5663
|
+
if (c instanceof $t)
|
|
5664
5664
|
return c.value;
|
|
5665
5665
|
throw c;
|
|
5666
5666
|
}
|
|
@@ -5677,8 +5677,8 @@ function Yo(t) {
|
|
|
5677
5677
|
throw new Error(`Invalid type specified: ${t}`);
|
|
5678
5678
|
}
|
|
5679
5679
|
i(Yo, "checkType");
|
|
5680
|
-
var Ho = /* @__PURE__ */ i((t, e) => e[Jo[t]](), "matchType"), Xo = /* @__PURE__ */ i((t) => t instanceof URL ?
|
|
5681
|
-
async function
|
|
5680
|
+
var Ho = /* @__PURE__ */ i((t, e) => e[Jo[t]](), "matchType"), Xo = /* @__PURE__ */ i((t) => t instanceof URL ? ju(t) : t, "toPath");
|
|
5681
|
+
async function Vt(t, {
|
|
5682
5682
|
cwd: e = Ko.cwd(),
|
|
5683
5683
|
type: r = "file",
|
|
5684
5684
|
allowSymlinks: n = !0,
|
|
@@ -5696,8 +5696,8 @@ async function $t(t, {
|
|
|
5696
5696
|
}
|
|
5697
5697
|
}, { concurrency: s, preserveOrder: o });
|
|
5698
5698
|
}
|
|
5699
|
-
i(
|
|
5700
|
-
function
|
|
5699
|
+
i(Vt, "locatePath");
|
|
5700
|
+
function je(t, {
|
|
5701
5701
|
cwd: e = Ko.cwd(),
|
|
5702
5702
|
type: r = "file",
|
|
5703
5703
|
allowSymlinks: n = !0
|
|
@@ -5716,71 +5716,71 @@ function Oe(t, {
|
|
|
5716
5716
|
} catch {
|
|
5717
5717
|
}
|
|
5718
5718
|
}
|
|
5719
|
-
i(
|
|
5719
|
+
i(je, "locatePathSync");
|
|
5720
5720
|
|
|
5721
5721
|
// ../node_modules/pkg-dir/node_modules/path-exists/index.js
|
|
5722
|
-
import
|
|
5722
|
+
import Jh, { promises as Yh } from "node:fs";
|
|
5723
5723
|
|
|
5724
5724
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
5725
|
-
var
|
|
5726
|
-
function
|
|
5727
|
-
let r =
|
|
5725
|
+
var Nu = /* @__PURE__ */ i((t) => t instanceof URL ? Ru(t) : t, "toPath"), Zu = Symbol("findUpStop");
|
|
5726
|
+
function Mu(t, e = {}) {
|
|
5727
|
+
let r = Ft.resolve(Nu(e.cwd) || ""), { root: n } = Ft.parse(r), s = e.stopAt || n, o = e.limit || Number.POSITIVE_INFINITY, a = [t].flat(),
|
|
5728
5728
|
c = /* @__PURE__ */ i((l) => {
|
|
5729
5729
|
if (typeof t != "function")
|
|
5730
|
-
return
|
|
5730
|
+
return je(a, l);
|
|
5731
5731
|
let f = t(l.cwd);
|
|
5732
|
-
return typeof f == "string" ?
|
|
5732
|
+
return typeof f == "string" ? je([f], l) : f;
|
|
5733
5733
|
}, "runMatcher"), p = [];
|
|
5734
5734
|
for (; ; ) {
|
|
5735
5735
|
let l = c({ ...e, cwd: r });
|
|
5736
|
-
if (l ===
|
|
5736
|
+
if (l === Zu || (l && p.push(Ft.resolve(r, l)), r === s || p.length >= o))
|
|
5737
5737
|
break;
|
|
5738
|
-
r =
|
|
5738
|
+
r = Ft.dirname(r);
|
|
5739
5739
|
}
|
|
5740
5740
|
return p;
|
|
5741
5741
|
}
|
|
5742
|
-
i(
|
|
5742
|
+
i(Mu, "findUpMultipleSync");
|
|
5743
5743
|
function Qo(t, e = {}) {
|
|
5744
|
-
return
|
|
5744
|
+
return Mu(t, { ...e, limit: 1 })[0];
|
|
5745
5745
|
}
|
|
5746
5746
|
i(Qo, "findUpSync");
|
|
5747
5747
|
|
|
5748
5748
|
// ../node_modules/pkg-dir/index.js
|
|
5749
5749
|
function ei({ cwd: t } = {}) {
|
|
5750
5750
|
let e = Qo("package.json", { cwd: t });
|
|
5751
|
-
return e &&
|
|
5751
|
+
return e && Lu.dirname(e);
|
|
5752
5752
|
}
|
|
5753
5753
|
i(ei, "packageDirectorySync");
|
|
5754
5754
|
|
|
5755
5755
|
// node_modules/find-cache-dir/index.js
|
|
5756
|
-
var { env: Jr, cwd:
|
|
5756
|
+
var { env: Jr, cwd: Uu } = Du, ti = /* @__PURE__ */ i((t) => {
|
|
5757
5757
|
try {
|
|
5758
|
-
return
|
|
5758
|
+
return Bt.accessSync(t, Bt.constants.W_OK), !0;
|
|
5759
5759
|
} catch {
|
|
5760
5760
|
return !1;
|
|
5761
5761
|
}
|
|
5762
5762
|
}, "isWritable");
|
|
5763
5763
|
function ri(t, e) {
|
|
5764
|
-
return e.create &&
|
|
5764
|
+
return e.create && Bt.mkdirSync(t, { recursive: !0 }), t;
|
|
5765
5765
|
}
|
|
5766
5766
|
i(ri, "useDirectory");
|
|
5767
|
-
function
|
|
5768
|
-
let e =
|
|
5769
|
-
if (!(!ti(e) && (
|
|
5767
|
+
function $u(t) {
|
|
5768
|
+
let e = He.join(t, "node_modules");
|
|
5769
|
+
if (!(!ti(e) && (Bt.existsSync(e) || !ti(He.join(t)))))
|
|
5770
5770
|
return e;
|
|
5771
5771
|
}
|
|
5772
|
-
i(
|
|
5772
|
+
i($u, "getNodeModuleDirectory");
|
|
5773
5773
|
function Yr(t = {}) {
|
|
5774
5774
|
if (Jr.CACHE_DIR && !["true", "false", "1", "0"].includes(Jr.CACHE_DIR))
|
|
5775
|
-
return ri(
|
|
5776
|
-
let { cwd: e =
|
|
5775
|
+
return ri(He.join(Jr.CACHE_DIR, t.name), t);
|
|
5776
|
+
let { cwd: e = Uu(), files: r } = t;
|
|
5777
5777
|
if (r) {
|
|
5778
5778
|
if (!Array.isArray(r))
|
|
5779
5779
|
throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof r}\`.`);
|
|
5780
|
-
e = (0, ni.default)(r.map((s) =>
|
|
5780
|
+
e = (0, ni.default)(r.map((s) => He.resolve(e, s)));
|
|
5781
5781
|
}
|
|
5782
|
-
if (e = ei({ cwd: e }), !(!e ||
|
|
5783
|
-
return ri(
|
|
5782
|
+
if (e = ei({ cwd: e }), !(!e || !$u(e)))
|
|
5783
|
+
return ri(He.join(e, "node_modules", ".cache", t.name), t);
|
|
5784
5784
|
}
|
|
5785
5785
|
i(Yr, "findCacheDirectory");
|
|
5786
5786
|
|
|
@@ -5795,24 +5795,24 @@ i(oi, "resolvePathInStorybookCache");
|
|
|
5795
5795
|
import W from "node:path";
|
|
5796
5796
|
|
|
5797
5797
|
// ../node_modules/find-up/node_modules/unicorn-magic/node.js
|
|
5798
|
-
import { fileURLToPath as
|
|
5799
|
-
function
|
|
5800
|
-
return t instanceof URL ?
|
|
5798
|
+
import { fileURLToPath as Vu } from "node:url";
|
|
5799
|
+
function Xe(t) {
|
|
5800
|
+
return t instanceof URL ? Vu(t) : t;
|
|
5801
5801
|
}
|
|
5802
|
-
i(
|
|
5802
|
+
i(Xe, "toPath");
|
|
5803
5803
|
|
|
5804
5804
|
// ../node_modules/find-up/node_modules/path-exists/index.js
|
|
5805
|
-
import
|
|
5805
|
+
import Ey, { promises as Cy } from "node:fs";
|
|
5806
5806
|
|
|
5807
5807
|
// ../node_modules/find-up/index.js
|
|
5808
5808
|
var ii = Symbol("findUpStop");
|
|
5809
|
-
async function
|
|
5810
|
-
let r = W.resolve(
|
|
5809
|
+
async function Fu(t, e = {}) {
|
|
5810
|
+
let r = W.resolve(Xe(e.cwd) ?? ""), { root: n } = W.parse(r), s = W.resolve(r, Xe(e.stopAt ?? n)), o = e.limit ?? Number.POSITIVE_INFINITY,
|
|
5811
5811
|
a = [t].flat(), c = /* @__PURE__ */ i(async (l) => {
|
|
5812
5812
|
if (typeof t != "function")
|
|
5813
|
-
return
|
|
5813
|
+
return Vt(a, l);
|
|
5814
5814
|
let f = await t(l.cwd);
|
|
5815
|
-
return typeof f == "string" ?
|
|
5815
|
+
return typeof f == "string" ? Vt([f], l) : f;
|
|
5816
5816
|
}, "runMatcher"), p = [];
|
|
5817
5817
|
for (; ; ) {
|
|
5818
5818
|
let l = await c({ ...e, cwd: r });
|
|
@@ -5822,14 +5822,14 @@ async function Vu(t, e = {}) {
|
|
|
5822
5822
|
}
|
|
5823
5823
|
return p;
|
|
5824
5824
|
}
|
|
5825
|
-
i(
|
|
5826
|
-
function
|
|
5827
|
-
let r = W.resolve(
|
|
5825
|
+
i(Fu, "findUpMultiple");
|
|
5826
|
+
function Bu(t, e = {}) {
|
|
5827
|
+
let r = W.resolve(Xe(e.cwd) ?? ""), { root: n } = W.parse(r), s = W.resolve(r, Xe(e.stopAt) ?? n), o = e.limit ?? Number.POSITIVE_INFINITY,
|
|
5828
5828
|
a = [t].flat(), c = /* @__PURE__ */ i((l) => {
|
|
5829
5829
|
if (typeof t != "function")
|
|
5830
|
-
return
|
|
5830
|
+
return je(a, l);
|
|
5831
5831
|
let f = t(l.cwd);
|
|
5832
|
-
return typeof f == "string" ?
|
|
5832
|
+
return typeof f == "string" ? je([f], l) : f;
|
|
5833
5833
|
}, "runMatcher"), p = [];
|
|
5834
5834
|
for (; ; ) {
|
|
5835
5835
|
let l = c({ ...e, cwd: r });
|
|
@@ -5839,109 +5839,108 @@ function Fu(t, e = {}) {
|
|
|
5839
5839
|
}
|
|
5840
5840
|
return p;
|
|
5841
5841
|
}
|
|
5842
|
-
i(
|
|
5842
|
+
i(Bu, "findUpMultipleSync");
|
|
5843
5843
|
async function ai(t, e = {}) {
|
|
5844
|
-
return (await
|
|
5844
|
+
return (await Fu(t, { ...e, limit: 1 }))[0];
|
|
5845
5845
|
}
|
|
5846
5846
|
i(ai, "findUp");
|
|
5847
|
-
function
|
|
5848
|
-
return
|
|
5847
|
+
function Qe(t, e = {}) {
|
|
5848
|
+
return Bu(t, { ...e, limit: 1 })[0];
|
|
5849
5849
|
}
|
|
5850
|
-
i(
|
|
5850
|
+
i(Qe, "findUpSync");
|
|
5851
5851
|
|
|
5852
5852
|
// src/common/utils/paths.ts
|
|
5853
|
-
import { join as
|
|
5853
|
+
import { join as di, relative as Ju, resolve as Vy, sep as Wt } from "node:path";
|
|
5854
5854
|
|
|
5855
5855
|
// src/common/js-package-manager/constants.ts
|
|
5856
|
-
var
|
|
5857
|
-
Bu,
|
|
5856
|
+
var Wu = "package-lock.json", qu = "pnpm-lock.yaml", Gu = "yarn.lock", Ku = "bun.lock", zu = "bun.lockb", ci = [
|
|
5858
5857
|
Wu,
|
|
5859
5858
|
qu,
|
|
5860
5859
|
Gu,
|
|
5861
|
-
Ku
|
|
5860
|
+
Ku,
|
|
5861
|
+
zu
|
|
5862
5862
|
];
|
|
5863
5863
|
|
|
5864
5864
|
// src/common/utils/paths.ts
|
|
5865
|
-
var
|
|
5866
|
-
if (
|
|
5867
|
-
return
|
|
5868
|
-
let t;
|
|
5865
|
+
var q, qt = /* @__PURE__ */ i(() => {
|
|
5866
|
+
if (q)
|
|
5867
|
+
return q;
|
|
5869
5868
|
if (process.env.STORYBOOK_PROJECT_ROOT)
|
|
5870
5869
|
return process.env.STORYBOOK_PROJECT_ROOT;
|
|
5871
5870
|
try {
|
|
5872
|
-
let
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
}
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
} catch {
|
|
5880
|
-
}
|
|
5881
|
-
try {
|
|
5882
|
-
let e = Xe(".hg", { type: "directory" });
|
|
5883
|
-
e && (t = t || Bt(e, ".."));
|
|
5884
|
-
} catch {
|
|
5871
|
+
let t = Qe(".git", { type: "directory" }) || Qe(".svn", { type: "directory" }) || Qe(".hg", { type: "directory" });
|
|
5872
|
+
if (t)
|
|
5873
|
+
return q = di(t, ".."), q;
|
|
5874
|
+
} catch (t) {
|
|
5875
|
+
process.stdout.write(`
|
|
5876
|
+
error searching for repository root: ${t}
|
|
5877
|
+
`);
|
|
5885
5878
|
}
|
|
5886
5879
|
try {
|
|
5887
|
-
let
|
|
5888
|
-
|
|
5889
|
-
|
|
5880
|
+
let t = Qe(ci, { type: "file" });
|
|
5881
|
+
if (t)
|
|
5882
|
+
return q = di(t, ".."), q;
|
|
5883
|
+
} catch (t) {
|
|
5884
|
+
process.stdout.write(`
|
|
5885
|
+
error searching for lock file: ${t}
|
|
5886
|
+
`);
|
|
5890
5887
|
}
|
|
5891
5888
|
try {
|
|
5892
|
-
let e =
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5889
|
+
let [t, e] = __dirname.split(`${Wt}node_modules${Wt}`, 2);
|
|
5890
|
+
if (e && !t.includes(`${Wt}npm-cache${Wt}`) && !Ju(t, process.cwd()).startsWith(".."))
|
|
5891
|
+
return q = t, q;
|
|
5892
|
+
} catch (t) {
|
|
5893
|
+
process.stdout.write(`
|
|
5894
|
+
error searching for splitDirname: ${t}
|
|
5895
|
+
`);
|
|
5897
5896
|
}
|
|
5898
|
-
return
|
|
5897
|
+
return q = process.cwd(), q;
|
|
5899
5898
|
}, "getProjectRoot");
|
|
5900
5899
|
|
|
5901
5900
|
// src/telemetry/run-telemetry-operation.ts
|
|
5902
|
-
var
|
|
5901
|
+
var ui = Gr({
|
|
5903
5902
|
basePath: oi("telemetry"),
|
|
5904
5903
|
ns: "storybook",
|
|
5905
5904
|
ttl: 24 * 60 * 60 * 1e3
|
|
5906
5905
|
// 24h
|
|
5907
5906
|
}), Gt = /* @__PURE__ */ i(async (t, e) => {
|
|
5908
|
-
let r = await
|
|
5909
|
-
return r === void 0 && (r = await e(), r !== void 0 && await
|
|
5907
|
+
let r = await ui.get(t);
|
|
5908
|
+
return r === void 0 && (r = await e(), r !== void 0 && await ui.set(t, r)), r;
|
|
5910
5909
|
}, "runTelemetryOperation");
|
|
5911
5910
|
|
|
5912
5911
|
// src/telemetry/get-application-file-count.ts
|
|
5913
|
-
var
|
|
5914
|
-
let r =
|
|
5912
|
+
var Hu = ["page", "screen"], Xu = ["js", "jsx", "ts", "tsx"], Qu = /* @__PURE__ */ i(async (t) => {
|
|
5913
|
+
let r = Hu.flatMap((n) => [
|
|
5915
5914
|
n,
|
|
5916
5915
|
[n[0].toUpperCase(), ...n.slice(1)].join("")
|
|
5917
5916
|
]).flatMap(
|
|
5918
|
-
(n) =>
|
|
5917
|
+
(n) => Xu.map((s) => `"${t}${Yu}*${n}*.${s}"`)
|
|
5919
5918
|
);
|
|
5920
5919
|
try {
|
|
5921
5920
|
let n = `git ls-files -- ${r.join(" ")}`;
|
|
5922
|
-
return await
|
|
5921
|
+
return await Lt(n);
|
|
5923
5922
|
} catch {
|
|
5924
5923
|
return;
|
|
5925
5924
|
}
|
|
5926
|
-
}, "getApplicationFilesCountUncached"),
|
|
5925
|
+
}, "getApplicationFilesCountUncached"), li = /* @__PURE__ */ i(async (t) => Gt(
|
|
5927
5926
|
"applicationFiles",
|
|
5928
|
-
async () =>
|
|
5927
|
+
async () => Qu(t)
|
|
5929
5928
|
), "getApplicationFileCount");
|
|
5930
5929
|
|
|
5931
5930
|
// src/telemetry/get-chromatic-version.ts
|
|
5932
|
-
function
|
|
5931
|
+
function pi(t) {
|
|
5933
5932
|
let e = t.dependencies?.chromatic || t.devDependencies?.chromatic || t.peerDependencies?.chromatic;
|
|
5934
5933
|
return e || (t.scripts && Object.values(t.scripts).find((r) => r?.match(/chromatic/)) ? "latest" : void 0);
|
|
5935
5934
|
}
|
|
5936
|
-
i(
|
|
5935
|
+
i(pi, "getChromaticVersionSpecifier");
|
|
5937
5936
|
|
|
5938
5937
|
// src/telemetry/get-framework-info.ts
|
|
5939
|
-
import { normalize as
|
|
5940
|
-
import { frameworkPackages as
|
|
5938
|
+
import { normalize as rl } from "node:path";
|
|
5939
|
+
import { frameworkPackages as nl } from "storybook/internal/common";
|
|
5941
5940
|
|
|
5942
5941
|
// src/telemetry/package-json.ts
|
|
5943
|
-
import { readFile as
|
|
5944
|
-
import { join as
|
|
5942
|
+
import { readFile as el } from "node:fs/promises";
|
|
5943
|
+
import { join as tl } from "node:path";
|
|
5945
5944
|
var Hr = /* @__PURE__ */ i(async (t) => {
|
|
5946
5945
|
let e = Object.keys(t);
|
|
5947
5946
|
return Promise.all(e.map(Kt));
|
|
@@ -5961,16 +5960,16 @@ var Hr = /* @__PURE__ */ i(async (t) => {
|
|
|
5961
5960
|
}, "getActualPackageVersion"), Xr = /* @__PURE__ */ i(async (t) => {
|
|
5962
5961
|
try {
|
|
5963
5962
|
let e = await ai("package.json", { cwd: j.resolve(t) });
|
|
5964
|
-
return e || (e = j.resolve(
|
|
5963
|
+
return e || (e = j.resolve(tl(t, "package.json"), {
|
|
5965
5964
|
paths: [process.cwd()]
|
|
5966
|
-
})), JSON.parse(await
|
|
5965
|
+
})), JSON.parse(await el(e, { encoding: "utf8" }));
|
|
5967
5966
|
} catch {
|
|
5968
5967
|
return;
|
|
5969
5968
|
}
|
|
5970
5969
|
}, "getActualPackageJson");
|
|
5971
5970
|
|
|
5972
5971
|
// src/telemetry/get-framework-info.ts
|
|
5973
|
-
var
|
|
5972
|
+
var sl = [
|
|
5974
5973
|
"html",
|
|
5975
5974
|
"react",
|
|
5976
5975
|
"svelte",
|
|
@@ -5981,8 +5980,8 @@ var nl = [
|
|
|
5981
5980
|
"web-components",
|
|
5982
5981
|
"angular",
|
|
5983
5982
|
"ember"
|
|
5984
|
-
],
|
|
5985
|
-
function
|
|
5983
|
+
], ol = ["builder-webpack5", "builder-vite"];
|
|
5984
|
+
function fi(t, e) {
|
|
5986
5985
|
let { name: r = "", version: n, dependencies: s, devDependencies: o, peerDependencies: a } = t, c = {
|
|
5987
5986
|
// We include the framework itself because it may be a renderer too (e.g. angular)
|
|
5988
5987
|
[r]: n,
|
|
@@ -5992,12 +5991,12 @@ function pi(t, e) {
|
|
|
5992
5991
|
};
|
|
5993
5992
|
return e.map((p) => `@storybook/${p}`).find((p) => c[p]);
|
|
5994
5993
|
}
|
|
5995
|
-
i(
|
|
5996
|
-
var
|
|
5997
|
-
let e =
|
|
5998
|
-
return Object.keys(
|
|
5994
|
+
i(fi, "findMatchingPackage");
|
|
5995
|
+
var il = /* @__PURE__ */ i((t) => {
|
|
5996
|
+
let e = rl(t).replace(new RegExp(/\\/, "g"), "/");
|
|
5997
|
+
return Object.keys(nl).find((n) => e.endsWith(n)) || Me(t).replace(/.*node_modules[\\/]/, "");
|
|
5999
5998
|
}, "getFrameworkPackageName");
|
|
6000
|
-
async function
|
|
5999
|
+
async function mi(t) {
|
|
6001
6000
|
if (!t?.framework)
|
|
6002
6001
|
return {};
|
|
6003
6002
|
let e = typeof t.framework == "string" ? t.framework : t.framework?.name;
|
|
@@ -6006,7 +6005,7 @@ async function fi(t) {
|
|
|
6006
6005
|
let r = await Xr(e);
|
|
6007
6006
|
if (!r)
|
|
6008
6007
|
return {};
|
|
6009
|
-
let n =
|
|
6008
|
+
let n = fi(r, ol), s = fi(r, sl), o = il(e), a = typeof t.framework == "object" ? t.framework.options : {};
|
|
6010
6009
|
return {
|
|
6011
6010
|
framework: {
|
|
6012
6011
|
name: o,
|
|
@@ -6016,10 +6015,10 @@ async function fi(t) {
|
|
|
6016
6015
|
renderer: s
|
|
6017
6016
|
};
|
|
6018
6017
|
}
|
|
6019
|
-
i(
|
|
6018
|
+
i(mi, "getFrameworkInfo");
|
|
6020
6019
|
|
|
6021
6020
|
// src/telemetry/get-has-router-package.ts
|
|
6022
|
-
var
|
|
6021
|
+
var al = /* @__PURE__ */ new Set([
|
|
6023
6022
|
"react-router",
|
|
6024
6023
|
"react-router-dom",
|
|
6025
6024
|
"remix",
|
|
@@ -6042,40 +6041,40 @@ var il = /* @__PURE__ */ new Set([
|
|
|
6042
6041
|
"nuxt",
|
|
6043
6042
|
"@sveltejs/kit"
|
|
6044
6043
|
]);
|
|
6045
|
-
function
|
|
6044
|
+
function hi(t) {
|
|
6046
6045
|
return Object.keys(t?.dependencies ?? {}).some(
|
|
6047
|
-
(e) =>
|
|
6046
|
+
(e) => al.has(e)
|
|
6048
6047
|
);
|
|
6049
6048
|
}
|
|
6050
|
-
i(
|
|
6049
|
+
i(hi, "getHasRouterPackage");
|
|
6051
6050
|
|
|
6052
6051
|
// src/telemetry/get-monorepo-type.ts
|
|
6053
|
-
import { existsSync as
|
|
6052
|
+
import { existsSync as yi, readFileSync as cl } from "node:fs";
|
|
6054
6053
|
import { join as Qr } from "node:path";
|
|
6055
6054
|
import { getProjectRoot as en } from "storybook/internal/common";
|
|
6056
|
-
var
|
|
6055
|
+
var gi = {
|
|
6057
6056
|
Nx: "nx.json",
|
|
6058
6057
|
Turborepo: "turbo.json",
|
|
6059
6058
|
Lerna: "lerna.json",
|
|
6060
6059
|
Rush: "rush.json",
|
|
6061
6060
|
Lage: "lage.config.json"
|
|
6062
|
-
},
|
|
6063
|
-
let e = Object.keys(
|
|
6064
|
-
let s = Qr(en(),
|
|
6065
|
-
return
|
|
6061
|
+
}, xi = /* @__PURE__ */ i(() => {
|
|
6062
|
+
let e = Object.keys(gi).find((n) => {
|
|
6063
|
+
let s = Qr(en(), gi[n]);
|
|
6064
|
+
return yi(s);
|
|
6066
6065
|
});
|
|
6067
6066
|
if (e)
|
|
6068
6067
|
return e;
|
|
6069
|
-
if (!
|
|
6068
|
+
if (!yi(Qr(en(), "package.json")))
|
|
6070
6069
|
return;
|
|
6071
6070
|
if (JSON.parse(
|
|
6072
|
-
|
|
6071
|
+
cl(Qr(en(), "package.json"), { encoding: "utf8" })
|
|
6073
6072
|
)?.workspaces)
|
|
6074
6073
|
return "Workspaces";
|
|
6075
6074
|
}, "getMonorepoType");
|
|
6076
6075
|
|
|
6077
6076
|
// ../node_modules/package-manager-detector/dist/constants.mjs
|
|
6078
|
-
var
|
|
6077
|
+
var bi = [
|
|
6079
6078
|
"npm",
|
|
6080
6079
|
"yarn",
|
|
6081
6080
|
"yarn@berry",
|
|
@@ -6109,44 +6108,44 @@ var xi = [
|
|
|
6109
6108
|
};
|
|
6110
6109
|
|
|
6111
6110
|
// ../node_modules/package-manager-detector/dist/detect.mjs
|
|
6112
|
-
import
|
|
6113
|
-
import
|
|
6114
|
-
import
|
|
6111
|
+
import _i from "node:fs/promises";
|
|
6112
|
+
import xe from "node:path";
|
|
6113
|
+
import dl from "node:process";
|
|
6115
6114
|
async function nn(t, e) {
|
|
6116
6115
|
try {
|
|
6117
|
-
let r = await
|
|
6116
|
+
let r = await _i.stat(t);
|
|
6118
6117
|
return e === "file" ? r.isFile() : r.isDirectory();
|
|
6119
6118
|
} catch {
|
|
6120
6119
|
return !1;
|
|
6121
6120
|
}
|
|
6122
6121
|
}
|
|
6123
6122
|
i(nn, "pathExists");
|
|
6124
|
-
function*
|
|
6125
|
-
let e =
|
|
6123
|
+
function* ul(t = dl.cwd()) {
|
|
6124
|
+
let e = xe.resolve(t), { root: r } = xe.parse(e);
|
|
6126
6125
|
for (; e && e !== r; )
|
|
6127
|
-
yield e, e =
|
|
6126
|
+
yield e, e = xe.dirname(e);
|
|
6128
6127
|
}
|
|
6129
|
-
i(
|
|
6130
|
-
async function
|
|
6131
|
-
return !t || !nn(t, "file") ? null : await
|
|
6128
|
+
i(ul, "lookup");
|
|
6129
|
+
async function vi(t, e) {
|
|
6130
|
+
return !t || !nn(t, "file") ? null : await pl(t, e);
|
|
6132
6131
|
}
|
|
6133
|
-
i(
|
|
6132
|
+
i(vi, "parsePackageJson");
|
|
6134
6133
|
async function sn(t = {}) {
|
|
6135
6134
|
let { cwd: e, strategies: r = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown: n } = t;
|
|
6136
|
-
for (let s of
|
|
6135
|
+
for (let s of ul(e))
|
|
6137
6136
|
for (let o of r)
|
|
6138
6137
|
switch (o) {
|
|
6139
6138
|
case "lockfile": {
|
|
6140
6139
|
for (let a of Object.keys(tn))
|
|
6141
|
-
if (await nn(
|
|
6142
|
-
let c = tn[a], p = await
|
|
6140
|
+
if (await nn(xe.join(s, a), "file")) {
|
|
6141
|
+
let c = tn[a], p = await vi(xe.join(s, "package.json"), n);
|
|
6143
6142
|
return p || { name: c, agent: c };
|
|
6144
6143
|
}
|
|
6145
6144
|
break;
|
|
6146
6145
|
}
|
|
6147
6146
|
case "packageManager-field":
|
|
6148
6147
|
case "devEngines-field": {
|
|
6149
|
-
let a = await
|
|
6148
|
+
let a = await vi(xe.join(s, "package.json"), n);
|
|
6150
6149
|
if (a)
|
|
6151
6150
|
return a;
|
|
6152
6151
|
break;
|
|
@@ -6154,8 +6153,8 @@ async function sn(t = {}) {
|
|
|
6154
6153
|
case "install-metadata": {
|
|
6155
6154
|
for (let a of Object.keys(rn)) {
|
|
6156
6155
|
let c = a.endsWith("/") ? "dir" : "file";
|
|
6157
|
-
if (await nn(
|
|
6158
|
-
let p = rn[a], l = p === "yarn" ?
|
|
6156
|
+
if (await nn(xe.join(s, a), c)) {
|
|
6157
|
+
let p = rn[a], l = p === "yarn" ? fl(a) ? "yarn" : "yarn@berry" : p;
|
|
6159
6158
|
return { name: p, agent: l };
|
|
6160
6159
|
}
|
|
6161
6160
|
}
|
|
@@ -6165,7 +6164,7 @@ async function sn(t = {}) {
|
|
|
6165
6164
|
return null;
|
|
6166
6165
|
}
|
|
6167
6166
|
i(sn, "detect");
|
|
6168
|
-
function
|
|
6167
|
+
function ll(t) {
|
|
6169
6168
|
let e = /* @__PURE__ */ i((r) => r?.match(/\d+(\.\d+){0,2}/)?.[0] ?? r, "handelVer");
|
|
6170
6169
|
if (typeof t.packageManager == "string") {
|
|
6171
6170
|
let [r, n] = t.packageManager.replace(/^\^/, "").split("@");
|
|
@@ -6177,25 +6176,25 @@ function ul(t) {
|
|
|
6177
6176
|
ver: e(t.devEngines.packageManager.version)
|
|
6178
6177
|
};
|
|
6179
6178
|
}
|
|
6180
|
-
i(
|
|
6181
|
-
async function
|
|
6179
|
+
i(ll, "getNameAndVer");
|
|
6180
|
+
async function pl(t, e) {
|
|
6182
6181
|
try {
|
|
6183
|
-
let r = JSON.parse(await
|
|
6182
|
+
let r = JSON.parse(await _i.readFile(t, "utf8")), n, s = ll(r);
|
|
6184
6183
|
if (s) {
|
|
6185
6184
|
let o = s.name, a = s.ver, c = a;
|
|
6186
6185
|
return o === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: o, agent: n, version: c }) : o === "pnpm" &&
|
|
6187
|
-
a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: o, agent: n, version: c }) :
|
|
6186
|
+
a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: o, agent: n, version: c }) : bi.includes(o) ? (n = o, { name: o, agent: n, version: c }) :
|
|
6188
6187
|
e?.(r.packageManager) ?? null;
|
|
6189
6188
|
}
|
|
6190
6189
|
} catch {
|
|
6191
6190
|
}
|
|
6192
6191
|
return null;
|
|
6193
6192
|
}
|
|
6194
|
-
i(
|
|
6195
|
-
function
|
|
6193
|
+
i(pl, "handlePackageManager");
|
|
6194
|
+
function fl(t) {
|
|
6196
6195
|
return t.endsWith(".yarn_integrity");
|
|
6197
6196
|
}
|
|
6198
|
-
i(
|
|
6197
|
+
i(fl, "isMetadataYarnClassic");
|
|
6199
6198
|
|
|
6200
6199
|
// ../node_modules/package-manager-detector/dist/index.mjs
|
|
6201
6200
|
import "node:fs/promises";
|
|
@@ -6203,14 +6202,14 @@ import "node:path";
|
|
|
6203
6202
|
import "node:process";
|
|
6204
6203
|
|
|
6205
6204
|
// src/telemetry/get-package-manager-info.ts
|
|
6206
|
-
var
|
|
6205
|
+
var wi = /* @__PURE__ */ i(async () => {
|
|
6207
6206
|
let t = await sn({ cwd: qt() });
|
|
6208
6207
|
if (!t)
|
|
6209
6208
|
return;
|
|
6210
6209
|
let e = "node_modules";
|
|
6211
6210
|
if (t.name === "yarn")
|
|
6212
6211
|
try {
|
|
6213
|
-
let { stdout: r } = await
|
|
6212
|
+
let { stdout: r } = await ze("yarn config get nodeLinker", {
|
|
6214
6213
|
cwd: qt()
|
|
6215
6214
|
});
|
|
6216
6215
|
e = r.trim();
|
|
@@ -6218,7 +6217,7 @@ var _i = /* @__PURE__ */ i(async () => {
|
|
|
6218
6217
|
}
|
|
6219
6218
|
if (t.name === "pnpm")
|
|
6220
6219
|
try {
|
|
6221
|
-
let { stdout: r } = await
|
|
6220
|
+
let { stdout: r } = await ze("pnpm config get nodeLinker", {
|
|
6222
6221
|
cwd: qt()
|
|
6223
6222
|
});
|
|
6224
6223
|
e = r.trim() ?? "isolated";
|
|
@@ -6233,20 +6232,20 @@ var _i = /* @__PURE__ */ i(async () => {
|
|
|
6233
6232
|
}, "getPackageManagerInfo");
|
|
6234
6233
|
|
|
6235
6234
|
// src/telemetry/get-portable-stories-usage.ts
|
|
6236
|
-
var
|
|
6235
|
+
var ml = /* @__PURE__ */ i(async (t) => {
|
|
6237
6236
|
try {
|
|
6238
6237
|
let e = "git grep -l composeStor" + (t ? ` -- ${t}` : "");
|
|
6239
|
-
return await
|
|
6238
|
+
return await Lt(e);
|
|
6240
6239
|
} catch (e) {
|
|
6241
6240
|
return e.exitCode === 1 ? 0 : void 0;
|
|
6242
6241
|
}
|
|
6243
|
-
}, "getPortableStoriesFileCountUncached"),
|
|
6242
|
+
}, "getPortableStoriesFileCountUncached"), ki = /* @__PURE__ */ i(async (t) => Gt(
|
|
6244
6243
|
"portableStories",
|
|
6245
|
-
async () =>
|
|
6244
|
+
async () => ml(t)
|
|
6246
6245
|
), "getPortableStoriesFileCount");
|
|
6247
6246
|
|
|
6248
6247
|
// src/telemetry/storybook-metadata.ts
|
|
6249
|
-
var
|
|
6248
|
+
var Ti = {
|
|
6250
6249
|
next: "Next",
|
|
6251
6250
|
"react-scripts": "CRA",
|
|
6252
6251
|
gatsby: "Gatsby",
|
|
@@ -6254,8 +6253,8 @@ var ki = {
|
|
|
6254
6253
|
"@nrwl/storybook": "nx",
|
|
6255
6254
|
"@vue/cli-service": "vue-cli",
|
|
6256
6255
|
"@sveltejs/kit": "sveltekit"
|
|
6257
|
-
},
|
|
6258
|
-
"").replace(/\/preset$/, ""), "sanitizeAddonName"),
|
|
6256
|
+
}, Ii = /* @__PURE__ */ i((t) => Me(t).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
|
|
6257
|
+
"").replace(/\/preset$/, ""), "sanitizeAddonName"), _l = /* @__PURE__ */ i(async ({
|
|
6259
6258
|
packageJsonPath: t,
|
|
6260
6259
|
packageJson: e,
|
|
6261
6260
|
mainConfig: r,
|
|
@@ -6273,11 +6272,11 @@ var ki = {
|
|
|
6273
6272
|
...e?.dependencies,
|
|
6274
6273
|
...e?.devDependencies,
|
|
6275
6274
|
...e?.peerDependencies
|
|
6276
|
-
}, c = Object.keys(a).find((k) => !!
|
|
6275
|
+
}, c = Object.keys(a).find((k) => !!Ti[k]);
|
|
6277
6276
|
if (c) {
|
|
6278
6277
|
let { version: k } = await Kt(c);
|
|
6279
6278
|
o.metaFramework = {
|
|
6280
|
-
name:
|
|
6279
|
+
name: Ti[c],
|
|
6281
6280
|
packageName: c,
|
|
6282
6281
|
version: k || "unknown"
|
|
6283
6282
|
};
|
|
@@ -6308,29 +6307,29 @@ var ki = {
|
|
|
6308
6307
|
await Promise.all(
|
|
6309
6308
|
l.map(async (k) => [k, (await Kt(k))?.version])
|
|
6310
6309
|
)
|
|
6311
|
-
), o.hasRouterPackage =
|
|
6312
|
-
let f =
|
|
6313
|
-
f && (o.monorepo = f), o.packageManager = await
|
|
6310
|
+
), o.hasRouterPackage = hi(e);
|
|
6311
|
+
let f = xi();
|
|
6312
|
+
f && (o.monorepo = f), o.packageManager = await wi();
|
|
6314
6313
|
let x = a.typescript ? "typescript" : "javascript";
|
|
6315
6314
|
if (!r)
|
|
6316
6315
|
return {
|
|
6317
6316
|
...o,
|
|
6318
|
-
storybookVersionSpecifier:
|
|
6317
|
+
storybookVersionSpecifier: bl.storybook,
|
|
6319
6318
|
language: x
|
|
6320
6319
|
};
|
|
6321
6320
|
o.hasCustomBabel = !!r.babel, o.hasCustomWebpack = !!r.webpackFinal, o.hasStaticDirs = !!r.staticDirs, typeof r.typescript == "object" && (o.
|
|
6322
6321
|
typescriptOptions = r.typescript);
|
|
6323
|
-
let w = await
|
|
6322
|
+
let w = await mi(r);
|
|
6324
6323
|
typeof r.refs == "object" && (o.refCount = Object.keys(r.refs).length), typeof r.features == "object" && (o.features = r.features);
|
|
6325
6324
|
let _ = {};
|
|
6326
6325
|
r.addons && r.addons.forEach((k) => {
|
|
6327
|
-
let A,
|
|
6328
|
-
typeof k == "string" ? A =
|
|
6329
|
-
options:
|
|
6326
|
+
let A, st;
|
|
6327
|
+
typeof k == "string" ? A = Ii(k) : (k.name.includes("addon-essentials") && (st = k.options), A = Ii(k.name)), _[A] = {
|
|
6328
|
+
options: st,
|
|
6330
6329
|
version: void 0
|
|
6331
6330
|
};
|
|
6332
6331
|
});
|
|
6333
|
-
let C =
|
|
6332
|
+
let C = pi(e);
|
|
6334
6333
|
C && (_.chromatic = {
|
|
6335
6334
|
version: void 0,
|
|
6336
6335
|
versionSpecifier: C,
|
|
@@ -6351,30 +6350,30 @@ var ki = {
|
|
|
6351
6350
|
version: A
|
|
6352
6351
|
}, $[k].version = A || void 0;
|
|
6353
6352
|
});
|
|
6354
|
-
let
|
|
6353
|
+
let ve = !!a["eslint-plugin-storybook"], Ze = gl(n);
|
|
6355
6354
|
try {
|
|
6356
|
-
let { previewConfigPath: k } =
|
|
6355
|
+
let { previewConfigPath: k } = Ze;
|
|
6357
6356
|
if (k) {
|
|
6358
|
-
let A = await
|
|
6359
|
-
o.preview = { ...o.preview, usesGlobals:
|
|
6357
|
+
let A = await vl(k), st = !!(A.getFieldNode(["globals"]) || A.getFieldNode(["globalTypes"]));
|
|
6358
|
+
o.preview = { ...o.preview, usesGlobals: st };
|
|
6360
6359
|
}
|
|
6361
6360
|
} catch {
|
|
6362
6361
|
}
|
|
6363
|
-
let
|
|
6362
|
+
let rt = await ki(), nt = await li(hl(t));
|
|
6364
6363
|
return {
|
|
6365
6364
|
...o,
|
|
6366
6365
|
...w,
|
|
6367
|
-
portableStoriesFileCount:
|
|
6368
|
-
applicationFileCount:
|
|
6369
|
-
storybookVersion:
|
|
6370
|
-
storybookVersionSpecifier:
|
|
6366
|
+
portableStoriesFileCount: rt,
|
|
6367
|
+
applicationFileCount: nt,
|
|
6368
|
+
storybookVersion: ut,
|
|
6369
|
+
storybookVersionSpecifier: Ze.version,
|
|
6371
6370
|
language: x,
|
|
6372
6371
|
storybookPackages: $,
|
|
6373
6372
|
addons: _,
|
|
6374
|
-
hasStorybookEslint:
|
|
6373
|
+
hasStorybookEslint: ve
|
|
6375
6374
|
};
|
|
6376
6375
|
}, "computeStorybookMetadata");
|
|
6377
|
-
async function
|
|
6376
|
+
async function wl() {
|
|
6378
6377
|
let t = await er(process.cwd());
|
|
6379
6378
|
return t ? {
|
|
6380
6379
|
packageJsonPath: t,
|
|
@@ -6384,17 +6383,17 @@ async function _l() {
|
|
|
6384
6383
|
packageJson: {}
|
|
6385
6384
|
};
|
|
6386
6385
|
}
|
|
6387
|
-
i(
|
|
6388
|
-
var zt,
|
|
6386
|
+
i(wl, "getPackageJsonDetails");
|
|
6387
|
+
var zt, Si = /* @__PURE__ */ i(async (t) => {
|
|
6389
6388
|
if (zt)
|
|
6390
6389
|
return zt;
|
|
6391
|
-
let { packageJson: e, packageJsonPath: r } = await
|
|
6390
|
+
let { packageJson: e, packageJsonPath: r } = await wl(), n = (t || yl(
|
|
6392
6391
|
String(e?.scripts?.storybook || ""),
|
|
6393
6392
|
"-c",
|
|
6394
6393
|
"--config-dir"
|
|
6395
|
-
)) ?? ".storybook", s = await
|
|
6394
|
+
)) ?? ".storybook", s = await xl({ configDir: n }).catch(() => {
|
|
6396
6395
|
});
|
|
6397
|
-
return zt = await
|
|
6396
|
+
return zt = await _l({
|
|
6398
6397
|
mainConfig: s,
|
|
6399
6398
|
packageJson: e,
|
|
6400
6399
|
packageJsonPath: r,
|
|
@@ -6403,59 +6402,59 @@ var zt, Ii = /* @__PURE__ */ i(async (t) => {
|
|
|
6403
6402
|
}, "getStorybookMetadata");
|
|
6404
6403
|
|
|
6405
6404
|
// src/telemetry/telemetry.ts
|
|
6406
|
-
var
|
|
6407
|
-
import * as
|
|
6405
|
+
var Li = J(Ci(), 1);
|
|
6406
|
+
import * as Mi from "node:os";
|
|
6408
6407
|
|
|
6409
6408
|
// ../node_modules/nanoid/index.js
|
|
6410
|
-
import { randomFillSync as
|
|
6409
|
+
import { randomFillSync as Ai } from "crypto";
|
|
6411
6410
|
|
|
6412
6411
|
// ../node_modules/nanoid/url-alphabet/index.js
|
|
6413
|
-
var
|
|
6412
|
+
var Pi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
6414
6413
|
|
|
6415
6414
|
// ../node_modules/nanoid/index.js
|
|
6416
|
-
var
|
|
6417
|
-
!
|
|
6415
|
+
var kl = 128, be, Re, Tl = /* @__PURE__ */ i((t) => {
|
|
6416
|
+
!be || be.length < t ? (be = Buffer.allocUnsafe(t * kl), Ai(be), Re = 0) : Re + t > be.length && (Ai(be), Re = 0), Re += t;
|
|
6418
6417
|
}, "fillPool");
|
|
6419
|
-
var
|
|
6420
|
-
|
|
6418
|
+
var et = /* @__PURE__ */ i((t = 21) => {
|
|
6419
|
+
Tl(t -= 0);
|
|
6421
6420
|
let e = "";
|
|
6422
|
-
for (let r =
|
|
6423
|
-
e +=
|
|
6421
|
+
for (let r = Re - t; r < Re; r++)
|
|
6422
|
+
e += Pi[be[r] & 63];
|
|
6424
6423
|
return e;
|
|
6425
6424
|
}, "nanoid");
|
|
6426
6425
|
|
|
6427
6426
|
// src/telemetry/anonymous-id.ts
|
|
6428
6427
|
Mo();
|
|
6429
|
-
import { relative as
|
|
6430
|
-
import { getProjectRoot as
|
|
6431
|
-
import { execSync as
|
|
6428
|
+
import { relative as Sl } from "node:path";
|
|
6429
|
+
import { getProjectRoot as El } from "storybook/internal/common";
|
|
6430
|
+
import { execSync as Cl } from "child_process";
|
|
6432
6431
|
|
|
6433
6432
|
// src/telemetry/one-way-hash.ts
|
|
6434
|
-
import { createHash as
|
|
6433
|
+
import { createHash as Il } from "crypto";
|
|
6435
6434
|
var on = /* @__PURE__ */ i((t) => {
|
|
6436
|
-
let e =
|
|
6435
|
+
let e = Il("sha256");
|
|
6437
6436
|
return e.update("storybook-telemetry-salt"), e.update(t), e.digest("hex");
|
|
6438
6437
|
}, "oneWayHash");
|
|
6439
6438
|
|
|
6440
6439
|
// src/telemetry/anonymous-id.ts
|
|
6441
|
-
function
|
|
6440
|
+
function Pl(t) {
|
|
6442
6441
|
let n = t.trim().replace(/#.*$/, "").replace(/^.*@/, "").replace(/^.*\/\//, "");
|
|
6443
6442
|
return (n.endsWith(".git") ? n : `${n}.git`).replace(":", "/");
|
|
6444
6443
|
}
|
|
6445
|
-
i(
|
|
6446
|
-
function
|
|
6447
|
-
return `${
|
|
6444
|
+
i(Pl, "normalizeGitUrl");
|
|
6445
|
+
function Al(t, e) {
|
|
6446
|
+
return `${Pl(t)}${Wr(e)}`;
|
|
6448
6447
|
}
|
|
6449
|
-
i(
|
|
6450
|
-
var Yt,
|
|
6448
|
+
i(Al, "unhashedProjectId");
|
|
6449
|
+
var Yt, Oi = /* @__PURE__ */ i(() => {
|
|
6451
6450
|
if (Yt)
|
|
6452
6451
|
return Yt;
|
|
6453
6452
|
try {
|
|
6454
|
-
let t =
|
|
6453
|
+
let t = Sl(El(), process.cwd()), e = Cl("git config --local --get remote.origin.url", {
|
|
6455
6454
|
timeout: 1e3,
|
|
6456
6455
|
stdio: "pipe"
|
|
6457
6456
|
});
|
|
6458
|
-
Yt = on(
|
|
6457
|
+
Yt = on(Al(String(e), t));
|
|
6459
6458
|
} catch {
|
|
6460
6459
|
}
|
|
6461
6460
|
return Yt;
|
|
@@ -6463,11 +6462,11 @@ var Yt, Ai = /* @__PURE__ */ i(() => {
|
|
|
6463
6462
|
|
|
6464
6463
|
// src/telemetry/event-cache.ts
|
|
6465
6464
|
import { cache as cn } from "storybook/internal/common";
|
|
6466
|
-
var an = Promise.resolve(),
|
|
6465
|
+
var an = Promise.resolve(), Ol = /* @__PURE__ */ i(async (t, e) => {
|
|
6467
6466
|
let r = await cn.get("lastEvents") || {};
|
|
6468
6467
|
r[t] = { body: e, timestamp: Date.now() }, await cn.set("lastEvents", r);
|
|
6469
|
-
}, "setHelper"),
|
|
6470
|
-
var
|
|
6468
|
+
}, "setHelper"), Ri = /* @__PURE__ */ i(async (t, e) => (await an, an = Ol(t, e), an), "set");
|
|
6469
|
+
var jl = /* @__PURE__ */ i((t) => {
|
|
6471
6470
|
let { body: e, timestamp: r } = t;
|
|
6472
6471
|
return {
|
|
6473
6472
|
timestamp: r,
|
|
@@ -6475,37 +6474,37 @@ var Ol = /* @__PURE__ */ i((t) => {
|
|
|
6475
6474
|
eventId: e?.eventId,
|
|
6476
6475
|
sessionId: e?.sessionId
|
|
6477
6476
|
};
|
|
6478
|
-
}, "upgradeFields"),
|
|
6477
|
+
}, "upgradeFields"), Rl = ["init", "upgrade"], Nl = ["build", "dev", "error"], ji = /* @__PURE__ */ i((t, e) => {
|
|
6479
6478
|
let r = e.map((n) => t?.[n]).filter(Boolean).sort((n, s) => s.timestamp - n.timestamp);
|
|
6480
6479
|
return r.length > 0 ? r[0] : void 0;
|
|
6481
|
-
}, "lastEvent"),
|
|
6482
|
-
let e = t || await cn.get("lastEvents") || {}, r =
|
|
6480
|
+
}, "lastEvent"), Zl = /* @__PURE__ */ i(async (t = void 0) => {
|
|
6481
|
+
let e = t || await cn.get("lastEvents") || {}, r = ji(e, Rl), n = ji(e, Nl);
|
|
6483
6482
|
if (r)
|
|
6484
|
-
return !n?.timestamp || r.timestamp > n.timestamp ?
|
|
6483
|
+
return !n?.timestamp || r.timestamp > n.timestamp ? jl(r) : void 0;
|
|
6485
6484
|
}, "getPrecedingUpgrade");
|
|
6486
6485
|
|
|
6487
6486
|
// src/telemetry/fetch.ts
|
|
6488
|
-
var
|
|
6487
|
+
var Ni = global.fetch;
|
|
6489
6488
|
|
|
6490
6489
|
// src/telemetry/session-id.ts
|
|
6491
|
-
import { cache as
|
|
6492
|
-
var
|
|
6490
|
+
import { cache as Zi } from "storybook/internal/common";
|
|
6491
|
+
var Ml = 1e3 * 60 * 60 * 2, tt;
|
|
6493
6492
|
var dn = /* @__PURE__ */ i(async () => {
|
|
6494
6493
|
let t = Date.now();
|
|
6495
|
-
if (!
|
|
6496
|
-
let e = await
|
|
6497
|
-
e && e.lastUsed >= t -
|
|
6494
|
+
if (!tt) {
|
|
6495
|
+
let e = await Zi.get("session");
|
|
6496
|
+
e && e.lastUsed >= t - Ml ? tt = e.id : tt = et();
|
|
6498
6497
|
}
|
|
6499
|
-
return await
|
|
6498
|
+
return await Zi.set("session", { id: tt, lastUsed: t }), tt;
|
|
6500
6499
|
}, "getSessionId");
|
|
6501
6500
|
|
|
6502
6501
|
// src/telemetry/telemetry.ts
|
|
6503
|
-
var
|
|
6502
|
+
var Ll = (0, Li.default)(Ni), Dl = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Ht = [], Ul = /* @__PURE__ */ i(
|
|
6504
6503
|
(t, e) => {
|
|
6505
6504
|
un[t] = e;
|
|
6506
|
-
}, "addToGlobalContext"),
|
|
6505
|
+
}, "addToGlobalContext"), $l = /* @__PURE__ */ i(() => {
|
|
6507
6506
|
try {
|
|
6508
|
-
let t =
|
|
6507
|
+
let t = Mi.platform();
|
|
6509
6508
|
return t === "win32" ? "Windows" : t === "darwin" ? "macOS" : t === "linux" ? "Linux" : `Other: ${t}`;
|
|
6510
6509
|
} catch {
|
|
6511
6510
|
return "Unknown";
|
|
@@ -6513,13 +6512,13 @@ var Ml = (0, Mi.default)(Ri), Ll = process.env.STORYBOOK_TELEMETRY_URL || "https
|
|
|
6513
6512
|
}, "getOperatingSystem"), un = {
|
|
6514
6513
|
inCI: !!process.env.CI,
|
|
6515
6514
|
isTTY: process.stdout.isTTY,
|
|
6516
|
-
platform:
|
|
6515
|
+
platform: $l(),
|
|
6517
6516
|
nodeVersion: process.versions.node,
|
|
6518
|
-
storybookVersion:
|
|
6519
|
-
},
|
|
6520
|
-
let { eventType: n, payload: s, metadata: o, ...a } = t, c = await dn(), p =
|
|
6517
|
+
storybookVersion: ut
|
|
6518
|
+
}, Vl = /* @__PURE__ */ i(async (t, e, r) => {
|
|
6519
|
+
let { eventType: n, payload: s, metadata: o, ...a } = t, c = await dn(), p = et(), l = { ...a, eventType: n, eventId: p, sessionId: c, metadata: o,
|
|
6521
6520
|
payload: s, context: e };
|
|
6522
|
-
return
|
|
6521
|
+
return Ll(Dl, {
|
|
6523
6522
|
method: "post",
|
|
6524
6523
|
body: JSON.stringify(l),
|
|
6525
6524
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6529,21 +6528,21 @@ var Ml = (0, Mi.default)(Ri), Ll = process.env.STORYBOOK_TELEMETRY_URL || "https
|
|
|
6529
6528
|
retryDelay")
|
|
6530
6529
|
});
|
|
6531
6530
|
}, "prepareRequest");
|
|
6532
|
-
async function
|
|
6531
|
+
async function Di(t, e = { retryDelay: 1e3, immediate: !1 }) {
|
|
6533
6532
|
let { eventType: r, payload: n, metadata: s, ...o } = t, a = e.stripMetadata ? un : {
|
|
6534
6533
|
...un,
|
|
6535
|
-
anonymousId:
|
|
6534
|
+
anonymousId: Oi()
|
|
6536
6535
|
}, c;
|
|
6537
6536
|
try {
|
|
6538
|
-
c =
|
|
6539
|
-
let p = await dn(), l =
|
|
6540
|
-
await
|
|
6537
|
+
c = Vl(t, a, e), Ht.push(c), e.immediate ? await Promise.all(Ht) : await c;
|
|
6538
|
+
let p = await dn(), l = et(), f = { ...o, eventType: r, eventId: l, sessionId: p, metadata: s, payload: n, context: a };
|
|
6539
|
+
await Ri(r, f);
|
|
6541
6540
|
} catch {
|
|
6542
6541
|
} finally {
|
|
6543
6542
|
Ht = Ht.filter((p) => p !== c);
|
|
6544
6543
|
}
|
|
6545
6544
|
}
|
|
6546
|
-
i(
|
|
6545
|
+
i(Di, "sendTelemetry");
|
|
6547
6546
|
|
|
6548
6547
|
// src/telemetry/index.ts
|
|
6549
6548
|
var Nb = /* @__PURE__ */ i((t) => t.startsWith("example-button--") || t.startsWith("example-header--") || t.startsWith("example-page--"), "i\
|
|
@@ -6554,26 +6553,26 @@ sExampleStoryId"), Zb = /* @__PURE__ */ i(async (t, e = {}, r = {}) => {
|
|
|
6554
6553
|
payload: e
|
|
6555
6554
|
};
|
|
6556
6555
|
try {
|
|
6557
|
-
r?.stripMetadata || (n.metadata = await
|
|
6556
|
+
r?.stripMetadata || (n.metadata = await Si(r?.configDir));
|
|
6558
6557
|
} catch (s) {
|
|
6559
|
-
n.payload.metadataErrorMessage =
|
|
6558
|
+
n.payload.metadataErrorMessage = ct(s).message, r?.enableCrashReports && (n.payload.metadataError = ct(s));
|
|
6560
6559
|
} finally {
|
|
6561
6560
|
let { error: s } = n.payload;
|
|
6562
|
-
s && (n.payload.error =
|
|
6563
|
-
[telemetry]`),
|
|
6561
|
+
s && (n.payload.error = ct(s)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (Ui.info(`
|
|
6562
|
+
[telemetry]`), Ui.info(JSON.stringify(n, null, 2))), await Di(n, r));
|
|
6564
6563
|
}
|
|
6565
6564
|
}, "telemetry");
|
|
6566
6565
|
export {
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6566
|
+
Ul as addToGlobalContext,
|
|
6567
|
+
Me as cleanPaths,
|
|
6568
|
+
_l as computeStorybookMetadata,
|
|
6569
|
+
Zl as getPrecedingUpgrade,
|
|
6570
|
+
Si as getStorybookMetadata,
|
|
6572
6571
|
Nb as isExampleStoryId,
|
|
6573
|
-
|
|
6572
|
+
Ti as metaFrameworks,
|
|
6574
6573
|
on as oneWayHash,
|
|
6575
6574
|
vn as removeAnsiEscapeCodes,
|
|
6576
|
-
|
|
6577
|
-
|
|
6575
|
+
Ii as sanitizeAddonName,
|
|
6576
|
+
ct as sanitizeError,
|
|
6578
6577
|
Zb as telemetry
|
|
6579
6578
|
};
|