Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,15 @@
},
"choices": [
{
"id": "3.3.*",
"id": "3.4.*",
"name": {
"text": "Steeltoe 3.3"
"text": "Steeltoe 3.4"
}
},
{
"id": "4.0.*",
"id": "4.2.*",
"name": {
"text": "Steeltoe 4.0"
}
},
{
"id": "4.1.*",
"name": {
"text": "Steeltoe 4.1"
"text": "Steeltoe 4.2"
}
},
{
Expand All @@ -42,7 +36,7 @@
}
}
],
"defaultValue": "4.1.*"
"defaultValue": "4.2.*"
},
{
"id": "DescriptionOption",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"description": "The Steeltoe version to use.",
"type": "parameter",
"datatype": "string",
"defaultValue": "4.1.*",
"defaultValue": "4.2.*",
"replaces": "$(SteeltoeVersionInCLI)"
},
"IsSteeltoeV3InCLI": {
Expand Down Expand Up @@ -156,13 +156,10 @@
"datatype": "choice",
"choices": [
{
"choice": "3.3.*"
"choice": "3.4.*"
},
{
"choice": "4.0.*"
},
{
"choice": "4.1.*"
"choice": "4.2.*"
},
{
"choice": "4.*-main-*"
Expand Down
2 changes: 1 addition & 1 deletion src/Steeltoe.NetCoreTool.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<PackageType>Template</PackageType>
<PackageId>Steeltoe.NetCoreTool.Templates</PackageId>
<VersionPrefix>1.5.1</VersionPrefix>
<VersionPrefix>1.6.0</VersionPrefix>
<VersionSuffix>pre</VersionSuffix>
<Title>Steeltoe .NET Project Templates</Title>
<Authors>Broadcom</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected override async Task AssertProjectGeneration(ProjectOptions options)
{
await base.AssertProjectGeneration(options);

if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe32)
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe34)
{
Logger.WriteLine("asserting HelloHystrixCommand");
var sourceFile = GetSourceFileForLanguage("HelloHystrixCommand", options.Language);
Expand All @@ -34,7 +34,7 @@ protected override async Task AssertProjectGeneration(ProjectOptions options)

protected override void AssertPackageReferencesHook(ProjectOptions options, List<(string, string)> packages)
{
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe32)
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe34)
{
packages.Add(("Steeltoe.CircuitBreaker.HystrixCore", "$(SteeltoeVersion)"));
packages.Add(("Steeltoe.CircuitBreaker.Hystrix.MetricsStreamCore", "$(SteeltoeVersion)"));
Expand All @@ -43,7 +43,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
{
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe32)
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe34)
{
snippets.Add("using Steeltoe.CircuitBreaker.Hystrix;");
snippets.Add($"using {Sandbox.Name};");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.ConfigServerCore" : "Steeltoe.Configuration.ConfigServer";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.ConfigServerCore" : "Steeltoe.Configuration.ConfigServer";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -25,7 +25,7 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static string GetNamespaceImport(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.ConfigServer" : "Steeltoe.Configuration.ConfigServer";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.ConfigServer" : "Steeltoe.Configuration.ConfigServer";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ public class ConfigurationEncryptionOptionTest(ITestOutputHelper logger)
{
protected override void AssertPackageReferencesHook(ProjectOptions options, List<(string, string)> packages)
{
if (options.SteeltoeVersion != SteeltoeVersion.Steeltoe32)
if (options.SteeltoeVersion != SteeltoeVersion.Steeltoe34)
{
packages.Add(("Steeltoe.Configuration.Encryption", "$(SteeltoeVersion)"));
}
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
{
if (options.SteeltoeVersion != SteeltoeVersion.Steeltoe32)
if (options.SteeltoeVersion != SteeltoeVersion.Steeltoe34)
{
snippets.Add("using Steeltoe.Configuration.Encryption;");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.PlaceholderCore" : "Steeltoe.Configuration.Placeholder";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.PlaceholderCore" : "Steeltoe.Configuration.Placeholder";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -27,12 +27,12 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static string GetNamespaceImport(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.Placeholder" : "Steeltoe.Configuration.Placeholder";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.Placeholder" : "Steeltoe.Configuration.Placeholder";
}

private static string GetSetupCodeFragment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "builder.AddPlaceholderResolver();" : "builder.Configuration.AddPlaceholderResolver();";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "builder.AddPlaceholderResolver();" : "builder.Configuration.AddPlaceholderResolver();";
}

protected override void AssertAppSettingsJsonHook(List<Action<ProjectOptions, AppSettings>> assertions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.RandomValueBase" : "Steeltoe.Configuration.RandomValue";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.RandomValueBase" : "Steeltoe.Configuration.RandomValue";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -25,7 +25,7 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static string GetNamespaceImport(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.RandomValue" : "Steeltoe.Configuration.RandomValue";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.RandomValue" : "Steeltoe.Configuration.RandomValue";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.SpringBootCore" : "Steeltoe.Configuration.SpringBoot";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.SpringBootCore" : "Steeltoe.Configuration.SpringBoot";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -25,12 +25,12 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static string GetNamespaceImport(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Extensions.Configuration.SpringBoot" : "Steeltoe.Configuration.SpringBoot";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Extensions.Configuration.SpringBoot" : "Steeltoe.Configuration.SpringBoot";
}

private static IEnumerable<string> GetSetupCodeFragments(SteeltoeVersion steeltoeVersion)
{
if (steeltoeVersion == SteeltoeVersion.Steeltoe32)
if (steeltoeVersion == SteeltoeVersion.Steeltoe34)
{
yield return "builder.Configuration.AddSpringBootEnv();";
yield return "builder.Configuration.AddSpringBootCmd(builder.Configuration);";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.ConnectorCore" : "Steeltoe.Connectors";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.ConnectorCore" : "Steeltoe.Connectors";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -28,19 +28,19 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static string GetNamespaceImport(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.CosmosDb" : "Steeltoe.Connectors.CosmosDb";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.CosmosDb" : "Steeltoe.Connectors.CosmosDb";
}

private static string GetSetupComment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32
return steeltoeVersion == SteeltoeVersion.Steeltoe34
? "// TODO: Add your connection string at configuration key: CosmosDb:Client:ConnectionString"
: "// TODO: Add your connection string at configuration key: Steeltoe:Client:CosmosDb:Default:ConnectionString";
}

private static IEnumerable<string> GetSetupCodeFragments(SteeltoeVersion steeltoeVersion)
{
if (steeltoeVersion == SteeltoeVersion.Steeltoe32)
if (steeltoeVersion == SteeltoeVersion.Steeltoe34)
{
yield return "var manager = new ConnectionStringManager(builder.Configuration);";
yield return "var cosmosInfo = manager.Get<CosmosDbConnectionInfo>();";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.ConnectorCore" : "Steeltoe.Connectors";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.ConnectorCore" : "Steeltoe.Connectors";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -27,19 +27,19 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static string GetNamespaceImport(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.MongoDb" : "Steeltoe.Connectors.MongoDb";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.MongoDb" : "Steeltoe.Connectors.MongoDb";
}

private static string GetSetupComment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32
return steeltoeVersion == SteeltoeVersion.Steeltoe34
? "// TODO: Add your connection string at configuration key: MongoDb:Client:ConnectionString"
: "// TODO: Add your connection string at configuration key: Steeltoe:Client:MongoDb:Default:ConnectionString";
}

private static string GetSetupCodeFragment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32
return steeltoeVersion == SteeltoeVersion.Steeltoe34
? "builder.Services.AddMongoClient(builder.Configuration);"
: "builder.AddMongoDb();";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.EFCore" : "Steeltoe.Connectors.EntityFrameworkCore";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.EFCore" : "Steeltoe.Connectors.EntityFrameworkCore";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -48,7 +48,7 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static IEnumerable<string> GetNamespaceImports(SteeltoeVersion steeltoeVersion)
{
if (steeltoeVersion == SteeltoeVersion.Steeltoe32)
if (steeltoeVersion == SteeltoeVersion.Steeltoe34)
{
yield return "using Steeltoe.Connector.MySql.EFCore;";
}
Expand All @@ -61,14 +61,14 @@ private static IEnumerable<string> GetNamespaceImports(SteeltoeVersion steeltoeV

private static string GetSetupComment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32
return steeltoeVersion == SteeltoeVersion.Steeltoe34
? "// TODO: Add your connection string at configuration key: MySql:Client:ConnectionString"
: "// TODO: Add your connection string at configuration key: Steeltoe:Client:MySql:Default:ConnectionString";
}

private static IEnumerable<string> GetSetupCodeFragments(SteeltoeVersion steeltoeVersion)
{
if (steeltoeVersion == SteeltoeVersion.Steeltoe32)
if (steeltoeVersion == SteeltoeVersion.Steeltoe34)
{
yield return "builder.Services.AddDbContext<AppDbContext>(options => options.UseMySql(builder.Configuration));";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.ConnectorCore" : "Steeltoe.Connectors";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.ConnectorCore" : "Steeltoe.Connectors";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -36,19 +36,19 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static string GetNamespaceImport(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.MySql" : "Steeltoe.Connectors.MySql";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.MySql" : "Steeltoe.Connectors.MySql";
}

private static string GetSetupComment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32
return steeltoeVersion == SteeltoeVersion.Steeltoe34
? "// TODO: Add your connection string at configuration key: MySql:Client:ConnectionString"
: "// TODO: Add your connection string at configuration key: Steeltoe:Client:MySql:Default:ConnectionString";
}

private static string GetSetupCodeFragment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32
return steeltoeVersion == SteeltoeVersion.Steeltoe34
? "builder.Services.AddMySqlConnection(builder.Configuration);"
: "builder.AddMySql();";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ public class ConnectorOAuthOptionTest(ITestOutputHelper logger)
{
protected override void AssertPackageReferencesHook(ProjectOptions options, List<(string, string)> packages)
{
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe32)
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe34)
{
packages.Add(("Steeltoe.Connector.ConnectorCore", "$(SteeltoeVersion)"));
}
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
{
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe32)
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe34)
{
snippets.Add("using Steeltoe.Connector.OAuth;");
snippets.Add("builder.Services.AddOAuthServiceOptions(builder.Configuration);");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected override void AssertPackageReferencesHook(ProjectOptions options, List

private static string GetPackageName(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32 ? "Steeltoe.Connector.EFCore" : "Steeltoe.Connectors.EntityFrameworkCore";
return steeltoeVersion == SteeltoeVersion.Steeltoe34 ? "Steeltoe.Connector.EFCore" : "Steeltoe.Connectors.EntityFrameworkCore";
}

protected override void AssertProgramSnippetsHook(ProjectOptions options, List<string> snippets)
Expand All @@ -48,7 +48,7 @@ protected override void AssertProgramSnippetsHook(ProjectOptions options, List<s

private static IEnumerable<string> GetNamespaceImports(SteeltoeVersion steeltoeVersion)
{
if (steeltoeVersion == SteeltoeVersion.Steeltoe32)
if (steeltoeVersion == SteeltoeVersion.Steeltoe34)
{
yield return "using Steeltoe.Connector.PostgreSql.EFCore;";
}
Expand All @@ -61,14 +61,14 @@ private static IEnumerable<string> GetNamespaceImports(SteeltoeVersion steeltoeV

private static string GetSetupComment(SteeltoeVersion steeltoeVersion)
{
return steeltoeVersion == SteeltoeVersion.Steeltoe32
return steeltoeVersion == SteeltoeVersion.Steeltoe34
? "// TODO: Add your connection string at configuration key: Postgres:Client:ConnectionString"
: "// TODO: Add your connection string at configuration key: Steeltoe:Client:PostgreSql:Default:ConnectionString";
}

private static IEnumerable<string> GetSetupCodeFragments(SteeltoeVersion steeltoeVersion)
{
if (steeltoeVersion == SteeltoeVersion.Steeltoe32)
if (steeltoeVersion == SteeltoeVersion.Steeltoe34)
{
yield return "builder.Services.AddDbContext<AppDbContext>(options => options.UseNpgsql(builder.Configuration));";
}
Expand Down
Loading
Loading