@forklaunch/validator 0.9.2 → 0.9.4
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/lib/__test__/utils/mockSchemaValidator.d.mts +1 -1
- package/lib/__test__/utils/mockSchemaValidator.d.ts +1 -1
- package/lib/index.d.mts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/{schema.types-DHEcC_qy.d.mts → schema.types-wl77iEsE.d.mts} +4 -4
- package/lib/{schema.types-DHEcC_qy.d.ts → schema.types-wl77iEsE.d.ts} +4 -4
- package/lib/src/typebox/index.d.mts +2 -2
- package/lib/src/typebox/index.d.ts +2 -2
- package/lib/src/typebox/index.js +6 -6
- package/lib/src/typebox/index.mjs +6 -6
- package/lib/src/zod/index.d.mts +2 -2
- package/lib/src/zod/index.d.ts +2 -2
- package/lib/src/zod/index.js +5 -5
- package/lib/src/zod/index.mjs +5 -5
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
2
|
-
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-
|
|
2
|
+
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-wl77iEsE.mjs';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import '@sinclair/typebox/compiler';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
2
|
-
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-
|
|
2
|
+
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-wl77iEsE.js';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import '@sinclair/typebox/compiler';
|
package/lib/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ParseError } from './schema.types-
|
|
2
|
-
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-
|
|
1
|
+
import { P as ParseError } from './schema.types-wl77iEsE.mjs';
|
|
2
|
+
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-wl77iEsE.mjs';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import 'openapi3-ts/oas31';
|
|
5
5
|
import '@sinclair/typebox';
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ParseError } from './schema.types-
|
|
2
|
-
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-
|
|
1
|
+
import { P as ParseError } from './schema.types-wl77iEsE.js';
|
|
2
|
+
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-wl77iEsE.js';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import 'openapi3-ts/oas31';
|
|
5
5
|
import '@sinclair/typebox';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Prettify } from '@forklaunch/common';
|
|
2
2
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
3
|
-
import { TTransform, TAny, TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TString, TNumber, TBoolean, TNull, TBigInt, TDate, TSymbol, TVoid, TUndefined, TUnknown, TNever, TKind, TObject, StaticDecode } from '@sinclair/typebox';
|
|
3
|
+
import { TTransform, TAny, TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TString, TNumber, TBoolean, TNull, TBigInt, TDate, TSymbol, TVoid, TUndefined, TUnknown, TNever, TUnsafe, TKind, TObject, StaticDecode } from '@sinclair/typebox';
|
|
4
4
|
import { TypeCheck } from '@sinclair/typebox/compiler';
|
|
5
5
|
import { ZodType, ZodObject as ZodObject$1, ZodRawShape, ZodOptional, ZodArray, ZodUnion, ZodLiteral, ZodFunction, ZodTuple, ZodRecord, ZodPromise, z, ZodUnknown, ZodPipeline, ZodTypeAny, ZodEffects, ZodNever } from 'zod/v3';
|
|
6
6
|
|
|
@@ -39,8 +39,8 @@ declare class TypeboxSchemaValidator implements SchemaValidator<(<T>() => TTrans
|
|
|
39
39
|
any: TAny;
|
|
40
40
|
unknown: TUnknown;
|
|
41
41
|
never: TNever;
|
|
42
|
-
binary: TTransform<TString, Uint8Array
|
|
43
|
-
file: TTransform<
|
|
42
|
+
binary: TTransform<TString, Uint8Array<ArrayBuffer>>;
|
|
43
|
+
file: TTransform<TUnsafe<Buffer<ArrayBuffer>>, Blob>;
|
|
44
44
|
type: <T>() => TTransform<TAny, T>;
|
|
45
45
|
/**
|
|
46
46
|
* Extracts the error type of a schema for error messages.
|
|
@@ -251,7 +251,7 @@ declare class ZodSchemaValidator implements SchemaValidator<(<T>() => ZodType<T>
|
|
|
251
251
|
unknown: z.ZodUnknown;
|
|
252
252
|
never: z.ZodNever;
|
|
253
253
|
binary: z.ZodEffects<z.ZodString, Uint8Array<ArrayBuffer>, string>;
|
|
254
|
-
file: z.ZodEffects<z.
|
|
254
|
+
file: z.ZodEffects<z.ZodType<Buffer<ArrayBuffer>, z.ZodTypeDef, Buffer<ArrayBuffer>>, Blob, Buffer<ArrayBuffer>>;
|
|
255
255
|
type: <T>() => ZodType<T>;
|
|
256
256
|
/**
|
|
257
257
|
* Compiles schema if this exists, for optimal performance.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Prettify } from '@forklaunch/common';
|
|
2
2
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
3
|
-
import { TTransform, TAny, TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TString, TNumber, TBoolean, TNull, TBigInt, TDate, TSymbol, TVoid, TUndefined, TUnknown, TNever, TKind, TObject, StaticDecode } from '@sinclair/typebox';
|
|
3
|
+
import { TTransform, TAny, TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TString, TNumber, TBoolean, TNull, TBigInt, TDate, TSymbol, TVoid, TUndefined, TUnknown, TNever, TUnsafe, TKind, TObject, StaticDecode } from '@sinclair/typebox';
|
|
4
4
|
import { TypeCheck } from '@sinclair/typebox/compiler';
|
|
5
5
|
import { ZodType, ZodObject as ZodObject$1, ZodRawShape, ZodOptional, ZodArray, ZodUnion, ZodLiteral, ZodFunction, ZodTuple, ZodRecord, ZodPromise, z, ZodUnknown, ZodPipeline, ZodTypeAny, ZodEffects, ZodNever } from 'zod/v3';
|
|
6
6
|
|
|
@@ -39,8 +39,8 @@ declare class TypeboxSchemaValidator implements SchemaValidator<(<T>() => TTrans
|
|
|
39
39
|
any: TAny;
|
|
40
40
|
unknown: TUnknown;
|
|
41
41
|
never: TNever;
|
|
42
|
-
binary: TTransform<TString, Uint8Array
|
|
43
|
-
file: TTransform<
|
|
42
|
+
binary: TTransform<TString, Uint8Array<ArrayBuffer>>;
|
|
43
|
+
file: TTransform<TUnsafe<Buffer<ArrayBuffer>>, Blob>;
|
|
44
44
|
type: <T>() => TTransform<TAny, T>;
|
|
45
45
|
/**
|
|
46
46
|
* Extracts the error type of a schema for error messages.
|
|
@@ -251,7 +251,7 @@ declare class ZodSchemaValidator implements SchemaValidator<(<T>() => ZodType<T>
|
|
|
251
251
|
unknown: z.ZodUnknown;
|
|
252
252
|
never: z.ZodNever;
|
|
253
253
|
binary: z.ZodEffects<z.ZodString, Uint8Array<ArrayBuffer>, string>;
|
|
254
|
-
file: z.ZodEffects<z.
|
|
254
|
+
file: z.ZodEffects<z.ZodType<Buffer<ArrayBuffer>, z.ZodTypeDef, Buffer<ArrayBuffer>>, Blob, Buffer<ArrayBuffer>>;
|
|
255
255
|
type: <T>() => ZodType<T>;
|
|
256
256
|
/**
|
|
257
257
|
* Compiles schema if this exists, for optimal performance.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from '@sinclair/typebox';
|
|
2
|
-
import { T as TypeboxSchemaValidator } from '../../schema.types-
|
|
3
|
-
export { i as SafeTObject, f as TCatchall, l as TIdiomaticSchema, h as TObjectShape, g as TOuterArray, o as TResolve, j as TSchemaTranslate, m as TUnionTupleContainer, k as UnboxedTObjectSchema, n as UnionTupleTResolve } from '../../schema.types-
|
|
2
|
+
import { T as TypeboxSchemaValidator } from '../../schema.types-wl77iEsE.mjs';
|
|
3
|
+
export { i as SafeTObject, f as TCatchall, l as TIdiomaticSchema, h as TObjectShape, g as TOuterArray, o as TResolve, j as TSchemaTranslate, m as TUnionTupleContainer, k as UnboxedTObjectSchema, n as UnionTupleTResolve } from '../../schema.types-wl77iEsE.mjs';
|
|
4
4
|
import '@forklaunch/common';
|
|
5
5
|
import 'openapi3-ts/oas31';
|
|
6
6
|
import '@sinclair/typebox/compiler';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from '@sinclair/typebox';
|
|
2
|
-
import { T as TypeboxSchemaValidator } from '../../schema.types-
|
|
3
|
-
export { i as SafeTObject, f as TCatchall, l as TIdiomaticSchema, h as TObjectShape, g as TOuterArray, o as TResolve, j as TSchemaTranslate, m as TUnionTupleContainer, k as UnboxedTObjectSchema, n as UnionTupleTResolve } from '../../schema.types-
|
|
2
|
+
import { T as TypeboxSchemaValidator } from '../../schema.types-wl77iEsE.js';
|
|
3
|
+
export { i as SafeTObject, f as TCatchall, l as TIdiomaticSchema, h as TObjectShape, g as TOuterArray, o as TResolve, j as TSchemaTranslate, m as TUnionTupleContainer, k as UnboxedTObjectSchema, n as UnionTupleTResolve } from '../../schema.types-wl77iEsE.js';
|
|
4
4
|
import '@forklaunch/common';
|
|
5
5
|
import 'openapi3-ts/oas31';
|
|
6
6
|
import '@sinclair/typebox/compiler';
|
package/lib/src/typebox/index.js
CHANGED
|
@@ -92,7 +92,7 @@ var TypeboxSchemaValidator = class {
|
|
|
92
92
|
title: "UUID"
|
|
93
93
|
});
|
|
94
94
|
email = import_typebox.Type.String({
|
|
95
|
-
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\\
|
|
95
|
+
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\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
|
|
96
96
|
errorType: "email",
|
|
97
97
|
example: "a@b.com",
|
|
98
98
|
title: "Email"
|
|
@@ -247,20 +247,20 @@ var TypeboxSchemaValidator = class {
|
|
|
247
247
|
import_typebox.Type.String({
|
|
248
248
|
errorType: "binary",
|
|
249
249
|
format: "binary",
|
|
250
|
-
example: "a
|
|
250
|
+
example: "a base-64 encodable string",
|
|
251
251
|
title: "Binary"
|
|
252
252
|
})
|
|
253
|
-
).Decode((value) => new
|
|
254
|
-
if (value instanceof
|
|
253
|
+
).Decode((value) => new Uint8Array(Buffer.from(value, "base64"))).Encode((value) => {
|
|
254
|
+
if (value instanceof Buffer) {
|
|
255
255
|
return String.fromCharCode(...new Uint8Array(value));
|
|
256
256
|
}
|
|
257
257
|
return "";
|
|
258
258
|
});
|
|
259
259
|
file = import_typebox.Type.Transform(
|
|
260
|
-
import_typebox.Type.
|
|
260
|
+
import_typebox.Type.Unsafe({
|
|
261
261
|
errorType: "binary",
|
|
262
262
|
format: "binary",
|
|
263
|
-
example: "a
|
|
263
|
+
example: "a raw buffer or file stream",
|
|
264
264
|
title: "File"
|
|
265
265
|
})
|
|
266
266
|
).Decode((value) => new import_common.InMemoryBlob(value)).Encode((value) => value.content);
|
|
@@ -43,7 +43,7 @@ var TypeboxSchemaValidator = class {
|
|
|
43
43
|
title: "UUID"
|
|
44
44
|
});
|
|
45
45
|
email = Type.String({
|
|
46
|
-
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\\
|
|
46
|
+
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\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
|
|
47
47
|
errorType: "email",
|
|
48
48
|
example: "a@b.com",
|
|
49
49
|
title: "Email"
|
|
@@ -198,20 +198,20 @@ var TypeboxSchemaValidator = class {
|
|
|
198
198
|
Type.String({
|
|
199
199
|
errorType: "binary",
|
|
200
200
|
format: "binary",
|
|
201
|
-
example: "a
|
|
201
|
+
example: "a base-64 encodable string",
|
|
202
202
|
title: "Binary"
|
|
203
203
|
})
|
|
204
|
-
).Decode((value) => new
|
|
205
|
-
if (value instanceof
|
|
204
|
+
).Decode((value) => new Uint8Array(Buffer.from(value, "base64"))).Encode((value) => {
|
|
205
|
+
if (value instanceof Buffer) {
|
|
206
206
|
return String.fromCharCode(...new Uint8Array(value));
|
|
207
207
|
}
|
|
208
208
|
return "";
|
|
209
209
|
});
|
|
210
210
|
file = Type.Transform(
|
|
211
|
-
Type.
|
|
211
|
+
Type.Unsafe({
|
|
212
212
|
errorType: "binary",
|
|
213
213
|
format: "binary",
|
|
214
|
-
example: "a
|
|
214
|
+
example: "a raw buffer or file stream",
|
|
215
215
|
title: "File"
|
|
216
216
|
})
|
|
217
217
|
).Decode((value) => new InMemoryBlob(value)).Encode((value) => value.content);
|
package/lib/src/zod/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodDate, ZodEffects, ZodEnum, ZodFunction, ZodLiteral, ZodNever, ZodNull, ZodNumber, ZodObject, ZodOptional, ZodPipeline, ZodPromise, ZodRawShape, ZodRecord, ZodString, ZodSymbol, ZodTuple, ZodType, ZodTypeAny, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid } from 'zod/v3';
|
|
2
|
-
import { Z as ZodSchemaValidator } from '../../schema.types-
|
|
3
|
-
export { w as TupleZodResolve, t as UnboxedZodObjectSchema, y as UnionZodResolve, p as ZodCatchall, u as ZodIdiomaticSchema, r as ZodObjectShape, q as ZodOuterArray, B as ZodRecordKey, z as ZodResolve, s as ZodSchemaTranslate, v as ZodTupleContainer, x as ZodUnionContainer } from '../../schema.types-
|
|
2
|
+
import { Z as ZodSchemaValidator } from '../../schema.types-wl77iEsE.mjs';
|
|
3
|
+
export { w as TupleZodResolve, t as UnboxedZodObjectSchema, y as UnionZodResolve, p as ZodCatchall, u as ZodIdiomaticSchema, r as ZodObjectShape, q as ZodOuterArray, B as ZodRecordKey, z as ZodResolve, s as ZodSchemaTranslate, v as ZodTupleContainer, x as ZodUnionContainer } from '../../schema.types-wl77iEsE.mjs';
|
|
4
4
|
import '@forklaunch/common';
|
|
5
5
|
import 'openapi3-ts/oas31';
|
|
6
6
|
import '@sinclair/typebox';
|
package/lib/src/zod/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodDate, ZodEffects, ZodEnum, ZodFunction, ZodLiteral, ZodNever, ZodNull, ZodNumber, ZodObject, ZodOptional, ZodPipeline, ZodPromise, ZodRawShape, ZodRecord, ZodString, ZodSymbol, ZodTuple, ZodType, ZodTypeAny, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid } from 'zod/v3';
|
|
2
|
-
import { Z as ZodSchemaValidator } from '../../schema.types-
|
|
3
|
-
export { w as TupleZodResolve, t as UnboxedZodObjectSchema, y as UnionZodResolve, p as ZodCatchall, u as ZodIdiomaticSchema, r as ZodObjectShape, q as ZodOuterArray, B as ZodRecordKey, z as ZodResolve, s as ZodSchemaTranslate, v as ZodTupleContainer, x as ZodUnionContainer } from '../../schema.types-
|
|
2
|
+
import { Z as ZodSchemaValidator } from '../../schema.types-wl77iEsE.js';
|
|
3
|
+
export { w as TupleZodResolve, t as UnboxedZodObjectSchema, y as UnionZodResolve, p as ZodCatchall, u as ZodIdiomaticSchema, r as ZodObjectShape, q as ZodOuterArray, B as ZodRecordKey, z as ZodResolve, s as ZodSchemaTranslate, v as ZodTupleContainer, x as ZodUnionContainer } from '../../schema.types-wl77iEsE.js';
|
|
4
4
|
import '@forklaunch/common';
|
|
5
5
|
import 'openapi3-ts/oas31';
|
|
6
6
|
import '@sinclair/typebox';
|
package/lib/src/zod/index.js
CHANGED
|
@@ -658,7 +658,7 @@ var ZodSchemaValidator = class {
|
|
|
658
658
|
email = import_v32.z.string().email().openapi({
|
|
659
659
|
title: "Email",
|
|
660
660
|
format: "email",
|
|
661
|
-
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\\
|
|
661
|
+
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\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
|
|
662
662
|
example: "a@b.com"
|
|
663
663
|
});
|
|
664
664
|
uri = import_v32.z.string().url().openapi({
|
|
@@ -768,19 +768,19 @@ var ZodSchemaValidator = class {
|
|
|
768
768
|
type: "null",
|
|
769
769
|
example: "never"
|
|
770
770
|
});
|
|
771
|
-
binary = import_v32.z.string().transform((
|
|
771
|
+
binary = import_v32.z.string().transform((val) => new Uint8Array(Buffer.from(val, "base64"))).openapi({
|
|
772
772
|
title: "Binary",
|
|
773
773
|
type: "string",
|
|
774
774
|
format: "binary",
|
|
775
|
-
example: "a
|
|
775
|
+
example: "a base-64 encodable string"
|
|
776
776
|
});
|
|
777
|
-
file = import_v32.z.
|
|
777
|
+
file = import_v32.z.instanceof(Buffer).transform((val) => {
|
|
778
778
|
return new Blob([val]);
|
|
779
779
|
}).openapi({
|
|
780
780
|
title: "File",
|
|
781
781
|
type: "string",
|
|
782
782
|
format: "binary",
|
|
783
|
-
example: "a
|
|
783
|
+
example: "a base-64 encodable blob or file"
|
|
784
784
|
});
|
|
785
785
|
type = () => this.any;
|
|
786
786
|
/**
|
package/lib/src/zod/index.mjs
CHANGED
|
@@ -602,7 +602,7 @@ var ZodSchemaValidator = class {
|
|
|
602
602
|
email = z2.string().email().openapi({
|
|
603
603
|
title: "Email",
|
|
604
604
|
format: "email",
|
|
605
|
-
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\\
|
|
605
|
+
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\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
|
|
606
606
|
example: "a@b.com"
|
|
607
607
|
});
|
|
608
608
|
uri = z2.string().url().openapi({
|
|
@@ -712,19 +712,19 @@ var ZodSchemaValidator = class {
|
|
|
712
712
|
type: "null",
|
|
713
713
|
example: "never"
|
|
714
714
|
});
|
|
715
|
-
binary = z2.string().transform((
|
|
715
|
+
binary = z2.string().transform((val) => new Uint8Array(Buffer.from(val, "base64"))).openapi({
|
|
716
716
|
title: "Binary",
|
|
717
717
|
type: "string",
|
|
718
718
|
format: "binary",
|
|
719
|
-
example: "a
|
|
719
|
+
example: "a base-64 encodable string"
|
|
720
720
|
});
|
|
721
|
-
file = z2.
|
|
721
|
+
file = z2.instanceof(Buffer).transform((val) => {
|
|
722
722
|
return new Blob([val]);
|
|
723
723
|
}).openapi({
|
|
724
724
|
title: "File",
|
|
725
725
|
type: "string",
|
|
726
726
|
format: "binary",
|
|
727
|
-
example: "a
|
|
727
|
+
example: "a base-64 encodable blob or file"
|
|
728
728
|
});
|
|
729
729
|
type = () => this.any;
|
|
730
730
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/validator",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Schema validator for ForkLaunch components.",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@sinclair/typebox": "^0.34.40",
|
|
62
62
|
"ts-deepmerge": "^7.0.3",
|
|
63
|
-
"zod": "^4.
|
|
64
|
-
"@forklaunch/common": "0.5.
|
|
63
|
+
"zod": "^4.1.1",
|
|
64
|
+
"@forklaunch/common": "0.5.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@eslint/js": "^9.
|
|
67
|
+
"@eslint/js": "^9.34.0",
|
|
68
68
|
"@types/jest": "^30.0.0",
|
|
69
69
|
"@types/node": "^24.3.0",
|
|
70
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
70
|
+
"@typescript/native-preview": "7.0.0-dev.20250824.1",
|
|
71
71
|
"@vitest/coverage-v8": "^3.2.4",
|
|
72
72
|
"eslint-config-prettier": "^10.1.8",
|
|
73
73
|
"eslint-plugin-prettier": "^5.5.4",
|