Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
7384b54e09 | |||
0eac72e15d | |||
b7957b0ab6 | |||
99a0a9ca81 | |||
bd66903419 | |||
740d8dac35 |
1381
package-lock.json
generated
1381
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartcli",
|
"name": "@pushrocks/smartcli",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "4.0.2",
|
"version": "4.0.5",
|
||||||
"description": "easy observable cli tasks",
|
"description": "easy observable cli tasks",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
@ -33,9 +33,7 @@
|
|||||||
"@pushrocks/smartparam": "^1.1.6",
|
"@pushrocks/smartparam": "^1.1.6",
|
||||||
"@pushrocks/smartpromise": "^3.1.3",
|
"@pushrocks/smartpromise": "^3.1.3",
|
||||||
"@pushrocks/smartrx": "^2.0.25",
|
"@pushrocks/smartrx": "^2.0.25",
|
||||||
"@types/yargs": "^17.0.10",
|
"yargs-parser": "21.0.1"
|
||||||
"@types/yargs-parser": "^21.0.0",
|
|
||||||
"yargs-parser": "^21.0.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartcli',
|
name: '@pushrocks/smartcli',
|
||||||
version: '4.0.2',
|
version: '4.0.5',
|
||||||
description: 'easy observable cli tasks'
|
description: 'easy observable cli tasks'
|
||||||
}
|
}
|
||||||
|
@ -95,12 +95,6 @@ export class Smartcli {
|
|||||||
*/
|
*/
|
||||||
public addVersion(versionArg: string) {
|
public addVersion(versionArg: string) {
|
||||||
this.version = versionArg;
|
this.version = versionArg;
|
||||||
this.addCommandAlias('v', 'version');
|
|
||||||
this.parseCompleted.promise.then((argv) => {
|
|
||||||
if (argv.v) {
|
|
||||||
console.log(this.version);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -133,8 +127,15 @@ export class Smartcli {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const wantedCommand = parsedYArgs._[0];
|
||||||
|
|
||||||
|
// lets handle some standards
|
||||||
|
if (!wantedCommand && (parsedYArgs.v || parsedYArgs.version)) {
|
||||||
|
console.log(this.version || 'unknown version');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (const command of this.commandObservableMap.getArray()) {
|
for (const command of this.commandObservableMap.getArray()) {
|
||||||
const wantedCommand = parsedYArgs._[0];
|
|
||||||
if (!wantedCommand) {
|
if (!wantedCommand) {
|
||||||
const standardCommand = this.commandObservableMap.findSync((commandArg) => {
|
const standardCommand = this.commandObservableMap.findSync((commandArg) => {
|
||||||
return commandArg.commandName === 'standardCommand';
|
return commandArg.commandName === 'standardCommand';
|
||||||
|
Reference in New Issue
Block a user