diff --git a/cli/flow.ts b/cli/flow.ts index 601f0be0bc..938ad1659d 100644 --- a/cli/flow.ts +++ b/cli/flow.ts @@ -29,21 +29,23 @@ export function replaceInlineScripts( ) { modules.forEach((m) => { if (m.value.type == "rawscript") { - const path = m.value.content.split(" ")[1]; - m.value.content = Deno.readTextFileSync(localPath + path); - const lock = m.value.lock; - if (removeLocks && removeLocks.includes(path)) { - m.value.lock = undefined; - } else if ( - lock && - typeof lock == "string" && - lock.trimStart().startsWith("!inline ") - ) { - const path = lock.split(" ")[1]; - try { - m.value.lock = readInlinePathSync(localPath + path); - } catch { - log.error(`Lock file ${path} not found`); + if (m.value.content.startsWith("!inline")) { + const path = m.value.content.split(" ")[1]; + m.value.content = Deno.readTextFileSync(localPath + path); + const lock = m.value.lock; + if (removeLocks && removeLocks.includes(path)) { + m.value.lock = undefined; + } else if ( + lock && + typeof lock == "string" && + lock.trimStart().startsWith("!inline ") + ) { + const path = lock.split(" ")[1]; + try { + m.value.lock = readInlinePathSync(localPath + path); + } catch { + log.error(`Lock file ${path} not found`); + } } } } else if (m.value.type == "forloopflow") { @@ -120,6 +122,7 @@ export async function pushFlow( }); } catch (e) { throw new Error( + //@ts-ignore `Failed to create flow ${remotePath}: ${e.body ?? e.message}` ); } diff --git a/cli/folder.ts b/cli/folder.ts index 0820cc0c9d..5cf2812670 100644 --- a/cli/folder.ts +++ b/cli/folder.ts @@ -73,6 +73,7 @@ export async function pushFolder( }, }); } catch (e) { + //@ts-ignore console.error(e.body); throw e; } @@ -87,6 +88,7 @@ export async function pushFolder( }, }); } catch (e) { + //@ts-ignore throw Error(`Failed to create folder ${name}: ${e.body ?? e.message}`); } } diff --git a/cli/instance.ts b/cli/instance.ts index 30459d9ef6..bedecdac63 100644 --- a/cli/instance.ts +++ b/cli/instance.ts @@ -578,6 +578,7 @@ async function whoami(opts: {}) { log.info(JSON.stringify(whoamiInfo, null, 2)); } catch (error) { log.error( + //@ts-ignore colors.red(`Failed to retrieve whoami information: ${error.message}`) ); } @@ -620,7 +621,7 @@ const command = new Command() .description("Remove an instance") .complete("instance", async () => (await allInstances()).map((x) => x.name)) .arguments("") - .action(async (instance) => { + .action(async (instance: any) => { const instances = await allInstances(); const choice = (await Select.prompt({