tests fixes and sprints work

This commit is contained in:
master
2026-01-22 19:08:46 +02:00
parent c32fff8f86
commit 726d70dc7f
881 changed files with 134434 additions and 6228 deletions

View File

@@ -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(