prisma-zodifier v1.2.2
prisma-zodifier
prisma-zodifier is a utility that facilitates the conversion of Prisma schemas to Zod schemas, providing you with a type-safe schema management solution.
Table of Contents
Installation
Using npm:
npm install prisma-zodifierUsing yarn:
yarn add prisma-zodifierUsage
Once the package is installed, you can run the prisma-zodifier command:
yarn prisma-zodifierBy default, prisma-zodifier will look for a schema.prisma file in the prisma directory of your project and generate the Zod schema in the root as zodSchemas.ts.
You can also provide custom paths:
yarn prisma-zodifier path/to/your/prisma/schema.prisma path/to/your/output/zodSchema.tsFeatures
- Conversion of Prisma model fields to their respective Zod types.
- Conversion of Prisma enums to Zod unions.
- Type-safe Zod schema generation.
- Sorted Zod schema output.
Testing
To run the tests:
yarn testFor watch mode:
yarn test:watchLicense
prisma-zodifier is available under the MIT license. See the LICENSE file for more info.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago