@dpuse/dpuse-shared 1.0.218 → 1.0.220
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/README.md +7 -7
- package/dist/dpuse-shared.es.js +155 -139
- package/dist/dpuse-shared.es.js.map +1 -1
- package/dist/types/src/component/module/connector/index.d.ts +5 -2
- package/dist/types/src/component/module/connector/storeErrors.d.ts +4 -0
- package/dist/types/src/component/module/connector/webLock.d.ts +5 -1
- package/package.json +1 -1
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -863,33 +863,33 @@ var he = A([
|
|
|
863
863
|
constructor(e, t, n, r) {
|
|
864
864
|
super(e, t, n, r), this.name = "EngineError";
|
|
865
865
|
}
|
|
866
|
-
},
|
|
866
|
+
}, I = class extends P {
|
|
867
867
|
constructor(e, t, n, r) {
|
|
868
868
|
super(e, t, n, r), this.name = "ConnectorError";
|
|
869
869
|
}
|
|
870
|
-
},
|
|
870
|
+
}, L = class extends P {
|
|
871
871
|
constructor(e, t, n, r) {
|
|
872
872
|
super(e, t, n, r), this.name = "FetchError";
|
|
873
873
|
}
|
|
874
874
|
};
|
|
875
|
-
async function
|
|
875
|
+
async function ke(e, t, n) {
|
|
876
876
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
877
877
|
try {
|
|
878
878
|
a = await e.text();
|
|
879
879
|
} catch (e) {
|
|
880
|
-
a = `<body unavailable: ${
|
|
880
|
+
a = `<body unavailable: ${R(e).message}>`;
|
|
881
881
|
}
|
|
882
|
-
return new
|
|
882
|
+
return new L(i, n, { body: Le(a) });
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Ae(e) {
|
|
885
885
|
return e.map((e) => e.message).join(" ");
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function je(e) {
|
|
888
888
|
try {
|
|
889
889
|
e();
|
|
890
890
|
} catch {}
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function R(e) {
|
|
893
893
|
if (e instanceof Error) return e;
|
|
894
894
|
if (typeof e == "string") return Error(e);
|
|
895
895
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -901,24 +901,24 @@ function L(e) {
|
|
|
901
901
|
}
|
|
902
902
|
return /* @__PURE__ */ Error("Unknown error");
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
904
|
+
function Me(e) {
|
|
905
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = R(e);
|
|
906
906
|
for (; r != null && !t.has(r);) {
|
|
907
907
|
t.add(r);
|
|
908
|
-
let [e, i] =
|
|
908
|
+
let [e, i] = Re(r), a = Ie(e);
|
|
909
909
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
|
|
910
910
|
}
|
|
911
911
|
return n;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function Ne(e) {
|
|
914
914
|
let t;
|
|
915
915
|
for (let n of e.toReversed()) {
|
|
916
|
-
let e =
|
|
916
|
+
let e = Fe(n, t);
|
|
917
917
|
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
918
918
|
}
|
|
919
919
|
return t ?? /* @__PURE__ */ Error("No error to unserialise.");
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Pe(e) {
|
|
922
922
|
let t;
|
|
923
923
|
try {
|
|
924
924
|
t = JSON.stringify(e);
|
|
@@ -927,13 +927,13 @@ function Fe(e) {
|
|
|
927
927
|
}
|
|
928
928
|
return t === "" && (t = "Unknown error"), t;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Fe(e, t) {
|
|
931
931
|
switch (e.name) {
|
|
932
932
|
case "APIError": return new De(e.message, e.locator, e.data, { cause: t });
|
|
933
933
|
case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
934
|
-
case "ConnectorError": return new
|
|
934
|
+
case "ConnectorError": return new I(e.message, e.locator, e.data, { cause: t });
|
|
935
935
|
case "EngineError": return new Oe(e.message, e.locator, e.data, { cause: t });
|
|
936
|
-
case "FetchError": return new
|
|
936
|
+
case "FetchError": return new L(e.message, e.locator, e.data, { cause: t });
|
|
937
937
|
default: {
|
|
938
938
|
let n = e.name;
|
|
939
939
|
return new class extends Error {
|
|
@@ -942,28 +942,28 @@ function Ie(e, t) {
|
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function Ie(e) {
|
|
946
946
|
let { data: t, message: n, stack: r } = e;
|
|
947
947
|
return {
|
|
948
948
|
...e,
|
|
949
|
-
data: t === void 0 ? void 0 :
|
|
950
|
-
message:
|
|
951
|
-
stack: r === void 0 ? void 0 :
|
|
949
|
+
data: t === void 0 ? void 0 : B(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
950
|
+
message: z(n),
|
|
951
|
+
stack: r === void 0 ? void 0 : z(r)
|
|
952
952
|
};
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function z(e) {
|
|
955
955
|
let t = e;
|
|
956
956
|
for (let [e, n] of Ee) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
957
957
|
return t;
|
|
958
958
|
}
|
|
959
|
-
function
|
|
960
|
-
return typeof e == "string" ?
|
|
959
|
+
function B(e, t, n) {
|
|
960
|
+
return typeof e == "string" ? z(e) : typeof e != "object" || !e ? e : n >= we ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => B(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Te.test(e) ? N : B(r, t, n + 1)])));
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Le(e) {
|
|
963
963
|
if (e != null && e !== "") return e.length > Ce ? `${e.slice(0, Ce)}... [truncated]` : e;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
966
|
-
let t = e.cause == null ? null :
|
|
965
|
+
function Re(e) {
|
|
966
|
+
let t = e.cause == null ? null : R(e.cause);
|
|
967
967
|
if (e instanceof P) return [{
|
|
968
968
|
data: e.data,
|
|
969
969
|
locator: e.locator,
|
|
@@ -981,13 +981,13 @@ function ze(e) {
|
|
|
981
981
|
}, t] : [{
|
|
982
982
|
data: n,
|
|
983
983
|
locator: "",
|
|
984
|
-
message:
|
|
984
|
+
message: Pe(e),
|
|
985
985
|
name: "Error",
|
|
986
986
|
stack: void 0
|
|
987
987
|
}, null];
|
|
988
988
|
}
|
|
989
989
|
// src/encoding/index.ts
|
|
990
|
-
var
|
|
990
|
+
var ze = {
|
|
991
991
|
arabic: {
|
|
992
992
|
id: "arabic",
|
|
993
993
|
label: {
|
|
@@ -1142,7 +1142,7 @@ var Be = {
|
|
|
1142
1142
|
es: "Occidental"
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
|
-
},
|
|
1145
|
+
}, Be = {
|
|
1146
1146
|
"armscii-8": {
|
|
1147
1147
|
id: "armscii-8",
|
|
1148
1148
|
groupId: "armenian",
|
|
@@ -1934,16 +1934,16 @@ var Be = {
|
|
|
1934
1934
|
textDecoderId: "windows-1257",
|
|
1935
1935
|
iconvLiteDecoderId: "windows1257"
|
|
1936
1936
|
}
|
|
1937
|
-
},
|
|
1938
|
-
function
|
|
1939
|
-
return Object.hasOwn(
|
|
1937
|
+
}, Ve = ze, V = Be;
|
|
1938
|
+
function He(e) {
|
|
1939
|
+
return Object.hasOwn(V, e);
|
|
1940
1940
|
}
|
|
1941
|
-
function
|
|
1942
|
-
return
|
|
1941
|
+
function Ue(e) {
|
|
1942
|
+
return He(e) ? V[e].textDecoderId ?? e : e;
|
|
1943
1943
|
}
|
|
1944
|
-
function
|
|
1945
|
-
return Array.from(Object.values(
|
|
1946
|
-
let o = t == null ? "" :
|
|
1944
|
+
function We(e = "en") {
|
|
1945
|
+
return Array.from(Object.values(V), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
1946
|
+
let o = t == null ? "" : Ge(t, e);
|
|
1947
1947
|
return {
|
|
1948
1948
|
id: r,
|
|
1949
1949
|
groupLabel: o,
|
|
@@ -1955,11 +1955,11 @@ function Ge(e = "en") {
|
|
|
1955
1955
|
};
|
|
1956
1956
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1959
|
-
let n =
|
|
1958
|
+
function Ge(e, t) {
|
|
1959
|
+
let n = Ve[e].label;
|
|
1960
1960
|
return n[t] ?? n.en ?? e;
|
|
1961
1961
|
}
|
|
1962
|
-
var
|
|
1962
|
+
var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(A([
|
|
1963
1963
|
"arrow",
|
|
1964
1964
|
"avro",
|
|
1965
1965
|
"dtv",
|
|
@@ -1972,15 +1972,15 @@ var qe = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(
|
|
|
1972
1972
|
"sqlite",
|
|
1973
1973
|
"xlsx",
|
|
1974
1974
|
"xml"
|
|
1975
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
1975
|
+
])), /* @__PURE__ */ f(1)) }), qe = /* @__PURE__ */ h(/* @__PURE__ */ w()), Je = /* @__PURE__ */ C({
|
|
1976
1976
|
...M,
|
|
1977
1977
|
typeId: /* @__PURE__ */ _("tool"),
|
|
1978
|
-
actionNames: /* @__PURE__ */ x(
|
|
1979
|
-
parser: /* @__PURE__ */ x(
|
|
1978
|
+
actionNames: /* @__PURE__ */ x(qe),
|
|
1979
|
+
parser: /* @__PURE__ */ x(Ke)
|
|
1980
1980
|
});
|
|
1981
1981
|
// src/component/module/tool/delimitedText.ts
|
|
1982
|
-
async function
|
|
1983
|
-
let r =
|
|
1982
|
+
async function Ye(e, t, n) {
|
|
1983
|
+
let r = Xe(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await Ze(e, t.valueDelimiterIds, t.isComplete, n);
|
|
1984
1984
|
return {
|
|
1985
1985
|
issues: i,
|
|
1986
1986
|
parsedRecords: a,
|
|
@@ -1988,16 +1988,16 @@ async function Xe(e, t, n) {
|
|
|
1988
1988
|
valueDelimiterId: o
|
|
1989
1989
|
};
|
|
1990
1990
|
}
|
|
1991
|
-
function
|
|
1991
|
+
function Xe(e) {
|
|
1992
1992
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
1993
1993
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
1994
1994
|
}
|
|
1995
|
-
async function
|
|
1995
|
+
async function Ze(e, t, n, r) {
|
|
1996
1996
|
let i, a, o, s = [], c, l = !1;
|
|
1997
1997
|
for (let u of t) {
|
|
1998
1998
|
let { issues: t, records: d } = await r(e, u, n);
|
|
1999
1999
|
if (t.length > 0) {
|
|
2000
|
-
c =
|
|
2000
|
+
c = Qe(c, {
|
|
2001
2001
|
delimiter: u,
|
|
2002
2002
|
issues: t,
|
|
2003
2003
|
records: d
|
|
@@ -2005,7 +2005,7 @@ async function Qe(e, t, n, r) {
|
|
|
2005
2005
|
continue;
|
|
2006
2006
|
}
|
|
2007
2007
|
if (l = !0, d.length === 0) continue;
|
|
2008
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
2008
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = $e(d);
|
|
2009
2009
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
2010
2010
|
}
|
|
2011
2011
|
if (!l && c != null) {
|
|
@@ -2013,19 +2013,19 @@ async function Qe(e, t, n, r) {
|
|
|
2013
2013
|
return {
|
|
2014
2014
|
issues: t,
|
|
2015
2015
|
parsedRecords: n,
|
|
2016
|
-
valueDelimiterId:
|
|
2016
|
+
valueDelimiterId: et(n) ? e : void 0
|
|
2017
2017
|
};
|
|
2018
2018
|
}
|
|
2019
2019
|
return {
|
|
2020
2020
|
issues: [],
|
|
2021
2021
|
parsedRecords: s,
|
|
2022
|
-
valueDelimiterId: i != null &&
|
|
2022
|
+
valueDelimiterId: i != null && et(s) ? i : void 0
|
|
2023
2023
|
};
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function Qe(e, t) {
|
|
2026
2026
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function $e(e) {
|
|
2029
2029
|
let t = 0, n = 0, r;
|
|
2030
2030
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
2031
2031
|
return {
|
|
@@ -2033,7 +2033,7 @@ function et(e) {
|
|
|
2033
2033
|
sumOfValueCountDiffs: n
|
|
2034
2034
|
};
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function et(e) {
|
|
2037
2037
|
let t = /* @__PURE__ */ new Map();
|
|
2038
2038
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
2039
2039
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
@@ -2327,7 +2327,7 @@ function mt(e, t) {
|
|
|
2327
2327
|
};
|
|
2328
2328
|
}
|
|
2329
2329
|
function ht(e) {
|
|
2330
|
-
let t =
|
|
2330
|
+
let t = Ue(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2331
2331
|
return (e, t, o) => {
|
|
2332
2332
|
for (let s = 0; s < e.length; s++) {
|
|
2333
2333
|
let c = e[s];
|
|
@@ -2438,54 +2438,70 @@ async function X(e, t, n) {
|
|
|
2438
2438
|
if (!("buildStructureIndex" in r)) throw new F(`Tool '${i}' does not map the structure of '${t}' items.`, "dpuse-shared.component.module.connector.objectParsing.loadStructuredParser");
|
|
2439
2439
|
return r;
|
|
2440
2440
|
}
|
|
2441
|
-
// src/component/module/connector/
|
|
2442
|
-
|
|
2441
|
+
// src/component/module/connector/storeErrors.ts
|
|
2442
|
+
function bt(e, t, n, r) {
|
|
2443
|
+
return new I(t, n, { storeErrorId: e }, r);
|
|
2444
|
+
}
|
|
2443
2445
|
function xt(e) {
|
|
2446
|
+
let t = /* @__PURE__ */ new Set();
|
|
2447
|
+
for (let n = e; n instanceof Error && !t.has(n); n = n.cause) {
|
|
2448
|
+
t.add(n);
|
|
2449
|
+
let e = n.data?.storeErrorId;
|
|
2450
|
+
if (e === "heldElsewhere" || e === "notLoaded") return e;
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
// src/component/module/connector/storePath.ts
|
|
2454
|
+
var St = /^[\w-]+$/u;
|
|
2455
|
+
function Ct(e) {
|
|
2444
2456
|
if (!e.startsWith("/")) return {
|
|
2445
2457
|
databaseName: void 0,
|
|
2446
2458
|
tableName: e
|
|
2447
2459
|
};
|
|
2448
2460
|
let [, t, n, ...r] = e.split("/");
|
|
2449
|
-
if (t == null || n == null || n === "" || r.length > 0 || !
|
|
2461
|
+
if (t == null || n == null || n === "" || r.length > 0 || !St.test(t)) throw Error(`Encountered invalid store path '${e}'.`);
|
|
2450
2462
|
return {
|
|
2451
2463
|
databaseName: t,
|
|
2452
2464
|
tableName: n
|
|
2453
2465
|
};
|
|
2454
2466
|
}
|
|
2455
2467
|
// src/component/module/connector/storeValues.ts
|
|
2456
|
-
function
|
|
2468
|
+
function wt(e) {
|
|
2457
2469
|
return e.map((e) => ({
|
|
2458
|
-
value:
|
|
2470
|
+
value: Tt(e),
|
|
2459
2471
|
valueWasQuoted: !1
|
|
2460
2472
|
}));
|
|
2461
2473
|
}
|
|
2462
|
-
function
|
|
2474
|
+
function Tt(e) {
|
|
2463
2475
|
return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
|
|
2464
2476
|
}
|
|
2465
2477
|
// src/component/module/connector/webLock.ts
|
|
2466
|
-
async function
|
|
2467
|
-
let
|
|
2468
|
-
if (e == null)
|
|
2469
|
-
else return new Promise((e) => {
|
|
2470
|
-
|
|
2478
|
+
async function Et(e, t = {}) {
|
|
2479
|
+
let n = Promise.withResolvers(), r = { isGranted: !1 }, i = navigator.locks.request(e, t.takeOver === !0 ? { steal: !0 } : { ifAvailable: !0 }, (e) => {
|
|
2480
|
+
if (e == null) n.resolve(void 0);
|
|
2481
|
+
else return r.isGranted = !0, new Promise((e) => {
|
|
2482
|
+
n.resolve(e);
|
|
2471
2483
|
});
|
|
2472
|
-
}),
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2484
|
+
}), a = (async () => {
|
|
2485
|
+
try {
|
|
2486
|
+
await i;
|
|
2487
|
+
} catch (e) {
|
|
2488
|
+
r.isGranted ? e instanceof DOMException && e.name === "AbortError" && t.onLost?.() : n.reject(e instanceof Error ? e : Error(String(e)));
|
|
2489
|
+
}
|
|
2490
|
+
})(), o = await n.promise;
|
|
2491
|
+
if (o != null) return async () => {
|
|
2492
|
+
o(), await a;
|
|
2477
2493
|
};
|
|
2478
2494
|
}
|
|
2479
|
-
var
|
|
2495
|
+
var Dt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2480
2496
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2481
2497
|
name: /* @__PURE__ */ w(),
|
|
2482
2498
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2483
2499
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2484
|
-
})) }),
|
|
2500
|
+
})) }), Ot = /* @__PURE__ */ v({
|
|
2485
2501
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2486
2502
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2487
2503
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2488
|
-
}),
|
|
2504
|
+
}), kt = {
|
|
2489
2505
|
boolean: {
|
|
2490
2506
|
dataSubtypeId: void 0,
|
|
2491
2507
|
dataTypeId: "boolean"
|
|
@@ -2518,18 +2534,18 @@ var Tt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2518
2534
|
dataSubtypeId: "integer",
|
|
2519
2535
|
dataTypeId: "numeric"
|
|
2520
2536
|
}
|
|
2521
|
-
},
|
|
2537
|
+
}, At = {
|
|
2522
2538
|
email: "email",
|
|
2523
2539
|
uri: "url",
|
|
2524
2540
|
uuid: "uuid"
|
|
2525
2541
|
};
|
|
2526
|
-
function
|
|
2527
|
-
let t = /* @__PURE__ */ O(
|
|
2542
|
+
function jt(e) {
|
|
2543
|
+
let t = /* @__PURE__ */ O(Dt, e.schema);
|
|
2528
2544
|
if (!t.success) throw new F("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2529
|
-
let n = /* @__PURE__ */ O(
|
|
2545
|
+
let n = /* @__PURE__ */ O(Ot, e.dialect ?? {});
|
|
2530
2546
|
if (!n.success) throw new F("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2531
2547
|
let r = t.output.fields.map((e) => {
|
|
2532
|
-
let t =
|
|
2548
|
+
let t = Mt(e.type, e.format);
|
|
2533
2549
|
return {
|
|
2534
2550
|
name: e.name,
|
|
2535
2551
|
label: e.title,
|
|
@@ -2547,18 +2563,18 @@ function kt(e) {
|
|
|
2547
2563
|
}
|
|
2548
2564
|
};
|
|
2549
2565
|
}
|
|
2550
|
-
function
|
|
2551
|
-
let n = e == null ? void 0 :
|
|
2566
|
+
function Mt(e, t) {
|
|
2567
|
+
let n = e == null ? void 0 : kt[e];
|
|
2552
2568
|
return n == null ? {
|
|
2553
2569
|
dataSubtypeId: void 0,
|
|
2554
2570
|
dataTypeId: void 0
|
|
2555
2571
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2556
|
-
dataSubtypeId:
|
|
2572
|
+
dataSubtypeId: At[t] ?? "plain",
|
|
2557
2573
|
dataTypeId: "string"
|
|
2558
2574
|
};
|
|
2559
2575
|
}
|
|
2560
2576
|
// src/component/module/connector/index.ts
|
|
2561
|
-
var
|
|
2577
|
+
var Nt = [
|
|
2562
2578
|
{
|
|
2563
2579
|
id: "application",
|
|
2564
2580
|
label: {
|
|
@@ -2587,7 +2603,7 @@ var jt = [
|
|
|
2587
2603
|
es: "Almacén de Archivos"
|
|
2588
2604
|
}
|
|
2589
2605
|
}
|
|
2590
|
-
],
|
|
2606
|
+
], Pt = [
|
|
2591
2607
|
{
|
|
2592
2608
|
id: "apiEndpoint",
|
|
2593
2609
|
label: {
|
|
@@ -2609,7 +2625,7 @@ var jt = [
|
|
|
2609
2625
|
es: "Tabla"
|
|
2610
2626
|
}
|
|
2611
2627
|
}
|
|
2612
|
-
],
|
|
2628
|
+
], Ft = {
|
|
2613
2629
|
auditObjectContent: "Audit Object Content",
|
|
2614
2630
|
closeStore: "Close Store",
|
|
2615
2631
|
createObject: "Create Object",
|
|
@@ -2629,7 +2645,7 @@ var jt = [
|
|
|
2629
2645
|
removeRecords: "Remove Records",
|
|
2630
2646
|
retrieveRecords: "Retrieve Records",
|
|
2631
2647
|
upsertRecords: "Upsert Records"
|
|
2632
|
-
},
|
|
2648
|
+
}, It = [
|
|
2633
2649
|
{
|
|
2634
2650
|
id: "bidirectional",
|
|
2635
2651
|
label: {
|
|
@@ -2658,13 +2674,13 @@ var jt = [
|
|
|
2658
2674
|
es: "Desconocido"
|
|
2659
2675
|
}
|
|
2660
2676
|
}
|
|
2661
|
-
],
|
|
2677
|
+
], Lt = /* @__PURE__ */ new Set([
|
|
2662
2678
|
"createObject",
|
|
2663
2679
|
"dropObject",
|
|
2664
2680
|
"loadObjectRecords",
|
|
2665
2681
|
"removeRecords",
|
|
2666
2682
|
"upsertRecords"
|
|
2667
|
-
]),
|
|
2683
|
+
]), Rt = /* @__PURE__ */ new Set([
|
|
2668
2684
|
"auditObjectContent",
|
|
2669
2685
|
"findObject",
|
|
2670
2686
|
"getInfo",
|
|
@@ -2677,13 +2693,13 @@ var jt = [
|
|
|
2677
2693
|
"queryRecords",
|
|
2678
2694
|
"retrieveRecords"
|
|
2679
2695
|
]);
|
|
2680
|
-
function
|
|
2696
|
+
function zt(e) {
|
|
2681
2697
|
let t = !1, n = !1;
|
|
2682
|
-
for (let r of e)
|
|
2698
|
+
for (let r of e) Rt.has(r) && (t = !0), Lt.has(r) && (n = !0);
|
|
2683
2699
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2684
2700
|
}
|
|
2685
|
-
var
|
|
2686
|
-
let i =
|
|
2701
|
+
var Bt = (e, t = "en") => {
|
|
2702
|
+
let i = Nt.find((t) => t.id === e);
|
|
2687
2703
|
return i ? {
|
|
2688
2704
|
label: r(n(i.label), t) ?? i.id,
|
|
2689
2705
|
description: ""
|
|
@@ -2691,8 +2707,8 @@ var Rt = (e, t = "en") => {
|
|
|
2691
2707
|
label: e,
|
|
2692
2708
|
description: ""
|
|
2693
2709
|
};
|
|
2694
|
-
},
|
|
2695
|
-
let i =
|
|
2710
|
+
}, Vt = (e, t = "en") => {
|
|
2711
|
+
let i = Pt.find((t) => t.id === e);
|
|
2696
2712
|
return i ? {
|
|
2697
2713
|
label: r(n(i.label), t) ?? i.id,
|
|
2698
2714
|
description: ""
|
|
@@ -2700,8 +2716,8 @@ var Rt = (e, t = "en") => {
|
|
|
2700
2716
|
label: e,
|
|
2701
2717
|
description: ""
|
|
2702
2718
|
};
|
|
2703
|
-
},
|
|
2704
|
-
let i =
|
|
2719
|
+
}, Ht = (e, t = "en") => {
|
|
2720
|
+
let i = It.find((t) => t.id === e);
|
|
2705
2721
|
return i ? {
|
|
2706
2722
|
label: r(n(i.label), t) ?? i.id,
|
|
2707
2723
|
description: ""
|
|
@@ -2710,36 +2726,36 @@ var Rt = (e, t = "en") => {
|
|
|
2710
2726
|
description: ""
|
|
2711
2727
|
};
|
|
2712
2728
|
};
|
|
2713
|
-
function
|
|
2729
|
+
function Ut(e) {
|
|
2714
2730
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2715
2731
|
n += "|:----|:-------:|\n";
|
|
2716
|
-
for (let e of Object.keys(
|
|
2732
|
+
for (let e of Object.keys(Ft)) n += `| ${Ft[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2717
2733
|
return n;
|
|
2718
2734
|
}
|
|
2719
2735
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2720
|
-
var
|
|
2736
|
+
var Wt = A(["list"]), Gt = /* @__PURE__ */ C({
|
|
2721
2737
|
...M,
|
|
2722
2738
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2723
|
-
actionNames: /* @__PURE__ */ h(
|
|
2739
|
+
actionNames: /* @__PURE__ */ h(Wt),
|
|
2724
2740
|
recipes: /* @__PURE__ */ h(oe)
|
|
2725
2741
|
});
|
|
2726
2742
|
// src/component/module/engine/index.ts
|
|
2727
|
-
function
|
|
2743
|
+
function Kt(e) {
|
|
2728
2744
|
return e.signal ?? new AbortController().signal;
|
|
2729
2745
|
}
|
|
2730
2746
|
// src/component/module/presenter/presenterConfig.schema.ts
|
|
2731
|
-
var
|
|
2747
|
+
var qt = A([
|
|
2732
2748
|
"list",
|
|
2733
2749
|
"render",
|
|
2734
2750
|
"setColorMode"
|
|
2735
|
-
]),
|
|
2751
|
+
]), Jt = /* @__PURE__ */ C({
|
|
2736
2752
|
...M,
|
|
2737
2753
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2738
|
-
actionNames: /* @__PURE__ */ h(
|
|
2754
|
+
actionNames: /* @__PURE__ */ h(qt),
|
|
2739
2755
|
presentations: /* @__PURE__ */ h(oe)
|
|
2740
|
-
}),
|
|
2741
|
-
async function
|
|
2742
|
-
let i = e.id, a = `${
|
|
2756
|
+
}), Yt = "https://engine-eu.dpuse.app/presenters";
|
|
2757
|
+
async function Xt(e, t, n, r) {
|
|
2758
|
+
let i = e.id, a = `${Yt}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2743
2759
|
try {
|
|
2744
2760
|
return new (await (import(
|
|
2745
2761
|
/* @vite-ignore */
|
|
@@ -2755,7 +2771,7 @@ async function Jt(e, t, n, r) {
|
|
|
2755
2771
|
}
|
|
2756
2772
|
}
|
|
2757
2773
|
// src/locale/index.ts
|
|
2758
|
-
function
|
|
2774
|
+
function Zt(e, t) {
|
|
2759
2775
|
return {
|
|
2760
2776
|
...e,
|
|
2761
2777
|
label: e.label[t] ?? e.id,
|
|
@@ -2763,7 +2779,7 @@ function Yt(e, t) {
|
|
|
2763
2779
|
verb: e.verb?.[t] ?? void 0
|
|
2764
2780
|
};
|
|
2765
2781
|
}
|
|
2766
|
-
function
|
|
2782
|
+
function Qt(e, t, n = !1) {
|
|
2767
2783
|
let r = e.map((e) => ({
|
|
2768
2784
|
...e,
|
|
2769
2785
|
label: e.label[t] ?? e.id,
|
|
@@ -2772,7 +2788,7 @@ function Xt(e, t, n = !1) {
|
|
|
2772
2788
|
}));
|
|
2773
2789
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2774
2790
|
}
|
|
2775
|
-
function
|
|
2791
|
+
function $t(e, t) {
|
|
2776
2792
|
return {
|
|
2777
2793
|
...e,
|
|
2778
2794
|
label: e.label[t] ?? e.id,
|
|
@@ -2780,7 +2796,7 @@ function Zt(e, t) {
|
|
|
2780
2796
|
};
|
|
2781
2797
|
}
|
|
2782
2798
|
// src/utilities/index.ts
|
|
2783
|
-
var
|
|
2799
|
+
var en = /* @__PURE__ */ new Map([
|
|
2784
2800
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2785
2801
|
["avro", "application/vnd.apache.avro"],
|
|
2786
2802
|
["bin", "application/octet-stream"],
|
|
@@ -2807,14 +2823,14 @@ var Qt = /* @__PURE__ */ new Map([
|
|
|
2807
2823
|
["minute", 6e4],
|
|
2808
2824
|
["second", 1e3],
|
|
2809
2825
|
["millisecond", 1]
|
|
2810
|
-
],
|
|
2826
|
+
], tn = [
|
|
2811
2827
|
["byte", 1],
|
|
2812
2828
|
["KiB", 1024],
|
|
2813
2829
|
["MiB", 1048576],
|
|
2814
2830
|
["GiB", 1073741824],
|
|
2815
2831
|
["TiB", 1099511627776]
|
|
2816
|
-
],
|
|
2817
|
-
function
|
|
2832
|
+
], nn = /* @__PURE__ */ new Map(), rn = /* @__PURE__ */ new Map();
|
|
2833
|
+
function an(e, t = 2, n = t, r = Z) {
|
|
2818
2834
|
return e == null ? "" : $(r, {
|
|
2819
2835
|
localeMatcher: "best fit",
|
|
2820
2836
|
maximumFractionDigits: t,
|
|
@@ -2824,18 +2840,18 @@ function nn(e, t = 2, n = t, r = Z) {
|
|
|
2824
2840
|
useGrouping: !0
|
|
2825
2841
|
}).format(e);
|
|
2826
2842
|
}
|
|
2827
|
-
function
|
|
2828
|
-
return
|
|
2843
|
+
function on(e, t = Z) {
|
|
2844
|
+
return an(e, 0, 0, t);
|
|
2829
2845
|
}
|
|
2830
|
-
function
|
|
2846
|
+
function sn(e, t = 1, n = Z) {
|
|
2831
2847
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2832
2848
|
maximumFractionDigits: t,
|
|
2833
2849
|
notation: "compact"
|
|
2834
2850
|
}).format(e);
|
|
2835
2851
|
}
|
|
2836
|
-
function
|
|
2852
|
+
function cn(e, t = 1, n = Z) {
|
|
2837
2853
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2838
|
-
let [r, i] =
|
|
2854
|
+
let [r, i] = tn.find(([, n]) => _n(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["TiB", 1099511627776];
|
|
2839
2855
|
return i === 1 ? $(n, {
|
|
2840
2856
|
maximumFractionDigits: 0,
|
|
2841
2857
|
style: "unit",
|
|
@@ -2843,7 +2859,7 @@ function on(e, t = 1, n = Z) {
|
|
|
2843
2859
|
unitDisplay: "long"
|
|
2844
2860
|
}).format(e) : `${$(n, { maximumFractionDigits: t }).format(e / i)} ${r}`;
|
|
2845
2861
|
}
|
|
2846
|
-
function
|
|
2862
|
+
function ln(e, t = "millisecond", n = Z) {
|
|
2847
2863
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2848
2864
|
let r = Math.round(Math.abs(e)), i = Q.findIndex(([, e]) => r >= e), a = i === -1 ? Q.length - 1 : i, o = Q.findIndex(([e]) => e === t), s = Q.slice(a, Math.max(o, a) + 1), c = [];
|
|
2849
2865
|
for (let [t, i] of s) {
|
|
@@ -2857,25 +2873,25 @@ function sn(e, t = "millisecond", n = Z) {
|
|
|
2857
2873
|
unitDisplay: "short"
|
|
2858
2874
|
}).format(o));
|
|
2859
2875
|
}
|
|
2860
|
-
return
|
|
2876
|
+
return gn(n).format(c);
|
|
2861
2877
|
}
|
|
2862
|
-
function
|
|
2878
|
+
function un(e) {
|
|
2863
2879
|
if (!e) return;
|
|
2864
|
-
let t =
|
|
2880
|
+
let t = hn(e);
|
|
2865
2881
|
return t === void 0 ? e : e.slice(0, t);
|
|
2866
2882
|
}
|
|
2867
|
-
function
|
|
2883
|
+
function dn(e) {
|
|
2868
2884
|
if (!e) return;
|
|
2869
|
-
let t =
|
|
2885
|
+
let t = hn(e);
|
|
2870
2886
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2871
2887
|
}
|
|
2872
|
-
function
|
|
2873
|
-
return e != null &&
|
|
2888
|
+
function fn(e) {
|
|
2889
|
+
return e != null && en.has(e.toLowerCase());
|
|
2874
2890
|
}
|
|
2875
|
-
function
|
|
2876
|
-
return (e == null ? void 0 :
|
|
2891
|
+
function pn(e) {
|
|
2892
|
+
return (e == null ? void 0 : en.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2877
2893
|
}
|
|
2878
|
-
function
|
|
2894
|
+
function mn(e) {
|
|
2879
2895
|
switch (e) {
|
|
2880
2896
|
case "Edm.Boolean": return "boolean";
|
|
2881
2897
|
case "Edm.Byte":
|
|
@@ -2896,23 +2912,23 @@ function fn(e) {
|
|
|
2896
2912
|
default: return "unknown";
|
|
2897
2913
|
}
|
|
2898
2914
|
}
|
|
2899
|
-
function
|
|
2915
|
+
function hn(e) {
|
|
2900
2916
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2901
2917
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2902
2918
|
}
|
|
2903
|
-
function
|
|
2904
|
-
let t =
|
|
2919
|
+
function gn(e) {
|
|
2920
|
+
let t = nn.get(e);
|
|
2905
2921
|
return t || (t = new Intl.ListFormat(e, {
|
|
2906
2922
|
style: "narrow",
|
|
2907
2923
|
type: "unit"
|
|
2908
|
-
}),
|
|
2924
|
+
}), nn.set(e, t)), t;
|
|
2909
2925
|
}
|
|
2910
2926
|
function $(e, t) {
|
|
2911
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2912
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
2927
|
+
let n = `${e}|${JSON.stringify(t)}`, r = rn.get(n);
|
|
2928
|
+
return r || (r = new Intl.NumberFormat(e, t), rn.set(n, r)), r;
|
|
2913
2929
|
}
|
|
2914
|
-
function
|
|
2930
|
+
function _n(e, t) {
|
|
2915
2931
|
let n = 10 ** t;
|
|
2916
2932
|
return Math.round(e * n) / n;
|
|
2917
2933
|
}
|
|
2918
|
-
export { De as APIError, F as AppError,
|
|
2934
|
+
export { De as APIError, F as AppError, I as ConnectorError, de as DATA_FORMAT_CONFIGS, fe as DATA_TYPE_CONFIGS, pe as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, Ve as ENCODING_GROUP_CONFIG_MAP, V as ENCODING_TYPE_CONFIG_MAP, Oe as EngineError, L as FetchError, t as SUPPORTED_LANGUAGES, H as TOOL_NAME_PREFIX, j as VALUE_DELIMITER_CONFIGS, Et as acquireWebLock, lt as auditObjectContentWithParser, ke as buildFetchError, st as buildPreviewObjectResult, ce as componentInstanceConfigSchema, Ae as concatenateSerialisedErrorMessages, Se as connectorConfigSchema, Bt as constructConnectorCategoryConfig, Vt as constructConnectorItemTypeConfig, Ht as constructConnectorUsageConfig, bt as constructStoreError, mn as convertODataTypeIdToUsageTypeId, wt as convertStoreRecordToParsedRecord, Tt as convertStoreValueToText, Gt as cookbookConfigSchema, n as createLabelMap, zt as determineConnectorUsageId, dn as extractExtensionFromPath, un as extractPathWithoutExtension, xt as findStoreErrorId, an as formatNumberAsDecimalNumber, ln as formatNumberAsDuration, sn as formatNumberAsSize, cn as formatNumberAsStorageSize, on as formatNumberAsWholeNumber, ue as getComponentStatus, Ut as getConnectorActionsTable, We as getEncodingTypeConfigs, me as getValueDelimiterCharacter, fn as hasMimeTypeForExtension, je as ignoreErrors, ut as indexObjectStructureWithParser, He as isEncodingTypeId, dt as listObjectStructureEntriesWithParser, U as listParserToolConfigs, Xt as loadPresenter, rt as loadTool, Zt as localiseConfig, Qt as localiseConfigs, $t as localiseReference, pn as lookupMimeTypeForExtension, R as normalizeToError, Ye as parseDelimitedText, Jt as presenterConfigSchema, jt as readTableSchema, Ue as resolveDecoderId, r as resolveLabel, W as resolveParserToolConfig, Kt as resolveRequestSignal, Ct as resolveStorePath, ct as retrieveRecordsWithParser, Me as serialiseError, Je as toolConfigSchema, Ne as unserialiseError };
|