diff --git a/cli/apps.ts b/cli/apps.ts index 1681f5afd0..97faf39c1e 100644 --- a/cli/apps.ts +++ b/cli/apps.ts @@ -102,16 +102,12 @@ async function push(opts: GlobalOptions, filePath: string) { const workspace = await resolveWorkspace(opts); await requireLogin(opts); -<<<<<<< Updated upstream await pushApp( workspace.workspaceId, filePath, undefined, parseFromFile(filePath) ); -======= - await pushApp(workspace.workspaceId, filePath, parseFromFile(filePath)); ->>>>>>> Stashed changes console.log(colors.bold.underline.green("App pushed")); } diff --git a/cli/deps.ts b/cli/deps.ts index a7afa06707..73a6945f0f 100644 --- a/cli/deps.ts +++ b/cli/deps.ts @@ -1,6 +1,5 @@ // windmill -export { setClient } from "npm:windmill-client@1.304.2"; -export * from "npm:windmill-client@1.304.2"; +export * from "npm:windmill-client@1.319.1"; // cliffy export { Command } from "https://deno.land/x/cliffy@v1.0.0-rc.4/command/mod.ts"; diff --git a/cli/hub.ts b/cli/hub.ts index 751a412410..9f95c3e1e6 100644 --- a/cli/hub.ts +++ b/cli/hub.ts @@ -17,16 +17,16 @@ async function pull(opts: GlobalOptions) { const userInfo = await requireLogin(opts); - const uid = await SettingService.getGlobal({ + const uid = (await SettingService.getGlobal({ key: "uid", - }); + })) as string; const hubBaseUrl = (await SettingService.getGlobal({ key: "hubBaseUrl", })) ?? "https://hub.windmill.dev"; - const headers = { + const headers: Record = { Accept: "application/json", "X-email": userInfo.email, }; @@ -99,8 +99,7 @@ async function pull(opts: GlobalOptions) { workspace.workspaceId, x.name + ".resource-type.json", undefined, - x, - true + x ); } } diff --git a/cli/pull.ts b/cli/pull.ts index 5c99b9cc83..5dcd361952 100644 --- a/cli/pull.ts +++ b/cli/pull.ts @@ -16,7 +16,8 @@ export async function downloadZip( includeSettings?: boolean, defaultTs?: "bun" | "deno" ): Promise { - const requestHeaders: HeadersInit = new Headers(); + const requestHeaders: HeadersInit & { set(x: string, y: string): void } = + new Headers(); requestHeaders.set("Authorization", "Bearer " + workspace.token); requestHeaders.set("Content-Type", "application/octet-stream"); diff --git a/cli/push.ts b/cli/push.ts index 1fed4b7d48..9df95da998 100644 --- a/cli/push.ts +++ b/cli/push.ts @@ -1,8 +1,8 @@ // deno-lint-ignore-file no-explicit-any -import { colors, Command } from "./deps.ts"; +import { colors, Command, log } from "./deps.ts"; import { GlobalOptions } from "./types.ts"; -async function stub(_opts: GlobalOptions, _dir?: string) { +function stub(_opts: GlobalOptions, _dir?: string) { log.info( colors.red.underline( 'Push is deprecated. Use "sync push --raw" instead. See for more information.' diff --git a/cli/script.ts b/cli/script.ts index 2a8ef863bc..c5593a5d3c 100644 --- a/cli/script.ts +++ b/cli/script.ts @@ -183,7 +183,7 @@ export async function handleFile( requestBody: { content, description: typed?.description ?? "", - language: language as NewScript.language, + language: language, path: remotePath.replaceAll("\\", "/"), summary: typed?.summary ?? "", kind: typed?.kind, @@ -213,7 +213,7 @@ export async function handleFile( requestBody: { content, description: typed?.description ?? "", - language: language as NewScript.language, + language: language, path: remotePath.replaceAll("\\", "/"), summary: typed?.summary ?? "", kind: typed?.kind, diff --git a/cli/sync.ts b/cli/sync.ts index eb86d777d0..7fc498a38e 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -129,7 +129,7 @@ function ZipFSElement(zip: JSZip, useYaml: boolean): DynFSElement { const seen_names = new Set(); function assignPath( summary: string | undefined, - language: RawScript.language + language: RawScript["language"] ): string { let name; diff --git a/cli/workspace.ts b/cli/workspace.ts index 1a669aee16..1cf49efc50 100644 --- a/cli/workspace.ts +++ b/cli/workspace.ts @@ -242,9 +242,9 @@ export async function add( ) ); const automateUsernameCreation: boolean = - (await SettingService.getGlobal({ + ((await SettingService.getGlobal({ key: "automate_username_creation", - })) ?? false; + })) as any) ?? false; await WorkspaceService.createWorkspace({ requestBody: { id: workspaceId,