Server/package.json
M1000fr b40249fdfb feat: Add class-transformer and class-validator packages
- Added "@nestjs/mapped-types" package to package.json
- Added "class-transformer" and "class-validator" packages to package.json
- Imported ValidationPipe from "@nestjs/common" in main.ts and added it as a global pipe
- Added validation decorators to CreateUserInput, SetUserPasswordInput, and UpdateUserInput classes
- Created UserController with create, findAll, and removeUser methods
- Updated UserEntity class with @Exclude decorator for password field
- Updated UserModule to include UserController
- Updated UserService to use class-transformer for mapping Prisma entities to UserEntity class
- Updated UserService to return UserEntity instances instead of Prisma entities
- Updated UserService to handle NotFoundException for setPassword and remove methods
2024-11-28 15:53:38 +01:00

54 lines
1.6 KiB
JSON

{
"name": "@toogether/server",
"version": "0.0.1",
"private": true,
"license": "Apache-2.0",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('You must use Yarn to install, not NPM')\""
},
"dependencies": {
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.3.0",
"@nestjs/core": "^10.0.0",
"@nestjs/jwt": "^10.2.0",
"@nestjs/mapped-types": "^2.0.6",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.4.11",
"@prisma/client": "5.22.0",
"axios": "^1.7.7",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"passport": "^0.7.0",
"passport-discord": "^0.1.4",
"passport-jwt": "^4.0.1",
"prisma": "^5.22.0",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@types/express": "^5.0.0",
"@types/node": "^20.3.1",
"@types/passport-discord": "^0.1.14",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
}
}