Skip to content

Commit b569d4f

Browse files
umair-ablyclaude
andcommitted
[DX-793] Migrate placeholder topic commands to BaseTopicCommand and add --json examples
Migrate 14 placeholder/index files from extending Command to BaseTopicCommand for consistency with other topic commands. Add missing --json examples to 5 leaf commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d3840b7 commit b569d4f

43 files changed

Lines changed: 193 additions & 290 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/commands/apps/channel-rules/create.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default class ChannelRulesCreateCommand extends ControlBaseCommand {
1111
'$ ably apps channel-rules create --name "chat" --persisted',
1212
'$ ably apps channel-rules create --name "events" --push-enabled',
1313
'$ ably apps channel-rules create --name "notifications" --persisted --push-enabled --app "My App"',
14+
'$ ably apps channel-rules create --name "chat" --persisted --json',
1415
];
1516

1617
static flags = {

src/commands/apps/channel-rules/update.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default class ChannelRulesUpdateCommand extends ControlBaseCommand {
1717
"$ ably apps channel-rules update chat --persisted",
1818
"$ ably apps channel-rules update events --push-enabled=false",
1919
'$ ably apps channel-rules update notifications --persisted --push-enabled --app "My App"',
20+
"$ ably apps channel-rules update chat --persisted --json",
2021
];
2122

2223
static flags = {

src/commands/apps/create.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default class AppsCreateCommand extends ControlBaseCommand {
1414
static examples = [
1515
'$ ably apps create --name "My New App"',
1616
'$ ably apps create --name "My New App" --tls-only',
17+
'$ ably apps create --name "My New App" --json',
1718
'$ ABLY_ACCESS_TOKEN="YOUR_ACCESS_TOKEN" ably apps create --name "My New App"',
1819
];
1920

src/commands/apps/set-apns-p12.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default class AppsSetApnsP12Command extends ControlBaseCommand {
2525
"$ ably apps set-apns-p12 app-id --certificate /path/to/certificate.p12",
2626
'$ ably apps set-apns-p12 app-id --certificate /path/to/certificate.p12 --password "YOUR_CERTIFICATE_PASSWORD"',
2727
"$ ably apps set-apns-p12 app-id --certificate /path/to/certificate.p12 --use-for-sandbox",
28+
"$ ably apps set-apns-p12 app-id --certificate /path/to/certificate.p12 --json",
2829
];
2930

3031
static flags = {

src/commands/apps/switch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default class AppsSwitch extends ControlBaseCommand {
1717
static override examples = [
1818
"<%= config.bin %> <%= command.id %> APP_ID",
1919
"<%= config.bin %> <%= command.id %>",
20+
"<%= config.bin %> <%= command.id %> APP_ID --json",
2021
];
2122

2223
static override flags = {

src/commands/apps/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class AppsUpdateCommand extends ControlBaseCommand {
2020
static examples = [
2121
'$ ably apps update app-id --name "Updated App Name"',
2222
"$ ably apps update app-id --tls-only",
23-
'$ ably apps update app-id --name "Updated App Name" --tls-only',
23+
'$ ably apps update app-id --name "Updated App Name" --json',
2424
'$ ABLY_ACCESS_TOKEN="YOUR_ACCESS_TOKEN" ably apps update app-id --name "Updated App Name"',
2525
];
2626

src/commands/auth/keys/switch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default class KeysSwitchCommand extends ControlBaseCommand {
1919
"$ ably auth keys switch",
2020
"$ ably auth keys switch APP_ID.KEY_ID",
2121
"$ ably auth keys switch KEY_ID --app APP_ID",
22+
"$ ably auth keys switch --json",
2223
];
2324

2425
static flags = {

src/commands/auth/keys/update.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default class KeysUpdateCommand extends ControlBaseCommand {
1818
'$ ably auth keys update APP_ID.KEY_ID --name "New Name"',
1919
'$ ably auth keys update KEY_ID --app APP_ID --capabilities "publish,subscribe"',
2020
'$ ably auth keys update APP_ID.KEY_ID --name "New Name" --capabilities "publish,subscribe"',
21+
'$ ably auth keys update APP_ID.KEY_ID --name "New Name" --json',
2122
];
2223

2324
static flags = {

src/commands/bench/publisher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export default class BenchPublisher extends AblyBaseCommand {
6666
"$ ably bench publisher my-channel",
6767
"$ ably bench publisher --messages 5000 --rate 10 my-channel",
6868
"$ ably bench publisher --transport realtime my-channel",
69+
"$ ably bench publisher my-channel --json",
6970
];
7071

7172
static override flags = {

src/commands/bench/subscriber.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ export default class BenchSubscriber extends AblyBaseCommand {
3333

3434
static override description = "Run a subscriber benchmark test";
3535

36-
static override examples = ["$ ably bench subscriber my-channel"];
36+
static override examples = [
37+
"$ ably bench subscriber my-channel",
38+
"$ ably bench subscriber my-channel --json",
39+
];
3740

3841
static override flags = {
3942
...productApiFlags,

0 commit comments

Comments
 (0)