@rspack/core 1.3.7 → 1.3.9

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 (45) hide show
  1. package/compiled/browserslist/index.js +77 -57
  2. package/compiled/browserslist/package.json +1 -1
  3. package/compiled/graceful-fs/index.js +8 -8
  4. package/compiled/zod/index.d.ts +2 -1772
  5. package/compiled/zod/index.js +35 -35
  6. package/compiled/zod/lib/ZodError.d.ts +164 -0
  7. package/compiled/zod/lib/__tests__/Mocker.d.ts +17 -0
  8. package/compiled/zod/lib/benchmarks/datetime.d.ts +5 -0
  9. package/compiled/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  10. package/compiled/zod/lib/benchmarks/index.d.ts +1 -0
  11. package/compiled/zod/lib/benchmarks/ipv4.d.ts +5 -0
  12. package/compiled/zod/lib/benchmarks/object.d.ts +5 -0
  13. package/compiled/zod/lib/benchmarks/primitives.d.ts +5 -0
  14. package/compiled/zod/lib/benchmarks/realworld.d.ts +5 -0
  15. package/compiled/zod/lib/benchmarks/string.d.ts +5 -0
  16. package/compiled/zod/lib/benchmarks/union.d.ts +5 -0
  17. package/compiled/zod/lib/errors.d.ts +5 -0
  18. package/compiled/zod/lib/external.d.ts +6 -0
  19. package/compiled/zod/lib/helpers/enumUtil.d.ts +8 -0
  20. package/compiled/zod/lib/helpers/errorUtil.d.ts +9 -0
  21. package/compiled/zod/lib/helpers/parseUtil.d.ts +78 -0
  22. package/compiled/zod/lib/helpers/partialUtil.d.ts +8 -0
  23. package/compiled/zod/lib/helpers/typeAliases.d.ts +2 -0
  24. package/compiled/zod/lib/helpers/util.d.ts +82 -0
  25. package/compiled/zod/lib/index.d.ts +4 -0
  26. package/compiled/zod/lib/locales/en.d.ts +3 -0
  27. package/compiled/zod/lib/standard-schema.d.ts +102 -0
  28. package/compiled/zod/lib/types.d.ts +1062 -0
  29. package/compiled/zod/package.json +1 -1
  30. package/dist/ChunkGroup.d.ts +10 -0
  31. package/dist/builtin-loader/swc/pluginImport.d.ts +1 -1
  32. package/dist/builtin-loader/swc/types.d.ts +632 -631
  33. package/dist/builtin-plugin/html-plugin/hooks.d.ts +3 -1
  34. package/dist/builtin-plugin/html-plugin/options.d.ts +7 -3
  35. package/dist/builtin-plugin/html-plugin/plugin.d.ts +0 -1
  36. package/dist/config/types.d.ts +11 -3
  37. package/dist/config/utils.d.ts +1 -1
  38. package/dist/config/zod.d.ts +77 -77
  39. package/dist/exports.d.ts +5 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +644 -597
  42. package/dist/setupEnv.d.ts +1 -0
  43. package/dist/stats/statsFactoryUtils.d.ts +1 -0
  44. package/dist/swc.d.ts +5 -0
  45. package/package.json +11 -11
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The Standard Schema interface.
3
+ */
4
+ export type StandardSchemaV1<Input = unknown, Output = Input> = {
5
+ /**
6
+ * The Standard Schema properties.
7
+ */
8
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
9
+ };
10
+ export declare namespace StandardSchemaV1 {
11
+ /**
12
+ * The Standard Schema properties interface.
13
+ */
14
+ export interface Props<Input = unknown, Output = Input> {
15
+ /**
16
+ * The version number of the standard.
17
+ */
18
+ readonly version: 1;
19
+ /**
20
+ * The vendor name of the schema library.
21
+ */
22
+ readonly vendor: string;
23
+ /**
24
+ * Validates unknown input values.
25
+ */
26
+ readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
27
+ /**
28
+ * Inferred types associated with the schema.
29
+ */
30
+ readonly types?: Types<Input, Output> | undefined;
31
+ }
32
+ /**
33
+ * The result interface of the validate function.
34
+ */
35
+ export type Result<Output> = SuccessResult<Output> | FailureResult;
36
+ /**
37
+ * The result interface if validation succeeds.
38
+ */
39
+ export interface SuccessResult<Output> {
40
+ /**
41
+ * The typed output value.
42
+ */
43
+ readonly value: Output;
44
+ /**
45
+ * The non-existent issues.
46
+ */
47
+ readonly issues?: undefined;
48
+ }
49
+ /**
50
+ * The result interface if validation fails.
51
+ */
52
+ export interface FailureResult {
53
+ /**
54
+ * The issues of failed validation.
55
+ */
56
+ readonly issues: ReadonlyArray<Issue>;
57
+ }
58
+ /**
59
+ * The issue interface of the failure output.
60
+ */
61
+ export interface Issue {
62
+ /**
63
+ * The error message of the issue.
64
+ */
65
+ readonly message: string;
66
+ /**
67
+ * The path of the issue, if any.
68
+ */
69
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
70
+ }
71
+ /**
72
+ * The path segment interface of the issue.
73
+ */
74
+ export interface PathSegment {
75
+ /**
76
+ * The key representing a path segment.
77
+ */
78
+ readonly key: PropertyKey;
79
+ }
80
+ /**
81
+ * The Standard Schema types interface.
82
+ */
83
+ export interface Types<Input = unknown, Output = Input> {
84
+ /**
85
+ * The input type of the schema.
86
+ */
87
+ readonly input: Input;
88
+ /**
89
+ * The output type of the schema.
90
+ */
91
+ readonly output: Output;
92
+ }
93
+ /**
94
+ * Infers the input type of a Standard Schema.
95
+ */
96
+ export type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
97
+ /**
98
+ * Infers the output type of a Standard Schema.
99
+ */
100
+ export type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
101
+ export {};
102
+ }