New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@brakebein/prisma-generator-nestjs-dto

Package Overview
Dependencies
Maintainers
1
Versions
62
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.21.0-beta to 1.21.0

2

dist/generator/annotations.d.ts

@@ -6,2 +6,3 @@ export declare const DTO_IGNORE_MODEL: RegExp;

export declare const DTO_ENTITY_HIDDEN: RegExp;
export declare const DTO_CONNECT_HIDDEN: RegExp;
export declare const DTO_API_HIDDEN: RegExp;

@@ -24,2 +25,1 @@ export declare const DTO_CREATE_OPTIONAL: RegExp;

export declare const DTO_UPDATE_VALIDATE_IF: RegExp;
export declare const DTO_IGNORE_ON_CONNECT: RegExp;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DTO_IGNORE_ON_CONNECT = exports.DTO_UPDATE_VALIDATE_IF = exports.DTO_CREATE_VALIDATE_IF = exports.DTO_CAST_TYPE = exports.DTO_TYPE_FULL_UPDATE = exports.DTO_RELATION_MODIFIERS_ON_UPDATE = exports.DTO_RELATION_MODIFIERS_ON_CREATE = exports.DTO_RELATION_MODIFIERS = exports.DTO_RELATION_CAN_DISCONNECT_ON_UPDATE = exports.DTO_RELATION_CAN_CONNECT_ON_UPDATE = exports.DTO_RELATION_CAN_CREATE_ON_UPDATE = exports.DTO_RELATION_CAN_CONNECT_ON_CREATE = exports.DTO_RELATION_CAN_CREATE_ON_CREATE = exports.DTO_RELATION_INCLUDE_ID = exports.DTO_RELATION_REQUIRED = exports.DTO_UPDATE_OPTIONAL = exports.DTO_CREATE_OPTIONAL = exports.DTO_API_HIDDEN = exports.DTO_ENTITY_HIDDEN = exports.DTO_UPDATE_HIDDEN = exports.DTO_CREATE_HIDDEN = exports.DTO_READ_ONLY = exports.DTO_IGNORE_MODEL = void 0;
exports.DTO_UPDATE_VALIDATE_IF = exports.DTO_CREATE_VALIDATE_IF = exports.DTO_CAST_TYPE = exports.DTO_TYPE_FULL_UPDATE = exports.DTO_RELATION_MODIFIERS_ON_UPDATE = exports.DTO_RELATION_MODIFIERS_ON_CREATE = exports.DTO_RELATION_MODIFIERS = exports.DTO_RELATION_CAN_DISCONNECT_ON_UPDATE = exports.DTO_RELATION_CAN_CONNECT_ON_UPDATE = exports.DTO_RELATION_CAN_CREATE_ON_UPDATE = exports.DTO_RELATION_CAN_CONNECT_ON_CREATE = exports.DTO_RELATION_CAN_CREATE_ON_CREATE = exports.DTO_RELATION_INCLUDE_ID = exports.DTO_RELATION_REQUIRED = exports.DTO_UPDATE_OPTIONAL = exports.DTO_CREATE_OPTIONAL = exports.DTO_API_HIDDEN = exports.DTO_CONNECT_HIDDEN = exports.DTO_ENTITY_HIDDEN = exports.DTO_UPDATE_HIDDEN = exports.DTO_CREATE_HIDDEN = exports.DTO_READ_ONLY = exports.DTO_IGNORE_MODEL = void 0;
exports.DTO_IGNORE_MODEL = /@DtoIgnoreModel/;

@@ -9,2 +9,3 @@ exports.DTO_READ_ONLY = /@DtoReadOnly/;

exports.DTO_ENTITY_HIDDEN = /@DtoEntityHidden/;
exports.DTO_CONNECT_HIDDEN = /@DtoConnectHidden/;
exports.DTO_API_HIDDEN = /@DtoApiHidden/;

@@ -39,2 +40,1 @@ exports.DTO_CREATE_OPTIONAL = /@DtoCreateOptional/;

exports.DTO_UPDATE_VALIDATE_IF = /@DtoUpdateValidateIf/;
exports.DTO_IGNORE_ON_CONNECT = /@DtoIgnoreOnConnect/;

@@ -14,4 +14,4 @@ "use strict";

const classValidators = [];
const idFields = model.fields.filter((field) => !(0, field_classifiers_1.isAnnotatedWith)(field, annotations_1.DTO_IGNORE_ON_CONNECT) && (0, field_classifiers_1.isId)(field));
const isUniqueFields = model.fields.filter((field) => !(0, field_classifiers_1.isAnnotatedWith)(field, annotations_1.DTO_IGNORE_ON_CONNECT) && (0, field_classifiers_1.isUnique)(field));
const idFields = model.fields.filter((field) => !(0, field_classifiers_1.isAnnotatedWith)(field, annotations_1.DTO_CONNECT_HIDDEN) && (0, field_classifiers_1.isId)(field));
const isUniqueFields = model.fields.filter((field) => !(0, field_classifiers_1.isAnnotatedWith)(field, annotations_1.DTO_CONNECT_HIDDEN) && (0, field_classifiers_1.isUnique)(field));
const uniqueCompoundFields = model.uniqueIndexes;

@@ -18,0 +18,0 @@ if (model.primaryKey)

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

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

@@ -106,2 +106,3 @@ # Prisma Generator NestJS DTO

| `@DtoEntityHidden` | omits field in `Entity` |
| `@DtoConnectHidden` | omits field in `ConnectDto` (applies to `@id` and `@unique` fields) |
| `@DtoApiHidden` | adds `@ApiHideProperty` decorator to hide field in documentation, class validation remains untouched |

@@ -120,3 +121,3 @@ | `@DtoCreateOptional` | adds field **optionally** to `CreateDTO` - useful for fields that would otherwise be omitted (e.g. `@id`, `@updatedAt`) |

| `@DtoCreateValidateIf(...)` | adds @ValidateIf(...) decorator for field in `CreateDTO` (for [conditional validation](https://github.com/typestack/class-validator#conditional-validation) by class-validator) | |
| `@DtoUpdateValidateIf(...)` | adds @ValidateIf(...) decorator for field in `UpdateDTO` (for [conditional validation](https://github.com/typestack/class-validator#conditional-validation) by class-validator) |
| `@DtoUpdateValidateIf(...)` | adds @ValidateIf(...) decorator for field in `UpdateDTO` (for [conditional validation](https://github.com/typestack/class-validator#conditional-validation) by class-validator) |
### Schema Object annotations

@@ -123,0 +124,0 @@

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