Files
2026-07-13 12:30:28 +08:00

23 lines
540 B
TypeScript

import chalk from 'chalk';
type UrlTone = 'primary' | 'management';
export function printHighlightedUrl(
label: string,
url: string,
tone: UrlTone = 'primary',
): void {
const safeLabel = label.trim() || 'URL';
const safeUrl = url.trim();
const labelStyle = chalk.black.bgWhiteBright.bold;
const urlStyle =
tone === 'management'
? chalk.blueBright.bold.underline
: chalk.cyanBright.bold;
console.log('');
console.log(labelStyle(` ${safeLabel} `));
console.log(urlStyle(safeUrl));
console.log('');
}