@digitaldefiance/suite-core-lib 1.1.19 → 1.1.20
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
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/suite-core-lib",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"description": "Generic user system and document system common core for applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"publish:public": "npm publish --access public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@digitaldefiance/ecies-lib": "1.1.
|
|
20
|
-
"@digitaldefiance/i18n-lib": "1.3.
|
|
21
|
-
"@digitaldefiance/node-ecies-lib": "1.1.
|
|
19
|
+
"@digitaldefiance/ecies-lib": "1.1.15",
|
|
20
|
+
"@digitaldefiance/i18n-lib": "1.3.5",
|
|
21
|
+
"@digitaldefiance/node-ecies-lib": "1.1.12"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/core": "^7.28.4",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HandleableErrorOptions } from '../interfaces/handleable-error-options';
|
|
2
|
-
export declare class HandleableError extends Error {
|
|
3
|
-
readonly cause?: Error;
|
|
4
|
-
readonly statusCode: number;
|
|
5
|
-
readonly sourceData?: unknown;
|
|
6
|
-
private _handled;
|
|
7
|
-
constructor(source: Error, options?: HandleableErrorOptions);
|
|
8
|
-
get handled(): boolean;
|
|
9
|
-
set handled(value: boolean);
|
|
10
|
-
toJSON(): Record<string, unknown>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=handleable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleable.d.ts","sourceRoot":"","sources":["../../src/errors/handleable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,qBAAa,eAAgB,SAAQ,KAAK;IACxC,SAAgB,KAAK,CAAC,EAAE,KAAK,CAAC;IAC9B,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAU;gBAEd,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,sBAAsB;IAkB3D,IAAW,OAAO,IAAI,OAAO,CAE5B;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,OAAO,EAEhC;IAEM,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAczC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HandleableError = void 0;
|
|
4
|
-
class HandleableError extends Error {
|
|
5
|
-
constructor(source, options) {
|
|
6
|
-
super(source.message);
|
|
7
|
-
this.name = this.constructor.name;
|
|
8
|
-
this.cause = source;
|
|
9
|
-
this.statusCode = options?.statusCode ?? 500;
|
|
10
|
-
this._handled = options?.handled ?? false;
|
|
11
|
-
this.sourceData = options?.sourceData;
|
|
12
|
-
// Capture stack trace - prioritize source stack, then capture new one
|
|
13
|
-
if (source.stack) {
|
|
14
|
-
this.stack = source.stack;
|
|
15
|
-
}
|
|
16
|
-
else if (Error.captureStackTrace) {
|
|
17
|
-
Error.captureStackTrace(this, this.constructor);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
this.stack = new Error().stack;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
get handled() {
|
|
24
|
-
return this._handled;
|
|
25
|
-
}
|
|
26
|
-
set handled(value) {
|
|
27
|
-
this._handled = value;
|
|
28
|
-
}
|
|
29
|
-
toJSON() {
|
|
30
|
-
return {
|
|
31
|
-
name: this.name,
|
|
32
|
-
message: this.message,
|
|
33
|
-
statusCode: this.statusCode,
|
|
34
|
-
handled: this.handled,
|
|
35
|
-
stack: this.stack,
|
|
36
|
-
cause: this.cause instanceof HandleableError
|
|
37
|
-
? this.cause.toJSON()
|
|
38
|
-
: this.cause?.message,
|
|
39
|
-
...(this.sourceData ? { sourceData: this.sourceData } : {}),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.HandleableError = HandleableError;
|
|
44
|
-
//# sourceMappingURL=handleable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleable.js","sourceRoot":"","sources":["../../src/errors/handleable.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAgB,SAAQ,KAAK;IAMxC,YAAY,MAAa,EAAE,OAAgC;QACzD,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,EAAE,UAAU,CAAC;QAEtC,sEAAsE;QACtE,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC5B,CAAC;aAAM,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YACnC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;QACjC,CAAC;IACH,CAAC;IAED,IAAW,OAAO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