prisma-nestjs-graphql 18.1.2 → 19.0.1
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/generate.cjs +8 -2
- package/package.json +20 -20
package/generate.cjs
CHANGED
|
@@ -565,12 +565,18 @@ function getPropertyType(args) {
|
|
|
565
565
|
|
|
566
566
|
function getWhereUniqueAtLeastKeys(model) {
|
|
567
567
|
const names = model.fields.filter((field) => field.isUnique || field.isId).map((field) => field.name);
|
|
568
|
+
if (model.primaryKey) {
|
|
569
|
+
names.push(createFieldName(model.primaryKey));
|
|
570
|
+
}
|
|
568
571
|
for (const uniqueIndex of model.uniqueIndexes) {
|
|
569
|
-
|
|
570
|
-
names.push(name);
|
|
572
|
+
names.push(createFieldName(uniqueIndex));
|
|
571
573
|
}
|
|
572
574
|
return names.map((name) => `'${name}'`).join(" | ");
|
|
573
575
|
}
|
|
576
|
+
function createFieldName(args) {
|
|
577
|
+
const { name, fields } = args;
|
|
578
|
+
return name || fields.join("_");
|
|
579
|
+
}
|
|
574
580
|
|
|
575
581
|
function isWhereUniqueInputType(name) {
|
|
576
582
|
return name.endsWith("WhereUniqueInput");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prisma-nestjs-graphql",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Generate object types, inputs, args, etc. from prisma schema file for usage with @nestjs/graphql module",
|
|
6
6
|
"bin": "bin.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@prisma/generator-helper": "^5.
|
|
73
|
+
"@prisma/generator-helper": "^5.1.1",
|
|
74
74
|
"await-event-emitter": "^2.0.2",
|
|
75
75
|
"filenamify": "4.X",
|
|
76
76
|
"flat": "^5.0.2",
|
|
@@ -87,44 +87,44 @@
|
|
|
87
87
|
"@commitlint/cli": "^17.6.7",
|
|
88
88
|
"@commitlint/config-conventional": "^17.6.7",
|
|
89
89
|
"@nestjs/apollo": "^12.0.7",
|
|
90
|
-
"@nestjs/common": "^10.1.
|
|
91
|
-
"@nestjs/core": "^10.1.
|
|
90
|
+
"@nestjs/common": "^10.1.3",
|
|
91
|
+
"@nestjs/core": "^10.1.3",
|
|
92
92
|
"@nestjs/graphql": "^12.0.8",
|
|
93
|
-
"@nestjs/platform-express": "^10.1.
|
|
93
|
+
"@nestjs/platform-express": "^10.1.3",
|
|
94
94
|
"@paljs/plugins": "^5.3.3",
|
|
95
|
-
"@prisma/client": "^5.
|
|
95
|
+
"@prisma/client": "^5.1.1",
|
|
96
96
|
"@semantic-release/changelog": "^6.0.3",
|
|
97
97
|
"@semantic-release/git": "^10.0.1",
|
|
98
|
-
"@swc/core": "^1.3.
|
|
98
|
+
"@swc/core": "^1.3.74",
|
|
99
99
|
"@swc/helpers": "^0.5.1",
|
|
100
100
|
"@swc/register": "^0.1.10",
|
|
101
101
|
"@types/flat": "^5.0.2",
|
|
102
102
|
"@types/graceful-fs": "^4.1.6",
|
|
103
|
-
"@types/lodash": "^4.14.
|
|
103
|
+
"@types/lodash": "^4.14.196",
|
|
104
104
|
"@types/mocha": "^10.0.1",
|
|
105
|
-
"@types/node": "^20.4.
|
|
105
|
+
"@types/node": "^20.4.7",
|
|
106
106
|
"@types/pluralize": "^0.0.30",
|
|
107
|
-
"@typescript-eslint/eslint-plugin": "^6.1
|
|
108
|
-
"@typescript-eslint/parser": "^6.1
|
|
107
|
+
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
|
108
|
+
"@typescript-eslint/parser": "^6.2.1",
|
|
109
109
|
"apollo-server-express": "^3.10.0",
|
|
110
|
-
"c8": "^8.0.
|
|
110
|
+
"c8": "^8.0.1",
|
|
111
111
|
"class-transformer": "^0.5.1",
|
|
112
112
|
"class-validator": "^0.14.0",
|
|
113
113
|
"commitizen": "^4.3.0",
|
|
114
114
|
"cz-customizable": "^7.0.0",
|
|
115
115
|
"decimal.js": "^10.4.3",
|
|
116
|
-
"eslint": "^8.
|
|
116
|
+
"eslint": "^8.46.0",
|
|
117
117
|
"eslint-import-resolver-node": "^0.3.7",
|
|
118
118
|
"eslint-plugin-etc": "^2.0.3",
|
|
119
|
-
"eslint-plugin-import": "^2.
|
|
119
|
+
"eslint-plugin-import": "^2.28.0",
|
|
120
120
|
"eslint-plugin-only-warn": "^1.1.0",
|
|
121
121
|
"eslint-plugin-prettier": "^5.0.0",
|
|
122
122
|
"eslint-plugin-regexp": "^1.15.0",
|
|
123
123
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
124
124
|
"eslint-plugin-sort-class-members": "^1.18.0",
|
|
125
|
-
"eslint-plugin-unicorn": "^48.0.
|
|
125
|
+
"eslint-plugin-unicorn": "^48.0.1",
|
|
126
126
|
"eslint-plugin-wix-editor": "^3.3.0",
|
|
127
|
-
"expect": "^29.6.
|
|
127
|
+
"expect": "^29.6.2",
|
|
128
128
|
"git-branch-is": "^4.0.0",
|
|
129
129
|
"graphql": "^16.7.1",
|
|
130
130
|
"graphql-scalars": "^1.22.2",
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
"mocha": "^10.2.0",
|
|
133
133
|
"ololog": "^1.1.175",
|
|
134
134
|
"precise-commits": "^1.0.2",
|
|
135
|
-
"prettier": "^3.0.
|
|
136
|
-
"prisma": "^5.
|
|
135
|
+
"prettier": "^3.0.1",
|
|
136
|
+
"prisma": "^5.1.1",
|
|
137
137
|
"prisma-graphql-type-decimal": "^3.0.0",
|
|
138
138
|
"reflect-metadata": "^0.1.13",
|
|
139
139
|
"request": "^2.88.2",
|
|
@@ -142,11 +142,11 @@
|
|
|
142
142
|
"simplytyped": "^3.3.0",
|
|
143
143
|
"temp-dir": "2.X",
|
|
144
144
|
"ts-node": "^10.9.1",
|
|
145
|
-
"tslib": "^2.6.
|
|
145
|
+
"tslib": "^2.6.1",
|
|
146
146
|
"typescript": "^5.1.6",
|
|
147
147
|
"watchexec-bin": "^1.0.0"
|
|
148
148
|
},
|
|
149
149
|
"overrides": {
|
|
150
|
-
"prisma": "^5.
|
|
150
|
+
"prisma": "^5.1.1"
|
|
151
151
|
}
|
|
152
152
|
}
|