fix(cli,daemon,snmp): normalize CLI argument parsing and extract daemon monitoring helpers with stronger SNMP typing

This commit is contained in:
2026-04-14 14:27:29 +00:00
parent 2adf1d5548
commit 1f542ca271
22 changed files with 1571 additions and 702 deletions
+4 -4
View File
@@ -124,7 +124,7 @@ export class GroupHandler {
await this.nupst.getDaemon().loadConfig();
} catch (error) {
logger.error(
'No configuration found. Please run "nupst setup" first to create a configuration.',
'No configuration found. Please run "nupst ups add" first to create a configuration.',
);
return;
}
@@ -219,7 +219,7 @@ export class GroupHandler {
await this.nupst.getDaemon().loadConfig();
} catch (error) {
logger.error(
'No configuration found. Please run "nupst setup" first to create a configuration.',
'No configuration found. Please run "nupst ups add" first to create a configuration.',
);
return;
}
@@ -316,7 +316,7 @@ export class GroupHandler {
await this.nupst.getDaemon().loadConfig();
} catch (error) {
logger.error(
'No configuration found. Please run "nupst setup" first to create a configuration.',
'No configuration found. Please run "nupst ups add" first to create a configuration.',
);
return;
}
@@ -484,7 +484,7 @@ export class GroupHandler {
prompt: (question: string) => Promise<string>,
): Promise<void> {
if (!config.upsDevices || config.upsDevices.length === 0) {
logger.log('No UPS devices available. Use "nupst add" to add UPS devices.');
logger.log('No UPS devices available. Use "nupst ups add" to add UPS devices.');
return;
}