utn-cli 2.1.47 → 2.1.49
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
|
@@ -178,11 +178,25 @@ export async function updateBackend(opciones = { cerrarAlFinalizar: true }) {
|
|
|
178
178
|
const rutaApiRutasDestino = path.join(directorioDestino, 'rutas', 'API.js');
|
|
179
179
|
if (fs.existsSync(rutaApiRutasDestino)) {
|
|
180
180
|
let contenidoApiRutas = fs.readFileSync(rutaApiRutasDestino, 'utf-8');
|
|
181
|
+
let archivoModificado = false;
|
|
182
|
+
|
|
183
|
+
// Corregir error tipográfico moitoreo -> monitoreo
|
|
184
|
+
if (contenidoApiRutas.includes('moitoreo')) {
|
|
185
|
+
console.log('Corrigiendo typo moitoreo a monitoreo en rutas/API.js...');
|
|
186
|
+
contenidoApiRutas = contenidoApiRutas.replace(/moitoreo/g, 'monitoreo');
|
|
187
|
+
archivoModificado = true;
|
|
188
|
+
}
|
|
189
|
+
|
|
181
190
|
const importManejador = "const ManejadorDeErrores = require('../servicios/Nucleo/ManejadorDeErrores.js');";
|
|
182
191
|
const regexManejador = /(?:const|let|var)\s+ManejadorDeErrores\s*=\s*require\(/;
|
|
183
192
|
if (!regexManejador.test(contenidoApiRutas)) {
|
|
184
193
|
console.log('Agregando ManejadorDeErrores a rutas/API.js...');
|
|
185
|
-
|
|
194
|
+
contenidoApiRutas = importManejador + '\n' + contenidoApiRutas;
|
|
195
|
+
archivoModificado = true;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (archivoModificado) {
|
|
199
|
+
fs.writeFileSync(rutaApiRutasDestino, contenidoApiRutas);
|
|
186
200
|
}
|
|
187
201
|
}
|
|
188
202
|
|
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ export class ContenedorComponentesComponent implements OnInit, OnDestroy, AfterV
|
|
|
56
56
|
return this.itemsDeMenu.filter(i => !i.requierePermiso || this.TienePermiso);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
get esDashboard(): boolean { return
|
|
59
|
+
get esDashboard(): boolean { return window.location.hostname.includes('portalv2-frontend'); }
|
|
60
60
|
|
|
61
61
|
toggleSidebar(): void {
|
|
62
62
|
const abriendo = !this.datosGlobalesService.sidebarVisible$.value;
|
|
@@ -277,8 +277,8 @@ export class ContenedorComponentesComponent implements OnInit, OnDestroy, AfterV
|
|
|
277
277
|
this.datosGlobalesService.sidebarVisible$.next(false);
|
|
278
278
|
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerNotificaciones').subscribe((datos: any) => {
|
|
279
279
|
this.datosNotificaciones = (datos.body ?? []).map((n: any) => ({
|
|
280
|
-
llave: n.
|
|
281
|
-
valor: n.
|
|
280
|
+
llave: n.llave,
|
|
281
|
+
valor: n.valor,
|
|
282
282
|
tachado: false,
|
|
283
283
|
eliminando: false
|
|
284
284
|
}));
|