@forklaunch/validator 0.3.13 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/lib/index-V6qNDTlr.d.mts +476 -0
  2. package/lib/index-V6qNDTlr.d.ts +476 -0
  3. package/lib/index.d.mts +6 -0
  4. package/lib/index.d.ts +6 -2
  5. package/lib/index.js +18 -1
  6. package/lib/index.mjs +0 -0
  7. package/lib/src/typebox/index.d.mts +220 -0
  8. package/lib/src/typebox/index.d.ts +220 -3
  9. package/lib/src/typebox/index.js +448 -1
  10. package/lib/src/typebox/index.mjs +406 -0
  11. package/lib/src/zod/index.d.mts +106 -0
  12. package/lib/src/zod/index.d.ts +106 -3
  13. package/lib/src/zod/index.js +291 -1
  14. package/lib/src/zod/index.mjs +244 -0
  15. package/lib/tests/utils/mockSchemaValidator.d.mts +69 -0
  16. package/lib/tests/utils/mockSchemaValidator.d.ts +29 -25
  17. package/lib/tests/utils/mockSchemaValidator.js +143 -79
  18. package/lib/tests/utils/mockSchemaValidator.mjs +99 -0
  19. package/package.json +21 -8
  20. package/lib/index.d.ts.map +0 -1
  21. package/lib/src/shared/types/schema.types.d.ts +0 -255
  22. package/lib/src/shared/types/schema.types.d.ts.map +0 -1
  23. package/lib/src/shared/types/schema.types.js +0 -1
  24. package/lib/src/typebox/index.d.ts.map +0 -1
  25. package/lib/src/typebox/staticSchemaValidator.d.ts +0 -99
  26. package/lib/src/typebox/staticSchemaValidator.d.ts.map +0 -1
  27. package/lib/src/typebox/staticSchemaValidator.js +0 -99
  28. package/lib/src/typebox/typeboxSchemaValidator.d.ts +0 -122
  29. package/lib/src/typebox/typeboxSchemaValidator.d.ts.map +0 -1
  30. package/lib/src/typebox/typeboxSchemaValidator.js +0 -362
  31. package/lib/src/typebox/types/schema.types.d.ts +0 -59
  32. package/lib/src/typebox/types/schema.types.d.ts.map +0 -1
  33. package/lib/src/typebox/types/schema.types.js +0 -1
  34. package/lib/src/zod/index.d.ts.map +0 -1
  35. package/lib/src/zod/staticSchemaValidator.d.ts +0 -99
  36. package/lib/src/zod/staticSchemaValidator.d.ts.map +0 -1
  37. package/lib/src/zod/staticSchemaValidator.js +0 -99
  38. package/lib/src/zod/types/schema.types.d.ts +0 -71
  39. package/lib/src/zod/types/schema.types.d.ts.map +0 -1
  40. package/lib/src/zod/types/schema.types.js +0 -1
  41. package/lib/src/zod/zodSchemaValidator.d.ts +0 -110
  42. package/lib/src/zod/zodSchemaValidator.d.ts.map +0 -1
  43. package/lib/src/zod/zodSchemaValidator.js +0 -192
  44. package/lib/tests/typebox/advancedParse.test.d.ts +0 -2
  45. package/lib/tests/typebox/advancedParse.test.d.ts.map +0 -1
  46. package/lib/tests/typebox/advancedParse.test.js +0 -514
  47. package/lib/tests/typebox/largeSchema.test.d.ts +0 -2
  48. package/lib/tests/typebox/largeSchema.test.d.ts.map +0 -1
  49. package/lib/tests/typebox/largeSchema.test.js +0 -150
  50. package/lib/tests/typebox/schemaValidator.test.d.ts +0 -2
  51. package/lib/tests/typebox/schemaValidator.test.d.ts.map +0 -1
  52. package/lib/tests/typebox/schemaValidator.test.js +0 -253
  53. package/lib/tests/typebox/typeEquality.test.d.ts +0 -2
  54. package/lib/tests/typebox/typeEquality.test.d.ts.map +0 -1
  55. package/lib/tests/typebox/typeEquality.test.js +0 -100
  56. package/lib/tests/utils/compare.d.ts +0 -2
  57. package/lib/tests/utils/compare.d.ts.map +0 -1
  58. package/lib/tests/utils/compare.js +0 -8
  59. package/lib/tests/utils/mockSchemaValidator.d.ts.map +0 -1
  60. package/lib/tests/zod/advancedParse.test.d.ts +0 -2
  61. package/lib/tests/zod/advancedParse.test.d.ts.map +0 -1
  62. package/lib/tests/zod/advancedParse.test.js +0 -514
  63. package/lib/tests/zod/largeSchema.test.d.ts +0 -2
  64. package/lib/tests/zod/largeSchema.test.d.ts.map +0 -1
  65. package/lib/tests/zod/largeSchema.test.js +0 -150
  66. package/lib/tests/zod/schemaValidator.test.d.ts +0 -2
  67. package/lib/tests/zod/schemaValidator.test.d.ts.map +0 -1
  68. package/lib/tests/zod/schemaValidator.test.js +0 -205
  69. package/lib/tests/zod/typeEquality.test.d.ts +0 -2
  70. package/lib/tests/zod/typeEquality.test.d.ts.map +0 -1
  71. package/lib/tests/zod/typeEquality.test.js +0 -100
  72. package/lib/vitest.config.d.ts +0 -3
  73. package/lib/vitest.config.d.ts.map +0 -1
  74. package/lib/vitest.config.js +0 -7
