prismabox 1.1.26 is a Prisma generator that produces Typebox schemas from your Prisma schema, generating plain, relation, composite, and Prisma query input types (Where, OrderBy, Include, Select). It supports annotations for hiding fields/models, overriding types, and passing Typebox options. The generator does not support MongoDB composite types. Compared to alternatives like prisma-typebox or graphql-typebox, prismabox is focused solely on Typebox and offers a broad set of generated types for Prisma queries.
npm install prismaboxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Setup prismabox in a Prisma project, generate Typebox schemas, and validate data against a generated model schema.
Avoid using composite types in Prisma schema if using prismabox with MongoDB.
Add `additionalProperties = true` to the prismabox generator block in schema.prisma.
Place each annotation on its own line in the Prisma schema comment block.
Use `@prismabox.hide` instead of `@prismabox.hidden`.
Ensure `prisma generate` ran successfully and adjust import path to match the configured `output` directory (default './prismabox').
Install prismabox as a dev dependency: `npm i -D prismabox` and verify it's listed in `package.json`.
Use `Type.Check(schema, data)` where `schema` is a Typebox schema like `Post`.
Use annotation `@prismabox.options` with valid JSON/JS syntax: `@prismabox.options{ min: 10, max: 20 }`.