feat(secrets-cli): target config reader — operate on the app's own composed Secrets config

This commit is contained in:
Joseph Doherty
2026-07-19 08:50:52 -04:00
parent 1b013a56a7
commit b9a57fe06e
3 changed files with 248 additions and 0 deletions
@@ -0,0 +1,17 @@
using Microsoft.Extensions.Configuration;
using ZB.MOM.WW.Secrets.Replicator.SqlServer;
namespace ZB.MOM.WW.Secrets.Cli.Interactive;
/// <summary>A resolved deployment store target: the app's composed Secrets options + where they came from.</summary>
/// <param name="Name">Display name (defaults to the appsettings parent directory name).</param>
/// <param name="AppSettingsPath">The base <c>appsettings.json</c> path, or <see langword="null"/> for manual-entry targets.</param>
/// <param name="Secrets">The bound application secrets options, with <see cref="SecretsOptions.SqlitePath"/> already made absolute.</param>
/// <param name="SqlServer">The bound SQL-Server hub options when a <c>Secrets:SqlServer</c> section is present; otherwise <see langword="null"/>.</param>
/// <param name="Configuration">The full composed configuration, consumed later by the reference auditor.</param>
public sealed record StoreTarget(
string Name,
string? AppSettingsPath,
SecretsOptions Secrets,
SqlServerSecretsOptions? SqlServer,
IConfigurationRoot Configuration);