@datapos/datapos-shared 0.3.123 → 0.3.124

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.
@@ -1,5 +1,5 @@
1
- import { promises as y } from "fs";
2
- const L = 0, k = (e) => e, j = () => Date.now(), M = {
1
+ import { promises as i } from "fs";
2
+ const j = 0, _ = (e) => e, J = () => Date.now(), L = {
3
3
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
4
4
  cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
5
5
  cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
@@ -18,141 +18,141 @@ const L = 0, k = (e) => e, j = () => Date.now(), M = {
18
18
  streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
19
19
  values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
20
20
  };
21
- function U() {
21
+ function M() {
22
22
  function e(r, a, t) {
23
23
  t.textContent = "Cytoscape.js diagram goes here...";
24
24
  }
25
25
  return { render: e };
26
26
  }
27
- function B() {
27
+ function U() {
28
28
  function e(r, a, t) {
29
29
  t.textContent = "values table goes here...";
30
30
  }
31
31
  return { render: e };
32
32
  }
33
- const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", I = "highcharts";
34
- let b, T = !1;
35
- function H() {
36
- async function e(o, s, d, c) {
33
+ const O = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", E = "highcharts";
34
+ let b, S = !1;
35
+ function B() {
36
+ async function e(n, s, u, d) {
37
37
  await t();
38
- const i = [];
39
- for (const u of s.data.measures)
40
- i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
41
- const p = {
42
- chart: { type: o.options.highchartsType },
38
+ const c = [];
39
+ for (const g of s.data.measures)
40
+ c.push({ type: n.options.highchartsType, name: g.name, data: g.data });
41
+ const f = {
42
+ chart: { type: n.options.highchartsType },
43
43
  plotOptions: { series: { borderColor: "#333" } },
44
- series: i,
44
+ series: c,
45
45
  title: { text: s.title.text },
46
46
  xAxis: { categories: s.data.categoryLabels },
47
47
  yAxis: { title: { text: s.data.name } }
48
- }, m = b.chart(d, p, c);
49
- return { chart: m, resize: () => m.reflow(), vendorId: I };
48
+ }, m = b.chart(u, f, d);
49
+ return { chart: m, resize: () => m.reflow(), vendorId: E };
50
50
  }
51
- async function r(o, s, d, c) {
52
- await Promise.all([t(), n()]);
53
- const i = [];
54
- for (const u of s.data.measures)
55
- i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
56
- const p = {
51
+ async function r(n, s, u, d) {
52
+ await Promise.all([t(), o()]);
53
+ const c = [];
54
+ for (const g of s.data.measures)
55
+ c.push({ type: n.options.highchartsType, name: g.name, data: g.data });
56
+ const f = {
57
57
  chart: { polar: !0 },
58
58
  plotOptions: { series: { borderColor: "#333" } },
59
- series: i,
59
+ series: c,
60
60
  title: { text: s.title.text },
61
61
  xAxis: { categories: s.data.categoryLabels },
62
62
  yAxis: { title: { text: s.data.name } }
63
- }, m = b.chart(d, p, c);
64
- return { chart: m, resize: () => m.reflow(), vendorId: I };
63
+ }, m = b.chart(u, f, d);
64
+ return { chart: m, resize: () => m.reflow(), vendorId: E };
65
65
  }
66
- async function a(o, s, d, c) {
67
- await Promise.all([t(), n()]);
68
- const i = [], p = [];
69
- for (let f = 0; f < s.data.measures[0].data.length; f++)
70
- p.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
71
- i.push({ type: o.options.highchartsType, name: "Unknown", data: p });
66
+ async function a(n, s, u, d) {
67
+ await Promise.all([t(), o()]);
68
+ const c = [], f = [];
69
+ for (let y = 0; y < s.data.measures[0].data.length; y++)
70
+ f.push([s.data.measures[0].data[y][0], s.data.measures[1].data[y][0]]);
71
+ c.push({ type: n.options.highchartsType, name: "Unknown", data: f });
72
72
  const m = {
73
- chart: { type: o.options.highchartsType, inverted: o.options.inverted },
73
+ chart: { type: n.options.highchartsType, inverted: n.options.inverted },
74
74
  plotOptions: { series: { borderColor: "#333" } },
75
- series: i,
75
+ series: c,
76
76
  title: { text: s.title.text },
77
77
  xAxis: { categories: s.data.categoryLabels },
78
78
  yAxis: { title: { text: s.data.name } }
79
- }, u = b.chart(d, m, c);
80
- return { chart: u, resize: () => u.reflow(), vendorId: I };
79
+ }, g = b.chart(u, m, d);
80
+ return { chart: g, resize: () => g.reflow(), vendorId: E };
81
81
  }
82
82
  async function t() {
83
83
  if (b) return;
84
- const o = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${o}highcharts.src.js`, d = `${o}modules/accessibility.src.js`;
84
+ const n = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${n}highcharts.src.js`, u = `${n}modules/accessibility.src.js`;
85
85
  b = (await import(
86
86
  /* @vite-ignore */
87
87
  s
88
88
  )).default, await import(
89
89
  /* @vite-ignore */
90
- d
90
+ u
91
91
  );
92
92
  }
93
- async function n() {
94
- if (T) return;
95
- await import(`${S}highcharts-more.src.js`), T = !0;
93
+ async function o() {
94
+ if (S) return;
95
+ await import(`${O}highcharts-more.src.js`), S = !0;
96
96
  }
97
97
  return { renderCartesianChart: e, renderPolarChart: r, renderRangeChart: a };
98
98
  }
99
- class w extends Error {
99
+ class v extends Error {
100
100
  locator;
101
101
  constructor(r, a, t) {
102
102
  super(r, t), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
103
103
  }
104
104
  }
105
- class h extends w {
105
+ class h extends v {
106
106
  constructor(r, a, t) {
107
107
  super(r, a, t), this.name = "ApplicationError";
108
108
  }
109
109
  }
110
- class J extends h {
110
+ class z extends h {
111
111
  constructor(r, a, t) {
112
112
  super(r, a, t), this.name = "APIError";
113
113
  }
114
114
  }
115
- class P extends h {
115
+ class H extends h {
116
116
  constructor(r, a, t) {
117
117
  super(r, a, t), this.name = "EngineError";
118
118
  }
119
119
  }
120
- class v extends h {
120
+ class I extends h {
121
121
  body;
122
- constructor(r, a, t, n) {
123
- super(r, a, n), this.name = "FetchError", this.body = t;
122
+ constructor(r, a, t, o) {
123
+ super(r, a, o), this.name = "FetchError", this.body = t;
124
124
  }
125
125
  }
126
- class N extends h {
126
+ class T extends h {
127
127
  componentName;
128
128
  info;
129
- constructor(r, a, t, n, o) {
130
- super(r, a, o), this.name = "VueHandledError", this.info = t, this.componentName = n;
129
+ constructor(r, a, t, o, n) {
130
+ super(r, a, n), this.name = "VueHandledError", this.info = t, this.componentName = o;
131
131
  }
132
132
  }
133
- class z extends h {
133
+ class P extends h {
134
134
  constructor(r, a, t) {
135
135
  super(r, a, t), this.name = "WindowHandledRuntimeError";
136
136
  }
137
137
  }
138
- class W extends h {
138
+ class V extends h {
139
139
  constructor(r, a, t) {
140
140
  super(r, a, t), this.name = "WindowHandledPromiseRejectionError";
141
141
  }
142
142
  }
143
- class V extends w {
143
+ class W extends v {
144
144
  constructor(r, a, t) {
145
145
  super(r, a, t), this.name = "OperationalError";
146
146
  }
147
147
  }
148
148
  async function X(e, r, a) {
149
- const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
150
- return new v(t, a, n);
149
+ const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
150
+ return new I(t, a, o);
151
151
  }
152
152
  function G(e) {
153
153
  return e.map((r) => r.message).join(" ");
154
154
  }
155
- function K(e, r = "Unknown error.") {
155
+ function Z(e, r = "Unknown error.") {
156
156
  if (e instanceof Error) return e;
157
157
  if (typeof e == "string") return new Error(e);
158
158
  try {
@@ -161,27 +161,27 @@ function K(e, r = "Unknown error.") {
161
161
  return new Error(r);
162
162
  }
163
163
  }
164
- function Z(e) {
164
+ function K(e) {
165
165
  const r = /* @__PURE__ */ new Set(), a = [];
166
166
  let t = e;
167
167
  for (; t && !r.has(t); ) {
168
168
  r.add(t);
169
- let n;
170
- if (t instanceof v)
171
- n = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
172
- else if (t instanceof N)
173
- n = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
174
- else if (t instanceof w)
175
- n = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
169
+ let o;
170
+ if (t instanceof I)
171
+ o = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
172
+ else if (t instanceof T)
173
+ o = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
174
+ else if (t instanceof v)
175
+ o = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
176
176
  else if (t instanceof Error) {
177
- const o = t;
178
- n = { locator: "", message: o.message, name: o.name, stack: o.stack }, t = o.cause;
179
- } else t ? (n = { locator: "", message: String(t), name: "Error" }, t = void 0) : (n = { locator: "", message: "Unknown error.", name: "Error" }, t = void 0);
180
- /(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), a.push(n);
177
+ const n = t;
178
+ o = { locator: "", message: n.message, name: n.name, stack: n.stack }, t = n.cause;
179
+ } else t ? (o = { locator: "", message: String(t), name: "Error" }, t = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, t = void 0);
180
+ /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), a.push(o);
181
181
  }
182
182
  return a;
183
183
  }
184
- const D = "en-US", E = {}, q = (e) => {
184
+ const N = "en-US", w = {}, q = (e) => {
185
185
  switch (e) {
186
186
  case "Edm.Binary":
187
187
  return "unknown";
@@ -230,22 +230,22 @@ const D = "en-US", E = {}, q = (e) => {
230
230
  const r = e.lastIndexOf(".");
231
231
  if (r > -1) return e.substring(r + 1);
232
232
  }
233
- }, l = (e, r = 2, a = r, t = D) => {
233
+ }, l = (e, r = 2, a = r, t = N) => {
234
234
  if (e == null) return "";
235
- const n = `${t}decimal${r}.${a}`;
236
- let o = E[n];
237
- return o || (o = new Intl.NumberFormat(t, {
235
+ const o = `${t}decimal${r}.${a}`;
236
+ let n = w[o];
237
+ return n || (n = new Intl.NumberFormat(t, {
238
238
  localeMatcher: "best fit",
239
239
  maximumFractionDigits: r,
240
240
  minimumFractionDigits: a,
241
241
  minimumIntegerDigits: 1,
242
242
  style: "decimal",
243
243
  useGrouping: !0
244
- }), E[n] = o), o.format(e);
245
- }, ee = (e) => e == null ? "" : e < 1e3 ? x(e) : e < 1e6 ? `${l(e / 1e3, 2, 0)}K` : e < 1e9 ? `${l(e / 1e6, 2, 0)}M` : e < 1e12 ? `${l(e / 1e9, 2, 0)}B` : `${l(e / 1e12, 2, 0)}T`, te = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(e)} bytes` : e < 1048576 ? `${l(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${l(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${l(e / 1073741824, 2, 0)} GB` : `${l(e / 1099511627776, 2, 0)} TB`, re = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(e)} sec` : e < 6e4 ? `${l(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${l(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${l(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${l(e / 864e5, 2, 0)} days`, x = (e, r = D) => {
244
+ }), w[o] = n), n.format(e);
245
+ }, ee = (e) => e == null ? "" : e < 1e3 ? x(e) : e < 1e6 ? `${l(e / 1e3, 2, 0)}K` : e < 1e9 ? `${l(e / 1e6, 2, 0)}M` : e < 1e12 ? `${l(e / 1e9, 2, 0)}B` : `${l(e / 1e12, 2, 0)}T`, te = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(e)} bytes` : e < 1048576 ? `${l(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${l(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${l(e / 1073741824, 2, 0)} GB` : `${l(e / 1099511627776, 2, 0)} TB`, re = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(e)} sec` : e < 6e4 ? `${l(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${l(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${l(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${l(e / 864e5, 2, 0)} days`, x = (e, r = N) => {
246
246
  if (e == null) return "";
247
247
  const a = `${r}decimal0.0`;
248
- let t = E[a];
248
+ let t = w[a];
249
249
  return t || (t = new Intl.NumberFormat(r, {
250
250
  localeMatcher: "best fit",
251
251
  maximumFractionDigits: 0,
@@ -253,7 +253,7 @@ const D = "en-US", E = {}, q = (e) => {
253
253
  minimumIntegerDigits: 1,
254
254
  style: "decimal",
255
255
  useGrouping: !0
256
- }), E[a] = t), t.format(e);
256
+ }), w[a] = t), t.format(e);
257
257
  }, ae = (e) => {
258
258
  switch (e) {
259
259
  case "csv":
@@ -268,7 +268,7 @@ const D = "en-US", E = {}, q = (e) => {
268
268
  default:
269
269
  return "application/octet-stream";
270
270
  }
271
- }, O = [
271
+ }, D = [
272
272
  { id: "dtv", label: { "en-gb": "Delimited Text" } },
273
273
  { id: "e/e", label: { "en-gb": "Entity/Event" } },
274
274
  { id: "jsonArray", label: { "en-gb": "JSON Array" } },
@@ -276,9 +276,9 @@ const D = "en-US", E = {}, q = (e) => {
276
276
  { id: "xls", label: { "en-gb": "XLS" } },
277
277
  { id: "xlsx", label: { "en-gb": "XLSX" } },
278
278
  { id: "xml", label: { "en-gb": "XML" } }
279
- ], ne = (e = g) => {
279
+ ], ne = (e = p) => {
280
280
  const r = [];
281
- for (const a of O) r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
281
+ for (const a of D) r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
282
282
  return r;
283
283
  }, C = [
284
284
  { id: `
@@ -286,12 +286,12 @@ const D = "en-US", E = {}, q = (e) => {
286
286
  { id: "\r", label: { "en-gb": "Carriage Return" } },
287
287
  { id: `\r
288
288
  `, label: { "en-gb": "Carriage Return/Newline" } }
289
- ], oe = (e = g) => {
289
+ ], oe = (e = p) => {
290
290
  const r = [];
291
291
  for (const a of C)
292
- r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
292
+ r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
293
293
  return r;
294
- }, R = [
294
+ }, A = [
295
295
  { id: ":", label: { "en-gb": "Colon" } },
296
296
  { id: ",", label: { "en-gb": "Comma" } },
297
297
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -303,12 +303,12 @@ const D = "en-US", E = {}, q = (e) => {
303
303
  { id: "_", label: { "en-gb": "Underscore" } },
304
304
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
305
305
  { id: "|", label: { "en-gb": "Vertical Bar" } }
306
- ], se = (e = g) => {
306
+ ], se = (e = p) => {
307
307
  const r = [];
308
- for (const a of R)
309
- r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
308
+ for (const a of A)
309
+ r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
310
310
  return r;
311
- }, A = [
311
+ }, F = [
312
312
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
313
313
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
314
314
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -318,39 +318,79 @@ const D = "en-US", E = {}, q = (e) => {
318
318
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
319
319
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
320
320
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
321
- ], ie = (e, r = g) => {
322
- const a = A.find((t) => t.id === e);
323
- return a ? { ...a, label: a.label[r] || a.label[g] || e } : { id: e, color: "other", label: e };
324
- }, $ = ["createObject", "dropObject", "removeRecords", "upsertRecords"], _ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
325
- async function le() {
321
+ ], ie = (e, r = p) => {
322
+ const a = F.find((t) => t.id === e);
323
+ return a ? { ...a, label: a.label[r] || a.label[p] || e } : { id: e, color: "other", label: e };
324
+ }, R = ["createObject", "dropObject", "removeRecords", "upsertRecords"], $ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
325
+ async function ce() {
326
326
  try {
327
- const e = await JSON.parse(await y.readFile("package.json", "utf8")), r = await JSON.parse(await y.readFile("config.json", "utf8")), a = await y.readFile("src/index.ts", "utf8");
328
- let t = !1, n = !1;
329
- const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(o)].filter((c) => !c[1] && c[2] !== "constructor").map((c) => {
330
- const i = c[2];
331
- return t = t || $.includes(i), n = n || _.includes(i), i;
332
- }), d = n && t ? "bidirectional" : n ? "source" : t ? "destination" : null;
333
- e.name && (r.id = e.name), r.operations = s, r.usageId = d, e.version && (r.version = e.version), await y.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.log("✅ Connector configuration built.");
327
+ const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8");
328
+ let t = !1, o = !1;
329
+ const n = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(n)].filter((d) => !d[1] && d[2] !== "constructor").map((d) => {
330
+ const c = d[2];
331
+ return t = t || R.includes(c), o = o || $.includes(c), c;
332
+ }), u = o && t ? "bidirectional" : o ? "source" : t ? "destination" : null;
333
+ e.name && (r.id = e.name), r.operations = s, r.usageId = u, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.log("✅ Connector configuration built.");
334
334
  } catch (e) {
335
335
  console.warn("❌ Error building connector configuration.", e);
336
336
  }
337
337
  }
338
- const g = "en-gb";
338
+ async function le() {
339
+ try {
340
+ const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8"), t = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(t)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
341
+ e.name && (r.id = e.name), r.operations = o, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
342
+ } catch (e) {
343
+ console.warn("❌ Error building context configuration.", e);
344
+ }
345
+ }
346
+ async function de() {
347
+ try {
348
+ const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8"), t = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(t)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
349
+ e.name && (r.id = e.name), r.operations = o, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
350
+ } catch (e) {
351
+ console.warn("❌ Error building informer configuration.", e);
352
+ }
353
+ }
354
+ async function ue() {
355
+ try {
356
+ const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8"), t = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(t)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
357
+ e.name && (r.id = e.name), r.operations = o, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
358
+ } catch (e) {
359
+ console.warn("❌ Error building context configuration.", e);
360
+ }
361
+ }
362
+ async function ge() {
363
+ try {
364
+ const e = await JSON.parse(await i.readFile("package.json", "utf8"));
365
+ if (e.version) {
366
+ const r = e.version, a = e.version.split(".");
367
+ e.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, await i.writeFile("package.json", JSON.stringify(e, void 0, 4), "utf8"), console.log(`✅ Bumped version from ${r} to ${e.version}.`);
368
+ } else
369
+ e.version = "0.0.001", await i.writeFile("package.json", JSON.stringify(e, void 0, 4), "utf8"), console.log(`⚠️ Set version to ${e.version}.`);
370
+ } catch (e) {
371
+ console.warn("❌ Error bumping package version.", e);
372
+ }
373
+ }
374
+ const p = "en-gb";
339
375
  export {
340
- J as APIError,
376
+ z as APIError,
341
377
  h as ApplicationError,
342
- g as DEFAULT_LOCALE_CODE,
343
- L as DefaultTimestamp,
344
- P as EngineError,
345
- v as FetchError,
346
- V as OperationalError,
347
- N as VueError,
348
- W as WindowPromiseRejectionError,
349
- z as WindowRuntimeError,
350
- le as buildConnectorConfig,
378
+ p as DEFAULT_LOCALE_CODE,
379
+ j as DefaultTimestamp,
380
+ H as EngineError,
381
+ I as FetchError,
382
+ W as OperationalError,
383
+ T as VueError,
384
+ V as WindowPromiseRejectionError,
385
+ P as WindowRuntimeError,
386
+ ce as buildConnectorConfig,
387
+ le as buildContextConfig,
351
388
  X as buildFetchError,
389
+ de as buildInformerConfig,
390
+ ue as buildPresenterConfig,
391
+ ge as bumpVersion,
352
392
  G as concatenateSerialisedErrorMessages,
353
- k as convertMillisecondsToTimestamp,
393
+ _ as convertMillisecondsToTimestamp,
354
394
  q as convertODataTypeIdToUsageTypeId,
355
395
  Y as extractExtensionFromPath,
356
396
  Q as extractNameFromPath,
@@ -360,15 +400,15 @@ export {
360
400
  te as formatNumberAsStorageSize,
361
401
  x as formatNumberAsWholeNumber,
362
402
  ie as getComponentStatus,
363
- j as getCurrentTimestamp,
403
+ J as getCurrentTimestamp,
364
404
  ne as getDataFormats,
365
405
  oe as getRecordDelimiters,
366
406
  se as getValueDelimiters,
367
407
  ae as lookupMimeTypeForExtension,
368
- K as normalizeToError,
369
- M as presentationViewTypeMap,
370
- Z as serialiseError,
371
- U as useCytoscapeJS,
372
- B as useDataTable,
373
- H as useHighcharts
408
+ Z as normalizeToError,
409
+ L as presentationViewTypeMap,
410
+ K as serialiseError,
411
+ M as useCytoscapeJS,
412
+ U as useDataTable,
413
+ B as useHighcharts
374
414
  };
@@ -57,4 +57,4 @@ export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize
57
57
  export { getDataFormats, getRecordDelimiters, getValueDelimiters } from './component/dataView';
58
58
  export { getComponentStatus } from './component';
59
59
  export { lookupMimeTypeForExtension } from './appUtilities';
60
- export { buildConnectorConfig } from './devUtilities';
60
+ export { buildConnectorConfig, buildContextConfig, buildInformerConfig, buildPresenterConfig, bumpVersion } from './devUtilities';
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.123",
5
+ "version": "0.3.124",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"