
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@kuatsu/prisma-generator-ts-enums
Advanced tools
Automatically generates pure TypeScript enums from the enums in your Prisma schema.
Automatically generates pure TypeScript enums from the enums in your Prisma schema.
If you're like us and love both monorepos and Prisma, you might run into some trouble when trying to use the native Prisma-generated enums from @prisma/client
in other apps. For example, this often becomes an issue with React Native / Expo apps that won't correctly run due to it not finding the enums at runtime. Using this generator, you can bypass those issues by generating native TypeScript enums from your Prisma schema.
First, install the package.
$ npm install @kuatsu/prisma-generator-ts-enums
or
$ yarn add @kuatsu/prisma-generator-ts-enums
Add the generator to your schema.
generator enum {
provider = "node node_modules/@kuatsu/prisma-generator-ts-enums" // specify the path to this generator here
output = "./enums/index.d.ts" // optionally, you can specify an output filename here -- default is ./types/enums.d.ts
}
Finally, run npx prisma generate
or yarn prisma generate
and a TypeScript definition file with your enums will be generated in the configured output
path.
To see an example, check out the Prisma schema in the prisma
directory and the generated enums in the prisma/types
directory.
FAQs
Automatically generates pure TypeScript enums from the enums in your Prisma schema.
We found that @kuatsu/prisma-generator-ts-enums demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.