utn-cli 2.1.43 → 2.1.45

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.
@@ -179,7 +179,8 @@ export async function updateBackend(opciones = { cerrarAlFinalizar: true }) {
179
179
  if (fs.existsSync(rutaApiRutasDestino)) {
180
180
  let contenidoApiRutas = fs.readFileSync(rutaApiRutasDestino, 'utf-8');
181
181
  const importManejador = "const ManejadorDeErrores = require('../servicios/Nucleo/ManejadorDeErrores.js');";
182
- if (!contenidoApiRutas.includes(importManejador)) {
182
+ const regexManejador = /(?:const|let|var)\s+ManejadorDeErrores\s*=\s*require\(/;
183
+ if (!regexManejador.test(contenidoApiRutas)) {
183
184
  console.log('Agregando ManejadorDeErrores a rutas/API.js...');
184
185
  fs.writeFileSync(rutaApiRutasDestino, importManejador + '\n' + contenidoApiRutas);
185
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utn-cli",
3
- "version": "2.1.43",
3
+ "version": "2.1.45",
4
4
  "description": "Herramienta CLI unificada para la gestión de plantillas en SIGU.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -275,7 +275,7 @@ class Miscelaneo {
275
275
  let datosFinales;
276
276
  if (existentes.length > 0) {
277
277
  const datosExistentes = typeof existentes[0].Datos === 'string' ? JSON.parse(existentes[0].Datos) : existentes[0].Datos;
278
- datosFinales = { ...datosExistentes, ...tarjeta, 'Posición': existentes[0].Posicion, 'Título': existentes[0].Titulo, 'Descripción': existentes[0].Descripcion, 'Archivo': archivo };
278
+ datosFinales = { 'Archivo': archivo, ...tarjeta, ...datosExistentes };
279
279
  await ejecutarConsultaSIGU(
280
280
  `UPDATE \`SIGU\`.\`SIGU_ModulosV2Tarjetas\` SET \`Datos\` = ?, \`LastUser\` = 'Sistema' WHERE \`Modulo\` = ? AND JSON_VALUE(\`Datos\`, '$."Título"') = ?`,
281
281
  [JSON.stringify(datosFinales), this.NombreCanonicoDelModulo, titulo]