@dpuse/dpuse-shared 0.3.849 → 0.3.863
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 +149 -154
- package/dist/componentConfig.schema-DT3mO5rS.js.map +1 -1
- package/dist/dpuse-shared-component.es.js.map +1 -1
- package/dist/dpuse-shared-componentDataView.es.js.map +1 -1
- package/dist/dpuse-shared-componentModuleConnector.es.js +1 -1
- package/dist/dpuse-shared-componentModuleConnector.es.js.map +1 -1
- package/dist/dpuse-shared-componentRecipe.es.js +0 -4
- package/dist/dpuse-shared-encoding.es.js.map +1 -1
- package/dist/dpuse-shared-errors.es.js +1 -1
- package/dist/dpuse-shared-errors.es.js.map +1 -1
- package/dist/dpuse-shared-locale.es.js.map +1 -1
- package/dist/label-DexpXrnC.js.map +1 -1
- package/dist/types/src/component/connection/index.d.ts +5 -4
- package/dist/types/src/component/context/index.d.ts +2 -1
- package/dist/types/src/component/context/model/entity/event/index.d.ts +2 -1
- package/dist/types/src/component/context/model/entity/index.d.ts +2 -1
- package/dist/types/src/component/dataView/index.d.ts +8 -7
- package/dist/types/src/component/index.d.ts +2 -3
- package/dist/types/src/component/module/connector/index.d.ts +1 -11
- package/dist/types/src/component/module/cookbook/index.d.ts +1 -2
- package/dist/types/src/component/module/index.d.ts +1 -2
- package/dist/types/src/component/presentation/index.d.ts +0 -12
- package/dist/types/src/component/recipe/index.d.ts +1 -2
- package/dist/types/src/encoding/index.d.ts +4 -4
- package/dist/types/src/errors/index.d.ts +2 -1
- package/dist/types/src/locale/label.d.ts +2 -1
- package/package.json +9 -16
- package/dist/dpuse-shared-componentRecipe.es.js.map +0 -1
|
@@ -40,13 +40,13 @@ export interface PreviewConfig {
|
|
|
40
40
|
}
|
|
41
41
|
export type DataFormatId = 'dpe' | 'dtv' | 'json' | 'spss' | 'xlsx' | 'xml' | 'unknown';
|
|
42
42
|
export type ParsingRecord = ParsingResult[];
|
|
43
|
-
|
|
43
|
+
interface ParsingResult {
|
|
44
44
|
value: string | null;
|
|
45
45
|
valueWasQuoted: boolean;
|
|
46
46
|
}
|
|
47
47
|
export type RecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
48
48
|
export type ValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
|
|
49
|
-
|
|
49
|
+
type ValueTrimMethodId = 'both' | 'left' | 'right' | 'none';
|
|
50
50
|
export interface ContentAuditConfig {
|
|
51
51
|
asAt: number;
|
|
52
52
|
columns: ObjectColumnConfig[];
|
|
@@ -57,13 +57,13 @@ export interface ContentAuditConfig {
|
|
|
57
57
|
lineCount: number;
|
|
58
58
|
recordCount: number;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
interface RelationshipsAuditConfig {
|
|
61
61
|
placeholder: string;
|
|
62
62
|
}
|
|
63
63
|
export type DataTypeId = 'boolean' | 'numeric' | 'string' | 'temporal' | 'unknown';
|
|
64
64
|
export type DataSubtypeId = NumericSubtypeId | StringSubtypeId | TemporalSubtypeId;
|
|
65
65
|
export type NumericSubtypeId = 'bigint' | 'integer' | 'decimal';
|
|
66
|
-
|
|
66
|
+
type StringSubtypeId = 'email' | 'ipv4' | 'ipv6' | 'ulid' | 'uuid' | 'url' | 'plain';
|
|
67
67
|
export type TemporalSubtypeId = 'date' | 'dateTime' | 'time';
|
|
68
68
|
export interface InferenceSummary {
|
|
69
69
|
columnConfigs: ObjectColumnConfig[];
|
|
@@ -80,7 +80,7 @@ export interface BooleanInferenceResult {
|
|
|
80
80
|
inferredValue: boolean;
|
|
81
81
|
}
|
|
82
82
|
export type NumericInferenceResult = BigIntInferenceResult | NumberInferenceResult;
|
|
83
|
-
|
|
83
|
+
interface BigIntInferenceResult {
|
|
84
84
|
dataTypeId: 'numeric';
|
|
85
85
|
dataSubtypeId: 'bigint';
|
|
86
86
|
format: string;
|
|
@@ -92,7 +92,7 @@ export interface BigIntInferenceResult {
|
|
|
92
92
|
signId: NumericSignId;
|
|
93
93
|
unitsId: NumericUnitsId;
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
interface NumberInferenceResult {
|
|
96
96
|
dataTypeId: 'numeric';
|
|
97
97
|
dataSubtypeId: 'integer' | 'decimal';
|
|
98
98
|
format: string;
|
|
@@ -122,7 +122,7 @@ export interface TemporalInferenceResult {
|
|
|
122
122
|
inputValueWasQuoted: boolean;
|
|
123
123
|
inferredValue: Date;
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
interface UnknownInferenceResult {
|
|
126
126
|
dataTypeId: 'unknown';
|
|
127
127
|
dataSubtypeId: undefined;
|
|
128
128
|
inputValue: string | null;
|
|
@@ -130,3 +130,4 @@ export interface UnknownInferenceResult {
|
|
|
130
130
|
inferredValue: null;
|
|
131
131
|
}
|
|
132
132
|
export declare const ORDERED_VALUE_DELIMITER_IDS: ValueDelimiterId[];
|
|
133
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InferOutput, strictObject } from 'valibot';
|
|
2
|
-
import { componentBaseConfigSchema, componentInstanceConfigSchema, componentReferenceConfigSchema,
|
|
2
|
+
import { componentBaseConfigSchema, componentInstanceConfigSchema, componentReferenceConfigSchema, componentStatusConfigSchema } from './componentConfig.schema';
|
|
3
3
|
import { LocaleId } from '../locale/label';
|
|
4
4
|
export { componentInstanceConfigSchema } from './componentConfig.schema';
|
|
5
5
|
export interface Component {
|
|
@@ -8,6 +8,5 @@ export interface Component {
|
|
|
8
8
|
export type ComponentBaseConfig = InferOutput<ReturnType<typeof strictObject<typeof componentBaseConfigSchema>>>;
|
|
9
9
|
export type ComponentInstanceConfig = InferOutput<typeof componentInstanceConfigSchema>;
|
|
10
10
|
export type ComponentReferenceConfig = InferOutput<typeof componentReferenceConfigSchema>;
|
|
11
|
-
|
|
12
|
-
export type ComponentStatusColorId = InferOutput<typeof componentStatusColorIdSchema>;
|
|
11
|
+
type ComponentStatus = InferOutput<typeof componentStatusConfigSchema>;
|
|
13
12
|
export declare function getComponentStatus(id: string, localeId?: LocaleId): ComponentStatus;
|
|
@@ -4,7 +4,7 @@ import { EngineConnectorActionOptions } from '../engine';
|
|
|
4
4
|
import { ToolConfig } from '../tool';
|
|
5
5
|
import { ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
6
6
|
import { connectorActionNameSchema, connectorCategoryConfigSchema, connectorConfigSchema, connectorUsageConfigSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
7
|
-
import {
|
|
7
|
+
import { InferenceRecord, InferenceSummary, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../../dataView';
|
|
8
8
|
import { LocalisedConfig } from '../../../locale';
|
|
9
9
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
10
10
|
export interface ConnectorInterface extends Component {
|
|
@@ -37,15 +37,6 @@ export interface ConnectorUtilities {
|
|
|
37
37
|
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
38
38
|
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
39
39
|
type ConnectorUsageConfig = InferOutput<typeof connectorUsageConfigSchema>;
|
|
40
|
-
export interface AuditObjectContentOptions1 extends EngineConnectorActionOptions {
|
|
41
|
-
chunkSize: number | undefined;
|
|
42
|
-
encodingId: string;
|
|
43
|
-
path: string;
|
|
44
|
-
valueDelimiterId: ValueDelimiterId;
|
|
45
|
-
}
|
|
46
|
-
export interface AuditObjectContentResult1 {
|
|
47
|
-
contentAuditConfig: ContentAuditConfig;
|
|
48
|
-
}
|
|
49
40
|
export interface AuditObjectContentOptions extends EngineConnectorActionOptions {
|
|
50
41
|
chunkSize: number | undefined;
|
|
51
42
|
encodingId: string;
|
|
@@ -139,7 +130,6 @@ export interface UpsertRecordsOptions extends EngineConnectorActionOptions {
|
|
|
139
130
|
records: Record<string, unknown>[];
|
|
140
131
|
path: string;
|
|
141
132
|
}
|
|
142
|
-
export declare const CONNECTOR_ACTION_NAME_MAP: Record<ConnectorActionName, string>;
|
|
143
133
|
export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
144
134
|
export declare function determineConnectorUsageId(actionNames: ConnectorActionName[]): ConnectorUsageId;
|
|
145
135
|
export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorCategoryConfig>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { Component, ComponentReferenceConfig } from '../..';
|
|
3
|
-
import {
|
|
3
|
+
import { cookbookConfigSchema } from './cookbookConfig.schema';
|
|
4
4
|
export { cookbookConfigSchema } from './cookbookConfig.schema';
|
|
5
5
|
export interface CookbookInterface extends Component {
|
|
6
6
|
readonly config: CookbookConfig;
|
|
7
7
|
list(): ComponentReferenceConfig[];
|
|
8
8
|
}
|
|
9
|
-
export type CookbookActionName = InferOutput<typeof cookbookActionNameSchema>;
|
|
10
9
|
export type CookbookConfig = InferOutput<typeof cookbookConfigSchema>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
|
-
import { moduleConfigSchema
|
|
2
|
+
import { moduleConfigSchema } from './moduleConfig.schema';
|
|
3
3
|
export type ModuleConfig = InferOutput<typeof moduleConfigSchema>;
|
|
4
|
-
export type ModuleTypeId = InferOutput<typeof moduleTypeIdSchema>;
|
|
@@ -43,9 +43,6 @@ export interface PresentationVisualCartesianChartViewConfig extends Presentation
|
|
|
43
43
|
typeId: PresentationCartesianTypeId;
|
|
44
44
|
}
|
|
45
45
|
export type PresentationCartesianTypeId = 'areaLine' | 'areaSpline' | 'bar' | 'column' | 'line' | 'spline';
|
|
46
|
-
export interface PresentationVisualChordDiagramViewConfig extends PresentationVisualViewConfig {
|
|
47
|
-
categoryId: 'chordDiagram';
|
|
48
|
-
}
|
|
49
46
|
export interface PresentationVisualPeriodFlowBoundariesChartViewConfig extends PresentationVisualViewConfig {
|
|
50
47
|
categoryId: 'periodFlowBoundariesChart';
|
|
51
48
|
}
|
|
@@ -59,15 +56,6 @@ export interface PresentationVisualRangeChartViewConfig extends PresentationVisu
|
|
|
59
56
|
typeId: PresentationRangeTypeId;
|
|
60
57
|
}
|
|
61
58
|
export type PresentationRangeTypeId = 'areaLine' | 'areaSpline' | 'bar' | 'column';
|
|
62
|
-
export interface PresentationVisualSankeyDiagramViewConfig extends PresentationVisualViewConfig {
|
|
63
|
-
categoryId: 'sankeyDiagram';
|
|
64
|
-
}
|
|
65
|
-
export interface PresentationVisualStreamGraphViewConfig extends PresentationVisualViewConfig {
|
|
66
|
-
categoryId: 'streamGraph';
|
|
67
|
-
}
|
|
68
|
-
export interface PresentationVisualValueTableViewConfig extends PresentationVisualViewConfig {
|
|
69
|
-
categoryId: 'valueTable';
|
|
70
|
-
}
|
|
71
59
|
export interface PresentationView {
|
|
72
60
|
resize: () => void;
|
|
73
61
|
vendorId: string;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { PLACEHOLDER };
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LocaleId, LocaleLabel } from '../locale/label';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
type EncodingGroupId = keyof typeof ENCODING_GROUP_CONFIG_DATA;
|
|
3
|
+
type EncodingTypeId = keyof typeof ENCODING_TYPE_CONFIG_DATA;
|
|
4
|
+
interface EncodingGroupConfig {
|
|
5
5
|
id: EncodingGroupId;
|
|
6
6
|
label: LocaleLabel;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface EncodingTypeConfig {
|
|
9
9
|
id: EncodingTypeId;
|
|
10
10
|
groupId: EncodingGroupId | null;
|
|
11
11
|
isDetectable: boolean;
|
|
@@ -5,7 +5,7 @@ export interface SerialisedError {
|
|
|
5
5
|
name: string;
|
|
6
6
|
stack: string | undefined;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
declare class DPUseError extends Error {
|
|
9
9
|
readonly data: Record<string, unknown> | undefined;
|
|
10
10
|
readonly locator: string;
|
|
11
11
|
constructor(message: string, locator: string, data?: Record<string, unknown>, options?: ErrorOptions);
|
|
@@ -35,3 +35,4 @@ export declare function ignoreErrors(action: () => void): void;
|
|
|
35
35
|
export declare function normalizeToError(value: unknown): Error;
|
|
36
36
|
export declare function serialiseError(error?: unknown): SerialisedError[];
|
|
37
37
|
export declare function unserialiseError(serialisedErrors: SerialisedError[]): Error;
|
|
38
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type FlagId = 'es' | 'gb';
|
|
2
2
|
export type LocaleId = 'en' | 'es';
|
|
3
3
|
export type LocaleLabel = Partial<Record<LocaleId, string>>;
|
|
4
4
|
export type LocaleDescription = Partial<Record<LocaleId, string>>;
|
|
@@ -11,3 +11,4 @@ export declare const SUPPORTED_LANGUAGES: {
|
|
|
11
11
|
}[];
|
|
12
12
|
export declare function createLabelMap(labels: Record<string, string>): LocaleLabelMap;
|
|
13
13
|
export declare function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: LocaleId): string | undefined;
|
|
14
|
+
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.863",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common constants, types and utilities used across all DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -149,33 +149,26 @@
|
|
|
149
149
|
},
|
|
150
150
|
"scripts": {
|
|
151
151
|
"audit": "node -e \"import('@dpuse/dpuse-development').then(m => m.auditDependencies())\"",
|
|
152
|
-
"build": "node -e \"import('@dpuse/dpuse-development').then(m => m.buildProject())\"
|
|
153
|
-
"check": "node -e \"import('@dpuse/dpuse-development').then(m => m.
|
|
154
|
-
"document": "
|
|
155
|
-
"documentBundleSizes": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentBundleSizes())\"",
|
|
156
|
-
"documentDependencies": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentDependencies('Apache-2.0;BSD-3-Clause;MIT'))\"",
|
|
157
|
-
"documentGovernance": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentGovernance())\"",
|
|
158
|
-
"documentOpening": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentOpening())\"",
|
|
159
|
-
"documentUsage": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentUsage())\"",
|
|
152
|
+
"build": "node -e \"import('@dpuse/dpuse-development').then(m => m.buildProject())\"",
|
|
153
|
+
"check": "node -e \"import('@dpuse/dpuse-development').then(m => m.checkProject())\"",
|
|
154
|
+
"document": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentProject({ allowedLicenses: 'BSD-3-Clause;MIT' }))\"",
|
|
160
155
|
"format": "node -e \"import('@dpuse/dpuse-development').then(m => m.formatCode())\"",
|
|
161
|
-
"health": "npm run test:coverage && fallow --coverage coverage/coverage-final.json",
|
|
162
156
|
"lint": "node -e \"import('@dpuse/dpuse-development').then(m => m.lintCode())\"",
|
|
163
|
-
"release": "npm run sync && gh release create \"v$(npm pkg get version | tr -d '\"')\" --target \"$(git rev-parse HEAD)\" --generate-notes --latest",
|
|
157
|
+
"release": "npm run build && npm run document && npm run sync && gh release create \"v$(npm pkg get version | tr -d '\"')\" --target \"$(git rev-parse HEAD)\" --generate-notes --latest",
|
|
164
158
|
"sync": "node -e \"import('@dpuse/dpuse-development').then(m => m.syncProjectWithGitHub())\"",
|
|
165
|
-
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
|
|
166
|
-
"test:coverage": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject(['unit'], true))\""
|
|
159
|
+
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
|
|
167
160
|
},
|
|
168
161
|
"dependencies": {
|
|
169
162
|
"file-type": "^22.1.1",
|
|
170
163
|
"valibot": "^1.5.0"
|
|
171
164
|
},
|
|
172
165
|
"devDependencies": {
|
|
173
|
-
"@dpuse/dpuse-development": "^0.3.
|
|
166
|
+
"@dpuse/dpuse-development": "^0.3.788",
|
|
174
167
|
"@dpuse/eslint-config-dpuse": "^1.0.123",
|
|
175
168
|
"@types/node": "^26.6.3",
|
|
176
169
|
"@vitest/coverage-v8": "^5.0.2",
|
|
177
170
|
"eslint": "^10.11.0",
|
|
178
|
-
"fallow": "^3.
|
|
171
|
+
"fallow": "^3.30.0",
|
|
179
172
|
"fast-check": "^4.10.2",
|
|
180
173
|
"prettier": "^3.9.9",
|
|
181
174
|
"sonda": "^0.14.0",
|
|
@@ -184,4 +177,4 @@
|
|
|
184
177
|
"vite-plugin-dts": "^5.1.1",
|
|
185
178
|
"vitest": "^5.0.2"
|
|
186
179
|
}
|
|
187
|
-
}
|
|
180
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dpuse-shared-componentRecipe.es.js","names":[],"sources":["../src/component/recipe/index.ts"],"sourcesContent":["const PLACEHOLDER = '';\nexport { PLACEHOLDER };\n"],"mappings":";AAAA,IAAM,IAAc"}
|