prisma-generator-express 1.62.0 → 1.62.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prisma-generator-express",
|
|
3
3
|
"description": "Prisma generator for Express, Fastify, and Hono CRUD APIs with OpenAPI documentation",
|
|
4
|
-
"version": "1.62.
|
|
4
|
+
"version": "1.62.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
@@ -199,6 +199,35 @@ async function runStage(
|
|
|
199
199
|
const stageDelegate = getDelegate(extended, targetModel.delegateKey)
|
|
200
200
|
const g = guarded(stageDelegate, stage.stageShape, caller)
|
|
201
201
|
|
|
202
|
+
if (stage.relationPath === 'featureFlags' || stage.relationPath === 'companies') {
|
|
203
|
+
const raw = rel.isList
|
|
204
|
+
? await stageDelegate.findMany(stageArgs)
|
|
205
|
+
: await stageDelegate.findFirst(stageArgs)
|
|
206
|
+
|
|
207
|
+
const guardedResult = rel.isList
|
|
208
|
+
? await g.findMany(stageArgs)
|
|
209
|
+
: await g.findFirst(stageArgs)
|
|
210
|
+
|
|
211
|
+
console.dir(
|
|
212
|
+
{
|
|
213
|
+
relationPath: stage.relationPath,
|
|
214
|
+
targetDelegateKey: targetModel.delegateKey,
|
|
215
|
+
parentKey,
|
|
216
|
+
childKey,
|
|
217
|
+
linkVal,
|
|
218
|
+
stageArgs,
|
|
219
|
+
stageShape: stage.stageShape,
|
|
220
|
+
rawCount: Array.isArray(raw) ? raw.length : raw ? 1 : 0,
|
|
221
|
+
guardedCount: Array.isArray(guardedResult) ? guardedResult.length : guardedResult ? 1 : 0,
|
|
222
|
+
raw,
|
|
223
|
+
guardedResult,
|
|
224
|
+
},
|
|
225
|
+
{ depth: null },
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
return guardedResult
|
|
229
|
+
}
|
|
230
|
+
|
|
202
231
|
if (rel.isList) {
|
|
203
232
|
return g.findMany(stageArgs)
|
|
204
233
|
}
|