windmill-components 1.121.0 → 1.122.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.
Files changed (59) hide show
  1. package/package/components/AppConnect.svelte +1 -1
  2. package/package/components/EditorBar.svelte +4 -4
  3. package/package/components/FlowPreviewContent.svelte +0 -1
  4. package/package/components/Path.svelte +1 -1
  5. package/package/components/SchemaEditor.svelte +1 -1
  6. package/package/components/SchemaForm.svelte +1 -1
  7. package/package/components/ScriptBuilder.svelte +6 -6
  8. package/package/components/ScriptEditor.svelte +1 -1
  9. package/package/components/apps/components/buttons/AppButton.svelte +1 -1
  10. package/package/components/apps/components/buttons/AppFormButton.svelte +1 -2
  11. package/package/components/apps/components/helpers/HiddenComponent.svelte +1 -1
  12. package/package/components/apps/components/helpers/RefreshButton.svelte +1 -1
  13. package/package/components/apps/components/helpers/RunnableComponent.svelte +5 -2
  14. package/package/components/apps/components/helpers/RunnableWrapper.svelte +1 -1
  15. package/package/components/apps/components/helpers/eval.d.ts +1 -1
  16. package/package/components/apps/components/helpers/eval.js +1 -1
  17. package/package/components/apps/components/inputs/AppCheckbox.svelte +1 -1
  18. package/package/components/apps/components/inputs/AppSelect.svelte +1 -1
  19. package/package/components/apps/components/layout/AppModal.svelte +1 -1
  20. package/package/components/apps/editor/AppEditorHeader.svelte +1 -1
  21. package/package/components/apps/editor/RecomputeAllComponents.svelte +2 -2
  22. package/package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +1 -1
  23. package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +4 -2
  24. package/package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +1 -1
  25. package/package/components/apps/editor/inlineScriptsPanel/RunButton.svelte +3 -3
  26. package/package/components/apps/editor/settingsPanel/Recompute.svelte +1 -1
  27. package/package/components/apps/types.d.ts +1 -1
  28. package/package/components/apps/utils.js +1 -1
  29. package/package/components/flows/CreateActionsApp.svelte +1 -1
  30. package/package/components/flows/content/FlowInputs.svelte +4 -4
  31. package/package/components/flows/content/FlowLoop.svelte +1 -1
  32. package/package/components/flows/content/FlowModuleCache.svelte +1 -1
  33. package/package/components/flows/content/FlowModuleEarlyStop.svelte +1 -1
  34. package/package/components/flows/content/FlowModuleSleep.svelte +1 -1
  35. package/package/components/flows/content/FlowModuleSuspend.svelte +1 -1
  36. package/package/components/flows/content/FlowRetries.svelte +1 -1
  37. package/package/components/flows/content/FlowSettings.svelte +5 -5
  38. package/package/components/sidebar/SidebarContent.svelte +1 -1
  39. package/package/consts.js +4 -2
  40. package/package/gen/core/OpenAPI.js +1 -1
  41. package/package/gen/index.d.ts +3 -0
  42. package/package/gen/models/CompletedJob.d.ts +4 -1
  43. package/package/gen/models/CompletedJob.js +3 -0
  44. package/package/gen/models/FlowModuleValue.d.ts +4 -1
  45. package/package/gen/models/Graphql.d.ts +3 -0
  46. package/package/gen/models/Graphql.js +4 -0
  47. package/package/gen/models/Http.d.ts +3 -0
  48. package/package/gen/models/Http.js +4 -0
  49. package/package/gen/models/Postgresql.d.ts +3 -0
  50. package/package/gen/models/Postgresql.js +4 -0
  51. package/package/gen/models/Preview.d.ts +10 -2
  52. package/package/gen/models/Preview.js +8 -0
  53. package/package/gen/models/QueuedJob.d.ts +4 -1
  54. package/package/gen/models/QueuedJob.js +3 -0
  55. package/package/init_scripts/python_init_code.d.ts +1 -1
  56. package/package/init_scripts/python_init_code.js +1 -1
  57. package/package/script_helpers.d.ts +1 -1
  58. package/package/script_helpers.js +1 -1
  59. package/package.json +8 -1
@@ -269,7 +269,7 @@ let filteredConnectsManual = [];
269
269
  >
270
270
  <DrawerContent title="Connect an API or add a Resource" on:close={drawer.closeDrawer}
271
271
  tooltip="Resources represent connections to third party systems. Learn more on how to integrate external APIs."
272
- documentationLink="https://docs.windmill.dev/docs/integrations/integrations_on_windmill">
272
+ documentationLink="https://www.windmill.dev/docs/integrations/integrations_on_windmill">
273
273
  {#if step == 1}
274
274
  <div class="w-12/12 pb-2 flex flex-row my-1 gap-1">
275
275
  <input
@@ -154,7 +154,7 @@ let historyBrowserDrawerOpen = false;
154
154
  }}
155
155
  tooltip="Contextual Variables are variables whose values are contextual to the Script
156
156
  execution. They are are automatically set by Windmill."
157
- documentationLink="https://docs.windmill.dev/docs/core_concepts/variables_and_secrets#contextual-variables"
157
+ documentationLink="https://www.windmill.dev/docs/core_concepts/variables_and_secrets#contextual-variables"
158
158
  itemName="Contextual Variable"
159
159
  extraField="name"
160
160
  loadItems={loadContextualVariables}
@@ -189,7 +189,7 @@ let historyBrowserDrawerOpen = false;
189
189
  sendUserToast(`${name} inserted at cursor`)
190
190
  }}
191
191
  tooltip="Variables are dynamic values that have a key associated to them and can be retrieved during the execution of a Script or Flow."
192
- documentationLink="https://docs.windmill.dev/docs/core_concepts/variables_and_secrets"
192
+ documentationLink="https://www.windmill.dev/docs/core_concepts/variables_and_secrets"
193
193
  itemName="Variable"
194
194
  extraField="path"
195
195
  loadItems={loadVariables}
@@ -239,7 +239,7 @@ let historyBrowserDrawerOpen = false;
239
239
  sendUserToast(`${path} inserted at cursor`)
240
240
  }}
