@datapos/datapos-shared 0.3.118 → 0.3.120
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/dist/datapos-shared.es.js +12 -12
- package/package.json +1 -1
|
@@ -117,7 +117,7 @@ class H extends p {
|
|
|
117
117
|
super(t, a, r), this.name = "EngineError";
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class
|
|
120
|
+
class v extends p {
|
|
121
121
|
body;
|
|
122
122
|
constructor(t, a, r, o) {
|
|
123
123
|
super(t, a, o), this.name = "FetchError", this.body = r;
|
|
@@ -135,19 +135,19 @@ class J extends p {
|
|
|
135
135
|
super(t, a, r), this.name = "WindowHandledRuntimeError";
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
class
|
|
138
|
+
class z extends p {
|
|
139
139
|
constructor(t, a, r) {
|
|
140
140
|
super(t, a, r), this.name = "WindowHandledPromiseRejectionError";
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
class
|
|
143
|
+
class W extends I {
|
|
144
144
|
constructor(t, a, r) {
|
|
145
145
|
super(t, a, r), this.name = "OperationalError";
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
async function P(e, t, a) {
|
|
149
149
|
const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
|
|
150
|
-
return new
|
|
150
|
+
return new v(r, a, o);
|
|
151
151
|
}
|
|
152
152
|
function V(e) {
|
|
153
153
|
return e.map((t) => t.message).join(" ");
|
|
@@ -167,7 +167,7 @@ function G(e) {
|
|
|
167
167
|
for (; r && !t.has(r); ) {
|
|
168
168
|
t.add(r);
|
|
169
169
|
let o;
|
|
170
|
-
if (r instanceof
|
|
170
|
+
if (r instanceof v)
|
|
171
171
|
o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
172
172
|
else if (r instanceof N)
|
|
173
173
|
o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
@@ -181,7 +181,7 @@ function G(e) {
|
|
|
181
181
|
}
|
|
182
182
|
return a;
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const D = "en-US", x = {}, K = (e) => {
|
|
185
185
|
switch (e) {
|
|
186
186
|
case "Edm.Binary":
|
|
187
187
|
return "unknown";
|
|
@@ -230,7 +230,7 @@ const v = "en-US", x = {}, K = (e) => {
|
|
|
230
230
|
const t = e.lastIndexOf(".");
|
|
231
231
|
if (t > -1) return e.substring(t + 1);
|
|
232
232
|
}
|
|
233
|
-
}, i = (e, t = 2, a = t, r =
|
|
233
|
+
}, i = (e, t = 2, a = t, r = D) => {
|
|
234
234
|
if (e == null) return "";
|
|
235
235
|
const o = `${r}decimal${t}.${a}`;
|
|
236
236
|
let n = x[o];
|
|
@@ -242,7 +242,7 @@ const v = "en-US", x = {}, K = (e) => {
|
|
|
242
242
|
style: "decimal",
|
|
243
243
|
useGrouping: !0
|
|
244
244
|
}), x[o] = n), n.format(e);
|
|
245
|
-
}, Q = (e) => e == null ? "" : e < 1e3 ? E(e) : e < 1e6 ? `${i(e / 1e3, 2, 0)}K` : e < 1e9 ? `${i(e / 1e6, 2, 0)}M` : e < 1e12 ? `${i(e / 1e9, 2, 0)}B` : `${i(e / 1e12, 2, 0)}T`, Y = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${E(e)} bytes` : e < 1048576 ? `${i(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${i(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${i(e / 1073741824, 2, 0)} GB` : `${i(e / 1099511627776, 2, 0)} TB`, ee = (e) => e == null ? "" : e < 1e3 ? `${E(e)} ms` : e === 1e3 ? `${E(e)} sec` : e < 6e4 ? `${i(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${i(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${i(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${i(e / 864e5, 2, 0)} days`, E = (e, t =
|
|
245
|
+
}, Q = (e) => e == null ? "" : e < 1e3 ? E(e) : e < 1e6 ? `${i(e / 1e3, 2, 0)}K` : e < 1e9 ? `${i(e / 1e6, 2, 0)}M` : e < 1e12 ? `${i(e / 1e9, 2, 0)}B` : `${i(e / 1e12, 2, 0)}T`, Y = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${E(e)} bytes` : e < 1048576 ? `${i(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${i(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${i(e / 1073741824, 2, 0)} GB` : `${i(e / 1099511627776, 2, 0)} TB`, ee = (e) => e == null ? "" : e < 1e3 ? `${E(e)} ms` : e === 1e3 ? `${E(e)} sec` : e < 6e4 ? `${i(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${i(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${i(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${i(e / 864e5, 2, 0)} days`, E = (e, t = D) => {
|
|
246
246
|
if (e == null) return "";
|
|
247
247
|
const a = `${t}decimal0.0`;
|
|
248
248
|
let r = x[a];
|
|
@@ -325,7 +325,7 @@ const v = "en-US", x = {}, K = (e) => {
|
|
|
325
325
|
async function se() {
|
|
326
326
|
try {
|
|
327
327
|
const e = await JSON.parse(await y.readFile("package.json", "utf8")), t = await JSON.parse(await y.readFile("config.json", "utf8")), a = await y.readFile("src/index.ts", "utf8"), r = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(r)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
|
|
328
|
-
|
|
328
|
+
e.name && (t.id = e.name), t.operations = o, e.version && (t.version = e.version), await y.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8");
|
|
329
329
|
} catch (e) {
|
|
330
330
|
console.warn("Error building connector configuration.", e);
|
|
331
331
|
}
|
|
@@ -337,10 +337,10 @@ export {
|
|
|
337
337
|
d as DEFAULT_LOCALE_CODE,
|
|
338
338
|
L as DefaultTimestamp,
|
|
339
339
|
H as EngineError,
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
v as FetchError,
|
|
341
|
+
W as OperationalError,
|
|
342
342
|
N as VueError,
|
|
343
|
-
|
|
343
|
+
z as WindowPromiseRejectionError,
|
|
344
344
|
J as WindowRuntimeError,
|
|
345
345
|
se as buildConnectorConfig,
|
|
346
346
|
P as buildFetchError,
|