@dpuse/dpuse-shared 0.3.706 → 0.3.707

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.
Files changed (2) hide show
  1. package/README.md +97 -92
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -69,171 +69,176 @@ Implements the common Data Positioning repository management command set. For mo
69
69
 
70
70
  ![Schematic](./schematic.svg)
71
71
 
72
- ### Cross-cutting Concerns
72
+ ### Encoding
73
73
 
74
- The following are shared across all modules and are not part of the domain model:
74
+ 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. |
75
75
 
76
- | Concern | Description |
77
- | --------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
78
- | 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. |
79
- | 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. |
80
- | 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. |
81
- | 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. |
76
+ ### Errors
77
+
78
+ 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. |
79
+
80
+ ### Locale
81
+
82
+ 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. |
83
+
84
+ ### Utilities
85
+
86
+ 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. |
82
87
 
83
88
  ## API Reference
84
89
 
85
90
  ### `@dpuse/dpuse-shared/component`
86
91
 
87
- | Category | Exports |
88
- | -------- | ------- |
89
- | Schema | `componentConfigSchema` |
90
- | Types | `Component`, `ComponentConfig`, `ComponentReference`, `ComponentStatus`, `ComponentStatusColorId` |
91
- | Functions | `getComponentStatus(id, localeId?)` |
92
+ | Category | Exports |
93
+ | -------- | ------------------------------------------------------------------------------------------------- |
94
+ | Schema | `componentConfigSchema` |
95
+ | Types | `Component`, `ComponentConfig`, `ComponentReference`, `ComponentStatus`, `ComponentStatusColorId` |
96
+ | Actions | `getComponentStatus(id, localeId?)` |
92
97
 
93
98
  ### `@dpuse/dpuse-shared/component/connection`
94
99
 
95
- | Category | Exports |
96
- | -------- | ------- |
97
- | Types | `ConnectionConfig`, `ConnectionAuthorisationConfig`, `ConnectionDescriptionConfig`, `ConnectionNodeConfig`, `DPAFileSystemFileHandle`, `NodeTypeId`, `ObjectColumnConfig`, `StorageTypeId` |
100
+ | Category | Exports |
101
+ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
102
+ | Types | `ConnectionConfig`, `ConnectionAuthorisationConfig`, `ConnectionDescriptionConfig`, `ConnectionNodeConfig`, `DPAFileSystemFileHandle`, `NodeTypeId`, `ObjectColumnConfig`, `StorageTypeId` |
98
103
 
99
104
  ### `@dpuse/dpuse-shared/component/dataView`
100
105
 
101
- | Category | Exports |
102
- | -------- | ------- |
103
- | Constants | `ORDERED_VALUE_DELIMITER_IDS` |
104
- | Types | `DataViewConfig`, `DataViewInterface`, `PreviewConfig`, `ContentAuditConfig`, `RelationshipsAuditConfig`, `DataFormatId`, `RecordDelimiterId`, `ValueDelimiterId`, `ParsingRecord`, `ParsingResult`, `DataTypeId`, `DataSubtypeId`, `NumericSubtypeId`, `NumericSignId`, `NumericUnitsId`, `StringSubtypeId`, `TemporalSubtypeId`, `InferenceSummary`, `InferenceRecord`, `InferenceResult`, `BooleanInferenceResult`, `NumericInferenceResult`, `BigIntInferenceResult`, `NumberInferenceResult`, `StringInferenceResult`, `TemporalInferenceResult`, `UnknownInferenceResult` |
106
+ | Category | Exports |
107
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
108
+ | Constants | `ORDERED_VALUE_DELIMITER_IDS` |
109
+ | Types | `DataViewConfig`, `DataViewInterface`, `PreviewConfig`, `ContentAuditConfig`, `RelationshipsAuditConfig`, `DataFormatId`, `RecordDelimiterId`, `ValueDelimiterId`, `ParsingRecord`, `ParsingResult`, `DataTypeId`, `DataSubtypeId`, `NumericSubtypeId`, `NumericSignId`, `NumericUnitsId`, `StringSubtypeId`, `TemporalSubtypeId`, `InferenceSummary`, `InferenceRecord`, `InferenceResult`, `BooleanInferenceResult`, `NumericInferenceResult`, `BigIntInferenceResult`, `NumberInferenceResult`, `StringInferenceResult`, `TemporalInferenceResult`, `UnknownInferenceResult` |
105
110
 
