zod-typeorm 1.1.1 → 1.1.2

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.
@@ -0,0 +1,2 @@
1
+ export { ZOD_SCHEMA_PROPERTY, ZodProperty, type ZodPropertyMetadata, type ZodPropertyOptions, } from './zod-property.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ZOD_SCHEMA_PROPERTY, ZodProperty, } from './zod-property.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,WAAW,GAGZ,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import 'reflect-metadata';
2
+ import { z } from 'zod';
3
+ export declare const ZOD_SCHEMA_PROPERTY: unique symbol;
4
+ export interface ZodPropertyOptions {
5
+ schema: z.ZodType | (() => z.ZodType);
6
+ /**
7
+ * Make property optional when generating schema for certain variants
8
+ */
9
+ optionalForVariants?: string[];
10
+ /**
11
+ * Skip property when generating schema for certain variants (blacklist)
12
+ */
13
+ skipForVariants?: string[];
14
+ /**
15
+ * Include property only when generating schema for specified variants (whitelist)
16
+ */
17
+ includeForVariants?: string[];
18
+ /**
19
+ * Transform property for certain variants
20
+ */
21
+ transformForVariants?: Record<string, (schema: z.ZodType) => z.ZodType>;
22
+ }
23
+ export interface ZodPropertyMetadata {
24
+ propertyKey: string | symbol;
25
+ schema: z.ZodType | (() => z.ZodType);
26
+ optionalForVariants: string[];
27
+ skipForVariants: string[];
28
+ includeForVariants: string[];
29
+ transformForVariants: Record<string, (schema: z.ZodType) => z.ZodType>;
30
+ }
31
+ export declare function ZodProperty(options: ZodPropertyOptions | z.ZodType | (() => z.ZodType)): PropertyDecorator;
32
+ //# sourceMappingURL=zod-property.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod-property.d.ts","sourceRoot":"","sources":["../../src/decorators/zod-property.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AAGjE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;IAEtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;CACzE;AAGD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;IACtC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;CACxE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,CAAC,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,iBAAiB,CA+C1G"}
@@ -0,0 +1,47 @@
1
+ import 'reflect-metadata';
2
+ import { z } from 'zod';
3
+ export const ZOD_SCHEMA_PROPERTY = Symbol('zod:schema:property');
4
+ export function ZodProperty(options) {
5
+ return (target, propertyKey) => {
6
+ const ctor = target.constructor;
7
+ let existingMetadata = Reflect.getOwnMetadata(ZOD_SCHEMA_PROPERTY, ctor) ?? [];
8
+ // First time copy metadata from base class if anything exists
9
+ if (!existingMetadata || existingMetadata.length < 1) {
10
+ existingMetadata = [...(Reflect.getMetadata(ZOD_SCHEMA_PROPERTY, ctor) ?? [])];
11
+ }
12
+ // Prevent duplicate metadata registration
13
+ const index = existingMetadata.findIndex((m) => m.propertyKey === propertyKey);
14
+ // Prepare new record
15
+ const metadata = {
16
+ propertyKey: propertyKey,
17
+ ...(options instanceof z.ZodType || typeof options === 'function'
18
+ ? {
19
+ // Only ZodType is provided, on additional properties
20
+ schema: options,
21
+ optionalForVariants: [],
22
+ skipForVariants: [],
23
+ includeForVariants: [],
24
+ transformForVariants: {},
25
+ }
26
+ : {
27
+ // ZodType is provided with additional properties
28
+ schema: options.schema,
29
+ optionalForVariants: options.optionalForVariants ?? [],
30
+ skipForVariants: options.skipForVariants ?? [],
31
+ includeForVariants: options.includeForVariants ?? [],
32
+ transformForVariants: options.transformForVariants ?? {},
33
+ }),
34
+ };
35
+ if (index === -1) {
36
+ // No existing metadata found => add new record
37
+ existingMetadata.push(metadata);
38
+ }
39
+ else {
40
+ // Found existing metadata => overwrite
41
+ existingMetadata[index] = metadata;
42
+ }
43
+ // Set updated metadata
44
+ Reflect.defineMetadata(ZOD_SCHEMA_PROPERTY, existingMetadata, ctor);
45
+ };
46
+ }
47
+ //# sourceMappingURL=zod-property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod-property.js","sourceRoot":"","sources":["../../src/decorators/zod-property.ts"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eAAe,IAAI,EAAE;oBAC9C,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,EAAE;oBACpD,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,EAAE;iBACzD,CAAC;SACP,CAAC;QAEF,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACjB,+CAA+C;YAC/C,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,uCAAuC;YACvC,gBAAgB,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;QACrC,CAAC;QAED,uBAAuB;QACvB,OAAO,CAAC,cAAc,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * zod-typeorm library
3
+ */
4
+ export * from './decorators/index.js';
5
+ export { type CreateZodSchemaOptions, createZodSchemaFromEntity, createZodSchemasFromEntity, } from './schema.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EACL,KAAK,sBAAsB,EAC3B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * zod-typeorm library
3
+ */
4
+ export * from './decorators/index.js';
5
+ export { createZodSchemaFromEntity, createZodSchemasFromEntity, } from './schema.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAEL,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,aAAa,CAAC"}
@@ -0,0 +1,45 @@
1
+ import 'reflect-metadata';
2
+ import { z } from 'zod';
3
+ export interface CreateZodSchemaOptions {
4
+ /**
5
+ * Create strict schema
6
+ */
7
+ strict?: boolean;
8
+ /**
9
+ * Make fields optional
10
+ */
11
+ optionalFields?: (string | symbol)[];
12
+ /**
13
+ * Skip additional fields
14
+ */
15
+ skipFields?: (string | symbol)[];
16
+ /**
17
+ * Add additional field transformation
18
+ */
19
+ transformFields?: Record<string | symbol, (schema: z.ZodType) => z.ZodType>;
20
+ /**
21
+ * Additional schema transformation
22
+ */
23
+ transformSchema?: (schema: z.ZodObject<z.ZodRawShape>) => z.ZodObject<z.ZodRawShape>;
24
+ /**
25
+ * Add additional schema transformation for certain schemas
26
+ */
27
+ transformSchemaForVariants?: Record<string, (schema: z.ZodObject<z.ZodRawShape>) => z.ZodObject<z.ZodRawShape>>;
28
+ }
29
+ /**
30
+ * Generate schema from decorated class for variant
31
+ * @param entityClass Entity class
32
+ * @param variantName Variant name
33
+ * @param options Options
34
+ * @returns z.ZodObject
35
+ */
36
+ export declare function createZodSchemaFromEntity<T>(entityClass: new () => T, variantName?: string, options?: CreateZodSchemaOptions): z.ZodObject<z.ZodRawShape>;
37
+ /**
38
+ * Generate schema from decorated class for list of variants
39
+ * @param entityClass Entity class
40
+ * @param variantNames Variant names
41
+ * @param options Options
42
+ * @returns Record<string, z.ZodObject>
43
+ */
44
+ export declare function createZodSchemasFromEntity<T>(entityClass: new () => T, variantNames: string[], options?: CreateZodSchemaOptions): Record<string, z.ZodObject<z.ZodRawShape>>;
45
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAErC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAEjC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;IAE5E;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAErF;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;CACjH;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,WAAW,EAAE,UAAU,CAAC,EACxB,WAAW,GAAE,MAAkB,EAC/B,OAAO,GAAE,sBAA2B,GACnC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAiD5B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAC1C,WAAW,EAAE,UAAU,CAAC,EACxB,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,GAAE,sBAA2B,GACnC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAI5C"}
package/dist/schema.js ADDED
@@ -0,0 +1,67 @@
1
+ import 'reflect-metadata';
2
+ import { z } from 'zod';
3
+ import { ZOD_SCHEMA_PROPERTY } from './decorators/zod-property.js';
4
+ /**
5
+ * Generate schema from decorated class for variant
6
+ * @param entityClass Entity class
7
+ * @param variantName Variant name
8
+ * @param options Options
9
+ * @returns z.ZodObject
10
+ */
11
+ export function createZodSchemaFromEntity(entityClass, variantName = 'default', options = {}) {
12
+ // Get metadata for properties
13
+ const propertyMetadata = Reflect.getMetadata(ZOD_SCHEMA_PROPERTY, entityClass) ?? [];
14
+ if (propertyMetadata.length <= 0)
15
+ throw new Error(`No Zod metadata found on Entity ${entityClass.name} (Use @ZodProperty)`);
16
+ // Build set of properties for zod schema
17
+ const shape = {};
18
+ for (const item of propertyMetadata) {
19
+ if (!item.propertyKey)
20
+ continue;
21
+ // Go over each property decorator metadata
22
+ // Check if field needs to be skipped (schema skip, skip field because of variant) or if not in include list
23
+ if (options.skipFields?.includes(item.propertyKey) ||
24
+ item.skipForVariants.includes(variantName) ||
25
+ (item.includeForVariants.length > 0 && !item.includeForVariants.includes(variantName)))
26
+ continue;
27
+ const propertyKey = String(item.propertyKey);
28
+ shape[propertyKey] = typeof item.schema === 'function' ? item.schema() : item.schema;
29
+ if (variantName in item.transformForVariants && item.transformForVariants[variantName])
30
+ shape[propertyKey] = item.transformForVariants[variantName](shape[propertyKey]);
31
+ if (item.propertyKey && options.transformFields && item.propertyKey in options.transformFields) {
32
+ const transformFn = options.transformFields[item.propertyKey];
33
+ if (transformFn)
34
+ // Transform field
35
+ shape[propertyKey] = transformFn(shape[propertyKey]);
36
+ }
37
+ if (options.optionalFields?.includes(item.propertyKey) || item.optionalForVariants.includes(variantName))
38
+ // Make field optional
39
+ shape[propertyKey] = shape[propertyKey].optional();
40
+ }
41
+ let schema = z.object(shape);
42
+ if (options.transformSchemaForVariants &&
43
+ variantName in options.transformSchemaForVariants &&
44
+ options.transformSchemaForVariants[variantName])
45
+ // Per-variant transformation
46
+ schema = options.transformSchemaForVariants[variantName](schema);
47
+ if (options.transformSchema)
48
+ // Single (everytime) transformation
49
+ schema = options.transformSchema(schema);
50
+ if (options.strict)
51
+ schema = schema.strict();
52
+ return schema;
53
+ }
54
+ /**
55
+ * Generate schema from decorated class for list of variants
56
+ * @param entityClass Entity class
57
+ * @param variantNames Variant names
58
+ * @param options Options
59
+ * @returns Record<string, z.ZodObject>
60
+ */
61
+ export function createZodSchemasFromEntity(entityClass, variantNames, options = {}) {
62
+ const schemaVariants = {};
63
+ for (const name of variantNames)
64
+ schemaVariants[name] = createZodSchemaFromEntity(entityClass, name, options);
65
+ return schemaVariants;
66
+ }
67
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAA4B,MAAM,8BAA8B,CAAC;AAkC7F;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,WAAwB,EACxB,WAAW,GAAW,SAAS,EAC/B,OAAO,GAA2B,EAAE;IAEpC,8BAA8B;IAC9B,MAAM,gBAAgB,GAA0B,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;IAC5G,IAAI,gBAAgB,CAAC,MAAM,IAAI,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,mCAAmC,WAAW,CAAC,IAAI,qBAAqB,CAAC,CAAC;IAE5F,yCAAyC;IACzC,MAAM,KAAK,GAA8B,EAAE,CAAC;IAE5C,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE,SAAS;QAEhC,2CAA2C;QAC3C,4GAA4G;QAC5G,IACE,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;YAC9C,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC1C,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IA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,WAAW,CAAC;QAE/C,6BAA6B;QAC7B,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;IACnE,IAAI,OAAO,CAAC,eAAe;QACzB,oCAAoC;QACpC,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,OAAO,CAAC,MAAM;QAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IAC7C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,WAAwB,EACxB,YAAsB,EACtB,OAAO,GAA2B,EAAE;IAEpC,MAAM,cAAc,GAA+C,EAAE,CAAC;IACtE,KAAK,MAAM,IAAI,IAAI,YAAY;QAAE,cAAc,CAAC,IAAI,CAAC,GAAG,yBAAyB,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9G,OAAO,cAAc,CAAC;AACxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod-typeorm",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "TypeORM Zod utililities",
5
5
  "keywords": ["database", "orm", "schema", "typeorm", "validation", "zod"],
6
6
  "author": "Martin Dagarin",