Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 363ec64

Browse files
committed
Command description tweaks
1 parent 4f3d807 commit 363ec64

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cli/script/command-parser.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ function accessKeyAdd(commandName: string, yargs: yargs.Argv): void {
4444
isValidCommand = true;
4545
yargs.usage(USAGE_PREFIX + " access-key " + commandName + " <accessKeyName>")
4646
.demand(/*count*/ 3, /*max*/ 3) // Require exactly three non-option arguments.
47-
.example("access-key " + commandName + " \"VSTS Integration\"", "Creates a new access key with the name \"VSTS Integration\" which expires by default in 60 days")
48-
.example("access-key " + commandName + " \"One time key\" --ttl 5m", "Creates a new access key with the name \"One time key\" which expires in 5 minutes")
49-
.option("ttl", { default: null, demand: false, description: "A duration string specifying the time for which the access key remains valid for use", type: "string" });
47+
.example("access-key " + commandName + " \"VSTS Integration\"", "Creates a new access key with the name \"VSTS Integration\", which expires in 60 days")
48+
.example("access-key " + commandName + " \"One time key\" --ttl 5m", "Creates a new access key with the name \"One time key\", which expires in 5 minutes")
49+
.option("ttl", { default: "60d", demand: false, description: "Duration string which specifies the amount of time that the access key should remain valid for (e.g 5m, 60d, 1y)", type: "string" });
5050

5151
addCommonConfiguration(yargs);
5252
}
@@ -56,9 +56,9 @@ function accessKeyPatch(commandName: string, yargs: yargs.Argv): void {
5656
yargs.usage(USAGE_PREFIX + " access-key " + commandName + " <accessKeyName>")
5757
.demand(/*count*/ 3, /*max*/ 3) // Require exactly three non-option arguments.
5858
.example("access-key " + commandName + " \"Key for build server\" --name \"Key for CI machine\"", "Renames the access key named \"Key for build server\" to \"Key for CI machine\"")
59-
.example("access-key " + commandName + " \"Key for build server\" --ttl 7d", "Edits the access key named \"Key for build server\" to expire in 7 days")
60-
.option("name", { default: null, demand: false, description: "New name for the access key", type: "string" })
61-
.option("ttl", { default: null, demand: false, description: "Duration string specifying the time for which the access key remains valid for use", type: "string" });
59+
.example("access-key " + commandName + " \"Key for build server\" --ttl 7d", "Updates the access key named \"Key for build server\" to expire in 7 days")
60+
.option("name", { default: null, demand: false, description: "Display name for the access key", type: "string" })
61+
.option("ttl", { default: null, demand: false, description: "Duration string which specifies the amount of time that the access key should remain valid for (e.g 5m, 60d, 1y)", type: "string" });
6262
addCommonConfiguration(yargs);
6363
}
6464

@@ -77,7 +77,7 @@ function accessKeyRemove(commandName: string, yargs: yargs.Argv): void {
7777
isValidCommand = true;
7878
yargs.usage(USAGE_PREFIX + " access-key " + commandName + " <accessKeyName>")
7979
.demand(/*count*/ 3, /*max*/ 3) // Require exactly three non-option arguments.
80-
.example("access-key " + commandName + " 8d6513de-050c-4788-96f7-b2a50dd9684v", "Removes the \"8d6513de-050c-4788-96f7-b2a50dd9684v\" access key");
80+
.example("access-key " + commandName + " \"VSTS Integration\"", "Removes the \"VSTS Integration\" access key");
8181

8282
addCommonConfiguration(yargs);
8383
}
@@ -196,7 +196,7 @@ var argv = yargs.usage(USAGE_PREFIX + " <command>")
196196
yargs.usage(USAGE_PREFIX + " access-key <command>")
197197
.demand(/*count*/ 2, /*max*/ 2) // Require exactly two non-option arguments.
198198
.command("add", "Create a new access key associated with your account", (yargs: yargs.Argv) => accessKeyAdd("add", yargs))
199-
.command("patch", "Update the name and expiry of an access key", (yargs: yargs.Argv) => accessKeyPatch("patch", yargs))
199+
.command("patch", "Update the name and/or TTL of an existing access key", (yargs: yargs.Argv) => accessKeyPatch("patch", yargs))
200200
.command("remove", "Remove an existing access key", (yargs: yargs.Argv) => accessKeyRemove("remove", yargs))
201201
.command("rm", "Remove an existing access key", (yargs: yargs.Argv) => accessKeyRemove("rm", yargs))
202202
.command("list", "List the access keys associated with your account", (yargs: yargs.Argv) => accessKeyList("list", yargs))

0 commit comments

Comments
 (0)