106
111
  ### `@dpuse/dpuse-shared/component/dimension`
107
112
 
108
- | Category | Exports |
109
- | -------- | ------- |
110
- | Types | `DimensionConfig` |
113
+ | Category | Exports |
114
+ | -------- | ----------------- |
115
+ | Types | `DimensionConfig` |
111
116
 
112
117
  ### `@dpuse/dpuse-shared/component/eventQuery`
113
118
 
114
- | Category | Exports |
115
- | -------- | ------- |
116
- | Types | `EventQueryConfig` |
119
+ | Category | Exports |
120
+ | -------- | ------------------ |
121
+ | Types | `EventQueryConfig` |
117
122
 
118
123
  ### `@dpuse/dpuse-shared/component/module`
119
124
 
120
- | Category | Exports |
121
- | -------- | ------- |
122
- | Types | `ModuleConfig`, `ModuleTypeId` |
125
+ | Category | Exports |
126
+ | -------- | ------------------------------ |
127
+ | Types | `ModuleConfig`, `ModuleTypeId` |
123
128
 
124
129
  ### `@dpuse/dpuse-shared/component/module/connector`
125
130
 
126
- | Category | Exports |
127
- | -------- | ------- |
128
- | Schema | `connectorConfigSchema` |
129
- | Constants | `CONNECTOR_ACTION_NAME_MAP` |
130
- | Types | `ConnectorInterface`, `ConnectorActionName`, `ConnectorConstructor`, `ConnectorUtilities`, `ConnectorConfig`, `AuditObjectContentOptions`, `AuditObjectContentOptions1`, `AuditObjectContentResult`, `AuditObjectContentResult1`, `CreateObjectOptions`, `DescribeConnectionOptions`, `DropObjectOptions`, `FindObjectOptions`, `FindObjectResult`, `GetReadableStreamOptions`, `GetRecordOptions`, `GetRecordResult`, `ListNodesOptions`, `ListNodesResult`, `PreviewObjectOptions`, `RecordRetrievalTypeId`, `RemoveRecordsOptions`, `RetrieveChunksOptions`, `RetrieveRecordsOptions`, `RetrieveRecordsSummary`, `UpsertRecordsOptions` |
131
- | Functions | `constructConnectorCategoryConfig(id, localeId?)`, `getConnectorActionsTable(supported)` |
131
+ | Category | Exports |
132
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
133
+ | Schema | `connectorConfigSchema` |
134
+ | Constants | `CONNECTOR_ACTION_NAME_MAP` |
135
+ | Types | `ConnectorInterface`, `ConnectorActionName`, `ConnectorConstructor`, `ConnectorUtilities`, `ConnectorConfig`, `AuditObjectContentOptions`, `AuditObjectContentOptions1`, `AuditObjectContentResult`, `AuditObjectContentResult1`, `CreateObjectOptions`, `DescribeConnectionOptions`, `DropObjectOptions`, `FindObjectOptions`, `FindObjectResult`, `GetReadableStreamOptions`, `GetRecordOptions`, `GetRecordResult`, `ListNodesOptions`, `ListNodesResult`, `PreviewObjectOptions`, `RecordRetrievalTypeId`, `RemoveRecordsOptions`, `RetrieveChunksOptions`, `RetrieveRecordsOptions`, `RetrieveRecordsSummary`, `UpsertRecordsOptions` |
136
+ | Actions | `constructConnectorCategoryConfig(id, localeId?)`, `getConnectorActionsTable(supported)` |
132
137
 
133
138
  ### `@dpuse/dpuse-shared/component/module/context`
134
139
 
135
- | Category | Exports |
136
- | -------- | ------- |
137
- | Schema | `contextConfigSchema` |
138
- | Types | `ContextInterface`, `ContextConfig`, `ContextActionName`, `ContextModelGroupConfig`, `ListContextOptions`, `ListContextResult` |
140
+ | Category | Exports |
141
+ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
142
+ | Schema | `contextConfigSchema` |
143
+ | Types | `ContextInterface`, `ContextConfig`, `ContextActionName`, `ContextModelGroupConfig`, `ListContextOptions`, `ListContextResult` |
139
144
 
