@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.
- package/dist/datapos-shared.es.js +158 -118
- package/dist/types/src/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { promises as
|
|
2
|
-
const
|
|
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
|
|
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
|
|
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
|
|
34
|
-
let b,
|
|
35
|
-
function
|
|
36
|
-
async function e(
|
|
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
|
|
39
|
-
for (const
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
chart: { type:
|
|
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:
|
|
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(
|
|
49
|
-
return { chart: m, resize: () => m.reflow(), vendorId:
|
|
48
|
+
}, m = b.chart(u, f, d);
|
|
49
|
+
return { chart: m, resize: () => m.reflow(), vendorId: E };
|
|
50
50
|
}
|
|
51
|
-
async function r(
|
|
52
|
-
await Promise.all([t(),
|
|
53
|
-
const
|
|
54
|
-
for (const
|
|
55
|
-
|
|
56
|
-
const
|
|
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:
|
|
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(
|
|
64
|
-
return { chart: m, resize: () => m.reflow(), vendorId:
|
|
63
|
+
}, m = b.chart(u, f, d);
|
|
64
|
+
return { chart: m, resize: () => m.reflow(), vendorId: E };
|
|
65
65
|
}
|
|
66
|
-
async function a(
|
|
67
|
-
await Promise.all([t(),
|
|
68
|
-
const
|
|
69
|
-
for (let
|
|
70
|
-
|
|
71
|
-
|
|
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:
|
|
73
|
+
chart: { type: n.options.highchartsType, inverted: n.options.inverted },
|
|
74
74
|
plotOptions: { series: { borderColor: "#333" } },
|
|
75
|
-
series:
|
|
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
|
-
},
|
|
80
|
-
return { chart:
|
|
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
|
|
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
|
-
|
|
90
|
+
u
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
async function
|
|
94
|
-
if (
|
|
95
|
-
await import(`${
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
120
|
+
class I extends h {
|
|
121
121
|
body;
|
|
122
|
-
constructor(r, a, t,
|
|
123
|
-
super(r, a,
|
|
122
|
+
constructor(r, a, t, o) {
|
|
123
|
+
super(r, a, o), this.name = "FetchError", this.body = t;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
class
|
|
126
|
+
class T extends h {
|
|
127
127
|
componentName;
|
|
128
128
|
info;
|
|
129
|
-
constructor(r, a, t,
|
|
130
|
-
super(r, a,
|
|
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
|
|
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
|
|
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
|
|
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.`,
|
|
150
|
-
return new
|
|
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
|
|
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
|
|
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
|
|
170
|
-
if (t instanceof
|
|
171
|
-
|
|
172
|
-
else if (t instanceof
|
|
173
|
-
|
|
174
|
-
else if (t instanceof
|
|
175
|
-
|
|
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
|
|
178
|
-
|
|
179
|
-
} else t ? (
|
|
180
|
-
/(?:\.{3}|[.!?])$/.test(
|
|
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
|
|
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 =
|
|
233
|
+
}, l = (e, r = 2, a = r, t = N) => {
|
|
234
234
|
if (e == null) return "";
|
|
235
|
-
const
|
|
236
|
-
let
|
|
237
|
-
return
|
|
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
|
-
}),
|
|
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 =
|
|
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 =
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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 =
|
|
279
|
+
], ne = (e = p) => {
|
|
280
280
|
const r = [];
|
|
281
|
-
for (const a of
|
|
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 =
|
|
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[
|
|
292
|
+
r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
|
|
293
293
|
return r;
|
|
294
|
-
},
|
|
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 =
|
|
306
|
+
], se = (e = p) => {
|
|
307
307
|
const r = [];
|
|
308
|
-
for (const a of
|
|
309
|
-
r.push({ ...a, label: a.label[e] || a.label[
|
|
308
|
+
for (const a of A)
|
|
309
|
+
r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
|
|
310
310
|
return r;
|
|
311
|
-
},
|
|
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 =
|
|
322
|
-
const a =
|
|
323
|
-
return a ? { ...a, label: a.label[r] || a.label[
|
|
324
|
-
},
|
|
325
|
-
async function
|
|
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
|
|
328
|
-
let t = !1,
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
return t = t ||
|
|
332
|
-
}),
|
|
333
|
-
e.name && (r.id = e.name), r.operations = s, r.usageId =
|
|
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
|
-
|
|
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
|
-
|
|
376
|
+
z as APIError,
|
|
341
377
|
h as ApplicationError,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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';
|