windmill-components 1.35.1 → 1.35.43
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/components/ArgInput.svelte +21 -21
- package/components/ArgInput.svelte.d.ts +3 -3
- package/components/DisplayResult.svelte +73 -67
- package/components/Editor.svelte +184 -246
- package/components/Editor.svelte.d.ts +4 -4
- package/components/EditorBar.svelte +58 -45
- package/components/EditorBar.svelte.d.ts +2 -1
- package/components/FlowBuilder.svelte +113 -121
- package/components/FlowJobResult.svelte +4 -5
- package/components/FlowModulesViewer.svelte +89 -7
- package/components/FlowModulesViewer.svelte.d.ts +1 -0
- package/components/FlowPreviewContent.svelte +56 -15
- package/components/FlowPreviewContent.svelte.d.ts +1 -1
- package/components/FlowStatusViewer.svelte +42 -24
- package/components/FlowStatusViewer.svelte.d.ts +0 -1
- package/components/FlowViewer.svelte +7 -3
- package/components/HighlightCode.svelte +21 -0
- package/components/HighlightCode.svelte.d.ts +17 -0
- package/components/IconedPath.svelte +9 -7
- package/components/IconedResourceType.svelte +1 -1
- package/components/InputTransformForm.svelte +88 -107
- package/components/InputTransformForm.svelte.d.ts +0 -1
- package/components/ItemPicker.svelte +2 -2
- package/components/LogViewer.svelte +23 -0
- package/components/LogViewer.svelte.d.ts +19 -0
- package/components/ModulePreview.svelte +108 -0
- package/components/ModulePreview.svelte.d.ts +24 -0
- package/components/RunForm.svelte +29 -18
- package/components/RunForm.svelte.d.ts +6 -2
- package/components/SchemaEditor.svelte +5 -3
- package/components/SchemaForm.svelte +0 -2
- package/components/SchemaForm.svelte.d.ts +0 -1
- package/components/ScriptBuilder.svelte +77 -66
- package/components/ScriptBuilder.svelte.d.ts +2 -4
- package/components/ScriptEditor.svelte +69 -142
- package/components/ScriptEditor.svelte.d.ts +0 -5
- package/components/ScriptPicker.svelte +3 -3
- package/components/ScriptPicker.svelte.d.ts +2 -1
- package/components/SharedBadge.svelte +5 -13
- package/components/SimpleEditor.svelte +147 -0
- package/components/SimpleEditor.svelte.d.ts +35 -0
- package/components/TestJobLoader.svelte +98 -0
- package/components/TestJobLoader.svelte.d.ts +26 -0
- package/components/Tooltip.svelte +2 -1
- package/components/common/actionRow/ActionRow.svelte +26 -0
- package/components/common/actionRow/ActionRow.svelte.d.ts +21 -0
- package/components/common/alert/Alert.svelte +53 -0
- package/components/common/alert/Alert.svelte.d.ts +20 -0
- package/components/common/alert/model.d.ts +1 -0
- package/components/common/alert/model.js +1 -0
- package/components/common/badge/Badge.svelte +82 -0
- package/components/common/badge/Badge.svelte.d.ts +28 -0
- package/components/common/badge/model.d.ts +8 -0
- package/components/common/badge/model.js +1 -0
- package/components/common/button/Button.svelte +107 -0
- package/components/common/button/Button.svelte.d.ts +37 -0
- package/components/common/button/model.d.ts +6 -0
- package/components/common/button/model.js +1 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte +55 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +23 -0
- package/components/common/drawer/Drawer.svelte +3 -0
- package/components/common/drawer/Drawer.svelte.d.ts +2 -0
- package/components/common/index.d.ts +14 -0
- package/components/common/index.js +14 -0
- package/components/common/tabs/TabContent.svelte +3 -2
- package/components/common/tabs/TabContent.svelte.d.ts +1 -0
- package/components/common/tabs/Tabs.svelte +8 -1
- package/components/common/tabs/Tabs.svelte.d.ts +2 -0
- package/components/common/toggleButton/ToggleButton.svelte +20 -0
- package/components/common/toggleButton/ToggleButton.svelte.d.ts +19 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte +33 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte.d.ts +24 -0
- package/components/flows/FlowEditor.svelte +30 -0
- package/components/{FlowEditor.svelte.d.ts → flows/FlowEditor.svelte.d.ts} +1 -8
- package/components/flows/common/FlowCard.svelte +9 -0
- package/components/flows/common/FlowCard.svelte.d.ts +21 -0
- package/components/flows/common/FlowCardHeader.svelte +39 -0
- package/components/flows/common/FlowCardHeader.svelte.d.ts +20 -0
- package/components/flows/content/CopyFirstStepSchema.svelte +13 -0
- package/components/flows/{CopyFirstStepSchema.svelte.d.ts → content/CopyFirstStepSchema.svelte.d.ts} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte → content/DynamicInputHelpBox.svelte} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte.d.ts → content/DynamicInputHelpBox.svelte.d.ts} +0 -0
- package/components/flows/content/FlowEditorPanel.svelte +26 -0
- package/components/flows/content/FlowEditorPanel.svelte.d.ts +14 -0
- package/components/flows/content/FlowFailureModule.svelte +17 -0
- package/components/flows/content/FlowFailureModule.svelte.d.ts +14 -0
- package/components/flows/content/FlowInput.svelte +22 -0
- package/components/flows/{FlowInput.svelte.d.ts → content/FlowInput.svelte.d.ts} +0 -0
- package/components/flows/{FlowInputs.svelte → content/FlowInputs.svelte} +24 -13
- package/components/flows/{FlowInputs.svelte.d.ts → content/FlowInputs.svelte.d.ts} +0 -0
- package/components/flows/content/FlowLoop.svelte +38 -0
- package/components/flows/content/FlowLoop.svelte.d.ts +14 -0
- package/components/flows/content/FlowModule.svelte +190 -0
- package/components/flows/content/FlowModule.svelte.d.ts +29 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte +64 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleHeader.svelte +68 -0
- package/components/flows/{FlowModuleHeader.svelte.d.ts → content/FlowModuleHeader.svelte.d.ts} +2 -3
- package/components/flows/content/FlowModuleScript.svelte +21 -0
- package/components/flows/content/FlowModuleScript.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleWrapper.svelte +47 -0
- package/components/flows/content/FlowModuleWrapper.svelte.d.ts +14 -0
- package/components/flows/content/FlowRetries.svelte +80 -0
- package/components/flows/content/FlowRetries.svelte.d.ts +14 -0
- package/components/flows/content/FlowSchedules.svelte +18 -0
- package/components/flows/content/FlowSchedules.svelte.d.ts +14 -0
- package/components/flows/content/FlowSettings.svelte +51 -0
- package/components/flows/{FlowSettings.svelte.d.ts → content/FlowSettings.svelte.d.ts} +1 -6
- package/components/flows/content/RemoveStepConfirmationModal.svelte +32 -0
- package/components/flows/content/RemoveStepConfirmationModal.svelte.d.ts +19 -0
- package/components/flows/flowState.d.ts +8 -7
- package/components/flows/flowState.js +25 -46
- package/components/flows/flowStateUtils.d.ts +15 -13
- package/components/flows/flowStateUtils.js +80 -72
- package/components/flows/flowStore.js +7 -4
- package/components/flows/header/FlowEditorHeader.svelte +23 -0
- package/components/flows/header/FlowEditorHeader.svelte.d.ts +14 -0
- package/components/flows/header/FlowImportExportMenu.svelte +56 -0
- package/components/flows/header/FlowImportExportMenu.svelte.d.ts +14 -0
- package/components/flows/header/FlowPreviewButtons.svelte +49 -0
- package/components/flows/header/FlowPreviewButtons.svelte.d.ts +14 -0
- package/components/flows/header/FlowStatus.svelte +36 -0
- package/components/flows/header/FlowStatus.svelte.d.ts +14 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte +54 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +14 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte +58 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +27 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte +161 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +20 -0
- package/components/flows/pickers/PickHubScript.svelte +4 -3
- package/components/flows/pickers/PickHubScript.svelte.d.ts +2 -1
- package/components/flows/pickers/PickScript.svelte +4 -12
- package/components/flows/pickers/PickScript.svelte.d.ts +1 -1
- package/components/flows/propPicker/PropPickerWrapper.svelte +42 -0
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +31 -0
- package/components/flows/scheduleUtils.d.ts +0 -1
- package/components/flows/scheduleUtils.js +0 -1
- package/components/flows/types.d.ts +9 -0
- package/components/flows/types.js +1 -0
- package/components/flows/utils.d.ts +1 -1
- package/components/flows/utils.js +8 -11
- package/components/icons/HatIcon.svelte +19 -0
- package/components/icons/HatIcon.svelte.d.ts +16 -0
- package/components/landing/FlowGettingStarted.svelte +22 -68
- package/components/landing/FlowLandingBox.svelte +1 -1
- package/components/landing/RessourceGettingStarted.svelte +7 -37
- package/components/landing/ScriptBox.svelte +33 -60
- package/components/landing/ScriptGettingStarted.svelte +23 -69
- package/components/propertyPicker/ObjectViewer.svelte +16 -7
- package/components/propertyPicker/PropPicker.svelte +38 -12
- package/components/propertyPicker/WarningMessage.svelte +2 -15
- package/components/script_editor/LogPanel.svelte +108 -119
- package/components/script_editor/LogPanel.svelte.d.ts +2 -0
- package/components/sidebar/SidebarContent.svelte +2 -2
- package/editorUtils.d.ts +25 -0
- package/editorUtils.js +43 -0
- package/gen/models/CompletedJob.d.ts +2 -1
- package/gen/models/CompletedJob.js +1 -0
- package/gen/models/FlowModule.d.ts +1 -0
- package/gen/models/FlowStatus.d.ts +3 -0
- package/gen/models/FlowStatusModule.d.ts +1 -1
- package/gen/models/FlowValue.d.ts +11 -0
- package/gen/models/Preview.d.ts +2 -1
- package/gen/models/Preview.js +1 -0
- package/gen/models/QueuedJob.d.ts +2 -1
- package/gen/models/QueuedJob.js +1 -0
- package/gen/models/RawScript.d.ts +2 -1
- package/gen/models/RawScript.js +1 -0
- package/gen/models/Script.d.ts +9 -2
- package/gen/models/Script.js +8 -0
- package/gen/services/JobService.d.ts +40 -0
- package/gen/services/JobService.js +70 -0
- package/gen/services/ScriptService.d.ts +14 -3
- package/gen/services/ScriptService.js +13 -0
- package/infer.d.ts +1 -1
- package/infer.js +6 -1
- package/package.json +67 -35
- package/script_helpers.d.ts +5 -2
- package/script_helpers.js +41 -13
- package/stores.d.ts +1 -1
- package/utils.d.ts +6 -4
- package/utils.js +27 -4
- package/components/FlowEditor.svelte +0 -55
- package/components/FlowPreview.svelte +0 -107
- package/components/FlowPreview.svelte.d.ts +0 -23
- package/components/ModuleStep.svelte +0 -131
- package/components/ModuleStep.svelte.d.ts +0 -25
- package/components/flows/CopyFirstStepSchema.svelte +0 -13
- package/components/flows/FlowBox.svelte +0 -16
- package/components/flows/FlowBox.svelte.d.ts +0 -23
- package/components/flows/FlowBoxHeader.svelte +0 -16
- package/components/flows/FlowBoxHeader.svelte.d.ts +0 -21
- package/components/flows/FlowInput.svelte +0 -22
- package/components/flows/FlowModuleHeader.svelte +0 -109
- package/components/flows/FlowSettings.svelte +0 -165
- package/components/flows/FlowTimeline.svelte +0 -169
- package/components/flows/FlowTimeline.svelte.d.ts +0 -21
- package/components/flows/stepOpenedStore.d.ts +0 -1
- package/components/flows/stepOpenedStore.js +0 -6
- package/components/propertyPicker/OverlayPropertyPicker.svelte +0 -69
- package/components/propertyPicker/OverlayPropertyPicker.svelte.d.ts +0 -24
|
@@ -14,7 +14,7 @@ export declare class ScriptService {
|
|
|
14
14
|
summary: string;
|
|
15
15
|
app: string;
|
|
16
16
|
approved: boolean;
|
|
17
|
-
kind
|
|
17
|
+
kind: 'script' | 'failure' | 'trigger' | 'command';
|
|
18
18
|
votes: number;
|
|
19
19
|
views: number;
|
|
20
20
|
}>;
|
|
@@ -120,8 +120,8 @@ export declare class ScriptService {
|
|
|
120
120
|
schema?: any;
|
|
121
121
|
is_template?: boolean;
|
|
122
122
|
lock?: Array<string>;
|
|
123
|
-
language: 'python3' | 'deno';
|
|
124
|
-
|
|
123
|
+
language: 'python3' | 'deno' | 'go';
|
|
124
|
+
kind?: 'script' | 'failure' | 'trigger' | 'command';
|
|
125
125
|
};
|
|
126
126
|
}): CancelablePromise<string>;
|
|
127
127
|
/**
|
|
@@ -146,6 +146,17 @@ export declare class ScriptService {
|
|
|
146
146
|
*/
|
|
147
147
|
requestBody: string;
|
|
148
148
|
}): CancelablePromise<MainArgSignature>;
|
|
149
|
+
/**
|
|
150
|
+
* inspect go code to infer jsonschema of arguments
|
|
151
|
+
* @returns MainArgSignature parsed args
|
|
152
|
+
* @throws ApiError
|
|
153
|
+
*/
|
|
154
|
+
static goToJsonschema({ requestBody, }: {
|
|
155
|
+
/**
|
|
156
|
+
* go code with the main function
|
|
157
|
+
*/
|
|
158
|
+
requestBody: string;
|
|
159
|
+
}): CancelablePromise<MainArgSignature>;
|
|
149
160
|
/**
|
|
150
161
|
* archive script by path
|
|
151
162
|
* @returns string script archived
|
|
@@ -96,6 +96,19 @@ export class ScriptService {
|
|
|
96
96
|
mediaType: 'application/json',
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* inspect go code to infer jsonschema of arguments
|
|
101
|
+
* @returns MainArgSignature parsed args
|
|
102
|
+
* @throws ApiError
|
|
103
|
+
*/
|
|
104
|
+
static goToJsonschema({ requestBody, }) {
|
|
105
|
+
return __request(OpenAPI, {
|
|
106
|
+
method: 'POST',
|
|
107
|
+
url: '/scripts/go/tojsonschema',
|
|
108
|
+
body: requestBody,
|
|
109
|
+
mediaType: 'application/json',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
99
112
|
/**
|
|
100
113
|
* archive script by path
|
|
101
114
|
* @returns string script archived
|
package/infer.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Schema } from './common.js';
|
|
2
|
-
export declare function inferArgs(language: 'python3' | 'deno', code: string, schema: Schema): Promise<void>;
|
|
2
|
+
export declare function inferArgs(language: 'python3' | 'deno' | 'go', code: string, schema: Schema): Promise<void>;
|
package/infer.js
CHANGED
|
@@ -14,6 +14,11 @@ export async function inferArgs(language, code, schema) {
|
|
|
14
14
|
requestBody: code
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
+
else if (language == 'go') {
|
|
18
|
+
inferedSchema = await ScriptService.goToJsonschema({
|
|
19
|
+
requestBody: code
|
|
20
|
+
});
|
|
21
|
+
}
|
|
17
22
|
else {
|
|
18
23
|
return;
|
|
19
24
|
}
|
|
@@ -29,7 +34,7 @@ export async function inferArgs(language, code, schema) {
|
|
|
29
34
|
}
|
|
30
35
|
argSigToJsonSchemaType(arg.typ, schema.properties[arg.name]);
|
|
31
36
|
schema.properties[arg.name].default = arg.default;
|
|
32
|
-
if (!arg.has_default) {
|
|
37
|
+
if (!arg.has_default && !schema.required.includes(arg.name)) {
|
|
33
38
|
schema.required.push(arg.name);
|
|
34
39
|
}
|
|
35
40
|
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windmill-components",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.43",
|
|
4
4
|
"devDependencies": {
|
|
5
|
-
"@playwright/test": "^1.25.
|
|
6
|
-
"@sveltejs/adapter-static": "^1.0.0-next.
|
|
5
|
+
"@playwright/test": "^1.25.2",
|
|
6
|
+
"@sveltejs/adapter-static": "^1.0.0-next.43",
|
|
7
7
|
"@sveltejs/kit": "next",
|
|
8
|
-
"@tailwindcss/forms": "^0.5.
|
|
9
|
-
"@tailwindcss/typography": "^0.5.
|
|
10
|
-
"@types/vscode": "~1.
|
|
11
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
12
|
-
"@typescript-eslint/parser": "^5.
|
|
8
|
+
"@tailwindcss/forms": "^0.5.3",
|
|
9
|
+
"@tailwindcss/typography": "^0.5.7",
|
|
10
|
+
"@types/vscode": "~1.71.0",
|
|
11
|
+
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
|
12
|
+
"@typescript-eslint/parser": "^5.38.0",
|
|
13
13
|
"@zerodevx/svelte-toast": "^0.7.2",
|
|
14
|
-
"autoprefixer": "^10.4.
|
|
14
|
+
"autoprefixer": "^10.4.11",
|
|
15
15
|
"cssnano": "^5.1.13",
|
|
16
|
-
"eslint": "^8.23.
|
|
16
|
+
"eslint": "^8.23.1",
|
|
17
17
|
"eslint-config-prettier": "^8.3.0",
|
|
18
18
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
19
|
-
"flowbite": "^1.5.
|
|
20
|
-
"flowbite-svelte": "^0.25
|
|
19
|
+
"flowbite": "^1.5.3",
|
|
20
|
+
"flowbite-svelte": "^0.26.25",
|
|
21
21
|
"openapi-typescript-codegen": "^0.23.0",
|
|
22
22
|
"path-browserify": "^1.0.1",
|
|
23
23
|
"postcss": "^8.4.16",
|
|
@@ -26,31 +26,31 @@
|
|
|
26
26
|
"prettier-plugin-svelte": "^2.4.0",
|
|
27
27
|
"simple-svelte-autocomplete": "^2.2.4",
|
|
28
28
|
"stylelint-config-recommended": "^9.0.0",
|
|
29
|
-
"svelte": "^3.
|
|
29
|
+
"svelte": "^3.50.1",
|
|
30
30
|
"svelte-awesome": "^3.0.0",
|
|
31
31
|
"svelte-check": "^2.9.0",
|
|
32
32
|
"svelte-heros": "^2.3.5",
|
|
33
33
|
"svelte-highlight": "^6.2.1",
|
|
34
34
|
"svelte-markdown": "^0.2.3",
|
|
35
35
|
"svelte-overlay": "^1.4.1",
|
|
36
|
-
"svelte-popperjs": "^1.3.
|
|
36
|
+
"svelte-popperjs": "^1.3.2",
|
|
37
37
|
"svelte-preprocess": "^4.9.8",
|
|
38
38
|
"svelte-split-pane": "^0.1.2",
|
|
39
|
-
"svelte2tsx": "^0.5.
|
|
39
|
+
"svelte2tsx": "^0.5.18",
|
|
40
40
|
"tailwindcss": "^3.1.8",
|
|
41
41
|
"tslib": "^2.3.1",
|
|
42
|
-
"typescript": "^4.8.
|
|
42
|
+
"typescript": "^4.8.3"
|
|
43
43
|
},
|
|
44
44
|
"type": "module",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@fortawesome/free-brands-svg-icons": "^6.
|
|
47
|
-
"@fortawesome/free-solid-svg-icons": "^6.
|
|
46
|
+
"@fortawesome/free-brands-svg-icons": "^6.2.0",
|
|
47
|
+
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
48
48
|
"fuse.js": "^6.4.6",
|
|
49
49
|
"highlight.js": "^11.5.1",
|
|
50
50
|
"monaco-editor": "^0.34.0",
|
|
51
|
-
"monaco-editor-workers": "^0.34.
|
|
52
|
-
"monaco-languageclient": "
|
|
53
|
-
"vscode-ws-jsonrpc": "^
|
|
51
|
+
"monaco-editor-workers": "^0.34.2",
|
|
52
|
+
"monaco-languageclient": "4.0.0",
|
|
53
|
+
"vscode-ws-jsonrpc": "^2.0.0"
|
|
54
54
|
},
|
|
55
55
|
"exports": {
|
|
56
56
|
"./package.json": "./package.json",
|
|
@@ -73,14 +73,13 @@
|
|
|
73
73
|
"./components/EditorBar.svelte": "./components/EditorBar.svelte",
|
|
74
74
|
"./components/FieldHeader.svelte": "./components/FieldHeader.svelte",
|
|
75
75
|
"./components/FlowBuilder.svelte": "./components/FlowBuilder.svelte",
|
|
76
|
-
"./components/FlowEditor.svelte": "./components/FlowEditor.svelte",
|
|
77
76
|
"./components/FlowJobResult.svelte": "./components/FlowJobResult.svelte",
|
|
78
77
|
"./components/FlowModulesViewer.svelte": "./components/FlowModulesViewer.svelte",
|
|
79
|
-
"./components/FlowPreview.svelte": "./components/FlowPreview.svelte",
|
|
80
78
|
"./components/FlowPreviewContent.svelte": "./components/FlowPreviewContent.svelte",
|
|
81
79
|
"./components/FlowStatusViewer.svelte": "./components/FlowStatusViewer.svelte",
|
|
82
80
|
"./components/FlowViewer.svelte": "./components/FlowViewer.svelte",
|
|
83
81
|
"./components/GroupModal.svelte": "./components/GroupModal.svelte",
|
|
82
|
+
"./components/HighlightCode.svelte": "./components/HighlightCode.svelte",
|
|
84
83
|
"./components/IconedPath.svelte": "./components/IconedPath.svelte",
|
|
85
84
|
"./components/IconedResourceType.svelte": "./components/IconedResourceType.svelte",
|
|
86
85
|
"./components/InputTransformForm.svelte": "./components/InputTransformForm.svelte",
|
|
@@ -89,8 +88,9 @@
|
|
|
89
88
|
"./components/InviteUser.svelte": "./components/InviteUser.svelte",
|
|
90
89
|
"./components/ItemPicker.svelte": "./components/ItemPicker.svelte",
|
|
91
90
|
"./components/JobStatus.svelte": "./components/JobStatus.svelte",
|
|
91
|
+
"./components/LogViewer.svelte": "./components/LogViewer.svelte",
|
|
92
92
|
"./components/Modal.svelte": "./components/Modal.svelte",
|
|
93
|
-
"./components/
|
|
93
|
+
"./components/ModulePreview.svelte": "./components/ModulePreview.svelte",
|
|
94
94
|
"./components/Multiselect.svelte": "./components/Multiselect.svelte",
|
|
95
95
|
"./components/ObjectResourceInput.svelte": "./components/ObjectResourceInput.svelte",
|
|
96
96
|
"./components/ObjectTypeNarrowing.svelte": "./components/ObjectTypeNarrowing.svelte",
|
|
@@ -116,38 +116,69 @@
|
|
|
116
116
|
"./components/ScriptSchema.svelte": "./components/ScriptSchema.svelte",
|
|
117
117
|
"./components/ShareModal.svelte": "./components/ShareModal.svelte",
|
|
118
118
|
"./components/SharedBadge.svelte": "./components/SharedBadge.svelte",
|
|
119
|
+
"./components/SimpleEditor.svelte": "./components/SimpleEditor.svelte",
|
|
119
120
|
"./components/StringTypeNarrowing.svelte": "./components/StringTypeNarrowing.svelte",
|
|
120
121
|
"./components/Switch.svelte": "./components/Switch.svelte",
|
|
121
122
|
"./components/TableCustom.svelte": "./components/TableCustom.svelte",
|
|
122
123
|
"./components/TableSimple.svelte": "./components/TableSimple.svelte",
|
|
123
124
|
"./components/Tabs.svelte": "./components/Tabs.svelte",
|
|
125
|
+
"./components/TestJobLoader.svelte": "./components/TestJobLoader.svelte",
|
|
124
126
|
"./components/Toggle.svelte": "./components/Toggle.svelte",
|
|
125
127
|
"./components/Tooltip.svelte": "./components/Tooltip.svelte",
|
|
126
128
|
"./components/VariableEditor.svelte": "./components/VariableEditor.svelte",
|
|
129
|
+
"./components/common/actionRow/ActionRow.svelte": "./components/common/actionRow/ActionRow.svelte",
|
|
130
|
+
"./components/common/alert/Alert.svelte": "./components/common/alert/Alert.svelte",
|
|
131
|
+
"./components/common/alert/model": "./components/common/alert/model.js",
|
|
132
|
+
"./components/common/badge/Badge.svelte": "./components/common/badge/Badge.svelte",
|
|
133
|
+
"./components/common/badge/model": "./components/common/badge/model.js",
|
|
134
|
+
"./components/common/button/Button.svelte": "./components/common/button/Button.svelte",
|
|
135
|
+
"./components/common/button/model": "./components/common/button/model.js",
|
|
136
|
+
"./components/common/confirmationModal/ConfirmationModal.svelte": "./components/common/confirmationModal/ConfirmationModal.svelte",
|
|
127
137
|
"./components/common/drawer/Drawer.svelte": "./components/common/drawer/Drawer.svelte",
|
|
128
138
|
"./components/common/drawer/DrawerContent.svelte": "./components/common/drawer/DrawerContent.svelte",
|
|
139
|
+
"./components/common": "./components/common/index.js",
|
|
129
140
|
"./components/common/menu/Menu.svelte": "./components/common/menu/Menu.svelte",
|
|
130
141
|
"./components/common/menu/MenuItem.svelte": "./components/common/menu/MenuItem.svelte",
|
|
131
142
|
"./components/common/tabs/Tab.svelte": "./components/common/tabs/Tab.svelte",
|
|
132
143
|
"./components/common/tabs/TabContent.svelte": "./components/common/tabs/TabContent.svelte",
|
|
133
144
|
"./components/common/tabs/Tabs.svelte": "./components/common/tabs/Tabs.svelte",
|
|
134
|
-
"./components/
|
|
135
|
-
"./components/
|
|
136
|
-
"./components/flows/
|
|
137
|
-
"./components/flows/
|
|
138
|
-
"./components/flows/
|
|
139
|
-
"./components/flows/
|
|
140
|
-
"./components/flows/
|
|
141
|
-
"./components/flows/
|
|
142
|
-
"./components/flows/
|
|
145
|
+
"./components/common/toggleButton/ToggleButton.svelte": "./components/common/toggleButton/ToggleButton.svelte",
|
|
146
|
+
"./components/common/toggleButton/ToggleButtonGroup.svelte": "./components/common/toggleButton/ToggleButtonGroup.svelte",
|
|
147
|
+
"./components/flows/FlowEditor.svelte": "./components/flows/FlowEditor.svelte",
|
|
148
|
+
"./components/flows/common/FlowCard.svelte": "./components/flows/common/FlowCard.svelte",
|
|
149
|
+
"./components/flows/common/FlowCardHeader.svelte": "./components/flows/common/FlowCardHeader.svelte",
|
|
150
|
+
"./components/flows/content/CopyFirstStepSchema.svelte": "./components/flows/content/CopyFirstStepSchema.svelte",
|
|
151
|
+
"./components/flows/content/DynamicInputHelpBox.svelte": "./components/flows/content/DynamicInputHelpBox.svelte",
|
|
152
|
+
"./components/flows/content/FlowEditorPanel.svelte": "./components/flows/content/FlowEditorPanel.svelte",
|
|
153
|
+
"./components/flows/content/FlowFailureModule.svelte": "./components/flows/content/FlowFailureModule.svelte",
|
|
154
|
+
"./components/flows/content/FlowInput.svelte": "./components/flows/content/FlowInput.svelte",
|
|
155
|
+
"./components/flows/content/FlowInputs.svelte": "./components/flows/content/FlowInputs.svelte",
|
|
156
|
+
"./components/flows/content/FlowLoop.svelte": "./components/flows/content/FlowLoop.svelte",
|
|
157
|
+
"./components/flows/content/FlowModule.svelte": "./components/flows/content/FlowModule.svelte",
|
|
158
|
+
"./components/flows/content/FlowModuleAdvancedSettings.svelte": "./components/flows/content/FlowModuleAdvancedSettings.svelte",
|
|
159
|
+
"./components/flows/content/FlowModuleHeader.svelte": "./components/flows/content/FlowModuleHeader.svelte",
|
|
160
|
+
"./components/flows/content/FlowModuleScript.svelte": "./components/flows/content/FlowModuleScript.svelte",
|
|
161
|
+
"./components/flows/content/FlowModuleWrapper.svelte": "./components/flows/content/FlowModuleWrapper.svelte",
|
|
162
|
+
"./components/flows/content/FlowRetries.svelte": "./components/flows/content/FlowRetries.svelte",
|
|
163
|
+
"./components/flows/content/FlowSchedules.svelte": "./components/flows/content/FlowSchedules.svelte",
|
|
164
|
+
"./components/flows/content/FlowSettings.svelte": "./components/flows/content/FlowSettings.svelte",
|
|
165
|
+
"./components/flows/content/RemoveStepConfirmationModal.svelte": "./components/flows/content/RemoveStepConfirmationModal.svelte",
|
|
143
166
|
"./components/flows/flowState": "./components/flows/flowState.js",
|
|
144
167
|
"./components/flows/flowStateUtils": "./components/flows/flowStateUtils.js",
|
|
145
168
|
"./components/flows/flowStore": "./components/flows/flowStore.js",
|
|
169
|
+
"./components/flows/header/FlowEditorHeader.svelte": "./components/flows/header/FlowEditorHeader.svelte",
|
|
170
|
+
"./components/flows/header/FlowImportExportMenu.svelte": "./components/flows/header/FlowImportExportMenu.svelte",
|
|
171
|
+
"./components/flows/header/FlowPreviewButtons.svelte": "./components/flows/header/FlowPreviewButtons.svelte",
|
|
172
|
+
"./components/flows/header/FlowStatus.svelte": "./components/flows/header/FlowStatus.svelte",
|
|
173
|
+
"./components/flows/map/FlowErrorHandlerItem.svelte": "./components/flows/map/FlowErrorHandlerItem.svelte",
|
|
174
|
+
"./components/flows/map/FlowModuleSchemaItem.svelte": "./components/flows/map/FlowModuleSchemaItem.svelte",
|
|
175
|
+
"./components/flows/map/FlowModuleSchemaMap.svelte": "./components/flows/map/FlowModuleSchemaMap.svelte",
|
|
146
176
|
"./components/flows/pickers/FlowScriptPicker.svelte": "./components/flows/pickers/FlowScriptPicker.svelte",
|
|
147
177
|
"./components/flows/pickers/PickHubScript.svelte": "./components/flows/pickers/PickHubScript.svelte",
|
|
148
178
|
"./components/flows/pickers/PickScript.svelte": "./components/flows/pickers/PickScript.svelte",
|
|
179
|
+
"./components/flows/propPicker/PropPickerWrapper.svelte": "./components/flows/propPicker/PropPickerWrapper.svelte",
|
|
149
180
|
"./components/flows/scheduleUtils": "./components/flows/scheduleUtils.js",
|
|
150
|
-
"./components/flows/
|
|
181
|
+
"./components/flows/types": "./components/flows/types.js",
|
|
151
182
|
"./components/flows/utils": "./components/flows/utils.js",
|
|
152
183
|
"./components/icons/AirtableIcon.svelte": "./components/icons/AirtableIcon.svelte",
|
|
153
184
|
"./components/icons/DbIcon.svelte": "./components/icons/DbIcon.svelte",
|
|
@@ -159,6 +190,7 @@
|
|
|
159
190
|
"./components/icons/GdriveIcon.svelte": "./components/icons/GdriveIcon.svelte",
|
|
160
191
|
"./components/icons/GithubIcon.svelte": "./components/icons/GithubIcon.svelte",
|
|
161
192
|
"./components/icons/GmailIcon.svelte": "./components/icons/GmailIcon.svelte",
|
|
193
|
+
"./components/icons/HatIcon.svelte": "./components/icons/HatIcon.svelte",
|
|
162
194
|
"./components/icons/HttpIcon.svelte": "./components/icons/HttpIcon.svelte",
|
|
163
195
|
"./components/icons/Mail.svelte": "./components/icons/Mail.svelte",
|
|
164
196
|
"./components/icons/MastodonIcon.svelte": "./components/icons/MastodonIcon.svelte",
|
|
@@ -177,7 +209,6 @@
|
|
|
177
209
|
"./components/landing/ScriptGettingStarted.svelte": "./components/landing/ScriptGettingStarted.svelte",
|
|
178
210
|
"./components/preview/FlowPreviewStatus.svelte": "./components/preview/FlowPreviewStatus.svelte",
|
|
179
211
|
"./components/propertyPicker/ObjectViewer.svelte": "./components/propertyPicker/ObjectViewer.svelte",
|
|
180
|
-
"./components/propertyPicker/OverlayPropertyPicker.svelte": "./components/propertyPicker/OverlayPropertyPicker.svelte",
|
|
181
212
|
"./components/propertyPicker/PropPicker.svelte": "./components/propertyPicker/PropPicker.svelte",
|
|
182
213
|
"./components/propertyPicker/WarningMessage.svelte": "./components/propertyPicker/WarningMessage.svelte",
|
|
183
214
|
"./components/propertyPicker/utils": "./components/propertyPicker/utils.js",
|
|
@@ -186,6 +217,7 @@
|
|
|
186
217
|
"./components/sidebar/SidebarContent.svelte": "./components/sidebar/SidebarContent.svelte",
|
|
187
218
|
"./components/sidebar/UserMenu.svelte": "./components/sidebar/UserMenu.svelte",
|
|
188
219
|
"./components/sidebar/WorkspaceMenu.svelte": "./components/sidebar/WorkspaceMenu.svelte",
|
|
220
|
+
"./editorUtils": "./editorUtils.js",
|
|
189
221
|
"./gen/core/ApiError": "./gen/core/ApiError.js",
|
|
190
222
|
"./gen/core/ApiRequestOptions": "./gen/core/ApiRequestOptions.js",
|
|
191
223
|
"./gen/core/ApiResult": "./gen/core/ApiResult.js",
|
package/script_helpers.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { Script } from "./gen";
|
|
1
2
|
export declare const PYTHON_INIT_CODE = "import os\nimport wmill\nfrom datetime import datetime\n\n\"\"\"\nUse Cmd/Ctrl + S to autoformat the code.\nThe client is used to interact with windmill itself through its standard API.\nOne can explore the methods available through autocompletion of `wmill.XXX`.\n\"\"\"\n\ndef main(name: str = \"Nicolas Bourbaki\",\n age: int = 42,\n obj: dict = {\"even\": \"dicts\"},\n l: list = [\"or\", \"lists!\"],\n file_: bytes = bytes(0),\n dtime: datetime = datetime.now()):\n \"\"\"A main function is required for the script to be able to accept arguments.\n Types are recommended.\"\"\"\n print(f\"Hello World and a warm welcome especially to {name}\")\n print(\"and its acolytes..\", age, obj, l, len(file_), dtime)\n # retrieve variables, including secrets by querying the windmill platform.\n # secret fetching is audited by windmill.\n secret = wmill.get_variable(\"g/all/pretty_secret\")\n print(f\"The env variable at `g/all/pretty_secret`: {secret}\")\n # interact with the windmill platform to get the version\n version = wmill.get_version()\n # fetch reserved variables as environment variables\n user = os.environ.get(\"WM_USERNAME\")\n # the return value is then parsed and can be retrieved by other scripts conveniently\n return {\"version\": version, \"splitted\": name.split(), \"user\": user}\n";
|
|
2
3
|
export declare const DENO_INIT_CODE: string;
|
|
4
|
+
export declare const GO_INIT_CODE = "import (\n\t\"fmt\"\n\t\"rsc.io/quote\"\n)\n\nfunc main(x string) (interface{}, error) {\n\tfmt.Println(\"Hello, World\")\n\tfmt.Println(quote.Opt())\n return x, nil\n}\n";
|
|
3
5
|
export declare const DENO_INIT_CODE_CLEAR: string;
|
|
4
|
-
export declare const PYTHON_INIT_CODE_CLEAR = "#import wmill\n\ndef main():\n return\n";
|
|
6
|
+
export declare const PYTHON_INIT_CODE_CLEAR = "#import wmill\n\ndef main(x: str):\n return x\n";
|
|
5
7
|
export declare const POSTGRES_INIT_CODE: string;
|
|
6
8
|
export declare const DENO_INIT_CODE_TRIGGER: string;
|
|
7
|
-
export declare function
|
|
9
|
+
export declare function isInitialCode(content: string): boolean;
|
|
10
|
+
export declare function initialCode(language: 'deno' | 'python3' | 'go', kind: Script.kind, subkind: 'pgsql' | 'flow' | 'script' | undefined): string;
|
package/script_helpers.js
CHANGED
|
@@ -46,16 +46,27 @@ export async function main(
|
|
|
46
46
|
return { foo: a };
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
+
export const GO_INIT_CODE = `import (
|
|
50
|
+
"fmt"
|
|
51
|
+
"rsc.io/quote"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
func main(x string) (interface{}, error) {
|
|
55
|
+
fmt.Println("Hello, World")
|
|
56
|
+
fmt.Println(quote.Opt())
|
|
57
|
+
return x, nil
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
49
60
|
export const DENO_INIT_CODE_CLEAR = `// import * as wmill from "https://deno.land/x/windmill@v${__pkg__.version}/mod.ts"
|
|
50
61
|
|
|
51
|
-
export async function main() {
|
|
52
|
-
return
|
|
62
|
+
export async function main(x: string) {
|
|
63
|
+
return x
|
|
53
64
|
}
|
|
54
65
|
`;
|
|
55
66
|
export const PYTHON_INIT_CODE_CLEAR = `#import wmill
|
|
56
67
|
|
|
57
|
-
def main():
|
|
58
|
-
return
|
|
68
|
+
def main(x: str):
|
|
69
|
+
return x
|
|
59
70
|
`;
|
|
60
71
|
export const POSTGRES_INIT_CODE = `import {
|
|
61
72
|
pgSql,
|
|
@@ -93,27 +104,44 @@ export async function main() {
|
|
|
93
104
|
// 'flow_input._value'
|
|
94
105
|
}
|
|
95
106
|
`;
|
|
96
|
-
|
|
107
|
+
const ALL_INITIAL_CODE = [PYTHON_INIT_CODE, DENO_INIT_CODE, POSTGRES_INIT_CODE, DENO_INIT_CODE_TRIGGER, DENO_INIT_CODE_CLEAR, PYTHON_INIT_CODE_CLEAR];
|
|
108
|
+
export function isInitialCode(content) {
|
|
109
|
+
for (const code of ALL_INITIAL_CODE) {
|
|
110
|
+
if (content === code) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
export function initialCode(language, kind, subkind) {
|
|
97
117
|
if (language === 'deno') {
|
|
98
|
-
if (
|
|
118
|
+
if (kind === 'trigger') {
|
|
99
119
|
return DENO_INIT_CODE_TRIGGER;
|
|
100
120
|
}
|
|
101
|
-
else if (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
121
|
+
else if (kind === 'script') {
|
|
122
|
+
if (subkind === 'flow') {
|
|
123
|
+
return DENO_INIT_CODE_CLEAR;
|
|
124
|
+
}
|
|
125
|
+
else if (subkind === 'pgsql') {
|
|
126
|
+
return POSTGRES_INIT_CODE;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return DENO_INIT_CODE;
|
|
130
|
+
}
|
|
106
131
|
}
|
|
107
132
|
else {
|
|
108
133
|
return DENO_INIT_CODE;
|
|
109
134
|
}
|
|
110
135
|
}
|
|
111
|
-
else {
|
|
112
|
-
if (
|
|
136
|
+
else if (language === 'python3') {
|
|
137
|
+
if (subkind === 'flow') {
|
|
113
138
|
return PYTHON_INIT_CODE_CLEAR;
|
|
114
139
|
}
|
|
115
140
|
else {
|
|
116
141
|
return PYTHON_INIT_CODE;
|
|
117
142
|
}
|
|
118
143
|
}
|
|
144
|
+
else {
|
|
145
|
+
return GO_INIT_CODE;
|
|
146
|
+
}
|
|
119
147
|
}
|
package/stores.d.ts
CHANGED
package/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Flow, type FlowModule, type User } from './gen';
|
|
1
|
+
import { Script, type Flow, type FlowModule, type User } from './gen';
|
|
2
2
|
import type { Schema } from './common';
|
|
3
3
|
import { type UserExt } from './stores';
|
|
4
4
|
export declare function validateUsername(username: string): string;
|
|
@@ -73,7 +73,7 @@ export declare function setInputCat(type: string | undefined, format: string | u
|
|
|
73
73
|
export declare function scriptPathToHref(path: string): string;
|
|
74
74
|
export declare function getScriptByPath(path: string): Promise<{
|
|
75
75
|
content: string;
|
|
76
|
-
language: 'deno' | 'python3';
|
|
76
|
+
language: 'deno' | 'python3' | 'go';
|
|
77
77
|
}>;
|
|
78
78
|
export declare function loadHubScripts(): Promise<void>;
|
|
79
79
|
export declare function loadHubFlows(): Promise<{
|
|
@@ -86,5 +86,7 @@ export declare function loadHubFlows(): Promise<{
|
|
|
86
86
|
}[]>;
|
|
87
87
|
export declare function formatCron(inp: string): string;
|
|
88
88
|
export declare function flowToHubUrl(flow: Flow): URL;
|
|
89
|
-
export declare function scriptToHubUrl(content: string, summary: string, description: string,
|
|
90
|
-
export declare function classNames(...classes: string
|
|
89
|
+
export declare function scriptToHubUrl(content: string, summary: string, description: string, kind: Script.kind): URL;
|
|
90
|
+
export declare function classNames(...classes: Array<string | undefined>): string;
|
|
91
|
+
export declare function scriptLangToEditorLang(lang: Script.language): 'typescript' | 'python' | 'go';
|
|
92
|
+
export declare function copyToClipboard(value: string, sendToast?: boolean): Promise<boolean>;
|
package/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
2
2
|
import { goto } from '$app/navigation';
|
|
3
|
-
import { FlowService, ScriptService } from './gen';
|
|
3
|
+
import { FlowService, Script, ScriptService } from './gen';
|
|
4
4
|
import { toast } from '@zerodevx/svelte-toast';
|
|
5
5
|
import { get } from 'svelte/store';
|
|
6
6
|
import { hubScripts, workspaceStore } from './stores';
|
|
@@ -428,7 +428,7 @@ export async function loadHubScripts() {
|
|
|
428
428
|
path: `hub/${x.id}/${x.app}/${x.summary.toLowerCase().replaceAll(/\s+/g, '_')}`,
|
|
429
429
|
summary: `${x.summary} (${x.app}) ${x.views} uses`,
|
|
430
430
|
approved: x.approved,
|
|
431
|
-
|
|
431
|
+
kind: x.kind,
|
|
432
432
|
app: x.app,
|
|
433
433
|
views: x.views,
|
|
434
434
|
votes: x.votes,
|
|
@@ -464,14 +464,37 @@ export function flowToHubUrl(flow) {
|
|
|
464
464
|
url.searchParams.append('flow', encodeState(openFlow));
|
|
465
465
|
return url;
|
|
466
466
|
}
|
|
467
|
-
export function scriptToHubUrl(content, summary, description,
|
|
467
|
+
export function scriptToHubUrl(content, summary, description, kind) {
|
|
468
468
|
const url = new URL('https://hub.windmill.dev/scripts/add');
|
|
469
469
|
url.searchParams.append('content', content);
|
|
470
470
|
url.searchParams.append('summary', summary);
|
|
471
471
|
url.searchParams.append('description', description);
|
|
472
|
-
url.searchParams.append('
|
|
472
|
+
url.searchParams.append('kind', kind);
|
|
473
473
|
return url;
|
|
474
474
|
}
|
|
475
475
|
export function classNames(...classes) {
|
|
476
476
|
return classes.filter(Boolean).join(' ');
|
|
477
477
|
}
|
|
478
|
+
export function scriptLangToEditorLang(lang) {
|
|
479
|
+
if (lang == 'deno') {
|
|
480
|
+
return 'typescript';
|
|
481
|
+
}
|
|
482
|
+
else if (lang == 'python3') {
|
|
483
|
+
return 'python';
|
|
484
|
+
}
|
|
485
|
+
else {
|
|
486
|
+
return lang;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
export async function copyToClipboard(value, sendToast = true) {
|
|
490
|
+
let success = false;
|
|
491
|
+
if (navigator?.clipboard) {
|
|
492
|
+
success = await navigator.clipboard
|
|
493
|
+
.writeText(value)
|
|
494
|
+
.then(() => true)
|
|
495
|
+
.catch(() => false);
|
|
496
|
+
}
|
|
497
|
+
sendToast &&
|
|
498
|
+
sendUserToast(success ? 'Copied to clipboard!' : "Couldn't copy to clipboard", !success);
|
|
499
|
+
return success;
|
|
500
|
+
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<script>import { ScheduleService } from '../gen';
|
|
2
|
-
import { workspaceStore } from '../stores';
|
|
3
|
-
import FlowSettings from './flows/FlowSettings.svelte';
|
|
4
|
-
import { flowStateStore } from './flows/flowState';
|
|
5
|
-
import { flowStore } from './flows/flowStore';
|
|
6
|
-
import FlowTimeline from './flows/FlowTimeline.svelte';
|
|
7
|
-
export let pathError = '';
|
|
8
|
-
export let initialPath = '';
|
|
9
|
-
export let scheduleArgs = {};
|
|
10
|
-
export let scheduleEnabled = false;
|
|
11
|
-
export let scheduleCron = '0 */5 * * *';
|
|
12
|
-
export let previewArgs = {};
|
|
13
|
-
let scheduleLoaded = false;
|
|
14
|
-
async function loadSchedule() {
|
|
15
|
-
if (!scheduleLoaded) {
|
|
16
|
-
scheduleLoaded = true;
|
|
17
|
-
const existsSchedule = await ScheduleService.existsSchedule({
|
|
18
|
-
workspace: $workspaceStore ?? '',
|
|
19
|
-
path: initialPath
|
|
20
|
-
});
|
|
21
|
-
if (existsSchedule) {
|
|
22
|
-
const schedule = await ScheduleService.getSchedule({
|
|
23
|
-
workspace: $workspaceStore ?? '',
|
|
24
|
-
path: initialPath
|
|
25
|
-
});
|
|
26
|
-
scheduleEnabled = schedule.enabled;
|
|
27
|
-
scheduleCron = schedule.schedule;
|
|
28
|
-
scheduleArgs = schedule.args ?? {};
|
|
29
|
-
previewArgs = JSON.parse(JSON.stringify(scheduleArgs));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
$: if ($flowStore && $workspaceStore && initialPath != '') {
|
|
34
|
-
loadSchedule();
|
|
35
|
-
}
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
{#if $flowStateStore}
|
|
39
|
-
<div class="flex space-y-8 flex-col items-center">
|
|
40
|
-
<FlowTimeline bind:args={previewArgs} bind:flowModuleSchemas={$flowStateStore}>
|
|
41
|
-
<div slot="settings">
|
|
42
|
-
<FlowSettings
|
|
43
|
-
bind:pathError
|
|
44
|
-
bind:initialPath
|
|
45
|
-
bind:scheduleArgs
|
|
46
|
-
{previewArgs}
|
|
47
|
-
bind:scheduleCron
|
|
48
|
-
bind:scheduleEnabled
|
|
49
|
-
/>
|
|
50
|
-
</div>
|
|
51
|
-
</FlowTimeline>
|
|
52
|
-
</div>
|
|
53
|
-
{:else}
|
|
54
|
-
<h3>Loading flow</h3>
|
|
55
|
-
{/if}
|