zod 3.26.0-canary.20250703T025502 → 3.26.0-canary.20250703T215303
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/package.json +1 -1
- package/src/v4/classic/tests/optional.test.ts +20 -0
- package/src/v4/classic/tests/to-json-schema.test.ts +72 -1
- package/src/v4/core/schemas.ts +17 -2
- package/src/v4/core/to-json-schema.ts +1 -5
- package/src/v4/locales/eo.ts +125 -0
- package/src/v4/locales/index.ts +1 -0
- package/v4/core/schemas.cjs +5 -1
- package/v4/core/schemas.d.cts +4 -0
- package/v4/core/schemas.d.ts +4 -0
- package/v4/core/schemas.js +5 -1
- package/v4/core/to-json-schema.cjs +1 -5
- package/v4/core/to-json-schema.js +1 -5
- package/v4/locales/eo.cjs +144 -0
- package/v4/locales/eo.d.cts +5 -0
- package/v4/locales/eo.d.ts +5 -0
- package/v4/locales/eo.js +116 -0
- package/v4/locales/index.cjs +3 -1
- package/v4/locales/index.d.cts +1 -0
- package/v4/locales/index.d.ts +1 -0
- package/v4/locales/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zod",
|
|
3
|
-
"version": "3.26.0-canary.
|
|
3
|
+
"version": "3.26.0-canary.20250703T215303",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Colin McDonnell <zod@colinhacks.com>",
|
|
6
6
|
"description": "TypeScript-first schema declaration and validation library with static type inference",
|
|
@@ -37,6 +37,26 @@ test("optionality", () => {
|
|
|
37
37
|
const e = z.string().default("asdf").nullable();
|
|
38
38
|
expect(e._zod.optin).toEqual("optional");
|
|
39
39
|
expect(e._zod.optout).toEqual(undefined);
|
|
40
|
+
|
|
41
|
+
// z.undefined should NOT be optional
|
|
42
|
+
const f = z.undefined();
|
|
43
|
+
expect(f._zod.optin).toEqual("optional");
|
|
44
|
+
expect(f._zod.optout).toEqual("optional");
|
|
45
|
+
expectTypeOf<typeof f._zod.optin>().toEqualTypeOf<"optional" | undefined>();
|
|
46
|
+
expectTypeOf<typeof f._zod.optout>().toEqualTypeOf<"optional" | undefined>();
|
|
47
|
+
|
|
48
|
+
// z.union should be optional if any of the types are optional
|
|
49
|
+
const g = z.union([z.string(), z.undefined()]);
|
|
50
|
+
expect(g._zod.optin).toEqual("optional");
|
|
51
|
+
expect(g._zod.optout).toEqual("optional");
|
|
52
|
+
expectTypeOf<typeof g._zod.optin>().toEqualTypeOf<"optional" | undefined>();
|
|
53
|
+
expectTypeOf<typeof g._zod.optout>().toEqualTypeOf<"optional" | undefined>();
|
|
54
|
+
|
|
55
|
+
const h = z.union([z.string(), z.optional(z.string())]);
|
|
56
|
+
expect(h._zod.optin).toEqual("optional");
|
|
57
|
+
expect(h._zod.optout).toEqual("optional");
|
|
58
|
+
expectTypeOf<typeof h._zod.optin>().toEqualTypeOf<"optional">();
|
|
59
|
+
expectTypeOf<typeof h._zod.optout>().toEqualTypeOf<"optional">();
|
|
40
60
|
});
|
|
41
61
|
|
|
42
62
|
test("pipe optionality", () => {
|
|
@@ -31,7 +31,7 @@ describe("toJSONSchema", () => {
|
|
|
31
31
|
expect(z.toJSONSchema(z.undefined())).toMatchInlineSnapshot(`
|
|
32
32
|
{
|
|
33
33
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
34
|
-
"
|
|
34
|
+
"not": {},
|
|
35
35
|
}
|
|
36
36
|
`);
|
|
37
37
|
expect(z.toJSONSchema(z.any())).toMatchInlineSnapshot(`
|
|
@@ -1856,6 +1856,11 @@ test("input type", () => {
|
|
|
1856
1856
|
c: z.string().default("hello"),
|
|
1857
1857
|
d: z.string().nullable(),
|
|
1858
1858
|
e: z.string().prefault("hello"),
|
|
1859
|
+
f: z.string().catch("hello"),
|
|
1860
|
+
g: z.never(),
|
|
1861
|
+
h: z.undefined(),
|
|
1862
|
+
i: z.union([z.string(), z.number().default(2)]),
|
|
1863
|
+
j: z.union([z.string(), z.string().optional()]),
|
|
1859
1864
|
});
|
|
1860
1865
|
expect(z.toJSONSchema(schema, { io: "input" })).toMatchInlineSnapshot(`
|
|
1861
1866
|
{
|
|
@@ -1885,10 +1890,42 @@ test("input type", () => {
|
|
|
1885
1890
|
"default": "hello",
|
|
1886
1891
|
"type": "string",
|
|
1887
1892
|
},
|
|
1893
|
+
"f": {
|
|
1894
|
+
"default": "hello",
|
|
1895
|
+
"type": "string",
|
|
1896
|
+
},
|
|
1897
|
+
"g": {
|
|
1898
|
+
"not": {},
|
|
1899
|
+
},
|
|
1900
|
+
"h": {
|
|
1901
|
+
"not": {},
|
|
1902
|
+
},
|
|
1903
|
+
"i": {
|
|
1904
|
+
"anyOf": [
|
|
1905
|
+
{
|
|
1906
|
+
"type": "string",
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
"default": 2,
|
|
1910
|
+
"type": "number",
|
|
1911
|
+
},
|
|
1912
|
+
],
|
|
1913
|
+
},
|
|
1914
|
+
"j": {
|
|
1915
|
+
"anyOf": [
|
|
1916
|
+
{
|
|
1917
|
+
"type": "string",
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
"type": "string",
|
|
1921
|
+
},
|
|
1922
|
+
],
|
|
1923
|
+
},
|
|
1888
1924
|
},
|
|
1889
1925
|
"required": [
|
|
1890
1926
|
"a",
|
|
1891
1927
|
"d",
|
|
1928
|
+
"g",
|
|
1892
1929
|
],
|
|
1893
1930
|
"type": "object",
|
|
1894
1931
|
}
|
|
@@ -1921,12 +1958,46 @@ test("input type", () => {
|
|
|
1921
1958
|
"e": {
|
|
1922
1959
|
"type": "string",
|
|
1923
1960
|
},
|
|
1961
|
+
"f": {
|
|
1962
|
+
"default": "hello",
|
|
1963
|
+
"type": "string",
|
|
1964
|
+
},
|
|
1965
|
+
"g": {
|
|
1966
|
+
"not": {},
|
|
1967
|
+
},
|
|
1968
|
+
"h": {
|
|
1969
|
+
"not": {},
|
|
1970
|
+
},
|
|
1971
|
+
"i": {
|
|
1972
|
+
"anyOf": [
|
|
1973
|
+
{
|
|
1974
|
+
"type": "string",
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
"default": 2,
|
|
1978
|
+
"type": "number",
|
|
1979
|
+
},
|
|
1980
|
+
],
|
|
1981
|
+
},
|
|
1982
|
+
"j": {
|
|
1983
|
+
"anyOf": [
|
|
1984
|
+
{
|
|
1985
|
+
"type": "string",
|
|
1986
|
+
},
|
|
1987
|
+
{
|
|
1988
|
+
"type": "string",
|
|
1989
|
+
},
|
|
1990
|
+
],
|
|
1991
|
+
},
|
|
1924
1992
|
},
|
|
1925
1993
|
"required": [
|
|
1926
1994
|
"a",
|
|
1927
1995
|
"c",
|
|
1928
1996
|
"d",
|
|
1929
1997
|
"e",
|
|
1998
|
+
"f",
|
|
1999
|
+
"g",
|
|
2000
|
+
"i",
|
|
1930
2001
|
],
|
|
1931
2002
|
"type": "object",
|
|
1932
2003
|
}
|
package/src/v4/core/schemas.ts
CHANGED
|
@@ -1238,6 +1238,8 @@ export const $ZodUndefined: core.$constructor<$ZodUndefined> = /*@__PURE__*/ cor
|
|
|
1238
1238
|
$ZodType.init(inst, def);
|
|
1239
1239
|
inst._zod.pattern = regexes.undefined;
|
|
1240
1240
|
inst._zod.values = new Set([undefined]);
|
|
1241
|
+
inst._zod.optin = "optional";
|
|
1242
|
+
inst._zod.optout = "optional";
|
|
1241
1243
|
|
|
1242
1244
|
inst._zod.parse = (payload, _ctx) => {
|
|
1243
1245
|
const input = payload.value;
|
|
@@ -1374,7 +1376,6 @@ export interface $ZodNever extends $ZodType {
|
|
|
1374
1376
|
|
|
1375
1377
|
export const $ZodNever: core.$constructor<$ZodNever> = /*@__PURE__*/ core.$constructor("$ZodNever", (inst, def) => {
|
|
1376
1378
|
$ZodType.init(inst, def);
|
|
1377
|
-
|
|
1378
1379
|
inst._zod.parse = (payload, _ctx) => {
|
|
1379
1380
|
payload.issues.push({
|
|
1380
1381
|
expected: "never",
|
|
@@ -1882,11 +1883,17 @@ export interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $Zo
|
|
|
1882
1883
|
options: Options;
|
|
1883
1884
|
}
|
|
1884
1885
|
|
|
1886
|
+
type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
|
|
1887
|
+
type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
|
|
1888
|
+
|
|
1885
1889
|
export interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]>
|
|
1886
1890
|
extends $ZodTypeInternals<$InferUnionOutput<T[number]>, $InferUnionInput<T[number]>> {
|
|
1887
1891
|
def: $ZodUnionDef<T>;
|
|
1888
1892
|
isst: errors.$ZodIssueInvalidUnion;
|
|
1889
1893
|
pattern: T[number]["_zod"]["pattern"];
|
|
1894
|
+
// if any element in the union is optional, then the union is optional
|
|
1895
|
+
optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
|
|
1896
|
+
optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
|
|
1890
1897
|
}
|
|
1891
1898
|
|
|
1892
1899
|
export interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType {
|
|
@@ -1914,6 +1921,14 @@ function handleUnionResults(results: ParsePayload[], final: ParsePayload, inst:
|
|
|
1914
1921
|
export const $ZodUnion: core.$constructor<$ZodUnion> = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
|
|
1915
1922
|
$ZodType.init(inst, def);
|
|
1916
1923
|
|
|
1924
|
+
util.defineLazy(inst._zod, "optin", () =>
|
|
1925
|
+
def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined
|
|
1926
|
+
);
|
|
1927
|
+
|
|
1928
|
+
util.defineLazy(inst._zod, "optout", () =>
|
|
1929
|
+
def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined
|
|
1930
|
+
);
|
|
1931
|
+
|
|
1917
1932
|
util.defineLazy(inst._zod, "values", () => {
|
|
1918
1933
|
if (def.options.every((o) => o._zod.values)) {
|
|
1919
1934
|
return new Set<util.Primitive>(def.options.flatMap((option) => Array.from(option._zod.values!)));
|
|
@@ -3272,7 +3287,7 @@ export interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
|
|
|
3272
3287
|
|
|
3273
3288
|
export const $ZodCatch: core.$constructor<$ZodCatch> = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
|
|
3274
3289
|
$ZodType.init(inst, def);
|
|
3275
|
-
|
|
3290
|
+
inst._zod.optin = "optional";
|
|
3276
3291
|
util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3277
3292
|
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3278
3293
|
|
|
@@ -207,11 +207,6 @@ export class JSONSchemaGenerator {
|
|
|
207
207
|
}
|
|
208
208
|
break;
|
|
209
209
|
}
|
|
210
|
-
case "undefined": {
|
|
211
|
-
const json = _json as JSONSchema.NullSchema;
|
|
212
|
-
json.type = "null";
|
|
213
|
-
break;
|
|
214
|
-
}
|
|
215
210
|
case "null": {
|
|
216
211
|
_json.type = "null";
|
|
217
212
|
break;
|
|
@@ -222,6 +217,7 @@ export class JSONSchemaGenerator {
|
|
|
222
217
|
case "unknown": {
|
|
223
218
|
break;
|
|
224
219
|
}
|
|
220
|
+
case "undefined":
|
|
225
221
|
case "never": {
|
|
226
222
|
_json.not = {};
|
|
227
223
|
break;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { $ZodStringFormats } from "../core/checks.js";
|
|
2
|
+
import type * as errors from "../core/errors.js";
|
|
3
|
+
import * as util from "../core/util.js";
|
|
4
|
+
|
|
5
|
+
export const parsedType = (data: any): string => {
|
|
6
|
+
const t = typeof data;
|
|
7
|
+
|
|
8
|
+
switch (t) {
|
|
9
|
+
case "number": {
|
|
10
|
+
return Number.isNaN(data) ? "NaN" : "nombro";
|
|
11
|
+
}
|
|
12
|
+
case "object": {
|
|
13
|
+
if (Array.isArray(data)) {
|
|
14
|
+
return "tabelo";
|
|
15
|
+
}
|
|
16
|
+
if (data === null) {
|
|
17
|
+
return "senvalora";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
21
|
+
return data.constructor.name;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const error: () => errors.$ZodErrorMap = () => {
|
|
29
|
+
const Sizable: Record<string, { unit: string; verb: string }> = {
|
|
30
|
+
string: { unit: "karaktrojn", verb: "havi" },
|
|
31
|
+
file: { unit: "bajtojn", verb: "havi" },
|
|
32
|
+
array: { unit: "elementojn", verb: "havi" },
|
|
33
|
+
set: { unit: "elementojn", verb: "havi" },
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function getSizing(origin: string): { unit: string; verb: string } | null {
|
|
37
|
+
return Sizable[origin] ?? null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const Nouns: {
|
|
41
|
+
[k in $ZodStringFormats | (string & {})]?: string;
|
|
42
|
+
} = {
|
|
43
|
+
regex: "enigo",
|
|
44
|
+
email: "retadreso",
|
|
45
|
+
url: "URL",
|
|
46
|
+
emoji: "emoĝio",
|
|
47
|
+
uuid: "UUID",
|
|
48
|
+
uuidv4: "UUIDv4",
|
|
49
|
+
uuidv6: "UUIDv6",
|
|
50
|
+
nanoid: "nanoid",
|
|
51
|
+
guid: "GUID",
|
|
52
|
+
cuid: "cuid",
|
|
53
|
+
cuid2: "cuid2",
|
|
54
|
+
ulid: "ULID",
|
|
55
|
+
xid: "XID",
|
|
56
|
+
ksuid: "KSUID",
|
|
57
|
+
datetime: "ISO-datotempo",
|
|
58
|
+
date: "ISO-dato",
|
|
59
|
+
time: "ISO-tempo",
|
|
60
|
+
duration: "ISO-daŭro",
|
|
61
|
+
ipv4: "IPv4-adreso",
|
|
62
|
+
ipv6: "IPv6-adreso",
|
|
63
|
+
cidrv4: "IPv4-rango",
|
|
64
|
+
cidrv6: "IPv6-rango",
|
|
65
|
+
base64: "64-ume kodita karaktraro",
|
|
66
|
+
base64url: "URL-64-ume kodita karaktraro",
|
|
67
|
+
json_string: "JSON-karaktraro",
|
|
68
|
+
e164: "E.164-nombro",
|
|
69
|
+
jwt: "JWT",
|
|
70
|
+
template_literal: "enigo",
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return (issue) => {
|
|
74
|
+
switch (issue.code) {
|
|
75
|
+
case "invalid_type":
|
|
76
|
+
return `Nevalida enigo: atendiĝis ${issue.expected}, riceviĝis ${parsedType(issue.input)}`;
|
|
77
|
+
|
|
78
|
+
case "invalid_value":
|
|
79
|
+
if (issue.values.length === 1) return `Nevalida enigo: atendiĝis ${util.stringifyPrimitive(issue.values[0])}`;
|
|
80
|
+
return `Nevalida opcio: atendiĝis unu el ${util.joinValues(issue.values, "|")}`;
|
|
81
|
+
case "too_big": {
|
|
82
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
83
|
+
const sizing = getSizing(issue.origin);
|
|
84
|
+
if (sizing)
|
|
85
|
+
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
|
|
86
|
+
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()}`;
|
|
87
|
+
}
|
|
88
|
+
case "too_small": {
|
|
89
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
90
|
+
const sizing = getSizing(issue.origin);
|
|
91
|
+
if (sizing) {
|
|
92
|
+
return `Tro malgranda: atendiĝis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return `Tro malgranda: atendiĝis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;
|
|
96
|
+
}
|
|
97
|
+
case "invalid_format": {
|
|
98
|
+
const _issue = issue as errors.$ZodStringFormatIssues;
|
|
99
|
+
if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
|
|
100
|
+
if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
|
|
101
|
+
if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
|
|
102
|
+
if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
|
|
103
|
+
return `Nevalida ${Nouns[_issue.format] ?? issue.format}`;
|
|
104
|
+
}
|
|
105
|
+
case "not_multiple_of":
|
|
106
|
+
return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;
|
|
107
|
+
case "unrecognized_keys":
|
|
108
|
+
return `Nekonata${issue.keys.length > 1 ? "j" : ""} ŝlosilo${issue.keys.length > 1 ? "j" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
109
|
+
case "invalid_key":
|
|
110
|
+
return `Nevalida ŝlosilo en ${issue.origin}`;
|
|
111
|
+
case "invalid_union":
|
|
112
|
+
return "Nevalida enigo";
|
|
113
|
+
case "invalid_element":
|
|
114
|
+
return `Nevalida valoro en ${issue.origin}`;
|
|
115
|
+
default:
|
|
116
|
+
return `Nevalida enigo`;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export default function (): { localeError: errors.$ZodErrorMap } {
|
|
122
|
+
return {
|
|
123
|
+
localeError: error(),
|
|
124
|
+
};
|
|
125
|
+
}
|
package/src/v4/locales/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as ca } from "./ca.js";
|
|
|
5
5
|
export { default as cs } from "./cs.js";
|
|
6
6
|
export { default as de } from "./de.js";
|
|
7
7
|
export { default as en } from "./en.js";
|
|
8
|
+
export { default as eo } from "./eo.js";
|
|
8
9
|
export { default as es } from "./es.js";
|
|
9
10
|
export { default as fa } from "./fa.js";
|
|
10
11
|
export { default as fi } from "./fi.js";
|
package/v4/core/schemas.cjs
CHANGED
|
@@ -546,6 +546,8 @@ exports.$ZodUndefined = core.$constructor("$ZodUndefined", (inst, def) => {
|
|
|
546
546
|
exports.$ZodType.init(inst, def);
|
|
547
547
|
inst._zod.pattern = regexes.undefined;
|
|
548
548
|
inst._zod.values = new Set([undefined]);
|
|
549
|
+
inst._zod.optin = "optional";
|
|
550
|
+
inst._zod.optout = "optional";
|
|
549
551
|
inst._zod.parse = (payload, _ctx) => {
|
|
550
552
|
const input = payload.value;
|
|
551
553
|
if (typeof input === "undefined")
|
|
@@ -909,6 +911,8 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
909
911
|
}
|
|
910
912
|
exports.$ZodUnion = core.$constructor("$ZodUnion", (inst, def) => {
|
|
911
913
|
exports.$ZodType.init(inst, def);
|
|
914
|
+
util.defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
|
|
915
|
+
util.defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
|
|
912
916
|
util.defineLazy(inst._zod, "values", () => {
|
|
913
917
|
if (def.options.every((o) => o._zod.values)) {
|
|
914
918
|
return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
@@ -1550,7 +1554,7 @@ exports.$ZodSuccess = core.$constructor("$ZodSuccess", (inst, def) => {
|
|
|
1550
1554
|
});
|
|
1551
1555
|
exports.$ZodCatch = core.$constructor("$ZodCatch", (inst, def) => {
|
|
1552
1556
|
exports.$ZodType.init(inst, def);
|
|
1553
|
-
|
|
1557
|
+
inst._zod.optin = "optional";
|
|
1554
1558
|
util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
1555
1559
|
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1556
1560
|
inst._zod.parse = (payload, ctx) => {
|
package/v4/core/schemas.d.cts
CHANGED
|
@@ -598,10 +598,14 @@ export interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $Zo
|
|
|
598
598
|
type: "union";
|
|
599
599
|
options: Options;
|
|
600
600
|
}
|
|
601
|
+
type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
|
|
602
|
+
type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
|
|
601
603
|
export interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeInternals<$InferUnionOutput<T[number]>, $InferUnionInput<T[number]>> {
|
|
602
604
|
def: $ZodUnionDef<T>;
|
|
603
605
|
isst: errors.$ZodIssueInvalidUnion;
|
|
604
606
|
pattern: T[number]["_zod"]["pattern"];
|
|
607
|
+
optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
|
|
608
|
+
optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
|
|
605
609
|
}
|
|
606
610
|
export interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType {
|
|
607
611
|
_zod: $ZodUnionInternals<T>;
|
package/v4/core/schemas.d.ts
CHANGED
|
@@ -598,10 +598,14 @@ export interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $Zo
|
|
|
598
598
|
type: "union";
|
|
599
599
|
options: Options;
|
|
600
600
|
}
|
|
601
|
+
type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
|
|
602
|
+
type IsOptionalOut<T extends SomeType> = T extends OptionalOutSchema ? true : false;
|
|
601
603
|
export interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeInternals<$InferUnionOutput<T[number]>, $InferUnionInput<T[number]>> {
|
|
602
604
|
def: $ZodUnionDef<T>;
|
|
603
605
|
isst: errors.$ZodIssueInvalidUnion;
|
|
604
606
|
pattern: T[number]["_zod"]["pattern"];
|
|
607
|
+
optin: IsOptionalIn<T[number]> extends false ? "optional" | undefined : "optional";
|
|
608
|
+
optout: IsOptionalOut<T[number]> extends false ? "optional" | undefined : "optional";
|
|
605
609
|
}
|
|
606
610
|
export interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType {
|
|
607
611
|
_zod: $ZodUnionInternals<T>;
|
package/v4/core/schemas.js
CHANGED
|
@@ -515,6 +515,8 @@ export const $ZodUndefined = /*@__PURE__*/ core.$constructor("$ZodUndefined", (i
|
|
|
515
515
|
$ZodType.init(inst, def);
|
|
516
516
|
inst._zod.pattern = regexes.undefined;
|
|
517
517
|
inst._zod.values = new Set([undefined]);
|
|
518
|
+
inst._zod.optin = "optional";
|
|
519
|
+
inst._zod.optout = "optional";
|
|
518
520
|
inst._zod.parse = (payload, _ctx) => {
|
|
519
521
|
const input = payload.value;
|
|
520
522
|
if (typeof input === "undefined")
|
|
@@ -878,6 +880,8 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
878
880
|
}
|
|
879
881
|
export const $ZodUnion = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
|
|
880
882
|
$ZodType.init(inst, def);
|
|
883
|
+
util.defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
|
|
884
|
+
util.defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
|
|
881
885
|
util.defineLazy(inst._zod, "values", () => {
|
|
882
886
|
if (def.options.every((o) => o._zod.values)) {
|
|
883
887
|
return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
@@ -1519,7 +1523,7 @@ export const $ZodSuccess = /*@__PURE__*/ core.$constructor("$ZodSuccess", (inst,
|
|
|
1519
1523
|
});
|
|
1520
1524
|
export const $ZodCatch = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
|
|
1521
1525
|
$ZodType.init(inst, def);
|
|
1522
|
-
|
|
1526
|
+
inst._zod.optin = "optional";
|
|
1523
1527
|
util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
1524
1528
|
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1525
1529
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -141,11 +141,6 @@ class JSONSchemaGenerator {
|
|
|
141
141
|
}
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
|
-
case "undefined": {
|
|
145
|
-
const json = _json;
|
|
146
|
-
json.type = "null";
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
144
|
case "null": {
|
|
150
145
|
_json.type = "null";
|
|
151
146
|
break;
|
|
@@ -156,6 +151,7 @@ class JSONSchemaGenerator {
|
|
|
156
151
|
case "unknown": {
|
|
157
152
|
break;
|
|
158
153
|
}
|
|
154
|
+
case "undefined":
|
|
159
155
|
case "never": {
|
|
160
156
|
_json.not = {};
|
|
161
157
|
break;
|
|
@@ -137,11 +137,6 @@ export class JSONSchemaGenerator {
|
|
|
137
137
|
}
|
|
138
138
|
break;
|
|
139
139
|
}
|
|
140
|
-
case "undefined": {
|
|
141
|
-
const json = _json;
|
|
142
|
-
json.type = "null";
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
140
|
case "null": {
|
|
146
141
|
_json.type = "null";
|
|
147
142
|
break;
|
|
@@ -152,6 +147,7 @@ export class JSONSchemaGenerator {
|
|
|
152
147
|
case "unknown": {
|
|
153
148
|
break;
|
|
154
149
|
}
|
|
150
|
+
case "undefined":
|
|
155
151
|
case "never": {
|
|
156
152
|
_json.not = {};
|
|
157
153
|
break;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.parsedType = void 0;
|
|
27
|
+
exports.default = default_1;
|
|
28
|
+
const util = __importStar(require("../core/util.cjs"));
|
|
29
|
+
const parsedType = (data) => {
|
|
30
|
+
const t = typeof data;
|
|
31
|
+
switch (t) {
|
|
32
|
+
case "number": {
|
|
33
|
+
return Number.isNaN(data) ? "NaN" : "nombro";
|
|
34
|
+
}
|
|
35
|
+
case "object": {
|
|
36
|
+
if (Array.isArray(data)) {
|
|
37
|
+
return "tabelo";
|
|
38
|
+
}
|
|
39
|
+
if (data === null) {
|
|
40
|
+
return "senvalora";
|
|
41
|
+
}
|
|
42
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
43
|
+
return data.constructor.name;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return t;
|
|
48
|
+
};
|
|
49
|
+
exports.parsedType = parsedType;
|
|
50
|
+
const error = () => {
|
|
51
|
+
const Sizable = {
|
|
52
|
+
string: { unit: "karaktrojn", verb: "havi" },
|
|
53
|
+
file: { unit: "bajtojn", verb: "havi" },
|
|
54
|
+
array: { unit: "elementojn", verb: "havi" },
|
|
55
|
+
set: { unit: "elementojn", verb: "havi" },
|
|
56
|
+
};
|
|
57
|
+
function getSizing(origin) {
|
|
58
|
+
return Sizable[origin] ?? null;
|
|
59
|
+
}
|
|
60
|
+
const Nouns = {
|
|
61
|
+
regex: "enigo",
|
|
62
|
+
email: "retadreso",
|
|
63
|
+
url: "URL",
|
|
64
|
+
emoji: "emoĝio",
|
|
65
|
+
uuid: "UUID",
|
|
66
|
+
uuidv4: "UUIDv4",
|
|
67
|
+
uuidv6: "UUIDv6",
|
|
68
|
+
nanoid: "nanoid",
|
|
69
|
+
guid: "GUID",
|
|
70
|
+
cuid: "cuid",
|
|
71
|
+
cuid2: "cuid2",
|
|
72
|
+
ulid: "ULID",
|
|
73
|
+
xid: "XID",
|
|
74
|
+
ksuid: "KSUID",
|
|
75
|
+
datetime: "ISO-datotempo",
|
|
76
|
+
date: "ISO-dato",
|
|
77
|
+
time: "ISO-tempo",
|
|
78
|
+
duration: "ISO-daŭro",
|
|
79
|
+
ipv4: "IPv4-adreso",
|
|
80
|
+
ipv6: "IPv6-adreso",
|
|
81
|
+
cidrv4: "IPv4-rango",
|
|
82
|
+
cidrv6: "IPv6-rango",
|
|
83
|
+
base64: "64-ume kodita karaktraro",
|
|
84
|
+
base64url: "URL-64-ume kodita karaktraro",
|
|
85
|
+
json_string: "JSON-karaktraro",
|
|
86
|
+
e164: "E.164-nombro",
|
|
87
|
+
jwt: "JWT",
|
|
88
|
+
template_literal: "enigo",
|
|
89
|
+
};
|
|
90
|
+
return (issue) => {
|
|
91
|
+
switch (issue.code) {
|
|
92
|
+
case "invalid_type":
|
|
93
|
+
return `Nevalida enigo: atendiĝis ${issue.expected}, riceviĝis ${(0, exports.parsedType)(issue.input)}`;
|
|
94
|
+
case "invalid_value":
|
|
95
|
+
if (issue.values.length === 1)
|
|
96
|
+
return `Nevalida enigo: atendiĝis ${util.stringifyPrimitive(issue.values[0])}`;
|
|
97
|
+
return `Nevalida opcio: atendiĝis unu el ${util.joinValues(issue.values, "|")}`;
|
|
98
|
+
case "too_big": {
|
|
99
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
100
|
+
const sizing = getSizing(issue.origin);
|
|
101
|
+
if (sizing)
|
|
102
|
+
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
|
|
103
|
+
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()}`;
|
|
104
|
+
}
|
|
105
|
+
case "too_small": {
|
|
106
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
107
|
+
const sizing = getSizing(issue.origin);
|
|
108
|
+
if (sizing) {
|
|
109
|
+
return `Tro malgranda: atendiĝis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
110
|
+
}
|
|
111
|
+
return `Tro malgranda: atendiĝis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;
|
|
112
|
+
}
|
|
113
|
+
case "invalid_format": {
|
|
114
|
+
const _issue = issue;
|
|
115
|
+
if (_issue.format === "starts_with")
|
|
116
|
+
return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
|
|
117
|
+
if (_issue.format === "ends_with")
|
|
118
|
+
return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
|
|
119
|
+
if (_issue.format === "includes")
|
|
120
|
+
return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
|
|
121
|
+
if (_issue.format === "regex")
|
|
122
|
+
return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
|
|
123
|
+
return `Nevalida ${Nouns[_issue.format] ?? issue.format}`;
|
|
124
|
+
}
|
|
125
|
+
case "not_multiple_of":
|
|
126
|
+
return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;
|
|
127
|
+
case "unrecognized_keys":
|
|
128
|
+
return `Nekonata${issue.keys.length > 1 ? "j" : ""} ŝlosilo${issue.keys.length > 1 ? "j" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
129
|
+
case "invalid_key":
|
|
130
|
+
return `Nevalida ŝlosilo en ${issue.origin}`;
|
|
131
|
+
case "invalid_union":
|
|
132
|
+
return "Nevalida enigo";
|
|
133
|
+
case "invalid_element":
|
|
134
|
+
return `Nevalida valoro en ${issue.origin}`;
|
|
135
|
+
default:
|
|
136
|
+
return `Nevalida enigo`;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
function default_1() {
|
|
141
|
+
return {
|
|
142
|
+
localeError: error(),
|
|
143
|
+
};
|
|
144
|
+
}
|
package/v4/locales/eo.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as util from "../core/util.js";
|
|
2
|
+
export const parsedType = (data) => {
|
|
3
|
+
const t = typeof data;
|
|
4
|
+
switch (t) {
|
|
5
|
+
case "number": {
|
|
6
|
+
return Number.isNaN(data) ? "NaN" : "nombro";
|
|
7
|
+
}
|
|
8
|
+
case "object": {
|
|
9
|
+
if (Array.isArray(data)) {
|
|
10
|
+
return "tabelo";
|
|
11
|
+
}
|
|
12
|
+
if (data === null) {
|
|
13
|
+
return "senvalora";
|
|
14
|
+
}
|
|
15
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
16
|
+
return data.constructor.name;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
const error = () => {
|
|
23
|
+
const Sizable = {
|
|
24
|
+
string: { unit: "karaktrojn", verb: "havi" },
|
|
25
|
+
file: { unit: "bajtojn", verb: "havi" },
|
|
26
|
+
array: { unit: "elementojn", verb: "havi" },
|
|
27
|
+
set: { unit: "elementojn", verb: "havi" },
|
|
28
|
+
};
|
|
29
|
+
function getSizing(origin) {
|
|
30
|
+
return Sizable[origin] ?? null;
|
|
31
|
+
}
|
|
32
|
+
const Nouns = {
|
|
33
|
+
regex: "enigo",
|
|
34
|
+
email: "retadreso",
|
|
35
|
+
url: "URL",
|
|
36
|
+
emoji: "emoĝio",
|
|
37
|
+
uuid: "UUID",
|
|
38
|
+
uuidv4: "UUIDv4",
|
|
39
|
+
uuidv6: "UUIDv6",
|
|
40
|
+
nanoid: "nanoid",
|
|
41
|
+
guid: "GUID",
|
|
42
|
+
cuid: "cuid",
|
|
43
|
+
cuid2: "cuid2",
|
|
44
|
+
ulid: "ULID",
|
|
45
|
+
xid: "XID",
|
|
46
|
+
ksuid: "KSUID",
|
|
47
|
+
datetime: "ISO-datotempo",
|
|
48
|
+
date: "ISO-dato",
|
|
49
|
+
time: "ISO-tempo",
|
|
50
|
+
duration: "ISO-daŭro",
|
|
51
|
+
ipv4: "IPv4-adreso",
|
|
52
|
+
ipv6: "IPv6-adreso",
|
|
53
|
+
cidrv4: "IPv4-rango",
|
|
54
|
+
cidrv6: "IPv6-rango",
|
|
55
|
+
base64: "64-ume kodita karaktraro",
|
|
56
|
+
base64url: "URL-64-ume kodita karaktraro",
|
|
57
|
+
json_string: "JSON-karaktraro",
|
|
58
|
+
e164: "E.164-nombro",
|
|
59
|
+
jwt: "JWT",
|
|
60
|
+
template_literal: "enigo",
|
|
61
|
+
};
|
|
62
|
+
return (issue) => {
|
|
63
|
+
switch (issue.code) {
|
|
64
|
+
case "invalid_type":
|
|
65
|
+
return `Nevalida enigo: atendiĝis ${issue.expected}, riceviĝis ${parsedType(issue.input)}`;
|
|
66
|
+
case "invalid_value":
|
|
67
|
+
if (issue.values.length === 1)
|
|
68
|
+
return `Nevalida enigo: atendiĝis ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
+
return `Nevalida opcio: atendiĝis unu el ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing)
|
|
74
|
+
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
|
|
75
|
+
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()}`;
|
|
76
|
+
}
|
|
77
|
+
case "too_small": {
|
|
78
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
79
|
+
const sizing = getSizing(issue.origin);
|
|
80
|
+
if (sizing) {
|
|
81
|
+
return `Tro malgranda: atendiĝis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
+
}
|
|
83
|
+
return `Tro malgranda: atendiĝis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;
|
|
84
|
+
}
|
|
85
|
+
case "invalid_format": {
|
|
86
|
+
const _issue = issue;
|
|
87
|
+
if (_issue.format === "starts_with")
|
|
88
|
+
return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
|
|
89
|
+
if (_issue.format === "ends_with")
|
|
90
|
+
return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
|
|
91
|
+
if (_issue.format === "includes")
|
|
92
|
+
return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
|
|
93
|
+
if (_issue.format === "regex")
|
|
94
|
+
return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
|
|
95
|
+
return `Nevalida ${Nouns[_issue.format] ?? issue.format}`;
|
|
96
|
+
}
|
|
97
|
+
case "not_multiple_of":
|
|
98
|
+
return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;
|
|
99
|
+
case "unrecognized_keys":
|
|
100
|
+
return `Nekonata${issue.keys.length > 1 ? "j" : ""} ŝlosilo${issue.keys.length > 1 ? "j" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
101
|
+
case "invalid_key":
|
|
102
|
+
return `Nevalida ŝlosilo en ${issue.origin}`;
|
|
103
|
+
case "invalid_union":
|
|
104
|
+
return "Nevalida enigo";
|
|
105
|
+
case "invalid_element":
|
|
106
|
+
return `Nevalida valoro en ${issue.origin}`;
|
|
107
|
+
default:
|
|
108
|
+
return `Nevalida enigo`;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export default function () {
|
|
113
|
+
return {
|
|
114
|
+
localeError: error(),
|
|
115
|
+
};
|
|
116
|
+
}
|
package/v4/locales/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.zhTW = exports.zhCN = exports.vi = exports.ur = exports.ua = exports.tr = exports.th = exports.ta = exports.sv = exports.sl = exports.ru = exports.pt = exports.pl = exports.ps = exports.ota = exports.no = exports.nl = exports.ms = exports.mk = exports.ko = exports.kh = exports.ja = exports.it = exports.id = exports.hu = exports.he = exports.frCA = exports.fr = exports.fi = exports.fa = exports.es = exports.en = exports.de = exports.cs = exports.ca = exports.be = exports.az = exports.ar = void 0;
|
|
6
|
+
exports.zhTW = exports.zhCN = exports.vi = exports.ur = exports.ua = exports.tr = exports.th = exports.ta = exports.sv = exports.sl = exports.ru = exports.pt = exports.pl = exports.ps = exports.ota = exports.no = exports.nl = exports.ms = exports.mk = exports.ko = exports.kh = exports.ja = exports.it = exports.id = exports.hu = exports.he = exports.frCA = exports.fr = exports.fi = exports.fa = exports.es = exports.eo = exports.en = exports.de = exports.cs = exports.ca = exports.be = exports.az = exports.ar = void 0;
|
|
7
7
|
var ar_js_1 = require("./ar.cjs");
|
|
8
8
|
Object.defineProperty(exports, "ar", { enumerable: true, get: function () { return __importDefault(ar_js_1).default; } });
|
|
9
9
|
var az_js_1 = require("./az.cjs");
|
|
@@ -18,6 +18,8 @@ var de_js_1 = require("./de.cjs");
|
|
|
18
18
|
Object.defineProperty(exports, "de", { enumerable: true, get: function () { return __importDefault(de_js_1).default; } });
|
|
19
19
|
var en_js_1 = require("./en.cjs");
|
|
20
20
|
Object.defineProperty(exports, "en", { enumerable: true, get: function () { return __importDefault(en_js_1).default; } });
|
|
21
|
+
var eo_js_1 = require("./eo.cjs");
|
|
22
|
+
Object.defineProperty(exports, "eo", { enumerable: true, get: function () { return __importDefault(eo_js_1).default; } });
|
|
21
23
|
var es_js_1 = require("./es.cjs");
|
|
22
24
|
Object.defineProperty(exports, "es", { enumerable: true, get: function () { return __importDefault(es_js_1).default; } });
|
|
23
25
|
var fa_js_1 = require("./fa.cjs");
|
package/v4/locales/index.d.cts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as ca } from "./ca.cjs";
|
|
|
5
5
|
export { default as cs } from "./cs.cjs";
|
|
6
6
|
export { default as de } from "./de.cjs";
|
|
7
7
|
export { default as en } from "./en.cjs";
|
|
8
|
+
export { default as eo } from "./eo.cjs";
|
|
8
9
|
export { default as es } from "./es.cjs";
|
|
9
10
|
export { default as fa } from "./fa.cjs";
|
|
10
11
|
export { default as fi } from "./fi.cjs";
|
package/v4/locales/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as ca } from "./ca.js";
|
|
|
5
5
|
export { default as cs } from "./cs.js";
|
|
6
6
|
export { default as de } from "./de.js";
|
|
7
7
|
export { default as en } from "./en.js";
|
|
8
|
+
export { default as eo } from "./eo.js";
|
|
8
9
|
export { default as es } from "./es.js";
|
|
9
10
|
export { default as fa } from "./fa.js";
|
|
10
11
|
export { default as fi } from "./fi.js";
|
package/v4/locales/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as ca } from "./ca.js";
|
|
|
5
5
|
export { default as cs } from "./cs.js";
|
|
6
6
|
export { default as de } from "./de.js";
|
|
7
7
|
export { default as en } from "./en.js";
|
|
8
|
+
export { default as eo } from "./eo.js";
|
|
8
9
|
export { default as es } from "./es.js";
|
|
9
10
|
export { default as fa } from "./fa.js";
|
|
10
11
|
export { default as fi } from "./fi.js";
|