Se actualizaron dependencias

This commit is contained in:
evenegas
2026-08-02 21:44:27 -06:00
parent 9a6a1edae9
commit cb0fe54af3
4 changed files with 3165 additions and 2766 deletions
+3132 -2710
View File
File diff suppressed because it is too large Load Diff
+25 -25
View File
@@ -23,56 +23,56 @@
"@nestjs/common": "^11.0.1",
"@nestjs/config": "^4.0.2",
"@nestjs/core": "^11.0.1",
"@nestjs/jwt": "^11.0.0",
"@nestjs/jwt": "^11.0.2",
"@nestjs/passport": "^11.0.5",
"@nestjs/platform-express": "^11.1.3",
"@nestjs/schedule": "^6.0.0",
"@nestjs/schedule": "^6.1.3",
"@nestjs/swagger": "^11.2.0",
"@nestjs/typeorm": "^11.0.0",
"@nestjs/typeorm": "^11.0.3",
"bcrypt": "^6.0.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.2",
"class-validator": "^0.15.1",
"dotenv": "^16.5.0",
"exceljs": "^4.4.0",
"multer": "^2.0.1",
"mysql2": "^3.14.1",
"nodemailer": "^7.0.3",
"mysql2": "^3.23.2",
"nodemailer": "^9.0.3",
"passport": "^0.7.0",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"typeorm": "^0.3.26"
"typeorm": "^0.3.31"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.18.0",
"@nestjs/cli": "^11.0.0",
"@eslint/eslintrc": "^3.3.6",
"@eslint/js": "^10.0.1",
"@nestjs/cli": "^11.0.24",
"@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.1",
"@swc/cli": "^0.6.0",
"@swc/core": "^1.10.7",
"@nestjs/testing": "^11.1.28",
"@swc/cli": "^0.8.1",
"@swc/core": "^1.15.47",
"@types/bcrypt": "^5.0.2",
"@types/express": "^5.0.0",
"@types/express": "^5.0.6",
"@types/jest": "^29.5.14",
"@types/multer": "^1.4.13",
"@types/node": "^22.15.31",
"@types/node": "^26.1.2",
"@types/passport-jwt": "^4.0.1",
"@types/supertest": "^6.0.2",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.2",
"eslint": "^10.8.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.6",
"globals": "^15.14.0",
"jest": "^29.7.0",
"prettier": "^3.4.2",
"prettier": "^3.9.6",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.2",
"supertest": "^7.2.2",
"ts-jest": "^29.4.12",
"ts-loader": "^9.6.2",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.20.0"
"typescript": "^5.8.3",
"typescript-eslint": "^8.65.0"
},
"jest": {
"moduleFileExtensions": [
@@ -91,4 +91,4 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
}
+4 -2
View File
@@ -18,8 +18,10 @@ import { GoogleStrategy } from './google.strategy';
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async (cs: ConfigService) => ({
secret: cs.get<string>('JWT_SECRET'),
signOptions: { expiresIn: cs.get<string>('JWT_EXPIRES_IN') },
secret: cs.getOrThrow<string>('JWT_SECRET'),
signOptions: {
expiresIn: cs.getOrThrow<'1d' | '7d' | '30m' | `${number}${'ms' | 's' | 'm' | 'h' | 'd'}`>('JWT_EXPIRES_IN'),
},
}),
}),
],
+4 -29
View File
@@ -58,12 +58,12 @@ export class ExcelService {
private readonly dataSource: DataSource,
// … inyecta otros repositorios si los usarás
) {}
) { }
/** Lee el buffer del Excel y devuelve un arreglo de filas tipadas */
private async parseFile(buffer: Buffer): Promise<UsuarioRow[]> {
const wb = new Workbook();
await wb.xlsx.load(buffer);
await wb.xlsx.load(buffer as any);
const sheet = wb.worksheets[0];
const rows: UsuarioRow[] = [];
@@ -133,11 +133,8 @@ export class ExcelService {
flagError = true;
}
});
r.cuenta = this.normalize(r.cuenta);
// El número de cuenta debe ser de nueve dígitos para los alumnos
if (r.clave) {
r.clave = this.normalize(r.clave);
}
if (
r.cuenta &&
!/^\d{9}$/.test(r.cuenta.toString().trim()) &&
@@ -199,11 +196,6 @@ export class ExcelService {
return status;
}
normalize(value: any): string {
return String(value)
.replace(/\u00A0/g, ' ') // espacio raro de Excel
.trim();
}
/**
* Valida y luego persiste usuarios y relaciones básicas
*/
@@ -287,8 +279,7 @@ export class ExcelService {
const mapTipo = new Map(tiposExist.map((t) => [t.tipo_usuario, t]));
const usuarios: Usuario[] = [];
const cuentasVistas = new Set<string>();
const rfcsVistos = new Set<string>();
const usuariosConRow: { usuario: Usuario; row: any }[] = [];
let contador = 0;
@@ -323,7 +314,6 @@ export class ExcelService {
}
// Carrera
const clave = r.clave?.trim().toUpperCase() || null;
const nombre = r.nomCarr?.trim().slice(0, 100).toUpperCase() || null;
@@ -366,21 +356,6 @@ export class ExcelService {
? parseInt(r.gen.toString().trim(), 10)
: null;
if (cuentasVistas.has(r.cuenta)) {
errs.push(`Cuenta ${r.cuenta} duplicada en el archivo Excel.`);
contador++;
continue;
}
if (r.rfc && rfcsVistos.has(r.rfc)) {
errs.push(`RFC ${r.rfc} duplicado en el archivo Excel.`);
contador++;
continue;
}
cuentasVistas.add(r.cuenta);
if (r.rfc) rfcsVistos.add(r.rfc);
const usuario = queryRunner.manager.create(Usuario, {
num_cuenta: r.cuenta,
nombre: r.nombres,