From 57fb81459321e17768f1d1e6f0c894e9fd7e07d4 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Thu, 19 Sep 2024 17:06:41 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20help=20subcommand?= =?UTF-8?q?=20and=20description=20for=20storage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/storage/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/commands/storage/index.ts b/src/commands/storage/index.ts index 922c2dc..fa993e7 100644 --- a/src/commands/storage/index.ts +++ b/src/commands/storage/index.ts @@ -15,7 +15,8 @@ export default (program: Command) => { cmd .command('list') .description(t('storageListDescription')) - .action(() => listStorageActionHandler()); + .action(() => listStorageActionHandler()) + .addHelpCommand(); const getStorage = cmd .command('get') @@ -24,7 +25,8 @@ export default (program: Command) => { .option( '-n, --name ', t('storageNameOption', { action: t('get') }), - ); + ) + .addHelpCommand(); getStorage.action((options: { cid?: string; name?: string }) => { if ((!options.name && !options.cid) || (options.name && options.cid)) { @@ -51,7 +53,8 @@ export default (program: Command) => { .option( '-n, --name ', t('storageNameOption', { action: t('delete') }), - ); + ) + .addHelpCommand(); deleteStorage.action((options: { cid?: string; name?: string }) => { if ((!options.name && !options.cid) || (options.name && options.cid)) { @@ -75,5 +78,6 @@ export default (program: Command) => { .command('add') .description(t('storageAddDescription')) .argument('', t('ipfsAddPathDescription')) - .action((path: string) => addStorageActionHandler({ path })); + .action((path: string) => addStorageActionHandler({ path })) + .addHelpCommand(); };