@kemu-io/edge-runtime 1.7.1 → 1.8.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 +1 -2
- package/runner.d.ts +7 -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.8.0",
|
|
5
5
|
"description": "Kemu Edge runtime for running Kemu recipes",
|
|
6
6
|
"author": "Kemu Pty Ltd",
|
|
7
7
|
"main": "runner.js",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"compare-versions": "^6.1.0",
|
|
33
33
|
"crypto-js": "^4.2.0",
|
|
34
34
|
"expr-eval": "^2.0.2",
|
|
35
|
-
"jsonp": "^0.2.1",
|
|
36
35
|
"jszip": "^3.10.1",
|
|
37
36
|
"microseconds": "^0.2.0",
|
|
38
37
|
"mustache": "^4.2.0",
|
package/runner.d.ts
CHANGED
|
@@ -72,11 +72,11 @@ export type Data = {
|
|
|
72
72
|
timestamp: number;
|
|
73
73
|
};
|
|
74
74
|
export type PartialData = Omit<Data, "timestamp">;
|
|
75
|
+
export type GlobalVariableControlType = "number" | "slider" | "text" | "multilineText" | "dropdown" | "image" | "binaryFile" | "checkbox" | "multiSelect" | "anything" | "button" | "group";
|
|
75
76
|
export type ExecutionContext = {
|
|
76
77
|
currentPath: string[];
|
|
77
78
|
eventId: number;
|
|
78
79
|
};
|
|
79
|
-
export type GlobalVariableControlType = "number" | "slider" | "text" | "multilineText" | "dropdown" | "image" | "binaryFile" | "checkbox" | "multiSelect" | "anything";
|
|
80
80
|
export type GlobalVariable<T = any> = {
|
|
81
81
|
name: string;
|
|
82
82
|
controlType: GlobalVariableControlType;
|
|
@@ -88,6 +88,8 @@ export type GlobalVariable<T = any> = {
|
|
|
88
88
|
/** help text in plain text or markdown format */
|
|
89
89
|
helpText?: string;
|
|
90
90
|
order?: number;
|
|
91
|
+
/** name of the group this variable belongs to, null if ungrouped */
|
|
92
|
+
group?: string | null;
|
|
91
93
|
};
|
|
92
94
|
/**
|
|
93
95
|
* Handler function type for edge function callbacks
|
|
@@ -108,7 +110,9 @@ declare const _default: {
|
|
|
108
110
|
};
|
|
109
111
|
export type SendToInputWidgetFn = (inputName: string, data: PartialData | number | string | boolean | Array<any>) => Promise<void>;
|
|
110
112
|
export type SendToInputWidgetAndWaitForOutputFn = <T = any>(inputName: string, data: PartialData | number | string | boolean | Array<any>) => Promise<T>;
|
|
111
|
-
declare const
|
|
113
|
+
export declare const isBinaryFile: (d: any) => boolean;
|
|
114
|
+
export type UnsubscribeFunction = () => void;
|
|
115
|
+
declare const onGlobalVariableChange: (varName: string | "*", cb: (config: GlobalVariable) => void) => UnsubscribeFunction;
|
|
112
116
|
declare const setGlobalVariable: (varName: string, value: SupportedTypes, config?: {
|
|
113
117
|
/** whether to disable change notifications for this variable */
|
|
114
118
|
disableChangeNotifications?: boolean;
|
|
@@ -129,7 +133,7 @@ declare const onStatusValueChange: (cb: (config: {
|
|
|
129
133
|
sourceWidget: string;
|
|
130
134
|
/** the id of the status widget being set */
|
|
131
135
|
statusWidgetId: string;
|
|
132
|
-
}) => void) =>
|
|
136
|
+
}) => void) => UnsubscribeFunction;
|
|
133
137
|
export declare const utils: {
|
|
134
138
|
/**
|
|
135
139
|
* Builds an object that represents an ImageData type. This is useful when services
|