11#!/usr/bin/env node
22
33import { CCKey } from "codechain-keystore" ;
4- import * as commander from "commander" ;
4+ import * as program from "commander" ;
55import * as _ from "lodash" ;
66import * as process from "process" ;
77
@@ -11,7 +11,7 @@ import { listKeys } from "./command/list";
1111import { CLIError , CLIErrorType } from "./error" ;
1212import { AccountType , Option } from "./types" ;
1313
14- commander
14+ program
1515 . version ( "0.1.1" )
1616 . arguments ( "[action]" )
1717 . option (
@@ -22,7 +22,7 @@ commander
2222 . option ( "-a --address <address>" , "address" )
2323 . action ( main ) ;
2424
25- commander . on ( "--help" , ( ) => {
25+ program . on ( "--help" , ( ) => {
2626 console . log ( ` Action:
2727
2828 list : List all the saved addresses
@@ -42,7 +42,7 @@ commander.on("--help", () => {
4242
4343async function main ( action : string , option : Option ) {
4444 if ( ! action ) {
45- commander . outputHelp ( ) ;
45+ program . outputHelp ( ) ;
4646 process . exit ( 1 ) ;
4747 return ;
4848 }
@@ -71,7 +71,7 @@ async function main(action: string, option: Option) {
7171 }
7272}
7373
74- commander . parse ( process . argv ) ;
74+ program . parse ( process . argv ) ;
7575
7676function getAccountType ( option : Option ) : AccountType {
7777 const accountType = option . accountType ;
0 commit comments