140
145
  ### `@dpuse/dpuse-shared/component/module/context/model`
141
146
 
142
- | Category | Exports |
143
- | -------- | ------- |
144
- | Types | `ContextModelConfig`, `ContextModelDimensionGroupConfig`, `ContextModelEntityGroupConfig`, `ContextModelSecondaryMeasureGroupConfig` |
147
+ | Category | Exports |
148
+ | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
149
+ | Types | `ContextModelConfig`, `ContextModelDimensionGroupConfig`, `ContextModelEntityGroupConfig`, `ContextModelSecondaryMeasureGroupConfig` |
145
150
 
146
151
  ### `@dpuse/dpuse-shared/component/module/context/model/dimension`
147
152
 
148
- | Category | Exports |
149
- | -------- | ------- |
150
- | Types | `ContextModelDimensionConfig`, `ContextModelDimensionHierarchyConfig` |
153
+ | Category | Exports |
154
+ | -------- | --------------------------------------------------------------------- |
155
+ | Types | `ContextModelDimensionConfig`, `ContextModelDimensionHierarchyConfig` |
151
156
 
152
157
  ### `@dpuse/dpuse-shared/component/module/context/model/entity`
153
158
 
154
- | Category | Exports |
155
- | -------- | ------- |
156
- | Types | `ContextModelEntityConfig` |
159
+ | Category | Exports |
160
+ | -------- | -------------------------- |
161
+ | Types | `ContextModelEntityConfig` |
157
162
 
158
163
  ### `@dpuse/dpuse-shared/component/module/context/model/entity/dataItem`
159
164
 
160
- | Category | Exports |
161
- | -------- | ------- |
162
- | Types | `ContextModelEntityDataItemConfig` |
165
+ | Category | Exports |
166
+ | -------- | ---------------------------------- |
167
+ | Types | `ContextModelEntityDataItemConfig` |
163
168
 
164
169
  ### `@dpuse/dpuse-shared/component/module/context/model/entity/event`
165
170
 
166
- | Category | Exports |
167
- | -------- | ------- |
168
- | Types | `ContextModelEntityEventConfig` |
171
+ | Category | Exports |
172
+ | -------- | ------------------------------- |
173
+ | Types | `ContextModelEntityEventConfig` |
169
174
 
170
175
  ### `@dpuse/dpuse-shared/component/module/context/model/entity/primaryMeasure`
171
176
 
172
- | Category | Exports |
173
- | -------- | ------- |
174
- | Types | `ContextModelEntityPrimaryMeasureConfig` |
177
+ | Category | Exports |
178
+ | -------- | ---------------------------------------- |
179
+ | Types | `ContextModelEntityPrimaryMeasureConfig` |
175
180
 
176
181
  ### `@dpuse/dpuse-shared/component/module/context/model/secondaryMeasure`
177
182
 
178
- | Category | Exports |
179
- | -------- | ------- |
180
- | Types | `ContextModelSecondaryMeasureConfig` |
183
+ | Category | Exports |
184
+ | -------- | ------------------------------------ |
185
+ | Types | `ContextModelSecondaryMeasureConfig` |
181
186
 
182
187
  ### `@dpuse/dpuse-shared/component/module/engine`
183
188
 
184
- | Category | Exports |
185
- | -------- | ------- |
186
- | Types | `EngineConfig`, `EngineRuntime`, `EngineWorker`, `EngineInitialiseOptions`, `EngineAuthActionOptions`, `EngineConnectorActionOptions`, `EngineContextActionOptions`, `EngineCallbackData` |
189
+ | Category | Exports |
190
+ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
191
+ | Types | `EngineConfig`, `EngineRuntime`, `EngineWorker`, `EngineInitialiseOptions`, `EngineAuthActionOptions`, `EngineConnectorActionOptions`, `EngineContextActionOptions`, `EngineCallbackData` |
187
192
 
188
193
  ### `@dpuse/dpuse-shared/component/module/presenter`
189
194
 
