@dpuse/dpuse-shared 0.3.829 → 0.3.838
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 +65 -89
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
# DPUse Shared Library
|
|
2
2
|
|
|
3
|
-
[](./LICENSE)
|
|
4
|
-
[](https://www.npmjs.com/package/@dpuse/dpuse-shared)
|
|
5
|
-
[](https://github.com/dpuse/dpuse-shared/actions/workflows/codeql.yml)
|
|
6
|
-
[](https://sonarcloud.io/summary/new_code?id=dpuse_dpuse-shared)
|
|
7
|
-
[](https://github.com/dpuse/dpuse-shared/actions/workflows/ci.yml)
|
|
8
|
-
|
|
9
|
-
## Introduction
|
|
10
|
-
|
|
11
|
-
@dpuse/dpuse-shared is the foundational library for the [DPUse](https://www.dpuse.app/) ecosystem. It provides the common constants, types, errors, and utilities that are shared across all DPUse modules — including the App, API, Engine, Connectors, Contexts, Presenters and Recipes.
|
|
12
|
-
|
|
13
|
-
The library is written in TypeScript and designed to be consumed exclusively by TypeScript projects. All configuration types are schema-validated using [Valibot](https://valibot.dev/), giving consumers both compile-time safety and runtime validation from a single source of truth.
|
|
14
|
-
|
|
15
3
|
<!-- OPENING_START -->
|
|
16
4
|
|
|
17
5
|
[](./LICENSE)
|
|
@@ -24,14 +12,24 @@ The library is written in TypeScript and designed to be consumed exclusively by
|
|
|
24
12
|
|
|
25
13
|
## About DPUse
|
|
26
14
|
|
|
27
|
-
DPUse (Data Positioning & Use) is an in-browser application that positions your data for use through three core activities: sourcing, contextualising, and publishing.
|
|
15
|
+
DPUse (Data Positioning & Use) is an in-browser application that positions your data for use through three core activities: sourcing, contextualising, and publishing.
|
|
16
|
+
|
|
17
|
+
**Sourcing** uses a library of [Connectors](https://www.dpuse.app/connectors) to establish [Connections](https://www.dpuse.app) to applications, databases, file stores, and curated datasets; these connections are subsequently used to configure structured [Data Views](https://www.dpuse.app) from the underlying sources.
|
|
18
|
+
|
|
19
|
+
**Contextualising** extracts chronological events from those [Data Views](https://www.dpuse.app) and maps them into comprehensive [Context Models](https://www.dpuse.app). This gives the DPUse Engine the structural framework needed to generate deterministic transactions, facts, or observations.
|
|
20
|
+
|
|
21
|
+
**Publishing** uses a library of [Presenters](https://www.dpuse.app) to render standard [Presentations](https://www.dpuse.app) immediately using the contextualised data; additionally, [Cookbooks](https://www.dpuse.app) of [Recipes](https://www.dpuse.app) let you build Data Apps using your preferred tools.
|
|
22
|
+
|
|
23
|
+
In addition, DPUse provides [Tools](https://www.dpuse.app) used by the application, and you can use them to construct connectors and presenters.
|
|
28
24
|
|
|
29
25
|
## Introduction
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
@dpuse/dpuse-shared is the foundational library for the [DPUse](https://www.dpuse.app/) ecosystem. It provides the common constants, types, errors, and utilities that are shared across all DPUse modules — including the App, API, Engine, Connectors, Contexts, Presenters and Recipes.,The library is written in TypeScript and designed to be consumed exclusively by TypeScript projects. All configuration types are schema-validated using [Valibot](https://valibot.dev/), giving consumers both compile-time safety and runtime validation from a single source of truth.
|
|
32
28
|
|
|
33
29
|
<!-- OPENING_END -->
|
|
34
30
|
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
35
33
|
<!-- USAGE_START -->
|
|
36
34
|
|
|
37
35
|
This connector is automatically uploaded to the DPUse Engine cloud once released and becomes instantly available to all new browser app instances, with existing instances notified of the update.
|
|
@@ -48,19 +46,7 @@ _Requires [Node.js](https://nodejs.org/) 24 or later, [npm](https://www.npmjs.co
|
|
|
48
46
|
|
|
49
47
|
<!-- USAGE_END -->
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Prerequisites
|
|
54
|
-
|
|
55
|
-
The following are required to use this library:
|
|
56
|
-
|
|
57
|
-
| Prerequisite | Version |
|
|
58
|
-
| --------------------------------------------- | :-----: |
|
|
59
|
-
| [Node.js](https://nodejs.org/) | ≥ 22.0 |
|
|
60
|
-
| [npm](https://www.npmjs.com/) | ≥ 11.0 |
|
|
61
|
-
| [TypeScript](https://www.typescriptlang.org/) | ≥ 6.0 |
|
|
62
|
-
|
|
63
|
-
## Installation
|
|
49
|
+
### OLD Installation
|
|
64
50
|
|
|
65
51
|
`@dpuse/dpuse-shared` is published to the [public npm registry](https://www.npmjs.com/package/@dpuse/dpuse-shared). Install it using your preferred package manager:
|
|
66
52
|
|
|
@@ -75,9 +61,7 @@ yarn add @dpuse/dpuse-shared
|
|
|
75
61
|
pnpm add @dpuse/dpuse-shared
|
|
76
62
|
```
|
|
77
63
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
## Usage
|
|
64
|
+
### OLD Usage
|
|
81
65
|
|
|
82
66
|
This package uses [sub-path exports](https://nodejs.org/api/packages.html#subpath-exports). Import only the entry points you need:
|
|
83
67
|
|
|
@@ -125,12 +109,10 @@ OData-to-internal type conversion, file path name and extension extraction, numb
|
|
|
125
109
|
|
|
126
110
|
See [API_REFERENCE.md](./API_REFERENCE.md) for the complete API reference, including all exported schemas, types, classes, constants, and actions for each sub-path entry point.
|
|
127
111
|
|
|
128
|
-
## Dependency Licenses
|
|
129
|
-
|
|
130
|
-
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.
|
|
131
|
-
|
|
132
112
|
<!-- DEPENDENCY_LICENSES_START -->
|
|
133
113
|
|
|
114
|
+
## Dependency Licenses
|
|
115
|
+
|
|
134
116
|
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, or MIT — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.
|
|
135
117
|
|
|
136
118
|
|Dependency|Version|License(s)|Document|
|
|
@@ -148,15 +130,9 @@ License data is collected automatically on each release using [license-checker](
|
|
|
148
130
|
|[uint8array-extras](https://github.com/sindresorhus/uint8array-extras)|1.5.0|MIT|[LICENSE](licenses/downloads/uint8array-extras@1.5.0-LICENSE.txt)|
|
|
149
131
|
|[valibot](https://github.com/open-circle/valibot)|1.5.0|MIT|[LICENSE](licenses/downloads/valibot@1.5.0-LICENSE.txt)|
|
|
150
132
|
|
|
151
|
-
<!-- DEPENDENCY_LICENSES_END -->
|
|
152
|
-
|
|
153
133
|
### Dependency Tree
|
|
154
134
|
|
|
155
|
-
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
|
|
156
|
-
|
|
157
|
-
<!-- DEPENDENCY_TREE_START -->
|
|
158
|
-
|
|
159
|
-
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.
|
|
135
|
+
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 mature and stable (have limited or no dependencies), so they require no active development.
|
|
160
136
|
|
|
161
137
|
- **[file-type](https://github.com/sindresorhus/file-type)** 22.1.1 — this month: 2026-09-17
|
|
162
138
|
- **[@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate)** 0.4.1 — **10 months** ago: 2025-11-18 ⚠️
|
|
@@ -173,84 +149,84 @@ The dependency tree below lists every package in this project — direct and tra
|
|
|
173
149
|
- **[valibot](https://github.com/open-circle/valibot)** 1.5.0 — this month: 2026-09-09
|
|
174
150
|
- **[typescript](https://github.com/microsoft/TypeScript)** 6.0.3 — **5 months** ago: 2026-04-16 → **latest**: 7.0.2 — **2 months** ago: 2026-07-08 ❗
|
|
175
151
|
|
|
176
|
-
<!--
|
|
177
|
-
|
|
178
|
-
## Bundle Analysis
|
|
152
|
+
<!-- DEPENDENCY_LICENSES_END -->
|
|
179
153
|
|
|
180
154
|
<!-- BUNDLE_START -->
|
|
181
155
|
|
|
156
|
+
## Bundle Analysis
|
|
157
|
+
|
|
182
158
|
The Bundle Analysis Report is generated automatically on each release using [Sonda](https://sonda.dev/), which analyses final source maps to reveal the actual effects of tree-shaking and minification rather than relying on pre-build estimates.
|
|
183
159
|
|
|
184
160
|
_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._
|
|
185
161
|
|
|
186
162
|
|Chunk/Module/File|Composition|
|
|
187
163
|
|:------ |:-----------|
|
|
188
|
-
| dist/componentConfig.schema-DT3mO5rS.js | 10.2 kB ·
|
|
164
|
+
| dist/componentConfig.schema-DT3mO5rS.js | 10.2 kB · gzip 2.6 kB |
|
|
189
165
|
| valibot → dist/index.mjs | `████░░░░░░░░░░░░░░░░` 20.6% |
|
|
190
|
-
| (
|
|
166
|
+
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 5.2% |
|
|
191
167
|
| src | `█░░░░░░░░░░░░░░░░░░░` 4.1% |
|
|
192
168
|
| componentConfig.schema.ts | `█░░░░░░░░░░░░░░░░░░░` 2.7% |
|
|
193
169
|
| locale.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
194
170
|
| baseConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% |
|
|
195
171
|
| schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
196
|
-
| dist/dpuse-shared-encoding.es.js | 7.4 kB ·
|
|
172
|
+
| dist/dpuse-shared-encoding.es.js | 7.4 kB · gzip 1.5 kB |
|
|
197
173
|
| src → index.ts | `████░░░░░░░░░░░░░░░░` 18.8% |
|
|
198
|
-
| (
|
|
199
|
-
| dist/dpuse-shared-errors.es.js | 4.6 kB ·
|
|
174
|
+
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 2.9% |
|
|
175
|
+
| dist/dpuse-shared-errors.es.js | 4.6 kB · gzip 1.7 kB |
|
|
200
176
|
| src → index.ts | `██░░░░░░░░░░░░░░░░░░` 12.2% |
|
|
201
|
-
| (
|
|
202
|
-
| dist/dpuse-shared-componentModuleConnector.es.js | 3.6 kB ·
|
|
177
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.4% |
|
|
178
|
+
| dist/dpuse-shared-componentModuleConnector.es.js | 3.6 kB · gzip 1.3 kB |
|
|
203
179
|
| src | `██░░░░░░░░░░░░░░░░░░` 8.3% |
|
|
204
180
|
| index.ts | `█░░░░░░░░░░░░░░░░░░░` 6.0% |
|
|
205
181
|
| connectorConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 2.3% |
|
|
206
|
-
| (
|
|
207
|
-
| dist/dpuse-shared-utilities.es.js | 3.5 kB ·
|
|
182
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 2.2% |
|
|
183
|
+
| dist/dpuse-shared-utilities.es.js | 3.5 kB · gzip 1.3 kB |
|
|
208
184
|
| src → index.ts | `██░░░░░░░░░░░░░░░░░░` 8.9% |
|
|
209
|
-
| (
|
|
210
|
-
| dist/dpuse-shared-locale.es.js | 856 B ·
|
|
185
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.4% |
|
|
186
|
+
| dist/dpuse-shared-locale.es.js | 856 B · gzip 386 B |
|
|
211
187
|
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
|
|
212
|
-
| (
|
|
213
|
-
| dist/dpuse-shared-component.es.js | 834 B ·
|
|
188
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.9% |
|
|
189
|
+
| dist/dpuse-shared-component.es.js | 834 B · gzip 415 B |
|
|
214
190
|
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.5% |
|
|
215
|
-
| (
|
|
216
|
-
| dist/dpuse-shared-componentModuleTool.es.js | 784 B ·
|
|
191
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.9% |
|
|
192
|
+
| dist/dpuse-shared-componentModuleTool.es.js | 784 B · gzip 450 B |
|
|
217
193
|
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% |
|
|
218
|
-
| (
|
|
219
|
-
| dist/dpuse-shared-componentDataView.es.js | 701 B ·
|
|
194
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
195
|
+
| dist/dpuse-shared-componentDataView.es.js | 701 B · gzip 355 B |
|
|
220
196
|
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 1.6% |
|
|
221
|
-
| (
|
|
222
|
-
| dist/dpuse-shared-componentModulePresenter.es.js | 411 B ·
|
|
223
|
-
| (
|
|
197
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.4% |
|
|
198
|
+
| dist/dpuse-shared-componentModulePresenter.es.js | 411 B · gzip 269 B |
|
|
199
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
224
200
|
| src → presenterConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.4% |
|
|
225
|
-
| dist/moduleConfig.schema-aYmFWSrn.js | 405 B ·
|
|
201
|
+
| dist/moduleConfig.schema-aYmFWSrn.js | 405 B · gzip 274 B |
|
|
226
202
|
| src → moduleConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
227
|
-
| (
|
|
228
|
-
| dist/dpuse-shared-componentModuleCookbook.es.js | 370 B ·
|
|
229
|
-
| (
|
|
203
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.6% |
|
|
204
|
+
| dist/dpuse-shared-componentModuleCookbook.es.js | 370 B · gzip 248 B |
|
|
205
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
230
206
|
| src → cookbookConfig.schema.ts | `░░░░░░░░░░░░░░░░░░░░` 0.3% |
|
|
231
|
-
| dist/label-DexpXrnC.js | 361 B ·
|
|
207
|
+
| dist/label-DexpXrnC.js | 361 B · gzip 251 B |
|
|
232
208
|
| src → label.ts | `░░░░░░░░░░░░░░░░░░░░` 0.8% |
|
|
233
|
-
| (
|
|
234
|
-
| dist/dpuse-shared-componentRecipe.es.js | 94 B ·
|
|
235
|
-
| (
|
|
209
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.3% |
|
|
210
|
+
| dist/dpuse-shared-componentRecipe.es.js | 94 B · gzip 110 B |
|
|
211
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 0.2% |
|
|
236
212
|
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 0.0% |
|
|
237
|
-
| dist/dpuse-shared-componentConnection.es.js | 0 B ·
|
|
238
|
-
| dist/dpuse-shared-componentContext.es.js | 0 B ·
|
|
239
|
-
| dist/dpuse-shared-componentContextModel.es.js | 0 B ·
|
|
240
|
-
| dist/dpuse-shared-componentContextModelDimension.es.js | 0 B ·
|
|
241
|
-
| dist/dpuse-shared-componentContextModelDimensionHierarchy.es.js | 0 B ·
|
|
242
|
-
| dist/dpuse-shared-componentContextModelEntity.es.js | 0 B ·
|
|
243
|
-
| dist/dpuse-shared-componentContextModelEntityDataItem.es.js | 0 B ·
|
|
244
|
-
| dist/dpuse-shared-componentContextModelEntityEvent.es.js | 0 B ·
|
|
245
|
-
| dist/dpuse-shared-componentContextModelEntityPrimaryMeasure.es.js | 0 B ·
|
|
246
|
-
| dist/dpuse-shared-componentContextModelSecondaryMeasure.es.js | 0 B ·
|
|
247
|
-
| dist/dpuse-shared-componentEventQuery.es.js | 0 B ·
|
|
248
|
-
| dist/dpuse-shared-componentModule.es.js | 0 B ·
|
|
249
|
-
| dist/dpuse-shared-componentModuleEngine.es.js | 0 B ·
|
|
250
|
-
| dist/dpuse-shared-componentPresentation.es.js | 0 B ·
|
|
251
|
-
| dist/dpuse-shared.es.js | 0 B ·
|
|
252
|
-
|
|
253
|
-
(
|
|
213
|
+
| dist/dpuse-shared-componentConnection.es.js | 0 B · gzip 20 B |
|
|
214
|
+
| dist/dpuse-shared-componentContext.es.js | 0 B · gzip 20 B |
|
|
215
|
+
| dist/dpuse-shared-componentContextModel.es.js | 0 B · gzip 20 B |
|
|
216
|
+
| dist/dpuse-shared-componentContextModelDimension.es.js | 0 B · gzip 20 B |
|
|
217
|
+
| dist/dpuse-shared-componentContextModelDimensionHierarchy.es.js | 0 B · gzip 20 B |
|
|
218
|
+
| dist/dpuse-shared-componentContextModelEntity.es.js | 0 B · gzip 20 B |
|
|
219
|
+
| dist/dpuse-shared-componentContextModelEntityDataItem.es.js | 0 B · gzip 20 B |
|
|
220
|
+
| dist/dpuse-shared-componentContextModelEntityEvent.es.js | 0 B · gzip 20 B |
|
|
221
|
+
| dist/dpuse-shared-componentContextModelEntityPrimaryMeasure.es.js | 0 B · gzip 20 B |
|
|
222
|
+
| dist/dpuse-shared-componentContextModelSecondaryMeasure.es.js | 0 B · gzip 20 B |
|
|
223
|
+
| dist/dpuse-shared-componentEventQuery.es.js | 0 B · gzip 20 B |
|
|
224
|
+
| dist/dpuse-shared-componentModule.es.js | 0 B · gzip 20 B |
|
|
225
|
+
| dist/dpuse-shared-componentModuleEngine.es.js | 0 B · gzip 20 B |
|
|
226
|
+
| dist/dpuse-shared-componentPresentation.es.js | 0 B · gzip 20 B |
|
|
227
|
+
| dist/dpuse-shared.es.js | 0 B · gzip 20 B |
|
|
228
|
+
|
|
229
|
+
(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.
|
|
254
230
|
|
|
255
231
|
<!-- BUNDLE_END -->
|
|
256
232
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.838",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common constants, types and utilities used across all DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -170,12 +170,13 @@
|
|
|
170
170
|
"valibot": "^1.5.0"
|
|
171
171
|
},
|
|
172
172
|
"devDependencies": {
|
|
173
|
-
"@dpuse/dpuse-development": "^0.3.
|
|
173
|
+
"@dpuse/dpuse-development": "^0.3.740",
|
|
174
174
|
"@dpuse/eslint-config-dpuse": "^1.0.123",
|
|
175
175
|
"@types/node": "^26.6.2",
|
|
176
176
|
"@vitest/coverage-v8": "^5.0.2",
|
|
177
177
|
"eslint": "^10.11.0",
|
|
178
178
|
"fallow": "^3.28.0",
|
|
179
|
+
"fast-check": "^4.10.2",
|
|
179
180
|
"prettier": "^3.9.9",
|
|
180
181
|
"sonda": "^0.14.0",
|
|
181
182
|
"typescript": "^6.0.3",
|