chore: 升级存在安全风险的依赖

This commit is contained in:
Nixevol
2026-07-14 11:21:58 +08:00
parent 2250869244
commit 5481208973
13 changed files with 1080 additions and 1104 deletions
+6 -2
View File
@@ -1,5 +1,5 @@
import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { JwtModule, type JwtModuleOptions } from '@nestjs/jwt';
import { ConfigService } from '@nestjs/config';
import { APP_GUARD } from '@nestjs/core';
import { AuthService } from './auth.service';
@@ -14,7 +14,11 @@ import { RolesGuard } from './guards/roles.guard';
inject: [ConfigService],
useFactory: (config: ConfigService) => ({
secret: config.get<string>('jwt.secret'),
signOptions: { expiresIn: config.get<string>('jwt.expiresIn') || '7d' },
signOptions: {
expiresIn:
config.get<NonNullable<JwtModuleOptions['signOptions']>['expiresIn']>('jwt.expiresIn') ||
'7d',
},
}),
}),
],
+1 -1
View File
@@ -23,7 +23,7 @@ function mountSpa(app: NestExpressApplication, prefix: string, root: string): vo
const http = app.getHttpAdapter().getInstance();
const index = resolve(root, 'index.html');
http.get(prefix, (_req, res) => res.sendFile(index));
http.get(`${prefix}/*`, (_req, res) => res.sendFile(index));
http.get(`${prefix}/*splat`, (_req, res) => res.sendFile(index));
}
async function bootstrap(): Promise<void> {