From 179d4546b93fc96b2dc0ee35b4fa70d70a3a2e25 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Fri, 13 Jan 2023 10:55:14 -0500 Subject: [PATCH 1/2] Fix: Including missing `--force` documentation updates (#609) Adding missing documentation Co-authored-by: Will Vedder --- docs/auth0_actions_update.md | 1 + docs/auth0_email_templates_update.md | 1 + docs/auth0_rules_update.md | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/auth0_actions_update.md b/docs/auth0_actions_update.md index d1e2b63c1..767162b5c 100644 --- a/docs/auth0_actions_update.md +++ b/docs/auth0_actions_update.md @@ -32,6 +32,7 @@ auth0 actions update [flags] ``` -c, --code string Code content for the action. -d, --dependency stringToString Third party npm module, and its version, that the action depends on. (default []) + --force Skip confirmation. --json Output in json format. -n, --name string Name of the action. -s, --secret stringToString Secrets to be used in the action. (default []) diff --git a/docs/auth0_email_templates_update.md b/docs/auth0_email_templates_update.md index 8b896c3a9..b96f380f6 100644 --- a/docs/auth0_email_templates_update.md +++ b/docs/auth0_email_templates_update.md @@ -35,6 +35,7 @@ auth0 email templates update [flags] ``` -b, --body string Body of the email template. -e, --enabled Whether the template is enabled (true) or disabled (false). (default true) + --force Skip confirmation. -f, --from string Sender's 'from' email address. --json Output in json format. -l, --lifetime int Lifetime in seconds that the link within the email will be valid for. diff --git a/docs/auth0_rules_update.md b/docs/auth0_rules_update.md index 962c086eb..61f9547ac 100644 --- a/docs/auth0_rules_update.md +++ b/docs/auth0_rules_update.md @@ -30,6 +30,7 @@ auth0 rules update [flags] ``` -e, --enabled Enable (or disable) a rule. (default true) + --force Skip confirmation. --json Output in json format. -n, --name string Name of the rule. -s, --script string Script contents for the rule. From 463bb7f0e509cd395d4f295de115107fa15a8b61 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Fri, 13 Jan 2023 11:01:14 -0500 Subject: [PATCH 2/2] DXCDT-325: Prevent erroneous truncation message with `--json` flag (#607) Prevent showing specific message if JSON flag is passed Co-authored-by: Will Vedder --- internal/cli/apis.go | 2 +- internal/display/apis.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cli/apis.go b/internal/cli/apis.go index 544f61e3e..abee9b8ff 100644 --- a/internal/cli/apis.go +++ b/internal/cli/apis.go @@ -177,7 +177,7 @@ func showApiCmd(cli *cli) *cobra.Command { return fmt.Errorf("Unable to get an API with Id '%s': %w", inputs.ID, err) } - cli.renderer.ApiShow(api) + cli.renderer.ApiShow(api, cli.json) return nil }, } diff --git a/internal/display/apis.go b/internal/display/apis.go index 8452f668e..b870935fd 100644 --- a/internal/display/apis.go +++ b/internal/display/apis.go @@ -88,11 +88,11 @@ func (r *Renderer) ApiList(apis []*management.ResourceServer) { r.Results(results) } -func (r *Renderer) ApiShow(api *management.ResourceServer) { +func (r *Renderer) ApiShow(api *management.ResourceServer, jsonFlag bool) { r.Heading("api") view, scopesTruncated := makeApiView(api) r.Result(view) - if scopesTruncated { + if scopesTruncated && !jsonFlag { r.Newline() r.Infof("Scopes truncated for display. To see the full list, run %s", ansi.Faint(fmt.Sprintf("apis scopes list %s", *api.ID))) }