From e64195e42b940e552d9b89b040dff4a4d0f8be37 Mon Sep 17 00:00:00 2001 From: Faton Ramadani Date: Wed, 23 Nov 2022 20:37:38 +0100 Subject: [PATCH 1/2] fix(frontend): prevent runnable to run if the script is not defined (#938) --- .../components/apps/components/common/TextComponent.svelte | 2 +- .../apps/components/helpers/RunnableComponent.svelte | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/components/common/TextComponent.svelte b/frontend/src/lib/components/apps/components/common/TextComponent.svelte index f53e0ca7d0..68fc99c8c9 100644 --- a/frontend/src/lib/components/apps/components/common/TextComponent.svelte +++ b/frontend/src/lib/components/apps/components/common/TextComponent.svelte @@ -16,5 +16,5 @@ - + diff --git a/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte b/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte index 7529034525..e42849ab50 100644 --- a/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte +++ b/frontend/src/lib/components/apps/components/helpers/RunnableComponent.svelte @@ -147,6 +147,10 @@ ) async function executeComponent() { + if (!schema) { + return + } + outputs?.loading.set(true) await testJobLoader?.abstractRun(() => { From 94e15f849323220b55b6c323ed129134a6284f6f Mon Sep 17 00:00:00 2001 From: Kai Jellinghaus Date: Wed, 23 Nov 2022 20:38:27 +0100 Subject: [PATCH 2/2] Enable user deletion (#939) * Update windmill version * Enable User Deletion --- cli/context.ts | 2 +- cli/flow.ts | 4 ++-- cli/login.ts | 2 +- cli/resource.ts | 4 ++-- cli/script.ts | 4 ++-- cli/setup.ts | 2 +- cli/user.ts | 9 ++++++--- cli/variable.ts | 2 +- cli/workspace.ts | 2 +- 9 files changed, 17 insertions(+), 14 deletions(-) diff --git a/cli/context.ts b/cli/context.ts index ae8eacdaac..3029ff1a10 100644 --- a/cli/context.ts +++ b/cli/context.ts @@ -2,7 +2,7 @@ import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; import { setClient, UserService, -} from "https://deno.land/x/windmill@v1.41.0/mod.ts"; +} from "https://deno.land/x/windmill@v1.50.0/mod.ts"; import { getToken } from "./login.ts"; import { getDefaultRemote, getRemote } from "./remote.ts"; import { getStore } from "./store.ts"; diff --git a/cli/flow.ts b/cli/flow.ts index d5933bf5e0..a92fccecd9 100644 --- a/cli/flow.ts +++ b/cli/flow.ts @@ -1,10 +1,10 @@ import { Command } from "https://deno.land/x/cliffy@v0.25.4/command/command.ts"; -import { FlowService } from "https://deno.land/x/windmill@v1.41.0/mod.ts"; +import { FlowService } from "https://deno.land/x/windmill@v1.50.0/mod.ts"; import { GlobalOptions } from "./types.ts"; import { Flow, OpenFlow, -} from "https://deno.land/x/windmill@v1.41.0/windmill-api/index.ts"; +} from "https://deno.land/x/windmill@v1.50.0/windmill-api/index.ts"; import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; import { getContext } from "./context.ts"; import { Table } from "https://deno.land/x/cliffy@v0.25.4/table/table.ts"; diff --git a/cli/login.ts b/cli/login.ts index 172a70657b..5ce45dfba9 100644 --- a/cli/login.ts +++ b/cli/login.ts @@ -7,7 +7,7 @@ import { GlobalOptions } from "./types.ts"; import { setClient, UserService, -} from "https://deno.land/x/windmill@v1.41.0/mod.ts"; +} from "https://deno.land/x/windmill@v1.50.0/mod.ts"; import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; import { getStore } from "./store.ts"; import { getDefaultRemote, getRemote } from "./remote.ts"; diff --git a/cli/resource.ts b/cli/resource.ts index d2731fd657..5d9967527f 100644 --- a/cli/resource.ts +++ b/cli/resource.ts @@ -1,9 +1,9 @@ import { Command } from "https://deno.land/x/cliffy@v0.25.4/command/command.ts"; -import { ResourceService } from "https://deno.land/x/windmill@v1.41.0/mod.ts"; +import { ResourceService } from "https://deno.land/x/windmill@v1.50.0/mod.ts"; import { GlobalOptions } from "./types.ts"; import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; import { getContext } from "./context.ts"; -import { Resource } from "https://deno.land/x/windmill@v1.41.0/windmill-api/index.ts"; +import { Resource } from "https://deno.land/x/windmill@v1.50.0/windmill-api/index.ts"; import { Table } from "https://deno.land/x/cliffy@v0.25.4/table/table.ts"; type ResourceFile = { diff --git a/cli/script.ts b/cli/script.ts index b1b62a22d6..90f3ab4b33 100644 --- a/cli/script.ts +++ b/cli/script.ts @@ -1,9 +1,9 @@ import { Command } from "https://deno.land/x/cliffy@v0.25.4/command/command.ts"; -import { ScriptService } from "https://deno.land/x/windmill@v1.41.0/mod.ts"; +import { ScriptService } from "https://deno.land/x/windmill@v1.50.0/mod.ts"; import { GlobalOptions } from "./types.ts"; import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; import { getContext } from "./context.ts"; -import { Script } from "https://deno.land/x/windmill@v1.41.0/windmill-api/index.ts"; +import { Script } from "https://deno.land/x/windmill@v1.50.0/windmill-api/index.ts"; import { Table } from "https://deno.land/x/cliffy@v0.25.4/table/table.ts"; type ScriptFile = { diff --git a/cli/setup.ts b/cli/setup.ts index 30b23851fa..a08ca3e548 100644 --- a/cli/setup.ts +++ b/cli/setup.ts @@ -10,7 +10,7 @@ import { setClient, UserService, WorkspaceService, -} from "https://deno.land/x/windmill@v1.41.0/mod.ts"; +} from "https://deno.land/x/windmill@v1.50.0/mod.ts"; import { getStore } from "./store.ts"; import { add as addRemote, setDefault as setDefaultRemote } from "./remote.ts"; diff --git a/cli/user.ts b/cli/user.ts index 5e4b6feddc..8e9a4836d1 100644 --- a/cli/user.ts +++ b/cli/user.ts @@ -1,11 +1,12 @@ import { Command } from "https://deno.land/x/cliffy@v0.25.4/command/command.ts"; import { Table } from "https://deno.land/x/cliffy@v0.25.4/table/table.ts"; -import { UserService } from "https://deno.land/x/windmill@v1.41.0/mod.ts"; -import { GlobalUserInfo } from "https://deno.land/x/windmill@v1.41.0/windmill-api/index.ts"; +import { UserService } from "https://deno.land/x/windmill@v1.50.0/mod.ts"; +import { GlobalUserInfo } from "https://deno.land/x/windmill@v1.50.0/windmill-api/index.ts"; import { passwordGenerator } from "https://deno.land/x/password_generator@latest/mod.ts"; // TODO: I think the version is called latest, but it's still pinned. import { getContext } from "./context.ts"; import { GlobalOptions } from "./types.ts"; import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; +import { Input } from "https://deno.land/x/cliffy@v0.25.4/prompt/input.ts"; async function list(opts: GlobalOptions) { const _ = await getContext(opts); @@ -66,7 +67,9 @@ async function add( } async function remove(opts: GlobalOptions, email: string) { const _ = await getContext(opts); - throw new Error("API unsupported"); + + await UserService.globalUserDelete({ email }); + console.log(colors.green("Deleted User " + email)); } const command = new Command() diff --git a/cli/variable.ts b/cli/variable.ts index 2281a5e5bb..8b2d3da8e2 100644 --- a/cli/variable.ts +++ b/cli/variable.ts @@ -1,7 +1,7 @@ import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; import { Command } from "https://deno.land/x/cliffy@v0.25.4/command/command.ts"; import { Table } from "https://deno.land/x/cliffy@v0.25.4/table/table.ts"; -import { VariableService } from "https://deno.land/x/windmill@v1.41.0/mod.ts"; +import { VariableService } from "https://deno.land/x/windmill@v1.50.0/mod.ts"; import { getContext } from "./context.ts"; import { GlobalOptions } from "./types.ts"; diff --git a/cli/workspace.ts b/cli/workspace.ts index 49f54d7912..d0b49020ed 100644 --- a/cli/workspace.ts +++ b/cli/workspace.ts @@ -1,6 +1,6 @@ import { Command } from "https://deno.land/x/cliffy@v0.25.4/command/command.ts"; import { GlobalOptions } from "./types.ts"; -import { WorkspaceService } from "https://deno.land/x/windmill@v1.41.0/windmill-api/index.ts"; +import { WorkspaceService } from "https://deno.land/x/windmill@v1.50.0/windmill-api/index.ts"; import { colors } from "https://deno.land/x/cliffy@v0.25.4/ansi/colors.ts"; import { Table } from "https://deno.land/x/cliffy@v0.25.4/table/mod.ts"; import { getContext } from "./context.ts";