chore(cli): fix some formatting

This commit is contained in:
ZTatman 2026-04-15 22:20:07 -04:00
parent bbf3bfc48a
commit 4ceb1ff223
4 changed files with 10 additions and 8 deletions

View file

@ -97,7 +97,9 @@ async function init(opts: { output?: string }) {
.map((line) => {
if (!line.includes("=")) return line;
const [key] = line.split("=");
return SECRET_ENV_KEYS.includes(key as typeof SECRET_ENV_KEYS[number])
return SECRET_ENV_KEYS.includes(
key as (typeof SECRET_ENV_KEYS)[number],
)
? `${key}=****`
: line;
})
@ -112,7 +114,7 @@ async function init(opts: { output?: string }) {
}
}
const answers = await p.group(
const answers = await p.group(
{
forgejoBaseUrl: () =>
p.text({

View file

@ -4,7 +4,10 @@ import * as c from "yoctocolors";
import * as p from "@clack/prompts";
import { ENV_MAPPING, parseEnvFile, REQUIRED_KEYS } from "../utils/config.js";
import { checkForgejoReachability, checkRepoAccess } from "../utils/forgejo-checks.js";
import {
checkForgejoReachability,
checkRepoAccess,
} from "../utils/forgejo-checks.js";
import { CommandConfig } from "../cli-router.js";
interface VerifyOptions {

View file

@ -10,10 +10,7 @@ export const ENV_MAPPING = {
FORGEJO_PAT: "forgejoPat",
} as const;
export const REQUIRED_KEYS = [
"forgejoBaseUrl",
"forgejoPat",
] as const;
export const REQUIRED_KEYS = ["forgejoBaseUrl", "forgejoPat"] as const;
export const SECRET_KEYS = ["forgejoPat"] as const;

View file

@ -105,7 +105,7 @@ export async function checkRepoAccess(
return createCheckResult(
"Forgejo",
true,
`User ${user.login} has ${totalRepos} ${totalRepos === 1 ? "repository" : "repositories"}`,
`${user.login} has ${totalRepos} ${totalRepos === 1 ? "repository" : "repositories"}`,
);
}