@datapos/datapos-shared 0.3.529 → 0.3.530
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 e
|
|
2
|
-
const n = t.find((
|
|
3
|
-
if (!
|
|
4
|
-
const
|
|
5
|
-
return new
|
|
1
|
+
async function a(e, o) {
|
|
2
|
+
const n = `datapos-tool-${o}`, t = e.find((r) => r.id === n);
|
|
3
|
+
if (!t) throw new Error(`Connector could not load unknown tool '${o}'.`);
|
|
4
|
+
const l = await import(`https://engine-eu.datapos.app/tools/${o}_v${t.version}/${n}.es.js`);
|
|
5
|
+
return new l.Tool();
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
a as loadTool
|
|
9
9
|
};
|
|
@@ -8,6 +8,6 @@ interface ToolConfig extends ModuleConfig {
|
|
|
8
8
|
/**
|
|
9
9
|
* Load tool.
|
|
10
10
|
*/
|
|
11
|
-
declare function loadTool<T>(toolConfigs: ToolConfig[],
|
|
11
|
+
declare function loadTool<T>(toolConfigs: ToolConfig[], toolId: string): Promise<T>;
|
|
12
12
|
export { loadTool };
|
|
13
13
|
export type { ToolConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.530",
|
|
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>",
|