storybook 9.1.0-alpha.5 → 9.1.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.cjs +62 -69
- package/dist/bin/index.js +43 -50
- package/dist/cli/bin/index.cjs +604 -604
- package/dist/cli/bin/index.js +151 -150
- package/dist/cli/index.cjs +13787 -13796
- package/dist/cli/index.d.ts +706 -15
- package/dist/cli/index.js +12363 -12371
- package/dist/common/index.cjs +13481 -13382
- package/dist/common/index.d.ts +341 -72
- package/dist/common/index.js +24018 -23916
- package/dist/components/index.cjs +5 -3
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +5 -3
- package/dist/controls/preview.cjs +14 -14
- package/dist/controls/preview.d.ts +1 -1
- package/dist/controls/preview.js +2 -2
- package/dist/core-server/index.cjs +4838 -4791
- package/dist/core-server/index.d.ts +10 -1
- package/dist/core-server/index.js +5746 -5699
- package/dist/core-server/presets/common-manager.js +46 -32
- package/dist/core-server/presets/common-preset.cjs +1047 -1045
- package/dist/core-server/presets/common-preset.js +2053 -2048
- package/dist/csf/index.d.ts +2 -1
- package/dist/csf-tools/index.cjs +226 -224
- package/dist/csf-tools/index.js +116 -112
- package/dist/manager/globals-runtime.js +6 -4
- package/dist/manager-api/index.cjs +73 -73
- package/dist/manager-api/index.js +140 -140
- package/dist/node-logger/index.cjs +8520 -994
- package/dist/node-logger/index.d.ts +395 -2
- package/dist/node-logger/index.js +8535 -995
- package/dist/server-errors.cjs +201 -242
- package/dist/server-errors.d.ts +1 -12
- package/dist/server-errors.js +182 -223
- package/dist/telemetry/index.cjs +1326 -1325
- package/dist/telemetry/index.d.ts +3 -2
- package/dist/telemetry/index.js +1217 -1214
- package/dist/types/index.d.ts +3 -3
- package/package.json +18 -9
package/dist/cli/bin/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var Wr = Object.getPrototypeOf,
|
|
7
|
-
var d = (s, e) =>
|
|
2
|
+
var Ur = Object.create;
|
|
3
|
+
var nt = Object.defineProperty;
|
|
4
|
+
var qr = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var Fr = Object.getOwnPropertyNames;
|
|
6
|
+
var Wr = Object.getPrototypeOf, Br = Object.prototype.hasOwnProperty;
|
|
7
|
+
var d = (s, e) => nt(s, "name", { value: e, configurable: !0 });
|
|
8
8
|
var O = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports);
|
|
9
|
-
var
|
|
9
|
+
var Hr = (s, e, t, r) => {
|
|
10
10
|
if (e && typeof e == "object" || typeof e == "function")
|
|
11
|
-
for (let i of
|
|
12
|
-
!
|
|
11
|
+
for (let i of Fr(e))
|
|
12
|
+
!Br.call(s, i) && i !== t && nt(s, i, { get: () => e[i], enumerable: !(r = qr(e, i)) || r.enumerable });
|
|
13
13
|
return s;
|
|
14
14
|
};
|
|
15
|
-
var
|
|
15
|
+
var Q = (s, e, t) => (t = s != null ? Ur(Wr(s)) : {}, Hr(
|
|
16
16
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
17
|
// file that has been converted to a CommonJS file using a Babel-
|
|
18
18
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
19
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
e || !s || !s.__esModule ?
|
|
20
|
+
e || !s || !s.__esModule ? nt(t, "default", { value: s, enumerable: !0 }) : t,
|
|
21
21
|
s
|
|
22
22
|
));
|
|
23
23
|
|
|
24
24
|
// ../node_modules/commander/lib/error.js
|
|
25
|
-
var
|
|
25
|
+
var Te = O((at) => {
|
|
26
26
|
var Ve = class extends Error {
|
|
27
27
|
static {
|
|
28
28
|
d(this, "CommanderError");
|
|
@@ -37,7 +37,7 @@ var Oe = O((dt) => {
|
|
|
37
37
|
super(r), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name, this.code = t, this.exitCode = e, this.nestedError =
|
|
38
38
|
void 0;
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, ot = class extends Ve {
|
|
41
41
|
static {
|
|
42
42
|
d(this, "InvalidArgumentError");
|
|
43
43
|
}
|
|
@@ -49,13 +49,13 @@ var Oe = O((dt) => {
|
|
|
49
49
|
super(1, "commander.invalidArgument", e), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name;
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
at.CommanderError = Ve;
|
|
53
|
+
at.InvalidArgumentError = ot;
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
// ../node_modules/commander/lib/argument.js
|
|
57
|
-
var De = O((
|
|
58
|
-
var { InvalidArgumentError:
|
|
57
|
+
var De = O((ct) => {
|
|
58
|
+
var { InvalidArgumentError: Kr } = Te(), dt = class {
|
|
59
59
|
static {
|
|
60
60
|
d(this, "Argument");
|
|
61
61
|
}
|
|
@@ -124,7 +124,7 @@ var De = O((ut) => {
|
|
|
124
124
|
choices(e) {
|
|
125
125
|
return this.argChoices = e.slice(), this.parseArg = (t, r) => {
|
|
126
126
|
if (!this.argChoices.includes(t))
|
|
127
|
-
throw new
|
|
127
|
+
throw new Kr(
|
|
128
128
|
`Allowed choices are ${this.argChoices.join(", ")}.`
|
|
129
129
|
);
|
|
130
130
|
return this.variadic ? this._concatValue(t, r) : t;
|
|
@@ -147,18 +147,18 @@ var De = O((ut) => {
|
|
|
147
147
|
return this.required = !1, this;
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
-
function
|
|
150
|
+
function zr(s) {
|
|
151
151
|
let e = s.name() + (s.variadic === !0 ? "..." : "");
|
|
152
152
|
return s.required ? "<" + e + ">" : "[" + e + "]";
|
|
153
153
|
}
|
|
154
|
-
d(
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
d(zr, "humanReadableArgName");
|
|
155
|
+
ct.Argument = dt;
|
|
156
|
+
ct.humanReadableArgName = zr;
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
// ../node_modules/commander/lib/help.js
|
|
160
|
-
var
|
|
161
|
-
var { humanReadableArgName:
|
|
160
|
+
var lt = O((Dt) => {
|
|
161
|
+
var { humanReadableArgName: Gr } = De(), ut = class {
|
|
162
162
|
static {
|
|
163
163
|
d(this, "Help");
|
|
164
164
|
}
|
|
@@ -239,7 +239,7 @@ var pt = O(($t) => {
|
|
|
239
239
|
* @returns {string}
|
|
240
240
|
*/
|
|
241
241
|
subcommandTerm(e) {
|
|
242
|
-
let t = e.registeredArguments.map((r) =>
|
|
242
|
+
let t = e.registeredArguments.map((r) => Gr(r)).join(" ");
|
|
243
243
|
return e._name + (e._aliases[0] ? "|" + e._aliases[0] : "") + (e.options.length ? " [options]" : "") + // simplistic check for non-help option
|
|
244
244
|
(t ? " " + t : "");
|
|
245
245
|
}
|
|
@@ -378,11 +378,11 @@ var pt = O(($t) => {
|
|
|
378
378
|
*/
|
|
379
379
|
formatHelp(e, t) {
|
|
380
380
|
let r = t.padWidth(e, t), i = t.helpWidth || 80, n = 2, o = 2;
|
|
381
|
-
function a(I,
|
|
382
|
-
if (
|
|
383
|
-
let
|
|
381
|
+
function a(I, H) {
|
|
382
|
+
if (H) {
|
|
383
|
+
let it = `${I.padEnd(r + o)}${H}`;
|
|
384
384
|
return t.wrap(
|
|
385
|
-
|
|
385
|
+
it,
|
|
386
386
|
i - n,
|
|
387
387
|
r + o
|
|
388
388
|
);
|
|
@@ -410,9 +410,9 @@ var pt = O(($t) => {
|
|
|
410
410
|
t.optionDescription(I)
|
|
411
411
|
));
|
|
412
412
|
if (k.length > 0 && (p = p.concat(["Options:", l(k), ""])), this.showGlobalOptions) {
|
|
413
|
-
let I = t.visibleGlobalOptions(e).map((
|
|
414
|
-
t.optionTerm(
|
|
415
|
-
t.optionDescription(
|
|
413
|
+
let I = t.visibleGlobalOptions(e).map((H) => a(
|
|
414
|
+
t.optionTerm(H),
|
|
415
|
+
t.optionDescription(H)
|
|
416
416
|
));
|
|
417
417
|
I.length > 0 && (p = p.concat([
|
|
418
418
|
"Global Options:",
|
|
@@ -465,17 +465,17 @@ var pt = O(($t) => {
|
|
|
465
465
|
|.{1,${a - 1}}([${k}]|$)|[^${k}]+?([${k}]|$)`,
|
|
466
466
|
"g"
|
|
467
467
|
), I = p.match(j) || [];
|
|
468
|
-
return l + I.map((
|
|
469
|
-
` ? "" : (
|
|
468
|
+
return l + I.map((H, it) => H === `
|
|
469
|
+
` ? "" : (it > 0 ? h : "") + H.trimEnd()).join(`
|
|
470
470
|
`);
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
|
-
|
|
473
|
+
Dt.Help = ut;
|
|
474
474
|
});
|
|
475
475
|
|
|
476
476
|
// ../node_modules/commander/lib/option.js
|
|
477
|
-
var
|
|
478
|
-
var { InvalidArgumentError:
|
|
477
|
+
var ft = O((mt) => {
|
|
478
|
+
var { InvalidArgumentError: Jr } = Te(), pt = class {
|
|
479
479
|
static {
|
|
480
480
|
d(this, "Option");
|
|
481
481
|
}
|
|
@@ -488,7 +488,7 @@ var gt = O((ft) => {
|
|
|
488
488
|
constructor(e, t) {
|
|
489
489
|
this.flags = e, this.description = t || "", this.required = e.includes("<"), this.optional = e.includes("["), this.variadic = /\w\.\.\.[>\]]$/.
|
|
490
490
|
test(e), this.mandatory = !1;
|
|
491
|
-
let r =
|
|
491
|
+
let r = Xr(e);
|
|
492
492
|
this.short = r.shortFlag, this.long = r.longFlag, this.negate = !1, this.long && (this.negate = this.long.startsWith("--no-")), this.defaultValue =
|
|
493
493
|
void 0, this.defaultValueDescription = void 0, this.presetArg = void 0, this.envVar = void 0, this.parseArg = void 0, this.hidden = !1,
|
|
494
494
|
this.argChoices = void 0, this.conflictsWith = [], this.implied = void 0;
|
|
@@ -602,7 +602,7 @@ var gt = O((ft) => {
|
|
|
602
602
|
choices(e) {
|
|
603
603
|
return this.argChoices = e.slice(), this.parseArg = (t, r) => {
|
|
604
604
|
if (!this.argChoices.includes(t))
|
|
605
|
-
throw new
|
|
605
|
+
throw new Jr(
|
|
606
606
|
`Allowed choices are ${this.argChoices.join(", ")}.`
|
|
607
607
|
);
|
|
608
608
|
return this.variadic ? this._concatValue(t, r) : t;
|
|
@@ -623,7 +623,7 @@ var gt = O((ft) => {
|
|
|
623
623
|
* @return {string}
|
|
624
624
|
*/
|
|
625
625
|
attributeName() {
|
|
626
|
-
return
|
|
626
|
+
return Yr(this.name().replace(/^no-/, ""));
|
|
627
627
|
}
|
|
628
628
|
/**
|
|
629
629
|
* Check if `arg` matches the short or long flag.
|
|
@@ -646,7 +646,7 @@ var gt = O((ft) => {
|
|
|
646
646
|
isBoolean() {
|
|
647
647
|
return !this.required && !this.optional && !this.negate;
|
|
648
648
|
}
|
|
649
|
-
},
|
|
649
|
+
}, ht = class {
|
|
650
650
|
static {
|
|
651
651
|
d(this, "DualOptions");
|
|
652
652
|
}
|
|
@@ -675,23 +675,23 @@ var gt = O((ft) => {
|
|
|
675
675
|
return t.negate === (n === e);
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
|
-
function
|
|
678
|
+
function Yr(s) {
|
|
679
679
|
return s.split("-").reduce((e, t) => e + t[0].toUpperCase() + t.slice(1));
|
|
680
680
|
}
|
|
681
|
-
d(
|
|
682
|
-
function
|
|
681
|
+
d(Yr, "camelcase");
|
|
682
|
+
function Xr(s) {
|
|
683
683
|
let e, t, r = s.split(/[ |,]+/);
|
|
684
684
|
return r.length > 1 && !/^[[<]/.test(r[1]) && (e = r.shift()), t = r.shift(), !e && /^-[^-]$/.test(t) && (e = t, t = void 0), { shortFlag: e,
|
|
685
685
|
longFlag: t };
|
|
686
686
|
}
|
|
687
|
-
d(
|
|
688
|
-
|
|
689
|
-
|
|
687
|
+
d(Xr, "splitOptionFlags");
|
|
688
|
+
mt.Option = pt;
|
|
689
|
+
mt.DualOptions = ht;
|
|
690
690
|
});
|
|
691
691
|
|
|
692
692
|
// ../node_modules/commander/lib/suggestSimilar.js
|
|
693
|
-
var
|
|
694
|
-
function
|
|
693
|
+
var Mt = O(($t) => {
|
|
694
|
+
function Qr(s, e) {
|
|
695
695
|
if (Math.abs(s.length - e.length) > 3)
|
|
696
696
|
return Math.max(s.length, e.length);
|
|
697
697
|
let t = [];
|
|
@@ -713,8 +713,8 @@ var Lt = O((Mt) => {
|
|
|
713
713
|
}
|
|
714
714
|
return t[s.length][e.length];
|
|
715
715
|
}
|
|
716
|
-
d(
|
|
717
|
-
function
|
|
716
|
+
d(Qr, "editDistance");
|
|
717
|
+
function es(s, e) {
|
|
718
718
|
if (!e || e.length === 0) return "";
|
|
719
719
|
e = Array.from(new Set(e));
|
|
720
720
|
let t = s.startsWith("--");
|
|
@@ -722,21 +722,21 @@ var Lt = O((Mt) => {
|
|
|
722
722
|
let r = [], i = 3, n = 0.4;
|
|
723
723
|
return e.forEach((o) => {
|
|
724
724
|
if (o.length <= 1) return;
|
|
725
|
-
let a =
|
|
725
|
+
let a = Qr(s, o), l = Math.max(s.length, o.length);
|
|
726
726
|
(l - a) / l > n && (a < i ? (i = a, r = [o]) : a === i && r.push(o));
|
|
727
727
|
}), r.sort((o, a) => o.localeCompare(a)), t && (r = r.map((o) => `--${o}`)), r.length > 1 ? `
|
|
728
728
|
(Did you mean one of ${r.join(", ")}?)` : r.length === 1 ? `
|
|
729
729
|
(Did you mean ${r[0]}?)` : "";
|
|
730
730
|
}
|
|
731
|
-
d(
|
|
732
|
-
|
|
731
|
+
d(es, "suggestSimilar");
|
|
732
|
+
$t.suggestSimilar = es;
|
|
733
733
|
});
|
|
734
734
|
|
|
735
735
|
// ../node_modules/commander/lib/command.js
|
|
736
|
-
var Wt = O((
|
|
737
|
-
var
|
|
738
|
-
{ Argument:
|
|
739
|
-
{ suggestSimilar:
|
|
736
|
+
var Wt = O((Ft) => {
|
|
737
|
+
var ts = require("node:events").EventEmitter, gt = require("node:child_process"), q = require("node:path"), yt = require("node:fs"), C = require("node:process"),
|
|
738
|
+
{ Argument: rs, humanReadableArgName: ss } = De(), { CommanderError: _t } = Te(), { Help: is } = lt(), { Option: Lt, DualOptions: ns } = ft(),
|
|
739
|
+
{ suggestSimilar: Ut } = Mt(), vt = class s extends ts {
|
|
740
740
|
static {
|
|
741
741
|
d(this, "Command");
|
|
742
742
|
}
|
|
@@ -837,7 +837,7 @@ var Wt = O((Bt) => {
|
|
|
837
837
|
* @return {Help}
|
|
838
838
|
*/
|
|
839
839
|
createHelp() {
|
|
840
|
-
return Object.assign(new
|
|
840
|
+
return Object.assign(new is(), this.configureHelp());
|
|
841
841
|
}
|
|
842
842
|
/**
|
|
843
843
|
* You can customise the help by overriding Help properties using configureHelp(),
|
|
@@ -915,7 +915,7 @@ var Wt = O((Bt) => {
|
|
|
915
915
|
* @return {Argument} new argument
|
|
916
916
|
*/
|
|
917
917
|
createArgument(e, t) {
|
|
918
|
-
return new
|
|
918
|
+
return new rs(e, t);
|
|
919
919
|
}
|
|
920
920
|
/**
|
|
921
921
|
* Define argument syntax for command.
|
|
@@ -1047,7 +1047,7 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
1047
1047
|
* @private
|
|
1048
1048
|
*/
|
|
1049
1049
|
_exit(e, t, r) {
|
|
1050
|
-
this._exitCallback && this._exitCallback(new
|
|
1050
|
+
this._exitCallback && this._exitCallback(new _t(e, t, r)), C.exit(e);
|
|
1051
1051
|
}
|
|
1052
1052
|
/**
|
|
1053
1053
|
* Register callback `fn` for the command.
|
|
@@ -1081,7 +1081,7 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
1081
1081
|
* @return {Option} new option
|
|
1082
1082
|
*/
|
|
1083
1083
|
createOption(e, t) {
|
|
1084
|
-
return new
|
|
1084
|
+
return new Lt(e, t);
|
|
1085
1085
|
}
|
|
1086
1086
|
/**
|
|
1087
1087
|
* Wrap parseArgs to catch 'commander.invalidArgument'.
|
|
@@ -1176,7 +1176,7 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
1176
1176
|
* @private
|
|
1177
1177
|
*/
|
|
1178
1178
|
_optionEx(e, t, r, i, n) {
|
|
1179
|
-
if (typeof t == "object" && t instanceof
|
|
1179
|
+
if (typeof t == "object" && t instanceof Lt)
|
|
1180
1180
|
throw new Error(
|
|
1181
1181
|
"To add an Option object use addOption() instead of option() or requiredOption()"
|
|
1182
1182
|
);
|
|
@@ -1467,11 +1467,11 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
1467
1467
|
t = t.slice();
|
|
1468
1468
|
let r = !1, i = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1469
1469
|
function n(h, y) {
|
|
1470
|
-
let k =
|
|
1471
|
-
if (
|
|
1472
|
-
if (i.includes(
|
|
1470
|
+
let k = q.resolve(h, y);
|
|
1471
|
+
if (yt.existsSync(k)) return k;
|
|
1472
|
+
if (i.includes(q.extname(y))) return;
|
|
1473
1473
|
let j = i.find(
|
|
1474
|
-
(I) =>
|
|
1474
|
+
(I) => yt.existsSync(`${k}${I}`)
|
|
1475
1475
|
);
|
|
1476
1476
|
if (j) return `${k}${j}`;
|
|
1477
1477
|
}
|
|
@@ -1480,21 +1480,21 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
1480
1480
|
if (this._scriptPath) {
|
|
1481
1481
|
let h;
|
|
1482
1482
|
try {
|
|
1483
|
-
h =
|
|
1483
|
+
h = yt.realpathSync(this._scriptPath);
|
|
1484
1484
|
} catch {
|
|
1485
1485
|
h = this._scriptPath;
|
|
1486
1486
|
}
|
|
1487
|
-
a =
|
|
1488
|
-
|
|
1487
|
+
a = q.resolve(
|
|
1488
|
+
q.dirname(h),
|
|
1489
1489
|
a
|
|
1490
1490
|
);
|
|
1491
1491
|
}
|
|
1492
1492
|
if (a) {
|
|
1493
1493
|
let h = n(a, o);
|
|
1494
1494
|
if (!h && !e._executableFile && this._scriptPath) {
|
|
1495
|
-
let y =
|
|
1495
|
+
let y = q.basename(
|
|
1496
1496
|
this._scriptPath,
|
|
1497
|
-
|
|
1497
|
+
q.extname(this._scriptPath)
|
|
1498
1498
|
);
|
|
1499
1499
|
y !== this._name && (h = n(
|
|
1500
1500
|
a,
|
|
@@ -1503,10 +1503,10 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
1503
1503
|
}
|
|
1504
1504
|
o = h || o;
|
|
1505
1505
|
}
|
|
1506
|
-
r = i.includes(
|
|
1506
|
+
r = i.includes(q.extname(o));
|
|
1507
1507
|
let l;
|
|
1508
|
-
C.platform !== "win32" ? r ? (t.unshift(o), t =
|
|
1509
|
-
o, t, { stdio: "inherit" }) : (t.unshift(o), t =
|
|
1508
|
+
C.platform !== "win32" ? r ? (t.unshift(o), t = qt(C.execArgv).concat(t), l = gt.spawn(C.argv[0], t, { stdio: "inherit" })) : l = gt.spawn(
|
|
1509
|
+
o, t, { stdio: "inherit" }) : (t.unshift(o), t = qt(C.execArgv).concat(t), l = gt.spawn(C.execPath, t, { stdio: "inherit" })), l.killed ||
|
|
1510
1510
|
["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((y) => {
|
|
1511
1511
|
C.on(y, () => {
|
|
1512
1512
|
l.killed === !1 && l.exitCode === null && l.kill(y);
|
|
@@ -1515,7 +1515,7 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
1515
1515
|
let p = this._exitCallback;
|
|
1516
1516
|
l.on("close", (h) => {
|
|
1517
1517
|
h = h ?? 1, p ? p(
|
|
1518
|
-
new
|
|
1518
|
+
new _t(
|
|
1519
1519
|
h,
|
|
1520
1520
|
"commander.executeSubCommandAsync",
|
|
1521
1521
|
"(close)"
|
|
@@ -1535,7 +1535,7 @@ cutableDir() to supply a custom directory", k = `'${o}' does not exist
|
|
|
1535
1535
|
if (!p)
|
|
1536
1536
|
C.exit(1);
|
|
1537
1537
|
else {
|
|
1538
|
-
let y = new
|
|
1538
|
+
let y = new _t(
|
|
1539
1539
|
1,
|
|
1540
1540
|
"commander.executeSubCommandAsync",
|
|
1541
1541
|
"(error)"
|
|
@@ -1914,7 +1914,7 @@ cutableDir() to supply a custom directory", k = `'${o}' does not exist
|
|
|
1914
1914
|
* @private
|
|
1915
1915
|
*/
|
|
1916
1916
|
_parseOptionsImplied() {
|
|
1917
|
-
let e = new
|
|
1917
|
+
let e = new ns(this.options), t = /* @__PURE__ */ d((r) => this.getOptionValue(r) !== void 0 && !["default", "implied"].includes(this.
|
|
1918
1918
|
getOptionValueSource(r)), "hasCustomOptionValue");
|
|
1919
1919
|
this.options.filter(
|
|
1920
1920
|
(r) => r.implied !== void 0 && t(r.attributeName()) && e.valueFromOption(
|
|
@@ -1997,7 +1997,7 @@ cutableDir() to supply a custom directory", k = `'${o}' does not exist
|
|
|
1997
1997
|
let o = n.createHelp().visibleOptions(n).filter((a) => a.long).map((a) => a.long);
|
|
1998
1998
|
i = i.concat(o), n = n.parent;
|
|
1999
1999
|
} while (n && !n._enablePositionalOptions);
|
|
2000
|
-
t =
|
|
2000
|
+
t = Ut(e, i);
|
|
2001
2001
|
}
|
|
2002
2002
|
let r = `error: unknown option '${e}'${t}`;
|
|
2003
2003
|
this.error(r, { code: "commander.unknownOption" });
|
|
@@ -2025,7 +2025,7 @@ cutableDir() to supply a custom directory", k = `'${o}' does not exist
|
|
|
2025
2025
|
let i = [];
|
|
2026
2026
|
this.createHelp().visibleCommands(this).forEach((n) => {
|
|
2027
2027
|
i.push(n.name()), n.alias() && i.push(n.alias());
|
|
2028
|
-
}), t =
|
|
2028
|
+
}), t = Ut(e, i);
|
|
2029
2029
|
}
|
|
2030
2030
|
let r = `error: unknown command '${e}'${t}`;
|
|
2031
2031
|
this.error(r, { code: "commander.unknownCommand" });
|
|
@@ -2113,7 +2113,7 @@ cutableDir() to supply a custom directory", k = `'${o}' does not exist
|
|
|
2113
2113
|
usage(e) {
|
|
2114
2114
|
if (e === void 0) {
|
|
2115
2115
|
if (this._usage) return this._usage;
|
|
2116
|
-
let t = this.registeredArguments.map((r) =>
|
|
2116
|
+
let t = this.registeredArguments.map((r) => ss(r));
|
|
2117
2117
|
return [].concat(
|
|
2118
2118
|
this.options.length || this._helpOption !== null ? "[options]" : [],
|
|
2119
2119
|
this.commands.length ? "[command]" : [],
|
|
@@ -2144,7 +2144,7 @@ cutableDir() to supply a custom directory", k = `'${o}' does not exist
|
|
|
2144
2144
|
* @return {Command}
|
|
2145
2145
|
*/
|
|
2146
2146
|
nameFromFilename(e) {
|
|
2147
|
-
return this._name =
|
|
2147
|
+
return this._name = q.basename(e, q.extname(e)), this;
|
|
2148
2148
|
}
|
|
2149
2149
|
/**
|
|
2150
2150
|
* Get or set the directory for searching for executable subcommands of this command.
|
|
@@ -2281,7 +2281,7 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
2281
2281
|
t && e.find((i) => t.is(i)) && (this.outputHelp(), this._exit(0, "commander.helpDisplayed", "(outputHelp)"));
|
|
2282
2282
|
}
|
|
2283
2283
|
};
|
|
2284
|
-
function
|
|
2284
|
+
function qt(s) {
|
|
2285
2285
|
return s.map((e) => {
|
|
2286
2286
|
if (!e.startsWith("--inspect"))
|
|
2287
2287
|
return e;
|
|
@@ -2291,57 +2291,57 @@ Expecting one of '${r.join("', '")}'`);
|
|
|
2291
2291
|
n[3], i = n[4]), t && i !== "0" ? `${t}=${r}:${parseInt(i) + 1}` : e;
|
|
2292
2292
|
});
|
|
2293
2293
|
}
|
|
2294
|
-
d(
|
|
2295
|
-
|
|
2294
|
+
d(qt, "incrementNodeInspectorPort");
|
|
2295
|
+
Ft.Command = vt;
|
|
2296
2296
|
});
|
|
2297
2297
|
|
|
2298
2298
|
// ../node_modules/commander/index.js
|
|
2299
|
-
var
|
|
2300
|
-
var { Argument:
|
|
2301
|
-
R.program = new
|
|
2302
|
-
R.createCommand = (s) => new
|
|
2303
|
-
R.createOption = (s, e) => new
|
|
2304
|
-
R.createArgument = (s, e) => new
|
|
2305
|
-
R.Command =
|
|
2306
|
-
R.Option =
|
|
2307
|
-
R.Argument =
|
|
2308
|
-
R.Help =
|
|
2309
|
-
R.CommanderError =
|
|
2310
|
-
R.InvalidArgumentError =
|
|
2311
|
-
R.InvalidOptionArgumentError =
|
|
2299
|
+
var zt = O((R) => {
|
|
2300
|
+
var { Argument: Bt } = De(), { Command: bt } = Wt(), { CommanderError: os, InvalidArgumentError: Ht } = Te(), { Help: as } = lt(), { Option: Kt } = ft();
|
|
2301
|
+
R.program = new bt();
|
|
2302
|
+
R.createCommand = (s) => new bt(s);
|
|
2303
|
+
R.createOption = (s, e) => new Kt(s, e);
|
|
2304
|
+
R.createArgument = (s, e) => new Bt(s, e);
|
|
2305
|
+
R.Command = bt;
|
|
2306
|
+
R.Option = Kt;
|
|
2307
|
+
R.Argument = Bt;
|
|
2308
|
+
R.Help = as;
|
|
2309
|
+
R.CommanderError = os;
|
|
2310
|
+
R.InvalidArgumentError = Ht;
|
|
2311
|
+
R.InvalidOptionArgumentError = Ht;
|
|
2312
2312
|
});
|
|
2313
2313
|
|
|
2314
2314
|
// ../node_modules/walk-up-path/dist/cjs/index.js
|
|
2315
|
-
var
|
|
2315
|
+
var Jt = O(($e) => {
|
|
2316
2316
|
"use strict";
|
|
2317
2317
|
Object.defineProperty($e, "__esModule", { value: !0 });
|
|
2318
2318
|
$e.walkUp = void 0;
|
|
2319
|
-
var
|
|
2320
|
-
for (s = (0,
|
|
2319
|
+
var Gt = require("path"), ds = /* @__PURE__ */ d(function* (s) {
|
|
2320
|
+
for (s = (0, Gt.resolve)(s); s; ) {
|
|
2321
2321
|
yield s;
|
|
2322
|
-
let e = (0,
|
|
2322
|
+
let e = (0, Gt.dirname)(s);
|
|
2323
2323
|
if (e === s)
|
|
2324
2324
|
break;
|
|
2325
2325
|
s = e;
|
|
2326
2326
|
}
|
|
2327
2327
|
}, "walkUp");
|
|
2328
|
-
$e.walkUp =
|
|
2328
|
+
$e.walkUp = ds;
|
|
2329
2329
|
});
|
|
2330
2330
|
|
|
2331
2331
|
// ../node_modules/picocolors/picocolors.js
|
|
2332
|
-
var
|
|
2333
|
-
var Ue = process || {},
|
|
2334
|
-
includes("--color") || Ue.platform === "win32" || (Ue.stdout || {}).isTTY && Le.TERM !== "dumb" || !!Le.CI),
|
|
2332
|
+
var sr = O((dn, kt) => {
|
|
2333
|
+
var Ue = process || {}, tr = Ue.argv || [], Le = Ue.env || {}, ls = !(Le.NO_COLOR || tr.includes("--no-color")) && (!!Le.FORCE_COLOR || tr.
|
|
2334
|
+
includes("--color") || Ue.platform === "win32" || (Ue.stdout || {}).isTTY && Le.TERM !== "dumb" || !!Le.CI), ps = /* @__PURE__ */ d((s, e, t = s) => (r) => {
|
|
2335
2335
|
let i = "" + r, n = i.indexOf(e, s.length);
|
|
2336
|
-
return ~n ? s +
|
|
2337
|
-
}, "formatter"),
|
|
2336
|
+
return ~n ? s + hs(i, e, t, n) + e : s + i + e;
|
|
2337
|
+
}, "formatter"), hs = /* @__PURE__ */ d((s, e, t, r) => {
|
|
2338
2338
|
let i = "", n = 0;
|
|
2339
2339
|
do
|
|
2340
2340
|
i += s.substring(n, r) + t, n = r + e.length, r = s.indexOf(e, n);
|
|
2341
2341
|
while (~r);
|
|
2342
2342
|
return i + s.substring(n);
|
|
2343
|
-
}, "replaceClose"),
|
|
2344
|
-
let e = s ?
|
|
2343
|
+
}, "replaceClose"), rr = /* @__PURE__ */ d((s = ls) => {
|
|
2344
|
+
let e = s ? ps : () => String;
|
|
2345
2345
|
return {
|
|
2346
2346
|
isColorSupported: s,
|
|
2347
2347
|
reset: e("\x1B[0m", "\x1B[0m"),
|
|
@@ -2387,16 +2387,16 @@ var ir = O((cn, Ct) => {
|
|
|
2387
2387
|
bgWhiteBright: e("\x1B[107m", "\x1B[49m")
|
|
2388
2388
|
};
|
|
2389
2389
|
}, "createColors");
|
|
2390
|
-
|
|
2391
|
-
|
|
2390
|
+
kt.exports = rr();
|
|
2391
|
+
kt.exports.createColors = rr;
|
|
2392
2392
|
});
|
|
2393
2393
|
|
|
2394
2394
|
// ../node_modules/ts-dedent/dist/index.js
|
|
2395
|
-
var
|
|
2395
|
+
var Ot = O((Ee) => {
|
|
2396
2396
|
"use strict";
|
|
2397
|
-
Object.defineProperty(
|
|
2398
|
-
|
|
2399
|
-
function
|
|
2397
|
+
Object.defineProperty(Ee, "__esModule", { value: !0 });
|
|
2398
|
+
Ee.dedent = void 0;
|
|
2399
|
+
function dr(s) {
|
|
2400
2400
|
for (var e = [], t = 1; t < arguments.length; t++)
|
|
2401
2401
|
e[t - 1] = arguments[t];
|
|
2402
2402
|
var r = Array.from(typeof s == "string" ? [s] : s);
|
|
@@ -2428,17 +2428,17 @@ var Tt = O((Te) => {
|
|
|
2428
2428
|
`)), o += y + r[l + 1];
|
|
2429
2429
|
}), o;
|
|
2430
2430
|
}
|
|
2431
|
-
d(
|
|
2432
|
-
|
|
2433
|
-
|
|
2431
|
+
d(dr, "dedent");
|
|
2432
|
+
Ee.dedent = dr;
|
|
2433
|
+
Ee.default = dr;
|
|
2434
2434
|
});
|
|
2435
2435
|
|
|
2436
2436
|
// ../node_modules/zod/lib/helpers/util.js
|
|
2437
|
-
var
|
|
2437
|
+
var Ae = O((w) => {
|
|
2438
2438
|
"use strict";
|
|
2439
2439
|
Object.defineProperty(w, "__esModule", { value: !0 });
|
|
2440
2440
|
w.getParsedType = w.ZodParsedType = w.objectUtil = w.util = void 0;
|
|
2441
|
-
var
|
|
2441
|
+
var Et;
|
|
2442
2442
|
(function(s) {
|
|
2443
2443
|
s.assertEqual = (i) => i;
|
|
2444
2444
|
function e(i) {
|
|
@@ -2474,16 +2474,16 @@ var Ee = O((w) => {
|
|
|
2474
2474
|
return i.map((o) => typeof o == "string" ? `'${o}'` : o).join(n);
|
|
2475
2475
|
}
|
|
2476
2476
|
d(r, "joinValues"), s.joinValues = r, s.jsonStringifyReplacer = (i, n) => typeof n == "bigint" ? n.toString() : n;
|
|
2477
|
-
})(
|
|
2478
|
-
var
|
|
2477
|
+
})(Et || (w.util = Et = {}));
|
|
2478
|
+
var lr;
|
|
2479
2479
|
(function(s) {
|
|
2480
2480
|
s.mergeShapes = (e, t) => ({
|
|
2481
2481
|
...e,
|
|
2482
2482
|
...t
|
|
2483
2483
|
// second overwrites first
|
|
2484
2484
|
});
|
|
2485
|
-
})(
|
|
2486
|
-
w.ZodParsedType =
|
|
2485
|
+
})(lr || (w.objectUtil = lr = {}));
|
|
2486
|
+
w.ZodParsedType = Et.arrayToEnum([
|
|
2487
2487
|
"string",
|
|
2488
2488
|
"nan",
|
|
2489
2489
|
"number",
|
|
@@ -2505,7 +2505,7 @@ var Ee = O((w) => {
|
|
|
2505
2505
|
"map",
|
|
2506
2506
|
"set"
|
|
2507
2507
|
]);
|
|
2508
|
-
var
|
|
2508
|
+
var ys = /* @__PURE__ */ d((s) => {
|
|
2509
2509
|
switch (typeof s) {
|
|
2510
2510
|
case "undefined":
|
|
2511
2511
|
return w.ZodParsedType.undefined;
|
|
@@ -2529,16 +2529,16 @@ u" && s instanceof Set ? w.ZodParsedType.set : typeof Date < "u" && s instanceof
|
|
|
2529
2529
|
return w.ZodParsedType.unknown;
|
|
2530
2530
|
}
|
|
2531
2531
|
}, "getParsedType");
|
|
2532
|
-
w.getParsedType =
|
|
2532
|
+
w.getParsedType = ys;
|
|
2533
2533
|
});
|
|
2534
2534
|
|
|
2535
2535
|
// ../node_modules/zod/lib/ZodError.js
|
|
2536
|
-
var
|
|
2536
|
+
var Be = O((G) => {
|
|
2537
2537
|
"use strict";
|
|
2538
|
-
Object.defineProperty(
|
|
2539
|
-
|
|
2540
|
-
var
|
|
2541
|
-
|
|
2538
|
+
Object.defineProperty(G, "__esModule", { value: !0 });
|
|
2539
|
+
G.ZodError = G.quotelessJson = G.ZodIssueCode = void 0;
|
|
2540
|
+
var pr = Ae();
|
|
2541
|
+
G.ZodIssueCode = pr.util.arrayToEnum([
|
|
2542
2542
|
"invalid_type",
|
|
2543
2543
|
"invalid_literal",
|
|
2544
2544
|
"custom",
|
|
@@ -2556,9 +2556,9 @@ var We = O((z) => {
|
|
|
2556
2556
|
"not_multiple_of",
|
|
2557
2557
|
"not_finite"
|
|
2558
2558
|
]);
|
|
2559
|
-
var
|
|
2560
|
-
|
|
2561
|
-
var
|
|
2559
|
+
var _s = /* @__PURE__ */ d((s) => JSON.stringify(s, null, 2).replace(/"([^"]+)":/g, "$1:"), "quotelessJson");
|
|
2560
|
+
G.quotelessJson = _s;
|
|
2561
|
+
var je = class s extends Error {
|
|
2562
2562
|
static {
|
|
2563
2563
|
d(this, "ZodError");
|
|
2564
2564
|
}
|
|
@@ -2606,7 +2606,7 @@ var We = O((z) => {
|
|
|
2606
2606
|
return this.message;
|
|
2607
2607
|
}
|
|
2608
2608
|
get message() {
|
|
2609
|
-
return JSON.stringify(this.issues,
|
|
2609
|
+
return JSON.stringify(this.issues, pr.util.jsonStringifyReplacer, 2);
|
|
2610
2610
|
}
|
|
2611
2611
|
get isEmpty() {
|
|
2612
2612
|
return this.issues.length === 0;
|
|
@@ -2621,34 +2621,34 @@ var We = O((z) => {
|
|
|
2621
2621
|
return this.flatten();
|
|
2622
2622
|
}
|
|
2623
2623
|
};
|
|
2624
|
-
|
|
2625
|
-
|
|
2624
|
+
G.ZodError = je;
|
|
2625
|
+
je.create = (s) => new je(s);
|
|
2626
2626
|
});
|
|
2627
2627
|
|
|
2628
2628
|
// ../node_modules/zod/lib/locales/en.js
|
|
2629
|
-
var
|
|
2629
|
+
var jt = O((At) => {
|
|
2630
2630
|
"use strict";
|
|
2631
|
-
Object.defineProperty(
|
|
2632
|
-
var
|
|
2631
|
+
Object.defineProperty(At, "__esModule", { value: !0 });
|
|
2632
|
+
var ee = Ae(), T = Be(), vs = /* @__PURE__ */ d((s, e) => {
|
|
2633
2633
|
let t;
|
|
2634
2634
|
switch (s.code) {
|
|
2635
2635
|
case T.ZodIssueCode.invalid_type:
|
|
2636
|
-
s.received ===
|
|
2636
|
+
s.received === ee.ZodParsedType.undefined ? t = "Required" : t = `Expected ${s.expected}, received ${s.received}`;
|
|
2637
2637
|
break;
|
|
2638
2638
|
case T.ZodIssueCode.invalid_literal:
|
|
2639
|
-
t = `Invalid literal value, expected ${JSON.stringify(s.expected,
|
|
2639
|
+
t = `Invalid literal value, expected ${JSON.stringify(s.expected, ee.util.jsonStringifyReplacer)}`;
|
|
2640
2640
|
break;
|
|
2641
2641
|
case T.ZodIssueCode.unrecognized_keys:
|
|
2642
|
-
t = `Unrecognized key(s) in object: ${
|
|
2642
|
+
t = `Unrecognized key(s) in object: ${ee.util.joinValues(s.keys, ", ")}`;
|
|
2643
2643
|
break;
|
|
2644
2644
|
case T.ZodIssueCode.invalid_union:
|
|
2645
2645
|
t = "Invalid input";
|
|
2646
2646
|
break;
|
|
2647
2647
|
case T.ZodIssueCode.invalid_union_discriminator:
|
|
2648
|
-
t = `Invalid discriminator value. Expected ${
|
|
2648
|
+
t = `Invalid discriminator value. Expected ${ee.util.joinValues(s.options)}`;
|
|
2649
2649
|
break;
|
|
2650
2650
|
case T.ZodIssueCode.invalid_enum_value:
|
|
2651
|
-
t = `Invalid enum value. Expected ${
|
|
2651
|
+
t = `Invalid enum value. Expected ${ee.util.joinValues(s.options)}, received '${s.received}'`;
|
|
2652
2652
|
break;
|
|
2653
2653
|
case T.ZodIssueCode.invalid_arguments:
|
|
2654
2654
|
t = "Invalid function arguments";
|
|
@@ -2663,8 +2663,8 @@ var St = O((jt) => {
|
|
|
2663
2663
|
typeof s.validation == "object" ? "includes" in s.validation ? (t = `Invalid input: must include "${s.validation.includes}"`, typeof s.
|
|
2664
2664
|
validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${s.validation.position}`)) : "start\
|
|
2665
2665
|
sWith" in s.validation ? t = `Invalid input: must start with "${s.validation.startsWith}"` : "endsWith" in s.validation ? t = `Invalid input\
|
|
2666
|
-
: must end with "${s.validation.endsWith}"` :
|
|
2667
|
-
"Invalid";
|
|
2666
|
+
: must end with "${s.validation.endsWith}"` : ee.util.assertNever(s.validation) : s.validation !== "regex" ? t = `Invalid ${s.validation}` :
|
|
2667
|
+
t = "Invalid";
|
|
2668
2668
|
break;
|
|
2669
2669
|
case T.ZodIssueCode.too_small:
|
|
2670
2670
|
s.type === "array" ? t = `Array must contain ${s.exact ? "exactly" : s.inclusive ? "at least" : "more than"} ${s.minimum} element(s)` :
|
|
@@ -2694,46 +2694,46 @@ ater than "}${new Date(Number(s.minimum))}` : t = "Invalid input";
|
|
|
2694
2694
|
t = "Number must be finite";
|
|
2695
2695
|
break;
|
|
2696
2696
|
default:
|
|
2697
|
-
t = e.defaultError,
|
|
2697
|
+
t = e.defaultError, ee.util.assertNever(s);
|
|
2698
2698
|
}
|
|
2699
2699
|
return { message: t };
|
|
2700
2700
|
}, "errorMap");
|
|
2701
|
-
|
|
2701
|
+
At.default = vs;
|
|
2702
2702
|
});
|
|
2703
2703
|
|
|
2704
2704
|
// ../node_modules/zod/lib/errors.js
|
|
2705
|
-
var He = O((
|
|
2705
|
+
var He = O((M) => {
|
|
2706
2706
|
"use strict";
|
|
2707
|
-
var
|
|
2707
|
+
var bs = M && M.__importDefault || function(s) {
|
|
2708
2708
|
return s && s.__esModule ? s : { default: s };
|
|
2709
2709
|
};
|
|
2710
|
-
Object.defineProperty(
|
|
2711
|
-
|
|
2712
|
-
var
|
|
2713
|
-
|
|
2714
|
-
var
|
|
2715
|
-
function
|
|
2716
|
-
|
|
2710
|
+
Object.defineProperty(M, "__esModule", { value: !0 });
|
|
2711
|
+
M.getErrorMap = M.setErrorMap = M.defaultErrorMap = void 0;
|
|
2712
|
+
var hr = bs(jt());
|
|
2713
|
+
M.defaultErrorMap = hr.default;
|
|
2714
|
+
var mr = hr.default;
|
|
2715
|
+
function xs(s) {
|
|
2716
|
+
mr = s;
|
|
2717
2717
|
}
|
|
2718
|
-
d(
|
|
2719
|
-
|
|
2720
|
-
function
|
|
2721
|
-
return
|
|
2718
|
+
d(xs, "setErrorMap");
|
|
2719
|
+
M.setErrorMap = xs;
|
|
2720
|
+
function ws() {
|
|
2721
|
+
return mr;
|
|
2722
2722
|
}
|
|
2723
|
-
d(
|
|
2724
|
-
|
|
2723
|
+
d(ws, "getErrorMap");
|
|
2724
|
+
M.getErrorMap = ws;
|
|
2725
2725
|
});
|
|
2726
2726
|
|
|
2727
2727
|
// ../node_modules/zod/lib/helpers/parseUtil.js
|
|
2728
|
-
var
|
|
2728
|
+
var Rt = O((x) => {
|
|
2729
2729
|
"use strict";
|
|
2730
|
-
var
|
|
2730
|
+
var ks = x && x.__importDefault || function(s) {
|
|
2731
2731
|
return s && s.__esModule ? s : { default: s };
|
|
2732
2732
|
};
|
|
2733
2733
|
Object.defineProperty(x, "__esModule", { value: !0 });
|
|
2734
2734
|
x.isAsync = x.isValid = x.isDirty = x.isAborted = x.OK = x.DIRTY = x.INVALID = x.ParseStatus = x.addIssueToContext = x.EMPTY_PATH = x.makeIssue =
|
|
2735
2735
|
void 0;
|
|
2736
|
-
var
|
|
2736
|
+
var Cs = He(), fr = ks(jt()), Is = /* @__PURE__ */ d((s) => {
|
|
2737
2737
|
let { data: e, path: t, errorMaps: r, issueData: i } = s, n = [...t, ...i.path || []], o = {
|
|
2738
2738
|
...i,
|
|
2739
2739
|
path: n
|
|
@@ -2753,10 +2753,10 @@ var Zt = O((x) => {
|
|
|
2753
2753
|
message: a
|
|
2754
2754
|
};
|
|
2755
2755
|
}, "makeIssue");
|
|
2756
|
-
x.makeIssue =
|
|
2756
|
+
x.makeIssue = Is;
|
|
2757
2757
|
x.EMPTY_PATH = [];
|
|
2758
|
-
function
|
|
2759
|
-
let t = (0,
|
|
2758
|
+
function Os(s, e) {
|
|
2759
|
+
let t = (0, Cs.getErrorMap)(), r = (0, x.makeIssue)({
|
|
2760
2760
|
issueData: e,
|
|
2761
2761
|
data: s.data,
|
|
2762
2762
|
path: s.path,
|
|
@@ -2767,15 +2767,15 @@ var Zt = O((x) => {
|
|
|
2767
2767
|
// then schema-bound map if available
|
|
2768
2768
|
t,
|
|
2769
2769
|
// then global override map
|
|
2770
|
-
t ===
|
|
2770
|
+
t === fr.default ? void 0 : fr.default
|
|
2771
2771
|
// then global default map
|
|
2772
2772
|
].filter((i) => !!i)
|
|
2773
2773
|
});
|
|
2774
2774
|
s.common.issues.push(r);
|
|
2775
2775
|
}
|
|
2776
|
-
d(
|
|
2777
|
-
x.addIssueToContext =
|
|
2778
|
-
var
|
|
2776
|
+
d(Os, "addIssueToContext");
|
|
2777
|
+
x.addIssueToContext = Os;
|
|
2778
|
+
var St = class s {
|
|
2779
2779
|
static {
|
|
2780
2780
|
d(this, "ParseStatus");
|
|
2781
2781
|
}
|
|
@@ -2820,56 +2820,56 @@ var Zt = O((x) => {
|
|
|
2820
2820
|
return { status: e.value, value: r };
|
|
2821
2821
|
}
|
|
2822
2822
|
};
|
|
2823
|
-
x.ParseStatus =
|
|
2823
|
+
x.ParseStatus = St;
|
|
2824
2824
|
x.INVALID = Object.freeze({
|
|
2825
2825
|
status: "aborted"
|
|
2826
2826
|
});
|
|
2827
|
-
var
|
|
2828
|
-
x.DIRTY =
|
|
2829
|
-
var
|
|
2830
|
-
x.OK =
|
|
2831
|
-
var
|
|
2832
|
-
x.isAborted =
|
|
2833
|
-
var
|
|
2834
|
-
x.isDirty =
|
|
2835
|
-
var
|
|
2836
|
-
x.isValid =
|
|
2837
|
-
var
|
|
2838
|
-
x.isAsync =
|
|
2827
|
+
var Ts = /* @__PURE__ */ d((s) => ({ status: "dirty", value: s }), "DIRTY");
|
|
2828
|
+
x.DIRTY = Ts;
|
|
2829
|
+
var Es = /* @__PURE__ */ d((s) => ({ status: "valid", value: s }), "OK");
|
|
2830
|
+
x.OK = Es;
|
|
2831
|
+
var As = /* @__PURE__ */ d((s) => s.status === "aborted", "isAborted");
|
|
2832
|
+
x.isAborted = As;
|
|
2833
|
+
var js = /* @__PURE__ */ d((s) => s.status === "dirty", "isDirty");
|
|
2834
|
+
x.isDirty = js;
|
|
2835
|
+
var Ss = /* @__PURE__ */ d((s) => s.status === "valid", "isValid");
|
|
2836
|
+
x.isValid = Ss;
|
|
2837
|
+
var Rs = /* @__PURE__ */ d((s) => typeof Promise < "u" && s instanceof Promise, "isAsync");
|
|
2838
|
+
x.isAsync = Rs;
|
|
2839
2839
|
});
|
|
2840
2840
|
|
|
2841
2841
|
// ../node_modules/zod/lib/helpers/typeAliases.js
|
|
2842
|
-
var
|
|
2842
|
+
var yr = O((gr) => {
|
|
2843
2843
|
"use strict";
|
|
2844
|
-
Object.defineProperty(
|
|
2844
|
+
Object.defineProperty(gr, "__esModule", { value: !0 });
|
|
2845
2845
|
});
|
|
2846
2846
|
|
|
2847
2847
|
// ../node_modules/zod/lib/helpers/errorUtil.js
|
|
2848
|
-
var
|
|
2848
|
+
var vr = O((Ke) => {
|
|
2849
2849
|
"use strict";
|
|
2850
2850
|
Object.defineProperty(Ke, "__esModule", { value: !0 });
|
|
2851
2851
|
Ke.errorUtil = void 0;
|
|
2852
|
-
var
|
|
2852
|
+
var _r;
|
|
2853
2853
|
(function(s) {
|
|
2854
2854
|
s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
2855
|
-
})(
|
|
2855
|
+
})(_r || (Ke.errorUtil = _r = {}));
|
|
2856
2856
|
});
|
|
2857
2857
|
|
|
2858
2858
|
// ../node_modules/zod/lib/types.js
|
|
2859
|
-
var
|
|
2859
|
+
var Rr = O((c) => {
|
|
2860
2860
|
"use strict";
|
|
2861
2861
|
var Ge = c && c.__classPrivateFieldGet || function(s, e, t, r) {
|
|
2862
2862
|
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
2863
2863
|
if (typeof e == "function" ? s !== e || !r : !e.has(s)) throw new TypeError("Cannot read private member from an object whose class did n\
|
|
2864
2864
|
ot declare it");
|
|
2865
2865
|
return t === "m" ? r : t === "a" ? r.call(s) : r ? r.value : e.get(s);
|
|
2866
|
-
},
|
|
2866
|
+
}, wr = c && c.__classPrivateFieldSet || function(s, e, t, r, i) {
|
|
2867
2867
|
if (r === "m") throw new TypeError("Private method is not writable");
|
|
2868
2868
|
if (r === "a" && !i) throw new TypeError("Private accessor was defined without a setter");
|
|
2869
2869
|
if (typeof e == "function" ? s !== e || !i : !e.has(s)) throw new TypeError("Cannot write private member to an object whose class did no\
|
|
2870
2870
|
t declare it");
|
|
2871
2871
|
return r === "a" ? i.call(s, t) : i ? i.value = t : e.set(s, t), t;
|
|
2872
|
-
},
|
|
2872
|
+
}, Se, Re;
|
|
2873
2873
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
2874
2874
|
c.boolean = c.bigint = c.array = c.any = c.coerce = c.ZodFirstPartyTypeKind = c.late = c.ZodSchema = c.Schema = c.custom = c.ZodReadonly =
|
|
2875
2875
|
c.ZodPipeline = c.ZodBranded = c.BRAND = c.ZodNaN = c.ZodCatch = c.ZodDefault = c.ZodNullable = c.ZodOptional = c.ZodTransformer = c.ZodEffects =
|
|
@@ -2880,7 +2880,7 @@ t declare it");
|
|
|
2880
2880
|
c.promise = c.preprocess = c.pipeline = c.ostring = c.optional = c.onumber = c.oboolean = c.object = c.number = c.nullable = c.null = c.never =
|
|
2881
2881
|
c.nativeEnum = c.nan = c.map = c.literal = c.lazy = c.intersection = c.instanceof = c.function = c.enum = c.effect = c.discriminatedUnion =
|
|
2882
2882
|
c.date = void 0;
|
|
2883
|
-
var ze = He(), g =
|
|
2883
|
+
var ze = He(), g = vr(), u = Rt(), f = Ae(), m = Be(), P = class {
|
|
2884
2884
|
static {
|
|
2885
2885
|
d(this, "ParseInputLazyPath");
|
|
2886
2886
|
}
|
|
@@ -2891,7 +2891,7 @@ t declare it");
|
|
|
2891
2891
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.
|
|
2892
2892
|
push(...this._path, this._key)), this._cachedPath;
|
|
2893
2893
|
}
|
|
2894
|
-
},
|
|
2894
|
+
}, br = /* @__PURE__ */ d((s, e) => {
|
|
2895
2895
|
if ((0, u.isValid)(e))
|
|
2896
2896
|
return { success: !0, data: e.value };
|
|
2897
2897
|
if (!s.common.issues.length)
|
|
@@ -2984,7 +2984,7 @@ t declare it");
|
|
|
2984
2984
|
data: e,
|
|
2985
2985
|
parsedType: (0, f.getParsedType)(e)
|
|
2986
2986
|
}, n = this._parseSync({ data: e, path: i.path, parent: i });
|
|
2987
|
-
return
|
|
2987
|
+
return br(i, n);
|
|
2988
2988
|
}
|
|
2989
2989
|
"~validate"(e) {
|
|
2990
2990
|
var t, r;
|
|
@@ -3039,7 +3039,7 @@ t declare it");
|
|
|
3039
3039
|
data: e,
|
|
3040
3040
|
parsedType: (0, f.getParsedType)(e)
|
|
3041
3041
|
}, i = this._parse({ data: e, path: r.path, parent: r }), n = await ((0, u.isAsync)(i) ? i : Promise.resolve(i));
|
|
3042
|
-
return
|
|
3042
|
+
return br(r, n);
|
|
3043
3043
|
}
|
|
3044
3044
|
refine(e, t) {
|
|
3045
3045
|
let r = /* @__PURE__ */ d((i) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(i) : t, "getIssu\
|
|
@@ -3083,7 +3083,7 @@ eProperties");
|
|
|
3083
3083
|
return Z.create(this, this._def);
|
|
3084
3084
|
}
|
|
3085
3085
|
nullable() {
|
|
3086
|
-
return
|
|
3086
|
+
return U.create(this, this._def);
|
|
3087
3087
|
}
|
|
3088
3088
|
nullish() {
|
|
3089
3089
|
return this.nullable().optional();
|
|
@@ -3092,13 +3092,13 @@ eProperties");
|
|
|
3092
3092
|
return B.create(this);
|
|
3093
3093
|
}
|
|
3094
3094
|
promise() {
|
|
3095
|
-
return
|
|
3095
|
+
return X.create(this, this._def);
|
|
3096
3096
|
}
|
|
3097
3097
|
or(e) {
|
|
3098
|
-
return
|
|
3098
|
+
return ae.create([this, e], this._def);
|
|
3099
3099
|
}
|
|
3100
3100
|
and(e) {
|
|
3101
|
-
return
|
|
3101
|
+
return de.create(this, e, this._def);
|
|
3102
3102
|
}
|
|
3103
3103
|
transform(e) {
|
|
3104
3104
|
return new S({
|
|
@@ -3110,7 +3110,7 @@ eProperties");
|
|
|
3110
3110
|
}
|
|
3111
3111
|
default(e) {
|
|
3112
3112
|
let t = typeof e == "function" ? e : () => e;
|
|
3113
|
-
return new
|
|
3113
|
+
return new he({
|
|
3114
3114
|
...v(this._def),
|
|
3115
3115
|
innerType: this,
|
|
3116
3116
|
defaultValue: t,
|
|
@@ -3118,7 +3118,7 @@ eProperties");
|
|
|
3118
3118
|
});
|
|
3119
3119
|
}
|
|
3120
3120
|
brand() {
|
|
3121
|
-
return new
|
|
3121
|
+
return new Ze({
|
|
3122
3122
|
typeName: _.ZodBranded,
|
|
3123
3123
|
type: this,
|
|
3124
3124
|
...v(this._def)
|
|
@@ -3126,7 +3126,7 @@ eProperties");
|
|
|
3126
3126
|
}
|
|
3127
3127
|
catch(e) {
|
|
3128
3128
|
let t = typeof e == "function" ? e : () => e;
|
|
3129
|
-
return new
|
|
3129
|
+
return new me({
|
|
3130
3130
|
...v(this._def),
|
|
3131
3131
|
innerType: this,
|
|
3132
3132
|
catchValue: t,
|
|
@@ -3141,10 +3141,10 @@ eProperties");
|
|
|
3141
3141
|
});
|
|
3142
3142
|
}
|
|
3143
3143
|
pipe(e) {
|
|
3144
|
-
return
|
|
3144
|
+
return Pe.create(this, e);
|
|
3145
3145
|
}
|
|
3146
3146
|
readonly() {
|
|
3147
|
-
return
|
|
3147
|
+
return fe.create(this);
|
|
3148
3148
|
}
|
|
3149
3149
|
isOptional() {
|
|
3150
3150
|
return this.safeParse(void 0).success;
|
|
@@ -3156,36 +3156,36 @@ eProperties");
|
|
|
3156
3156
|
c.ZodType = b;
|
|
3157
3157
|
c.Schema = b;
|
|
3158
3158
|
c.ZodSchema = b;
|
|
3159
|
-
var
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
onent})+$",
|
|
3159
|
+
var Zs = /^c[^\s-]{8,}$/i, Ps = /^[0-9a-z]+$/, Ns = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Vs = /^[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,
|
|
3160
|
+
Ds = /^[a-z0-9_-]{21}$/i, $s = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ms = /^[-+]?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)?)??$/,
|
|
3161
|
+
Ls = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Us = "^(\\p{Extended_Pictographic}|\\p{Emoji_Comp\
|
|
3162
|
+
onent})+$", Zt, qs = /^(?:(?: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])$/, Fs = /^(?:(?: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])$/,
|
|
3163
3163
|
Ws = /^(([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]))$/,
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",
|
|
3168
|
-
function
|
|
3164
|
+
Bs = /^(([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])$/,
|
|
3165
|
+
Hs = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ks = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
3166
|
+
kr = "((\\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\
|
|
3167
|
+
]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", zs = new RegExp(`^${kr}$`);
|
|
3168
|
+
function Cr(s) {
|
|
3169
3169
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
3170
3170
|
return s.precision ? e = `${e}\\.\\d{${s.precision}}` : s.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
3171
3171
|
}
|
|
3172
|
-
d(
|
|
3173
|
-
function
|
|
3174
|
-
return new RegExp(`^${
|
|
3172
|
+
d(Cr, "timeRegexSource");
|
|
3173
|
+
function Gs(s) {
|
|
3174
|
+
return new RegExp(`^${Cr(s)}$`);
|
|
3175
3175
|
}
|
|
3176
|
-
d(
|
|
3177
|
-
function
|
|
3178
|
-
let e = `${
|
|
3176
|
+
d(Gs, "timeRegex");
|
|
3177
|
+
function Ir(s) {
|
|
3178
|
+
let e = `${kr}T${Cr(s)}`, t = [];
|
|
3179
3179
|
return t.push(s.local ? "Z?" : "Z"), s.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
3180
3180
|
}
|
|
3181
|
-
d(
|
|
3182
|
-
c.datetimeRegex =
|
|
3183
|
-
function
|
|
3184
|
-
return !!((e === "v4" || !e) &&
|
|
3181
|
+
d(Ir, "datetimeRegex");
|
|
3182
|
+
c.datetimeRegex = Ir;
|
|
3183
|
+
function Js(s, e) {
|
|
3184
|
+
return !!((e === "v4" || !e) && qs.test(s) || (e === "v6" || !e) && Ws.test(s));
|
|
3185
3185
|
}
|
|
3186
|
-
d(
|
|
3187
|
-
function
|
|
3188
|
-
if (
|
|
3186
|
+
d(Js, "isValidIP");
|
|
3187
|
+
function Ys(s, e) {
|
|
3188
|
+
if (!$s.test(s))
|
|
3189
3189
|
return !1;
|
|
3190
3190
|
try {
|
|
3191
3191
|
let [t] = s.split("."), r = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), i = JSON.parse(atob(
|
|
@@ -3195,12 +3195,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3195
3195
|
return !1;
|
|
3196
3196
|
}
|
|
3197
3197
|
}
|
|
3198
|
-
d(
|
|
3199
|
-
function
|
|
3200
|
-
return !!((e === "v4" || !e) &&
|
|
3198
|
+
d(Ys, "isValidJWT");
|
|
3199
|
+
function Xs(s, e) {
|
|
3200
|
+
return !!((e === "v4" || !e) && Fs.test(s) || (e === "v6" || !e) && Bs.test(s));
|
|
3201
3201
|
}
|
|
3202
|
-
d(
|
|
3203
|
-
var
|
|
3202
|
+
d(Xs, "isValidCidr");
|
|
3203
|
+
var J = class s extends b {
|
|
3204
3204
|
static {
|
|
3205
3205
|
d(this, "ZodString");
|
|
3206
3206
|
}
|
|
@@ -3251,43 +3251,43 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3251
3251
|
message: n.message
|
|
3252
3252
|
}), r.dirty());
|
|
3253
3253
|
} else if (n.kind === "email")
|
|
3254
|
-
|
|
3254
|
+
Ls.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3255
3255
|
validation: "email",
|
|
3256
3256
|
code: m.ZodIssueCode.invalid_string,
|
|
3257
3257
|
message: n.message
|
|
3258
3258
|
}), r.dirty());
|
|
3259
3259
|
else if (n.kind === "emoji")
|
|
3260
|
-
|
|
3260
|
+
Zt || (Zt = new RegExp(Us, "u")), Zt.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3261
3261
|
validation: "emoji",
|
|
3262
3262
|
code: m.ZodIssueCode.invalid_string,
|
|
3263
3263
|
message: n.message
|
|
3264
3264
|
}), r.dirty());
|
|
3265
3265
|
else if (n.kind === "uuid")
|
|
3266
|
-
|
|
3266
|
+
Vs.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3267
3267
|
validation: "uuid",
|
|
3268
3268
|
code: m.ZodIssueCode.invalid_string,
|
|
3269
3269
|
message: n.message
|
|
3270
3270
|
}), r.dirty());
|
|
3271
3271
|
else if (n.kind === "nanoid")
|
|
3272
|
-
|
|
3272
|
+
Ds.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3273
3273
|
validation: "nanoid",
|
|
3274
3274
|
code: m.ZodIssueCode.invalid_string,
|
|
3275
3275
|
message: n.message
|
|
3276
3276
|
}), r.dirty());
|
|
3277
3277
|
else if (n.kind === "cuid")
|
|
3278
|
-
|
|
3278
|
+
Zs.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3279
3279
|
validation: "cuid",
|
|
3280
3280
|
code: m.ZodIssueCode.invalid_string,
|
|
3281
3281
|
message: n.message
|
|
3282
3282
|
}), r.dirty());
|
|
3283
3283
|
else if (n.kind === "cuid2")
|
|
3284
|
-
|
|
3284
|
+
Ps.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3285
3285
|
validation: "cuid2",
|
|
3286
3286
|
code: m.ZodIssueCode.invalid_string,
|
|
3287
3287
|
message: n.message
|
|
3288
3288
|
}), r.dirty());
|
|
3289
3289
|
else if (n.kind === "ulid")
|
|
3290
|
-
|
|
3290
|
+
Ns.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3291
3291
|
validation: "ulid",
|
|
3292
3292
|
code: m.ZodIssueCode.invalid_string,
|
|
3293
3293
|
message: n.message
|
|
@@ -3321,39 +3321,39 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3321
3321
|
code: m.ZodIssueCode.invalid_string,
|
|
3322
3322
|
validation: { endsWith: n.value },
|
|
3323
3323
|
message: n.message
|
|
3324
|
-
}), r.dirty()) : n.kind === "datetime" ?
|
|
3324
|
+
}), r.dirty()) : n.kind === "datetime" ? Ir(n).test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3325
3325
|
code: m.ZodIssueCode.invalid_string,
|
|
3326
3326
|
validation: "datetime",
|
|
3327
3327
|
message: n.message
|
|
3328
|
-
}), r.dirty()) : n.kind === "date" ?
|
|
3328
|
+
}), r.dirty()) : n.kind === "date" ? zs.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3329
3329
|
code: m.ZodIssueCode.invalid_string,
|
|
3330
3330
|
validation: "date",
|
|
3331
3331
|
message: n.message
|
|
3332
|
-
}), r.dirty()) : n.kind === "time" ?
|
|
3332
|
+
}), r.dirty()) : n.kind === "time" ? Gs(n).test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3333
3333
|
code: m.ZodIssueCode.invalid_string,
|
|
3334
3334
|
validation: "time",
|
|
3335
3335
|
message: n.message
|
|
3336
|
-
}), r.dirty()) : n.kind === "duration" ?
|
|
3336
|
+
}), r.dirty()) : n.kind === "duration" ? Ms.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3337
3337
|
validation: "duration",
|
|
3338
3338
|
code: m.ZodIssueCode.invalid_string,
|
|
3339
3339
|
message: n.message
|
|
3340
|
-
}), r.dirty()) : n.kind === "ip" ?
|
|
3340
|
+
}), r.dirty()) : n.kind === "ip" ? Js(e.data, n.version) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3341
3341
|
validation: "ip",
|
|
3342
3342
|
code: m.ZodIssueCode.invalid_string,
|
|
3343
3343
|
message: n.message
|
|
3344
|
-
}), r.dirty()) : n.kind === "jwt" ?
|
|
3344
|
+
}), r.dirty()) : n.kind === "jwt" ? Ys(e.data, n.alg) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3345
3345
|
validation: "jwt",
|
|
3346
3346
|
code: m.ZodIssueCode.invalid_string,
|
|
3347
3347
|
message: n.message
|
|
3348
|
-
}), r.dirty()) : n.kind === "cidr" ?
|
|
3348
|
+
}), r.dirty()) : n.kind === "cidr" ? Xs(e.data, n.version) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3349
3349
|
validation: "cidr",
|
|
3350
3350
|
code: m.ZodIssueCode.invalid_string,
|
|
3351
3351
|
message: n.message
|
|
3352
|
-
}), r.dirty()) : n.kind === "base64" ?
|
|
3352
|
+
}), r.dirty()) : n.kind === "base64" ? Hs.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3353
3353
|
validation: "base64",
|
|
3354
3354
|
code: m.ZodIssueCode.invalid_string,
|
|
3355
3355
|
message: n.message
|
|
3356
|
-
}), r.dirty()) : n.kind === "base64url" ?
|
|
3356
|
+
}), r.dirty()) : n.kind === "base64url" ? Ks.test(e.data) || (i = this._getOrReturnCtx(e, i), (0, u.addIssueToContext)(i, {
|
|
3357
3357
|
validation: "base64url",
|
|
3358
3358
|
code: m.ZodIssueCode.invalid_string,
|
|
3359
3359
|
message: n.message
|
|
@@ -3583,23 +3583,23 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3583
3583
|
return e;
|
|
3584
3584
|
}
|
|
3585
3585
|
};
|
|
3586
|
-
c.ZodString =
|
|
3587
|
-
|
|
3586
|
+
c.ZodString = J;
|
|
3587
|
+
J.create = (s) => {
|
|
3588
3588
|
var e;
|
|
3589
|
-
return new
|
|
3589
|
+
return new J({
|
|
3590
3590
|
checks: [],
|
|
3591
3591
|
typeName: _.ZodString,
|
|
3592
3592
|
coerce: (e = s?.coerce) !== null && e !== void 0 ? e : !1,
|
|
3593
3593
|
...v(s)
|
|
3594
3594
|
});
|
|
3595
3595
|
};
|
|
3596
|
-
function
|
|
3596
|
+
function Qs(s, e) {
|
|
3597
3597
|
let t = (s.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, i = t > r ? t : r, n = parseInt(s.toFixed(
|
|
3598
3598
|
i).replace(".", "")), o = parseInt(e.toFixed(i).replace(".", ""));
|
|
3599
3599
|
return n % o / Math.pow(10, i);
|
|
3600
3600
|
}
|
|
3601
|
-
d(
|
|
3602
|
-
var
|
|
3601
|
+
d(Qs, "floatSafeRemainder");
|
|
3602
|
+
var te = class s extends b {
|
|
3603
3603
|
static {
|
|
3604
3604
|
d(this, "ZodNumber");
|
|
3605
3605
|
}
|
|
@@ -3638,7 +3638,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3638
3638
|
inclusive: n.inclusive,
|
|
3639
3639
|
exact: !1,
|
|
3640
3640
|
message: n.message
|
|
3641
|
-
}), i.dirty()) : n.kind === "multipleOf" ?
|
|
3641
|
+
}), i.dirty()) : n.kind === "multipleOf" ? Qs(e.data, n.value) !== 0 && (r = this._getOrReturnCtx(e, r), (0, u.addIssueToContext)(r,
|
|
3642
3642
|
{
|
|
3643
3643
|
code: m.ZodIssueCode.not_multiple_of,
|
|
3644
3644
|
multipleOf: n.value,
|
|
@@ -3770,14 +3770,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3770
3770
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
3771
3771
|
}
|
|
3772
3772
|
};
|
|
3773
|
-
c.ZodNumber =
|
|
3774
|
-
|
|
3773
|
+
c.ZodNumber = te;
|
|
3774
|
+
te.create = (s) => new te({
|
|
3775
3775
|
checks: [],
|
|
3776
3776
|
typeName: _.ZodNumber,
|
|
3777
3777
|
coerce: s?.coerce || !1,
|
|
3778
3778
|
...v(s)
|
|
3779
3779
|
});
|
|
3780
|
-
var
|
|
3780
|
+
var re = class s extends b {
|
|
3781
3781
|
static {
|
|
3782
3782
|
d(this, "ZodBigInt");
|
|
3783
3783
|
}
|
|
@@ -3909,17 +3909,17 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3909
3909
|
return e;
|
|
3910
3910
|
}
|
|
3911
3911
|
};
|
|
3912
|
-
c.ZodBigInt =
|
|
3913
|
-
|
|
3912
|
+
c.ZodBigInt = re;
|
|
3913
|
+
re.create = (s) => {
|
|
3914
3914
|
var e;
|
|
3915
|
-
return new
|
|
3915
|
+
return new re({
|
|
3916
3916
|
checks: [],
|
|
3917
3917
|
typeName: _.ZodBigInt,
|
|
3918
3918
|
coerce: (e = s?.coerce) !== null && e !== void 0 ? e : !1,
|
|
3919
3919
|
...v(s)
|
|
3920
3920
|
});
|
|
3921
3921
|
};
|
|
3922
|
-
var
|
|
3922
|
+
var se = class extends b {
|
|
3923
3923
|
static {
|
|
3924
3924
|
d(this, "ZodBoolean");
|
|
3925
3925
|
}
|
|
@@ -3935,13 +3935,13 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
3935
3935
|
return (0, u.OK)(e.data);
|
|
3936
3936
|
}
|
|
3937
3937
|
};
|
|
3938
|
-
c.ZodBoolean =
|
|
3939
|
-
|
|
3938
|
+
c.ZodBoolean = se;
|
|
3939
|
+
se.create = (s) => new se({
|
|
3940
3940
|
typeName: _.ZodBoolean,
|
|
3941
3941
|
coerce: s?.coerce || !1,
|
|
3942
3942
|
...v(s)
|
|
3943
3943
|
});
|
|
3944
|
-
var
|
|
3944
|
+
var ie = class s extends b {
|
|
3945
3945
|
static {
|
|
3946
3946
|
d(this, "ZodDate");
|
|
3947
3947
|
}
|
|
@@ -4015,14 +4015,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4015
4015
|
return e != null ? new Date(e) : null;
|
|
4016
4016
|
}
|
|
4017
4017
|
};
|
|
4018
|
-
c.ZodDate =
|
|
4019
|
-
|
|
4018
|
+
c.ZodDate = ie;
|
|
4019
|
+
ie.create = (s) => new ie({
|
|
4020
4020
|
checks: [],
|
|
4021
4021
|
coerce: s?.coerce || !1,
|
|
4022
4022
|
typeName: _.ZodDate,
|
|
4023
4023
|
...v(s)
|
|
4024
4024
|
});
|
|
4025
|
-
var
|
|
4025
|
+
var _e = class extends b {
|
|
4026
4026
|
static {
|
|
4027
4027
|
d(this, "ZodSymbol");
|
|
4028
4028
|
}
|
|
@@ -4038,12 +4038,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4038
4038
|
return (0, u.OK)(e.data);
|
|
4039
4039
|
}
|
|
4040
4040
|
};
|
|
4041
|
-
c.ZodSymbol =
|
|
4042
|
-
|
|
4041
|
+
c.ZodSymbol = _e;
|
|
4042
|
+
_e.create = (s) => new _e({
|
|
4043
4043
|
typeName: _.ZodSymbol,
|
|
4044
4044
|
...v(s)
|
|
4045
4045
|
});
|
|
4046
|
-
var
|
|
4046
|
+
var ne = class extends b {
|
|
4047
4047
|
static {
|
|
4048
4048
|
d(this, "ZodUndefined");
|
|
4049
4049
|
}
|
|
@@ -4059,12 +4059,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4059
4059
|
return (0, u.OK)(e.data);
|
|
4060
4060
|
}
|
|
4061
4061
|
};
|
|
4062
|
-
c.ZodUndefined =
|
|
4063
|
-
|
|
4062
|
+
c.ZodUndefined = ne;
|
|
4063
|
+
ne.create = (s) => new ne({
|
|
4064
4064
|
typeName: _.ZodUndefined,
|
|
4065
4065
|
...v(s)
|
|
4066
4066
|
});
|
|
4067
|
-
var
|
|
4067
|
+
var oe = class extends b {
|
|
4068
4068
|
static {
|
|
4069
4069
|
d(this, "ZodNull");
|
|
4070
4070
|
}
|
|
@@ -4080,12 +4080,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4080
4080
|
return (0, u.OK)(e.data);
|
|
4081
4081
|
}
|
|
4082
4082
|
};
|
|
4083
|
-
c.ZodNull =
|
|
4084
|
-
|
|
4083
|
+
c.ZodNull = oe;
|
|
4084
|
+
oe.create = (s) => new oe({
|
|
4085
4085
|
typeName: _.ZodNull,
|
|
4086
4086
|
...v(s)
|
|
4087
4087
|
});
|
|
4088
|
-
var
|
|
4088
|
+
var Y = class extends b {
|
|
4089
4089
|
static {
|
|
4090
4090
|
d(this, "ZodAny");
|
|
4091
4091
|
}
|
|
@@ -4096,12 +4096,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4096
4096
|
return (0, u.OK)(e.data);
|
|
4097
4097
|
}
|
|
4098
4098
|
};
|
|
4099
|
-
c.ZodAny =
|
|
4100
|
-
|
|
4099
|
+
c.ZodAny = Y;
|
|
4100
|
+
Y.create = (s) => new Y({
|
|
4101
4101
|
typeName: _.ZodAny,
|
|
4102
4102
|
...v(s)
|
|
4103
4103
|
});
|
|
4104
|
-
var
|
|
4104
|
+
var W = class extends b {
|
|
4105
4105
|
static {
|
|
4106
4106
|
d(this, "ZodUnknown");
|
|
4107
4107
|
}
|
|
@@ -4112,12 +4112,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4112
4112
|
return (0, u.OK)(e.data);
|
|
4113
4113
|
}
|
|
4114
4114
|
};
|
|
4115
|
-
c.ZodUnknown =
|
|
4116
|
-
|
|
4115
|
+
c.ZodUnknown = W;
|
|
4116
|
+
W.create = (s) => new W({
|
|
4117
4117
|
typeName: _.ZodUnknown,
|
|
4118
4118
|
...v(s)
|
|
4119
4119
|
});
|
|
4120
|
-
var
|
|
4120
|
+
var D = class extends b {
|
|
4121
4121
|
static {
|
|
4122
4122
|
d(this, "ZodNever");
|
|
4123
4123
|
}
|
|
@@ -4130,12 +4130,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4130
4130
|
}), u.INVALID;
|
|
4131
4131
|
}
|
|
4132
4132
|
};
|
|
4133
|
-
c.ZodNever =
|
|
4134
|
-
|
|
4133
|
+
c.ZodNever = D;
|
|
4134
|
+
D.create = (s) => new D({
|
|
4135
4135
|
typeName: _.ZodNever,
|
|
4136
4136
|
...v(s)
|
|
4137
4137
|
});
|
|
4138
|
-
var
|
|
4138
|
+
var ve = class extends b {
|
|
4139
4139
|
static {
|
|
4140
4140
|
d(this, "ZodVoid");
|
|
4141
4141
|
}
|
|
@@ -4151,8 +4151,8 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4151
4151
|
return (0, u.OK)(e.data);
|
|
4152
4152
|
}
|
|
4153
4153
|
};
|
|
4154
|
-
c.ZodVoid =
|
|
4155
|
-
|
|
4154
|
+
c.ZodVoid = ve;
|
|
4155
|
+
ve.create = (s) => new ve({
|
|
4156
4156
|
typeName: _.ZodVoid,
|
|
4157
4157
|
...v(s)
|
|
4158
4158
|
});
|
|
@@ -4233,12 +4233,12 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4233
4233
|
typeName: _.ZodArray,
|
|
4234
4234
|
...v(e)
|
|
4235
4235
|
});
|
|
4236
|
-
function
|
|
4236
|
+
function ye(s) {
|
|
4237
4237
|
if (s instanceof E) {
|
|
4238
4238
|
let e = {};
|
|
4239
4239
|
for (let t in s.shape) {
|
|
4240
4240
|
let r = s.shape[t];
|
|
4241
|
-
e[t] = Z.create(
|
|
4241
|
+
e[t] = Z.create(ye(r));
|
|
4242
4242
|
}
|
|
4243
4243
|
return new E({
|
|
4244
4244
|
...s._def,
|
|
@@ -4246,11 +4246,11 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4246
4246
|
});
|
|
4247
4247
|
} else return s instanceof B ? new B({
|
|
4248
4248
|
...s._def,
|
|
4249
|
-
type:
|
|
4250
|
-
}) : s instanceof Z ? Z.create(
|
|
4249
|
+
type: ye(s.element)
|
|
4250
|
+
}) : s instanceof Z ? Z.create(ye(s.unwrap())) : s instanceof U ? U.create(ye(s.unwrap())) : s instanceof L ? L.create(s.items.map((e) => ye(
|
|
4251
4251
|
e))) : s;
|
|
4252
4252
|
}
|
|
4253
|
-
d(
|
|
4253
|
+
d(ye, "deepPartialify");
|
|
4254
4254
|
var E = class s extends b {
|
|
4255
4255
|
static {
|
|
4256
4256
|
d(this, "ZodObject");
|
|
@@ -4274,7 +4274,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4274
4274
|
}), u.INVALID;
|
|
4275
4275
|
}
|
|
4276
4276
|
let { status: r, ctx: i } = this._processInputParams(e), { shape: n, keys: o } = this._getCached(), a = [];
|
|
4277
|
-
if (!(this._def.catchall instanceof
|
|
4277
|
+
if (!(this._def.catchall instanceof D && this._def.unknownKeys === "strip"))
|
|
4278
4278
|
for (let p in i.data)
|
|
4279
4279
|
o.includes(p) || a.push(p);
|
|
4280
4280
|
let l = [];
|
|
@@ -4286,7 +4286,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4286
4286
|
alwaysSet: p in i.data
|
|
4287
4287
|
});
|
|
4288
4288
|
}
|
|
4289
|
-
if (this._def.catchall instanceof
|
|
4289
|
+
if (this._def.catchall instanceof D) {
|
|
4290
4290
|
let p = this._def.unknownKeys;
|
|
4291
4291
|
if (p === "passthrough")
|
|
4292
4292
|
for (let h of a)
|
|
@@ -4490,7 +4490,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4490
4490
|
* @deprecated
|
|
4491
4491
|
*/
|
|
4492
4492
|
deepPartial() {
|
|
4493
|
-
return
|
|
4493
|
+
return ye(this);
|
|
4494
4494
|
}
|
|
4495
4495
|
partial(e) {
|
|
4496
4496
|
let t = {};
|
|
@@ -4519,32 +4519,32 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4519
4519
|
});
|
|
4520
4520
|
}
|
|
4521
4521
|
keyof() {
|
|
4522
|
-
return
|
|
4522
|
+
return Or(f.util.objectKeys(this.shape));
|
|
4523
4523
|
}
|
|
4524
4524
|
};
|
|
4525
4525
|
c.ZodObject = E;
|
|
4526
4526
|
E.create = (s, e) => new E({
|
|
4527
4527
|
shape: /* @__PURE__ */ d(() => s, "shape"),
|
|
4528
4528
|
unknownKeys: "strip",
|
|
4529
|
-
catchall:
|
|
4529
|
+
catchall: D.create(),
|
|
4530
4530
|
typeName: _.ZodObject,
|
|
4531
4531
|
...v(e)
|
|
4532
4532
|
});
|
|
4533
4533
|
E.strictCreate = (s, e) => new E({
|
|
4534
4534
|
shape: /* @__PURE__ */ d(() => s, "shape"),
|
|
4535
4535
|
unknownKeys: "strict",
|
|
4536
|
-
catchall:
|
|
4536
|
+
catchall: D.create(),
|
|
4537
4537
|
typeName: _.ZodObject,
|
|
4538
4538
|
...v(e)
|
|
4539
4539
|
});
|
|
4540
4540
|
E.lazycreate = (s, e) => new E({
|
|
4541
4541
|
shape: s,
|
|
4542
4542
|
unknownKeys: "strip",
|
|
4543
|
-
catchall:
|
|
4543
|
+
catchall: D.create(),
|
|
4544
4544
|
typeName: _.ZodObject,
|
|
4545
4545
|
...v(e)
|
|
4546
4546
|
});
|
|
4547
|
-
var
|
|
4547
|
+
var ae = class extends b {
|
|
4548
4548
|
static {
|
|
4549
4549
|
d(this, "ZodUnion");
|
|
4550
4550
|
}
|
|
@@ -4614,16 +4614,16 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4614
4614
|
return this._def.options;
|
|
4615
4615
|
}
|
|
4616
4616
|
};
|
|
4617
|
-
c.ZodUnion =
|
|
4618
|
-
|
|
4617
|
+
c.ZodUnion = ae;
|
|
4618
|
+
ae.create = (s, e) => new ae({
|
|
4619
4619
|
options: s,
|
|
4620
4620
|
typeName: _.ZodUnion,
|
|
4621
4621
|
...v(e)
|
|
4622
4622
|
});
|
|
4623
|
-
var
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4623
|
+
var F = /* @__PURE__ */ d((s) => s instanceof ce ? F(s.schema) : s instanceof S ? F(s.innerType()) : s instanceof ue ? [s.value] : s instanceof
|
|
4624
|
+
le ? s.options : s instanceof pe ? f.util.objectValues(s.enum) : s instanceof he ? F(s._def.innerType) : s instanceof ne ? [void 0] : s instanceof
|
|
4625
|
+
oe ? [null] : s instanceof Z ? [void 0, ...F(s.unwrap())] : s instanceof U ? [null, ...F(s.unwrap())] : s instanceof Ze || s instanceof fe ?
|
|
4626
|
+
F(s.unwrap()) : s instanceof me ? F(s._def.innerType) : [], "getDiscriminator"), Je = class s extends b {
|
|
4627
4627
|
static {
|
|
4628
4628
|
d(this, "ZodDiscriminatedUnion");
|
|
4629
4629
|
}
|
|
@@ -4670,7 +4670,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4670
4670
|
static create(e, t, r) {
|
|
4671
4671
|
let i = /* @__PURE__ */ new Map();
|
|
4672
4672
|
for (let n of t) {
|
|
4673
|
-
let o =
|
|
4673
|
+
let o = F(n.shape[e]);
|
|
4674
4674
|
if (!o.length)
|
|
4675
4675
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
4676
4676
|
for (let a of o) {
|
|
@@ -4689,14 +4689,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4689
4689
|
}
|
|
4690
4690
|
};
|
|
4691
4691
|
c.ZodDiscriminatedUnion = Je;
|
|
4692
|
-
function
|
|
4692
|
+
function Pt(s, e) {
|
|
4693
4693
|
let t = (0, f.getParsedType)(s), r = (0, f.getParsedType)(e);
|
|
4694
4694
|
if (s === e)
|
|
4695
4695
|
return { valid: !0, data: s };
|
|
4696
4696
|
if (t === f.ZodParsedType.object && r === f.ZodParsedType.object) {
|
|
4697
4697
|
let i = f.util.objectKeys(e), n = f.util.objectKeys(s).filter((a) => i.indexOf(a) !== -1), o = { ...s, ...e };
|
|
4698
4698
|
for (let a of n) {
|
|
4699
|
-
let l =
|
|
4699
|
+
let l = Pt(s[a], e[a]);
|
|
4700
4700
|
if (!l.valid)
|
|
4701
4701
|
return { valid: !1 };
|
|
4702
4702
|
o[a] = l.data;
|
|
@@ -4707,7 +4707,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4707
4707
|
return { valid: !1 };
|
|
4708
4708
|
let i = [];
|
|
4709
4709
|
for (let n = 0; n < s.length; n++) {
|
|
4710
|
-
let o = s[n], a = e[n], l =
|
|
4710
|
+
let o = s[n], a = e[n], l = Pt(o, a);
|
|
4711
4711
|
if (!l.valid)
|
|
4712
4712
|
return { valid: !1 };
|
|
4713
4713
|
i.push(l.data);
|
|
@@ -4715,8 +4715,8 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4715
4715
|
return { valid: !0, data: i };
|
|
4716
4716
|
} else return t === f.ZodParsedType.date && r === f.ZodParsedType.date && +s == +e ? { valid: !0, data: s } : { valid: !1 };
|
|
4717
4717
|
}
|
|
4718
|
-
d(
|
|
4719
|
-
var
|
|
4718
|
+
d(Pt, "mergeValues");
|
|
4719
|
+
var de = class extends b {
|
|
4720
4720
|
static {
|
|
4721
4721
|
d(this, "ZodIntersection");
|
|
4722
4722
|
}
|
|
@@ -4724,7 +4724,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4724
4724
|
let { status: t, ctx: r } = this._processInputParams(e), i = /* @__PURE__ */ d((n, o) => {
|
|
4725
4725
|
if ((0, u.isAborted)(n) || (0, u.isAborted)(o))
|
|
4726
4726
|
return u.INVALID;
|
|
4727
|
-
let a =
|
|
4727
|
+
let a = Pt(n.value, o.value);
|
|
4728
4728
|
return a.valid ? (((0, u.isDirty)(n) || (0, u.isDirty)(o)) && t.dirty(), { status: t.value, value: a.data }) : ((0, u.addIssueToContext)(
|
|
4729
4729
|
r, {
|
|
4730
4730
|
code: m.ZodIssueCode.invalid_intersection_types
|
|
@@ -4752,14 +4752,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4752
4752
|
}));
|
|
4753
4753
|
}
|
|
4754
4754
|
};
|
|
4755
|
-
c.ZodIntersection =
|
|
4756
|
-
|
|
4755
|
+
c.ZodIntersection = de;
|
|
4756
|
+
de.create = (s, e, t) => new de({
|
|
4757
4757
|
left: s,
|
|
4758
4758
|
right: e,
|
|
4759
4759
|
typeName: _.ZodIntersection,
|
|
4760
4760
|
...v(t)
|
|
4761
4761
|
});
|
|
4762
|
-
var
|
|
4762
|
+
var L = class s extends b {
|
|
4763
4763
|
static {
|
|
4764
4764
|
d(this, "ZodTuple");
|
|
4765
4765
|
}
|
|
@@ -4802,11 +4802,11 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4802
4802
|
});
|
|
4803
4803
|
}
|
|
4804
4804
|
};
|
|
4805
|
-
c.ZodTuple =
|
|
4806
|
-
|
|
4805
|
+
c.ZodTuple = L;
|
|
4806
|
+
L.create = (s, e) => {
|
|
4807
4807
|
if (!Array.isArray(s))
|
|
4808
4808
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
4809
|
-
return new
|
|
4809
|
+
return new L({
|
|
4810
4810
|
items: s,
|
|
4811
4811
|
typeName: _.ZodTuple,
|
|
4812
4812
|
rest: null,
|
|
@@ -4850,7 +4850,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4850
4850
|
typeName: _.ZodRecord,
|
|
4851
4851
|
...v(r)
|
|
4852
4852
|
}) : new s({
|
|
4853
|
-
keyType:
|
|
4853
|
+
keyType: J.create(),
|
|
4854
4854
|
valueType: e,
|
|
4855
4855
|
typeName: _.ZodRecord,
|
|
4856
4856
|
...v(t)
|
|
@@ -4858,7 +4858,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4858
4858
|
}
|
|
4859
4859
|
};
|
|
4860
4860
|
c.ZodRecord = Ye;
|
|
4861
|
-
var
|
|
4861
|
+
var be = class extends b {
|
|
4862
4862
|
static {
|
|
4863
4863
|
d(this, "ZodMap");
|
|
4864
4864
|
}
|
|
@@ -4903,14 +4903,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4903
4903
|
}
|
|
4904
4904
|
}
|
|
4905
4905
|
};
|
|
4906
|
-
c.ZodMap =
|
|
4907
|
-
|
|
4906
|
+
c.ZodMap = be;
|
|
4907
|
+
be.create = (s, e, t) => new be({
|
|
4908
4908
|
valueType: e,
|
|
4909
4909
|
keyType: s,
|
|
4910
4910
|
typeName: _.ZodMap,
|
|
4911
4911
|
...v(t)
|
|
4912
4912
|
});
|
|
4913
|
-
var
|
|
4913
|
+
var xe = class s extends b {
|
|
4914
4914
|
static {
|
|
4915
4915
|
d(this, "ZodSet");
|
|
4916
4916
|
}
|
|
@@ -4971,8 +4971,8 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
4971
4971
|
return this.min(1, e);
|
|
4972
4972
|
}
|
|
4973
4973
|
};
|
|
4974
|
-
c.ZodSet =
|
|
4975
|
-
|
|
4974
|
+
c.ZodSet = xe;
|
|
4975
|
+
xe.create = (s, e) => new xe({
|
|
4976
4976
|
valueType: s,
|
|
4977
4977
|
minSize: null,
|
|
4978
4978
|
maxSize: null,
|
|
@@ -5029,7 +5029,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5029
5029
|
}
|
|
5030
5030
|
d(i, "makeReturnsIssue");
|
|
5031
5031
|
let n = { errorMap: t.common.contextualErrorMap }, o = t.data;
|
|
5032
|
-
if (this._def.returns instanceof
|
|
5032
|
+
if (this._def.returns instanceof X) {
|
|
5033
5033
|
let a = this;
|
|
5034
5034
|
return (0, u.OK)(async function(...l) {
|
|
5035
5035
|
let p = new m.ZodError([]), h = await a._def.args.parseAsync(l, n).catch((j) => {
|
|
@@ -5061,7 +5061,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5061
5061
|
args(...e) {
|
|
5062
5062
|
return new s({
|
|
5063
5063
|
...this._def,
|
|
5064
|
-
args:
|
|
5064
|
+
args: L.create(e).rest(W.create())
|
|
5065
5065
|
});
|
|
5066
5066
|
}
|
|
5067
5067
|
returns(e) {
|
|
@@ -5078,15 +5078,15 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5078
5078
|
}
|
|
5079
5079
|
static create(e, t, r) {
|
|
5080
5080
|
return new s({
|
|
5081
|
-
args: e ||
|
|
5082
|
-
returns: t ||
|
|
5081
|
+
args: e || L.create([]).rest(W.create()),
|
|
5082
|
+
returns: t || W.create(),
|
|
5083
5083
|
typeName: _.ZodFunction,
|
|
5084
5084
|
...v(r)
|
|
5085
5085
|
});
|
|
5086
5086
|
}
|
|
5087
5087
|
};
|
|
5088
5088
|
c.ZodFunction = Xe;
|
|
5089
|
-
var
|
|
5089
|
+
var ce = class extends b {
|
|
5090
5090
|
static {
|
|
5091
5091
|
d(this, "ZodLazy");
|
|
5092
5092
|
}
|
|
@@ -5098,13 +5098,13 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5098
5098
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
5099
5099
|
}
|
|
5100
5100
|
};
|
|
5101
|
-
c.ZodLazy =
|
|
5102
|
-
|
|
5101
|
+
c.ZodLazy = ce;
|
|
5102
|
+
ce.create = (s, e) => new ce({
|
|
5103
5103
|
getter: s,
|
|
5104
5104
|
typeName: _.ZodLazy,
|
|
5105
5105
|
...v(e)
|
|
5106
5106
|
});
|
|
5107
|
-
var
|
|
5107
|
+
var ue = class extends b {
|
|
5108
5108
|
static {
|
|
5109
5109
|
d(this, "ZodLiteral");
|
|
5110
5110
|
}
|
|
@@ -5123,26 +5123,26 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5123
5123
|
return this._def.value;
|
|
5124
5124
|
}
|
|
5125
5125
|
};
|
|
5126
|
-
c.ZodLiteral =
|
|
5127
|
-
|
|
5126
|
+
c.ZodLiteral = ue;
|
|
5127
|
+
ue.create = (s, e) => new ue({
|
|
5128
5128
|
value: s,
|
|
5129
5129
|
typeName: _.ZodLiteral,
|
|
5130
5130
|
...v(e)
|
|
5131
5131
|
});
|
|
5132
|
-
function
|
|
5133
|
-
return new
|
|
5132
|
+
function Or(s, e) {
|
|
5133
|
+
return new le({
|
|
5134
5134
|
values: s,
|
|
5135
5135
|
typeName: _.ZodEnum,
|
|
5136
5136
|
...v(e)
|
|
5137
5137
|
});
|
|
5138
5138
|
}
|
|
5139
|
-
d(
|
|
5140
|
-
var
|
|
5139
|
+
d(Or, "createZodEnum");
|
|
5140
|
+
var le = class s extends b {
|
|
5141
5141
|
static {
|
|
5142
5142
|
d(this, "ZodEnum");
|
|
5143
5143
|
}
|
|
5144
5144
|
constructor() {
|
|
5145
|
-
super(...arguments),
|
|
5145
|
+
super(...arguments), Se.set(this, void 0);
|
|
5146
5146
|
}
|
|
5147
5147
|
_parse(e) {
|
|
5148
5148
|
if (typeof e.data != "string") {
|
|
@@ -5153,7 +5153,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5153
5153
|
code: m.ZodIssueCode.invalid_type
|
|
5154
5154
|
}), u.INVALID;
|
|
5155
5155
|
}
|
|
5156
|
-
if (Ge(this,
|
|
5156
|
+
if (Ge(this, Se, "f") || wr(this, Se, new Set(this._def.values), "f"), !Ge(this, Se, "f").has(e.data)) {
|
|
5157
5157
|
let t = this._getOrReturnCtx(e), r = this._def.values;
|
|
5158
5158
|
return (0, u.addIssueToContext)(t, {
|
|
5159
5159
|
received: t.data,
|
|
@@ -5197,15 +5197,15 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5197
5197
|
});
|
|
5198
5198
|
}
|
|
5199
5199
|
};
|
|
5200
|
-
c.ZodEnum =
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
var
|
|
5200
|
+
c.ZodEnum = le;
|
|
5201
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
5202
|
+
le.create = Or;
|
|
5203
|
+
var pe = class extends b {
|
|
5204
5204
|
static {
|
|
5205
5205
|
d(this, "ZodNativeEnum");
|
|
5206
5206
|
}
|
|
5207
5207
|
constructor() {
|
|
5208
|
-
super(...arguments),
|
|
5208
|
+
super(...arguments), Re.set(this, void 0);
|
|
5209
5209
|
}
|
|
5210
5210
|
_parse(e) {
|
|
5211
5211
|
let t = f.util.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
|
|
@@ -5217,7 +5217,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5217
5217
|
code: m.ZodIssueCode.invalid_type
|
|
5218
5218
|
}), u.INVALID;
|
|
5219
5219
|
}
|
|
5220
|
-
if (Ge(this,
|
|
5220
|
+
if (Ge(this, Re, "f") || wr(this, Re, new Set(f.util.getValidEnumValues(this._def.values)), "f"), !Ge(this, Re, "f").has(e.data)) {
|
|
5221
5221
|
let i = f.util.objectValues(t);
|
|
5222
5222
|
return (0, u.addIssueToContext)(r, {
|
|
5223
5223
|
received: r.data,
|
|
@@ -5231,14 +5231,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5231
5231
|
return this._def.values;
|
|
5232
5232
|
}
|
|
5233
5233
|
};
|
|
5234
|
-
c.ZodNativeEnum =
|
|
5235
|
-
|
|
5236
|
-
|
|
5234
|
+
c.ZodNativeEnum = pe;
|
|
5235
|
+
Re = /* @__PURE__ */ new WeakMap();
|
|
5236
|
+
pe.create = (s, e) => new pe({
|
|
5237
5237
|
values: s,
|
|
5238
5238
|
typeName: _.ZodNativeEnum,
|
|
5239
5239
|
...v(e)
|
|
5240
5240
|
});
|
|
5241
|
-
var
|
|
5241
|
+
var X = class extends b {
|
|
5242
5242
|
static {
|
|
5243
5243
|
d(this, "ZodPromise");
|
|
5244
5244
|
}
|
|
@@ -5260,8 +5260,8 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5260
5260
|
})));
|
|
5261
5261
|
}
|
|
5262
5262
|
};
|
|
5263
|
-
c.ZodPromise =
|
|
5264
|
-
|
|
5263
|
+
c.ZodPromise = X;
|
|
5264
|
+
X.create = (s, e) => new X({
|
|
5265
5265
|
type: s,
|
|
5266
5266
|
typeName: _.ZodPromise,
|
|
5267
5267
|
...v(e)
|
|
@@ -5379,7 +5379,7 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5379
5379
|
typeName: _.ZodOptional,
|
|
5380
5380
|
...v(e)
|
|
5381
5381
|
});
|
|
5382
|
-
var
|
|
5382
|
+
var U = class extends b {
|
|
5383
5383
|
static {
|
|
5384
5384
|
d(this, "ZodNullable");
|
|
5385
5385
|
}
|
|
@@ -5390,13 +5390,13 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5390
5390
|
return this._def.innerType;
|
|
5391
5391
|
}
|
|
5392
5392
|
};
|
|
5393
|
-
c.ZodNullable =
|
|
5394
|
-
|
|
5393
|
+
c.ZodNullable = U;
|
|
5394
|
+
U.create = (s, e) => new U({
|
|
5395
5395
|
innerType: s,
|
|
5396
5396
|
typeName: _.ZodNullable,
|
|
5397
5397
|
...v(e)
|
|
5398
5398
|
});
|
|
5399
|
-
var
|
|
5399
|
+
var he = class extends b {
|
|
5400
5400
|
static {
|
|
5401
5401
|
d(this, "ZodDefault");
|
|
5402
5402
|
}
|
|
@@ -5412,14 +5412,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5412
5412
|
return this._def.innerType;
|
|
5413
5413
|
}
|
|
5414
5414
|
};
|
|
5415
|
-
c.ZodDefault =
|
|
5416
|
-
|
|
5415
|
+
c.ZodDefault = he;
|
|
5416
|
+
he.create = (s, e) => new he({
|
|
5417
5417
|
innerType: s,
|
|
5418
5418
|
typeName: _.ZodDefault,
|
|
5419
5419
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
5420
5420
|
...v(e)
|
|
5421
5421
|
});
|
|
5422
|
-
var
|
|
5422
|
+
var me = class extends b {
|
|
5423
5423
|
static {
|
|
5424
5424
|
d(this, "ZodCatch");
|
|
5425
5425
|
}
|
|
@@ -5459,14 +5459,14 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5459
5459
|
return this._def.innerType;
|
|
5460
5460
|
}
|
|
5461
5461
|
};
|
|
5462
|
-
c.ZodCatch =
|
|
5463
|
-
|
|
5462
|
+
c.ZodCatch = me;
|
|
5463
|
+
me.create = (s, e) => new me({
|
|
5464
5464
|
innerType: s,
|
|
5465
5465
|
typeName: _.ZodCatch,
|
|
5466
5466
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
5467
5467
|
...v(e)
|
|
5468
5468
|
});
|
|
5469
|
-
var
|
|
5469
|
+
var we = class extends b {
|
|
5470
5470
|
static {
|
|
5471
5471
|
d(this, "ZodNaN");
|
|
5472
5472
|
}
|
|
@@ -5482,13 +5482,13 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5482
5482
|
return { status: "valid", value: e.data };
|
|
5483
5483
|
}
|
|
5484
5484
|
};
|
|
5485
|
-
c.ZodNaN =
|
|
5486
|
-
|
|
5485
|
+
c.ZodNaN = we;
|
|
5486
|
+
we.create = (s) => new we({
|
|
5487
5487
|
typeName: _.ZodNaN,
|
|
5488
5488
|
...v(s)
|
|
5489
5489
|
});
|
|
5490
5490
|
c.BRAND = Symbol("zod_brand");
|
|
5491
|
-
var
|
|
5491
|
+
var Ze = class extends b {
|
|
5492
5492
|
static {
|
|
5493
5493
|
d(this, "ZodBranded");
|
|
5494
5494
|
}
|
|
@@ -5504,8 +5504,8 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5504
5504
|
return this._def.type;
|
|
5505
5505
|
}
|
|
5506
5506
|
};
|
|
5507
|
-
c.ZodBranded =
|
|
5508
|
-
var
|
|
5507
|
+
c.ZodBranded = Ze;
|
|
5508
|
+
var Pe = class s extends b {
|
|
5509
5509
|
static {
|
|
5510
5510
|
d(this, "ZodPipeline");
|
|
5511
5511
|
}
|
|
@@ -5549,8 +5549,8 @@ onent})+$", Pt, Fs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.
|
|
|
5549
5549
|
});
|
|
5550
5550
|
}
|
|
5551
5551
|
};
|
|
5552
|
-
c.ZodPipeline =
|
|
5553
|
-
var
|
|
5552
|
+
c.ZodPipeline = Pe;
|
|
5553
|
+
var fe = class extends b {
|
|
5554
5554
|
static {
|
|
5555
5555
|
d(this, "ZodReadonly");
|
|
5556
5556
|
}
|
|
@@ -5563,37 +5563,37 @@ eze");
|
|
|
5563
5563
|
return this._def.innerType;
|
|
5564
5564
|
}
|
|
5565
5565
|
};
|
|
5566
|
-
c.ZodReadonly =
|
|
5567
|
-
|
|
5566
|
+
c.ZodReadonly = fe;
|
|
5567
|
+
fe.create = (s, e) => new fe({
|
|
5568
5568
|
innerType: s,
|
|
5569
5569
|
typeName: _.ZodReadonly,
|
|
5570
5570
|
...v(e)
|
|
5571
5571
|
});
|
|
5572
|
-
function
|
|
5572
|
+
function xr(s, e) {
|
|
5573
5573
|
let t = typeof s == "function" ? s(e) : typeof s == "string" ? { message: s } : s;
|
|
5574
5574
|
return typeof t == "string" ? { message: t } : t;
|
|
5575
5575
|
}
|
|
5576
|
-
d(
|
|
5577
|
-
function
|
|
5578
|
-
return s ?
|
|
5576
|
+
d(xr, "cleanParams");
|
|
5577
|
+
function Tr(s, e = {}, t) {
|
|
5578
|
+
return s ? Y.create().superRefine((r, i) => {
|
|
5579
5579
|
var n, o;
|
|
5580
5580
|
let a = s(r);
|
|
5581
5581
|
if (a instanceof Promise)
|
|
5582
5582
|
return a.then((l) => {
|
|
5583
5583
|
var p, h;
|
|
5584
5584
|
if (!l) {
|
|
5585
|
-
let y =
|
|
5585
|
+
let y = xr(e, r), k = (h = (p = y.fatal) !== null && p !== void 0 ? p : t) !== null && h !== void 0 ? h : !0;
|
|
5586
5586
|
i.addIssue({ code: "custom", ...y, fatal: k });
|
|
5587
5587
|
}
|
|
5588
5588
|
});
|
|
5589
5589
|
if (!a) {
|
|
5590
|
-
let l =
|
|
5590
|
+
let l = xr(e, r), p = (o = (n = l.fatal) !== null && n !== void 0 ? n : t) !== null && o !== void 0 ? o : !0;
|
|
5591
5591
|
i.addIssue({ code: "custom", ...l, fatal: p });
|
|
5592
5592
|
}
|
|
5593
|
-
}) :
|
|
5593
|
+
}) : Y.create();
|
|
5594
5594
|
}
|
|
5595
|
-
d(
|
|
5596
|
-
c.custom =
|
|
5595
|
+
d(Tr, "custom");
|
|
5596
|
+
c.custom = Tr;
|
|
5597
5597
|
c.late = {
|
|
5598
5598
|
object: E.lazycreate
|
|
5599
5599
|
};
|
|
@@ -5608,102 +5608,102 @@ known", s.ZodNever = "ZodNever", s.ZodVoid = "ZodVoid", s.ZodArray = "ZodArray",
|
|
|
5608
5608
|
t", s.ZodCatch = "ZodCatch", s.ZodPromise = "ZodPromise", s.ZodBranded = "ZodBranded", s.ZodPipeline = "ZodPipeline", s.ZodReadonly = "ZodRe\
|
|
5609
5609
|
adonly";
|
|
5610
5610
|
})(_ || (c.ZodFirstPartyTypeKind = _ = {}));
|
|
5611
|
-
var
|
|
5611
|
+
var ei = /* @__PURE__ */ d((s, e = {
|
|
5612
5612
|
message: `Input not instance of ${s.name}`
|
|
5613
|
-
}) =>
|
|
5614
|
-
c.instanceof =
|
|
5615
|
-
var
|
|
5616
|
-
c.string =
|
|
5617
|
-
var
|
|
5618
|
-
c.number =
|
|
5619
|
-
var
|
|
5620
|
-
c.nan =
|
|
5621
|
-
var
|
|
5622
|
-
c.bigint =
|
|
5623
|
-
var
|
|
5624
|
-
c.boolean =
|
|
5625
|
-
var
|
|
5626
|
-
c.date =
|
|
5627
|
-
var
|
|
5628
|
-
c.symbol =
|
|
5629
|
-
var
|
|
5630
|
-
c.undefined =
|
|
5631
|
-
var
|
|
5632
|
-
c.null =
|
|
5633
|
-
var
|
|
5634
|
-
c.any =
|
|
5635
|
-
var
|
|
5636
|
-
c.unknown =
|
|
5637
|
-
var
|
|
5638
|
-
c.never =
|
|
5639
|
-
var
|
|
5640
|
-
c.void =
|
|
5641
|
-
var
|
|
5642
|
-
c.array =
|
|
5643
|
-
var
|
|
5644
|
-
c.object =
|
|
5645
|
-
var
|
|
5646
|
-
c.strictObject =
|
|
5647
|
-
var
|
|
5648
|
-
c.union =
|
|
5649
|
-
var
|
|
5650
|
-
c.discriminatedUnion =
|
|
5651
|
-
var
|
|
5652
|
-
c.intersection =
|
|
5653
|
-
var
|
|
5654
|
-
c.tuple =
|
|
5655
|
-
var
|
|
5656
|
-
c.record =
|
|
5657
|
-
var
|
|
5658
|
-
c.map =
|
|
5659
|
-
var
|
|
5660
|
-
c.set =
|
|
5661
|
-
var
|
|
5662
|
-
c.function =
|
|
5663
|
-
var
|
|
5664
|
-
c.lazy =
|
|
5665
|
-
var
|
|
5666
|
-
c.literal =
|
|
5667
|
-
var
|
|
5668
|
-
c.enum =
|
|
5669
|
-
var
|
|
5670
|
-
c.nativeEnum =
|
|
5671
|
-
var
|
|
5672
|
-
c.promise =
|
|
5673
|
-
var
|
|
5674
|
-
c.effect =
|
|
5675
|
-
c.transformer =
|
|
5676
|
-
var
|
|
5677
|
-
c.optional =
|
|
5678
|
-
var
|
|
5679
|
-
c.nullable =
|
|
5680
|
-
var
|
|
5681
|
-
c.preprocess =
|
|
5682
|
-
var
|
|
5683
|
-
c.pipeline =
|
|
5684
|
-
var
|
|
5685
|
-
c.ostring =
|
|
5686
|
-
var
|
|
5687
|
-
c.onumber =
|
|
5688
|
-
var
|
|
5689
|
-
c.oboolean =
|
|
5613
|
+
}) => Tr((t) => t instanceof s, e), "instanceOfType");
|
|
5614
|
+
c.instanceof = ei;
|
|
5615
|
+
var Er = J.create;
|
|
5616
|
+
c.string = Er;
|
|
5617
|
+
var Ar = te.create;
|
|
5618
|
+
c.number = Ar;
|
|
5619
|
+
var ti = we.create;
|
|
5620
|
+
c.nan = ti;
|
|
5621
|
+
var ri = re.create;
|
|
5622
|
+
c.bigint = ri;
|
|
5623
|
+
var jr = se.create;
|
|
5624
|
+
c.boolean = jr;
|
|
5625
|
+
var si = ie.create;
|
|
5626
|
+
c.date = si;
|
|
5627
|
+
var ii = _e.create;
|
|
5628
|
+
c.symbol = ii;
|
|
5629
|
+
var ni = ne.create;
|
|
5630
|
+
c.undefined = ni;
|
|
5631
|
+
var oi = oe.create;
|
|
5632
|
+
c.null = oi;
|
|
5633
|
+
var ai = Y.create;
|
|
5634
|
+
c.any = ai;
|
|
5635
|
+
var di = W.create;
|
|
5636
|
+
c.unknown = di;
|
|
5637
|
+
var ci = D.create;
|
|
5638
|
+
c.never = ci;
|
|
5639
|
+
var ui = ve.create;
|
|
5640
|
+
c.void = ui;
|
|
5641
|
+
var li = B.create;
|
|
5642
|
+
c.array = li;
|
|
5643
|
+
var pi = E.create;
|
|
5644
|
+
c.object = pi;
|
|
5645
|
+
var hi = E.strictCreate;
|
|
5646
|
+
c.strictObject = hi;
|
|
5647
|
+
var mi = ae.create;
|
|
5648
|
+
c.union = mi;
|
|
5649
|
+
var fi = Je.create;
|
|
5650
|
+
c.discriminatedUnion = fi;
|
|
5651
|
+
var gi = de.create;
|
|
5652
|
+
c.intersection = gi;
|
|
5653
|
+
var yi = L.create;
|
|
5654
|
+
c.tuple = yi;
|
|
5655
|
+
var _i = Ye.create;
|
|
5656
|
+
c.record = _i;
|
|
5657
|
+
var vi = be.create;
|
|
5658
|
+
c.map = vi;
|
|
5659
|
+
var bi = xe.create;
|
|
5660
|
+
c.set = bi;
|
|
5661
|
+
var xi = Xe.create;
|
|
5662
|
+
c.function = xi;
|
|
5663
|
+
var wi = ce.create;
|
|
5664
|
+
c.lazy = wi;
|
|
5665
|
+
var ki = ue.create;
|
|
5666
|
+
c.literal = ki;
|
|
5667
|
+
var Ci = le.create;
|
|
5668
|
+
c.enum = Ci;
|
|
5669
|
+
var Ii = pe.create;
|
|
5670
|
+
c.nativeEnum = Ii;
|
|
5671
|
+
var Oi = X.create;
|
|
5672
|
+
c.promise = Oi;
|
|
5673
|
+
var Sr = S.create;
|
|
5674
|
+
c.effect = Sr;
|
|
5675
|
+
c.transformer = Sr;
|
|
5676
|
+
var Ti = Z.create;
|
|
5677
|
+
c.optional = Ti;
|
|
5678
|
+
var Ei = U.create;
|
|
5679
|
+
c.nullable = Ei;
|
|
5680
|
+
var Ai = S.createWithPreprocess;
|
|
5681
|
+
c.preprocess = Ai;
|
|
5682
|
+
var ji = Pe.create;
|
|
5683
|
+
c.pipeline = ji;
|
|
5684
|
+
var Si = /* @__PURE__ */ d(() => Er().optional(), "ostring");
|
|
5685
|
+
c.ostring = Si;
|
|
5686
|
+
var Ri = /* @__PURE__ */ d(() => Ar().optional(), "onumber");
|
|
5687
|
+
c.onumber = Ri;
|
|
5688
|
+
var Zi = /* @__PURE__ */ d(() => jr().optional(), "oboolean");
|
|
5689
|
+
c.oboolean = Zi;
|
|
5690
5690
|
c.coerce = {
|
|
5691
|
-
string: /* @__PURE__ */ d((s) =>
|
|
5692
|
-
number: /* @__PURE__ */ d((s) =>
|
|
5693
|
-
boolean: /* @__PURE__ */ d((s) =>
|
|
5691
|
+
string: /* @__PURE__ */ d((s) => J.create({ ...s, coerce: !0 }), "string"),
|
|
5692
|
+
number: /* @__PURE__ */ d((s) => te.create({ ...s, coerce: !0 }), "number"),
|
|
5693
|
+
boolean: /* @__PURE__ */ d((s) => se.create({
|
|
5694
5694
|
...s,
|
|
5695
5695
|
coerce: !0
|
|
5696
5696
|
}), "boolean"),
|
|
5697
|
-
bigint: /* @__PURE__ */ d((s) =>
|
|
5698
|
-
date: /* @__PURE__ */ d((s) =>
|
|
5697
|
+
bigint: /* @__PURE__ */ d((s) => re.create({ ...s, coerce: !0 }), "bigint"),
|
|
5698
|
+
date: /* @__PURE__ */ d((s) => ie.create({ ...s, coerce: !0 }), "date")
|
|
5699
5699
|
};
|
|
5700
5700
|
c.NEVER = u.INVALID;
|
|
5701
5701
|
});
|
|
5702
5702
|
|
|
5703
5703
|
// ../node_modules/zod/lib/external.js
|
|
5704
|
-
var
|
|
5704
|
+
var Nt = O((N) => {
|
|
5705
5705
|
"use strict";
|
|
5706
|
-
var
|
|
5706
|
+
var Pi = N && N.__createBinding || (Object.create ? function(s, e, t, r) {
|
|
5707
5707
|
r === void 0 && (r = t);
|
|
5708
5708
|
var i = Object.getOwnPropertyDescriptor(e, t);
|
|
5709
5709
|
(!i || ("get" in i ? !e.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: /* @__PURE__ */ d(function() {
|
|
@@ -5711,22 +5711,22 @@ var Vt = O((N) => {
|
|
|
5711
5711
|
}, "get") }), Object.defineProperty(s, r, i);
|
|
5712
5712
|
} : function(s, e, t, r) {
|
|
5713
5713
|
r === void 0 && (r = t), s[r] = e[t];
|
|
5714
|
-
}),
|
|
5715
|
-
for (var t in s) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) &&
|
|
5714
|
+
}), ke = N && N.__exportStar || function(s, e) {
|
|
5715
|
+
for (var t in s) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Pi(e, s, t);
|
|
5716
5716
|
};
|
|
5717
5717
|
Object.defineProperty(N, "__esModule", { value: !0 });
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5718
|
+
ke(He(), N);
|
|
5719
|
+
ke(Rt(), N);
|
|
5720
|
+
ke(yr(), N);
|
|
5721
|
+
ke(Ae(), N);
|
|
5722
|
+
ke(Rr(), N);
|
|
5723
|
+
ke(Be(), N);
|
|
5724
5724
|
});
|
|
5725
5725
|
|
|
5726
5726
|
// ../node_modules/zod/lib/index.js
|
|
5727
|
-
var
|
|
5727
|
+
var Nr = O((A) => {
|
|
5728
5728
|
"use strict";
|
|
5729
|
-
var
|
|
5729
|
+
var Zr = A && A.__createBinding || (Object.create ? function(s, e, t, r) {
|
|
5730
5730
|
r === void 0 && (r = t);
|
|
5731
5731
|
var i = Object.getOwnPropertyDescriptor(e, t);
|
|
5732
5732
|
(!i || ("get" in i ? !e.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: /* @__PURE__ */ d(function() {
|
|
@@ -5734,51 +5734,50 @@ var Vr = O((A) => {
|
|
|
5734
5734
|
}, "get") }), Object.defineProperty(s, r, i);
|
|
5735
5735
|
} : function(s, e, t, r) {
|
|
5736
5736
|
r === void 0 && (r = t), s[r] = e[t];
|
|
5737
|
-
}),
|
|
5737
|
+
}), Ni = A && A.__setModuleDefault || (Object.create ? function(s, e) {
|
|
5738
5738
|
Object.defineProperty(s, "default", { enumerable: !0, value: e });
|
|
5739
5739
|
} : function(s, e) {
|
|
5740
5740
|
s.default = e;
|
|
5741
|
-
}),
|
|
5741
|
+
}), Vi = A && A.__importStar || function(s) {
|
|
5742
5742
|
if (s && s.__esModule) return s;
|
|
5743
5743
|
var e = {};
|
|
5744
|
-
if (s != null) for (var t in s) t !== "default" && Object.prototype.hasOwnProperty.call(s, t) &&
|
|
5745
|
-
return
|
|
5746
|
-
},
|
|
5747
|
-
for (var t in s) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) &&
|
|
5744
|
+
if (s != null) for (var t in s) t !== "default" && Object.prototype.hasOwnProperty.call(s, t) && Zr(e, s, t);
|
|
5745
|
+
return Ni(e, s), e;
|
|
5746
|
+
}, Di = A && A.__exportStar || function(s, e) {
|
|
5747
|
+
for (var t in s) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Zr(e, s, t);
|
|
5748
5748
|
};
|
|
5749
5749
|
Object.defineProperty(A, "__esModule", { value: !0 });
|
|
5750
5750
|
A.z = void 0;
|
|
5751
|
-
var
|
|
5752
|
-
A.z =
|
|
5753
|
-
|
|
5754
|
-
A.default =
|
|
5751
|
+
var Pr = Vi(Nt());
|
|
5752
|
+
A.z = Pr;
|
|
5753
|
+
Di(Nt(), A);
|
|
5754
|
+
A.default = Pr;
|
|
5755
5755
|
});
|
|
5756
5756
|
|
|
5757
5757
|
// src/cli/bin/index.ts
|
|
5758
|
-
var
|
|
5759
|
-
Pe = X(Gt(), 1);
|
|
5758
|
+
var Oe = require("storybook/internal/common"), V = require("storybook/internal/node-logger"), Lr = require("storybook/internal/telemetry"), Ne = Q(zt(), 1);
|
|
5760
5759
|
|
|
5761
5760
|
// ../node_modules/fd-package-json/dist/esm/main.js
|
|
5762
|
-
var
|
|
5763
|
-
async function
|
|
5761
|
+
var Yt = Q(Jt(), 1), Xt = require("node:path"), Me = require("node:fs/promises"), Qt = require("node:fs");
|
|
5762
|
+
async function cs(s) {
|
|
5764
5763
|
try {
|
|
5765
5764
|
return (await (0, Me.stat)(s)).isFile();
|
|
5766
5765
|
} catch {
|
|
5767
5766
|
return !1;
|
|
5768
5767
|
}
|
|
5769
5768
|
}
|
|
5770
|
-
d(
|
|
5771
|
-
async function
|
|
5772
|
-
for (let e of (0,
|
|
5773
|
-
let t = (0,
|
|
5774
|
-
if (await
|
|
5769
|
+
d(cs, "fileExists");
|
|
5770
|
+
async function us(s) {
|
|
5771
|
+
for (let e of (0, Yt.walkUp)(s)) {
|
|
5772
|
+
let t = (0, Xt.resolve)(e, "package.json");
|
|
5773
|
+
if (await cs(t))
|
|
5775
5774
|
return t;
|
|
5776
5775
|
}
|
|
5777
5776
|
return null;
|
|
5778
5777
|
}
|
|
5779
|
-
d(
|
|
5780
|
-
async function
|
|
5781
|
-
let e = await
|
|
5778
|
+
d(us, "findPackagePath");
|
|
5779
|
+
async function K(s) {
|
|
5780
|
+
let e = await us(s);
|
|
5782
5781
|
if (!e)
|
|
5783
5782
|
return null;
|
|
5784
5783
|
try {
|
|
@@ -5788,11 +5787,11 @@ async function H(s) {
|
|
|
5788
5787
|
return null;
|
|
5789
5788
|
}
|
|
5790
5789
|
}
|
|
5791
|
-
d(
|
|
5790
|
+
d(K, "findPackage");
|
|
5792
5791
|
|
|
5793
5792
|
// node_modules/leven/index.js
|
|
5794
|
-
var
|
|
5795
|
-
function
|
|
5793
|
+
var xt = [], er = [];
|
|
5794
|
+
function wt(s, e) {
|
|
5796
5795
|
if (s === e)
|
|
5797
5796
|
return 0;
|
|
5798
5797
|
let t = s;
|
|
@@ -5807,44 +5806,44 @@ function kt(s, e) {
|
|
|
5807
5806
|
return i;
|
|
5808
5807
|
let o, a, l, p, h = 0, y = 0;
|
|
5809
5808
|
for (; h < r; )
|
|
5810
|
-
|
|
5809
|
+
er[h] = s.charCodeAt(n + h), xt[h] = ++h;
|
|
5811
5810
|
for (; y < i; )
|
|
5812
5811
|
for (o = e.charCodeAt(n + y), l = y++, a = y, h = 0; h < r; h++)
|
|
5813
|
-
p = o ===
|
|
5812
|
+
p = o === er[h] ? l : l + 1, l = xt[h], a = xt[h] = l > a ? p > a ? a + 1 : p : p > l ? l + 1 : p;
|
|
5814
5813
|
return a;
|
|
5815
5814
|
}
|
|
5816
|
-
d(
|
|
5815
|
+
d(wt, "leven");
|
|
5817
5816
|
|
|
5818
5817
|
// src/cli/bin/index.ts
|
|
5819
|
-
var
|
|
5818
|
+
var ge = Q(sr(), 1);
|
|
5820
5819
|
|
|
5821
5820
|
// ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
5822
|
-
var
|
|
5823
|
-
function
|
|
5821
|
+
var ms = process.env.NODE_ENV === "production", Ct = "Invariant failed";
|
|
5822
|
+
function z(s, e) {
|
|
5824
5823
|
if (!s) {
|
|
5825
|
-
if (
|
|
5826
|
-
throw new Error(
|
|
5827
|
-
var t = typeof e == "function" ? e() : e, r = t ? "".concat(
|
|
5824
|
+
if (ms)
|
|
5825
|
+
throw new Error(Ct);
|
|
5826
|
+
var t = typeof e == "function" ? e() : e, r = t ? "".concat(Ct, ": ").concat(t) : Ct;
|
|
5828
5827
|
throw new Error(r);
|
|
5829
5828
|
}
|
|
5830
5829
|
}
|
|
5831
|
-
d(
|
|
5830
|
+
d(z, "invariant");
|
|
5832
5831
|
|
|
5833
5832
|
// package.json
|
|
5834
|
-
var
|
|
5833
|
+
var It = "9.1.0-alpha.6";
|
|
5835
5834
|
|
|
5836
5835
|
// src/cli/build.ts
|
|
5837
|
-
var
|
|
5838
|
-
var
|
|
5839
|
-
let e = await
|
|
5840
|
-
|
|
5836
|
+
var ir = require("storybook/internal/common"), qe = require("storybook/internal/core-server");
|
|
5837
|
+
var nr = /* @__PURE__ */ d(async (s) => {
|
|
5838
|
+
let e = await K(__dirname);
|
|
5839
|
+
z(e, "Failed to find the closest package.json file.");
|
|
5841
5840
|
let t = {
|
|
5842
5841
|
...s,
|
|
5843
5842
|
configDir: s.configDir || "./.storybook",
|
|
5844
5843
|
outputDir: s.outputDir || "./storybook-static",
|
|
5845
5844
|
ignorePreview: !!s.previewUrl && !s.forceBuildPreview,
|
|
5846
5845
|
configType: "PRODUCTION",
|
|
5847
|
-
cache:
|
|
5846
|
+
cache: ir.cache,
|
|
5848
5847
|
packageJson: e
|
|
5849
5848
|
};
|
|
5850
5849
|
await (0, qe.withTelemetry)(
|
|
@@ -5855,15 +5854,15 @@ var or = /* @__PURE__ */ d(async (s) => {
|
|
|
5855
5854
|
}, "build");
|
|
5856
5855
|
|
|
5857
5856
|
// src/cli/buildIndex.ts
|
|
5858
|
-
var
|
|
5859
|
-
var
|
|
5857
|
+
var or = require("storybook/internal/common"), Fe = require("storybook/internal/core-server");
|
|
5858
|
+
var ar = /* @__PURE__ */ d(async (s) => {
|
|
5860
5859
|
let e = {
|
|
5861
5860
|
...s,
|
|
5862
5861
|
configDir: s.configDir || ".storybook",
|
|
5863
5862
|
outputFile: s.outputFile || "index.json",
|
|
5864
5863
|
ignorePreview: !0,
|
|
5865
5864
|
configType: "PRODUCTION",
|
|
5866
|
-
cache:
|
|
5865
|
+
cache: or.cache,
|
|
5867
5866
|
packageJson: s.packageJson
|
|
5868
5867
|
}, t = {
|
|
5869
5868
|
...e,
|
|
@@ -5874,61 +5873,61 @@ var dr = /* @__PURE__ */ d(async (s) => {
|
|
|
5874
5873
|
}, "buildIndex");
|
|
5875
5874
|
|
|
5876
5875
|
// src/cli/dev.ts
|
|
5877
|
-
var
|
|
5878
|
-
var
|
|
5879
|
-
function
|
|
5880
|
-
|
|
5881
|
-
errors.forEach((e) =>
|
|
5882
|
-
e)),
|
|
5883
|
-
s.close ?
|
|
5876
|
+
var cr = require("storybook/internal/common"), We = require("storybook/internal/core-server"), $ = require("storybook/internal/node-logger");
|
|
5877
|
+
var Tt = Q(Ot(), 1);
|
|
5878
|
+
function gs(s) {
|
|
5879
|
+
$.instance.heading = "", s instanceof Error ? s.error ? $.logger.error(s.error) : s.stats && s.stats.compilation.errors ? s.stats.compilation.
|
|
5880
|
+
errors.forEach((e) => $.logger.plain(e)) : $.logger.error(s) : s.compilation?.errors && s.compilation.errors.forEach((e) => $.logger.plain(
|
|
5881
|
+
e)), $.logger.line(), $.logger.warn(
|
|
5882
|
+
s.close ? Tt.dedent`
|
|
5884
5883
|
FATAL broken build!, will close the process,
|
|
5885
5884
|
Fix the error below and restart storybook.
|
|
5886
|
-
` :
|
|
5885
|
+
` : Tt.dedent`
|
|
5887
5886
|
Broken build, fix the error above.
|
|
5888
5887
|
You may need to refresh the browser.
|
|
5889
5888
|
`
|
|
5890
|
-
),
|
|
5889
|
+
), $.logger.line();
|
|
5891
5890
|
}
|
|
5892
|
-
d(
|
|
5893
|
-
var
|
|
5891
|
+
d(gs, "printError");
|
|
5892
|
+
var ur = /* @__PURE__ */ d(async (s) => {
|
|
5894
5893
|
let { env: e } = process;
|
|
5895
5894
|
e.NODE_ENV = e.NODE_ENV || "development";
|
|
5896
|
-
let t = await
|
|
5897
|
-
|
|
5895
|
+
let t = await K(__dirname);
|
|
5896
|
+
z(t, "Failed to find the closest package.json file.");
|
|
5898
5897
|
let r = {
|
|
5899
5898
|
...s,
|
|
5900
5899
|
configDir: s.configDir || "./.storybook",
|
|
5901
5900
|
configType: "DEVELOPMENT",
|
|
5902
5901
|
ignorePreview: !!s.previewUrl && !s.forceBuildPreview,
|
|
5903
|
-
cache:
|
|
5902
|
+
cache: cr.cache,
|
|
5904
5903
|
packageJson: t
|
|
5905
5904
|
};
|
|
5906
|
-
await (0,
|
|
5905
|
+
await (0, We.withTelemetry)(
|
|
5907
5906
|
"dev",
|
|
5908
5907
|
{
|
|
5909
5908
|
cliOptions: s,
|
|
5910
5909
|
presetOptions: r,
|
|
5911
|
-
printError:
|
|
5910
|
+
printError: gs
|
|
5912
5911
|
},
|
|
5913
|
-
() => (0,
|
|
5912
|
+
() => (0, We.buildDevStandalone)(r)
|
|
5914
5913
|
);
|
|
5915
5914
|
}, "dev");
|
|
5916
5915
|
|
|
5917
5916
|
// src/cli/globalSettings.ts
|
|
5918
|
-
var tt =
|
|
5917
|
+
var tt = Q(require("node:fs/promises"), 1), $r = require("node:os"), st = require("node:path"), Ie = Q(Nr(), 1);
|
|
5919
5918
|
|
|
5920
5919
|
// src/server-errors.ts
|
|
5921
|
-
var
|
|
5920
|
+
var Dr = Q(Ot(), 1);
|
|
5922
5921
|
|
|
5923
5922
|
// src/storybook-error.ts
|
|
5924
|
-
function
|
|
5923
|
+
function Vr({
|
|
5925
5924
|
code: s,
|
|
5926
5925
|
category: e
|
|
5927
5926
|
}) {
|
|
5928
5927
|
let t = String(s).padStart(4, "0");
|
|
5929
5928
|
return `SB_${e}_${t}`;
|
|
5930
5929
|
}
|
|
5931
|
-
d(
|
|
5930
|
+
d(Vr, "parseErrorCode");
|
|
5932
5931
|
var Qe = class s extends Error {
|
|
5933
5932
|
constructor(t) {
|
|
5934
5933
|
super(s.getFullMessage(t));
|
|
@@ -5945,7 +5944,7 @@ var Qe = class s extends Error {
|
|
|
5945
5944
|
d(this, "StorybookError");
|
|
5946
5945
|
}
|
|
5947
5946
|
get fullErrorCode() {
|
|
5948
|
-
return
|
|
5947
|
+
return Vr({ code: this.code, category: this.category });
|
|
5949
5948
|
}
|
|
5950
5949
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
5951
5950
|
get name() {
|
|
@@ -5960,7 +5959,7 @@ var Qe = class s extends Error {
|
|
|
5960
5959
|
message: n
|
|
5961
5960
|
}) {
|
|
5962
5961
|
let o;
|
|
5963
|
-
return t === !0 ? o = `https://storybook.js.org/error/${
|
|
5962
|
+
return t === !0 ? o = `https://storybook.js.org/error/${Vr({ code: r, category: i })}` : typeof t == "string" ? o = t : Array.isArray(t) &&
|
|
5964
5963
|
(o = `
|
|
5965
5964
|
${t.map((a) => ` - ${a}`).join(`
|
|
5966
5965
|
`)}`), `${n}${o != null ? `
|
|
@@ -5976,7 +5975,7 @@ var et = class extends Qe {
|
|
|
5976
5975
|
super({
|
|
5977
5976
|
category: "CORE-SERVER",
|
|
5978
5977
|
code: 1,
|
|
5979
|
-
message:
|
|
5978
|
+
message: Dr.dedent`
|
|
5980
5979
|
Unable to save global settings file to ${t.filePath}
|
|
5981
5980
|
${t.error && `Reason: ${t.error}`}`
|
|
5982
5981
|
});
|
|
@@ -5988,25 +5987,25 @@ var et = class extends Qe {
|
|
|
5988
5987
|
};
|
|
5989
5988
|
|
|
5990
5989
|
// src/cli/globalSettings.ts
|
|
5991
|
-
var
|
|
5992
|
-
version:
|
|
5990
|
+
var $i = (0, st.join)((0, $r.homedir)(), ".storybook", "settings.json"), Mi = 1, Li = Ie.z.object({
|
|
5991
|
+
version: Ie.z.number(),
|
|
5993
5992
|
// NOTE: every key (and subkey) below must be optional, for forwards compatibility reasons
|
|
5994
5993
|
// (we can remove keys once they are deprecated)
|
|
5995
|
-
userSince:
|
|
5996
|
-
init:
|
|
5997
|
-
}),
|
|
5998
|
-
async function
|
|
5999
|
-
if (
|
|
6000
|
-
return
|
|
5994
|
+
userSince: Ie.z.number().optional(),
|
|
5995
|
+
init: Ie.z.object({ skipOnboarding: Ie.z.boolean().optional() }).optional()
|
|
5996
|
+
}), Ce;
|
|
5997
|
+
async function Mr(s = $i) {
|
|
5998
|
+
if (Ce)
|
|
5999
|
+
return Ce;
|
|
6001
6000
|
try {
|
|
6002
|
-
let e = await tt.default.readFile(s, "utf8"), t =
|
|
6003
|
-
|
|
6001
|
+
let e = await tt.default.readFile(s, "utf8"), t = Li.parse(JSON.parse(e));
|
|
6002
|
+
Ce = new rt(s, t);
|
|
6004
6003
|
} catch {
|
|
6005
|
-
|
|
6004
|
+
Ce = new rt(s, { version: Mi, userSince: Date.now() }), await Ce.save();
|
|
6006
6005
|
}
|
|
6007
|
-
return
|
|
6006
|
+
return Ce;
|
|
6008
6007
|
}
|
|
6009
|
-
d(
|
|
6008
|
+
d(Mr, "globalSettings");
|
|
6010
6009
|
var rt = class {
|
|
6011
6010
|
static {
|
|
6012
6011
|
d(this, "Settings");
|
|
@@ -6035,33 +6034,40 @@ var rt = class {
|
|
|
6035
6034
|
};
|
|
6036
6035
|
|
|
6037
6036
|
// src/cli/bin/index.ts
|
|
6038
|
-
(0,
|
|
6039
|
-
var
|
|
6037
|
+
(0, Lr.addToGlobalContext)("cliVersion", It);
|
|
6038
|
+
var Vt = /* @__PURE__ */ d((s) => Ne.program.command(s).option(
|
|
6040
6039
|
"--disable-telemetry",
|
|
6041
6040
|
"Disable sending telemetry data",
|
|
6042
6041
|
// default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true
|
|
6043
6042
|
process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMETRY !== "false"
|
|
6044
|
-
).option("--debug", "Get more logs in debug mode", !1).option("--enable-crash-reports", "Enable sending crash reports to telemetry data").
|
|
6045
|
-
"
|
|
6043
|
+
).option("--debug", "Get more logs in debug mode", !1).option("--enable-crash-reports", "Enable sending crash reports to telemetry data").option(
|
|
6044
|
+
"--loglevel <trace | debug | info | warn | error | silent>", "Define log level", "info").option("--write-logs", "Write all debug logs to a f\
|
|
6045
|
+
ile at the end of the run").hook("preAction", async (e) => {
|
|
6046
6046
|
try {
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6047
|
+
let t = e.opts();
|
|
6048
|
+
t.loglevel && V.logger.setLogLevel(t.loglevel), t.writeLogs && V.logTracker.enableLogWriting(), await Mr();
|
|
6049
|
+
} catch (t) {
|
|
6050
|
+
V.logger.error(`Error loading global settings:
|
|
6051
|
+
` + String(t));
|
|
6052
|
+
}
|
|
6053
|
+
}).hook("postAction", async () => {
|
|
6054
|
+
if (V.logTracker.shouldWriteLogsToFile) {
|
|
6055
|
+
let e = await V.logTracker.writeToFile();
|
|
6056
|
+
V.logger.outro(`Storybook debug logs can be found at: ${e}`);
|
|
6050
6057
|
}
|
|
6051
6058
|
}), "command");
|
|
6052
|
-
|
|
6059
|
+
Vt("dev").option("-p, --port <number>", "Port to run Storybook", (s) => parseInt(s, 10)).option("-h, --host <string>", "Host to run Storyboo\
|
|
6053
6060
|
k").option("-c, --config-dir <dir-name>", "Directory where to load Storybook configurations from").option(
|
|
6054
6061
|
"--https",
|
|
6055
6062
|
"Serve Storybook over HTTPS. Note: You must provide your own certificate information."
|
|
6056
6063
|
).option(
|
|
6057
6064
|
"--ssl-ca <ca>",
|
|
6058
6065
|
"Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)",
|
|
6059
|
-
|
|
6066
|
+
Oe.parseList
|
|
6060
6067
|
).option("--ssl-cert <cert>", "Provide an SSL certificate. (Required with --https)").option("--ssl-key <key>", "Provide an SSL key. (Require\
|
|
6061
6068
|
d with --https)").option("--smoke-test", "Exit after successful start").option("--ci", "CI mode (skip interactive prompts, don't open browse\
|
|
6062
|
-
r)").option("--no-open", "Do not open Storybook automatically in the browser").option("--
|
|
6063
|
-
|
|
6064
|
-
ack", "Display final webpack configurations for debugging purposes").option(
|
|
6069
|
+
r)").option("--no-open", "Do not open Storybook automatically in the browser").option("--quiet", "Suppress verbose build output").option("--\
|
|
6070
|
+
no-version-updates", "Suppress update check", !0).option("--debug-webpack", "Display final webpack configurations for debugging purposes").option(
|
|
6065
6071
|
"--webpack-stats-json [directory]",
|
|
6066
6072
|
"Write Webpack stats JSON to disk (synonym for `--stats-json`)"
|
|
6067
6073
|
).option("--stats-json [directory]", "Write stats JSON to disk").option(
|
|
@@ -6072,20 +6078,19 @@ ly site using addon-docs").option("--exact-port", "Exit early if the desired por
|
|
|
6072
6078
|
"--initial-path [path]",
|
|
6073
6079
|
"URL path to be appended when visiting Storybook for the first time"
|
|
6074
6080
|
).option("--preview-only", "Use the preview without the manager UI").action(async (s) => {
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
`)), (0, Ie.getEnvConfig)(s, {
|
|
6081
|
+
let e = await K(__dirname);
|
|
6082
|
+
z(e, "Failed to find the closest package.json file."), V.logger.log(ge.default.bold(`${e.name} v${e.version}`) + ge.default.reset(`
|
|
6083
|
+
`)), (0, Oe.getEnvConfig)(s, {
|
|
6079
6084
|
port: "SBCONFIG_PORT",
|
|
6080
6085
|
host: "SBCONFIG_HOSTNAME",
|
|
6081
6086
|
staticDir: "SBCONFIG_STATIC_DIR",
|
|
6082
6087
|
configDir: "SBCONFIG_CONFIG_DIR",
|
|
6083
6088
|
ci: "CI"
|
|
6084
|
-
}), parseInt(`${s.port}`, 10) && (s.port = parseInt(`${s.port}`, 10)), await
|
|
6089
|
+
}), parseInt(`${s.port}`, 10) && (s.port = parseInt(`${s.port}`, 10)), await ur({ ...s, packageJson: e }).catch(() => process.exit(1));
|
|
6085
6090
|
});
|
|
6086
|
-
|
|
6087
|
-
here to load Storybook configurations from").option("--quiet", "Suppress verbose build output").option("--
|
|
6088
|
-
|
|
6091
|
+
Vt("build").option("-o, --output-dir <dir-name>", "Directory where to store built files").option("-c, --config-dir <dir-name>", "Directory w\
|
|
6092
|
+
here to load Storybook configurations from").option("--quiet", "Suppress verbose build output").option("--debug-webpack", "Display final web\
|
|
6093
|
+
pack configurations for debugging purposes").option(
|
|
6089
6094
|
"--webpack-stats-json [directory]",
|
|
6090
6095
|
"Write Webpack stats JSON to disk (synonym for `--stats-json`)"
|
|
6091
6096
|
).option("--stats-json [directory]", "Write stats JSON to disk").option(
|
|
@@ -6096,41 +6101,36 @@ ly site using addon-docs").option("--test", "Build stories optimized for testing
|
|
|
6096
6101
|
ut the manager UI").action(async (s) => {
|
|
6097
6102
|
let { env: e } = process;
|
|
6098
6103
|
e.NODE_ENV = e.NODE_ENV || "production";
|
|
6099
|
-
let t = await
|
|
6100
|
-
|
|
6101
|
-
`)), (0,
|
|
6104
|
+
let t = await K(__dirname);
|
|
6105
|
+
z(t, "Failed to find the closest package.json file."), V.logger.log(ge.default.bold(`${t.name} v${t.version}
|
|
6106
|
+
`)), (0, Oe.getEnvConfig)(s, {
|
|
6102
6107
|
staticDir: "SBCONFIG_STATIC_DIR",
|
|
6103
6108
|
outputDir: "SBCONFIG_OUTPUT_DIR",
|
|
6104
6109
|
configDir: "SBCONFIG_CONFIG_DIR"
|
|
6105
|
-
}), await
|
|
6110
|
+
}), await nr({
|
|
6106
6111
|
...s,
|
|
6107
6112
|
packageJson: t,
|
|
6108
6113
|
test: !!s.test || process.env.SB_TESTBUILD === "true"
|
|
6109
6114
|
}).catch(() => process.exit(1));
|
|
6110
6115
|
});
|
|
6111
|
-
|
|
6112
|
-
oad Storybook configurations from").option("--quiet", "Suppress verbose build output").
|
|
6113
|
-
g during build").action(async (s) => {
|
|
6116
|
+
Vt("index").option("-o, --output-file <file-name>", "JSON file to output index").option("-c, --config-dir <dir-name>", "Directory where to l\
|
|
6117
|
+
oad Storybook configurations from").option("--quiet", "Suppress verbose build output").action(async (s) => {
|
|
6114
6118
|
let { env: e } = process;
|
|
6115
6119
|
e.NODE_ENV = e.NODE_ENV || "production";
|
|
6116
|
-
let t = await
|
|
6117
|
-
|
|
6118
|
-
`)), (0,
|
|
6120
|
+
let t = await K(__dirname);
|
|
6121
|
+
z(t, "Failed to find the closest package.json file."), V.logger.log(ge.default.bold(`${t.name} v${t.version}
|
|
6122
|
+
`)), (0, Oe.getEnvConfig)(s, {
|
|
6119
6123
|
configDir: "SBCONFIG_CONFIG_DIR",
|
|
6120
6124
|
outputFile: "SBCONFIG_OUTPUT_FILE"
|
|
6121
|
-
}), await
|
|
6125
|
+
}), await ar({
|
|
6122
6126
|
...s,
|
|
6123
6127
|
packageJson: t
|
|
6124
6128
|
}).catch(() => process.exit(1));
|
|
6125
6129
|
});
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
);
|
|
6132
|
-
let t = Pe.program.commands.map((r) => r.name()).find((r) => kt(r, s) < 3);
|
|
6133
|
-
t && Ce.info(`
|
|
6134
|
-
Did you mean ${t}?`), process.exit(1);
|
|
6130
|
+
Ne.program.on("command:*", ([s]) => {
|
|
6131
|
+
let e = ` Invalid command: ${ge.default.bold(s)}.
|
|
6132
|
+
See --help for a list of available commands.`, r = Ne.program.commands.map((i) => i.name()).find((i) => wt(i, s) < 3);
|
|
6133
|
+
r && (e += `
|
|
6134
|
+
Did you mean ${ge.default.yellow(r)}?`), V.logger.error(e), process.exit(1);
|
|
6135
6135
|
});
|
|
6136
|
-
|
|
6136
|
+
Ne.program.usage("<command> [options]").version(String(It)).parse(process.argv);
|