@t1mmen/srtd
Version:
Supabase Repeatable Template Definitions (srtd): 🪄 Live-reloading SQL templates for Supabase DX. Make your database changes reviewable and migrations maintainable! 🚀
28 lines • 986 B
JavaScript
import chalk from 'chalk';
import packageJson from '../../package.json' with { type: 'json' };
/**
* Renders the srtd branding header with blue/white badge.
*
* Usage:
* - Menu: renderBranding() → " srtd Supabase Repeatable Template Definitions v0.4.7"
* - Direct command: renderBranding({ subtitle: 'Build' }) → " srtd Build v0.4.7"
*/
export function renderBranding(options = {}) {
const { subtitle } = options;
console.log();
// Dark green/white badge
const badge = chalk.bgAnsi256(22).white(' srtd ');
// Render subtitle or main title
let title;
if (subtitle) {
title = subtitle;
}
else {
title = `${chalk.green.bold('S')}upabase ${chalk.green.bold('R')}epeatable ${chalk.green.bold('T')}emplate ${chalk.green.bold('D')}efinitions`;
}
// Version
const version = chalk.dim(` v${packageJson.version}`);
console.log(`${badge} ${title}${version}`);
console.log();
}
//# sourceMappingURL=branding.js.map