@lenne.tech/nest-server 10.8.11 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lenne.tech/nest-server",
3
- "version": "10.8.11",
3
+ "version": "11.0.0",
4
4
  "description": "Modern, fast, powerful Node.js web framework in TypeScript based on Nest with a GraphQL API and a connection to MongoDB (or other databases).",
5
5
  "keywords": [
6
6
  "node",
@@ -22,8 +22,8 @@
22
22
  "docs:ci": "ts-node ./scripts/init-server.ts && npm run docs:bootstrap && compodoc -p tsconfig.json",
23
23
  "format": "prettier --write 'src/**/*.ts'",
24
24
  "format:staged": "pretty-quick --staged",
25
- "lint": "eslint './src/**/*.{ts,js,vue}'",
26
- "lint:fix": "eslint './src/**/*.{ts,js,vue}' --fix",
25
+ "lint": "eslint '{src,apps,libs,test}/**/*.{ts,js}' --cache",
26
+ "lint:fix": "eslint '{src,apps,libs,test}/**/*.{ts,js}' --fix --cache",
27
27
  "prestart:prod": "npm run build",
28
28
  "reinit": "rimraf package-lock.json && rimraf node_modules && npm i && npm run lint && npm run test:e2e && npm run test:ci && npm run build",
29
29
  "reinit:clean": "rimraf package-lock.json && rimraf node_modules && npm cache clean --force && npm i && npm run test:e2e && npm run build",
@@ -65,21 +65,21 @@
65
65
  "node": ">= 20"
66
66
  },
