Skip to content

Commit

Permalink
[1/4] DXCDT-266: Move domains subcommand one level up the hierarchy (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiught authored Dec 2, 2022
1 parent 027ca62 commit f6d0f6b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
1 change: 0 additions & 1 deletion internal/cli/branding.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func brandingCmd(cli *cli) *cobra.Command {
cmd.AddCommand(showBrandingCmd(cli))
cmd.AddCommand(updateBrandingCmd(cli))
cmd.AddCommand(templateCmd(cli))
cmd.AddCommand(customDomainsCmd(cli))
cmd.AddCommand(emailTemplateCmd(cli))
cmd.AddCommand(textsCmd(cli))
return cmd
Expand Down
28 changes: 14 additions & 14 deletions internal/cli/custom_domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ func listCustomDomainsCmd(cli *cli) *cobra.Command {
Args: cobra.NoArgs,
Short: "List your custom domains",
Long: `List your existing custom domains. To create one try:
auth0 branding domains create`,
Example: `auth0 branding domains list
auth0 branding domains ls`,
auth0 domains create`,
Example: `auth0 domains list
auth0 domains ls`,
RunE: func(cmd *cobra.Command, args []string) error {
var list []*management.CustomDomain

Expand Down Expand Up @@ -127,8 +127,8 @@ func showCustomDomainCmd(cli *cli) *cobra.Command {
Args: cobra.MaximumNArgs(1),
Short: "Show a custom domain",
Long: "Show a custom domain.",
Example: `auth0 branding domains show
auth0 branding domains show <id>`,
Example: `auth0 domains show
auth0 domains show <id>`,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
err := customDomainID.Pick(cmd, &inputs.ID, cli.customDomainsPickerOptions)
Expand Down Expand Up @@ -171,8 +171,8 @@ func createCustomDomainCmd(cli *cli) *cobra.Command {
Args: cobra.NoArgs,
Short: "Create a custom domain",
Long: "Create a custom domain.",
Example: `auth0 branding domains create
auth0 branding domains create <id>`,
Example: `auth0 domains create
auth0 domains create <id>`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := customDomainDomain.Ask(cmd, &inputs.Domain, nil); err != nil {
return err
Expand Down Expand Up @@ -232,9 +232,9 @@ func updateCustomDomainCmd(cli *cli) *cobra.Command {
Args: cobra.MaximumNArgs(1),
Short: "Update a custom domain",
Long: "Update a custom domain.",
Example: `auth0 branding domains update
auth0 branding domains update <id> --policy compatible
auth0 branding domains update <id> -p compatible --ip-header "cf-connecting-ip"`,
Example: `auth0 domains update
auth0 domains update <id> --policy compatible
auth0 domains update <id> -p compatible --ip-header "cf-connecting-ip"`,
RunE: func(cmd *cobra.Command, args []string) error {
var current *management.CustomDomain

Expand Down Expand Up @@ -308,8 +308,8 @@ func deleteCustomDomainCmd(cli *cli) *cobra.Command {
Args: cobra.MaximumNArgs(1),
Short: "Delete a custom domain",
Long: "Delete a custom domain.",
Example: `auth0 branding domains delete
auth0 branding domains delete <id>`,
Example: `auth0 domains delete
auth0 domains delete <id>`,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
err := customDomainID.Pick(cmd, &inputs.ID, cli.customDomainsPickerOptions)
Expand Down Expand Up @@ -358,8 +358,8 @@ func verifyCustomDomainCmd(cli *cli) *cobra.Command {
Args: cobra.MaximumNArgs(1),
Short: "Verify a custom domain",
Long: "Verify a custom domain.",
Example: `auth0 branding domains verify
auth0 branding domains verify <id>`,
Example: `auth0 domains verify
auth0 domains verify <id>`,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
err := customDomainID.Pick(cmd, &inputs.ID, cli.customDomainsPickerOptions)
Expand Down
1 change: 1 addition & 0 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ func addSubcommands(rootCmd *cobra.Command, cli *cli) {
rootCmd.AddCommand(rolesCmd(cli))
rootCmd.AddCommand(organizationsCmd(cli))
rootCmd.AddCommand(brandingCmd(cli))
rootCmd.AddCommand(customDomainsCmd(cli))
rootCmd.AddCommand(ipsCmd(cli))
rootCmd.AddCommand(quickstartsCmd(cli))
rootCmd.AddCommand(attackProtectionCmd(cli))
Expand Down
2 changes: 1 addition & 1 deletion internal/display/custom_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (r *Renderer) CustomDomainList(customDomains []*management.CustomDomain) {

if len(customDomains) == 0 {
r.EmptyState(resource)
r.Infof("Use 'auth0 branding domains create' to add one")
r.Infof("Use 'auth0 domains create' to add one")
return
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/test-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tests:
auth0 orgs list:
exit-code: 0

auth0 branding domains list:
auth0 domains list:
exit-code: 0

auth0 quickstarts list:
Expand Down

0 comments on commit f6d0f6b

Please sign in to comment.