From 9d3ee6a93b9d2456430617e135cdc2361ff42c91 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Tue, 14 Mar 2023 20:42:37 +0800 Subject: [PATCH] upgrade: upgrade abp framework to 7.0.3 --- .github/workflows/release.yml | 4 +- aspnet-core/Directory.Build.props | 6 +- aspnet-core/common.props | 2 +- .../Program.cs | 2 +- .../LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj | 2 +- .../Abp/Cli/Commands/GenerateProxyCommand.cs | 88 +++---------------- .../Cli/ServiceProxying/GenerateProxyArgs.cs | 3 +- .../LINGYUN.Abp.Tencent.TTS/FodyWeavers.xml | 3 + .../LINGYUN.Abp.Tencent.TTS/FodyWeavers.xsd | 30 +++++++ ...roService.BackendAdmin.HttpApi.Host.csproj | 1 + ...Service.TaskManagement.HttpApi.Host.csproj | 1 + .../LY.MicroService.IdentityServer.csproj | 1 + .../templates/content/Directory.Build.props | 6 +- aspnet-core/templates/content/common.props | 2 +- .../Notifications/FakeNotificationSender.cs | 6 +- build/build-aspnetcore-common.ps1 | 2 + gateways/Directory.Build.props | 6 +- gateways/common.props | 2 +- 18 files changed, 75 insertions(+), 92 deletions(-) create mode 100644 aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xml create mode 100644 aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xsd diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5c10a290..b4bccf654 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: "Tagged Release" on: push: - branches: [ rel-7.0.2 ] + branches: [ rel-7.0.3 ] jobs: tagged-release: @@ -14,4 +14,4 @@ jobs: with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - automatic_release_tag: "7.0.2" + automatic_release_tag: "7.0.3" diff --git a/aspnet-core/Directory.Build.props b/aspnet-core/Directory.Build.props index 812e29164..385569903 100644 --- a/aspnet-core/Directory.Build.props +++ b/aspnet-core/Directory.Build.props @@ -1,11 +1,11 @@  - 7.0.2 + 7.0.3 2.0.1 - 7.0.2 + 7.0.3 1.10.0 1.0.2 - 7.0.2 + 7.1.0 2.10.1 1.5.10 2.13.0 diff --git a/aspnet-core/common.props b/aspnet-core/common.props index f4964beb5..363cf442e 100644 --- a/aspnet-core/common.props +++ b/aspnet-core/common.props @@ -1,7 +1,7 @@ latest - 7.0.2 + 7.0.3 colin $(NoWarn);CS1591;CS0436;CS8618;NU1803 https://github.com/colinin/abp-next-admin diff --git a/aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/Program.cs index 21af80125..0a32e1904 100644 --- a/aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/Program.cs @@ -34,7 +34,7 @@ public class Program .ConfigureLogging((context, logging) => logging.ClearProviders()) .ConfigureServices((hostContext, services) => { - services.AddHostedService(); + services.AddHostedService(); }); } } diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj index 69fe5125e..addcee33b 100644 --- a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj @@ -5,7 +5,7 @@ Exe net7.0 - 7.0.2 + 7.0.3 colin Use LINGYUN.MicroService.Templates command line true diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/GenerateProxyCommand.cs b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/GenerateProxyCommand.cs index 5a581ae59..0da93ff83 100644 --- a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/GenerateProxyCommand.cs +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/GenerateProxyCommand.cs @@ -12,6 +12,7 @@ using Volo.Abp.Cli.Commands; using Volo.Abp.DependencyInjection; using AbpCliServiceProxyOptions = Volo.Abp.Cli.ServiceProxying.AbpCliServiceProxyOptions; using IServiceProxyGenerator = Volo.Abp.Cli.ServiceProxying.IServiceProxyGenerator; +using VoloProxyOptions = Volo.Abp.Cli.Commands.ProxyCommandBase.Options; using VoloGenerateProxyArgs = Volo.Abp.Cli.ServiceProxying.GenerateProxyArgs; using ServiceType = Volo.Abp.Cli.ServiceProxying.ServiceType; @@ -58,15 +59,16 @@ public class GenerateProxyCommand : IConsoleCommand, ITransientDependency var provider = commandLineArgs.Options.GetOrNull(Options.Provider.Short, Options.Provider.Long); var apiScriptProxy = commandLineArgs.Options.GetOrNull(Options.ApiScriptProxy.Short, Options.ApiScriptProxy.Long) ?? VbenDynamicHttpApiScriptGenerator.Name; - var url = commandLineArgs.Options.GetOrNull(Options.Url.Short, Options.Url.Long); - var target = commandLineArgs.Options.GetOrNull(Options.Target.Long); - var module = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.Module.Long) ?? "app"; - var output = commandLineArgs.Options.GetOrNull(Options.Output.Short, Options.Output.Long); - var apiName = commandLineArgs.Options.GetOrNull(Options.ApiName.Short, Options.ApiName.Long); - 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.ServiceType.Short, Options.ServiceType.Long); + var url = commandLineArgs.Options.GetOrNull(VoloProxyOptions.Url.Short, VoloProxyOptions.Url.Long); + var target = commandLineArgs.Options.GetOrNull(VoloProxyOptions.Target.Long); + var module = commandLineArgs.Options.GetOrNull(VoloProxyOptions.Module.Short, VoloProxyOptions.Module.Long) ?? "app"; + var output = commandLineArgs.Options.GetOrNull(VoloProxyOptions.Output.Short, VoloProxyOptions.Output.Long); + var apiName = commandLineArgs.Options.GetOrNull(VoloProxyOptions.ApiName.Short, VoloProxyOptions.ApiName.Long); + var source = commandLineArgs.Options.GetOrNull(VoloProxyOptions.Source.Short, VoloProxyOptions.Source.Long); + var workDirectory = commandLineArgs.Options.GetOrNull(VoloProxyOptions.WorkDirectory.Short, VoloProxyOptions.WorkDirectory.Long) ?? Directory.GetCurrentDirectory(); + var folder = commandLineArgs.Options.GetOrNull(VoloProxyOptions.Folder.Long); + var serviceTypeArg = commandLineArgs.Options.GetOrNull(VoloProxyOptions.ServiceType.Short, VoloProxyOptions.ServiceType.Long); + var entryPoint = commandLineArgs.Options.GetOrNull(VoloProxyOptions.EntryPoint.Short, VoloProxyOptions.EntryPoint.Long); ServiceType? serviceType = null; if (!serviceTypeArg.IsNullOrWhiteSpace()) @@ -78,8 +80,8 @@ public class GenerateProxyCommand : IConsoleCommand, ITransientDependency : null; } - var withoutContracts = commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Short) || - commandLineArgs.Options.ContainsKey(Options.WithoutContracts.Long); + var withoutContracts = commandLineArgs.Options.ContainsKey(VoloProxyOptions.WithoutContracts.Short) || + commandLineArgs.Options.ContainsKey(VoloProxyOptions.WithoutContracts.Long); return new GenerateProxyArgs( CommandName, @@ -94,6 +96,7 @@ public class GenerateProxyCommand : IConsoleCommand, ITransientDependency provider, apiScriptProxy, serviceType, + entryPoint, withoutContracts, commandLineArgs.Options); } @@ -158,68 +161,5 @@ public class GenerateProxyCommand : IConsoleCommand, ITransientDependency public const string Short = "asp"; public const string Long = "api-script-proxy"; } - - public static class Module - { - public const string Short = "m"; - public const string Long = "module"; - } - - public static class ApiName - { - public const string Short = "a"; - public const string Long = "api-name"; - } - - public static class Source - { - public const string Short = "s"; - public const string Long = "source"; - } - public static class Output - { - public const string Short = "o"; - public const string Long = "output"; - } - - public static class Target - { - public const string Long = "target"; - } - - public static class Prompt - { - public const string Short = "p"; - public const string Long = "prompt"; - } - - public static class Folder - { - public const string Long = "folder"; - } - - public static class Url - { - public const string Short = "u"; - public const string Long = "url"; - } - - public static class WorkDirectory - { - public const string Short = "wd"; - public const string Long = "working-directory"; - } - - public static class ServiceType - { - public const string Short = "st"; - public const string Long = "service-type"; - } - - public static class WithoutContracts - { - public const string Short = "c"; - public const string Long = "without-contracts"; - } } } diff --git a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs index 20af1478f..7f093d135 100644 --- a/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs +++ b/aspnet-core/modules/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs @@ -22,9 +22,10 @@ public class GenerateProxyArgs : Volo.Abp.Cli.ServiceProxying.GenerateProxyArgs string provider, string apiScriptProxy, Volo.Abp.Cli.ServiceProxying.ServiceType? serviceType, + string entryPoint, bool withoutContracts, Dictionary extraProperties = null) - : base(commandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, withoutContracts, extraProperties) + : base(commandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, entryPoint, withoutContracts, extraProperties) { ApiScriptProxy = apiScriptProxy; Provider = provider; diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xml b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xml new file mode 100644 index 000000000..1715698cc --- /dev/null +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xsd b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xsd new file mode 100644 index 000000000..11da52550 --- /dev/null +++ b/aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent.TTS/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj index 3da5478ef..0686ca906 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj @@ -43,6 +43,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj index 77b9cfef0..d54c2511d 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj @@ -50,6 +50,7 @@ + diff --git a/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj b/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj index 96ecc177c..fd9d7a66f 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj +++ b/aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj @@ -41,6 +41,7 @@ + diff --git a/aspnet-core/templates/content/Directory.Build.props b/aspnet-core/templates/content/Directory.Build.props index 39b252a30..45b0bc615 100644 --- a/aspnet-core/templates/content/Directory.Build.props +++ b/aspnet-core/templates/content/Directory.Build.props @@ -1,9 +1,9 @@ 1.6.9 - 7.0.2 - 7.0.2 - 7.0.3 + 7.0.3 + 7.0.3 + 7.1.0 1.10.0 1.0.2 1.0.0-rc8 diff --git a/aspnet-core/templates/content/common.props b/aspnet-core/templates/content/common.props index 413528f92..d0115d589 100644 --- a/aspnet-core/templates/content/common.props +++ b/aspnet-core/templates/content/common.props @@ -1,7 +1,7 @@ latest - 7.0.2 + 7.0.3 colin $(NoWarn);CS1591;CS0436 https://github.com/colinin/abp-next-admin diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs index e5405b24b..9a73efab0 100644 --- a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs +++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs @@ -25,6 +25,8 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency protected INotificationStore NotificationStore { get; } + protected INotificationDataSerializer NotificationDataSerializer { get; } + protected IStringLocalizerFactory StringLocalizerFactory { get; } protected INotificationDefinitionManager NotificationDefinitionManager { get; } @@ -39,6 +41,7 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency IStringLocalizerFactory stringLocalizerFactory, IOptions options, INotificationStore notificationStore, + INotificationDataSerializer notificationDataSerializer, INotificationDefinitionManager notificationDefinitionManager, INotificationSubscriptionManager notificationSubscriptionManager, INotificationPublishProviderManager notificationPublishProviderManager) @@ -48,6 +51,7 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency TemplateRenderer = templateRenderer; StringLocalizerFactory = stringLocalizerFactory; NotificationStore = notificationStore; + NotificationDataSerializer = notificationDataSerializer; NotificationDefinitionManager = notificationDefinitionManager; NotificationSubscriptionManager = notificationSubscriptionManager; NotificationPublishProviderManager = notificationPublishProviderManager; @@ -81,7 +85,7 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency }; notificationInfo.SetId(DateTimeOffset.Now.ToUnixTimeMilliseconds()); - notificationInfo.Data = NotificationDataConverter.Convert(notificationInfo.Data); + notificationInfo.Data = NotificationDataSerializer.Serialize(notificationInfo.Data); Logger.LogDebug($"Persistent notification {notificationInfo.Name}"); diff --git a/build/build-aspnetcore-common.ps1 b/build/build-aspnetcore-common.ps1 index 3bb369866..0b77a9844 100644 --- a/build/build-aspnetcore-common.ps1 +++ b/build/build-aspnetcore-common.ps1 @@ -22,6 +22,8 @@ $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.Mic $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.TaskManagement.sln" } $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln" } $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.Workflow.sln" } +$solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.MicroService.SingleProject.sln" } +$solutionArray += [PsObject]@{ File = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/LINGYUN.MicroService.Internal.ApiGateway.sln" } Write-host "" Write-host ":::::::::::::: !!! You are in development mode !!! ::::::::::::::" -ForegroundColor red -BackgroundColor yellow diff --git a/gateways/Directory.Build.props b/gateways/Directory.Build.props index f20a1c60c..3d555a084 100644 --- a/gateways/Directory.Build.props +++ b/gateways/Directory.Build.props @@ -1,9 +1,9 @@  - 7.0.2 - 7.0.2 + 7.0.3 + 7.0.3 1.10.0 - 7.0.2 + 7.1.0 1.5.10 2.13.0 1.2.1.5 diff --git a/gateways/common.props b/gateways/common.props index a75e6e3c3..2947502db 100644 --- a/gateways/common.props +++ b/gateways/common.props @@ -1,7 +1,7 @@ latest - 7.0.2 + 7.0.3 colin $(NoWarn);CS1591;CS0436;CS8618;NU1803 https://github.com/colinin/abp-next-admin