(workflow: PersistedWorkflowDocument)
| 32 | } |
| 33 | |
| 34 | export function writeWorkflowToFile(workflow: PersistedWorkflowDocument): void { |
| 35 | const a = document.createElement('a') |
| 36 | a.download = 'workflow.json' |
| 37 | a.href = URL.createObjectURL(new Blob([JSON.stringify(workflow)], { type: 'application/json' })) |
| 38 | a.click() |
| 39 | } |
| 40 | |
| 41 | export async function safeLoadWorkflow(workflow: any, widgets: Widgets): Promise<PersistedWorkflowDocument> { |
| 42 | console.log("source workflow", workflow); |