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.
package/commands/backend.js
CHANGED
|
@@ -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
|
-
|
|
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
|
@@ -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 = {
|
|
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]
|