@datapos/datapos-shared 0.3.576 → 0.3.578

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.
@@ -6,9 +6,8 @@ class c extends Error {
6
6
  }
7
7
  }
8
8
  class y extends c {
9
- trace;
10
- constructor(s, o, r, t) {
11
- super(s, o, t), this.name = "AppError", this.trace = r;
9
+ constructor(s, o, r) {
10
+ super(s, o, r), this.name = "AppError";
12
11
  }
13
12
  }
14
13
  class E extends c {
@@ -45,10 +44,10 @@ async function b(e, s, o) {
45
44
  }
46
45
  return new i(t, o, n);
47
46
  }
48
- function k(e) {
47
+ function p(e) {
49
48
  return e.map((s) => s.message).join(" ");
50
49
  }
51
- function p(e) {
50
+ function k(e) {
52
51
  try {
53
52
  e();
54
53
  } catch {
@@ -79,6 +78,10 @@ function h(e) {
79
78
  t = { body: n.body, locator: n.locator, message: r.message, name: "APIError", stack: r.stack }, r = r.cause == null ? null : a(r.cause);
80
79
  break;
81
80
  }
81
+ case "AppError": {
82
+ t = { body: void 0, locator: r.locator, message: r.message, name: "AppError", stack: r.stack }, r = r.cause == null ? null : a(r.cause);
83
+ break;
84
+ }
82
85
  case "ConnectorError": {
83
86
  t = { body: void 0, locator: r.locator, message: r.message, name: "ConnectorError", stack: r.stack }, r = r.cause == null ? null : a(r.cause);
84
87
  break;
@@ -93,7 +96,7 @@ function h(e) {
93
96
  break;
94
97
  }
95
98
  default:
96
- r.name ? (t = { body: void 0, locator: "", message: r.message, name: r.name, stack: r.stack }, r = r.cause == null ? null : a(r.cause)) : (t = { body: void 0, locator: "", message: f(r), name: "Error", stack: void 0 }, r = null);
99
+ r.name ? (t = { body: void 0, locator: "", message: r.message, name: r.name, stack: r.stack }, r = r.cause == null ? null : a(r.cause)) : (t = { body: void 0, locator: "", message: g(r), name: "Error", stack: void 0 }, r = null);
97
100
  }
98
101
  /(?:\.{3}|[.!?])$/.test(t.message) || (t.message += "."), o.push(t);
99
102
  }
@@ -125,7 +128,7 @@ function w(e) {
125
128
  }
126
129
  return s;
127
130
  }
128
- function f(e) {
131
+ function g(e) {
129
132
  let s;
130
133
  try {
131
134
  s = JSON.stringify(e);
@@ -146,8 +149,8 @@ export {
146
149
  d as EngineError,
147
150
  i as FetchError,
148
151
  b as buildFetchError,
149
- k as concatenateSerialisedErrorMessages,
150
- p as ignoreErrors,
152
+ p as concatenateSerialisedErrorMessages,
153
+ k as ignoreErrors,
151
154
  a as normalizeToError,
152
155
  h as serialiseError,
153
156
  w as unserialiseError
@@ -10,8 +10,7 @@ export declare class DPUError extends Error {
10
10
  constructor(message: string, locator: string, options?: ErrorOptions);
11
11
  }
12
12
  export declare class AppError extends DPUError {
13
- readonly trace: SerialisedError[] | undefined;
14
- constructor(message: string, locator: string, trace: SerialisedError[] | undefined, options?: ErrorOptions);
13
+ constructor(message: string, locator: string, options?: ErrorOptions);
15
14
  }
16
15
  export declare class APIError extends DPUError {
17
16
  readonly body: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.576",
3
+ "version": "0.3.578",
4
4
  "description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",