@decaf-ts/as-zod 1.12.0 → 1.13.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.
package/lib/cjs/index.cjs CHANGED
@@ -24,7 +24,7 @@ __exportStar(require("./overrides.cjs"), exports);
24
24
  * @const VERSION
25
25
  * @memberOf module:as-zod
26
26
  */
27
- exports.VERSION = "1.11.0";
27
+ exports.VERSION = "1.12.0";
28
28
  decoration_1.Metadata.registerLibrary("@decaf-ts/as-zod", exports.VERSION);
29
29
  //# sourceMappingURL=index.js.map
30
30
  //# sourceMappingURL=index.js.map
package/lib/esm/index.js CHANGED
@@ -7,6 +7,6 @@ export * from "./overrides.js";
7
7
  * @const VERSION
8
8
  * @memberOf module:as-zod
9
9
  */
10
- export const VERSION = "1.11.0";
10
+ export const VERSION = "1.12.0";
11
11
  Metadata.registerLibrary("@decaf-ts/as-zod", VERSION);
12
12
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
- export * from "./zod.cjs";
2
- export * from "./overrides.cjs";
1
+ export * from "./zod.d.cts";
2
+ export * from "./overrides.d.cts";
3
3
  /**
4
4
  * @description Current version of the reflection package
5
5
  * @summary Stores the semantic version number of the package
6
6
  * @const VERSION
7
7
  * @memberOf module:as-zod
8
8
  */
9
- export declare const VERSION = "1.11.0";
9
+ export declare const VERSION = "1.12.0";
@@ -1,9 +1,9 @@
1
- export * from "./zod.js";
2
- export * from "./overrides.js";
1
+ export * from "./zod.d.mts";
2
+ export * from "./overrides.d.mts";
3
3
  /**
4
4
  * @description Current version of the reflection package
5
5
  * @summary Stores the semantic version number of the package
6
6
  * @const VERSION
7
7
  * @memberOf module:as-zod
8
8
  */
9
- export declare const VERSION = "1.11.0";
9
+ export declare const VERSION = "1.12.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/as-zod",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Zod compatibility library",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,9 +0,0 @@
1
- export * from "./zod";
2
- export * from "./overrides";
3
- /**
4
- * @description Current version of the reflection package
5
- * @summary Stores the semantic version number of the package
6
- * @const VERSION
7
- * @memberOf module:as-zod
8
- */
9
- export declare const VERSION = "1.11.0";
@@ -1,8 +0,0 @@
1
- import { Model, ValidatorOptions, ExtendedMetadata } from "@decaf-ts/decorator-validation";
2
- import { Constructor } from "@decaf-ts/decoration";
3
- import { z } from "zod";
4
- export declare function zodify(type: string | string[], zz?: any): any;
5
- export declare function zodifyValidation(zod: any, type: string, values: ValidatorOptions): any;
6
- export declare function modelToZod<M extends Model, META extends ExtendedMetadata<M>>(model: M | Constructor<M>): z.ZodObject<{
7
- [x: string]: any;
8
- }, z.core.$strip>;
@@ -1,17 +0,0 @@
1
- import type { Model } from "@decaf-ts/decorator-validation";
2
- import type { Constructor } from "@decaf-ts/decoration";
3
- import type { ZodArray, ZodBigInt, ZodBoolean, ZodDate, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodSet, ZodString, ZodTypeAny } from "zod";
4
- type BaseZodSchemaFor<T> = T extends string ? ZodString : T extends number ? ZodNumber : T extends boolean ? ZodBoolean : T extends bigint ? ZodBigInt : T extends Date ? ZodDate : T extends any[] ? ZodArray<ZodTypeAny> : T extends Set<any> ? ZodSet<ZodTypeAny> : T extends Model ? ZodObject<any> : ZodTypeAny;
5
- export type ZodSchemaFor<T> = undefined extends T ? ZodOptional<BaseZodSchemaFor<Exclude<T, undefined>>> : null extends T ? ZodNullable<BaseZodSchemaFor<NonNullable<T>>> : BaseZodSchemaFor<T>;
6
- export type ZodShapeFor<M> = {
7
- [K in keyof M as M[K] extends (...args: any[]) => any ? never : K]: ZodSchemaFor<M[K]>;
8
- };
9
- export type ZodFrom<M extends Model> = ZodObject<ZodShapeFor<M>>;
10
- export type ListOf<T> = T[];
11
- export type SetOf<T> = Set<T>;
12
- declare module "zod" {
13
- namespace z {
14
- function from<M extends Model>(model: Constructor<M>): ZodFrom<M>;
15
- }
16
- }
17
- export {};