@oxog/vld 2.1.0 → 2.2.7
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/CHANGELOG.md +113 -0
- package/README.md +413 -1235
- package/dist/chunks/errors-core-CerMg2rq.js +1 -0
- package/dist/chunks/index-CkbfQQ4n.js +1 -0
- package/dist/chunks/index-yjpbvFgw.js +1 -0
- package/dist/chunks/ip-validation-g5LWgy9t.js +1 -0
- package/dist/chunks/security-Dy24T8N7.js +1 -0
- package/dist/cjs/chunks/errors-core-DrydF46s.cjs +1 -0
- package/dist/cjs/chunks/index-BEV9nG0N.cjs +1 -0
- package/dist/cjs/chunks/index-ZjHAxYdA.cjs +1 -0
- package/dist/cjs/chunks/ip-validation-BZqPamPC.cjs +1 -0
- package/dist/cjs/chunks/security-aXZVI7qW.cjs +1 -0
- package/dist/cjs/cli/bin.cjs +1 -505
- package/dist/cjs/cli/index.cjs +1 -209
- package/dist/cjs/codecs/index.cjs +1 -45
- package/dist/cjs/coercion/index.cjs +1 -588
- package/dist/cjs/compat/emitter.cjs +1 -184
- package/dist/cjs/compat/result.cjs +1 -189
- package/dist/cjs/errors.cjs +1 -180
- package/dist/cjs/index.cjs +1 -1894
- package/dist/cjs/kernel.cjs +1 -415
- package/dist/cjs/locales/af.cjs +1 -108
- package/dist/cjs/locales/ar.cjs +1 -108
- package/dist/cjs/locales/bn.cjs +1 -108
- package/dist/cjs/locales/da.cjs +1 -108
- package/dist/cjs/locales/de.cjs +1 -108
- package/dist/cjs/locales/en.cjs +1 -108
- package/dist/cjs/locales/es-MX.cjs +1 -107
- package/dist/cjs/locales/es.cjs +1 -96
- package/dist/cjs/locales/fi.cjs +1 -108
- package/dist/cjs/locales/fr.cjs +1 -96
- package/dist/cjs/locales/hi.cjs +1 -108
- package/dist/cjs/locales/id.cjs +1 -108
- package/dist/cjs/locales/index.cjs +1 -43
- package/dist/cjs/locales/it.cjs +1 -108
- package/dist/cjs/locales/ja.cjs +1 -108
- package/dist/cjs/locales/ko.cjs +1 -108
- package/dist/cjs/locales/lazy.cjs +1 -188
- package/dist/cjs/locales/nl.cjs +1 -108
- package/dist/cjs/locales/no.cjs +1 -108
- package/dist/cjs/locales/pl.cjs +1 -108
- package/dist/cjs/locales/pt-BR.cjs +1 -108
- package/dist/cjs/locales/pt.cjs +1 -108
- package/dist/cjs/locales/ru.cjs +1 -108
- package/dist/cjs/locales/runtime.cjs +1 -51
- package/dist/cjs/locales/sv.cjs +1 -108
- package/dist/cjs/locales/sw.cjs +1 -108
- package/dist/cjs/locales/th.cjs +1 -108
- package/dist/cjs/locales/tr.cjs +1 -108
- package/dist/cjs/locales/vi.cjs +1 -108
- package/dist/cjs/locales/zh.cjs +1 -108
- package/dist/cjs/mini.cjs +1 -242
- package/dist/cjs/pigment.cjs +1 -207
- package/dist/cjs/plugins/index.cjs +1 -12
- package/dist/cjs/registry.cjs +1 -37
- package/dist/cjs/v3/index.cjs +1 -425
- package/dist/cjs/v4/core/index.cjs +1 -894
- package/dist/cjs/v4/index.cjs +1 -425
- package/dist/cjs/v4/locales/index.cjs +1 -130
- package/dist/cjs/v4/mini/index.cjs +1 -509
- package/dist/cjs/v4-mini/index.cjs +1 -532
- package/dist/cjs/validators/any.cjs +1 -40
- package/dist/cjs/validators/array.cjs +1 -283
- package/dist/cjs/validators/base.cjs +1 -887
- package/dist/cjs/validators/base64.cjs +1 -73
- package/dist/cjs/validators/bigint.cjs +1 -232
- package/dist/cjs/validators/boolean.cjs +1 -146
- package/dist/cjs/validators/codec.cjs +1 -205
- package/dist/cjs/validators/custom.cjs +1 -71
- package/dist/cjs/validators/date.cjs +1 -278
- package/dist/cjs/validators/discriminated-union.cjs +1 -130
- package/dist/cjs/validators/enum.cjs +1 -154
- package/dist/cjs/validators/file.cjs +1 -130
- package/dist/cjs/validators/function.cjs +1 -63
- package/dist/cjs/validators/hex.cjs +1 -70
- package/dist/cjs/validators/index.cjs +1 -123
- package/dist/cjs/validators/intersection.cjs +1 -120
- package/dist/cjs/validators/json.cjs +1 -70
- package/dist/cjs/validators/lazy.cjs +1 -53
- package/dist/cjs/validators/literal.cjs +1 -64
- package/dist/cjs/validators/map.cjs +1 -218
- package/dist/cjs/validators/nan.cjs +1 -41
- package/dist/cjs/validators/never.cjs +1 -36
- package/dist/cjs/validators/null.cjs +1 -43
- package/dist/cjs/validators/number.cjs +1 -427
- package/dist/cjs/validators/object.cjs +1 -868
- package/dist/cjs/validators/promise.cjs +1 -115
- package/dist/cjs/validators/record.cjs +1 -262
- package/dist/cjs/validators/set.cjs +1 -203
- package/dist/cjs/validators/string-bool.cjs +1 -124
- package/dist/cjs/validators/string-formats.cjs +1 -168
- package/dist/cjs/validators/string.cjs +1 -12
- package/dist/cjs/validators/symbol.cjs +1 -62
- package/dist/cjs/validators/template-literal.cjs +1 -108
- package/dist/cjs/validators/tuple.cjs +1 -187
- package/dist/cjs/validators/uint8array.cjs +1 -106
- package/dist/cjs/validators/undefined.cjs +1 -43
- package/dist/cjs/validators/union.cjs +1 -191
- package/dist/cjs/validators/unknown.cjs +1 -40
- package/dist/cjs/validators/void.cjs +1 -48
- package/dist/cjs/validators/xor.cjs +1 -69
- package/dist/cli/bin.js +1 -406
- package/dist/cli/index.js +1 -205
- package/dist/codecs/index.js +1 -11
- package/dist/coercion/index.js +1 -579
- package/dist/compat/emitter.js +1 -180
- package/dist/compat/result.js +1 -170
- package/dist/errors-core.d.ts +32 -2
- package/dist/errors.js +1 -171
- package/dist/index.d.ts +315 -361
- package/dist/index.js +1 -1534
- package/dist/kernel.js +1 -409
- package/dist/locales/af.js +1 -106
- package/dist/locales/ar.js +1 -106
- package/dist/locales/bn.js +1 -106
- package/dist/locales/da.js +1 -106
- package/dist/locales/de.js +1 -106
- package/dist/locales/en.js +1 -106
- package/dist/locales/es-MX.js +1 -105
- package/dist/locales/es.js +1 -94
- package/dist/locales/fi.js +1 -106
- package/dist/locales/fr.js +1 -94
- package/dist/locales/hi.js +1 -106
- package/dist/locales/id.js +1 -106
- package/dist/locales/index.js +1 -29
- package/dist/locales/it.js +1 -106
- package/dist/locales/ja.js +1 -106
- package/dist/locales/ko.js +1 -106
- package/dist/locales/lazy.js +1 -177
- package/dist/locales/nl.js +1 -106
- package/dist/locales/no.js +1 -106
- package/dist/locales/pl.js +1 -106
- package/dist/locales/pt-BR.js +1 -106
- package/dist/locales/pt.js +1 -106
- package/dist/locales/ru.js +1 -106
- package/dist/locales/runtime.js +1 -41
- package/dist/locales/sv.js +1 -106
- package/dist/locales/sw.js +1 -106
- package/dist/locales/th.js +1 -106
- package/dist/locales/tr.js +1 -106
- package/dist/locales/vi.js +1 -106
- package/dist/locales/zh.js +1 -106
- package/dist/mini.d.ts +3 -3
- package/dist/mini.js +1 -156
- package/dist/pigment.js +1 -180
- package/dist/plugins/index.js +1 -1
- package/dist/registry.js +1 -34
- package/dist/utils/json-schema.d.ts +10 -1
- package/dist/v3/index.js +1 -46
- package/dist/v4/core/index.d.ts +28 -16
- package/dist/v4/core/index.js +1 -277
- package/dist/v4/index.js +1 -50
- package/dist/v4/locales/index.d.ts +4 -0
- package/dist/v4/locales/index.js +1 -77
- package/dist/v4/mini/index.js +1 -47
- package/dist/v4-mini/index.d.ts +1 -1
- package/dist/v4-mini/index.js +1 -75
- package/dist/validators/any.js +1 -37
- package/dist/validators/array.d.ts +7 -0
- package/dist/validators/array.js +1 -279
- package/dist/validators/base.d.ts +210 -17
- package/dist/validators/base.js +1 -868
- package/dist/validators/base64.js +1 -68
- package/dist/validators/bigint.d.ts +7 -0
- package/dist/validators/bigint.js +1 -228
- package/dist/validators/boolean.js +1 -142
- package/dist/validators/codec.js +1 -200
- package/dist/validators/custom.d.ts +20 -10
- package/dist/validators/custom.js +1 -67
- package/dist/validators/date.d.ts +2 -0
- package/dist/validators/date.js +1 -274
- package/dist/validators/discriminated-union.d.ts +4 -2
- package/dist/validators/discriminated-union.js +1 -123
- package/dist/validators/enum.d.ts +8 -2
- package/dist/validators/enum.js +1 -150
- package/dist/validators/file.js +1 -125
- package/dist/validators/function.js +1 -58
- package/dist/validators/hex.js +1 -65
- package/dist/validators/index.d.ts +1 -1
- package/dist/validators/index.js +1 -35
- package/dist/validators/intersection.js +1 -116
- package/dist/validators/json.js +1 -66
- package/dist/validators/lazy.js +1 -50
- package/dist/validators/literal.d.ts +8 -3
- package/dist/validators/literal.js +1 -60
- package/dist/validators/map.d.ts +7 -0
- package/dist/validators/map.js +1 -214
- package/dist/validators/nan.js +1 -38
- package/dist/validators/never.js +1 -32
- package/dist/validators/null.js +1 -40
- package/dist/validators/number.d.ts +25 -1
- package/dist/validators/number.js +1 -423
- package/dist/validators/object.d.ts +18 -2
- package/dist/validators/object.js +1 -864
- package/dist/validators/promise.d.ts +6 -7
- package/dist/validators/promise.js +1 -111
- package/dist/validators/record.d.ts +13 -8
- package/dist/validators/record.js +1 -258
- package/dist/validators/set.d.ts +5 -0
- package/dist/validators/set.js +1 -199
- package/dist/validators/string-bool.js +1 -120
- package/dist/validators/string-formats.d.ts +58 -62
- package/dist/validators/string-formats.js +1 -135
- package/dist/validators/string.d.ts +49 -10
- package/dist/validators/string.js +1 -4
- package/dist/validators/symbol.js +1 -58
- package/dist/validators/template-literal.js +1 -103
- package/dist/validators/tuple.d.ts +17 -13
- package/dist/validators/tuple.js +1 -183
- package/dist/validators/uint8array.js +1 -101
- package/dist/validators/undefined.js +1 -40
- package/dist/validators/union.d.ts +1 -0
- package/dist/validators/union.js +1 -187
- package/dist/validators/unknown.js +1 -37
- package/dist/validators/void.js +1 -44
- package/dist/validators/xor.d.ts +2 -2
- package/dist/validators/xor.js +1 -66
- package/package.json +240 -238
- package/dist/chunks/errors-core-BeiFUtZM.js +0 -81
- package/dist/chunks/index-0R2ntSud.js +0 -508
- package/dist/chunks/index-BvH403Yy.js +0 -88
- package/dist/chunks/security-B0Pd_vSY.js +0 -35
- package/dist/chunks/string-BJRQod3t.js +0 -530
- package/dist/cjs/chunks/errors-core-DWxLFs2f.cjs +0 -83
- package/dist/cjs/chunks/index-BkI37108.cjs +0 -538
- package/dist/cjs/chunks/index-Cc3bjUMX.cjs +0 -91
- package/dist/cjs/chunks/security-Dc3Jh13T.cjs +0 -37
- package/dist/cjs/chunks/string-BKZrc4hs.cjs +0 -533
package/dist/locales/zh.js
CHANGED
|
@@ -1,106 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
// String validation messages
|
|
3
|
-
invalidString: '无效字符串',
|
|
4
|
-
stringMin: (min) => `字符串必须至少${min}个字符`,
|
|
5
|
-
stringMax: (max) => `字符串不能超过${max}个字符`,
|
|
6
|
-
stringLength: (length) => `字符串必须正好${length}个字符`,
|
|
7
|
-
stringEmail: '无效邮箱地址',
|
|
8
|
-
stringUrl: '无效URL',
|
|
9
|
-
stringUuid: '无效UUID',
|
|
10
|
-
stringRegex: '无效格式',
|
|
11
|
-
stringStartsWith: (prefix) => `字符串必须以"${prefix}"开头`,
|
|
12
|
-
stringEndsWith: (suffix) => `字符串必须以"${suffix}"结尾`,
|
|
13
|
-
stringIncludes: (substring) => `字符串必须包含"${substring}"`,
|
|
14
|
-
stringIp: '无效IP地址',
|
|
15
|
-
stringIpv4: '无效IPv4地址',
|
|
16
|
-
stringIpv6: '无效IPv6地址',
|
|
17
|
-
stringEmpty: '字符串不能为空',
|
|
18
|
-
// Number validation messages
|
|
19
|
-
invalidNumber: '无效数字',
|
|
20
|
-
numberMin: (min) => `数字必须至少为${min}`,
|
|
21
|
-
numberMax: (max) => `数字不能大于${max}`,
|
|
22
|
-
numberInt: '数字必须是整数',
|
|
23
|
-
numberPositive: '数字必须是正数',
|
|
24
|
-
numberNegative: '数字必须是负数',
|
|
25
|
-
numberNonnegative: '数字不能是负数',
|
|
26
|
-
numberNonpositive: '数字不能是正数',
|
|
27
|
-
numberFinite: '数字必须是有限的',
|
|
28
|
-
numberSafe: '数字必须是安全整数',
|
|
29
|
-
numberMultipleOf: (value) => `数字必须是${value}的倍数`,
|
|
30
|
-
// Boolean validation messages
|
|
31
|
-
invalidBoolean: '无效布尔值',
|
|
32
|
-
// Date validation messages
|
|
33
|
-
invalidDate: '无效日期',
|
|
34
|
-
dateMin: (date) => `日期必须在${date.toISOString()}之后`,
|
|
35
|
-
dateMax: (date) => `日期必须在${date.toISOString()}之前`,
|
|
36
|
-
// Object validation messages
|
|
37
|
-
invalidObject: '无效对象',
|
|
38
|
-
unexpectedKeys: (keys) => `意外的键: ${keys.join(', ')}`,
|
|
39
|
-
// Array validation messages
|
|
40
|
-
invalidArray: '无效数组',
|
|
41
|
-
arrayMin: (min) => `数组必须至少有${min}个元素`,
|
|
42
|
-
arrayMax: (max) => `数组不能超过${max}个元素`,
|
|
43
|
-
arrayLength: (length) => `数组必须正好有${length}个元素`,
|
|
44
|
-
arrayEmpty: '数组不能为空',
|
|
45
|
-
arrayItem: (index, error) => `索引${index}处的无效元素: ${error}`,
|
|
46
|
-
// Object field validation
|
|
47
|
-
objectField: (field, error) => `无效字段"${field}": ${error}`,
|
|
48
|
-
// Union validation messages
|
|
49
|
-
unionNoMatch: (errors) => `没有匹配的联合成员: ${errors.join(', ')}`,
|
|
50
|
-
// Intersection validation messages
|
|
51
|
-
intersectionError: (error) => `交集验证失败: ${error}`,
|
|
52
|
-
// Literal validation messages
|
|
53
|
-
literalExpected: (expected, received) => `期望${expected},得到${received}`,
|
|
54
|
-
// Enum validation messages
|
|
55
|
-
enumExpected: (values, received) => `期望[${values.join(', ')}]中的一个,得到${received}`,
|
|
56
|
-
// Special type validation messages
|
|
57
|
-
expectedUndefined: '期望undefined',
|
|
58
|
-
neverType: 'never类型无法解析',
|
|
59
|
-
// New advanced type validation messages
|
|
60
|
-
invalidBigint: '无效bigint',
|
|
61
|
-
invalidSymbol: '无效符号',
|
|
62
|
-
invalidTuple: '无效元组',
|
|
63
|
-
tupleLength: (expected, received) => `元组必须正好有${expected}个元素,得到${received}个`,
|
|
64
|
-
invalidRecord: '无效记录',
|
|
65
|
-
invalidSet: '无效Set',
|
|
66
|
-
invalidMap: '无效Map',
|
|
67
|
-
// Transformation and refinement messages
|
|
68
|
-
transformError: (error) => `转换失败: ${error}`,
|
|
69
|
-
refinementError: (error) => `细化失败: ${error}`,
|
|
70
|
-
customValidationError: (error) => `自定义验证失败: ${error}`,
|
|
71
|
-
// Coercion messages
|
|
72
|
-
coercionFailed: (type, value) => `无法将${JSON.stringify(value)}强制转换为${type}`,
|
|
73
|
-
// Codec messages
|
|
74
|
-
codecDecodeFailed: 'Failed to decode value',
|
|
75
|
-
codecEncodeFailed: 'Failed to encode value',
|
|
76
|
-
codecAsyncNotSupported: 'Async codec operations require using parseAsync/encodeAsync methods',
|
|
77
|
-
// Base64/Hex messages
|
|
78
|
-
invalidBase64: 'Invalid base64 string',
|
|
79
|
-
invalidHex: 'Invalid hexadecimal string',
|
|
80
|
-
// Uint8Array messages
|
|
81
|
-
expectedUint8Array: 'Expected Uint8Array',
|
|
82
|
-
uint8ArrayMinLength: (min) => `Uint8Array must have at least ${min} bytes`,
|
|
83
|
-
uint8ArrayMaxLength: (max) => `Uint8Array must have at most ${max} bytes`,
|
|
84
|
-
uint8ArrayExactLength: (length) => `Uint8Array must have exactly ${length} bytes`,
|
|
85
|
-
// Generic type error messages
|
|
86
|
-
expectedString: 'Expected string',
|
|
87
|
-
stringExpected: (received, expected) => `期望${expected},得到${received}`,
|
|
88
|
-
stringBoolExpected: (validValues, received) => `无效的布尔字符串。期望以下之一: ${validValues},得到: "${received}"`,
|
|
89
|
-
invalidJson: '无效的JSON',
|
|
90
|
-
stringPatternInvalid: '字符串与所需模式不匹配',
|
|
91
|
-
// File validation messages
|
|
92
|
-
invalidFile: 'Expected a File object',
|
|
93
|
-
fileNotSupported: 'File API not supported in this environment',
|
|
94
|
-
fileMinSize: (min) => `File size must be at least ${min} bytes`,
|
|
95
|
-
fileMaxSize: (max) => `File size must not exceed ${max} bytes`,
|
|
96
|
-
fileMimeType: (allowed) => `Invalid file type. Expected: ${allowed.join(", ")}`,
|
|
97
|
-
// Function validation messages
|
|
98
|
-
invalidFunction: '期望一个函数',
|
|
99
|
-
// CIDR validation messages
|
|
100
|
-
stringCidrv4: '无效的IPv4 CIDR块',
|
|
101
|
-
stringCidrv6: '无效的IPv6 CIDR块',
|
|
102
|
-
// Safe extend validation messages
|
|
103
|
-
safeExtendOverlap: (keys) => `无法覆盖现有键: ${keys.join(', ')}。如果要覆盖请使用extend()。`
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export { zh };
|
|
1
|
+
const e={invalidString:"无效字符串",stringMin:e=>`字符串必须至少${e}个字符`,stringMax:e=>`字符串不能超过${e}个字符`,stringLength:e=>`字符串必须正好${e}个字符`,stringEmail:"无效邮箱地址",stringUrl:"无效URL",stringUuid:"无效UUID",stringRegex:"无效格式",stringStartsWith:e=>`字符串必须以"${e}"开头`,stringEndsWith:e=>`字符串必须以"${e}"结尾`,stringIncludes:e=>`字符串必须包含"${e}"`,stringIp:"无效IP地址",stringIpv4:"无效IPv4地址",stringIpv6:"无效IPv6地址",stringEmpty:"字符串不能为空",invalidNumber:"无效数字",numberMin:e=>`数字必须至少为${e}`,numberMax:e=>`数字不能大于${e}`,numberInt:"数字必须是整数",numberPositive:"数字必须是正数",numberNegative:"数字必须是负数",numberNonnegative:"数字不能是负数",numberNonpositive:"数字不能是正数",numberFinite:"数字必须是有限的",numberSafe:"数字必须是安全整数",numberMultipleOf:e=>`数字必须是${e}的倍数`,invalidBoolean:"无效布尔值",invalidDate:"无效日期",dateMin:e=>`日期必须在${e.toISOString()}之后`,dateMax:e=>`日期必须在${e.toISOString()}之前`,invalidObject:"无效对象",unexpectedKeys:e=>`意外的键: ${e.join(", ")}`,invalidArray:"无效数组",arrayMin:e=>`数组必须至少有${e}个元素`,arrayMax:e=>`数组不能超过${e}个元素`,arrayLength:e=>`数组必须正好有${e}个元素`,arrayEmpty:"数组不能为空",arrayItem:(e,i)=>`索引${e}处的无效元素: ${i}`,objectField:(e,i)=>`无效字段"${e}": ${i}`,unionNoMatch:e=>`没有匹配的联合成员: ${e.join(", ")}`,intersectionError:e=>`交集验证失败: ${e}`,literalExpected:(e,i)=>`期望${e},得到${i}`,enumExpected:(e,i)=>`期望[${e.join(", ")}]中的一个,得到${i}`,expectedUndefined:"期望undefined",neverType:"never类型无法解析",invalidBigint:"无效bigint",invalidSymbol:"无效符号",invalidTuple:"无效元组",tupleLength:(e,i)=>`元组必须正好有${e}个元素,得到${i}个`,invalidRecord:"无效记录",invalidSet:"无效Set",invalidMap:"无效Map",transformError:e=>`转换失败: ${e}`,refinementError:e=>`细化失败: ${e}`,customValidationError:e=>`自定义验证失败: ${e}`,coercionFailed:(e,i)=>`无法将${JSON.stringify(i)}强制转换为${e}`,codecDecodeFailed:"Failed to decode value",codecEncodeFailed:"Failed to encode value",codecAsyncNotSupported:"Async codec operations require using parseAsync/encodeAsync methods",invalidBase64:"Invalid base64 string",invalidHex:"Invalid hexadecimal string",expectedUint8Array:"Expected Uint8Array",uint8ArrayMinLength:e=>`Uint8Array must have at least ${e} bytes`,uint8ArrayMaxLength:e=>`Uint8Array must have at most ${e} bytes`,uint8ArrayExactLength:e=>`Uint8Array must have exactly ${e} bytes`,expectedString:"Expected string",stringExpected:(e,i)=>`期望${i},得到${e}`,stringBoolExpected:(e,i)=>`无效的布尔字符串。期望以下之一: ${e},得到: "${i}"`,invalidJson:"无效的JSON",stringPatternInvalid:"字符串与所需模式不匹配",invalidFile:"Expected a File object",fileNotSupported:"File API not supported in this environment",fileMinSize:e=>`File size must be at least ${e} bytes`,fileMaxSize:e=>`File size must not exceed ${e} bytes`,fileMimeType:e=>`Invalid file type. Expected: ${e.join(", ")}`,invalidFunction:"期望一个函数",stringCidrv4:"无效的IPv4 CIDR块",stringCidrv6:"无效的IPv6 CIDR块",safeExtendOverlap:e=>`无法覆盖现有键: ${e.join(", ")}。如果要覆盖请使用extend()。`};export{e as zh};
|
package/dist/mini.d.ts
CHANGED
|
@@ -110,11 +110,11 @@ export declare const strictObject: <T extends Record<string, any>>(shape: { [K i
|
|
|
110
110
|
/** Create a loose object validator (extra keys passed through) */
|
|
111
111
|
export declare const looseObject: <T extends Record<string, any>>(shape: { [K in keyof T]: VldBase<unknown, T[K]>; }) => VldObject<T>;
|
|
112
112
|
/** Create a tuple validator */
|
|
113
|
-
export declare const tuple: <T extends readonly VldBase<any, any>[]>(...items: T) => VldTuple<[...T]>;
|
|
113
|
+
export declare const tuple: <T extends readonly VldBase<any, any>[]>(...items: T) => VldTuple<[...T], null>;
|
|
114
114
|
/** Create a record validator */
|
|
115
|
-
export declare const record: <T>(value: VldBase<unknown, T>) => VldRecord<T>;
|
|
115
|
+
export declare const record: <T>(value: VldBase<unknown, T>) => VldRecord<T, string>;
|
|
116
116
|
/** Create a partial record validator */
|
|
117
|
-
export declare const partialRecord: <T>(value: VldBase<unknown, T>) => VldRecord<T | undefined>;
|
|
117
|
+
export declare const partialRecord: <T>(value: VldBase<unknown, T>) => VldRecord<T | undefined, string>;
|
|
118
118
|
/** Create a loose record validator */
|
|
119
119
|
export declare const looseRecord: <T>(value: VldBase<unknown, T>) => VldBase<unknown, Record<string, T>>;
|
|
120
120
|
/** Create a set validator */
|
package/dist/mini.js
CHANGED
|
@@ -1,156 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { VldBase, VldBrand, VldCatch, VldDefault, VldPipe, VldReadonly, VldRefine, VldSuperRefine, VldTransform } from './validators/base.js';
|
|
3
|
-
import { V as VldString } from './chunks/string-BJRQod3t.js';
|
|
4
|
-
import { VldNumber } from './validators/number.js';
|
|
5
|
-
import { VldBoolean } from './validators/boolean.js';
|
|
6
|
-
import { VldDate } from './validators/date.js';
|
|
7
|
-
import { VldBigInt } from './validators/bigint.js';
|
|
8
|
-
import { VldSymbol } from './validators/symbol.js';
|
|
9
|
-
import { VldStringBool } from './validators/string-bool.js';
|
|
10
|
-
import { VldArray } from './validators/array.js';
|
|
11
|
-
import { VldObject } from './validators/object.js';
|
|
12
|
-
import { VldTuple } from './validators/tuple.js';
|
|
13
|
-
import { VldRecord } from './validators/record.js';
|
|
14
|
-
import { VldSet } from './validators/set.js';
|
|
15
|
-
import { VldMap } from './validators/map.js';
|
|
16
|
-
import { VldUnion } from './validators/union.js';
|
|
17
|
-
import { VldIntersection } from './validators/intersection.js';
|
|
18
|
-
import { VldLiteral } from './validators/literal.js';
|
|
19
|
-
import { VldEnum } from './validators/enum.js';
|
|
20
|
-
import { VldAny } from './validators/any.js';
|
|
21
|
-
import { VldUnknown } from './validators/unknown.js';
|
|
22
|
-
import { VldVoid } from './validators/void.js';
|
|
23
|
-
import { VldNever } from './validators/never.js';
|
|
24
|
-
import { VldNull } from './validators/null.js';
|
|
25
|
-
import { VldUndefined } from './validators/undefined.js';
|
|
26
|
-
import { VldNan } from './validators/nan.js';
|
|
27
|
-
import { VldLazy } from './validators/lazy.js';
|
|
28
|
-
import { VldDiscriminatedUnion } from './validators/discriminated-union.js';
|
|
29
|
-
import { VldXor } from './validators/xor.js';
|
|
30
|
-
import { VldJson } from './validators/json.js';
|
|
31
|
-
import { VldCoerceBigInt, VldCoerceDate, VldCoerceBoolean, VldCoerceNumber, VldCoerceString } from './coercion/index.js';
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* VLD Mini - Tree-Shakable Functional API
|
|
35
|
-
*
|
|
36
|
-
* This module provides a functional, tree-shakable alternative to the main `v` object.
|
|
37
|
-
* Use this when bundle size is critical.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* import { string, number, object, optional } from '@oxog/vld/mini';
|
|
42
|
-
*
|
|
43
|
-
* const schema = object({
|
|
44
|
-
* name: string().min(1),
|
|
45
|
-
* age: optional(number().int())
|
|
46
|
-
* });
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
|
-
// ============================================
|
|
50
|
-
// Base Types & Classes
|
|
51
|
-
// ============================================
|
|
52
|
-
// --- Primitive Validators ---
|
|
53
|
-
/** Create a string validator */
|
|
54
|
-
const string = () => VldString.create();
|
|
55
|
-
/** Create a number validator */
|
|
56
|
-
const number = () => VldNumber.create();
|
|
57
|
-
/** Create an integer validator */
|
|
58
|
-
const int = () => VldNumber.create().int();
|
|
59
|
-
/** Create an int32 validator (-2147483648 to 2147483647) */
|
|
60
|
-
const int32 = () => VldNumber.create().int().min(-2147483648).max(2147483647);
|
|
61
|
-
/** Create a boolean validator */
|
|
62
|
-
const boolean = () => VldBoolean.create();
|
|
63
|
-
/** Create a date validator */
|
|
64
|
-
const date = () => VldDate.create();
|
|
65
|
-
/** Create a bigint validator */
|
|
66
|
-
const bigint = () => VldBigInt.create();
|
|
67
|
-
/** Create a symbol validator */
|
|
68
|
-
const symbol = () => VldSymbol.create();
|
|
69
|
-
/** Create a string-to-boolean validator */
|
|
70
|
-
const stringbool = (options) => VldStringBool.create(options);
|
|
71
|
-
// --- Complex Validators ---
|
|
72
|
-
/** Create an array validator */
|
|
73
|
-
const array = (item) => VldArray.create(item);
|
|
74
|
-
/** Create an object validator */
|
|
75
|
-
const object = (shape) => VldObject.create(shape);
|
|
76
|
-
/** Create a strict object validator (no extra keys allowed) */
|
|
77
|
-
const strictObject = (shape) => VldObject.create(shape).strict();
|
|
78
|
-
/** Create a loose object validator (extra keys passed through) */
|
|
79
|
-
const looseObject = (shape) => VldObject.create(shape).passthrough();
|
|
80
|
-
/** Create a tuple validator */
|
|
81
|
-
const tuple = (...items) => VldTuple.create(...items);
|
|
82
|
-
/** Create a record validator */
|
|
83
|
-
const record = (value) => VldRecord.create(value);
|
|
84
|
-
/** Create a partial record validator */
|
|
85
|
-
const partialRecord = (value) => VldRecord.create(value).partial();
|
|
86
|
-
/** Create a loose record validator */
|
|
87
|
-
const looseRecord = (value) => VldRecord.create(value).loose();
|
|
88
|
-
/** Create a set validator */
|
|
89
|
-
const set = (item) => VldSet.create(item);
|
|
90
|
-
/** Create a map validator */
|
|
91
|
-
const map = (key, value) => VldMap.create(key, value);
|
|
92
|
-
// --- Union & Intersection ---
|
|
93
|
-
/** Create a union validator (value must match one of the validators) */
|
|
94
|
-
const union = (...validators) => VldUnion.create(...validators);
|
|
95
|
-
/** Create an intersection validator (value must match both validators) */
|
|
96
|
-
const intersection = (first, second) => VldIntersection.create(first, second);
|
|
97
|
-
/** Create a discriminated union validator */
|
|
98
|
-
const discriminatedUnion = (discriminator, ...options) => VldDiscriminatedUnion.create(discriminator, [...options]);
|
|
99
|
-
/** Create an XOR validator (value must match exactly one of the validators) */
|
|
100
|
-
const xor = (...options) => VldXor.create([...options]);
|
|
101
|
-
// --- Literal & Enum ---
|
|
102
|
-
/** Create a literal validator */
|
|
103
|
-
const literal = (value) => VldLiteral.create(value);
|
|
104
|
-
/** Create an enum validator */
|
|
105
|
-
const enumValidator = (...values) => VldEnum.create(values);
|
|
106
|
-
// --- Special Validators ---
|
|
107
|
-
/** Create a validator that accepts any value */
|
|
108
|
-
const any = () => VldAny.create();
|
|
109
|
-
/** Create a validator that accepts unknown values */
|
|
110
|
-
const unknown = () => VldUnknown.create();
|
|
111
|
-
/** Create a void validator */
|
|
112
|
-
const voidValidator = () => VldVoid.create();
|
|
113
|
-
/** Create a never validator (always fails) */
|
|
114
|
-
const never = () => VldNever.create();
|
|
115
|
-
/** Create a null validator */
|
|
116
|
-
const nullValidator = () => VldNull.create();
|
|
117
|
-
/** Create an undefined validator */
|
|
118
|
-
const undefinedValidator = () => VldUndefined.create();
|
|
119
|
-
/** Create a NaN validator */
|
|
120
|
-
const nan = () => VldNan.create();
|
|
121
|
-
// --- Utility Validators ---
|
|
122
|
-
/** Create a lazy validator for recursive schemas */
|
|
123
|
-
const lazy = (schemaGetter) => VldLazy.create(schemaGetter);
|
|
124
|
-
/** Create a JSON validator */
|
|
125
|
-
const json = (schema) => VldJson.create(schema);
|
|
126
|
-
// ============================================
|
|
127
|
-
// Utility Functions (Wrappers)
|
|
128
|
-
// ============================================
|
|
129
|
-
/** Make a validator optional (allows undefined) */
|
|
130
|
-
const optional = (validator) => VldOptional.create(validator);
|
|
131
|
-
/** Make a validator nullable (allows null) */
|
|
132
|
-
const nullable = (validator) => VldNullable.create(validator);
|
|
133
|
-
/** Make a validator nullish (allows null or undefined) */
|
|
134
|
-
const nullish = (validator) => VldNullish.create(validator);
|
|
135
|
-
/** Preprocess input before validation */
|
|
136
|
-
const preprocess = (preprocessor, schema) => VldPreprocess.create(preprocessor, schema);
|
|
137
|
-
/** Coercion validators - convert values to target type before validation */
|
|
138
|
-
const coerce = {
|
|
139
|
-
/** Coerce to string */
|
|
140
|
-
string: () => VldCoerceString.create(),
|
|
141
|
-
/** Coerce to number */
|
|
142
|
-
number: () => VldCoerceNumber.create(),
|
|
143
|
-
/** Coerce to boolean */
|
|
144
|
-
boolean: () => VldCoerceBoolean.create(),
|
|
145
|
-
/** Coerce to date */
|
|
146
|
-
date: () => VldCoerceDate.create(),
|
|
147
|
-
/** Coerce to bigint */
|
|
148
|
-
bigint: () => VldCoerceBigInt.create(),
|
|
149
|
-
};
|
|
150
|
-
// ============================================
|
|
151
|
-
// NEVER Constant (for transforms)
|
|
152
|
-
// ============================================
|
|
153
|
-
/** NEVER constant for use in transforms - Zod 4 API parity */
|
|
154
|
-
const NEVER = VldNever.create();
|
|
155
|
-
|
|
156
|
-
export { NEVER, VldAny, VldArray, VldBigInt, VldBoolean, VldDate, VldDiscriminatedUnion, VldEnum, VldIntersection, VldJson, VldLazy, VldLiteral, VldMap, VldNan, VldNever, VldNull, VldNullable, VldNullish, VldNumber, VldObject, VldOptional, VldPreprocess, VldRecord, VldSet, VldString, VldStringBool, VldSymbol, VldTuple, VldUndefined, VldUnion, VldUnknown, VldVoid, VldXor, any, array, bigint, boolean, coerce, date, discriminatedUnion, enumValidator, int, int32, intersection, json, lazy, literal, looseObject, looseRecord, map, nan, never, nullValidator, nullable, nullish, number, object, optional, partialRecord, preprocess, record, set, strictObject, string, stringbool, symbol, tuple, undefinedValidator, union, unknown, voidValidator, xor };
|
|
1
|
+
import{VldNullable as r,VldNullish as t,VldOptional as a,VldPreprocess as e}from"./validators/base.js";export{VldBase,VldBrand,VldCatch,VldDefault,VldPipe,VldReadonly,VldRefine,VldSuperRefine,VldTransform}from"./validators/base.js";import{VldString as o}from"./validators/string.js";import{VldNumber as i}from"./validators/number.js";import{VldBoolean as s}from"./validators/boolean.js";import{VldDate as m}from"./validators/date.js";import{VldBigInt as c}from"./validators/bigint.js";import{VldSymbol as l}from"./validators/symbol.js";import{VldStringBool as d}from"./validators/string-bool.js";import{VldArray as n}from"./validators/array.js";import{VldObject as p}from"./validators/object.js";import{VldTuple as f}from"./validators/tuple.js";import{VldRecord as j}from"./validators/record.js";import{VldSet as v}from"./validators/set.js";import{VldMap as u}from"./validators/map.js";import{VldUnion as b}from"./validators/union.js";import{VldIntersection as V}from"./validators/intersection.js";import{VldLiteral as g}from"./validators/literal.js";import{VldEnum as x}from"./validators/enum.js";import{VldAny as y}from"./validators/any.js";import{VldUnknown as h}from"./validators/unknown.js";import{VldVoid as R}from"./validators/void.js";import{VldNever as B}from"./validators/never.js";import{VldNull as k}from"./validators/null.js";import{VldUndefined as w}from"./validators/undefined.js";import{VldNan as z}from"./validators/nan.js";import{VldLazy as C}from"./validators/lazy.js";import{VldDiscriminatedUnion as D}from"./validators/discriminated-union.js";import{VldXor as P}from"./validators/xor.js";import{VldJson as S}from"./validators/json.js";import{VldCoerceBigInt as T,VldCoerceDate as q,VldCoerceBoolean as A,VldCoerceNumber as E,VldCoerceString as F}from"./coercion/index.js";const G=()=>o.create(),H=()=>i.create(),I=()=>i.create().int(),J=()=>i.create().int().min(-2147483648).max(2147483647),K=()=>s.create(),L=()=>m.create(),M=()=>c.create(),N=()=>l.create(),O=r=>d.create(r),Q=r=>n.create(r),U=r=>p.create(r),W=r=>p.create(r).strict(),X=r=>p.create(r).passthrough(),Y=(...r)=>f.create(...r),Z=r=>j.create(r),$=r=>j.create(r).partial(),_=r=>j.create(r).loose(),rr=r=>v.create(r),tr=(r,t)=>u.create(r,t),ar=(...r)=>b.create(...r),er=(r,t)=>V.create(r,t),or=(r,...t)=>D.create(r,[...t]),ir=(...r)=>P.create([...r]),sr=r=>g.create(r),mr=(...r)=>x.create(r),cr=()=>y.create(),lr=()=>h.create(),dr=()=>R.create(),nr=()=>B.create(),pr=()=>k.create(),fr=()=>w.create(),jr=()=>z.create(),vr=r=>C.create(r),ur=r=>S.create(r),br=r=>a.create(r),Vr=t=>r.create(t),gr=r=>t.create(r),xr=(r,t)=>e.create(r,t),yr={string:()=>F.create(),number:()=>E.create(),boolean:()=>A.create(),date:()=>q.create(),bigint:()=>T.create()},hr=B.create();export{hr as NEVER,y as VldAny,n as VldArray,c as VldBigInt,s as VldBoolean,m as VldDate,D as VldDiscriminatedUnion,x as VldEnum,V as VldIntersection,S as VldJson,C as VldLazy,g as VldLiteral,u as VldMap,z as VldNan,B as VldNever,k as VldNull,r as VldNullable,t as VldNullish,i as VldNumber,p as VldObject,a as VldOptional,e as VldPreprocess,j as VldRecord,v as VldSet,o as VldString,d as VldStringBool,l as VldSymbol,f as VldTuple,w as VldUndefined,b as VldUnion,h as VldUnknown,R as VldVoid,P as VldXor,cr as any,Q as array,M as bigint,K as boolean,yr as coerce,L as date,or as discriminatedUnion,mr as enumValidator,I as int,J as int32,er as intersection,ur as json,vr as lazy,sr as literal,X as looseObject,_ as looseRecord,tr as map,jr as nan,nr as never,pr as nullValidator,Vr as nullable,gr as nullish,H as number,U as object,br as optional,$ as partialRecord,xr as preprocess,Z as record,rr as set,W as strictObject,G as string,O as stringbool,N as symbol,Y as tuple,fr as undefinedValidator,ar as union,lr as unknown,dr as voidValidator,ir as xor};
|
package/dist/pigment.js
CHANGED
|
@@ -1,180 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* VLD Pigment - Colored Console Output
|
|
3
|
-
*
|
|
4
|
-
* This module provides ANSI color utilities for terminal output,
|
|
5
|
-
* compatible with @oxog/pigment when available.
|
|
6
|
-
*/
|
|
7
|
-
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
8
|
-
/**
|
|
9
|
-
* Check if colors are supported in the current environment
|
|
10
|
-
*/
|
|
11
|
-
function supportsColor() {
|
|
12
|
-
// Check for NO_COLOR environment variable
|
|
13
|
-
if (typeof process !== 'undefined' && process.env?.['NO_COLOR']) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
// Check for FORCE_COLOR environment variable
|
|
17
|
-
if (typeof process !== 'undefined' && process.env?.['FORCE_COLOR']) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
// Check for TTY
|
|
21
|
-
if (typeof process !== 'undefined' && process.stdout?.isTTY) {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
// Browser environment - no ANSI colors
|
|
25
|
-
if (typeof window !== 'undefined') {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* ANSI escape codes
|
|
32
|
-
*/
|
|
33
|
-
const ANSI = {
|
|
34
|
-
// Reset
|
|
35
|
-
reset: '\x1b[0m',
|
|
36
|
-
// Styles
|
|
37
|
-
bold: '\x1b[1m',
|
|
38
|
-
dim: '\x1b[2m',
|
|
39
|
-
italic: '\x1b[3m',
|
|
40
|
-
underline: '\x1b[4m',
|
|
41
|
-
blink: '\x1b[5m',
|
|
42
|
-
inverse: '\x1b[7m',
|
|
43
|
-
hidden: '\x1b[8m',
|
|
44
|
-
strikethrough: '\x1b[9m',
|
|
45
|
-
// Foreground colors
|
|
46
|
-
black: '\x1b[30m',
|
|
47
|
-
red: '\x1b[31m',
|
|
48
|
-
green: '\x1b[32m',
|
|
49
|
-
yellow: '\x1b[33m',
|
|
50
|
-
blue: '\x1b[34m',
|
|
51
|
-
magenta: '\x1b[35m',
|
|
52
|
-
cyan: '\x1b[36m',
|
|
53
|
-
white: '\x1b[37m',
|
|
54
|
-
gray: '\x1b[90m',
|
|
55
|
-
grey: '\x1b[90m',
|
|
56
|
-
// Bright foreground colors
|
|
57
|
-
brightRed: '\x1b[91m',
|
|
58
|
-
brightGreen: '\x1b[92m',
|
|
59
|
-
brightYellow: '\x1b[93m',
|
|
60
|
-
brightBlue: '\x1b[94m',
|
|
61
|
-
brightMagenta: '\x1b[95m',
|
|
62
|
-
brightCyan: '\x1b[96m',
|
|
63
|
-
brightWhite: '\x1b[97m',
|
|
64
|
-
// Background colors
|
|
65
|
-
bgBlack: '\x1b[40m',
|
|
66
|
-
bgRed: '\x1b[41m',
|
|
67
|
-
bgGreen: '\x1b[42m',
|
|
68
|
-
bgYellow: '\x1b[43m',
|
|
69
|
-
bgBlue: '\x1b[44m',
|
|
70
|
-
bgMagenta: '\x1b[45m',
|
|
71
|
-
bgCyan: '\x1b[46m',
|
|
72
|
-
bgWhite: '\x1b[47m',
|
|
73
|
-
// Bright background colors
|
|
74
|
-
bgBrightRed: '\x1b[101m',
|
|
75
|
-
bgBrightGreen: '\x1b[102m',
|
|
76
|
-
bgBrightYellow: '\x1b[103m',
|
|
77
|
-
bgBrightBlue: '\x1b[104m',
|
|
78
|
-
bgBrightMagenta: '\x1b[105m',
|
|
79
|
-
bgBrightCyan: '\x1b[106m',
|
|
80
|
-
bgBrightWhite: '\x1b[107m'
|
|
81
|
-
};
|
|
82
|
-
/* eslint-disable no-control-regex */
|
|
83
|
-
const ANSI_ESCAPE_PATTERN = new RegExp('[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]', 'g');
|
|
84
|
-
/* eslint-enable no-control-regex */
|
|
85
|
-
/**
|
|
86
|
-
* Create a color function
|
|
87
|
-
*/
|
|
88
|
-
function createColorFn(code) {
|
|
89
|
-
const enabled = supportsColor();
|
|
90
|
-
return (text) => {
|
|
91
|
-
if (!enabled || text === '')
|
|
92
|
-
return text;
|
|
93
|
-
return `${code}${text}${ANSI.reset}`;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Pigment - Color utilities for terminal output
|
|
98
|
-
*/
|
|
99
|
-
const pigment = {
|
|
100
|
-
// Check support
|
|
101
|
-
supportsColor,
|
|
102
|
-
// Reset
|
|
103
|
-
reset: (text) => text,
|
|
104
|
-
// Styles
|
|
105
|
-
bold: createColorFn(ANSI.bold),
|
|
106
|
-
dim: createColorFn(ANSI.dim),
|
|
107
|
-
italic: createColorFn(ANSI.italic),
|
|
108
|
-
underline: createColorFn(ANSI.underline),
|
|
109
|
-
inverse: createColorFn(ANSI.inverse),
|
|
110
|
-
hidden: createColorFn(ANSI.hidden),
|
|
111
|
-
strikethrough: createColorFn(ANSI.strikethrough),
|
|
112
|
-
// Foreground colors
|
|
113
|
-
black: createColorFn(ANSI.black),
|
|
114
|
-
red: createColorFn(ANSI.red),
|
|
115
|
-
green: createColorFn(ANSI.green),
|
|
116
|
-
yellow: createColorFn(ANSI.yellow),
|
|
117
|
-
blue: createColorFn(ANSI.blue),
|
|
118
|
-
magenta: createColorFn(ANSI.magenta),
|
|
119
|
-
cyan: createColorFn(ANSI.cyan),
|
|
120
|
-
white: createColorFn(ANSI.white),
|
|
121
|
-
gray: createColorFn(ANSI.gray),
|
|
122
|
-
grey: createColorFn(ANSI.grey),
|
|
123
|
-
// Bright colors
|
|
124
|
-
brightRed: createColorFn(ANSI.brightRed),
|
|
125
|
-
brightGreen: createColorFn(ANSI.brightGreen),
|
|
126
|
-
brightYellow: createColorFn(ANSI.brightYellow),
|
|
127
|
-
brightBlue: createColorFn(ANSI.brightBlue),
|
|
128
|
-
brightMagenta: createColorFn(ANSI.brightMagenta),
|
|
129
|
-
brightCyan: createColorFn(ANSI.brightCyan),
|
|
130
|
-
brightWhite: createColorFn(ANSI.brightWhite),
|
|
131
|
-
// Background colors
|
|
132
|
-
bgBlack: createColorFn(ANSI.bgBlack),
|
|
133
|
-
bgRed: createColorFn(ANSI.bgRed),
|
|
134
|
-
bgGreen: createColorFn(ANSI.bgGreen),
|
|
135
|
-
bgYellow: createColorFn(ANSI.bgYellow),
|
|
136
|
-
bgBlue: createColorFn(ANSI.bgBlue),
|
|
137
|
-
bgMagenta: createColorFn(ANSI.bgMagenta),
|
|
138
|
-
bgCyan: createColorFn(ANSI.bgCyan),
|
|
139
|
-
bgWhite: createColorFn(ANSI.bgWhite),
|
|
140
|
-
// Semantic colors
|
|
141
|
-
success: createColorFn(ANSI.green),
|
|
142
|
-
error: createColorFn(ANSI.red),
|
|
143
|
-
warning: createColorFn(ANSI.yellow),
|
|
144
|
-
info: createColorFn(ANSI.blue),
|
|
145
|
-
muted: createColorFn(ANSI.gray),
|
|
146
|
-
// Combine multiple styles
|
|
147
|
-
combine: (...codes) => (text) => {
|
|
148
|
-
if (!supportsColor())
|
|
149
|
-
return text;
|
|
150
|
-
return `${codes.join('')}${text}${ANSI.reset}`;
|
|
151
|
-
},
|
|
152
|
-
// Strip ANSI codes from string
|
|
153
|
-
strip: (text) => text.replace(ANSI_ESCAPE_PATTERN, ''),
|
|
154
|
-
// Get raw ANSI codes
|
|
155
|
-
codes: ANSI
|
|
156
|
-
};
|
|
157
|
-
// Aliases for convenience
|
|
158
|
-
const { bold, dim, italic, underline, red, green, yellow, blue, magenta, cyan, white, gray, grey, success, error, warning, info, muted, strip } = pigment;
|
|
159
|
-
/**
|
|
160
|
-
* Default VLD theme for error formatting
|
|
161
|
-
*/
|
|
162
|
-
const vldTheme = {
|
|
163
|
-
error: red,
|
|
164
|
-
success: green,
|
|
165
|
-
warning: yellow,
|
|
166
|
-
info: blue,
|
|
167
|
-
muted: dim,
|
|
168
|
-
path: cyan,
|
|
169
|
-
value: yellow,
|
|
170
|
-
key: bold,
|
|
171
|
-
symbol: red
|
|
172
|
-
};
|
|
173
|
-
/**
|
|
174
|
-
* Create a custom theme
|
|
175
|
-
*/
|
|
176
|
-
function createTheme(overrides = {}) {
|
|
177
|
-
return { ...vldTheme, ...overrides };
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export { blue, bold, createTheme, cyan, pigment as default, dim, error, gray, green, grey, info, italic, magenta, muted, pigment, red, strip, success, supportsColor, underline, vldTheme, warning, white, yellow };
|
|
1
|
+
function e(){return("undefined"==typeof process||!process.env?.NO_COLOR)&&(!("undefined"==typeof process||!process.env?.FORCE_COLOR)||!("undefined"==typeof process||!process.stdout?.isTTY))}const r={reset:"[0m",bold:"[1m",dim:"[2m",italic:"[3m",underline:"[4m",blink:"[5m",inverse:"[7m",hidden:"[8m",strikethrough:"[9m",black:"[30m",red:"[31m",green:"[32m",yellow:"[33m",blue:"[34m",magenta:"[35m",cyan:"[36m",white:"[37m",gray:"[90m",grey:"[90m",brightRed:"[91m",brightGreen:"[92m",brightYellow:"[93m",brightBlue:"[94m",brightMagenta:"[95m",brightCyan:"[96m",brightWhite:"[97m",bgBlack:"[40m",bgRed:"[41m",bgGreen:"[42m",bgYellow:"[43m",bgBlue:"[44m",bgMagenta:"[45m",bgCyan:"[46m",bgWhite:"[47m",bgBrightRed:"[101m",bgBrightGreen:"[102m",bgBrightYellow:"[103m",bgBrightBlue:"[104m",bgBrightMagenta:"[105m",bgBrightCyan:"[106m",bgBrightWhite:"[107m"},g=new RegExp("[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]","g");function t(g){const t=e();return e=>t&&""!==e?`${g}${e}${r.reset}`:e}const i={supportsColor:e,reset:e=>e,bold:t(r.bold),dim:t(r.dim),italic:t(r.italic),underline:t(r.underline),inverse:t(r.inverse),hidden:t(r.hidden),strikethrough:t(r.strikethrough),black:t(r.black),red:t(r.red),green:t(r.green),yellow:t(r.yellow),blue:t(r.blue),magenta:t(r.magenta),cyan:t(r.cyan),white:t(r.white),gray:t(r.gray),grey:t(r.grey),brightRed:t(r.brightRed),brightGreen:t(r.brightGreen),brightYellow:t(r.brightYellow),brightBlue:t(r.brightBlue),brightMagenta:t(r.brightMagenta),brightCyan:t(r.brightCyan),brightWhite:t(r.brightWhite),bgBlack:t(r.bgBlack),bgRed:t(r.bgRed),bgGreen:t(r.bgGreen),bgYellow:t(r.bgYellow),bgBlue:t(r.bgBlue),bgMagenta:t(r.bgMagenta),bgCyan:t(r.bgCyan),bgWhite:t(r.bgWhite),success:t(r.green),error:t(r.red),warning:t(r.yellow),info:t(r.blue),muted:t(r.gray),combine:(...g)=>t=>e()?`${g.join("")}${t}${r.reset}`:t,strip:e=>e.replace(g,""),codes:r},{bold:n,dim:b,italic:l,underline:a,red:m,green:h,yellow:o,blue:s,magenta:d,cyan:u,white:c,gray:y,grey:w,success:p,error:B,warning:f,info:R,muted:k,strip:C}=i,Y={error:m,success:h,warning:o,info:s,muted:b,path:u,value:o,key:n,symbol:m};function G(e={}){return{...Y,...e}}export{s as blue,n as bold,G as createTheme,u as cyan,i as default,b as dim,B as error,y as gray,h as green,w as grey,R as info,l as italic,d as magenta,k as muted,i as pigment,m as red,C as strip,p as success,e as supportsColor,a as underline,Y as vldTheme,f as warning,c as white,o as yellow};
|
package/dist/plugins/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../kernel.js";
|
package/dist/registry.js
CHANGED
|
@@ -1,34 +1 @@
|
|
|
1
|
-
class
|
|
2
|
-
constructor() {
|
|
3
|
-
this.metadata = new WeakMap();
|
|
4
|
-
}
|
|
5
|
-
add(schema, metadata) {
|
|
6
|
-
this.metadata.set(schema, { ...metadata });
|
|
7
|
-
return schema;
|
|
8
|
-
}
|
|
9
|
-
get(schema) {
|
|
10
|
-
const metadata = this.metadata.get(schema);
|
|
11
|
-
return metadata ? { ...metadata } : undefined;
|
|
12
|
-
}
|
|
13
|
-
has(schema) {
|
|
14
|
-
return this.metadata.has(schema);
|
|
15
|
-
}
|
|
16
|
-
remove(schema) {
|
|
17
|
-
return this.metadata.delete(schema);
|
|
18
|
-
}
|
|
19
|
-
clear() {
|
|
20
|
-
this.metadata = new WeakMap();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Create a schema metadata registry.
|
|
25
|
-
*/
|
|
26
|
-
function registry() {
|
|
27
|
-
return new WeakSchemaRegistry();
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Global JSON Schema/OpenAPI compatible metadata registry.
|
|
31
|
-
*/
|
|
32
|
-
const globalRegistry = registry();
|
|
33
|
-
|
|
34
|
-
export { globalRegistry, registry };
|
|
1
|
+
class t{constructor(){this.metadata=new WeakMap}add(t,a){return this.metadata.set(t,{...a}),t}get(t){const a=this.metadata.get(t);return a?{...a}:void 0}has(t){return this.metadata.has(t)}remove(t){return this.metadata.delete(t)}clear(){this.metadata=new WeakMap}}function a(){return new t}const e=a();export{e as globalRegistry,a as registry};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Provides conversion between VLD schemas and JSON Schema
|
|
4
4
|
*/
|
|
5
5
|
import { VldBase } from '../validators/base.js';
|
|
6
|
+
import { type SchemaRegistry } from '../registry.js';
|
|
6
7
|
/**
|
|
7
8
|
* JSON Schema definition types
|
|
8
9
|
*/
|
|
@@ -61,6 +62,14 @@ export interface ToJSONSchemaOptions {
|
|
|
61
62
|
target?: 'draft-04' | 'draft-4' | 'draft-07' | 'draft-7' | 'draft-2019-09' | 'draft-2020-12' | 'openapi-3.0' | (string & {});
|
|
62
63
|
includeMetadata?: boolean;
|
|
63
64
|
includeExamples?: boolean;
|
|
65
|
+
/** Match Zod's default throw/any behavior, or opt into VLD extensions. */
|
|
66
|
+
unrepresentable?: 'throw' | 'any' | 'vld';
|
|
67
|
+
/** Select the input or output side of codecs and pipes. */
|
|
68
|
+
io?: 'input' | 'output';
|
|
69
|
+
}
|
|
70
|
+
export interface FromJSONSchemaOptions {
|
|
71
|
+
defaultTarget?: 'draft-2020-12' | 'draft-7' | 'draft-4' | 'openapi-3.0';
|
|
72
|
+
registry?: SchemaRegistry<Record<string, unknown>>;
|
|
64
73
|
}
|
|
65
74
|
/**
|
|
66
75
|
* Convert a VLD schema to JSON Schema
|
|
@@ -74,4 +83,4 @@ export declare function toJSONSchema<T>(schema: VldBase<unknown, T>, options?: T
|
|
|
74
83
|
* @param json The JSON Schema definition
|
|
75
84
|
* @returns A VLD schema
|
|
76
85
|
*/
|
|
77
|
-
export declare function fromJSONSchema(json: JSONSchemaDefinition): VldBase<unknown, unknown>;
|
|
86
|
+
export declare function fromJSONSchema(json: JSONSchemaDefinition | boolean, options?: FromJSONSchemaOptions): VldBase<unknown, unknown>;
|
package/dist/v3/index.js
CHANGED
|
@@ -1,46 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { Err, Ok, ResultUtils, all, failure, flatMap, fromNullable, isErr, isOk, isResult, mapErr, match, success, tryCatch, tryCatchAsync, unwrap, unwrapOr } from '../compat/result.js';
|
|
3
|
-
export { VldBase, VldMeta, VldBrand as ZodBranded, VldCatch as ZodCatch, VldDefault as ZodDefault, VldExactOptional as ZodExactOptional, VldMeta as ZodMeta, VldRefine as ZodNonOptional, VldNullable as ZodNullable, VldOptional as ZodOptional, VldPipe as ZodPipe, VldPrefault as ZodPrefault, VldPreprocess as ZodPreprocess, VldReadonly as ZodReadonly, VldTransform as ZodTransform, VldBase as ZodType } from '../validators/base.js';
|
|
4
|
-
export { V as VldError, V as ZodError, V as ZodRealError } from '../chunks/errors-core-BeiFUtZM.js';
|
|
5
|
-
export { VldIntersection, VldIntersection as ZodIntersection } from '../validators/intersection.js';
|
|
6
|
-
export { VldAny as ZodAny } from '../validators/any.js';
|
|
7
|
-
export { VldArray as ZodArray } from '../validators/array.js';
|
|
8
|
-
export { VldStringFormat as ZodBase64, VldStringFormat as ZodBase64URL, VldStringFormat as ZodCIDRv4, VldStringFormat as ZodCIDRv6, VldStringFormat as ZodCUID, VldStringFormat as ZodCUID2, VldStringFormat as ZodCustomStringFormat, VldStringFormat as ZodE164, VldStringFormat as ZodEmail, VldStringFormat as ZodEmoji, VldStringFormat as ZodGUID, VldStringFormat as ZodIPv4, VldStringFormat as ZodIPv6, VldStringFormat as ZodISODate, VldStringFormat as ZodISODateTime, VldStringFormat as ZodISODuration, VldStringFormat as ZodISOTime, VldStringFormat as ZodJWT, VldStringFormat as ZodKSUID, VldStringFormat as ZodMAC, VldStringFormat as ZodNanoID, VldStringFormat as ZodStringFormat, VldStringFormat as ZodULID, VldStringFormat as ZodURL, VldStringFormat as ZodUUID, VldStringFormat as ZodXID } from '../validators/string-formats.js';
|
|
9
|
-
export { VldBigInt as ZodBigInt, VldBigInt as ZodBigIntFormat } from '../validators/bigint.js';
|
|
10
|
-
export { VldBoolean as ZodBoolean } from '../validators/boolean.js';
|
|
11
|
-
export { VldCodec as ZodCodec } from '../validators/codec.js';
|
|
12
|
-
export { VldCustom as ZodCustom, VldCustom as ZodSuccess } from '../validators/custom.js';
|
|
13
|
-
export { VldDate as ZodDate } from '../validators/date.js';
|
|
14
|
-
export { VldDiscriminatedUnion as ZodDiscriminatedUnion } from '../validators/discriminated-union.js';
|
|
15
|
-
export { VldEnum as ZodEnum } from '../validators/enum.js';
|
|
16
|
-
export { VldFile as ZodFile } from '../validators/file.js';
|
|
17
|
-
export { VldFunction as ZodFunction } from '../validators/function.js';
|
|
18
|
-
export { VldJson as ZodJSON } from '../validators/json.js';
|
|
19
|
-
export { VldLazy as ZodLazy } from '../validators/lazy.js';
|
|
20
|
-
export { VldLiteral as ZodLiteral } from '../validators/literal.js';
|
|
21
|
-
export { VldMap as ZodMap } from '../validators/map.js';
|
|
22
|
-
export { VldNan as ZodNaN } from '../validators/nan.js';
|
|
23
|
-
export { VldNever as ZodNever } from '../validators/never.js';
|
|
24
|
-
export { VldNull as ZodNull } from '../validators/null.js';
|
|
25
|
-
export { VldNumber as ZodNumber, VldNumber as ZodNumberFormat } from '../validators/number.js';
|
|
26
|
-
export { VldObject as ZodObject } from '../validators/object.js';
|
|
27
|
-
export { VldPromise as ZodPromise } from '../validators/promise.js';
|
|
28
|
-
export { VldRecord as ZodRecord } from '../validators/record.js';
|
|
29
|
-
export { VldSet as ZodSet } from '../validators/set.js';
|
|
30
|
-
export { V as ZodString } from '../chunks/string-BJRQod3t.js';
|
|
31
|
-
export { VldSymbol as ZodSymbol } from '../validators/symbol.js';
|
|
32
|
-
export { VldTemplateLiteral as ZodTemplateLiteral } from '../validators/template-literal.js';
|
|
33
|
-
export { VldTuple as ZodTuple } from '../validators/tuple.js';
|
|
34
|
-
export { VldUndefined as ZodUndefined } from '../validators/undefined.js';
|
|
35
|
-
export { VldUnion as ZodUnion } from '../validators/union.js';
|
|
36
|
-
export { VldUnknown as ZodUnknown } from '../validators/unknown.js';
|
|
37
|
-
export { VldVoid as ZodVoid } from '../validators/void.js';
|
|
38
|
-
export { VldXor as ZodXor } from '../validators/xor.js';
|
|
39
|
-
export { b as base64Json, a as base64ToBytes, c as base64ToUint8Array, d as base64UrlToBytes, e as base64urlToBytes, f as bytesToUtf8, g as epochMillisToDate, h as epochSecondsToDate, i as hexLowerToBytes, j as hexToBytes, k as hexToUint8Array, l as invertCodec, m as isoDatetimeToDate, n as jsonCodec, o as jwtPayload, p as numberToBigInt, s as stringToBigInt, q as stringToBoolean, r as stringToHttpURL, t as stringToInt, u as stringToNumber, v as stringToURL, w as stringToUint8Array, x as uint8ArrayToBase64, y as uint8ArrayToBase64Url, z as uint8ArrayToHex, A as uint8ArrayToString, B as uriComponent, C as utf8ToBytes } from '../chunks/index-0R2ntSud.js';
|
|
40
|
-
export { blue, bold, createTheme, cyan, dim, gray, green, grey, italic, magenta, default as pigment, red, strip, supportsColor, underline, vldTheme, white, yellow } from '../pigment.js';
|
|
41
|
-
export { createEmitter, createEventBus, withEmitter } from '../compat/emitter.js';
|
|
42
|
-
export { createVldKernel, definePlugin, getVldKernel, resetVldKernel, usePlugin } from '../kernel.js';
|
|
43
|
-
export { flattenError, prettifyError, prettifyErrorColored, prettifyErrorPlain, treeifyError } from '../errors.js';
|
|
44
|
-
export { getLocale, getMessages, getSupportedLocales, isLocaleLoaded, isLocaleSupported, registerLocale, setLocale } from '../locales/runtime.js';
|
|
45
|
-
export { globalRegistry, registry } from '../registry.js';
|
|
46
|
-
export { s as setLocaleAsync } from '../chunks/index-BvH403Yy.js';
|
|
1
|
+
export{$brand,$input,$output,NEVER,TimePrecision,ZodFirstPartyTypeKind,ZodIssueCode,_ZodString,_default,_function,any,array,base64,base64Bytes,base64url,bigint,boolean,catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core,createLogger,createNoOpLogger,creditCard,cuid,cuid2,custom,date,decode,decodeAsync,deepPartial,default,describe,disableLogging,discriminatedUnion,e164,email,emoji,enableDebug,encode,encodeAsync,endsWith,enum,exactOptional,file,float32,float64,formatError,fromJSONSchema,_function as function,getErrorMap,getLogger,gt,gte,guid,hash,hex,hexBytes,hostname,httpUrl,includes,initLogger,input,instanceof,int,int32,int64,intersection,ipv4,ipv6,iso,json,jwt,keyof,ksuid,lazy,length,literal,locales,looseObject,looseRecord,lowercase,lt,lte,mac,map,mapSchema,maxLength,maxSize,meta,mime,minLength,minSize,multipleOf,nan,nanoid,nativeEnum,negative,never,nonnegative,nonoptional,nonpositive,normalize,null,nullable,nullish,number,object,optional,output,overwrite,parse,parseAsync,partialRecord,pipe,positive,prefault,preprocess,promise,property,readonly,record,refine,regex,regexes,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,setLogLevel,size,slugify,startsWith,strictObject,string,stringFormat,stringbool,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase,toUpperCase,transform,trim,tuple,uint32,uint64,uint8Array,ulid,undefined,union,unknown,uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,default as v,void,xid,xor,z}from"../index.js";export{Err,Ok,ResultUtils,all,failure,flatMap,fromNullable,isErr,isOk,isResult,mapErr,match,success,tryCatch,tryCatchAsync,unwrap,unwrapOr}from"../compat/result.js";export{VldBase,VldMeta,VldBrand as ZodBranded,VldCatch as ZodCatch,VldDefault as ZodDefault,VldExactOptional as ZodExactOptional,VldMeta as ZodMeta,VldRefine as ZodNonOptional,VldNullable as ZodNullable,VldOptional as ZodOptional,VldPipe as ZodPipe,VldPrefault as ZodPrefault,VldPreprocess as ZodPreprocess,VldReadonly as ZodReadonly,VldTransform as ZodTransform,VldBase as ZodType}from"../validators/base.js";export{V as VldError,V as ZodError,V as ZodRealError}from"../chunks/errors-core-CerMg2rq.js";export{VldIntersection,VldIntersection as ZodIntersection}from"../validators/intersection.js";export{VldAny as ZodAny}from"../validators/any.js";export{VldArray as ZodArray}from"../validators/array.js";export{VldStringFormat as ZodBase64,VldStringFormat as ZodBase64URL,VldStringFormat as ZodCIDRv4,VldStringFormat as ZodCIDRv6,VldStringFormat as ZodCUID,VldStringFormat as ZodCUID2,VldStringFormat as ZodCreditCard,VldStringFormat as ZodCustomStringFormat,VldStringFormat as ZodE164,VldStringFormat as ZodEmail,VldStringFormat as ZodEmoji,VldStringFormat as ZodGUID,VldStringFormat as ZodIPv4,VldStringFormat as ZodIPv6,VldStringFormat as ZodISODate,VldStringFormat as ZodISODateTime,VldStringFormat as ZodISODuration,VldStringFormat as ZodISOTime,VldStringFormat as ZodJWT,VldStringFormat as ZodKSUID,VldStringFormat as ZodMAC,VldStringFormat as ZodNanoID,VldStringFormat as ZodStringFormat,VldStringFormat as ZodULID,VldStringFormat as ZodURL,VldStringFormat as ZodUUID,VldStringFormat as ZodXID}from"../validators/string-formats.js";export{VldBigInt as ZodBigInt,VldBigInt as ZodBigIntFormat}from"../validators/bigint.js";export{VldBoolean as ZodBoolean}from"../validators/boolean.js";export{VldCodec as ZodCodec}from"../validators/codec.js";export{VldCustom as ZodCustom,VldCustom as ZodSuccess}from"../validators/custom.js";export{VldDate as ZodDate}from"../validators/date.js";export{VldDiscriminatedUnion as ZodDiscriminatedUnion}from"../validators/discriminated-union.js";export{VldEnum as ZodEnum}from"../validators/enum.js";export{VldFile as ZodFile}from"../validators/file.js";export{VldFunction as ZodFunction}from"../validators/function.js";export{VldJson as ZodJSON}from"../validators/json.js";export{VldLazy as ZodLazy}from"../validators/lazy.js";export{VldLiteral as ZodLiteral}from"../validators/literal.js";export{VldMap as ZodMap}from"../validators/map.js";export{VldNan as ZodNaN}from"../validators/nan.js";export{VldNever as ZodNever}from"../validators/never.js";export{VldNull as ZodNull}from"../validators/null.js";export{VldNumber as ZodNumber,VldNumber as ZodNumberFormat}from"../validators/number.js";export{VldObject as ZodObject}from"../validators/object.js";export{VldPromise as ZodPromise}from"../validators/promise.js";export{VldRecord as ZodRecord}from"../validators/record.js";export{VldSet as ZodSet}from"../validators/set.js";export{VldString as ZodString}from"../validators/string.js";export{VldSymbol as ZodSymbol}from"../validators/symbol.js";export{VldTemplateLiteral as ZodTemplateLiteral}from"../validators/template-literal.js";export{VldTuple as ZodTuple}from"../validators/tuple.js";export{VldUndefined as ZodUndefined}from"../validators/undefined.js";export{VldUnion as ZodUnion}from"../validators/union.js";export{VldUnknown as ZodUnknown}from"../validators/unknown.js";export{VldVoid as ZodVoid}from"../validators/void.js";export{VldXor as ZodXor}from"../validators/xor.js";export{b as base64Json,a as base64ToBytes,c as base64ToUint8Array,d as base64UrlToBytes,e as base64urlToBytes,f as bytesToUtf8,g as epochMillisToDate,h as epochSecondsToDate,i as hexLowerToBytes,j as hexToBytes,k as hexToUint8Array,l as invertCodec,m as isoDatetimeToDate,n as jsonCodec,o as jwtPayload,p as numberToBigInt,s as stringToBigInt,q as stringToBoolean,r as stringToHttpURL,t as stringToInt,u as stringToNumber,v as stringToURL,w as stringToUint8Array,x as uint8ArrayToBase64,y as uint8ArrayToBase64Url,z as uint8ArrayToHex,A as uint8ArrayToString,B as uriComponent,C as utf8ToBytes}from"../chunks/index-CkbfQQ4n.js";export{blue,bold,createTheme,cyan,dim,gray,green,grey,italic,magenta,default as pigment,red,strip,supportsColor,underline,vldTheme,white,yellow}from"../pigment.js";export{createEmitter,createEventBus,withEmitter}from"../compat/emitter.js";export{createVldKernel,definePlugin,getVldKernel,resetVldKernel,usePlugin}from"../kernel.js";export{flattenError,prettifyError,prettifyErrorColored,prettifyErrorPlain,treeifyError}from"../errors.js";export{getLocale,getMessages,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"../locales/runtime.js";export{globalRegistry,registry}from"../registry.js";export{s as setLocaleAsync}from"../chunks/index-yjpbvFgw.js";
|