style: refine version info display format and clean up whoami

This commit is contained in:
s41r4j
2026-01-29 00:07:18 +05:30
parent bf9b8a010b
commit ffade4e0ab
2 changed files with 9 additions and 15 deletions
-14
View File
@@ -37,22 +37,8 @@ class WhoAmICommand {
console.log(`├─ Name: ${color.cyan(gitUser)}`);
console.log(`└─ Email: ${color.cyan(gitEmail)}`);
// Parse S4 date/time if available
let builtAt = 'unknown';
const parsed = S4Versioning.parse(version);
if (parsed) {
const y = parsed.date.substring(0, 4);
const m = parsed.date.substring(4, 6);
const d = parsed.date.substring(6, 8);
const H = parsed.time.substring(0, 2);
const M = parsed.time.substring(2, 4);
const dateObj = new Date(`${y}-${m}-${d}T${H}:${M}:00`);
builtAt = `${dateObj.toDateString()} @ ${H}:${M}`;
}
console.log(`\n${color.green('TOOL_METRICS')}`);
console.log(`├─ Version: ${color.magenta(version)}`);
console.log(`├─ Built: ${builtAt}`);
console.log(`├─ Engine: Node ${process.version}`);
console.log(`└─ Author: ${pkg.author}`);