241
241
  tooltip="Resources represent connections to third party systems. Resources are a good way to define a connection to a frequently used third party system such as a database."
242
- documentationLink="https://docs.windmill.dev/docs/core_concepts/resources_and_types"
242
+ documentationLink="https://www.windmill.dev/docs/core_concepts/resources_and_types"
243
243
  itemName="Resource"
244
244
  buttons={{ 'Edit/View': (x) => resourceEditor.initEdit(x) }}
245
245
  extraField="description"
@@ -281,7 +281,7 @@ let historyBrowserDrawerOpen = false;
281
281
  sendUserToast(`${name} inserted at cursor`)
282
282
  }}
283
283
  tooltip="Resources Types are the schemas associated with a Resource. They define the structure of the data that is returned from a Resource."
284
- documentationLink="https://docs.windmill.dev/docs/core_concepts/resources_and_types"
284
+ documentationLink="https://www.windmill.dev/docs/core_concepts/resources_and_types"
285
285
  itemName="Resource Type"
286
286
  extraField="name"
287
287
  loadItems={async () =>
@@ -126,7 +126,6 @@ let inputLibraryDrawer;
126
126
  requestBody: {}
127
127
  }))
128
128
  } catch {}
129
- jobId = undefined
130
129
  }}
131
130
  size="md"
132
131
  btnClasses="w-full max-w-lg"
@@ -308,7 +308,7 @@ async function addFolder() {
308
308
  <label class="block grow w-48">
309
309
  <span class="text-gray-700 text-sm"
310
310
  >Folder <Tooltip
311
- documentationLink="https://docs.windmill.dev/docs/core_concepts/groups_and_folders"
311
+ documentationLink="https://www.windmill.dev/docs/core_concepts/groups_and_folders"
312
312
  >Read and write permissions are given to groups and users at the folder level and
313
313
  shared by all items inside the folder.</Tooltip
314
314
  ></span
@@ -224,7 +224,7 @@ function displayInfoKey(displayInfo) {
224
224
  />
225
225
  <div class="ml-2">
226
226
  <Tooltip
227
- documentationLink="https://docs.windmill.dev/docs/reference/#script-parameters-to-json-schema"
227
+ documentationLink="https://www.windmill.dev/docs/reference/#script-parameters-to-json-schema"
228
228
  >
229
229
  Arguments can be edited either using the wizard, or by editing their JSON Schema
230
230
  </Tooltip>
@@ -136,7 +136,7 @@ loadResourceTypes();
136
136
  }}
137
137
  itemName="Variable"
138
138
  tooltip="Variables are dynamic values that have a key associated to them and can be retrieved during the execution of a Script or Flow."
139
- documentationLink="https://docs.windmill.dev/docs/core_concepts/variables_and_secrets"
139
+ documentationLink="https://www.windmill.dev/docs/core_concepts/variables_and_secrets"
140
140
  extraField="path"
