@dpuse/dpuse-shared 0.3.863 → 0.3.867
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 +30 -84
- package/dist/dpuse-shared.es.js +1473 -0
- package/dist/dpuse-shared.es.js.map +1 -0
- package/dist/types/src/index.d.ts +24 -0
- package/package.json +10 -110
- package/dist/componentConfig.schema-DT3mO5rS.js +0 -416
- package/dist/componentConfig.schema-DT3mO5rS.js.map +0 -1
- package/dist/dpuse-shared-component.es.js +0 -53
- package/dist/dpuse-shared-component.es.js.map +0 -1
- package/dist/dpuse-shared-componentConnection.es.js +0 -0
- package/dist/dpuse-shared-componentContext.es.js +0 -0
- package/dist/dpuse-shared-componentContextModel.es.js +0 -0
- package/dist/dpuse-shared-componentContextModelDimension.es.js +0 -0
- package/dist/dpuse-shared-componentContextModelDimensionHierarchy.es.js +0 -0
- package/dist/dpuse-shared-componentContextModelEntity.es.js +0 -0
- package/dist/dpuse-shared-componentContextModelEntityDataItem.es.js +0 -0
- package/dist/dpuse-shared-componentContextModelEntityEvent.es.js +0 -0
- package/dist/dpuse-shared-componentContextModelEntityPrimaryMeasure.es.js +0 -0
- package/dist/dpuse-shared-componentContextModelSecondaryMeasure.es.js +0 -0
- package/dist/dpuse-shared-componentDataView.es.js +0 -18
- package/dist/dpuse-shared-componentDataView.es.js.map +0 -1
- package/dist/dpuse-shared-componentEventQuery.es.js +0 -0
- package/dist/dpuse-shared-componentModule.es.js +0 -0
- package/dist/dpuse-shared-componentModuleConnector.es.js +0 -182
- package/dist/dpuse-shared-componentModuleConnector.es.js.map +0 -1
- package/dist/dpuse-shared-componentModuleCookbook.es.js +0 -11
- package/dist/dpuse-shared-componentModuleCookbook.es.js.map +0 -1
- package/dist/dpuse-shared-componentModuleEngine.es.js +0 -0
- package/dist/dpuse-shared-componentModulePresenter.es.js +0 -15
- package/dist/dpuse-shared-componentModulePresenter.es.js.map +0 -1
- package/dist/dpuse-shared-componentModuleTool.es.js +0 -29
- package/dist/dpuse-shared-componentModuleTool.es.js.map +0 -1
- package/dist/dpuse-shared-componentPresentation.es.js +0 -0
- package/dist/dpuse-shared-componentRecipe.es.js +0 -0
- package/dist/dpuse-shared-encoding.es.js +0 -467
- package/dist/dpuse-shared-encoding.es.js.map +0 -1
- package/dist/dpuse-shared-errors.es.js +0 -150
- package/dist/dpuse-shared-errors.es.js.map +0 -1
- package/dist/dpuse-shared-locale.es.js +0 -28
- package/dist/dpuse-shared-locale.es.js.map +0 -1
- package/dist/dpuse-shared-utilities.es.js +0 -109
- package/dist/dpuse-shared-utilities.es.js.map +0 -1
- package/dist/label-DexpXrnC.js +0 -19
- package/dist/label-DexpXrnC.js.map +0 -1
- package/dist/moduleConfig.schema-aYmFWSrn.js +0 -22
- package/dist/moduleConfig.schema-aYmFWSrn.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
[](./LICENSE)
|
|
6
6
|
[](https://github.com/dpuse/dpuse-shared/releases/latest)
|
|
7
|
+
[](https://www.npmjs.com/package/@dpuse/dpuse-shared)
|
|
7
8
|
[](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml)
|
|
8
9
|
|
|
9
10
|
[DPUse](https://www.dpuse.app) · [Report a Vulnerability](https://github.com/dpuse/dpuse-shared/security/advisories/new) · [Open an Issue](https://github.com/dpuse/dpuse-shared/issues)
|
|
10
11
|
|
|
11
|
-
Common constants, types and utilities used across
|
|
12
|
+
Common constants, types and utilities used across DPUse projects.
|
|
12
13
|
|
|
13
14
|
## About DPUse
|
|
14
15
|
|
|
@@ -56,13 +57,10 @@ This repository is managed using the common set of actions provided by [@dpuse/d
|
|
|
56
57
|
|
|
57
58
|
### Example
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
Everything is imported from the package itself. Bundlers keep only what you use:
|
|
60
61
|
|
|
61
62
|
```ts
|
|
62
|
-
import { getComponentStatus } from '@dpuse/dpuse-shared
|
|
63
|
-
import type { ConnectorConfig } from '@dpuse/dpuse-shared/component/module/connector';
|
|
64
|
-
import { ConnectorError, serialiseError } from '@dpuse/dpuse-shared/errors';
|
|
65
|
-
import { formatNumberAsDuration } from '@dpuse/dpuse-shared/utilities';
|
|
63
|
+
import { ConnectorError, type ConnectorConfig, formatNumberAsDuration, getComponentStatus, serialiseError } from '@dpuse/dpuse-shared';
|
|
66
64
|
|
|
67
65
|
try {
|
|
68
66
|
// The locator argument follows the convention 'project.file.function'
|
|
@@ -98,13 +96,13 @@ OData-to-internal type conversion, file path name and extension extraction, numb
|
|
|
98
96
|
|
|
99
97
|
## API Reference
|
|
100
98
|
|
|
101
|
-
See [API_REFERENCE.md](./API_REFERENCE.md) for the complete API reference, including all exported schemas, types, classes, constants, and actions
|
|
99
|
+
See [API_REFERENCE.md](./API_REFERENCE.md) for the complete API reference, including all exported schemas, types, classes, constants, and actions, grouped by topic.
|
|
102
100
|
|
|
103
101
|
<!-- DEPENDENCY_LICENSES_START -->
|
|
104
102
|
|
|
105
103
|
## Dependency Licenses
|
|
106
104
|
|
|
107
|
-
License data is updated each time `npm run document` is run, using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies.
|
|
105
|
+
License data is updated each time `npm run document` is run, using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. This project has no build record, so the list is taken from its declared dependencies. These dependencies have been checked and confirmed to use BSD-3-Clause or MIT, all of which allow commercial use. All are used unmodified, so any licence conditions that apply only to modified versions are not triggered. Developers cloning this repository should independently verify development dependencies.
|
|
108
106
|
|
|
109
107
|
| Dependency | Version | License(s) | Document |
|
|
110
108
|
| :--------------------------------------------------------------------- | :-----: | :----------- | :------------------------------------------------------------------ |
|
|
@@ -128,10 +126,10 @@ The dependency tree below lists every package in this project — direct and tra
|
|
|
128
126
|
- **[@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate)** 0.4.1 — **10 months** ago: 2025-11-18 ⚠️
|
|
129
127
|
- **[debug](https://github.com/debug-js/debug)** 4.4.3 — **12 months** ago: 2025-09-13 ⚠️
|
|
130
128
|
- **[ms](https://github.com/vercel/ms)** 2.1.3 — **69 months** ago: 2020-12-08 ⚠️
|
|
131
|
-
- **[token-types](https://github.com/Borewit/token-types)** 6.1.2 — **
|
|
129
|
+
- **[token-types](https://github.com/Borewit/token-types)** 6.1.2 — **9 months** ago: 2026-01-01 ⚠️
|
|
132
130
|
- **[strtok3](https://github.com/Borewit/strtok3)** 10.3.5 — **6 months** ago: 2026-03-21
|
|
133
131
|
- **[@tokenizer/token](https://github.com/Borewit/tokenizer-token)** 0.3.0 — **62 months** ago: 2021-07-12 ⚠️
|
|
134
|
-
- **[token-types](https://github.com/Borewit/token-types)** 6.1.2 — **
|
|
132
|
+
- **[token-types](https://github.com/Borewit/token-types)** 6.1.2 — **9 months** ago: 2026-01-01 ⚠️
|
|
135
133
|
- **[@borewit/text-codec](https://github.com/Borewit/text-codec)** 0.2.2 — **6 months** ago: 2026-03-11
|
|
136
134
|
- **[@tokenizer/token](https://github.com/Borewit/tokenizer-token)** 0.3.0 — **62 months** ago: 2021-07-12 ⚠️
|
|
137
135
|
- **[ieee754](https://github.com/feross/ieee754)** 1.2.1 — **71 months** ago: 2020-10-27 ⚠️
|
|
@@ -148,70 +146,18 @@ This report is updated with each release, from the bundle the release builds, us
|
|
|
148
146
|
|
|
149
147
|
_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._
|
|
150
148
|
|
|
151
|
-
| Chunk/Module/File
|
|
152
|
-
|
|
|
153
|
-
| dist/
|
|
154
|
-
|
|
|
155
|
-
|  
|
|
156
|
-
|  
|
|
157
|
-
|  
|
|
158
|
-
|  
|
|
159
|
-
|  
|
|
160
|
-
|  
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 2.9% |
|
|
164
|
-
| dist/dpuse-shared-errors.es.js | 4.6 kB · gzip 1.7 kB |
|
|
165
|
-
| src → index.ts | `██░░░░░░░░░░░░░░░░░░` 12.3% |
|
|
166
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.3% |
|
|
167
|
-
| dist/dpuse-shared-componentModuleConnector.es.js | 3.6 kB · gzip 1.3 kB |
|
|
168
|
-
| src | `██░░░░░░░░░░░░░░░░░░` 8.4% |
|
|
169
|
-
| index.ts | `█░░░░░░░░░░░░░░░░░░░` 6.1% |
|
|
170
|
-
| connectorConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 2.3% |
|
|
171
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 2.1% |
|
|
172
|
-
| dist/dpuse-shared-utilities.es.js | 3.5 kB · gzip 1.3 kB |
|
|
173
|
-
| src → index.ts | `██░░░░░░░░░░░░░░░░░░` 8.9% |
|
|
174
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.4% |
|
|
175
|
-
| dist/dpuse-shared-locale.es.js | 856 B · gzip 386 B |
|
|
176
|
-
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
|
|
177
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.9% |
|
|
178
|
-
| dist/dpuse-shared-component.es.js | 834 B · gzip 415 B |
|
|
179
|
-
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
|
|
180
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.9% |
|
|
181
|
-
| dist/dpuse-shared-componentModuleTool.es.js | 784 B · gzip 450 B |
|
|
182
|
-
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% |
|
|
183
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
184
|
-
| dist/dpuse-shared-componentDataView.es.js | 701 B · gzip 355 B |
|
|
185
|
-
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
|
|
186
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.4% |
|
|
187
|
-
| dist/dpuse-shared-componentModulePresenter.es.js | 411 B · gzip 269 B |
|
|
188
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
189
|
-
| src → presenterConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.4% |
|
|
190
|
-
| dist/moduleConfig.schema-aYmFWSrn.js | 405 B · gzip 274 B |
|
|
191
|
-
| src → moduleConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
192
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
193
|
-
| dist/dpuse-shared-componentModuleCookbook.es.js | 370 B · gzip 248 B |
|
|
194
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
195
|
-
| src → cookbookConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.3% |
|
|
196
|
-
| dist/label-DexpXrnC.js | 361 B · gzip 251 B |
|
|
197
|
-
| src → label.ts | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
198
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.3% |
|
|
199
|
-
| dist/dpuse-shared-componentConnection.es.js | 0 B · gzip 20 B |
|
|
200
|
-
| dist/dpuse-shared-componentContext.es.js | 0 B · gzip 20 B |
|
|
201
|
-
| dist/dpuse-shared-componentContextModel.es.js | 0 B · gzip 20 B |
|
|
202
|
-
| dist/dpuse-shared-componentContextModelDimension.es.js | 0 B · gzip 20 B |
|
|
203
|
-
| dist/dpuse-shared-componentContextModelDimensionHierarchy.es.js | 0 B · gzip 20 B |
|
|
204
|
-
| dist/dpuse-shared-componentContextModelEntity.es.js | 0 B · gzip 20 B |
|
|
205
|
-
| dist/dpuse-shared-componentContextModelEntityDataItem.es.js | 0 B · gzip 20 B |
|
|
206
|
-
| dist/dpuse-shared-componentContextModelEntityEvent.es.js | 0 B · gzip 20 B |
|
|
207
|
-
| dist/dpuse-shared-componentContextModelEntityPrimaryMeasure.es.js | 0 B · gzip 20 B |
|
|
208
|
-
| dist/dpuse-shared-componentContextModelSecondaryMeasure.es.js | 0 B · gzip 20 B |
|
|
209
|
-
| dist/dpuse-shared-componentEventQuery.es.js | 0 B · gzip 20 B |
|
|
210
|
-
| dist/dpuse-shared-componentModule.es.js | 0 B · gzip 20 B |
|
|
211
|
-
| dist/dpuse-shared-componentModuleEngine.es.js | 0 B · gzip 20 B |
|
|
212
|
-
| dist/dpuse-shared-componentPresentation.es.js | 0 B · gzip 20 B |
|
|
213
|
-
| dist/dpuse-shared-componentRecipe.es.js | 0 B · gzip 20 B |
|
|
214
|
-
| dist/dpuse-shared.es.js | 0 B · gzip 20 B |
|
|
149
|
+
| Chunk/Module/File | Composition |
|
|
150
|
+
| :-------------------------------------------------------------------------- | :------------------------------------------ |
|
|
151
|
+
| **dist/dpuse-shared.es.js** | 33.1 kB · gzip 8.6 kB · 100.0% of the build |
|
|
152
|
+
| src | `█████████████░░░░░░░` 64.3% · 21.3 kB |
|
|
153
|
+
| ↳ index.ts | `▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░` 53.7% · 17.8 kB |
|
|
154
|
+
| ↳ connectorConfig.schema.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.6% · 1.2 kB |
|
|
155
|
+
| ↳ componentConfig.schema.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.8% · 936 B |
|
|
156
|
+
| ↳ 7 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 4.3% · 1.4 kB |
|
|
157
|
+
| valibot → dist/index.mjs | `████░░░░░░░░░░░░░░░░` 21.2% · 7.0 kB |
|
|
158
|
+
| (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 14.5% · 4.8 kB |
|
|
159
|
+
|
|
160
|
+
Bars show each row's share of its output file. ↳ rows are part of the row above.
|
|
215
161
|
|
|
216
162
|
(bundler output, whitespace & JSON) = bytes Sonda can't trace to a source file: whitespace (indentation and line breaks), code the bundler generates (region comments, the combined import/export lines, its small runtime helper and wrappers), and imported JSON such as `config.json`, which the bundler doesn't map. The JSON and the generated code are real bytes that ship; the whitespace mostly disappears once compressed.
|
|
217
163
|
|
|
@@ -227,8 +173,8 @@ This section is updated each time `npm run document` is run. Settings come from
|
|
|
227
173
|
|
|
228
174
|
| Check | Status | What it does |
|
|
229
175
|
| :------------------- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
230
|
-
| Unit tests | ✅ On | [Vitest](https://vitest.dev) runs the unit tests. Part of the [CI workflow](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml) on every push to `main`.
|
|
231
|
-
| Property-based tests | ✅ On | [fast-check](https://fast-check.dev) runs many random inputs per test to find edge cases, alongside the unit tests. Part of the [CI workflow](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml) on every push to `main`.
|
|
176
|
+
| Unit tests | ✅ On | [Vitest](https://vitest.dev) runs the unit tests. Part of the [CI workflow](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml) on every push and pull request to `main`. |
|
|
177
|
+
| Property-based tests | ✅ On | [fast-check](https://fast-check.dev) runs many random inputs per test to find edge cases, alongside the unit tests. Part of the [CI workflow](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml) on every push and pull request to `main`. |
|
|
232
178
|
| Test coverage | ✅ On |  [Vitest's V8 coverage](https://vitest.dev/guide/coverage) measures the share of source lines the unit tests run. The target is 80%. |
|
|
233
179
|
|
|
234
180
|
### Code Quality
|
|
@@ -237,7 +183,7 @@ This section is updated each time `npm run document` is run. Settings come from
|
|
|
237
183
|
| :------------ | :----- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
238
184
|
| Code health | ✅ On | [](./code-health-reports/fallow/index.md) [Fallow](https://github.com/fallow-rs/fallow) finds unused code, duplication, complexity and dependency problems. |
|
|
239
185
|
| Code analysis | ✅ On | [](https://sonarcloud.io/summary/new_code?id=dpuse_dpuse-shared) [SonarCloud](https://sonarcloud.io) checks every push for bugs, code smells and vulnerabilities. |
|
|
240
|
-
| Linting | ✅ On | [ESLint](https://eslint.org) checks the code for errors and style problems. Part of the [CI workflow](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml) on every push to `main`.
|
|
186
|
+
| Linting | ✅ On | [ESLint](https://eslint.org) checks the code for errors and style problems. Part of the [CI workflow](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml) on every push and pull request to `main`. |
|
|
241
187
|
|
|
242
188
|
### Security Analysis
|
|
243
189
|
|
|
@@ -249,13 +195,13 @@ This section is updated each time `npm run document` is run. Settings come from
|
|
|
249
195
|
|
|
250
196
|
### Dependencies
|
|
251
197
|
|
|
252
|
-
| Check | Status | What it does
|
|
253
|
-
| :------------------ | :----- |
|
|
254
|
-
| Vulnerability audit | ✅ On | [npm audit](https://docs.npmjs.com/cli/commands/npm-audit) fails when any dependency has a
|
|
255
|
-
| Supply chain risk | ✅ On | [Socket](https://socket.dev) flags malicious packages, typosquatting and suspicious behaviour that may not yet have a CVE.
|
|
256
|
-
| Security alerts | ✅ On | [Dependabot](https://docs.github.com/en/code-security/dependabot) alerts when a dependency has a known vulnerability, using the GitHub Advisory Database.
|
|
257
|
-
| Security updates | ❌ Off | [Dependabot](https://docs.github.com/en/code-security/dependabot) opens pull requests that update vulnerable dependencies. These are handled manually.
|
|
258
|
-
| Version updates | ❌ Off | [Dependabot](https://docs.github.com/en/code-security/dependabot) opens pull requests for new dependency versions. These are handled manually.
|
|
198
|
+
| Check | Status | What it does |
|
|
199
|
+
| :------------------ | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
200
|
+
| Vulnerability audit | ✅ On | [npm audit](https://docs.npmjs.com/cli/commands/npm-audit) fails when a shipped dependency has any known vulnerability, or a development dependency has a high or critical one. Part of the [CI workflow](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml) on every push and pull request to `main`. |
|
|
201
|
+
| Supply chain risk | ✅ On | [Socket](https://socket.dev) flags malicious packages, typosquatting and suspicious behaviour that may not yet have a CVE. |
|
|
202
|
+
| Security alerts | ✅ On | [Dependabot](https://docs.github.com/en/code-security/dependabot) alerts when a dependency has a known vulnerability, using the GitHub Advisory Database. |
|
|
203
|
+
| Security updates | ❌ Off | [Dependabot](https://docs.github.com/en/code-security/dependabot) opens pull requests that update vulnerable dependencies. These are handled manually. |
|
|
204
|
+
| Version updates | ❌ Off | [Dependabot](https://docs.github.com/en/code-security/dependabot) opens pull requests for new dependency versions. These are handled manually. |
|
|
259
205
|
|
|
260
206
|
### OpenSSF 🚧
|
|
261
207
|
|