storybook 9.0.10 → 9.0.12
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 +43 -43
- package/dist/bin/index.js +43 -43
- package/dist/cli/bin/index.cjs +629 -629
- package/dist/cli/bin/index.js +202 -201
- package/dist/cli/index.cjs +13788 -13797
- package/dist/cli/index.d.ts +712 -15
- package/dist/cli/index.js +12364 -12372
- package/dist/common/index.cjs +10997 -10888
- package/dist/common/index.d.ts +348 -66
- package/dist/common/index.js +24315 -24203
- package/dist/components/index.cjs +5 -3
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +5 -3
- package/dist/core-server/index.cjs +4838 -4791
- package/dist/core-server/index.d.ts +10 -1
- package/dist/core-server/index.js +5746 -5699
- package/dist/core-server/presets/common-manager.js +257 -243
- package/dist/core-server/presets/common-preset.cjs +1047 -1045
- package/dist/core-server/presets/common-preset.js +2053 -2048
- package/dist/csf-tools/index.cjs +226 -224
- package/dist/csf-tools/index.js +116 -112
- package/dist/manager/globals-runtime.js +6 -4
- package/dist/manager-api/index.cjs +73 -73
- package/dist/manager-api/index.js +140 -140
- package/dist/node-logger/index.cjs +8520 -994
- package/dist/node-logger/index.d.ts +395 -2
- package/dist/node-logger/index.js +8535 -995
- package/dist/preview/runtime.js +4 -3
- package/dist/preview-api/index.cjs +4 -3
- package/dist/preview-api/index.js +4 -3
- package/dist/server-errors.cjs +201 -242
- package/dist/server-errors.d.ts +1 -12
- package/dist/server-errors.js +182 -223
- package/dist/telemetry/index.cjs +1224 -1223
- package/dist/telemetry/index.d.ts +3 -2
- package/dist/telemetry/index.js +1069 -1066
- package/dist/types/index.d.ts +3 -3
- package/package.json +2 -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 hi = Object.create;
|
|
8
8
|
var $t = Object.defineProperty;
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
9
|
+
var yi = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var gi = Object.getOwnPropertyNames;
|
|
11
|
+
var bi = Object.getPrototypeOf, xi = Object.prototype.hasOwnProperty;
|
|
12
12
|
var i = (t, e) => $t(t, "name", { value: e, configurable: !0 }), N = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
|
|
13
13
|
"u" ? new Proxy(t, {
|
|
14
14
|
get: (e, r) => (typeof require < "u" ? require : e)[r]
|
|
@@ -16,15 +16,15 @@ var i = (t, e) => $t(t, "name", { value: e, configurable: !0 }), N = /* @__PURE_
|
|
|
16
16
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
17
17
|
throw Error('Dynamic require of "' + t + '" is not supported');
|
|
18
18
|
});
|
|
19
|
-
var
|
|
19
|
+
var vi = (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 _i = (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 gi(e))
|
|
24
|
+
!xi.call(t, s) && s !== r && $t(t, s, { get: () => e[s], enumerable: !(n = yi(e, s)) || n.enumerable });
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var z = (t, e, r) => (r = t != null ? hi(bi(t)) : {}, _i(
|
|
28
28
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
29
|
// file that has been converted to a CommonJS file using a Babel-
|
|
30
30
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -34,19 +34,19 @@ var G = (t, e, r) => (r = t != null ? fi(yi(t)) : {}, xi(
|
|
|
34
34
|
));
|
|
35
35
|
|
|
36
36
|
// ../node_modules/picocolors/picocolors.js
|
|
37
|
-
var
|
|
38
|
-
var Qe = process || {},
|
|
39
|
-
includes("--color") || Qe.platform === "win32" || (Qe.stdout || {}).isTTY && Xe.TERM !== "dumb" || !!Xe.CI),
|
|
37
|
+
var Qr = I((ml, Vt) => {
|
|
38
|
+
var Qe = process || {}, Yr = Qe.argv || [], Xe = Qe.env || {}, wi = !(Xe.NO_COLOR || Yr.includes("--no-color")) && (!!Xe.FORCE_COLOR || Yr.
|
|
39
|
+
includes("--color") || Qe.platform === "win32" || (Qe.stdout || {}).isTTY && Xe.TERM !== "dumb" || !!Xe.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 + Ti(s, e, r, o) + e : t + s + e;
|
|
42
|
+
}, "formatter"), Ti = /* @__PURE__ */ i((t, e, r, n) => {
|
|
43
43
|
let s = "", o = 0;
|
|
44
44
|
do
|
|
45
45
|
s += t.substring(o, n) + r, o = n + e.length, n = t.indexOf(e, o);
|
|
46
46
|
while (~n);
|
|
47
47
|
return s + t.substring(o);
|
|
48
|
-
}, "replaceClose"),
|
|
49
|
-
let e = t ?
|
|
48
|
+
}, "replaceClose"), Xr = /* @__PURE__ */ i((t = wi) => {
|
|
49
|
+
let e = t ? ki : () => String;
|
|
50
50
|
return {
|
|
51
51
|
isColorSupported: t,
|
|
52
52
|
reset: e("\x1B[0m", "\x1B[0m"),
|
|
@@ -92,25 +92,25 @@ var Xr = I((pl, Vt) => {
|
|
|
92
92
|
bgWhiteBright: e("\x1B[107m", "\x1B[49m")
|
|
93
93
|
};
|
|
94
94
|
}, "createColors");
|
|
95
|
-
Vt.exports =
|
|
96
|
-
Vt.exports.createColors =
|
|
95
|
+
Vt.exports = Xr();
|
|
96
|
+
Vt.exports.createColors = Xr;
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
// ../node_modules/walk-up-path/dist/cjs/index.js
|
|
100
|
-
var
|
|
100
|
+
var dn = I((rt) => {
|
|
101
101
|
"use strict";
|
|
102
102
|
Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
103
103
|
rt.walkUp = void 0;
|
|
104
|
-
var
|
|
105
|
-
for (t = (0,
|
|
104
|
+
var cn = N("path"), Si = /* @__PURE__ */ i(function* (t) {
|
|
105
|
+
for (t = (0, cn.resolve)(t); t; ) {
|
|
106
106
|
yield t;
|
|
107
|
-
let e = (0,
|
|
107
|
+
let e = (0, cn.dirname)(t);
|
|
108
108
|
if (e === t)
|
|
109
109
|
break;
|
|
110
110
|
t = e;
|
|
111
111
|
}
|
|
112
112
|
}, "walkUp");
|
|
113
|
-
rt.walkUp =
|
|
113
|
+
rt.walkUp = Si;
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
// ../node_modules/zod/lib/helpers/util.js
|
|
@@ -155,14 +155,14 @@ var Ne = I((E) => {
|
|
|
155
155
|
}
|
|
156
156
|
i(n, "joinValues"), t.joinValues = n, t.jsonStringifyReplacer = (s, o) => typeof o == "bigint" ? o.toString() : o;
|
|
157
157
|
})(zt || (E.util = zt = {}));
|
|
158
|
-
var
|
|
158
|
+
var hn;
|
|
159
159
|
(function(t) {
|
|
160
160
|
t.mergeShapes = (e, r) => ({
|
|
161
161
|
...e,
|
|
162
162
|
...r
|
|
163
163
|
// second overwrites first
|
|
164
164
|
});
|
|
165
|
-
})(
|
|
165
|
+
})(hn || (E.objectUtil = hn = {}));
|
|
166
166
|
E.ZodParsedType = zt.arrayToEnum([
|
|
167
167
|
"string",
|
|
168
168
|
"nan",
|
|
@@ -185,7 +185,7 @@ var Ne = I((E) => {
|
|
|
185
185
|
"map",
|
|
186
186
|
"set"
|
|
187
187
|
]);
|
|
188
|
-
var
|
|
188
|
+
var Di = /* @__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 = Di;
|
|
213
213
|
});
|
|
214
214
|
|
|
215
215
|
// ../node_modules/zod/lib/ZodError.js
|
|
216
|
-
var st = I((
|
|
216
|
+
var st = I((K) => {
|
|
217
217
|
"use strict";
|
|
218
|
-
Object.defineProperty(
|
|
219
|
-
|
|
220
|
-
var
|
|
221
|
-
|
|
218
|
+
Object.defineProperty(K, "__esModule", { value: !0 });
|
|
219
|
+
K.ZodError = K.quotelessJson = K.ZodIssueCode = void 0;
|
|
220
|
+
var yn = Ne();
|
|
221
|
+
K.ZodIssueCode = yn.util.arrayToEnum([
|
|
222
222
|
"invalid_type",
|
|
223
223
|
"invalid_literal",
|
|
224
224
|
"custom",
|
|
@@ -236,8 +236,8 @@ var st = I((z) => {
|
|
|
236
236
|
"not_multiple_of",
|
|
237
237
|
"not_finite"
|
|
238
238
|
]);
|
|
239
|
-
var
|
|
240
|
-
|
|
239
|
+
var Li = /* @__PURE__ */ i((t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:"), "quotelessJson");
|
|
240
|
+
K.quotelessJson = Li;
|
|
241
241
|
var Ze = class t extends Error {
|
|
242
242
|
static {
|
|
243
243
|
i(this, "ZodError");
|
|
@@ -286,7 +286,7 @@ var st = I((z) => {
|
|
|
286
286
|
return this.message;
|
|
287
287
|
}
|
|
288
288
|
get message() {
|
|
289
|
-
return JSON.stringify(this.issues,
|
|
289
|
+
return JSON.stringify(this.issues, yn.util.jsonStringifyReplacer, 2);
|
|
290
290
|
}
|
|
291
291
|
get isEmpty() {
|
|
292
292
|
return this.issues.length === 0;
|
|
@@ -301,7 +301,7 @@ var st = I((z) => {
|
|
|
301
301
|
return this.flatten();
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
-
|
|
304
|
+
K.ZodError = Ze;
|
|
305
305
|
Ze.create = (t) => new Ze(t);
|
|
306
306
|
});
|
|
307
307
|
|
|
@@ -309,51 +309,51 @@ var st = I((z) => {
|
|
|
309
309
|
var Jt = I((Kt) => {
|
|
310
310
|
"use strict";
|
|
311
311
|
Object.defineProperty(Kt, "__esModule", { value: !0 });
|
|
312
|
-
var ee = Ne(),
|
|
312
|
+
var ee = Ne(), A = st(), Ui = /* @__PURE__ */ i((t, e) => {
|
|
313
313
|
let r;
|
|
314
314
|
switch (t.code) {
|
|
315
|
-
case
|
|
315
|
+
case A.ZodIssueCode.invalid_type:
|
|
316
316
|
t.received === ee.ZodParsedType.undefined ? r = "Required" : r = `Expected ${t.expected}, received ${t.received}`;
|
|
317
317
|
break;
|
|
318
|
-
case
|
|
318
|
+
case A.ZodIssueCode.invalid_literal:
|
|
319
319
|
r = `Invalid literal value, expected ${JSON.stringify(t.expected, ee.util.jsonStringifyReplacer)}`;
|
|
320
320
|
break;
|
|
321
|
-
case
|
|
321
|
+
case A.ZodIssueCode.unrecognized_keys:
|
|
322
322
|
r = `Unrecognized key(s) in object: ${ee.util.joinValues(t.keys, ", ")}`;
|
|
323
323
|
break;
|
|
324
|
-
case
|
|
324
|
+
case A.ZodIssueCode.invalid_union:
|
|
325
325
|
r = "Invalid input";
|
|
326
326
|
break;
|
|
327
|
-
case
|
|
327
|
+
case A.ZodIssueCode.invalid_union_discriminator:
|
|
328
328
|
r = `Invalid discriminator value. Expected ${ee.util.joinValues(t.options)}`;
|
|
329
329
|
break;
|
|
330
|
-
case
|
|
330
|
+
case A.ZodIssueCode.invalid_enum_value:
|
|
331
331
|
r = `Invalid enum value. Expected ${ee.util.joinValues(t.options)}, received '${t.received}'`;
|
|
332
332
|
break;
|
|
333
|
-
case
|
|
333
|
+
case A.ZodIssueCode.invalid_arguments:
|
|
334
334
|
r = "Invalid function arguments";
|
|
335
335
|
break;
|
|
336
|
-
case
|
|
336
|
+
case A.ZodIssueCode.invalid_return_type:
|
|
337
337
|
r = "Invalid function return type";
|
|
338
338
|
break;
|
|
339
|
-
case
|
|
339
|
+
case A.ZodIssueCode.invalid_date:
|
|
340
340
|
r = "Invalid date";
|
|
341
341
|
break;
|
|
342
|
-
case
|
|
342
|
+
case A.ZodIssueCode.invalid_string:
|
|
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
346
|
: must end with "${t.validation.endsWith}"` : ee.util.assertNever(t.validation) : t.validation !== "regex" ? r = `Invalid ${t.validation}` :
|
|
347
347
|
r = "Invalid";
|
|
348
348
|
break;
|
|
349
|
-
case
|
|
349
|
+
case A.ZodIssueCode.too_small:
|
|
350
350
|
t.type === "array" ? r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "more than"} ${t.minimum} element(s)` :
|
|
351
351
|
t.type === "string" ? r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "over"} ${t.minimum} character(s)` :
|
|
352
352
|
t.type === "number" ? r = `Number must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater tha\
|
|
353
353
|
n "}${t.minimum}` : t.type === "date" ? r = `Date must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "gre\
|
|
354
354
|
ater than "}${new Date(Number(t.minimum))}` : r = "Invalid input";
|
|
355
355
|
break;
|
|
356
|
-
case
|
|
356
|
+
case A.ZodIssueCode.too_big:
|
|
357
357
|
t.type === "array" ? r = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "less than"} ${t.maximum} element(s)` :
|
|
358
358
|
t.type === "string" ? r = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "under"} ${t.maximum} character(s)` :
|
|
359
359
|
t.type === "number" ? r = `Number must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}` :
|
|
@@ -361,16 +361,16 @@ ater than "}${new Date(Number(t.minimum))}` : r = "Invalid input";
|
|
|
361
361
|
t.type === "date" ? r = `Date must be ${t.exact ? "exactly" : t.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(
|
|
362
362
|
Number(t.maximum))}` : r = "Invalid input";
|
|
363
363
|
break;
|
|
364
|
-
case
|
|
364
|
+
case A.ZodIssueCode.custom:
|
|
365
365
|
r = "Invalid input";
|
|
366
366
|
break;
|
|
367
|
-
case
|
|
367
|
+
case A.ZodIssueCode.invalid_intersection_types:
|
|
368
368
|
r = "Intersection results could not be merged";
|
|
369
369
|
break;
|
|
370
|
-
case
|
|
370
|
+
case A.ZodIssueCode.not_multiple_of:
|
|
371
371
|
r = `Number must be a multiple of ${t.multipleOf}`;
|
|
372
372
|
break;
|
|
373
|
-
case
|
|
373
|
+
case A.ZodIssueCode.not_finite:
|
|
374
374
|
r = "Number must be finite";
|
|
375
375
|
break;
|
|
376
376
|
default:
|
|
@@ -378,42 +378,42 @@ ater than "}${new Date(Number(t.minimum))}` : r = "Invalid input";
|
|
|
378
378
|
}
|
|
379
379
|
return { message: r };
|
|
380
380
|
}, "errorMap");
|
|
381
|
-
Kt.default =
|
|
381
|
+
Kt.default = Ui;
|
|
382
382
|
});
|
|
383
383
|
|
|
384
384
|
// ../node_modules/zod/lib/errors.js
|
|
385
385
|
var ot = I(($) => {
|
|
386
386
|
"use strict";
|
|
387
|
-
var
|
|
387
|
+
var $i = $ && $.__importDefault || function(t) {
|
|
388
388
|
return t && t.__esModule ? t : { default: t };
|
|
389
389
|
};
|
|
390
390
|
Object.defineProperty($, "__esModule", { value: !0 });
|
|
391
391
|
$.getErrorMap = $.setErrorMap = $.defaultErrorMap = void 0;
|
|
392
|
-
var
|
|
393
|
-
$.defaultErrorMap =
|
|
394
|
-
var
|
|
395
|
-
function
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
i(
|
|
399
|
-
$.setErrorMap =
|
|
400
|
-
function
|
|
401
|
-
return
|
|
402
|
-
}
|
|
403
|
-
i(
|
|
404
|
-
$.getErrorMap =
|
|
392
|
+
var gn = $i(Jt());
|
|
393
|
+
$.defaultErrorMap = gn.default;
|
|
394
|
+
var bn = gn.default;
|
|
395
|
+
function Vi(t) {
|
|
396
|
+
bn = t;
|
|
397
|
+
}
|
|
398
|
+
i(Vi, "setErrorMap");
|
|
399
|
+
$.setErrorMap = Vi;
|
|
400
|
+
function Fi() {
|
|
401
|
+
return bn;
|
|
402
|
+
}
|
|
403
|
+
i(Fi, "getErrorMap");
|
|
404
|
+
$.getErrorMap = Fi;
|
|
405
405
|
});
|
|
406
406
|
|
|
407
407
|
// ../node_modules/zod/lib/helpers/parseUtil.js
|
|
408
408
|
var Yt = I((T) => {
|
|
409
409
|
"use strict";
|
|
410
|
-
var
|
|
410
|
+
var Bi = 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 Wi = ot(), xn = Bi(Jt()), qi = /* @__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 Yt = I((T) => {
|
|
|
433
433
|
message: c
|
|
434
434
|
};
|
|
435
435
|
}, "makeIssue");
|
|
436
|
-
T.makeIssue =
|
|
436
|
+
T.makeIssue = qi;
|
|
437
437
|
T.EMPTY_PATH = [];
|
|
438
|
-
function
|
|
439
|
-
let r = (0,
|
|
438
|
+
function Gi(t, e) {
|
|
439
|
+
let r = (0, Wi.getErrorMap)(), n = (0, T.makeIssue)({
|
|
440
440
|
issueData: e,
|
|
441
441
|
data: t.data,
|
|
442
442
|
path: t.path,
|
|
@@ -447,14 +447,14 @@ var Yt = I((T) => {
|
|
|
447
447
|
// then schema-bound map if available
|
|
448
448
|
r,
|
|
449
449
|
// then global override map
|
|
450
|
-
r ===
|
|
450
|
+
r === xn.default ? void 0 : xn.default
|
|
451
451
|
// then global default map
|
|
452
452
|
].filter((s) => !!s)
|
|
453
453
|
});
|
|
454
454
|
t.common.issues.push(n);
|
|
455
455
|
}
|
|
456
|
-
i(
|
|
457
|
-
T.addIssueToContext =
|
|
456
|
+
i(Gi, "addIssueToContext");
|
|
457
|
+
T.addIssueToContext = Gi;
|
|
458
458
|
var Ht = class t {
|
|
459
459
|
static {
|
|
460
460
|
i(this, "ParseStatus");
|
|
@@ -504,46 +504,46 @@ var Yt = 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 zi = /* @__PURE__ */ i((t) => ({ status: "dirty", value: t }), "DIRTY");
|
|
508
|
+
T.DIRTY = zi;
|
|
509
|
+
var Ki = /* @__PURE__ */ i((t) => ({ status: "valid", value: t }), "OK");
|
|
510
|
+
T.OK = Ki;
|
|
511
|
+
var Ji = /* @__PURE__ */ i((t) => t.status === "aborted", "isAborted");
|
|
512
|
+
T.isAborted = Ji;
|
|
513
|
+
var Hi = /* @__PURE__ */ i((t) => t.status === "dirty", "isDirty");
|
|
514
|
+
T.isDirty = Hi;
|
|
515
|
+
var Yi = /* @__PURE__ */ i((t) => t.status === "valid", "isValid");
|
|
516
|
+
T.isValid = Yi;
|
|
517
|
+
var Xi = /* @__PURE__ */ i((t) => typeof Promise < "u" && t instanceof Promise, "isAsync");
|
|
518
|
+
T.isAsync = Xi;
|
|
519
519
|
});
|
|
520
520
|
|
|
521
521
|
// ../node_modules/zod/lib/helpers/typeAliases.js
|
|
522
|
-
var
|
|
522
|
+
var _n = I((vn) => {
|
|
523
523
|
"use strict";
|
|
524
|
-
Object.defineProperty(
|
|
524
|
+
Object.defineProperty(vn, "__esModule", { value: !0 });
|
|
525
525
|
});
|
|
526
526
|
|
|
527
527
|
// ../node_modules/zod/lib/helpers/errorUtil.js
|
|
528
|
-
var
|
|
528
|
+
var kn = I((it) => {
|
|
529
529
|
"use strict";
|
|
530
530
|
Object.defineProperty(it, "__esModule", { value: !0 });
|
|
531
531
|
it.errorUtil = void 0;
|
|
532
|
-
var
|
|
532
|
+
var wn;
|
|
533
533
|
(function(t) {
|
|
534
534
|
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
535
|
-
})(
|
|
535
|
+
})(wn || (it.errorUtil = wn = {}));
|
|
536
536
|
});
|
|
537
537
|
|
|
538
538
|
// ../node_modules/zod/lib/types.js
|
|
539
|
-
var
|
|
539
|
+
var Mn = I((d) => {
|
|
540
540
|
"use strict";
|
|
541
541
|
var ct = d && d.__classPrivateFieldGet || function(t, e, r, n) {
|
|
542
542
|
if (r === "a" && !n) throw new TypeError("Private accessor was defined without a getter");
|
|
543
543
|
if (typeof e == "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did n\
|
|
544
544
|
ot declare it");
|
|
545
545
|
return r === "m" ? n : r === "a" ? n.call(t) : n ? n.value : e.get(t);
|
|
546
|
-
},
|
|
546
|
+
}, Sn = d && d.__classPrivateFieldSet || function(t, e, r, n, s) {
|
|
547
547
|
if (n === "m") throw new TypeError("Private method is not writable");
|
|
548
548
|
if (n === "a" && !s) throw new TypeError("Private accessor was defined without a setter");
|
|
549
549
|
if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did no\
|
|
@@ -560,7 +560,7 @@ t declare it");
|
|
|
560
560
|
d.promise = d.preprocess = d.pipeline = d.ostring = d.optional = d.onumber = d.oboolean = d.object = d.number = d.nullable = d.null = d.never =
|
|
561
561
|
d.nativeEnum = d.nan = d.map = d.literal = d.lazy = d.intersection = d.instanceof = d.function = d.enum = d.effect = d.discriminatedUnion =
|
|
562
562
|
d.date = void 0;
|
|
563
|
-
var at = ot(), y =
|
|
563
|
+
var at = ot(), y = kn(), u = Yt(), h = Ne(), m = st(), D = class {
|
|
564
564
|
static {
|
|
565
565
|
i(this, "ParseInputLazyPath");
|
|
566
566
|
}
|
|
@@ -571,7 +571,7 @@ t declare it");
|
|
|
571
571
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.
|
|
572
572
|
push(...this._path, this._key)), this._cachedPath;
|
|
573
573
|
}
|
|
574
|
-
},
|
|
574
|
+
}, Tn = /* @__PURE__ */ i((t, e) => {
|
|
575
575
|
if ((0, u.isValid)(e))
|
|
576
576
|
return { success: !0, data: e.value };
|
|
577
577
|
if (!t.common.issues.length)
|
|
@@ -664,7 +664,7 @@ t declare it");
|
|
|
664
664
|
data: e,
|
|
665
665
|
parsedType: (0, h.getParsedType)(e)
|
|
666
666
|
}, o = this._parseSync({ data: e, path: s.path, parent: s });
|
|
667
|
-
return
|
|
667
|
+
return Tn(s, o);
|
|
668
668
|
}
|
|
669
669
|
"~validate"(e) {
|
|
670
670
|
var r, n;
|
|
@@ -719,7 +719,7 @@ t declare it");
|
|
|
719
719
|
data: e,
|
|
720
720
|
parsedType: (0, h.getParsedType)(e)
|
|
721
721
|
}, s = this._parse({ data: e, path: n.path, parent: n }), o = await ((0, u.isAsync)(s) ? s : Promise.resolve(s));
|
|
722
|
-
return
|
|
722
|
+
return Tn(n, o);
|
|
723
723
|
}
|
|
724
724
|
refine(e, r) {
|
|
725
725
|
let n = /* @__PURE__ */ i((s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r, "getIssu\
|
|
@@ -772,7 +772,7 @@ eProperties");
|
|
|
772
772
|
return q.create(this);
|
|
773
773
|
}
|
|
774
774
|
promise() {
|
|
775
|
-
return
|
|
775
|
+
return Y.create(this, this._def);
|
|
776
776
|
}
|
|
777
777
|
or(e) {
|
|
778
778
|
return ae.create([this, e], this._def);
|
|
@@ -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})+$", Xt,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",
|
|
848
|
-
function
|
|
839
|
+
var Qi = /^c[^\s-]{8,}$/i, ea = /^[0-9a-z]+$/, ta = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ra = /^[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
|
+
na = /^[a-z0-9_-]{21}$/i, sa = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, oa = /^[-+]?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, aa = "^(\\p{Extended_Pictographic}|\\p{Emoji_Comp\
|
|
842
|
+
onent})+$", Xt, 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])$/, da = /^(?:(?: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
|
+
ua = /^(([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
|
+
la = /^(([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
|
+
pa = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, fa = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
846
|
+
En = "((\\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])))", ma = new RegExp(`^${En}$`);
|
|
848
|
+
function Cn(t) {
|
|
849
849
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
850
850
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
851
851
|
}
|
|
852
|
-
i(
|
|
853
|
-
function
|
|
854
|
-
return new RegExp(`^${
|
|
852
|
+
i(Cn, "timeRegexSource");
|
|
853
|
+
function ha(t) {
|
|
854
|
+
return new RegExp(`^${Cn(t)}$`);
|
|
855
855
|
}
|
|
856
|
-
i(
|
|
857
|
-
function
|
|
858
|
-
let e = `${
|
|
856
|
+
i(ha, "timeRegex");
|
|
857
|
+
function Pn(t) {
|
|
858
|
+
let e = `${En}T${Cn(t)}`, r = [];
|
|
859
859
|
return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
860
860
|
}
|
|
861
|
-
i(
|
|
862
|
-
d.datetimeRegex =
|
|
863
|
-
function
|
|
864
|
-
return !!((e === "v4" || !e) &&
|
|
861
|
+
i(Pn, "datetimeRegex");
|
|
862
|
+
d.datetimeRegex = Pn;
|
|
863
|
+
function ya(t, e) {
|
|
864
|
+
return !!((e === "v4" || !e) && ca.test(t) || (e === "v6" || !e) && ua.test(t));
|
|
865
865
|
}
|
|
866
|
-
i(
|
|
867
|
-
function
|
|
868
|
-
if (!
|
|
866
|
+
i(ya, "isValidIP");
|
|
867
|
+
function ga(t, e) {
|
|
868
|
+
if (!sa.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})+$", Xt, oa = /^(?:(?: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(ga, "isValidJWT");
|
|
879
|
+
function ba(t, e) {
|
|
880
|
+
return !!((e === "v4" || !e) && da.test(t) || (e === "v6" || !e) && la.test(t));
|
|
881
881
|
}
|
|
882
|
-
i(
|
|
883
|
-
var
|
|
882
|
+
i(ba, "isValidCidr");
|
|
883
|
+
var J = class t extends v {
|
|
884
884
|
static {
|
|
885
885
|
i(this, "ZodString");
|
|
886
886
|
}
|
|
@@ -931,43 +931,43 @@ onent})+$", Xt, oa = /^(?:(?: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
|
-
Xt || (Xt = new RegExp(
|
|
940
|
+
Xt || (Xt = new RegExp(aa, "u")), Xt.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
|
+
ra.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
|
+
na.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
|
+
Qi.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
|
+
ea.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
|
+
ta.test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
971
971
|
validation: "ulid",
|
|
972
972
|
code: m.ZodIssueCode.invalid_string,
|
|
973
973
|
message: o.message
|
|
@@ -1001,39 +1001,39 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1001
1001
|
code: m.ZodIssueCode.invalid_string,
|
|
1002
1002
|
validation: { endsWith: o.value },
|
|
1003
1003
|
message: o.message
|
|
1004
|
-
}), n.dirty()) : o.kind === "datetime" ?
|
|
1004
|
+
}), n.dirty()) : o.kind === "datetime" ? Pn(o).test(e.data) || (s = this._getOrReturnCtx(e, s), (0, u.addIssueToContext)(s, {
|
|
1005
1005
|
code: m.ZodIssueCode.invalid_string,
|
|
1006
1006
|
validation: "datetime",
|
|
1007
1007
|
message: o.message
|
|
1008
|
-
}), n.dirty()) : o.kind === "date" ?
|
|
1008
|
+
}), n.dirty()) : o.kind === "date" ? ma.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" ? ha(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" ? oa.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" ? ya(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" ? ga(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" ? ba(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" ? pa.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" ? fa.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,22 +1263,22 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1263
1263
|
return e;
|
|
1264
1264
|
}
|
|
1265
1265
|
};
|
|
1266
|
-
d.ZodString =
|
|
1267
|
-
|
|
1266
|
+
d.ZodString = J;
|
|
1267
|
+
J.create = (t) => {
|
|
1268
1268
|
var e;
|
|
1269
|
-
return new
|
|
1269
|
+
return new J({
|
|
1270
1270
|
checks: [],
|
|
1271
1271
|
typeName: g.ZodString,
|
|
1272
1272
|
coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
|
|
1273
1273
|
...x(t)
|
|
1274
1274
|
});
|
|
1275
1275
|
};
|
|
1276
|
-
function
|
|
1276
|
+
function xa(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(
|
|
1281
|
+
i(xa, "floatSafeRemainder");
|
|
1282
1282
|
var te = class t extends v {
|
|
1283
1283
|
static {
|
|
1284
1284
|
i(this, "ZodNumber");
|
|
@@ -1318,7 +1318,7 @@ onent})+$", Xt, oa = /^(?:(?: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" ? xa(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,
|
|
@@ -1702,7 +1702,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1702
1702
|
typeName: g.ZodDate,
|
|
1703
1703
|
...x(t)
|
|
1704
1704
|
});
|
|
1705
|
-
var
|
|
1705
|
+
var ve = class extends v {
|
|
1706
1706
|
static {
|
|
1707
1707
|
i(this, "ZodSymbol");
|
|
1708
1708
|
}
|
|
@@ -1718,8 +1718,8 @@ onent})+$", Xt, oa = /^(?:(?: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 = ve;
|
|
1722
|
+
ve.create = (t) => new ve({
|
|
1723
1723
|
typeName: g.ZodSymbol,
|
|
1724
1724
|
...x(t)
|
|
1725
1725
|
});
|
|
@@ -1765,7 +1765,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1765
1765
|
typeName: g.ZodNull,
|
|
1766
1766
|
...x(t)
|
|
1767
1767
|
});
|
|
1768
|
-
var
|
|
1768
|
+
var H = class extends v {
|
|
1769
1769
|
static {
|
|
1770
1770
|
i(this, "ZodAny");
|
|
1771
1771
|
}
|
|
@@ -1776,8 +1776,8 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1776
1776
|
return (0, u.OK)(e.data);
|
|
1777
1777
|
}
|
|
1778
1778
|
};
|
|
1779
|
-
d.ZodAny =
|
|
1780
|
-
|
|
1779
|
+
d.ZodAny = H;
|
|
1780
|
+
H.create = (t) => new H({
|
|
1781
1781
|
typeName: g.ZodAny,
|
|
1782
1782
|
...x(t)
|
|
1783
1783
|
});
|
|
@@ -1815,7 +1815,7 @@ onent})+$", Xt, oa = /^(?:(?: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
|
...x(t)
|
|
1817
1817
|
});
|
|
1818
|
-
var
|
|
1818
|
+
var _e = class extends v {
|
|
1819
1819
|
static {
|
|
1820
1820
|
i(this, "ZodVoid");
|
|
1821
1821
|
}
|
|
@@ -1831,8 +1831,8 @@ onent})+$", Xt, oa = /^(?:(?: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 = _e;
|
|
1835
|
+
_e.create = (t) => new _e({
|
|
1836
1836
|
typeName: g.ZodVoid,
|
|
1837
1837
|
...x(t)
|
|
1838
1838
|
});
|
|
@@ -1913,12 +1913,12 @@ onent})+$", Xt, oa = /^(?:(?: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
|
...x(e)
|
|
1915
1915
|
});
|
|
1916
|
-
function
|
|
1916
|
+
function xe(t) {
|
|
1917
1917
|
if (t instanceof j) {
|
|
1918
1918
|
let e = {};
|
|
1919
1919
|
for (let r in t.shape) {
|
|
1920
1920
|
let n = t.shape[r];
|
|
1921
|
-
e[r] = M.create(
|
|
1921
|
+
e[r] = M.create(xe(n));
|
|
1922
1922
|
}
|
|
1923
1923
|
return new j({
|
|
1924
1924
|
...t._def,
|
|
@@ -1926,11 +1926,11 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1926
1926
|
});
|
|
1927
1927
|
} else return t instanceof q ? new q({
|
|
1928
1928
|
...t._def,
|
|
1929
|
-
type:
|
|
1930
|
-
}) : t instanceof M ? M.create(
|
|
1929
|
+
type: xe(t.element)
|
|
1930
|
+
}) : t instanceof M ? M.create(xe(t.unwrap())) : t instanceof F ? F.create(xe(t.unwrap())) : t instanceof V ? V.create(t.items.map((e) => xe(
|
|
1931
1931
|
e))) : t;
|
|
1932
1932
|
}
|
|
1933
|
-
i(
|
|
1933
|
+
i(xe, "deepPartialify");
|
|
1934
1934
|
var j = class t extends v {
|
|
1935
1935
|
static {
|
|
1936
1936
|
i(this, "ZodObject");
|
|
@@ -1998,10 +1998,10 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
1998
1998
|
return s.common.async ? Promise.resolve().then(async () => {
|
|
1999
1999
|
let p = [];
|
|
2000
2000
|
for (let f of l) {
|
|
2001
|
-
let b = await f.key,
|
|
2001
|
+
let b = await f.key, w = await f.value;
|
|
2002
2002
|
p.push({
|
|
2003
2003
|
key: b,
|
|
2004
|
-
value:
|
|
2004
|
+
value: w,
|
|
2005
2005
|
alwaysSet: f.alwaysSet
|
|
2006
2006
|
});
|
|
2007
2007
|
}
|
|
@@ -2170,7 +2170,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2170
2170
|
* @deprecated
|
|
2171
2171
|
*/
|
|
2172
2172
|
deepPartial() {
|
|
2173
|
-
return
|
|
2173
|
+
return xe(this);
|
|
2174
2174
|
}
|
|
2175
2175
|
partial(e) {
|
|
2176
2176
|
let r = {};
|
|
@@ -2199,7 +2199,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2199
2199
|
});
|
|
2200
2200
|
}
|
|
2201
2201
|
keyof() {
|
|
2202
|
-
return
|
|
2202
|
+
return An(h.util.objectKeys(this.shape));
|
|
2203
2203
|
}
|
|
2204
2204
|
};
|
|
2205
2205
|
d.ZodObject = j;
|
|
@@ -2530,7 +2530,7 @@ onent})+$", Xt, oa = /^(?:(?: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
|
...x(n)
|
|
2532
2532
|
}) : new t({
|
|
2533
|
-
keyType:
|
|
2533
|
+
keyType: J.create(),
|
|
2534
2534
|
valueType: e,
|
|
2535
2535
|
typeName: g.ZodRecord,
|
|
2536
2536
|
...x(r)
|
|
@@ -2538,7 +2538,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2538
2538
|
}
|
|
2539
2539
|
};
|
|
2540
2540
|
d.ZodRecord = ut;
|
|
2541
|
-
var
|
|
2541
|
+
var we = class extends v {
|
|
2542
2542
|
static {
|
|
2543
2543
|
i(this, "ZodMap");
|
|
2544
2544
|
}
|
|
@@ -2583,14 +2583,14 @@ onent})+$", Xt, oa = /^(?:(?: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 = we;
|
|
2587
|
+
we.create = (t, e, r) => new we({
|
|
2588
2588
|
valueType: e,
|
|
2589
2589
|
keyType: t,
|
|
2590
2590
|
typeName: g.ZodMap,
|
|
2591
2591
|
...x(r)
|
|
2592
2592
|
});
|
|
2593
|
-
var
|
|
2593
|
+
var ke = class t extends v {
|
|
2594
2594
|
static {
|
|
2595
2595
|
i(this, "ZodSet");
|
|
2596
2596
|
}
|
|
@@ -2651,8 +2651,8 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2651
2651
|
return this.min(1, e);
|
|
2652
2652
|
}
|
|
2653
2653
|
};
|
|
2654
|
-
d.ZodSet =
|
|
2655
|
-
|
|
2654
|
+
d.ZodSet = ke;
|
|
2655
|
+
ke.create = (t, e) => new ke({
|
|
2656
2656
|
valueType: t,
|
|
2657
2657
|
minSize: null,
|
|
2658
2658
|
maxSize: null,
|
|
@@ -2709,14 +2709,14 @@ onent})+$", Xt, oa = /^(?:(?: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 Y) {
|
|
2713
2713
|
let c = this;
|
|
2714
2714
|
return (0, u.OK)(async function(...l) {
|
|
2715
|
-
let p = new m.ZodError([]), f = await c._def.args.parseAsync(l, o).catch((
|
|
2716
|
-
throw p.addIssue(n(l,
|
|
2715
|
+
let p = new m.ZodError([]), f = await c._def.args.parseAsync(l, o).catch((_) => {
|
|
2716
|
+
throw p.addIssue(n(l, _)), p;
|
|
2717
2717
|
}), b = await Reflect.apply(a, this, f);
|
|
2718
|
-
return await c._def.returns._def.type.parseAsync(b, o).catch((
|
|
2719
|
-
throw p.addIssue(s(b,
|
|
2718
|
+
return await c._def.returns._def.type.parseAsync(b, o).catch((_) => {
|
|
2719
|
+
throw p.addIssue(s(b, _)), p;
|
|
2720
2720
|
});
|
|
2721
2721
|
});
|
|
2722
2722
|
} else {
|
|
@@ -2809,14 +2809,14 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2809
2809
|
typeName: g.ZodLiteral,
|
|
2810
2810
|
...x(e)
|
|
2811
2811
|
});
|
|
2812
|
-
function
|
|
2812
|
+
function An(t, e) {
|
|
2813
2813
|
return new le({
|
|
2814
2814
|
values: t,
|
|
2815
2815
|
typeName: g.ZodEnum,
|
|
2816
2816
|
...x(e)
|
|
2817
2817
|
});
|
|
2818
2818
|
}
|
|
2819
|
-
i(
|
|
2819
|
+
i(An, "createZodEnum");
|
|
2820
2820
|
var le = class t extends v {
|
|
2821
2821
|
static {
|
|
2822
2822
|
i(this, "ZodEnum");
|
|
@@ -2833,7 +2833,7 @@ onent})+$", Xt, oa = /^(?:(?: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 (ct(this, Me, "f") ||
|
|
2836
|
+
if (ct(this, Me, "f") || Sn(this, Me, new Set(this._def.values), "f"), !ct(this, Me, "f").has(e.data)) {
|
|
2837
2837
|
let r = this._getOrReturnCtx(e), n = this._def.values;
|
|
2838
2838
|
return (0, u.addIssueToContext)(r, {
|
|
2839
2839
|
received: r.data,
|
|
@@ -2879,7 +2879,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2879
2879
|
};
|
|
2880
2880
|
d.ZodEnum = le;
|
|
2881
2881
|
Me = /* @__PURE__ */ new WeakMap();
|
|
2882
|
-
le.create =
|
|
2882
|
+
le.create = An;
|
|
2883
2883
|
var pe = class extends v {
|
|
2884
2884
|
static {
|
|
2885
2885
|
i(this, "ZodNativeEnum");
|
|
@@ -2897,7 +2897,7 @@ onent})+$", Xt, oa = /^(?:(?: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 (ct(this, De, "f") ||
|
|
2900
|
+
if (ct(this, De, "f") || Sn(this, De, new Set(h.util.getValidEnumValues(this._def.values)), "f"), !ct(this, De, "f").has(e.data)) {
|
|
2901
2901
|
let s = h.util.objectValues(r);
|
|
2902
2902
|
return (0, u.addIssueToContext)(n, {
|
|
2903
2903
|
received: n.data,
|
|
@@ -2918,7 +2918,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
2918
2918
|
typeName: g.ZodNativeEnum,
|
|
2919
2919
|
...x(e)
|
|
2920
2920
|
});
|
|
2921
|
-
var
|
|
2921
|
+
var Y = class extends v {
|
|
2922
2922
|
static {
|
|
2923
2923
|
i(this, "ZodPromise");
|
|
2924
2924
|
}
|
|
@@ -2940,8 +2940,8 @@ onent})+$", Xt, oa = /^(?:(?: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 = Y;
|
|
2944
|
+
Y.create = (t, e) => new Y({
|
|
2945
2945
|
type: t,
|
|
2946
2946
|
typeName: g.ZodPromise,
|
|
2947
2947
|
...x(e)
|
|
@@ -3146,7 +3146,7 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3146
3146
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
3147
3147
|
...x(e)
|
|
3148
3148
|
});
|
|
3149
|
-
var
|
|
3149
|
+
var Te = class extends v {
|
|
3150
3150
|
static {
|
|
3151
3151
|
i(this, "ZodNaN");
|
|
3152
3152
|
}
|
|
@@ -3162,8 +3162,8 @@ onent})+$", Xt, oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3162
3162
|
return { status: "valid", value: e.data };
|
|
3163
3163
|
}
|
|
3164
3164
|
};
|
|
3165
|
-
d.ZodNaN =
|
|
3166
|
-
|
|
3165
|
+
d.ZodNaN = Te;
|
|
3166
|
+
Te.create = (t) => new Te({
|
|
3167
3167
|
typeName: g.ZodNaN,
|
|
3168
3168
|
...x(t)
|
|
3169
3169
|
});
|
|
@@ -3249,31 +3249,31 @@ eze");
|
|
|
3249
3249
|
typeName: g.ZodReadonly,
|
|
3250
3250
|
...x(e)
|
|
3251
3251
|
});
|
|
3252
|
-
function
|
|
3252
|
+
function In(t, e) {
|
|
3253
3253
|
let r = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
3254
3254
|
return typeof r == "string" ? { message: r } : r;
|
|
3255
3255
|
}
|
|
3256
|
-
i(
|
|
3257
|
-
function
|
|
3258
|
-
return t ?
|
|
3256
|
+
i(In, "cleanParams");
|
|
3257
|
+
function On(t, e = {}, r) {
|
|
3258
|
+
return t ? H.create().superRefine((n, s) => {
|
|
3259
3259
|
var o, a;
|
|
3260
3260
|
let c = t(n);
|
|
3261
3261
|
if (c instanceof Promise)
|
|
3262
3262
|
return c.then((l) => {
|
|
3263
3263
|
var p, f;
|
|
3264
3264
|
if (!l) {
|
|
3265
|
-
let b =
|
|
3266
|
-
s.addIssue({ code: "custom", ...b, fatal:
|
|
3265
|
+
let b = In(e, n), w = (f = (p = b.fatal) !== null && p !== void 0 ? p : r) !== null && f !== void 0 ? f : !0;
|
|
3266
|
+
s.addIssue({ code: "custom", ...b, fatal: w });
|
|
3267
3267
|
}
|
|
3268
3268
|
});
|
|
3269
3269
|
if (!c) {
|
|
3270
|
-
let l =
|
|
3270
|
+
let l = In(e, n), p = (a = (o = l.fatal) !== null && o !== void 0 ? o : r) !== null && a !== void 0 ? a : !0;
|
|
3271
3271
|
s.addIssue({ code: "custom", ...l, fatal: p });
|
|
3272
3272
|
}
|
|
3273
|
-
}) :
|
|
3273
|
+
}) : H.create();
|
|
3274
3274
|
}
|
|
3275
|
-
i(
|
|
3276
|
-
d.custom =
|
|
3275
|
+
i(On, "custom");
|
|
3276
|
+
d.custom = On;
|
|
3277
3277
|
d.late = {
|
|
3278
3278
|
object: j.lazycreate
|
|
3279
3279
|
};
|
|
@@ -3288,87 +3288,87 @@ known", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray",
|
|
|
3288
3288
|
t", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodRe\
|
|
3289
3289
|
adonly";
|
|
3290
3290
|
})(g || (d.ZodFirstPartyTypeKind = g = {}));
|
|
3291
|
-
var
|
|
3291
|
+
var va = /* @__PURE__ */ i((t, e = {
|
|
3292
3292
|
message: `Input not instance of ${t.name}`
|
|
3293
|
-
}) =>
|
|
3294
|
-
d.instanceof =
|
|
3295
|
-
var
|
|
3296
|
-
d.string =
|
|
3297
|
-
var
|
|
3298
|
-
d.number =
|
|
3299
|
-
var
|
|
3300
|
-
d.nan =
|
|
3301
|
-
var
|
|
3302
|
-
d.bigint =
|
|
3303
|
-
var
|
|
3304
|
-
d.boolean =
|
|
3305
|
-
var
|
|
3306
|
-
d.date =
|
|
3307
|
-
var
|
|
3308
|
-
d.symbol =
|
|
3309
|
-
var
|
|
3310
|
-
d.undefined =
|
|
3311
|
-
var
|
|
3312
|
-
d.null =
|
|
3313
|
-
var
|
|
3314
|
-
d.any =
|
|
3315
|
-
var
|
|
3316
|
-
d.unknown =
|
|
3317
|
-
var
|
|
3318
|
-
d.never =
|
|
3319
|
-
var
|
|
3320
|
-
d.void =
|
|
3321
|
-
var
|
|
3322
|
-
d.array =
|
|
3323
|
-
var
|
|
3324
|
-
d.object =
|
|
3325
|
-
var
|
|
3326
|
-
d.strictObject =
|
|
3327
|
-
var
|
|
3328
|
-
d.union =
|
|
3329
|
-
var
|
|
3330
|
-
d.discriminatedUnion =
|
|
3331
|
-
var
|
|
3332
|
-
d.intersection =
|
|
3333
|
-
var
|
|
3334
|
-
d.tuple =
|
|
3335
|
-
var
|
|
3336
|
-
d.record =
|
|
3337
|
-
var
|
|
3338
|
-
d.map =
|
|
3339
|
-
var
|
|
3340
|
-
d.set =
|
|
3341
|
-
var
|
|
3342
|
-
d.function =
|
|
3343
|
-
var
|
|
3344
|
-
d.lazy =
|
|
3345
|
-
var
|
|
3346
|
-
d.literal =
|
|
3347
|
-
var
|
|
3348
|
-
d.enum =
|
|
3349
|
-
var
|
|
3350
|
-
d.nativeEnum =
|
|
3351
|
-
var
|
|
3352
|
-
d.promise =
|
|
3353
|
-
var
|
|
3354
|
-
d.effect =
|
|
3355
|
-
d.transformer =
|
|
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 =
|
|
3293
|
+
}) => On((r) => r instanceof t, e), "instanceOfType");
|
|
3294
|
+
d.instanceof = va;
|
|
3295
|
+
var jn = J.create;
|
|
3296
|
+
d.string = jn;
|
|
3297
|
+
var Rn = te.create;
|
|
3298
|
+
d.number = Rn;
|
|
3299
|
+
var _a = Te.create;
|
|
3300
|
+
d.nan = _a;
|
|
3301
|
+
var wa = re.create;
|
|
3302
|
+
d.bigint = wa;
|
|
3303
|
+
var Nn = ne.create;
|
|
3304
|
+
d.boolean = Nn;
|
|
3305
|
+
var ka = se.create;
|
|
3306
|
+
d.date = ka;
|
|
3307
|
+
var Ta = ve.create;
|
|
3308
|
+
d.symbol = Ta;
|
|
3309
|
+
var Ia = oe.create;
|
|
3310
|
+
d.undefined = Ia;
|
|
3311
|
+
var Sa = ie.create;
|
|
3312
|
+
d.null = Sa;
|
|
3313
|
+
var Ea = H.create;
|
|
3314
|
+
d.any = Ea;
|
|
3315
|
+
var Ca = W.create;
|
|
3316
|
+
d.unknown = Ca;
|
|
3317
|
+
var Pa = U.create;
|
|
3318
|
+
d.never = Pa;
|
|
3319
|
+
var Aa = _e.create;
|
|
3320
|
+
d.void = Aa;
|
|
3321
|
+
var Oa = q.create;
|
|
3322
|
+
d.array = Oa;
|
|
3323
|
+
var ja = j.create;
|
|
3324
|
+
d.object = ja;
|
|
3325
|
+
var Ra = j.strictCreate;
|
|
3326
|
+
d.strictObject = Ra;
|
|
3327
|
+
var Na = ae.create;
|
|
3328
|
+
d.union = Na;
|
|
3329
|
+
var Za = dt.create;
|
|
3330
|
+
d.discriminatedUnion = Za;
|
|
3331
|
+
var Ma = ce.create;
|
|
3332
|
+
d.intersection = Ma;
|
|
3333
|
+
var Da = V.create;
|
|
3334
|
+
d.tuple = Da;
|
|
3335
|
+
var La = ut.create;
|
|
3336
|
+
d.record = La;
|
|
3337
|
+
var Ua = we.create;
|
|
3338
|
+
d.map = Ua;
|
|
3339
|
+
var $a = ke.create;
|
|
3340
|
+
d.set = $a;
|
|
3341
|
+
var Va = lt.create;
|
|
3342
|
+
d.function = Va;
|
|
3343
|
+
var Fa = de.create;
|
|
3344
|
+
d.lazy = Fa;
|
|
3345
|
+
var Ba = ue.create;
|
|
3346
|
+
d.literal = Ba;
|
|
3347
|
+
var Wa = le.create;
|
|
3348
|
+
d.enum = Wa;
|
|
3349
|
+
var qa = pe.create;
|
|
3350
|
+
d.nativeEnum = qa;
|
|
3351
|
+
var Ga = Y.create;
|
|
3352
|
+
d.promise = Ga;
|
|
3353
|
+
var Zn = Z.create;
|
|
3354
|
+
d.effect = Zn;
|
|
3355
|
+
d.transformer = Zn;
|
|
3356
|
+
var za = M.create;
|
|
3357
|
+
d.optional = za;
|
|
3358
|
+
var Ka = F.create;
|
|
3359
|
+
d.nullable = Ka;
|
|
3360
|
+
var Ja = Z.createWithPreprocess;
|
|
3361
|
+
d.preprocess = Ja;
|
|
3362
|
+
var Ha = Ue.create;
|
|
3363
|
+
d.pipeline = Ha;
|
|
3364
|
+
var Ya = /* @__PURE__ */ i(() => jn().optional(), "ostring");
|
|
3365
|
+
d.ostring = Ya;
|
|
3366
|
+
var Xa = /* @__PURE__ */ i(() => Rn().optional(), "onumber");
|
|
3367
|
+
d.onumber = Xa;
|
|
3368
|
+
var Qa = /* @__PURE__ */ i(() => Nn().optional(), "oboolean");
|
|
3369
|
+
d.oboolean = Qa;
|
|
3370
3370
|
d.coerce = {
|
|
3371
|
-
string: /* @__PURE__ */ i((t) =>
|
|
3371
|
+
string: /* @__PURE__ */ i((t) => J.create({ ...t, coerce: !0 }), "string"),
|
|
3372
3372
|
number: /* @__PURE__ */ i((t) => te.create({ ...t, coerce: !0 }), "number"),
|
|
3373
3373
|
boolean: /* @__PURE__ */ i((t) => ne.create({
|
|
3374
3374
|
...t,
|
|
@@ -3383,7 +3383,7 @@ adonly";
|
|
|
3383
3383
|
// ../node_modules/zod/lib/external.js
|
|
3384
3384
|
var er = I((L) => {
|
|
3385
3385
|
"use strict";
|
|
3386
|
-
var
|
|
3386
|
+
var ec = L && L.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
3387
3387
|
n === void 0 && (n = r);
|
|
3388
3388
|
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
3389
3389
|
(!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: /* @__PURE__ */ i(function() {
|
|
@@ -3391,22 +3391,22 @@ var er = I((L) => {
|
|
|
3391
3391
|
}, "get") }), Object.defineProperty(t, n, s);
|
|
3392
3392
|
} : function(t, e, r, n) {
|
|
3393
3393
|
n === void 0 && (n = r), t[n] = e[r];
|
|
3394
|
-
}),
|
|
3395
|
-
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) &&
|
|
3394
|
+
}), Ie = L && L.__exportStar || function(t, e) {
|
|
3395
|
+
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) && ec(e, t, r);
|
|
3396
3396
|
};
|
|
3397
3397
|
Object.defineProperty(L, "__esModule", { value: !0 });
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3398
|
+
Ie(ot(), L);
|
|
3399
|
+
Ie(Yt(), L);
|
|
3400
|
+
Ie(_n(), L);
|
|
3401
|
+
Ie(Ne(), L);
|
|
3402
|
+
Ie(Mn(), L);
|
|
3403
|
+
Ie(st(), L);
|
|
3404
3404
|
});
|
|
3405
3405
|
|
|
3406
3406
|
// ../node_modules/zod/lib/index.js
|
|
3407
|
-
var
|
|
3407
|
+
var Un = I((R) => {
|
|
3408
3408
|
"use strict";
|
|
3409
|
-
var
|
|
3409
|
+
var Dn = R && R.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
3410
3410
|
n === void 0 && (n = r);
|
|
3411
3411
|
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
3412
3412
|
(!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: /* @__PURE__ */ i(function() {
|
|
@@ -3414,32 +3414,32 @@ var Dn = I((R) => {
|
|
|
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
|
+
}), tc = R && R.__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
|
+
}), rc = R && R.__importStar || function(t) {
|
|
3422
3422
|
if (t && t.__esModule) return t;
|
|
3423
3423
|
var e = {};
|
|
3424
|
-
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) &&
|
|
3425
|
-
return
|
|
3426
|
-
},
|
|
3427
|
-
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) &&
|
|
3424
|
+
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) && Dn(e, t, r);
|
|
3425
|
+
return tc(e, t), e;
|
|
3426
|
+
}, nc = R && R.__exportStar || function(t, e) {
|
|
3427
|
+
for (var r in t) r !== "default" && !Object.prototype.hasOwnProperty.call(e, r) && Dn(e, t, r);
|
|
3428
3428
|
};
|
|
3429
3429
|
Object.defineProperty(R, "__esModule", { value: !0 });
|
|
3430
3430
|
R.z = void 0;
|
|
3431
|
-
var
|
|
3432
|
-
R.z =
|
|
3433
|
-
|
|
3434
|
-
R.default =
|
|
3431
|
+
var Ln = rc(er());
|
|
3432
|
+
R.z = Ln;
|
|
3433
|
+
nc(er(), R);
|
|
3434
|
+
R.default = Ln;
|
|
3435
3435
|
});
|
|
3436
3436
|
|
|
3437
3437
|
// ../node_modules/ts-dedent/dist/index.js
|
|
3438
|
-
var
|
|
3438
|
+
var Vn = I(($e) => {
|
|
3439
3439
|
"use strict";
|
|
3440
3440
|
Object.defineProperty($e, "__esModule", { value: !0 });
|
|
3441
3441
|
$e.dedent = void 0;
|
|
3442
|
-
function
|
|
3442
|
+
function $n(t) {
|
|
3443
3443
|
for (var e = [], r = 1; r < arguments.length; r++)
|
|
3444
3444
|
e[r - 1] = arguments[r];
|
|
3445
3445
|
var n = Array.from(typeof t == "string" ? [t] : t);
|
|
@@ -3447,8 +3447,8 @@ var Un = I(($e) => {
|
|
|
3447
3447
|
var s = n.reduce(function(c, l) {
|
|
3448
3448
|
var p = l.match(/\n([\t ]+|(?!\s).)/g);
|
|
3449
3449
|
return p ? c.concat(p.map(function(f) {
|
|
3450
|
-
var b,
|
|
3451
|
-
return (
|
|
3450
|
+
var b, w;
|
|
3451
|
+
return (w = (b = f.match(/[\t ]/g)) === null || b === void 0 ? void 0 : b.length) !== null && w !== void 0 ? w : 0;
|
|
3452
3452
|
})) : c;
|
|
3453
3453
|
}, []);
|
|
3454
3454
|
if (s.length) {
|
|
@@ -3465,23 +3465,23 @@ var Un = I(($e) => {
|
|
|
3465
3465
|
var p = a.match(/(?:^|\n)( *)$/), f = p ? p[1] : "", b = c;
|
|
3466
3466
|
typeof c == "string" && c.includes(`
|
|
3467
3467
|
`) && (b = String(c).split(`
|
|
3468
|
-
`).map(function(
|
|
3469
|
-
return
|
|
3468
|
+
`).map(function(w, _) {
|
|
3469
|
+
return _ === 0 ? w : "" + f + w;
|
|
3470
3470
|
}).join(`
|
|
3471
3471
|
`)), a += b + n[l + 1];
|
|
3472
3472
|
}), a;
|
|
3473
3473
|
}
|
|
3474
|
-
i(
|
|
3475
|
-
$e.dedent =
|
|
3476
|
-
$e.default =
|
|
3474
|
+
i($n, "dedent");
|
|
3475
|
+
$e.dedent = $n;
|
|
3476
|
+
$e.default = $n;
|
|
3477
3477
|
});
|
|
3478
3478
|
|
|
3479
3479
|
// ../node_modules/isexe/windows.js
|
|
3480
|
-
var
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
var
|
|
3484
|
-
function
|
|
3480
|
+
var Jn = I((kp, Kn) => {
|
|
3481
|
+
Kn.exports = zn;
|
|
3482
|
+
zn.sync = lc;
|
|
3483
|
+
var qn = N("fs");
|
|
3484
|
+
function uc(t, e) {
|
|
3485
3485
|
var r = e.pathExt !== void 0 ? e.pathExt : process.env.PATHEXT;
|
|
3486
3486
|
if (!r || (r = r.split(";"), r.indexOf("") !== -1))
|
|
3487
3487
|
return !0;
|
|
@@ -3492,57 +3492,57 @@ var zn = I((vp, Gn) => {
|
|
|
3492
3492
|
}
|
|
3493
3493
|
return !1;
|
|
3494
3494
|
}
|
|
3495
|
-
i(
|
|
3496
|
-
function
|
|
3497
|
-
return !t.isSymbolicLink() && !t.isFile() ? !1 :
|
|
3495
|
+
i(uc, "checkPathExt");
|
|
3496
|
+
function Gn(t, e, r) {
|
|
3497
|
+
return !t.isSymbolicLink() && !t.isFile() ? !1 : uc(e, r);
|
|
3498
3498
|
}
|
|
3499
|
-
i(
|
|
3500
|
-
function
|
|
3501
|
-
|
|
3502
|
-
r(n, n ? !1 :
|
|
3499
|
+
i(Gn, "checkStat");
|
|
3500
|
+
function zn(t, e, r) {
|
|
3501
|
+
qn.stat(t, function(n, s) {
|
|
3502
|
+
r(n, n ? !1 : Gn(s, t, e));
|
|
3503
3503
|
});
|
|
3504
3504
|
}
|
|
3505
|
-
i(
|
|
3506
|
-
function
|
|
3507
|
-
return
|
|
3505
|
+
i(zn, "isexe");
|
|
3506
|
+
function lc(t, e) {
|
|
3507
|
+
return Gn(qn.statSync(t), t, e);
|
|
3508
3508
|
}
|
|
3509
|
-
i(
|
|
3509
|
+
i(lc, "sync");
|
|
3510
3510
|
});
|
|
3511
3511
|
|
|
3512
3512
|
// ../node_modules/isexe/mode.js
|
|
3513
|
-
var
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
var
|
|
3517
|
-
function
|
|
3518
|
-
|
|
3519
|
-
r(n, n ? !1 :
|
|
3513
|
+
var es = I((Ip, Qn) => {
|
|
3514
|
+
Qn.exports = Yn;
|
|
3515
|
+
Yn.sync = pc;
|
|
3516
|
+
var Hn = N("fs");
|
|
3517
|
+
function Yn(t, e, r) {
|
|
3518
|
+
Hn.stat(t, function(n, s) {
|
|
3519
|
+
r(n, n ? !1 : Xn(s, e));
|
|
3520
3520
|
});
|
|
3521
3521
|
}
|
|
3522
|
-
i(
|
|
3523
|
-
function
|
|
3524
|
-
return Hn
|
|
3522
|
+
i(Yn, "isexe");
|
|
3523
|
+
function pc(t, e) {
|
|
3524
|
+
return Xn(Hn.statSync(t), e);
|
|
3525
3525
|
}
|
|
3526
|
-
i(
|
|
3527
|
-
function
|
|
3528
|
-
return t.isFile() &&
|
|
3526
|
+
i(pc, "sync");
|
|
3527
|
+
function Xn(t, e) {
|
|
3528
|
+
return t.isFile() && fc(t, e);
|
|
3529
3529
|
}
|
|
3530
|
-
i(
|
|
3531
|
-
function
|
|
3530
|
+
i(Xn, "checkStat");
|
|
3531
|
+
function fc(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), l = parseInt("010", 8), p = parseInt("001", 8), f = c | l, b = r & p || r & l && s ===
|
|
3534
3534
|
a || r & c && n === o || r & f && o === 0;
|
|
3535
3535
|
return b;
|
|
3536
3536
|
}
|
|
3537
|
-
i(
|
|
3537
|
+
i(fc, "checkMode");
|
|
3538
3538
|
});
|
|
3539
3539
|
|
|
3540
3540
|
// ../node_modules/isexe/index.js
|
|
3541
|
-
var
|
|
3542
|
-
var
|
|
3543
|
-
process.platform === "win32" || global.TESTING_WINDOWS ? ht =
|
|
3544
|
-
|
|
3545
|
-
rr.sync =
|
|
3541
|
+
var rs = I((Cp, ts) => {
|
|
3542
|
+
var Ep = N("fs"), ht;
|
|
3543
|
+
process.platform === "win32" || global.TESTING_WINDOWS ? ht = Jn() : ht = es();
|
|
3544
|
+
ts.exports = rr;
|
|
3545
|
+
rr.sync = mc;
|
|
3546
3546
|
function rr(t, e, r) {
|
|
3547
3547
|
if (typeof e == "function" && (r = e, e = {}), !r) {
|
|
3548
3548
|
if (typeof Promise != "function")
|
|
@@ -3558,7 +3558,7 @@ var es = I((Ip, Qn) => {
|
|
|
3558
3558
|
});
|
|
3559
3559
|
}
|
|
3560
3560
|
i(rr, "isexe");
|
|
3561
|
-
function
|
|
3561
|
+
function mc(t, e) {
|
|
3562
3562
|
try {
|
|
3563
3563
|
return ht.sync(t, e || {});
|
|
3564
3564
|
} catch (r) {
|
|
@@ -3567,59 +3567,59 @@ var es = I((Ip, Qn) => {
|
|
|
3567
3567
|
throw r;
|
|
3568
3568
|
}
|
|
3569
3569
|
}
|
|
3570
|
-
i(
|
|
3570
|
+
i(mc, "sync");
|
|
3571
3571
|
});
|
|
3572
3572
|
|
|
3573
3573
|
// ../node_modules/which/which.js
|
|
3574
|
-
var
|
|
3575
|
-
var
|
|
3576
|
-
":",
|
|
3574
|
+
var ds = I((Ap, cs) => {
|
|
3575
|
+
var Ce = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", ns = N("path"), hc = Ce ? ";" :
|
|
3576
|
+
":", ss = rs(), os = /* @__PURE__ */ i((t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), "getNotFoundError"), is = /* @__PURE__ */ i(
|
|
3577
3577
|
(t, e) => {
|
|
3578
|
-
let r = e.colon ||
|
|
3578
|
+
let r = e.colon || hc, n = t.match(/\//) || Ce && t.match(/\\/) ? [""] : [
|
|
3579
3579
|
// windows always checks the cwd first
|
|
3580
|
-
...
|
|
3580
|
+
...Ce ? [process.cwd()] : [],
|
|
3581
3581
|
...(e.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
3582
3582
|
"").split(r)
|
|
3583
|
-
], s =
|
|
3584
|
-
return
|
|
3583
|
+
], s = Ce ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = Ce ? s.split(r) : [""];
|
|
3584
|
+
return Ce && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
3585
3585
|
pathEnv: n,
|
|
3586
3586
|
pathExt: o,
|
|
3587
3587
|
pathExtExe: s
|
|
3588
3588
|
};
|
|
3589
|
-
}, "getPathInfo"),
|
|
3589
|
+
}, "getPathInfo"), as = /* @__PURE__ */ i((t, e, r) => {
|
|
3590
3590
|
typeof e == "function" && (r = e, e = {}), e || (e = {});
|
|
3591
|
-
let { pathEnv: n, pathExt: s, pathExtExe: o } =
|
|
3591
|
+
let { pathEnv: n, pathExt: s, pathExtExe: o } = is(t, e), a = [], c = /* @__PURE__ */ i((p) => new Promise((f, b) => {
|
|
3592
3592
|
if (p === n.length)
|
|
3593
|
-
return e.all && a.length ? f(a) : b(
|
|
3594
|
-
let
|
|
3593
|
+
return e.all && a.length ? f(a) : b(os(t));
|
|
3594
|
+
let w = n[p], _ = /^".*"$/.test(w) ? w.slice(1, -1) : w, C = ns.join(_, t), S = !_ && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + C : C;
|
|
3595
3595
|
f(l(S, p, 0));
|
|
3596
|
-
}), "step"), l = /* @__PURE__ */ i((p, f, b) => new Promise((
|
|
3596
|
+
}), "step"), l = /* @__PURE__ */ i((p, f, b) => new Promise((w, _) => {
|
|
3597
3597
|
if (b === s.length)
|
|
3598
|
-
return
|
|
3599
|
-
let
|
|
3600
|
-
|
|
3601
|
-
if (!S &&
|
|
3598
|
+
return w(c(f + 1));
|
|
3599
|
+
let C = s[b];
|
|
3600
|
+
ss(p + C, { pathExt: o }, (S, P) => {
|
|
3601
|
+
if (!S && P)
|
|
3602
3602
|
if (e.all)
|
|
3603
|
-
a.push(p +
|
|
3603
|
+
a.push(p + C);
|
|
3604
3604
|
else
|
|
3605
|
-
return
|
|
3606
|
-
return
|
|
3605
|
+
return w(p + C);
|
|
3606
|
+
return w(l(p, f, b + 1));
|
|
3607
3607
|
});
|
|
3608
3608
|
}), "subStep");
|
|
3609
3609
|
return r ? c(0).then((p) => r(null, p), r) : c(0);
|
|
3610
|
-
}, "which"),
|
|
3610
|
+
}, "which"), yc = /* @__PURE__ */ i((t, e) => {
|
|
3611
3611
|
e = e || {};
|
|
3612
|
-
let { pathEnv: r, pathExt: n, pathExtExe: s } =
|
|
3612
|
+
let { pathEnv: r, pathExt: n, pathExtExe: s } = is(t, e), o = [];
|
|
3613
3613
|
for (let a = 0; a < r.length; a++) {
|
|
3614
|
-
let c = r[a], l = /^".*"$/.test(c) ? c.slice(1, -1) : c, p =
|
|
3614
|
+
let c = r[a], l = /^".*"$/.test(c) ? c.slice(1, -1) : c, p = ns.join(l, t), f = !l && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + p : p;
|
|
3615
3615
|
for (let b = 0; b < n.length; b++) {
|
|
3616
|
-
let
|
|
3616
|
+
let w = f + n[b];
|
|
3617
3617
|
try {
|
|
3618
|
-
if (
|
|
3618
|
+
if (ss.sync(w, { pathExt: s }))
|
|
3619
3619
|
if (e.all)
|
|
3620
|
-
o.push(
|
|
3620
|
+
o.push(w);
|
|
3621
3621
|
else
|
|
3622
|
-
return
|
|
3622
|
+
return w;
|
|
3623
3623
|
} catch {
|
|
3624
3624
|
}
|
|
3625
3625
|
}
|
|
@@ -3628,28 +3628,28 @@ var as = I((Ep, is) => {
|
|
|
3628
3628
|
return o;
|
|
3629
3629
|
if (e.nothrow)
|
|
3630
3630
|
return null;
|
|
3631
|
-
throw
|
|
3631
|
+
throw os(t);
|
|
3632
3632
|
}, "whichSync");
|
|
3633
|
-
|
|
3634
|
-
|
|
3633
|
+
cs.exports = as;
|
|
3634
|
+
as.sync = yc;
|
|
3635
3635
|
});
|
|
3636
3636
|
|
|
3637
3637
|
// ../node_modules/path-key/index.js
|
|
3638
|
-
var
|
|
3638
|
+
var ls = I((jp, nr) => {
|
|
3639
3639
|
"use strict";
|
|
3640
|
-
var
|
|
3640
|
+
var us = /* @__PURE__ */ i((t = {}) => {
|
|
3641
3641
|
let e = t.env || process.env;
|
|
3642
3642
|
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(e).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
3643
3643
|
}, "pathKey");
|
|
3644
|
-
nr.exports =
|
|
3645
|
-
nr.exports.default =
|
|
3644
|
+
nr.exports = us;
|
|
3645
|
+
nr.exports.default = us;
|
|
3646
3646
|
});
|
|
3647
3647
|
|
|
3648
3648
|
// ../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
3649
|
-
var
|
|
3649
|
+
var hs = I((Np, ms) => {
|
|
3650
3650
|
"use strict";
|
|
3651
|
-
var
|
|
3652
|
-
function
|
|
3651
|
+
var ps = N("path"), gc = ds(), bc = ls();
|
|
3652
|
+
function fs(t, e) {
|
|
3653
3653
|
let r = t.options.env || process.env, n = process.cwd(), s = t.options.cwd != null, o = s && process.chdir !== void 0 && !process.chdir.
|
|
3654
3654
|
disabled;
|
|
3655
3655
|
if (o)
|
|
@@ -3659,53 +3659,53 @@ var fs = I((Op, ps) => {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
let a;
|
|
3661
3661
|
try {
|
|
3662
|
-
a =
|
|
3663
|
-
path: r[
|
|
3664
|
-
pathExt: e ?
|
|
3662
|
+
a = gc.sync(t.command, {
|
|
3663
|
+
path: r[bc({ env: r })],
|
|
3664
|
+
pathExt: e ? ps.delimiter : void 0
|
|
3665
3665
|
});
|
|
3666
3666
|
} catch {
|
|
3667
3667
|
} finally {
|
|
3668
3668
|
o && process.chdir(n);
|
|
3669
3669
|
}
|
|
3670
|
-
return a && (a =
|
|
3670
|
+
return a && (a = ps.resolve(s ? t.options.cwd : "", a)), a;
|
|
3671
3671
|
}
|
|
3672
|
-
i(
|
|
3673
|
-
function
|
|
3674
|
-
return
|
|
3672
|
+
i(fs, "resolveCommandAttempt");
|
|
3673
|
+
function xc(t) {
|
|
3674
|
+
return fs(t) || fs(t, !0);
|
|
3675
3675
|
}
|
|
3676
|
-
i(
|
|
3677
|
-
|
|
3676
|
+
i(xc, "resolveCommand");
|
|
3677
|
+
ms.exports = xc;
|
|
3678
3678
|
});
|
|
3679
3679
|
|
|
3680
3680
|
// ../node_modules/cross-spawn/lib/util/escape.js
|
|
3681
|
-
var
|
|
3681
|
+
var ys = I((Mp, or) => {
|
|
3682
3682
|
"use strict";
|
|
3683
3683
|
var sr = /([()\][%!^"`<>&|;, *?])/g;
|
|
3684
|
-
function
|
|
3684
|
+
function vc(t) {
|
|
3685
3685
|
return t = t.replace(sr, "^$1"), t;
|
|
3686
3686
|
}
|
|
3687
|
-
i(
|
|
3688
|
-
function
|
|
3687
|
+
i(vc, "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(sr,
|
|
3690
3690
|
"^$1"), e && (t = t.replace(sr, "^$1")), t;
|
|
3691
3691
|
}
|
|
3692
|
-
i(
|
|
3693
|
-
or.exports.command =
|
|
3694
|
-
or.exports.argument =
|
|
3692
|
+
i(_c, "escapeArgument");
|
|
3693
|
+
or.exports.command = vc;
|
|
3694
|
+
or.exports.argument = _c;
|
|
3695
3695
|
});
|
|
3696
3696
|
|
|
3697
3697
|
// ../node_modules/shebang-regex/index.js
|
|
3698
|
-
var
|
|
3698
|
+
var bs = I((Lp, gs) => {
|
|
3699
3699
|
"use strict";
|
|
3700
|
-
|
|
3700
|
+
gs.exports = /^#!(.*)/;
|
|
3701
3701
|
});
|
|
3702
3702
|
|
|
3703
3703
|
// ../node_modules/shebang-command/index.js
|
|
3704
|
-
var
|
|
3704
|
+
var vs = I((Up, xs) => {
|
|
3705
3705
|
"use strict";
|
|
3706
|
-
var
|
|
3707
|
-
|
|
3708
|
-
let e = t.match(
|
|
3706
|
+
var wc = bs();
|
|
3707
|
+
xs.exports = (t = "") => {
|
|
3708
|
+
let e = t.match(wc);
|
|
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 bs = I((Mp, gs) => {
|
|
|
3714
3714
|
});
|
|
3715
3715
|
|
|
3716
3716
|
// ../node_modules/cross-spawn/lib/util/readShebang.js
|
|
3717
|
-
var
|
|
3717
|
+
var ws = I(($p, _s) => {
|
|
3718
3718
|
"use strict";
|
|
3719
|
-
var ir = N("fs"),
|
|
3720
|
-
function
|
|
3719
|
+
var ir = N("fs"), kc = vs();
|
|
3720
|
+
function Tc(t) {
|
|
3721
3721
|
let r = Buffer.alloc(150), n;
|
|
3722
3722
|
try {
|
|
3723
3723
|
n = ir.openSync(t, "r"), ir.readSync(n, r, 0, 150, 0), ir.closeSync(n);
|
|
3724
3724
|
} catch {
|
|
3725
3725
|
}
|
|
3726
|
-
return
|
|
3726
|
+
return kc(r.toString());
|
|
3727
3727
|
}
|
|
3728
|
-
i(
|
|
3729
|
-
|
|
3728
|
+
i(Tc, "readShebang");
|
|
3729
|
+
_s.exports = Tc;
|
|
3730
3730
|
});
|
|
3731
3731
|
|
|
3732
3732
|
// ../node_modules/cross-spawn/lib/parse.js
|
|
3733
|
-
var
|
|
3733
|
+
var Ss = I((Fp, Is) => {
|
|
3734
3734
|
"use strict";
|
|
3735
|
-
var
|
|
3736
|
-
function
|
|
3737
|
-
t.file =
|
|
3738
|
-
let e = t.file &&
|
|
3739
|
-
return e ? (t.args.unshift(t.file), t.command = e,
|
|
3740
|
-
}
|
|
3741
|
-
i(
|
|
3742
|
-
function
|
|
3743
|
-
if (!
|
|
3735
|
+
var Ic = N("path"), ks = hs(), Ts = ys(), Sc = ws(), Ec = process.platform === "win32", Cc = /\.(?:com|exe)$/i, Pc = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
3736
|
+
function Ac(t) {
|
|
3737
|
+
t.file = ks(t);
|
|
3738
|
+
let e = t.file && Sc(t.file);
|
|
3739
|
+
return e ? (t.args.unshift(t.file), t.command = e, ks(t)) : t.file;
|
|
3740
|
+
}
|
|
3741
|
+
i(Ac, "detectShebang");
|
|
3742
|
+
function Oc(t) {
|
|
3743
|
+
if (!Ec)
|
|
3744
3744
|
return t;
|
|
3745
|
-
let e =
|
|
3745
|
+
let e = Ac(t), r = !Cc.test(e);
|
|
3746
3746
|
if (t.options.forceShell || r) {
|
|
3747
|
-
let n =
|
|
3748
|
-
t.command =
|
|
3747
|
+
let n = Pc.test(e);
|
|
3748
|
+
t.command = Ic.normalize(t.command), t.command = Ts.command(t.command), t.args = t.args.map((o) => Ts.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(Oc, "parseNonShell");
|
|
3755
|
+
function jc(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 Ts = I((Up, ks) => {
|
|
|
3764
3764
|
args: e
|
|
3765
3765
|
}
|
|
3766
3766
|
};
|
|
3767
|
-
return r.shell ? n :
|
|
3767
|
+
return r.shell ? n : Oc(n);
|
|
3768
3768
|
}
|
|
3769
|
-
i(
|
|
3770
|
-
|
|
3769
|
+
i(jc, "parse");
|
|
3770
|
+
Is.exports = jc;
|
|
3771
3771
|
});
|
|
3772
3772
|
|
|
3773
3773
|
// ../node_modules/cross-spawn/lib/enoent.js
|
|
3774
|
-
var
|
|
3774
|
+
var Ps = I((Wp, Cs) => {
|
|
3775
3775
|
"use strict";
|
|
3776
3776
|
var ar = process.platform === "win32";
|
|
3777
3777
|
function cr(t, e) {
|
|
@@ -3784,63 +3784,63 @@ var Es = I((Vp, Ss) => {
|
|
|
3784
3784
|
});
|
|
3785
3785
|
}
|
|
3786
3786
|
i(cr, "notFoundError");
|
|
3787
|
-
function
|
|
3787
|
+
function Rc(t, e) {
|
|
3788
3788
|
if (!ar)
|
|
3789
3789
|
return;
|
|
3790
3790
|
let r = t.emit;
|
|
3791
3791
|
t.emit = function(n, s) {
|
|
3792
3792
|
if (n === "exit") {
|
|
3793
|
-
let o =
|
|
3793
|
+
let o = Es(s, e);
|
|
3794
3794
|
if (o)
|
|
3795
3795
|
return r.call(t, "error", o);
|
|
3796
3796
|
}
|
|
3797
3797
|
return r.apply(t, arguments);
|
|
3798
3798
|
};
|
|
3799
3799
|
}
|
|
3800
|
-
i(
|
|
3801
|
-
function
|
|
3800
|
+
i(Rc, "hookChildProcess");
|
|
3801
|
+
function Es(t, e) {
|
|
3802
3802
|
return ar && t === 1 && !e.file ? cr(e.original, "spawn") : null;
|
|
3803
3803
|
}
|
|
3804
|
-
i(
|
|
3805
|
-
function
|
|
3804
|
+
i(Es, "verifyENOENT");
|
|
3805
|
+
function Nc(t, e) {
|
|
3806
3806
|
return ar && t === 1 && !e.file ? cr(e.original, "spawnSync") : null;
|
|
3807
3807
|
}
|
|
3808
|
-
i(
|
|
3809
|
-
|
|
3810
|
-
hookChildProcess:
|
|
3811
|
-
verifyENOENT:
|
|
3812
|
-
verifyENOENTSync:
|
|
3808
|
+
i(Nc, "verifyENOENTSync");
|
|
3809
|
+
Cs.exports = {
|
|
3810
|
+
hookChildProcess: Rc,
|
|
3811
|
+
verifyENOENT: Es,
|
|
3812
|
+
verifyENOENTSync: Nc,
|
|
3813
3813
|
notFoundError: cr
|
|
3814
3814
|
};
|
|
3815
3815
|
});
|
|
3816
3816
|
|
|
3817
3817
|
// ../node_modules/cross-spawn/index.js
|
|
3818
|
-
var
|
|
3818
|
+
var js = I((Gp, Pe) => {
|
|
3819
3819
|
"use strict";
|
|
3820
|
-
var
|
|
3821
|
-
function
|
|
3822
|
-
let n = dr(t, e, r), s =
|
|
3820
|
+
var As = N("child_process"), dr = Ss(), ur = Ps();
|
|
3821
|
+
function Os(t, e, r) {
|
|
3822
|
+
let n = dr(t, e, r), s = As.spawn(n.command, n.args, n.options);
|
|
3823
3823
|
return ur.hookChildProcess(s, n), s;
|
|
3824
3824
|
}
|
|
3825
|
-
i(
|
|
3826
|
-
function
|
|
3827
|
-
let n = dr(t, e, r), s =
|
|
3825
|
+
i(Os, "spawn");
|
|
3826
|
+
function Zc(t, e, r) {
|
|
3827
|
+
let n = dr(t, e, r), s = As.spawnSync(n.command, n.args, n.options);
|
|
3828
3828
|
return s.error = s.error || ur.verifyENOENTSync(s.status, n), s;
|
|
3829
3829
|
}
|
|
3830
|
-
i(
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3830
|
+
i(Zc, "spawnSync");
|
|
3831
|
+
Pe.exports = Os;
|
|
3832
|
+
Pe.exports.spawn = Os;
|
|
3833
|
+
Pe.exports.sync = Zc;
|
|
3834
|
+
Pe.exports._parse = dr;
|
|
3835
|
+
Pe.exports._enoent = ur;
|
|
3836
3836
|
});
|
|
3837
3837
|
|
|
3838
3838
|
// ../node_modules/merge-stream/index.js
|
|
3839
|
-
var
|
|
3839
|
+
var oo = I((xm, so) => {
|
|
3840
3840
|
"use strict";
|
|
3841
|
-
var { PassThrough:
|
|
3842
|
-
|
|
3843
|
-
var t = [], e = new
|
|
3841
|
+
var { PassThrough: Rd } = N("stream");
|
|
3842
|
+
so.exports = function() {
|
|
3843
|
+
var t = [], e = new Rd({ objectMode: !0 });
|
|
3844
3844
|
return e.setMaxListeners(0), e.add = r, e.isEmpty = n, e.on("unpipe", s), Array.prototype.slice.call(arguments).forEach(r), e;
|
|
3845
3845
|
function r(o) {
|
|
3846
3846
|
return Array.isArray(o) ? (o.forEach(r), this) : (t.push(o), o.once("end", s.bind(null, o)), o.once("error", e.emit.bind(e, "error")),
|
|
@@ -3864,21 +3864,21 @@ var no = I((ym, ro) => {
|
|
|
3864
3864
|
function Mr(t) {
|
|
3865
3865
|
return t.startsWith("\\\\?\\") ? t : t.replace(/\\/g, "/");
|
|
3866
3866
|
}
|
|
3867
|
-
var
|
|
3867
|
+
var So = vi(() => {
|
|
3868
3868
|
i(Mr, "slash");
|
|
3869
3869
|
});
|
|
3870
3870
|
|
|
3871
3871
|
// ../node_modules/common-path-prefix/index.js
|
|
3872
|
-
var
|
|
3872
|
+
var Ro = I((hh, jo) => {
|
|
3873
3873
|
"use strict";
|
|
3874
|
-
var { sep:
|
|
3874
|
+
var { sep: du } = N("path"), uu = /* @__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 du;
|
|
3880
3880
|
}, "determineSeparator");
|
|
3881
|
-
|
|
3881
|
+
jo.exports = /* @__PURE__ */ i(function(e, r = uu(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,19 +3894,19 @@ var Oo = I((ph, Ao) => {
|
|
|
3894
3894
|
});
|
|
3895
3895
|
|
|
3896
3896
|
// ../node_modules/fetch-retry/index.js
|
|
3897
|
-
var
|
|
3897
|
+
var ni = I((Gg, ri) => {
|
|
3898
3898
|
"use strict";
|
|
3899
|
-
|
|
3899
|
+
ri.exports = function(t, e) {
|
|
3900
3900
|
if (e = e || {}, typeof t != "function")
|
|
3901
|
-
throw new
|
|
3901
|
+
throw new X("fetch must be a function");
|
|
3902
3902
|
if (typeof e != "object")
|
|
3903
|
-
throw new
|
|
3903
|
+
throw new X("defaults must be an object");
|
|
3904
3904
|
if (e.retries !== void 0 && !Dt(e.retries))
|
|
3905
|
-
throw new
|
|
3905
|
+
throw new X("retries must be a positive integer");
|
|
3906
3906
|
if (e.retryDelay !== void 0 && !Dt(e.retryDelay) && typeof e.retryDelay != "function")
|
|
3907
|
-
throw new
|
|
3907
|
+
throw new X("retryDelay must be a positive integer or a function returning a positive integer");
|
|
3908
3908
|
if (e.retryOn !== void 0 && !Array.isArray(e.retryOn) && typeof e.retryOn != "function")
|
|
3909
|
-
throw new
|
|
3909
|
+
throw new X("retryOn property expects an array or function");
|
|
3910
3910
|
var r = {
|
|
3911
3911
|
retries: 3,
|
|
3912
3912
|
retryDelay: 1e3,
|
|
@@ -3918,54 +3918,54 @@ var ti = I((Bg, ei) => {
|
|
|
3918
3918
|
if (Dt(o.retries))
|
|
3919
3919
|
a = o.retries;
|
|
3920
3920
|
else
|
|
3921
|
-
throw new
|
|
3921
|
+
throw new X("retries must be a positive integer");
|
|
3922
3922
|
if (o && o.retryDelay !== void 0)
|
|
3923
3923
|
if (Dt(o.retryDelay) || typeof o.retryDelay == "function")
|
|
3924
3924
|
c = o.retryDelay;
|
|
3925
3925
|
else
|
|
3926
|
-
throw new
|
|
3926
|
+
throw new X("retryDelay must be a positive integer or a function returning a positive integer");
|
|
3927
3927
|
if (o && o.retryOn)
|
|
3928
3928
|
if (Array.isArray(o.retryOn) || typeof o.retryOn == "function")
|
|
3929
3929
|
l = o.retryOn;
|
|
3930
3930
|
else
|
|
3931
|
-
throw new
|
|
3931
|
+
throw new X("retryOn property expects an array or function");
|
|
3932
3932
|
return new Promise(function(p, f) {
|
|
3933
|
-
var b = /* @__PURE__ */ i(function(
|
|
3934
|
-
var
|
|
3935
|
-
t(
|
|
3933
|
+
var b = /* @__PURE__ */ i(function(_) {
|
|
3934
|
+
var C = typeof Request < "u" && s instanceof Request ? s.clone() : s;
|
|
3935
|
+
t(C, o).then(function(S) {
|
|
3936
3936
|
if (Array.isArray(l) && l.indexOf(S.status) === -1)
|
|
3937
3937
|
p(S);
|
|
3938
3938
|
else if (typeof l == "function")
|
|
3939
3939
|
try {
|
|
3940
|
-
return Promise.resolve(l(
|
|
3941
|
-
|
|
3940
|
+
return Promise.resolve(l(_, null, S)).then(function(P) {
|
|
3941
|
+
P ? w(_, null, S) : p(S);
|
|
3942
3942
|
}).catch(f);
|
|
3943
|
-
} catch (
|
|
3944
|
-
f(
|
|
3943
|
+
} catch (P) {
|
|
3944
|
+
f(P);
|
|
3945
3945
|
}
|
|
3946
3946
|
else
|
|
3947
|
-
|
|
3947
|
+
_ < a ? w(_, null, S) : p(S);
|
|
3948
3948
|
}).catch(function(S) {
|
|
3949
3949
|
if (typeof l == "function")
|
|
3950
3950
|
try {
|
|
3951
|
-
Promise.resolve(l(
|
|
3952
|
-
|
|
3953
|
-
}).catch(function(
|
|
3954
|
-
f(
|
|
3951
|
+
Promise.resolve(l(_, S, null)).then(function(P) {
|
|
3952
|
+
P ? w(_, S, null) : f(S);
|
|
3953
|
+
}).catch(function(P) {
|
|
3954
|
+
f(P);
|
|
3955
3955
|
});
|
|
3956
|
-
} catch (
|
|
3957
|
-
f(
|
|
3956
|
+
} catch (P) {
|
|
3957
|
+
f(P);
|
|
3958
3958
|
}
|
|
3959
|
-
else
|
|
3959
|
+
else _ < a ? w(_, S, null) : f(S);
|
|
3960
3960
|
});
|
|
3961
3961
|
}, "wrappedFetch");
|
|
3962
|
-
function _
|
|
3963
|
-
var
|
|
3962
|
+
function w(_, C, S) {
|
|
3963
|
+
var P = typeof c == "function" ? c(_, C, S) : c;
|
|
3964
3964
|
setTimeout(function() {
|
|
3965
|
-
b(++
|
|
3966
|
-
},
|
|
3965
|
+
b(++_);
|
|
3966
|
+
}, P);
|
|
3967
3967
|
}
|
|
3968
|
-
i(
|
|
3968
|
+
i(w, "retry"), b(0);
|
|
3969
3969
|
});
|
|
3970
3970
|
}, "fetchRetry");
|
|
3971
3971
|
};
|
|
@@ -3973,57 +3973,57 @@ var ti = I((Bg, ei) => {
|
|
|
3973
3973
|
return Number.isInteger(t) && t >= 0;
|
|
3974
3974
|
}
|
|
3975
3975
|
i(Dt, "isPositiveInteger");
|
|
3976
|
-
function
|
|
3976
|
+
function X(t) {
|
|
3977
3977
|
this.name = "ArgumentError", this.message = t;
|
|
3978
3978
|
}
|
|
3979
|
-
i(
|
|
3979
|
+
i(X, "ArgumentError");
|
|
3980
3980
|
});
|
|
3981
3981
|
|
|
3982
3982
|
// src/telemetry/index.ts
|
|
3983
|
-
import { logger as
|
|
3983
|
+
import { logger as mi } from "storybook/internal/node-logger";
|
|
3984
3984
|
|
|
3985
3985
|
// src/telemetry/notify.ts
|
|
3986
|
-
var
|
|
3987
|
-
import { cache as
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
),
|
|
3986
|
+
var rn = z(Qr(), 1);
|
|
3987
|
+
import { cache as en } from "storybook/internal/common";
|
|
3988
|
+
import { CLI_COLORS as Ii, logger as et } from "storybook/internal/node-logger";
|
|
3989
|
+
var tn = "telemetry-notification-date", nn = /* @__PURE__ */ i(async () => {
|
|
3990
|
+
await en.get(tn, null) || (en.set(tn, Date.now()), et.log(
|
|
3991
|
+
`${Ii.info("Attention:")} Storybook now collects completely anonymous telemetry regarding usage. This information is used to shape Story\
|
|
3992
|
+
book's roadmap and prioritize features.`
|
|
3993
|
+
), et.log(
|
|
3994
3994
|
"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:"
|
|
3995
|
-
),
|
|
3995
|
+
), et.log(rn.default.cyan("https://storybook.js.org/telemetry")), et.log(""));
|
|
3996
3996
|
}, "notify");
|
|
3997
3997
|
|
|
3998
3998
|
// src/telemetry/sanitize.ts
|
|
3999
|
-
import
|
|
4000
|
-
function
|
|
3999
|
+
import an from "node:path";
|
|
4000
|
+
function sn(t) {
|
|
4001
4001
|
return t.replace(/[-[/{}()*+?.\\^$|]/g, "\\$&");
|
|
4002
4002
|
}
|
|
4003
|
-
i(
|
|
4004
|
-
function
|
|
4003
|
+
i(sn, "regexpEscape");
|
|
4004
|
+
function on(t = "") {
|
|
4005
4005
|
return t.replace(/\u001B\[[0-9;]*m/g, "");
|
|
4006
4006
|
}
|
|
4007
|
-
i(
|
|
4008
|
-
function Re(t, e =
|
|
4007
|
+
i(on, "removeAnsiEscapeCodes");
|
|
4008
|
+
function Re(t, e = an.sep) {
|
|
4009
4009
|
if (!t)
|
|
4010
4010
|
return t;
|
|
4011
4011
|
let r = process.cwd().split(e);
|
|
4012
4012
|
for (; r.length > 1; ) {
|
|
4013
|
-
let n = r.join(e), s = new RegExp(
|
|
4013
|
+
let n = r.join(e), s = new RegExp(sn(n), "gi");
|
|
4014
4014
|
t = t.replace(s, "$SNIP");
|
|
4015
|
-
let o = r.join(e + e), a = new RegExp(
|
|
4015
|
+
let o = r.join(e + e), a = new RegExp(sn(o), "gi");
|
|
4016
4016
|
t = t.replace(a, "$SNIP"), r.pop();
|
|
4017
4017
|
}
|
|
4018
4018
|
return t;
|
|
4019
4019
|
}
|
|
4020
4020
|
i(Re, "cleanPaths");
|
|
4021
|
-
function tt(t, e =
|
|
4021
|
+
function tt(t, e = an.sep) {
|
|
4022
4022
|
try {
|
|
4023
4023
|
t = {
|
|
4024
4024
|
...JSON.parse(JSON.stringify(t)),
|
|
4025
|
-
message:
|
|
4026
|
-
stack:
|
|
4025
|
+
message: on(t.message),
|
|
4026
|
+
stack: on(t.stack),
|
|
4027
4027
|
cause: t.cause,
|
|
4028
4028
|
name: t.name
|
|
4029
4029
|
};
|
|
@@ -4036,53 +4036,53 @@ function tt(t, e = sn.sep) {
|
|
|
4036
4036
|
i(tt, "sanitizeError");
|
|
4037
4037
|
|
|
4038
4038
|
// src/telemetry/storybook-metadata.ts
|
|
4039
|
-
import { dirname as
|
|
4039
|
+
import { dirname as Uu } from "node:path";
|
|
4040
4040
|
import {
|
|
4041
|
-
getProjectRoot as
|
|
4042
|
-
getStorybookConfiguration as
|
|
4043
|
-
getStorybookInfo as
|
|
4044
|
-
loadMainConfig as
|
|
4045
|
-
versions as
|
|
4041
|
+
getProjectRoot as $u,
|
|
4042
|
+
getStorybookConfiguration as Vu,
|
|
4043
|
+
getStorybookInfo as Fu,
|
|
4044
|
+
loadMainConfig as Bu,
|
|
4045
|
+
versions as Wu
|
|
4046
4046
|
} from "storybook/internal/common";
|
|
4047
|
-
import { readConfig as
|
|
4047
|
+
import { readConfig as qu } from "storybook/internal/csf-tools";
|
|
4048
4048
|
|
|
4049
4049
|
// ../node_modules/fd-package-json/dist/esm/main.js
|
|
4050
|
-
var
|
|
4051
|
-
import { resolve as
|
|
4052
|
-
import { stat as
|
|
4053
|
-
import { statSync as
|
|
4054
|
-
async function
|
|
4050
|
+
var un = z(dn(), 1);
|
|
4051
|
+
import { resolve as Ei } from "node:path";
|
|
4052
|
+
import { stat as Ci, readFile as Pi } from "node:fs/promises";
|
|
4053
|
+
import { statSync as Cl, readFileSync as Pl } from "node:fs";
|
|
4054
|
+
async function Ai(t) {
|
|
4055
4055
|
try {
|
|
4056
|
-
return (await
|
|
4056
|
+
return (await Ci(t)).isFile();
|
|
4057
4057
|
} catch {
|
|
4058
4058
|
return !1;
|
|
4059
4059
|
}
|
|
4060
4060
|
}
|
|
4061
|
-
i(
|
|
4061
|
+
i(Ai, "fileExists");
|
|
4062
4062
|
async function Ft(t) {
|
|
4063
|
-
for (let e of (0,
|
|
4064
|
-
let r =
|
|
4065
|
-
if (await
|
|
4063
|
+
for (let e of (0, un.walkUp)(t)) {
|
|
4064
|
+
let r = Ei(e, "package.json");
|
|
4065
|
+
if (await Ai(r))
|
|
4066
4066
|
return r;
|
|
4067
4067
|
}
|
|
4068
4068
|
return null;
|
|
4069
4069
|
}
|
|
4070
4070
|
i(Ft, "findPackagePath");
|
|
4071
|
-
async function
|
|
4071
|
+
async function ln(t) {
|
|
4072
4072
|
let e = await Ft(t);
|
|
4073
4073
|
if (!e)
|
|
4074
4074
|
return null;
|
|
4075
4075
|
try {
|
|
4076
|
-
let r = await
|
|
4076
|
+
let r = await Pi(e, { encoding: "utf8" });
|
|
4077
4077
|
return JSON.parse(r);
|
|
4078
4078
|
} catch {
|
|
4079
4079
|
return null;
|
|
4080
4080
|
}
|
|
4081
4081
|
}
|
|
4082
|
-
i(
|
|
4082
|
+
i(ln, "findPackage");
|
|
4083
4083
|
|
|
4084
4084
|
// ../node_modules/package-manager-detector/dist/constants.mjs
|
|
4085
|
-
var
|
|
4085
|
+
var pn = [
|
|
4086
4086
|
"npm",
|
|
4087
4087
|
"yarn",
|
|
4088
4088
|
"yarn@berry",
|
|
@@ -4116,44 +4116,44 @@ var un = [
|
|
|
4116
4116
|
};
|
|
4117
4117
|
|
|
4118
4118
|
// ../node_modules/package-manager-detector/dist/detect.mjs
|
|
4119
|
-
import
|
|
4119
|
+
import mn from "node:fs/promises";
|
|
4120
4120
|
import Q from "node:path";
|
|
4121
|
-
import
|
|
4121
|
+
import Oi from "node:process";
|
|
4122
4122
|
async function qt(t, e) {
|
|
4123
4123
|
try {
|
|
4124
|
-
let r = await
|
|
4124
|
+
let r = await mn.stat(t);
|
|
4125
4125
|
return e === "file" ? r.isFile() : r.isDirectory();
|
|
4126
4126
|
} catch {
|
|
4127
4127
|
return !1;
|
|
4128
4128
|
}
|
|
4129
4129
|
}
|
|
4130
4130
|
i(qt, "pathExists");
|
|
4131
|
-
function*
|
|
4131
|
+
function* ji(t = Oi.cwd()) {
|
|
4132
4132
|
let e = Q.resolve(t), { root: r } = Q.parse(e);
|
|
4133
4133
|
for (; e && e !== r; )
|
|
4134
4134
|
yield e, e = Q.dirname(e);
|
|
4135
4135
|
}
|
|
4136
|
-
i(
|
|
4137
|
-
async function
|
|
4138
|
-
return !t || !qt(t, "file") ? null : await
|
|
4136
|
+
i(ji, "lookup");
|
|
4137
|
+
async function fn(t, e) {
|
|
4138
|
+
return !t || !qt(t, "file") ? null : await Ni(t, e);
|
|
4139
4139
|
}
|
|
4140
|
-
i(
|
|
4140
|
+
i(fn, "parsePackageJson");
|
|
4141
4141
|
async function Gt(t = {}) {
|
|
4142
4142
|
let { cwd: e, strategies: r = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown: n } = t;
|
|
4143
|
-
for (let s of
|
|
4143
|
+
for (let s of ji(e))
|
|
4144
4144
|
for (let o of r)
|
|
4145
4145
|
switch (o) {
|
|
4146
4146
|
case "lockfile": {
|
|
4147
4147
|
for (let a of Object.keys(Bt))
|
|
4148
4148
|
if (await qt(Q.join(s, a), "file")) {
|
|
4149
|
-
let c = Bt[a], l = await
|
|
4149
|
+
let c = Bt[a], l = await fn(Q.join(s, "package.json"), n);
|
|
4150
4150
|
return l || { name: c, agent: c };
|
|
4151
4151
|
}
|
|
4152
4152
|
break;
|
|
4153
4153
|
}
|
|
4154
4154
|
case "packageManager-field":
|
|
4155
4155
|
case "devEngines-field": {
|
|
4156
|
-
let a = await
|
|
4156
|
+
let a = await fn(Q.join(s, "package.json"), n);
|
|
4157
4157
|
if (a)
|
|
4158
4158
|
return a;
|
|
4159
4159
|
break;
|
|
@@ -4162,7 +4162,7 @@ async function Gt(t = {}) {
|
|
|
4162
4162
|
for (let a of Object.keys(Wt)) {
|
|
4163
4163
|
let c = a.endsWith("/") ? "dir" : "file";
|
|
4164
4164
|
if (await qt(Q.join(s, a), c)) {
|
|
4165
|
-
let l = Wt[a], p = l === "yarn" ?
|
|
4165
|
+
let l = Wt[a], p = l === "yarn" ? Zi(a) ? "yarn" : "yarn@berry" : l;
|
|
4166
4166
|
return { name: l, agent: p };
|
|
4167
4167
|
}
|
|
4168
4168
|
}
|
|
@@ -4172,7 +4172,7 @@ async function Gt(t = {}) {
|
|
|
4172
4172
|
return null;
|
|
4173
4173
|
}
|
|
4174
4174
|
i(Gt, "detect");
|
|
4175
|
-
function
|
|
4175
|
+
function Ri(t) {
|
|
4176
4176
|
let e = /* @__PURE__ */ i((r) => r?.match(/\d+(\.\d+){0,2}/)?.[0] ?? r, "handelVer");
|
|
4177
4177
|
if (typeof t.packageManager == "string") {
|
|
4178
4178
|
let [r, n] = t.packageManager.replace(/^\^/, "").split("@");
|
|
@@ -4184,25 +4184,25 @@ function Ai(t) {
|
|
|
4184
4184
|
ver: e(t.devEngines.packageManager.version)
|
|
4185
4185
|
};
|
|
4186
4186
|
}
|
|
4187
|
-
i(
|
|
4188
|
-
async function
|
|
4187
|
+
i(Ri, "getNameAndVer");
|
|
4188
|
+
async function Ni(t, e) {
|
|
4189
4189
|
try {
|
|
4190
|
-
let r = JSON.parse(await
|
|
4190
|
+
let r = JSON.parse(await mn.readFile(t, "utf8")), n, s = Ri(r);
|
|
4191
4191
|
if (s) {
|
|
4192
4192
|
let o = s.name, a = s.ver, c = a;
|
|
4193
4193
|
return o === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: o, agent: n, version: c }) : o === "pnpm" &&
|
|
4194
|
-
a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: o, agent: n, version: c }) :
|
|
4194
|
+
a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: o, agent: n, version: c }) : pn.includes(o) ? (n = o, { name: o, agent: n, version: c }) :
|
|
4195
4195
|
e?.(r.packageManager) ?? null;
|
|
4196
4196
|
}
|
|
4197
4197
|
} catch {
|
|
4198
4198
|
}
|
|
4199
4199
|
return null;
|
|
4200
4200
|
}
|
|
4201
|
-
i(
|
|
4202
|
-
function
|
|
4201
|
+
i(Ni, "handlePackageManager");
|
|
4202
|
+
function Zi(t) {
|
|
4203
4203
|
return t.endsWith(".yarn_integrity");
|
|
4204
4204
|
}
|
|
4205
|
-
i(
|
|
4205
|
+
i(Zi, "isMetadataYarnClassic");
|
|
4206
4206
|
|
|
4207
4207
|
// ../node_modules/package-manager-detector/dist/index.mjs
|
|
4208
4208
|
import "node:fs/promises";
|
|
@@ -4210,26 +4210,26 @@ import "node:path";
|
|
|
4210
4210
|
import "node:process";
|
|
4211
4211
|
|
|
4212
4212
|
// package.json
|
|
4213
|
-
var nt = "9.0.
|
|
4213
|
+
var nt = "9.0.12";
|
|
4214
4214
|
|
|
4215
4215
|
// src/cli/globalSettings.ts
|
|
4216
|
-
var
|
|
4216
|
+
var Ee = z(Un(), 1);
|
|
4217
4217
|
import tr from "node:fs/promises";
|
|
4218
|
-
import { homedir as
|
|
4219
|
-
import { dirname as
|
|
4218
|
+
import { homedir as sc } from "node:os";
|
|
4219
|
+
import { dirname as oc, join as ic } from "node:path";
|
|
4220
4220
|
|
|
4221
4221
|
// src/server-errors.ts
|
|
4222
|
-
var
|
|
4222
|
+
var Bn = z(Vn(), 1);
|
|
4223
4223
|
|
|
4224
4224
|
// src/storybook-error.ts
|
|
4225
|
-
function
|
|
4225
|
+
function Fn({
|
|
4226
4226
|
code: t,
|
|
4227
4227
|
category: e
|
|
4228
4228
|
}) {
|
|
4229
4229
|
let r = String(t).padStart(4, "0");
|
|
4230
4230
|
return `SB_${e}_${r}`;
|
|
4231
4231
|
}
|
|
4232
|
-
i(
|
|
4232
|
+
i(Fn, "parseErrorCode");
|
|
4233
4233
|
var pt = class t extends Error {
|
|
4234
4234
|
constructor(r) {
|
|
4235
4235
|
super(t.getFullMessage(r));
|
|
@@ -4246,7 +4246,7 @@ var pt = class t extends Error {
|
|
|
4246
4246
|
i(this, "StorybookError");
|
|
4247
4247
|
}
|
|
4248
4248
|
get fullErrorCode() {
|
|
4249
|
-
return
|
|
4249
|
+
return Fn({ code: this.code, category: this.category });
|
|
4250
4250
|
}
|
|
4251
4251
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
4252
4252
|
get name() {
|
|
@@ -4261,7 +4261,7 @@ var pt = class t extends Error {
|
|
|
4261
4261
|
message: o
|
|
4262
4262
|
}) {
|
|
4263
4263
|
let a;
|
|
4264
|
-
return r === !0 ? a = `https://storybook.js.org/error/${
|
|
4264
|
+
return r === !0 ? a = `https://storybook.js.org/error/${Fn({ code: n, category: s })}` : typeof r == "string" ? a = r : Array.isArray(r) &&
|
|
4265
4265
|
(a = `
|
|
4266
4266
|
${r.map((c) => ` - ${c}`).join(`
|
|
4267
4267
|
`)}`), `${o}${a != null ? `
|
|
@@ -4277,7 +4277,7 @@ var ft = class extends pt {
|
|
|
4277
4277
|
super({
|
|
4278
4278
|
category: "CORE-SERVER",
|
|
4279
4279
|
code: 1,
|
|
4280
|
-
message:
|
|
4280
|
+
message: Bn.dedent`
|
|
4281
4281
|
Unable to save global settings file to ${r.filePath}
|
|
4282
4282
|
${r.error && `Reason: ${r.error}`}`
|
|
4283
4283
|
});
|
|
@@ -4289,25 +4289,25 @@ var ft = class extends pt {
|
|
|
4289
4289
|
};
|
|
4290
4290
|
|
|
4291
4291
|
// src/cli/globalSettings.ts
|
|
4292
|
-
var
|
|
4293
|
-
version:
|
|
4292
|
+
var ac = ic(sc(), ".storybook", "settings.json"), cc = 1, dc = Ee.z.object({
|
|
4293
|
+
version: Ee.z.number(),
|
|
4294
4294
|
// NOTE: every key (and subkey) below must be optional, for forwards compatibility reasons
|
|
4295
4295
|
// (we can remove keys once they are deprecated)
|
|
4296
|
-
userSince:
|
|
4297
|
-
init:
|
|
4298
|
-
}),
|
|
4299
|
-
async function
|
|
4300
|
-
if (
|
|
4301
|
-
return
|
|
4296
|
+
userSince: Ee.z.number().optional(),
|
|
4297
|
+
init: Ee.z.object({ skipOnboarding: Ee.z.boolean().optional() }).optional()
|
|
4298
|
+
}), Se;
|
|
4299
|
+
async function Wn(t = ac) {
|
|
4300
|
+
if (Se)
|
|
4301
|
+
return Se;
|
|
4302
4302
|
try {
|
|
4303
|
-
let e = await tr.readFile(t, "utf8"), r =
|
|
4304
|
-
|
|
4303
|
+
let e = await tr.readFile(t, "utf8"), r = dc.parse(JSON.parse(e));
|
|
4304
|
+
Se = new mt(t, r);
|
|
4305
4305
|
} catch {
|
|
4306
|
-
|
|
4306
|
+
Se = new mt(t, { version: cc, userSince: Date.now() }), await Se.save();
|
|
4307
4307
|
}
|
|
4308
|
-
return
|
|
4308
|
+
return Se;
|
|
4309
4309
|
}
|
|
4310
|
-
i(
|
|
4310
|
+
i(Wn, "globalSettings");
|
|
4311
4311
|
var mt = class {
|
|
4312
4312
|
static {
|
|
4313
4313
|
i(this, "Settings");
|
|
@@ -4324,7 +4324,7 @@ var mt = class {
|
|
|
4324
4324
|
/** Save settings to the file */
|
|
4325
4325
|
async save() {
|
|
4326
4326
|
try {
|
|
4327
|
-
await tr.mkdir(
|
|
4327
|
+
await tr.mkdir(oc(this.filePath), { recursive: !0 }), await tr.writeFile(this.filePath, JSON.stringify(this.value, null, 2));
|
|
4328
4328
|
} catch (e) {
|
|
4329
4329
|
throw new ft({
|
|
4330
4330
|
filePath: this.filePath,
|
|
@@ -4335,15 +4335,15 @@ var mt = class {
|
|
|
4335
4335
|
};
|
|
4336
4336
|
|
|
4337
4337
|
// src/telemetry/get-application-file-count.ts
|
|
4338
|
-
import { sep as
|
|
4338
|
+
import { sep as Iu } from "node:path";
|
|
4339
4339
|
|
|
4340
4340
|
// src/telemetry/exec-command-count-lines.ts
|
|
4341
|
-
import { createInterface as
|
|
4341
|
+
import { createInterface as ru } from "node:readline";
|
|
4342
4342
|
|
|
4343
4343
|
// node_modules/execa/index.js
|
|
4344
|
-
var
|
|
4345
|
-
import { Buffer as
|
|
4346
|
-
import
|
|
4344
|
+
var _o = z(js(), 1);
|
|
4345
|
+
import { Buffer as Hd } from "node:buffer";
|
|
4346
|
+
import Yd from "node:path";
|
|
4347
4347
|
import Zr from "node:child_process";
|
|
4348
4348
|
import Pt from "node:process";
|
|
4349
4349
|
|
|
@@ -4358,7 +4358,7 @@ i(lr, "stripFinalNewline");
|
|
|
4358
4358
|
// node_modules/npm-run-path/index.js
|
|
4359
4359
|
import gt from "node:process";
|
|
4360
4360
|
import Ve from "node:path";
|
|
4361
|
-
import { fileURLToPath as
|
|
4361
|
+
import { fileURLToPath as Rs } from "node:url";
|
|
4362
4362
|
|
|
4363
4363
|
// node_modules/path-key/index.js
|
|
4364
4364
|
function yt(t = {}) {
|
|
@@ -4371,56 +4371,56 @@ function yt(t = {}) {
|
|
|
4371
4371
|
i(yt, "pathKey");
|
|
4372
4372
|
|
|
4373
4373
|
// node_modules/npm-run-path/index.js
|
|
4374
|
-
var
|
|
4374
|
+
var Mc = /* @__PURE__ */ i(({
|
|
4375
4375
|
cwd: t = gt.cwd(),
|
|
4376
4376
|
path: e = gt.env[yt()],
|
|
4377
4377
|
preferLocal: r = !0,
|
|
4378
4378
|
execPath: n = gt.execPath,
|
|
4379
4379
|
addExecPath: s = !0
|
|
4380
4380
|
} = {}) => {
|
|
4381
|
-
let o = t instanceof URL ?
|
|
4382
|
-
return r &&
|
|
4383
|
-
}, "npmRunPath"),
|
|
4381
|
+
let o = t instanceof URL ? Rs(t) : t, a = Ve.resolve(o), c = [];
|
|
4382
|
+
return r && Dc(c, a), s && Lc(c, n, a), [...c, e].join(Ve.delimiter);
|
|
4383
|
+
}, "npmRunPath"), Dc = /* @__PURE__ */ i((t, e) => {
|
|
4384
4384
|
let r;
|
|
4385
4385
|
for (; r !== e; )
|
|
4386
4386
|
t.push(Ve.join(e, "node_modules/.bin")), r = e, e = Ve.resolve(e, "..");
|
|
4387
|
-
}, "applyPreferLocal"),
|
|
4388
|
-
let n = e instanceof URL ?
|
|
4387
|
+
}, "applyPreferLocal"), Lc = /* @__PURE__ */ i((t, e, r) => {
|
|
4388
|
+
let n = e instanceof URL ? Rs(e) : e;
|
|
4389
4389
|
t.push(Ve.resolve(r, n, ".."));
|
|
4390
|
-
}, "applyExecPath"),
|
|
4390
|
+
}, "applyExecPath"), Ns = /* @__PURE__ */ i(({ env: t = gt.env, ...e } = {}) => {
|
|
4391
4391
|
t = { ...t };
|
|
4392
4392
|
let r = yt({ env: t });
|
|
4393
|
-
return e.path = t[r], t[r] =
|
|
4393
|
+
return e.path = t[r], t[r] = Mc(e), t;
|
|
4394
4394
|
}, "npmRunPathEnv");
|
|
4395
4395
|
|
|
4396
4396
|
// node_modules/mimic-fn/index.js
|
|
4397
|
-
var
|
|
4397
|
+
var Uc = /* @__PURE__ */ i((t, e, r, n) => {
|
|
4398
4398
|
if (r === "length" || r === "prototype" || r === "arguments" || r === "caller")
|
|
4399
4399
|
return;
|
|
4400
4400
|
let s = Object.getOwnPropertyDescriptor(t, r), o = Object.getOwnPropertyDescriptor(e, r);
|
|
4401
|
-
|
|
4402
|
-
}, "copyProperty"),
|
|
4401
|
+
!$c(s, o) && n || Object.defineProperty(t, r, o);
|
|
4402
|
+
}, "copyProperty"), $c = /* @__PURE__ */ i(function(t, e) {
|
|
4403
4403
|
return t === void 0 || t.configurable || t.writable === e.writable && t.enumerable === e.enumerable && t.configurable === e.configurable &&
|
|
4404
4404
|
(t.writable || t.value === e.value);
|
|
4405
|
-
}, "canCopyProperty"),
|
|
4405
|
+
}, "canCopyProperty"), Vc = /* @__PURE__ */ i((t, e) => {
|
|
4406
4406
|
let r = Object.getPrototypeOf(e);
|
|
4407
4407
|
r !== Object.getPrototypeOf(t) && Object.setPrototypeOf(t, r);
|
|
4408
|
-
}, "changePrototype"),
|
|
4409
|
-
${e}`, "wrappedToString"),
|
|
4410
|
-
prototype.toString, "name"),
|
|
4411
|
-
let n = r === "" ? "" : `with ${r.trim()}() `, s =
|
|
4412
|
-
Object.defineProperty(s, "name",
|
|
4408
|
+
}, "changePrototype"), Fc = /* @__PURE__ */ i((t, e) => `/* Wrapped ${t}*/
|
|
4409
|
+
${e}`, "wrappedToString"), Bc = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), Wc = Object.getOwnPropertyDescriptor(Function.
|
|
4410
|
+
prototype.toString, "name"), qc = /* @__PURE__ */ i((t, e, r) => {
|
|
4411
|
+
let n = r === "" ? "" : `with ${r.trim()}() `, s = Fc.bind(null, n, e.toString());
|
|
4412
|
+
Object.defineProperty(s, "name", Wc), Object.defineProperty(t, "toString", { ...Bc, value: s });
|
|
4413
4413
|
}, "changeToString");
|
|
4414
4414
|
function pr(t, e, { ignoreNonConfigurable: r = !1 } = {}) {
|
|
4415
4415
|
let { name: n } = t;
|
|
4416
4416
|
for (let s of Reflect.ownKeys(e))
|
|
4417
|
-
|
|
4418
|
-
return
|
|
4417
|
+
Uc(t, e, s, r);
|
|
4418
|
+
return Vc(t, e), qc(t, e, n), t;
|
|
4419
4419
|
}
|
|
4420
4420
|
i(pr, "mimicFunction");
|
|
4421
4421
|
|
|
4422
4422
|
// node_modules/onetime/index.js
|
|
4423
|
-
var bt = /* @__PURE__ */ new WeakMap(),
|
|
4423
|
+
var bt = /* @__PURE__ */ new WeakMap(), Zs = /* @__PURE__ */ i((t, e = {}) => {
|
|
4424
4424
|
if (typeof t != "function")
|
|
4425
4425
|
throw new TypeError("Expected a function");
|
|
4426
4426
|
let r, n = 0, s = t.displayName || t.name || "<anonymous>", o = /* @__PURE__ */ i(function(...a) {
|
|
@@ -4432,36 +4432,36 @@ var bt = /* @__PURE__ */ new WeakMap(), Rs = /* @__PURE__ */ i((t, e = {}) => {
|
|
|
4432
4432
|
}, "onetime");
|
|
4433
4433
|
return pr(o, t), bt.set(o, n), o;
|
|
4434
4434
|
}, "onetime");
|
|
4435
|
-
|
|
4435
|
+
Zs.callCount = (t) => {
|
|
4436
4436
|
if (!bt.has(t))
|
|
4437
4437
|
throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);
|
|
4438
4438
|
return bt.get(t);
|
|
4439
4439
|
};
|
|
4440
|
-
var
|
|
4440
|
+
var Ms = Zs;
|
|
4441
4441
|
|
|
4442
4442
|
// node_modules/execa/lib/error.js
|
|
4443
|
-
import
|
|
4443
|
+
import td from "node:process";
|
|
4444
4444
|
|
|
4445
4445
|
// node_modules/human-signals/build/src/main.js
|
|
4446
|
-
import { constants as
|
|
4446
|
+
import { constants as Jc } from "node:os";
|
|
4447
4447
|
|
|
4448
4448
|
// node_modules/human-signals/build/src/realtime.js
|
|
4449
|
-
var
|
|
4450
|
-
let t = fr -
|
|
4451
|
-
return Array.from({ length: t },
|
|
4452
|
-
}, "getRealtimeSignals"),
|
|
4449
|
+
var Ds = /* @__PURE__ */ i(() => {
|
|
4450
|
+
let t = fr - Ls + 1;
|
|
4451
|
+
return Array.from({ length: t }, Gc);
|
|
4452
|
+
}, "getRealtimeSignals"), Gc = /* @__PURE__ */ i((t, e) => ({
|
|
4453
4453
|
name: `SIGRT${e + 1}`,
|
|
4454
|
-
number:
|
|
4454
|
+
number: Ls + e,
|
|
4455
4455
|
action: "terminate",
|
|
4456
4456
|
description: "Application-specific signal (realtime)",
|
|
4457
4457
|
standard: "posix"
|
|
4458
|
-
}), "getRealtimeSignal"),
|
|
4458
|
+
}), "getRealtimeSignal"), Ls = 34, fr = 64;
|
|
4459
4459
|
|
|
4460
4460
|
// node_modules/human-signals/build/src/signals.js
|
|
4461
|
-
import { constants as
|
|
4461
|
+
import { constants as zc } from "node:os";
|
|
4462
4462
|
|
|
4463
4463
|
// node_modules/human-signals/build/src/core.js
|
|
4464
|
-
var
|
|
4464
|
+
var Us = [
|
|
4465
4465
|
{
|
|
4466
4466
|
name: "SIGHUP",
|
|
4467
4467
|
number: 1,
|
|
@@ -4735,9 +4735,9 @@ var Ds = [
|
|
|
4735
4735
|
|
|
4736
4736
|
// node_modules/human-signals/build/src/signals.js
|
|
4737
4737
|
var mr = /* @__PURE__ */ i(() => {
|
|
4738
|
-
let t =
|
|
4739
|
-
return [...
|
|
4740
|
-
}, "getSignals"),
|
|
4738
|
+
let t = Ds();
|
|
4739
|
+
return [...Us, ...t].map(Kc);
|
|
4740
|
+
}, "getSignals"), Kc = /* @__PURE__ */ i(({
|
|
4741
4741
|
name: t,
|
|
4742
4742
|
number: e,
|
|
4743
4743
|
description: r,
|
|
@@ -4747,15 +4747,15 @@ var mr = /* @__PURE__ */ i(() => {
|
|
|
4747
4747
|
}) => {
|
|
4748
4748
|
let {
|
|
4749
4749
|
signals: { [t]: a }
|
|
4750
|
-
} =
|
|
4750
|
+
} = zc, c = a !== void 0;
|
|
4751
4751
|
return { name: t, number: c ? a : e, description: r, supported: c, action: n, forced: s, standard: o };
|
|
4752
4752
|
}, "normalizeSignal");
|
|
4753
4753
|
|
|
4754
4754
|
// node_modules/human-signals/build/src/main.js
|
|
4755
|
-
var
|
|
4755
|
+
var Hc = /* @__PURE__ */ i(() => {
|
|
4756
4756
|
let t = mr();
|
|
4757
|
-
return Object.fromEntries(t.map(
|
|
4758
|
-
}, "getSignalsByName"),
|
|
4757
|
+
return Object.fromEntries(t.map(Yc));
|
|
4758
|
+
}, "getSignalsByName"), Yc = /* @__PURE__ */ i(({
|
|
4759
4759
|
name: t,
|
|
4760
4760
|
number: e,
|
|
4761
4761
|
description: r,
|
|
@@ -4763,15 +4763,15 @@ var zc = /* @__PURE__ */ i(() => {
|
|
|
4763
4763
|
action: s,
|
|
4764
4764
|
forced: o,
|
|
4765
4765
|
standard: a
|
|
4766
|
-
}) => [t, { name: t, number: e, description: r, supported: n, action: s, forced: o, standard: a }], "getSignalByName"),
|
|
4766
|
+
}) => [t, { name: t, number: e, description: r, supported: n, action: s, forced: o, standard: a }], "getSignalByName"), $s = Hc(), Xc = /* @__PURE__ */ i(
|
|
4767
4767
|
() => {
|
|
4768
4768
|
let t = mr(), e = fr + 1, r = Array.from(
|
|
4769
4769
|
{ length: e },
|
|
4770
|
-
(n, s) =>
|
|
4770
|
+
(n, s) => Qc(s, t)
|
|
4771
4771
|
);
|
|
4772
4772
|
return Object.assign({}, ...r);
|
|
4773
|
-
}, "getSignalsByNumber"),
|
|
4774
|
-
let r =
|
|
4773
|
+
}, "getSignalsByNumber"), Qc = /* @__PURE__ */ i((t, e) => {
|
|
4774
|
+
let r = ed(t, e);
|
|
4775
4775
|
if (r === void 0)
|
|
4776
4776
|
return {};
|
|
4777
4777
|
let { name: n, description: s, supported: o, action: a, forced: c, standard: l } = r;
|
|
@@ -4786,13 +4786,13 @@ var zc = /* @__PURE__ */ i(() => {
|
|
|
4786
4786
|
standard: l
|
|
4787
4787
|
}
|
|
4788
4788
|
};
|
|
4789
|
-
}, "getSignalByNumber"),
|
|
4790
|
-
let r = e.find(({ name: n }) =>
|
|
4789
|
+
}, "getSignalByNumber"), ed = /* @__PURE__ */ i((t, e) => {
|
|
4790
|
+
let r = e.find(({ name: n }) => Jc.signals[n] === t);
|
|
4791
4791
|
return r !== void 0 ? r : e.find((n) => n.number === t);
|
|
4792
|
-
}, "findSignalByNumber"),
|
|
4792
|
+
}, "findSignalByNumber"), _f = Xc();
|
|
4793
4793
|
|
|
4794
4794
|
// node_modules/execa/lib/error.js
|
|
4795
|
-
var
|
|
4795
|
+
var rd = /* @__PURE__ */ i(({ timedOut: t, timeout: e, errorCode: r, signal: n, signalDescription: s, exitCode: o, isCanceled: a }) => t ? `\
|
|
4796
4796
|
timed out after ${e} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${s})` :
|
|
4797
4797
|
o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), Fe = /* @__PURE__ */ i(({
|
|
4798
4798
|
stdout: t,
|
|
@@ -4806,26 +4806,26 @@ o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), Fe =
|
|
|
4806
4806
|
timedOut: l,
|
|
4807
4807
|
isCanceled: p,
|
|
4808
4808
|
killed: f,
|
|
4809
|
-
parsed: { options: { timeout: b, cwd:
|
|
4809
|
+
parsed: { options: { timeout: b, cwd: w = td.cwd() } }
|
|
4810
4810
|
}) => {
|
|
4811
4811
|
o = o === null ? void 0 : o, s = s === null ? void 0 : s;
|
|
4812
|
-
let
|
|
4813
|
-
exitCode: o, isCanceled: p })}: ${a}`,
|
|
4814
|
-
${n.message}` :
|
|
4812
|
+
let _ = s === void 0 ? void 0 : $s[s].description, C = n && n.code, P = `Command ${rd({ timedOut: l, timeout: b, errorCode: C, signal: s, signalDescription: _,
|
|
4813
|
+
exitCode: o, isCanceled: p })}: ${a}`, G = Object.prototype.toString.call(n) === "[object Error]", Oe = G ? `${P}
|
|
4814
|
+
${n.message}` : P, be = [Oe, e, t].filter(Boolean).join(`
|
|
4815
4815
|
`);
|
|
4816
|
-
return
|
|
4817
|
-
exitCode = o, n.signal = s, n.signalDescription =
|
|
4816
|
+
return G ? (n.originalMessage = n.message, n.message = be) : n = new Error(be), n.shortMessage = Oe, n.command = a, n.escapedCommand = c, n.
|
|
4817
|
+
exitCode = o, n.signal = s, n.signalDescription = _, n.stdout = t, n.stderr = e, n.cwd = w, r !== void 0 && (n.all = r), "bufferedData" in
|
|
4818
4818
|
n && delete n.bufferedData, n.failed = !0, n.timedOut = !!l, n.isCanceled = p, n.killed = f && !l, n;
|
|
4819
4819
|
}, "makeError");
|
|
4820
4820
|
|
|
4821
4821
|
// node_modules/execa/lib/stdio.js
|
|
4822
|
-
var xt = ["stdin", "stdout", "stderr"],
|
|
4822
|
+
var xt = ["stdin", "stdout", "stderr"], nd = /* @__PURE__ */ i((t) => xt.some((e) => t[e] !== void 0), "hasAlias"), Vs = /* @__PURE__ */ i((t) => {
|
|
4823
4823
|
if (!t)
|
|
4824
4824
|
return;
|
|
4825
4825
|
let { stdio: e } = t;
|
|
4826
4826
|
if (e === void 0)
|
|
4827
4827
|
return xt.map((n) => t[n]);
|
|
4828
|
-
if (
|
|
4828
|
+
if (nd(t))
|
|
4829
4829
|
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xt.map((n) => `\`${n}\``).join(", ")}`);
|
|
4830
4830
|
if (typeof e == "string")
|
|
4831
4831
|
return e;
|
|
@@ -4836,7 +4836,7 @@ var xt = ["stdin", "stdout", "stderr"], ed = /* @__PURE__ */ i((t) => xt.some((e
|
|
|
4836
4836
|
}, "normalizeStdio");
|
|
4837
4837
|
|
|
4838
4838
|
// node_modules/execa/lib/kill.js
|
|
4839
|
-
import
|
|
4839
|
+
import id from "node:os";
|
|
4840
4840
|
|
|
4841
4841
|
// node_modules/signal-exit/dist/mjs/signals.js
|
|
4842
4842
|
var ye = [];
|
|
@@ -4861,7 +4861,7 @@ process.platform === "linux" && ye.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT
|
|
|
4861
4861
|
// node_modules/signal-exit/dist/mjs/index.js
|
|
4862
4862
|
var vt = /* @__PURE__ */ i((t) => !!t && typeof t == "object" && typeof t.removeListener == "function" && typeof t.emit == "function" && typeof t.
|
|
4863
4863
|
reallyExit == "function" && typeof t.listeners == "function" && typeof t.kill == "function" && typeof t.pid == "number" && typeof t.on == "f\
|
|
4864
|
-
unction", "processOk"), hr = Symbol.for("signal-exit emitter"), yr = globalThis,
|
|
4864
|
+
unction", "processOk"), hr = Symbol.for("signal-exit emitter"), yr = globalThis, sd = Object.defineProperty.bind(Object), gr = class {
|
|
4865
4865
|
static {
|
|
4866
4866
|
i(this, "Emitter");
|
|
4867
4867
|
}
|
|
@@ -4878,7 +4878,7 @@ unction", "processOk"), hr = Symbol.for("signal-exit emitter"), yr = globalThis,
|
|
|
4878
4878
|
constructor() {
|
|
4879
4879
|
if (yr[hr])
|
|
4880
4880
|
return yr[hr];
|
|
4881
|
-
|
|
4881
|
+
sd(yr, hr, {
|
|
4882
4882
|
value: this,
|
|
4883
4883
|
writable: !1,
|
|
4884
4884
|
enumerable: !1,
|
|
@@ -4905,7 +4905,7 @@ unction", "processOk"), hr = Symbol.for("signal-exit emitter"), yr = globalThis,
|
|
|
4905
4905
|
static {
|
|
4906
4906
|
i(this, "SignalExitBase");
|
|
4907
4907
|
}
|
|
4908
|
-
},
|
|
4908
|
+
}, od = /* @__PURE__ */ i((t) => ({
|
|
4909
4909
|
onExit(e, r) {
|
|
4910
4910
|
return t.onExit(e, r);
|
|
4911
4911
|
},
|
|
@@ -5012,7 +5012,7 @@ unction", "processOk"), hr = Symbol.for("signal-exit emitter"), yr = globalThis,
|
|
|
5012
5012
|
*
|
|
5013
5013
|
* Returns a function that may be used to unload signal-exit.
|
|
5014
5014
|
*/
|
|
5015
|
-
onExit:
|
|
5015
|
+
onExit: Fs,
|
|
5016
5016
|
/**
|
|
5017
5017
|
* Load the listeners. Likely you never need to call this, unless
|
|
5018
5018
|
* doing a rather deep integration with signal-exit functionality.
|
|
@@ -5020,7 +5020,7 @@ unction", "processOk"), hr = Symbol.for("signal-exit emitter"), yr = globalThis,
|
|
|
5020
5020
|
*
|
|
5021
5021
|
* @internal
|
|
5022
5022
|
*/
|
|
5023
|
-
load:
|
|
5023
|
+
load: jf,
|
|
5024
5024
|
/**
|
|
5025
5025
|
* Unload the listeners. Likely you never need to call this, unless
|
|
5026
5026
|
* doing a rather deep integration with signal-exit functionality.
|
|
@@ -5028,49 +5028,49 @@ unction", "processOk"), hr = Symbol.for("signal-exit emitter"), yr = globalThis,
|
|
|
5028
5028
|
*
|
|
5029
5029
|
* @internal
|
|
5030
5030
|
*/
|
|
5031
|
-
unload:
|
|
5032
|
-
} =
|
|
5031
|
+
unload: Rf
|
|
5032
|
+
} = od(vt(vr) ? new xr(vr) : new br());
|
|
5033
5033
|
|
|
5034
5034
|
// node_modules/execa/lib/kill.js
|
|
5035
|
-
var
|
|
5035
|
+
var ad = 1e3 * 5, Bs = /* @__PURE__ */ i((t, e = "SIGTERM", r = {}) => {
|
|
5036
5036
|
let n = t(e);
|
|
5037
|
-
return
|
|
5038
|
-
}, "spawnedKill"),
|
|
5039
|
-
if (!
|
|
5037
|
+
return cd(t, e, r, n), n;
|
|
5038
|
+
}, "spawnedKill"), cd = /* @__PURE__ */ i((t, e, r, n) => {
|
|
5039
|
+
if (!dd(e, r, n))
|
|
5040
5040
|
return;
|
|
5041
|
-
let s =
|
|
5041
|
+
let s = ld(r), o = setTimeout(() => {
|
|
5042
5042
|
t("SIGKILL");
|
|
5043
5043
|
}, s);
|
|
5044
5044
|
o.unref && o.unref();
|
|
5045
|
-
}, "setKillTimeout"),
|
|
5046
|
-
(t) => t ===
|
|
5045
|
+
}, "setKillTimeout"), dd = /* @__PURE__ */ i((t, { forceKillAfterTimeout: e }, r) => ud(t) && e !== !1 && r, "shouldForceKill"), ud = /* @__PURE__ */ i(
|
|
5046
|
+
(t) => t === id.constants.signals.SIGTERM || typeof t == "string" && t.toUpperCase() === "SIGTERM", "isSigterm"), ld = /* @__PURE__ */ i(({ forceKillAfterTimeout: t = !0 }) => {
|
|
5047
5047
|
if (t === !0)
|
|
5048
|
-
return
|
|
5048
|
+
return ad;
|
|
5049
5049
|
if (!Number.isFinite(t) || t < 0)
|
|
5050
5050
|
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);
|
|
5051
5051
|
return t;
|
|
5052
|
-
}, "getForceKillAfterTimeout"),
|
|
5052
|
+
}, "getForceKillAfterTimeout"), Ws = /* @__PURE__ */ i((t, e) => {
|
|
5053
5053
|
t.kill() && (e.isCanceled = !0);
|
|
5054
|
-
}, "spawnedCancel"),
|
|
5054
|
+
}, "spawnedCancel"), pd = /* @__PURE__ */ i((t, e, r) => {
|
|
5055
5055
|
t.kill(e), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: e }));
|
|
5056
|
-
}, "timeoutKill"),
|
|
5056
|
+
}, "timeoutKill"), qs = /* @__PURE__ */ i((t, { timeout: e, killSignal: r = "SIGTERM" }, n) => {
|
|
5057
5057
|
if (e === 0 || e === void 0)
|
|
5058
5058
|
return n;
|
|
5059
5059
|
let s, o = new Promise((c, l) => {
|
|
5060
5060
|
s = setTimeout(() => {
|
|
5061
|
-
|
|
5061
|
+
pd(t, r, l);
|
|
5062
5062
|
}, e);
|
|
5063
5063
|
}), a = n.finally(() => {
|
|
5064
5064
|
clearTimeout(s);
|
|
5065
5065
|
});
|
|
5066
5066
|
return Promise.race([o, a]);
|
|
5067
|
-
}, "setupTimeout"),
|
|
5067
|
+
}, "setupTimeout"), Gs = /* @__PURE__ */ i(({ timeout: t }) => {
|
|
5068
5068
|
if (t !== void 0 && (!Number.isFinite(t) || t < 0))
|
|
5069
5069
|
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);
|
|
5070
|
-
}, "validateTimeout"),
|
|
5070
|
+
}, "validateTimeout"), zs = /* @__PURE__ */ i(async (t, { cleanup: e, detached: r }, n) => {
|
|
5071
5071
|
if (!e || r)
|
|
5072
5072
|
return n;
|
|
5073
|
-
let s =
|
|
5073
|
+
let s = Fs(() => {
|
|
5074
5074
|
t.kill();
|
|
5075
5075
|
});
|
|
5076
5076
|
return n.finally(() => {
|
|
@@ -5079,8 +5079,8 @@ var sd = 1e3 * 5, Vs = /* @__PURE__ */ i((t, e = "SIGTERM", r = {}) => {
|
|
|
5079
5079
|
}, "setExitHandler");
|
|
5080
5080
|
|
|
5081
5081
|
// node_modules/execa/lib/pipe.js
|
|
5082
|
-
import { createWriteStream as
|
|
5083
|
-
import { ChildProcess as
|
|
5082
|
+
import { createWriteStream as fd } from "node:fs";
|
|
5083
|
+
import { ChildProcess as md } from "node:child_process";
|
|
5084
5084
|
|
|
5085
5085
|
// node_modules/is-stream/index.js
|
|
5086
5086
|
function wt(t) {
|
|
@@ -5093,56 +5093,56 @@ function _r(t) {
|
|
|
5093
5093
|
i(_r, "isWritableStream");
|
|
5094
5094
|
|
|
5095
5095
|
// node_modules/execa/lib/pipe.js
|
|
5096
|
-
var
|
|
5096
|
+
var hd = /* @__PURE__ */ i((t) => t instanceof md && typeof t.then == "function", "isExecaChildProcess"), wr = /* @__PURE__ */ i((t, e, r) => {
|
|
5097
5097
|
if (typeof r == "string")
|
|
5098
|
-
return t[e].pipe(
|
|
5098
|
+
return t[e].pipe(fd(r)), t;
|
|
5099
5099
|
if (_r(r))
|
|
5100
5100
|
return t[e].pipe(r), t;
|
|
5101
|
-
if (!
|
|
5101
|
+
if (!hd(r))
|
|
5102
5102
|
throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
|
|
5103
5103
|
if (!_r(r.stdin))
|
|
5104
5104
|
throw new TypeError("The target child process's stdin must be available.");
|
|
5105
5105
|
return t[e].pipe(r.stdin), r;
|
|
5106
|
-
}, "pipeToTarget"),
|
|
5106
|
+
}, "pipeToTarget"), Ks = /* @__PURE__ */ i((t) => {
|
|
5107
5107
|
t.stdout !== null && (t.pipeStdout = wr.bind(void 0, t, "stdout")), t.stderr !== null && (t.pipeStderr = wr.bind(void 0, t, "stderr")), t.
|
|
5108
5108
|
all !== void 0 && (t.pipeAll = wr.bind(void 0, t, "all"));
|
|
5109
5109
|
}, "addPipeMethods");
|
|
5110
5110
|
|
|
5111
5111
|
// node_modules/execa/lib/stream.js
|
|
5112
|
-
import { createReadStream as
|
|
5113
|
-
import { setTimeout as
|
|
5112
|
+
import { createReadStream as Nd, readFileSync as Zd } from "node:fs";
|
|
5113
|
+
import { setTimeout as Md } from "node:timers/promises";
|
|
5114
5114
|
|
|
5115
5115
|
// node_modules/get-stream/source/contents.js
|
|
5116
5116
|
var Be = /* @__PURE__ */ i(async (t, { init: e, convertChunk: r, getSize: n, truncateChunk: s, addChunk: o, getFinalChunk: a, finalize: c }, {
|
|
5117
5117
|
maxBuffer: l = Number.POSITIVE_INFINITY } = {}) => {
|
|
5118
|
-
if (!
|
|
5118
|
+
if (!gd(t))
|
|
5119
5119
|
throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
5120
5120
|
let p = e();
|
|
5121
5121
|
p.length = 0;
|
|
5122
5122
|
try {
|
|
5123
5123
|
for await (let f of t) {
|
|
5124
|
-
let b =
|
|
5125
|
-
|
|
5124
|
+
let b = bd(f), w = r[b](f, p);
|
|
5125
|
+
Ys({ convertedChunk: w, state: p, getSize: n, truncateChunk: s, addChunk: o, maxBuffer: l });
|
|
5126
5126
|
}
|
|
5127
|
-
return
|
|
5127
|
+
return yd({ state: p, convertChunk: r, getSize: n, truncateChunk: s, addChunk: o, getFinalChunk: a, maxBuffer: l }), c(p);
|
|
5128
5128
|
} catch (f) {
|
|
5129
5129
|
throw f.bufferedData = c(p), f;
|
|
5130
5130
|
}
|
|
5131
|
-
}, "getStreamContents"),
|
|
5131
|
+
}, "getStreamContents"), yd = /* @__PURE__ */ i(({ state: t, getSize: e, truncateChunk: r, addChunk: n, getFinalChunk: s, maxBuffer: o }) => {
|
|
5132
5132
|
let a = s(t);
|
|
5133
|
-
a !== void 0 &&
|
|
5134
|
-
}, "appendFinalChunk"),
|
|
5133
|
+
a !== void 0 && Ys({ convertedChunk: a, state: t, getSize: e, truncateChunk: r, addChunk: n, maxBuffer: o });
|
|
5134
|
+
}, "appendFinalChunk"), Ys = /* @__PURE__ */ i(({ convertedChunk: t, state: e, getSize: r, truncateChunk: n, addChunk: s, maxBuffer: o }) => {
|
|
5135
5135
|
let a = r(t), c = e.length + a;
|
|
5136
5136
|
if (c <= o) {
|
|
5137
|
-
|
|
5137
|
+
Js(t, e, s, c);
|
|
5138
5138
|
return;
|
|
5139
5139
|
}
|
|
5140
5140
|
let l = n(t, o - e.length);
|
|
5141
|
-
throw l !== void 0 &&
|
|
5142
|
-
}, "appendChunk"),
|
|
5141
|
+
throw l !== void 0 && Js(l, e, s, o), new kt();
|
|
5142
|
+
}, "appendChunk"), Js = /* @__PURE__ */ i((t, e, r, n) => {
|
|
5143
5143
|
e.contents = r(t, e, n), e.length = n;
|
|
5144
|
-
}, "addNewChunk"),
|
|
5145
|
-
cIterable"),
|
|
5144
|
+
}, "addNewChunk"), gd = /* @__PURE__ */ i((t) => typeof t == "object" && t !== null && typeof t[Symbol.asyncIterator] == "function", "isAsyn\
|
|
5145
|
+
cIterable"), bd = /* @__PURE__ */ i((t) => {
|
|
5146
5146
|
let e = typeof t;
|
|
5147
5147
|
if (e === "string")
|
|
5148
5148
|
return "string";
|
|
@@ -5150,10 +5150,10 @@ cIterable"), hd = /* @__PURE__ */ i((t) => {
|
|
|
5150
5150
|
return "others";
|
|
5151
5151
|
if (globalThis.Buffer?.isBuffer(t))
|
|
5152
5152
|
return "buffer";
|
|
5153
|
-
let r =
|
|
5153
|
+
let r = Hs.call(t);
|
|
5154
5154
|
return r === "[object ArrayBuffer]" ? "arrayBuffer" : r === "[object DataView]" ? "dataView" : Number.isInteger(t.byteLength) && Number.isInteger(
|
|
5155
|
-
t.byteOffset) &&
|
|
5156
|
-
}, "getChunkType"), { toString:
|
|
5155
|
+
t.byteOffset) && Hs.call(t.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
|
|
5156
|
+
}, "getChunkType"), { toString: Hs } = Object.prototype, kt = class extends Error {
|
|
5157
5157
|
static {
|
|
5158
5158
|
i(this, "MaxBufferError");
|
|
5159
5159
|
}
|
|
@@ -5171,42 +5171,42 @@ var kr = /* @__PURE__ */ i((t) => t, "identity"), Tr = /* @__PURE__ */ i(() => {
|
|
|
5171
5171
|
|
|
5172
5172
|
// node_modules/get-stream/source/array-buffer.js
|
|
5173
5173
|
async function Sr(t, e) {
|
|
5174
|
-
return Be(t,
|
|
5174
|
+
return Be(t, Ed, e);
|
|
5175
5175
|
}
|
|
5176
5176
|
i(Sr, "getStreamAsArrayBuffer");
|
|
5177
|
-
var
|
|
5178
|
-
tEncoder"),
|
|
5179
|
-
t.buffer, t.byteOffset, t.byteLength), "useUint8ArrayWithOffset"),
|
|
5180
|
-
|
|
5181
|
-
let s =
|
|
5177
|
+
var xd = /* @__PURE__ */ i(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), vd = /* @__PURE__ */ i((t) => _d.encode(t), "useTex\
|
|
5178
|
+
tEncoder"), _d = new TextEncoder(), Xs = /* @__PURE__ */ i((t) => new Uint8Array(t), "useUint8Array"), Qs = /* @__PURE__ */ i((t) => new Uint8Array(
|
|
5179
|
+
t.buffer, t.byteOffset, t.byteLength), "useUint8ArrayWithOffset"), wd = /* @__PURE__ */ i((t, e) => t.slice(0, e), "truncateArrayBufferChunk"),
|
|
5180
|
+
kd = /* @__PURE__ */ i((t, { contents: e, length: r }, n) => {
|
|
5181
|
+
let s = ro() ? Id(e, n) : Td(e, n);
|
|
5182
5182
|
return new Uint8Array(s).set(t, r), s;
|
|
5183
|
-
}, "addArrayBufferChunk"),
|
|
5183
|
+
}, "addArrayBufferChunk"), Td = /* @__PURE__ */ i((t, e) => {
|
|
5184
5184
|
if (e <= t.byteLength)
|
|
5185
5185
|
return t;
|
|
5186
|
-
let r = new ArrayBuffer(
|
|
5186
|
+
let r = new ArrayBuffer(to(e));
|
|
5187
5187
|
return new Uint8Array(r).set(new Uint8Array(t), 0), r;
|
|
5188
|
-
}, "resizeArrayBufferSlow"),
|
|
5188
|
+
}, "resizeArrayBufferSlow"), Id = /* @__PURE__ */ i((t, e) => {
|
|
5189
5189
|
if (e <= t.maxByteLength)
|
|
5190
5190
|
return t.resize(e), t;
|
|
5191
|
-
let r = new ArrayBuffer(e, { maxByteLength:
|
|
5191
|
+
let r = new ArrayBuffer(e, { maxByteLength: to(e) });
|
|
5192
5192
|
return new Uint8Array(r).set(new Uint8Array(t), 0), r;
|
|
5193
|
-
}, "resizeArrayBuffer"),
|
|
5194
|
-
({ contents: t, length: e }) =>
|
|
5195
|
-
"hasArrayBufferResize"),
|
|
5196
|
-
init:
|
|
5193
|
+
}, "resizeArrayBuffer"), to = /* @__PURE__ */ i((t) => eo ** Math.ceil(Math.log(t) / Math.log(eo)), "getNewContentsLength"), eo = 2, Sd = /* @__PURE__ */ i(
|
|
5194
|
+
({ contents: t, length: e }) => ro() ? t : t.slice(0, e), "finalizeArrayBuffer"), ro = /* @__PURE__ */ i(() => "resize" in ArrayBuffer.prototype,
|
|
5195
|
+
"hasArrayBufferResize"), Ed = {
|
|
5196
|
+
init: xd,
|
|
5197
5197
|
convertChunk: {
|
|
5198
|
-
string:
|
|
5199
|
-
buffer:
|
|
5200
|
-
arrayBuffer:
|
|
5201
|
-
dataView:
|
|
5202
|
-
typedArray:
|
|
5198
|
+
string: vd,
|
|
5199
|
+
buffer: Xs,
|
|
5200
|
+
arrayBuffer: Xs,
|
|
5201
|
+
dataView: Qs,
|
|
5202
|
+
typedArray: Qs,
|
|
5203
5203
|
others: Tt
|
|
5204
5204
|
},
|
|
5205
5205
|
getSize: It,
|
|
5206
|
-
truncateChunk:
|
|
5207
|
-
addChunk:
|
|
5206
|
+
truncateChunk: wd,
|
|
5207
|
+
addChunk: kd,
|
|
5208
5208
|
getFinalChunk: Tr,
|
|
5209
|
-
finalize:
|
|
5209
|
+
finalize: Sd
|
|
5210
5210
|
};
|
|
5211
5211
|
|
|
5212
5212
|
// node_modules/get-stream/source/buffer.js
|
|
@@ -5214,26 +5214,26 @@ async function St(t, e) {
|
|
|
5214
5214
|
if (!("Buffer" in globalThis))
|
|
5215
5215
|
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
|
5216
5216
|
try {
|
|
5217
|
-
return
|
|
5217
|
+
return no(await Sr(t, e));
|
|
5218
5218
|
} catch (r) {
|
|
5219
|
-
throw r.bufferedData !== void 0 && (r.bufferedData =
|
|
5219
|
+
throw r.bufferedData !== void 0 && (r.bufferedData = no(r.bufferedData)), r;
|
|
5220
5220
|
}
|
|
5221
5221
|
}
|
|
5222
5222
|
i(St, "getStreamAsBuffer");
|
|
5223
|
-
var
|
|
5223
|
+
var no = /* @__PURE__ */ i((t) => globalThis.Buffer.from(t), "arrayBufferToNodeBuffer");
|
|
5224
5224
|
|
|
5225
5225
|
// node_modules/get-stream/source/string.js
|
|
5226
5226
|
async function Er(t, e) {
|
|
5227
|
-
return Be(t,
|
|
5227
|
+
return Be(t, jd, e);
|
|
5228
5228
|
}
|
|
5229
5229
|
i(Er, "getStreamAsString");
|
|
5230
|
-
var
|
|
5231
|
-
decode(t, { stream: !0 }), "useTextDecoder"),
|
|
5232
|
-
(t, e) => t.slice(0, e), "truncateStringChunk"),
|
|
5230
|
+
var Cd = /* @__PURE__ */ i(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), Et = /* @__PURE__ */ i((t, { textDecoder: e }) => e.
|
|
5231
|
+
decode(t, { stream: !0 }), "useTextDecoder"), Pd = /* @__PURE__ */ i((t, { contents: e }) => e + t, "addStringChunk"), Ad = /* @__PURE__ */ i(
|
|
5232
|
+
(t, e) => t.slice(0, e), "truncateStringChunk"), Od = /* @__PURE__ */ i(({ textDecoder: t }) => {
|
|
5233
5233
|
let e = t.decode();
|
|
5234
5234
|
return e === "" ? void 0 : e;
|
|
5235
|
-
}, "getFinalStringChunk"),
|
|
5236
|
-
init:
|
|
5235
|
+
}, "getFinalStringChunk"), jd = {
|
|
5236
|
+
init: Cd,
|
|
5237
5237
|
convertChunk: {
|
|
5238
5238
|
string: kr,
|
|
5239
5239
|
buffer: Et,
|
|
@@ -5243,35 +5243,35 @@ decode(t, { stream: !0 }), "useTextDecoder"), Sd = /* @__PURE__ */ i((t, { conte
|
|
|
5243
5243
|
others: Tt
|
|
5244
5244
|
},
|
|
5245
5245
|
getSize: It,
|
|
5246
|
-
truncateChunk:
|
|
5247
|
-
addChunk:
|
|
5248
|
-
getFinalChunk:
|
|
5246
|
+
truncateChunk: Ad,
|
|
5247
|
+
addChunk: Pd,
|
|
5248
|
+
getFinalChunk: Od,
|
|
5249
5249
|
finalize: Ir
|
|
5250
5250
|
};
|
|
5251
5251
|
|
|
5252
5252
|
// node_modules/execa/lib/stream.js
|
|
5253
|
-
var
|
|
5254
|
-
var
|
|
5253
|
+
var io = z(oo(), 1);
|
|
5254
|
+
var ao = /* @__PURE__ */ i((t) => {
|
|
5255
5255
|
if (t !== void 0)
|
|
5256
5256
|
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
5257
|
-
}, "validateInputOptions"),
|
|
5258
|
-
|
|
5259
|
-
let e =
|
|
5257
|
+
}, "validateInputOptions"), Dd = /* @__PURE__ */ i(({ input: t, inputFile: e }) => typeof e != "string" ? t : (ao(t), Zd(e)), "getInputSync"),
|
|
5258
|
+
co = /* @__PURE__ */ i((t) => {
|
|
5259
|
+
let e = Dd(t);
|
|
5260
5260
|
if (wt(e))
|
|
5261
5261
|
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
5262
5262
|
return e;
|
|
5263
|
-
}, "handleInputSync"),
|
|
5263
|
+
}, "handleInputSync"), Ld = /* @__PURE__ */ i(({ input: t, inputFile: e }) => typeof e != "string" ? t : (ao(t), Nd(e)), "getInput"), uo = /* @__PURE__ */ i(
|
|
5264
5264
|
(t, e) => {
|
|
5265
|
-
let r =
|
|
5265
|
+
let r = Ld(e);
|
|
5266
5266
|
r !== void 0 && (wt(r) ? r.pipe(t.stdin) : t.stdin.end(r));
|
|
5267
|
-
}, "handleInput"),
|
|
5267
|
+
}, "handleInput"), lo = /* @__PURE__ */ i((t, { all: e }) => {
|
|
5268
5268
|
if (!e || !t.stdout && !t.stderr)
|
|
5269
5269
|
return;
|
|
5270
|
-
let r = (0,
|
|
5270
|
+
let r = (0, io.default)();
|
|
5271
5271
|
return t.stdout && r.add(t.stdout), t.stderr && r.add(t.stderr), r;
|
|
5272
5272
|
}, "makeAllStream"), Cr = /* @__PURE__ */ i(async (t, e) => {
|
|
5273
5273
|
if (!(!t || e === void 0)) {
|
|
5274
|
-
await
|
|
5274
|
+
await Md(0), t.destroy();
|
|
5275
5275
|
try {
|
|
5276
5276
|
return await e;
|
|
5277
5277
|
} catch (r) {
|
|
@@ -5280,8 +5280,8 @@ io = /* @__PURE__ */ i((t) => {
|
|
|
5280
5280
|
}
|
|
5281
5281
|
}, "getBufferedData"), Pr = /* @__PURE__ */ i((t, { encoding: e, buffer: r, maxBuffer: n }) => {
|
|
5282
5282
|
if (!(!t || !r))
|
|
5283
|
-
return e === "utf8" || e === "utf-8" ? Er(t, { maxBuffer: n }) : e === null || e === "buffer" ? St(t, { maxBuffer: n }) :
|
|
5284
|
-
}, "getStreamPromise"),
|
|
5283
|
+
return e === "utf8" || e === "utf-8" ? Er(t, { maxBuffer: n }) : e === null || e === "buffer" ? St(t, { maxBuffer: n }) : Ud(t, n, e);
|
|
5284
|
+
}, "getStreamPromise"), Ud = /* @__PURE__ */ i(async (t, e, r) => (await St(t, { maxBuffer: e })).toString(r), "applyEncoding"), po = /* @__PURE__ */ i(
|
|
5285
5285
|
async ({ stdout: t, stderr: e, all: r }, { encoding: n, buffer: s, maxBuffer: o }, a) => {
|
|
5286
5286
|
let c = Pr(t, { encoding: n, buffer: s, maxBuffer: o }), l = Pr(e, { encoding: n, buffer: s, maxBuffer: o }), p = Pr(r, { encoding: n, buffer: s,
|
|
5287
5287
|
maxBuffer: o * 2 });
|
|
@@ -5298,16 +5298,16 @@ async ({ stdout: t, stderr: e, all: r }, { encoding: n, buffer: s, maxBuffer: o
|
|
|
5298
5298
|
}, "getSpawnedResult");
|
|
5299
5299
|
|
|
5300
5300
|
// node_modules/execa/lib/promise.js
|
|
5301
|
-
var
|
|
5302
|
-
})().constructor.prototype,
|
|
5301
|
+
var $d = (async () => {
|
|
5302
|
+
})().constructor.prototype, Vd = ["then", "catch", "finally"].map((t) => [
|
|
5303
5303
|
t,
|
|
5304
|
-
Reflect.getOwnPropertyDescriptor(
|
|
5304
|
+
Reflect.getOwnPropertyDescriptor($d, t)
|
|
5305
5305
|
]), Ar = /* @__PURE__ */ i((t, e) => {
|
|
5306
|
-
for (let [r, n] of
|
|
5306
|
+
for (let [r, n] of Vd) {
|
|
5307
5307
|
let s = typeof e == "function" ? (...o) => Reflect.apply(n.value, e(), o) : n.value.bind(e);
|
|
5308
5308
|
Reflect.defineProperty(t, r, { ...n, value: s });
|
|
5309
5309
|
}
|
|
5310
|
-
}, "mergePromise"),
|
|
5310
|
+
}, "mergePromise"), fo = /* @__PURE__ */ i((t) => new Promise((e, r) => {
|
|
5311
5311
|
t.on("exit", (n, s) => {
|
|
5312
5312
|
e({ exitCode: n, signal: s });
|
|
5313
5313
|
}), t.on("error", (n) => {
|
|
@@ -5318,46 +5318,46 @@ var Dd = (async () => {
|
|
|
5318
5318
|
}), "getSpawnedPromise");
|
|
5319
5319
|
|
|
5320
5320
|
// node_modules/execa/lib/command.js
|
|
5321
|
-
import { Buffer as
|
|
5322
|
-
import { ChildProcess as
|
|
5323
|
-
var
|
|
5324
|
-
"string" ||
|
|
5325
|
-
d"), jr = /* @__PURE__ */ i((t, e) =>
|
|
5321
|
+
import { Buffer as Fd } from "node:buffer";
|
|
5322
|
+
import { ChildProcess as Bd } from "node:child_process";
|
|
5323
|
+
var yo = /* @__PURE__ */ i((t, e = []) => Array.isArray(e) ? [t, ...e] : [t], "normalizeArgs"), Wd = /^[\w.-]+$/, qd = /* @__PURE__ */ i((t) => typeof t !=
|
|
5324
|
+
"string" || Wd.test(t) ? t : `"${t.replaceAll('"', '\\"')}"`, "escapeArg"), Or = /* @__PURE__ */ i((t, e) => yo(t, e).join(" "), "joinComman\
|
|
5325
|
+
d"), jr = /* @__PURE__ */ i((t, e) => yo(t, e).map((r) => qd(r)).join(" "), "getEscapedCommand"), go = / +/g, bo = /* @__PURE__ */ i((t) => {
|
|
5326
5326
|
let e = [];
|
|
5327
|
-
for (let r of t.trim().split(
|
|
5327
|
+
for (let r of t.trim().split(go)) {
|
|
5328
5328
|
let n = e.at(-1);
|
|
5329
5329
|
n && n.endsWith("\\") ? e[e.length - 1] = `${n.slice(0, -1)} ${r}` : e.push(r);
|
|
5330
5330
|
}
|
|
5331
5331
|
return e;
|
|
5332
|
-
}, "parseCommand"),
|
|
5332
|
+
}, "parseCommand"), mo = /* @__PURE__ */ i((t) => {
|
|
5333
5333
|
let e = typeof t;
|
|
5334
5334
|
if (e === "string")
|
|
5335
5335
|
return t;
|
|
5336
5336
|
if (e === "number")
|
|
5337
5337
|
return String(t);
|
|
5338
|
-
if (e === "object" && t !== null && !(t instanceof
|
|
5338
|
+
if (e === "object" && t !== null && !(t instanceof Bd) && "stdout" in t) {
|
|
5339
5339
|
let r = typeof t.stdout;
|
|
5340
5340
|
if (r === "string")
|
|
5341
5341
|
return t.stdout;
|
|
5342
|
-
if (
|
|
5342
|
+
if (Fd.isBuffer(t.stdout))
|
|
5343
5343
|
return t.stdout.toString();
|
|
5344
5344
|
throw new TypeError(`Unexpected "${r}" stdout in template expression`);
|
|
5345
5345
|
}
|
|
5346
5346
|
throw new TypeError(`Unexpected "${e}" in template expression`);
|
|
5347
|
-
}, "parseExpression"),
|
|
5347
|
+
}, "parseExpression"), ho = /* @__PURE__ */ i((t, e, r) => r || t.length === 0 || e.length === 0 ? [...t, ...e] : [
|
|
5348
5348
|
...t.slice(0, -1),
|
|
5349
5349
|
`${t.at(-1)}${e[0]}`,
|
|
5350
5350
|
...e.slice(1)
|
|
5351
|
-
], "concatTokens"),
|
|
5352
|
-
let o = s ?? t.raw[n], a = o.split(
|
|
5351
|
+
], "concatTokens"), Gd = /* @__PURE__ */ i(({ templates: t, expressions: e, tokens: r, index: n, template: s }) => {
|
|
5352
|
+
let o = s ?? t.raw[n], a = o.split(go).filter(Boolean), c = ho(
|
|
5353
5353
|
r,
|
|
5354
5354
|
a,
|
|
5355
5355
|
o.startsWith(" ")
|
|
5356
5356
|
);
|
|
5357
5357
|
if (n === e.length)
|
|
5358
5358
|
return c;
|
|
5359
|
-
let l = e[n], p = Array.isArray(l) ? l.map((f) =>
|
|
5360
|
-
return
|
|
5359
|
+
let l = e[n], p = Array.isArray(l) ? l.map((f) => mo(f)) : [mo(l)];
|
|
5360
|
+
return ho(
|
|
5361
5361
|
c,
|
|
5362
5362
|
p,
|
|
5363
5363
|
o.endsWith(" ")
|
|
@@ -5365,29 +5365,29 @@ d"), jr = /* @__PURE__ */ i((t, e) => mo(t, e).map((r) => Fd(r)).join(" "), "get
|
|
|
5365
5365
|
}, "parseTemplate"), Rr = /* @__PURE__ */ i((t, e) => {
|
|
5366
5366
|
let r = [];
|
|
5367
5367
|
for (let [n, s] of t.entries())
|
|
5368
|
-
r =
|
|
5368
|
+
r = Gd({ templates: t, expressions: e, tokens: r, index: n, template: s });
|
|
5369
5369
|
return r;
|
|
5370
5370
|
}, "parseTemplates");
|
|
5371
5371
|
|
|
5372
5372
|
// node_modules/execa/lib/verbose.js
|
|
5373
|
-
import { debuglog as
|
|
5374
|
-
import
|
|
5375
|
-
var
|
|
5373
|
+
import { debuglog as zd } from "node:util";
|
|
5374
|
+
import Kd from "node:process";
|
|
5375
|
+
var xo = zd("execa").enabled, Ct = /* @__PURE__ */ i((t, e) => String(t).padStart(e, "0"), "padField"), Jd = /* @__PURE__ */ i(() => {
|
|
5376
5376
|
let t = /* @__PURE__ */ new Date();
|
|
5377
5377
|
return `${Ct(t.getHours(), 2)}:${Ct(t.getMinutes(), 2)}:${Ct(t.getSeconds(), 2)}.${Ct(t.getMilliseconds(), 3)}`;
|
|
5378
5378
|
}, "getTimestamp"), Nr = /* @__PURE__ */ i((t, { verbose: e }) => {
|
|
5379
|
-
e &&
|
|
5379
|
+
e && Kd.stderr.write(`[${Jd()}] ${t}
|
|
5380
5380
|
`);
|
|
5381
5381
|
}, "logCommand");
|
|
5382
5382
|
|
|
5383
5383
|
// node_modules/execa/index.js
|
|
5384
|
-
var
|
|
5384
|
+
var Xd = 1e3 * 1e3 * 100, Qd = /* @__PURE__ */ i(({ env: t, extendEnv: e, preferLocal: r, localDir: n, execPath: s }) => {
|
|
5385
5385
|
let o = e ? { ...Pt.env, ...t } : t;
|
|
5386
|
-
return r ?
|
|
5387
|
-
}, "getEnv"),
|
|
5388
|
-
let n =
|
|
5386
|
+
return r ? Ns({ env: o, cwd: n, execPath: s }) : o;
|
|
5387
|
+
}, "getEnv"), wo = /* @__PURE__ */ i((t, e, r = {}) => {
|
|
5388
|
+
let n = _o.default._parse(t, e, r);
|
|
5389
5389
|
return t = n.command, e = n.args, r = n.options, r = {
|
|
5390
|
-
maxBuffer:
|
|
5390
|
+
maxBuffer: Xd,
|
|
5391
5391
|
buffer: !0,
|
|
5392
5392
|
stripFinalNewline: !0,
|
|
5393
5393
|
extendEnv: !0,
|
|
@@ -5399,21 +5399,21 @@ var Jd = 1e3 * 1e3 * 100, Hd = /* @__PURE__ */ i(({ env: t, extendEnv: e, prefer
|
|
|
5399
5399
|
cleanup: !0,
|
|
5400
5400
|
all: !1,
|
|
5401
5401
|
windowsHide: !0,
|
|
5402
|
-
verbose:
|
|
5402
|
+
verbose: xo,
|
|
5403
5403
|
...r
|
|
5404
|
-
}, r.env =
|
|
5404
|
+
}, r.env = Qd(r), r.stdio = Vs(r), Pt.platform === "win32" && Yd.basename(t, ".exe") === "cmd" && e.unshift("/q"), { file: t, args: e, options: r,
|
|
5405
5405
|
parsed: n };
|
|
5406
|
-
}, "handleArguments"), We = /* @__PURE__ */ i((t, e, r) => typeof e != "string" && !
|
|
5406
|
+
}, "handleArguments"), We = /* @__PURE__ */ i((t, e, r) => typeof e != "string" && !Hd.isBuffer(e) ? r === void 0 ? void 0 : "" : t.stripFinalNewline ?
|
|
5407
5407
|
lr(e) : e, "handleOutput");
|
|
5408
|
-
function
|
|
5409
|
-
let n =
|
|
5410
|
-
Nr(o, n.options),
|
|
5408
|
+
function ko(t, e, r) {
|
|
5409
|
+
let n = wo(t, e, r), s = Or(t, e), o = jr(t, e);
|
|
5410
|
+
Nr(o, n.options), Gs(n.options);
|
|
5411
5411
|
let a;
|
|
5412
5412
|
try {
|
|
5413
5413
|
a = Zr.spawn(n.file, n.args, n.options);
|
|
5414
|
-
} catch (
|
|
5415
|
-
let
|
|
5416
|
-
error:
|
|
5414
|
+
} catch (_) {
|
|
5415
|
+
let C = new Zr.ChildProcess(), S = Promise.reject(Fe({
|
|
5416
|
+
error: _,
|
|
5417
5417
|
stdout: "",
|
|
5418
5418
|
stderr: "",
|
|
5419
5419
|
all: "",
|
|
@@ -5424,52 +5424,52 @@ function _o(t, e, r) {
|
|
|
5424
5424
|
isCanceled: !1,
|
|
5425
5425
|
killed: !1
|
|
5426
5426
|
}));
|
|
5427
|
-
return Ar(
|
|
5428
|
-
}
|
|
5429
|
-
let c =
|
|
5430
|
-
a.kill =
|
|
5431
|
-
let
|
|
5432
|
-
let [{ error:
|
|
5433
|
-
|
|
5434
|
-
if (
|
|
5435
|
-
let
|
|
5436
|
-
error:
|
|
5437
|
-
exitCode:
|
|
5427
|
+
return Ar(C, S), C;
|
|
5428
|
+
}
|
|
5429
|
+
let c = fo(a), l = qs(a, n.options, c), p = zs(a, n.options, l), f = { isCanceled: !1 };
|
|
5430
|
+
a.kill = Bs.bind(null, a.kill.bind(a)), a.cancel = Ws.bind(null, a, f);
|
|
5431
|
+
let w = Ms(/* @__PURE__ */ i(async () => {
|
|
5432
|
+
let [{ error: _, exitCode: C, signal: S, timedOut: P }, G, Oe, be] = await po(a, n.options, p), je = We(n.options, G), Je = We(n.options,
|
|
5433
|
+
Oe), He = We(n.options, be);
|
|
5434
|
+
if (_ || C !== 0 || S !== null) {
|
|
5435
|
+
let k = Fe({
|
|
5436
|
+
error: _,
|
|
5437
|
+
exitCode: C,
|
|
5438
5438
|
signal: S,
|
|
5439
|
-
stdout:
|
|
5440
|
-
stderr:
|
|
5441
|
-
all:
|
|
5439
|
+
stdout: je,
|
|
5440
|
+
stderr: Je,
|
|
5441
|
+
all: He,
|
|
5442
5442
|
command: s,
|
|
5443
5443
|
escapedCommand: o,
|
|
5444
5444
|
parsed: n,
|
|
5445
|
-
timedOut:
|
|
5445
|
+
timedOut: P,
|
|
5446
5446
|
isCanceled: f.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
|
|
5447
5447
|
killed: a.killed
|
|
5448
5448
|
});
|
|
5449
5449
|
if (!n.options.reject)
|
|
5450
|
-
return
|
|
5451
|
-
throw
|
|
5450
|
+
return k;
|
|
5451
|
+
throw k;
|
|
5452
5452
|
}
|
|
5453
5453
|
return {
|
|
5454
5454
|
command: s,
|
|
5455
5455
|
escapedCommand: o,
|
|
5456
5456
|
exitCode: 0,
|
|
5457
|
-
stdout:
|
|
5458
|
-
stderr:
|
|
5459
|
-
all:
|
|
5457
|
+
stdout: je,
|
|
5458
|
+
stderr: Je,
|
|
5459
|
+
all: He,
|
|
5460
5460
|
failed: !1,
|
|
5461
5461
|
timedOut: !1,
|
|
5462
5462
|
isCanceled: !1,
|
|
5463
5463
|
killed: !1
|
|
5464
5464
|
};
|
|
5465
5465
|
}, "handlePromise"));
|
|
5466
|
-
return
|
|
5466
|
+
return uo(a, n.options), a.all = lo(a, n.options), Ks(a), Ar(a, w), a;
|
|
5467
5467
|
}
|
|
5468
|
-
i(
|
|
5469
|
-
function
|
|
5470
|
-
let n =
|
|
5468
|
+
i(ko, "execa");
|
|
5469
|
+
function eu(t, e, r) {
|
|
5470
|
+
let n = wo(t, e, r), s = Or(t, e), o = jr(t, e);
|
|
5471
5471
|
Nr(o, n.options);
|
|
5472
|
-
let a =
|
|
5472
|
+
let a = co(n.options), c;
|
|
5473
5473
|
try {
|
|
5474
5474
|
c = Zr.spawnSync(n.file, n.args, { ...n.options, input: a });
|
|
5475
5475
|
} catch (f) {
|
|
@@ -5517,41 +5517,41 @@ function Yd(t, e, r) {
|
|
|
5517
5517
|
killed: !1
|
|
5518
5518
|
};
|
|
5519
5519
|
}
|
|
5520
|
-
i(
|
|
5521
|
-
var
|
|
5522
|
-
"normalizeScriptStdin"),
|
|
5520
|
+
i(eu, "execaSync");
|
|
5521
|
+
var tu = /* @__PURE__ */ i(({ input: t, inputFile: e, stdio: r }) => t === void 0 && e === void 0 && r === void 0 ? { stdin: "inherit" } : {},
|
|
5522
|
+
"normalizeScriptStdin"), vo = /* @__PURE__ */ i((t = {}) => ({
|
|
5523
5523
|
preferLocal: !0,
|
|
5524
|
-
...
|
|
5524
|
+
...tu(t),
|
|
5525
5525
|
...t
|
|
5526
5526
|
}), "normalizeScriptOptions");
|
|
5527
|
-
function
|
|
5527
|
+
function To(t) {
|
|
5528
5528
|
function e(r, ...n) {
|
|
5529
5529
|
if (!Array.isArray(r))
|
|
5530
|
-
return
|
|
5530
|
+
return To({ ...t, ...r });
|
|
5531
5531
|
let [s, ...o] = Rr(r, n);
|
|
5532
|
-
return
|
|
5532
|
+
return ko(s, o, vo(t));
|
|
5533
5533
|
}
|
|
5534
5534
|
return i(e, "$"), e.sync = (r, ...n) => {
|
|
5535
5535
|
if (!Array.isArray(r))
|
|
5536
5536
|
throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
|
|
5537
5537
|
let [s, ...o] = Rr(r, n);
|
|
5538
|
-
return
|
|
5538
|
+
return eu(s, o, vo(t));
|
|
5539
5539
|
}, e;
|
|
5540
5540
|
}
|
|
5541
|
-
i(
|
|
5542
|
-
var
|
|
5543
|
-
function
|
|
5544
|
-
let [r, ...n] =
|
|
5545
|
-
return
|
|
5541
|
+
i(To, "create$");
|
|
5542
|
+
var Qm = To();
|
|
5543
|
+
function Io(t, e) {
|
|
5544
|
+
let [r, ...n] = bo(t);
|
|
5545
|
+
return ko(r, n, e);
|
|
5546
5546
|
}
|
|
5547
|
-
i(
|
|
5547
|
+
i(Io, "execaCommand");
|
|
5548
5548
|
|
|
5549
5549
|
// src/telemetry/exec-command-count-lines.ts
|
|
5550
5550
|
async function At(t, e) {
|
|
5551
|
-
let r =
|
|
5551
|
+
let r = Io(t, { shell: !0, buffer: !1, ...e });
|
|
5552
5552
|
if (!r.stdout)
|
|
5553
5553
|
throw new Error("Unexpected missing stdout");
|
|
5554
|
-
let n = 0, s =
|
|
5554
|
+
let n = 0, s = ru(r.stdout);
|
|
5555
5555
|
return s.on("line", () => {
|
|
5556
5556
|
n += 1;
|
|
5557
5557
|
}), await r, s.close(), n;
|
|
@@ -5559,21 +5559,21 @@ async function At(t, e) {
|
|
|
5559
5559
|
i(At, "execCommandCountLines");
|
|
5560
5560
|
|
|
5561
5561
|
// src/common/utils/file-cache.ts
|
|
5562
|
-
import { createHash as
|
|
5563
|
-
import { mkdirSync as Dr, readFileSync as
|
|
5564
|
-
import { readFile as
|
|
5565
|
-
import { tmpdir as
|
|
5562
|
+
import { createHash as Eo, randomBytes as nu } from "node:crypto";
|
|
5563
|
+
import { mkdirSync as Dr, readFileSync as su, readdirSync as ou, rmSync as Co, writeFileSync as iu } from "node:fs";
|
|
5564
|
+
import { readFile as Po, readdir as Ao, rm as Oo, writeFile as au } from "node:fs/promises";
|
|
5565
|
+
import { tmpdir as cu } from "node:os";
|
|
5566
5566
|
import { join as qe } from "node:path";
|
|
5567
5567
|
var Ot = class {
|
|
5568
5568
|
static {
|
|
5569
5569
|
i(this, "FileSystemCache");
|
|
5570
5570
|
}
|
|
5571
5571
|
constructor(e = {}) {
|
|
5572
|
-
this.prefix = (e.ns || e.prefix || "") + "-", this.hash_alg = e.hash_alg || "md5", this.cache_dir = e.basePath || qe(
|
|
5573
|
-
"base64").replace(/\//g, "-")), this.ttl = e.ttl || 0,
|
|
5572
|
+
this.prefix = (e.ns || e.prefix || "") + "-", this.hash_alg = e.hash_alg || "md5", this.cache_dir = e.basePath || qe(cu(), nu(15).toString(
|
|
5573
|
+
"base64").replace(/\//g, "-")), this.ttl = e.ttl || 0, Eo(this.hash_alg), Dr(this.cache_dir, { recursive: !0 });
|
|
5574
5574
|
}
|
|
5575
5575
|
generateHash(e) {
|
|
5576
|
-
return qe(this.cache_dir, this.prefix +
|
|
5576
|
+
return qe(this.cache_dir, this.prefix + Eo(this.hash_alg).update(e).digest("hex"));
|
|
5577
5577
|
}
|
|
5578
5578
|
isExpired(e, r) {
|
|
5579
5579
|
return e.ttl != null && r > e.ttl;
|
|
@@ -5588,7 +5588,7 @@ var Ot = class {
|
|
|
5588
5588
|
}
|
|
5589
5589
|
async get(e, r) {
|
|
5590
5590
|
try {
|
|
5591
|
-
let n = await
|
|
5591
|
+
let n = await Po(this.generateHash(e), "utf8");
|
|
5592
5592
|
return this.parseCacheData(n, r);
|
|
5593
5593
|
} catch {
|
|
5594
5594
|
return r;
|
|
@@ -5596,7 +5596,7 @@ var Ot = class {
|
|
|
5596
5596
|
}
|
|
5597
5597
|
getSync(e, r) {
|
|
5598
5598
|
try {
|
|
5599
|
-
let n =
|
|
5599
|
+
let n = su(this.generateHash(e), "utf8");
|
|
5600
5600
|
return this.parseCacheData(n, r);
|
|
5601
5601
|
} catch {
|
|
5602
5602
|
return r;
|
|
@@ -5604,13 +5604,13 @@ var Ot = class {
|
|
|
5604
5604
|
}
|
|
5605
5605
|
async set(e, r, n = {}) {
|
|
5606
5606
|
let s = typeof n == "number" ? { ttl: n } : n;
|
|
5607
|
-
Dr(this.cache_dir, { recursive: !0 }), await
|
|
5607
|
+
Dr(this.cache_dir, { recursive: !0 }), await au(this.generateHash(e), this.parseSetData(e, r, s), {
|
|
5608
5608
|
encoding: s.encoding || "utf8"
|
|
5609
5609
|
});
|
|
5610
5610
|
}
|
|
5611
5611
|
setSync(e, r, n = {}) {
|
|
5612
5612
|
let s = typeof n == "number" ? { ttl: n } : n;
|
|
5613
|
-
Dr(this.cache_dir, { recursive: !0 }),
|
|
5613
|
+
Dr(this.cache_dir, { recursive: !0 }), iu(this.generateHash(e), this.parseSetData(e, r, s), {
|
|
5614
5614
|
encoding: s.encoding || "utf8"
|
|
5615
5615
|
});
|
|
5616
5616
|
}
|
|
@@ -5621,24 +5621,24 @@ var Ot = class {
|
|
|
5621
5621
|
e.forEach((n) => this.setSync(n.key, n.content ?? n.value, r));
|
|
5622
5622
|
}
|
|
5623
5623
|
async remove(e) {
|
|
5624
|
-
await
|
|
5624
|
+
await Oo(this.generateHash(e), { force: !0 });
|
|
5625
5625
|
}
|
|
5626
5626
|
removeSync(e) {
|
|
5627
|
-
|
|
5627
|
+
Co(this.generateHash(e), { force: !0 });
|
|
5628
5628
|
}
|
|
5629
5629
|
async clear() {
|
|
5630
|
-
let e = await
|
|
5630
|
+
let e = await Ao(this.cache_dir);
|
|
5631
5631
|
await Promise.all(
|
|
5632
|
-
e.filter((r) => r.startsWith(this.prefix)).map((r) =>
|
|
5632
|
+
e.filter((r) => r.startsWith(this.prefix)).map((r) => Oo(qe(this.cache_dir, r), { force: !0 }))
|
|
5633
5633
|
);
|
|
5634
5634
|
}
|
|
5635
5635
|
clearSync() {
|
|
5636
|
-
|
|
5636
|
+
ou(this.cache_dir).filter((e) => e.startsWith(this.prefix)).forEach((e) => Co(qe(this.cache_dir, e), { force: !0 }));
|
|
5637
5637
|
}
|
|
5638
5638
|
async getAll() {
|
|
5639
|
-
let e = Date.now(), r = await
|
|
5639
|
+
let e = Date.now(), r = await Ao(this.cache_dir);
|
|
5640
5640
|
return (await Promise.all(
|
|
5641
|
-
r.filter((s) => s.startsWith(this.prefix)).map((s) =>
|
|
5641
|
+
r.filter((s) => s.startsWith(this.prefix)).map((s) => Po(qe(this.cache_dir, s), "utf8"))
|
|
5642
5642
|
)).map((s) => JSON.parse(s)).filter((s) => s.content && !this.isExpired(s, e));
|
|
5643
5643
|
}
|
|
5644
5644
|
async load() {
|
|
@@ -5657,51 +5657,51 @@ function Lr(t) {
|
|
|
5657
5657
|
i(Lr, "createFileSystemCache");
|
|
5658
5658
|
|
|
5659
5659
|
// src/common/utils/resolve-path-in-sb-cache.ts
|
|
5660
|
-
import { join as
|
|
5660
|
+
import { join as Vo } from "node:path";
|
|
5661
5661
|
|
|
5662
5662
|
// node_modules/find-cache-dir/index.js
|
|
5663
|
-
var
|
|
5664
|
-
import
|
|
5663
|
+
var $o = z(Ro(), 1);
|
|
5664
|
+
import wu from "node:process";
|
|
5665
5665
|
import Ge from "node:path";
|
|
5666
5666
|
import Rt from "node:fs";
|
|
5667
5667
|
|
|
5668
5668
|
// ../node_modules/pkg-dir/index.js
|
|
5669
|
-
import
|
|
5669
|
+
import _u from "node:path";
|
|
5670
5670
|
|
|
5671
5671
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
5672
5672
|
import jt from "node:path";
|
|
5673
|
-
import { fileURLToPath as
|
|
5673
|
+
import { fileURLToPath as gu } from "node:url";
|
|
5674
5674
|
|
|
5675
5675
|
// ../node_modules/locate-path/index.js
|
|
5676
|
-
import
|
|
5677
|
-
import
|
|
5678
|
-
import
|
|
5679
|
-
import { fileURLToPath as
|
|
5680
|
-
var
|
|
5676
|
+
import lu from "node:process";
|
|
5677
|
+
import pu from "node:path";
|
|
5678
|
+
import No, { promises as Eh } from "node:fs";
|
|
5679
|
+
import { fileURLToPath as fu } from "node:url";
|
|
5680
|
+
var Zo = {
|
|
5681
5681
|
directory: "isDirectory",
|
|
5682
5682
|
file: "isFile"
|
|
5683
5683
|
};
|
|
5684
|
-
function
|
|
5685
|
-
if (!Object.hasOwnProperty.call(
|
|
5684
|
+
function mu(t) {
|
|
5685
|
+
if (!Object.hasOwnProperty.call(Zo, t))
|
|
5686
5686
|
throw new Error(`Invalid type specified: ${t}`);
|
|
5687
5687
|
}
|
|
5688
|
-
i(
|
|
5689
|
-
var
|
|
5688
|
+
i(mu, "checkType");
|
|
5689
|
+
var hu = /* @__PURE__ */ i((t, e) => e[Zo[t]](), "matchType"), yu = /* @__PURE__ */ i((t) => t instanceof URL ? fu(t) : t, "toPath");
|
|
5690
5690
|
function Ur(t, {
|
|
5691
|
-
cwd: e =
|
|
5691
|
+
cwd: e = lu.cwd(),
|
|
5692
5692
|
type: r = "file",
|
|
5693
5693
|
allowSymlinks: n = !0
|
|
5694
5694
|
} = {}) {
|
|
5695
|
-
|
|
5696
|
-
let s = n ?
|
|
5695
|
+
mu(r), e = yu(e);
|
|
5696
|
+
let s = n ? No.statSync : No.lstatSync;
|
|
5697
5697
|
for (let o of t)
|
|
5698
5698
|
try {
|
|
5699
|
-
let a = s(
|
|
5699
|
+
let a = s(pu.resolve(e, o), {
|
|
5700
5700
|
throwIfNoEntry: !1
|
|
5701
5701
|
});
|
|
5702
5702
|
if (!a)
|
|
5703
5703
|
continue;
|
|
5704
|
-
if (
|
|
5704
|
+
if (hu(r, a))
|
|
5705
5705
|
return o;
|
|
5706
5706
|
} catch {
|
|
5707
5707
|
}
|
|
@@ -5709,12 +5709,12 @@ function Ur(t, {
|
|
|
5709
5709
|
i(Ur, "locatePathSync");
|
|
5710
5710
|
|
|
5711
5711
|
// ../node_modules/pkg-dir/node_modules/path-exists/index.js
|
|
5712
|
-
import
|
|
5712
|
+
import Rh, { promises as Nh } from "node:fs";
|
|
5713
5713
|
|
|
5714
5714
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
5715
|
-
var
|
|
5716
|
-
function
|
|
5717
|
-
let r = jt.resolve(
|
|
5715
|
+
var bu = /* @__PURE__ */ i((t) => t instanceof URL ? gu(t) : t, "toPath"), xu = Symbol("findUpStop");
|
|
5716
|
+
function vu(t, e = {}) {
|
|
5717
|
+
let r = jt.resolve(bu(e.cwd) || ""), { root: n } = jt.parse(r), s = e.stopAt || n, o = e.limit || Number.POSITIVE_INFINITY, a = [t].flat(),
|
|
5718
5718
|
c = /* @__PURE__ */ i((p) => {
|
|
5719
5719
|
if (typeof t != "function")
|
|
5720
5720
|
return Ur(a, p);
|
|
@@ -5723,82 +5723,82 @@ function gu(t, e = {}) {
|
|
|
5723
5723
|
}, "runMatcher"), l = [];
|
|
5724
5724
|
for (; ; ) {
|
|
5725
5725
|
let p = c({ ...e, cwd: r });
|
|
5726
|
-
if (p ===
|
|
5726
|
+
if (p === xu || (p && l.push(jt.resolve(r, p)), r === s || l.length >= o))
|
|
5727
5727
|
break;
|
|
5728
5728
|
r = jt.dirname(r);
|
|
5729
5729
|
}
|
|
5730
5730
|
return l;
|
|
5731
5731
|
}
|
|
5732
|
-
i(
|
|
5733
|
-
function
|
|
5734
|
-
return
|
|
5732
|
+
i(vu, "findUpMultipleSync");
|
|
5733
|
+
function Mo(t, e = {}) {
|
|
5734
|
+
return vu(t, { ...e, limit: 1 })[0];
|
|
5735
5735
|
}
|
|
5736
|
-
i(
|
|
5736
|
+
i(Mo, "findUpSync");
|
|
5737
5737
|
|
|
5738
5738
|
// ../node_modules/pkg-dir/index.js
|
|
5739
|
-
function
|
|
5740
|
-
let e =
|
|
5741
|
-
return e &&
|
|
5739
|
+
function Do({ cwd: t } = {}) {
|
|
5740
|
+
let e = Mo("package.json", { cwd: t });
|
|
5741
|
+
return e && _u.dirname(e);
|
|
5742
5742
|
}
|
|
5743
|
-
i(
|
|
5743
|
+
i(Do, "packageDirectorySync");
|
|
5744
5744
|
|
|
5745
5745
|
// node_modules/find-cache-dir/index.js
|
|
5746
|
-
var { env: $r, cwd:
|
|
5746
|
+
var { env: $r, cwd: ku } = wu, Lo = /* @__PURE__ */ i((t) => {
|
|
5747
5747
|
try {
|
|
5748
5748
|
return Rt.accessSync(t, Rt.constants.W_OK), !0;
|
|
5749
5749
|
} catch {
|
|
5750
5750
|
return !1;
|
|
5751
5751
|
}
|
|
5752
5752
|
}, "isWritable");
|
|
5753
|
-
function
|
|
5753
|
+
function Uo(t, e) {
|
|
5754
5754
|
return e.create && Rt.mkdirSync(t, { recursive: !0 }), t;
|
|
5755
5755
|
}
|
|
5756
|
-
i(
|
|
5757
|
-
function
|
|
5756
|
+
i(Uo, "useDirectory");
|
|
5757
|
+
function Tu(t) {
|
|
5758
5758
|
let e = Ge.join(t, "node_modules");
|
|
5759
|
-
if (!(!
|
|
5759
|
+
if (!(!Lo(e) && (Rt.existsSync(e) || !Lo(Ge.join(t)))))
|
|
5760
5760
|
return e;
|
|
5761
5761
|
}
|
|
5762
|
-
i(
|
|
5762
|
+
i(Tu, "getNodeModuleDirectory");
|
|
5763
5763
|
function Vr(t = {}) {
|
|
5764
5764
|
if ($r.CACHE_DIR && !["true", "false", "1", "0"].includes($r.CACHE_DIR))
|
|
5765
|
-
return
|
|
5766
|
-
let { cwd: e =
|
|
5765
|
+
return Uo(Ge.join($r.CACHE_DIR, t.name), t);
|
|
5766
|
+
let { cwd: e = ku(), files: r } = t;
|
|
5767
5767
|
if (r) {
|
|
5768
5768
|
if (!Array.isArray(r))
|
|
5769
5769
|
throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof r}\`.`);
|
|
5770
|
-
e = (0,
|
|
5770
|
+
e = (0, $o.default)(r.map((s) => Ge.resolve(e, s)));
|
|
5771
5771
|
}
|
|
5772
|
-
if (e =
|
|
5773
|
-
return
|
|
5772
|
+
if (e = Do({ cwd: e }), !(!e || !Tu(e)))
|
|
5773
|
+
return Uo(Ge.join(e, "node_modules", ".cache", t.name), t);
|
|
5774
5774
|
}
|
|
5775
5775
|
i(Vr, "findCacheDirectory");
|
|
5776
5776
|
|
|
5777
5777
|
// src/common/utils/resolve-path-in-sb-cache.ts
|
|
5778
|
-
function
|
|
5778
|
+
function Fo(t, e = "default") {
|
|
5779
5779
|
let r = Vr({ name: "storybook" });
|
|
5780
|
-
return r ||=
|
|
5780
|
+
return r ||= Vo(process.cwd(), "node_modules", ".cache", "storybook"), Vo(r, e, t);
|
|
5781
5781
|
}
|
|
5782
|
-
i(
|
|
5782
|
+
i(Fo, "resolvePathInStorybookCache");
|
|
5783
5783
|
|
|
5784
5784
|
// src/telemetry/run-telemetry-operation.ts
|
|
5785
|
-
var
|
|
5786
|
-
basePath:
|
|
5785
|
+
var Bo = Lr({
|
|
5786
|
+
basePath: Fo("telemetry"),
|
|
5787
5787
|
ns: "storybook",
|
|
5788
5788
|
ttl: 24 * 60 * 60 * 1e3
|
|
5789
5789
|
// 24h
|
|
5790
5790
|
}), Nt = /* @__PURE__ */ i(async (t, e) => {
|
|
5791
|
-
let r = await
|
|
5792
|
-
return r === void 0 && (r = await e(), r !== void 0 && await
|
|
5791
|
+
let r = await Bo.get(t);
|
|
5792
|
+
return r === void 0 && (r = await e(), r !== void 0 && await Bo.set(t, r)), r;
|
|
5793
5793
|
}, "runTelemetryOperation");
|
|
5794
5794
|
|
|
5795
5795
|
// src/telemetry/get-application-file-count.ts
|
|
5796
|
-
var
|
|
5797
|
-
let r =
|
|
5796
|
+
var Su = ["page", "screen"], Eu = ["js", "jsx", "ts", "tsx"], Cu = /* @__PURE__ */ i(async (t) => {
|
|
5797
|
+
let r = Su.flatMap((n) => [
|
|
5798
5798
|
n,
|
|
5799
5799
|
[n[0].toUpperCase(), ...n.slice(1)].join("")
|
|
5800
5800
|
]).flatMap(
|
|
5801
|
-
(n) =>
|
|
5801
|
+
(n) => Eu.map((s) => `"${t}${Iu}*${n}*.${s}"`)
|
|
5802
5802
|
);
|
|
5803
5803
|
try {
|
|
5804
5804
|
let n = `git ls-files -- ${r.join(" ")}`;
|
|
@@ -5806,25 +5806,25 @@ var ku = ["page", "screen"], Tu = ["js", "jsx", "ts", "tsx"], Iu = /* @__PURE__
|
|
|
5806
5806
|
} catch {
|
|
5807
5807
|
return;
|
|
5808
5808
|
}
|
|
5809
|
-
}, "getApplicationFilesCountUncached"),
|
|
5809
|
+
}, "getApplicationFilesCountUncached"), Wo = /* @__PURE__ */ i(async (t) => Nt(
|
|
5810
5810
|
"applicationFiles",
|
|
5811
|
-
async () =>
|
|
5811
|
+
async () => Cu(t)
|
|
5812
5812
|
), "getApplicationFileCount");
|
|
5813
5813
|
|
|
5814
5814
|
// src/telemetry/get-chromatic-version.ts
|
|
5815
|
-
function
|
|
5815
|
+
function qo(t) {
|
|
5816
5816
|
let e = t.dependencies?.chromatic || t.devDependencies?.chromatic || t.peerDependencies?.chromatic;
|
|
5817
5817
|
return e || (t.scripts && Object.values(t.scripts).find((r) => r?.match(/chromatic/)) ? "latest" : void 0);
|
|
5818
5818
|
}
|
|
5819
|
-
i(
|
|
5819
|
+
i(qo, "getChromaticVersionSpecifier");
|
|
5820
5820
|
|
|
5821
5821
|
// src/telemetry/get-framework-info.ts
|
|
5822
|
-
import { normalize as
|
|
5823
|
-
import { frameworkPackages as
|
|
5822
|
+
import { normalize as Ou } from "node:path";
|
|
5823
|
+
import { frameworkPackages as ju } from "storybook/internal/common";
|
|
5824
5824
|
|
|
5825
5825
|
// src/telemetry/package-json.ts
|
|
5826
|
-
import { readFile as
|
|
5827
|
-
import { join as
|
|
5826
|
+
import { readFile as Pu } from "node:fs/promises";
|
|
5827
|
+
import { join as Au } from "node:path";
|
|
5828
5828
|
var Fr = /* @__PURE__ */ i(async (t) => {
|
|
5829
5829
|
let e = Object.keys(t);
|
|
5830
5830
|
return Promise.all(e.map(Zt));
|
|
@@ -5840,17 +5840,17 @@ var Fr = /* @__PURE__ */ i(async (t) => {
|
|
|
5840
5840
|
}
|
|
5841
5841
|
}, "getActualPackageVersion"), Br = /* @__PURE__ */ i(async (t) => {
|
|
5842
5842
|
try {
|
|
5843
|
-
let e = N.resolve(
|
|
5843
|
+
let e = N.resolve(Au(t, "package.json"), {
|
|
5844
5844
|
paths: [process.cwd()]
|
|
5845
5845
|
});
|
|
5846
|
-
return JSON.parse(await
|
|
5846
|
+
return JSON.parse(await Pu(e, { encoding: "utf8" }));
|
|
5847
5847
|
} catch {
|
|
5848
5848
|
return null;
|
|
5849
5849
|
}
|
|
5850
5850
|
}, "getActualPackageJson");
|
|
5851
5851
|
|
|
5852
5852
|
// src/telemetry/get-framework-info.ts
|
|
5853
|
-
var
|
|
5853
|
+
var Ru = [
|
|
5854
5854
|
"html",
|
|
5855
5855
|
"react",
|
|
5856
5856
|
"svelte",
|
|
@@ -5861,8 +5861,8 @@ var Au = [
|
|
|
5861
5861
|
"web-components",
|
|
5862
5862
|
"angular",
|
|
5863
5863
|
"ember"
|
|
5864
|
-
],
|
|
5865
|
-
function
|
|
5864
|
+
], Nu = ["builder-webpack5", "builder-vite"];
|
|
5865
|
+
function Go(t, e) {
|
|
5866
5866
|
let { name: r = "", version: n, dependencies: s, devDependencies: o, peerDependencies: a } = t, c = {
|
|
5867
5867
|
// We include the framework itself because it may be a renderer too (e.g. angular)
|
|
5868
5868
|
[r]: n,
|
|
@@ -5872,12 +5872,12 @@ function Wo(t, e) {
|
|
|
5872
5872
|
};
|
|
5873
5873
|
return e.map((l) => `@storybook/${l}`).find((l) => c[l]);
|
|
5874
5874
|
}
|
|
5875
|
-
i(
|
|
5876
|
-
var
|
|
5877
|
-
let e =
|
|
5878
|
-
return Object.keys(
|
|
5875
|
+
i(Go, "findMatchingPackage");
|
|
5876
|
+
var Zu = /* @__PURE__ */ i((t) => {
|
|
5877
|
+
let e = Ou(t).replace(new RegExp(/\\/, "g"), "/");
|
|
5878
|
+
return Object.keys(ju).find((n) => e.endsWith(n)) || Re(t).replace(/.*node_modules[\\/]/, "");
|
|
5879
5879
|
}, "getFrameworkPackageName");
|
|
5880
|
-
async function
|
|
5880
|
+
async function zo(t) {
|
|
5881
5881
|
if (!t?.framework)
|
|
5882
5882
|
return {};
|
|
5883
5883
|
let e = typeof t.framework == "string" ? t.framework : t.framework?.name;
|
|
@@ -5886,7 +5886,7 @@ async function qo(t) {
|
|
|
5886
5886
|
let r = await Br(e);
|
|
5887
5887
|
if (!r)
|
|
5888
5888
|
return {};
|
|
5889
|
-
let n =
|
|
5889
|
+
let n = Go(r, Nu), s = Go(r, Ru), o = Zu(e), a = typeof t.framework == "object" ? t.framework.options : {};
|
|
5890
5890
|
return {
|
|
5891
5891
|
framework: {
|
|
5892
5892
|
name: o,
|
|
@@ -5896,10 +5896,10 @@ async function qo(t) {
|
|
|
5896
5896
|
renderer: s
|
|
5897
5897
|
};
|
|
5898
5898
|
}
|
|
5899
|
-
i(
|
|
5899
|
+
i(zo, "getFrameworkInfo");
|
|
5900
5900
|
|
|
5901
5901
|
// src/telemetry/get-has-router-package.ts
|
|
5902
|
-
var
|
|
5902
|
+
var Mu = /* @__PURE__ */ new Set([
|
|
5903
5903
|
"react-router",
|
|
5904
5904
|
"react-router-dom",
|
|
5905
5905
|
"remix",
|
|
@@ -5922,56 +5922,53 @@ var Ru = /* @__PURE__ */ new Set([
|
|
|
5922
5922
|
"nuxt",
|
|
5923
5923
|
"@sveltejs/kit"
|
|
5924
5924
|
]);
|
|
5925
|
-
function
|
|
5925
|
+
function Ko(t) {
|
|
5926
5926
|
return Object.keys(t?.dependencies ?? {}).some(
|
|
5927
|
-
(e) =>
|
|
5927
|
+
(e) => Mu.has(e)
|
|
5928
5928
|
);
|
|
5929
5929
|
}
|
|
5930
|
-
i(
|
|
5930
|
+
i(Ko, "getHasRouterPackage");
|
|
5931
5931
|
|
|
5932
5932
|
// src/telemetry/get-monorepo-type.ts
|
|
5933
|
-
import { existsSync as
|
|
5933
|
+
import { existsSync as Jo, readFileSync as Du } from "node:fs";
|
|
5934
5934
|
import { join as Wr } from "node:path";
|
|
5935
|
-
import { getProjectRoot as
|
|
5936
|
-
var
|
|
5935
|
+
import { getProjectRoot as qr } from "storybook/internal/common";
|
|
5936
|
+
var Ho = {
|
|
5937
5937
|
Nx: "nx.json",
|
|
5938
5938
|
Turborepo: "turbo.json",
|
|
5939
5939
|
Lerna: "lerna.json",
|
|
5940
5940
|
Rush: "rush.json",
|
|
5941
5941
|
Lage: "lage.config.json"
|
|
5942
|
-
},
|
|
5943
|
-
let
|
|
5944
|
-
|
|
5945
|
-
return;
|
|
5946
|
-
let r = Object.keys(Ko).find((s) => {
|
|
5947
|
-
let o = Wr(t, Ko[s]);
|
|
5948
|
-
return zo(o);
|
|
5942
|
+
}, Yo = /* @__PURE__ */ i(() => {
|
|
5943
|
+
let e = Object.keys(Ho).find((n) => {
|
|
5944
|
+
let s = Wr(qr(), Ho[n]);
|
|
5945
|
+
return Jo(s);
|
|
5949
5946
|
});
|
|
5950
|
-
if (
|
|
5951
|
-
return
|
|
5952
|
-
if (!
|
|
5947
|
+
if (e)
|
|
5948
|
+
return e;
|
|
5949
|
+
if (!Jo(Wr(qr(), "package.json")))
|
|
5953
5950
|
return;
|
|
5954
5951
|
if (JSON.parse(
|
|
5955
|
-
|
|
5952
|
+
Du(Wr(qr(), "package.json"), { encoding: "utf8" })
|
|
5956
5953
|
)?.workspaces)
|
|
5957
5954
|
return "Workspaces";
|
|
5958
5955
|
}, "getMonorepoType");
|
|
5959
5956
|
|
|
5960
5957
|
// src/telemetry/get-portable-stories-usage.ts
|
|
5961
|
-
var
|
|
5958
|
+
var Lu = /* @__PURE__ */ i(async (t) => {
|
|
5962
5959
|
try {
|
|
5963
5960
|
let e = "git grep -l composeStor" + (t ? ` -- ${t}` : "");
|
|
5964
5961
|
return await At(e);
|
|
5965
5962
|
} catch (e) {
|
|
5966
5963
|
return e.exitCode === 1 ? 0 : void 0;
|
|
5967
5964
|
}
|
|
5968
|
-
}, "getPortableStoriesFileCountUncached"),
|
|
5965
|
+
}, "getPortableStoriesFileCountUncached"), Xo = /* @__PURE__ */ i(async (t) => Nt(
|
|
5969
5966
|
"portableStories",
|
|
5970
|
-
async () =>
|
|
5967
|
+
async () => Lu(t)
|
|
5971
5968
|
), "getPortableStoriesFileCount");
|
|
5972
5969
|
|
|
5973
5970
|
// src/telemetry/storybook-metadata.ts
|
|
5974
|
-
var
|
|
5971
|
+
var Qo = {
|
|
5975
5972
|
next: "Next",
|
|
5976
5973
|
"react-scripts": "CRA",
|
|
5977
5974
|
gatsby: "Gatsby",
|
|
@@ -5979,34 +5976,35 @@ var Yo = {
|
|
|
5979
5976
|
"@nrwl/storybook": "nx",
|
|
5980
5977
|
"@vue/cli-service": "vue-cli",
|
|
5981
5978
|
"@sveltejs/kit": "sveltekit"
|
|
5982
|
-
},
|
|
5983
|
-
"").replace(/\/preset$/, ""), "sanitizeAddonName"),
|
|
5979
|
+
}, ei = /* @__PURE__ */ i((t) => Re(t).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
|
|
5980
|
+
"").replace(/\/preset$/, ""), "sanitizeAddonName"), Gu = /* @__PURE__ */ i(async ({
|
|
5984
5981
|
packageJsonPath: t,
|
|
5985
5982
|
packageJson: e,
|
|
5986
|
-
mainConfig: r
|
|
5983
|
+
mainConfig: r,
|
|
5984
|
+
configDir: n
|
|
5987
5985
|
}) => {
|
|
5988
|
-
let
|
|
5986
|
+
let s = await Wn(), o = {
|
|
5989
5987
|
generatedAt: (/* @__PURE__ */ new Date()).getTime(),
|
|
5990
|
-
userSince:
|
|
5988
|
+
userSince: s.value.userSince,
|
|
5991
5989
|
hasCustomBabel: !1,
|
|
5992
5990
|
hasCustomWebpack: !1,
|
|
5993
5991
|
hasStaticDirs: !1,
|
|
5994
5992
|
hasStorybookEslint: !1,
|
|
5995
5993
|
refCount: 0
|
|
5996
|
-
},
|
|
5994
|
+
}, a = {
|
|
5997
5995
|
...e?.dependencies,
|
|
5998
5996
|
...e?.devDependencies,
|
|
5999
5997
|
...e?.peerDependencies
|
|
6000
|
-
},
|
|
6001
|
-
if (
|
|
6002
|
-
let { version:
|
|
6003
|
-
|
|
6004
|
-
name:
|
|
6005
|
-
packageName:
|
|
6006
|
-
version:
|
|
5998
|
+
}, c = Object.keys(a).find((k) => !!Qo[k]);
|
|
5999
|
+
if (c) {
|
|
6000
|
+
let { version: k } = await Zt(c);
|
|
6001
|
+
o.metaFramework = {
|
|
6002
|
+
name: Qo[c],
|
|
6003
|
+
packageName: c,
|
|
6004
|
+
version: k
|
|
6007
6005
|
};
|
|
6008
6006
|
}
|
|
6009
|
-
let
|
|
6007
|
+
let l = [
|
|
6010
6008
|
"playwright",
|
|
6011
6009
|
"vitest",
|
|
6012
6010
|
"jest",
|
|
@@ -6025,171 +6023,176 @@ var Yo = {
|
|
|
6025
6023
|
"miragejs",
|
|
6026
6024
|
"sinon",
|
|
6027
6025
|
"chromatic"
|
|
6028
|
-
],
|
|
6029
|
-
(
|
|
6026
|
+
], p = Object.keys(a).filter(
|
|
6027
|
+
(k) => l.find((O) => k.includes(O))
|
|
6030
6028
|
);
|
|
6031
|
-
|
|
6029
|
+
o.testPackages = Object.fromEntries(
|
|
6032
6030
|
await Promise.all(
|
|
6033
|
-
|
|
6031
|
+
p.map(async (k) => [k, (await Zt(k))?.version])
|
|
6034
6032
|
)
|
|
6035
|
-
),
|
|
6036
|
-
let
|
|
6037
|
-
|
|
6033
|
+
), o.hasRouterPackage = Ko(e);
|
|
6034
|
+
let f = Yo();
|
|
6035
|
+
f && (o.monorepo = f);
|
|
6038
6036
|
try {
|
|
6039
|
-
let
|
|
6040
|
-
|
|
6041
|
-
type:
|
|
6042
|
-
version:
|
|
6043
|
-
agent:
|
|
6037
|
+
let k = await Gt({ cwd: $u() });
|
|
6038
|
+
k && (o.packageManager = {
|
|
6039
|
+
type: k.name,
|
|
6040
|
+
version: k.version,
|
|
6041
|
+
agent: k.agent
|
|
6044
6042
|
});
|
|
6045
6043
|
} catch {
|
|
6046
6044
|
}
|
|
6047
|
-
let
|
|
6045
|
+
let b = a.typescript ? "typescript" : "javascript";
|
|
6048
6046
|
if (!r)
|
|
6049
6047
|
return {
|
|
6050
|
-
...
|
|
6051
|
-
storybookVersionSpecifier:
|
|
6052
|
-
language:
|
|
6048
|
+
...o,
|
|
6049
|
+
storybookVersionSpecifier: Wu.storybook,
|
|
6050
|
+
language: b
|
|
6053
6051
|
};
|
|
6054
|
-
|
|
6052
|
+
o.hasCustomBabel = !!r.babel, o.hasCustomWebpack = !!r.webpackFinal, o.hasStaticDirs = !!r.staticDirs, typeof r.typescript == "object" && (o.
|
|
6055
6053
|
typescriptOptions = r.typescript);
|
|
6056
|
-
let
|
|
6057
|
-
typeof r.refs == "object" && (
|
|
6054
|
+
let w = await zo(r);
|
|
6055
|
+
typeof r.refs == "object" && (o.refCount = Object.keys(r.refs).length), typeof r.features == "object" && (o.features = r.features);
|
|
6058
6056
|
let _ = {};
|
|
6059
|
-
r.addons && r.addons.forEach((
|
|
6060
|
-
let
|
|
6061
|
-
typeof
|
|
6057
|
+
r.addons && r.addons.forEach((k) => {
|
|
6058
|
+
let O, Ye;
|
|
6059
|
+
typeof k == "string" ? O = ei(k) : (k.name.includes("addon-essentials") && (Ye = k.options), O = ei(k.name)), _[O] = {
|
|
6062
6060
|
options: Ye,
|
|
6063
6061
|
version: void 0
|
|
6064
6062
|
};
|
|
6065
6063
|
});
|
|
6066
|
-
let
|
|
6067
|
-
|
|
6064
|
+
let C = qo(e);
|
|
6065
|
+
C && (_.chromatic = {
|
|
6068
6066
|
version: void 0,
|
|
6069
|
-
versionSpecifier:
|
|
6067
|
+
versionSpecifier: C,
|
|
6070
6068
|
options: void 0
|
|
6071
|
-
}), (await Fr(_)).forEach(({ name:
|
|
6072
|
-
_[
|
|
6069
|
+
}), (await Fr(_)).forEach(({ name: k, version: O }) => {
|
|
6070
|
+
_[k].version = O;
|
|
6073
6071
|
});
|
|
6074
|
-
let
|
|
6075
|
-
...
|
|
6076
|
-
[
|
|
6072
|
+
let P = Object.keys(_), G = Object.keys(a).filter((k) => k.includes("storybook") && !P.includes(k)).reduce((k, O) => ({
|
|
6073
|
+
...k,
|
|
6074
|
+
[O]: { version: void 0 }
|
|
6077
6075
|
}), {});
|
|
6078
|
-
(await Fr(
|
|
6079
|
-
|
|
6076
|
+
(await Fr(G)).forEach(({ name: k, version: O }) => {
|
|
6077
|
+
G[k].version = O;
|
|
6080
6078
|
});
|
|
6081
|
-
let be = !!
|
|
6079
|
+
let be = !!a["eslint-plugin-storybook"], je = Fu(n);
|
|
6082
6080
|
try {
|
|
6083
|
-
let {
|
|
6084
|
-
if (
|
|
6085
|
-
let
|
|
6086
|
-
|
|
6081
|
+
let { previewConfigPath: k } = je;
|
|
6082
|
+
if (k) {
|
|
6083
|
+
let O = await qu(k), Ye = !!(O.getFieldNode(["globals"]) || O.getFieldNode(["globalTypes"]));
|
|
6084
|
+
o.preview = { ...o.preview, usesGlobals: Ye };
|
|
6087
6085
|
}
|
|
6088
6086
|
} catch {
|
|
6089
6087
|
}
|
|
6090
|
-
let Je = await
|
|
6088
|
+
let Je = await Xo(), He = await Wo(Uu(t));
|
|
6091
6089
|
return {
|
|
6092
|
-
...
|
|
6093
|
-
...
|
|
6090
|
+
...o,
|
|
6091
|
+
...w,
|
|
6094
6092
|
portableStoriesFileCount: Je,
|
|
6095
6093
|
applicationFileCount: He,
|
|
6096
6094
|
storybookVersion: nt,
|
|
6097
|
-
storybookVersionSpecifier:
|
|
6098
|
-
language:
|
|
6099
|
-
storybookPackages:
|
|
6095
|
+
storybookVersionSpecifier: je.version,
|
|
6096
|
+
language: b,
|
|
6097
|
+
storybookPackages: G,
|
|
6100
6098
|
addons: _,
|
|
6101
6099
|
hasStorybookEslint: be
|
|
6102
6100
|
};
|
|
6103
6101
|
}, "computeStorybookMetadata");
|
|
6104
|
-
async function
|
|
6102
|
+
async function zu() {
|
|
6105
6103
|
let t = await Ft(process.cwd());
|
|
6106
6104
|
return t ? {
|
|
6107
6105
|
packageJsonPath: t,
|
|
6108
|
-
packageJson: await
|
|
6106
|
+
packageJson: await ln(t) || {}
|
|
6109
6107
|
} : {
|
|
6110
6108
|
packageJsonPath: process.cwd(),
|
|
6111
6109
|
packageJson: {}
|
|
6112
6110
|
};
|
|
6113
6111
|
}
|
|
6114
|
-
i(
|
|
6115
|
-
var Mt,
|
|
6112
|
+
i(zu, "getPackageJsonDetails");
|
|
6113
|
+
var Mt, ti = /* @__PURE__ */ i(async (t) => {
|
|
6116
6114
|
if (Mt)
|
|
6117
6115
|
return Mt;
|
|
6118
|
-
let { packageJson: e, packageJsonPath: r } = await
|
|
6116
|
+
let { packageJson: e, packageJsonPath: r } = await zu(), n = (t || Vu(
|
|
6119
6117
|
String(e?.scripts?.storybook || ""),
|
|
6120
6118
|
"-c",
|
|
6121
6119
|
"--config-dir"
|
|
6122
|
-
)) ?? ".storybook", s = await
|
|
6120
|
+
)) ?? ".storybook", s = await Bu({ configDir: n }).catch(() => {
|
|
6123
6121
|
});
|
|
6124
|
-
return Mt = await
|
|
6122
|
+
return Mt = await Gu({
|
|
6123
|
+
mainConfig: s,
|
|
6124
|
+
packageJson: e,
|
|
6125
|
+
packageJsonPath: r,
|
|
6126
|
+
configDir: n
|
|
6127
|
+
}), Mt;
|
|
6125
6128
|
}, "getStorybookMetadata");
|
|
6126
6129
|
|
|
6127
6130
|
// src/telemetry/telemetry.ts
|
|
6128
|
-
var
|
|
6129
|
-
import * as
|
|
6131
|
+
var pi = z(ni(), 1);
|
|
6132
|
+
import * as li from "node:os";
|
|
6130
6133
|
|
|
6131
6134
|
// ../node_modules/nanoid/index.js
|
|
6132
|
-
import { randomFillSync as
|
|
6135
|
+
import { randomFillSync as oi } from "crypto";
|
|
6133
6136
|
|
|
6134
6137
|
// ../node_modules/nanoid/url-alphabet/index.js
|
|
6135
|
-
var
|
|
6138
|
+
var si = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
6136
6139
|
|
|
6137
6140
|
// ../node_modules/nanoid/index.js
|
|
6138
|
-
var
|
|
6139
|
-
!ge || ge.length < t ? (ge = Buffer.allocUnsafe(t *
|
|
6141
|
+
var Ku = 128, ge, Ae, Ju = /* @__PURE__ */ i((t) => {
|
|
6142
|
+
!ge || ge.length < t ? (ge = Buffer.allocUnsafe(t * Ku), oi(ge), Ae = 0) : Ae + t > ge.length && (oi(ge), Ae = 0), Ae += t;
|
|
6140
6143
|
}, "fillPool");
|
|
6141
6144
|
var ze = /* @__PURE__ */ i((t = 21) => {
|
|
6142
|
-
|
|
6145
|
+
Ju(t -= 0);
|
|
6143
6146
|
let e = "";
|
|
6144
|
-
for (let r =
|
|
6145
|
-
e +=
|
|
6147
|
+
for (let r = Ae - t; r < Ae; r++)
|
|
6148
|
+
e += si[ge[r] & 63];
|
|
6146
6149
|
return e;
|
|
6147
6150
|
}, "nanoid");
|
|
6148
6151
|
|
|
6149
6152
|
// src/telemetry/anonymous-id.ts
|
|
6150
|
-
|
|
6151
|
-
import { relative as
|
|
6152
|
-
import { getProjectRoot as
|
|
6153
|
-
import { execSync as
|
|
6153
|
+
So();
|
|
6154
|
+
import { relative as Yu } from "node:path";
|
|
6155
|
+
import { getProjectRoot as Xu } from "storybook/internal/common";
|
|
6156
|
+
import { execSync as Qu } from "child_process";
|
|
6154
6157
|
|
|
6155
6158
|
// src/telemetry/one-way-hash.ts
|
|
6156
|
-
import { createHash as
|
|
6157
|
-
var
|
|
6158
|
-
let e =
|
|
6159
|
+
import { createHash as Hu } from "crypto";
|
|
6160
|
+
var Gr = /* @__PURE__ */ i((t) => {
|
|
6161
|
+
let e = Hu("sha256");
|
|
6159
6162
|
return e.update("storybook-telemetry-salt"), e.update(t), e.digest("hex");
|
|
6160
6163
|
}, "oneWayHash");
|
|
6161
6164
|
|
|
6162
6165
|
// src/telemetry/anonymous-id.ts
|
|
6163
|
-
function
|
|
6166
|
+
function el(t) {
|
|
6164
6167
|
let n = t.trim().replace(/#.*$/, "").replace(/^.*@/, "").replace(/^.*\/\//, "");
|
|
6165
6168
|
return (n.endsWith(".git") ? n : `${n}.git`).replace(":", "/");
|
|
6166
6169
|
}
|
|
6167
|
-
i(
|
|
6168
|
-
function
|
|
6169
|
-
return `${
|
|
6170
|
+
i(el, "normalizeGitUrl");
|
|
6171
|
+
function tl(t, e) {
|
|
6172
|
+
return `${el(t)}${Mr(e)}`;
|
|
6170
6173
|
}
|
|
6171
|
-
i(
|
|
6172
|
-
var Lt,
|
|
6174
|
+
i(tl, "unhashedProjectId");
|
|
6175
|
+
var Lt, ii = /* @__PURE__ */ i(() => {
|
|
6173
6176
|
if (Lt)
|
|
6174
6177
|
return Lt;
|
|
6175
6178
|
try {
|
|
6176
|
-
let t =
|
|
6179
|
+
let t = Yu(Xu(), process.cwd()), e = Qu("git config --local --get remote.origin.url", {
|
|
6177
6180
|
timeout: 1e3,
|
|
6178
6181
|
stdio: "pipe"
|
|
6179
6182
|
});
|
|
6180
|
-
Lt =
|
|
6183
|
+
Lt = Gr(tl(String(e), t));
|
|
6181
6184
|
} catch {
|
|
6182
6185
|
}
|
|
6183
6186
|
return Lt;
|
|
6184
6187
|
}, "getAnonymousProjectId");
|
|
6185
6188
|
|
|
6186
6189
|
// src/telemetry/event-cache.ts
|
|
6187
|
-
import { cache as
|
|
6188
|
-
var
|
|
6189
|
-
let r = await
|
|
6190
|
-
r[t] = { body: e, timestamp: Date.now() }, await
|
|
6191
|
-
}, "setHelper"),
|
|
6192
|
-
var
|
|
6190
|
+
import { cache as Kr } from "storybook/internal/common";
|
|
6191
|
+
var zr = Promise.resolve(), rl = /* @__PURE__ */ i(async (t, e) => {
|
|
6192
|
+
let r = await Kr.get("lastEvents") || {};
|
|
6193
|
+
r[t] = { body: e, timestamp: Date.now() }, await Kr.set("lastEvents", r);
|
|
6194
|
+
}, "setHelper"), ci = /* @__PURE__ */ i(async (t, e) => (await zr, zr = rl(t, e), zr), "set");
|
|
6195
|
+
var nl = /* @__PURE__ */ i((t) => {
|
|
6193
6196
|
let { body: e, timestamp: r } = t;
|
|
6194
6197
|
return {
|
|
6195
6198
|
timestamp: r,
|
|
@@ -6197,51 +6200,51 @@ var tl = /* @__PURE__ */ i((t) => {
|
|
|
6197
6200
|
eventId: e?.eventId,
|
|
6198
6201
|
sessionId: e?.sessionId
|
|
6199
6202
|
};
|
|
6200
|
-
}, "upgradeFields"),
|
|
6203
|
+
}, "upgradeFields"), sl = ["init", "upgrade"], ol = ["build", "dev", "error"], ai = /* @__PURE__ */ i((t, e) => {
|
|
6201
6204
|
let r = e.map((n) => t?.[n]).filter(Boolean).sort((n, s) => s.timestamp - n.timestamp);
|
|
6202
6205
|
return r.length > 0 ? r[0] : void 0;
|
|
6203
|
-
}, "lastEvent"),
|
|
6204
|
-
let e = t || await
|
|
6206
|
+
}, "lastEvent"), il = /* @__PURE__ */ i(async (t = void 0) => {
|
|
6207
|
+
let e = t || await Kr.get("lastEvents") || {}, r = ai(e, sl), n = ai(e, ol);
|
|
6205
6208
|
if (r)
|
|
6206
|
-
return !n?.timestamp || r.timestamp > n.timestamp ?
|
|
6209
|
+
return !n?.timestamp || r.timestamp > n.timestamp ? nl(r) : void 0;
|
|
6207
6210
|
}, "getPrecedingUpgrade");
|
|
6208
6211
|
|
|
6209
6212
|
// src/telemetry/fetch.ts
|
|
6210
|
-
var
|
|
6213
|
+
var di = global.fetch;
|
|
6211
6214
|
|
|
6212
6215
|
// src/telemetry/session-id.ts
|
|
6213
|
-
import { cache as
|
|
6214
|
-
var
|
|
6215
|
-
var
|
|
6216
|
+
import { cache as ui } from "storybook/internal/common";
|
|
6217
|
+
var al = 1e3 * 60 * 60 * 2, Ke;
|
|
6218
|
+
var Jr = /* @__PURE__ */ i(async () => {
|
|
6216
6219
|
let t = Date.now();
|
|
6217
6220
|
if (!Ke) {
|
|
6218
|
-
let e = await
|
|
6219
|
-
e && e.lastUsed >= t -
|
|
6221
|
+
let e = await ui.get("session");
|
|
6222
|
+
e && e.lastUsed >= t - al ? Ke = e.id : Ke = ze();
|
|
6220
6223
|
}
|
|
6221
|
-
return await
|
|
6224
|
+
return await ui.set("session", { id: Ke, lastUsed: t }), Ke;
|
|
6222
6225
|
}, "getSessionId");
|
|
6223
6226
|
|
|
6224
6227
|
// src/telemetry/telemetry.ts
|
|
6225
|
-
var
|
|
6228
|
+
var cl = (0, pi.default)(di), dl = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Ut = [], ul = /* @__PURE__ */ i(
|
|
6226
6229
|
(t, e) => {
|
|
6227
|
-
|
|
6228
|
-
}, "addToGlobalContext"),
|
|
6230
|
+
Hr[t] = e;
|
|
6231
|
+
}, "addToGlobalContext"), ll = /* @__PURE__ */ i(() => {
|
|
6229
6232
|
try {
|
|
6230
|
-
let t =
|
|
6233
|
+
let t = li.platform();
|
|
6231
6234
|
return t === "win32" ? "Windows" : t === "darwin" ? "macOS" : t === "linux" ? "Linux" : `Other: ${t}`;
|
|
6232
6235
|
} catch {
|
|
6233
6236
|
return "Unknown";
|
|
6234
6237
|
}
|
|
6235
|
-
}, "getOperatingSystem"),
|
|
6238
|
+
}, "getOperatingSystem"), Hr = {
|
|
6236
6239
|
inCI: !!process.env.CI,
|
|
6237
6240
|
isTTY: process.stdout.isTTY,
|
|
6238
|
-
platform:
|
|
6241
|
+
platform: ll(),
|
|
6239
6242
|
nodeVersion: process.versions.node,
|
|
6240
6243
|
storybookVersion: nt
|
|
6241
|
-
},
|
|
6242
|
-
let { eventType: n, payload: s, metadata: o, ...a } = t, c = await
|
|
6244
|
+
}, pl = /* @__PURE__ */ i(async (t, e, r) => {
|
|
6245
|
+
let { eventType: n, payload: s, metadata: o, ...a } = t, c = await Jr(), l = ze(), p = { ...a, eventType: n, eventId: l, sessionId: c, metadata: o,
|
|
6243
6246
|
payload: s, context: e };
|
|
6244
|
-
return
|
|
6247
|
+
return cl(dl, {
|
|
6245
6248
|
method: "post",
|
|
6246
6249
|
body: JSON.stringify(p),
|
|
6247
6250
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6251,51 +6254,51 @@ var il = (0, ui.default)(ai), al = process.env.STORYBOOK_TELEMETRY_URL || "https
|
|
|
6251
6254
|
retryDelay")
|
|
6252
6255
|
});
|
|
6253
6256
|
}, "prepareRequest");
|
|
6254
|
-
async function
|
|
6255
|
-
let { eventType: r, payload: n, metadata: s, ...o } = t, a = e.stripMetadata ?
|
|
6256
|
-
...
|
|
6257
|
-
anonymousId:
|
|
6257
|
+
async function fi(t, e = { retryDelay: 1e3, immediate: !1 }) {
|
|
6258
|
+
let { eventType: r, payload: n, metadata: s, ...o } = t, a = e.stripMetadata ? Hr : {
|
|
6259
|
+
...Hr,
|
|
6260
|
+
anonymousId: ii()
|
|
6258
6261
|
}, c;
|
|
6259
6262
|
try {
|
|
6260
|
-
c =
|
|
6261
|
-
let l = await
|
|
6262
|
-
await
|
|
6263
|
+
c = pl(t, a, e), Ut.push(c), e.immediate ? await Promise.all(Ut) : await c;
|
|
6264
|
+
let l = await Jr(), p = ze(), f = { ...o, eventType: r, eventId: p, sessionId: l, metadata: s, payload: n, context: a };
|
|
6265
|
+
await ci(r, f);
|
|
6263
6266
|
} catch {
|
|
6264
6267
|
} finally {
|
|
6265
6268
|
Ut = Ut.filter((l) => l !== c);
|
|
6266
6269
|
}
|
|
6267
6270
|
}
|
|
6268
|
-
i(
|
|
6271
|
+
i(fi, "sendTelemetry");
|
|
6269
6272
|
|
|
6270
6273
|
// src/telemetry/index.ts
|
|
6271
|
-
var
|
|
6272
|
-
sExampleStoryId"),
|
|
6273
|
-
t !== "boot" && r.notify !== !1 && await
|
|
6274
|
+
var Ab = /* @__PURE__ */ i((t) => t.startsWith("example-button--") || t.startsWith("example-header--") || t.startsWith("example-page--"), "i\
|
|
6275
|
+
sExampleStoryId"), Ob = /* @__PURE__ */ i(async (t, e = {}, r = {}) => {
|
|
6276
|
+
t !== "boot" && r.notify !== !1 && await nn();
|
|
6274
6277
|
let n = {
|
|
6275
6278
|
eventType: t,
|
|
6276
6279
|
payload: e
|
|
6277
6280
|
};
|
|
6278
6281
|
try {
|
|
6279
|
-
r?.stripMetadata || (n.metadata = await
|
|
6282
|
+
r?.stripMetadata || (n.metadata = await ti(r?.configDir));
|
|
6280
6283
|
} catch (s) {
|
|
6281
6284
|
n.payload.metadataErrorMessage = tt(s).message, r?.enableCrashReports && (n.payload.metadataError = tt(s));
|
|
6282
6285
|
} finally {
|
|
6283
6286
|
let { error: s } = n.payload;
|
|
6284
|
-
s && (n.payload.error = tt(s)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (
|
|
6285
|
-
[telemetry]`),
|
|
6287
|
+
s && (n.payload.error = tt(s)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (mi.info(`
|
|
6288
|
+
[telemetry]`), mi.info(JSON.stringify(n, null, 2))), await fi(n, r));
|
|
6286
6289
|
}
|
|
6287
6290
|
}, "telemetry");
|
|
6288
6291
|
export {
|
|
6289
|
-
|
|
6292
|
+
ul as addToGlobalContext,
|
|
6290
6293
|
Re as cleanPaths,
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6294
|
+
Gu as computeStorybookMetadata,
|
|
6295
|
+
il as getPrecedingUpgrade,
|
|
6296
|
+
ti as getStorybookMetadata,
|
|
6297
|
+
Ab as isExampleStoryId,
|
|
6298
|
+
Qo as metaFrameworks,
|
|
6299
|
+
Gr as oneWayHash,
|
|
6300
|
+
on as removeAnsiEscapeCodes,
|
|
6301
|
+
ei as sanitizeAddonName,
|
|
6299
6302
|
tt as sanitizeError,
|
|
6300
|
-
|
|
6303
|
+
Ob as telemetry
|
|
6301
6304
|
};
|