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.
- package/dist/entities/field.js +3 -0
- package/dist/file.js +1 -1
- package/package.json +4 -2
- package/src/entities/field.ts +2 -0
- package/src/file.ts +1 -1
- package/src/main.ts +0 -1
- package/tsconfig.build.json +5 -0
package/dist/entities/field.js
CHANGED
|
@@ -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, "
|
|
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.
|
|
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",
|
package/src/entities/field.ts
CHANGED
|
@@ -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
package/src/main.ts
CHANGED