@mirite/zod-to-mongoose 0.0.2 → 0.0.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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@mirite/zod-to-mongoose",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Package for creating mongoose schemas out of Zod schemas for type safety, and removing duplicate effort.",
5
- "types": "dist/_tsup-dts-rollup.d.ts",
5
+ "types": "./dist/_tsup-dts-rollup.d.ts",
6
6
  "type": "module",
7
7
  "repository": {
8
8
  "type": "git",
@@ -39,23 +39,23 @@
39
39
  "release": "yarn build && npm publish"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/eslint": "^8.56.2",
42
+ "@types/eslint": "^8.56.10",
43
43
  "@types/jest": "^29.5.12",
44
- "@typescript-eslint/eslint-plugin": "^7.0.1",
45
- "@typescript-eslint/parser": "^7.0.1",
46
- "eslint": "^8.56.0",
47
- "eslint-plugin-jsdoc": "^48.0.6",
44
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
45
+ "@typescript-eslint/parser": "^7.13.1",
46
+ "eslint": "^8.57.0",
47
+ "eslint-plugin-jsdoc": "^48.2.12",
48
48
  "jest": "^29.7.0",
49
- "prettier": "^3.2.5",
49
+ "prettier": "^3.3.2",
50
50
  "prettier-plugin-jsdoc": "^1.3.0",
51
- "ts-jest": "^29.1.2",
52
- "tsup": "^8.0.2",
53
- "typescript": "^5.3.3"
51
+ "ts-jest": "^29.1.5",
52
+ "tsup": "^8.1.0",
53
+ "typescript": "^5.4.5"
54
54
  },
55
- "packageManager": "yarn@4.1.0",
55
+ "packageManager": "yarn@4.3.0",
56
56
  "dependencies": {
57
- "@microsoft/api-extractor": "^7.40.1",
58
- "mongoose": "^8.1.2",
59
- "zod": "^3.22.4"
57
+ "@microsoft/api-extractor": "^7.47.0",
58
+ "mongoose": "^8.4.3",
59
+ "zod": "^3.23.8"
60
60
  }
61
61
  }
@@ -1,63 +0,0 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/indexes" />
11
- /// <reference types="mongoose/types/inferschematype" />
12
- /// <reference types="mongoose/types/middlewares" />
13
- /// <reference types="mongoose/types/models" />
14
- /// <reference types="mongoose/types/mongooseoptions" />
15
- /// <reference types="mongoose/types/pipelinestage" />
16
- /// <reference types="mongoose/types/populate" />
17
- /// <reference types="mongoose/types/query" />
18
- /// <reference types="mongoose/types/schemaoptions" />
19
- /// <reference types="mongoose/types/schematypes" />
20
- /// <reference types="mongoose/types/session" />
21
- /// <reference types="mongoose/types/types" />
22
- /// <reference types="mongoose/types/utility" />
23
- /// <reference types="mongoose/types/validation" />
24
- /// <reference types="mongoose/types/virtuals" />
25
-
26
- import * as Mongoose from 'mongoose';
27
- import { z } from 'zod';
28
- import { ZodBoolean } from 'zod';
29
- import { ZodDate } from 'zod';
30
- import { ZodDefault } from 'zod';
31
- import { ZodNumber } from 'zod';
32
- import { ZodObject } from 'zod';
33
- import { ZodRawShape } from 'zod';
34
- import { ZodString } from 'zod';
35
- import { ZodTypeAny } from 'zod';
36
- import { ZodUnion } from 'zod';
37
-
38
- export declare type Check = "";
39
-
40
- export declare function createSchema<T extends ZodRawShape>(zodObject: ZodObject<T>, modelName: string, connection: Mongoose.Connection): {
41
- schema: Mongoose.Schema;
42
- model: Mongoose.Model<z.infer<typeof zodObject>>;
43
- };
44
-
45
- export declare function createSchema<T extends ZodRawShape>(zodObject: ZodObject<T>): Mongoose.Schema;
46
-
47
- export declare type Field = {
48
- _def: FieldDefinition;
49
- checks?: Array<Check>;
50
- defaultValue?: () => unknown;
51
- };
52
-
53
- export declare type FieldDefinition = {
54
- typeName: string;
55
- innerType?: Field;
56
- description: string | undefined;
57
- };
58
-
59
- declare type SupportedPrimitive = ZodString | ZodNumber | ZodBoolean | ZodDate;
60
-
61
- export declare type SupportedType = SupportedPrimitive | ZodDefault<ZodTypeAny> | ZodObject<ZodRawShape> | ZodUnion<readonly [ZodTypeAny, ...ZodTypeAny[]]>;
62
-
63
- export { }
@@ -1,63 +0,0 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/indexes" />
11
- /// <reference types="mongoose/types/inferschematype" />
12
- /// <reference types="mongoose/types/middlewares" />
13
- /// <reference types="mongoose/types/models" />
14
- /// <reference types="mongoose/types/mongooseoptions" />
15
- /// <reference types="mongoose/types/pipelinestage" />
16
- /// <reference types="mongoose/types/populate" />
17
- /// <reference types="mongoose/types/query" />
18
- /// <reference types="mongoose/types/schemaoptions" />
19
- /// <reference types="mongoose/types/schematypes" />
20
- /// <reference types="mongoose/types/session" />
21
- /// <reference types="mongoose/types/types" />
22
- /// <reference types="mongoose/types/utility" />
23
- /// <reference types="mongoose/types/validation" />
24
- /// <reference types="mongoose/types/virtuals" />
25
-
26
- import * as Mongoose from 'mongoose';
27
- import { z } from 'zod';
28
- import { ZodBoolean } from 'zod';
29
- import { ZodDate } from 'zod';
30
- import { ZodDefault } from 'zod';
31
- import { ZodNumber } from 'zod';
32
- import { ZodObject } from 'zod';
33
- import { ZodRawShape } from 'zod';
34
- import { ZodString } from 'zod';
35
- import { ZodTypeAny } from 'zod';
36
- import { ZodUnion } from 'zod';
37
-
38
- export declare type Check = "";
39
-
40
- export declare function createSchema<T extends ZodRawShape>(zodObject: ZodObject<T>, modelName: string, connection: Mongoose.Connection): {
41
- schema: Mongoose.Schema;
42
- model: Mongoose.Model<z.infer<typeof zodObject>>;
43
- };
44
-
45
- export declare function createSchema<T extends ZodRawShape>(zodObject: ZodObject<T>): Mongoose.Schema;
46
-
47
- export declare type Field = {
48
- _def: FieldDefinition;
49
- checks?: Array<Check>;
50
- defaultValue?: () => unknown;
51
- };
52
-
53
- export declare type FieldDefinition = {
54
- typeName: string;
55
- innerType?: Field;
56
- description: string | undefined;
57
- };
58
-
59
- declare type SupportedPrimitive = ZodString | ZodNumber | ZodBoolean | ZodDate;
60
-
61
- export declare type SupportedType = SupportedPrimitive | ZodDefault<ZodTypeAny> | ZodObject<ZodRawShape> | ZodUnion<readonly [ZodTypeAny, ...ZodTypeAny[]]>;
62
-
63
- export { }
@@ -1 +0,0 @@
1
- export { createSchema } from '../_tsup-dts-rollup';
@@ -1 +0,0 @@
1
- export { createSchema } from '../_tsup-dts-rollup';