48 references to SecretCommandStrings
aspire (40)
Commands\SecretCommand.cs (3)
18
Description =
SecretCommandStrings
.EnvironmentOptionDescription,
25
result.AddError(
SecretCommandStrings
.InvalidEnvironmentName);
40
: base("secret",
SecretCommandStrings
.Description, services)
Commands\SecretDeleteCommand.cs (5)
19
Description =
SecretCommandStrings
.KeyDeleteArgumentDescription
27
: base("delete",
SecretCommandStrings
.DeleteDescription, services)
46
return CommandResult.Failure(CliExitCodes.FailedToFindProject,
SecretCommandStrings
.CouldNotFindAppHost);
62
return CommandResult.Failure(CliExitCodes.ConfigNotFound, string.Format(CultureInfo.CurrentCulture,
SecretCommandStrings
.SecretNotFound, key.EscapeMarkup()));
66
InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture,
SecretCommandStrings
.SecretDeleteSuccess, key));
Commands\SecretGetCommand.cs (4)
20
Description =
SecretCommandStrings
.KeyRetrieveArgumentDescription
28
: base("get",
SecretCommandStrings
.GetDescription, services)
47
return CommandResult.Failure(CliExitCodes.FailedToFindProject,
SecretCommandStrings
.CouldNotFindAppHost);
53
return CommandResult.Failure(CliExitCodes.ConfigNotFound, string.Format(CultureInfo.CurrentCulture,
SecretCommandStrings
.SecretNotFound, key.EscapeMarkup()));
Commands\SecretListCommand.cs (13)
22
Description =
SecretCommandStrings
.FormatOptionDescription
27
Description =
SecretCommandStrings
.AllEnvironmentsOptionDescription,
36
: base("list",
SecretCommandStrings
.ListDescription, services)
57
return CommandResult.Failure(CliExitCodes.InvalidCommand,
SecretCommandStrings
.AllEnvironmentsCannotUseEnvironment);
63
return CommandResult.Failure(CliExitCodes.FailedToFindProject,
SecretCommandStrings
.CouldNotFindAppHost);
73
return CommandResult.Failure(CliExitCodes.FailedToFindProject,
SecretCommandStrings
.CouldNotFindAppHost);
95
InteractionService.DisplayMessage(KnownEmojis.Information,
SecretCommandStrings
.NoSecretsConfigured);
100
table.AddBoldColumn(
SecretCommandStrings
.KeyColumnHeader, noWrap: true);
101
table.AddBoldColumn(
SecretCommandStrings
.ValueColumnHeader);
150
InteractionService.DisplayMessage(KnownEmojis.Information,
SecretCommandStrings
.NoSecretsConfigured);
155
table.AddBoldColumn(
SecretCommandStrings
.EnvironmentColumnHeader, noWrap: true);
156
table.AddBoldColumn(
SecretCommandStrings
.KeyColumnHeader, noWrap: true);
157
table.AddBoldColumn(
SecretCommandStrings
.ValueColumnHeader);
Commands\SecretPathCommand.cs (2)
21
: base("path",
SecretCommandStrings
.PathDescription, services)
37
return CommandResult.Failure(CliExitCodes.FailedToFindProject,
SecretCommandStrings
.CouldNotFindAppHost);
Commands\SecretSetCommand.cs (11)
18
Description =
SecretCommandStrings
.KeyArgumentDescription
23
Description =
SecretCommandStrings
.ValueArgumentDescription,
29
Description =
SecretCommandStrings
.EnvvarSourceOptionDescription,
41
: base("set",
SecretCommandStrings
.SetDescription, services)
59
result.AddError(
SecretCommandStrings
.ConflictingValueSources);
63
result.AddError(
SecretCommandStrings
.ValueSourceRequired);
68
result.AddError(
SecretCommandStrings
.EnvvarSourceNameRequired);
85
string.Format(CultureInfo.CurrentCulture,
SecretCommandStrings
.EnvvarSourceNotSet, sourceName));
93
?? await InteractionService.PromptForStringAsync(
SecretCommandStrings
.ValuePrompt,
103
return CommandResult.Failure(CliExitCodes.FailedToFindProject,
SecretCommandStrings
.CouldNotFindAppHost);
109
InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture,
SecretCommandStrings
.SecretSetSuccess, key));
Resources\SecretCommandStrings.Designer.cs (1)
42
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.SecretCommandStrings", typeof(
SecretCommandStrings
).Assembly);
Secrets\InvalidSecretsFileException.cs (1)
13
SecretCommandStrings
.InvalidSecretsFile,
Aspire.Cli.Tests (8)
Commands\SecretCommandTests.cs (8)
330
Assert.Equal(new StringPromptCall(
SecretCommandStrings
.ValuePrompt, null, IsSecret: true, Required: false),
451
[InlineData(new[] { "positional-secret", "--envvar", "API_KEY" }, nameof(
SecretCommandStrings
.ConflictingValueSources))]
452
[InlineData(new[] { "", "--envvar", "API_KEY" }, nameof(
SecretCommandStrings
.ConflictingValueSources))]
453
[InlineData(new[] { "--non-interactive" }, nameof(
SecretCommandStrings
.ValueSourceRequired))]
454
[InlineData(new[] { "--envvar", "" }, nameof(
SecretCommandStrings
.EnvvarSourceNameRequired))]
455
[InlineData(new[] { "--envvar", " \t " }, nameof(
SecretCommandStrings
.EnvvarSourceNameRequired))]
479
Assert.Equal(
SecretCommandStrings
.ResourceManager.GetString(resourceName), error.Message);
861
Assert.Contains(result.Errors, error => error.Message == Aspire.Cli.Resources.
SecretCommandStrings
.InvalidEnvironmentName);