@datapos/datapos-shared 0.3.533 → 0.3.535

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.
@@ -53,19 +53,17 @@ function y(r) {
53
53
  }
54
54
  }
55
55
  function i(r) {
56
- if (r != null) {
57
- if (r instanceof Error) return r;
58
- if (typeof r == "string") return new Error(r);
59
- if (typeof r == "number" || typeof r == "boolean" || typeof r == "bigint") return new Error(String(r));
60
- if (typeof r == "symbol") return new Error(r.description ?? "Unknown error");
61
- if (typeof r == "object")
62
- try {
63
- return new Error(JSON.stringify(r));
64
- } catch {
65
- return new Error("Unknown error");
66
- }
67
- return new Error("Unknown error");
68
- }
56
+ if (r instanceof Error) return r;
57
+ if (typeof r == "string") return new Error(r);
58
+ if (typeof r == "number" || typeof r == "boolean" || typeof r == "bigint") return new Error(String(r));
59
+ if (typeof r == "symbol") return new Error(r.description ?? "Unknown error");
60
+ if (typeof r == "object")
61
+ try {
62
+ return new Error(JSON.stringify(r));
63
+ } catch {
64
+ return new Error("Unknown error");
65
+ }
66
+ return new Error("Unknown error");
69
67
  }
70
68
  function R(r) {
71
69
  const n = /* @__PURE__ */ new Set(), o = [];
@@ -152,10 +152,10 @@ interface DropObjectOptions extends EngineOperationOptions {
152
152
  interface FindObjectOptions extends EngineOperationOptions {
153
153
  containerId: string | undefined;
154
154
  nodeId: string;
155
- object: unknown;
156
155
  }
157
156
  interface FindObjectResult {
158
157
  folderPath: string;
158
+ object: unknown;
159
159
  }
160
160
  /**
161
161
  * Get readable stream options.
@@ -72,7 +72,7 @@ declare function ignoreErrors(action: () => void): void;
72
72
  /** Normalizes an unknown thrown value into an {@link Error}.
73
73
  * This function should be used at error boundaries to guarantee consistent error handling.
74
74
  */
75
- declare function normalizeToError(value?: unknown): Error | undefined;
75
+ declare function normalizeToError(value: unknown): Error;
76
76
  /** Serializes an error and its cause chain into a flat structure.
77
77
  * - Errors are ordered from outermost to root cause.
78
78
  * - Cycles in the cause chain are safely ignored.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.533",
3
+ "version": "0.3.535",
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>",