@dpuse/dpuse-shared 1.0.210 → 1.0.211
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 +8 -8
- package/dist/dpuse-shared.es.js +233 -208
- package/dist/dpuse-shared.es.js.map +1 -1
- package/dist/types/src/component/module/connector/connectorConfig.schema.d.ts +2 -2
- package/dist/types/src/component/module/connector/index.d.ts +23 -25
- package/dist/types/src/component/module/connector/objectParsing.d.ts +3 -4
- package/dist/types/src/component/module/connector/storeValues.d.ts +4 -0
- package/dist/types/src/component/module/tool/index.d.ts +1 -1
- package/dist/types/src/component/module/tool/parser.d.ts +9 -2
- package/package.json +1 -1
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -400,11 +400,11 @@ function T(e) {
|
|
|
400
400
|
return t;
|
|
401
401
|
}
|
|
402
402
|
/* @__NO_SIDE_EFFECTS__ */
|
|
403
|
-
function
|
|
403
|
+
function ee(e, t) {
|
|
404
404
|
return d({
|
|
405
405
|
kind: "schema",
|
|
406
406
|
type: "union",
|
|
407
|
-
reference:
|
|
407
|
+
reference: ee,
|
|
408
408
|
expects: /* @__PURE__ */ u(e.map((e) => e.expects), "|"),
|
|
409
409
|
async: !1,
|
|
410
410
|
options: e,
|
|
@@ -432,7 +432,7 @@ function E(e, t) {
|
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
/* @__NO_SIDE_EFFECTS__ */
|
|
435
|
-
function
|
|
435
|
+
function te(...e) {
|
|
436
436
|
return d({
|
|
437
437
|
...e[0],
|
|
438
438
|
pipe: e,
|
|
@@ -449,7 +449,7 @@ function ee(...e) {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
/* @__NO_SIDE_EFFECTS__ */
|
|
452
|
-
function
|
|
452
|
+
function ne(e, t, n) {
|
|
453
453
|
let r = e["~run"]({ value: t }, /* @__PURE__ */ a(n));
|
|
454
454
|
return {
|
|
455
455
|
typed: r.typed,
|
|
@@ -459,10 +459,10 @@ function te(e, t, n) {
|
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
461
|
// src/locale/locale.schema.ts
|
|
462
|
-
var
|
|
462
|
+
var E = /* @__PURE__ */ C({
|
|
463
463
|
en: /* @__PURE__ */ w(),
|
|
464
464
|
es: /* @__PURE__ */ w()
|
|
465
|
-
}),
|
|
465
|
+
}), re = {
|
|
466
466
|
id: /* @__PURE__ */ w(),
|
|
467
467
|
label: /* @__PURE__ */ C({
|
|
468
468
|
en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
@@ -474,7 +474,7 @@ var D = /* @__PURE__ */ C({
|
|
|
474
474
|
}),
|
|
475
475
|
icon: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
476
476
|
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ w())
|
|
477
|
-
},
|
|
477
|
+
}, D = (e) => /* @__PURE__ */ ee(e.map((e) => /* @__PURE__ */ _(e))), ie = D([
|
|
478
478
|
"app",
|
|
479
479
|
"connector",
|
|
480
480
|
"connectorConnection",
|
|
@@ -496,32 +496,32 @@ var D = /* @__PURE__ */ C({
|
|
|
496
496
|
"presenter",
|
|
497
497
|
"presenterPresentation",
|
|
498
498
|
"tool"
|
|
499
|
-
]),
|
|
499
|
+
]), ae = D([
|
|
500
500
|
"danger",
|
|
501
501
|
"success",
|
|
502
502
|
"warning"
|
|
503
|
-
]),
|
|
503
|
+
]), oe = D([
|
|
504
504
|
"alpha",
|
|
505
505
|
"beta",
|
|
506
506
|
"releaseCandidate",
|
|
507
507
|
"generalAvailability"
|
|
508
|
-
]),
|
|
509
|
-
color:
|
|
508
|
+
]), se = /* @__PURE__ */ C({
|
|
509
|
+
color: ae,
|
|
510
510
|
label: /* @__PURE__ */ w()
|
|
511
|
-
}),
|
|
512
|
-
...
|
|
513
|
-
typeId:
|
|
514
|
-
},
|
|
515
|
-
...
|
|
511
|
+
}), O = {
|
|
512
|
+
...re,
|
|
513
|
+
typeId: ie
|
|
514
|
+
}, k = /* @__PURE__ */ C({
|
|
515
|
+
...O,
|
|
516
516
|
order: /* @__PURE__ */ b(),
|
|
517
517
|
path: /* @__PURE__ */ w()
|
|
518
|
-
}),
|
|
519
|
-
...
|
|
518
|
+
}), ce = {
|
|
519
|
+
...O,
|
|
520
520
|
firstCreatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
521
521
|
lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
522
|
-
status: /* @__PURE__ */ y(
|
|
523
|
-
statusId: /* @__PURE__ */ y(
|
|
524
|
-
},
|
|
522
|
+
status: /* @__PURE__ */ y(se),
|
|
523
|
+
statusId: /* @__PURE__ */ y(oe)
|
|
524
|
+
}, le = /* @__PURE__ */ C({ ...ce }), ue = [
|
|
525
525
|
{
|
|
526
526
|
id: "alpha",
|
|
527
527
|
color: "danger",
|
|
@@ -555,8 +555,8 @@ var D = /* @__PURE__ */ C({
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
];
|
|
558
|
-
function
|
|
559
|
-
let n =
|
|
558
|
+
function de(e, t = "en") {
|
|
559
|
+
let n = ue.find((t) => t.id === e);
|
|
560
560
|
if (n) {
|
|
561
561
|
let e = n.labels[t] ?? n.labels.en ?? n.id;
|
|
562
562
|
return {
|
|
@@ -570,7 +570,7 @@ function fe(e, t = "en") {
|
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
572
|
// src/component/dataView/index.ts
|
|
573
|
-
var
|
|
573
|
+
var fe = [
|
|
574
574
|
{
|
|
575
575
|
id: "arrow",
|
|
576
576
|
isTable: !1,
|
|
@@ -649,7 +649,7 @@ var pe = [
|
|
|
649
649
|
isText: !1,
|
|
650
650
|
supportId: "unsupported"
|
|
651
651
|
}
|
|
652
|
-
],
|
|
652
|
+
], A = [
|
|
653
653
|
{
|
|
654
654
|
id: ",",
|
|
655
655
|
character: ","
|
|
@@ -690,7 +690,7 @@ var pe = [
|
|
|
690
690
|
id: "0x1E",
|
|
691
691
|
character: ""
|
|
692
692
|
}
|
|
693
|
-
],
|
|
693
|
+
], pe = [
|
|
694
694
|
{
|
|
695
695
|
id: "string",
|
|
696
696
|
defaultSubtypeId: "plain",
|
|
@@ -747,11 +747,11 @@ var pe = [
|
|
|
747
747
|
isChoosable: !1,
|
|
748
748
|
subtypeIds: []
|
|
749
749
|
}
|
|
750
|
-
],
|
|
751
|
-
function
|
|
752
|
-
return
|
|
750
|
+
], me = [",", "."];
|
|
751
|
+
function he(e) {
|
|
752
|
+
return A.find(({ id: t }) => t === e)?.character ?? e;
|
|
753
753
|
}
|
|
754
|
-
|
|
754
|
+
D([
|
|
755
755
|
"app",
|
|
756
756
|
"engine",
|
|
757
757
|
"connector",
|
|
@@ -760,16 +760,16 @@ O([
|
|
|
760
760
|
"tool"
|
|
761
761
|
]);
|
|
762
762
|
// src/component/module/moduleConfig.schema.ts
|
|
763
|
-
var
|
|
764
|
-
...
|
|
763
|
+
var j = {
|
|
764
|
+
...ce,
|
|
765
765
|
vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
766
766
|
vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
767
767
|
vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
768
768
|
version: /* @__PURE__ */ w()
|
|
769
769
|
};
|
|
770
|
-
({ ...
|
|
770
|
+
({ ...j });
|
|
771
771
|
// src/component/module/connector/connectorConfig.schema.ts
|
|
772
|
-
var
|
|
772
|
+
var ge = D([
|
|
773
773
|
"abortOperation",
|
|
774
774
|
"auditObjectContent",
|
|
775
775
|
"closeStore",
|
|
@@ -786,25 +786,24 @@ var _e = O([
|
|
|
786
786
|
"previewObject",
|
|
787
787
|
"queryRecords",
|
|
788
788
|
"removeRecords",
|
|
789
|
-
"retrieveChunks",
|
|
790
789
|
"retrieveRecords",
|
|
791
790
|
"upsertRecords"
|
|
792
|
-
]),
|
|
791
|
+
]), _e = D([
|
|
793
792
|
"application",
|
|
794
793
|
"curatedDataset",
|
|
795
794
|
"database",
|
|
796
795
|
"fileStore"
|
|
797
|
-
]),
|
|
796
|
+
]), ve = /* @__PURE__ */ C({ label: E }), ye = D([
|
|
798
797
|
"apiEndpoint",
|
|
799
798
|
"file",
|
|
800
799
|
"table"
|
|
801
|
-
]),
|
|
800
|
+
]), be = D([
|
|
802
801
|
"bidirectional",
|
|
803
802
|
"destination",
|
|
804
803
|
"source",
|
|
805
804
|
"unknown"
|
|
806
|
-
]),
|
|
807
|
-
authMethodId:
|
|
805
|
+
]), xe = /* @__PURE__ */ C({ label: E }), Se = /* @__PURE__ */ C({
|
|
806
|
+
authMethodId: D([
|
|
808
807
|
"apiKey",
|
|
809
808
|
"disabled",
|
|
810
809
|
"oAuth2",
|
|
@@ -813,20 +812,20 @@ var _e = O([
|
|
|
813
812
|
activeConnectionCount: /* @__PURE__ */ x(/* @__PURE__ */ b()),
|
|
814
813
|
canDescribe: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
815
814
|
id: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
816
|
-
label: /* @__PURE__ */ x(
|
|
815
|
+
label: /* @__PURE__ */ x(E),
|
|
817
816
|
maxConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
818
817
|
params: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ S(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
|
|
819
|
-
}),
|
|
820
|
-
...
|
|
818
|
+
}), Ce = /* @__PURE__ */ C({
|
|
819
|
+
...j,
|
|
821
820
|
typeId: /* @__PURE__ */ _("connector"),
|
|
822
|
-
actionNames: /* @__PURE__ */ h(
|
|
823
|
-
category: /* @__PURE__ */ y(
|
|
824
|
-
categoryId:
|
|
825
|
-
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(),
|
|
826
|
-
itemTypeId:
|
|
827
|
-
usage: /* @__PURE__ */ y(
|
|
828
|
-
usageId: /* @__PURE__ */ y(
|
|
829
|
-
}),
|
|
821
|
+
actionNames: /* @__PURE__ */ h(ge),
|
|
822
|
+
category: /* @__PURE__ */ y(ve),
|
|
823
|
+
categoryId: _e,
|
|
824
|
+
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), Se),
|
|
825
|
+
itemTypeId: ye,
|
|
826
|
+
usage: /* @__PURE__ */ y(xe),
|
|
827
|
+
usageId: /* @__PURE__ */ y(be)
|
|
828
|
+
}), we = {
|
|
830
829
|
arabic: {
|
|
831
830
|
id: "arabic",
|
|
832
831
|
label: {
|
|
@@ -981,7 +980,7 @@ var _e = O([
|
|
|
981
980
|
es: "Occidental"
|
|
982
981
|
}
|
|
983
982
|
}
|
|
984
|
-
},
|
|
983
|
+
}, Te = {
|
|
985
984
|
"armscii-8": {
|
|
986
985
|
id: "armscii-8",
|
|
987
986
|
groupId: "armenian",
|
|
@@ -1773,16 +1772,16 @@ var _e = O([
|
|
|
1773
1772
|
textDecoderId: "windows-1257",
|
|
1774
1773
|
iconvLiteDecoderId: "windows1257"
|
|
1775
1774
|
}
|
|
1776
|
-
},
|
|
1777
|
-
function
|
|
1775
|
+
}, Ee = we, M = Te;
|
|
1776
|
+
function De(e) {
|
|
1778
1777
|
return Object.hasOwn(M, e);
|
|
1779
1778
|
}
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
1779
|
+
function Oe(e) {
|
|
1780
|
+
return De(e) ? M[e].textDecoderId ?? e : e;
|
|
1782
1781
|
}
|
|
1783
|
-
function
|
|
1782
|
+
function ke(e = "en") {
|
|
1784
1783
|
return Array.from(Object.values(M), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
1785
|
-
let o = t == null ? "" :
|
|
1784
|
+
let o = t == null ? "" : Ae(t, e);
|
|
1786
1785
|
return {
|
|
1787
1786
|
id: r,
|
|
1788
1787
|
groupLabel: o,
|
|
@@ -1794,40 +1793,40 @@ function De(e = "en") {
|
|
|
1794
1793
|
};
|
|
1795
1794
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
1796
1795
|
}
|
|
1797
|
-
function
|
|
1798
|
-
let n =
|
|
1796
|
+
function Ae(e, t) {
|
|
1797
|
+
let n = Ee[e].label;
|
|
1799
1798
|
return n[t] ?? n.en ?? e;
|
|
1800
1799
|
}
|
|
1801
1800
|
// src/errors/index.ts
|
|
1802
|
-
var
|
|
1803
|
-
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${
|
|
1804
|
-
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) =>
|
|
1805
|
-
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () =>
|
|
1806
|
-
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () =>
|
|
1807
|
-
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () =>
|
|
1808
|
-
],
|
|
1801
|
+
var je = 2048, N = "[REDACTED]", Me = 10, Ne = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Pe = [
|
|
1802
|
+
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${N}`],
|
|
1803
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => Ne.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${N}` : e],
|
|
1804
|
+
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => N],
|
|
1805
|
+
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => N],
|
|
1806
|
+
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => N]
|
|
1807
|
+
], P = class extends Error {
|
|
1809
1808
|
data;
|
|
1810
1809
|
locator;
|
|
1811
1810
|
constructor(e, t, n, r) {
|
|
1812
1811
|
super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
|
|
1813
1812
|
}
|
|
1814
|
-
},
|
|
1813
|
+
}, F = class extends P {
|
|
1815
1814
|
constructor(e, t, n, r) {
|
|
1816
1815
|
super(e, t, n, r), this.name = "AppError";
|
|
1817
1816
|
}
|
|
1818
|
-
},
|
|
1817
|
+
}, I = class extends P {
|
|
1819
1818
|
constructor(e, t, n, r) {
|
|
1820
1819
|
super(e, t, n, r), this.name = "APIError";
|
|
1821
1820
|
}
|
|
1822
|
-
},
|
|
1821
|
+
}, L = class extends P {
|
|
1823
1822
|
constructor(e, t, n, r) {
|
|
1824
1823
|
super(e, t, n, r), this.name = "EngineError";
|
|
1825
1824
|
}
|
|
1826
|
-
}, Fe = class extends
|
|
1825
|
+
}, Fe = class extends P {
|
|
1827
1826
|
constructor(e, t, n, r) {
|
|
1828
1827
|
super(e, t, n, r), this.name = "ConnectorError";
|
|
1829
1828
|
}
|
|
1830
|
-
}, R = class extends
|
|
1829
|
+
}, R = class extends P {
|
|
1831
1830
|
constructor(e, t, n, r) {
|
|
1832
1831
|
super(e, t, n, r), this.name = "FetchError";
|
|
1833
1832
|
}
|
|
@@ -1889,10 +1888,10 @@ function Ve(e) {
|
|
|
1889
1888
|
}
|
|
1890
1889
|
function He(e, t) {
|
|
1891
1890
|
switch (e.name) {
|
|
1892
|
-
case "APIError": return new
|
|
1893
|
-
case "AppError": return new
|
|
1891
|
+
case "APIError": return new I(e.message, e.locator, e.data, { cause: t });
|
|
1892
|
+
case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
1894
1893
|
case "ConnectorError": return new Fe(e.message, e.locator, e.data, { cause: t });
|
|
1895
|
-
case "EngineError": return new
|
|
1894
|
+
case "EngineError": return new L(e.message, e.locator, e.data, { cause: t });
|
|
1896
1895
|
case "FetchError": return new R(e.message, e.locator, e.data, { cause: t });
|
|
1897
1896
|
default: {
|
|
1898
1897
|
let n = e.name;
|
|
@@ -1913,18 +1912,18 @@ function Ue(e) {
|
|
|
1913
1912
|
}
|
|
1914
1913
|
function B(e) {
|
|
1915
1914
|
let t = e;
|
|
1916
|
-
for (let [e, n] of
|
|
1915
|
+
for (let [e, n] of Pe) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
1917
1916
|
return t;
|
|
1918
1917
|
}
|
|
1919
1918
|
function V(e, t, n) {
|
|
1920
|
-
return typeof e == "string" ? B(e) : typeof e != "object" || !e ? e : n >=
|
|
1919
|
+
return typeof e == "string" ? B(e) : typeof e != "object" || !e ? e : n >= Me ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => V(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Ne.test(e) ? N : V(r, t, n + 1)])));
|
|
1921
1920
|
}
|
|
1922
1921
|
function We(e) {
|
|
1923
|
-
if (e != null && e !== "") return e.length >
|
|
1922
|
+
if (e != null && e !== "") return e.length > je ? `${e.slice(0, je)}... [truncated]` : e;
|
|
1924
1923
|
}
|
|
1925
1924
|
function Ge(e) {
|
|
1926
1925
|
let t = e.cause == null ? null : z(e.cause);
|
|
1927
|
-
if (e instanceof
|
|
1926
|
+
if (e instanceof P) return [{
|
|
1928
1927
|
data: e.data,
|
|
1929
1928
|
locator: e.locator,
|
|
1930
1929
|
message: e.message,
|
|
@@ -1946,7 +1945,7 @@ function Ge(e) {
|
|
|
1946
1945
|
stack: void 0
|
|
1947
1946
|
}, null];
|
|
1948
1947
|
}
|
|
1949
|
-
var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */
|
|
1948
|
+
var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ te(/* @__PURE__ */ h(D([
|
|
1950
1949
|
"arrow",
|
|
1951
1950
|
"avro",
|
|
1952
1951
|
"dtv",
|
|
@@ -1960,7 +1959,7 @@ var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ ee(/* @__PURE__ */ h
|
|
|
1960
1959
|
"xlsx",
|
|
1961
1960
|
"xml"
|
|
1962
1961
|
])), /* @__PURE__ */ f(1)) }), qe = /* @__PURE__ */ h(/* @__PURE__ */ w()), Je = /* @__PURE__ */ C({
|
|
1963
|
-
...
|
|
1962
|
+
...j,
|
|
1964
1963
|
typeId: /* @__PURE__ */ _("tool"),
|
|
1965
1964
|
actionNames: /* @__PURE__ */ x(qe),
|
|
1966
1965
|
parser: /* @__PURE__ */ x(Ke)
|
|
@@ -2038,19 +2037,19 @@ function G(e, t, n) {
|
|
|
2038
2037
|
availableToolIds: e.map((e) => e.id),
|
|
2039
2038
|
dataFormatId: t
|
|
2040
2039
|
};
|
|
2041
|
-
throw new
|
|
2040
|
+
throw new F(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
|
|
2042
2041
|
}
|
|
2043
2042
|
let a = tt[t];
|
|
2044
2043
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
2045
2044
|
}
|
|
2046
|
-
async function
|
|
2045
|
+
async function K(e, t) {
|
|
2047
2046
|
let n = `${U}${t}`, r = e.find((e) => e.id === n);
|
|
2048
2047
|
if (!r) {
|
|
2049
2048
|
let r = {
|
|
2050
2049
|
availableToolIds: e.map((e) => e.id),
|
|
2051
2050
|
toolName: n
|
|
2052
2051
|
};
|
|
2053
|
-
throw new
|
|
2052
|
+
throw new F(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
2054
2053
|
}
|
|
2055
2054
|
let i = `${et}/${t}_v${r.version}/${n}.es.js`;
|
|
2056
2055
|
try {
|
|
@@ -2064,12 +2063,12 @@ async function nt(e, t) {
|
|
|
2064
2063
|
url: i,
|
|
2065
2064
|
version: r.version
|
|
2066
2065
|
};
|
|
2067
|
-
throw new
|
|
2066
|
+
throw new F(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
|
|
2068
2067
|
}
|
|
2069
2068
|
}
|
|
2070
2069
|
// src/component/module/connector/objectParsing.ts
|
|
2071
|
-
var
|
|
2072
|
-
async function
|
|
2070
|
+
var nt = "\n", q = ",", rt = 13, J = 10, it = 34, Y = 1048576;
|
|
2071
|
+
async function at(e) {
|
|
2073
2072
|
let { asAt: t, declaredColumnConfigs: n, declaredReadingConfig: r, filePreview: i, inferDataTypes: a, readingChoiceConfig: o, startedAt: s, toolConfigs: c } = e, { isComplete: l, text: u } = i, d = r != null, f = i.bytes.length, p = {
|
|
2074
2073
|
decodedEncodingId: i.decodedEncodingId,
|
|
2075
2074
|
replacementCharacterCount: i.replacementCharacterCount
|
|
@@ -2103,10 +2102,10 @@ async function ot(e) {
|
|
|
2103
2102
|
hasHeaders: !1,
|
|
2104
2103
|
parsedRecords: [],
|
|
2105
2104
|
parserId: void 0,
|
|
2106
|
-
recordDelimiterId:
|
|
2105
|
+
recordDelimiterId: nt,
|
|
2107
2106
|
size: 0,
|
|
2108
2107
|
text: void 0,
|
|
2109
|
-
valueDelimiterId:
|
|
2108
|
+
valueDelimiterId: q
|
|
2110
2109
|
},
|
|
2111
2110
|
readingConfig: {
|
|
2112
2111
|
dataFormatId: "dtv",
|
|
@@ -2116,8 +2115,8 @@ async function ot(e) {
|
|
|
2116
2115
|
hasHeaders: !1,
|
|
2117
2116
|
isDeclared: d,
|
|
2118
2117
|
parserId: void 0,
|
|
2119
|
-
recordDelimiterId:
|
|
2120
|
-
valueDelimiterId:
|
|
2118
|
+
recordDelimiterId: nt,
|
|
2119
|
+
valueDelimiterId: q
|
|
2121
2120
|
},
|
|
2122
2121
|
encodingCandidates: m
|
|
2123
2122
|
};
|
|
@@ -2171,41 +2170,59 @@ async function ot(e) {
|
|
|
2171
2170
|
encodingCandidates: m
|
|
2172
2171
|
};
|
|
2173
2172
|
}
|
|
2173
|
+
async function* ot(e) {
|
|
2174
|
+
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } = ct(t), { parser: s } = await X(i, t.dataFormatId, t.parserId), { recordCount: c } = yield* s.parseStream(r, {
|
|
2175
|
+
abortSignal: n,
|
|
2176
|
+
chunkSize: t.chunkSize,
|
|
2177
|
+
dataFormatId: t.dataFormatId,
|
|
2178
|
+
encodingId: a,
|
|
2179
|
+
valueDelimiterId: o
|
|
2180
|
+
});
|
|
2181
|
+
return { recordCount: c };
|
|
2182
|
+
}
|
|
2174
2183
|
async function st(e) {
|
|
2175
|
-
let {
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
encodingId: n.encodingId,
|
|
2181
|
-
valueDelimiterId: n.valueDelimiterId
|
|
2182
|
-
}, t);
|
|
2183
|
-
}
|
|
2184
|
-
async function ct(e) {
|
|
2185
|
-
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, c = Date.now(), l = performance.now(), u = t(i.hasHeaders, n), { parser: d } = await Y(s, i.dataFormatId, i.parserId), f = ft(o), p = ut(f.stream, i), m = await d.parseStream(p.stream, {
|
|
2184
|
+
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } = ct(i), u = Date.now(), d = performance.now(), f = t(i.hasHeaders, n), { parser: p } = await X(s, i.dataFormatId, i.parserId), m = ft(o), h = ut(m.stream, {
|
|
2185
|
+
byteLimit: i.byteLimit,
|
|
2186
|
+
encodingId: c,
|
|
2187
|
+
stopSignal: i.stopSignal
|
|
2188
|
+
}), g = p.parseStream(h.stream, {
|
|
2186
2189
|
abortSignal: a,
|
|
2187
2190
|
chunkSize: i.chunkSize,
|
|
2188
2191
|
dataFormatId: i.dataFormatId,
|
|
2189
|
-
encodingId:
|
|
2190
|
-
valueDelimiterId:
|
|
2191
|
-
},
|
|
2192
|
-
|
|
2193
|
-
|
|
2192
|
+
encodingId: c,
|
|
2193
|
+
valueDelimiterId: l
|
|
2194
|
+
}), _ = await g.next();
|
|
2195
|
+
for (; _.done !== !0;) {
|
|
2196
|
+
try {
|
|
2197
|
+
f.auditRecords(_.value.records), r(_.value.records.length, h.byteCount());
|
|
2198
|
+
} catch (e) {
|
|
2199
|
+
throw await g.throw(e), e;
|
|
2200
|
+
}
|
|
2201
|
+
_ = await g.next();
|
|
2202
|
+
}
|
|
2203
|
+
let v = _.value, { columnConfigs: y, hasHeaders: b } = f.completeAudit();
|
|
2194
2204
|
return {
|
|
2195
2205
|
contentAuditConfig: {
|
|
2196
|
-
asAt:
|
|
2197
|
-
byteCount:
|
|
2198
|
-
columns:
|
|
2199
|
-
commentLineCount:
|
|
2200
|
-
duration: performance.now() -
|
|
2201
|
-
emptyLineCount:
|
|
2202
|
-
invalidFieldLengthCount:
|
|
2203
|
-
isComplete:
|
|
2204
|
-
lineCount:
|
|
2205
|
-
recordCount: Math.max(0,
|
|
2206
|
-
sourceWaitDuration:
|
|
2206
|
+
asAt: u,
|
|
2207
|
+
byteCount: h.byteCount(),
|
|
2208
|
+
columns: y,
|
|
2209
|
+
commentLineCount: v.commentLineCount,
|
|
2210
|
+
duration: performance.now() - d,
|
|
2211
|
+
emptyLineCount: v.emptyLineCount,
|
|
2212
|
+
invalidFieldLengthCount: v.nonUniformRecordCount,
|
|
2213
|
+
isComplete: h.isComplete(),
|
|
2214
|
+
lineCount: v.lineCount,
|
|
2215
|
+
recordCount: Math.max(0, v.recordCount - +!!b),
|
|
2216
|
+
sourceWaitDuration: m.waitDuration()
|
|
2207
2217
|
},
|
|
2208
|
-
hasHeaders:
|
|
2218
|
+
hasHeaders: b
|
|
2219
|
+
};
|
|
2220
|
+
}
|
|
2221
|
+
function ct(e) {
|
|
2222
|
+
if (e.encodingId == null || e.valueDelimiterId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
|
|
2223
|
+
return {
|
|
2224
|
+
encodingId: e.encodingId,
|
|
2225
|
+
valueDelimiterId: e.valueDelimiterId
|
|
2209
2226
|
};
|
|
2210
2227
|
}
|
|
2211
2228
|
function lt(e) {
|
|
@@ -2240,8 +2257,8 @@ function ut(e, t) {
|
|
|
2240
2257
|
}
|
|
2241
2258
|
s = t.value;
|
|
2242
2259
|
}
|
|
2243
|
-
let c = s.subarray(0,
|
|
2244
|
-
o = s.length >
|
|
2260
|
+
let c = s.subarray(0, Y);
|
|
2261
|
+
o = s.length > Y ? s.subarray(Y) : void 0;
|
|
2245
2262
|
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2246
2263
|
u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
|
|
2247
2264
|
},
|
|
@@ -2252,13 +2269,13 @@ function ut(e, t) {
|
|
|
2252
2269
|
};
|
|
2253
2270
|
}
|
|
2254
2271
|
function dt(e) {
|
|
2255
|
-
let t =
|
|
2272
|
+
let t = Oe(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2256
2273
|
return (e, t, o) => {
|
|
2257
2274
|
for (let s = 0; s < e.length; s++) {
|
|
2258
2275
|
let c = e[s];
|
|
2259
|
-
if ((c ===
|
|
2260
|
-
if (c ===
|
|
2261
|
-
else if (!a && s >= o && (c ===
|
|
2276
|
+
if ((c === it || c === J || c === rt) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2277
|
+
if (c === it) a = !a;
|
|
2278
|
+
else if (!a && s >= o && (c === J || e[s + r] !== J)) return s + r - i;
|
|
2262
2279
|
}
|
|
2263
2280
|
}
|
|
2264
2281
|
};
|
|
@@ -2281,38 +2298,48 @@ function ft(e) {
|
|
|
2281
2298
|
async function pt(e) {
|
|
2282
2299
|
let { dataFormatId: t, isComplete: n, parserId: r, text: i, toolConfigs: a, valueDelimiterId: o } = e;
|
|
2283
2300
|
if (t == null || i == null || W(a, t).length === 0) return;
|
|
2284
|
-
let { parser: s, parserId: c } = await
|
|
2301
|
+
let { parser: s, parserId: c } = await X(a, t, r), l = o == null ? A.map(({ id: e }) => e) : [o], u = await s.parseText(i, {
|
|
2285
2302
|
dataFormatId: t,
|
|
2286
2303
|
isComplete: n,
|
|
2287
2304
|
valueDelimiterIds: l
|
|
2288
2305
|
}), d = t === "dtv", f = d && o == null && u.valueDelimiterId == null ? await s.parseText(i, {
|
|
2289
2306
|
dataFormatId: t,
|
|
2290
2307
|
isComplete: n,
|
|
2291
|
-
valueDelimiterIds: [
|
|
2308
|
+
valueDelimiterIds: [q]
|
|
2292
2309
|
}) : u;
|
|
2293
2310
|
return {
|
|
2294
2311
|
parserId: c,
|
|
2295
2312
|
parseTextResult: f,
|
|
2296
|
-
valueDelimiterId: d ? o ?? f.valueDelimiterId ??
|
|
2313
|
+
valueDelimiterId: d ? o ?? f.valueDelimiterId ?? q : f.valueDelimiterId
|
|
2297
2314
|
};
|
|
2298
2315
|
}
|
|
2299
|
-
async function
|
|
2316
|
+
async function X(e, t, n) {
|
|
2300
2317
|
let r = G(e, t, n);
|
|
2301
2318
|
return {
|
|
2302
|
-
parser: await
|
|
2319
|
+
parser: await K(e, r.id.slice(U.length)),
|
|
2303
2320
|
parserId: r.id
|
|
2304
2321
|
};
|
|
2305
2322
|
}
|
|
2306
|
-
|
|
2323
|
+
// src/component/module/connector/storeValues.ts
|
|
2324
|
+
function mt(e) {
|
|
2325
|
+
return e.map((e) => ({
|
|
2326
|
+
value: ht(e),
|
|
2327
|
+
valueWasQuoted: !1
|
|
2328
|
+
}));
|
|
2329
|
+
}
|
|
2330
|
+
function ht(e) {
|
|
2331
|
+
return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
|
|
2332
|
+
}
|
|
2333
|
+
var gt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2307
2334
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2308
2335
|
name: /* @__PURE__ */ w(),
|
|
2309
2336
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2310
2337
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2311
|
-
})) }),
|
|
2338
|
+
})) }), _t = /* @__PURE__ */ v({
|
|
2312
2339
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2313
2340
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2314
2341
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2315
|
-
}),
|
|
2342
|
+
}), vt = {
|
|
2316
2343
|
boolean: {
|
|
2317
2344
|
dataSubtypeId: void 0,
|
|
2318
2345
|
dataTypeId: "boolean"
|
|
@@ -2345,18 +2372,18 @@ var mt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2345
2372
|
dataSubtypeId: "integer",
|
|
2346
2373
|
dataTypeId: "numeric"
|
|
2347
2374
|
}
|
|
2348
|
-
},
|
|
2375
|
+
}, yt = {
|
|
2349
2376
|
email: "email",
|
|
2350
2377
|
uri: "url",
|
|
2351
2378
|
uuid: "uuid"
|
|
2352
2379
|
};
|
|
2353
|
-
function
|
|
2354
|
-
let t = /* @__PURE__ */
|
|
2355
|
-
if (!t.success) throw new
|
|
2356
|
-
let n = /* @__PURE__ */
|
|
2357
|
-
if (!n.success) throw new
|
|
2380
|
+
function bt(e) {
|
|
2381
|
+
let t = /* @__PURE__ */ ne(gt, e.schema);
|
|
2382
|
+
if (!t.success) throw new F("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2383
|
+
let n = /* @__PURE__ */ ne(_t, e.dialect ?? {});
|
|
2384
|
+
if (!n.success) throw new F("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2358
2385
|
let r = t.output.fields.map((e) => {
|
|
2359
|
-
let t =
|
|
2386
|
+
let t = xt(e.type, e.format);
|
|
2360
2387
|
return {
|
|
2361
2388
|
name: e.name,
|
|
2362
2389
|
label: e.title,
|
|
@@ -2370,22 +2397,22 @@ function vt(e) {
|
|
|
2370
2397
|
dataFormatId: "dtv",
|
|
2371
2398
|
encodingId: e.encoding?.toLowerCase(),
|
|
2372
2399
|
hasHeaders: a && o.length > 0,
|
|
2373
|
-
valueDelimiterId:
|
|
2400
|
+
valueDelimiterId: A.find(({ character: e }) => e === i)?.id
|
|
2374
2401
|
}
|
|
2375
2402
|
};
|
|
2376
2403
|
}
|
|
2377
|
-
function
|
|
2378
|
-
let n = e == null ? void 0 :
|
|
2404
|
+
function xt(e, t) {
|
|
2405
|
+
let n = e == null ? void 0 : vt[e];
|
|
2379
2406
|
return n == null ? {
|
|
2380
2407
|
dataSubtypeId: void 0,
|
|
2381
2408
|
dataTypeId: void 0
|
|
2382
2409
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2383
|
-
dataSubtypeId:
|
|
2410
|
+
dataSubtypeId: yt[t] ?? "plain",
|
|
2384
2411
|
dataTypeId: "string"
|
|
2385
2412
|
};
|
|
2386
2413
|
}
|
|
2387
2414
|
// src/component/module/connector/index.ts
|
|
2388
|
-
var
|
|
2415
|
+
var St = [
|
|
2389
2416
|
{
|
|
2390
2417
|
id: "application",
|
|
2391
2418
|
label: {
|
|
@@ -2414,7 +2441,7 @@ var bt = [
|
|
|
2414
2441
|
es: "Almacén de Archivos"
|
|
2415
2442
|
}
|
|
2416
2443
|
}
|
|
2417
|
-
],
|
|
2444
|
+
], Ct = [
|
|
2418
2445
|
{
|
|
2419
2446
|
id: "apiEndpoint",
|
|
2420
2447
|
label: {
|
|
@@ -2436,7 +2463,7 @@ var bt = [
|
|
|
2436
2463
|
es: "Tabla"
|
|
2437
2464
|
}
|
|
2438
2465
|
}
|
|
2439
|
-
],
|
|
2466
|
+
], wt = {
|
|
2440
2467
|
abortOperation: "Abort Operation",
|
|
2441
2468
|
auditObjectContent: "Audit Object Content",
|
|
2442
2469
|
closeStore: "Close Store",
|
|
@@ -2453,10 +2480,9 @@ var bt = [
|
|
|
2453
2480
|
previewObject: "Preview Object",
|
|
2454
2481
|
queryRecords: "Query Records",
|
|
2455
2482
|
removeRecords: "Remove Records",
|
|
2456
|
-
retrieveChunks: "Retrieve Chunks",
|
|
2457
2483
|
retrieveRecords: "Retrieve Records",
|
|
2458
2484
|
upsertRecords: "Upsert Records"
|
|
2459
|
-
},
|
|
2485
|
+
}, Tt = [
|
|
2460
2486
|
{
|
|
2461
2487
|
id: "bidirectional",
|
|
2462
2488
|
label: {
|
|
@@ -2485,13 +2511,13 @@ var bt = [
|
|
|
2485
2511
|
es: "Desconocido"
|
|
2486
2512
|
}
|
|
2487
2513
|
}
|
|
2488
|
-
],
|
|
2514
|
+
], Et = /* @__PURE__ */ new Set([
|
|
2489
2515
|
"createObject",
|
|
2490
2516
|
"dropObject",
|
|
2491
2517
|
"loadObjectRecords",
|
|
2492
2518
|
"removeRecords",
|
|
2493
2519
|
"upsertRecords"
|
|
2494
|
-
]),
|
|
2520
|
+
]), Dt = /* @__PURE__ */ new Set([
|
|
2495
2521
|
"auditObjectContent",
|
|
2496
2522
|
"findObject",
|
|
2497
2523
|
"getInfo",
|
|
@@ -2500,16 +2526,15 @@ var bt = [
|
|
|
2500
2526
|
"listNodes",
|
|
2501
2527
|
"previewObject",
|
|
2502
2528
|
"queryRecords",
|
|
2503
|
-
"retrieveChunks",
|
|
2504
2529
|
"retrieveRecords"
|
|
2505
2530
|
]);
|
|
2506
|
-
function
|
|
2531
|
+
function Ot(e) {
|
|
2507
2532
|
let t = !1, n = !1;
|
|
2508
|
-
for (let r of e)
|
|
2533
|
+
for (let r of e) Dt.has(r) && (t = !0), Et.has(r) && (n = !0);
|
|
2509
2534
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2510
2535
|
}
|
|
2511
|
-
var
|
|
2512
|
-
let i =
|
|
2536
|
+
var kt = (e, t = "en") => {
|
|
2537
|
+
let i = St.find((t) => t.id === e);
|
|
2513
2538
|
return i ? {
|
|
2514
2539
|
label: r(n(i.label), t) ?? i.id,
|
|
2515
2540
|
description: ""
|
|
@@ -2517,8 +2542,8 @@ var Dt = (e, t = "en") => {
|
|
|
2517
2542
|
label: e,
|
|
2518
2543
|
description: ""
|
|
2519
2544
|
};
|
|
2520
|
-
},
|
|
2521
|
-
let i =
|
|
2545
|
+
}, At = (e, t = "en") => {
|
|
2546
|
+
let i = Ct.find((t) => t.id === e);
|
|
2522
2547
|
return i ? {
|
|
2523
2548
|
label: r(n(i.label), t) ?? i.id,
|
|
2524
2549
|
description: ""
|
|
@@ -2526,8 +2551,8 @@ var Dt = (e, t = "en") => {
|
|
|
2526
2551
|
label: e,
|
|
2527
2552
|
description: ""
|
|
2528
2553
|
};
|
|
2529
|
-
},
|
|
2530
|
-
let i =
|
|
2554
|
+
}, jt = (e, t = "en") => {
|
|
2555
|
+
let i = Tt.find((t) => t.id === e);
|
|
2531
2556
|
return i ? {
|
|
2532
2557
|
label: r(n(i.label), t) ?? i.id,
|
|
2533
2558
|
description: ""
|
|
@@ -2536,30 +2561,30 @@ var Dt = (e, t = "en") => {
|
|
|
2536
2561
|
description: ""
|
|
2537
2562
|
};
|
|
2538
2563
|
};
|
|
2539
|
-
function
|
|
2564
|
+
function Mt(e) {
|
|
2540
2565
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2541
2566
|
n += "|:----|:-------:|\n";
|
|
2542
|
-
for (let e of Object.keys(
|
|
2567
|
+
for (let e of Object.keys(wt)) n += `| ${wt[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2543
2568
|
return n;
|
|
2544
2569
|
}
|
|
2545
2570
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2546
|
-
var
|
|
2547
|
-
...
|
|
2571
|
+
var Nt = D(["list"]), Pt = /* @__PURE__ */ C({
|
|
2572
|
+
...j,
|
|
2548
2573
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2549
|
-
actionNames: /* @__PURE__ */ h(
|
|
2550
|
-
recipes: /* @__PURE__ */ h(
|
|
2551
|
-
}),
|
|
2574
|
+
actionNames: /* @__PURE__ */ h(Nt),
|
|
2575
|
+
recipes: /* @__PURE__ */ h(k)
|
|
2576
|
+
}), Ft = D([
|
|
2552
2577
|
"list",
|
|
2553
2578
|
"render",
|
|
2554
2579
|
"setColorMode"
|
|
2555
|
-
]),
|
|
2556
|
-
...
|
|
2580
|
+
]), It = /* @__PURE__ */ C({
|
|
2581
|
+
...j,
|
|
2557
2582
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2558
|
-
actionNames: /* @__PURE__ */ h(
|
|
2559
|
-
presentations: /* @__PURE__ */ h(
|
|
2560
|
-
}),
|
|
2561
|
-
async function
|
|
2562
|
-
let i = e.id, a = `${
|
|
2583
|
+
actionNames: /* @__PURE__ */ h(Ft),
|
|
2584
|
+
presentations: /* @__PURE__ */ h(k)
|
|
2585
|
+
}), Lt = "https://engine-eu.dpuse.app/presenters";
|
|
2586
|
+
async function Rt(e, t, n, r) {
|
|
2587
|
+
let i = e.id, a = `${Lt}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2563
2588
|
try {
|
|
2564
2589
|
return new (await (import(
|
|
2565
2590
|
/* @vite-ignore */
|
|
@@ -2571,11 +2596,11 @@ async function It(e, t, n, r) {
|
|
|
2571
2596
|
url: a,
|
|
2572
2597
|
version: e.version
|
|
2573
2598
|
};
|
|
2574
|
-
throw new
|
|
2599
|
+
throw new F(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
|
|
2575
2600
|
}
|
|
2576
2601
|
}
|
|
2577
2602
|
// src/locale/index.ts
|
|
2578
|
-
function
|
|
2603
|
+
function zt(e, t) {
|
|
2579
2604
|
return {
|
|
2580
2605
|
...e,
|
|
2581
2606
|
label: e.label[t] ?? e.id,
|
|
@@ -2583,7 +2608,7 @@ function Lt(e, t) {
|
|
|
2583
2608
|
verb: e.verb?.[t] ?? void 0
|
|
2584
2609
|
};
|
|
2585
2610
|
}
|
|
2586
|
-
function
|
|
2611
|
+
function Bt(e, t, n = !1) {
|
|
2587
2612
|
let r = e.map((e) => ({
|
|
2588
2613
|
...e,
|
|
2589
2614
|
label: e.label[t] ?? e.id,
|
|
@@ -2592,7 +2617,7 @@ function Rt(e, t, n = !1) {
|
|
|
2592
2617
|
}));
|
|
2593
2618
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2594
2619
|
}
|
|
2595
|
-
function
|
|
2620
|
+
function Vt(e, t) {
|
|
2596
2621
|
return {
|
|
2597
2622
|
...e,
|
|
2598
2623
|
label: e.label[t] ?? e.id,
|
|
@@ -2600,7 +2625,7 @@ function zt(e, t) {
|
|
|
2600
2625
|
};
|
|
2601
2626
|
}
|
|
2602
2627
|
// src/utilities/index.ts
|
|
2603
|
-
var
|
|
2628
|
+
var Ht = /* @__PURE__ */ new Map([
|
|
2604
2629
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2605
2630
|
["avro", "application/vnd.apache.avro"],
|
|
2606
2631
|
["bin", "application/octet-stream"],
|
|
@@ -2621,20 +2646,20 @@ var Bt = /* @__PURE__ */ new Map([
|
|
|
2621
2646
|
["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
|
|
2622
2647
|
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
2623
2648
|
["xml", "application/xml"]
|
|
2624
|
-
]),
|
|
2649
|
+
]), Z = "en", Q = [
|
|
2625
2650
|
["day", 864e5],
|
|
2626
2651
|
["hour", 36e5],
|
|
2627
2652
|
["minute", 6e4],
|
|
2628
2653
|
["second", 1e3],
|
|
2629
2654
|
["millisecond", 1]
|
|
2630
|
-
],
|
|
2655
|
+
], Ut = [
|
|
2631
2656
|
["byte", 1],
|
|
2632
2657
|
["kilobyte", 1024],
|
|
2633
2658
|
["megabyte", 1048576],
|
|
2634
2659
|
["gigabyte", 1073741824],
|
|
2635
2660
|
["terabyte", 1099511627776]
|
|
2636
|
-
],
|
|
2637
|
-
function
|
|
2661
|
+
], Wt = /* @__PURE__ */ new Map(), Gt = /* @__PURE__ */ new Map();
|
|
2662
|
+
function Kt(e, t = 2, n = t, r = Z) {
|
|
2638
2663
|
return e == null ? "" : $(r, {
|
|
2639
2664
|
localeMatcher: "best fit",
|
|
2640
2665
|
maximumFractionDigits: t,
|
|
@@ -2644,18 +2669,18 @@ function Ut(e, t = 2, n = t, r = X) {
|
|
|
2644
2669
|
useGrouping: !0
|
|
2645
2670
|
}).format(e);
|
|
2646
2671
|
}
|
|
2647
|
-
function
|
|
2648
|
-
return
|
|
2672
|
+
function qt(e, t = Z) {
|
|
2673
|
+
return Kt(e, 0, 0, t);
|
|
2649
2674
|
}
|
|
2650
|
-
function
|
|
2675
|
+
function Jt(e, t = 1, n = Z) {
|
|
2651
2676
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2652
2677
|
maximumFractionDigits: t,
|
|
2653
2678
|
notation: "compact"
|
|
2654
2679
|
}).format(e);
|
|
2655
2680
|
}
|
|
2656
|
-
function
|
|
2681
|
+
function Yt(e, t = 1, n = Z) {
|
|
2657
2682
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2658
|
-
let [r, i] =
|
|
2683
|
+
let [r, i] = Ut.find(([, n]) => an(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
|
|
2659
2684
|
return $(n, {
|
|
2660
2685
|
maximumFractionDigits: i === 1 ? 0 : t,
|
|
2661
2686
|
style: "unit",
|
|
@@ -2663,9 +2688,9 @@ function Kt(e, t = 1, n = X) {
|
|
|
2663
2688
|
unitDisplay: i === 1 ? "long" : "short"
|
|
2664
2689
|
}).format(e / i);
|
|
2665
2690
|
}
|
|
2666
|
-
function
|
|
2691
|
+
function Xt(e, t = "millisecond", n = Z) {
|
|
2667
2692
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2668
|
-
let r = Math.round(Math.abs(e)), i =
|
|
2693
|
+
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 = [];
|
|
2669
2694
|
for (let [t, i] of s) {
|
|
2670
2695
|
let a = Math.floor(r / i);
|
|
2671
2696
|
if (a === 0 && c.length > 0) continue;
|
|
@@ -2677,25 +2702,25 @@ function qt(e, t = "millisecond", n = X) {
|
|
|
2677
2702
|
unitDisplay: "short"
|
|
2678
2703
|
}).format(o));
|
|
2679
2704
|
}
|
|
2680
|
-
return
|
|
2705
|
+
return rn(n).format(c);
|
|
2681
2706
|
}
|
|
2682
|
-
function
|
|
2707
|
+
function Zt(e) {
|
|
2683
2708
|
if (!e) return;
|
|
2684
|
-
let t =
|
|
2709
|
+
let t = nn(e);
|
|
2685
2710
|
return t === void 0 ? e : e.slice(0, t);
|
|
2686
2711
|
}
|
|
2687
|
-
function
|
|
2712
|
+
function Qt(e) {
|
|
2688
2713
|
if (!e) return;
|
|
2689
|
-
let t =
|
|
2714
|
+
let t = nn(e);
|
|
2690
2715
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2691
2716
|
}
|
|
2692
|
-
function
|
|
2693
|
-
return e != null &&
|
|
2717
|
+
function $t(e) {
|
|
2718
|
+
return e != null && Ht.has(e.toLowerCase());
|
|
2694
2719
|
}
|
|
2695
|
-
function
|
|
2696
|
-
return (e == null ? void 0 :
|
|
2720
|
+
function en(e) {
|
|
2721
|
+
return (e == null ? void 0 : Ht.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2697
2722
|
}
|
|
2698
|
-
function
|
|
2723
|
+
function tn(e) {
|
|
2699
2724
|
switch (e) {
|
|
2700
2725
|
case "Edm.Boolean": return "boolean";
|
|
2701
2726
|
case "Edm.Byte":
|
|
@@ -2716,23 +2741,23 @@ function Qt(e) {
|
|
|
2716
2741
|
default: return "unknown";
|
|
2717
2742
|
}
|
|
2718
2743
|
}
|
|
2719
|
-
function
|
|
2744
|
+
function nn(e) {
|
|
2720
2745
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2721
2746
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2722
2747
|
}
|
|
2723
|
-
function
|
|
2724
|
-
let t =
|
|
2748
|
+
function rn(e) {
|
|
2749
|
+
let t = Wt.get(e);
|
|
2725
2750
|
return t || (t = new Intl.ListFormat(e, {
|
|
2726
2751
|
style: "narrow",
|
|
2727
2752
|
type: "unit"
|
|
2728
|
-
}),
|
|
2753
|
+
}), Wt.set(e, t)), t;
|
|
2729
2754
|
}
|
|
2730
2755
|
function $(e, t) {
|
|
2731
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2732
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
2756
|
+
let n = `${e}|${JSON.stringify(t)}`, r = Gt.get(n);
|
|
2757
|
+
return r || (r = new Intl.NumberFormat(e, t), Gt.set(n, r)), r;
|
|
2733
2758
|
}
|
|
2734
|
-
function
|
|
2759
|
+
function an(e, t) {
|
|
2735
2760
|
let n = 10 ** t;
|
|
2736
2761
|
return Math.round(e * n) / n;
|
|
2737
2762
|
}
|
|
2738
|
-
export {
|
|
2763
|
+
export { I as APIError, F as AppError, Fe as ConnectorError, fe as DATA_FORMAT_CONFIGS, pe as DATA_TYPE_CONFIGS, me as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, Ee as ENCODING_GROUP_CONFIG_MAP, M as ENCODING_TYPE_CONFIG_MAP, L as EngineError, R as FetchError, t as SUPPORTED_LANGUAGES, U as TOOL_NAME_PREFIX, A as VALUE_DELIMITER_CONFIGS, st as auditObjectContentWithParser, Ie as buildFetchError, at as buildPreviewObjectResult, le as componentInstanceConfigSchema, Le as concatenateSerialisedErrorMessages, Ce as connectorConfigSchema, kt as constructConnectorCategoryConfig, At as constructConnectorItemTypeConfig, jt as constructConnectorUsageConfig, tn as convertODataTypeIdToUsageTypeId, mt as convertStoreRecordToParsedRecord, ht as convertStoreValueToText, Pt as cookbookConfigSchema, n as createLabelMap, Ot as determineConnectorUsageId, Qt as extractExtensionFromPath, Zt as extractPathWithoutExtension, Kt as formatNumberAsDecimalNumber, Xt as formatNumberAsDuration, Jt as formatNumberAsSize, Yt as formatNumberAsStorageSize, qt as formatNumberAsWholeNumber, de as getComponentStatus, Mt as getConnectorActionsTable, ke as getEncodingTypeConfigs, he as getValueDelimiterCharacter, $t as hasMimeTypeForExtension, Re as ignoreErrors, De as isEncodingTypeId, W as listParserToolConfigs, Rt as loadPresenter, K as loadTool, zt as localiseConfig, Bt as localiseConfigs, Vt as localiseReference, en as lookupMimeTypeForExtension, z as normalizeToError, Ye as parseDelimitedText, It as presenterConfigSchema, bt as readTableSchema, Oe as resolveDecoderId, r as resolveLabel, G as resolveParserToolConfig, ot as retrieveRecordsWithParser, ze as serialiseError, Je as toolConfigSchema, Be as unserialiseError };
|