@dpuse/dpuse-shared 0.3.688 → 0.3.703
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 +60 -29
- package/dist/{componentConfig.schema-C75xefrQ.js → componentConfig.schema-B7kVKqVP.js} +7 -7
- package/dist/dpuse-shared-component.es.js +1 -1
- package/dist/dpuse-shared-componentModuleConnector.es.js +18 -18
- package/dist/dpuse-shared-componentModuleContext.es.js +2 -2
- package/dist/dpuse-shared-componentModulePresenter.es.js +5 -5
- package/dist/dpuse-shared-encoding.es.js +4 -6
- package/dist/dpuse-shared-errors.es.js +39 -44
- package/dist/dpuse-shared-locale.es.js +8 -11
- package/dist/dpuse-shared-utilities.es.js +54 -55
- package/dist/{moduleConfig.schema-DGEZc-oy.js → moduleConfig.schema-Cvc9QRvr.js} +1 -1
- package/dist/types/src/component/module/connector/connectorConfig.schema.d.ts +3 -3
- package/dist/types/src/component/module/connector/index.d.ts +12 -12
- package/dist/types/src/component/module/cookbook/index.d.ts +2 -0
- package/dist/types/src/component/module/cookbook/recipe/index.d.ts +2 -0
- package/dist/types/src/component/module/presenter/index.d.ts +3 -8
- package/dist/types/src/component/module/presenter/presentation/index.d.ts +1 -1
- package/dist/types/src/component/module/presenter/presenterConfig.schema.d.ts +3 -3
- package/dist/types/src/locale/index.d.ts +1 -1
- package/dist/types/src/locale/locale.schema.d.ts +4 -4
- package/dist/types/src/utilities/index.d.ts +2 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -59,12 +59,16 @@ try {
|
|
|
59
59
|
}
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
Implements the common Data Positioning repository management command set. For more information see [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development).
|
|
63
|
+
|
|
62
64
|
## Architecture
|
|
63
65
|
|
|
64
66
|
### Domain Model
|
|
65
67
|
|
|
66
68
|
`Component` is the foundational base type for all DPUse domain objects. All component types extend `ComponentConfig` and are logically grouped in the following hierarchy. `Module` is a component type whose implementations are dynamically loaded by the host modules (App and API):
|
|
67
69
|
|
|
70
|
+

