2016-06-10 00:27:04 +00:00
|
|
|
import "typings-global";
|
|
|
|
|
2016-06-10 01:10:21 +00:00
|
|
|
import * as interfaces from "./smartcli.interfaces"
|
|
|
|
import * as plugins from "./smartcli.plugins"
|
|
|
|
import * as SmartcliChecks from "./smartcli.checks";
|
|
|
|
import * as SmartcliGetters from "./smartcli.getters";
|
|
|
|
import * as SmartcliInteractions from "./smartcli.interaction";
|
|
|
|
|
2016-06-10 00:27:04 +00:00
|
|
|
export class Smartcli {
|
2016-06-10 01:10:21 +00:00
|
|
|
questionsDone;
|
|
|
|
commands:interfaces.CliCommand[];
|
|
|
|
questions;
|
|
|
|
constructor(){
|
|
|
|
this.questionsDone = plugins.q.defer();
|
|
|
|
}
|
|
|
|
addCommand(definitionArg:{commandName:string}){
|
|
|
|
let done = plugins.q.defer();
|
|
|
|
if (plugins.argv._.indexOf(definitionArg.commandName) == 0) {
|
|
|
|
done.resolve();
|
|
|
|
} else {
|
|
|
|
return done.reject();
|
|
|
|
}
|
|
|
|
return done.promsise;
|
|
|
|
};
|
|
|
|
addQuestion(definitionArg:{questionString:string,questionType:string}){
|
|
|
|
|
|
|
|
};
|
|
|
|
addVersion(versionArg:string){
|
|
|
|
|
|
|
|
}
|
|
|
|
startParse(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-06-09 12:01:06 +00:00
|
|
|
}
|