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();