fix(cli,daemon,snmp): normalize CLI argument parsing and extract daemon monitoring helpers with stronger SNMP typing
This commit is contained in:
@@ -19,7 +19,7 @@ export class NupstCli {
|
||||
|
||||
/**
|
||||
* Parse command line arguments and execute the appropriate command
|
||||
* @param args Command line arguments (process.argv)
|
||||
* @param args Command line arguments excluding runtime and script path
|
||||
*/
|
||||
public async parseAndExecute(args: string[]): Promise<void> {
|
||||
// Extract debug and version flags from any position
|
||||
@@ -38,8 +38,8 @@ export class NupstCli {
|
||||
}
|
||||
|
||||
// Get the command (default to help if none provided)
|
||||
const command = debugOptions.cleanedArgs[2] || 'help';
|
||||
const commandArgs = debugOptions.cleanedArgs.slice(3);
|
||||
const command = debugOptions.cleanedArgs[0] || 'help';
|
||||
const commandArgs = debugOptions.cleanedArgs.slice(1);
|
||||
|
||||
// Route to the appropriate command handler
|
||||
await this.executeCommand(command, commandArgs, debugOptions.debugMode);
|
||||
@@ -98,7 +98,7 @@ export class NupstCli {
|
||||
await serviceHandler.start();
|
||||
break;
|
||||
case 'status':
|
||||
await serviceHandler.status();
|
||||
await serviceHandler.status(debugMode);
|
||||
break;
|
||||
case 'logs':
|
||||
await serviceHandler.logs();
|
||||
|
||||
Reference in New Issue
Block a user