Skip to content

Commit

Permalink
missing-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Dec 24, 2023
1 parent 2543670 commit 14b9d66
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { apiToken } from "./apiToken.ts";
import { keyManipulation } from "./keyManipulation.ts";
import { login } from "./login.ts";
import { randomBytes } from "node:crypto";
import yargs from "https://deno.land/x/[email protected]/deno.ts";
Expand Down Expand Up @@ -46,11 +47,10 @@ const args = yargs(Deno.args)
description: "List API tokens",
boolean: true,
}).strict().check(
({ g, c, d, l }: any) => {
return [g, c, d, l].filter((o) => o != undefined).length == 1
({ g, c, d, l }: any) =>
[g, c, d, l].filter((o) => o != undefined).length == 1
? true
: "Choose one option";
},
: "Choose one option",
),
)
.command("secret", "Generate a secret key")
Expand All @@ -64,7 +64,7 @@ const command = args._[0];
const commands: Record<string, () => Promise<string>> = {
login,
key: () => keyManipulation(args),
"token": () => apiToken(args),
token: () => apiToken(args),
secret: () => Promise.resolve(randomBytes(32).toString("base64url") + "="),
};

Expand Down

0 comments on commit 14b9d66

Please sign in to comment.