Download src/lib/oauth/utils/banner.js from heyeyydss/api9nin: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/lib/oauth/utils/banner.js
- Command line
-
hf download hf://spaces/heyeyydss/api9nin/src/lib/oauth/utils/banner.js
-
curl -L -o banner.js https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/lib/oauth/utils/banner.js
1.46 kB
| import figlet from "figlet"; | |
| import gradient from "gradient-string"; | |
| import chalkAnimation from "chalk-animation"; | |
| /** | |
| * Display banner | |
| */ | |
| export function showBanner() { | |
| const banner = figlet.textSync("LLM Proxy", { | |
| font: "ANSI Shadow", | |
| horizontalLayout: "default", | |
| verticalLayout: "default", | |
| }); | |
| console.log("\n" + gradient.pastel.multiline(banner)); | |
| console.log(gradient.cristal(" 🚀 OAuth CLI for AI Providers\n")); | |
| } | |
| /** | |
| * Display simple banner (no animation) | |
| */ | |
| export function showSimpleBanner() { | |
| const banner = figlet.textSync("EP CLI", { | |
| font: "Standard", | |
| horizontalLayout: "default", | |
| }); | |
| console.log(gradient.pastel.multiline(banner)); | |
| console.log(gradient.cristal(" OAuth CLI for AI Providers\n")); | |
| } | |
| /** | |
| * Display success animation | |
| */ | |
| export async function showSuccess(message) { | |
| return new Promise((resolve) => { | |
| const animation = chalkAnimation.rainbow(`\n✨ ${message}\n`); | |
| setTimeout(() => { | |
| animation.stop(); | |
| resolve(); | |
| }, 1000); | |
| }); | |
| } | |
| /** | |
| * Display loading animation | |
| */ | |
| export function showLoading(text) { | |
| const frames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]; | |
| let i = 0; | |
| const interval = setInterval(() => { | |
| process.stdout.write(`\r${frames[i]} ${text}`); | |
| i = (i + 1) % frames.length; | |
| }, 80); | |
| return { | |
| stop: () => { | |
| clearInterval(interval); | |
| process.stdout.write("\r"); | |
| }, | |
| }; | |
| } | |