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