From c578ca691d4be55613d89cbeca7200c1b31fd5f6 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Fri, 20 Sep 2024 10:20:45 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Add=20Help=20subcommand?= =?UTF-8?q?=20for=20gateways=20subcommands=20(#40)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Why? The Gateways subcommands should display detailed information to utilize any flags and options. ## How? - Declare each subcommand to include the help command ## Tickets? - [PLAT-1514](https://linear.app/fleekxyz/issue/PLAT-1514/add-help-to-gateways-subcommand) ## Contribution checklist? - [x] The commit messages are detailed - [x] The `build` command runs locally - [ ] Assets or static content are linked and stored in the project - [ ] You have manually tested - [ ] You have provided tests ## Security checklist? - [ ] Sensitive data has been identified and is being protected properly - [ ] Injection has been prevented (parameterized queries, no eval or system calls) ## Preview? > Detail Screenshot 2024-09-19 at 16 49 32 > Create Screenshot 2024-09-19 at 16 50 05 --------- Co-authored-by: GitHub Action --- src/commands/gateways/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/commands/gateways/index.ts b/src/commands/gateways/index.ts index 7d30353..085436c 100644 --- a/src/commands/gateways/index.ts +++ b/src/commands/gateways/index.ts @@ -15,7 +15,8 @@ export default (program: Command) => { cmd .command('list') .description(t('listAllPrvGwForSelectProject')) - .action(() => listPrivateGatewaysActionHandler()); + .action(() => listPrivateGatewaysActionHandler()) + .addHelpCommand(); cmd .command('detail') @@ -36,7 +37,8 @@ export default (program: Command) => { .description(t('gatewayShowDetails')) .action((options: { id?: string; slug?: string }) => detailPrivateGatewayActionHandler(options), - ); + ) + .addHelpCommand(); cmd .command('create') @@ -44,7 +46,8 @@ export default (program: Command) => { .description(t('gatewayCreateCmdDesc')) .action((options: { name?: string }) => createPrivateGatewayActionHandler(options), - ); + ) + .addHelpCommand(); cmd .command('delete') @@ -67,7 +70,8 @@ export default (program: Command) => { .description(t('gatewayDelete')) .action((options: { id?: string; slug?: string }) => deletePrivateGatewayActionHandler(options), - ); + ) + .addHelpCommand(); cmd.command('help').description(t('printHelp')); };