From ac736ff5d1c5cb5457d4c3a856bf75675841b379 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Wed, 24 Jul 2024 14:54:46 +0200 Subject: [PATCH] display whitelist as table (#275) * switches output of whitelist to a table as is standard for the cli also perhapse these columns headers are more understandable * add flags * add changeset * now test tables * update docs --- .changeset/nasty-clocks-hear.md | 5 ++ docs/command-line-interface/network.md | 42 ++++++++-- .../src/commands/network/whitelist-l2.test.ts | 84 ++++++++++++++++--- .../src/commands/network/whitelist.test.ts | 53 +++++++++--- .../cli/src/commands/network/whitelist.ts | 24 ++++-- 5 files changed, 169 insertions(+), 39 deletions(-) create mode 100644 .changeset/nasty-clocks-hear.md diff --git a/.changeset/nasty-clocks-hear.md b/.changeset/nasty-clocks-hear.md new file mode 100644 index 000000000..60231bf9a --- /dev/null +++ b/.changeset/nasty-clocks-hear.md @@ -0,0 +1,5 @@ +--- +'@celo/celocli': patch +--- + +network:whitelist now oututs as a table, typical table formatting flags are now accepted such as --csv diff --git a/docs/command-line-interface/network.md b/docs/command-line-interface/network.md index 203cfbd5c..28b7ff23f 100644 --- a/docs/command-line-interface/network.md +++ b/docs/command-line-interface/network.md @@ -114,16 +114,42 @@ List the whitelisted fee currencies ``` USAGE - $ celocli network:whitelist [--gasCurrency ] [--globalHelp] + $ celocli network:whitelist [--gasCurrency ] [--globalHelp] [--columns + | -x] [--filter ] [--no-header | [--csv | --no-truncate]] [--output + csv|json|yaml | | ] [--sort ] FLAGS - --gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency - for transaction fees - (defaults to CELO if no gas - currency is supplied). It - must be a whitelisted token. - --globalHelp View all available global - flags + -x, --extended + show extra columns + + --columns= + only show provided columns (comma-separated) + + --csv + output is csv format [alias: --output=csv] + + --filter= + filter property by partial string matching, ex: name=foo + + --gasCurrency=0x1234567890123456789012345678901234567890 + Use a specific gas currency for transaction fees (defaults to CELO if no gas + currency is supplied). It must be a whitelisted token. + + --globalHelp + View all available global flags + + --no-header + hide table header from output + + --no-truncate + do not truncate output to fit screen + + --output=