@datapos/datapos-shared 0.3.117 → 0.3.119

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.
@@ -117,7 +117,7 @@ class H extends p {
117
117
  super(t, a, r), this.name = "EngineError";
118
118
  }
119
119
  }
120
- class D extends p {
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;
@@ -147,7 +147,7 @@ class z extends I {
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 D(r, a, o);
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 D)
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 v = "en-US", x = {}, K = (e) => {
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 = v) => {
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 = v) => {
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
- await y.writeFile("configNEW.json", JSON.stringify({ ...t, id: e.name, interfaces: o, version: e.version }, void 0, 4), "utf8");
328
+ e.name && (t.id = e.name), t.operations = o, e.version && (t.version = e.version), await y.writeFile("configNEW.json", JSON.stringify(t, void 0, 4), "utf8");
329
329
  } catch (e) {
330
330
  console.warn("Error building connector configuration.", e);
331
331
  }
@@ -337,7 +337,7 @@ export {
337
337
  d as DEFAULT_LOCALE_CODE,
338
338
  L as DefaultTimestamp,
339
339
  H as EngineError,
340
- D as FetchError,
340
+ v as FetchError,
341
341
  z as OperationalError,
342
342
  N as VueError,
343
343
  W as WindowPromiseRejectionError,
@@ -20,7 +20,7 @@ export interface ConnectorModuleConfig extends ModuleConfig {
20
20
  implementations: Record<string, unknown>;
21
21
  icon: string;
22
22
  iconDark: string;
23
- interfaces: ConnectorModuleInterface[];
23
+ operations: ConnectorModuleInterface[];
24
24
  typeId: 'connector';
25
25
  usageId: ConnectorModuleUsageId;
26
26
  vendorAccountURL?: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@datapos/datapos-shared",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.3.117",
5
+ "version": "0.3.119",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"