feat(cli): remove ALL ugly boxes from status output - now fully beautiful
Removed the last remaining ugly ASCII boxes: - Version info box (┌─┐│└┘) that appeared at top - Async version check box that ended randomly in middle - Configuration error box Now status output is 100% clean and beautiful with just colored text: ● Service: active (running) PID: 9120 Memory: 45.7M CPU: 190ms UPS Devices (2): ⚠ Test UPS (SNMP v1) - On Battery Battery: 100% ✓ Runtime: 48 min Host: 192.168.187.140:161 ◯ Test UPS (SNMP v3) - Unknown Battery: 0% ⚠ Runtime: 0 min Host: 192.168.187.140:161 No boxes, just beautiful colored output with symbols! Bumped to v4.1.0 to mark completion of beautiful CLI feature.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/nupst",
|
"name": "@serve.zone/nupst",
|
||||||
"version": "4.0.9",
|
"version": "4.1.0",
|
||||||
"exports": "./mod.ts",
|
"exports": "./mod.ts",
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"dev": "deno run --allow-all mod.ts",
|
"dev": "deno run --allow-all mod.ts",
|
||||||
|
@@ -50,11 +50,11 @@ WantedBy=multi-user.target
|
|||||||
try {
|
try {
|
||||||
await fs.access(configPath);
|
await fs.access(configPath);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const boxWidth = 50;
|
console.log('');
|
||||||
logger.logBoxTitle('Configuration Error', boxWidth);
|
console.log(`${symbols.error} ${theme.error('No configuration found')}`);
|
||||||
logger.logBoxLine(`No configuration file found at ${configPath}`);
|
console.log(` ${theme.dim('Config file:')} ${configPath}`);
|
||||||
logger.logBoxLine("Please run 'nupst add' first to create a UPS configuration.");
|
console.log(` ${theme.dim('Run')} ${theme.command('nupst ups add')} ${theme.dim('to create a configuration')}`);
|
||||||
logger.logBoxEnd();
|
console.log('');
|
||||||
throw new Error('Configuration not found');
|
throw new Error('Configuration not found');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,16 +138,12 @@ WantedBy=multi-user.target
|
|||||||
try {
|
try {
|
||||||
// Enable debug mode if requested
|
// Enable debug mode if requested
|
||||||
if (debugMode) {
|
if (debugMode) {
|
||||||
const boxWidth = 45;
|
console.log('');
|
||||||
logger.logBoxTitle('Debug Mode', boxWidth);
|
logger.info('Debug Mode: SNMP debugging enabled');
|
||||||
logger.logBoxLine('SNMP debugging enabled - detailed logs will be shown');
|
console.log('');
|
||||||
logger.logBoxEnd();
|
|
||||||
this.daemon.getNupstSnmp().enableDebug();
|
this.daemon.getNupstSnmp().enableDebug();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display version information
|
|
||||||
this.daemon.getNupstSnmp().getNupst().logVersionInfo();
|
|
||||||
|
|
||||||
// Check if config exists first
|
// Check if config exists first
|
||||||
try {
|
try {
|
||||||
await this.checkConfigExists();
|
await this.checkConfigExists();
|
||||||
|
Reference in New Issue
Block a user