storybook 10.0.0-beta.4 → 10.0.0-beta.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/assets/server/openBrowser.applescript +94 -0
- package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
- package/dist/_browser-chunks/{WithTooltip-ERFLZL6W.js → WithTooltip-SK46ZJ2J.js} +1 -1
- package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
- package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-AM4PZYVQ.js} +10 -63
- package/dist/_browser-chunks/{chunk-EOILZP2R.js → chunk-BOOOPFZF.js} +7 -2
- package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
- package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
- package/dist/_browser-chunks/chunk-GJ67EE65.js +67 -0
- package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
- package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
- package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
- package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
- package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
- package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-YQV3EGQ5.js} +5 -5
- package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-RJW7FE3A.js} +3 -2
- package/dist/_node-chunks/{builder-manager-IKHPPPFE.js → builder-manager-V33CQT2M.js} +26 -151
- package/dist/_node-chunks/camelcase-BZ55OCHI.js +18 -0
- package/dist/_node-chunks/{chunk-5OILJTZE.js → chunk-2DMFI367.js} +7 -7
- package/dist/_node-chunks/{chunk-DCHFG5TX.js → chunk-4TOI4VSK.js} +7 -7
- package/dist/_node-chunks/{chunk-XA4TAMUS.js → chunk-55VWKF63.js} +710 -935
- package/dist/_node-chunks/{chunk-N3GFXZDP.js → chunk-5IEY46LQ.js} +7 -7
- package/dist/_node-chunks/{chunk-YRPXGWKW.js → chunk-6PTV7XGR.js} +8 -8
- package/dist/_node-chunks/{chunk-4FMOVB65.js → chunk-7NJGTQ3W.js} +223 -243
- package/dist/_node-chunks/{chunk-4VGW2SQA.js → chunk-7WH7AGOR.js} +7 -7
- package/dist/_node-chunks/{camelcase-O2O7JODG.js → chunk-A7CUP23N.js} +9 -8
- package/dist/_node-chunks/{chunk-XT6O5CVI.js → chunk-B3AMFGAL.js} +30 -21
- package/dist/_node-chunks/{chunk-IB5AEYPX.js → chunk-BNOZ3EKF.js} +7 -7
- package/dist/_node-chunks/{chunk-TTQRDWDJ.js → chunk-DC7OWBHB.js} +12 -12
- package/dist/_node-chunks/{chunk-3J7DQ6TI.js → chunk-E6TLN2J2.js} +7 -7
- package/dist/_node-chunks/{chunk-JP4LEAXM.js → chunk-EAOPWIKA.js} +623 -750
- package/dist/_node-chunks/{chunk-YJHXEN7U.js → chunk-EY5PTUZL.js} +583 -180
- package/dist/_node-chunks/{chunk-JSSBBVU5.js → chunk-F3PO67U3.js} +7 -7
- package/dist/_node-chunks/chunk-FDDJHDCE.js +62 -0
- package/dist/_node-chunks/{chunk-6COBULLV.js → chunk-HEBHWRWL.js} +162 -103
- package/dist/_node-chunks/{chunk-USDZSU5L.js → chunk-HPFXREVG.js} +7 -7
- package/dist/_node-chunks/{chunk-JECCFKKM.js → chunk-IINJT47N.js} +7 -7
- package/dist/_node-chunks/{chunk-OL2HWCBH.js → chunk-JNHUDBJL.js} +7 -7
- package/dist/_node-chunks/{chunk-NF3GXIEK.js → chunk-JOXYGIZK.js} +9 -9
- package/dist/_node-chunks/{chunk-NOSGJ5PL.js → chunk-MLBTKECD.js} +7 -7
- package/dist/_node-chunks/{chunk-TYGVOW7L.js → chunk-NJXBURX7.js} +8 -8
- package/dist/_node-chunks/{chunk-AXFNB3AN.js → chunk-NKZ4UPPV.js} +7 -7
- package/dist/_node-chunks/{chunk-HAVE6SGK.js → chunk-NUVGSFQI.js} +7 -7
- package/dist/_node-chunks/chunk-R5DIBOM6.js +18 -0
- package/dist/_node-chunks/{chunk-AC3BNULF.js → chunk-RIPA4LFD.js} +22 -22
- package/dist/_node-chunks/{chunk-TBAIXCHN.js → chunk-TJIMCNYJ.js} +8 -8
- package/dist/_node-chunks/{chunk-SF2IETZ2.js → chunk-UYKQJMQY.js} +36 -23
- package/dist/_node-chunks/{chunk-7IIAUEWB.js → chunk-VQH4ZFTS.js} +8 -8
- package/dist/_node-chunks/{chunk-FWFQ2GU7.js → chunk-VSC6LSCQ.js} +6 -6
- package/dist/_node-chunks/{chunk-MOO2Y4GI.js → chunk-XZTBG2TG.js} +6 -6
- package/dist/_node-chunks/{dist-BMKSKYDI.js → dist-CGGAYWME.js} +9 -9
- package/dist/_node-chunks/{globby-DASPUXWI.js → globby-3IFB7BJC.js} +17 -13
- package/dist/_node-chunks/{lib-L6BIH4EV.js → lib-IT6OBSID.js} +36 -12
- package/dist/_node-chunks/{mdx-N42X6CFJ-2COTUDSL.js → mdx-N42X6CFJ-WM36SSZ6.js} +8 -8
- package/dist/_node-chunks/{p-limit-HVR3I7TJ.js → p-limit-3V5XIKA7.js} +7 -7
- package/dist/_node-chunks/{plugin-FZOHPRK7.js → plugin-3YREMMJJ.js} +10 -10
- package/dist/_node-chunks/{plugin-2XPSFYWZ.js → plugin-GJUBUKCT.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-FGQM2EPC.js → webpack-inject-mocker-runtime-plugin-DCJQFJQ5.js} +1307 -847
- package/dist/_node-chunks/{webpack-mock-plugin-4HOAIYSX.js → webpack-mock-plugin-XJNFAHBI.js} +9 -9
- package/dist/babel/index.d.ts +1 -1
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +638 -187
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +8 -8
- package/dist/cli/index.d.ts +61 -74
- package/dist/cli/index.js +56 -44
- package/dist/common/index.js +21 -21
- package/dist/components/index.js +27 -23
- package/dist/core-events/index.d.ts +18 -2
- package/dist/core-events/index.js +7 -1
- package/dist/core-server/index.js +4545 -4115
- package/dist/core-server/presets/common-manager.js +507 -747
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +691 -29
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf/index.js +6 -6
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +4 -4
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +9164 -18083
- package/dist/manager/globals.d.ts +0 -4
- package/dist/manager/globals.js +1 -6
- package/dist/manager/runtime.js +12967 -11396
- package/dist/manager-api/index.d.ts +2 -0
- package/dist/manager-api/index.js +303 -64
- package/dist/node-logger/index.d.ts +1 -1
- package/dist/node-logger/index.js +1136 -661
- package/dist/preview/runtime.js +12068 -21585
- package/dist/preview-api/index.d.ts +68 -67
- package/dist/preview-api/index.js +6 -6
- package/dist/router/index.js +2 -2
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +1872 -4023
- package/dist/theming/index.d.ts +2 -2
- package/dist/theming/index.js +6 -6
- package/dist/types/index.d.ts +4 -0
- package/package.json +7 -6
- package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
- package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
- package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
- package/dist/_node-chunks/chunk-CHJLO2LV.js +0 -62
- package/dist/_node-chunks/chunk-MNG223PY.js +0 -18
- package/dist/_node-chunks/default-browser-id-J4OIAAJ5.js +0 -1719
package/dist/bin/dispatcher.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_0v1evul49qdo from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_0v1evul49qdo from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_0v1evul49qdo from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_0v1evul49qdo.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0v1evul49qdo.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_0v1evul49qdo.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
12
12
|
// ------------------------------------------------------------
|
|
13
13
|
import {
|
|
14
14
|
versions_default
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-FDDJHDCE.js";
|
|
16
16
|
import {
|
|
17
17
|
resolvePackageDir
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-TJIMCNYJ.js";
|
|
19
19
|
import {
|
|
20
20
|
join
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-7WH7AGOR.js";
|
|
22
22
|
import {
|
|
23
23
|
require_dist
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-MLBTKECD.js";
|
|
25
25
|
import {
|
|
26
26
|
__name,
|
|
27
27
|
__toESM
|
|
28
|
-
} from "../_node-chunks/chunk-
|
|
28
|
+
} from "../_node-chunks/chunk-XZTBG2TG.js";
|
|
29
29
|
|
|
30
30
|
// src/bin/dispatcher.ts
|
|
31
31
|
import { spawn } from "node:child_process";
|
package/dist/bin/loader.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0v1evul49qdo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0v1evul49qdo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0v1evul49qdo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0v1evul49qdo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0v1evul49qdo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0v1evul49qdo.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
NODE_TARGET
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-VSC6LSCQ.js";
|
|
15
15
|
import {
|
|
16
16
|
__name
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-XZTBG2TG.js";
|
|
18
18
|
|
|
19
19
|
// src/bin/loader.ts
|
|
20
20
|
import { readFile } from "node:fs/promises";
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -913,13 +913,16 @@ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
|
913
913
|
declare namespace util {
|
|
914
914
|
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
915
915
|
export type isAny<T> = 0 extends 1 & T ? true : false;
|
|
916
|
-
export const assertEqual: <A, B>(
|
|
916
|
+
export const assertEqual: <A, B>(_: AssertEqual<A, B>) => void;
|
|
917
917
|
export function assertIs<T>(_arg: T): void;
|
|
918
918
|
export function assertNever(_x: never): never;
|
|
919
919
|
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
920
920
|
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
921
921
|
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
922
922
|
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
|
|
923
|
+
export type InexactPartial<T> = {
|
|
924
|
+
[k in keyof T]?: T[k] | undefined;
|
|
925
|
+
};
|
|
923
926
|
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
924
927
|
export const getValidEnumValues: (obj: any) => any[];
|
|
925
928
|
export const objectValues: (obj: any) => any[];
|
|
@@ -970,24 +973,24 @@ declare namespace objectUtil {
|
|
|
970
973
|
}
|
|
971
974
|
declare const ZodParsedType: {
|
|
972
975
|
string: "string";
|
|
973
|
-
number: "number";
|
|
974
|
-
bigint: "bigint";
|
|
975
|
-
boolean: "boolean";
|
|
976
|
-
symbol: "symbol";
|
|
977
|
-
undefined: "undefined";
|
|
978
|
-
object: "object";
|
|
979
|
-
function: "function";
|
|
980
|
-
map: "map";
|
|
981
976
|
nan: "nan";
|
|
977
|
+
number: "number";
|
|
982
978
|
integer: "integer";
|
|
983
979
|
float: "float";
|
|
980
|
+
boolean: "boolean";
|
|
984
981
|
date: "date";
|
|
982
|
+
bigint: "bigint";
|
|
983
|
+
symbol: "symbol";
|
|
984
|
+
function: "function";
|
|
985
|
+
undefined: "undefined";
|
|
985
986
|
null: "null";
|
|
986
987
|
array: "array";
|
|
988
|
+
object: "object";
|
|
987
989
|
unknown: "unknown";
|
|
988
990
|
promise: "promise";
|
|
989
991
|
void: "void";
|
|
990
992
|
never: "never";
|
|
993
|
+
map: "map";
|
|
991
994
|
set: "set";
|
|
992
995
|
};
|
|
993
996
|
type ZodParsedType = keyof typeof ZodParsedType;
|
|
@@ -1020,7 +1023,7 @@ declare const ZodIssueCode: {
|
|
|
1020
1023
|
type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
1021
1024
|
type ZodIssueBase = {
|
|
1022
1025
|
path: (string | number)[];
|
|
1023
|
-
message?: string;
|
|
1026
|
+
message?: string | undefined;
|
|
1024
1027
|
};
|
|
1025
1028
|
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
1026
1029
|
code: typeof ZodIssueCode.invalid_type;
|
|
@@ -1062,7 +1065,7 @@ interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
|
1062
1065
|
}
|
|
1063
1066
|
type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "jwt" | "base64url" | {
|
|
1064
1067
|
includes: string;
|
|
1065
|
-
position?: number;
|
|
1068
|
+
position?: number | undefined;
|
|
1066
1069
|
} | {
|
|
1067
1070
|
startsWith: string;
|
|
1068
1071
|
} | {
|
|
@@ -1104,7 +1107,7 @@ interface ZodCustomIssue extends ZodIssueBase {
|
|
|
1104
1107
|
}
|
|
1105
1108
|
type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
1106
1109
|
type ZodIssue = ZodIssueOptionalMessage & {
|
|
1107
|
-
fatal?: boolean;
|
|
1110
|
+
fatal?: boolean | undefined;
|
|
1108
1111
|
message: string;
|
|
1109
1112
|
};
|
|
1110
1113
|
type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
|
|
@@ -1137,7 +1140,7 @@ declare class ZodError<T = any> extends Error {
|
|
|
1137
1140
|
type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
1138
1141
|
type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
1139
1142
|
path?: (string | number)[];
|
|
1140
|
-
fatal?: boolean;
|
|
1143
|
+
fatal?: boolean | undefined;
|
|
1141
1144
|
};
|
|
1142
1145
|
type ErrorMapCtx = {
|
|
1143
1146
|
defaultError: string;
|
|
@@ -1157,11 +1160,11 @@ type ParsePath = ParsePathComponent[];
|
|
|
1157
1160
|
interface ParseContext {
|
|
1158
1161
|
readonly common: {
|
|
1159
1162
|
readonly issues: ZodIssue[];
|
|
1160
|
-
readonly contextualErrorMap?: ZodErrorMap;
|
|
1163
|
+
readonly contextualErrorMap?: ZodErrorMap | undefined;
|
|
1161
1164
|
readonly async: boolean;
|
|
1162
1165
|
};
|
|
1163
1166
|
readonly path: ParsePath;
|
|
1164
|
-
readonly schemaErrorMap?: ZodErrorMap;
|
|
1167
|
+
readonly schemaErrorMap?: ZodErrorMap | undefined;
|
|
1165
1168
|
readonly parent: ParseContext | null;
|
|
1166
1169
|
readonly data: any;
|
|
1167
1170
|
readonly parsedType: ZodParsedType;
|
|
@@ -1215,7 +1218,7 @@ declare namespace enumUtil {
|
|
|
1215
1218
|
|
|
1216
1219
|
declare namespace errorUtil {
|
|
1217
1220
|
type ErrMessage = string | {
|
|
1218
|
-
message?: string;
|
|
1221
|
+
message?: string | undefined;
|
|
1219
1222
|
};
|
|
1220
1223
|
const errToObj: (message?: ErrMessage) => {
|
|
1221
1224
|
message?: string | undefined;
|
|
@@ -1348,15 +1351,15 @@ type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
|
1348
1351
|
|
|
1349
1352
|
type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
1350
1353
|
interface ZodTypeDef {
|
|
1351
|
-
errorMap?: ZodErrorMap;
|
|
1352
|
-
description?: string;
|
|
1354
|
+
errorMap?: ZodErrorMap | undefined;
|
|
1355
|
+
description?: string | undefined;
|
|
1353
1356
|
}
|
|
1354
1357
|
type RawCreateParams = {
|
|
1355
|
-
errorMap?: ZodErrorMap;
|
|
1356
|
-
invalid_type_error?: string;
|
|
1357
|
-
required_error?: string;
|
|
1358
|
-
message?: string;
|
|
1359
|
-
description?: string;
|
|
1358
|
+
errorMap?: ZodErrorMap | undefined;
|
|
1359
|
+
invalid_type_error?: string | undefined;
|
|
1360
|
+
required_error?: string | undefined;
|
|
1361
|
+
message?: string | undefined;
|
|
1362
|
+
description?: string | undefined;
|
|
1360
1363
|
} | undefined;
|
|
1361
1364
|
type SafeParseSuccess<Output> = {
|
|
1362
1365
|
success: true;
|
|
@@ -1385,13 +1388,13 @@ declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef
|
|
|
1385
1388
|
};
|
|
1386
1389
|
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
1387
1390
|
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
1388
|
-
parse(data: unknown, params?:
|
|
1389
|
-
safeParse(data: unknown, params?:
|
|
1391
|
+
parse(data: unknown, params?: util.InexactPartial<ParseParams>): Output;
|
|
1392
|
+
safeParse(data: unknown, params?: util.InexactPartial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
1390
1393
|
"~validate"(data: unknown): StandardSchemaV1.Result<Output> | Promise<StandardSchemaV1.Result<Output>>;
|
|
1391
|
-
parseAsync(data: unknown, params?:
|
|
1392
|
-
safeParseAsync(data: unknown, params?:
|
|
1394
|
+
parseAsync(data: unknown, params?: util.InexactPartial<ParseParams>): Promise<Output>;
|
|
1395
|
+
safeParseAsync(data: unknown, params?: util.InexactPartial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
1393
1396
|
/** Alias of safeParseAsync */
|
|
1394
|
-
spa: (data: unknown, params?:
|
|
1397
|
+
spa: (data: unknown, params?: util.InexactPartial<ParseParams>) => Promise<SafeParseReturnType<Input, Output>>;
|
|
1395
1398
|
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
1396
1399
|
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
1397
1400
|
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
@@ -1427,22 +1430,22 @@ type ZodNumberCheck = {
|
|
|
1427
1430
|
kind: "min";
|
|
1428
1431
|
value: number;
|
|
1429
1432
|
inclusive: boolean;
|
|
1430
|
-
message?: string;
|
|
1433
|
+
message?: string | undefined;
|
|
1431
1434
|
} | {
|
|
1432
1435
|
kind: "max";
|
|
1433
1436
|
value: number;
|
|
1434
1437
|
inclusive: boolean;
|
|
1435
|
-
message?: string;
|
|
1438
|
+
message?: string | undefined;
|
|
1436
1439
|
} | {
|
|
1437
1440
|
kind: "int";
|
|
1438
|
-
message?: string;
|
|
1441
|
+
message?: string | undefined;
|
|
1439
1442
|
} | {
|
|
1440
1443
|
kind: "multipleOf";
|
|
1441
1444
|
value: number;
|
|
1442
|
-
message?: string;
|
|
1445
|
+
message?: string | undefined;
|
|
1443
1446
|
} | {
|
|
1444
1447
|
kind: "finite";
|
|
1445
|
-
message?: string;
|
|
1448
|
+
message?: string | undefined;
|
|
1446
1449
|
};
|
|
1447
1450
|
interface ZodNumberDef extends ZodTypeDef {
|
|
1448
1451
|
checks: ZodNumberCheck[];
|
|
@@ -1491,15 +1494,15 @@ interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1491
1494
|
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
1492
1495
|
exactLength: {
|
|
1493
1496
|
value: number;
|
|
1494
|
-
message?: string;
|
|
1497
|
+
message?: string | undefined;
|
|
1495
1498
|
} | null;
|
|
1496
1499
|
minLength: {
|
|
1497
1500
|
value: number;
|
|
1498
|
-
message?: string;
|
|
1501
|
+
message?: string | undefined;
|
|
1499
1502
|
} | null;
|
|
1500
1503
|
maxLength: {
|
|
1501
1504
|
value: number;
|
|
1502
|
-
message?: string;
|
|
1505
|
+
message?: string | undefined;
|
|
1503
1506
|
} | null;
|
|
1504
1507
|
}
|
|
1505
1508
|
type ArrayCardinality = "many" | "atleastone";
|
|
@@ -1511,7 +1514,7 @@ declare class ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinalit
|
|
|
1511
1514
|
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
1512
1515
|
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
1513
1516
|
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
1514
|
-
static create: <
|
|
1517
|
+
static create: <El extends ZodTypeAny>(schema: El, params?: RawCreateParams) => ZodArray<El>;
|
|
1515
1518
|
}
|
|
1516
1519
|
type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
1517
1520
|
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
@@ -1596,24 +1599,20 @@ declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysPa
|
|
|
1596
1599
|
[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
|
|
1597
1600
|
}>, UnknownKeys, Catchall>;
|
|
1598
1601
|
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
1599
|
-
static create: <
|
|
1600
|
-
static strictCreate: <
|
|
1601
|
-
static lazycreate: <
|
|
1602
|
+
static create: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strip", ZodTypeAny, objectOutputType<Shape, ZodTypeAny, "strip">, objectInputType<Shape, ZodTypeAny, "strip">>;
|
|
1603
|
+
static strictCreate: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strict">;
|
|
1604
|
+
static lazycreate: <Shape extends ZodRawShape>(shape: () => Shape, params?: RawCreateParams) => ZodObject<Shape, "strip">;
|
|
1602
1605
|
}
|
|
1603
1606
|
type AnyZodObject = ZodObject<any, any, any>;
|
|
1604
1607
|
type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
1605
|
-
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
1606
|
-
ZodTypeAny,
|
|
1607
|
-
ZodTypeAny,
|
|
1608
|
-
...ZodTypeAny[]
|
|
1609
|
-
]>> extends ZodTypeDef {
|
|
1608
|
+
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>> extends ZodTypeDef {
|
|
1610
1609
|
options: T;
|
|
1611
1610
|
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
1612
1611
|
}
|
|
1613
1612
|
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
1614
1613
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1615
1614
|
get options(): T;
|
|
1616
|
-
static create: <
|
|
1615
|
+
static create: <Options extends Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>>(types: Options, params?: RawCreateParams) => ZodUnion<Options>;
|
|
1617
1616
|
}
|
|
1618
1617
|
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1619
1618
|
left: T;
|
|
@@ -1622,7 +1621,7 @@ interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTyp
|
|
|
1622
1621
|
}
|
|
1623
1622
|
declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
1624
1623
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1625
|
-
static create: <
|
|
1624
|
+
static create: <TSchema extends ZodTypeAny, USchema extends ZodTypeAny>(left: TSchema, right: USchema, params?: RawCreateParams) => ZodIntersection<TSchema, USchema>;
|
|
1626
1625
|
}
|
|
1627
1626
|
type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
1628
1627
|
type AssertArray<T> = T extends any[] ? T : never;
|
|
@@ -1639,11 +1638,11 @@ interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends
|
|
|
1639
1638
|
rest: Rest;
|
|
1640
1639
|
typeName: ZodFirstPartyTypeKind.ZodTuple;
|
|
1641
1640
|
}
|
|
1642
|
-
declare class ZodTuple<T extends
|
|
1641
|
+
declare class ZodTuple<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
|
|
1643
1642
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1644
1643
|
get items(): T;
|
|
1645
|
-
rest<
|
|
1646
|
-
static create: <
|
|
1644
|
+
rest<RestSchema extends ZodTypeAny>(rest: RestSchema): ZodTuple<T, RestSchema>;
|
|
1645
|
+
static create: <Items extends [ZodTypeAny, ...ZodTypeAny[]] | []>(schemas: Items, params?: RawCreateParams) => ZodTuple<Items, null>;
|
|
1647
1646
|
}
|
|
1648
1647
|
type EnumValues<T extends string = string> = readonly [T, ...T[]];
|
|
1649
1648
|
type Values<T extends EnumValues> = {
|
|
@@ -1661,7 +1660,7 @@ type typecast<A, T> = A extends T ? A : never;
|
|
|
1661
1660
|
declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
|
|
1662
1661
|
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
|
|
1663
1662
|
declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>, T[number]> {
|
|
1664
|
-
|
|
1663
|
+
_cache: Set<T[number]> | undefined;
|
|
1665
1664
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1666
1665
|
get options(): T;
|
|
1667
1666
|
get enum(): Values<T>;
|
|
@@ -1678,7 +1677,7 @@ interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1678
1677
|
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
1679
1678
|
unwrap(): T;
|
|
1680
1679
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1681
|
-
static create: <
|
|
1680
|
+
static create: <Inner extends ZodTypeAny>(schema: Inner, params?: RawCreateParams) => ZodPromise<Inner>;
|
|
1682
1681
|
}
|
|
1683
1682
|
type RefinementEffect<T> = {
|
|
1684
1683
|
type: "refinement";
|
|
@@ -1713,7 +1712,7 @@ interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1713
1712
|
declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
1714
1713
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1715
1714
|
unwrap(): T;
|
|
1716
|
-
static create: <
|
|
1715
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodOptional<Inner>;
|
|
1717
1716
|
}
|
|
1718
1717
|
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1719
1718
|
innerType: T;
|
|
@@ -1722,7 +1721,7 @@ interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1722
1721
|
declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
1723
1722
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1724
1723
|
unwrap(): T;
|
|
1725
|
-
static create: <
|
|
1724
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodNullable<Inner>;
|
|
1726
1725
|
}
|
|
1727
1726
|
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1728
1727
|
innerType: T;
|
|
@@ -1732,15 +1731,9 @@ interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1732
1731
|
declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
1733
1732
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1734
1733
|
removeDefault(): T;
|
|
1735
|
-
static create: <
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
required_error?: string | undefined;
|
|
1739
|
-
message?: string | undefined;
|
|
1740
|
-
description?: string | undefined;
|
|
1741
|
-
} & {
|
|
1742
|
-
default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
|
|
1743
|
-
}) => ZodDefault<T_1>;
|
|
1734
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params: RawCreateParams & {
|
|
1735
|
+
default: Inner["_input"] | (() => util.noUndefined<Inner["_input"]>);
|
|
1736
|
+
}) => ZodDefault<Inner>;
|
|
1744
1737
|
}
|
|
1745
1738
|
interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1746
1739
|
innerType: T;
|
|
@@ -1753,15 +1746,9 @@ interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1753
1746
|
declare class ZodCatch<T extends ZodTypeAny> extends ZodType<T["_output"], ZodCatchDef<T>, unknown> {
|
|
1754
1747
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1755
1748
|
removeCatch(): T;
|
|
1756
|
-
static create: <
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
required_error?: string | undefined;
|
|
1760
|
-
message?: string | undefined;
|
|
1761
|
-
description?: string | undefined;
|
|
1762
|
-
} & {
|
|
1763
|
-
catch: T_1["_output"] | (() => T_1["_output"]);
|
|
1764
|
-
}) => ZodCatch<T_1>;
|
|
1749
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params: RawCreateParams & {
|
|
1750
|
+
catch: Inner["_output"] | (() => Inner["_output"]);
|
|
1751
|
+
}) => ZodCatch<Inner>;
|
|
1765
1752
|
}
|
|
1766
1753
|
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
1767
1754
|
type: T;
|
|
@@ -1784,7 +1771,7 @@ interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends Zod
|
|
|
1784
1771
|
}
|
|
1785
1772
|
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
1786
1773
|
_parse(input: ParseInput): ParseReturnType<any>;
|
|
1787
|
-
static create<
|
|
1774
|
+
static create<ASchema extends ZodTypeAny, BSchema extends ZodTypeAny>(a: ASchema, b: BSchema): ZodPipeline<ASchema, BSchema>;
|
|
1788
1775
|
}
|
|
1789
1776
|
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
1790
1777
|
readonly [Symbol.toStringTag]: string;
|
|
@@ -1796,7 +1783,7 @@ interface ZodReadonlyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1796
1783
|
}
|
|
1797
1784
|
declare class ZodReadonly<T extends ZodTypeAny> extends ZodType<MakeReadonly<T["_output"]>, ZodReadonlyDef<T>, MakeReadonly<T["_input"]>> {
|
|
1798
1785
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1799
|
-
static create: <
|
|
1786
|
+
static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodReadonly<Inner>;
|
|
1800
1787
|
unwrap(): T;
|
|
1801
1788
|
}
|
|
1802
1789
|
declare enum ZodFirstPartyTypeKind {
|
package/dist/cli/index.js
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0v1evul49qdo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0v1evul49qdo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0v1evul49qdo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0v1evul49qdo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0v1evul49qdo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0v1evul49qdo.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
boxen
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-EAOPWIKA.js";
|
|
15
|
+
import "../_node-chunks/chunk-A7CUP23N.js";
|
|
15
16
|
import {
|
|
16
17
|
Settings,
|
|
17
18
|
_clearGlobalSettings,
|
|
18
19
|
globalSettings
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-7NJGTQ3W.js";
|
|
20
21
|
import {
|
|
21
22
|
any,
|
|
22
23
|
up2 as up
|
|
23
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-F3PO67U3.js";
|
|
24
25
|
import {
|
|
25
26
|
invariant
|
|
26
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-HPFXREVG.js";
|
|
27
28
|
import {
|
|
28
29
|
resolvePackageDir
|
|
29
|
-
} from "../_node-chunks/chunk-
|
|
30
|
-
import "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-TJIMCNYJ.js";
|
|
31
|
+
import "../_node-chunks/chunk-7WH7AGOR.js";
|
|
31
32
|
import {
|
|
32
33
|
require_prompts
|
|
33
|
-
} from "../_node-chunks/chunk-
|
|
34
|
+
} from "../_node-chunks/chunk-E6TLN2J2.js";
|
|
34
35
|
import {
|
|
35
36
|
require_dist
|
|
36
|
-
} from "../_node-chunks/chunk-
|
|
37
|
+
} from "../_node-chunks/chunk-MLBTKECD.js";
|
|
37
38
|
import {
|
|
38
39
|
babelParse,
|
|
39
40
|
recast,
|
|
40
41
|
traverse,
|
|
41
42
|
types
|
|
42
|
-
} from "../_node-chunks/chunk-
|
|
43
|
-
import "../_node-chunks/chunk-
|
|
44
|
-
import "../_node-chunks/chunk-
|
|
43
|
+
} from "../_node-chunks/chunk-EY5PTUZL.js";
|
|
44
|
+
import "../_node-chunks/chunk-HEBHWRWL.js";
|
|
45
|
+
import "../_node-chunks/chunk-NKZ4UPPV.js";
|
|
45
46
|
import {
|
|
46
47
|
require_picocolors
|
|
47
|
-
} from "../_node-chunks/chunk-
|
|
48
|
+
} from "../_node-chunks/chunk-5IEY46LQ.js";
|
|
48
49
|
import {
|
|
49
50
|
__commonJS,
|
|
50
51
|
__name,
|
|
51
52
|
__require,
|
|
52
53
|
__toESM
|
|
53
|
-
} from "../_node-chunks/chunk-
|
|
54
|
+
} from "../_node-chunks/chunk-XZTBG2TG.js";
|
|
54
55
|
|
|
55
56
|
// ../node_modules/wrappy/wrappy.js
|
|
56
57
|
var require_wrappy = __commonJS({
|
|
@@ -136,6 +137,7 @@ var require_end_of_stream = __commonJS({
|
|
|
136
137
|
var once = require_once();
|
|
137
138
|
var noop = /* @__PURE__ */ __name(function() {
|
|
138
139
|
}, "noop");
|
|
140
|
+
var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
|
|
139
141
|
var isRequest = /* @__PURE__ */ __name(function(stream) {
|
|
140
142
|
return stream.setHeader && typeof stream.abort === "function";
|
|
141
143
|
}, "isRequest");
|
|
@@ -169,7 +171,7 @@ var require_end_of_stream = __commonJS({
|
|
|
169
171
|
callback.call(stream, err);
|
|
170
172
|
}, "onerror");
|
|
171
173
|
var onclose = /* @__PURE__ */ __name(function() {
|
|
172
|
-
|
|
174
|
+
qnt(onclosenexttick);
|
|
173
175
|
}, "onclose");
|
|
174
176
|
var onclosenexttick = /* @__PURE__ */ __name(function() {
|
|
175
177
|
if (cancelled) return;
|
|
@@ -224,7 +226,7 @@ var require_pump = __commonJS({
|
|
|
224
226
|
}
|
|
225
227
|
var noop = /* @__PURE__ */ __name(function() {
|
|
226
228
|
}, "noop");
|
|
227
|
-
var ancient = /^v?\.0/.test(process.version);
|
|
229
|
+
var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version);
|
|
228
230
|
var isFn = /* @__PURE__ */ __name(function(fn) {
|
|
229
231
|
return typeof fn === "function";
|
|
230
232
|
}, "isFn");
|
|
@@ -4643,7 +4645,7 @@ var require_tar_fs = __commonJS({
|
|
|
4643
4645
|
if (win32) return next();
|
|
4644
4646
|
xfs.unlink(name, function() {
|
|
4645
4647
|
var dst = path.resolve(path.dirname(name), header.linkname);
|
|
4646
|
-
if (!dst
|
|
4648
|
+
if (!inCwd(dst, cwd)) return next(new Error(name + " is not a valid symlink"));
|
|
4647
4649
|
xfs.symlink(header.linkname, name, stat);
|
|
4648
4650
|
});
|
|
4649
4651
|
}, "onsymlink");
|
|
@@ -4651,12 +4653,15 @@ var require_tar_fs = __commonJS({
|
|
|
4651
4653
|
if (win32) return next();
|
|
4652
4654
|
xfs.unlink(name, function() {
|
|
4653
4655
|
var srcpath = path.join(cwd, path.join("/", header.linkname));
|
|
4654
|
-
xfs.
|
|
4655
|
-
if (err
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4656
|
+
xfs.realpath(srcpath, function(err, dst) {
|
|
4657
|
+
if (err || !inCwd(dst, cwd)) return next(new Error(name + " is not a valid hardlink"));
|
|
4658
|
+
xfs.link(dst, name, function(err2) {
|
|
4659
|
+
if (err2 && err2.code === "EPERM" && opts.hardlinkAsFilesFallback) {
|
|
4660
|
+
stream = xfs.createReadStream(srcpath);
|
|
4661
|
+
return onfile();
|
|
4662
|
+
}
|
|
4663
|
+
stat(err2);
|
|
4664
|
+
});
|
|
4660
4665
|
});
|
|
4661
4666
|
});
|
|
4662
4667
|
}, "onlink");
|
|
@@ -4727,6 +4732,11 @@ var require_tar_fs = __commonJS({
|
|
|
4727
4732
|
});
|
|
4728
4733
|
}
|
|
4729
4734
|
__name(mkdirfix, "mkdirfix");
|
|
4735
|
+
function inCwd(dst, cwd) {
|
|
4736
|
+
cwd = path.resolve(cwd);
|
|
4737
|
+
return cwd === dst || dst.startsWith(cwd + path.sep);
|
|
4738
|
+
}
|
|
4739
|
+
__name(inCwd, "inCwd");
|
|
4730
4740
|
}
|
|
4731
4741
|
});
|
|
4732
4742
|
|
|
@@ -27461,7 +27471,7 @@ import { coerce, satisfies } from "semver";
|
|
|
27461
27471
|
var singleComment = Symbol("singleComment");
|
|
27462
27472
|
var multiComment = Symbol("multiComment");
|
|
27463
27473
|
var stripWithoutWhitespace = /* @__PURE__ */ __name(() => "", "stripWithoutWhitespace");
|
|
27464
|
-
var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(
|
|
27474
|
+
var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(/[^ \t\r\n]/g, " "), "stripWithWhitespace");
|
|
27465
27475
|
var isEscaped = /* @__PURE__ */ __name((jsonString, quotePosition) => {
|
|
27466
27476
|
let index = quotePosition - 1;
|
|
27467
27477
|
let backslashCount = 0;
|
|
@@ -27542,7 +27552,8 @@ function stripJsonComments(jsonString, { whitespace = true, trailingCommas = fal
|
|
|
27542
27552
|
}
|
|
27543
27553
|
}
|
|
27544
27554
|
}
|
|
27545
|
-
|
|
27555
|
+
const remaining = isInsideComment === singleComment ? strip(jsonString, offset) : jsonString.slice(offset);
|
|
27556
|
+
return result + buffer + remaining;
|
|
27546
27557
|
}
|
|
27547
27558
|
__name(stripJsonComments, "stripJsonComments");
|
|
27548
27559
|
|
|
@@ -28323,6 +28334,10 @@ import { logger as logger4, prompt } from "storybook/internal/node-logger";
|
|
|
28323
28334
|
var INDENT_REGEX = /^(?:( )+|\t+)/;
|
|
28324
28335
|
var INDENT_TYPE_SPACE = "space";
|
|
28325
28336
|
var INDENT_TYPE_TAB = "tab";
|
|
28337
|
+
function shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, value) {
|
|
28338
|
+
return ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && value === 1;
|
|
28339
|
+
}
|
|
28340
|
+
__name(shouldIgnoreSingleSpace, "shouldIgnoreSingleSpace");
|
|
28326
28341
|
function makeIndentsMap(string, ignoreSingleSpaces) {
|
|
28327
28342
|
const indents = /* @__PURE__ */ new Map();
|
|
28328
28343
|
let previousSize = 0;
|
|
@@ -28332,39 +28347,36 @@ function makeIndentsMap(string, ignoreSingleSpaces) {
|
|
|
28332
28347
|
if (!line) {
|
|
28333
28348
|
continue;
|
|
28334
28349
|
}
|
|
28335
|
-
let indent;
|
|
28336
|
-
let indentType;
|
|
28337
|
-
let use;
|
|
28338
|
-
let weight;
|
|
28339
|
-
let entry;
|
|
28340
28350
|
const matches = line.match(INDENT_REGEX);
|
|
28341
28351
|
if (matches === null) {
|
|
28342
28352
|
previousSize = 0;
|
|
28343
28353
|
previousIndentType = "";
|
|
28344
28354
|
} else {
|
|
28345
|
-
indent = matches[0].length;
|
|
28346
|
-
indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
|
|
28347
|
-
if (ignoreSingleSpaces
|
|
28355
|
+
const indent = matches[0].length;
|
|
28356
|
+
const indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
|
|
28357
|
+
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, indent)) {
|
|
28348
28358
|
continue;
|
|
28349
28359
|
}
|
|
28350
28360
|
if (indentType !== previousIndentType) {
|
|
28351
28361
|
previousSize = 0;
|
|
28352
28362
|
}
|
|
28353
28363
|
previousIndentType = indentType;
|
|
28354
|
-
use = 1;
|
|
28355
|
-
weight = 0;
|
|
28364
|
+
let use = 1;
|
|
28365
|
+
let weight = 0;
|
|
28356
28366
|
const indentDifference = indent - previousSize;
|
|
28357
28367
|
previousSize = indent;
|
|
28358
28368
|
if (indentDifference === 0) {
|
|
28359
28369
|
use = 0;
|
|
28360
28370
|
weight = 1;
|
|
28361
28371
|
} else {
|
|
28362
|
-
const absoluteIndentDifference = indentDifference
|
|
28372
|
+
const absoluteIndentDifference = Math.abs(indentDifference);
|
|
28373
|
+
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, absoluteIndentDifference)) {
|
|
28374
|
+
continue;
|
|
28375
|
+
}
|
|
28363
28376
|
key = encodeIndentsKey(indentType, absoluteIndentDifference);
|
|
28364
28377
|
}
|
|
28365
|
-
entry = indents.get(key);
|
|
28366
|
-
|
|
28367
|
-
indents.set(key, entry);
|
|
28378
|
+
const entry = indents.get(key);
|
|
28379
|
+
indents.set(key, entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight]);
|
|
28368
28380
|
}
|
|
28369
28381
|
}
|
|
28370
28382
|
return indents;
|