mirror of https://github.com/abpframework/abp.git
32 changed files with 766 additions and 178 deletions
@ -0,0 +1,93 @@ |
|||
# ABP Framework 4.3 RC Has Been Published |
|||
|
|||
We are super excited to announce the ABP Framework 4.3 RC (Release Candidate). Here, a list of highlights for this release; |
|||
|
|||
* **CMS Kit** module initial release. |
|||
* **Blazor UI server-side** support. |
|||
* **Module extensibility** system for the Blazor UI. |
|||
* Angular UI **resource owner password** flow comes back. |
|||
* **Volo.Abp.EntityFrameworkCore.Oracle** package is now compatible with .NET 5. |
|||
* CLI support to easily add the **Basic Theme** into the solution. |
|||
* New **IInitLogger** service to write logs before dependency injection phase completed. |
|||
* Infrastructure for **multi-lingual entities**. |
|||
|
|||
Beside the new features above, we've done many performance improvements, enhancements and bug fixes on the current features. See the [4.3 milestone](https://github.com/abpframework/abp/milestone/49) on GitHub for all changes made on this version. |
|||
|
|||
This version was a big development journey for us; [150+ issues](https://github.com/abpframework/abp/issues?q=is%3Aopen+is%3Aissue+milestone%3A4.3-preview) resolved, [260+ PRs](https://github.com/abpframework/abp/pulls?q=is%3Aopen+is%3Apr+milestone%3A4.3-preview) merged and 1,600+ commits done only in the [main framework repository](https://github.com/abpframework/abp). **Thanks to the ABP Framework team and all the contributors.** |
|||
|
|||
## The Migration Guide |
|||
|
|||
We normally don't make breaking changes in minor versions. However, this version has some small breaking changes, mostly related to Blazor UI WebAssembly & Server separation. **Please check the [migration guide](https://docs.abp.io/en/abp/4.3/Migration-Guides/Abp-4_3) before starting with the version 4.3**. |
|||
|
|||
## Get Started With The 4.3 RC |
|||
|
|||
If you want to try the version 4.3 today, follow the steps below; |
|||
|
|||
1) **Upgrade** the ABP CLI to the version `4.3.0-rc.1` using a command line terminal: |
|||
|
|||
````bash |
|||
dotnet tool update Volo.Abp.Cli -g --version 4.3.0-rc.1 |
|||
```` |
|||
|
|||
**or install** if you haven't installed before: |
|||
|
|||
````bash |
|||
dotnet tool install Volo.Abp.Cli -g --version 4.3.0-rc.1 |
|||
```` |
|||
|
|||
2) Create a **new application** with the `--preview` option: |
|||
|
|||
````bash |
|||
abp new BookStore --preview |
|||
```` |
|||
|
|||
See the [ABP CLI documentation](https://docs.abp.io/en/abp/4.3/CLI) for all the available options. |
|||
|
|||
> You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page by selecting the **Preview checkbox**. |
|||
|
|||
## What's New With The ABP Framework 4.3 |
|||
|
|||
### CMS Kit |
|||
|
|||
TODO |
|||
|
|||
### Blazor Server Side |
|||
|
|||
TODO |
|||
|
|||
### Blazor UI Module Extensibility |
|||
|
|||
TODO |
|||
|
|||
### Angular UI Resource Owner Password Flow |
|||
|
|||
TODO |
|||
|
|||
### Volo.Abp.EntityFrameworkCore.Oracle Package |
|||
|
|||
TODO |
|||
|
|||
### Add Basic Theme Into Your Solution |
|||
|
|||
TODO |
|||
|
|||
### IInitLogger |
|||
|
|||
TODO |
|||
|
|||
### Multi-Lingual Entities |
|||
|
|||
TODO |
|||
|
|||
### Other News |
|||
|
|||
* [#7423](https://github.com/abpframework/abp/issues/7423) MongoDB repository base aggregation API. |
|||
* [#8163](https://github.com/abpframework/abp/issues/8163) Ignoring files on minification for MVC UI. |
|||
* [#7799](https://github.com/abpframework/abp/pull/7799) Added `RequiredPermissionName` to `ApplicationMenuItem` for MVC & Blazor UI to easily show/hide menu items based on user permissions. Also added `RequiredPermissionName` to `ToolbarItem` for the MVC UI for the same purpose. |
|||
* [#7523](https://github.com/abpframework/abp/pull/7523) Add more bundle methods to the distributed cache. |
|||
|
|||
See the [4.3 milestone](https://github.com/abpframework/abp/milestone/49) on GitHub for all changes made on this version. |
|||
|
|||
## Feedback |
|||
|
|||
Please check out the ABP Framework 4.3 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. **The planned release date for the [4.3.0 final](https://github.com/abpframework/abp/milestone/50) version is April 15, 2021**. |
|||
@ -0,0 +1,3 @@ |
|||
# ABP Framework 4.x to 4.3 Migration Guide |
|||
|
|||
TODO |
|||
@ -0,0 +1,21 @@ |
|||
using Volo.Abp.Cli.ProjectBuilding.Building.Steps; |
|||
using Volo.Abp.Cli.ProjectBuilding.Templates; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding.Building |
|||
{ |
|||
public static class PackageProjectBuildPipelineBuilder |
|||
{ |
|||
public static ProjectBuildPipeline Build(ProjectBuildContext context) |
|||
{ |
|||
var pipeline = new ProjectBuildPipeline(context); |
|||
|
|||
pipeline.Steps.Add(new FileEntryListReadStep()); |
|||
pipeline.Steps.Add(new ProjectReferenceReplaceStep()); |
|||
pipeline.Steps.Add(new ReplaceCommonPropsStep()); |
|||
pipeline.Steps.Add(new ReplaceConfigureAwaitPropsStep()); |
|||
pipeline.Steps.Add(new CreateProjectResultZipStep()); |
|||
|
|||
return pipeline; |
|||
} |
|||
} |
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
using System.Linq; |
|||
using Volo.Abp.Cli.ProjectBuilding.Files; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|||
{ |
|||
public class RemoveCmsKitStep : ProjectBuildPipelineStep |
|||
{ |
|||
public override void Execute(ProjectBuildContext context) |
|||
{ |
|||
var commonFiles = context.Files.Where(f => |
|||
f.Name.EndsWith(".csproj") || |
|||
f.Name.EndsWith(".cs") || |
|||
f.Name.EndsWith(".json") || |
|||
f.Name.EndsWith(".cshtml")); |
|||
|
|||
foreach (var file in commonFiles) |
|||
{ |
|||
file.RemoveTemplateCodeIfNot("CMS-KIT"); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,19 +0,0 @@ |
|||
using System.Linq; |
|||
using Volo.Abp.Cli.ProjectBuilding.Files; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|||
{ |
|||
public class RemoveEfCoreRelatedCodeStep : ProjectBuildPipelineStep |
|||
{ |
|||
public override void Execute(ProjectBuildContext context) |
|||
{ |
|||
foreach (var file in context.Files) |
|||
{ |
|||
if (file.Name.EndsWith(".cs") || file.Name.EndsWith(".csproj") || file.Name.EndsWith(".json")) |
|||
{ |
|||
file.RemoveTemplateCodeIfNot("EFCORE"); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
using System.Linq; |
|||
using Volo.Abp.Cli.ProjectBuilding.Files; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|||
{ |
|||
public class RemoveGlobalFeaturesPackageStep : ProjectBuildPipelineStep |
|||
{ |
|||
public override void Execute(ProjectBuildContext context) |
|||
{ |
|||
var commonFiles = context.Files.Where(f => |
|||
f.Name.EndsWith(".csproj") || |
|||
f.Name.EndsWith(".cs") || |
|||
f.Name.EndsWith(".cshtml")); |
|||
|
|||
foreach (var file in commonFiles) |
|||
{ |
|||
file.RemoveTemplateCodeIf("CMS-KIT"); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,20 +0,0 @@ |
|||
using System; |
|||
using System.Linq; |
|||
using Volo.Abp.Cli.ProjectBuilding.Files; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|||
{ |
|||
public class RemovePublicRedisStep : ProjectBuildPipelineStep |
|||
{ |
|||
public override void Execute(ProjectBuildContext context) |
|||
{ |
|||
foreach (var file in context.Files) |
|||
{ |
|||
if (file.Name.EndsWith(".cs") || file.Name.EndsWith(".csproj") || file.Name.EndsWith(".json")) |
|||
{ |
|||
file.RemoveTemplateCodeIfNot("PUBLIC-REDIS"); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Cli.ProjectModification; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding |
|||
{ |
|||
public interface INugetPackageInfoProvider |
|||
{ |
|||
Task<NugetPackageInfo> GetAsync(string name); |
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Json; |
|||
using Volo.Abp.Cli.Http; |
|||
using Volo.Abp.Cli.ProjectModification; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Threading; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding |
|||
{ |
|||
public class NugetPackageInfoProvider : INugetPackageInfoProvider, ITransientDependency |
|||
{ |
|||
public IJsonSerializer JsonSerializer { get; } |
|||
public ICancellationTokenProvider CancellationTokenProvider { get; } |
|||
public IRemoteServiceExceptionHandler RemoteServiceExceptionHandler { get; } |
|||
|
|||
private readonly CliHttpClientFactory _cliHttpClientFactory; |
|||
|
|||
public NugetPackageInfoProvider( |
|||
IJsonSerializer jsonSerializer, |
|||
ICancellationTokenProvider cancellationTokenProvider, |
|||
IRemoteServiceExceptionHandler remoteServiceExceptionHandler, |
|||
CliHttpClientFactory cliHttpClientFactory) |
|||
{ |
|||
JsonSerializer = jsonSerializer; |
|||
CancellationTokenProvider = cancellationTokenProvider; |
|||
RemoteServiceExceptionHandler = remoteServiceExceptionHandler; |
|||
_cliHttpClientFactory = cliHttpClientFactory; |
|||
} |
|||
|
|||
public async Task<NugetPackageInfo> GetAsync(string name) |
|||
{ |
|||
var packageList = await GetPackageListInternalAsync(); |
|||
|
|||
var package = packageList.FirstOrDefault(m => m.Name == name); |
|||
|
|||
if (package == null) |
|||
{ |
|||
throw new Exception("Package is not found or downloadable!"); |
|||
} |
|||
|
|||
return package; |
|||
} |
|||
|
|||
private async Task<List<NugetPackageInfo>> GetPackageListInternalAsync() |
|||
{ |
|||
var client = _cliHttpClientFactory.CreateClient(); |
|||
|
|||
using (var responseMessage = await client.GetAsync( |
|||
$"{CliUrls.WwwAbpIo}api/download/packages/", |
|||
CancellationTokenProvider.Token |
|||
)) |
|||
{ |
|||
await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage); |
|||
var result = await responseMessage.Content.ReadAsStringAsync(); |
|||
return JsonSerializer.Deserialize<List<NugetPackageInfo>>(result); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,109 @@ |
|||
using Microsoft.Extensions.Logging; |
|||
using Microsoft.Extensions.Logging.Abstractions; |
|||
using Microsoft.Extensions.Options; |
|||
using System; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Cli.Commands; |
|||
using Volo.Abp.Cli.Licensing; |
|||
using Volo.Abp.Cli.ProjectBuilding.Analyticses; |
|||
using Volo.Abp.Cli.ProjectBuilding.Building; |
|||
using Volo.Abp.Cli.ProjectModification; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Json; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding |
|||
{ |
|||
public class PackageProjectBuilder : IProjectBuilder, ITransientDependency |
|||
{ |
|||
public ILogger<PackageProjectBuilder> Logger { get; set; } |
|||
protected ISourceCodeStore SourceCodeStore { get; } |
|||
protected INugetPackageInfoProvider NugetPackageInfoProvider { get; } |
|||
protected ICliAnalyticsCollect CliAnalyticsCollect { get; } |
|||
protected AbpCliOptions Options { get; } |
|||
protected IJsonSerializer JsonSerializer { get; } |
|||
protected IApiKeyService ApiKeyService { get; } |
|||
|
|||
public PackageProjectBuilder(ISourceCodeStore sourceCodeStore, |
|||
INugetPackageInfoProvider nugetPackageInfoProvider, |
|||
ICliAnalyticsCollect cliAnalyticsCollect, |
|||
IOptions<AbpCliOptions> options, |
|||
IJsonSerializer jsonSerializer, |
|||
IApiKeyService apiKeyService) |
|||
{ |
|||
SourceCodeStore = sourceCodeStore; |
|||
NugetPackageInfoProvider = nugetPackageInfoProvider; |
|||
CliAnalyticsCollect = cliAnalyticsCollect; |
|||
Options = options.Value; |
|||
JsonSerializer = jsonSerializer; |
|||
ApiKeyService = apiKeyService; |
|||
|
|||
Logger = NullLogger<PackageProjectBuilder>.Instance; |
|||
} |
|||
|
|||
public async Task<ProjectBuildResult> BuildAsync(ProjectBuildArgs args) |
|||
{ |
|||
var packageInfo = await GetPackageInfoAsync(args); |
|||
|
|||
var templateFile = await SourceCodeStore.GetAsync( |
|||
args.TemplateName, |
|||
SourceCodeTypes.Package, |
|||
args.Version, |
|||
null, |
|||
args.ExtraProperties.ContainsKey(GetSourceCommand.Options.Preview.Long) |
|||
); |
|||
|
|||
var apiKeyResult = await ApiKeyService.GetApiKeyOrNullAsync(); |
|||
if (apiKeyResult?.ApiKey != null) |
|||
{ |
|||
args.ExtraProperties["api-key"] = apiKeyResult.ApiKey; |
|||
} |
|||
|
|||
if (apiKeyResult?.LicenseCode != null) |
|||
{ |
|||
args.ExtraProperties["license-code"] = apiKeyResult.LicenseCode; |
|||
} |
|||
|
|||
var context = new ProjectBuildContext( |
|||
null, |
|||
null, |
|||
packageInfo, |
|||
templateFile, |
|||
args |
|||
); |
|||
|
|||
PackageProjectBuildPipelineBuilder.Build(context).Execute(); |
|||
|
|||
// Exclude unwanted or known options.
|
|||
var options = args.ExtraProperties |
|||
.Where(x => !x.Key.Equals(CliConsts.Command, StringComparison.InvariantCultureIgnoreCase)) |
|||
.Where(x => !x.Key.Equals(NewCommand.Options.OutputFolder.Long, StringComparison.InvariantCultureIgnoreCase) && |
|||
!x.Key.Equals(NewCommand.Options.OutputFolder.Short, StringComparison.InvariantCultureIgnoreCase)) |
|||
.Where(x => !x.Key.Equals(NewCommand.Options.Version.Long, StringComparison.InvariantCultureIgnoreCase) && |
|||
!x.Key.Equals(NewCommand.Options.Version.Short, StringComparison.InvariantCultureIgnoreCase)) |
|||
.Where(x => !x.Key.Equals(NewCommand.Options.TemplateSource.Short, StringComparison.InvariantCultureIgnoreCase) && |
|||
!x.Key.Equals(NewCommand.Options.TemplateSource.Long, StringComparison.InvariantCultureIgnoreCase)) |
|||
.Select(x => x.Key).ToList(); |
|||
|
|||
await CliAnalyticsCollect.CollectAsync(new CliAnalyticsCollectInputDto |
|||
{ |
|||
Tool = Options.ToolName, |
|||
Command = args.ExtraProperties.ContainsKey(CliConsts.Command) ? args.ExtraProperties[CliConsts.Command] : "", |
|||
DatabaseProvider = null, |
|||
IsTiered = null, |
|||
UiFramework = null, |
|||
Options = JsonSerializer.Serialize(options), |
|||
ProjectName = null, |
|||
TemplateName = args.TemplateName, |
|||
TemplateVersion = templateFile.Version |
|||
}); |
|||
|
|||
return new ProjectBuildResult(context.Result.ZipContent, args.TemplateName); |
|||
} |
|||
|
|||
private async Task<NugetPackageInfo> GetPackageInfoAsync(ProjectBuildArgs args) |
|||
{ |
|||
return await NugetPackageInfoProvider.GetAsync(args.TemplateName); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue