@datapos/datapos-shared 0.3.415 → 0.3.416
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
async function
|
|
2
|
-
const n = `datapos-tool-${o}`, t = e.find((
|
|
1
|
+
async function a(e, o) {
|
|
2
|
+
const n = `datapos-tool-${o}`, t = e.find((r) => r.id === n);
|
|
3
3
|
if (!t) throw new Error(`Connector could not load unknown tool '${o}'.`);
|
|
4
4
|
const l = await import(`https://engine-eu.datapos.app/tools/${o}_v${t.version}/${n}.es.js`);
|
|
5
5
|
return new l.Tool();
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
a as loadTool
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ import { ToolConfig } from '../tool';
|
|
|
4
4
|
import { ValueDelimiterId } from '../dataView';
|
|
5
5
|
import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
|
|
6
6
|
import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
7
|
-
/** Connector runtime interface. */
|
|
7
|
+
/** Connector runtime interface ans constructor. */
|
|
8
8
|
interface ConnectorInterface extends Component {
|
|
9
9
|
abortController: AbortController | undefined;
|
|
10
10
|
readonly config: ConnectorConfig;
|
|
@@ -25,6 +25,8 @@ interface ConnectorInterface extends Component {
|
|
|
25
25
|
retrieveRecords?(connector: ConnectorInterface, options: RetrieveRecordsOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
26
26
|
upsertRecords?(connector: ConnectorInterface, options: UpsertRecordsOptions): Promise<void>;
|
|
27
27
|
}
|
|
28
|
+
/** Class constructor that builds a ConnectorInterface. */
|
|
29
|
+
type ConnectorConstructor = new (config: ConnectorConfig, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
28
30
|
/** Operation names a connector may support. */
|
|
29
31
|
type ConnectorOperationName = InferOutput<typeof connectorOperationNameSchema>;
|
|
30
32
|
/** Connector data pipeline usage identifiers. */
|
|
@@ -139,4 +141,4 @@ declare const constructConnectorCategoryConfig: (id: string, localeId?: import('
|
|
|
139
141
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
140
142
|
export { constructConnectorCategoryConfig };
|
|
141
143
|
export type { ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, Encoding, UsageTypeId } from './connection';
|
|
142
|
-
export type { ConnectorConfig, ConnectorInterface, ConnectorLocalisedConfig, ConnectorOperationName, ConnectorOperationOptions, ConnectorUsageId, CreateObjectOptions, DropObjectOptions, FindObjectFolderPathOptions, GetReadableStreamOptions, GetRecordResult, GetRecordOptions, ListNodesResult, ListNodesOptions, PreviewObjectResult, PreviewObjectOptions, RemoveRecordsOptions, RetrieveChunksOptions, RetrieveRecordsOptions, RetrieveRecordsSummary, UpsertRecordsOptions };
|
|
144
|
+
export type { ConnectorConfig, ConnectorConstructor, ConnectorInterface, ConnectorLocalisedConfig, ConnectorOperationName, ConnectorOperationOptions, ConnectorUsageId, CreateObjectOptions, DropObjectOptions, FindObjectFolderPathOptions, GetReadableStreamOptions, GetRecordResult, GetRecordOptions, ListNodesResult, ListNodesOptions, PreviewObjectResult, PreviewObjectOptions, RemoveRecordsOptions, RetrieveChunksOptions, RetrieveRecordsOptions, RetrieveRecordsSummary, UpsertRecordsOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.416",
|
|
4
4
|
"description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|