From e269a809df74f19ac8ab524ff557ee26be26d2f5 Mon Sep 17 00:00:00 2001 From: Andrew Ghostuhin Date: Fri, 13 Sep 2024 00:26:58 +0300 Subject: [PATCH] feat(validation): init package --- .pnp.cjs | 161 ++++++++++++++++++ packages/nestjs-validation/package.json | 47 +++++ .../nestjs-validation/src/errors/index.ts | 1 + .../src/errors/validation.error.ts | 9 + packages/nestjs-validation/src/index.ts | 3 + .../nestjs-validation/src/module/index.ts | 1 + .../src/module/validation.module.ts | 26 +++ .../nestjs-validation/src/validator/index.ts | 1 + .../src/validator/validator.ts | 24 +++ yarn.lock | 110 +++++++++++- 10 files changed, 382 insertions(+), 1 deletion(-) create mode 100644 packages/nestjs-validation/package.json create mode 100644 packages/nestjs-validation/src/errors/index.ts create mode 100644 packages/nestjs-validation/src/errors/validation.error.ts create mode 100644 packages/nestjs-validation/src/index.ts create mode 100644 packages/nestjs-validation/src/module/index.ts create mode 100644 packages/nestjs-validation/src/module/validation.module.ts create mode 100644 packages/nestjs-validation/src/validator/index.ts create mode 100644 packages/nestjs-validation/src/validator/validator.ts diff --git a/.pnp.cjs b/.pnp.cjs index 99a9669e..db3195c0 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -81,6 +81,10 @@ const RAW_RUNTIME_STATE = {\ "name": "@atls/nestjs-typesense-typeorm",\ "reference": "workspace:packages/nestjs-typesense-typeorm"\ + },\ + {\ + "name": "@atls/nestjs-validation",\ + "reference": "workspace:packages/nestjs-validation"\ }\ ],\ "enableTopLevelFallback": true,\ @@ -103,6 +107,7 @@ const RAW_RUNTIME_STATE = ["@atls/nestjs-typeorm-seeding", ["workspace:packages/nestjs-typeorm-seeding"]],\ ["@atls/nestjs-typesense", ["virtual:084046633b9e7ae3480afb238e14edfec9426b631126ce31d204d664b2eaf2dd2c2c5ef9a4d5ee9cdc10a0b796d57bd90ef5416ebdadd91ed67409da21b59a10#workspace:packages/nestjs-typesense", "workspace:packages/nestjs-typesense"]],\ ["@atls/nestjs-typesense-typeorm", ["workspace:packages/nestjs-typesense-typeorm"]],\ + ["@atls/nestjs-validation", ["workspace:packages/nestjs-validation"]],\ ["nestjs", ["workspace:."]]\ ],\ "fallbackPool": [\ @@ -913,6 +918,21 @@ const RAW_RUNTIME_STATE = "linkType": "SOFT"\ }]\ ]],\ + ["@atls/nestjs-validation", [\ + ["workspace:packages/nestjs-validation", {\ + "packageLocation": "./packages/nestjs-validation/",\ + "packageDependencies": [\ + ["@atls/nestjs-validation", "workspace:packages/nestjs-validation"],\ + ["@nestjs/common", "virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1"],\ + ["@nestjs/core", "virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1"],\ + ["class-transformer", "npm:0.5.1"],\ + ["class-validator", "npm:0.14.1"],\ + ["reflect-metadata", "npm:0.1.13"],\ + ["rxjs", "npm:7.8.1"]\ + ],\ + "linkType": "SOFT"\ + }]\ + ]],\ ["@atls/typeorm-seeding", [\ ["npm:0.0.3", {\ "packageLocation": "../.yarn/berry/cache/@atls-typeorm-seeding-npm-0.0.3-8dc1d449e3-10c0.zip/node_modules/@atls/typeorm-seeding/",\ @@ -3781,6 +3801,13 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@nestjs/common", [\ + ["npm:10.4.1", {\ + "packageLocation": "../.yarn/berry/cache/@nestjs-common-npm-10.4.1-940734b1b1-10c0.zip/node_modules/@nestjs/common/",\ + "packageDependencies": [\ + ["@nestjs/common", "npm:10.4.1"]\ + ],\ + "linkType": "SOFT"\ + }],\ ["patch:@nestjs/common@npm%3A10.2.5#~/.yarn/patches/@nestjs-common-npm-10.2.5-816dceeade.patch::version=10.2.5&hash=b1d2d6", {\ "packageLocation": "../.yarn/berry/cache/@nestjs-common-patch-f8ca3846b9-10c0.zip/node_modules/@nestjs/common/",\ "packageDependencies": [\ @@ -3961,6 +3988,35 @@ const RAW_RUNTIME_STATE = "rxjs"\ ],\ "linkType": "HARD"\ + }],\ + ["virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1", {\ + "packageLocation": "./.yarn/__virtual__/@nestjs-common-virtual-dfaf074a50/2/.yarn/berry/cache/@nestjs-common-npm-10.4.1-940734b1b1-10c0.zip/node_modules/@nestjs/common/",\ + "packageDependencies": [\ + ["@nestjs/common", "virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1"],\ + ["@grpc/proto-loader", "npm:0.7.10"],\ + ["@types/class-transformer", null],\ + ["@types/class-validator", null],\ + ["@types/reflect-metadata", null],\ + ["@types/rxjs", null],\ + ["class-transformer", "npm:0.5.1"],\ + ["class-validator", "npm:0.14.1"],\ + ["iterare", "npm:1.2.1"],\ + ["reflect-metadata", "npm:0.1.13"],\ + ["rxjs", "npm:7.8.1"],\ + ["tslib", "npm:2.6.3"],\ + ["uid", "npm:2.0.2"]\ + ],\ + "packagePeers": [\ + "@types/class-transformer",\ + "@types/class-validator",\ + "@types/reflect-metadata",\ + "@types/rxjs",\ + "class-transformer",\ + "class-validator",\ + "reflect-metadata",\ + "rxjs"\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@nestjs/core", [\ @@ -3971,6 +4027,13 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ + ["npm:10.4.1", {\ + "packageLocation": "./.yarn/unplugged/@nestjs-core-virtual-daa1fcb7b0/node_modules/@nestjs/core/",\ + "packageDependencies": [\ + ["@nestjs/core", "npm:10.4.1"]\ + ],\ + "linkType": "SOFT"\ + }],\ ["virtual:0bc3504934a30fca5775db1c73a91864628f7965ab6dd1fddc21cd16addcd821c36580c256d09baa307a7c821a87e6afc774b3c7c84ecf4ca215862f2bb0a0f3#npm:10.2.5", {\ "packageLocation": "./.yarn/unplugged/@nestjs-core-virtual-2b98dcd0a1/node_modules/@nestjs/core/",\ "packageDependencies": [\ @@ -4275,6 +4338,44 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ + ["virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1", {\ + "packageLocation": "./.yarn/unplugged/@nestjs-core-virtual-daa1fcb7b0/node_modules/@nestjs/core/",\ + "packageDependencies": [\ + ["@nestjs/core", "virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1"],\ + ["@nestjs/common", "virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1"],\ + ["@nestjs/microservices", null],\ + ["@nestjs/platform-express", "virtual:daa1fcb7b092e328f903198d173b9dd287767693a065b4fe0abfc4e5c2ec2ebfcc38d93d8faf7b2c80bef0bcb1ef44a9cb98ee59ff335accbc73c4319ef67916#npm:7.6.15"],\ + ["@nestjs/websockets", null],\ + ["@nuxtjs/opencollective", "npm:0.3.2"],\ + ["@types/nestjs__common", null],\ + ["@types/nestjs__microservices", null],\ + ["@types/nestjs__platform-express", null],\ + ["@types/nestjs__websockets", null],\ + ["@types/reflect-metadata", null],\ + ["@types/rxjs", null],\ + ["fast-safe-stringify", "npm:2.1.1"],\ + ["iterare", "npm:1.2.1"],\ + ["path-to-regexp", "npm:3.2.0"],\ + ["reflect-metadata", "npm:0.1.13"],\ + ["rxjs", "npm:7.8.1"],\ + ["tslib", "npm:2.6.3"],\ + ["uid", "npm:2.0.2"]\ + ],\ + "packagePeers": [\ + "@nestjs/common",\ + "@nestjs/microservices",\ + "@nestjs/websockets",\ + "@types/nestjs__common",\ + "@types/nestjs__microservices",\ + "@types/nestjs__platform-express",\ + "@types/nestjs__websockets",\ + "@types/reflect-metadata",\ + "@types/rxjs",\ + "reflect-metadata",\ + "rxjs"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:ec8981ecaea40e2febae31b46ac73d9116df8c03ad650498e32a27b7067b620948a688dd82750726a2a222ea50e5d2539eb56777a3aebd27de3e0b0824c9aa23#npm:10.2.5", {\ "packageLocation": "./.yarn/unplugged/@nestjs-core-virtual-ae02c16012/node_modules/@nestjs/core/",\ "packageDependencies": [\ @@ -5169,6 +5270,28 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ + ["virtual:daa1fcb7b092e328f903198d173b9dd287767693a065b4fe0abfc4e5c2ec2ebfcc38d93d8faf7b2c80bef0bcb1ef44a9cb98ee59ff335accbc73c4319ef67916#npm:7.6.15", {\ + "packageLocation": "./.yarn/__virtual__/@nestjs-platform-express-virtual-f92fbadbc8/2/.yarn/berry/cache/@nestjs-platform-express-npm-7.6.15-44f82e81dd-10c0.zip/node_modules/@nestjs/platform-express/",\ + "packageDependencies": [\ + ["@nestjs/platform-express", "virtual:daa1fcb7b092e328f903198d173b9dd287767693a065b4fe0abfc4e5c2ec2ebfcc38d93d8faf7b2c80bef0bcb1ef44a9cb98ee59ff335accbc73c4319ef67916#npm:7.6.15"],\ + ["@nestjs/common", "virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1"],\ + ["@nestjs/core", "virtual:82c048b5d29d98effb158530a6945e2dff634e60027727e8e466d7eb17aae4f7dab78b4f8b6e9b66564a6323d8f832ee9648588d0bee432ff101abcba1b0b492#npm:10.4.1"],\ + ["@types/nestjs__common", null],\ + ["@types/nestjs__core", null],\ + ["body-parser", "npm:1.19.0"],\ + ["cors", "npm:2.8.5"],\ + ["express", "npm:4.17.1"],\ + ["multer", "npm:1.4.2"],\ + ["tslib", "npm:2.1.0"]\ + ],\ + "packagePeers": [\ + "@nestjs/common",\ + "@nestjs/core",\ + "@types/nestjs__common",\ + "@types/nestjs__core"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:e1d53bca32113b9b678cb34fee73c6903fe94930472c2feac6e5941e18d1204fc76ff408c84928c48083e93fe018799297209c7cab657516de447a6875b58c59#npm:7.6.15", {\ "packageLocation": "./.yarn/__virtual__/@nestjs-platform-express-virtual-41d7b74e1c/2/.yarn/berry/cache/@nestjs-platform-express-npm-7.6.15-44f82e81dd-10c0.zip/node_modules/@nestjs/platform-express/",\ "packageDependencies": [\ @@ -6917,6 +7040,13 @@ const RAW_RUNTIME_STATE = ["@types/validator", "npm:13.11.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:13.12.1", {\ + "packageLocation": "../.yarn/berry/cache/@types-validator-npm-13.12.1-ad8574e07b-10c0.zip/node_modules/@types/validator/",\ + "packageDependencies": [\ + ["@types/validator", "npm:13.12.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@types/ws", [\ @@ -9175,6 +9305,16 @@ const RAW_RUNTIME_STATE = ["validator", "npm:13.7.0"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.14.1", {\ + "packageLocation": "../.yarn/berry/cache/class-validator-npm-0.14.1-f0ce3b1130-10c0.zip/node_modules/class-validator/",\ + "packageDependencies": [\ + ["class-validator", "npm:0.14.1"],\ + ["@types/validator", "npm:13.12.1"],\ + ["libphonenumber-js", "npm:1.11.8"],\ + ["validator", "npm:13.12.0"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["clean-stack", [\ @@ -13944,6 +14084,13 @@ const RAW_RUNTIME_STATE = ["libphonenumber-js", "npm:1.10.41"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:1.11.8", {\ + "packageLocation": "../.yarn/berry/cache/libphonenumber-js-npm-1.11.8-28e2f34409-10c0.zip/node_modules/libphonenumber-js/",\ + "packageDependencies": [\ + ["libphonenumber-js", "npm:1.11.8"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["limiter", [\ @@ -17597,6 +17744,13 @@ const RAW_RUNTIME_STATE = ["tslib", "npm:2.6.2"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:2.6.3", {\ + "packageLocation": "../.yarn/berry/cache/tslib-npm-2.6.3-0fd136b3be-10c0.zip/node_modules/tslib/",\ + "packageDependencies": [\ + ["tslib", "npm:2.6.3"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["tsutils", [\ @@ -18306,6 +18460,13 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["validator", [\ + ["npm:13.12.0", {\ + "packageLocation": "../.yarn/berry/cache/validator-npm-13.12.0-6c8a423cbf-10c0.zip/node_modules/validator/",\ + "packageDependencies": [\ + ["validator", "npm:13.12.0"]\ + ],\ + "linkType": "HARD"\ + }],\ ["npm:13.7.0", {\ "packageLocation": "../.yarn/berry/cache/validator-npm-13.7.0-624277e841-10c0.zip/node_modules/validator/",\ "packageDependencies": [\ diff --git a/packages/nestjs-validation/package.json b/packages/nestjs-validation/package.json new file mode 100644 index 00000000..68acc893 --- /dev/null +++ b/packages/nestjs-validation/package.json @@ -0,0 +1,47 @@ +{ + "name": "@atls/nestjs-validation", + "version": "0.0.0", + "license": "BSD-3-Clause", + "type": "module", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "main": "src/index.ts", + "files": [ + "dist" + ], + "scripts": { + "build": "yarn library build", + "prepack": "yarn run build", + "postpack": "rm -rf dist" + }, + "devDependencies": { + "@nestjs/common": "^10.0.5", + "@nestjs/core": "^10.0.5", + "class-transformer": "0.5.1", + "class-validator": "^0.14.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "peerDependencies": { + "@nestjs/common": "^10", + "@nestjs/core": "^10", + "class-transformer": "0.5", + "class-validator": "^0.14", + "reflect-metadata": "^0.1", + "rxjs": "^7" + }, + "publishConfig": { + "exports": { + "./package.json": "./package.json", + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "main": "dist/index.js", + "typings": "dist/index.d.ts" + } +} diff --git a/packages/nestjs-validation/src/errors/index.ts b/packages/nestjs-validation/src/errors/index.ts new file mode 100644 index 00000000..43c04134 --- /dev/null +++ b/packages/nestjs-validation/src/errors/index.ts @@ -0,0 +1 @@ +export * from './validation.error.js' diff --git a/packages/nestjs-validation/src/errors/validation.error.ts b/packages/nestjs-validation/src/errors/validation.error.ts new file mode 100644 index 00000000..7cea67b6 --- /dev/null +++ b/packages/nestjs-validation/src/errors/validation.error.ts @@ -0,0 +1,9 @@ +import type { ValidationError as VError } from 'class-validator' + +export class ValidationError extends Error { + constructor(public readonly errors: Array) { + super() + + this.message = 'Validation failed' + } +} diff --git a/packages/nestjs-validation/src/index.ts b/packages/nestjs-validation/src/index.ts new file mode 100644 index 00000000..ade17d36 --- /dev/null +++ b/packages/nestjs-validation/src/index.ts @@ -0,0 +1,3 @@ +export * from './validator/index.js' +export * from './module/index.js' +export * from './errors/index.js' diff --git a/packages/nestjs-validation/src/module/index.ts b/packages/nestjs-validation/src/module/index.ts new file mode 100644 index 00000000..c649e0db --- /dev/null +++ b/packages/nestjs-validation/src/module/index.ts @@ -0,0 +1 @@ +export * from './validation.module.js' diff --git a/packages/nestjs-validation/src/module/validation.module.ts b/packages/nestjs-validation/src/module/validation.module.ts new file mode 100644 index 00000000..15840b85 --- /dev/null +++ b/packages/nestjs-validation/src/module/validation.module.ts @@ -0,0 +1,26 @@ +import type { DynamicModule } from '@nestjs/common' + +import { Module } from '@nestjs/common' + +import { Validator } from '../validator/index.js' + +@Module({}) +export class ValidationModule { + static register(): DynamicModule { + return { + module: ValidationModule, + providers: [ + { + provide: Validator, + useClass: Validator, + }, + ], + exports: [ + { + provide: Validator, + useClass: Validator, + }, + ], + } + } +} diff --git a/packages/nestjs-validation/src/validator/index.ts b/packages/nestjs-validation/src/validator/index.ts new file mode 100644 index 00000000..2bec90cd --- /dev/null +++ b/packages/nestjs-validation/src/validator/index.ts @@ -0,0 +1 @@ +export * from './validator.js' diff --git a/packages/nestjs-validation/src/validator/validator.ts b/packages/nestjs-validation/src/validator/validator.ts new file mode 100644 index 00000000..ae3b4b72 --- /dev/null +++ b/packages/nestjs-validation/src/validator/validator.ts @@ -0,0 +1,24 @@ +import type { ClassConstructor } from 'class-transformer' + +import { plainToInstance } from 'class-transformer' +import { validate } from 'class-validator' + +import { ValidationError } from '../errors/index.js' + +export class Validator { + async transform(metatype: ClassConstructor, value: object): Promise { + return plainToInstance(metatype, value) as T + } + + async validate(valueOrObject: object, metatype?: ClassConstructor): Promise { + const transformed = metatype ? await this.transform(metatype, valueOrObject) : valueOrObject + + const errors = await validate(transformed as object) + + if (errors.length > 0) { + throw new ValidationError(errors) + } + + return transformed as T + } +} diff --git a/yarn.lock b/yarn.lock index 488909c4..e936744d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -674,6 +674,26 @@ __metadata: languageName: unknown linkType: soft +"@atls/nestjs-validation@workspace:packages/nestjs-validation": + version: 0.0.0-use.local + resolution: "@atls/nestjs-validation@workspace:packages/nestjs-validation" + dependencies: + "@nestjs/common": "npm:^10.0.5" + "@nestjs/core": "npm:^10.0.5" + class-transformer: "npm:0.5.1" + class-validator: "npm:^0.14.0" + reflect-metadata: "npm:^0.1.13" + rxjs: "npm:^7.8.1" + peerDependencies: + "@nestjs/common": ^10 + "@nestjs/core": ^10 + class-transformer: 0.5 + class-validator: ^0.14 + reflect-metadata: ^0.1 + rxjs: ^7 + languageName: unknown + linkType: soft + "@atls/typeorm-seeding@npm:0.0.3": version: 0.0.3 resolution: "@atls/typeorm-seeding@npm:0.0.3" @@ -2445,6 +2465,27 @@ __metadata: languageName: node linkType: hard +"@nestjs/common@npm:^10.0.5": + version: 10.4.1 + resolution: "@nestjs/common@npm:10.4.1" + dependencies: + iterare: "npm:1.2.1" + tslib: "npm:2.6.3" + uid: "npm:2.0.2" + peerDependencies: + class-transformer: "*" + class-validator: "*" + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + class-transformer: + optional: true + class-validator: + optional: true + checksum: 10c0/4b624893ad55f9fcf8638eca045d09dd091a8be2cd5061988e3a479178f95b9517aaa7c51ce136801d8b87bfe1494cd198dc0a68630bb8bcba100044915736e7 + languageName: node + linkType: hard + "@nestjs/common@patch:@nestjs/common@npm%3A10.2.5#~/.yarn/patches/@nestjs-common-npm-10.2.5-816dceeade.patch": version: 10.2.5 resolution: "@nestjs/common@patch:@nestjs/common@npm%3A10.2.5#~/.yarn/patches/@nestjs-common-npm-10.2.5-816dceeade.patch::version=10.2.5&hash=b1d2d6" @@ -2494,6 +2535,34 @@ __metadata: languageName: node linkType: hard +"@nestjs/core@npm:^10.0.5": + version: 10.4.1 + resolution: "@nestjs/core@npm:10.4.1" + dependencies: + "@nuxtjs/opencollective": "npm:0.3.2" + fast-safe-stringify: "npm:2.1.1" + iterare: "npm:1.2.1" + path-to-regexp: "npm:3.2.0" + tslib: "npm:2.6.3" + uid: "npm:2.0.2" + peerDependencies: + "@nestjs/common": ^10.0.0 + "@nestjs/microservices": ^10.0.0 + "@nestjs/platform-express": ^10.0.0 + "@nestjs/websockets": ^10.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + "@nestjs/microservices": + optional: true + "@nestjs/platform-express": + optional: true + "@nestjs/websockets": + optional: true + checksum: 10c0/57be2fc7617041558e90a92ec7c6f1011ed2bab8bfe5c5c02db5f5a03115e5e7347c06be0117767ce7d6c748fbe81ff075fc50190c998d30bbf25fd20e6f4ab8 + languageName: node + linkType: hard + "@nestjs/graphql@npm:12.0.10": version: 12.0.10 resolution: "@nestjs/graphql@npm:12.0.10" @@ -3785,6 +3854,13 @@ __metadata: languageName: node linkType: hard +"@types/validator@npm:^13.11.8": + version: 13.12.1 + resolution: "@types/validator@npm:13.12.1" + checksum: 10c0/473b12e287f569e08741c24d4d91663e740ec6264032eeb311c21c8f00dfa274c6fe5af9190ffe1b4b527e95a1bb31c81598682d5dbd76e1604f898bc19adc2b + languageName: node + linkType: hard + "@types/validator@npm:^13.7.10": version: 13.11.1 resolution: "@types/validator@npm:13.11.1" @@ -5532,6 +5608,17 @@ __metadata: languageName: node linkType: hard +"class-validator@npm:^0.14.0": + version: 0.14.1 + resolution: "class-validator@npm:0.14.1" + dependencies: + "@types/validator": "npm:^13.11.8" + libphonenumber-js: "npm:^1.10.53" + validator: "npm:^13.9.0" + checksum: 10c0/946e914e47548b5081449c720ea6a4877bac63dc960e14fca4b990b56e64efe3802d12f07ec22d6420c290245b72ea2d646939239f2a3b597794e6c4c2a4f2ae + languageName: node + linkType: hard + "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -9503,6 +9590,13 @@ __metadata: languageName: node linkType: hard +"libphonenumber-js@npm:^1.10.53": + version: 1.11.8 + resolution: "libphonenumber-js@npm:1.11.8" + checksum: 10c0/6128c25429b4d01dd60d668084d6015cf56f798e464ad625e0abe28cf3d52f046966f0c6bd21295ba154170416e85ab674f436f7b0cc132bf82cfe16beab230c + languageName: node + linkType: hard + "limiter@npm:^1.1.5": version: 1.1.5 resolution: "limiter@npm:1.1.5" @@ -11467,7 +11561,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.8.1": +"rxjs@npm:7.8.1, rxjs@npm:^7.8.1": version: 7.8.1 resolution: "rxjs@npm:7.8.1" dependencies: @@ -12750,6 +12844,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.6.3": + version: 2.6.3 + resolution: "tslib@npm:2.6.3" + checksum: 10c0/2598aef53d9dbe711af75522464b2104724d6467b26a60f2bdac8297d2b5f1f6b86a71f61717384aa8fd897240467aaa7bcc36a0700a0faf751293d1331db39a + languageName: node + linkType: hard + "tslib@npm:^1.10.0, tslib@npm:^1.8.1, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -13265,6 +13366,13 @@ __metadata: languageName: node linkType: hard +"validator@npm:^13.9.0": + version: 13.12.0 + resolution: "validator@npm:13.12.0" + checksum: 10c0/21d48a7947c9e8498790550f56cd7971e0e3d724c73388226b109c1bac2728f4f88caddfc2f7ed4b076f9b0d004316263ac786a17e9c4edf075741200718cd32 + languageName: node + linkType: hard + "value-or-promise@npm:1.0.10": version: 1.0.10 resolution: "value-or-promise@npm:1.0.10"