File tree Expand file tree Collapse file tree 6 files changed +17
-54
lines changed
Expand file tree Collapse file tree 6 files changed +17
-54
lines changed Original file line number Diff line number Diff line change 5656 "@seedcompany/cache" : " ^4.0.1" ,
5757 "@seedcompany/common" : " ^1.3.0" ,
5858 "@seedcompany/data-loader" : " ^3.0.0" ,
59- "@seedcompany/nest" : " ^2.2.5 " ,
59+ "@seedcompany/nest" : " ^2.2.6 " ,
6060 "@seedcompany/nestjs-email" : " ^6.0.0" ,
6161 "@seedcompany/scripture" : " ^1.0.0" ,
6262 "argon2" : " ^0.43.0" ,
Original file line number Diff line number Diff line change 1- import { Injectable , type PipeTransform } from '@nestjs/common' ;
1+ import { Injectable , type PipeTransform , ValidationPipe } from '@nestjs/common' ;
22import { Args , ArgsType } from '@nestjs/graphql' ;
33import { type ID , IdField , type ObjectView } from '~/common' ;
4- import { ValidationPipe } from '~/core/validation' ;
54
65/**
76 * A helper for id & changeset arguments.
Original file line number Diff line number Diff line change 11export * from './validation.exception' ;
2- export * from './validation.pipe' ;
Original file line number Diff line number Diff line change 11import { Module } from '@nestjs/common' ;
2- import { APP_PIPE } from '@nestjs/core' ;
3- import { Validator } from 'class-validator' ;
2+ import { ValidatorModule } from '@seedcompany/nest' ;
43import {
54 ValidateIdPipe ,
65 ValidIdConstraint ,
76} from '~/common/validators/short-id.validator' ;
8- import { ValidationPipe } from './validation.pipe ' ;
7+ import { ValidationException } from './validation.exception ' ;
98
109@Module ( {
11- providers : [
12- Validator ,
13- ValidationPipe ,
14- { provide : APP_PIPE , useExisting : ValidationPipe } ,
15- ValidIdConstraint ,
16- ValidateIdPipe ,
10+ imports : [
11+ ValidatorModule . register ( {
12+ transform : true ,
13+ skipMissingProperties : true ,
14+ exceptionFactory : ( es ) => new ValidationException ( es ) ,
15+ } ) ,
1716 ] ,
18- exports : [ ValidationPipe , ValidateIdPipe ] ,
17+ providers : [ ValidIdConstraint , ValidateIdPipe ] ,
18+ exports : [ ValidatorModule , ValidateIdPipe ] ,
1919} )
2020export class ValidationModule { }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3839,9 +3839,9 @@ __metadata:
38393839 languageName: node
38403840 linkType: hard
38413841
3842- "@seedcompany/nest@npm:^2.2.5 ":
3843- version: 2.2.5
3844- resolution: "@seedcompany/nest@npm:2.2.5 "
3842+ "@seedcompany/nest@npm:^2.2.6 ":
3843+ version: 2.2.6
3844+ resolution: "@seedcompany/nest@npm:2.2.6 "
38453845 dependencies:
38463846 "@graphql-yoga/redis-event-target": "npm:^3.0.3"
38473847 "@graphql-yoga/typed-event-target": "npm:^3.0.2"
@@ -3862,7 +3862,7 @@ __metadata:
38623862 class-transformer: ^0.5.1
38633863 class-validator: ^0.14.0
38643864 reflect-metadata: ^0.1.12 || ^0.2.0
3865- checksum: 10c0/46f576c3d9e22361b49db7b18f19fca3925f219515534382eb53e0253bbb435efabfd967a494374d941a1affc210ca6015b55331881bd51b6ff701a755bbfb9b
3865+ checksum: 10c0/1ec05505b77dbd198679c8d559343b840b477343f7d3b462459101984bc23a8295b5cd25eb50993b2dc685b835a696b938b4a02d3936b4bdf50369e982bac629
38663866 languageName: node
38673867 linkType: hard
38683868
@@ -6708,7 +6708,7 @@ __metadata:
67086708 "@seedcompany/common": "npm:^1.3.0"
67096709 "@seedcompany/data-loader": "npm:^3.0.0"
67106710 "@seedcompany/eslint-plugin": "npm:^3.4.1"
6711- "@seedcompany/nest": "npm:^2.2.5 "
6711+ "@seedcompany/nest": "npm:^2.2.6 "
67126712 "@seedcompany/nestjs-email": "npm:^6.0.0"
67136713 "@seedcompany/scripture": "npm:^1.0.0"
67146714 "@tsconfig/strictest": "npm:^2.0.2"
You can’t perform that action at this time.
0 commit comments