windmill-components 1.28.6 → 1.35.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/common.d.ts +3 -0
- package/components/AppConnect.svelte +29 -13
- package/components/ArgInput.svelte +28 -14
- package/components/ArgInput.svelte.d.ts +4 -0
- package/components/CenteredPage.svelte +2 -2
- package/components/DisplayResult.svelte +3 -3
- package/components/Editor.svelte +97 -97
- package/components/Editor.svelte.d.ts +3 -0
- package/components/EditorBar.svelte +57 -38
- package/components/FlowBuilder.svelte +40 -32
- package/components/FlowEditor.svelte +19 -57
- package/components/FlowEditor.svelte.d.ts +1 -0
- package/components/FlowJobResult.svelte +16 -16
- package/components/FlowModulesViewer.svelte +97 -0
- package/components/FlowModulesViewer.svelte.d.ts +17 -0
- package/components/FlowPreview.svelte +47 -68
- package/components/FlowPreview.svelte.d.ts +2 -6
- package/components/FlowPreviewContent.svelte +59 -44
- package/components/FlowPreviewContent.svelte.d.ts +0 -1
- package/components/FlowStatusViewer.svelte +104 -204
- package/components/FlowStatusViewer.svelte.d.ts +7 -4
- package/components/FlowViewer.svelte +60 -155
- package/components/FlowViewer.svelte.d.ts +0 -1
- package/components/IconedPath.svelte +12 -0
- package/components/IconedPath.svelte.d.ts +16 -0
- package/components/IconedResourceType.svelte +21 -2
- package/components/IconedResourceType.svelte.d.ts +1 -0
- package/components/InputTransformForm.svelte +9 -8
- package/components/InputTransformForm.svelte.d.ts +1 -1
- package/components/InviteGlobalUser.svelte +1 -1
- package/components/ItemPicker.svelte +6 -1
- package/components/JobStatus.svelte +1 -1
- package/components/ModuleStep.svelte +74 -96
- package/components/ModuleStep.svelte.d.ts +7 -4
- package/components/Multiselect.svelte +1 -1
- package/components/Path.svelte +62 -40
- package/components/Path.svelte.d.ts +2 -0
- package/components/ProgressBar.svelte +31 -0
- package/components/ProgressBar.svelte.d.ts +17 -0
- package/components/ProgressBarPart.svelte +20 -0
- package/components/ProgressBarPart.svelte.d.ts +20 -0
- package/components/ResourceEditor.svelte +2 -1
- package/components/ResourcePicker.svelte +9 -0
- package/components/SchemaForm.svelte +9 -4
- package/components/SchemaForm.svelte.d.ts +1 -1
- package/components/SchemaModal.svelte +20 -3
- package/components/SchemaViewer.svelte +58 -68
- package/components/ScriptBuilder.svelte +145 -122
- package/components/ScriptBuilder.svelte.d.ts +1 -0
- package/components/ScriptEditor.svelte +118 -339
- package/components/ScriptEditor.svelte.d.ts +0 -2
- package/components/ScriptSchema.svelte +45 -44
- package/components/SharedBadge.svelte +8 -3
- package/components/VariableEditor.svelte +1 -1
- package/components/common/drawer/Drawer.svelte +108 -0
- package/components/common/drawer/Drawer.svelte.d.ts +23 -0
- package/components/common/drawer/DrawerContent.svelte +19 -0
- package/components/common/drawer/DrawerContent.svelte.d.ts +20 -0
- package/components/common/menu/Menu.svelte +57 -0
- package/components/common/menu/Menu.svelte.d.ts +23 -0
- package/components/common/menu/MenuItem.svelte +9 -0
- package/components/common/menu/MenuItem.svelte.d.ts +27 -0
- package/components/common/tabs/Tab.svelte +17 -0
- package/components/common/tabs/Tab.svelte.d.ts +18 -0
- package/components/common/tabs/TabContent.svelte +12 -0
- package/components/common/tabs/TabContent.svelte.d.ts +19 -0
- package/components/common/tabs/Tabs.svelte +20 -0
- package/components/common/tabs/Tabs.svelte.d.ts +24 -0
- package/components/flows/CopyFirstStepSchema.svelte +4 -3
- package/components/flows/DynamicInputHelpBox.svelte +6 -4
- package/components/flows/DynamicInputHelpBox.svelte.d.ts +1 -1
- package/components/flows/FlowBox.svelte +15 -2
- package/components/flows/FlowBox.svelte.d.ts +14 -14
- package/components/flows/FlowBoxHeader.svelte +10 -3
- package/components/flows/FlowBoxHeader.svelte.d.ts +3 -0
- package/components/flows/FlowInput.svelte +14 -12
- package/components/flows/FlowInputs.svelte +56 -22
- package/components/flows/FlowInputs.svelte.d.ts +3 -1
- package/components/flows/FlowModuleHeader.svelte +69 -54
- package/components/flows/FlowModuleHeader.svelte.d.ts +6 -6
- package/components/flows/FlowSettings.svelte +82 -92
- package/components/flows/FlowSettings.svelte.d.ts +1 -1
- package/components/flows/FlowTimeline.svelte +169 -0
- package/components/flows/FlowTimeline.svelte.d.ts +21 -0
- package/components/flows/flowState.d.ts +14 -0
- package/components/flows/flowState.js +52 -0
- package/components/flows/flowStateUtils.d.ts +37 -0
- package/components/flows/flowStateUtils.js +220 -0
- package/components/flows/flowStore.d.ts +1 -16
- package/components/flows/flowStore.js +26 -203
- package/components/flows/pickers/FlowScriptPicker.svelte +5 -9
- package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +0 -1
- package/components/flows/pickers/PickHubScript.svelte +1 -1
- package/components/flows/pickers/PickHubScript.svelte.d.ts +1 -1
- package/components/flows/pickers/PickScript.svelte +1 -1
- package/components/flows/pickers/PickScript.svelte.d.ts +1 -1
- package/components/flows/scheduleUtils.d.ts +7 -0
- package/components/flows/scheduleUtils.js +21 -0
- package/components/flows/stepOpenedStore.d.ts +1 -0
- package/components/flows/stepOpenedStore.js +6 -0
- package/components/flows/utils.d.ts +6 -13
- package/components/flows/utils.js +47 -119
- package/components/icons/DiscordIcon.svelte +16 -0
- package/components/icons/DiscordIcon.svelte.d.ts +17 -0
- package/components/icons/HttpIcon.svelte +21 -0
- package/components/icons/HttpIcon.svelte.d.ts +17 -0
- package/components/icons/MastodonIcon.svelte +16 -0
- package/components/icons/MastodonIcon.svelte.d.ts +17 -0
- package/components/icons/MatrixIcon.svelte +16 -0
- package/components/icons/MatrixIcon.svelte.d.ts +17 -0
- package/components/icons/S3Icon.svelte +16 -0
- package/components/icons/S3Icon.svelte.d.ts +17 -0
- package/components/icons/WindmillIcon.svelte +68 -0
- package/components/icons/WindmillIcon.svelte.d.ts +17 -0
- package/components/jobs/JobDetail.svelte +176 -0
- package/components/jobs/JobDetail.svelte.d.ts +17 -0
- package/components/landing/FlowGettingStarted.svelte +95 -0
- package/components/landing/FlowGettingStarted.svelte.d.ts +19 -0
- package/components/landing/FlowLandingBox.svelte +69 -0
- package/components/landing/FlowLandingBox.svelte.d.ts +17 -0
- package/components/landing/RessourceGettingStarted.svelte +51 -0
- package/components/landing/RessourceGettingStarted.svelte.d.ts +19 -0
- package/components/landing/ScriptBox.svelte +81 -0
- package/components/landing/ScriptBox.svelte.d.ts +17 -0
- package/components/landing/ScriptGettingStarted.svelte +93 -0
- package/components/landing/ScriptGettingStarted.svelte.d.ts +19 -0
- package/components/preview/FlowPreviewStatus.svelte +28 -0
- package/components/preview/FlowPreviewStatus.svelte.d.ts +17 -0
- package/components/propertyPicker/ObjectViewer.svelte +13 -13
- package/components/propertyPicker/utils.js +3 -2
- package/components/script_editor/LogPanel.svelte +172 -0
- package/components/script_editor/LogPanel.svelte.d.ts +22 -0
- package/components/sidebar/MenuLink.svelte +49 -0
- package/components/sidebar/MenuLink.svelte.d.ts +21 -0
- package/components/sidebar/SidebarContent.svelte +55 -0
- package/components/sidebar/SidebarContent.svelte.d.ts +16 -0
- package/components/sidebar/UserMenu.svelte +62 -0
- package/components/sidebar/UserMenu.svelte.d.ts +16 -0
- package/components/sidebar/WorkspaceMenu.svelte +66 -0
- package/components/sidebar/WorkspaceMenu.svelte.d.ts +16 -0
- package/gen/core/OpenAPI.js +1 -1
- package/gen/core/request.js +1 -0
- package/gen/models/FlowModule.d.ts +5 -3
- package/gen/models/ForloopFlow.d.ts +2 -2
- package/gen/models/MainArgSignature.d.ts +14 -3
- package/gen/services/JobService.d.ts +10 -2
- package/gen/services/JobService.js +4 -2
- package/gen/services/ScriptService.d.ts +18 -0
- package/gen/services/ScriptService.js +30 -0
- package/infer.js +47 -24
- package/logout.js +1 -1
- package/package.json +57 -23
- package/script_helpers.d.ts +4 -1
- package/script_helpers.js +68 -17
- package/stores.d.ts +0 -2
- package/stores.js +0 -4
- package/utils.d.ts +5 -2
- package/utils.js +37 -6
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script>import { faBookOpen, faCalendar, faCode, faCubes, faEye, faHomeAlt, faPlay, faRobot, faUsersCog, faWallet, faWind, faCog } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { faDiscord, faGithub } from '@fortawesome/free-brands-svg-icons';
|
|
3
|
+
import MenuLink from './MenuLink.svelte';
|
|
4
|
+
import { userStore } from '../../stores';
|
|
5
|
+
const mainMenuLinks = [
|
|
6
|
+
{ label: 'Home', href: '/', icon: faHomeAlt },
|
|
7
|
+
{ label: 'Scripts', href: '/scripts', icon: faCode },
|
|
8
|
+
{ label: 'Flows', href: '/flows', icon: faWind },
|
|
9
|
+
{ label: 'Runs', href: '/runs', icon: faPlay },
|
|
10
|
+
{ label: 'Schedules', href: '/schedules', icon: faCalendar },
|
|
11
|
+
{ label: 'Variables', href: '/variables', icon: faWallet },
|
|
12
|
+
{ label: 'Resources', href: '/resources', icon: faCubes }
|
|
13
|
+
];
|
|
14
|
+
$: secondaryMenuLinks = [
|
|
15
|
+
{ label: 'Workers', href: '/workers', icon: faRobot },
|
|
16
|
+
{ label: 'Groups', href: '/groups', icon: faUsersCog },
|
|
17
|
+
{ label: 'Audit Logs', href: '/audit_logs', icon: faEye },
|
|
18
|
+
{
|
|
19
|
+
label: 'Workspace',
|
|
20
|
+
href: '/workspace_settings',
|
|
21
|
+
icon: faCog,
|
|
22
|
+
disabled: !$userStore?.is_admin
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
const thirdMenuLinks = [
|
|
26
|
+
{ label: 'Documentation', href: 'https://docs.windmill.dev/docs/intro/', icon: faBookOpen },
|
|
27
|
+
{ label: 'Feedbacks?', href: 'https://discord.gg/V7PM2YHsPB', icon: faDiscord },
|
|
28
|
+
{
|
|
29
|
+
label: 'Issues?',
|
|
30
|
+
href: 'https://github.com/windmill-labs/windmill/issues/new',
|
|
31
|
+
icon: faGithub
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
export let isCollapsed = false;
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<div class="flex-1 flex flex-col py-4 overflow-y-auto overflow-x-hidden">
|
|
38
|
+
<nav class="h-full flex justify-between flex-col px-2">
|
|
39
|
+
<div class="space-y-2">
|
|
40
|
+
{#each mainMenuLinks as menuLink}
|
|
41
|
+
<MenuLink {...menuLink} {isCollapsed} />
|
|
42
|
+
{/each}
|
|
43
|
+
<div class="h-8" />
|
|
44
|
+
{#each secondaryMenuLinks as menuLink}
|
|
45
|
+
<MenuLink {...menuLink} {isCollapsed} />
|
|
46
|
+
{/each}
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="space-y-2">
|
|
50
|
+
{#each thirdMenuLinks as menuLink}
|
|
51
|
+
<MenuLink {...menuLink} {isCollapsed} />
|
|
52
|
+
{/each}
|
|
53
|
+
</div>
|
|
54
|
+
</nav>
|
|
55
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
isCollapsed?: boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export declare type SidebarContentProps = typeof __propDef.props;
|
|
12
|
+
export declare type SidebarContentEvents = typeof __propDef.events;
|
|
13
|
+
export declare type SidebarContentSlots = typeof __propDef.slots;
|
|
14
|
+
export default class SidebarContent extends SvelteComponentTyped<SidebarContentProps, SidebarContentEvents, SidebarContentSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script>import { logout } from '../../logout';
|
|
2
|
+
import { userStore, usersWorkspaceStore, superadmin } from '../../stores';
|
|
3
|
+
import { classNames } from '../../utils';
|
|
4
|
+
import { faCrown, faUser } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import Icon from 'svelte-awesome';
|
|
6
|
+
import Menu from '../common/menu/Menu.svelte';
|
|
7
|
+
export let isCollapsed = false;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Menu placement="bottom-start">
|
|
11
|
+
<button
|
|
12
|
+
slot="trigger"
|
|
13
|
+
type="button"
|
|
14
|
+
class={classNames(
|
|
15
|
+
'group w-full flex items-center text-white hover:bg-gray-50 hover:text-gray-900 focus:outline-none px-2 py-2 text-sm font-medium rounded-md h-8 '
|
|
16
|
+
)}
|
|
17
|
+
>
|
|
18
|
+
<Icon
|
|
19
|
+
data={faUser}
|
|
20
|
+
class={classNames('flex-shrink-0 h-4 w-4', isCollapsed ? '-mr-1' : 'mr-2')}
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
{#if !isCollapsed}
|
|
24
|
+
<span class={classNames('whitespace-pre ')}>
|
|
25
|
+
{$userStore?.username ?? ($superadmin ? $superadmin : '___')}
|
|
26
|
+
{#if $userStore?.is_admin}
|
|
27
|
+
<Icon data={faCrown} scale={0.6} />
|
|
28
|
+
{/if}
|
|
29
|
+
</span>
|
|
30
|
+
{/if}
|
|
31
|
+
</button>
|
|
32
|
+
|
|
33
|
+
<div class="divide-y divide-gray-100">
|
|
34
|
+
<div class="px-4 py-3" role="none">
|
|
35
|
+
<p class="text-sm" role="none">Signed in as</p>
|
|
36
|
+
<p class="text-sm font-medium text-gray-900 truncate" role="none">
|
|
37
|
+
{$usersWorkspaceStore?.email}
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="py-1" role="none">
|
|
41
|
+
<a
|
|
42
|
+
href="/user/settings"
|
|
43
|
+
class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 hover:text-gray-900"
|
|
44
|
+
role="menuitem"
|
|
45
|
+
tabindex="-1"
|
|
46
|
+
>
|
|
47
|
+
Account settings
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="py-1" role="none">
|
|
51
|
+
<button
|
|
52
|
+
type="button"
|
|
53
|
+
class="text-gray-700 block w-full text-left px-4 py-2 text-sm hover:bg-gray-100 hover:text-gray-900"
|
|
54
|
+
role="menuitem"
|
|
55
|
+
tabindex="-1"
|
|
56
|
+
on:click={() => logout()}
|
|
57
|
+
>
|
|
58
|
+
Sign out
|
|
59
|
+
</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</Menu>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
isCollapsed?: boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export declare type UserMenuProps = typeof __propDef.props;
|
|
12
|
+
export declare type UserMenuEvents = typeof __propDef.events;
|
|
13
|
+
export declare type UserMenuSlots = typeof __propDef.slots;
|
|
14
|
+
export default class UserMenu extends SvelteComponentTyped<UserMenuProps, UserMenuEvents, UserMenuSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script>import { workspaceStore, usersWorkspaceStore } from '../../stores';
|
|
2
|
+
import { classNames } from '../../utils';
|
|
3
|
+
import { faBuilding } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import Icon from 'svelte-awesome';
|
|
5
|
+
import Menu from '../common/menu/Menu.svelte';
|
|
6
|
+
export let isCollapsed = false;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<Menu placement="bottom-start" let:close>
|
|
10
|
+
<button
|
|
11
|
+
slot="trigger"
|
|
12
|
+
type="button"
|
|
13
|
+
class={classNames(
|
|
14
|
+
'group w-full flex items-center text-white hover:bg-gray-50 hover:text-gray-900 focus:ring-4 focus:outline-none focus:ring-gray-300 px-2 py-2 text-sm font-medium rounded-md h-8 '
|
|
15
|
+
)}
|
|
16
|
+
>
|
|
17
|
+
<Icon
|
|
18
|
+
data={faBuilding}
|
|
19
|
+
class={classNames('flex-shrink-0 h-4 w-4', isCollapsed ? '-mr-1' : 'mr-2')}
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
{#if !isCollapsed}
|
|
23
|
+
<span class={classNames('whitespace-pre')}> {$workspaceStore} </span>
|
|
24
|
+
{/if}
|
|
25
|
+
</button>
|
|
26
|
+
|
|
27
|
+
<div class="divide-y divide-gray-100" role="none">
|
|
28
|
+
{#each $usersWorkspaceStore?.workspaces ?? [] as workspace}
|
|
29
|
+
<button
|
|
30
|
+
on:click={() => {
|
|
31
|
+
workspaceStore.set(workspace.id)
|
|
32
|
+
close()
|
|
33
|
+
}}
|
|
34
|
+
class="block px-4 py-2 text-xs text-gray-500 "
|
|
35
|
+
role="menuitem"
|
|
36
|
+
tabindex="-1"
|
|
37
|
+
>
|
|
38
|
+
<span class="text-gray-300 font-mono pr-1 text-xs">{workspace.id}</span>
|
|
39
|
+
{workspace.name}
|
|
40
|
+
</button>
|
|
41
|
+
{/each}
|
|
42
|
+
<div class="py-1" role="none">
|
|
43
|
+
<a
|
|
44
|
+
href="/user/create_workspace"
|
|
45
|
+
class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 hover:text-gray-900"
|
|
46
|
+
role="menuitem"
|
|
47
|
+
tabindex="-1"
|
|
48
|
+
>
|
|
49
|
+
Create new workspace
|
|
50
|
+
</a>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="py-1" role="none">
|
|
53
|
+
<a
|
|
54
|
+
href="/user/workspaces"
|
|
55
|
+
on:click={() => {
|
|
56
|
+
localStorage.removeItem('workspace')
|
|
57
|
+
}}
|
|
58
|
+
class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 hover:text-gray-900"
|
|
59
|
+
role="menuitem"
|
|
60
|
+
tabindex="-1"
|
|
61
|
+
>
|
|
62
|
+
See all workspaces & invites
|
|
63
|
+
</a>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</Menu>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
isCollapsed?: boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export declare type WorkspaceMenuProps = typeof __propDef.props;
|
|
12
|
+
export declare type WorkspaceMenuEvents = typeof __propDef.events;
|
|
13
|
+
export declare type WorkspaceMenuSlots = typeof __propDef.slots;
|
|
14
|
+
export default class WorkspaceMenu extends SvelteComponentTyped<WorkspaceMenuProps, WorkspaceMenuEvents, WorkspaceMenuSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
package/gen/core/OpenAPI.js
CHANGED
package/gen/core/request.js
CHANGED
|
@@ -174,6 +174,7 @@ export const sendRequest = async (config, options, url, body, formData, headers,
|
|
|
174
174
|
if (config.WITH_CREDENTIALS) {
|
|
175
175
|
request.credentials = config.CREDENTIALS;
|
|
176
176
|
}
|
|
177
|
+
request.referrerPolicy = "no-referrer";
|
|
177
178
|
onCancel(() => controller.abort());
|
|
178
179
|
return await fetch(url, request);
|
|
179
180
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { FlowModuleValue } from './FlowModuleValue';
|
|
2
2
|
import type { InputTransform } from './InputTransform';
|
|
3
3
|
export declare type FlowModule = {
|
|
4
|
-
|
|
4
|
+
input_transforms: Record<string, InputTransform>;
|
|
5
5
|
value: FlowModuleValue;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
stop_after_if?: {
|
|
7
|
+
skip_if_stopped?: boolean;
|
|
8
|
+
expr: string;
|
|
9
|
+
};
|
|
8
10
|
summary?: string;
|
|
9
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FlowModule } from './FlowModule';
|
|
2
2
|
import type { InputTransform } from './InputTransform';
|
|
3
3
|
export declare type ForloopFlow = {
|
|
4
|
-
|
|
4
|
+
modules: Array<FlowModule>;
|
|
5
5
|
iterator: InputTransform;
|
|
6
6
|
skip_failures: boolean;
|
|
7
7
|
type: 'forloopflow';
|
|
@@ -3,10 +3,21 @@ export declare type MainArgSignature = {
|
|
|
3
3
|
star_kwargs?: boolean;
|
|
4
4
|
args: Array<{
|
|
5
5
|
name: string;
|
|
6
|
-
typ: ('
|
|
7
|
-
resource: string;
|
|
6
|
+
typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
|
|
7
|
+
resource: string | null;
|
|
8
8
|
} | {
|
|
9
|
-
|
|
9
|
+
str: Array<string> | null;
|
|
10
|
+
} | {
|
|
11
|
+
object: Array<{
|
|
12
|
+
key: string;
|
|
13
|
+
typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
|
|
14
|
+
str: any;
|
|
15
|
+
});
|
|
16
|
+
}>;
|
|
17
|
+
} | {
|
|
18
|
+
list: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
|
|
19
|
+
str: any;
|
|
20
|
+
}) | null;
|
|
10
21
|
});
|
|
11
22
|
has_default?: boolean;
|
|
12
23
|
default?: any;
|
|
@@ -183,7 +183,7 @@ export declare class JobService {
|
|
|
183
183
|
* @returns CompletedJob All available completed jobs
|
|
184
184
|
* @throws ApiError
|
|
185
185
|
*/
|
|
186
|
-
static listCompletedJobs({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, success, jobKinds, isSkipped, }: {
|
|
186
|
+
static listCompletedJobs({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, success, jobKinds, isSkipped, isFlowStep, }: {
|
|
187
187
|
workspace: string;
|
|
188
188
|
/**
|
|
189
189
|
* order by desc order (default true)
|
|
@@ -229,13 +229,17 @@ export declare class JobService {
|
|
|
229
229
|
* is the job skipped
|
|
230
230
|
*/
|
|
231
231
|
isSkipped?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* is the job a flow step
|
|
234
|
+
*/
|
|
235
|
+
isFlowStep?: boolean;
|
|
232
236
|
}): CancelablePromise<Array<CompletedJob>>;
|
|
233
237
|
/**
|
|
234
238
|
* list all available jobs
|
|
235
239
|
* @returns Job All jobs
|
|
236
240
|
* @throws ApiError
|
|
237
241
|
*/
|
|
238
|
-
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, jobKinds, isSkipped, success, }: {
|
|
242
|
+
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, jobKinds, isSkipped, isFlowStep, success, }: {
|
|
239
243
|
workspace: string;
|
|
240
244
|
/**
|
|
241
245
|
* mask to filter exact matching user creator
|
|
@@ -273,6 +277,10 @@ export declare class JobService {
|
|
|
273
277
|
* is the job skipped
|
|
274
278
|
*/
|
|
275
279
|
isSkipped?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* is the job a flow step
|
|
282
|
+
*/
|
|
283
|
+
isFlowStep?: boolean;
|
|
276
284
|
/**
|
|
277
285
|
* filter on successful jobs
|
|
278
286
|
*/
|
|
@@ -152,7 +152,7 @@ export class JobService {
|
|
|
152
152
|
* @returns CompletedJob All available completed jobs
|
|
153
153
|
* @throws ApiError
|
|
154
154
|
*/
|
|
155
|
-
static listCompletedJobs({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, success, jobKinds, isSkipped, }) {
|
|
155
|
+
static listCompletedJobs({ workspace, orderDesc, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, success, jobKinds, isSkipped, isFlowStep, }) {
|
|
156
156
|
return __request(OpenAPI, {
|
|
157
157
|
method: 'GET',
|
|
158
158
|
url: '/w/{workspace}/jobs/completed/list',
|
|
@@ -171,6 +171,7 @@ export class JobService {
|
|
|
171
171
|
'success': success,
|
|
172
172
|
'job_kinds': jobKinds,
|
|
173
173
|
'is_skipped': isSkipped,
|
|
174
|
+
'is_flow_step': isFlowStep,
|
|
174
175
|
},
|
|
175
176
|
});
|
|
176
177
|
}
|
|
@@ -179,7 +180,7 @@ export class JobService {
|
|
|
179
180
|
* @returns Job All jobs
|
|
180
181
|
* @throws ApiError
|
|
181
182
|
*/
|
|
182
|
-
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, jobKinds, isSkipped, success, }) {
|
|
183
|
+
static listJobs({ workspace, createdBy, parentJob, scriptPathExact, scriptPathStart, scriptHash, createdBefore, createdAfter, jobKinds, isSkipped, isFlowStep, success, }) {
|
|
183
184
|
return __request(OpenAPI, {
|
|
184
185
|
method: 'GET',
|
|
185
186
|
url: '/w/{workspace}/jobs/list',
|
|
@@ -196,6 +197,7 @@ export class JobService {
|
|
|
196
197
|
'created_after': createdAfter,
|
|
197
198
|
'job_kinds': jobKinds,
|
|
198
199
|
'is_skipped': isSkipped,
|
|
200
|
+
'is_flow_step': isFlowStep,
|
|
199
201
|
'success': success,
|
|
200
202
|
},
|
|
201
203
|
});
|
|
@@ -184,6 +184,15 @@ export declare class ScriptService {
|
|
|
184
184
|
workspace: string;
|
|
185
185
|
path: string;
|
|
186
186
|
}): CancelablePromise<Script>;
|
|
187
|
+
/**
|
|
188
|
+
* raw script by path
|
|
189
|
+
* @returns string script content
|
|
190
|
+
* @throws ApiError
|
|
191
|
+
*/
|
|
192
|
+
static rawScriptByPath({ workspace, path, }: {
|
|
193
|
+
workspace: string;
|
|
194
|
+
path: string;
|
|
195
|
+
}): CancelablePromise<string>;
|
|
187
196
|
/**
|
|
188
197
|
* exists script by path
|
|
189
198
|
* @returns boolean does it exists
|
|
@@ -202,6 +211,15 @@ export declare class ScriptService {
|
|
|
202
211
|
workspace: string;
|
|
203
212
|
hash: string;
|
|
204
213
|
}): CancelablePromise<Script>;
|
|
214
|
+
/**
|
|
215
|
+
* raw script by hash
|
|
216
|
+
* @returns string script content
|
|
217
|
+
* @throws ApiError
|
|
218
|
+
*/
|
|
219
|
+
static rawScriptByHash({ workspace, path, }: {
|
|
220
|
+
workspace: string;
|
|
221
|
+
path: string;
|
|
222
|
+
}): CancelablePromise<string>;
|
|
205
223
|
/**
|
|
206
224
|
* get script deployment status
|
|
207
225
|
* @returns any script details
|
|
@@ -156,6 +156,21 @@ export class ScriptService {
|
|
|
156
156
|
},
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* raw script by path
|
|
161
|
+
* @returns string script content
|
|
162
|
+
* @throws ApiError
|
|
163
|
+
*/
|
|
164
|
+
static rawScriptByPath({ workspace, path, }) {
|
|
165
|
+
return __request(OpenAPI, {
|
|
166
|
+
method: 'GET',
|
|
167
|
+
url: '/w/{workspace}/scripts/raw/p/{path}',
|
|
168
|
+
path: {
|
|
169
|
+
'workspace': workspace,
|
|
170
|
+
'path': path,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
}
|
|
159
174
|
/**
|
|
160
175
|
* exists script by path
|
|
161
176
|
* @returns boolean does it exists
|
|
@@ -186,6 +201,21 @@ export class ScriptService {
|
|
|
186
201
|
},
|
|
187
202
|
});
|
|
188
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* raw script by hash
|
|
206
|
+
* @returns string script content
|
|
207
|
+
* @throws ApiError
|
|
208
|
+
*/
|
|
209
|
+
static rawScriptByHash({ workspace, path, }) {
|
|
210
|
+
return __request(OpenAPI, {
|
|
211
|
+
method: 'GET',
|
|
212
|
+
url: '/w/{workspace}/scripts/raw/h/{path}',
|
|
213
|
+
path: {
|
|
214
|
+
'workspace': workspace,
|
|
215
|
+
'path': path,
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
}
|
|
189
219
|
/**
|
|
190
220
|
* get script deployment status
|
|
191
221
|
* @returns any script details
|
package/infer.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ScriptService } from './gen';
|
|
2
2
|
export async function inferArgs(language, code, schema) {
|
|
3
3
|
let inferedSchema;
|
|
4
|
+
if (code == '') {
|
|
5
|
+
code = ' ';
|
|
6
|
+
}
|
|
4
7
|
if (language == 'python3') {
|
|
5
8
|
inferedSchema = await ScriptService.pythonToJsonschema({
|
|
6
9
|
requestBody: code
|
|
@@ -31,52 +34,72 @@ export async function inferArgs(language, code, schema) {
|
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
|
-
function argSigToJsonSchemaType(t,
|
|
37
|
+
function argSigToJsonSchemaType(t, oldS) {
|
|
38
|
+
const newS = { type: '', description: '' };
|
|
35
39
|
if (t === 'int') {
|
|
36
|
-
|
|
40
|
+
newS.type = 'integer';
|
|
37
41
|
}
|
|
38
42
|
else if (t === 'float') {
|
|
39
|
-
|
|
43
|
+
newS.type = 'number';
|
|
40
44
|
}
|
|
41
45
|
else if (t === 'bool') {
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
else if (t === 'str') {
|
|
45
|
-
s.type = 'string';
|
|
46
|
+
newS.type = 'boolean';
|
|
46
47
|
}
|
|
47
48
|
else if (t === 'email') {
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
newS.type = 'string';
|
|
50
|
+
newS.format = 'email';
|
|
50
51
|
}
|
|
51
52
|
else if (t === 'sql') {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
else if (t === 'dict') {
|
|
56
|
-
s.type = 'object';
|
|
53
|
+
newS.type = 'string';
|
|
54
|
+
newS.format = 'sql';
|
|
57
55
|
}
|
|
58
56
|
else if (t === 'bytes') {
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
newS.type = 'string';
|
|
58
|
+
newS.contentEncoding = 'base64';
|
|
61
59
|
}
|
|
62
60
|
else if (t === 'datetime') {
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
newS.type = 'string';
|
|
62
|
+
newS.format = 'date-time';
|
|
63
|
+
}
|
|
64
|
+
else if (typeof t !== 'string' && `object` in t) {
|
|
65
|
+
newS.type = 'object';
|
|
66
|
+
if (t.object) {
|
|
67
|
+
const properties = {};
|
|
68
|
+
for (const prop of t.object) {
|
|
69
|
+
properties[prop.key] = {};
|
|
70
|
+
argSigToJsonSchemaType(prop.typ, properties[prop.key]);
|
|
71
|
+
}
|
|
72
|
+
newS.properties = properties;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else if (typeof t !== 'string' && `str` in t) {
|
|
76
|
+
newS.type = 'string';
|
|
77
|
+
if (t.str) {
|
|
78
|
+
newS.enum = t.str;
|
|
79
|
+
}
|
|
65
80
|
}
|
|
66
81
|
else if (typeof t !== 'string' && `resource` in t) {
|
|
67
|
-
|
|
68
|
-
|
|
82
|
+
newS.type = 'object';
|
|
83
|
+
newS.format = `resource-${t.resource}`;
|
|
69
84
|
}
|
|
70
85
|
else if (typeof t !== 'string' && `list` in t) {
|
|
71
|
-
|
|
86
|
+
newS.type = 'array';
|
|
72
87
|
if (t.list === 'int' || t.list === 'float') {
|
|
73
|
-
|
|
88
|
+
newS.items = { type: 'number' };
|
|
74
89
|
}
|
|
75
90
|
else if (t.list === 'bytes') {
|
|
76
|
-
|
|
91
|
+
newS.items = { type: 'string', contentEncoding: 'base64' };
|
|
77
92
|
}
|
|
78
93
|
else {
|
|
79
|
-
|
|
94
|
+
newS.items = { type: 'string' };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (oldS.type != newS.type) {
|
|
98
|
+
for (const prop of Object.getOwnPropertyNames(newS)) {
|
|
99
|
+
if (prop != "description") {
|
|
100
|
+
delete oldS[prop];
|
|
101
|
+
}
|
|
80
102
|
}
|
|
81
103
|
}
|
|
104
|
+
Object.assign(oldS, newS);
|
|
82
105
|
}
|
package/logout.js
CHANGED
|
@@ -11,7 +11,7 @@ export function logoutWithRedirect(rd) {
|
|
|
11
11
|
? `error=${encodeURIComponent('You have been logged out because your session has expired.')}&`
|
|
12
12
|
: '';
|
|
13
13
|
clearCookies();
|
|
14
|
-
goto(`/user/login?${error}${rd ? 'rd=' + encodeURIComponent(rd) : ''}
|
|
14
|
+
goto(`/user/login?${error}${rd ? 'rd=' + encodeURIComponent(rd) : ''}`, { replaceState: true });
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export async function logout() {
|