@estgbue/mezgeb 0.0.28 → 0.0.29
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/dist/mezgeb/client/client.logger.config.js +1 -1
- package/dist/mezgeb/client/client.module.d.ts +2 -0
- package/dist/mezgeb/client/client.module.d.ts.map +1 -1
- package/dist/mezgeb/client/client.module.js +26 -2
- package/dist/mezgeb/listener/entities/audit-log.entity.d.ts.map +1 -1
- package/dist/mezgeb/listener/entities/audit-log.entity.js +1 -1
- package/dist/mezgeb/mezgeb.enum.d.ts +2 -0
- package/dist/mezgeb/mezgeb.enum.d.ts.map +1 -1
- package/dist/mezgeb/mezgeb.enum.js +4 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.module.d.ts","sourceRoot":"","sources":["../../../libs/mezgeb/src/mezgeb/client/client.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.module.d.ts","sourceRoot":"","sources":["../../../libs/mezgeb/src/mezgeb/client/client.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAUvD,qBAqBa,iBAAiB;;IAI5B,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,aAAa;CAuBxD"}
|
|
@@ -8,6 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var AuditClientModule_1;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.AuditClientModule = void 0;
|
|
13
14
|
const common_1 = require("@nestjs/common");
|
|
@@ -18,13 +19,36 @@ const mezgeb_enum_1 = require("../mezgeb.enum");
|
|
|
18
19
|
const client_audit_interceptor_1 = require("./client-audit.interceptor");
|
|
19
20
|
const client_logger_config_1 = require("./client.logger.config");
|
|
20
21
|
const client_subscriber_1 = require("./client.subscriber");
|
|
21
|
-
let AuditClientModule = class AuditClientModule {
|
|
22
|
+
let AuditClientModule = AuditClientModule_1 = class AuditClientModule {
|
|
22
23
|
constructor() {
|
|
23
24
|
console.log('Audit Client Module initialized');
|
|
24
25
|
}
|
|
26
|
+
static register(connectionName) {
|
|
27
|
+
return {
|
|
28
|
+
module: AuditClientModule_1,
|
|
29
|
+
imports: [
|
|
30
|
+
microservices_1.ClientsModule.register([client_logger_config_1.auditLoggerConfig]),
|
|
31
|
+
typeorm_1.TypeOrmModule.forFeature([], connectionName),
|
|
32
|
+
],
|
|
33
|
+
providers: [
|
|
34
|
+
core_1.Reflector,
|
|
35
|
+
{
|
|
36
|
+
provide: core_1.APP_INTERCEPTOR,
|
|
37
|
+
useClass: client_audit_interceptor_1.ClientLoggerInterceptor,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
provide: mezgeb_enum_1.AuditDatasource,
|
|
41
|
+
useFactory: (dataSource) => dataSource,
|
|
42
|
+
inject: [(0, typeorm_1.getDataSourceToken)(connectionName)],
|
|
43
|
+
},
|
|
44
|
+
client_subscriber_1.ClientSubscriber,
|
|
45
|
+
],
|
|
46
|
+
exports: [],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
25
49
|
};
|
|
26
50
|
exports.AuditClientModule = AuditClientModule;
|
|
27
|
-
exports.AuditClientModule = AuditClientModule = __decorate([
|
|
51
|
+
exports.AuditClientModule = AuditClientModule = AuditClientModule_1 = __decorate([
|
|
28
52
|
(0, common_1.Module)({
|
|
29
53
|
imports: [
|
|
30
54
|
microservices_1.ClientsModule.register([client_logger_config_1.auditLoggerConfig]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log.entity.d.ts","sourceRoot":"","sources":["../../../../libs/mezgeb/src/mezgeb/listener/entities/audit-log.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"audit-log.entity.d.ts","sourceRoot":"","sources":["../../../../libs/mezgeb/src/mezgeb/listener/entities/audit-log.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAoC,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE7F,qBACa,QAAQ;IAEnB,EAAE,CAAC,EAAE,MAAM,CAAC;IAGZ,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;IAGjB,aAAa,EAAG,sBAAsB,CAAC;IAGvC,WAAW,EAAG,MAAM,CAAC;IAGrB,MAAM,EAAG,MAAM,CAAC;IAGhB,WAAW,EAAE,GAAG,CAAC;IAGjB,aAAa,EAAE,GAAG,CAAC;IAGnB,UAAU,EAAG,MAAM,CAAC;IAGpB,SAAS,EAAG,MAAM,CAAC;IAGnB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,MAAM,EAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IAGzC,IAAI,EAAE,GAAG,CAAC;IAGV,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;CAC9B"}
|
|
@@ -73,5 +73,5 @@ __decorate([
|
|
|
73
73
|
__metadata("design:type", Array)
|
|
74
74
|
], AuditLog.prototype, "commands", void 0);
|
|
75
75
|
exports.AuditLog = AuditLog = __decorate([
|
|
76
|
-
(0, typeorm_1.Entity)({ name:
|
|
76
|
+
(0, typeorm_1.Entity)({ name: mezgeb_enum_1.AuditTableName, schema: mezgeb_enum_1.AuditTableSchema })
|
|
77
77
|
], AuditLog);
|
|
@@ -18,4 +18,6 @@ export declare const RollbackRequestAudit = "rollback-request-audit";
|
|
|
18
18
|
export declare const RecordInsertion = "record-insertion";
|
|
19
19
|
export declare const RecordUpdate = "record-update";
|
|
20
20
|
export declare const RecordDeletion = "record-delete";
|
|
21
|
+
export declare const AuditTableName: string;
|
|
22
|
+
export declare const AuditTableSchema: string;
|
|
21
23
|
//# sourceMappingURL=mezgeb.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mezgeb.enum.d.ts","sourceRoot":"","sources":["../../libs/mezgeb/src/mezgeb/mezgeb.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAGD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAC9D,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"mezgeb.enum.d.ts","sourceRoot":"","sources":["../../libs/mezgeb/src/mezgeb/mezgeb.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAGD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAC9D,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,eAAO,MAAM,cAAc,QAA8C,CAAC;AAC1E,eAAO,MAAM,gBAAgB,QAA0C,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a, _b;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecordDeletion = exports.RecordUpdate = exports.RecordInsertion = exports.RollbackRequestAudit = exports.CommitRequestAudit = exports.RegisterRequestAudit = exports.DeadAuditRoutingKey = exports.AuditDeadLetterExchange = exports.AuditLoggerRMQTopic = exports.AuditLoggerRMQQueue = exports.ClientLoggerInterceptorKey = exports.AuditDatasource = exports.EAuditLogRequestMethod = void 0;
|
|
4
|
+
exports.AuditTableSchema = exports.AuditTableName = exports.RecordDeletion = exports.RecordUpdate = exports.RecordInsertion = exports.RollbackRequestAudit = exports.CommitRequestAudit = exports.RegisterRequestAudit = exports.DeadAuditRoutingKey = exports.AuditDeadLetterExchange = exports.AuditLoggerRMQTopic = exports.AuditLoggerRMQQueue = exports.ClientLoggerInterceptorKey = exports.AuditDatasource = exports.EAuditLogRequestMethod = void 0;
|
|
4
5
|
var EAuditLogRequestMethod;
|
|
5
6
|
(function (EAuditLogRequestMethod) {
|
|
6
7
|
EAuditLogRequestMethod["GET"] = "GET";
|
|
@@ -22,3 +23,5 @@ exports.RollbackRequestAudit = 'rollback-request-audit';
|
|
|
22
23
|
exports.RecordInsertion = 'record-insertion';
|
|
23
24
|
exports.RecordUpdate = 'record-update';
|
|
24
25
|
exports.RecordDeletion = 'record-delete';
|
|
26
|
+
exports.AuditTableName = (_a = process.env.AUDIT_LOG_TABLE) !== null && _a !== void 0 ? _a : 'audit_logs';
|
|
27
|
+
exports.AuditTableSchema = (_b = process.env.AUDIT_LOC_SCHEMA) !== null && _b !== void 0 ? _b : "audit";
|