@datapos/datapos-shared 0.3.378 → 0.3.380

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,16 +1,17 @@
1
1
  import { connectorConfigSchema as b } from "./datapos-shared.es.js";
2
- const e = (n) => {
3
- const o = Object.entries(n).filter((t) => typeof t[1] == "string");
2
+ const n = (e) => {
3
+ const o = Object.entries(e).filter((t) => typeof t[1] == "string");
4
4
  return new Map(o);
5
5
  };
6
- e({ "en-gb": "Application" }), e({ "en-gb": "Curated Dataset" }), e({ "en-gb": "Database" }), e({ "en-gb": "File Store" });
7
- async function c(n, o) {
8
- const t = `datapos-tool-${o}`, a = n.toolConfigs.find((s) => s.id === t);
6
+ n({ "en-gb": "Application" }), n({ "en-gb": "Curated Dataset" }), n({ "en-gb": "Database" }), n({ "en-gb": "File Store" });
7
+ async function i(e, o) {
8
+ console.log("loadToolForConnector", e, o);
9
+ const t = `datapos-tool-${o}`, a = e.find((r) => r.id === t);
9
10
  if (!a) throw new Error(`Connector could not load unknown tool '${o}'.`);
10
11
  const l = await import(`https://engine-eu.datapos.app/tools/${o}_v${a.version}/${t}.es.js`);
11
12
  return new l.Tool();
12
13
  }
13
14
  export {
14
15
  b as connectorConfigSchema,
15
- c as loadToolForConnector
16
+ i as loadToolForConnector
16
17
  };
@@ -156,7 +156,7 @@ interface ConnectorCallbackData {
156
156
  properties: Record<string, unknown>;
157
157
  }
158
158
  /** Load tool for connector. */
159
- declare function loadToolForConnector<T>(connector: Connector, toolId: string): Promise<T>;
159
+ declare function loadToolForConnector<T>(toolConfigs: ToolConfig[], toolId: string): Promise<T>;
160
160
  /** Exports. */
161
161
  export type { ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, Encoding, UsageTypeId } from './connection';
162
162
  export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorLocalisedConfig, ConnectorOperationSettings };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.378",
3
+ "version": "0.3.380",
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>",