Skip to content

Commit db5cf96

Browse files
committed
fix(cli): Simplified command names for CLI
1 parent 7067d87 commit db5cf96

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/libs/AutoSDK/Sources/Sources.CLI.AddCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ internal static class ServiceCollectionExtensions
3434
this global::Microsoft.Extensions.DependencyInjection.IServiceCollection services)
3535
{{
3636
// Register individual command services as singletons
37-
{methods.Select(x => $"{x.MethodName}Command").Distinct().Select((type, i) => @$"
37+
{methods.Select(x => $"{x.NotAsyncMethodName}Command").Distinct().Select((type, i) => @$"
3838
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<
3939
{type}>(services);").Inject()}
4040

src/libs/AutoSDK/Sources/Sources.CLI.Command.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static string GenerateCommand(
2424
2525
namespace {endPoint.Settings.Namespace}
2626
{{
27-
internal sealed partial class {endPoint.MethodName}Command : global::System.CommandLine.Command
27+
internal sealed partial class {endPoint.NotAsyncMethodName}Command : global::System.CommandLine.Command
2828
{{
2929
private readonly {clientType} _client;
3030
@@ -53,7 +53,7 @@ partial void AfterRequest(
5353
}};
5454
").Inject()}
5555
56-
public {endPoint.MethodName}Command({clientType} client) : base(
56+
public {endPoint.NotAsyncMethodName}Command({clientType} client) : base(
5757
name: ""{endPoint.NotAsyncMethodName.FirstWord().ToLowerInvariant()}"",
5858
description: ""{endPoint.Description}"")
5959
{{

src/libs/AutoSDK/Sources/Sources.CLI.TagCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ namespace {values[0].Settings.Namespace}
2525
internal sealed partial class {tag.SingularizedName}Command : global::System.CommandLine.Command
2626
{{
2727
public {tag.SingularizedName}Command(
28-
{values.Select(x => $"{x.MethodName}Command").Distinct().Select((type, i) => @$"
28+
{values.Select(x => $"{x.NotAsyncMethodName}Command").Distinct().Select((type, i) => @$"
2929
{type} command{i},").Inject().TrimEnd(',')})
3030
: base(
3131
name: ""{tag.SingularizedName.ToLowerInvariant()}"")
3232
{{
33-
{values.Select(x => $"{x.MethodName}Command").Distinct().Select((type, i) => @$"
33+
{values.Select(x => $"{x.NotAsyncMethodName}Command").Distinct().Select((type, i) => @$"
3434
Subcommands.Add(command{i});").Inject()}
3535
}}
3636
}}

0 commit comments

Comments
 (0)