From d6e0a1a2740a47b9fa2829efdfb45ff790f4ff46 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Sun, 19 Oct 2025 23:01:25 +0000 Subject: [PATCH] feat(cli): remove ALL ugly boxes from status output - now fully beautiful MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- deno.json | 2 +- ts/systemd.ts | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/deno.json b/deno.json index bd43da7..356ff74 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@serve.zone/nupst", - "version": "4.0.9", + "version": "4.1.0", "exports": "./mod.ts", "tasks": { "dev": "deno run --allow-all mod.ts", diff --git a/ts/systemd.ts b/ts/systemd.ts index e61b088..1bdbeca 100644 --- a/ts/systemd.ts +++ b/ts/systemd.ts @@ -50,11 +50,11 @@ WantedBy=multi-user.target try { await fs.access(configPath); } catch (error) { - const boxWidth = 50; - logger.logBoxTitle('Configuration Error', boxWidth); - logger.logBoxLine(`No configuration file found at ${configPath}`); - logger.logBoxLine("Please run 'nupst add' first to create a UPS configuration."); - logger.logBoxEnd(); + console.log(''); + console.log(`${symbols.error} ${theme.error('No configuration found')}`); + console.log(` ${theme.dim('Config file:')} ${configPath}`); + console.log(` ${theme.dim('Run')} ${theme.command('nupst ups add')} ${theme.dim('to create a configuration')}`); + console.log(''); throw new Error('Configuration not found'); } } @@ -138,16 +138,12 @@ WantedBy=multi-user.target try { // Enable debug mode if requested if (debugMode) { - const boxWidth = 45; - logger.logBoxTitle('Debug Mode', boxWidth); - logger.logBoxLine('SNMP debugging enabled - detailed logs will be shown'); - logger.logBoxEnd(); + console.log(''); + logger.info('Debug Mode: SNMP debugging enabled'); + console.log(''); this.daemon.getNupstSnmp().enableDebug(); } - // Display version information - this.daemon.getNupstSnmp().getNupst().logVersionInfo(); - // Check if config exists first try { await this.checkConfigExists();