@rspack/core 0.6.4 → 0.6.5-canary-73c31ab-20240510004618

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.
Files changed (58) hide show
  1. package/compiled/browserslist/index.d.ts +1 -0
  2. package/compiled/browserslist/index.js +2028 -0
  3. package/compiled/browserslist/license +20 -0
  4. package/compiled/browserslist/package.json +1 -0
  5. package/compiled/graceful-fs/index.d.ts +13 -0
  6. package/compiled/graceful-fs/index.js +1063 -0
  7. package/compiled/graceful-fs/license +15 -0
  8. package/compiled/graceful-fs/package.json +1 -0
  9. package/compiled/json-parse-even-better-errors/index.d.ts +1 -0
  10. package/compiled/json-parse-even-better-errors/index.js +193 -0
  11. package/compiled/json-parse-even-better-errors/package.json +1 -0
  12. package/compiled/neo-async/index.d.ts +685 -0
  13. package/compiled/neo-async/index.js +9207 -0
  14. package/compiled/neo-async/license +22 -0
  15. package/compiled/neo-async/package.json +1 -0
  16. package/compiled/watchpack/index.d.ts +216 -0
  17. package/compiled/watchpack/index.js +2075 -0
  18. package/compiled/watchpack/license +20 -0
  19. package/compiled/watchpack/package.json +1 -0
  20. package/compiled/zod/index.d.ts +1647 -0
  21. package/compiled/zod/index.js +4208 -0
  22. package/compiled/zod/license +21 -0
  23. package/compiled/zod/package.json +1 -0
  24. package/compiled/zod-validation-error/index.d.ts +188 -0
  25. package/compiled/zod-validation-error/index.js +4367 -0
  26. package/compiled/zod-validation-error/license +9 -0
  27. package/compiled/zod-validation-error/package.json +1 -0
  28. package/dist/ChunkGroup.d.ts +2 -0
  29. package/dist/ChunkGroup.js +4 -0
  30. package/dist/Compiler.d.ts +2 -2
  31. package/dist/MultiCompiler.js +1 -1
  32. package/dist/MultiWatching.js +1 -1
  33. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/BannerPlugin.js +1 -1
  35. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/HtmlRspackPlugin.js +1 -1
  37. package/dist/builtin-plugin/IgnorePlugin.js +1 -1
  38. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +15 -0
  39. package/dist/builtin-plugin/SizeLimitsPlugin.js +9 -0
  40. package/dist/builtin-plugin/index.d.ts +1 -0
  41. package/dist/builtin-plugin/index.js +1 -0
  42. package/dist/config/browserslistTargetHandler.js +1 -1
  43. package/dist/config/defaults.js +15 -0
  44. package/dist/config/normalization.d.ts +2 -1
  45. package/dist/config/normalization.js +1 -0
  46. package/dist/config/zod.d.ts +60 -6
  47. package/dist/config/zod.js +16 -2
  48. package/dist/exports.d.ts +2 -0
  49. package/dist/exports.js +15 -10
  50. package/dist/lib/CacheFacade.js +1 -1
  51. package/dist/loader-runner/index.js +1 -1
  52. package/dist/node/NodeEnvironmentPlugin.js +1 -1
  53. package/dist/node/NodeWatchFileSystem.d.ts +3 -3
  54. package/dist/node/NodeWatchFileSystem.js +1 -1
  55. package/dist/rspackOptionsApply.js +4 -1
  56. package/dist/util/validate.d.ts +1 -1
  57. package/dist/util/validate.js +1 -1
  58. package/package.json +21 -14
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Colin McDonnell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"zod","author":"Colin McDonnell <colin@colinhacks.com>","version":"3.22.4","funding":"https://github.com/sponsors/colinhacks","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -0,0 +1,188 @@
1
+ declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
2
+
3
+ declare const ZodParsedType: {
4
+ function: "function";
5
+ number: "number";
6
+ string: "string";
7
+ nan: "nan";
8
+ integer: "integer";
9
+ float: "float";
10
+ boolean: "boolean";
11
+ date: "date";
12
+ bigint: "bigint";
13
+ symbol: "symbol";
14
+ undefined: "undefined";
15
+ null: "null";
16
+ array: "array";
17
+ object: "object";
18
+ unknown: "unknown";
19
+ promise: "promise";
20
+ void: "void";
21
+ never: "never";
22
+ map: "map";
23
+ set: "set";
24
+ };
25
+ declare type ZodParsedType = keyof typeof ZodParsedType;
26
+
27
+ declare type allKeys<T> = T extends any ? keyof T : never;
28
+ declare type typeToFlattenedError<T, U = string> = {
29
+ formErrors: U[];
30
+ fieldErrors: {
31
+ [P in allKeys<T>]?: U[];
32
+ };
33
+ };
34
+ declare const ZodIssueCode: {
35
+ invalid_type: "invalid_type";
36
+ invalid_literal: "invalid_literal";
37
+ custom: "custom";
38
+ invalid_union: "invalid_union";
39
+ invalid_union_discriminator: "invalid_union_discriminator";
40
+ invalid_enum_value: "invalid_enum_value";
41
+ unrecognized_keys: "unrecognized_keys";
42
+ invalid_arguments: "invalid_arguments";
43
+ invalid_return_type: "invalid_return_type";
44
+ invalid_date: "invalid_date";
45
+ invalid_string: "invalid_string";
46
+ too_small: "too_small";
47
+ too_big: "too_big";
48
+ invalid_intersection_types: "invalid_intersection_types";
49
+ not_multiple_of: "not_multiple_of";
50
+ not_finite: "not_finite";
51
+ };
52
+ declare type ZodIssueCode = keyof typeof ZodIssueCode;
53
+ declare type ZodIssueBase = {
54
+ path: (string | number)[];
55
+ message?: string;
56
+ };
57
+ interface ZodInvalidTypeIssue extends ZodIssueBase {
58
+ code: typeof ZodIssueCode.invalid_type;
59
+ expected: ZodParsedType;
60
+ received: ZodParsedType;
61
+ }
62
+ interface ZodInvalidLiteralIssue extends ZodIssueBase {
63
+ code: typeof ZodIssueCode.invalid_literal;
64
+ expected: unknown;
65
+ received: unknown;
66
+ }
67
+ interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
68
+ code: typeof ZodIssueCode.unrecognized_keys;
69
+ keys: string[];
70
+ }
71
+ interface ZodInvalidUnionIssue extends ZodIssueBase {
72
+ code: typeof ZodIssueCode.invalid_union;
73
+ unionErrors: ZodError$1[];
74
+ }
75
+ interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
76
+ code: typeof ZodIssueCode.invalid_union_discriminator;
77
+ options: Primitive[];
78
+ }
79
+ interface ZodInvalidEnumValueIssue extends ZodIssueBase {
80
+ received: string | number;
81
+ code: typeof ZodIssueCode.invalid_enum_value;
82
+ options: (string | number)[];
83
+ }
84
+ interface ZodInvalidArgumentsIssue extends ZodIssueBase {
85
+ code: typeof ZodIssueCode.invalid_arguments;
86
+ argumentsError: ZodError$1;
87
+ }
88
+ interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
89
+ code: typeof ZodIssueCode.invalid_return_type;
90
+ returnTypeError: ZodError$1;
91
+ }
92
+ interface ZodInvalidDateIssue extends ZodIssueBase {
93
+ code: typeof ZodIssueCode.invalid_date;
94
+ }
95
+ declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "ip" | {
96
+ includes: string;
97
+ position?: number;
98
+ } | {
99
+ startsWith: string;
100
+ } | {
101
+ endsWith: string;
102
+ };
103
+ interface ZodInvalidStringIssue extends ZodIssueBase {
104
+ code: typeof ZodIssueCode.invalid_string;
105
+ validation: StringValidation;
106
+ }
107
+ interface ZodTooSmallIssue extends ZodIssueBase {
108
+ code: typeof ZodIssueCode.too_small;
109
+ minimum: number | bigint;
110
+ inclusive: boolean;
111
+ exact?: boolean;
112
+ type: "array" | "string" | "number" | "set" | "date" | "bigint";
113
+ }
114
+ interface ZodTooBigIssue extends ZodIssueBase {
115
+ code: typeof ZodIssueCode.too_big;
116
+ maximum: number | bigint;
117
+ inclusive: boolean;
118
+ exact?: boolean;
119
+ type: "array" | "string" | "number" | "set" | "date" | "bigint";
120
+ }
121
+ interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
122
+ code: typeof ZodIssueCode.invalid_intersection_types;
123
+ }
124
+ interface ZodNotMultipleOfIssue extends ZodIssueBase {
125
+ code: typeof ZodIssueCode.not_multiple_of;
126
+ multipleOf: number | bigint;
127
+ }
128
+ interface ZodNotFiniteIssue extends ZodIssueBase {
129
+ code: typeof ZodIssueCode.not_finite;
130
+ }
131
+ interface ZodCustomIssue extends ZodIssueBase {
132
+ code: typeof ZodIssueCode.custom;
133
+ params?: {
134
+ [k: string]: any;
135
+ };
136
+ }
137
+ declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
138
+ declare type ZodIssue = ZodIssueOptionalMessage & {
139
+ fatal?: boolean;
140
+ message: string;
141
+ };
142
+ declare type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
143
+ [K in keyof T]?: ZodFormattedError<T[K]>;
144
+ } : T extends any[] ? {
145
+ [k: number]: ZodFormattedError<T[number]>;
146
+ } : T extends object ? {
147
+ [K in keyof T]?: ZodFormattedError<T[K]>;
148
+ } : unknown;
149
+ declare type ZodFormattedError<T, U = string> = {
150
+ _errors: U[];
151
+ } & recursiveZodFormattedError<NonNullable<T>>;
152
+ declare class ZodError$1<T = any> extends Error {
153
+ issues: ZodIssue[];
154
+ get errors(): ZodIssue[];
155
+ constructor(issues: ZodIssue[]);
156
+ format(): ZodFormattedError<T>;
157
+ format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
158
+ static create: (issues: ZodIssue[]) => ZodError$1<any>;
159
+ toString(): string;
160
+ get message(): string;
161
+ get isEmpty(): boolean;
162
+ addIssue: (sub: ZodIssue) => void;
163
+ addIssues: (subs?: ZodIssue[]) => void;
164
+ flatten(): typeToFlattenedError<T>;
165
+ flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
166
+ get formErrors(): typeToFlattenedError<T, string>;
167
+ }
168
+
169
+ declare class ValidationError extends Error {
170
+ details: Array<ZodIssue>;
171
+ name: 'ZodValidationError';
172
+ constructor(message: string, details?: Array<ZodIssue> | undefined);
173
+ toString(): string;
174
+ }
175
+ type ZodError = ZodError$1;
176
+ type FromZodErrorOptions = {
177
+ maxIssuesInMessage?: number;
178
+ issueSeparator?: string;
179
+ unionSeparator?: string;
180
+ prefixSeparator?: string;
181
+ prefix?: string;
182
+ };
183
+ declare function fromZodError(zodError: ZodError, options?: FromZodErrorOptions): ValidationError;
184
+ declare const toValidationError: (options?: Parameters<typeof fromZodError>[1]) => (err: unknown) => ValidationError | Error;
185
+ declare function isValidationError(err: unknown): err is ValidationError;
186
+ declare function isValidationErrorLike(err: unknown): err is ValidationError;
187
+
188
+ export { type FromZodErrorOptions, ValidationError, type ZodError, fromZodError, isValidationError, isValidationErrorLike, toValidationError };