67
67
  "dependencies": {
68
- "@apollo/gateway": "2.10.0",
68
+ "@apollo/gateway": "2.10.2",
69
69
  "@getbrevo/brevo": "1.0.1",
70
70
  "@lenne.tech/mongoose-gridfs": "1.4.2",
71
71
  "@lenne.tech/multer-gridfs-storage": "5.0.6",
72
- "@nestjs/apollo": "12.2.2",
73
- "@nestjs/common": "10.4.15",
74
- "@nestjs/core": "10.4.15",
75
- "@nestjs/graphql": "12.2.2",
76
- "@nestjs/jwt": "10.2.0",
77
- "@nestjs/mongoose": "10.1.0",
78
- "@nestjs/passport": "10.0.3",
79
- "@nestjs/platform-express": "10.4.15",
80
- "@nestjs/schedule": "4.1.2",
81
- "@nestjs/swagger": "8.1.1",
82
- "@nestjs/terminus": "10.3.0",
72
+ "@nestjs/apollo": "13.1.0",
73
+ "@nestjs/common": "11.0.17",
74
+ "@nestjs/core": "11.0.17",
75
+ "@nestjs/graphql": "13.1.0",
76
+ "@nestjs/jwt": "11.0.0",
77
+ "@nestjs/mongoose": "11.0.3",
78
+ "@nestjs/passport": "11.0.5",
79
+ "@nestjs/platform-express": "11.0.17",
80
+ "@nestjs/schedule": "5.0.1",
81
+ "@nestjs/swagger": "11.1.3",
82
+ "@nestjs/terminus": "11.0.0",
83
83
  "apollo-server-core": "3.13.0",
84
84
  "apollo-server-express": "3.13.0",
85
85
  "bcrypt": "5.1.1",
@@ -87,10 +87,10 @@
87
87
  "class-validator": "0.14.1",
88
88
  "compression": "1.8.0",
89
89
  "cookie-parser": "1.4.7",
90
- "dotenv": "16.4.7",
90
+ "dotenv": "16.5.0",
91
91
  "ejs": "3.1.10",
92
92
  "graphql": "16.10.0",
93
- "graphql-query-complexity": "1.0.0",
93
+ "graphql-query-complexity": "1.1.0",
94
94
  "graphql-subscriptions": "3.0.0",
95
95
  "graphql-upload": "15.0.2",
96
96
  "js-sha256": "0.11.0",
@@ -101,7 +101,7 @@
101
101
  "mongoose": "7.8.6",
102
102
  "multer": "1.4.5-lts.2",
103
103
  "node-mailjet": "6.0.8",
104
- "nodemailer": "6.10.0",
104
+ "nodemailer": "6.10.1",
105
105
  "nodemon": "3.1.9",
106
106
  "passport": "0.7.0",
107
107
  "passport-jwt": "4.0.1",
@@ -115,11 +115,11 @@
115
115
  "@babel/plugin-proposal-private-methods": "7.18.6",
116
116
  "@compodoc/compodoc": "1.1.26",
117
117
  "@lenne.tech/eslint-config-ts": "1.0.8",
118
- "@nestjs/cli": "10.4.9",
119
- "@nestjs/schematics": "10.2.3",
120
- "@nestjs/testing": "10.4.15",
121
- "@swc/cli": "0.5.2",
122
- "@swc/core": "1.11.13",
118
+ "@nestjs/cli": "11.0.6",
119
+ "@nestjs/schematics": "11.0.5",
120
+ "@nestjs/testing": "11.0.17",
121
+ "@swc/cli": "0.6.0",
122
+ "@swc/core": "1.11.21",
123
123
  "@swc/jest": "0.2.37",
124
124
  "@types/compression": "1.7.5",
125
125
  "@types/cookie-parser": "1.4.8",
@@ -128,15 +128,15 @@
128
128
  "@types/jest": "29.5.14",
129
129
  "@types/lodash": "4.17.16",
130
130
  "@types/multer": "1.4.12",
131
- "@types/node": "22.13.14",
131
+ "@types/node": "22.14.1",
132
132
  "@types/nodemailer": "6.4.17",
133
133
  "@types/passport": "1.0.17",
134
134
  "@types/supertest": "6.0.3",
135
- "@typescript-eslint/eslint-plugin": "8.28.0",
136
- "@typescript-eslint/parser": "8.28.0",
135
+ "@typescript-eslint/eslint-plugin": "8.30.1",
136
+ "@typescript-eslint/parser": "8.30.1",
137
137
  "coffeescript": "2.7.0",
138
- "eslint": "9.23.0",
139
- "eslint-config-prettier": "9.1.0",
138
+ "eslint": "9.24.0",
139
+ "eslint-config-prettier": "10.1.2",
140
140
  "eslint-plugin-unused-imports": "4.1.4",
141
141
  "find-file-up": "2.0.1",
142
142
  "grunt": "1.6.1",
@@ -147,16 +147,16 @@
147
147
  "husky": "9.1.7",
148
148
  "jest": "29.7.0",
149
149
  "npm-watch": "0.13.0",
150
- "pm2": "5.4.3",
150
+ "pm2": "6.0.5",
151
151
  "prettier": "3.5.3",
152
152
  "pretty-quick": "4.1.1",
153
153
  "supertest": "7.1.0",
154
- "ts-jest": "29.3.0",
154
+ "ts-jest": "29.3.2",
155
155
  "ts-loader": "9.5.2",
156
- "ts-morph": "24.0.0",
156
+ "ts-morph": "25.0.1",
157
157
  "ts-node": "10.9.2",
158
158
  "tsconfig-paths": "4.2.0",
159
- "typescript": "5.8.2",
159
+ "typescript": "5.8.3",
160
160
  "yalc": "1.0.0-pre.53"
161
161
  },
162
162
  "overrides": {
@@ -49,7 +49,7 @@ const createPassportContext = (request, response) => (type, options, callback: (
49
49
  * Can be removed when pull request is merged:
50
50
  * https://github.com/nestjs/passport/pull/66
51
51
  */
52
- function createAuthGuard(type?: string): Type<CanActivate> {
52
+ function createAuthGuard(type?: AuthGuardStrategy | string | string[]): Type<IAuthGuard> {
53
53
  class MixinAuthGuard<TUser = any> {
54
54
  /**
55
55
  * Integrate options
@@ -127,7 +127,7 @@ function createAuthGuard(type?: string): Type<CanActivate> {
127
127
  }
128
128
  }
129
129
 
130
- const guard = mixin(MixinAuthGuard);
130
+ const guard = mixin<MixinAuthGuard>(MixinAuthGuard);
131
131
  return guard;
132
132
  }
133
133
 
@@ -89,6 +89,11 @@ export class CoreAuthService {
89
89
  * User sign in via email
90
90
  */
91
91
  async signIn(input: CoreAuthSignInInput, serviceOptions?: ServiceOptions): Promise<CoreAuthModel> {
92
+ // Check input
93
+ if (!input) {
94
+ throw new BadRequestException('Missing input');
95
+ }
96
+
92
97
  // Prepare service options
93
98
  const serviceOptionsForUserService = prepareServiceOptions(serviceOptions, {
94
99
  // We need password, so we can't use prepare output handling and have to deactivate it