@@ -277,6 +277,7 @@ function deploymentHistory(commandName: string, yargs: yargs.Argv): void {
277277}
278278
279279yargs
280+ . scriptName ( "code-push" )
280281 . usage ( USAGE_PREFIX + " <command>" )
281282 . demand ( /*count*/ 1 , /*max*/ 1 ) // Require exactly one non-option argument.
282283 . command ( "access-key" , "View and manage the access keys associated with your account" , ( yargs : yargs . Argv ) => {
@@ -334,7 +335,7 @@ yargs
334335
335336 addCommonConfiguration ( yargs ) ;
336337 } )
337- . command ( "collaborator" , "View and manage app collaborators" , ( yargs : yargs . Argv ) => {
338+ . command ( "collaborator" , false , ( yargs : yargs . Argv ) => {
338339 isValidCommandCategory = true ;
339340 yargs
340341 . usage ( USAGE_PREFIX + " collaborator <command>" )
@@ -413,7 +414,7 @@ yargs
413414
414415 addCommonConfiguration ( yargs ) ;
415416 } )
416- . command ( "link" , "Link an additional authentication provider (e.g. GitHub) to an existing CodePush account" , ( yargs : yargs . Argv ) => {
417+ . command ( "link" , false , ( yargs : yargs . Argv ) => {
417418 isValidCommandCategory = true ;
418419 isValidCommand = true ;
419420 yargs
@@ -430,14 +431,13 @@ yargs
430431 yargs
431432 . usage ( USAGE_PREFIX + " login [options]" )
432433 . demand ( /*count*/ 0 , /*max*/ 1 ) //set 'max' to one to allow usage of serverUrl undocument parameter for testing
433- . example ( "login" , "Logs in to the CodePush server" )
434- . example ( "login --accessKey mykey" , 'Logs in on behalf of the user who owns and created the access key "mykey"' )
435- . option ( "accessKey " , {
434+ . example ( "login" , "Prompts for an access key and logs in to the CodePush server" )
435+ . example ( "login --access-key mykey" , 'Logs in with the access key "mykey"' )
436+ . option ( "access-key " , {
436437 alias : "key" ,
437438 default : null ,
438439 demand : false ,
439- description :
440- "Access key to authenticate against the CodePush server with, instead of providing your username and password credentials" ,
440+ description : "Access key to authenticate against the CodePush server with" ,
441441 type : "string" ,
442442 } )
443443 . check ( ( argv : any , aliases : { [ aliases : string ] : string } ) : any => isValidCommand ) ; // Report unrecognized, non-hyphenated command category.
@@ -585,7 +585,7 @@ yargs
585585
586586 addCommonConfiguration ( yargs ) ;
587587 } )
588- . command ( "register" , "Register a new CodePush account" , ( yargs : yargs . Argv ) => {
588+ . command ( "register" , false , ( yargs : yargs . Argv ) => {
589589 isValidCommandCategory = true ;
590590 isValidCommand = true ;
591591 yargs
@@ -859,7 +859,7 @@ yargs
859859
860860 addCommonConfiguration ( yargs ) ;
861861 } )
862- . command ( "session" , "View and manage the current login sessions associated with your account" , ( yargs : yargs . Argv ) => {
862+ . command ( "session" , false , ( yargs : yargs . Argv ) => {
863863 isValidCommandCategory = true ;
864864 yargs
865865 . usage ( USAGE_PREFIX + " session <command>" )
@@ -1137,7 +1137,7 @@ export function createCommand(): cli.ICommand {
11371137 const loginCommand = < cli . ILoginCommand > cmd ;
11381138
11391139 loginCommand . serverUrl = getServerUrl ( arg1 ) ;
1140- loginCommand . accessKey = argv [ "accessKey " ] as any ;
1140+ loginCommand . accessKey = argv [ "access-key " ] as any ;
11411141 break ;
11421142
11431143 case "logout" :
0 commit comments