Browse Source
Merge pull request #20862 from abpframework/auto-merge/rel-8-3/3012
Merge branch dev with rel-8.3
pull/20879/head
maliming
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
31 changed files with
35 additions and
38 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/BuildCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/BundleCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CleanCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ClearDownloadCacheCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CliCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/IConsoleCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/InstallLibsCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Internal/RecreateInitialMigrationCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListTemplatesCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LogoutCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/PromptCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SwitchToLocalCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SwitchToNightlyCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SwitchToPreRcCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SwitchToPreviewCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SwitchToStableCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/TranslateCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs
|
|
|
@ -144,7 +144,7 @@ public class AddModuleCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Add a multi-package module to a solution by finding all packages of the module, " + |
|
|
|
"finding related projects in the solution and adding each package to the corresponding project in the solution."; |
|
|
|
|
|
|
|
@ -110,7 +110,7 @@ public class AddPackageCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Add a new ABP package to a project by adding related NuGet package dependencies and [DependsOn(...)] attributes."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -108,7 +108,7 @@ public class BuildCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Builds a dotnet repository and dependent repositories or a solution."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -45,7 +45,7 @@ public class BundleCommand : IConsoleCommand, ITransientDependency |
|
|
|
await BundlingService.BundleAsync(workingDirectory, forceBuild, projectType); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Bundles all third party styles and scripts required by modules and updates index.html file."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ public class CleanCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Delete all BIN and OBJ folders in current folder."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -52,7 +52,7 @@ public class ClearDownloadCacheCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Clears the templates download cache."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -150,7 +150,7 @@ public class CliCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Update or remove ABP CLI. See https://abp.io/docs/latest/cli"; |
|
|
|
} |
|
|
|
|
|
|
|
@ -85,7 +85,7 @@ public class CreateMigrationAndRunMigratorCommand : IConsoleCommand, ITransientD |
|
|
|
return string.Empty; |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return string.Empty; |
|
|
|
} |
|
|
|
|
|
|
|
@ -34,7 +34,7 @@ public class GenerateProxyCommand : ProxyCommandBase<GenerateProxyCommand> |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public override string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Generates client service proxies and DTOs to consume HTTP APIs."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -105,7 +105,7 @@ public class GetSourceCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Download the source code of the specified module."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System.Linq; |
|
|
|
using System.Reflection; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
@ -66,13 +67,13 @@ public class HelpCommand : IConsoleCommand, ITransientDependency |
|
|
|
|
|
|
|
foreach (var command in AbpCliOptions.Commands.ToArray()) |
|
|
|
{ |
|
|
|
string shortDescription; |
|
|
|
|
|
|
|
using (var scope = ServiceScopeFactory.CreateScope()) |
|
|
|
var method = command.Value.GetMethod("GetShortDescription", BindingFlags.Static | BindingFlags.Public); |
|
|
|
if (method == null) |
|
|
|
{ |
|
|
|
shortDescription = ((IConsoleCommand)scope.ServiceProvider |
|
|
|
.GetRequiredService(command.Value)).GetShortDescription(); |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
var shortDescription = (string) method.Invoke(null, null); |
|
|
|
|
|
|
|
sb.Append(" > "); |
|
|
|
sb.Append(command.Key); |
|
|
|
@ -91,7 +92,7 @@ public class HelpCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Show command line help. Write ` abp help <command> `"; |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,6 +8,4 @@ public interface IConsoleCommand |
|
|
|
Task ExecuteAsync(CommandLineArgs commandLineArgs); |
|
|
|
|
|
|
|
string GetUsageInfo(); |
|
|
|
|
|
|
|
string GetShortDescription(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -63,7 +63,7 @@ public class InstallLibsCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Install NPM Packages for MVC / Razor Pages and Blazor Server UI types."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -82,7 +82,7 @@ public class RecreateInitialMigrationCommand : IConsoleCommand, ITransientDepend |
|
|
|
return GetShortDescription(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "This is a internal command. Please run 'abp recreate-initial-migration' command in abp or volo root directory."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -72,7 +72,7 @@ public class ListModulesCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "List open source application modules"; |
|
|
|
} |
|
|
|
|
|
|
|
@ -99,7 +99,7 @@ public class ListTemplatesCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Lists available templates to be created."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -188,7 +188,7 @@ public class LoginCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Sign in to " + CliUrls.AccountAbpIo + "."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -62,7 +62,7 @@ public class LoginInfoCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Show your login info."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -31,7 +31,7 @@ public class LogoutCommand : IConsoleCommand, ITransientDependency |
|
|
|
return string.Empty; |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Sign out from " + CliUrls.AccountAbpIo + "."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -237,7 +237,7 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Generate a new solution based on the ABP startup templates."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -27,7 +27,7 @@ public class PromptCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Starts with prompt mode."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -119,8 +119,6 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public abstract string GetShortDescription(); |
|
|
|
|
|
|
|
public static class Options |
|
|
|
{ |
|
|
|
public static class Module |
|
|
|
|
|
|
|
@ -33,7 +33,7 @@ public class RemoveProxyCommand : ProxyCommandBase<RemoveProxyCommand> |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public override string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Remove client service proxies and DTOs to consume HTTP APIs."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -576,7 +576,7 @@ public class SuiteCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Install, update, remove or start ABP Suite. See https://abp.io/suite."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -78,7 +78,7 @@ public class SwitchToLocal : IConsoleCommand, ITransientDependency |
|
|
|
return path; |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Changes all NuGet package references to local project references for all the .csproj files in the specified folder" + |
|
|
|
" (and all its subfolders with any deep)"; |
|
|
|
|
|
|
|
@ -38,7 +38,7 @@ public class SwitchToNightlyCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Switches packages to nightly preview ABP version."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -38,7 +38,7 @@ public class SwitchToPreRcCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Switches npm packages to pre-rc ABP version."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -38,7 +38,7 @@ public class SwitchToPreviewCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Switches packages to preview ABP version."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -38,7 +38,7 @@ public class SwitchToStableCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Switches packages to stable ABP version from preview version."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -555,7 +555,7 @@ public class TranslateCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Mainly used to translate ABP's resources (JSON files) easier."; |
|
|
|
} |
|
|
|
|
|
|
|
@ -132,7 +132,7 @@ public class UpdateCommand : IConsoleCommand, ITransientDependency |
|
|
|
return sb.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetShortDescription() |
|
|
|
public static string GetShortDescription() |
|
|
|
{ |
|
|
|
return "Update all ABP related NuGet packages and NPM packages in a solution or project to the latest version."; |
|
|
|
} |
|
|
|
|