@kemu-io/edge-runtime 1.3.1 → 1.5.0
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/package.json +3 -3
- package/runner.d.ts +13 -3
- package/runner.js +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kemu-io/edge-runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"description": "Kemu Edge runtime for running Kemu recipes",
|
|
6
6
|
"author": "Kemu Pty Ltd",
|
|
7
7
|
"main": "runner.js",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"dotenv": "^16.4.5",
|
|
27
27
|
"emittery": "^1.0.3",
|
|
28
28
|
"minimist": "^1.2.8",
|
|
29
|
+
"zod": "^4.1.11",
|
|
29
30
|
"node-ipc": "10.1.0",
|
|
30
31
|
"axios": "^1.7.2",
|
|
31
32
|
"compare-versions": "^6.1.0",
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
"unzipper": "^0.12.1",
|
|
42
43
|
"winston": "^3.17.0",
|
|
43
44
|
"winston-daily-rotate-file": "^5.0.0",
|
|
44
|
-
"ws": "^8.17.0"
|
|
45
|
-
"zod": "^4.1.4"
|
|
45
|
+
"ws": "^8.17.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/runner.d.ts
CHANGED
|
@@ -105,7 +105,6 @@ declare enum WidgetType {
|
|
|
105
105
|
imageResize = "imageResize",
|
|
106
106
|
value = "value",
|
|
107
107
|
imageWarp = "imageWarp",
|
|
108
|
-
widgetBundle = "widgetBundle",
|
|
109
108
|
sequence = "sequence",
|
|
110
109
|
variable = "variable",
|
|
111
110
|
hubService = "hubService",
|
|
@@ -117,7 +116,10 @@ declare enum WidgetType {
|
|
|
117
116
|
expressionEval = "expressionEval",
|
|
118
117
|
rescue = "rescue",
|
|
119
118
|
objectCombine = "objectCombine",
|
|
120
|
-
loop = "loop"
|
|
119
|
+
loop = "loop",
|
|
120
|
+
status = "status",
|
|
121
|
+
secret = "secret",
|
|
122
|
+
output = "output"
|
|
121
123
|
}
|
|
122
124
|
export type VariableDefinition = {
|
|
123
125
|
/**
|
|
@@ -147,6 +149,7 @@ export type VarValueChangeEvt = Readonly<Pick<VariableDefinition, "type" | "valu
|
|
|
147
149
|
setByWidgetId: string;
|
|
148
150
|
}>;
|
|
149
151
|
export type SendToInputWidgetFn = (inputName: string, data: PartialData | number | string | boolean | Array<any>) => Promise<void>;
|
|
152
|
+
export type SendToInputWidgetAndWaitForOutputFn = <T = any>(inputName: string, data: PartialData | number | string | boolean | Array<any>) => Promise<T>;
|
|
150
153
|
export declare const utils: {
|
|
151
154
|
/**
|
|
152
155
|
* Builds an object that represents an ImageData type. This is useful when services
|
|
@@ -199,6 +202,13 @@ declare const _default: {
|
|
|
199
202
|
* ```
|
|
200
203
|
*/
|
|
201
204
|
sendToInputWidget: SendToInputWidgetFn;
|
|
205
|
+
/**
|
|
206
|
+
* use it to send data to an input widget and wait until an 'output' widget in the execution path is reached. The value sent to the output widget will be the returned value.
|
|
207
|
+
* @param inputName the name of the input widget to send data to.
|
|
208
|
+
* @param data the data to send to the input widget.
|
|
209
|
+
* @returns the response from the input widget.
|
|
210
|
+
*/
|
|
211
|
+
sendToInputWidgetAndWaitForOutput: SendToInputWidgetAndWaitForOutputFn;
|
|
202
212
|
}>;
|
|
203
213
|
terminate: () => Promise<void>;
|
|
204
214
|
/**
|
|
@@ -207,7 +217,7 @@ declare const _default: {
|
|
|
207
217
|
* @param cb the callback function to be invoked.
|
|
208
218
|
* @returns a function to remove the listener.
|
|
209
219
|
*/
|
|
210
|
-
onVariableChange: (varName: string, cb: (evt: Omit<VarValueChangeEvt, "isUIElement">) => void | Promise<void>) =>
|
|
220
|
+
onVariableChange: (varName: string, cb: (evt: Omit<VarValueChangeEvt, "isUIElement">) => void | Promise<void>) => () => void;
|
|
211
221
|
};
|
|
212
222
|
|
|
213
223
|
export {
|