@nyig/models 0.2.2 → 0.2.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.
@@ -2,10 +2,13 @@ import { z } from 'zod';
2
2
 
3
3
  declare const zStudent: z.ZodObject<{
4
4
  name: z.ZodString;
5
+ email: z.ZodString;
5
6
  }, "strip", z.ZodTypeAny, {
6
7
  name: string;
8
+ email: string;
7
9
  }, {
8
10
  name: string;
11
+ email: string;
9
12
  }>;
10
13
 
11
14
  export { zStudent };
@@ -2,10 +2,13 @@ import { z } from 'zod';
2
2
 
3
3
  declare const zStudent: z.ZodObject<{
4
4
  name: z.ZodString;
5
+ email: z.ZodString;
5
6
  }, "strip", z.ZodTypeAny, {
6
7
  name: string;
8
+ email: string;
7
9
  }, {
8
10
  name: string;
11
+ email: string;
9
12
  }>;
10
13
 
11
14
  export { zStudent };
@@ -23,9 +23,12 @@ __export(src_exports, {
23
23
  zStudent: () => zStudent
24
24
  });
25
25
  module.exports = __toCommonJS(src_exports);
26
+
27
+ // src/z/student.ts
26
28
  var import_zod = require("zod");
27
29
  var zStudent = import_zod.z.object({
28
- name: import_zod.z.string()
30
+ name: import_zod.z.string(),
31
+ email: import_zod.z.string().email()
29
32
  });
30
33
  // Annotate the CommonJS export names for ESM import in node:
31
34
  0 && (module.exports = {
@@ -1,7 +1,8 @@
1
- // src/index.ts
1
+ // src/z/student.ts
2
2
  import { z } from "zod";
3
3
  var zStudent = z.object({
4
- name: z.string()
4
+ name: z.string(),
5
+ email: z.string().email()
5
6
  });
6
7
  export {
7
8
  zStudent
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "license": "MIT",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "files": [
9
- "dist/*"
10
- ],
5
+ "main": "index.js",
6
+ "module": "index.mjs",
7
+ "types": "index.d.ts",
11
8
  "peerDependencies": {
12
9
  "zod": ">=3.22.4"
13
10
  },
@@ -22,6 +19,9 @@
22
19
  "lint-staged": {
23
20
  "*.{js,ts,md}": "prettier --write"
24
21
  },
22
+ "publishConfig": {
23
+ "directory": "dist"
24
+ },
25
25
  "scripts": {
26
26
  "build": "tsup src/index.ts --format cjs,esm --dts",
27
27
  "clean": "rm -rf dist node_modules",