190
- | Category | Exports |
191
- | -------- | ------- |
192
- | Schema | `presenterConfigSchema` |
193
- | Types | `PresenterInterface`, `PresenterActionName`, `PresenterConfig` |
195
+ | Category | Exports |
196
+ | -------- | -------------------------------------------------------------- |
197
+ | Schema | `presenterConfigSchema` |
198
+ | Types | `PresenterInterface`, `PresenterActionName`, `PresenterConfig` |
194
199
 
195
200
  ### `@dpuse/dpuse-shared/component/module/presenter/presentation`
196
201
 
197
- | Category | Exports |
198
- | -------- | ------- |
199
- | Types | `PresentationConfig`, `PresentationVisualConfig`, `PresentationVisualContentConfig`, `PresentationVisualViewConfig`, `PresentationCategoryId`, `PresentationView`, `PresentationVisualCartesianChartViewConfig`, `PresentationCartesianTypeId`, `PresentationVisualChordDiagramViewConfig`, `PresentationVisualPeriodFlowBoundariesChartViewConfig`, `PresentationVisualPolarChartViewConfig`, `PresentationPolarTypeId`, `PresentationVisualRangeChartViewConfig`, `PresentationRangeTypeId`, `PresentationVisualSankeyDiagramViewConfig`, `PresentationVisualStreamGraphViewConfig`, `PresentationVisualValueTableViewConfig` |
202
+ | Category | Exports |
203
+ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
204
+ | Types | `PresentationConfig`, `PresentationVisualConfig`, `PresentationVisualContentConfig`, `PresentationVisualViewConfig`, `PresentationCategoryId`, `PresentationView`, `PresentationVisualCartesianChartViewConfig`, `PresentationCartesianTypeId`, `PresentationVisualChordDiagramViewConfig`, `PresentationVisualPeriodFlowBoundariesChartViewConfig`, `PresentationVisualPolarChartViewConfig`, `PresentationPolarTypeId`, `PresentationVisualRangeChartViewConfig`, `PresentationRangeTypeId`, `PresentationVisualSankeyDiagramViewConfig`, `PresentationVisualStreamGraphViewConfig`, `PresentationVisualValueTableViewConfig` |
200
205
 
201
206
  ### `@dpuse/dpuse-shared/component/module/tool`
202
207
 
203
- | Category | Exports |
204
- | -------- | ------- |
205
- | Types | `ToolConfig` |
206
- | Functions | `loadTool<T>(toolConfigs, toolId)` |
208
+ | Category | Exports |
209
+ | -------- | ---------------------------------- |
210
+ | Types | `ToolConfig` |
211
+ | Actions | `loadTool<T>(toolConfigs, toolId)` |
207
212
 
208
213
  ### `@dpuse/dpuse-shared/encoding`
209
214
 
210
- | Category | Exports |
211
- | -------- | ------- |
212
- | Constants | `encodingConfigMap` |
213
- | Types | `EncodingConfig`, `EncodingTypeConfig` |
214
- | Functions | `getEncodingTypeConfigs(localeId?)` |
215
+ | Category | Exports |
216
+ | --------- | -------------------------------------- |
217
+ | Constants | `encodingConfigMap` |
218
+ | Types | `EncodingConfig`, `EncodingTypeConfig` |
219
+ | Actions | `getEncodingTypeConfigs(localeId?)` |
215
220
 
216
221
  ### `@dpuse/dpuse-shared/errors`
217
222
 
218
- | Category | Exports |
219
- | -------- | ------- |
220
- | Types | `SerialisedError` |
221
- | Classes | `DPUseError`, `AppError`, `APIError`, `EngineError`, `ConnectorError`, `FetchError` |
222
- | Functions | `serialiseError(error?)`, `unserialiseError(serialisedErrors)`, `buildFetchError(response, message, locator)`, `normalizeToError(value)`, `concatenateSerialisedErrorMessages(serialisedErrors)`, `ignoreErrors(action)` |
223
+ | Category | Exports |
224
+ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
225
+ | Types | `SerialisedError` |
226
+ | Classes | `DPUseError`, `AppError`, `APIError`, `EngineError`, `ConnectorError`, `FetchError` |
227
+ | Actions | `serialiseError(error?)`, `unserialiseError(serialisedErrors)`, `buildFetchError(response, message, locator)`, `normalizeToError(value)`, `concatenateSerialisedErrorMessages(serialisedErrors)`, `ignoreErrors(action)` |
223
228
 
