chore: add lobster CLI banner art
This commit is contained in:
@@ -33,6 +33,41 @@ export function formatCliBannerLine(
|
||||
return `${title} ${version} (${commitLabel}) — ${tagline}`;
|
||||
}
|
||||
|
||||
const LOBSTER_ASCII = [
|
||||
"░████░█░░░░░█████░█░░░█░███░░████░░████░░▀█▀",
|
||||
"█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░░█░█░░░█░░█░",
|
||||
"█░░░░░█░░░░░█████░█░█░█░█░░█░████░░█░░░█░░█░",
|
||||
"█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░█░░█░░░█░░█░",
|
||||
"░████░█████░█░░░█░░█░█░░███░░████░░░███░░░█░",
|
||||
" 🦞 FRESH DAILY 🦞",
|
||||
];
|
||||
|
||||
export function formatCliBannerArt(options: BannerOptions = {}): string {
|
||||
const rich = options.richTty ?? isRich();
|
||||
if (!rich) return LOBSTER_ASCII.join("\n");
|
||||
|
||||
const colorChar = (ch: string) => {
|
||||
if (ch === "█") return theme.accentBright(ch);
|
||||
if (ch === "░") return theme.accentDim(ch);
|
||||
if (ch === "▀") return theme.accent(ch);
|
||||
return theme.muted(ch);
|
||||
};
|
||||
|
||||
const colored = LOBSTER_ASCII.map((line) => {
|
||||
if (line.includes("FRESH DAILY")) {
|
||||
return (
|
||||
theme.muted(" ") +
|
||||
theme.accent("🦞") +
|
||||
theme.info(" FRESH DAILY ") +
|
||||
theme.accent("🦞")
|
||||
);
|
||||
}
|
||||
return [...line].map(colorChar).join("");
|
||||
});
|
||||
|
||||
return colored.join("\n");
|
||||
}
|
||||
|
||||
export function emitCliBanner(version: string, options: BannerOptions = {}) {
|
||||
if (bannerEmitted) return;
|
||||
const argv = options.argv ?? process.argv;
|
||||
|
||||
Reference in New Issue
Block a user