@cryptexlabs/codex-nodejs-common 0.10.16 → 0.10.18

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptexlabs/codex-nodejs-common",
3
- "version": "0.10.16",
3
+ "version": "0.10.18",
4
4
  "description": "Common code for Codex framework",
5
5
  "main": "lib/src/index.js",
6
6
  "repository": "git@gitlab.com:cryptexlabs/public/codex-nodejs-common.git",
@@ -17,3 +17,4 @@ export * from "./prometheus-config.interface";
17
17
  export * from "./pagination-config.interface";
18
18
  export * from "./xray-config.interface";
19
19
  export * from "./logging-config.interface";
20
+ export * from "./redis-config.interface";
@@ -33,4 +33,5 @@ __exportStar(require("./prometheus-config.interface"), exports);
33
33
  __exportStar(require("./pagination-config.interface"), exports);
34
34
  __exportStar(require("./xray-config.interface"), exports);
35
35
  __exportStar(require("./logging-config.interface"), exports);
36
+ __exportStar(require("./redis-config.interface"), exports);
36
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA4D;AAC5D,mDAAiC;AACjC,wDAAsC;AACtC,gEAA8C;AAC9C,8DAA4C;AAC5C,0DAAwC;AACxC,yDAAuC;AACvC,wDAAsC;AACtC,4DAA0C;AAC1C,kDAAgC;AAChC,0DAAwC;AACxC,uDAAqC;AACrC,yDAAuC;AACvC,8DAA4C;AAC5C,4DAA0C;AAC1C,gEAA8C;AAC9C,gEAA8C;AAC9C,0DAAwC;AACxC,6DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA4D;AAC5D,mDAAiC;AACjC,wDAAsC;AACtC,gEAA8C;AAC9C,8DAA4C;AAC5C,0DAAwC;AACxC,yDAAuC;AACvC,wDAAsC;AACtC,4DAA0C;AAC1C,kDAAgC;AAChC,0DAAwC;AACxC,uDAAqC;AACrC,yDAAuC;AACvC,8DAA4C;AAC5C,4DAA0C;AAC1C,gEAA8C;AAC9C,gEAA8C;AAC9C,0DAAwC;AACxC,6DAA2C;AAC3C,2DAAyC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./friendly-http-exception";
2
2
  export * from "./contextual.http.exception";
3
+ export * from "./not-implemented.error";
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./friendly-http-exception"), exports);
18
18
  __exportStar(require("./contextual.http.exception"), exports);
19
+ __exportStar(require("./not-implemented.error"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exception/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,8DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exception/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,8DAA4C;AAC5C,0DAAwC"}
@@ -0,0 +1,5 @@
1
+ export declare class NotImplementedError extends Error {
2
+ private constructor();
3
+ static throw<T>(): T;
4
+ static make(): NotImplementedError;
5
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotImplementedError = void 0;
4
+ class NotImplementedError extends Error {
5
+ constructor(clazzMethod) {
6
+ super(`${clazzMethod} not implemented`);
7
+ }
8
+ static throw() {
9
+ throw this.make();
10
+ }
11
+ static make() {
12
+ try {
13
+ throw new Error();
14
+ }
15
+ catch (e) {
16
+ const stack = e.stack || "";
17
+ const stackLines = stack.split("\n");
18
+ const callerLine = stackLines[3];
19
+ const match = callerLine.match(/at (\S+)/);
20
+ if (match && match.length > 1) {
21
+ return new NotImplementedError(match[1]);
22
+ }
23
+ else {
24
+ return new NotImplementedError("Unknown");
25
+ }
26
+ }
27
+ }
28
+ }
29
+ exports.NotImplementedError = NotImplementedError;
30
+ //# sourceMappingURL=not-implemented.error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-implemented.error.js","sourceRoot":"","sources":["../../../src/exception/not-implemented.error.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAoB,WAAW;QAC7B,KAAK,CAAC,GAAG,WAAW,kBAAkB,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,KAAK;QACjB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAEM,MAAM,CAAC,IAAI;QAChB,IAAI,CAAC;YACH,MAAM,IAAI,KAAK,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAC5B,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACrC,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAC3C,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC9B,OAAO,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAxBD,kDAwBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptexlabs/codex-nodejs-common",
3
- "version": "0.10.16",
3
+ "version": "0.10.18",
4
4
  "description": "Common code for Codex framework",
5
5
  "main": "lib/src/index.js",
6
6
  "repository": "git@gitlab.com:cryptexlabs/public/codex-nodejs-common.git",
@@ -17,3 +17,4 @@ export * from "./prometheus-config.interface";
17
17
  export * from "./pagination-config.interface";
18
18
  export * from "./xray-config.interface";
19
19
  export * from "./logging-config.interface";
20
+ export * from "./redis-config.interface";
@@ -1,2 +1,3 @@
1
1
  export * from "./friendly-http-exception";
2
2
  export * from "./contextual.http.exception";
3
+ export * from "./not-implemented.error";
@@ -0,0 +1,25 @@
1
+ export class NotImplementedError extends Error {
2
+ private constructor(clazzMethod) {
3
+ super(`${clazzMethod} not implemented`);
4
+ }
5
+
6
+ public static throw<T>(): T {
7
+ throw this.make();
8
+ }
9
+
10
+ public static make() {
11
+ try {
12
+ throw new Error();
13
+ } catch (e) {
14
+ const stack = e.stack || "";
15
+ const stackLines = stack.split("\n");
16
+ const callerLine = stackLines[3];
17
+ const match = callerLine.match(/at (\S+)/);
18
+ if (match && match.length > 1) {
19
+ return new NotImplementedError(match[1]);
20
+ } else {
21
+ return new NotImplementedError("Unknown");
22
+ }
23
+ }
24
+ }
25
+ }