@icd-iot-aicf/nestjs-logger 2.3.0 → 3.0.1
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/SNAPSHOT_GUIDE.md +154 -0
- package/migration/log-snapshot-v3.e2e-spec.ts +364 -0
- package/package.json +1 -1
- package/dist/app.module.d.ts +0 -2
- package/dist/app.module.js +0 -23
- package/dist/app.module.js.map +0 -1
- package/dist/app.service.d.ts +0 -3
- package/dist/app.service.js +0 -20
- package/dist/app.service.js.map +0 -1
- package/dist/common/async-storage/external-transaction-info.d.ts +0 -11
- package/dist/common/async-storage/external-transaction-info.js +0 -6
- package/dist/common/async-storage/external-transaction-info.js.map +0 -1
- package/dist/common/async-storage/summaryEndpoint-info.d.ts +0 -4
- package/dist/common/async-storage/summaryEndpoint-info.js +0 -10
- package/dist/common/async-storage/summaryEndpoint-info.js.map +0 -1
- package/dist/common/async-storage/tracnsaction-info.d.ts +0 -14
- package/dist/common/async-storage/tracnsaction-info.js +0 -6
- package/dist/common/async-storage/tracnsaction-info.js.map +0 -1
- package/dist/common/dto/result.dto.d.ts +0 -18
- package/dist/common/dto/result.dto.js +0 -12
- package/dist/common/dto/result.dto.js.map +0 -1
- package/dist/common/helper/error.d.ts +0 -4
- package/dist/common/helper/error.js +0 -15
- package/dist/common/helper/error.js.map +0 -1
- package/dist/common/helper/response.d.ts +0 -38
- package/dist/common/helper/response.js +0 -212
- package/dist/common/helper/response.js.map +0 -1
- package/dist/common/helper/tools.d.ts +0 -8
- package/dist/common/helper/tools.js +0 -98
- package/dist/common/helper/tools.js.map +0 -1
- package/dist/common/helper/tools.service.d.ts +0 -12
- package/dist/common/helper/tools.service.js +0 -148
- package/dist/common/helper/tools.service.js.map +0 -1
- package/dist/common/internal-logs-info.module.d.ts +0 -3
- package/dist/common/internal-logs-info.module.js +0 -29
- package/dist/common/internal-logs-info.module.js.map +0 -1
- package/dist/common/service/common/context.service.d.ts +0 -6
- package/dist/common/service/common/context.service.js +0 -34
- package/dist/common/service/common/context.service.js.map +0 -1
- package/dist/common/service/logger-debug/logger-debug-lib.service.d.ts +0 -6
- package/dist/common/service/logger-debug/logger-debug-lib.service.js +0 -35
- package/dist/common/service/logger-debug/logger-debug-lib.service.js.map +0 -1
- package/dist/config/app-log-config.module.d.ts +0 -5
- package/dist/config/app-log-config.module.js +0 -38
- package/dist/config/app-log-config.module.js.map +0 -1
- package/dist/config/app-log-config.service.d.ts +0 -6
- package/dist/config/app-log-config.service.js +0 -32
- package/dist/config/app-log-config.service.js.map +0 -1
- package/dist/config/configurations.d.ts +0 -23
- package/dist/config/configurations.js +0 -15
- package/dist/config/configurations.js.map +0 -1
- package/dist/index.d.ts +0 -23
- package/dist/index.js +0 -40
- package/dist/index.js.map +0 -1
- package/dist/logger/aicf/dtos/aicf-manual.dto.d.ts +0 -128
- package/dist/logger/aicf/dtos/aicf-manual.dto.js +0 -214
- package/dist/logger/aicf/dtos/aicf-manual.dto.js.map +0 -1
- package/dist/logger/aicf/dtos/aicf.dto.d.ts +0 -208
- package/dist/logger/aicf/dtos/aicf.dto.js +0 -177
- package/dist/logger/aicf/dtos/aicf.dto.js.map +0 -1
- package/dist/logger/aicf/interceptors/aicf-amqp.interceptor.d.ts +0 -7
- package/dist/logger/aicf/interceptors/aicf-amqp.interceptor.js +0 -78
- package/dist/logger/aicf/interceptors/aicf-amqp.interceptor.js.map +0 -1
- package/dist/logger/aicf/interceptors/aicf.interceptor.d.ts +0 -9
- package/dist/logger/aicf/interceptors/aicf.interceptor.js +0 -38
- package/dist/logger/aicf/interceptors/aicf.interceptor.js.map +0 -1
- package/dist/logger/aicf/middleware/aicf.middleware.d.ts +0 -13
- package/dist/logger/aicf/middleware/aicf.middleware.js +0 -125
- package/dist/logger/aicf/middleware/aicf.middleware.js.map +0 -1
- package/dist/logger/aicf/services/aicf-endpoint.service.d.ts +0 -13
- package/dist/logger/aicf/services/aicf-endpoint.service.js +0 -116
- package/dist/logger/aicf/services/aicf-endpoint.service.js.map +0 -1
- package/dist/logger/cloudron/decorators/cloudron.decorators.d.ts +0 -0
- package/dist/logger/cloudron/decorators/cloudron.decorators.js +0 -1
- package/dist/logger/cloudron/decorators/cloudron.decorators.js.map +0 -1
- package/dist/logger/cloudron/dtos/cauldron-manual.dto.d.ts +0 -120
- package/dist/logger/cloudron/dtos/cauldron-manual.dto.js +0 -179
- package/dist/logger/cloudron/dtos/cauldron-manual.dto.js.map +0 -1
- package/dist/logger/cloudron/dtos/cauldron.dto.d.ts +0 -182
- package/dist/logger/cloudron/dtos/cauldron.dto.js +0 -114
- package/dist/logger/cloudron/dtos/cauldron.dto.js.map +0 -1
- package/dist/logger/cloudron/global/cloudron.global.d.ts +0 -0
- package/dist/logger/cloudron/global/cloudron.global.js +0 -1
- package/dist/logger/cloudron/global/cloudron.global.js.map +0 -1
- package/dist/logger/cloudron/intercepters/cloudron.interceptor.d.ts +0 -11
- package/dist/logger/cloudron/intercepters/cloudron.interceptor.js +0 -41
- package/dist/logger/cloudron/intercepters/cloudron.interceptor.js.map +0 -1
- package/dist/logger/cloudron/middleware/cloudron.middleware.d.ts +0 -15
- package/dist/logger/cloudron/middleware/cloudron.middleware.js +0 -106
- package/dist/logger/cloudron/middleware/cloudron.middleware.js.map +0 -1
- package/dist/logger/cloudron/services/cloudron-details-logs.service.d.ts +0 -15
- package/dist/logger/cloudron/services/cloudron-details-logs.service.js +0 -127
- package/dist/logger/cloudron/services/cloudron-details-logs.service.js.map +0 -1
- package/dist/logger/cloudron/services/cloudron-summary-logs.service.d.ts +0 -6
- package/dist/logger/cloudron/services/cloudron-summary-logs.service.js +0 -43
- package/dist/logger/cloudron/services/cloudron-summary-logs.service.js.map +0 -1
- package/dist/logger/core/database/hook-ingress.database.d.ts +0 -8
- package/dist/logger/core/database/hook-ingress.database.js +0 -215
- package/dist/logger/core/database/hook-ingress.database.js.map +0 -1
- package/dist/logger/core/decorators/customDecorators.d.ts +0 -20
- package/dist/logger/core/decorators/customDecorators.js +0 -92
- package/dist/logger/core/decorators/customDecorators.js.map +0 -1
- package/dist/logger/core/dtos/core.dto.d.ts +0 -86
- package/dist/logger/core/dtos/core.dto.js +0 -9
- package/dist/logger/core/dtos/core.dto.js.map +0 -1
- package/dist/logger/core/dtos/log-entry-class.d.ts +0 -11
- package/dist/logger/core/dtos/log-entry-class.js +0 -15
- package/dist/logger/core/dtos/log-entry-class.js.map +0 -1
- package/dist/logger/core/enum/enum.d.ts +0 -75
- package/dist/logger/core/enum/enum.js +0 -307
- package/dist/logger/core/enum/enum.js.map +0 -1
- package/dist/logger/core/functions/error-reponse.d.ts +0 -2
- package/dist/logger/core/functions/error-reponse.js +0 -26
- package/dist/logger/core/functions/error-reponse.js.map +0 -1
- package/dist/logger/core/functions/global-function.d.ts +0 -43
- package/dist/logger/core/functions/global-function.js +0 -180
- package/dist/logger/core/functions/global-function.js.map +0 -1
- package/dist/logger/core/guard/logger.guard.d.ts +0 -8
- package/dist/logger/core/guard/logger.guard.js +0 -44
- package/dist/logger/core/guard/logger.guard.js.map +0 -1
- package/dist/logger/core/interceptors/amqp.interceptor.d.ts +0 -6
- package/dist/logger/core/interceptors/amqp.interceptor.js +0 -46
- package/dist/logger/core/interceptors/amqp.interceptor.js.map +0 -1
- package/dist/logger/core/interceptors/core-logs.interceptor.d.ts +0 -18
- package/dist/logger/core/interceptors/core-logs.interceptor.js +0 -70
- package/dist/logger/core/interceptors/core-logs.interceptor.js.map +0 -1
- package/dist/logger/core/interceptors/http.interceptor.d.ts +0 -5
- package/dist/logger/core/interceptors/http.interceptor.js +0 -30
- package/dist/logger/core/interceptors/http.interceptor.js.map +0 -1
- package/dist/logger/core/interceptors/interceptors.d.ts +0 -3
- package/dist/logger/core/interceptors/interceptors.js +0 -20
- package/dist/logger/core/interceptors/interceptors.js.map +0 -1
- package/dist/logger/core/middleware/http-logs-middleware.service.d.ts +0 -19
- package/dist/logger/core/middleware/http-logs-middleware.service.js +0 -61
- package/dist/logger/core/middleware/http-logs-middleware.service.js.map +0 -1
- package/dist/logger/core/module/amqp/amqp.module.d.ts +0 -2
- package/dist/logger/core/module/amqp/amqp.module.js +0 -43
- package/dist/logger/core/module/amqp/amqp.module.js.map +0 -1
- package/dist/logger/core/pipes/index.d.ts +0 -1
- package/dist/logger/core/pipes/index.js +0 -18
- package/dist/logger/core/pipes/index.js.map +0 -1
- package/dist/logger/core/pipes/masking-logs/masking-logs.pipe.d.ts +0 -5
- package/dist/logger/core/pipes/masking-logs/masking-logs.pipe.js +0 -38
- package/dist/logger/core/pipes/masking-logs/masking-logs.pipe.js.map +0 -1
- package/dist/logger/core/services/summary-flush.service.d.ts +0 -8
- package/dist/logger/core/services/summary-flush.service.js +0 -31
- package/dist/logger/core/services/summary-flush.service.js.map +0 -1
- package/dist/logger/esb/dtos/logger.esb.dto.d.ts +0 -136
- package/dist/logger/esb/dtos/logger.esb.dto.js +0 -99
- package/dist/logger/esb/dtos/logger.esb.dto.js.map +0 -1
- package/dist/logger/esb/intercepters/esb.interceptor.d.ts +0 -9
- package/dist/logger/esb/intercepters/esb.interceptor.js +0 -36
- package/dist/logger/esb/intercepters/esb.interceptor.js.map +0 -1
- package/dist/logger/esb/middleware/esb.middleware.d.ts +0 -10
- package/dist/logger/esb/middleware/esb.middleware.js +0 -64
- package/dist/logger/esb/middleware/esb.middleware.js.map +0 -1
- package/dist/logger/esb/services/external-logs-esb.service.d.ts +0 -10
- package/dist/logger/esb/services/external-logs-esb.service.js +0 -98
- package/dist/logger/esb/services/external-logs-esb.service.js.map +0 -1
- package/dist/logger/logger.middleware.d.ts +0 -0
- package/dist/logger/logger.middleware.js +0 -1
- package/dist/logger/logger.middleware.js.map +0 -1
- package/dist/logger/logger.module.d.ts +0 -2
- package/dist/logger/logger.module.js +0 -59
- package/dist/logger/logger.module.js.map +0 -1
- package/dist/logger/logger.service.d.ts +0 -12
- package/dist/logger/logger.service.js +0 -129
- package/dist/logger/logger.service.js.map +0 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.js +0 -15
- package/dist/main.js.map +0 -1
- package/dist/metrics/metrics-manual.service.d.ts +0 -12
- package/dist/metrics/metrics-manual.service.js +0 -45
- package/dist/metrics/metrics-manual.service.js.map +0 -1
- package/dist/metrics/metrics.middleware.d.ts +0 -14
- package/dist/metrics/metrics.middleware.js +0 -74
- package/dist/metrics/metrics.middleware.js.map +0 -1
- package/dist/metrics/metrics.module.d.ts +0 -6
- package/dist/metrics/metrics.module.js +0 -42
- package/dist/metrics/metrics.module.js.map +0 -1
- package/dist/metrics/metrics.service.d.ts +0 -11
- package/dist/metrics/metrics.service.js +0 -112
- package/dist/metrics/metrics.service.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/utils/tools.d.ts +0 -50
- package/dist/utils/tools.js +0 -266
- package/dist/utils/tools.js.map +0 -1
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CloudronSummaryLogsService = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const summaryEndpoint_info_1 = require("../../../common/async-storage/summaryEndpoint-info");
|
|
15
|
-
let CloudronSummaryLogsService = class CloudronSummaryLogsService {
|
|
16
|
-
constructor() { }
|
|
17
|
-
getCustomSummaryCloudron() {
|
|
18
|
-
const currentSummary = summaryEndpoint_info_1.summaryInfoLocal.getStore() || [];
|
|
19
|
-
if (currentSummary.length) {
|
|
20
|
-
return {
|
|
21
|
-
endPointSummary: currentSummary.map((edrDetail, index) => {
|
|
22
|
-
return {
|
|
23
|
-
no: (index + 1).toString(),
|
|
24
|
-
endPointName: edrDetail.endPointName,
|
|
25
|
-
endPointURL: edrDetail.endPointURL,
|
|
26
|
-
processTime: edrDetail.processTime,
|
|
27
|
-
responseStatus: edrDetail.responseStatus,
|
|
28
|
-
};
|
|
29
|
-
}),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
pushEndpointSummary(sessionId, logDetail) {
|
|
35
|
-
(0, summaryEndpoint_info_1.pushSummaryInfo)(logDetail);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.CloudronSummaryLogsService = CloudronSummaryLogsService;
|
|
39
|
-
exports.CloudronSummaryLogsService = CloudronSummaryLogsService = __decorate([
|
|
40
|
-
(0, common_1.Injectable)(),
|
|
41
|
-
__metadata("design:paramtypes", [])
|
|
42
|
-
], CloudronSummaryLogsService);
|
|
43
|
-
//# sourceMappingURL=cloudron-summary-logs.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloudron-summary-logs.service.js","sourceRoot":"","sources":["../../../../src/logger/cloudron/services/cloudron-summary-logs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,6FAG4D;AAGrD,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACrC,gBAAe,CAAC;IAChB,wBAAwB;QACtB,MAAM,cAAc,GAAqB,uCAAgB,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC3E,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC;YAC1B,OAAO;gBACL,eAAe,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;oBACvD,OAAO;wBACL,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE;wBAC1B,YAAY,EAAE,SAAS,CAAC,YAAY;wBACpC,WAAW,EAAE,SAAS,CAAC,WAAW;wBAClC,WAAW,EAAE,SAAS,CAAC,WAAW;wBAClC,cAAc,EAAE,SAAS,CAAC,cAAc;qBACzC,CAAC;gBACJ,CAAC,CAAC;aACH,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mBAAmB,CAAC,SAAiB,EAAE,SAAyB;QAE9D,IAAA,sCAAe,EAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;CACF,CAAA;AAxBY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;;GACA,0BAA0B,CAwBtC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ModuleRef } from '@nestjs/core';
|
|
2
|
-
import { LoggerModule } from '../../logger.module';
|
|
3
|
-
export declare function createIngressMongoAsync(name: string, schema: any): {
|
|
4
|
-
name: string;
|
|
5
|
-
imports: (typeof LoggerModule)[];
|
|
6
|
-
useFactory: (moduleRef: ModuleRef) => Promise<any>;
|
|
7
|
-
inject: (typeof ModuleRef)[];
|
|
8
|
-
};
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createIngressMongoAsync = createIngressMongoAsync;
|
|
7
|
-
const core_1 = require("@nestjs/core");
|
|
8
|
-
const microtime_1 = __importDefault(require("microtime"));
|
|
9
|
-
const logger_module_1 = require("../../logger.module");
|
|
10
|
-
const logger_service_1 = require("../../logger.service");
|
|
11
|
-
const enum_1 = require("../enum/enum");
|
|
12
|
-
function createIngressMongoAsync(name, schema) {
|
|
13
|
-
return {
|
|
14
|
-
name,
|
|
15
|
-
imports: [logger_module_1.LoggerModule],
|
|
16
|
-
useFactory: async (moduleRef) => {
|
|
17
|
-
const logger = moduleRef.get(logger_service_1.CustomLoggerService, { strict: false });
|
|
18
|
-
applyMongoIngressHooks(schema, logger);
|
|
19
|
-
return schema;
|
|
20
|
-
},
|
|
21
|
-
inject: [core_1.ModuleRef],
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function applyMongoIngressHooks(schema, logger) {
|
|
25
|
-
MongoIngressHooks['logger'] = logger;
|
|
26
|
-
new MongoIngressHooks(schema);
|
|
27
|
-
}
|
|
28
|
-
class MongoIngressHooks {
|
|
29
|
-
constructor(schema) {
|
|
30
|
-
this.schema = schema;
|
|
31
|
-
this.applyHooks();
|
|
32
|
-
}
|
|
33
|
-
applyHooks() {
|
|
34
|
-
const preHooks = {
|
|
35
|
-
find: this.beforeFind,
|
|
36
|
-
save: this.beforeSave,
|
|
37
|
-
findOne: this.beforeFindOne,
|
|
38
|
-
findOneAndUpdate: this.beforeFindOneAndUpdate,
|
|
39
|
-
updateOne: this.beforeUpdateOne,
|
|
40
|
-
updateMany: this.beforeUpdateMany,
|
|
41
|
-
deleteOne: this.beforeDeleteOne,
|
|
42
|
-
deleteMany: this.beforeDeleteMany,
|
|
43
|
-
insertMany: this.beforeInsertMany,
|
|
44
|
-
insertOne: this.beforeSave,
|
|
45
|
-
aggregate: this.beforeAggregate,
|
|
46
|
-
};
|
|
47
|
-
const postHooks = {
|
|
48
|
-
find: this.afterFind,
|
|
49
|
-
save: this.afterSave,
|
|
50
|
-
findOne: this.afterFindOne,
|
|
51
|
-
findOneAndUpdate: this.afterFindOneAndUpdate,
|
|
52
|
-
updateOne: this.afterUpdateOne,
|
|
53
|
-
updateMany: this.afterUpdateMany,
|
|
54
|
-
deleteOne: this.afterDeleteOne,
|
|
55
|
-
deleteMany: this.afterDeleteMany,
|
|
56
|
-
insertOne: this.afterSave,
|
|
57
|
-
insertMany: this.afterInsertMany,
|
|
58
|
-
};
|
|
59
|
-
for (const [hook, method] of Object.entries(preHooks)) {
|
|
60
|
-
this.schema.pre(hook, function () {
|
|
61
|
-
this._startTime = microtime_1.default.now();
|
|
62
|
-
method.call(this);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
for (const [hook, method] of Object.entries(postHooks)) {
|
|
66
|
-
this.schema.post(hook, function (docs) {
|
|
67
|
-
method.call(this, docs, {
|
|
68
|
-
serviceStartTime: this._startTime,
|
|
69
|
-
collectionName: this.model.collection?.name || this['collection'].name,
|
|
70
|
-
hook: hook,
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
beforeInsertMany() { }
|
|
76
|
-
beforeFind() { }
|
|
77
|
-
beforeFindOne() { }
|
|
78
|
-
beforeFindOneAndUpdate() { }
|
|
79
|
-
beforeUpdateOne() { }
|
|
80
|
-
beforeUpdateMany() { }
|
|
81
|
-
beforeDeleteOne() { }
|
|
82
|
-
beforeDeleteMany() { }
|
|
83
|
-
beforeSave() { }
|
|
84
|
-
beforeInsertOne() { }
|
|
85
|
-
beforeAggregate() { }
|
|
86
|
-
afterFind(doc, logInfo) {
|
|
87
|
-
if (doc.length) {
|
|
88
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.READ({
|
|
89
|
-
startTime: logInfo.serviceStartTime,
|
|
90
|
-
requestObject: {
|
|
91
|
-
method: 'READ',
|
|
92
|
-
payload: {
|
|
93
|
-
query: this.getFilter(),
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.READ({
|
|
100
|
-
startTime: microtime_1.default.now(),
|
|
101
|
-
requestObject: {
|
|
102
|
-
method: 'READ',
|
|
103
|
-
payload: {
|
|
104
|
-
query: this.getFilter(),
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
afterFindOne(doc, logInfo) {
|
|
111
|
-
if (doc) {
|
|
112
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.READ({
|
|
113
|
-
startTime: logInfo.serviceStartTime,
|
|
114
|
-
requestObject: {
|
|
115
|
-
method: 'READ',
|
|
116
|
-
payload: {
|
|
117
|
-
query: this.getFilter(),
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
}));
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.READ({
|
|
124
|
-
startTime: microtime_1.default.now(),
|
|
125
|
-
requestObject: {
|
|
126
|
-
method: 'READ',
|
|
127
|
-
payload: {
|
|
128
|
-
query: this.getFilter(),
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
}));
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
afterFindOneAndUpdate(doc, info) {
|
|
135
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.UPDATE({
|
|
136
|
-
startTime: info.serviceStartTime,
|
|
137
|
-
requestObject: {
|
|
138
|
-
method: 'UPDATE',
|
|
139
|
-
payload: {
|
|
140
|
-
query: this.getFilter(),
|
|
141
|
-
document: this.getUpdate(),
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
}));
|
|
145
|
-
}
|
|
146
|
-
afterUpdateOne(doc, info) {
|
|
147
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.UPDATE({
|
|
148
|
-
startTime: info.serviceStartTime,
|
|
149
|
-
requestObject: {
|
|
150
|
-
method: 'UPDATE',
|
|
151
|
-
payload: {
|
|
152
|
-
query: this.getFilter(),
|
|
153
|
-
document: this.getUpdate(),
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
}));
|
|
157
|
-
}
|
|
158
|
-
afterUpdateMany(doc, info) {
|
|
159
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.UPDATE({
|
|
160
|
-
startTime: info.serviceStartTime,
|
|
161
|
-
requestObject: {
|
|
162
|
-
method: 'UPDATE',
|
|
163
|
-
payload: {
|
|
164
|
-
query: this.getFilter(),
|
|
165
|
-
document: this.getUpdate(),
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
}));
|
|
169
|
-
}
|
|
170
|
-
afterDeleteOne(result, info) {
|
|
171
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.REMOVE({
|
|
172
|
-
startTime: info.serviceStartTime,
|
|
173
|
-
requestObject: {
|
|
174
|
-
method: 'DELETE',
|
|
175
|
-
payload: {
|
|
176
|
-
query: this.getFilter(),
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
}));
|
|
180
|
-
}
|
|
181
|
-
afterDeleteMany(result) {
|
|
182
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.REMOVE({
|
|
183
|
-
startTime: microtime_1.default.now(),
|
|
184
|
-
requestObject: {
|
|
185
|
-
method: 'DELETE',
|
|
186
|
-
payload: {
|
|
187
|
-
query: this.getFilter(),
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
}));
|
|
191
|
-
}
|
|
192
|
-
afterSave(doc, info) {
|
|
193
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.CREATE({
|
|
194
|
-
startTime: info.serviceStartTime,
|
|
195
|
-
requestObject: {
|
|
196
|
-
method: 'CREATE',
|
|
197
|
-
payload: {
|
|
198
|
-
document: this.toObject(),
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
}));
|
|
202
|
-
}
|
|
203
|
-
afterInsertMany(doc, info) {
|
|
204
|
-
MongoIngressHooks.logger.debug(enum_1.DBAction.CREATE({
|
|
205
|
-
startTime: info.serviceStartTime,
|
|
206
|
-
requestObject: {
|
|
207
|
-
method: 'CREATE',
|
|
208
|
-
payload: {
|
|
209
|
-
document: this.doc,
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
}));
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
//# sourceMappingURL=hook-ingress.database.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hook-ingress.database.js","sourceRoot":"","sources":["../../../../src/logger/core/database/hook-ingress.database.ts"],"names":[],"mappings":";;;;;AAOA,0DAWC;AAjBD,uCAAyC;AACzC,0DAAkC;AAClC,uDAAmD;AACnD,yDAA2D;AAC3D,uCAAwC;AAExC,SAAgB,uBAAuB,CAAC,IAAY,EAAE,MAAW;IAC/D,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,CAAC,4BAAY,CAAC;QACvB,UAAU,EAAE,KAAK,EAAE,SAAoB,EAAE,EAAE;YACzC,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,oCAAmB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;YACrE,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACvC,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,gBAAS,CAAC;KACpB,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAc,EAAE,MAA2B;IACzE,iBAAiB,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACrC,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,iBAAiB;IAGrB,YAAmB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAC/B,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAEM,UAAU;QACf,MAAM,QAAQ,GAAG;YACf,IAAI,EAAE,IAAI,CAAC,UAAU;YACrB,IAAI,EAAE,IAAI,CAAC,UAAU;YACrB,OAAO,EAAE,IAAI,CAAC,aAAa;YAC3B,gBAAgB,EAAE,IAAI,CAAC,sBAAsB;YAC7C,SAAS,EAAE,IAAI,CAAC,e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AAM,CAAC,KAAK,CAC5B,eAAQ,CAAC,MAAM,CAAC;YACd,SAAS,EAAE,IAAI,CAAC,gBAAgB;YAChC,aAAa,EAAE;gBACb,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE;oBACP,QAAQ,EAAE,IAAI,CAAC,GAAG;iBACnB;aACF;SACF,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { APICustomInfo } from '../dtos/core.dto';
|
|
4
|
-
export declare function RecordName(command: string): <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
5
|
-
export declare function CommandInfo(commandInfo: ICommandInfo): <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
6
|
-
export declare class CommandInfoInterceptor implements NestInterceptor {
|
|
7
|
-
private commandName;
|
|
8
|
-
private description?;
|
|
9
|
-
constructor(commandName: string, description?: string);
|
|
10
|
-
intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
|
|
11
|
-
}
|
|
12
|
-
export declare function RecordManual(recordName: string): MethodDecorator;
|
|
13
|
-
export declare function EXTCMDName(apiCustomInfo?: APICustomInfo): MethodDecorator;
|
|
14
|
-
export declare function NodeName(nodeName: string): ClassDecorator;
|
|
15
|
-
interface ICommandInfo {
|
|
16
|
-
CommandName: string;
|
|
17
|
-
Description?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function MaskingLogData(specificKey?: string[]): MethodDecorator;
|
|
20
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CommandInfoInterceptor = void 0;
|
|
13
|
-
exports.RecordName = RecordName;
|
|
14
|
-
exports.CommandInfo = CommandInfo;
|
|
15
|
-
exports.RecordManual = RecordManual;
|
|
16
|
-
exports.EXTCMDName = EXTCMDName;
|
|
17
|
-
exports.NodeName = NodeName;
|
|
18
|
-
exports.MaskingLogData = MaskingLogData;
|
|
19
|
-
const common_1 = require("@nestjs/common");
|
|
20
|
-
const operators_1 = require("rxjs/operators");
|
|
21
|
-
const tools_1 = require("../../../utils/tools");
|
|
22
|
-
const global_function_1 = require("../functions/global-function");
|
|
23
|
-
const tracnsaction_info_1 = require("../../../common/async-storage/tracnsaction-info");
|
|
24
|
-
const aicf_dto_1 = require("../../aicf/dtos/aicf.dto");
|
|
25
|
-
function RecordName(command) {
|
|
26
|
-
return (0, common_1.applyDecorators)((0, common_1.SetMetadata)('recordName', command));
|
|
27
|
-
}
|
|
28
|
-
function CommandInfo(commandInfo) {
|
|
29
|
-
return (0, common_1.applyDecorators)((0, common_1.SetMetadata)('recordName', commandInfo.CommandName), (0, common_1.SetMetadata)('description', commandInfo.Description), (0, common_1.UseInterceptors)(new CommandInfoInterceptor(commandInfo.CommandName, commandInfo.Description)));
|
|
30
|
-
}
|
|
31
|
-
let CommandInfoInterceptor = class CommandInfoInterceptor {
|
|
32
|
-
constructor(commandName, description) {
|
|
33
|
-
this.commandName = commandName;
|
|
34
|
-
this.description = description;
|
|
35
|
-
}
|
|
36
|
-
intercept(context, next) {
|
|
37
|
-
const request = context.switchToHttp().getRequest();
|
|
38
|
-
request['cmdName'] = this.commandName;
|
|
39
|
-
request['cmdDescription'] = this.description;
|
|
40
|
-
return next.handle().pipe((0, operators_1.tap)(() => {
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.CommandInfoInterceptor = CommandInfoInterceptor;
|
|
45
|
-
exports.CommandInfoInterceptor = CommandInfoInterceptor = __decorate([
|
|
46
|
-
(0, common_1.Injectable)(),
|
|
47
|
-
__metadata("design:paramtypes", [String, String])
|
|
48
|
-
], CommandInfoInterceptor);
|
|
49
|
-
function RecordManual(recordName) {
|
|
50
|
-
return (target, propertyKey, descriptor) => {
|
|
51
|
-
const originalMethod = descriptor.value;
|
|
52
|
-
descriptor.value = function (...args) {
|
|
53
|
-
const store = tracnsaction_info_1.transactionInfoLocalStorage.getStore() || {};
|
|
54
|
-
store.recordName = recordName;
|
|
55
|
-
return tracnsaction_info_1.transactionInfoLocalStorage.run(store, () => {
|
|
56
|
-
return originalMethod.apply(this, args);
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function EXTCMDName(apiCustomInfo = {}) {
|
|
62
|
-
return (target, propertyKey, descriptor) => {
|
|
63
|
-
const originalMethod = descriptor.value;
|
|
64
|
-
descriptor.value = function (...args) {
|
|
65
|
-
const subSessionId = (0, tools_1.generateRandomString)();
|
|
66
|
-
if (this.logCustomInfo) {
|
|
67
|
-
this.logCustomInfo.subSessionId = subSessionId;
|
|
68
|
-
this.logCustomInfo.cmdName = apiCustomInfo.cmdName;
|
|
69
|
-
}
|
|
70
|
-
let extCommandName = this['nodeName'] ? `${this['nodeName']}|` : '';
|
|
71
|
-
extCommandName += apiCustomInfo.cmdName || propertyKey.toString();
|
|
72
|
-
const ExternalInfo = {
|
|
73
|
-
dependency: extCommandName,
|
|
74
|
-
subSessionId: subSessionId,
|
|
75
|
-
action: apiCustomInfo.action ?? aicf_dto_1.ACTION_TYPE.HTTP,
|
|
76
|
-
subAction: apiCustomInfo.subAction,
|
|
77
|
-
};
|
|
78
|
-
return (0, global_function_1.SetExternalTransactionInfo)(ExternalInfo, async () => {
|
|
79
|
-
return await originalMethod.apply(this, args);
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function NodeName(nodeName) {
|
|
85
|
-
return (target) => {
|
|
86
|
-
target.prototype['nodeName'] = `${nodeName}`;
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function MaskingLogData(specificKey = []) {
|
|
90
|
-
return (0, common_1.applyDecorators)((0, common_1.SetMetadata)('maskingLogData', specificKey));
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=customDecorators.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customDecorators.js","sourceRoot":"","sources":["../../../../src/logger/core/decorators/customDecorators.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,gCAIC;AAED,kCAWC;AAuBD,oCAWC;AAkED,gCA0BC;AAED,4BAIC;AAwBD,wCAIC;AAtMD,2CAQwB;AAExB,8CAAqC;AACrC,gDAA4D;AAE5D,kEAGsC;AACtC,uFAA8F;AAC9F,uDAAuD;AAGvD,SAAgB,UAAU,CAAC,OAAe;IACxC,OAAO,IAAA,wBAAe,EACpB,IAAA,oBAAW,EAAC,YAAY,EAAE,OAAO,CAAC,CACnC,CAAC;AACJ,CAAC;AAED,SAAgB,WAAW,CAAC,WAAyB;IACnD,OAAO,IAAA,wBAAe,EACpB,IAAA,oBAAW,EAAC,YAAY,EAAE,WAAW,CAAC,WAAW,CAAC,EAClD,IAAA,oBAAW,EAAC,aAAa,EAAE,WAAW,CAAC,WAAW,CAAC,EACnD,IAAA,wBAAe,E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OAAO,IAAA,wBAAe,EACpB,IAAA,oBAAW,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { ACTION_TYPE, SUB_HTTP_ACTION, SUB_SMTP_ACTION } from '../../aicf/dtos/aicf.dto';
|
|
2
|
-
export interface APICustomInfo {
|
|
3
|
-
cmdName?: string;
|
|
4
|
-
action?: ACTION_TYPE;
|
|
5
|
-
subAction?: SUB_HTTP_ACTION;
|
|
6
|
-
}
|
|
7
|
-
export interface HTTPRequestObject {
|
|
8
|
-
url: string;
|
|
9
|
-
headers: Record<string, any>;
|
|
10
|
-
queryString: Record<string, any>;
|
|
11
|
-
routeParameters: Record<string, any>;
|
|
12
|
-
payload: Record<string, any>;
|
|
13
|
-
}
|
|
14
|
-
export interface HTTPResponseObject {
|
|
15
|
-
httpStatusCode: string | number;
|
|
16
|
-
headers: Record<string, any>;
|
|
17
|
-
payload: Record<string, any>;
|
|
18
|
-
}
|
|
19
|
-
export interface AMQPRequestObject {
|
|
20
|
-
method: string;
|
|
21
|
-
url: string;
|
|
22
|
-
headers: Record<string, any>;
|
|
23
|
-
exchange: string;
|
|
24
|
-
routingKey: string;
|
|
25
|
-
payload: Record<string, any>;
|
|
26
|
-
}
|
|
27
|
-
export interface AMQPResponseObject {
|
|
28
|
-
acknowledge: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface MQTTRequestObject {
|
|
31
|
-
method: string;
|
|
32
|
-
url: string;
|
|
33
|
-
routeParameters: Record<string, any>;
|
|
34
|
-
payload: Record<string, any>;
|
|
35
|
-
}
|
|
36
|
-
export interface MQTTResponseObject {
|
|
37
|
-
payload: string;
|
|
38
|
-
}
|
|
39
|
-
export interface COAPRequestObject {
|
|
40
|
-
method: string;
|
|
41
|
-
url: string;
|
|
42
|
-
routeParameters: Record<string, any>;
|
|
43
|
-
payload: Record<string, any>;
|
|
44
|
-
}
|
|
45
|
-
export interface COAPResponseObject {
|
|
46
|
-
payload: string;
|
|
47
|
-
}
|
|
48
|
-
export interface SMTPRequestObject {
|
|
49
|
-
method: SUB_SMTP_ACTION;
|
|
50
|
-
url: string;
|
|
51
|
-
headers: Record<string, any>;
|
|
52
|
-
payload: {
|
|
53
|
-
to: string;
|
|
54
|
-
from: string;
|
|
55
|
-
subject: string;
|
|
56
|
-
context: string;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
export interface SMTPResponseObject {
|
|
60
|
-
success: boolean;
|
|
61
|
-
smtpCode: string;
|
|
62
|
-
message: string;
|
|
63
|
-
result?: {
|
|
64
|
-
accepted: string[];
|
|
65
|
-
rejected: any[];
|
|
66
|
-
ehlo: string[];
|
|
67
|
-
envelopeTime: number;
|
|
68
|
-
messageTime: number;
|
|
69
|
-
messageSize: number;
|
|
70
|
-
response: string;
|
|
71
|
-
envelope: any;
|
|
72
|
-
messageId: string;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export type ProtocolRequest = HTTPRequestObject | AMQPRequestObject | COAPRequestObject | MQTTRequestObject;
|
|
76
|
-
export type ProtocolResponse = HTTPResponseObject | AMQPResponseObject | COAPResponseObject | MQTTResponseObject;
|
|
77
|
-
export interface DBRequestObject {
|
|
78
|
-
method: string;
|
|
79
|
-
payload: Record<string, any>;
|
|
80
|
-
}
|
|
81
|
-
export declare enum LOGIC_TYPE {
|
|
82
|
-
FUNCTION = "FUNCTION",
|
|
83
|
-
CHECKPOINT = "CHECKPOINT"
|
|
84
|
-
}
|
|
85
|
-
export type RequestObject = HTTPRequestObject | AMQPRequestObject | MQTTRequestObject | COAPRequestObject | DBRequestObject;
|
|
86
|
-
export type ResponseObject = HTTPResponseObject | AMQPResponseObject | MQTTResponseObject | COAPResponseObject;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LOGIC_TYPE = void 0;
|
|
4
|
-
var LOGIC_TYPE;
|
|
5
|
-
(function (LOGIC_TYPE) {
|
|
6
|
-
LOGIC_TYPE["FUNCTION"] = "FUNCTION";
|
|
7
|
-
LOGIC_TYPE["CHECKPOINT"] = "CHECKPOINT";
|
|
8
|
-
})(LOGIC_TYPE || (exports.LOGIC_TYPE = LOGIC_TYPE = {}));
|
|
9
|
-
//# sourceMappingURL=core.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core.dto.js","sourceRoot":"","sources":["../../../../src/logger/core/dtos/core.dto.ts"],"names":[],"mappings":";;;AA0GA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,uCAAyB,CAAA;AAC3B,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ACTION_TYPE } from '../../aicf/dtos/aicf.dto';
|
|
2
|
-
export declare abstract class LogEntryClass {
|
|
3
|
-
logCustomInfo: LogEntry;
|
|
4
|
-
getCustomData(): Record<string, any>;
|
|
5
|
-
}
|
|
6
|
-
export interface LogEntry {
|
|
7
|
-
cmdName: string;
|
|
8
|
-
action?: ACTION_TYPE;
|
|
9
|
-
subAction?: string;
|
|
10
|
-
subSessionId?: string;
|
|
11
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogEntryClass = void 0;
|
|
4
|
-
class LogEntryClass {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.logCustomInfo = {
|
|
7
|
-
cmdName: null,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
getCustomData() {
|
|
11
|
-
return this.logCustomInfo;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.LogEntryClass = LogEntryClass;
|
|
15
|
-
//# sourceMappingURL=log-entry-class.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-entry-class.js","sourceRoot":"","sources":["../../../../src/logger/core/dtos/log-entry-class.ts"],"names":[],"mappings":";;;AAEA,MAAsB,aAAa;IAAnC;QACE,kBAAa,GAAa;YACxB,OAAO,EAAE,IAAI;SACd,CAAC;IAIJ,CAAC;IAHC,aAAa;QACX,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;CACF;AAPD,sCAOC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { AicfLogicDto } from '../../aicf/dtos/aicf-manual.dto';
|
|
2
|
-
import { CDetailLogic } from '../../cloudron/dtos/cauldron-manual.dto';
|
|
3
|
-
import { DetailsFlushService } from '../../../common/dto/result.dto';
|
|
4
|
-
import { DBRequestObject, HTTPRequestObject, HTTPResponseObject, ProtocolRequest, ProtocolResponse, SMTPRequestObject, SMTPResponseObject } from '../dtos/core.dto';
|
|
5
|
-
export interface BasicInfoDebug {
|
|
6
|
-
message?: string;
|
|
7
|
-
startTime?: number;
|
|
8
|
-
endTime?: number;
|
|
9
|
-
additionalInfo?: any;
|
|
10
|
-
}
|
|
11
|
-
export interface ConnectionInformation {
|
|
12
|
-
message: string;
|
|
13
|
-
protocol: string;
|
|
14
|
-
source: string;
|
|
15
|
-
}
|
|
16
|
-
export interface AdvancedInfoDebug<REQ, RES> extends BasicInfoDebug {
|
|
17
|
-
requestObject?: REQ;
|
|
18
|
-
responseObject?: RES;
|
|
19
|
-
}
|
|
20
|
-
export interface LogicActionInfo extends BasicInfoDebug {
|
|
21
|
-
appLogic?: {
|
|
22
|
-
type: string;
|
|
23
|
-
message: string;
|
|
24
|
-
source: Record<string, any>;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export declare class CoreLogSummaryDto {
|
|
28
|
-
static getInstance<REQ extends ProtocolRequest, RES extends ProtocolResponse>(detailsFludService: DetailsFlushService<REQ, RES>): {
|
|
29
|
-
detail?: any;
|
|
30
|
-
summary?: any;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export declare class HttpAction {
|
|
34
|
-
static POST(detailLogs: AdvancedInfoDebug<HTTPRequestObject, HTTPResponseObject>): any;
|
|
35
|
-
static GET(detailLogs: AdvancedInfoDebug<HTTPRequestObject, HTTPResponseObject>): any;
|
|
36
|
-
static PUT(detailLogs: AdvancedInfoDebug<HTTPRequestObject, HTTPResponseObject>): any;
|
|
37
|
-
static PATCH(detailLogs: AdvancedInfoDebug<HTTPRequestObject, HTTPResponseObject>): any;
|
|
38
|
-
static DELETE(detailLogs: AdvancedInfoDebug<HTTPRequestObject, HTTPResponseObject>): any;
|
|
39
|
-
private static mapModel;
|
|
40
|
-
}
|
|
41
|
-
export declare class DBAction {
|
|
42
|
-
static CREATE(detailLogs: AdvancedInfoDebug<DBRequestObject, any>): any;
|
|
43
|
-
static READ(detailLogs: AdvancedInfoDebug<DBRequestObject, any>): any;
|
|
44
|
-
static UPDATE(detailLogs: AdvancedInfoDebug<DBRequestObject, any>): any;
|
|
45
|
-
static REMOVE(detailLogs: AdvancedInfoDebug<DBRequestObject, any>): any;
|
|
46
|
-
private static mapModel;
|
|
47
|
-
}
|
|
48
|
-
export declare class RabbitMQAction {
|
|
49
|
-
static PRODUCE(detailLogs: AdvancedInfoDebug<ProtocolRequest, ProtocolResponse>): any;
|
|
50
|
-
static CONSUME(detailLogs: AdvancedInfoDebug<ProtocolRequest, ProtocolResponse>): any;
|
|
51
|
-
private static mapModel;
|
|
52
|
-
}
|
|
53
|
-
export declare class KafkaAction {
|
|
54
|
-
static PRODUCE(detailLogs: BasicInfoDebug): any;
|
|
55
|
-
static CONSUME(detailLogs: BasicInfoDebug): any;
|
|
56
|
-
private static mapModel;
|
|
57
|
-
}
|
|
58
|
-
export declare class LogicAction {
|
|
59
|
-
static FUNCTION(detailLogs: LogicActionInfo): CDetailLogic | AicfLogicDto;
|
|
60
|
-
static CHECKPOINT(detailLogs: LogicActionInfo): CDetailLogic | AicfLogicDto;
|
|
61
|
-
private static mapModel;
|
|
62
|
-
}
|
|
63
|
-
export declare class ExceptionAction {
|
|
64
|
-
static LOG(detailLogs: BasicInfoDebug): any;
|
|
65
|
-
private static mapModel;
|
|
66
|
-
}
|
|
67
|
-
export declare class ConnectionAction {
|
|
68
|
-
static CONNECTED(detailLogs: ConnectionInformation): any;
|
|
69
|
-
static DISCONNECTED(detailLogs: ConnectionInformation): any;
|
|
70
|
-
private static mapModel;
|
|
71
|
-
}
|
|
72
|
-
export declare class SmtpAction {
|
|
73
|
-
static SEND(detailLogs: AdvancedInfoDebug<SMTPRequestObject, SMTPResponseObject>): any;
|
|
74
|
-
private static mapModel;
|
|
75
|
-
}
|