Skip to content

Commit

Permalink
chore: 🤖 Add Help subcommand for gateways subcommands (#40)
Browse files Browse the repository at this point in the history
## 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

<img width="812" alt="Screenshot 2024-09-19 at 16 49 32"
src="https://github.com/user-attachments/assets/18d454ab-b163-4cee-a295-e0c2de16148d">

> Create

<img width="806" alt="Screenshot 2024-09-19 at 16 50 05"
src="https://github.com/user-attachments/assets/ef3bc680-7124-4e66-ac02-d75505a92469">

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
heldrida and actions-user authored Sep 20, 2024
1 parent 0fd6871 commit c578ca6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/commands/gateways/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default (program: Command) => {
cmd
.command('list')
.description(t('listAllPrvGwForSelectProject'))
.action(() => listPrivateGatewaysActionHandler());
.action(() => listPrivateGatewaysActionHandler())
.addHelpCommand();

cmd
.command('detail')
Expand All @@ -36,15 +37,17 @@ export default (program: Command) => {
.description(t('gatewayShowDetails'))
.action((options: { id?: string; slug?: string }) =>
detailPrivateGatewayActionHandler(options),
);
)
.addHelpCommand();

cmd
.command('create')
.option('--name <string>', t('gatewayCreateName'))
.description(t('gatewayCreateCmdDesc'))
.action((options: { name?: string }) =>
createPrivateGatewayActionHandler(options),
);
)
.addHelpCommand();

cmd
.command('delete')
Expand All @@ -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'));
};

0 comments on commit c578ca6

Please sign in to comment.