@@ -1 +1,448 @@
1
- export * from './staticSchemaValidator';
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/typebox/index.ts
21
+ var typebox_exports = {};
22
+ __export(typebox_exports, {
23
+ SchemaValidator: () => SchemaValidator,
24
+ any: () => any,
25
+ array: () => array,
26
+ bigint: () => bigint,
27
+ boolean: () => boolean,
28
+ date: () => date,
29
+ email: () => email,
30
+ enum_: () => enum_,
31
+ isSchema: () => isSchema,
32
+ literal: () => literal,
33
+ never: () => never,
34
+ nullish: () => nullish,
35
+ number: () => number,
36
+ openapi: () => openapi,
37
+ optional: () => optional,
38
+ parse: () => parse,
39
+ schemify: () => schemify,
40
+ string: () => string,
41
+ symbol: () => symbol,
42
+ union: () => union,
43
+ unknown: () => unknown,
44
+ uri: () => uri,
45
+ uuid: () => uuid,
46
+ validate: () => validate
47
+ });
48
+ module.exports = __toCommonJS(typebox_exports);
49
+
50
+ // src/typebox/typeboxSchemaValidator.ts
51
+ var import_typebox = require("@sinclair/typebox");
52
+ var import_compiler = require("@sinclair/typebox/compiler");
53
+ var import_errors = require("@sinclair/typebox/errors");
54
+ var import_value = require("@sinclair/typebox/value");
55
+ (0, import_errors.SetErrorFunction)((params) => {
56
+ switch (params.errorType) {
57
+ case import_errors.ValueErrorType.Union:
58
+ case import_errors.ValueErrorType.Array:
59
+ case import_errors.ValueErrorType.String:
60
+ case import_errors.ValueErrorType.Number:
61
+ return params.schema.errorType ? `Expected ${params.schema.errorType} value${params.schema.errorSuffix ? "s" : ""}` : (0, import_errors.DefaultErrorFunction)(params);
62
+ default:
63
+ return (0, import_errors.DefaultErrorFunction)(params);
64
+ }
65
+ });
66
+ var TypeboxSchemaValidator = class {
67
+ _Type;
68
+ _SchemaCatchall;
69
+ _ValidSchemaObject;
70
+ string = import_typebox.Type.String();
71
+ // uuid = Type.String({ format: 'uuid' });
72
+ uuid = import_typebox.Type.String({
73
+ pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
74
+ errorType: "uuid"
75
+ });
76
+ uri = import_typebox.Type.String({
77
+ pattern: "^[a-zA-Z][a-zA-Z\\d+-.]*:[^\\s]*$",
78
+ errorType: "uri"
79
+ });
80
+ email = import_typebox.Type.String({
81
+ pattern: `(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
82
+ errorType: "email"
83
+ });
84
+ number = import_typebox.Type.Transform(
85
+ import_typebox.Type.Union(
86
+ [
87
+ import_typebox.Type.Number(),
88
+ import_typebox.Type.String({ pattern: "^[0-9]+$" }),
89
+ import_typebox.Type.Boolean(),
90
+ import_typebox.Type.Null(),
91
+ import_typebox.Type.Date(),
92
+ import_typebox.Type.BigInt()
93
+ ],
94
+ {
95
+ errorType: "number-like",
96
+ openapiType: import_typebox.Type.Number()
97
+ }
98
+ )
99
+ ).Decode((value) => {
100
+ if (typeof value !== "number") {
101
+ const num = Number(value);
102
+ if (isNaN(num)) {
103
+ throw new Error("Invalid number");
104
+ } else {
105
+ return num;
106
+ }
107
+ }
108
+ return value;
109
+ }).Encode(Number);
110
+ bigint = import_typebox.Type.Transform(
111
+ import_typebox.Type.Union(
112
+ [
113
+ import_typebox.Type.BigInt(),
114
+ import_typebox.Type.Number(),
115
+ import_typebox.Type.String({ pattern: "^[0-9]+$" }),
116
+ import_typebox.Type.Boolean(),
117
+ import_typebox.Type.Date()
118
+ ],
119
+ {
120
+ errorType: "BigInt-like",
121
+ openapiType: import_typebox.Type.BigInt()
122
+ }
123
+ )
124
+ ).Decode((value) => {
125
+ if (typeof value !== "bigint") {
126
+ try {
127
+ return BigInt(value instanceof Date ? value.getTime() : value);
128
+ } catch {
129
+ throw new Error("Invalid bigint");
130
+ }
131
+ }
132
+ return value;
133
+ }).Encode(BigInt);
134
+ boolean = import_typebox.Type.Transform(
135
+ import_typebox.Type.Union(
136
+ [
137
+ import_typebox.Type.Boolean(),
138
+ import_typebox.Type.String({
139
+ pattern: "^(t|T)(r|R)(u|U)(e|E)$|^(f|F)(a|A)(l|L)(s|S)(e|E)$"
140
+ })
141
+ ],
142
+ {
143
+ errorType: "boolean-like",
144
+ openapiType: import_typebox.Type.Boolean()
145
+ }
146
+ )
147
+ ).Decode((value) => {
148
+ if (typeof value === "string") {
149
+ if (value.toLowerCase() === "true") return true;
150
+ if (value.toLowerCase() === "false") return false;
151
+ } else {
152
+ return value;
153
+ }
154
+ }).Encode(Boolean);
155
+ date = import_typebox.Type.Transform(
156
+ import_typebox.Type.Union(
157
+ [
158
+ import_typebox.Type.Date(),
159
+ import_typebox.Type.Number(),
160
+ import_typebox.Type.String({
161
+ pattern: "^\\d{4}(-\\d{2}){0,2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|([+-]\\d{2}:\\d{2}))?)?$|^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$|^\\d{4}\\/\\d{1,2}\\/\\d{1,2}$|^\\d+$"
162
+ }),
163
+ import_typebox.Type.Boolean(),
164
+ import_typebox.Type.Null()
165
+ ],
166
+ {
167
+ errorType: "date",
168
+ openapiType: import_typebox.Type.Date()
169
+ }
170
+ )
171
+ ).Decode((value) => {
172
+ if (!(value instanceof Date)) {
173
+ if (value === null || typeof value === "boolean") {
174
+ return /* @__PURE__ */ new Date(value ? 1 : 0);
175
+ }
176
+ return new Date(value);
177
+ }
178
+ return value;
179
+ }).Encode((value) => new Date(value));
180
+ symbol = import_typebox.Type.Symbol();
181
+ nullish = import_typebox.Type.Union([import_typebox.Type.Void(), import_typebox.Type.Null(), import_typebox.Type.Undefined()], {
182
+ errorType: "nullish"
183
+ });
184
+ any = import_typebox.Type.Any();
185
+ unknown = import_typebox.Type.Unknown();
186
+ never = import_typebox.Type.Never();
187
+ /**
188
+ * Extracts the error type of a schema for error messages.
189
+ *
190
+ * @param {TCatchall} schema - A schema that contains some type information.
191
+ * @returns The type of the schema for error messages.
192
+ */
193
+ errorType(schema) {
194
+ if (Object.hasOwn(schema, "errorType")) {
195
+ return schema.errorType;
196
+ } else if (import_typebox.KindGuard.IsLiteral(schema)) {
197
+ return schema.const;
198
+ }
199
+ return schema[import_typebox.Kind].toLowerCase();
200
+ }
201
+ /**
202
+ * Pretty print TypeBox errors.
203
+ *
204
+ * @param {ValueError[]} errors
205
+ * @returns
206
+ */
207
+ prettyPrintTypeBoxErrors(errors) {
208
+ if (!errors || errors.length === 0) return;
209
+ const errorMessages = errors.map((err, index) => {
210
+ const path = err.path.length > 0 ? err.path.split("/").slice(1).join(" > ") : "root";
211
+ return `${index + 1}. Path: ${path}
212
+ Message: ${err.message}`;
213
+ });
214
+ return `Validation failed with the following errors:
215
+ ${errorMessages.join("\n\n")}`;
216
+ }
217
+ /**
218
+ * Compiles schema if this exists, for optimal performance.
219
+ *
220
+ * @param {TObject<TProperties>} schema - The schema to compile.
221
+ * @returns {TypeCheck<T>} - The compiled schema.
222
+ */
223
+ compile(schema) {
224
+ return import_compiler.TypeCompiler.Compile(schema);
225
+ }
226
+ /**
227
+ * Convert a schema to a TypeBox schema.
228
+ * @param {TIdiomaticSchema} schema - The schema to convert.
229
+ * @returns {TResolve<T>} The resolved schema.
230
+ */
231
+ schemify(schema) {
232
+ if (typeof schema === "string" || typeof schema === "number" || typeof schema === "boolean") {
233
+ return import_typebox.Type.Literal(schema);
234
+ }
235
+ if (import_typebox.KindGuard.IsSchema(schema) || schema instanceof import_compiler.TypeCheck) {
236
+ return schema;
237
+ }
238
+ const newSchema = {};
239
+ Object.getOwnPropertyNames(schema).forEach((key) => {
240
+ if (import_typebox.KindGuard.IsSchema(schema[key])) {
241
+ newSchema[key] = schema[key];
242
+ } else {
243
+ const schemified = this.schemify(schema[key]);
244
+ newSchema[key] = schemified;
245
+ }
246
+ });
247
+ return import_typebox.Type.Object(newSchema);
248
+ }
249
+ /**
250
+ * Make a schema optional.
251
+ * @param {TIdiomaticSchema} schema - The schema to make optional.
252
+ * @returns {TOptional<TResolve<T>>} The optional schema.
253
+ */
254
+ optional(schema) {
255
+ const schemified = import_typebox.KindGuard.IsSchema(schema) ? schema : this.schemify(schema);
256
+ return import_typebox.Type.Optional(schemified);
257
+ }
258
+ /**
259
+ * Create an array schema.
260
+ * @param {TIdiomaticSchema} schema - The schema to use for array items.
261
+ * @returns {TArray<TResolve<T>>} The array schema.
262
+ */
263
+ array(schema) {
264
+ const schemified = import_typebox.KindGuard.IsSchema(schema) ? schema : this.schemify(schema);
265
+ return import_typebox.Type.Array(schemified, {
266
+ errorType: `array of ${this.errorType(schemified)}`
267
+ });
268
+ }
269
+ /**
270
+ * Create a union schema.
271
+ * @param {TUnionContainer} schemas - The schemas to union.
272
+ * @returns {TUnion<UnionTResolve<T>>} The union schema.
273
+ *
274
+ * WARNING: If "nullish" or TUndefined is included in the union, the key will still be expected.
275
+ * This is a limitation of TypeBox. Consider using "optional" instead.
276
+ */
277
+ union(schemas) {
278
+ const unionTypes = schemas.map((schema) => {
279
+ return import_typebox.KindGuard.IsSchema(schema) ? schema : this.schemify(schema);
280
+ });
281
+ return import_typebox.Type.Union(unionTypes, {
282
+ errorType: `any of ${unionTypes.map((s) => this.errorType(s)).join(", ")}`,
283
+ errorSuffix: true
284
+ });
285
+ }
286
+ /**
287
+ * Create a literal schema.
288
+ * @param {LiteralSchema} value - The literal value.
289
+ * @returns {TLiteral<T>} The literal schema.
290
+ */
291
+ literal(value) {
292
+ return import_typebox.Type.Literal(value, {
293
+ errorType: value
294
+ });
295
+ }
296
+ /**
297
+ * Create an enum schema.
298
+ * @param {Record<string, LiteralSchema>} schemaEnum - The enum schema.
299
+ * @returns {TUnion<UnionTResolve<T[]>>} The enum schema.
300
+ */
301
+ enum_(schemaEnum) {
302
+ return this.union(Object.values(schemaEnum));
303
+ }
304
+ /**
305
+ * Check if a value is a TypeBox object schema.
306
+ * @param {unknown} value - The value to check.
307
+ * @returns {boolean} True if the value is a TypeBox object schema.
308
+ */
309
+ isSchema(value) {
310
+ return import_typebox.KindGuard.IsSchema(value);
311
+ }
312
+ /**
313
+ * Validate a value against a schema.
314
+ *
315
+ * @param {TSchema} schema - The schema to validate against.
316
+ * @param {unknown} value - The value to validate.
317
+ * @returns {boolean} True if valid, otherwise false.
318
+ */
319
+ validate(schema, value) {
320
+ if (schema instanceof import_compiler.TypeCheck) {
321
+ return schema.Check(value);
322
+ } else {
323
+ const schemified = import_typebox.KindGuard.IsSchema(schema) ? schema : this.schemify(schema);
324
+ return import_value.Value.Check(schemified, value);
325
+ }
326
+ }
327
+ /**
328
+ * Parse a value against a schema.
329
+ *
330
+ * @param {TSchema} schema - The schema to validate against.
331
+ * @param {unknown} value - The value to validate.
332
+ * @returns {ParseResult<TResolve<T>>} The parsing result.
333
+ */
334
+ parse(schema, value) {
335
+ let errors = [];
336
+ let conversion;
337
+ if (schema instanceof import_compiler.TypeCheck) {
338
+ if (schema.Check(value)) {
339
+ conversion = schema.Decode(value);
340
+ } else {
341
+ errors = Array.from(schema.Errors(value));
342
+ }
343
+ } else {
344
+ const schemified = import_typebox.KindGuard.IsSchema(schema) ? schema : this.schemify(schema);
345
+ if (import_value.Value.Check(schemified, value)) {
346
+ conversion = import_value.Value.Decode(schemified, value);
347
+ } else {
348
+ errors = Array.from(import_value.Value.Errors(schemified, value));
349
+ }
350
+ }
351
+ return errors != null && errors.length === 0 ? {
352
+ ok: true,
353
+ value: conversion
354
+ } : {
355
+ ok: false,
356
+ error: this.prettyPrintTypeBoxErrors(errors)
357
+ };
358
+ }
359
+ /**
360
+ * Convert a schema to an OpenAPI schema object.
361
+ * @param {TIdiomaticSchema | TSchema} schema - The schema to convert.
362
+ * @returns {SchemaObject} The OpenAPI schema object.
363
+ */
364
+ openapi(schema) {
365
+ const schemified = import_typebox.KindGuard.IsSchema(schema) ? schema : this.schemify(schema);
366
+ if (Object.hasOwn(schemified, "openapiType") || import_typebox.KindGuard.IsLiteral(schemified)) {
367
+ return schemified.openapiType;
368
+ }
369
+ const newSchema = Object.assign({}, schemified);
370
+ if (Object.hasOwn(newSchema, "properties")) {
371
+ newSchema.properties = { ...schemified.properties };
372
+ if (newSchema.properties) {
373
+ Object.entries(newSchema.properties).forEach(([key, value]) => {
374
+ if (import_typebox.KindGuard.IsSchema(value) && newSchema.properties) {
375
+ newSchema.properties[key] = this.openapi(value);
376
+ }
377
+ });
378
+ }
379
+ }
380
+ return newSchema;
381
+ }
382
+ };
383
+
384
+ // src/typebox/staticSchemaValidator.ts
385
+ var SchemaValidator = () => new TypeboxSchemaValidator();
386
+ var StaticSchemaValidator = SchemaValidator();
387
+ var string = StaticSchemaValidator.string;
388
+ var uuid = StaticSchemaValidator.uuid;
389
+ var uri = StaticSchemaValidator.uri;
390
+ var email = StaticSchemaValidator.email;
391
+ var number = StaticSchemaValidator.number;
392
+ var bigint = StaticSchemaValidator.bigint;
393
+ var boolean = StaticSchemaValidator.boolean;
394
+ var date = StaticSchemaValidator.date;
395
+ var symbol = StaticSchemaValidator.symbol;
396
+ var nullish = StaticSchemaValidator.nullish;
397
+ var any = StaticSchemaValidator.any;
398
+ var unknown = StaticSchemaValidator.unknown;
399
+ var never = StaticSchemaValidator.never;
400
+ var schemify = StaticSchemaValidator.schemify.bind(
401
+ StaticSchemaValidator
402
+ );
403
+ var optional = StaticSchemaValidator.optional.bind(
404
+ StaticSchemaValidator
405
+ );
406
+ var array = StaticSchemaValidator.array.bind(StaticSchemaValidator);
407
+ var union = StaticSchemaValidator.union.bind(StaticSchemaValidator);
408
+ var literal = StaticSchemaValidator.literal.bind(
409
+ StaticSchemaValidator
410
+ );
411
+ var enum_ = StaticSchemaValidator.enum_.bind(StaticSchemaValidator);
412
+ var isSchema = StaticSchemaValidator.isSchema.bind(
413
+ StaticSchemaValidator
414
+ );
415
+ var validate = StaticSchemaValidator.validate.bind(
416
+ StaticSchemaValidator
417
+ );
418
+ var parse = StaticSchemaValidator.parse.bind(StaticSchemaValidator);
419
+ var openapi = StaticSchemaValidator.openapi.bind(
420
+ StaticSchemaValidator
421
+ );
422
+ // Annotate the CommonJS export names for ESM import in node:
423
+ 0 && (module.exports = {
424
+ SchemaValidator,
425
+ any,
426
+ array,
427
+ bigint,
428
+ boolean,
429
+ date,
430
+ email,
431
+ enum_,
432
+ isSchema,
433
+ literal,
434
+ never,
435
+ nullish,
436
+ number,
437
+ openapi,
438
+ optional,
439
+ parse,
440
+ schemify,
441
+ string,
442
+ symbol,
443
+ union,
444
+ unknown,
445
+ uri,
446
+ uuid,
447
+ validate
448
+ });