141
141
  loadItems={async () =>
142
142
  (await VariableService.listVariable({ workspace: $workspaceStore ?? '' })).map((x) => ({
@@ -65,19 +65,19 @@ const scriptKindOptions = [
65
65
  value: Script.kind.TRIGGER,
66
66
  title: 'Trigger',
67
67
  desc: 'First module of flows to trigger them based on external changes. These kind of scripts are usually running on a schedule to periodically look for changes.',
68
- documentationLink: 'https://docs.windmill.dev/docs/flows/flow_trigger'
68
+ documentationLink: 'https://www.windmill.dev/docs/flows/flow_trigger'
69
69
  },
70
70
  {
71
71
  value: Script.kind.APPROVAL,
72
72
  title: 'Approval',
73
73
  desc: 'Send notifications externally to ask for approval to continue a flow.',
74
- documentationLink: 'https://docs.windmill.dev/docs/flows/flow_approval'
74
+ documentationLink: 'https://www.windmill.dev/docs/flows/flow_approval'
75
75
  },
76
76
  {
77
77
  value: Script.kind.FAILURE,
78
78
  title: 'Error Handler',
79
79
  desc: 'Handle errors in flows after all retry attempts have been exhausted.',
80
- documentationLink: 'https://docs.windmill.dev/docs/flows/flow_error_handler'
80
+ documentationLink: 'https://www.windmill.dev/docs/flows/flow_error_handler'
81
81
  }
82
82
  ];
83
83
  let pathError = '';
@@ -295,7 +295,7 @@ function onKeyDown(event) {
295
295
  {
296
296
  label: 'Learn more',
297
297
  callback: () => {
298
- window.open('https://docs.windmill.dev/docs/advanced/docker', '_blank')
298
+ window.open('https://www.windmill.dev/docs/advanced/docker', '_blank')
299
299
  }
300
300
  }
301
301
  ]
@@ -334,7 +334,7 @@ function onKeyDown(event) {
334
334
 
335
335
  <h2 class="border-b pb-1 mt-10 mb-4"
336
336
  >Worker group tag <Tooltip
337
- documentationLink="https://docs.windmill.dev/docs/core_concepts/worker_groups"
337
+ documentationLink="https://www.windmill.dev/docs/core_concepts/worker_groups"
338
338
  >The script will be executed on a worker configured to accept its worker group tag. For
339
339
  instance, you could setup an "highmem", or "gpu" worker group.</Tooltip
340
340
  ></h2
@@ -369,7 +369,7 @@ function onKeyDown(event) {
369
369
  {#if !isCloudHosted()}
370
370
  <h2 class="border-b pb-1 mt-10 mb-4"
371
371
  >Custom env variables<Tooltip
372
- documentationLink="https://docs.windmill.dev/docs/reference#custom-environment-variables"
372
+ documentationLink="https://www.windmill.dev/docs/reference#custom-environment-variables"
373
373
  >Additional static custom env variables to pass to the script.</Tooltip
374
374
  ></h2
375
375
  >
@@ -209,7 +209,7 @@ function collabUrl() {
209
209
  <div class="py-1">
210
210
  <Button
211
211
  target="_blank"
212
- href="https://docs.windmill.dev/docs/cli_local_dev/vscode-extension"
212
+ href="https://www.windmill.dev/docs/cli_local_dev/vscode-extension"
213
213
  color="light"
214
214
  size="xs"
215
215
  btnClasses="mr-1 hidden lg:block"
@@ -60,7 +60,7 @@ async function handleClick(event) {
60
60
  await preclickAction();
61
61
  }
62
62
  if (!runnableComponent) {
63
- runnableWrapper?.onSuccess?.();
63
+ runnableWrapper?.handleSideEffect(true);
64
64
  }
65
65
  else {
66
66
  await runnableComponent?.runComponent();
@@ -92,11 +92,10 @@ let modal;
92
92
  }}
93
93
  on:click={async () => {
94
94
  if (!runnableComponent) {
95
- runnableWrapper?.onSuccess()
95
+ runnableWrapper?.handleSideEffect(true)
96
96
  } else {
97
97
  await runnableComponent?.runComponent()
98
98
  }
99
- console.log('close')
100
99
  modal?.close()
101
100
  }}
102
101
  size="xs"
@@ -8,7 +8,7 @@ const { worldStore, staticExporter, noBackend, runnableComponents } = getContext
8
8
  let result = noBackend ? runnable.noBackendValue : undefined;
9
9
  export function onSuccess() {
10
10
  if (runnable.recomputeIds) {
11
- runnable.recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb());
11
+ runnable.recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb()));
12
12
  }
13
13
  }
14
14
  onMount(() => {
@@ -4,7 +4,7 @@ export let componentId;
4
4
  export let loading;
5
5
  const { runnableComponents } = getContext('AppViewerContext');
6
6
  async function refresh() {
7
- await $runnableComponents[componentId]?.cb?.();
7
+ await $runnableComponents[componentId]?.cb?.map((cb) => cb());
8
8
  }
9
9
  </script>
10
10
 
@@ -291,7 +291,7 @@ onMount(() => {
291
291
  $runnableComponents[id] = {
292
292
  autoRefresh: autoRefresh && recomputableByRefreshButton,
293
293
  refreshOnStart: refreshOnStart,
294
- cb: cancellableRun
294
+ cb: [...($runnableComponents[id]?.cb ?? []), cancellableRun]
295
295
  };
296
296
  if (!$initialized.initializedComponents.includes(id)) {
297
297
  $initialized.initializedComponents = [...$initialized.initializedComponents, id];
@@ -300,7 +300,10 @@ onMount(() => {
300
300
  onDestroy(() => {
301
301
  $initialized.initializedComponents = $initialized.initializedComponents.filter((c) => c !== id);
302
302
  $errorByComponent = clearErrorByComponentId(id, $errorByComponent);
303
- delete $runnableComponents[id];
303
+ $runnableComponents[id] = {
304
+ ...$runnableComponents[id],
305
+ cb: $runnableComponents[id].cb.filter((cb) => cb !== cancellableRun)
306
+ };
304
307
  $runnableComponents = $runnableComponents;
305
308
  });
306
309
  let lastJobId = undefined;
@@ -48,7 +48,7 @@ function isRunnableDefined(componentInput) {
48
48
  export function handleSideEffect(success, errorMessage) {
49
49
  const sideEffect = success ? doOnSuccess : doOnError;
50
50
  if (recomputeIds && success) {
51
- recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb());
51
+ recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb.map((cb) => cb()));
52
52
  }
53
53
  if (!sideEffect)
54
54
  return;
@@ -9,5 +9,5 @@ export declare function eval_like(text: string, context: {} | undefined, noRetur
9
9
  setValue?: (value: any) => void;
10
10
  setSelectedIndex?: (index: number) => void;
11
11
  }>, worldStore: World | undefined, runnableComponents: Record<string, {
12
- cb?: () => void;
12
+ cb?: (() => void)[];
13
13
  }>): Promise<any>;
@@ -89,7 +89,7 @@ export async function eval_like(text, context = {}, noReturn, state, editor, con
89
89
  }, (id, index) => {
90
90
  controlComponents[id]?.setTab?.(index);
91
91
  }, (id) => {
92
- runnableComponents[id]?.cb?.();
92
+ runnableComponents[id]?.cb?.forEach((f) => f());
93
93
  }, (id) => {
94
94
  return controlComponents[id]?.agGrid;
95
95
  }, (id, value) => {
@@ -40,7 +40,7 @@ function handleInput() {
40
40
  listInputs(id, value);
41
41
  }
42
42
  if (recomputeIds) {
43
- recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb());
43
+ recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb?.forEach((cb) => cb()));
44
44
  }
45
45
  }
46
46
  function handleDefault() {
@@ -81,7 +81,7 @@ function setValue(nvalue) {
81
81
  listInputs(id, result);
82
82
  }
83
83
  if (recomputeIds) {
84
- recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb());
84
+ recomputeIds.forEach((id) => $runnableComponents?.[id]?.cb?.forEach((f) => f()));
85
85
  }
86
86
  }
87
87
  function onClear() {
@@ -86,7 +86,7 @@ let resolvedConfig = initConfig(components['modalcomponent'].initialData.configu
86
86
  `${
87
87
  $mode == 'dnd' ? 'absolute' : 'fixed'
88
88
  } top-0 bottom-0 left-0 right-0 transition-all duration-50`,
89
- open ? 'z-[1100] bg-black bg-opacity-60' : 'hidden'
89
+ open ? 'z-[1100] bg-black bg-opacity-60' : 'h-0 overflow-hidden'
90
90
  )}
91
91
  >
92
92
  <div
@@ -469,7 +469,7 @@ function onKeyDown(event) {
469
469
  title="Debug Runs"
470
470
  on:close={() => ($jobsDrawerOpen = false)}
471
471
  tooltip="Look at latests runs to spot potential bugs."
472
- documentationLink="https://docs.windmill.dev/docs/apps/app_debugging"
472
+ documentationLink="https://www.windmill.dev/docs/apps/app_debugging"
473
473
  >
474
474
  <Splitpanes class="!overflow-visible">
475
475
  <Pane size={25}>
@@ -43,12 +43,12 @@ function refresh() {
43
43
  }
44
44
  loading = true;
45
45
  const promises = Object.keys($runnableComponents)
46
- .map((id) => {
46
+ .flatMap((id) => {
47
47
  if (!$runnableComponents?.[id]?.autoRefresh &&
48
48
  (!isFirstLoad || !$runnableComponents?.[id]?.refreshOnStart)) {
49
49
  return;
50
50
  }
51
- return $runnableComponents?.[id]?.cb?.();
51
+ return $runnableComponents?.[id]?.cb?.map((f) => f());
52
52
  })
53
53
  .filter(Boolean);
54
54
  Promise.all(promises).finally(() => {
@@ -184,7 +184,7 @@ const langs = ['deno', 'python3', 'go', 'bash'];
184
184
  <div class="mb-1 text-sm font-semibold">
185
185
  Frontend
186
186
  <Tooltip
187
- documentationLink="https://docs.windmill.dev/docs/apps/app-runnable-panel#frontend-scripts"
187
+ documentationLink="https://www.windmill.dev/docs/apps/app-runnable-panel#frontend-scripts"
188
188
  >
189
189
  Frontend scripts are executed in the browser and can manipulate the app context directly.
190
190
  </Tooltip>
@@ -184,7 +184,7 @@ let drawerIsOpen = undefined;
184
184
  inlineScript.content = editor?.getCode() ?? ''
185
185
  }
186
186
  runLoading = true
187
- await $runnableComponents[id]?.cb?.(inlineScript)
187
+ await Promise.all($runnableComponents[id]?.cb?.map((f) => f?.(inlineScript)) ?? [])
188
188
  runLoading = false
189
189
  }}
190
190
  on:change={async (e) => {
@@ -211,7 +211,9 @@ let drawerIsOpen = undefined;
211
211
  lang="javascript"
212
212
  cmdEnterAction={async () => {
213
213
  runLoading = true
214
- await $runnableComponents[id]?.cb?.(!transformer ? inlineScript : undefined)
214
+ await await Promise.all(
215
+ $runnableComponents[id]?.cb?.map((f) => f(!transformer ? inlineScript : undefined))
216
+ )
215
217
  runLoading = false
216
218
  }}
217
219
  on:change={() => {
@@ -144,7 +144,7 @@ function createBackgroundScript() {
144
144
  Background runnables
145
145
  <Tooltip
146
146
  class="mb-0.5"
147
- documentationLink="https://docs.windmill.dev/docs/apps/app-runnable-panel#background-runnables"
147
+ documentationLink="https://www.windmill.dev/docs/apps/app-runnable-panel#background-runnables"
148
148
  >
149
149
  Background runnables can be triggered on app refresh or when their input changes. The
150
150
  result can be shared among many components.
@@ -21,8 +21,8 @@ let cancelable = undefined;
21
21
  on:click={async () => {
22
22
  runLoading = true
23
23
  try {
24
- cancelable = $runnableComponents[id]?.cb?.(inlineScript)
25
- await cancelable
24
+ cancelable = $runnableComponents[id]?.cb?.map((f) => f(inlineScript))
25
+ await Promise.all(cancelable)
26
26
  } catch {}
27
27
  runLoading = false
28
28
  }}
@@ -44,7 +44,7 @@ let cancelable = undefined;
44
44
  variant="border"
45
45
  btnClasses="!px-2 !py-1.5"
46
46
  on:click={async () => {
47
- cancelable?.cancel()
47
+ cancelable?.forEach((f) => f.cancel())
48
48
  runLoading = false
49
49
  }}
50
50
  >
@@ -18,7 +18,7 @@ function onChange(checked, id) {
18
18
  <PanelSection
19
19
  title="Trigger Runnable"
20
20
  tooltip="Select components to recompute after running this runnable as a success"
21
- documentationLink="https://docs.windmill.dev/docs/apps/app-runnable-panel#recompute-others"
21
+ documentationLink="https://www.windmill.dev/docs/apps/app-runnable-panel#recompute-others"
22
22
  >
23
23
  {#if Object.keys($runnableComponents ?? {}).filter((id) => id !== ownId).length > 0}
24
24
  <table class="divide-y divide-gray-300 border w-full">
@@ -118,7 +118,7 @@ export type AppViewerContext = {
118
118
  runnableComponents: Writable<Record<string, {
119
119
  autoRefresh: boolean;
120
120
  refreshOnStart?: boolean;
121
- cb: (inlineScript?: InlineScript) => CancelablePromise<void>;
121
+ cb: ((inlineScript?: InlineScript) => CancelablePromise<void>)[];
122
122
  }>>;
123
123
  staticExporter: Writable<Record<string, () => any>>;
124
124
  appPath: string;
@@ -167,7 +167,7 @@ declare const iter: {index: number, value: any};
167
167
  `;
168
168
  }
169
169
  export function getAllScriptNames(app) {
170
- const names = app.grid.reduce((acc, gridItem) => {
170
+ const names = allItems(app.grid, app?.subgrids).reduce((acc, gridItem) => {
171
171
  const { componentInput } = gridItem.data;
172
172
  if (componentInput?.type === 'runnable' &&
173
173
  componentInput?.runnable?.type === 'runnableByName') {
@@ -87,7 +87,7 @@ async function importRawApp() {
87
87
 
88
88
  <h2 class="border-b pb-1 mt-10 mb-4"
89
89
  >IIFE JS code <Tooltip
90
- documentationLink="https://docs.windmill.dev/docs/react_vue_svelte_apps/react"
90
+ documentationLink="https://www.windmill.dev/docs/react_vue_svelte_apps/react"
91
91
  >Bundle that contains an IIFE code that will mount itself to a "root" element. Any framework
92
92
  or vanilla JS can be used to create an app and templates are provided for the major
93
93
  frameworks: React/Vue/Svelte. In those frontend apps, it is possible to inline scripts
@@ -47,7 +47,7 @@ let filter = '';
47
47
  startIcon={{ icon: faBolt }}
48
48
  >
49
49
  Trigger &nbsp;<Tooltip
50
- documentationLink="https://docs.windmill.dev/docs/flows/flow_trigger"
50
+ documentationLink="https://www.windmill.dev/docs/flows/flow_trigger"
51
51
  >
52
52
  Used as a first step most commonly with a state and a schedule to watch for
53
53
  changes on an external system, compute the diff since last time and set the new
@@ -57,7 +57,7 @@ let filter = '';
57
57
  {/if}
58
58
  <ToggleButton position="right" value="approval" size="sm" startIcon={{ icon: faCheck }}>
59
59
  Approval &nbsp;<Tooltip
60
- documentationLink="https://docs.windmill.dev/docs/flows/flow_approval"
60
+ documentationLink="https://www.windmill.dev/docs/flows/flow_approval"
61
61
  >
62
62
  An approval step will suspend the execution of a flow until it has been approved
63
63
  through the resume endpoints or the approval page by and solely by the recipients of
@@ -77,7 +77,7 @@ let filter = '';
77
77
  {/if}
78
78
  <h3 class="pb-2 pt-4">
79
79
  Inline new <span class="text-blue-500">{kind == 'script' ? 'action' : kind}</span> script
80
- <Tooltip documentationLink="https://docs.windmill.dev/docs/flows/flow_error_handler">
80
+ <Tooltip documentationLink="https://www.windmill.dev/docs/flows/flow_error_handler">
81
81
  Embed a script directly inside a flow instead of saving the script into your workspace for
82
82
  reuse. You can always save an inline script to your workspace later.
83
83
  </Tooltip>
@@ -154,7 +154,7 @@ let filter = '';
154
154
  {
155
155
  label: 'Learn more',
156
156
  callback: () => {
157
- window.open('https://docs.windmill.dev/docs/advanced/docker', '_blank')
157
+ window.open('https://www.windmill.dev/docs/advanced/docker', '_blank')
158
158
  }
159
159
  }
160
160
  ]
@@ -33,7 +33,7 @@ $: stepPropPicker = getStepPropPicker($flowStateStore, parentModule, previousMod
33
33
  Iterator expression
34
34
  <Tooltip>
35
35
  List to iterate over. For more information see the
36
- <a href="https://docs.windmill.dev/docs/getting_started/flows_quickstart">docs.</a>
36
+ <a href="https://www.windmill.dev/docs/getting_started/flows_quickstart">docs.</a>
37
37
  </Tooltip>
38
38
  </div>
39
39
  {#if mod.value.iterator.type == 'javascript'}
@@ -7,7 +7,7 @@ $: isCacheEnabled = Boolean(flowModule.cache_ttl);
7
7
 
8
8
  <h2 class="pb-4">
9
9
  Cache
10
- <Tooltip documentationLink="https://docs.windmill.dev/docs/flows/cache">
10
+ <Tooltip documentationLink="https://www.windmill.dev/docs/flows/cache">
11
11
  If defined, the result of the step will be cached for the number of seconds defined such that if
12
12
  this step were to be re-triggered with the same input it would retrieve and return its cached
13
13
  value instead of recomputing it.
@@ -14,7 +14,7 @@ $: result = $flowStateStore[flowModule.id]?.previewResult ?? NEVER_TESTED_THIS_F
14
14
  <div class="flex flex-col items-start space-y-2 {$$props.class}">
15
15
  <h2 class="pb-4">
16
16
  Early stop/Break
17
- <Tooltip documentationLink="https://docs.windmill.dev/docs/flows/early_stop">
17
+ <Tooltip documentationLink="https://www.windmill.dev/docs/flows/early_stop">
18
18
  If defined, at the end of the step, the predicate expression will be evaluated to decide if
19
19
  the flow should stop early.
20
20
  </Tooltip>
@@ -19,7 +19,7 @@ $: isSleepEnabled = Boolean(flowModule.sleep);
19
19
 
20
20
  <h2 class="pb-4">
21
21
  Sleep
22
- <Tooltip documentationLink="https://docs.windmill.dev/docs/flows/sleep">
22
+ <Tooltip documentationLink="https://www.windmill.dev/docs/flows/sleep">
23
23
  If defined, at the end of the step, the flow will sleep for a number of seconds before
24
24
  scheduling the next job (if any, no effect if the step is the last one).
25
25
  </Tooltip>
@@ -10,7 +10,7 @@ $: isSuspendEnabled = Boolean(flowModule.suspend);
10
10
 
11
11
  <h2 class="pb-4">
12
12
  Suspend/Approval
13
- <Tooltip documentationLink="https://docs.windmill.dev/docs/flows/flow_approval">
13
+ <Tooltip documentationLink="https://www.windmill.dev/docs/flows/flow_approval">
14
14
  If defined, at the end of the step, the flow will be suspended until it receives external
15
15
  requests to be resumed or canceled. This is most useful to implement approval steps but can be
16
16
  used flexibly for other purpose.
@@ -28,7 +28,7 @@ $: isExponentialRetryEnabled = Boolean(flowModule.retry?.exponential);
28
28
  <div class="h-full flex flex-col {$$props.class ?? ''}">
29
29
  <h2>
30
30
  Retries
31
- <Tooltip documentationLink="https://docs.windmill.dev/docs/flows/retries">
31
+ <Tooltip documentationLink="https://www.windmill.dev/docs/flows/retries">
32
32
  If defined, upon error this step will be retried with a delay and a maximum number of attempts
33
33
  as defined below.
34
34
  </Tooltip>
@@ -66,7 +66,7 @@ $: syncedUrl = `${hostname}/api/w/${$workspaceStore}/jobs/run_wait_result/f/${$f
66
66
  <ul class="pt-4">
67
67
  <li>
68
68
  1. <a
69
- href="https://docs.windmill.dev/docs/core_concepts/auto_generated_uis"
69
+ href="https://www.windmill.dev/docs/core_concepts/auto_generated_uis"
70
70
  target="_blank">Auto-generated UIs</a
71
71
  >
72
72
  </li>
@@ -77,7 +77,7 @@ $: syncedUrl = `${hostname}/api/w/${$workspaceStore}/jobs/run_wait_result/f/${$f
77
77
  3. <a href="/schedules" target="_blank">Scheduling</a>
78
78
  </li>
79
79
  <li>
80
- 4. <a href="https://docs.windmill.dev/docs/advanced/cli" target="_blank"
80
+ 4. <a href="https://www.windmill.dev/docs/advanced/cli" target="_blank"
81
81
  >Windmill CLI</a
82
82
  >
83
83
  </li>
@@ -89,7 +89,7 @@ $: syncedUrl = `${hostname}/api/w/${$workspaceStore}/jobs/run_wait_result/f/${$f
89
89
  </li>
90
90
  <li class="mt-2">
91
91
  5. Send a <a
92
- href="https://docs.windmill.dev/docs/core_concepts/webhooks"
92
+ href="https://www.windmill.dev/docs/core_concepts/webhooks"
93
93
  target="_blank">webhook</a
94
94
  >
95
95
  after each event:
@@ -133,7 +133,7 @@ $: syncedUrl = `${hostname}/api/w/${$workspaceStore}/jobs/run_wait_result/f/${$f
133
133
  <br />
134
134
  <li>
135
135
  6. Use a <a
136
- href="https://docs.windmill.dev/docs/flows/flow_trigger"
136
+ href="https://www.windmill.dev/docs/flows/flow_trigger"
137
137
  target="_blank">trigger script</a
138
138
  >
139
139
  and schedule this flow to run as frequently as needed and compare a state persisted
@@ -156,7 +156,7 @@ $: syncedUrl = `${hostname}/api/w/${$workspaceStore}/jobs/run_wait_result/f/${$f
156
156
  <Alert
157
157
  type="info"
158
158
  title="Primary Schedule"
159
- documentationLink="https://docs.windmill.dev/docs/core_concepts/scheduling"
159
+ documentationLink="https://www.windmill.dev/docs/core_concepts/scheduling"
160
160
  >
161
161
  Flows can be triggered by any schedules, their webhooks or their UI but they only have
162
162
  only one primary schedules with which they share the same path. The primary schedule
@@ -23,7 +23,7 @@ $: secondaryMenuLinks = [
23
23
  { label: 'Workers', href: '/workers', icon: faRobot, disabled: $userStore?.operator }
24
24
  ];
25
25
  const thirdMenuLinks = [
26
- { label: 'Docs', href: 'https://docs.windmill.dev/docs/intro/', icon: faBookOpen },
26
+ { label: 'Docs', href: 'https://www.windmill.dev/docs/intro/', icon: faBookOpen },
27
27
  { label: 'Feedbacks', href: 'https://discord.gg/V7PM2YHsPB', icon: faDiscord },
28
28
  {
29
29
  label: 'Issues',
package/package/consts.js CHANGED
@@ -19,9 +19,11 @@ export const SCRIPT_VIEW_SHOW_EXAMPLE_CURL = strToBool(import.meta.env.VITE_SCRI
19
19
  export const SCRIPT_VIEW_SHOW_CREATE_TOKEN_BUTTON = strToBool(import.meta.env.VITE_SCRIPT_VIEW_SHOW_CREATE_TOKEN_BUTTON);
20
20
  export const SCRIPT_VIEW_SHOW_RUN_FROM_CLI = strToBool(import.meta.env.VITE_SCRIPT_VIEW_SHOW_RUN_FROM_CLI);
21
21
  export const SCRIPT_VIEW_SHOW_SCHEDULE_RUN_LATER = strToBool(import.meta.env.VITE_SCRIPT_VIEW_SHOW_SCHEDULE_RUN_LATER);
22
- export const SCRIPT_VIEW_WEBHOOK_INFO_TIP = import.meta.env.VITE_SCRIPT_VIEW_WEBHOOK_INFO_TIP || `Pass the input as a json payload, the token as a Bearer token (header: 'Authorization:
22
+ export const SCRIPT_VIEW_WEBHOOK_INFO_TIP = import.meta.env.VITE_SCRIPT_VIEW_WEBHOOK_INFO_TIP ||
23
+ `Pass the input as a json payload, the token as a Bearer token (header: 'Authorization:
23
24
  Bearer XXXX') or as query arg \`?token=XXX\`, and pass as header: 'Content-Type:
24
25
  application/json'`;
25
- export const SCRIPT_VIEW_WEBHOOK_INFO_LINK = import.meta.env.VITE_SCRIPT_VIEW_WEBHOOK_INFO_LINK || 'https://docs.windmill.dev/docs/core_concepts/webhooks';
26
+ export const SCRIPT_VIEW_WEBHOOK_INFO_LINK = import.meta.env.VITE_SCRIPT_VIEW_WEBHOOK_INFO_LINK ||
27
+ 'https://www.windmill.dev/docs/core_concepts/webhooks';
26
28
  export const SCRIPT_EDITOR_SHOW_EXPLORE_OTHER_SCRIPTS = strToBool(import.meta.env.VITE_SCRIPT_EDITOR_SHOW_EXPLORE_OTHER_SCRIPTS);
27
29
  export const SCRIPT_CUSTOMISE_SHOW_KIND = strToBool(import.meta.env.VITE_SCRIPT_CUSTOMISE_SHOW_KIND);
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: '/api',
3
- VERSION: '1.119.0',
3
+ VERSION: '1.122.0',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -29,7 +29,9 @@ export type { FlowValue } from './models/FlowValue';
29
29
  export type { Folder } from './models/Folder';
30
30
  export type { ForloopFlow } from './models/ForloopFlow';
31
31
  export { GlobalUserInfo } from './models/GlobalUserInfo';
32
+ export type { Graphql } from './models/Graphql';
32
33
  export type { Group } from './models/Group';
34
+ export type { Http } from './models/Http';
33
35
  export type { Identity } from './models/Identity';
34
36
  export type { Input } from './models/Input';
35
37
  export type { InputTransform } from './models/InputTransform';
@@ -52,6 +54,7 @@ export type { OpenFlowWPath } from './models/OpenFlowWPath';
52
54
  export type { PathFlow } from './models/PathFlow';
53
55
  export type { PathScript } from './models/PathScript';
54
56
  export { Policy } from './models/Policy';
57
+ export type { Postgresql } from './models/Postgresql';
55
58
  export { Preview } from './models/Preview';
56
59
  export { QueuedJob } from './models/QueuedJob';
57
60
  export { RawScript } from './models/RawScript';
@@ -46,7 +46,10 @@ export declare namespace CompletedJob {
46
46
  FLOW = "flow",
47
47
  FLOWPREVIEW = "flowpreview",
48
48
  SCRIPT_HUB = "script_hub",
49
- IDENTITY = "identity"
49
+ IDENTITY = "identity",
50
+ HTTP = "http",
51
+ GRAPHQL = "graphql",
52
+ POSTGRESQL = "postgresql"
50
53
  }
51
54
  enum language {
52
55
  PYTHON3 = "python3",
@@ -12,6 +12,9 @@ export var CompletedJob;
12
12
  job_kind["FLOWPREVIEW"] = "flowpreview";
13
13
  job_kind["SCRIPT_HUB"] = "script_hub";
14
14
  job_kind["IDENTITY"] = "identity";
15
+ job_kind["HTTP"] = "http";
16
+ job_kind["GRAPHQL"] = "graphql";
17
+ job_kind["POSTGRESQL"] = "postgresql";
15
18
  })(job_kind = CompletedJob.job_kind || (CompletedJob.job_kind = {}));
16
19
  let language;
17
20
  (function (language) {
@@ -1,8 +1,11 @@
1
1
  import type { BranchAll } from './BranchAll';
2
2
  import type { BranchOne } from './BranchOne';
3
3
  import type { ForloopFlow } from './ForloopFlow';
4
+ import type { Graphql } from './Graphql';
5
+ import type { Http } from './Http';
4
6
  import type { Identity } from './Identity';
5
7
  import type { PathFlow } from './PathFlow';
6
8
  import type { PathScript } from './PathScript';
9
+ import type { Postgresql } from './Postgresql';
7
10
  import type { RawScript } from './RawScript';
8
- export type FlowModuleValue = (RawScript | PathScript | PathFlow | ForloopFlow | BranchOne | BranchAll | Identity);
11
+ export type FlowModuleValue = (RawScript | PathScript | PathFlow | ForloopFlow | BranchOne | BranchAll | Identity | Postgresql | Http | Graphql);
@@ -0,0 +1,3 @@
1
+ export type Graphql = {
2
+ type: 'graphql';
3
+ };
@@ -0,0 +1,4 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export {};
@@ -0,0 +1,3 @@
1
+ export type Http = {
2
+ type: 'http';
3
+ };
@@ -0,0 +1,4 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export {};
@@ -0,0 +1,3 @@
1
+ export type Postgresql = {
2
+ type: 'postgresql';
3
+ };
@@ -0,0 +1,4 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export {};
@@ -1,10 +1,11 @@
1
1
  import type { ScriptArgs } from './ScriptArgs';
2
2
  export type Preview = {
3
- content: string;
3
+ content?: string;
4
4
  path?: string;
5
5
  args: ScriptArgs;
6
- language: Preview.language;
6
+ language?: Preview.language;
7
7
  tag?: string;
8
+ kind?: Preview.kind;
8
9
  };
9
10
  export declare namespace Preview {
10
11
  enum language {
@@ -13,4 +14,11 @@ export declare namespace Preview {
13
14
  GO = "go",
14
15
  BASH = "bash"
15
16
  }
17
+ enum kind {
18
+ CODE = "code",
19
+ IDENTITY = "identity",
20
+ GRAPHQL = "graphql",
21
+ POSTGRESQL = "postgresql",
22
+ HTTP = "http"
23
+ }
16
24
  }
@@ -10,4 +10,12 @@ export var Preview;
10
10
  language["GO"] = "go";
11
11
  language["BASH"] = "bash";
12
12
  })(language = Preview.language || (Preview.language = {}));
13
+ let kind;
14
+ (function (kind) {
15
+ kind["CODE"] = "code";
16
+ kind["IDENTITY"] = "identity";
17
+ kind["GRAPHQL"] = "graphql";
18
+ kind["POSTGRESQL"] = "postgresql";
19
+ kind["HTTP"] = "http";
20
+ })(kind = Preview.kind || (Preview.kind = {}));
13
21
  })(Preview || (Preview = {}));
@@ -44,7 +44,10 @@ export declare namespace QueuedJob {
44
44
  FLOW = "flow",
45
45
  FLOWPREVIEW = "flowpreview",
46
46
  SCRIPT_HUB = "script_hub",
47
- IDENTITY = "identity"
47
+ IDENTITY = "identity",
48
+ HTTP = "http",
49
+ POSTGRESQL = "postgresql",
50
+ GRAPHQL = "graphql"
48
51
  }
49
52
  enum language {
50
53
  PYTHON3 = "python3",
@@ -12,6 +12,9 @@ export var QueuedJob;
12
12
  job_kind["FLOWPREVIEW"] = "flowpreview";
13
13
  job_kind["SCRIPT_HUB"] = "script_hub";
14
14
  job_kind["IDENTITY"] = "identity";
15
+ job_kind["HTTP"] = "http";
16
+ job_kind["POSTGRESQL"] = "postgresql";
17
+ job_kind["GRAPHQL"] = "graphql";
15
18
  })(job_kind = QueuedJob.job_kind || (QueuedJob.job_kind = {}));
16
19
  let language;
17
20
  (function (language) {
@@ -1,2 +1,2 @@
1
- declare const _default: "import os\nimport wmill\n\n# You can import any PyPi package. \n# See here for more info: https://docs.windmill.dev/docs/advanced/imports#python\n\n# you can use typed resources by doing a type alias to dict\n#postgresql = dict\n\ndef main(\n no_default: str,\n #db: postgresql,\n name=\"Nicolas Bourbaki\",\n age=42,\n obj: dict = {\"even\": \"dicts\"},\n l: list = [\"or\", \"lists!\"],\n file_: bytes = bytes(0),\n):\n\n print(f\"Hello World and a warm welcome especially to {name}\")\n print(\"and its acolytes..\", age, obj, l, len(file_))\n\n # retrieve variables, resources, states using the wmill client\n try:\n secret = wmill.get_variable(\"f/examples/secret\")\n except:\n secret = \"No secret yet at f/examples/secret !\"\n print(f\"The variable at `f/examples/secret`: {secret}\")\n\n # Get last state of this script execution by the same trigger/user\n last_state = wmill.get_state()\n new_state = {\"foo\": 42} if last_state is None else last_state\n new_state[\"foo\"] += 1\n wmill.set_state(new_state)\n\n # fetch context variables\n user = os.environ.get(\"WM_USERNAME\")\n\n # return value is converted to JSON\n return {\"splitted\": name.split(), \"user\": user, \"state\": new_state}";
1
+ declare const _default: "import os\nimport wmill\n\n# You can import any PyPi package. \n# See here for more info: https://www.windmill.dev/docs/advanced/imports#python\n\n# you can use typed resources by doing a type alias to dict\n#postgresql = dict\n\ndef main(\n no_default: str,\n #db: postgresql,\n name=\"Nicolas Bourbaki\",\n age=42,\n obj: dict = {\"even\": \"dicts\"},\n l: list = [\"or\", \"lists!\"],\n file_: bytes = bytes(0),\n):\n\n print(f\"Hello World and a warm welcome especially to {name}\")\n print(\"and its acolytes..\", age, obj, l, len(file_))\n\n # retrieve variables, resources, states using the wmill client\n try:\n secret = wmill.get_variable(\"f/examples/secret\")\n except:\n secret = \"No secret yet at f/examples/secret !\"\n print(f\"The variable at `f/examples/secret`: {secret}\")\n\n # Get last state of this script execution by the same trigger/user\n last_state = wmill.get_state()\n new_state = {\"foo\": 42} if last_state is None else last_state\n new_state[\"foo\"] += 1\n wmill.set_state(new_state)\n\n # fetch context variables\n user = os.environ.get(\"WM_USERNAME\")\n\n # return value is converted to JSON\n return {\"splitted\": name.split(), \"user\": user, \"state\": new_state}";
2
2
  export default _default;
@@ -2,7 +2,7 @@ export default `import os
2
2
  import wmill
3
3
 
4
4
  # You can import any PyPi package.
5
- # See here for more info: https://docs.windmill.dev/docs/advanced/imports#python
5
+ # See here for more info: https://www.windmill.dev/docs/advanced/imports#python
6
6
 
7
7
  # you can use typed resources by doing a type alias to dict
8
8
  #postgresql = dict
@@ -16,6 +16,6 @@ export declare const BASH_INIT_CODE = "# shellcheck shell=bash\n# arguments of t
16
16
  export declare const DENO_INIT_CODE_TRIGGER: string;
17
17
  export declare const GO_INIT_CODE_TRIGGER = "package inner\n\nimport (\n\twmill \"github.com/windmill-labs/windmill-go-client\"\n)\n\nfunc main() (interface{}, error) {\n\n\t// A common trigger script would follow this pattern:\n\t// 1. Get the last saved state\n\tstate, _ := wmill.GetState()\n\t// 2. Get the actual state from the external service\n\t// newState := ...\n\t// 3. Compare the two states and update the internal state\n\twmill.SetState(4)\n\t// 4. Return the new rows\n\n\treturn state, nil\n\n\t// In subsequent scripts, you may refer to each row/value returned by the trigger script using\n\t// 'flow_input.iter.value'\n}\n";
18
18
  export declare const DENO_INIT_CODE_APPROVAL = "import * as wmill from \"https://deno.land/x/windmill@v1.99.0/mod.ts\"\n\nexport async function main(approver?: string) {\n return wmill.getResumeEndpoints(approver)\n}";
19
- export declare const DOCKER_INIT_CODE = "# shellcheck shell=bash\n# Bash script that calls docker as a client to the host daemon\n# See documentation: https://docs.windmill.dev/docs/advanced/docker\nmsg=\"${1:-world}\"\n\nIMAGE=\"alpine:latest\"\nCOMMAND=\"/bin/echo Hello $msg\"\n\n# ensure that the image is up-to-date\ndocker pull $IMAGE\ndocker run --rm $IMAGE $COMMAND\n";
19
+ export declare const DOCKER_INIT_CODE = "# shellcheck shell=bash\n# Bash script that calls docker as a client to the host daemon\n# See documentation: https://www.windmill.dev/docs/advanced/docker\nmsg=\"${1:-world}\"\n\nIMAGE=\"alpine:latest\"\nCOMMAND=\"/bin/echo Hello $msg\"\n\n# ensure that the image is up-to-date\ndocker pull $IMAGE\ndocker run --rm $IMAGE $COMMAND\n";
20
20
  export declare function isInitialCode(content: string): boolean;
21
21
  export declare function initialCode(language: 'deno' | 'python3' | 'go' | 'bash', kind: Script.kind | undefined, subkind: 'pgsql' | 'mysql' | 'flow' | 'script' | 'fetch' | 'docker' | undefined): string;
@@ -221,7 +221,7 @@ export async function main(approver?: string) {
221
221
  }`;
222
222
  export const DOCKER_INIT_CODE = `# shellcheck shell=bash
223
223
  # Bash script that calls docker as a client to the host daemon
224
- # See documentation: https://docs.windmill.dev/docs/advanced/docker
224
+ # See documentation: https://www.windmill.dev/docs/advanced/docker
225
225
  msg="\${1:-world}"
226
226
 
227
227
  IMAGE="alpine:latest"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-components",
3
- "version": "1.121.0",
3
+ "version": "1.122.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",
@@ -245,6 +245,10 @@
245
245
  "./components/apps/editor/inlineScriptsPanel/utils": {
246
246
  "types": "./package/components/apps/editor/inlineScriptsPanel/utils.d.ts",
247
247
  "default": "./package/components/apps/editor/inlineScriptsPanel/utils.js"
248
+ },
249
+ "./gen/core/OpenAPI": {
250
+ "types": "./package/gen/core/OpenAPI.d.ts",
251
+ "default": "./package/gen/core/OpenAPI.js"
248
252
  }
249
253
  },
250
254
  "files": [
@@ -338,6 +342,9 @@
338
342
  ],
339
343
  "components/apps/editor/inlineScriptsPanel/utils": [
340
344
  "./package/components/apps/editor/inlineScriptsPanel/utils.d.ts"
345
+ ],
346
+ "gen/core/OpenAPI": [
347
+ "./package/gen/core/OpenAPI.d.ts"
341
348
  ]
342
349
  }
343
350
  }