Skip to content

Commit 576c4f7

Browse files
authored
fix: issue with client typing generation in trpc plugin (#673)
1 parent dc106a9 commit 576c4f7

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

packages/plugins/openapi/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"build": "pnpm lint && pnpm clean && tsc && copyfiles ./package.json ./README.md ./LICENSE dist && copyfiles -u 1 ./src/plugin.zmodel dist && pnpm pack dist --pack-destination '../../../../.build'",
1818
"watch": "tsc --watch",
1919
"lint": "eslint src --ext ts",
20-
"test": "jest",
20+
"test": "ZENSTACK_TEST=1 jest",
2121
"prepublishOnly": "pnpm build"
2222
},
23-
"keywords": [],
23+
"keywords": ["openapi"],
2424
"author": "ZenStack Team",
2525
"license": "MIT",
2626
"dependencies": {

packages/plugins/trpc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
"build": "pnpm lint && pnpm clean && tsc && copyfiles ./package.json ./README.md ./LICENSE 'res/**/*' dist && pnpm pack dist --pack-destination '../../../../.build'",
1414
"watch": "tsc --watch",
1515
"lint": "eslint src --ext ts",
16+
"test": "ZENSTACK_TEST=1 jest",
1617
"prepublishOnly": "pnpm build",
1718
"publish-dev": "pnpm publish --tag dev"
1819
},
1920
"publishConfig": {
2021
"directory": "dist",
2122
"linkDirectory": true
2223
},
23-
"keywords": [],
24+
"keywords": ["trpc"],
2425
"author": "ZenStack Team",
2526
"license": "MIT",
2627
"dependencies": {

packages/plugins/trpc/src/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ function getPrismaOperationTypes(model: string, operation: string) {
111111

112112
case 'count':
113113
argsType = `Prisma.Subset<T, ${genericBase}>`;
114-
resultType = `'select' extends keyof T'
114+
resultType = `'select' extends keyof T
115115
? T['select'] extends true
116116
? number
117-
: GetScalarType<T['select'], ${capModel}CountAggregateOutputType>
117+
: Prisma.GetScalarType<T['select'], Prisma.${capModel}CountAggregateOutputType>
118118
: number`;
119119
break;
120120

packages/schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"bundle": "pnpm clean && pnpm lint && node build/bundle.js --minify",
7474
"watch": "tsc --watch",
7575
"lint": "eslint src tests --ext ts",
76-
"test": "jest",
76+
"test": "ZENSTACK_TEST=1 jest",
7777
"prepublishOnly": "pnpm build",
7878
"publish-dev": "pnpm publish --registry http://localhost:4873",
7979
"postinstall": "node bin/post-install.js"

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"linkDirectory": true
1919
},
2020
"keywords": [
21-
"fastify"
21+
"fastify", "express", "nextjs", "sveltekit", "nuxtjs"
2222
],
2323
"author": "",
2424
"license": "MIT",

0 commit comments

Comments
 (0)