chatbot-nc 2.0.48 → 2.0.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/dist/cjs/hashing/idObfuscation.d.ts +3 -4
- package/dist/cjs/hashing/idObfuscation.js +26 -22
- package/dist/cjs/hashing/idObfuscation.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/logger/index.js +3 -12
- package/dist/cjs/logger/index.js.map +1 -1
- package/dist/esm/hashing/idObfuscation.d.ts +3 -4
- package/dist/esm/hashing/idObfuscation.js +26 -22
- package/dist/esm/hashing/idObfuscation.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/logger/index.js +3 -12
- package/dist/esm/logger/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import Hashids from "hashids";
|
|
1
2
|
declare class idObfuscationService {
|
|
2
|
-
private
|
|
3
|
-
|
|
4
|
-
constructor();
|
|
5
|
-
private getHashIds;
|
|
3
|
+
private _hashIds;
|
|
4
|
+
constructor(hashIds: Hashids);
|
|
6
5
|
/**
|
|
7
6
|
* This used to encode the id
|
|
8
7
|
* @param id pass id in string format only
|
|
@@ -15,27 +15,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const AWSSSM_1 = require("../aws/services/AWSSSM");
|
|
16
16
|
const SSMParameters_1 = require("../config/SSMParameters");
|
|
17
17
|
const hashids_1 = __importDefault(require("hashids"));
|
|
18
|
-
class
|
|
19
|
-
constructor() {
|
|
20
|
-
this.hashIds = new hashids_1.default();
|
|
21
|
-
(() => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
yield this.getHashIds();
|
|
23
|
-
}))();
|
|
24
|
-
}
|
|
18
|
+
class defaultHashIds {
|
|
25
19
|
getHashIds() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
try {
|
|
21
|
+
this.config = AWSSSM_1.SSM.getSSMParameter(SSMParameters_1.ssmParameter.idObfuscationSSM);
|
|
22
|
+
return new hashids_1.default(this.config.Salt, +this.config.MinHashLength);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
class idObfuscationService {
|
|
30
|
+
constructor(hashIds) {
|
|
31
|
+
this._hashIds = hashIds;
|
|
38
32
|
}
|
|
33
|
+
// private async getHashIds () {
|
|
34
|
+
// try {
|
|
35
|
+
// this.config = await SSM.getSSMParameter(ssmParameter.idObfuscationSSM);
|
|
36
|
+
// this.hashIds = await new Hashids(this.config.Salt, +this.config.MinHashLength);
|
|
37
|
+
// return;
|
|
38
|
+
// } catch (error) {
|
|
39
|
+
// throw error;
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
39
42
|
/**
|
|
40
43
|
* This used to encode the id
|
|
41
44
|
* @param id pass id in string format only
|
|
@@ -44,7 +47,7 @@ class idObfuscationService {
|
|
|
44
47
|
encode(id) {
|
|
45
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
49
|
try {
|
|
47
|
-
return yield this.
|
|
50
|
+
return yield this._hashIds.encode(id);
|
|
48
51
|
}
|
|
49
52
|
catch (error) {
|
|
50
53
|
throw error;
|
|
@@ -59,7 +62,7 @@ class idObfuscationService {
|
|
|
59
62
|
decode(id) {
|
|
60
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
64
|
try {
|
|
62
|
-
return yield this.
|
|
65
|
+
return yield this._hashIds.decode(id)[0];
|
|
63
66
|
}
|
|
64
67
|
catch (error) {
|
|
65
68
|
throw error;
|
|
@@ -67,6 +70,7 @@ class idObfuscationService {
|
|
|
67
70
|
});
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
|
-
let
|
|
73
|
+
let hashConfig = new defaultHashIds().getHashIds();
|
|
74
|
+
let hashIds = new idObfuscationService(hashConfig);
|
|
71
75
|
exports.default = hashIds;
|
|
72
76
|
//# sourceMappingURL=idObfuscation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idObfuscation.js","sourceRoot":"","sources":["../../../hashing/idObfuscation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,mDAA4C;AAC5C,2DAAuD;AACvD,sDAA8B;AAE9B,MAAM,
|
|
1
|
+
{"version":3,"file":"idObfuscation.js","sourceRoot":"","sources":["../../../hashing/idObfuscation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,mDAA4C;AAC5C,2DAAuD;AACvD,sDAA8B;AAE9B,MAAM,cAAc;IAEX,UAAU;QACf,IAAI;YACA,IAAI,CAAC,MAAM,GAAG,YAAG,CAAC,eAAe,CAAC,4BAAY,CAAC,gBAAgB,CAAC,CAAC;YACjE,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;SACpE;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,KAAK,CAAC;SACf;IACF,CAAC;CACH;AAED,MAAM,oBAAoB;IAEtB,YAAY,OAAe;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,gCAAgC;IAChC,SAAS;IACT,+EAA+E;IAC/E,uFAAuF;IACvF,eAAe;IACf,qBAAqB;IACrB,oBAAoB;IACpB,KAAK;IACL,KAAK;IAEL;;;;OAIG;IACG,MAAM,CAAC,EAAS;;YAErB,IAAI;gBACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aACvC;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,KAAK,CAAC;aACf;QACF,CAAC;KAAA;IAED;;;;OAIG;IACG,MAAM,CAAC,EAAS;;YAErB,IAAI;gBACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aAC1C;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACF,CAAC;KAAA;CACJ;AAED,IAAI,UAAU,GAAG,IAAI,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC;AACnD,IAAI,OAAO,GAAG,IAAI,oBAAoB,CAAC,UAAU,CAAC,CAAC;AACnD,kBAAe,OAAO,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import WebHookEvent from "./webbookEvent";
|
|
|
5
5
|
import BaseDynamoDBRepository from "./repository/dynamodb";
|
|
6
6
|
import BaseCommunicationService from "./communication";
|
|
7
7
|
import { HashService } from "./hashing";
|
|
8
|
-
import
|
|
8
|
+
import hashIds from "./hashing/idObfuscation";
|
|
9
9
|
import log from "./logger";
|
|
10
10
|
import UrlService from "./shortner";
|
|
11
11
|
import { Utils } from "./utils";
|
|
12
|
-
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService,
|
|
12
|
+
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService, hashIds, log };
|
package/dist/cjs/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.log = exports.
|
|
29
|
+
exports.log = exports.hashIds = exports.UrlService = exports.HashService = exports.BaseDynamoDBRepository = exports.WebHookEvent = exports.BaseCommunicationService = exports.Utils = exports.ENUM = exports.axios = exports.AWS = void 0;
|
|
30
30
|
const aws_1 = require("./aws");
|
|
31
31
|
Object.defineProperty(exports, "AWS", { enumerable: true, get: function () { return aws_1.AWS; } });
|
|
32
32
|
const axios_1 = __importDefault(require("axios"));
|
|
@@ -42,7 +42,7 @@ exports.BaseCommunicationService = communication_1.default;
|
|
|
42
42
|
const hashing_1 = require("./hashing");
|
|
43
43
|
Object.defineProperty(exports, "HashService", { enumerable: true, get: function () { return hashing_1.HashService; } });
|
|
44
44
|
const idObfuscation_1 = __importDefault(require("./hashing/idObfuscation"));
|
|
45
|
-
exports.
|
|
45
|
+
exports.hashIds = idObfuscation_1.default;
|
|
46
46
|
const logger_1 = __importDefault(require("./logger"));
|
|
47
47
|
exports.log = logger_1.default;
|
|
48
48
|
const shortner_1 = __importDefault(require("./shortner"));
|
package/dist/cjs/logger/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -16,9 +7,9 @@ const winston_1 = __importDefault(require("winston"));
|
|
|
16
7
|
const loggerTransports_1 = require("./loggerTransports");
|
|
17
8
|
class Logger {
|
|
18
9
|
constructor() {
|
|
19
|
-
(() =>
|
|
20
|
-
|
|
21
|
-
})
|
|
10
|
+
// (async() => {
|
|
11
|
+
// await this.getLogger();
|
|
12
|
+
// })();
|
|
22
13
|
}
|
|
23
14
|
getLogger() {
|
|
24
15
|
const logType = process.env.LOG_TYPE || 'console';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../logger/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../logger/index.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAC9B,yDAAkF;AAElF,MAAM,MAAM;IAGR;QAEI,gBAAgB;QAChB,8BAA8B;QAC9B,QAAQ;IACZ,CAAC;IAEM,SAAS;QACZ,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,SAAS,CAAC;QAClD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM,CAAC;QAC9C,QAAQ,OAAO,EAAE;YACb,KAAK,KAAK;gBACN,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;gBAC9B,IAAI,CAAC,MAAM,GAAG,iBAAO,CAAC,YAAY,CAAC,IAAA,+BAAY,GAAE,CAAC,CAAC;gBACnD,6DAA6D;gBAC7D,qBAAqB;gBACrB,MAAM;YACV,KAAK,SAAS;gBACV,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;gBACxD,IAAI,CAAC,MAAM,GAAG,iBAAO,CAAC,YAAY,CAAC,IAAA,mCAAgB,GAAE,CAAC,CAAC;gBACvD,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,iBAAO,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,iBAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;gBAC/F,MAAM;YACV,cAAc;YACd,gEAAgE;YAChE,gEAAgE;YAChE,aAAa;YACb,KAAK,MAAM;gBACP,OAAO,CAAC,GAAG,CAAC,4CAA4C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
+
private _hashIds;
|
|
4
|
+
constructor(hashIds: Hashids);
|
|
6
5
|
/**
|
|
7
6
|
* This used to encode the id
|
|
8
7
|
* @param id pass id in string format only
|
|
@@ -10,27 +10,30 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { SSM } from "../aws/services/AWSSSM";
|
|
11
11
|
import { ssmParameter } from '../config/SSMParameters';
|
|
12
12
|
import Hashids from "hashids";
|
|
13
|
-
class
|
|
14
|
-
constructor() {
|
|
15
|
-
this.hashIds = new Hashids();
|
|
16
|
-
(() => __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
yield this.getHashIds();
|
|
18
|
-
}))();
|
|
19
|
-
}
|
|
13
|
+
class defaultHashIds {
|
|
20
14
|
getHashIds() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
try {
|
|
16
|
+
this.config = SSM.getSSMParameter(ssmParameter.idObfuscationSSM);
|
|
17
|
+
return new Hashids(this.config.Salt, +this.config.MinHashLength);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class idObfuscationService {
|
|
25
|
+
constructor(hashIds) {
|
|
26
|
+
this._hashIds = hashIds;
|
|
33
27
|
}
|
|
28
|
+
// private async getHashIds () {
|
|
29
|
+
// try {
|
|
30
|
+
// this.config = await SSM.getSSMParameter(ssmParameter.idObfuscationSSM);
|
|
31
|
+
// this.hashIds = await new Hashids(this.config.Salt, +this.config.MinHashLength);
|
|
32
|
+
// return;
|
|
33
|
+
// } catch (error) {
|
|
34
|
+
// throw error;
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
34
37
|
/**
|
|
35
38
|
* This used to encode the id
|
|
36
39
|
* @param id pass id in string format only
|
|
@@ -39,7 +42,7 @@ class idObfuscationService {
|
|
|
39
42
|
encode(id) {
|
|
40
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
44
|
try {
|
|
42
|
-
return yield this.
|
|
45
|
+
return yield this._hashIds.encode(id);
|
|
43
46
|
}
|
|
44
47
|
catch (error) {
|
|
45
48
|
throw error;
|
|
@@ -54,7 +57,7 @@ class idObfuscationService {
|
|
|
54
57
|
decode(id) {
|
|
55
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
59
|
try {
|
|
57
|
-
return yield this.
|
|
60
|
+
return yield this._hashIds.decode(id)[0];
|
|
58
61
|
}
|
|
59
62
|
catch (error) {
|
|
60
63
|
throw error;
|
|
@@ -62,6 +65,7 @@ class idObfuscationService {
|
|
|
62
65
|
});
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
|
-
let
|
|
68
|
+
let hashConfig = new defaultHashIds().getHashIds();
|
|
69
|
+
let hashIds = new idObfuscationService(hashConfig);
|
|
66
70
|
export default hashIds;
|
|
67
71
|
//# sourceMappingURL=idObfuscation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idObfuscation.js","sourceRoot":"","sources":["../../../hashing/idObfuscation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,
|
|
1
|
+
{"version":3,"file":"idObfuscation.js","sourceRoot":"","sources":["../../../hashing/idObfuscation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,cAAc;IAEX,UAAU;QACf,IAAI;YACA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;YACjE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;SACpE;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,KAAK,CAAC;SACf;IACF,CAAC;CACH;AAED,MAAM,oBAAoB;IAEtB,YAAY,OAAe;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,gCAAgC;IAChC,SAAS;IACT,+EAA+E;IAC/E,uFAAuF;IACvF,eAAe;IACf,qBAAqB;IACrB,oBAAoB;IACpB,KAAK;IACL,KAAK;IAEL;;;;OAIG;IACG,MAAM,CAAC,EAAS;;YAErB,IAAI;gBACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aACvC;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,KAAK,CAAC;aACf;QACF,CAAC;KAAA;IAED;;;;OAIG;IACG,MAAM,CAAC,EAAS;;YAErB,IAAI;gBACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aAC1C;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACF,CAAC;KAAA;CACJ;AAED,IAAI,UAAU,GAAG,IAAI,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC;AACnD,IAAI,OAAO,GAAG,IAAI,oBAAoB,CAAC,UAAU,CAAC,CAAC;AACnD,eAAe,OAAO,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import WebHookEvent from "./webbookEvent";
|
|
|
5
5
|
import BaseDynamoDBRepository from "./repository/dynamodb";
|
|
6
6
|
import BaseCommunicationService from "./communication";
|
|
7
7
|
import { HashService } from "./hashing";
|
|
8
|
-
import
|
|
8
|
+
import hashIds from "./hashing/idObfuscation";
|
|
9
9
|
import log from "./logger";
|
|
10
10
|
import UrlService from "./shortner";
|
|
11
11
|
import { Utils } from "./utils";
|
|
12
|
-
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService,
|
|
12
|
+
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService, hashIds, log };
|
package/dist/esm/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import WebHookEvent from "./webbookEvent";
|
|
|
5
5
|
import BaseDynamoDBRepository from "./repository/dynamodb";
|
|
6
6
|
import BaseCommunicationService from "./communication";
|
|
7
7
|
import { HashService } from "./hashing";
|
|
8
|
-
import
|
|
8
|
+
import hashIds from "./hashing/idObfuscation";
|
|
9
9
|
import log from "./logger";
|
|
10
10
|
import UrlService from "./shortner";
|
|
11
11
|
import { Utils } from "./utils";
|
|
12
|
-
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService,
|
|
12
|
+
export { AWS, axios, ENUM, Utils, BaseCommunicationService, WebHookEvent, BaseDynamoDBRepository, HashService, UrlService, hashIds, log };
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/logger/index.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import winston from "winston";
|
|
11
2
|
import { offTransport, fileTransport, consoleTransport } from "./loggerTransports";
|
|
12
3
|
class Logger {
|
|
13
4
|
constructor() {
|
|
14
|
-
(() =>
|
|
15
|
-
|
|
16
|
-
})
|
|
5
|
+
// (async() => {
|
|
6
|
+
// await this.getLogger();
|
|
7
|
+
// })();
|
|
17
8
|
}
|
|
18
9
|
getLogger() {
|
|
19
10
|
const logType = process.env.LOG_TYPE || 'console';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../logger/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../logger/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAElF,MAAM,MAAM;IAGR;QAEI,gBAAgB;QAChB,8BAA8B;QAC9B,QAAQ;IACZ,CAAC;IAEM,SAAS;QACZ,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,SAAS,CAAC;QAClD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM,CAAC;QAC9C,QAAQ,OAAO,EAAE;YACb,KAAK,KAAK;gBACN,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;gBAC9B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC;gBACnD,6DAA6D;gBAC7D,qBAAqB;gBACrB,MAAM;YACV,KAAK,SAAS;gBACV,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;gBACxD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,CAAC,CAAC;gBACv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