tests fixes and sprints work
This commit is contained in:
@@ -11,7 +11,7 @@ namespace StellaOps.Cli.Commands;
|
||||
/// <summary>
|
||||
/// CLI commands for inspecting StellaOps configuration.
|
||||
/// </summary>
|
||||
public static class ConfigCommandGroup
|
||||
internal static class ConfigCommandGroup
|
||||
{
|
||||
public static Command Create(IBackendOperationsClient client)
|
||||
{
|
||||
@@ -19,26 +19,32 @@ public static class ConfigCommandGroup
|
||||
|
||||
// stella config list
|
||||
var listCommand = new Command("list", "List all available configuration paths");
|
||||
var categoryOption = new Option<string?>(
|
||||
["--category", "-c"],
|
||||
"Filter by category (e.g., policy, scanner, notifier)");
|
||||
var categoryOption = new Option<string?>("--category", "-c")
|
||||
{
|
||||
Description = "Filter by category (e.g., policy, scanner, notifier)"
|
||||
};
|
||||
listCommand.AddOption(categoryOption);
|
||||
listCommand.SetHandler(
|
||||
async (string? category) => await CommandHandlers.Config.ListAsync(category),
|
||||
categoryOption);
|
||||
|
||||
// stella config <path> show
|
||||
var pathArgument = new Argument<string>("path", "Configuration path (e.g., policy.determinization, scanner.epss)");
|
||||
var pathArgument = new Argument<string>("path")
|
||||
{
|
||||
Description = "Configuration path (e.g., policy.determinization, scanner.epss)"
|
||||
};
|
||||
var showCommand = new Command("show", "Show configuration for a specific path");
|
||||
showCommand.AddArgument(pathArgument);
|
||||
var formatOption = new Option<string>(
|
||||
["--format", "-f"],
|
||||
() => "table",
|
||||
"Output format: table, json, yaml");
|
||||
var showSecretsOption = new Option<bool>(
|
||||
"--show-secrets",
|
||||
() => false,
|
||||
"Show secret values (default: redacted)");
|
||||
var formatOption = new Option<string>("--format", "-f")
|
||||
{
|
||||
Description = "Output format: table, json, yaml"
|
||||
};
|
||||
formatOption.SetDefaultValue("table");
|
||||
var showSecretsOption = new Option<bool>("--show-secrets")
|
||||
{
|
||||
Description = "Show secret values (default: redacted)"
|
||||
};
|
||||
showSecretsOption.SetDefaultValue(false);
|
||||
showCommand.AddOption(formatOption);
|
||||
showCommand.AddOption(showSecretsOption);
|
||||
showCommand.SetHandler(
|
||||
|
||||
Reference in New Issue
Block a user