nest-prisma_doc-gen 1.0.1 → 1.0.3

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.
@@ -115,6 +115,9 @@ export class DocGenField {
115
115
  else if (this.scalarField.type === "Int") {
116
116
  props.push(`example: ${Static.getRandomNumber()}`);
117
117
  }
118
+ else if (this.scalarField.type === "String") {
119
+ props.push(`example: 'ordinary string'`);
120
+ }
118
121
  props.push(`required: ${this.scalarField.isRequired}`);
119
122
  return props;
120
123
  }
package/dist/file.js CHANGED
@@ -2,7 +2,7 @@ import { promises as fs } from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import * as prettier from "prettier";
4
4
  const ROOT = process.cwd();
5
- const OUT_DIR = path.join(ROOT, "generated/docgen");
5
+ const OUT_DIR = path.join(ROOT, "src/types/docgen");
6
6
  export class DocGenFile {
7
7
  outDir;
8
8
  data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nest-prisma_doc-gen",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Auto generates ApiProperties from schema.prisma",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,8 +29,10 @@
29
29
  "license": "ISC",
30
30
  "dependencies": {
31
31
  "@prisma/internals": "^6.17.1",
32
+ "nest-prisma_doc-gen": "^1.0.1",
32
33
  "prettier": "^3.6.2",
33
- "ts-node": "^10.9.2"
34
+ "ts-node": "^10.9.2",
35
+ "tsx": "^4.19.1"
34
36
  },
35
37
  "devDependencies": {
36
38
  "@types/node": "^24.7.2",
@@ -126,6 +126,8 @@ export class DocGenField {
126
126
  props.push(`example: ${this.scalarField.type}[0]`);
127
127
  } else if (this.scalarField.type === "Int") {
128
128
  props.push(`example: ${Static.getRandomNumber()}`);
129
+ } else if (this.scalarField.type === "String") {
130
+ props.push(`example: 'ordinary string'`);
129
131
  }
130
132
 
131
133
  props.push(`required: ${this.scalarField.isRequired}`);
package/src/file.ts CHANGED
@@ -3,7 +3,7 @@ import * as path from "node:path";
3
3
  import * as prettier from "prettier";
4
4
 
5
5
  const ROOT = process.cwd();
6
- const OUT_DIR = path.join(ROOT, "generated/docgen");
6
+ const OUT_DIR = path.join(ROOT, "src/types/docgen");
7
7
 
8
8
  export class DocGenFile {
9
9
  outDir: string;
package/src/main.ts CHANGED
@@ -7,7 +7,6 @@ import { Helper } from "./helpers/helpers.js";
7
7
  import { Model } from "./types.js";
8
8
 
9
9
  import prismaPkg from "@prisma/internals";
10
- import { config } from "./helpers/loader.js";
11
10
  const { getDMMF } = prismaPkg;
12
11
 
13
12
  const ROOT = process.cwd();
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": ["generated//*", "src//"],
4
+ "exclude": ["node_modules", "test", "dist", "**/spec.ts"]
5
+ }