zod-prisma-types icon indicating copy to clipboard operation
zod-prisma-types copied to clipboard

[BUG] Wrong spatial typing generated

Open ian opened this issue 1 year ago • 0 comments

Describe the bug By default the wrong named type is generated for spatial:

Generated:

export const spatial_ref_sysAggregateArgsSchema: z.ZodType<Prisma.spatial_ref_sysAggregateArgs> = z.object({
  where: spatial_ref_sysWhereInputSchema.optional(),
  orderBy: z.union([ spatial_ref_sysOrderByWithRelationInputSchema.array(),spatial_ref_sysOrderByWithRelationInputSchema ]).optional(),
  cursor: spatial_ref_sysWhereUniqueInputSchema.optional(),
  take: z.number().optional(),
  skip: z.number().optional(),
}).strict() ;

Tye type should be Prisma.Spatial_ref_sysAggregateArgs not Prisma.spatial_ref_sysAggregateArgs

Screenshots Error trace:

api:typecheck: cache miss, executing 999dfe903cdb48ca
api:typecheck:
api:typecheck:
api:typecheck: > [email protected] typecheck /Users/ian/Projects/brg/brg/apps/api
api:typecheck: > tsc --noEmit
api:typecheck:
api:typecheck: ../../packages/db/prisma/generated/zod/outputTypeSchemas/spatial_ref_sysAggregateArgsSchema.ts:7:67 - error TS2724: '"/Users/ian/Projects/brg/brg/node_modules/.prisma/client/index".Prisma' has no exported member named 'spatial_ref_sysAggregateArgs'. Did you mean 'Spatial_ref_sysAggregateArgs'?
api:typecheck:
api:typecheck: 7 export const spatial_ref_sysAggregateArgsSchema: z.ZodType<Prisma.spatial_ref_sysAggregateArgs> = z.object({
api:typecheck:                                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
api:typecheck:
api:typecheck:
api:typecheck: Found 1 error in ../../packages/db/prisma/generated/zod/outputTypeSchemas/spatial_ref_sysAggregateArgsSchema.ts:7
api:typecheck:
api:typecheck:  ELIFECYCLE  Command failed with exit code 2.
api:typecheck: ERROR: command finished with error: command (/Users/ian/Projects/brg/brg/apps/api) /opt/homebrew/bin/pnpm run typecheck exited (2)
api#typecheck: command (/Users/ian/Projects/brg/brg/apps/api) /opt/homebrew/bin/pnpm run typecheck exited (2)

Package versions (please complete the following information):

  • "zod": "3.21.1"
  • "zod-prisma-types": "3.1.8"
  • "prisma": "5.11.0",

ian avatar Sep 01 '24 00:09 ian