From 2aa70bf9cb89e2c09ba2cbf0d048b5427c2b28db Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 11 Oct 2019 11:43:34 +0300 Subject: [PATCH 1/6] Feature Management localization fixes --- .../Volo.Abp.FeatureManagement.Domain.Shared.csproj | 2 +- .../AbpFeatureManagementDomainSharedModule.cs | 2 +- .../FeatureManagement/Localization/Domain/en.json | 2 +- .../Volo.Abp.FeatureManagement.Domain.csproj | 5 ----- .../AbpFeatureManagementDomainModule.cs | 12 ------------ .../FeatureManagement/Localization/Domain/cs.json | 6 ------ .../FeatureManagement/Localization/Domain/en.json | 6 ------ .../FeatureManagement/Localization/Domain/pl.json | 6 ------ .../FeatureManagement/Localization/Domain/pt-BR.json | 6 ------ .../FeatureManagement/Localization/Domain/tr.json | 6 ------ .../FeatureManagement/Localization/Domain/vi.json | 6 ------ .../Localization/Domain/zh-Hans.json | 6 ------ 12 files changed, 3 insertions(+), 62 deletions(-) delete mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/cs.json delete mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json delete mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pl.json delete mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json delete mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/tr.json delete mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/vi.json delete mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj index 1772c74748..5990dc210c 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj @@ -8,8 +8,8 @@ - + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs index 0008faf693..95bff48f2e 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainSharedModule.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.FeatureManagement .Add("en") .AddBaseTypes( typeof(AbpValidationResource) - ).AddVirtualJson("Volo/Abp/FeatureManagement/Localization/Resources/Domain"); + ).AddVirtualJson("Volo/Abp/FeatureManagement/Localization/Domain"); }); } } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json index 2e8812968d..e5a2406aaf 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json @@ -2,6 +2,6 @@ "culture": "en", "texts": { "Features": "Features", - "NoFeatureFoundMessage": "There is't any available feature." + "NoFeatureFoundMessage": "There isn't any available feature." } } \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj index 15145798e2..8b29b704ce 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj @@ -13,11 +13,6 @@ - - - - - diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs index 0958746237..22b845eeaa 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs @@ -27,18 +27,6 @@ namespace Volo.Abp.FeatureManagement options.ProviderPolicies[TenantFeatureValueProvider.ProviderName] = "AbpTenantManagement.Tenants.ManageFeatures"; }); - Configure(options => - { - options.FileSets.AddEmbedded(); - }); - - Configure(options => - { - options.Resources - .Get() - .AddVirtualJson("/Volo/Abp/FeatureManagement/Localization/Domain"); - }); - Configure(options => { options.MapCodeNamespace("AbpFeatureManagement", typeof(AbpFeatureManagementResource)); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/cs.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/cs.json deleted file mode 100644 index 6a060a54c1..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/cs.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "cs", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json deleted file mode 100644 index 92e4e9582b..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "en", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pl.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pl.json deleted file mode 100644 index 2ea227cbf3..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pl.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "pl", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json deleted file mode 100644 index 6d746df04c..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "pt-BR", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/tr.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/tr.json deleted file mode 100644 index 3f906a3cdc..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/tr.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "tr", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/vi.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/vi.json deleted file mode 100644 index d8eb5f3c75..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/vi.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "vi", - "texts": { - - } -} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json deleted file mode 100644 index 25137f1ee3..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "zh-Hans", - "texts": { - - } -} \ No newline at end of file From ce55eb2afa4815f66d2b4bde29d6bbaf5e2e90cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 11 Oct 2019 12:15:18 +0300 Subject: [PATCH 2/6] Use .AsNoTracking() on EF Core repo Delete --- .../Repositories/EntityFrameworkCore/EfCoreRepository.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs index e26624747c..d7d39a25d8 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs @@ -143,7 +143,10 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public override void Delete(Expression> predicate, bool autoSave = false) { - base.Delete(predicate, autoSave); + foreach (var entity in GetQueryable().AsNoTracking().Where(predicate).ToList()) + { + Delete(entity, autoSave); + } if (autoSave) { @@ -153,7 +156,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public override async Task DeleteAsync(Expression> predicate, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = await GetQueryable() + var entities = await GetQueryable().AsNoTracking() .Where(predicate) .ToListAsync(GetCancellationToken(cancellationToken)); From 6a05ad36ead31fa5534cfbba3e43115152af6f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 11 Oct 2019 12:17:45 +0300 Subject: [PATCH 3/6] Revert "Use .AsNoTracking() on EF Core repo Delete" This reverts commit ce55eb2afa4815f66d2b4bde29d6bbaf5e2e90cf. --- .../Repositories/EntityFrameworkCore/EfCoreRepository.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs index d7d39a25d8..e26624747c 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs @@ -143,10 +143,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public override void Delete(Expression> predicate, bool autoSave = false) { - foreach (var entity in GetQueryable().AsNoTracking().Where(predicate).ToList()) - { - Delete(entity, autoSave); - } + base.Delete(predicate, autoSave); if (autoSave) { @@ -156,7 +153,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public override async Task DeleteAsync(Expression> predicate, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = await GetQueryable().AsNoTracking() + var entities = await GetQueryable() .Where(predicate) .ToListAsync(GetCancellationToken(cancellationToken)); From 67bb801d8e7f46d8db70108efb9606928b7a158d Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 11 Oct 2019 13:34:23 +0300 Subject: [PATCH 4/6] Used new Volo.Abp.Ddd.Application.Contracts resolves #1889 --- .../MyCompanyName.MyProjectName.Application.Contracts.csproj | 3 ++- .../MyProjectNameApplicationContractsModule.cs | 4 +++- .../MyCompanyName.MyProjectName.Application.csproj | 1 + .../MyProjectNameApplicationModule.cs | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj index 729ccf3294..fba582f665 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj @@ -8,7 +8,8 @@ - + + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs index fb601c8ea0..947e42f33a 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs @@ -1,12 +1,14 @@ using Volo.Abp.Application; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; +using Volo.Abp.Authorization; namespace MyCompanyName.MyProjectName { [DependsOn( typeof(MyProjectNameDomainSharedModule), - typeof(AbpDddApplicationModule) + typeof(AbpDddApplicationContractsModule), + typeof(AbpAuthorizationModule) )] public class MyProjectNameApplicationContractsModule : AbpModule { diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj index 89e9307b47..04cbe3d9c1 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj @@ -9,6 +9,7 @@ + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs index 7b6410654a..bb0e72e856 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs @@ -1,11 +1,13 @@ using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; +using Volo.Abp.Application; namespace MyCompanyName.MyProjectName { [DependsOn( typeof(MyProjectNameDomainModule), typeof(MyProjectNameApplicationContractsModule), + typeof(AbpDddApplicationModule), typeof(AbpAutoMapperModule) )] public class MyProjectNameApplicationModule : AbpModule From e5ea49e17ba678d006f0d247c91b0ecc6ea58971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 11 Oct 2019 14:09:46 +0300 Subject: [PATCH 5/6] Register IConfiguration if not registered before. --- .../InternalServiceCollectionExtensions.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs index 5b50e6fee2..609328216e 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/InternalServiceCollectionExtensions.cs @@ -24,14 +24,19 @@ namespace Volo.Abp.Internal var assemblyFinder = new AssemblyFinder(abpApplication); var typeFinder = new TypeFinder(assemblyFinder); - services.TryAddSingleton( - new DefaultConfigurationAccessor( - ConfigurationHelper.BuildConfiguration( - applicationCreationOptions.Configuration - ) + var configurationAccessor = new DefaultConfigurationAccessor( + ConfigurationHelper.BuildConfiguration( + applicationCreationOptions.Configuration ) ); + services.TryAddSingleton(configurationAccessor); + + if (!services.IsAdded()) + { + services.AddSingleton(configurationAccessor.Configuration); + } + services.TryAddSingleton(moduleLoader); services.TryAddSingleton(assemblyFinder); services.TryAddSingleton(typeFinder); From 9b733bffe36c7c96b5573464a402918327447ccb Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Fri, 11 Oct 2019 14:12:51 +0300 Subject: [PATCH 6/6] chore: upgrade angular versions --- templates/app/angular/package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/templates/app/angular/package.json b/templates/app/angular/package.json index 6a8fb96d91..45d2c1592a 100644 --- a/templates/app/angular/package.json +++ b/templates/app/angular/package.json @@ -6,7 +6,7 @@ "start": "ng serve", "start:hmr": "ng serve --configuration hmr", "build": "ng build", - "build:prod": "ng build --configuration production", + "build:prod": "ng build --prod", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" @@ -18,14 +18,14 @@ "@abp/ng.theme.basic": "^0.9.0", "@abp/ng.tenant-management": "^0.9.0", "@abp/ng.setting-management": "^0.9.0", - "@angular/animations": "~8.2.8", - "@angular/common": "~8.2.8", - "@angular/compiler": "~8.2.8", - "@angular/core": "~8.2.8", - "@angular/forms": "~8.2.8", - "@angular/platform-browser": "~8.2.8", - "@angular/platform-browser-dynamic": "~8.2.8", - "@angular/router": "~8.2.8", + "@angular/animations": "~8.2.10", + "@angular/common": "~8.2.10", + "@angular/compiler": "~8.2.10", + "@angular/core": "~8.2.10", + "@angular/forms": "~8.2.10", + "@angular/platform-browser": "~8.2.10", + "@angular/platform-browser-dynamic": "~8.2.10", + "@angular/router": "~8.2.10", "@angularclass/hmr": "^2.1.3", "@ngxs/hmr-plugin": "^3.5.0", "@ngxs/devtools-plugin": "^3.5.0", @@ -34,10 +34,10 @@ "zone.js": "~0.9.1" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.803.6", - "@angular/cli": "~8.3.6", - "@angular/compiler-cli": "~8.2.8", - "@angular/language-service": "~8.2.8", + "@angular-devkit/build-angular": "~0.803.9", + "@angular/cli": "~8.3.9", + "@angular/compiler-cli": "~8.2.10", + "@angular/language-service": "~8.2.10", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4",