224
229
  ### `@dpuse/dpuse-shared/locale`
225
230
 
226
- | Category | Exports |
227
- | -------- | ------- |
228
- | Constants | `DEFAULT_LOCALE_ID`, `SUPPORTED_LANGUAGES` |
229
- | Types | `FlagId`, `LocaleId`, `LocaleLabel`, `LocaleDescription`, `LocaleLabelMap`, `LocalisedConfig<T>` |
230
- | Functions | `createLabelMap(labels)`, `localiseConfig(config, localeId)`, `localiseConfigs(configs, localeId, isResultSorted?)`, `resolveLabel(labels, localeId, fallbackLocaleId?)` |
231
+ | Category | Exports |
232
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
233
+ | Constants | `DEFAULT_LOCALE_ID`, `SUPPORTED_LANGUAGES` |
234
+ | Types | `FlagId`, `LocaleId`, `LocaleLabel`, `LocaleDescription`, `LocaleLabelMap`, `LocalisedConfig<T>` |
235
+ | Actions | `createLabelMap(labels)`, `localiseConfig(config, localeId)`, `localiseConfigs(configs, localeId, isResultSorted?)`, `resolveLabel(labels, localeId, fallbackLocaleId?)` |
231
236
 
232
237
  ### `@dpuse/dpuse-shared/utilities`
233
238
 
234
- | Category | Exports |
235
- | -------- | ------- |
236
- | Functions | `convertODataTypeIdToUsageTypeId(oDataTypeId)`, `extractNameFromPath(itemPath)`, `extractExtensionFromPath(itemPath)`, `formatNumberAsDecimalNumber(number?, decimalPlaces?, minimumFractionDigits?, locale?)`, `formatNumberAsSize(number?, decimalPlaces?)`, `formatNumberAsStorageSize(number?, decimalPlaces?)`, `formatNumberAsDuration(number?, stopAt?)`, `formatNumberAsWholeNumber(number?, locale?)`, `lookupMimeTypeForExtension(extension?)` |
239
+ | Category | Exports |
240
+ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
241
+ | Actions | `convertODataTypeIdToUsageTypeId(oDataTypeId)`, `extractNameFromPath(itemPath)`, `extractExtensionFromPath(itemPath)`, `formatNumberAsDecimalNumber(number?, decimalPlaces?, minimumFractionDigits?, locale?)`, `formatNumberAsSize(number?, decimalPlaces?)`, `formatNumberAsStorageSize(number?, decimalPlaces?)`, `formatNumberAsDuration(number?, stopAt?)`, `formatNumberAsWholeNumber(number?, locale?)`, `lookupMimeTypeForExtension(extension?)` |
237
242
 
238
243
  ## Dependency Licenses
239
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-shared",
3
- "version": "0.3.706",
3
+ "version": "0.3.707",
4
4
  "private": false,
5
5
  "description": "Common constants, types and utilities used across all DPUse projects.",
6
6
  "license": "MIT",
@@ -135,11 +135,11 @@
135
135
  "test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
136
136
  },
137
137
  "devDependencies": {
138
- "@dpuse/dpuse-development": "^0.3.564",
138
+ "@dpuse/dpuse-development": "^0.3.582",
139
139
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
140
140
  "@types/eslint-plugin-security": "^3.0.1",
141
141
  "@types/node": "^26.0.1",
142
- "eslint": "^10.5.0",
142
+ "eslint": "^10.6.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",
@@ -151,7 +151,7 @@
151
151
  "jiti": "^2.7.0",
152
152
  "license-checker-rseidelsohn": "^5.0.1",
153
153
  "npm-check-updates": "^22.2.7",
154
- "prettier": "^3.8.4",
154
+ "prettier": "^3.9.0",
155
155
  "rollup-plugin-visualizer": "^7.0.1",
156
156
  "sonda": "^0.13.1",
157
157
  "type-fest": "^5.7.0",