Skip to content

Commit 12391fa

Browse files
committed
Refactored apps update command to support no tls flag, updated description and examples
Refactored auth keys update command to with enhanced description and examples
1 parent 2eb9d7d commit 12391fa

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/commands/apps/update.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ export default class AppsUpdateCommand extends ControlBaseCommand {
1111
}),
1212
};
1313

14-
static description = "Update an app";
14+
static description = "Update the name or TLS setting of an app";
1515

1616
static examples = [
17-
'$ ably apps update "My App" --name "Updated App Name"',
18-
"$ ably apps update app-id --tls-only",
19-
'$ ably apps update "My App" --name "Updated App Name" --json',
17+
'$ ably apps update "My App" --name "New App Name"',
18+
"$ ably apps update my-app-id --tls-only",
19+
"$ ably apps update my-app-id --no-tls-only",
20+
'$ ably apps update "My App" --name "New App Name" --tls-only --json',
2021
];
2122

2223
static flags = {
@@ -25,6 +26,7 @@ export default class AppsUpdateCommand extends ControlBaseCommand {
2526
description: "New name for the app",
2627
}),
2728
"tls-only": Flags.boolean({
29+
allowNo: true,
2830
description: "Whether the app should accept TLS connections only",
2931
}),
3032
};

src/commands/auth/keys/update.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ export default class KeysUpdateCommand extends ControlBaseCommand {
1414
}),
1515
};
1616

17-
static description = "Update a key's properties";
17+
static description = "Update the name or capabilities of a key";
1818

1919
static examples = [
2020
'$ ably auth keys update "APP_ID.KEY_ID" --name "New Name"',
2121
'$ ably auth keys update "APP_ID.KEY_ID:KEY_SECRET" --name "New Name"',
2222
`$ ably auth keys update "APP_ID.KEY_ID" --capabilities '{"channel1":["publish"],"channel2":["subscribe"]}'`,
23-
'$ ably auth keys update "APP_ID.KEY_ID" --name "New Name" --json',
23+
'$ ably auth keys update "APP_ID.KEY_ID" --capabilities "publish,subscribe,history"',
24+
'$ ably auth keys update "APP_ID.KEY_ID" --name "New Name" --capabilities "publish,subscribe" --json',
2425
];
2526

2627
static flags = {

0 commit comments

Comments
 (0)