Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brakebein/prisma-generator-nestjs-dto

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brakebein/prisma-generator-nestjs-dto - npm Package Compare versions

Comparing version 1.18.0 to 1.18.1

2

package.json
{
"name": "@brakebein/prisma-generator-nestjs-dto",
"description": "Generates DTO and Entity classes from Prisma Schema for NestJS",
"version": "1.18.0",
"version": "1.18.1",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": {

@@ -66,21 +66,21 @@ # Prisma Generator NestJS DTO

| Parameter | Default | Description |
|---------------------------------|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| output | `"../src/generated/nestjs-dto"` | output path relative to your `schema.prisma` file |
| outputToNestJsResourceStructure | `"false"` | writes `dto`s and `entities` to subfolders aligned with [NestJS CRUD generator](https://docs.nestjs.com/recipes/crud-generator). Resource module name is derived from lower-cased model name in `schema.prisma` |
| flatResourceStructure | `"false"` | If `outputToNestJsResourceStructure` is `true`, subfolders `dto`s and `entities` are created within the resource folder. Setting this to `true` will flatten the hierarchy. |
| exportRelationModifierClasses | `"true"` | Should extra classes generated for relationship field operations on DTOs be exported? |
| reExport | `false` | Should an index.ts be created for every folder? |
| createDtoPrefix | `"Create"` | phrase to prefix every `CreateDTO` class with |
| updateDtoPrefix | `"Update"` | phrase to prefix every `UpdateDTO` class with |
| dtoSuffix | `"Dto"` | phrase to suffix every `CreateDTO` and `UpdateDTO` class with |
| entityPrefix | `""` | phrase to prefix every `Entity` class with |
| entitySuffix | `""` | phrase to suffix every `Entity` class with |
| fileNamingStyle | `"camel"` | How to name generated files. Valid choices are `"camel"`, `"pascal"`, `"kebab"` and `"snake"`. |
| classValidation | `"false"` | Add validation decorators from `class-validator`. Not compatible with `noDependencies = "true"` and `outputType = "interface"`. |
| noDependencies | `"false"` | Any imports and decorators that are specific to NestJS and Prisma are omitted, such that there are no references to external dependencies. This is useful if you want to generate appropriate DTOs for the frontend. |
| outputType | `"class"` | Output the DTOs as `class` or as `interface`. `interface` should only be used to generate DTOs for the frontend. |
| definiteAssignmentAssertion | `"false"` | Add a definite assignment assertion operator `!` to required fields, which is required if `strict` and/or `strictPropertyInitialization` is set `true` in your tsconfig.json's `compilerOptions`. |
| requiredResponseApiProperty | `"true"` | If `false`, add `@ApiRequired({ required: false })` to response DTO properties. Otherwise, use `required` defaults always to `true` unless field is optional. |
| prettier | `"false"` | Stylize output files with prettier. |
| Parameter = default | Description |
|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `output = "../src/generated/nestjs-dto"` | output path relative to your `schema.prisma` file |
| <code>outputToNestJsResourceStructure&nbsp;=&nbsp;"false"</code> | writes `dto`s and `entities` to subfolders aligned with [NestJS CRUD generator](https://docs.nestjs.com/recipes/crud-generator). Resource module name is derived from lower-cased model name in `schema.prisma` |
| `flatResourceStructure = "false"` | If `outputToNestJsResourceStructure` is `true`, subfolders `dto`s and `entities` are created within the resource folder. Setting this to `true` will flatten the hierarchy. |
| `exportRelationModifierClasses = "true"` | Should extra classes generated for relationship field operations on DTOs be exported? |
| `reExport = "false"` | Should an index.ts be created for every folder? |
| `createDtoPrefix = "Create"` | phrase to prefix every `CreateDTO` class with |
| `updateDtoPrefix = "Update"` | phrase to prefix every `UpdateDTO` class with |
| `dtoSuffix = "Dto"` | phrase to suffix every `CreateDTO` and `UpdateDTO` class with |
| `entityPrefix = ""` | phrase to prefix every `Entity` class with |
| `entitySuffix = ""` | phrase to suffix every `Entity` class with |
| `fileNamingStyle = "camel"` | How to name generated files. Valid choices are `"camel"`, `"pascal"`, `"kebab"` and `"snake"`. |
| `classValidation = "false"` | Add validation decorators from `class-validator`. Not compatible with `noDependencies = "true"` and `outputType = "interface"`. |
| `noDependencies = "false"` | Any imports and decorators that are specific to NestJS and Prisma are omitted, such that there are no references to external dependencies. This is useful if you want to generate appropriate DTOs for the frontend. |
| `outputType = "class"` | Output the DTOs as `class` or as `interface`. `interface` should only be used to generate DTOs for the frontend. |
| `definiteAssignmentAssertion = "false"` | Add a definite assignment assertion operator `!` to required fields, which is required if `strict` and/or `strictPropertyInitialization` is set `true` in your tsconfig.json's `compilerOptions`. |
| `requiredResponseApiProperty = "true"` | If `false`, add `@ApiRequired({ required: false })` to response DTO properties. Otherwise, use `required` defaults always to `true` unless field is optional. |
| `prettier = "false"` | Stylize output files with prettier. |

@@ -87,0 +87,0 @@ ## Annotations

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc