@golemio/audit-logs 1.0.0-dev.1590498382 → 1.0.0-dev.1594393090
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 +24 -13
- package/dist/helpers/AuditLogger.d.ts +4 -3
- package/dist/helpers/AuditLogger.js +6 -27
- package/dist/helpers/AuditLogger.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/repositories/AuditLogsRepository.js +3 -24
- package/dist/repositories/AuditLogsRepository.js.map +1 -1
- package/dist/transformations/AuditLogTransformation.js +3 -12
- package/dist/transformations/AuditLogTransformation.js.map +1 -1
- package/package.json +1 -1
- package/dist/ioc/AuditLogsContainerToken.d.ts +0 -7
- package/dist/ioc/AuditLogsContainerToken.js +0 -15
- package/dist/ioc/AuditLogsContainerToken.js.map +0 -1
- package/dist/ioc/Di.d.ts +0 -3
- package/dist/ioc/Di.js +0 -25
- package/dist/ioc/Di.js.map +0 -1
package/README.md
CHANGED
|
@@ -54,21 +54,31 @@ npx golemio migrate-db up --postgres --schema audit_logs
|
|
|
54
54
|
For information on how to use this module with default module schema migrations, see [golemio-cli docs](https://gitlab.com/operator-ict/golemio/code/golemio-cli/-/blob/release/docs/migrations.md?ref_type=heads#default-module-schema-migrations).
|
|
55
55
|
|
|
56
56
|
Configuring the database schema to use for audit logging using dependency injection:
|
|
57
|
+
|
|
57
58
|
```ts
|
|
58
59
|
// Di.ts
|
|
59
|
-
import { AuditLogsContainer
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
import { AuditLogsContainer } from "@golemio/audit-logs";
|
|
61
|
+
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
62
|
+
import { ILogger } from "@golemio/core/dist/helpers";
|
|
63
|
+
import { instanceCachingFactory } from "@golemio/core/dist/shared/tsyringe";
|
|
64
|
+
|
|
65
|
+
// ...create your module container
|
|
66
|
+
// ...register database connector for your module container
|
|
67
|
+
// ...register logger for your module container
|
|
68
|
+
|
|
69
|
+
YourModuleContainer.register("your_audit_logs_token", {
|
|
70
|
+
useFactory: instanceCachingFactory<AuditLogger>((c) => {
|
|
71
|
+
return new AuditLogger(
|
|
72
|
+
YourModuleContainer.resolve<IDatabaseConnector>("your_database_connector_token"),
|
|
73
|
+
YourModuleContainer.resolve<ILogger>("your_logger_token"),
|
|
74
|
+
{ schema: "your_module_database_schema" }
|
|
75
|
+
);
|
|
76
|
+
}),
|
|
77
|
+
});
|
|
69
78
|
```
|
|
70
79
|
|
|
71
80
|
The audit logger can then be used as follows:
|
|
81
|
+
|
|
72
82
|
```ts
|
|
73
83
|
// YourClass.ts
|
|
74
84
|
import { inject } from "@golemio/core/dist/shared/tsyringe";
|
|
@@ -77,9 +87,10 @@ import { AuditLogger } from "@golemio/audit-logs";
|
|
|
77
87
|
export class YourClass {
|
|
78
88
|
constructor(@inject("your_audit_logs_token") private auditLogger: AuditLogger) {}
|
|
79
89
|
|
|
80
|
-
someMethod() {
|
|
81
|
-
this.auditLogger.log({ action: "test-action", entity: "test-entity", userId: "test-user-id" /*, data: {...} */ });
|
|
82
|
-
// .then(...).catch(...)
|
|
90
|
+
async someMethod() {
|
|
91
|
+
await this.auditLogger.log({ action: "test-action", entity: "test-entity", userId: "test-user-id" /*, data: {...} */ });
|
|
83
92
|
}
|
|
84
93
|
}
|
|
85
94
|
```
|
|
95
|
+
|
|
96
|
+
Note that logging can be used only after your database connector has been connected to the database.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ILogger } from "@golemio/core/dist/helpers";
|
|
2
|
+
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
1
3
|
import { IAuditLog } from "../interfaces/IAuditLog";
|
|
2
|
-
import {
|
|
3
|
-
import { AuditLogTransformation } from "../transformations/AuditLogTransformation";
|
|
4
|
+
import { IAuditLogsConfig } from "../interfaces/IAuditLogsConfig";
|
|
4
5
|
export declare class AuditLogger {
|
|
5
6
|
private auditLogsRepository;
|
|
6
7
|
private auditLogTransformation;
|
|
7
|
-
constructor(
|
|
8
|
+
constructor(databaseConnector: IDatabaseConnector, logger: ILogger, config: IAuditLogsConfig);
|
|
8
9
|
log(auditLog: IAuditLog): Promise<void>;
|
|
9
10
|
}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -22,15 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
10
|
};
|
|
23
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
12
|
exports.AuditLogger = void 0;
|
|
25
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
26
|
-
const AuditLogsContainerToken_1 = require("../ioc/AuditLogsContainerToken");
|
|
27
13
|
const AuditLogsRepository_1 = require("../repositories/AuditLogsRepository");
|
|
28
14
|
const AuditLogTransformation_1 = require("../transformations/AuditLogTransformation");
|
|
29
|
-
|
|
30
|
-
constructor(
|
|
31
|
-
this.auditLogsRepository =
|
|
32
|
-
this.auditLogTransformation =
|
|
33
|
-
// do nothing
|
|
15
|
+
class AuditLogger {
|
|
16
|
+
constructor(databaseConnector, logger, config) {
|
|
17
|
+
this.auditLogsRepository = new AuditLogsRepository_1.AuditLogsRepository(databaseConnector, logger, config);
|
|
18
|
+
this.auditLogTransformation = new AuditLogTransformation_1.AuditLogTransformation();
|
|
34
19
|
}
|
|
35
20
|
log(auditLog) {
|
|
36
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -38,12 +23,6 @@ let AuditLogger = exports.AuditLogger = class AuditLogger {
|
|
|
38
23
|
yield this.auditLogsRepository.insert(transformedAuditLog);
|
|
39
24
|
});
|
|
40
25
|
}
|
|
41
|
-
}
|
|
42
|
-
exports.AuditLogger = AuditLogger
|
|
43
|
-
(0, tsyringe_1.injectable)(),
|
|
44
|
-
__param(0, (0, tsyringe_1.inject)(AuditLogsContainerToken_1.AuditLogsContainerToken.AuditLogsRepository)),
|
|
45
|
-
__param(1, (0, tsyringe_1.inject)(AuditLogsContainerToken_1.AuditLogsContainerToken.AuditLogTransformation)),
|
|
46
|
-
__metadata("design:paramtypes", [AuditLogsRepository_1.AuditLogsRepository,
|
|
47
|
-
AuditLogTransformation_1.AuditLogTransformation])
|
|
48
|
-
], AuditLogger);
|
|
26
|
+
}
|
|
27
|
+
exports.AuditLogger = AuditLogger;
|
|
49
28
|
//# sourceMappingURL=AuditLogger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditLogger.js","sourceRoot":"","sources":["../../src/helpers/AuditLogger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuditLogger.js","sourceRoot":"","sources":["../../src/helpers/AuditLogger.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,6EAA0E;AAC1E,sFAAmF;AAEnF,MAAa,WAAW;IAIpB,YAAY,iBAAqC,EAAE,MAAe,EAAE,MAAwB;QACxF,IAAI,CAAC,mBAAmB,GAAG,IAAI,yCAAmB,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACtF,IAAI,CAAC,sBAAsB,GAAG,IAAI,+CAAsB,EAAE,CAAC;IAC/D,CAAC;IAEY,GAAG,CAAC,QAAmB;;YAChC,MAAM,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACnF,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAC/D,CAAC;KAAA;CACJ;AAbD,kCAaC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { AuditLogger } from "./helpers/AuditLogger";
|
|
2
2
|
export { IAuditLog } from "./interfaces/IAuditLog";
|
|
3
3
|
export { IAuditLogsConfig } from "./interfaces/IAuditLogsConfig";
|
|
4
|
-
export { AuditLogsContainerToken } from "./ioc/AuditLogsContainerToken";
|
|
5
|
-
export { AuditLogsContainer } from "./ioc/Di";
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AuditLogger = void 0;
|
|
4
4
|
var AuditLogger_1 = require("./helpers/AuditLogger");
|
|
5
5
|
Object.defineProperty(exports, "AuditLogger", { enumerable: true, get: function () { return AuditLogger_1.AuditLogger; } });
|
|
6
|
-
var AuditLogsContainerToken_1 = require("./ioc/AuditLogsContainerToken");
|
|
7
|
-
Object.defineProperty(exports, "AuditLogsContainerToken", { enumerable: true, get: function () { return AuditLogsContainerToken_1.AuditLogsContainerToken; } });
|
|
8
|
-
var Di_1 = require("./ioc/Di");
|
|
9
|
-
Object.defineProperty(exports, "AuditLogsContainer", { enumerable: true, get: function () { return Di_1.AuditLogsContainer; } });
|
|
10
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,0GAAA,WAAW,OAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,0GAAA,WAAW,OAAA"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -23,14 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
12
|
exports.AuditLogsRepository = void 0;
|
|
25
13
|
const AbstractValidatableRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository");
|
|
26
|
-
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
27
14
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
28
15
|
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
29
16
|
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
30
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
31
|
-
const AuditLogsContainerToken_1 = require("../ioc/AuditLogsContainerToken");
|
|
32
17
|
const AuditLogsModel_1 = require("../models/AuditLogsModel");
|
|
33
|
-
|
|
18
|
+
class AuditLogsRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
34
19
|
constructor(connector, logger, config) {
|
|
35
20
|
super(connector, logger);
|
|
36
21
|
this.logger = logger;
|
|
@@ -60,12 +45,6 @@ let AuditLogsRepository = exports.AuditLogsRepository = class AuditLogsRepositor
|
|
|
60
45
|
}
|
|
61
46
|
});
|
|
62
47
|
}
|
|
63
|
-
}
|
|
64
|
-
exports.AuditLogsRepository = AuditLogsRepository
|
|
65
|
-
(0, tsyringe_1.injectable)(),
|
|
66
|
-
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
67
|
-
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
68
|
-
__param(2, (0, tsyringe_1.inject)(AuditLogsContainerToken_1.AuditLogsContainerToken.AuditLogsConfig)),
|
|
69
|
-
__metadata("design:paramtypes", [Object, Object, Object])
|
|
70
|
-
], AuditLogsRepository);
|
|
48
|
+
}
|
|
49
|
+
exports.AuditLogsRepository = AuditLogsRepository;
|
|
71
50
|
//# sourceMappingURL=AuditLogsRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditLogsRepository.js","sourceRoot":"","sources":["../../src/repositories/AuditLogsRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuditLogsRepository.js","sourceRoot":"","sources":["../../src/repositories/AuditLogsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,8IAA2I;AAC3I,6EAAyF;AACzF,mFAAkF;AAClF,mEAI6C;AAE7C,6DAA0D;AAG1D,MAAa,mBAAoB,SAAQ,6DAA6B;IAOlE,YAAY,SAA6B,EAAU,MAAe,EAAU,MAAwB;QAChG,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QADsB,WAAM,GAAN,MAAM,CAAS;QAAU,WAAM,GAAN,MAAM,CAAkB;QAL7F,cAAS,GAAG,+BAAc,CAAC,SAAS,CAAC;QAOxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,uCAAmB,CAAC,qBAAqB,EAAE,+BAAc,CAAC,UAAU,CAAC,CAAC;QAC3F,IAAI,CAAC,cAAc,GAAG,SAAS;aAC1B,aAAa,EAAE;aACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,+BAAc,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1G,CAAC;IAEY,MAAM,CAAC,IAAe;;;YAC/B,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aACjD;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,2BAAwB,IAAI,CAAA,MAAA,GAAG,CAAC,MAAM,0CAAE,MAAM,IAAG,CAAC,EAAE;oBACnE,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACnF,MAAM,IAAI,gCAAe,CAAC,+BAA+B,YAAY,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;iBACxG;gBACD,IAAI,GAAG,YAAY,yBAAsB,EAAE;oBACvC,MAAM,IAAI,6BAAY,CAAC,oBAAoB,GAAG,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;iBACxF;gBACD,MAAM,IAAI,6BAAY,CAAC,iBAAiB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACzE;;KACJ;CACJ;AA9BD,kDA8BC"}
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
3
|
exports.AuditLogTransformation = void 0;
|
|
10
4
|
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
11
|
-
|
|
12
|
-
let AuditLogTransformation = exports.AuditLogTransformation = class AuditLogTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
5
|
+
class AuditLogTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
13
6
|
constructor() {
|
|
14
7
|
super(...arguments);
|
|
15
8
|
this.name = "AuditLogTransformation";
|
|
16
9
|
this.transformInternal = (auditLog) => (Object.assign({ action: auditLog.action, entity: auditLog.entity, user_id: auditLog.userId }, (auditLog.data ? { data: auditLog.data } : {})));
|
|
17
10
|
}
|
|
18
|
-
}
|
|
19
|
-
exports.AuditLogTransformation = AuditLogTransformation
|
|
20
|
-
(0, tsyringe_1.injectable)()
|
|
21
|
-
], AuditLogTransformation);
|
|
11
|
+
}
|
|
12
|
+
exports.AuditLogTransformation = AuditLogTransformation;
|
|
22
13
|
//# sourceMappingURL=AuditLogTransformation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditLogTransformation.js","sourceRoot":"","sources":["../../src/transformations/AuditLogTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuditLogTransformation.js","sourceRoot":"","sources":["../../src/transformations/AuditLogTransformation.ts"],"names":[],"mappings":";;;AAAA,6GAA0G;AAO1G,MAAa,sBAAuB,SAAQ,+CAAiD;IAA7F;;QACW,SAAI,GAAG,wBAAwB,CAAC;QAE7B,sBAAiB,GAAG,CAAC,QAAqB,EAAgB,EAAE,CAAC,iBACnE,MAAM,EAAE,QAAQ,CAAC,MAAM,EACvB,MAAM,EAAE,QAAQ,CAAC,MAAM,EACvB,OAAO,EAAE,QAAQ,CAAC,MAAM,IACrB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACnD,CAAC;IACP,CAAC;CAAA;AATD,wDASC"}
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuditLogsContainerToken = void 0;
|
|
4
|
-
const AuditLogsContainerToken = {
|
|
5
|
-
/* Config */
|
|
6
|
-
AuditLogsConfig: Symbol("AuditLogsConfig"),
|
|
7
|
-
/* Helpers */
|
|
8
|
-
AuditLogger: Symbol("AuditLogger"),
|
|
9
|
-
/* Repositories */
|
|
10
|
-
AuditLogsRepository: Symbol("AuditLogsRepository"),
|
|
11
|
-
/* Transformations */
|
|
12
|
-
AuditLogTransformation: Symbol("AuditLogTransformation"),
|
|
13
|
-
};
|
|
14
|
-
exports.AuditLogsContainerToken = AuditLogsContainerToken;
|
|
15
|
-
//# sourceMappingURL=AuditLogsContainerToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuditLogsContainerToken.js","sourceRoot":"","sources":["../../src/ioc/AuditLogsContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,uBAAuB,GAAG;IAC5B,YAAY;IACZ,eAAe,EAAE,MAAM,CAAC,iBAAiB,CAAC;IAC1C,aAAa;IACb,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC;IAClC,kBAAkB;IAClB,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,qBAAqB;IACrB,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;CAC3D,CAAC;AAEO,0DAAuB"}
|
package/dist/ioc/Di.d.ts
DELETED
package/dist/ioc/Di.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuditLogsContainer = void 0;
|
|
4
|
-
const Di_1 = require("@golemio/core/dist/integration-engine/ioc/Di");
|
|
5
|
-
const AuditLogger_1 = require("../helpers/AuditLogger");
|
|
6
|
-
const AuditLogsRepository_1 = require("../repositories/AuditLogsRepository");
|
|
7
|
-
const AuditLogTransformation_1 = require("../transformations/AuditLogTransformation");
|
|
8
|
-
const AuditLogsContainerToken_1 = require("./AuditLogsContainerToken");
|
|
9
|
-
//#region Initialization
|
|
10
|
-
const AuditLogsContainer = Di_1.IntegrationEngineContainer.createChildContainer();
|
|
11
|
-
exports.AuditLogsContainer = AuditLogsContainer;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region Config
|
|
14
|
-
const config = { schema: "audit_logs" };
|
|
15
|
-
AuditLogsContainer.register(AuditLogsContainerToken_1.AuditLogsContainerToken.AuditLogsConfig, { useValue: config });
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region Helpers
|
|
18
|
-
AuditLogsContainer.register(AuditLogsContainerToken_1.AuditLogsContainerToken.AuditLogger, AuditLogger_1.AuditLogger);
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region Repositories
|
|
21
|
-
AuditLogsContainer.register(AuditLogsContainerToken_1.AuditLogsContainerToken.AuditLogsRepository, AuditLogsRepository_1.AuditLogsRepository);
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region Transformations
|
|
24
|
-
AuditLogsContainer.register(AuditLogsContainerToken_1.AuditLogsContainerToken.AuditLogTransformation, AuditLogTransformation_1.AuditLogTransformation);
|
|
25
|
-
//# sourceMappingURL=Di.js.map
|
package/dist/ioc/Di.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../src/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qEAA0F;AAE1F,wDAAqD;AAErD,6EAA0E;AAC1E,sFAAmF;AACnF,uEAAoE;AAEpE,wBAAwB;AACxB,MAAM,kBAAkB,GAAwB,+BAA0B,CAAC,oBAAoB,EAAE,CAAC;AAoBzF,gDAAkB;AAnB3B,YAAY;AAEZ,gBAAgB;AAChB,MAAM,MAAM,GAAqB,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAC1D,kBAAkB,CAAC,QAAQ,CAAC,iDAAuB,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AAC3F,YAAY;AAEZ,iBAAiB;AACjB,kBAAkB,CAAC,QAAQ,CAAC,iDAAuB,CAAC,WAAW,EAAE,yBAAW,CAAC,CAAC;AAC9E,YAAY;AAEZ,sBAAsB;AACtB,kBAAkB,CAAC,QAAQ,CAAC,iDAAuB,CAAC,mBAAmB,EAAE,yCAAmB,CAAC,CAAC;AAC9F,YAAY;AAEZ,yBAAyB;AACzB,kBAAkB,CAAC,QAAQ,CAAC,iDAAuB,CAAC,sBAAsB,EAAE,+CAAsB,CAAC,CAAC"}
|