|
|
71
|
+
|
|
68
72
|
```
|
|
69
73
|
Component
|
|
70
74
|
├── Module
|
|
@@ -93,59 +97,86 @@ Component
|
|
|
93
97
|
|
|
94
98
|
The following are shared across all modules and are not part of the domain model:
|
|
95
99
|
|
|
96
|
-
| Concern | Description
|
|
97
|
-
| --------- |
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
100
|
+
| Concern | Description |
|
|
101
|
+
| --------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
102
|
+
| Encoding | Character encoding types with detection and decodability flags, a static catalogue of all supported encodings loaded from JSON, and an action to retrieve them in sorted order. |
|
|
103
|
+
| Errors | A typed error hierarchy (`DPUseError`, `AppError`, `APIError`, `EngineError`, `ConnectorError`, `FetchError`) with serialisation and deserialisation for transporting errors across API and worker boundaries, plus utilities for normalising unknown throwables, constructing errors from HTTP responses, and suppressing best-effort cleanup errors. |
|
|
104
|
+
| Locale | Locale and flag identifiers, localised label, description and verb types, Valibot schemas for locale fields, supported language constants, and actions for resolving and applying locale-specific values to configuration objects. |
|
|
105
|
+
| Utilities | OData-to-internal type conversion, file path name and extension extraction, number formatting as decimal, whole number, compact size, storage size and duration, and MIME type lookup by file extension. |
|
|
102
106
|
|
|
103
107
|
## API Reference
|
|
104
108
|
|
|
105
109
|
This package provides constants, errors, types/interfaces and utilities used by Data Positioning modules.
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
## Dependency Licenses
|
|
108
112
|
|
|
109
|
-
|
|
113
|
+
License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use Apache-2.0, BSD-3-Clause, CC0-1.0, or MIT — all permissive, commercially-friendly licenses. Developers cloning this repository should independently verify development dependencies; users of the uploaded library are covered by these checks.
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
<!-- DEPENDENCY_LICENSES_START -->
|
|
112
116
|
|
|
113
|
-
|
|
117
|
+
| Name | Version | License(s) | Document |
|
|
118
|
+
| ---- | :-----: | ---------- | -------- |
|
|
114
119
|
|
|
115
|
-
|
|
120
|
+
<!-- DEPENDENCY_LICENSES_END -->
|
|
116
121
|
|
|
117
|
-
|
|
122
|
+
### Dependency Tree
|
|
118
123
|
|
|
119
|
-
|
|
124
|
+
The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are simply mature and stable, requiring no active development.
|
|
120
125
|
|
|
121
|
-
|
|
126
|
+
<!-- DEPENDENCY_TREE_START -->
|
|
122
127
|
|
|
123
|
-
|
|
128
|
+
<!-- DEPENDENCY_TREE_END -->
|
|
124
129
|
|
|
125
|
-
|
|
130
|
+
## Bundle Analysis
|
|
126
131
|
|
|
127
|
-
|
|
132
|
+
The Bundle Analysis Reports provide detailed breakdowns of the bundle's composition and module sizes, helping to identify which modules contribute most to the final build. Two complementary reports are generated automatically on each release:
|
|
128
133
|
|
|
129
|
-
|
|
134
|
+
- **[rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer/tree/master)** — generates a static treemap/sunburst view based on pre-build module estimates, useful for a quick visual scan of overall bundle composition, including CSS assets.
|
|
135
|
+
- **[Sonda](https://sonda.dev/)** — analyses final source maps to capture the effects of tree-shaking and minification, rather than relying on pre-build estimates. This gives a more accurate picture of what's actually shipped, traces module-level dependencies, and shows the size of each module after tree-shaking and minification for more precise insight into what's driving bundle size. Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS.
|
|
130
136
|
|
|
131
|
-
|
|
137
|
+
[View the rollup-plugin-visualizer Report](https://dpuse.github.io/dpuse-development/bundle-analysis-reports/rollup-visualiser/index.html).
|
|
132
138
|
|
|
133
|
-
|
|
139
|
+
[View the Sonda Report](https://dpuse.github.io/dpuse-development/bundle-analysis-reports/sonda/index.html).
|
|
134
140
|
|
|
135
|
-
|
|
141
|
+
## Security & Quality
|
|
136
142
|
|
|
137
|
-
|
|
143
|
+
### CodeQL
|
|
138
144
|
|
|
139
|
-
|
|
140
|
-
| ---- | :-----: | ---------- | -------- |
|
|
145
|
+
[CodeQL](https://github.com/dpuse/dpuse-shared/security/code-scanning) static analysis runs on every push to `main` and on a weekly schedule, scanning TypeScript, JavaScript, Rust, and GitHub Actions workflow files for security vulnerabilities and coding errors.
|
|
141
146
|
|
|
142
|
-
|
|
143
|
-
<!-- DEPENDENCY_TREE_START -->
|
|
147
|
+
### SonarCloud
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
[SonarCloud](https://sonarcloud.io/summary/new_code?id=dpuse_dpuse-shared) performs continuous code quality and security analysis on every push, detecting bugs, code smells, and security vulnerabilities in the TypeScript source.
|
|
150
|
+
|
|
151
|
+
### Vulnerability Scanning
|
|
152
|
+
|
|
153
|
+
Two complementary tools continuously monitor dependencies for known vulnerabilities:
|
|
154
|
+
|
|
155
|
+
- **[GitHub Dependabot](https://docs.github.com/en/code-security/dependabot)** automatically raises pull requests to update vulnerable dependencies, drawing on the GitHub Advisory Database which combines NVD and npm-specific advisories.
|
|
156
|
+
- **npm audit** runs on every push to `main` via the CI workflow, failing the build if any high or critical severity vulnerabilities are detected.
|
|
157
|
+
|
|
158
|
+
### Supply Chain Security
|
|
159
|
+
|
|
160
|
+
[Socket.dev](https://socket.dev) monitors all dependencies for supply chain risk — detecting malicious packages, dependency confusion, typosquatting, and suspicious behaviour that may not yet have a CVE.
|
|
161
|
+
|
|
162
|
+
### Reporting Vulnerabilities
|
|
163
|
+
|
|
164
|
+
Please do not open public GitHub issues for security vulnerabilities. Use [GitHub private vulnerability reporting](https://github.com/dpuse/dpuse-shared/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.
|
|
146
165
|
|
|
147
|
-
|
|
166
|
+
### OpenSSF 🚧
|
|
167
|
+
|
|
168
|
+
[](https://scorecard.dev/viewer/?uri=github.com/dpuse/dpuse-shared)
|
|
169
|
+
|
|
170
|
+
This project is working towards the [OpenSSF Best Practices](https://www.bestpractices.dev) Passing badge, a self-certification covering security policy, vulnerability reporting, build processes, code quality, and more. The [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=github.com/dpuse/dpuse-shared) provides an independent automated assessment of the project's security practices and is an ongoing area of improvement.
|
|
171
|
+
|
|
172
|
+
## Contributing
|
|
173
|
+
|
|
174
|
+
This repository is maintained solely by its owner and does not accept external contributions. It is part of a larger closed application suite and is published for informational and cloning purposes only.
|
|
175
|
+
|
|
176
|
+
If you find a security vulnerability, see [Reporting Vulnerabilities](#reporting-vulnerabilities). For bugs, inconsistencies, or other feedback, you are welcome to [open a GitHub issue](https://github.com/dpuse/dpuse-shared/issues) — feedback is read, but responses and fixes are at the maintainer's discretion.
|
|
148
177
|
|
|
149
178
|
## License
|
|
150
179
|
|
|
151
|
-
|
|
180
|
+
This project is licensed under the MIT License, permitting free use, modification, and distribution.
|
|
181
|
+
|
|
182
|
+
[MIT](./LICENSE) © 2026-present Jonathan Terrell
|
|
@@ -382,11 +382,11 @@ var O = (e) => /* @__PURE__ */ D(e.map((e) => /* @__PURE__ */ y(e))), k = /* @__
|
|
|
382
382
|
en: /* @__PURE__ */ T(),
|
|
383
383
|
es: /* @__PURE__ */ T()
|
|
384
384
|
}), A = /* @__PURE__ */ S({
|
|
385
|
-
en: /* @__PURE__ */ C(/* @__PURE__ */ T()),
|
|
386
|
-
es: /* @__PURE__ */ C(/* @__PURE__ */ T())
|
|
387
|
-
}), j = /* @__PURE__ */ S({
|
|
388
385
|
en: /* @__PURE__ */ C(/* @__PURE__ */ _(/* @__PURE__ */ T())),
|
|
389
386
|
es: /* @__PURE__ */ C(/* @__PURE__ */ _(/* @__PURE__ */ T()))
|
|
387
|
+
}), j = /* @__PURE__ */ S({
|
|
388
|
+
en: /* @__PURE__ */ C(/* @__PURE__ */ T()),
|
|
389
|
+
es: /* @__PURE__ */ C(/* @__PURE__ */ T())
|
|
390
390
|
}), M = O([
|
|
391
391
|
"app",
|
|
392
392
|
"connector",
|
|
@@ -431,8 +431,8 @@ var O = (e) => /* @__PURE__ */ D(e.map((e) => /* @__PURE__ */ y(e))), k = /* @__
|
|
|
431
431
|
label: /* @__PURE__ */ T()
|
|
432
432
|
}), I = /* @__PURE__ */ S({
|
|
433
433
|
id: /* @__PURE__ */ T(),
|
|
434
|
-
label:
|
|
435
|
-
description:
|
|
434
|
+
label: j,
|
|
435
|
+
description: A,
|
|
436
436
|
icon: /* @__PURE__ */ b(/* @__PURE__ */ T()),
|
|
437
437
|
iconDark: /* @__PURE__ */ b(/* @__PURE__ */ T()),
|
|
438
438
|
iconNeutral: /* @__PURE__ */ b(/* @__PURE__ */ T()),
|
|
@@ -440,8 +440,8 @@ var O = (e) => /* @__PURE__ */ D(e.map((e) => /* @__PURE__ */ y(e))), k = /* @__
|
|
|
440
440
|
path: /* @__PURE__ */ T()
|
|
441
441
|
}), L = {
|
|
442
442
|
id: /* @__PURE__ */ T(),
|
|
443
|
-
label:
|
|
444
|
-
description:
|
|
443
|
+
label: j,
|
|
444
|
+
description: A,
|
|
445
445
|
firstCreatedAt: /* @__PURE__ */ b(/* @__PURE__ */ x()),
|
|
446
446
|
icon: /* @__PURE__ */ b(/* @__PURE__ */ T()),
|
|
447
447
|
iconDark: /* @__PURE__ */ b(/* @__PURE__ */ T()),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLabelMap as e, resolveLabel as t } from "./dpuse-shared-locale.es.js";
|
|
2
|
-
import { a as n, c as r, d as i, f as a, i as o, l as s, m as c, o as l, p as u, s as d, u as f } from "./componentConfig.schema-
|
|
3
|
-
import { t as p } from "./moduleConfig.schema-
|
|
2
|
+
import { a as n, c as r, d as i, f as a, i as o, l as s, m as c, o as l, p as u, s as d, u as f } from "./componentConfig.schema-B7kVKqVP.js";
|
|
3
|
+
import { t as p } from "./moduleConfig.schema-Cvc9QRvr.js";
|
|
4
4
|
//#region src/component/module/connector/connectorConfig.schema.ts
|
|
5
5
|
var m = n([
|
|
6
6
|
"application",
|
|
@@ -36,12 +36,12 @@ var m = n([
|
|
|
36
36
|
"retrieveRecords",
|
|
37
37
|
"upsertRecords"
|
|
38
38
|
]), v = i({
|
|
39
|
-
...p,
|
|
40
39
|
typeId: r("connector"),
|
|
40
|
+
...p,
|
|
41
|
+
actionNames: l(_),
|
|
41
42
|
category: s(h),
|
|
42
43
|
categoryId: m,
|
|
43
44
|
implementations: u(c(), g),
|
|
44
|
-
operations: l(_),
|
|
45
45
|
vendorAccountURL: s(c()),
|
|
46
46
|
vendorDocumentationURL: s(c()),
|
|
47
47
|
vendorHomeURL: s(c())
|
|
@@ -74,16 +74,7 @@ var m = n([
|
|
|
74
74
|
es: "Almacén de Archivos"
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
], b =
|
|
78
|
-
let i = y.find((e) => e.id === n);
|
|
79
|
-
return i ? {
|
|
80
|
-
label: t(e(i.label), r) ?? i.id,
|
|
81
|
-
description: []
|
|
82
|
-
} : {
|
|
83
|
-
label: n,
|
|
84
|
-
description: []
|
|
85
|
-
};
|
|
86
|
-
}, x = {
|
|
77
|
+
], b = {
|
|
87
78
|
abortOperation: "Abort Operation",
|
|
88
79
|
auditObjectContent: "Audit Object Content",
|
|
89
80
|
createObject: "Create Object",
|
|
@@ -98,12 +89,21 @@ var m = n([
|
|
|
98
89
|
retrieveChunks: "Retrieve Chunks",
|
|
99
90
|
retrieveRecords: "Retrieve Records",
|
|
100
91
|
upsertRecords: "Upsert Records"
|
|
92
|
+
}, x = (n, r = "en") => {
|
|
93
|
+
let i = y.find((e) => e.id === n);
|
|
94
|
+
return i ? {
|
|
95
|
+
label: t(e(i.label), r) ?? i.id,
|
|
96
|
+
description: []
|
|
97
|
+
} : {
|
|
98
|
+
label: n,
|
|
99
|
+
description: []
|
|
100
|
+
};
|
|
101
101
|
};
|
|
102
102
|
function S(e) {
|
|
103
|
-
let t = new Set(e), n = "|
|
|
104
|
-
n += "|
|
|
105
|
-
for (let e of Object.keys(
|
|
103
|
+
let t = new Set(e), n = "| Name | Supported |\n";
|
|
104
|
+
n += "| ---- | :-------: |\n";
|
|
105
|
+
for (let e of Object.keys(b)) n += `| ${b[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
106
106
|
return n;
|
|
107
107
|
}
|
|
108
108
|
//#endregion
|
|
109
|
-
export {
|
|
109
|
+
export { b as CONNECTOR_ACTION_NAME_MAP, v as connectorConfigSchema, x as constructConnectorCategoryConfig, S as getConnectorActionsTable };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, o as r, r as i, t as a, u as o } from "./componentConfig.schema-
|
|
2
|
-
import { t as s } from "./moduleConfig.schema-
|
|
1
|
+
import { a as e, c as t, d as n, o as r, r as i, t as a, u as o } from "./componentConfig.schema-B7kVKqVP.js";
|
|
2
|
+
import { t as s } from "./moduleConfig.schema-Cvc9QRvr.js";
|
|
3
3
|
//#region src/component/module/context/contextConfig.schema.ts
|
|
4
4
|
var c = n({
|
|
5
5
|
...a,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, o as r, r as i } from "./componentConfig.schema-
|
|
2
|
-
import { t as a } from "./moduleConfig.schema-
|
|
1
|
+
import { a as e, c as t, d as n, o as r, r as i } from "./componentConfig.schema-B7kVKqVP.js";
|
|
2
|
+
import { t as a } from "./moduleConfig.schema-Cvc9QRvr.js";
|
|
3
3
|
//#region src/component/module/presenter/presenterConfig.schema.ts
|
|
4
4
|
var o = e([
|
|
5
5
|
"list",
|
|
6
6
|
"render",
|
|
7
7
|
"setColorMode"
|
|
8
8
|
]), s = n({
|
|
9
|
-
...a,
|
|
10
9
|
typeId: t("presenter"),
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
...a,
|
|
11
|
+
actionNames: r(o),
|
|
12
|
+
presentations: r(i)
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
15
15
|
export { s as presenterConfigSchema };
|
|
@@ -346,12 +346,10 @@ var e = {
|
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
function t(t = "en") {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
});
|
|
354
|
-
return n.toSorted((e, t) => e.groupLabel.localeCompare(t.groupLabel) || e.label.localeCompare(t.label));
|
|
349
|
+
return Array.from(Object.values(e), (e) => ({
|
|
350
|
+
...e,
|
|
351
|
+
label: e.label || e.id
|
|
352
|
+
})).toSorted((e, t) => e.groupLabel.localeCompare(t.groupLabel) || e.label.localeCompare(t.label));
|
|
355
353
|
}
|
|
356
354
|
//#endregion
|
|
357
355
|
export { e as encodingConfigMap, t as getEncodingTypeConfigs };
|
|
@@ -59,12 +59,48 @@ function d(e) {
|
|
|
59
59
|
let t = /* @__PURE__ */ new Set(), n = [], r = u(e);
|
|
60
60
|
for (; r != null && !t.has(r);) {
|
|
61
61
|
t.add(r);
|
|
62
|
-
let [e, i] =
|
|
62
|
+
let [e, i] = g(r);
|
|
63
63
|
/(?:\.{3}|[.!?])$/.test(e.message) || (e.message += "."), n.push(e), r = i;
|
|
64
64
|
}
|
|
65
65
|
return n;
|
|
66
66
|
}
|
|
67
67
|
function f(e) {
|
|
68
|
+
if (e.length === 0) return;
|
|
69
|
+
let t;
|
|
70
|
+
for (let n of e.toReversed()) {
|
|
71
|
+
let e = m(n, t);
|
|
72
|
+
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
73
|
+
}
|
|
74
|
+
return t;
|
|
75
|
+
}
|
|
76
|
+
function p(e) {
|
|
77
|
+
let t;
|
|
78
|
+
try {
|
|
79
|
+
t = JSON.stringify(e);
|
|
80
|
+
} catch {
|
|
81
|
+
t = typeof e == "symbol" ? e.description ?? "Unknown error" : typeof e == "bigint" ? e.toString() : "Unknown error";
|
|
82
|
+
}
|
|
83
|
+
return t === "" && (t = "Unknown error"), t;
|
|
84
|
+
}
|
|
85
|
+
function m(e, t) {
|
|
86
|
+
switch (e.name) {
|
|
87
|
+
case "APIError": return new r(e.message, e.locator, e.data, { cause: t });
|
|
88
|
+
case "AppError": return new n(e.message, e.locator, e.data, { cause: t });
|
|
89
|
+
case "ConnectorError": return new a(e.message, e.locator, e.data, { cause: t });
|
|
90
|
+
case "EngineError": return new i(e.message, e.locator, e.data, { cause: t });
|
|
91
|
+
case "FetchError": return new o(e.message, e.locator, e.data, { cause: t });
|
|
92
|
+
default: {
|
|
93
|
+
let n = e.name;
|
|
94
|
+
return new class extends Error {
|
|
95
|
+
name = n;
|
|
96
|
+
}(e.message, { cause: t });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function h(t) {
|
|
101
|
+
if (!(t == null || t === "")) return t.length > e ? `${t.slice(0, e)}... [truncated]` : t;
|
|
102
|
+
}
|
|
103
|
+
function g(e) {
|
|
68
104
|
let n = e.cause == null ? null : u(e.cause);
|
|
69
105
|
if (e instanceof t) return [{
|
|
70
106
|
data: e.data,
|
|
@@ -83,51 +119,10 @@ function f(e) {
|
|
|
83
119
|
}, n] : [{
|
|
84
120
|
data: r,
|
|
85
121
|
locator: "",
|
|
86
|
-
message:
|
|
122
|
+
message: p(e),
|
|
87
123
|
name: "Error",
|
|
88
124
|
stack: void 0
|
|
89
125
|
}, null];
|
|
90
126
|
}
|
|
91
|
-
function p(e) {
|
|
92
|
-
if (e.length === 0) return;
|
|
93
|
-
let t;
|
|
94
|
-
for (let s of e.toReversed()) {
|
|
95
|
-
let e;
|
|
96
|
-
switch (s.name) {
|
|
97
|
-
case "APIError":
|
|
98
|
-
e = new r(s.message, s.locator, s.data, { cause: t });
|
|
99
|
-
break;
|
|
100
|
-
case "AppError":
|
|
101
|
-
e = new n(s.message, s.locator, s.data, { cause: t });
|
|
102
|
-
break;
|
|
103
|
-
case "ConnectorError":
|
|
104
|
-
e = new a(s.message, s.locator, s.data, { cause: t });
|
|
105
|
-
break;
|
|
106
|
-
case "EngineError":
|
|
107
|
-
e = new i(s.message, s.locator, s.data, { cause: t });
|
|
108
|
-
break;
|
|
109
|
-
case "FetchError":
|
|
110
|
-
e = new o(s.message, s.locator, s.data, { cause: t });
|
|
111
|
-
break;
|
|
112
|
-
default:
|
|
113
|
-
e = Error(s.message, { cause: t }), e.name = s.name;
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
s.stack !== void 0 && (e.stack = s.stack), t = e;
|
|
117
|
-
}
|
|
118
|
-
return t;
|
|
119
|
-
}
|
|
120
|
-
function m(e) {
|
|
121
|
-
let t;
|
|
122
|
-
try {
|
|
123
|
-
t = JSON.stringify(e);
|
|
124
|
-
} catch {
|
|
125
|
-
t = typeof e == "symbol" ? e.description ?? "Unknown error" : typeof e == "bigint" ? e.toString() : "Unknown error";
|
|
126
|
-
}
|
|
127
|
-
return t === "" && (t = "Unknown error"), t;
|
|
128
|
-
}
|
|
129
|
-
function h(t) {
|
|
130
|
-
if (!(t == null || t === "")) return t.length > e ? `${t.slice(0, e)}... [truncated]` : t;
|
|
131
|
-
}
|
|
132
127
|
//#endregion
|
|
133
|
-
export { r as APIError, n as AppError, a as ConnectorError, t as DPUseError, i as EngineError, o as FetchError, s as buildFetchError, c as concatenateSerialisedErrorMessages, l as ignoreErrors, u as normalizeToError, d as serialiseError,
|
|
128
|
+
export { r as APIError, n as AppError, a as ConnectorError, t as DPUseError, i as EngineError, o as FetchError, s as buildFetchError, c as concatenateSerialisedErrorMessages, l as ignoreErrors, u as normalizeToError, d as serialiseError, f as unserialiseError };
|
|
@@ -11,30 +11,27 @@ var e = "en", t = [{
|
|
|
11
11
|
function n(e) {
|
|
12
12
|
return new Map(Object.entries(e));
|
|
13
13
|
}
|
|
14
|
-
function r(e) {
|
|
15
|
-
return Array.isArray(e) ? e : e == null ? [] : [e];
|
|
16
|
-
}
|
|
17
|
-
function i(e, t) {
|
|
14
|
+
function r(e, t) {
|
|
18
15
|
return {
|
|
19
16
|
...e,
|
|
20
17
|
label: e.label[t] ?? e.id,
|
|
21
|
-
description:
|
|
18
|
+
description: e.description[t],
|
|
22
19
|
verb: e.verb?.[t] ?? void 0
|
|
23
20
|
};
|
|
24
21
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
22
|
+
function i(e, t, n = !1) {
|
|
23
|
+
let r = e.map((e) => ({
|
|
27
24
|
...e,
|
|
28
25
|
label: e.label[t] ?? e.id,
|
|
29
|
-
description:
|
|
26
|
+
description: e.description[t],
|
|
30
27
|
verb: e.verb?.[t] ?? void 0
|
|
31
28
|
}));
|
|
32
|
-
return n ?
|
|
29
|
+
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
33
30
|
}
|
|
34
|
-
function
|
|
31
|
+
function a(e, t, n = "en") {
|
|
35
32
|
let r = e.get(t);
|
|
36
33
|
if (r !== void 0) return r;
|
|
37
34
|
if (n !== t) return e.get(n);
|
|
38
35
|
}
|
|
39
36
|
//#endregion
|
|
40
|
-
export { e as DEFAULT_LOCALE_ID, t as SUPPORTED_LANGUAGES, n as createLabelMap,
|
|
37
|
+
export { e as DEFAULT_LOCALE_ID, t as SUPPORTED_LANGUAGES, n as createLabelMap, r as localiseConfig, i as localiseConfigs, a as resolveLabel };
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
//#region src/utilities/index.ts
|
|
2
|
-
var e =
|
|
3
|
-
|
|
2
|
+
var e = [
|
|
3
|
+
[
|
|
4
|
+
"days",
|
|
5
|
+
864e5,
|
|
6
|
+
(e) => e === 1 ? "1 day" : `${u(e)} days`
|
|
7
|
+
],
|
|
8
|
+
[
|
|
9
|
+
"hrs",
|
|
10
|
+
36e5,
|
|
11
|
+
(e) => e === 1 ? "1 hr" : `${u(e)} hrs`
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"mins",
|
|
15
|
+
6e4,
|
|
16
|
+
(e) => e === 1 ? "1 min" : `${u(e)} mins`
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"secs",
|
|
20
|
+
1e3,
|
|
21
|
+
(e) => e === 1 ? "1 sec" : `${u(e)} secs`
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"ms",
|
|
25
|
+
0,
|
|
26
|
+
(e) => `${u(e)} ms`
|
|
27
|
+
]
|
|
28
|
+
], t = "en-GB", n = /* @__PURE__ */ new Map();
|
|
29
|
+
function r(e) {
|
|
4
30
|
switch (e) {
|
|
5
31
|
case "Edm.Binary": return "unknown";
|
|
6
32
|
case "Edm.Boolean": return "boolean";
|
|
@@ -20,22 +46,22 @@ function n(e) {
|
|
|
20
46
|
default: return "unknown";
|
|
21
47
|
}
|
|
22
48
|
}
|
|
23
|
-
function
|
|
49
|
+
function i(e) {
|
|
24
50
|
if (e) {
|
|
25
51
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
26
52
|
return n <= t || n === -1 ? e : e.slice(0, Math.max(0, n));
|
|
27
53
|
}
|
|
28
54
|
}
|
|
29
|
-
function
|
|
55
|
+
function a(e) {
|
|
30
56
|
if (e) {
|
|
31
57
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
32
58
|
if (n <= t) return;
|
|
33
59
|
if (n !== -1) return e.slice(Math.max(0, n + 1));
|
|
34
60
|
}
|
|
35
61
|
}
|
|
36
|
-
function
|
|
37
|
-
if (
|
|
38
|
-
let o = `${a}decimal${String(r)}.${String(i)}`, s =
|
|
62
|
+
function o(e, r = 2, i = r, a = t) {
|
|
63
|
+
if (e == null) return "";
|
|
64
|
+
let o = `${a}decimal${String(r)}.${String(i)}`, s = n.get(o);
|
|
39
65
|
return s || (s = new Intl.NumberFormat(a, {
|
|
40
66
|
localeMatcher: "best fit",
|
|
41
67
|
maximumFractionDigits: r,
|
|
@@ -43,57 +69,30 @@ function a(n, r = 2, i = r, a = e) {
|
|
|
43
69
|
minimumIntegerDigits: 1,
|
|
44
70
|
style: "decimal",
|
|
45
71
|
useGrouping: !0
|
|
46
|
-
}),
|
|
47
|
-
}
|
|
48
|
-
function o(e, t = 1) {
|
|
49
|
-
return e == null ? "" : e < 1e3 ? u(e) : e < 1e6 ? `${a(e / 1e3, t, 0)}K` : e < 1e9 ? `${a(e / 1e6, t, 0)}M` : e < 0xe8d4a51000 ? `${a(e / 1e9, t, 0)}B` : `${a(e / 0xe8d4a51000, t, 0)}T`;
|
|
72
|
+
}), n.set(o, s)), s.format(e);
|
|
50
73
|
}
|
|
51
74
|
function s(e, t = 1) {
|
|
52
|
-
return e == null ? "" : e
|
|
75
|
+
return e == null ? "" : e < 1e3 ? u(e) : e < 1e6 ? `${o(e / 1e3, t, 0)}K` : e < 1e9 ? `${o(e / 1e6, t, 0)}M` : e < 0xe8d4a51000 ? `${o(e / 1e9, t, 0)}B` : `${o(e / 0xe8d4a51000, t, 0)}T`;
|
|
53
76
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
]
|
|
60
|
-
[
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
[
|
|
66
|
-
"mins",
|
|
67
|
-
6e4,
|
|
68
|
-
(e) => e === 1 ? "1 min" : `${u(e)} mins`
|
|
69
|
-
],
|
|
70
|
-
[
|
|
71
|
-
"secs",
|
|
72
|
-
1e3,
|
|
73
|
-
(e) => e === 1 ? "1 sec" : `${u(e)} secs`
|
|
74
|
-
],
|
|
75
|
-
[
|
|
76
|
-
"ms",
|
|
77
|
-
0,
|
|
78
|
-
(e) => `${u(e)} ms`
|
|
79
|
-
]
|
|
80
|
-
];
|
|
81
|
-
function l(e, t = "ms") {
|
|
82
|
-
if (e == null) return "";
|
|
83
|
-
let n = c.findIndex(([e]) => e === t);
|
|
84
|
-
if (e < (c[n]?.[1] ?? 0)) {
|
|
85
|
-
let t = c.find(([, t]) => e >= t);
|
|
86
|
-
if (t == null) return `${u(e)} ms`;
|
|
87
|
-
let [, n, r] = t;
|
|
88
|
-
return r(n > 0 ? Math.floor(e / n) : e);
|
|
77
|
+
function c(e, t = 1) {
|
|
78
|
+
return e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${u(e)} bytes` : e < 1048576 ? `${o(e / 1024, t, 0)} KB` : e < 1073741824 ? `${o(e / 1048576, t, 0)} MB` : e < 1099511627776 ? `${o(e / 1073741824, t, 0)} GB` : `${o(e / 1099511627776, t, 0)} TB`;
|
|
79
|
+
}
|
|
80
|
+
function l(t, n = "ms") {
|
|
81
|
+
if (t == null) return "";
|
|
82
|
+
let r = e.findIndex(([e]) => e === n);
|
|
83
|
+
if (t < (e[r]?.[1] ?? 0)) {
|
|
84
|
+
let n = e.find(([, e]) => t >= e);
|
|
85
|
+
if (n == null) return `${u(t)} ms`;
|
|
86
|
+
let [, r, i] = n;
|
|
87
|
+
return i(r > 0 ? Math.floor(t / r) : t);
|
|
89
88
|
}
|
|
90
|
-
let
|
|
91
|
-
for (let [, e, t] of
|
|
92
|
-
return
|
|
89
|
+
let i = [], a = t, o = e.slice(0, r + 1);
|
|
90
|
+
for (let [, e, t] of o) e === 0 ? (a > 0 || i.length === 0) && i.push(t(a)) : a >= e && (i.push(t(Math.floor(a / e))), a %= e);
|
|
91
|
+
return i.join(" ");
|
|
93
92
|
}
|
|
94
|
-
function u(
|
|
95
|
-
if (
|
|
96
|
-
let i = `${r}decimal0.0`, a =
|
|
93
|
+
function u(e, r = t) {
|
|
94
|
+
if (e == null) return "";
|
|
95
|
+
let i = `${r}decimal0.0`, a = n.get(i);
|
|
97
96
|
return a || (a = new Intl.NumberFormat(r, {
|
|
98
97
|
localeMatcher: "best fit",
|
|
99
98
|
maximumFractionDigits: 0,
|
|
@@ -101,7 +100,7 @@ function u(n, r = e) {
|
|
|
101
100
|
minimumIntegerDigits: 1,
|
|
102
101
|
style: "decimal",
|
|
103
102
|
useGrouping: !0
|
|
104
|
-
}),
|
|
103
|
+
}), n.set(i, a)), a.format(e);
|
|
105
104
|
}
|
|
106
105
|
function d(e) {
|
|
107
106
|
switch (e) {
|
|
@@ -114,4 +113,4 @@ function d(e) {
|
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
//#endregion
|
|
117
|
-
export {
|
|
116
|
+
export { r as convertODataTypeIdToUsageTypeId, a as extractExtensionFromPath, i as extractNameFromPath, o as formatNumberAsDecimalNumber, l as formatNumberAsDuration, s as formatNumberAsSize, c as formatNumberAsStorageSize, u as formatNumberAsWholeNumber, d as lookupMimeTypeForExtension };
|
|
@@ -8,9 +8,9 @@ export declare const connectorCategoryConfigSchema: import('valibot').ObjectSche
|
|
|
8
8
|
readonly es: import('valibot').StringSchema<undefined>;
|
|
9
9
|
}, undefined>;
|
|
10
10
|
}, undefined>;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const connectorActionNameSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"auditObjectContent", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObject", undefined>, import('valibot').LiteralSchema<"getReadableStream", undefined>, import('valibot').LiteralSchema<"getRecord", undefined>, import('valibot').LiteralSchema<"listNodes", undefined>, import('valibot').LiteralSchema<"previewObject", undefined>, import('valibot').LiteralSchema<"removeRecords", undefined>, import('valibot').LiteralSchema<"retrieveChunks", undefined>, import('valibot').LiteralSchema<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>;
|
|
12
12
|
export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
13
|
-
readonly
|
|
13
|
+
readonly actionNames: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"auditObjectContent", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObject", undefined>, import('valibot').LiteralSchema<"getReadableStream", undefined>, import('valibot').LiteralSchema<"getRecord", undefined>, import('valibot').LiteralSchema<"listNodes", undefined>, import('valibot').LiteralSchema<"previewObject", undefined>, import('valibot').LiteralSchema<"removeRecords", undefined>, import('valibot').LiteralSchema<"retrieveChunks", undefined>, import('valibot').LiteralSchema<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>, undefined>;
|
|
14
14
|
readonly category: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
15
15
|
readonly label: import('valibot').ObjectSchema<{
|
|
16
16
|
readonly en: import('valibot').StringSchema<undefined>;
|
|
@@ -30,7 +30,6 @@ export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
|
30
30
|
readonly maxConnectionCount: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
31
31
|
readonly params: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').StringSchema<undefined>, undefined>, undefined>, undefined>;
|
|
32
32
|
}, undefined>, undefined>;
|
|
33
|
-
readonly operations: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"auditObjectContent", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObject", undefined>, import('valibot').LiteralSchema<"getReadableStream", undefined>, import('valibot').LiteralSchema<"getRecord", undefined>, import('valibot').LiteralSchema<"listNodes", undefined>, import('valibot').LiteralSchema<"previewObject", undefined>, import('valibot').LiteralSchema<"removeRecords", undefined>, import('valibot').LiteralSchema<"retrieveChunks", undefined>, import('valibot').LiteralSchema<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>, undefined>;
|
|
34
33
|
readonly vendorAccountURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
35
34
|
readonly vendorDocumentationURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
36
35
|
readonly vendorHomeURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -54,4 +53,5 @@ export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
|
54
53
|
readonly label: import('valibot').StringSchema<undefined>;
|
|
55
54
|
}, undefined>, undefined>;
|
|
56
55
|
readonly statusId: import('valibot').NullableSchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>, undefined>;
|
|
56
|
+
readonly typeId: import('valibot').LiteralSchema<"connector", undefined>;
|
|
57
57
|
}, undefined>;
|
|
@@ -3,7 +3,7 @@ import { Component } from '../..';
|
|
|
3
3
|
import { EngineConnectorActionOptions } from '../engine';
|
|
4
4
|
import { ToolConfig } from '../tool';
|
|
5
5
|
import { ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
6
|
-
import { connectorCategoryConfigSchema, connectorConfigSchema,
|
|
6
|
+
import { connectorCategoryConfigSchema, connectorConfigSchema, connectorActionNameSchema } from './connectorConfig.schema';
|
|
7
7
|
import { ContentAuditConfig, InferenceRecord, InferenceSummary, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../../dataView';
|
|
8
8
|
import { LocalisedConfig } from '../../../locale';
|
|
9
9
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
@@ -23,16 +23,18 @@ export interface ConnectorInterface extends Component {
|
|
|
23
23
|
previewObject?(options: PreviewObjectOptions): Promise<PreviewConfig>;
|
|
24
24
|
removeRecords?(options: RemoveRecordsOptions): Promise<void>;
|
|
25
25
|
retrieveChunks?(options: RetrieveChunksOptions, chunk: (data: Uint8Array) => void, complete: () => void): Promise<void>;
|
|
26
|
-
retrieveRecords?(options: RetrieveRecordsOptions, chunk: (typeId:
|
|
26
|
+
retrieveRecords?(options: RetrieveRecordsOptions, chunk: (typeId: RecordRetrievalTypeId, records: Record<string, unknown>[] | ParsingRecord[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
27
27
|
upsertRecords?(options: UpsertRecordsOptions): Promise<void>;
|
|
28
28
|
}
|
|
29
|
+
export type ConnectorActionName = InferOutput<typeof connectorActionNameSchema>;
|
|
29
30
|
export type ConnectorConstructor = new (connectorUtilities: ConnectorUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
31
|
+
export interface ConnectorUtilities {
|
|
32
|
+
hasReadableStreamTransferSupport(): boolean;
|
|
33
|
+
inferValues: (parsedRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[], hasLeadingRecord: boolean) => InferenceRecord;
|
|
34
|
+
inferDataTypes: (parsedRecords: ParsingRecord[]) => InferenceSummary;
|
|
35
|
+
}
|
|
30
36
|
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
31
37
|
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
32
|
-
export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorCategoryConfig>;
|
|
33
|
-
export type ConnectorOperationName = InferOutput<typeof connectorOperationNameSchema>;
|
|
34
|
-
export declare const CONNECTOR_OPERATION_LABELS: Record<ConnectorOperationName, string>;
|
|
35
|
-
export declare function generateConnectorOperationsTable(supported: ConnectorOperationName[]): string;
|
|
36
38
|
export interface AuditObjectContentOptions1 extends EngineConnectorActionOptions {
|
|
37
39
|
chunkSize: number | undefined;
|
|
38
40
|
encodingId: string;
|
|
@@ -124,13 +126,11 @@ export interface RetrieveRecordsSummary {
|
|
|
124
126
|
nonUniformRecordCount: number;
|
|
125
127
|
recordCount: number;
|
|
126
128
|
}
|
|
129
|
+
export type RecordRetrievalTypeId = 'jsonRecordArray' | 'parsingRecordArray';
|
|
127
130
|
export interface UpsertRecordsOptions extends EngineConnectorActionOptions {
|
|
128
131
|
records: Record<string, unknown>[];
|
|
129
132
|
path: string;
|
|
130
133
|
}
|
|
131
|
-
export
|
|
132
|
-
export
|
|
133
|
-
|
|
134
|
-
inferValues: (parsedRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[], leadingRecord: boolean) => InferenceRecord;
|
|
135
|
-
inferDataTypes: (parsedRecords: ParsingRecord[]) => InferenceSummary;
|
|
136
|
-
}
|
|
134
|
+
export declare const CONNECTOR_ACTION_NAME_MAP: Record<ConnectorActionName, string>;
|
|
135
|
+
export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorCategoryConfig>;
|
|
136
|
+
export declare function getConnectorActionsTable(supported: ConnectorActionName[]): string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
|
-
import { ModuleConfig } from '..';
|
|
3
|
-
import { presenterOperationNameSchema } from './presenterConfig.schema';
|
|
4
2
|
import { Component, ComponentReference } from '../..';
|
|
3
|
+
import { presenterActionNameSchema, presenterConfigSchema } from './presenterConfig.schema';
|
|
5
4
|
export { presenterConfigSchema } from './presenterConfig.schema';
|
|
6
5
|
export interface PresenterInterface extends Component {
|
|
7
6
|
readonly config: PresenterConfig;
|
|
@@ -9,9 +8,5 @@ export interface PresenterInterface extends Component {
|
|
|
9
8
|
render(presentationPath: string, renderTo: HTMLElement, data?: unknown): Promise<void>;
|
|
10
9
|
setColorMode(colorModeId: string): void;
|
|
11
10
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
operations: PresenterOperationName[];
|
|
15
|
-
typeId: 'presenter';
|
|
16
|
-
}
|
|
17
|
-
export type PresenterOperationName = InferOutput<typeof presenterOperationNameSchema>;
|
|
11
|
+
export type PresenterActionName = InferOutput<typeof presenterActionNameSchema>;
|
|
12
|
+
export type PresenterConfig = InferOutput<typeof presenterConfigSchema>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentConfig } from '../../..';
|
|
2
2
|
export interface PresentationConfig extends ComponentConfig {
|
|
3
|
+
typeId: 'presenterPresentation';
|
|
3
4
|
content: string;
|
|
4
5
|
order: number;
|
|
5
|
-
typeId: 'presenterPresentation';
|
|
6
6
|
}
|
|
7
7
|
export interface PresentationVisualConfig {
|
|
8
8
|
content: PresentationVisualContentConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const presenterActionNameSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"list", undefined>, import('valibot').LiteralSchema<"render", undefined>, import('valibot').LiteralSchema<"setColorMode", undefined>], undefined>;
|
|
2
2
|
export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
3
|
-
readonly
|
|
3
|
+
readonly actionNames: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"list", undefined>, import('valibot').LiteralSchema<"render", undefined>, import('valibot').LiteralSchema<"setColorMode", undefined>], undefined>, undefined>;
|
|
4
4
|
readonly presentations: import('valibot').ArraySchema<import('valibot').ObjectSchema<{
|
|
5
5
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
6
6
|
readonly label: import('valibot').ObjectSchema<{
|
|
@@ -17,7 +17,6 @@ export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
|
17
17
|
readonly order: import('valibot').NumberSchema<undefined>;
|
|
18
18
|
readonly path: import('valibot').StringSchema<undefined>;
|
|
19
19
|
}, undefined>, undefined>;
|
|
20
|
-
readonly operations: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"list", undefined>, import('valibot').LiteralSchema<"render", undefined>, import('valibot').LiteralSchema<"setColorMode", undefined>], undefined>, undefined>;
|
|
21
20
|
readonly version: import('valibot').StringSchema<undefined>;
|
|
22
21
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
23
22
|
readonly label: import('valibot').ObjectSchema<{
|
|
@@ -38,4 +37,5 @@ export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
|
38
37
|
readonly label: import('valibot').StringSchema<undefined>;
|
|
39
38
|
}, undefined>, undefined>;
|
|
40
39
|
readonly statusId: import('valibot').NullableSchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>, undefined>;
|
|
40
|
+
readonly typeId: import('valibot').LiteralSchema<"presenter", undefined>;
|
|
41
41
|
}, undefined>;
|
|
@@ -22,6 +22,6 @@ export declare const SUPPORTED_LANGUAGES: {
|
|
|
22
22
|
}[];
|
|
23
23
|
export declare function createLabelMap(labels: Record<string, string>): LocaleLabelMap;
|
|
24
24
|
export declare function localiseConfig<T extends UnlocalisedConfig>(config: T, localeId: LocaleId): LocalisedConfig<T>;
|
|
25
|
-
export declare function localiseConfigs<T extends UnlocalisedConfig>(configs: T[], localeId: LocaleId,
|
|
25
|
+
export declare function localiseConfigs<T extends UnlocalisedConfig>(configs: T[], localeId: LocaleId, isResultSorted?: boolean): LocalisedConfig<T>[];
|
|
26
26
|
export declare function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: LocaleId): string | undefined;
|
|
27
27
|
export {};
|
|
@@ -2,11 +2,11 @@ export declare const localeLabelSchema: import('valibot').ObjectSchema<{
|
|
|
2
2
|
readonly en: import('valibot').StringSchema<undefined>;
|
|
3
3
|
readonly es: import('valibot').StringSchema<undefined>;
|
|
4
4
|
}, undefined>;
|
|
5
|
-
export declare const partialLocaleLabelSchema: import('valibot').ObjectSchema<{
|
|
6
|
-
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
7
|
-
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
8
|
-
}, undefined>;
|
|
9
5
|
export declare const partialLocaleDescriptionSchema: import('valibot').ObjectSchema<{
|
|
10
6
|
readonly en: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').StringSchema<undefined>, undefined>, undefined>;
|
|
11
7
|
readonly es: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').StringSchema<undefined>, undefined>, undefined>;
|
|
12
8
|
}, undefined>;
|
|
9
|
+
export declare const partialLocaleLabelSchema: import('valibot').ObjectSchema<{
|
|
10
|
+
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
11
|
+
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
12
|
+
}, undefined>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
type DurationLevel = 'days' | 'hrs' | 'mins' | 'secs' | 'ms';
|
|
1
2
|
export declare function convertODataTypeIdToUsageTypeId(oDataTypeId: string): string;
|
|
2
3
|
export declare function extractNameFromPath(itemPath: string): string | undefined;
|
|
3
4
|
export declare function extractExtensionFromPath(itemPath: string): string | undefined;
|
|
4
5
|
export declare function formatNumberAsDecimalNumber(number?: number, decimalPlaces?: number, minimumFractionDigits?: number, locale?: string): string;
|
|
5
6
|
export declare function formatNumberAsSize(number?: number, decimalPlaces?: number): string;
|
|
6
7
|
export declare function formatNumberAsStorageSize(number?: number, decimalPlaces?: number): string;
|
|
7
|
-
export type DurationLevel = 'days' | 'hrs' | 'mins' | 'secs' | 'ms';
|
|
8
8
|
export declare function formatNumberAsDuration(number?: number, stopAt?: DurationLevel): string;
|
|
9
9
|
export declare function formatNumberAsWholeNumber(number?: number, locale?: string): string;
|
|
10
10
|
export declare function lookupMimeTypeForExtension(extension?: string): string;
|
|
11
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.703",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common constants, types and utilities used across all DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -130,23 +130,23 @@
|
|
|
130
130
|
"document": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentDependencies(['MIT']))\"",
|
|
131
131
|
"format": "node -e \"import('@dpuse/dpuse-development').then(m => m.formatCode())\"",
|
|
132
132
|
"lint": "node -e \"import('@dpuse/dpuse-development').then(m => m.lintCode())\"",
|
|
133
|
-
"release": "npm run
|
|
133
|
+
"release": "npm run sync && gh release create \"v$(npm pkg get version | tr -d '\"')\" --generate-notes --latest",
|
|
134
134
|
"sync": "node -e \"import('@dpuse/dpuse-development').then(m => m.syncProjectWithGitHub())\"",
|
|
135
135
|
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
|
-
"@dpuse/dpuse-development": "^0.3.
|
|
138
|
+
"@dpuse/dpuse-development": "^0.3.564",
|
|
139
139
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
|
|
140
140
|
"@types/eslint-plugin-security": "^3.0.1",
|
|
141
|
-
"@types/node": "^26.0.
|
|
141
|
+
"@types/node": "^26.0.1",
|
|
142
142
|
"eslint": "^10.5.0",
|
|
143
143
|
"eslint-config-prettier": "^10.1.8",
|
|
144
144
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
145
145
|
"eslint-plugin-import-x": "^4.17.0",
|
|
146
|
-
"eslint-plugin-regexp": "^3.1.
|
|
146
|
+
"eslint-plugin-regexp": "^3.1.1",
|
|
147
147
|
"eslint-plugin-security": "^4.0.1",
|
|
148
148
|
"eslint-plugin-sonarjs": "^4.1.0",
|
|
149
|
-
"eslint-plugin-unicorn": "^
|
|
149
|
+
"eslint-plugin-unicorn": "^69.0.0",
|
|
150
150
|
"file-type": "^22.0.1",
|
|
151
151
|
"jiti": "^2.7.0",
|
|
152
152
|
"license-checker-rseidelsohn": "^5.0.1",
|