Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions cmd/agent_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,16 @@ func TestExtractFlagGroups_AllAnnotationKeys(t *testing.T) {
}

func TestBuildAgentContext_HiddenCommands(t *testing.T) {
ctx := buildAgentContext(rootCmd)
spam := findAgentCommand(ctx.Commands, "campaigns")
if spam == nil {
t.Fatal("campaigns not found in output (hidden commands should still be included)")
root := &cobra.Command{Use: "root"}
root.AddCommand(&cobra.Command{Use: "secret", Hidden: true})

ctx := buildAgentContext(root)
secret := findAgentCommand(ctx.Commands, "secret")
if secret == nil {
t.Fatal("secret not found in output (hidden commands should still be included)")
}
if !spam.Hidden {
t.Error("campaigns should be hidden=true")
if !secret.Hidden {
t.Error("secret should be hidden=true")
}
}

Expand Down
7 changes: 3 additions & 4 deletions cmd/campaigns.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"fmt"

"github.com/loops-so/loops-go"
"github.com/loops-so/cli/internal/config"
"github.com/loops-so/loops-go"
"github.com/spf13/cobra"
)

Expand All @@ -27,9 +27,8 @@ func runCampaignsList(cfg *config.Config, params loops.PaginationParams) ([]loop
}

var campaignsCmd = &cobra.Command{
Use: "campaigns",
Short: "Manage campaigns",
Hidden: true,
Use: "campaigns",
Short: "Manage campaigns",
}

var campaignsListCmd = &cobra.Command{
Expand Down
7 changes: 3 additions & 4 deletions cmd/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"fmt"

"github.com/loops-so/loops-go"
"github.com/loops-so/cli/internal/config"
"github.com/loops-so/loops-go"
"github.com/spf13/cobra"
)

Expand All @@ -27,9 +27,8 @@ func runComponentsList(cfg *config.Config, params loops.PaginationParams) ([]loo
}

var componentsCmd = &cobra.Command{
Use: "components",
Short: "Manage components",
Hidden: true,
Use: "components",
Short: "Manage components",
}

var componentsListCmd = &cobra.Command{
Expand Down
7 changes: 3 additions & 4 deletions cmd/email_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/alecthomas/chroma/v2/formatters"
"github.com/alecthomas/chroma/v2/lexers"
"github.com/charmbracelet/colorprofile"
"github.com/loops-so/loops-go"
"github.com/loops-so/cli/internal/config"
"github.com/loops-so/loops-go"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -103,9 +103,8 @@ func fetchLatestRevisionID(cfg *config.Config, id string) (string, error) {
}

var emailMessagesCmd = &cobra.Command{
Use: "email-messages",
Short: "Manage email messages",
Hidden: true,
Use: "email-messages",
Short: "Manage email messages",
}

var emailMessagesGetCmd = &cobra.Command{
Expand Down
5 changes: 2 additions & 3 deletions cmd/themes.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ func runThemesList(cfg *config.Config, params loops.PaginationParams) ([]loops.T
}

var themesCmd = &cobra.Command{
Use: "themes",
Short: "Manage themes",
Hidden: true,
Use: "themes",
Short: "Manage themes",
}

var themesListCmd = &cobra.Command{
Expand Down