chatbot-nc 2.0.53 → 2.0.54
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.
|
@@ -16,20 +16,26 @@ const AWSSSM_1 = require("../aws/services/AWSSSM");
|
|
|
16
16
|
const SSMParameters_1 = require("../config/SSMParameters");
|
|
17
17
|
const hashids_1 = __importDefault(require("hashids"));
|
|
18
18
|
class defaultHashIds {
|
|
19
|
+
constructor() {
|
|
20
|
+
(() => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
console.log("Called Constructor");
|
|
22
|
+
yield this.getSSMParam();
|
|
23
|
+
}))();
|
|
24
|
+
}
|
|
25
|
+
getSSMParam() {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
try {
|
|
28
|
+
this.config = yield AWSSSM_1.SSM.getSSMParameter(SSMParameters_1.ssmParameter.idObfuscationSSM);
|
|
29
|
+
console.log("Config Set", JSON.stringify(this.config));
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
19
36
|
getHashIds() {
|
|
20
37
|
try {
|
|
21
|
-
|
|
22
|
-
console.log("In Promise");
|
|
23
|
-
let response = AWSSSM_1.SSM.getSSMParameter(SSMParameters_1.ssmParameter.idObfuscationSSM).then(result => {
|
|
24
|
-
return result;
|
|
25
|
-
});
|
|
26
|
-
resolve(response);
|
|
27
|
-
});
|
|
28
|
-
promise.then((result) => {
|
|
29
|
-
console.log("In Resolve then Promise", JSON.stringify(result));
|
|
30
|
-
this.config = result;
|
|
31
|
-
});
|
|
32
|
-
console.log("In Response", JSON.stringify(this.config));
|
|
38
|
+
console.log("Return HashId with config", JSON.stringify(this.config));
|
|
33
39
|
return new hashids_1.default(this.config.Salt, +this.config.MinHashLength);
|
|
34
40
|
}
|
|
35
41
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idObfuscation.js","sourceRoot":"","sources":["../../../hashing/idObfuscation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"idObfuscation.js","sourceRoot":"","sources":["../../../hashing/idObfuscation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,mDAA4C;AAC5C,2DAAuD;AACvD,sDAA8B;AAE9B,MAAM,cAAc;IAGlB;QAEE,CAAC,GAAQ,EAAE;YACL,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/B,CAAC,CAAA,CAAC,EAAE,CAAC;IACP,CAAC;IAEa,WAAW;;YACvB,IAAI;gBACF,IAAI,CAAC,MAAM,GAAG,MAAM,YAAG,CAAC,eAAe,CAAC,4BAAY,CAAC,gBAAgB,CAAC,CAAC;gBACvE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;aACxD;YAAC,OAAO,KAAK,EAAE;gBACb,MAAM,KAAK,CAAC;aACd;QACH,CAAC;KAAA;IAEM,UAAU;QACf,IAAI;YACF,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACrE,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;SAClE;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,KAAK,CAAC;SACf;IACH,CAAC;CACF;AAED,MAAM,oBAAoB;IAGtB,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"}
|
|
@@ -11,20 +11,26 @@ import { SSM } from "../aws/services/AWSSSM";
|
|
|
11
11
|
import { ssmParameter } from '../config/SSMParameters';
|
|
12
12
|
import Hashids from "hashids";
|
|
13
13
|
class defaultHashIds {
|
|
14
|
+
constructor() {
|
|
15
|
+
(() => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
console.log("Called Constructor");
|
|
17
|
+
yield this.getSSMParam();
|
|
18
|
+
}))();
|
|
19
|
+
}
|
|
20
|
+
getSSMParam() {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
try {
|
|
23
|
+
this.config = yield SSM.getSSMParameter(ssmParameter.idObfuscationSSM);
|
|
24
|
+
console.log("Config Set", JSON.stringify(this.config));
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
14
31
|
getHashIds() {
|
|
15
32
|
try {
|
|
16
|
-
|
|
17
|
-
console.log("In Promise");
|
|
18
|
-
let response = SSM.getSSMParameter(ssmParameter.idObfuscationSSM).then(result => {
|
|
19
|
-
return result;
|
|
20
|
-
});
|
|
21
|
-
resolve(response);
|
|
22
|
-
});
|
|
23
|
-
promise.then((result) => {
|
|
24
|
-
console.log("In Resolve then Promise", JSON.stringify(result));
|
|
25
|
-
this.config = result;
|
|
26
|
-
});
|
|
27
|
-
console.log("In Response", JSON.stringify(this.config));
|
|
33
|
+
console.log("Return HashId with config", JSON.stringify(this.config));
|
|
28
34
|
return new Hashids(this.config.Salt, +this.config.MinHashLength);
|
|
29
35
|
}
|
|
30
36
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idObfuscation.js","sourceRoot":"","sources":["../../../hashing/idObfuscation.ts"],"names":[],"mappings":";;;;;;;;;
|
|
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;IAGlB;QAEE,CAAC,GAAQ,EAAE;YACL,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/B,CAAC,CAAA,CAAC,EAAE,CAAC;IACP,CAAC;IAEa,WAAW;;YACvB,IAAI;gBACF,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;gBACvE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;aACxD;YAAC,OAAO,KAAK,EAAE;gBACb,MAAM,KAAK,CAAC;aACd;QACH,CAAC;KAAA;IAEM,UAAU;QACf,IAA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