@datapos/datapos-development 0.3.193 → 0.3.213
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 +10 -10
- package/dist/datapos-development.es.js +7738 -7628
- package/dist/types/src/index.d.ts +8 -6
- package/dist/types/src/operations/auditDependencies.d.ts +13 -0
- package/dist/types/src/operations/checkDependencies.d.ts +5 -0
- package/dist/types/src/operations/documentDependencies.d.ts +5 -0
- package/dist/types/src/operations/formatCode.d.ts +5 -0
- package/dist/types/src/operations/lintCode.d.ts +5 -0
- package/dist/types/src/operations/manageArtifact.d.ts +7 -0
- package/dist/types/src/operations/test.d.ts +0 -0
- package/dist/types/src/operations/update.d.ts +0 -0
- package/dist/types/src/utilities.d.ts +14 -0
- package/dist/types/tests/index.test.d.ts +0 -4
- package/package.json +11 -22
- package/dist/types/src/connector.d.ts +0 -55
- package/dist/types/src/schema.d.ts +0 -46
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
* Development operations.
|
|
3
3
|
*/
|
|
4
4
|
declare function buildConfig(): Promise<void>;
|
|
5
|
-
declare function buildPublicDirectoryIndex(id: string): Promise<void>;
|
|
6
5
|
declare function buildConnectorConfig(): Promise<void>;
|
|
7
6
|
declare function buildContextConfig(): Promise<void>;
|
|
8
7
|
declare function buildPresenterConfig(): Promise<void>;
|
|
9
|
-
declare function
|
|
8
|
+
declare function buildPublicDirectoryIndex(id: string): Promise<void>;
|
|
10
9
|
declare function echoScriptNotImplemented(name: string): void;
|
|
11
|
-
declare function insertLicensesIntoReadme(): Promise<void>;
|
|
12
|
-
declare function insertOWASPDependencyCheckBadgeIntoReadme(): Promise<void>;
|
|
13
10
|
declare function sendDeploymentNotice(): Promise<void>;
|
|
14
|
-
declare function syncWithGitHub(): Promise<void>;
|
|
15
11
|
declare function uploadDirectoryToR2(sourceDirectory: string, uploadDirectory: string): Promise<void>;
|
|
16
12
|
declare function uploadModuleConfigToDO(): Promise<void>;
|
|
17
13
|
declare function uploadModuleToR2(uploadDirectoryPath: string): Promise<void>;
|
|
18
|
-
export { buildConfig, buildConnectorConfig, buildContextConfig, buildPresenterConfig, buildPublicDirectoryIndex,
|
|
14
|
+
export { buildConfig, buildConnectorConfig, buildContextConfig, buildPresenterConfig, buildPublicDirectoryIndex, echoScriptNotImplemented, sendDeploymentNotice, uploadDirectoryToR2, uploadModuleConfigToDO, uploadModuleToR2 };
|
|
15
|
+
export { buildArtifact, releaseArtifact, syncArtifactWithGitHub } from './operations/manageArtifact';
|
|
16
|
+
export { auditDependencies } from './operations/auditDependencies';
|
|
17
|
+
export { checkDependencies } from './operations/checkDependencies';
|
|
18
|
+
export { documentDependencies } from './operations/documentDependencies';
|
|
19
|
+
export { formatCode } from './operations/formatCode';
|
|
20
|
+
export { lintCode } from './operations/lintCode';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit dependencies operations
|
|
3
|
+
*/
|
|
4
|
+
export interface SeverityCounts {
|
|
5
|
+
critical: number;
|
|
6
|
+
high: number;
|
|
7
|
+
moderate: number;
|
|
8
|
+
low: number;
|
|
9
|
+
unknown: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const ALLOWED_SEVERITY_KEYS: (keyof SeverityCounts)[];
|
|
12
|
+
declare function auditDependencies(): Promise<void>;
|
|
13
|
+
export { auditDependencies };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manage artifact operation.
|
|
3
|
+
*/
|
|
4
|
+
declare function buildArtifact(): Promise<void>;
|
|
5
|
+
declare function releaseArtifact(): Promise<void>;
|
|
6
|
+
declare function syncArtifactWithGitHub(): Promise<void>;
|
|
7
|
+
export { buildArtifact, releaseArtifact, syncArtifactWithGitHub };
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConnectorOperation, ConnectorUsageId } from '@datapos/datapos-shared';
|
|
2
|
+
declare function extractOperationsFromSource<T>(source: string): T[];
|
|
3
|
+
declare function determineConnectorUsageId(operations: ConnectorOperation[]): ConnectorUsageId;
|
|
4
|
+
declare function execCommand(command_: string, arguments_?: string[], outputFilePath?: string): Promise<void>;
|
|
5
|
+
declare function loadEnvironmentVariables(): Promise<void>;
|
|
6
|
+
declare function logOperationHeader(text: string): void;
|
|
7
|
+
declare function logOperationSuccess(message: string): void;
|
|
8
|
+
declare function logStepHeader(text: string): void;
|
|
9
|
+
declare function readJSONFile<T>(path: string): Promise<T>;
|
|
10
|
+
declare function readTextFile(path: string): Promise<string>;
|
|
11
|
+
declare function spawnCommand(command: string, arguments_?: string[], ignoreErrors?: boolean): Promise<void>;
|
|
12
|
+
declare function writeJSONFile(path: string, data: Record<string, unknown>): Promise<void>;
|
|
13
|
+
declare function writeTextFile(path: string, data: string): Promise<void>;
|
|
14
|
+
export { determineConnectorUsageId, execCommand, extractOperationsFromSource, loadEnvironmentVariables, logOperationHeader, logOperationSuccess, logStepHeader, readJSONFile, readTextFile, spawnCommand, writeJSONFile, writeTextFile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-development",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.213",
|
|
4
4
|
"description": "A library of utilities for managing the Data Positioning repositories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"acorn": "^8.15.0",
|
|
31
31
|
"acorn-typescript": "^1.4.13",
|
|
32
32
|
"acorn-walk": "^8.3.4",
|
|
33
|
+
"dotenv": "^17.2.3",
|
|
33
34
|
"zod": "^4.1.13"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"nanoid": "^5.1.6",
|
|
50
51
|
"npm-check-updates": "^19.1.2",
|
|
51
52
|
"owasp-dependency-check": "^1.0.0",
|
|
52
|
-
"prettier": "^3.7.
|
|
53
|
+
"prettier": "^3.7.3",
|
|
53
54
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
54
55
|
"type-fest": "^5.2.0",
|
|
55
56
|
"typescript": "^5.9.3",
|
|
@@ -58,28 +59,16 @@
|
|
|
58
59
|
"vitest": "^4.0.14"
|
|
59
60
|
},
|
|
60
61
|
"scripts": {
|
|
61
|
-
"audit": "
|
|
62
|
-
"build": "
|
|
63
|
-
"check": "
|
|
64
|
-
"document": "
|
|
65
|
-
"format": "
|
|
66
|
-
"lint": "
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"sync": "npm run _bump:version && npm run _sync:withGitHub",
|
|
62
|
+
"audit": "node -e \"import('./dist/datapos-development.es.js').then(m => m.auditDependencies())\"",
|
|
63
|
+
"build": "node -e \"import('./dist/datapos-development.es.js').then(m => m.buildArtifact())\"",
|
|
64
|
+
"check": "node -e \"import('./dist/datapos-development.es.js').then(m => m.checkDependencies())\"",
|
|
65
|
+
"document": "node -e \"import('./dist/datapos-development.es.js').then(m => m.documentDependencies(['BSD-2-Clause','MIT']))\"",
|
|
66
|
+
"format": "node -e \"import('./dist/datapos-development.es.js').then(m => m.formatCode())\"",
|
|
67
|
+
"lint": "node -e \"import('./dist/datapos-development.es.js').then(m => m.lintCode())\"",
|
|
68
|
+
"release": "node -e \"import('./dist/datapos-development.es.js').then(m => m.releaseArtifact())\"",
|
|
69
|
+
"sync": "node -e \"import('./dist/datapos-development.es.js').then(m => m.syncArtifactWithGitHub())\"",
|
|
70
70
|
"test": "vitest",
|
|
71
71
|
"update:dataPosDeps": "npm run _update:sharedDep",
|
|
72
|
-
"_audit:vulnerabilities": "npm run _audit:owaspDependencyCheck && npm run _audit:owaspBageInsertiions",
|
|
73
|
-
"_audit:owaspDependencyCheck": "set -a && source .env && set +a && owasp-dependency-check --project \"@datapos/datapos-development\" --enableRetired --nvdApiKey \"$NVD_API_KEY\" --nodePackageSkipDevDependencies",
|
|
74
|
-
"_audit:owaspBageInsertiions": "node -e \"import('./dist/datapos-development.es.js').then(m => m.insertOWASPDependencyCheckBadgeIntoReadme())\"",
|
|
75
|
-
"_bump:version": "node -e \"import('./dist/datapos-development.es.js').then(m => m.bumpVersion())\"",
|
|
76
|
-
"_document:licenceReportJSON": "license-report --only=prod,peer --department.value=n/a --licensePeriod=n/a --material=n/a --relatedTo.value=n/a > licenses.json",
|
|
77
|
-
"_document:licenceReportMarkdown": "license-report --config license-report-config.json --only=prod,peer --output=markdown > licenses.md",
|
|
78
|
-
"_document:licenceReportCheck": "license-report-check --source ./licenses.json --allowed 'MIT' --output=table",
|
|
79
|
-
"_document:licenceTree": "license-report-recursive --only=prod,peer --department.value=n/a --licensePeriod=n/a --material=n/a --relatedTo.value=n/a --recurse --output=tree > licenseTree.json",
|
|
80
|
-
"_document:licenceTreeCheck": "license-report-check --source ./licenseTree.json --allowed 'MIT' --output=table",
|
|
81
|
-
"_document:insertLicensesIntoReadme": "node -e \"import('./dist/datapos-development.es.js').then(m => m.insertLicensesIntoReadme())\"",
|
|
82
|
-
"_sync:withGitHub": "node -e \"import('./dist/datapos-development.es.js').then(m => m.syncWithGitHub())\"",
|
|
83
72
|
"_update:sharedDep": "npm install @datapos/datapos-shared@latest"
|
|
84
73
|
},
|
|
85
74
|
"engines": {
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
interface ComponentStatus {
|
|
2
|
-
id: string;
|
|
3
|
-
color: StatusColorId;
|
|
4
|
-
label: string;
|
|
5
|
-
}
|
|
6
|
-
type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
7
|
-
type ComponentTypeId = 'app' | 'connector' | 'connectorConnection' | 'context' | 'contextModelGroup' | 'contextModel' | 'contextModelDimensionGroup' | 'contextModelDimension' | 'contextModelDimensionHierarchy' | 'contextModelEntityGroup' | 'contextModelEntity' | 'contextModelEntityDataItem' | 'contextModelEntityEvent' | 'contextModelEntityPrimaryMeasure' | 'contextModelSecondaryMeasureGroup' | 'contextModelSecondaryMeasure' | 'dataView' | 'dimension' | 'engine' | 'eventQuery' | 'presenter' | 'presenterPresentation' | 'tool';
|
|
8
|
-
type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
|
|
9
|
-
type LocalisedString = Record<LocaleCode, string>;
|
|
10
|
-
type StatusColorId = 'amber' | 'green' | 'red' | 'other';
|
|
11
|
-
interface ComponentConfig {
|
|
12
|
-
id: string;
|
|
13
|
-
label: Record<string, string>;
|
|
14
|
-
description: Record<string, string>;
|
|
15
|
-
firstCreatedAt?: number;
|
|
16
|
-
icon?: string;
|
|
17
|
-
iconDark?: string;
|
|
18
|
-
lastUpdatedAt?: number;
|
|
19
|
-
status?: ComponentStatus;
|
|
20
|
-
statusId: ComponentStatusId;
|
|
21
|
-
typeId: ComponentTypeId;
|
|
22
|
-
}
|
|
23
|
-
interface ModuleConfig extends ComponentConfig {
|
|
24
|
-
typeId: ModuleTypeId;
|
|
25
|
-
version: string;
|
|
26
|
-
}
|
|
27
|
-
type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | 'presenter' | 'tool';
|
|
28
|
-
interface ConnectorCategory {
|
|
29
|
-
id: string;
|
|
30
|
-
label: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ConnectorImplementation {
|
|
33
|
-
activeConnectionCount?: number;
|
|
34
|
-
canDescribe?: boolean;
|
|
35
|
-
id?: string;
|
|
36
|
-
authMethodId: 'apiKey' | 'disabled' | 'oAuth2' | 'none';
|
|
37
|
-
label?: LocalisedString;
|
|
38
|
-
maxConnectionCount?: number;
|
|
39
|
-
params?: Record<string, string>[];
|
|
40
|
-
}
|
|
41
|
-
type ConnectorModuleCategoryId = 'application' | 'curatedDataset' | 'database' | 'fileStore';
|
|
42
|
-
type ConnectorOperation = 'abortOperation' | 'authenticateConnection' | 'createObject' | 'describeConnection' | 'dropObject' | 'findObject' | 'getRecord' | 'listNodes' | 'previewObject' | 'removeRecords' | 'retrieveRecords' | 'upsertRecords';
|
|
43
|
-
type ConnectorUsageId = 'bidirectional' | 'destination' | 'source' | 'unknown';
|
|
44
|
-
export interface ConnectorConfig extends ModuleConfig {
|
|
45
|
-
category?: ConnectorCategory;
|
|
46
|
-
categoryId: ConnectorModuleCategoryId;
|
|
47
|
-
implementations: Record<string, ConnectorImplementation>;
|
|
48
|
-
operations: ConnectorOperation[];
|
|
49
|
-
typeId: 'connector';
|
|
50
|
-
usageId: ConnectorUsageId;
|
|
51
|
-
vendorAccountURL?: string;
|
|
52
|
-
vendorDocumentationURL?: string;
|
|
53
|
-
vendorHomeURL?: string;
|
|
54
|
-
}
|
|
55
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const connectorImplementationSchema: z.ZodObject<{
|
|
3
|
-
activeConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
4
|
-
canDescribe: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
-
id: z.ZodOptional<z.ZodString>;
|
|
6
|
-
authMethodId: z.ZodUnion<readonly [z.ZodLiteral<"apiKey">, z.ZodLiteral<"disabled">, z.ZodLiteral<"oAuth2">, z.ZodLiteral<"none">]>;
|
|
7
|
-
label: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"en-au">, z.ZodLiteral<"en-gb">, z.ZodLiteral<"en-us">, z.ZodLiteral<"es-es">]>, z.ZodString>>;
|
|
8
|
-
maxConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
params: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export declare const connectorConfigSchema: z.ZodObject<{
|
|
12
|
-
id: z.ZodString;
|
|
13
|
-
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
14
|
-
description: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
15
|
-
firstCreatedAt: z.ZodOptional<z.ZodNumber>;
|
|
16
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
17
|
-
iconDark: z.ZodOptional<z.ZodString>;
|
|
18
|
-
lastUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
status: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
20
|
-
id: z.ZodString;
|
|
21
|
-
color: z.ZodUnion<readonly [z.ZodLiteral<"amber">, z.ZodLiteral<"green">, z.ZodLiteral<"red">, z.ZodLiteral<"other">]>;
|
|
22
|
-
label: z.ZodString;
|
|
23
|
-
}, z.core.$strip>>>;
|
|
24
|
-
statusId: z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"beta">, z.ZodLiteral<"generalAvailability">, z.ZodLiteral<"notApplicable">, z.ZodLiteral<"preAlpha">, z.ZodLiteral<"proposed">, z.ZodLiteral<"releaseCandidate">, z.ZodLiteral<"unavailable">, z.ZodLiteral<"underReview">]>;
|
|
25
|
-
version: z.ZodString;
|
|
26
|
-
category: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
id: z.ZodString;
|
|
28
|
-
label: z.ZodString;
|
|
29
|
-
}, z.core.$strip>>;
|
|
30
|
-
categoryId: z.ZodUnion<readonly [z.ZodLiteral<"application">, z.ZodLiteral<"curatedDataset">, z.ZodLiteral<"database">, z.ZodLiteral<"fileStore">]>;
|
|
31
|
-
implementations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
32
|
-
activeConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
33
|
-
canDescribe: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
-
id: z.ZodOptional<z.ZodString>;
|
|
35
|
-
authMethodId: z.ZodUnion<readonly [z.ZodLiteral<"apiKey">, z.ZodLiteral<"disabled">, z.ZodLiteral<"oAuth2">, z.ZodLiteral<"none">]>;
|
|
36
|
-
label: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"en-au">, z.ZodLiteral<"en-gb">, z.ZodLiteral<"en-us">, z.ZodLiteral<"es-es">]>, z.ZodString>>;
|
|
37
|
-
maxConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
38
|
-
params: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
39
|
-
}, z.core.$strip>>;
|
|
40
|
-
operations: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"abortOperation">, z.ZodLiteral<"authenticateConnection">, z.ZodLiteral<"createObject">, z.ZodLiteral<"describeConnection">, z.ZodLiteral<"dropObject">, z.ZodLiteral<"findObject">, z.ZodLiteral<"getRecord">, z.ZodLiteral<"listNodes">, z.ZodLiteral<"previewObject">, z.ZodLiteral<"removeRecords">, z.ZodLiteral<"retrieveRecords">, z.ZodLiteral<"upsertRecords">]>>;
|
|
41
|
-
typeId: z.ZodLiteral<"connector">;
|
|
42
|
-
usageId: z.ZodUnion<readonly [z.ZodLiteral<"bidirectional">, z.ZodLiteral<"destination">, z.ZodLiteral<"source">, z.ZodLiteral<"unknown">]>;
|
|
43
|
-
vendorAccountURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
|
-
vendorDocumentationURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
-
vendorHomeURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
}, z.core.$strip>;
|