@dpuse/dpuse-shared 1.0.182 → 1.0.184
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 +6 -6
- package/dist/dpuse-shared.es.js +239 -250
- package/dist/dpuse-shared.es.js.map +1 -1
- package/dist/types/src/component/connection/index.d.ts +4 -14
- package/dist/types/src/component/dataView/index.d.ts +24 -34
- package/dist/types/src/component/module/connector/index.d.ts +4 -3
- package/dist/types/src/component/module/connector/objectParsing.d.ts +3 -3
- package/dist/types/src/component/module/tool/delimitedText.d.ts +2 -2
- package/dist/types/src/component/module/tool/parser.d.ts +2 -2
- package/package.json +5 -5
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/locale/label.ts
|
|
2
2
|
var e = "en", t = [{
|
|
3
3
|
id: "en",
|
|
4
4
|
flag: "gb",
|
|
@@ -15,8 +15,7 @@ function r(e, t, n = "en") {
|
|
|
15
15
|
let r = e.get(t);
|
|
16
16
|
return r === void 0 ? n === t ? void 0 : e.get(n) : r;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
//#region node_modules/valibot/dist/index.mjs
|
|
18
|
+
// node_modules/valibot/dist/index.mjs
|
|
20
19
|
var i = {
|
|
21
20
|
lang: void 0,
|
|
22
21
|
message: void 0,
|
|
@@ -253,7 +252,7 @@ function x(e, t, n) {
|
|
|
253
252
|
break;
|
|
254
253
|
}
|
|
255
254
|
}
|
|
256
|
-
|
|
255
|
+
a.typed && o.typed || (e.typed = !1), a.typed && (e.value[a.value] = o.value);
|
|
257
256
|
}
|
|
258
257
|
} else s(this, "type", e, t);
|
|
259
258
|
return e;
|
|
@@ -349,11 +348,11 @@ function ee(e) {
|
|
|
349
348
|
return t;
|
|
350
349
|
}
|
|
351
350
|
/* @__NO_SIDE_EFFECTS__ */
|
|
352
|
-
function
|
|
351
|
+
function w(e, t) {
|
|
353
352
|
return d({
|
|
354
353
|
kind: "schema",
|
|
355
354
|
type: "union",
|
|
356
|
-
reference:
|
|
355
|
+
reference: w,
|
|
357
356
|
expects: /* @__PURE__ */ u(e.map((e) => e.expects), "|"),
|
|
358
357
|
async: !1,
|
|
359
358
|
options: e,
|
|
@@ -381,7 +380,7 @@ function te(e, t) {
|
|
|
381
380
|
});
|
|
382
381
|
}
|
|
383
382
|
/* @__NO_SIDE_EFFECTS__ */
|
|
384
|
-
function
|
|
383
|
+
function te(...e) {
|
|
385
384
|
return d({
|
|
386
385
|
...e[0],
|
|
387
386
|
pipe: e,
|
|
@@ -391,18 +390,17 @@ function ne(...e) {
|
|
|
391
390
|
t.typed = !1;
|
|
392
391
|
break;
|
|
393
392
|
}
|
|
394
|
-
|
|
393
|
+
t.issues && (n.abortEarly || n.abortPipeEarly) || (t = r["~run"](t, n));
|
|
395
394
|
}
|
|
396
395
|
return t;
|
|
397
396
|
}
|
|
398
397
|
});
|
|
399
398
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
var w = /* @__PURE__ */ S({
|
|
399
|
+
// src/locale/locale.schema.ts
|
|
400
|
+
var T = /* @__PURE__ */ S({
|
|
403
401
|
en: /* @__PURE__ */ C(),
|
|
404
402
|
es: /* @__PURE__ */ C()
|
|
405
|
-
}),
|
|
403
|
+
}), ne = {
|
|
406
404
|
id: /* @__PURE__ */ C(),
|
|
407
405
|
label: /* @__PURE__ */ S({
|
|
408
406
|
en: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
@@ -414,7 +412,7 @@ var w = /* @__PURE__ */ S({
|
|
|
414
412
|
}),
|
|
415
413
|
icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
416
414
|
iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C())
|
|
417
|
-
},
|
|
415
|
+
}, E = (e) => /* @__PURE__ */ w(e.map((e) => /* @__PURE__ */ _(e))), re = E([
|
|
418
416
|
"app",
|
|
419
417
|
"connector",
|
|
420
418
|
"connectorConnection",
|
|
@@ -436,31 +434,31 @@ var w = /* @__PURE__ */ S({
|
|
|
436
434
|
"presenter",
|
|
437
435
|
"presenterPresentation",
|
|
438
436
|
"tool"
|
|
439
|
-
]),
|
|
437
|
+
]), ie = E([
|
|
440
438
|
"danger",
|
|
441
439
|
"success",
|
|
442
440
|
"warning"
|
|
443
|
-
]),
|
|
441
|
+
]), ae = E([
|
|
444
442
|
"alpha",
|
|
445
443
|
"beta",
|
|
446
444
|
"releaseCandidate",
|
|
447
445
|
"generalAvailability"
|
|
448
|
-
]),
|
|
449
|
-
color:
|
|
446
|
+
]), oe = /* @__PURE__ */ S({
|
|
447
|
+
color: ie,
|
|
450
448
|
label: /* @__PURE__ */ C()
|
|
451
|
-
}),
|
|
452
|
-
...
|
|
453
|
-
typeId:
|
|
449
|
+
}), se = {
|
|
450
|
+
...ne,
|
|
451
|
+
typeId: re
|
|
454
452
|
}, ce = /* @__PURE__ */ S({
|
|
455
|
-
...
|
|
453
|
+
...se,
|
|
456
454
|
order: /* @__PURE__ */ y(),
|
|
457
455
|
path: /* @__PURE__ */ C()
|
|
458
456
|
}), le = {
|
|
459
|
-
...
|
|
457
|
+
...se,
|
|
460
458
|
firstCreatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
461
459
|
lastUpdatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
462
|
-
status: /* @__PURE__ */ v(
|
|
463
|
-
statusId: /* @__PURE__ */ v(
|
|
460
|
+
status: /* @__PURE__ */ v(oe),
|
|
461
|
+
statusId: /* @__PURE__ */ v(ae)
|
|
464
462
|
}, ue = /* @__PURE__ */ S({ ...le }), de = [
|
|
465
463
|
{
|
|
466
464
|
id: "alpha",
|
|
@@ -509,8 +507,7 @@ function fe(e, t = "en") {
|
|
|
509
507
|
label: e
|
|
510
508
|
};
|
|
511
509
|
}
|
|
512
|
-
|
|
513
|
-
//#region src/component/dataView/dataFormatIcons.ts
|
|
510
|
+
// src/component/dataView/dataFormatIcons.ts
|
|
514
511
|
var pe = {
|
|
515
512
|
arrow: {
|
|
516
513
|
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1350 1181.25\"><polygon fill=\"#000\" points=\"168.75,168.75 590.62,590.62 168.75,1012.5 168.75,843.75 421.88,590.62 168.75,337.5\"/><polygon fill=\"#000\" points=\"464.06,168.75 885.94,590.62 464.06,1012.5 464.06,843.75 717.19,590.62 464.06,337.5\"/><polygon fill=\"#000\" points=\"759.38,168.75 1181.25,590.62 759.38,1012.5 759.38,843.75 1012.5,590.62 759.38,337.5\"/></svg>",
|
|
@@ -561,8 +558,7 @@ var pe = {
|
|
|
561
558
|
iconDark: null
|
|
562
559
|
}
|
|
563
560
|
};
|
|
564
|
-
|
|
565
|
-
//#region src/component/dataView/index.ts
|
|
561
|
+
// src/component/dataView/index.ts
|
|
566
562
|
n({ en: "Arrow" }), n({ en: "Avro" }), n({ en: "Delimited text (CSV, TSV…)" }), n({ en: "JSON" }), n({ en: "JSON Lines (JSONL)" }), n({ en: "Markdown (MD)" }), n({ en: "OpenDocument spreadsheet (ODS)" }), n({ en: "Parquet" }), n({ en: "SPSS (SAV)" }), n({ en: "SQLite" }), n({ en: "Excel (XLSX, XLSM)" }), n({ en: "XML" });
|
|
567
563
|
var me = [
|
|
568
564
|
",",
|
|
@@ -576,7 +572,7 @@ var me = [
|
|
|
576
572
|
"0x1F",
|
|
577
573
|
"0x1E"
|
|
578
574
|
];
|
|
579
|
-
n({ en: "Newline" }), n({ en: "Carriage Return" }), n({ en: "Carriage Return/Newline" }), n({ en: "Colon" }), n({ en: "Comma" }), n({ en: "Exclamation Mark" }), n({ en: "Record Separator" }), n({ en: "Semicolon" }), n({ en: "Space" }), n({ en: "Tab" }), n({ en: "Underscore" }), n({ en: "Unit Separator" }), n({ en: "Vertical Bar" }),
|
|
575
|
+
n({ en: "Newline" }), n({ en: "Carriage Return" }), n({ en: "Carriage Return/Newline" }), n({ en: "Colon" }), n({ en: "Comma" }), n({ en: "Exclamation Mark" }), n({ en: "Record Separator" }), n({ en: "Semicolon" }), n({ en: "Space" }), n({ en: "Tab" }), n({ en: "Underscore" }), n({ en: "Unit Separator" }), n({ en: "Vertical Bar" }), E([
|
|
580
576
|
"app",
|
|
581
577
|
"engine",
|
|
582
578
|
"connector",
|
|
@@ -584,8 +580,7 @@ n({ en: "Newline" }), n({ en: "Carriage Return" }), n({ en: "Carriage Return/New
|
|
|
584
580
|
"presenter",
|
|
585
581
|
"tool"
|
|
586
582
|
]);
|
|
587
|
-
|
|
588
|
-
//#region src/component/module/moduleConfig.schema.ts
|
|
583
|
+
// src/component/module/moduleConfig.schema.ts
|
|
589
584
|
var D = {
|
|
590
585
|
...le,
|
|
591
586
|
vendorAccountURL: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
@@ -594,9 +589,8 @@ var D = {
|
|
|
594
589
|
version: /* @__PURE__ */ C()
|
|
595
590
|
};
|
|
596
591
|
({ ...D });
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
var he = T([
|
|
592
|
+
// src/component/module/connector/connectorConfig.schema.ts
|
|
593
|
+
var he = E([
|
|
600
594
|
"abortOperation",
|
|
601
595
|
"auditObjectContent",
|
|
602
596
|
"closeStore",
|
|
@@ -616,22 +610,22 @@ var he = T([
|
|
|
616
610
|
"retrieveChunks",
|
|
617
611
|
"retrieveRecords",
|
|
618
612
|
"upsertRecords"
|
|
619
|
-
]), ge =
|
|
613
|
+
]), ge = E([
|
|
620
614
|
"application",
|
|
621
615
|
"curatedDataset",
|
|
622
616
|
"database",
|
|
623
617
|
"fileStore"
|
|
624
|
-
]), _e = /* @__PURE__ */ S({ label:
|
|
618
|
+
]), _e = /* @__PURE__ */ S({ label: T }), ve = E([
|
|
625
619
|
"apiEndpoint",
|
|
626
620
|
"file",
|
|
627
621
|
"table"
|
|
628
|
-
]), ye =
|
|
622
|
+
]), ye = E([
|
|
629
623
|
"bidirectional",
|
|
630
624
|
"destination",
|
|
631
625
|
"source",
|
|
632
626
|
"unknown"
|
|
633
|
-
]), be = /* @__PURE__ */ S({ label:
|
|
634
|
-
authMethodId:
|
|
627
|
+
]), be = /* @__PURE__ */ S({ label: T }), xe = /* @__PURE__ */ S({
|
|
628
|
+
authMethodId: E([
|
|
635
629
|
"apiKey",
|
|
636
630
|
"disabled",
|
|
637
631
|
"oAuth2",
|
|
@@ -640,7 +634,7 @@ var he = T([
|
|
|
640
634
|
activeConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ y()),
|
|
641
635
|
canDescribe: /* @__PURE__ */ b(/* @__PURE__ */ g()),
|
|
642
636
|
id: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
643
|
-
label: /* @__PURE__ */ b(
|
|
637
|
+
label: /* @__PURE__ */ b(T),
|
|
644
638
|
maxConnectionCount: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
645
639
|
params: /* @__PURE__ */ b(/* @__PURE__ */ h(/* @__PURE__ */ x(/* @__PURE__ */ C(), /* @__PURE__ */ C())))
|
|
646
640
|
}), Se = /* @__PURE__ */ S({
|
|
@@ -1601,15 +1595,15 @@ var he = T([
|
|
|
1601
1595
|
iconvLiteDecoderId: "windows1257"
|
|
1602
1596
|
}
|
|
1603
1597
|
}, O = Ce, k = we;
|
|
1604
|
-
function
|
|
1598
|
+
function A(e) {
|
|
1605
1599
|
return Object.hasOwn(k, e);
|
|
1606
1600
|
}
|
|
1607
|
-
function
|
|
1608
|
-
return
|
|
1601
|
+
function j(e) {
|
|
1602
|
+
return A(e) ? k[e].textDecoderId ?? e : e;
|
|
1609
1603
|
}
|
|
1610
|
-
function
|
|
1604
|
+
function Te(e = "en") {
|
|
1611
1605
|
return Array.from(Object.values(k), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
1612
|
-
let o = t == null ? "" :
|
|
1606
|
+
let o = t == null ? "" : Ee(t, e);
|
|
1613
1607
|
return {
|
|
1614
1608
|
id: r,
|
|
1615
1609
|
groupLabel: o,
|
|
@@ -1621,63 +1615,62 @@ function Ee(e = "en") {
|
|
|
1621
1615
|
};
|
|
1622
1616
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
1623
1617
|
}
|
|
1624
|
-
function
|
|
1618
|
+
function Ee(e, t) {
|
|
1625
1619
|
let n = O[e].label;
|
|
1626
1620
|
return n[t] ?? n.en ?? e;
|
|
1627
1621
|
}
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
[
|
|
1632
|
-
[
|
|
1633
|
-
[/\
|
|
1634
|
-
[
|
|
1635
|
-
|
|
1636
|
-
], N = class extends Error {
|
|
1622
|
+
// src/errors/index.ts
|
|
1623
|
+
var M = 2048, N = "[REDACTED]", De = 10, Oe = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, ke = [
|
|
1624
|
+
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${N}`],
|
|
1625
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => Oe.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${N}` : e],
|
|
1626
|
+
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => N],
|
|
1627
|
+
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => N],
|
|
1628
|
+
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => N]
|
|
1629
|
+
], P = class extends Error {
|
|
1637
1630
|
data;
|
|
1638
1631
|
locator;
|
|
1639
1632
|
constructor(e, t, n, r) {
|
|
1640
1633
|
super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
|
|
1641
1634
|
}
|
|
1642
|
-
},
|
|
1635
|
+
}, F = class extends P {
|
|
1643
1636
|
constructor(e, t, n, r) {
|
|
1644
1637
|
super(e, t, n, r), this.name = "AppError";
|
|
1645
1638
|
}
|
|
1646
|
-
},
|
|
1639
|
+
}, Ae = class extends P {
|
|
1647
1640
|
constructor(e, t, n, r) {
|
|
1648
1641
|
super(e, t, n, r), this.name = "APIError";
|
|
1649
1642
|
}
|
|
1650
|
-
},
|
|
1643
|
+
}, je = class extends P {
|
|
1651
1644
|
constructor(e, t, n, r) {
|
|
1652
1645
|
super(e, t, n, r), this.name = "EngineError";
|
|
1653
1646
|
}
|
|
1654
|
-
},
|
|
1647
|
+
}, Me = class extends P {
|
|
1655
1648
|
constructor(e, t, n, r) {
|
|
1656
1649
|
super(e, t, n, r), this.name = "ConnectorError";
|
|
1657
1650
|
}
|
|
1658
|
-
},
|
|
1651
|
+
}, I = class extends P {
|
|
1659
1652
|
constructor(e, t, n, r) {
|
|
1660
1653
|
super(e, t, n, r), this.name = "FetchError";
|
|
1661
1654
|
}
|
|
1662
1655
|
};
|
|
1663
|
-
async function
|
|
1656
|
+
async function Ne(e, t, n) {
|
|
1664
1657
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
1665
1658
|
try {
|
|
1666
1659
|
a = await e.text();
|
|
1667
1660
|
} catch (e) {
|
|
1668
|
-
a = `<body unavailable: ${
|
|
1661
|
+
a = `<body unavailable: ${L(e).message}>`;
|
|
1669
1662
|
}
|
|
1670
|
-
return new
|
|
1663
|
+
return new I(i, n, { body: Ve(a) });
|
|
1671
1664
|
}
|
|
1672
|
-
function
|
|
1665
|
+
function Pe(e) {
|
|
1673
1666
|
return e.map((e) => e.message).join(" ");
|
|
1674
1667
|
}
|
|
1675
|
-
function
|
|
1668
|
+
function Fe(e) {
|
|
1676
1669
|
try {
|
|
1677
1670
|
e();
|
|
1678
1671
|
} catch {}
|
|
1679
1672
|
}
|
|
1680
|
-
function
|
|
1673
|
+
function L(e) {
|
|
1681
1674
|
if (e instanceof Error) return e;
|
|
1682
1675
|
if (typeof e == "string") return Error(e);
|
|
1683
1676
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -1689,24 +1682,24 @@ function z(e) {
|
|
|
1689
1682
|
}
|
|
1690
1683
|
return /* @__PURE__ */ Error("Unknown error");
|
|
1691
1684
|
}
|
|
1692
|
-
function
|
|
1693
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
1685
|
+
function Ie(e) {
|
|
1686
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = L(e);
|
|
1694
1687
|
for (; r != null && !t.has(r);) {
|
|
1695
1688
|
t.add(r);
|
|
1696
|
-
let [e, i] =
|
|
1689
|
+
let [e, i] = He(r), a = Be(e);
|
|
1697
1690
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
|
|
1698
1691
|
}
|
|
1699
1692
|
return n;
|
|
1700
1693
|
}
|
|
1701
|
-
function
|
|
1694
|
+
function Le(e) {
|
|
1702
1695
|
let t;
|
|
1703
1696
|
for (let n of e.toReversed()) {
|
|
1704
|
-
let e =
|
|
1697
|
+
let e = ze(n, t);
|
|
1705
1698
|
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
1706
1699
|
}
|
|
1707
1700
|
return t ?? /* @__PURE__ */ Error("No error to unserialise.");
|
|
1708
1701
|
}
|
|
1709
|
-
function
|
|
1702
|
+
function Re(e) {
|
|
1710
1703
|
let t;
|
|
1711
1704
|
try {
|
|
1712
1705
|
t = JSON.stringify(e);
|
|
@@ -1715,13 +1708,13 @@ function Ie(e) {
|
|
|
1715
1708
|
}
|
|
1716
1709
|
return t === "" && (t = "Unknown error"), t;
|
|
1717
1710
|
}
|
|
1718
|
-
function
|
|
1711
|
+
function ze(e, t) {
|
|
1719
1712
|
switch (e.name) {
|
|
1720
|
-
case "APIError": return new
|
|
1721
|
-
case "AppError": return new
|
|
1722
|
-
case "ConnectorError": return new
|
|
1723
|
-
case "EngineError": return new
|
|
1724
|
-
case "FetchError": return new
|
|
1713
|
+
case "APIError": return new Ae(e.message, e.locator, e.data, { cause: t });
|
|
1714
|
+
case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
1715
|
+
case "ConnectorError": return new Me(e.message, e.locator, e.data, { cause: t });
|
|
1716
|
+
case "EngineError": return new je(e.message, e.locator, e.data, { cause: t });
|
|
1717
|
+
case "FetchError": return new I(e.message, e.locator, e.data, { cause: t });
|
|
1725
1718
|
default: {
|
|
1726
1719
|
let n = e.name;
|
|
1727
1720
|
return new class extends Error {
|
|
@@ -1730,29 +1723,29 @@ function Le(e, t) {
|
|
|
1730
1723
|
}
|
|
1731
1724
|
}
|
|
1732
1725
|
}
|
|
1733
|
-
function
|
|
1726
|
+
function Be(e) {
|
|
1734
1727
|
let { data: t, message: n, stack: r } = e;
|
|
1735
1728
|
return {
|
|
1736
1729
|
...e,
|
|
1737
|
-
data: t === void 0 ? void 0 :
|
|
1738
|
-
message:
|
|
1739
|
-
stack: r === void 0 ? void 0 :
|
|
1730
|
+
data: t === void 0 ? void 0 : z(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
1731
|
+
message: R(n),
|
|
1732
|
+
stack: r === void 0 ? void 0 : R(r)
|
|
1740
1733
|
};
|
|
1741
1734
|
}
|
|
1742
|
-
function
|
|
1735
|
+
function R(e) {
|
|
1743
1736
|
let t = e;
|
|
1744
|
-
for (let [e, n] of
|
|
1737
|
+
for (let [e, n] of ke) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
1745
1738
|
return t;
|
|
1746
1739
|
}
|
|
1747
|
-
function
|
|
1748
|
-
return typeof e == "string" ?
|
|
1740
|
+
function z(e, t, n) {
|
|
1741
|
+
return typeof e == "string" ? R(e) : typeof e != "object" || !e ? e : n >= De ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => z(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Oe.test(e) ? N : z(r, t, n + 1)])));
|
|
1749
1742
|
}
|
|
1750
|
-
function
|
|
1751
|
-
if (e != null && e !== "") return e.length >
|
|
1743
|
+
function Ve(e) {
|
|
1744
|
+
if (e != null && e !== "") return e.length > M ? `${e.slice(0, M)}... [truncated]` : e;
|
|
1752
1745
|
}
|
|
1753
|
-
function
|
|
1754
|
-
let t = e.cause == null ? null :
|
|
1755
|
-
if (e instanceof
|
|
1746
|
+
function He(e) {
|
|
1747
|
+
let t = e.cause == null ? null : L(e.cause);
|
|
1748
|
+
if (e instanceof P) return [{
|
|
1756
1749
|
data: e.data,
|
|
1757
1750
|
locator: e.locator,
|
|
1758
1751
|
message: e.message,
|
|
@@ -1769,12 +1762,12 @@ function Be(e) {
|
|
|
1769
1762
|
}, t] : [{
|
|
1770
1763
|
data: n,
|
|
1771
1764
|
locator: "",
|
|
1772
|
-
message:
|
|
1765
|
+
message: Re(e),
|
|
1773
1766
|
name: "Error",
|
|
1774
1767
|
stack: void 0
|
|
1775
1768
|
}, null];
|
|
1776
1769
|
}
|
|
1777
|
-
var
|
|
1770
|
+
var Ue = /* @__PURE__ */ S({ dataFormatIds: /* @__PURE__ */ te(/* @__PURE__ */ h(E([
|
|
1778
1771
|
"arrow",
|
|
1779
1772
|
"avro",
|
|
1780
1773
|
"dtv",
|
|
@@ -1787,16 +1780,15 @@ var Ve = /* @__PURE__ */ S({ dataFormatIds: /* @__PURE__ */ ne(/* @__PURE__ */ h
|
|
|
1787
1780
|
"sqlite",
|
|
1788
1781
|
"xlsx",
|
|
1789
1782
|
"xml"
|
|
1790
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
1783
|
+
])), /* @__PURE__ */ f(1)) }), We = /* @__PURE__ */ h(/* @__PURE__ */ C()), Ge = /* @__PURE__ */ S({
|
|
1791
1784
|
...D,
|
|
1792
1785
|
typeId: /* @__PURE__ */ _("tool"),
|
|
1793
|
-
actionNames: /* @__PURE__ */ b(
|
|
1794
|
-
parser: /* @__PURE__ */ b(
|
|
1786
|
+
actionNames: /* @__PURE__ */ b(We),
|
|
1787
|
+
parser: /* @__PURE__ */ b(Ue)
|
|
1795
1788
|
});
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
let r = Ge(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await Ke(e, t.valueDelimiterIds, t.isComplete, n);
|
|
1789
|
+
// src/component/module/tool/delimitedText.ts
|
|
1790
|
+
async function Ke(e, t, n) {
|
|
1791
|
+
let r = qe(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await Je(e, t.valueDelimiterIds, t.isComplete, n);
|
|
1800
1792
|
return {
|
|
1801
1793
|
issues: i,
|
|
1802
1794
|
parsedRecords: a,
|
|
@@ -1804,16 +1796,16 @@ async function We(e, t, n) {
|
|
|
1804
1796
|
valueDelimiterId: o
|
|
1805
1797
|
};
|
|
1806
1798
|
}
|
|
1807
|
-
function
|
|
1799
|
+
function qe(e) {
|
|
1808
1800
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
1809
1801
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
1810
1802
|
}
|
|
1811
|
-
async function
|
|
1803
|
+
async function Je(e, t, n, r) {
|
|
1812
1804
|
let i, a, o, s = [], c, l = !1;
|
|
1813
1805
|
for (let u of t) {
|
|
1814
1806
|
let { issues: t, records: d } = await r(e, u, n);
|
|
1815
1807
|
if (t.length > 0) {
|
|
1816
|
-
c =
|
|
1808
|
+
c = Ye(c, {
|
|
1817
1809
|
delimiter: u,
|
|
1818
1810
|
issues: t,
|
|
1819
1811
|
records: d
|
|
@@ -1821,7 +1813,7 @@ async function Ke(e, t, n, r) {
|
|
|
1821
1813
|
continue;
|
|
1822
1814
|
}
|
|
1823
1815
|
if (l = !0, d.length === 0) continue;
|
|
1824
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
1816
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = Xe(d);
|
|
1825
1817
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
1826
1818
|
}
|
|
1827
1819
|
if (!l && c != null) {
|
|
@@ -1829,19 +1821,19 @@ async function Ke(e, t, n, r) {
|
|
|
1829
1821
|
return {
|
|
1830
1822
|
issues: t,
|
|
1831
1823
|
parsedRecords: n,
|
|
1832
|
-
valueDelimiterId:
|
|
1824
|
+
valueDelimiterId: B(n) ? e : void 0
|
|
1833
1825
|
};
|
|
1834
1826
|
}
|
|
1835
1827
|
return {
|
|
1836
1828
|
issues: [],
|
|
1837
1829
|
parsedRecords: s,
|
|
1838
|
-
valueDelimiterId: i != null &&
|
|
1830
|
+
valueDelimiterId: i != null && B(s) ? i : void 0
|
|
1839
1831
|
};
|
|
1840
1832
|
}
|
|
1841
|
-
function
|
|
1833
|
+
function Ye(e, t) {
|
|
1842
1834
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
1843
1835
|
}
|
|
1844
|
-
function
|
|
1836
|
+
function Xe(e) {
|
|
1845
1837
|
let t = 0, n = 0, r;
|
|
1846
1838
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
1847
1839
|
return {
|
|
@@ -1849,40 +1841,39 @@ function Je(e) {
|
|
|
1849
1841
|
sumOfValueCountDiffs: n
|
|
1850
1842
|
};
|
|
1851
1843
|
}
|
|
1852
|
-
function
|
|
1844
|
+
function B(e) {
|
|
1853
1845
|
let t = /* @__PURE__ */ new Map();
|
|
1854
1846
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
1855
1847
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
1856
1848
|
return n > 1 && r * 2 > e.length;
|
|
1857
1849
|
}
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
function W(e, t) {
|
|
1850
|
+
// src/component/module/tool/index.ts
|
|
1851
|
+
var Ze = "https://engine-eu.dpuse.app/tools", Qe = { dtv: "dpuse-tool-rust-csv-core-parser" }, V = "dpuse-tool-";
|
|
1852
|
+
function H(e, t) {
|
|
1862
1853
|
return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
|
|
1863
1854
|
}
|
|
1864
|
-
function
|
|
1865
|
-
let r =
|
|
1855
|
+
function U(e, t, n) {
|
|
1856
|
+
let r = H(e, t), [i] = r;
|
|
1866
1857
|
if (i === void 0) {
|
|
1867
1858
|
let n = {
|
|
1868
1859
|
availableToolIds: e.map((e) => e.id),
|
|
1869
1860
|
dataFormatId: t
|
|
1870
1861
|
};
|
|
1871
|
-
throw new
|
|
1862
|
+
throw new F(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
|
|
1872
1863
|
}
|
|
1873
|
-
let a =
|
|
1864
|
+
let a = Qe[t];
|
|
1874
1865
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
1875
1866
|
}
|
|
1876
|
-
async function
|
|
1877
|
-
let n = `${
|
|
1867
|
+
async function W(e, t) {
|
|
1868
|
+
let n = `${V}${t}`, r = e.find((e) => e.id === n);
|
|
1878
1869
|
if (!r) {
|
|
1879
1870
|
let r = {
|
|
1880
1871
|
availableToolIds: e.map((e) => e.id),
|
|
1881
1872
|
toolName: n
|
|
1882
1873
|
};
|
|
1883
|
-
throw new
|
|
1874
|
+
throw new F(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
1884
1875
|
}
|
|
1885
|
-
let i = `${
|
|
1876
|
+
let i = `${Ze}/${t}_v${r.version}/${n}.es.js`;
|
|
1886
1877
|
try {
|
|
1887
1878
|
return new (await (import(
|
|
1888
1879
|
/* @vite-ignore */
|
|
@@ -1894,25 +1885,23 @@ async function K(e, t) {
|
|
|
1894
1885
|
url: i,
|
|
1895
1886
|
version: r.version
|
|
1896
1887
|
};
|
|
1897
|
-
throw new
|
|
1888
|
+
throw new F(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
|
|
1898
1889
|
}
|
|
1899
1890
|
}
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
async function et(e) {
|
|
1891
|
+
// src/component/module/connector/objectParsing.ts
|
|
1892
|
+
var $e = "\n", G = ",", et = 13, K = 10, tt = 34, q = 1048576;
|
|
1893
|
+
async function nt(e) {
|
|
1904
1894
|
let { asAt: t, filePreview: n, inferDataTypes: r, parserId: i, startedAt: a, toolConfigs: o, valueDelimiterId: s } = e, { dataFormatId: c, text: l } = n, u = n.bytes.length;
|
|
1905
1895
|
if (u === 0) return {
|
|
1906
|
-
contentAuditConfig:
|
|
1896
|
+
contentAuditConfig: J({
|
|
1907
1897
|
asAt: t,
|
|
1908
1898
|
columns: [],
|
|
1909
|
-
hasHeaders: !1,
|
|
1910
1899
|
isComplete: !0,
|
|
1911
1900
|
recordCount: 0,
|
|
1912
1901
|
size: u,
|
|
1913
1902
|
startedAt: a
|
|
1914
1903
|
}),
|
|
1915
|
-
|
|
1904
|
+
sampleConfig: {
|
|
1916
1905
|
issues: [{
|
|
1917
1906
|
id: "empty",
|
|
1918
1907
|
lineNumber: void 0,
|
|
@@ -1923,33 +1912,32 @@ async function et(e) {
|
|
|
1923
1912
|
size: 0,
|
|
1924
1913
|
text: void 0
|
|
1925
1914
|
},
|
|
1926
|
-
|
|
1915
|
+
readingConfig: {
|
|
1927
1916
|
dataFormatId: "dtv",
|
|
1928
1917
|
encodingConfidenceLevel: void 0,
|
|
1929
1918
|
encodingId: void 0,
|
|
1930
1919
|
fileType: void 0,
|
|
1931
1920
|
hasHeaders: !1,
|
|
1932
|
-
recordDelimiterId:
|
|
1933
|
-
valueDelimiterId:
|
|
1921
|
+
recordDelimiterId: $e,
|
|
1922
|
+
valueDelimiterId: G
|
|
1934
1923
|
}
|
|
1935
1924
|
};
|
|
1936
|
-
if (c == null || l == null ||
|
|
1937
|
-
contentAuditConfig:
|
|
1925
|
+
if (c == null || l == null || H(o, c).length === 0) return {
|
|
1926
|
+
contentAuditConfig: J({
|
|
1938
1927
|
asAt: t,
|
|
1939
1928
|
columns: [],
|
|
1940
|
-
hasHeaders: !1,
|
|
1941
1929
|
isComplete: n.isComplete,
|
|
1942
1930
|
recordCount: 0,
|
|
1943
1931
|
size: u,
|
|
1944
1932
|
startedAt: a
|
|
1945
1933
|
}),
|
|
1946
|
-
|
|
1934
|
+
sampleConfig: {
|
|
1947
1935
|
issues: [],
|
|
1948
1936
|
parsedRecords: [],
|
|
1949
1937
|
size: u,
|
|
1950
1938
|
text: l
|
|
1951
1939
|
},
|
|
1952
|
-
|
|
1940
|
+
readingConfig: {
|
|
1953
1941
|
dataFormatId: c ?? "unknown",
|
|
1954
1942
|
encodingConfidenceLevel: n.encodingConfidenceLevel,
|
|
1955
1943
|
encodingId: n.encodingId,
|
|
@@ -1959,32 +1947,31 @@ async function et(e) {
|
|
|
1959
1947
|
valueDelimiterId: void 0
|
|
1960
1948
|
}
|
|
1961
1949
|
};
|
|
1962
|
-
let { parser: d, parserId: f } = await
|
|
1950
|
+
let { parser: d, parserId: f } = await Y(o, c, i), p = s == null ? me : [s], m = await d.parseText(l, {
|
|
1963
1951
|
dataFormatId: c,
|
|
1964
1952
|
isComplete: n.isComplete,
|
|
1965
1953
|
valueDelimiterIds: p
|
|
1966
1954
|
}), h = c === "dtv", g = h && s == null && m.valueDelimiterId == null ? await d.parseText(l, {
|
|
1967
1955
|
dataFormatId: c,
|
|
1968
1956
|
isComplete: n.isComplete,
|
|
1969
|
-
valueDelimiterIds: [
|
|
1957
|
+
valueDelimiterIds: [G]
|
|
1970
1958
|
}) : m, _ = r(g.parsedRecords);
|
|
1971
1959
|
return {
|
|
1972
|
-
contentAuditConfig:
|
|
1960
|
+
contentAuditConfig: J({
|
|
1973
1961
|
asAt: t,
|
|
1974
1962
|
columns: _.columnConfigs,
|
|
1975
|
-
hasHeaders: _.hasHeaderRow,
|
|
1976
1963
|
isComplete: n.isComplete,
|
|
1977
1964
|
recordCount: Math.max(0, g.parsedRecords.length - +!!_.hasHeaderRow),
|
|
1978
1965
|
size: u,
|
|
1979
1966
|
startedAt: a
|
|
1980
1967
|
}),
|
|
1981
|
-
|
|
1968
|
+
sampleConfig: {
|
|
1982
1969
|
issues: g.issues,
|
|
1983
1970
|
parsedRecords: g.parsedRecords,
|
|
1984
1971
|
size: u,
|
|
1985
1972
|
text: l
|
|
1986
1973
|
},
|
|
1987
|
-
|
|
1974
|
+
readingConfig: {
|
|
1988
1975
|
dataFormatId: c,
|
|
1989
1976
|
encodingConfidenceLevel: n.encodingConfidenceLevel,
|
|
1990
1977
|
encodingId: n.encodingId,
|
|
@@ -1992,12 +1979,12 @@ async function et(e) {
|
|
|
1992
1979
|
hasHeaders: _.hasHeaderRow,
|
|
1993
1980
|
parserId: f,
|
|
1994
1981
|
recordDelimiterId: g.recordDelimiterId,
|
|
1995
|
-
valueDelimiterId: h ? s ?? g.valueDelimiterId ??
|
|
1982
|
+
valueDelimiterId: h ? s ?? g.valueDelimiterId ?? G : g.valueDelimiterId
|
|
1996
1983
|
}
|
|
1997
1984
|
};
|
|
1998
1985
|
}
|
|
1999
|
-
async function
|
|
2000
|
-
let { chunk: t, options: n, signal: r, stream: i, toolConfigs: a } = e, { parser: o } = await
|
|
1986
|
+
async function rt(e) {
|
|
1987
|
+
let { chunk: t, options: n, signal: r, stream: i, toolConfigs: a } = e, { parser: o } = await Y(a, n.dataFormatId, n.parserId);
|
|
2001
1988
|
return await o.parseStream(i, {
|
|
2002
1989
|
abortSignal: r,
|
|
2003
1990
|
chunkSize: n.chunkSize,
|
|
@@ -2006,8 +1993,8 @@ async function tt(e) {
|
|
|
2006
1993
|
valueDelimiterId: n.valueDelimiterId
|
|
2007
1994
|
}, t);
|
|
2008
1995
|
}
|
|
2009
|
-
async function
|
|
2010
|
-
let { constructColumnAuditor: t, onProgress: n, options: r, signal: i, stream: a, toolConfigs: o } = e, s = Date.now(), c = performance.now(), l = t(r.hasHeaders), { parser: u } = await
|
|
1996
|
+
async function it(e) {
|
|
1997
|
+
let { constructColumnAuditor: t, onProgress: n, options: r, signal: i, stream: a, toolConfigs: o } = e, s = Date.now(), c = performance.now(), l = t(r.hasHeaders), { parser: u } = await Y(o, r.dataFormatId, r.parserId), d = st(a), f = at(d.stream, r), p = await u.parseStream(f.stream, {
|
|
2011
1998
|
abortSignal: i,
|
|
2012
1999
|
chunkSize: r.chunkSize,
|
|
2013
2000
|
dataFormatId: r.dataFormatId,
|
|
@@ -2017,51 +2004,58 @@ async function nt(e) {
|
|
|
2017
2004
|
l.auditRecords(t), n(t.length, f.byteCount());
|
|
2018
2005
|
}), { columnConfigs: m, hasHeaders: h } = l.completeAudit();
|
|
2019
2006
|
return {
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2007
|
+
contentAuditConfig: {
|
|
2008
|
+
asAt: s,
|
|
2009
|
+
byteCount: f.byteCount(),
|
|
2010
|
+
columns: m,
|
|
2011
|
+
commentLineCount: p.commentLineCount,
|
|
2012
|
+
duration: performance.now() - c,
|
|
2013
|
+
emptyLineCount: p.emptyLineCount,
|
|
2014
|
+
invalidFieldLengthCount: p.nonUniformRecordCount,
|
|
2015
|
+
isComplete: f.isComplete(),
|
|
2016
|
+
lineCount: p.lineCount,
|
|
2017
|
+
recordCount: Math.max(0, p.recordCount - +!!h),
|
|
2018
|
+
sourceWaitDuration: d.waitDuration()
|
|
2019
|
+
},
|
|
2020
|
+
hasHeaders: h
|
|
2032
2021
|
};
|
|
2033
2022
|
}
|
|
2034
|
-
function
|
|
2035
|
-
let { asAt: t, columns: n,
|
|
2023
|
+
function J(e) {
|
|
2024
|
+
let { asAt: t, columns: n, isComplete: r, recordCount: i, size: a, startedAt: o } = e;
|
|
2036
2025
|
return {
|
|
2037
2026
|
asAt: t,
|
|
2038
|
-
byteCount:
|
|
2027
|
+
byteCount: a,
|
|
2039
2028
|
columns: n,
|
|
2040
2029
|
commentLineCount: void 0,
|
|
2041
|
-
duration: performance.now() -
|
|
2030
|
+
duration: performance.now() - o,
|
|
2042
2031
|
emptyLineCount: void 0,
|
|
2043
|
-
hasHeaders: r,
|
|
2044
2032
|
invalidFieldLengthCount: void 0,
|
|
2045
|
-
isComplete:
|
|
2033
|
+
isComplete: r,
|
|
2046
2034
|
lineCount: void 0,
|
|
2047
|
-
recordCount:
|
|
2035
|
+
recordCount: i,
|
|
2048
2036
|
sourceWaitDuration: void 0
|
|
2049
2037
|
};
|
|
2050
2038
|
}
|
|
2051
|
-
function
|
|
2052
|
-
let n = e.getReader(), r =
|
|
2039
|
+
function at(e, t) {
|
|
2040
|
+
let n = e.getReader(), r = ot(t.encodingId), i = 0, a = !1, o;
|
|
2053
2041
|
return {
|
|
2054
2042
|
byteCount: () => i,
|
|
2055
2043
|
isComplete: () => a,
|
|
2056
2044
|
stream: new ReadableStream({
|
|
2057
2045
|
async pull(e) {
|
|
2058
|
-
let
|
|
2059
|
-
if (
|
|
2060
|
-
|
|
2061
|
-
|
|
2046
|
+
let s = o;
|
|
2047
|
+
if (s == null) {
|
|
2048
|
+
let t = await n.read();
|
|
2049
|
+
if (t.done) {
|
|
2050
|
+
a = !0, e.close();
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
s = t.value;
|
|
2062
2054
|
}
|
|
2063
|
-
let
|
|
2064
|
-
|
|
2055
|
+
let c = s.subarray(0, q);
|
|
2056
|
+
o = s.length > q ? s.subarray(q) : void 0;
|
|
2057
|
+
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2058
|
+
u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
|
|
2065
2059
|
},
|
|
2066
2060
|
cancel(e) {
|
|
2067
2061
|
return n.cancel(e);
|
|
@@ -2069,19 +2063,19 @@ function rt(e, t) {
|
|
|
2069
2063
|
}, { highWaterMark: 0 })
|
|
2070
2064
|
};
|
|
2071
2065
|
}
|
|
2072
|
-
function
|
|
2073
|
-
let t =
|
|
2066
|
+
function ot(e) {
|
|
2067
|
+
let t = j(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2074
2068
|
return (e, t, o) => {
|
|
2075
2069
|
for (let s = 0; s < e.length; s++) {
|
|
2076
2070
|
let c = e[s];
|
|
2077
|
-
if ((c ===
|
|
2078
|
-
if (c ===
|
|
2079
|
-
else if (!a && s >= o && (c ===
|
|
2071
|
+
if ((c === tt || c === K || c === et) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2072
|
+
if (c === tt) a = !a;
|
|
2073
|
+
else if (!a && s >= o && (c === K || e[s + r] !== K)) return s + r - i;
|
|
2080
2074
|
}
|
|
2081
2075
|
}
|
|
2082
2076
|
};
|
|
2083
2077
|
}
|
|
2084
|
-
function
|
|
2078
|
+
function st(e) {
|
|
2085
2079
|
let t = e.getReader(), n = 0;
|
|
2086
2080
|
return {
|
|
2087
2081
|
stream: new ReadableStream({
|
|
@@ -2096,16 +2090,15 @@ function at(e) {
|
|
|
2096
2090
|
waitDuration: () => n
|
|
2097
2091
|
};
|
|
2098
2092
|
}
|
|
2099
|
-
async function
|
|
2100
|
-
let r =
|
|
2093
|
+
async function Y(e, t, n) {
|
|
2094
|
+
let r = U(e, t, n);
|
|
2101
2095
|
return {
|
|
2102
|
-
parser: await
|
|
2096
|
+
parser: await W(e, r.id.slice(V.length)),
|
|
2103
2097
|
parserId: r.id
|
|
2104
2098
|
};
|
|
2105
2099
|
}
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
var ot = [
|
|
2100
|
+
// src/component/module/connector/index.ts
|
|
2101
|
+
var ct = [
|
|
2109
2102
|
{
|
|
2110
2103
|
id: "application",
|
|
2111
2104
|
label: {
|
|
@@ -2134,7 +2127,7 @@ var ot = [
|
|
|
2134
2127
|
es: "Almacén de Archivos"
|
|
2135
2128
|
}
|
|
2136
2129
|
}
|
|
2137
|
-
],
|
|
2130
|
+
], lt = [
|
|
2138
2131
|
{
|
|
2139
2132
|
id: "apiEndpoint",
|
|
2140
2133
|
label: {
|
|
@@ -2156,7 +2149,7 @@ var ot = [
|
|
|
2156
2149
|
es: "Tabla"
|
|
2157
2150
|
}
|
|
2158
2151
|
}
|
|
2159
|
-
],
|
|
2152
|
+
], ut = {
|
|
2160
2153
|
abortOperation: "Abort Operation",
|
|
2161
2154
|
auditObjectContent: "Audit Object Content",
|
|
2162
2155
|
closeStore: "Close Store",
|
|
@@ -2176,7 +2169,7 @@ var ot = [
|
|
|
2176
2169
|
retrieveChunks: "Retrieve Chunks",
|
|
2177
2170
|
retrieveRecords: "Retrieve Records",
|
|
2178
2171
|
upsertRecords: "Upsert Records"
|
|
2179
|
-
},
|
|
2172
|
+
}, dt = [
|
|
2180
2173
|
{
|
|
2181
2174
|
id: "bidirectional",
|
|
2182
2175
|
label: {
|
|
@@ -2205,13 +2198,13 @@ var ot = [
|
|
|
2205
2198
|
es: "Desconocido"
|
|
2206
2199
|
}
|
|
2207
2200
|
}
|
|
2208
|
-
],
|
|
2201
|
+
], ft = /* @__PURE__ */ new Set([
|
|
2209
2202
|
"createObject",
|
|
2210
2203
|
"dropObject",
|
|
2211
2204
|
"loadObjectRecords",
|
|
2212
2205
|
"removeRecords",
|
|
2213
2206
|
"upsertRecords"
|
|
2214
|
-
]),
|
|
2207
|
+
]), pt = /* @__PURE__ */ new Set([
|
|
2215
2208
|
"auditObjectContent",
|
|
2216
2209
|
"findObject",
|
|
2217
2210
|
"getInfo",
|
|
@@ -2223,13 +2216,13 @@ var ot = [
|
|
|
2223
2216
|
"retrieveChunks",
|
|
2224
2217
|
"retrieveRecords"
|
|
2225
2218
|
]);
|
|
2226
|
-
function
|
|
2219
|
+
function mt(e) {
|
|
2227
2220
|
let t = !1, n = !1;
|
|
2228
|
-
for (let r of e)
|
|
2221
|
+
for (let r of e) pt.has(r) && (t = !0), ft.has(r) && (n = !0);
|
|
2229
2222
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2230
2223
|
}
|
|
2231
|
-
var
|
|
2232
|
-
let i =
|
|
2224
|
+
var ht = (e, t = "en") => {
|
|
2225
|
+
let i = ct.find((t) => t.id === e);
|
|
2233
2226
|
return i ? {
|
|
2234
2227
|
label: r(n(i.label), t) ?? i.id,
|
|
2235
2228
|
description: ""
|
|
@@ -2237,8 +2230,8 @@ var pt = (e, t = "en") => {
|
|
|
2237
2230
|
label: e,
|
|
2238
2231
|
description: ""
|
|
2239
2232
|
};
|
|
2240
|
-
},
|
|
2241
|
-
let i =
|
|
2233
|
+
}, gt = (e, t = "en") => {
|
|
2234
|
+
let i = lt.find((t) => t.id === e);
|
|
2242
2235
|
return i ? {
|
|
2243
2236
|
label: r(n(i.label), t) ?? i.id,
|
|
2244
2237
|
description: ""
|
|
@@ -2246,8 +2239,8 @@ var pt = (e, t = "en") => {
|
|
|
2246
2239
|
label: e,
|
|
2247
2240
|
description: ""
|
|
2248
2241
|
};
|
|
2249
|
-
},
|
|
2250
|
-
let i =
|
|
2242
|
+
}, _t = (e, t = "en") => {
|
|
2243
|
+
let i = dt.find((t) => t.id === e);
|
|
2251
2244
|
return i ? {
|
|
2252
2245
|
label: r(n(i.label), t) ?? i.id,
|
|
2253
2246
|
description: ""
|
|
@@ -2256,31 +2249,30 @@ var pt = (e, t = "en") => {
|
|
|
2256
2249
|
description: ""
|
|
2257
2250
|
};
|
|
2258
2251
|
};
|
|
2259
|
-
function
|
|
2252
|
+
function vt(e) {
|
|
2260
2253
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2261
2254
|
n += "|:----|:-------:|\n";
|
|
2262
|
-
for (let e of Object.keys(
|
|
2255
|
+
for (let e of Object.keys(ut)) n += `| ${ut[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2263
2256
|
return n;
|
|
2264
2257
|
}
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
var _t = T(["list"]), vt = /* @__PURE__ */ S({
|
|
2258
|
+
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2259
|
+
var yt = E(["list"]), bt = /* @__PURE__ */ S({
|
|
2268
2260
|
...D,
|
|
2269
2261
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2270
|
-
actionNames: /* @__PURE__ */ h(
|
|
2262
|
+
actionNames: /* @__PURE__ */ h(yt),
|
|
2271
2263
|
recipes: /* @__PURE__ */ h(ce)
|
|
2272
|
-
}),
|
|
2264
|
+
}), xt = E([
|
|
2273
2265
|
"list",
|
|
2274
2266
|
"render",
|
|
2275
2267
|
"setColorMode"
|
|
2276
|
-
]),
|
|
2268
|
+
]), St = /* @__PURE__ */ S({
|
|
2277
2269
|
...D,
|
|
2278
2270
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2279
|
-
actionNames: /* @__PURE__ */ h(
|
|
2271
|
+
actionNames: /* @__PURE__ */ h(xt),
|
|
2280
2272
|
presentations: /* @__PURE__ */ h(ce)
|
|
2281
|
-
}),
|
|
2282
|
-
async function
|
|
2283
|
-
let i = e.id, a = `${
|
|
2273
|
+
}), Ct = "https://engine-eu.dpuse.app/presenters";
|
|
2274
|
+
async function wt(e, t, n, r) {
|
|
2275
|
+
let i = e.id, a = `${Ct}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2284
2276
|
try {
|
|
2285
2277
|
return new (await (import(
|
|
2286
2278
|
/* @vite-ignore */
|
|
@@ -2292,12 +2284,11 @@ async function St(e, t, n, r) {
|
|
|
2292
2284
|
url: a,
|
|
2293
2285
|
version: e.version
|
|
2294
2286
|
};
|
|
2295
|
-
throw new
|
|
2287
|
+
throw new F(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
|
|
2296
2288
|
}
|
|
2297
2289
|
}
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
function Ct(e, t) {
|
|
2290
|
+
// src/locale/index.ts
|
|
2291
|
+
function Tt(e, t) {
|
|
2301
2292
|
return {
|
|
2302
2293
|
...e,
|
|
2303
2294
|
label: e.label[t] ?? e.id,
|
|
@@ -2305,7 +2296,7 @@ function Ct(e, t) {
|
|
|
2305
2296
|
verb: e.verb?.[t] ?? void 0
|
|
2306
2297
|
};
|
|
2307
2298
|
}
|
|
2308
|
-
function
|
|
2299
|
+
function Et(e, t, n = !1) {
|
|
2309
2300
|
let r = e.map((e) => ({
|
|
2310
2301
|
...e,
|
|
2311
2302
|
label: e.label[t] ?? e.id,
|
|
@@ -2314,16 +2305,15 @@ function wt(e, t, n = !1) {
|
|
|
2314
2305
|
}));
|
|
2315
2306
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2316
2307
|
}
|
|
2317
|
-
function
|
|
2308
|
+
function Dt(e, t) {
|
|
2318
2309
|
return {
|
|
2319
2310
|
...e,
|
|
2320
2311
|
label: e.label[t] ?? e.id,
|
|
2321
2312
|
description: e.description[t] ?? e.description.en ?? ""
|
|
2322
2313
|
};
|
|
2323
2314
|
}
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
var Et = /* @__PURE__ */ new Map([
|
|
2315
|
+
// src/utilities/index.ts
|
|
2316
|
+
var Ot = /* @__PURE__ */ new Map([
|
|
2327
2317
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2328
2318
|
["avro", "application/vnd.apache.avro"],
|
|
2329
2319
|
["bin", "application/octet-stream"],
|
|
@@ -2344,20 +2334,20 @@ var Et = /* @__PURE__ */ new Map([
|
|
|
2344
2334
|
["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
|
|
2345
2335
|
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
2346
2336
|
["xml", "application/xml"]
|
|
2347
|
-
]),
|
|
2337
|
+
]), X = "en", Z = [
|
|
2348
2338
|
["day", 864e5],
|
|
2349
2339
|
["hour", 36e5],
|
|
2350
2340
|
["minute", 6e4],
|
|
2351
2341
|
["second", 1e3],
|
|
2352
2342
|
["millisecond", 1]
|
|
2353
|
-
],
|
|
2343
|
+
], kt = [
|
|
2354
2344
|
["byte", 1],
|
|
2355
2345
|
["kilobyte", 1024],
|
|
2356
2346
|
["megabyte", 1048576],
|
|
2357
2347
|
["gigabyte", 1073741824],
|
|
2358
2348
|
["terabyte", 1099511627776]
|
|
2359
|
-
],
|
|
2360
|
-
function
|
|
2349
|
+
], Q = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ new Map();
|
|
2350
|
+
function jt(e, t = 2, n = t, r = X) {
|
|
2361
2351
|
return e == null ? "" : $(r, {
|
|
2362
2352
|
localeMatcher: "best fit",
|
|
2363
2353
|
maximumFractionDigits: t,
|
|
@@ -2367,18 +2357,18 @@ function At(e, t = 2, n = t, r = Z) {
|
|
|
2367
2357
|
useGrouping: !0
|
|
2368
2358
|
}).format(e);
|
|
2369
2359
|
}
|
|
2370
|
-
function
|
|
2371
|
-
return
|
|
2360
|
+
function Mt(e, t = X) {
|
|
2361
|
+
return jt(e, 0, 0, t);
|
|
2372
2362
|
}
|
|
2373
|
-
function
|
|
2363
|
+
function Nt(e, t = 1, n = X) {
|
|
2374
2364
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2375
2365
|
maximumFractionDigits: t,
|
|
2376
2366
|
notation: "compact"
|
|
2377
2367
|
}).format(e);
|
|
2378
2368
|
}
|
|
2379
|
-
function
|
|
2369
|
+
function Pt(e, t = 1, n = X) {
|
|
2380
2370
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2381
|
-
let [r, i] =
|
|
2371
|
+
let [r, i] = kt.find(([, n]) => Ut(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
|
|
2382
2372
|
return $(n, {
|
|
2383
2373
|
maximumFractionDigits: i === 1 ? 0 : t,
|
|
2384
2374
|
style: "unit",
|
|
@@ -2386,9 +2376,9 @@ function Nt(e, t = 1, n = Z) {
|
|
|
2386
2376
|
unitDisplay: i === 1 ? "long" : "short"
|
|
2387
2377
|
}).format(e / i);
|
|
2388
2378
|
}
|
|
2389
|
-
function
|
|
2379
|
+
function Ft(e, t = "millisecond", n = X) {
|
|
2390
2380
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2391
|
-
let r = Math.round(Math.abs(e)), i =
|
|
2381
|
+
let r = Math.round(Math.abs(e)), i = Z.findIndex(([, e]) => r >= e), a = i === -1 ? Z.length - 1 : i, o = Z.findIndex(([e]) => e === t), s = Z.slice(a, Math.max(o, a) + 1), c = [];
|
|
2392
2382
|
for (let [t, i] of s) {
|
|
2393
2383
|
let a = Math.floor(r / i);
|
|
2394
2384
|
if (a === 0 && c.length > 0) continue;
|
|
@@ -2400,25 +2390,25 @@ function Pt(e, t = "millisecond", n = Z) {
|
|
|
2400
2390
|
unitDisplay: "short"
|
|
2401
2391
|
}).format(o));
|
|
2402
2392
|
}
|
|
2403
|
-
return
|
|
2393
|
+
return Ht(n).format(c);
|
|
2404
2394
|
}
|
|
2405
|
-
function
|
|
2395
|
+
function It(e) {
|
|
2406
2396
|
if (!e) return;
|
|
2407
|
-
let t =
|
|
2397
|
+
let t = Vt(e);
|
|
2408
2398
|
return t === void 0 ? e : e.slice(0, t);
|
|
2409
2399
|
}
|
|
2410
|
-
function
|
|
2400
|
+
function Lt(e) {
|
|
2411
2401
|
if (!e) return;
|
|
2412
|
-
let t =
|
|
2402
|
+
let t = Vt(e);
|
|
2413
2403
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2414
2404
|
}
|
|
2415
|
-
function Lt(e) {
|
|
2416
|
-
return e != null && Et.has(e.toLowerCase());
|
|
2417
|
-
}
|
|
2418
2405
|
function Rt(e) {
|
|
2419
|
-
return
|
|
2406
|
+
return e != null && Ot.has(e.toLowerCase());
|
|
2420
2407
|
}
|
|
2421
2408
|
function zt(e) {
|
|
2409
|
+
return (e == null ? void 0 : Ot.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2410
|
+
}
|
|
2411
|
+
function Bt(e) {
|
|
2422
2412
|
switch (e) {
|
|
2423
2413
|
case "Edm.Boolean": return "boolean";
|
|
2424
2414
|
case "Edm.Byte":
|
|
@@ -2439,24 +2429,23 @@ function zt(e) {
|
|
|
2439
2429
|
default: return "unknown";
|
|
2440
2430
|
}
|
|
2441
2431
|
}
|
|
2442
|
-
function
|
|
2432
|
+
function Vt(e) {
|
|
2443
2433
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2444
2434
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2445
2435
|
}
|
|
2446
|
-
function
|
|
2447
|
-
let t =
|
|
2436
|
+
function Ht(e) {
|
|
2437
|
+
let t = Q.get(e);
|
|
2448
2438
|
return t || (t = new Intl.ListFormat(e, {
|
|
2449
2439
|
style: "narrow",
|
|
2450
2440
|
type: "unit"
|
|
2451
|
-
}),
|
|
2441
|
+
}), Q.set(e, t)), t;
|
|
2452
2442
|
}
|
|
2453
2443
|
function $(e, t) {
|
|
2454
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2455
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
2444
|
+
let n = `${e}|${JSON.stringify(t)}`, r = At.get(n);
|
|
2445
|
+
return r || (r = new Intl.NumberFormat(e, t), At.set(n, r)), r;
|
|
2456
2446
|
}
|
|
2457
|
-
function
|
|
2447
|
+
function Ut(e, t) {
|
|
2458
2448
|
let n = 10 ** t;
|
|
2459
2449
|
return Math.round(e * n) / n;
|
|
2460
2450
|
}
|
|
2461
|
-
|
|
2462
|
-
export { F as APIError, P as AppError, L as ConnectorError, pe as DATA_FORMAT_ICON_CONFIGS, e as DEFAULT_LOCALE_ID, O as ENCODING_GROUP_CONFIG_MAP, k as ENCODING_TYPE_CONFIG_MAP, I as EngineError, R as FetchError, me as ORDERED_VALUE_DELIMITER_IDS, t as SUPPORTED_LANGUAGES, U as TOOL_NAME_PREFIX, nt as auditObjectContentWithParser, je as buildFetchError, et as buildPreviewObjectResult, ue as componentInstanceConfigSchema, Me as concatenateSerialisedErrorMessages, Se as connectorConfigSchema, pt as constructConnectorCategoryConfig, mt as constructConnectorItemTypeConfig, ht as constructConnectorUsageConfig, zt as convertODataTypeIdToUsageTypeId, vt as cookbookConfigSchema, n as createLabelMap, ft as determineConnectorUsageId, It as extractExtensionFromPath, Ft as extractPathWithoutExtension, At as formatNumberAsDecimalNumber, Pt as formatNumberAsDuration, Mt as formatNumberAsSize, Nt as formatNumberAsStorageSize, jt as formatNumberAsWholeNumber, fe as getComponentStatus, gt as getConnectorActionsTable, Ee as getEncodingTypeConfigs, Lt as hasMimeTypeForExtension, Ne as ignoreErrors, Te as isEncodingTypeId, W as listParserToolConfigs, St as loadPresenter, K as loadTool, Ct as localiseConfig, wt as localiseConfigs, Tt as localiseReference, Rt as lookupMimeTypeForExtension, z as normalizeToError, We as parseDelimitedText, bt as presenterConfigSchema, A as resolveDecoderId, r as resolveLabel, G as resolveParserToolConfig, tt as retrieveRecordsWithParser, Pe as serialiseError, Ue as toolConfigSchema, Fe as unserialiseError };
|
|
2451
|
+
export { Ae as APIError, F as AppError, Me as ConnectorError, pe as DATA_FORMAT_ICON_CONFIGS, e as DEFAULT_LOCALE_ID, O as ENCODING_GROUP_CONFIG_MAP, k as ENCODING_TYPE_CONFIG_MAP, je as EngineError, I as FetchError, me as ORDERED_VALUE_DELIMITER_IDS, t as SUPPORTED_LANGUAGES, V as TOOL_NAME_PREFIX, it as auditObjectContentWithParser, Ne as buildFetchError, nt as buildPreviewObjectResult, ue as componentInstanceConfigSchema, Pe as concatenateSerialisedErrorMessages, Se as connectorConfigSchema, ht as constructConnectorCategoryConfig, gt as constructConnectorItemTypeConfig, _t as constructConnectorUsageConfig, Bt as convertODataTypeIdToUsageTypeId, bt as cookbookConfigSchema, n as createLabelMap, mt as determineConnectorUsageId, Lt as extractExtensionFromPath, It as extractPathWithoutExtension, jt as formatNumberAsDecimalNumber, Ft as formatNumberAsDuration, Nt as formatNumberAsSize, Pt as formatNumberAsStorageSize, Mt as formatNumberAsWholeNumber, fe as getComponentStatus, vt as getConnectorActionsTable, Te as getEncodingTypeConfigs, Rt as hasMimeTypeForExtension, Fe as ignoreErrors, A as isEncodingTypeId, H as listParserToolConfigs, wt as loadPresenter, W as loadTool, Tt as localiseConfig, Et as localiseConfigs, Dt as localiseReference, zt as lookupMimeTypeForExtension, L as normalizeToError, Ke as parseDelimitedText, St as presenterConfigSchema, j as resolveDecoderId, r as resolveLabel, U as resolveParserToolConfig, rt as retrieveRecordsWithParser, Ie as serialiseError, Ge as toolConfigSchema, Le as unserialiseError };
|