|
1 | | -# prismabox |
| 1 | +# @hyoretsu/prismabox |
2 | 2 | Generate versatile [typebox](https://github.com/sinclairzx81/typebox) schemes from your [prisma](https://github.com/prisma) schema. |
3 | 3 |
|
4 | 4 | > Currently does not support [mongoDB composite types](https://www.prisma.io/docs/orm/prisma-schema/data-model/models#defining-composite-types) |
5 | 5 |
|
6 | | -> Development is currently on hold, please see [here](https://github.com/m1212e/prismabox/issues/59) |
7 | | -
|
8 | 6 | Install it in your project, |
9 | 7 | ```bash |
10 | | -npm i -D prismabox |
11 | | -pnpm i -D prismabox |
12 | | -bun add -D prismabox |
| 8 | +npm i -D @hyoretsu/prismabox |
| 9 | +pnpm i -D @hyoretsu/prismabox |
| 10 | +bun add -D @hyoretsu/prismabox |
13 | 11 | ``` |
14 | 12 |
|
15 | 13 | then add |
@@ -46,7 +44,7 @@ Prismabox offers annotations to adjust the output of models and fields. |
46 | 44 | | @prismabox.create.input.hide | - | Hides the field or model from the outputs only in the input create model| |
47 | 45 | | @prismabox.update.input.hide | - | Hides the field or model from the outputs only in the input update model| |
48 | 46 | | @prismabox.options | @prismabox.options{ min: 10, max: 20 } | Uses the provided options for the field or model in the generated schema. Be careful to use valid JS/TS syntax! | |
49 | | -| @prismabox.typeOverwrite | @prismabox.typeOverwrite=Type.CustomName | Overwrite the type prismabox outputs for a field with a custom string. See [m1212e/prismabox#29](https://github.com/m1212e/prismabox/issues/29) for an extended usecase | |
| 47 | +| @prismabox.typeOverwrite | @prismabox.typeOverwrite=Type.CustomName | Overwrite the type prismabox outputs for a field with a custom string. See [hyoretsu/prismabox#29](https://github.com/hyoretsu/prismabox/issues/29) for an extended usecase | |
50 | 48 |
|
51 | 49 | > For a more detailed list of available annotations, please see [annotations.ts](src/annotations/annotations.ts) |
52 | 50 |
|
@@ -117,6 +115,6 @@ If enabled, the generator will additonally output more schemes for each model wh |
117 | 115 | ## Notes |
118 | 116 | ### `__nullable__` vs `Type.Optional` |
119 | 117 |
|
120 | | -Prismabox wraps nullable fields in a custom `__nullable__` method which allows `null` in addition to `undefined`. From the relevant [issue comment](https://github.com/m1212e/prismabox/issues/33#issuecomment-2708755442): |
| 118 | +Prismabox wraps nullable fields in a custom `__nullable__` method which allows `null` in addition to `undefined`. From the relevant [issue comment](https://github.com/hyoretsu/prismabox/issues/33#issuecomment-2708755442): |
121 | 119 | > prisma in some scenarios allows null OR undefined as types where optional only allows for undefined/is reflected as undefined in TS types |
122 | 120 |
|
0 commit comments