diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs index 824dcd5488..95125aecbf 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs @@ -68,7 +68,9 @@ public abstract class ProxyCommandBase : IConsoleCommand, ITransientDependenc var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long); var workDirectory = commandLineArgs.Options.GetOrNull(Options.WorkDirectory.Short, Options.WorkDirectory.Long) ?? Directory.GetCurrentDirectory(); var folder = commandLineArgs.Options.GetOrNull(Options.Folder.Long); - var serviceTypeArg = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.ServiceType.Long); + var serviceTypeArg = commandLineArgs.Options.GetOrNull(Options.ServiceType.Short, Options.ServiceType.Long); + var entryPointArg = commandLineArgs.Options.GetOrNull(Options.EntryPoint.Short, Options.EntryPoint.Long); + ServiceType? serviceType = null; if (!serviceTypeArg.IsNullOrWhiteSpace()) @@ -83,7 +85,7 @@ public abstract class ProxyCommandBase : IConsoleCommand, ITransientDependenc var withoutContracts = commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Short) || commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Long); - return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, withoutContracts, commandLineArgs.Options); + return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, entryPointArg,withoutContracts, commandLineArgs.Options); } public virtual string GetUsageInfo() @@ -190,5 +192,10 @@ public abstract class ProxyCommandBase : IConsoleCommand, ITransientDependenc public const string Short = "c"; public const string Long = "without-contracts"; } + public static class EntryPoint + { + public const string Short = "ep"; + public const string Long = "entry-point"; + } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs index d17545f4cc..0707a5e8e0 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs @@ -49,6 +49,8 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase extraProperties = null) { @@ -56,6 +58,7 @@ public class GenerateProxyArgs Source = source; Folder = folder; ServiceType = serviceType; + EntryPoint = entryPoint; WithoutContracts = withoutContracts; ExtraProperties = extraProperties ?? new Dictionary(); } diff --git a/npm/ng-packs/packages/schematics/src/commands/proxy-add/schema.json b/npm/ng-packs/packages/schematics/src/commands/proxy-add/schema.json index ef0c125262..8c3ca7fe53 100644 --- a/npm/ng-packs/packages/schematics/src/commands/proxy-add/schema.json +++ b/npm/ng-packs/packages/schematics/src/commands/proxy-add/schema.json @@ -79,16 +79,16 @@ } ] } - } - }, - "entryPoint": { - "description": "Target Angular project to place the generated code", - "type": "string", - "$default": { - "$source": "argv", - "index": 5 }, - "x-prompt": "Please enter target Angular project to place the generated code. (default: workspace \"defaultProject\")" + "entryPoint": { + "description": "Target Angular project to place the generated code", + "type": "string", + "$default": { + "$source": "argv", + "index": 6 + }, + "x-prompt": "Please enter target entry point to place the generated code. (default: null)" + } }, "required": [] }