@datapos/datapos-shared 0.3.410 → 0.3.412

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.
@@ -31,9 +31,9 @@ class m extends a {
31
31
  }
32
32
  class w extends a {
33
33
  }
34
- class b extends a {
34
+ class h extends a {
35
35
  }
36
- async function h(e, o, t) {
36
+ async function b(e, o, t) {
37
37
  const r = ` - ${e.statusText}`, n = `${o} Response status '${e.status}${e.statusText ? r : ""}' received.`;
38
38
  let s;
39
39
  try {
@@ -46,6 +46,12 @@ async function h(e, o, t) {
46
46
  function k(e) {
47
47
  return e.map((o) => o.message).join(" ");
48
48
  }
49
+ function x(e) {
50
+ try {
51
+ e();
52
+ } catch {
53
+ }
54
+ }
49
55
  function l(e) {
50
56
  if (e instanceof Error) return e;
51
57
  if (typeof e == "string") return new Error(e);
@@ -59,7 +65,7 @@ function l(e) {
59
65
  }
60
66
  return new Error("Unknown error");
61
67
  }
62
- function x(e) {
68
+ function R(e) {
63
69
  const o = /* @__PURE__ */ new Set(), t = [];
64
70
  let r = e;
65
71
  for (; r != null && !o.has(r); ) {
@@ -108,10 +114,11 @@ export {
108
114
  c as FetchError,
109
115
  y as OperationalError,
110
116
  m as VueHandledError,
111
- b as WindowHandledPromiseRejectionError,
117
+ h as WindowHandledPromiseRejectionError,
112
118
  w as WindowHandledRuntimeError,
113
- h as buildFetchError,
119
+ b as buildFetchError,
114
120
  k as concatenateSerialisedErrorMessages,
121
+ x as ignoreErrors,
115
122
  l as normalizeToError,
116
- x as serialiseError
123
+ R as serialiseError
117
124
  };
@@ -67,6 +67,8 @@ declare function buildFetchError(response: {
67
67
  }, message: string, locator: string): Promise<FetchError>;
68
68
  /** Concatenates serialized error messages into a single string. */
69
69
  declare function concatenateSerialisedErrorMessages(serialisedErrors: SerialisedError[]): string;
70
+ /** Ignore best-effort cleanup errors to keep teardown noise-free. */
71
+ declare function ignoreErrors(action: () => void): void;
70
72
  /** Normalizes an unknown thrown value into an {@link Error}.
71
73
  * This function should be used at error boundaries to guarantee consistent error handling.
72
74
  */
@@ -80,4 +82,4 @@ declare function serialiseError(error?: unknown): SerialisedError[];
80
82
  /** Exports. */
81
83
  export type { SerialisedError };
82
84
  export { ApplicationError, APIError, EngineError, FetchError, OperationalError, VueHandledError, WindowHandledRuntimeError, WindowHandledPromiseRejectionError };
83
- export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError };
85
+ export { buildFetchError, concatenateSerialisedErrorMessages, ignoreErrors, normalizeToError, serialiseError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.410",
3
+ "version": "0.3.412",
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>",