fix(smartcli): tighten command parsing and error handling while updating build and package configuration

This commit is contained in:
2026-04-30 14:29:50 +00:00
parent e3f5616320
commit 6279f2cbad
10 changed files with 4379 additions and 5260 deletions
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartcli',
version: '4.0.19',
version: '4.0.21',
description: 'A library that simplifies building reactive command-line applications using observables, with robust support for commands, arguments, options, aliases, and asynchronous operation management.'
}
+4 -1
View File
@@ -18,7 +18,7 @@ export class Smartcli {
*/
public parseCompleted = plugins.smartpromise.defer<any>();
public version: string;
public version?: string;
/**
* map of all Trigger/Observable objects to keep track
@@ -65,6 +65,9 @@ export class Smartcli {
*/
public triggerCommand(commandNameArg: string, argvObject: any) {
const triggerSubject = this.getCommandSubject(commandNameArg);
if (!triggerSubject) {
throw new Error(`No smartcli command registered for ${commandNameArg}`);
}
triggerSubject.next(argvObject);
return triggerSubject;
}