fix(cli): reassign -d to --verbose and --data

This commit is contained in:
Ruben Fiszel
2023-07-30 12:05:24 +02:00
parent 104b5213b4
commit fdd39eb5ff
3 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ export { setClient } from "https://deno.land/x/windmill@v1.95.1/mod.ts";
export * from "https://deno.land/x/windmill@v1.95.1/windmill-api/index.ts";
// cliffy
export { Command } from "https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts";
export { Command } from "https://deno.land/x/cliffy@v1.0.0-rc.2/command/mod.ts";
export { Table } from "https://deno.land/x/cliffy@v1.0.0-rc.2/table/table.ts";
export { colors } from "https://deno.land/x/cliffy@v1.0.0-rc.2/ansi/colors.ts";
export { Secret } from "https://deno.land/x/cliffy@v1.0.0-rc.2/prompt/secret.ts";
+6 -3
View File
@@ -34,12 +34,16 @@ export const VERSION = "v1.138.0";
let command: any = new Command()
.name("wmill")
.action(() =>
log.info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`)
)
.description("A simple CLI tool for windmill.")
.globalOption(
"--workspace <workspace:string>",
"Specify the target workspace. This overrides the default workspace."
)
.globalOption("-d --debug", "Show debug logs")
.globalOption("--debug --verbose", "Show debug/verbose logs")
.globalOption(
"--show-diffs",
"Show diff informations when syncing (may show sensitive informations)"
@@ -90,7 +94,6 @@ let command: any = new Command()
})
)
.command("completions", new CompletionsCommand());
if (Number.parseInt(VERSION.replace("v", "").replace(".", "")) > 1700) {
command = command.command("push", push).command("pull", pull);
}
@@ -98,7 +101,7 @@ if (Number.parseInt(VERSION.replace("v", "").replace(".", "")) > 1700) {
export let showDiffs = false;
try {
const LOG_LEVEL =
Deno.args.includes("--debug") || Deno.args.includes("-d")
Deno.args.includes("--verbose") || Deno.args.includes("--debug")
? "DEBUG"
: "INFO";
// const NO_COLORS = Deno.args.includes("--no-colors");
+3
View File
@@ -825,6 +825,9 @@ async function push(
}
const command = new Command()
.action(() =>
log.info("2 actions available, pull and push. Use -h to display help.")
)
.command("pull")
.description(
"Pull any remote changes and apply them locally. Use --raw for usage without local state tracking."