fiscalia_bo-nest-helpers 0.1.80 → 0.1.81
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/README.md +47 -48
- package/dist/ms-logs/logs.module.js +5 -5
- package/dist/ms-logs/logs.module.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -338,7 +338,6 @@ Descripcion de los objecto para envio de datos
|
|
338
338
|
| queueListen | String (null) | El canal o queue que desea transmitir datos |
|
339
339
|
| data | String | Campo necesario para enviar datos en formato Json String |
|
340
340
|
|
341
|
-
|
342
341
|
# USO DEL MODULO `MS-LOGS`
|
343
342
|
|
344
343
|
Configuracion de Paquete en el archivo app.module.ts
|
@@ -348,8 +347,8 @@ import { MsLogsModule } from 'fiscalia_bo-nest-helpers';
|
|
348
347
|
@Module({
|
349
348
|
imports: [
|
350
349
|
MsLogsModule.register({
|
351
|
-
global:true,
|
352
|
-
urlMsLogs:process.env.
|
350
|
+
global: true,
|
351
|
+
urlMsLogs: process.env.ENV_SERVICE_MS_LOGS,
|
353
352
|
}),
|
354
353
|
],
|
355
354
|
controllers: [],
|
@@ -358,62 +357,62 @@ import { MsLogsModule } from 'fiscalia_bo-nest-helpers';
|
|
358
357
|
export class AppModule {}
|
359
358
|
```
|
360
359
|
|
361
|
-
Servicios Disponibles para el uso de logs
|
360
|
+
Servicios Disponibles para el uso de logs
|
362
361
|
|
363
362
|
```typescript
|
364
363
|
import { MsLogsService } from 'fiscalia_bo-nest-helpers';
|
365
364
|
@Injectable()
|
366
365
|
export class AppService {
|
367
|
-
constructor(private readonly msLogsService:MsLogsService) {}
|
366
|
+
constructor(private readonly msLogsService: MsLogsService) {}
|
368
367
|
async test_services_logs() {
|
369
368
|
try {
|
370
369
|
await this.msLogsService.generateLogLogin({
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
})
|
370
|
+
aplicacion: 'jl1',
|
371
|
+
funcionario_id: 1,
|
372
|
+
funcionario_ci: '51234124',
|
373
|
+
funcionario_nombre: 'Javier Contreras Mamani',
|
374
|
+
dispositivo_ip: '192.168.0.1',
|
375
|
+
dispositivo_so: 'Windows 11',
|
376
|
+
dispositivo_navegador: 'Chrome 99',
|
377
|
+
});
|
379
378
|
await this.msLogsService.generateLogView({
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
})
|
379
|
+
aplicacion: 'jl2',
|
380
|
+
apartado: 'caso',
|
381
|
+
apartado_info_extra: 'cud: 3143233',
|
382
|
+
tabla_id: 'string',
|
383
|
+
tabla_nombre: 'vacaciones',
|
384
|
+
funcionario_id: 1,
|
385
|
+
funcionario_ci: '51234124',
|
386
|
+
funcionario_nombre: 'Javier Contreras Mamani',
|
387
|
+
dispositivo_ip: '192.168.0.1',
|
388
|
+
dispositivo_so: 'Windows 11',
|
389
|
+
dispositivo_navegador: 'Chrome 99',
|
390
|
+
});
|
392
391
|
await this.msLogsService.generateLogEvents({
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
})
|
392
|
+
aplicacion: 'jl2',
|
393
|
+
evento: 'editar',
|
394
|
+
tabla_id: '1001',
|
395
|
+
tabla_nombre: 'vacaciones',
|
396
|
+
tabla_pre_cambios: '{id:123,nombre:"misnombre"}',
|
397
|
+
request: 'PUT /listar/vacaciones',
|
398
|
+
funcionario_id: 1,
|
399
|
+
funcionario_ci: '5131343',
|
400
|
+
funcionario_nombre: 'Javier Contreras Mamani',
|
401
|
+
dispositivo_ip: '192.168.0.1',
|
402
|
+
dispositivo_so: 'Windows 11',
|
403
|
+
dispositivo_navegador: 'Chrome 99',
|
404
|
+
});
|
406
405
|
await this.msLogsService.generateLogError({
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
})
|
414
|
-
}catch(e){
|
415
|
-
console.log(e)
|
416
|
-
throw e
|
406
|
+
aplicacion: 'jl2',
|
407
|
+
evento: 'Listar vacaciones',
|
408
|
+
tabla_id: 'string',
|
409
|
+
tabla_nombre: 'vacaciones',
|
410
|
+
request: 'POST /listar/vacaciones',
|
411
|
+
error_string_json: 'string',
|
412
|
+
});
|
413
|
+
} catch (e) {
|
414
|
+
console.log(e);
|
415
|
+
throw e;
|
417
416
|
}
|
418
417
|
}
|
419
418
|
}
|
@@ -14,9 +14,9 @@ const logs_service_1 = require("./logs.service");
|
|
14
14
|
const chalk_1 = require("chalk");
|
15
15
|
let MsLogsModule = MsLogsModule_1 = class MsLogsModule {
|
16
16
|
static register(options) {
|
17
|
-
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.
|
17
|
+
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.ENV_SERVICE_MS_LOGS;
|
18
18
|
if (!url)
|
19
|
-
console.warn(chalk_1.bold.red(`
|
19
|
+
console.warn(chalk_1.bold.red(`ENV_SERVICE_MS_LOGS no definido en variables de entorno para ms-files`));
|
20
20
|
return {
|
21
21
|
global: options.global,
|
22
22
|
module: MsLogsModule_1,
|
@@ -31,9 +31,9 @@ let MsLogsModule = MsLogsModule_1 = class MsLogsModule {
|
|
31
31
|
};
|
32
32
|
}
|
33
33
|
static async registerAsync(options) {
|
34
|
-
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.
|
34
|
+
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.ENV_SERVICE_MS_LOGS;
|
35
35
|
if (!url)
|
36
|
-
console.warn(chalk_1.bold.red(`
|
36
|
+
console.warn(chalk_1.bold.red(`ENV_SERVICE_MS_LOGS no definido en variables de entorno para ms-files`));
|
37
37
|
return {
|
38
38
|
global: options.global,
|
39
39
|
module: MsLogsModule_1,
|
@@ -55,7 +55,7 @@ MsLogsModule = MsLogsModule_1 = __decorate([
|
|
55
55
|
logs_service_1.MsLogsService,
|
56
56
|
{
|
57
57
|
provide: 'BASE_URL',
|
58
|
-
useValue: process.env.
|
58
|
+
useValue: process.env.ENV_SERVICE_MS_LOGS,
|
59
59
|
},
|
60
60
|
],
|
61
61
|
})
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logs.module.js","sourceRoot":"","sources":["../../src/ms-logs/logs.module.ts"],"names":[],"mappings":";;;;;;;;;;AAUA,yCAA2C;AAC3C,2CAAuD;AACvD,iDAA+C;AAC/C,iCAA6B;AAsBtB,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACvB,MAAM,CAAC,QAAQ,CAAC,OAA6B;QAC3C,MAAM,GAAG,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,OAAO,CAAC,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"logs.module.js","sourceRoot":"","sources":["../../src/ms-logs/logs.module.ts"],"names":[],"mappings":";;;;;;;;;;AAUA,yCAA2C;AAC3C,2CAAuD;AACvD,iDAA+C;AAC/C,iCAA6B;AAsBtB,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACvB,MAAM,CAAC,QAAQ,CAAC,OAA6B;QAC3C,MAAM,GAAG,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAClE,IAAI,CAAC,GAAG;YACN,OAAO,CAAC,IAAI,CACV,YAAI,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAClF,CAAC;QACJ,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,cAAY;YACpB,SAAS,EAAE;gBACT,4BAAa;gBACb;oBACE,OAAO,EAAE,UAAU;oBACnB,QAAQ,EAAE,GAAG;iBACd;aACF;YACD,OAAO,EAAE,CAAC,4BAAa,CAAC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