forked from org-formation/org-formation-cli
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli-program.ts
More file actions
Latest commit
67 lines (58 loc) · 1.91 KB
/
Copy pathcli-program.ts
File metadata and controls
67 lines (58 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import{Command}from'commander';
import{
CreateChangeSetCommand,
DeleteStacksCommand,
DescribeStacksCommand,
ExecuteChangeSetCommand,
InitOrganizationCommand,
InitPipelineCommand,
PerformTasksCommand,
PrintOrganizationCommand,
PrintStacksCommand,
UpdateOrganizationCommand,
UpdateStacksCommand,
ValidateStacksCommand,
ValidateTasksCommand,
RemoveCommand,
}from'~commands/index';
import{PrintTasksCommand}from'~commands/print-tasks';
exportclassCliProgram{
publicstaticCreate(): Command{
constp=newCliProgram();
returnp.getCommand();
}
privatestaticGetVersion(): string{
letpjson;
try{
pjson=require('../package.json');
}catch(err){
pjson=require('./package.json');
}
returnpjson.version;
}
publiccommandNames: string[];
privatereadonlyprogram: Command;
constructor(){
this.program=newCommand();
this.program.version(CliProgram.GetVersion(),'-v, --version');
this.program.description('aws organization formation');
newCreateChangeSetCommand(this.program);
newDeleteStacksCommand(this.program);
newDescribeStacksCommand(this.program);
newExecuteChangeSetCommand(this.program);
newInitPipelineCommand(this.program);
newInitOrganizationCommand(this.program);
newPerformTasksCommand(this.program);
newPrintOrganizationCommand(this.program);
newPrintTasksCommand(this.program);
newPrintStacksCommand(this.program);
newUpdateOrganizationCommand(this.program);
newUpdateStacksCommand(this.program);
newValidateStacksCommand(this.program);
newValidateTasksCommand(this.program);
newRemoveCommand(this.program);
}
publicgetCommand(): Command{
returnthis.program;
}
}