fix(core): update

This commit is contained in:
2024-04-12 18:24:31 +02:00
parent e5a8bbf4a3
commit 4fd13e65c4
5 changed files with 1281 additions and 1281 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartcli',
version: '4.0.8',
version: '4.0.9',
description: 'easy observable cli tasks'
}

View File

@ -68,6 +68,12 @@ export class Smartcli {
return triggerSubject;
}
/**
* gets the command subject for the specified name.
* call this before calling .parse()
* @param commandNameArg
* @returns
*/
public getCommandSubject(commandNameArg: string) {
const triggerObservableObject = this.commandObservableMap.findSync(
(triggerObservableObjectArg) => {
@ -81,6 +87,14 @@ export class Smartcli {
}
}
/**
* getOption
*/
public getOption(optionNameArg: string) {
const parsedYargs = plugins.yargsParser(process.argv);
return parsedYargs[optionNameArg];
}
/**
* allows to specify help text to be printed above the rest of the help text
*/