windmill-components 1.472.6 → 1.472.7
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.
|
@@ -85,11 +85,12 @@ const dispatch = createEventDispatcher();
|
|
|
85
85
|
$: initialPath != '' && loadTriggers();
|
|
86
86
|
onMount(() => {
|
|
87
87
|
if (functionExports) {
|
|
88
|
+
console.log('functionExports', functionExports);
|
|
88
89
|
functionExports({
|
|
89
90
|
setPreviewArgs: (args) => {
|
|
90
91
|
scriptEditor?.setArgs(args);
|
|
91
92
|
},
|
|
92
|
-
runPreview: () => scriptEditor?.runTest(),
|
|
93
|
+
runPreview: async () => await scriptEditor?.runTest(),
|
|
93
94
|
setCode: (code, language) => {
|
|
94
95
|
if (language) {
|
|
95
96
|
script.language = language;
|
|
@@ -99,6 +100,9 @@ onMount(() => {
|
|
|
99
100
|
getCode: () => editor?.getCode() ?? ''
|
|
100
101
|
});
|
|
101
102
|
}
|
|
103
|
+
else {
|
|
104
|
+
console.log('no functionExports');
|
|
105
|
+
}
|
|
102
106
|
});
|
|
103
107
|
async function loadTriggers() {
|
|
104
108
|
$triggersCount = await ScriptService.getTriggersCountOfScript({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Script } from "../gen";
|
|
2
2
|
export type ScriptBuilderFunctionExports = {
|
|
3
3
|
setPreviewArgs: (args: Record<string, any>) => void;
|
|
4
|
-
runPreview: () => Promise<string>;
|
|
4
|
+
runPreview: () => Promise<string | undefined>;
|
|
5
5
|
setCode: (code: string, language?: Script["language"]) => void;
|
|
6
6
|
getCode: () => string;
|
|
7
7
|
};
|