From 6c3ab903ed82d3331bf7091d9593bec87302617c Mon Sep 17 00:00:00 2001 From: edmondshtogu Date: Fri, 7 Aug 2020 13:20:34 +0200 Subject: [PATCH 01/38] Fixed firewall rules check and improved the script the check shall be like ~ Get-NetFirewallRule -DisplayName eShopOnContainers-* -ErrorAction Stop --- ...irewall-rules-for-sts-auth-thru-docker.ps1 | 63 +++++++++++++------ 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 b/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 index 271b6a77d..9aad3e45c 100644 --- a/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 +++ b/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 @@ -1,26 +1,53 @@ -param([switch]$Elevated) +param( + [string]$Name = "eShopOnContainers", + [string]$InboundDisplayName = "eShopOnContainers-Inbound", + [string]$OutboundDisplayName = "eShopOnContainers-Outbound", + [switch]$Elevated + ) + function Check-Admin { -$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) -$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) + $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) + $currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) } -if ((Check-Admin) -eq $false) { -if ($elevated) -{ -# could not elevate, quit +function Add-InboundRule { + New-NetFirewallRule -DisplayName $InboundDisplayName -Confirm -Description "$Name Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound } - -else { - -Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition)) +function Add-OutboundRule { + New-NetFirewallRule -DisplayName $OutboundDisplayName -Confirm -Description "$Name Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound } -exit + +if ((Check-Admin) -eq $false) { + if ($elevated) + { + # could not elevate, quit + } + else { + Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition)) + } + exit } + try { - Get-NetFirewallRule -DisplayName EshopDocker -ErrorAction Stop - Write-Host "Rule found" + $rules = $(Get-NetFirewallRule -DisplayName $Name-* -ErrorAction Stop | Out-String) + if (!$rules.Contains($InboundDisplayName) -and !$rules.Contains($OutboundDisplayName)) + { + Add-InboundRule + Add-OutboundRule + } + elseif (!$rules.Contains($InboundDisplayName)) + { + Add-InboundRule + } + elseif (!$rules.Contains($OutboundDisplayName)) + { + Add-OutboundRule + } + else{ + Write-Host "Rules found!" + } +} +catch [Exception] { + Add-InboundRule + Add-OutboundRule } - catch [Exception] { - New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound - New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound -} \ No newline at end of file From 844348c48b8c627fdd265eb425f524480787f26b Mon Sep 17 00:00:00 2001 From: InstanceFactory Date: Tue, 18 Aug 2020 14:01:58 +0200 Subject: [PATCH 02/38] #1397: Replaced deprecated docker.for.win.localhost by host.docker.internal in src/.env (#1400) --- src/.env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/.env b/src/.env index c802f18eb..96b801650 100644 --- a/src/.env +++ b/src/.env @@ -5,9 +5,9 @@ # The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices # Use this values to run the app locally in Windows -ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.win.localhost -ESHOP_STORAGE_CATALOG_URL=http://docker.for.win.localhost:5202/c/api/v1/catalog/items/[0]/pic/ -ESHOP_STORAGE_MARKETING_URL=http://docker.for.win.localhost:5110/api/v1/campaigns/[0]/pic/ +ESHOP_EXTERNAL_DNS_NAME_OR_IP=host.docker.internal +ESHOP_STORAGE_CATALOG_URL=http://host.docker.internal:5202/c/api/v1/catalog/items/[0]/pic/ +ESHOP_STORAGE_MARKETING_URL=http://host.docker.internal:5110/api/v1/campaigns/[0]/pic/ # Use this values to run the app locally in Mac # ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.mac.localhost From 7dad5c0c2724cb282f0fc7edea509bad710e8844 Mon Sep 17 00:00:00 2001 From: Yosef Herskovitz <34112131+H3RSKO@users.noreply.github.com> Date: Thu, 20 Aug 2020 05:20:20 -0400 Subject: [PATCH 03/38] Updated Readme (#1402) Fixed sentence structure in Readme. Changed "and a several" to "with several." --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1a3d2e87..ad35a6d2b 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Do you want to be up-to-date on .NET Architecture guidance and reference apps li ## Updated for .NET Core 3.1 (LTS) -eShopOnContainers is updated to .NET Core 3.1 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions and a several significant changes. +eShopOnContainers is updated to .NET Core 3.1 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions with several significant changes. **See more details in the [Release notes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Release-notes) wiki page**. From b426909d3619b27589aff0f1771c198b13262435 Mon Sep 17 00:00:00 2001 From: Dmytro Hridin Date: Thu, 20 Aug 2020 16:25:04 +0300 Subject: [PATCH 04/38] CatalogService: Fix issue with Status set when items list is empty (#1304) * Fix issue with Status set when items list is empty * Change method Count() call to Count property Co-authored-by: Dmytro Hridin --- .../Catalog/Catalog.API/Grpc/CatalogService.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs index 13c7c8d2e..ef22b5be2 100644 --- a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs +++ b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs @@ -68,11 +68,10 @@ namespace Catalog.API.Grpc { var items = await GetItemsByIdsAsync(request.Ids); - if (!items.Any()) - { - context.Status = new Status(StatusCode.NotFound, $"ids value invalid. Must be comma-separated list of numbers"); - } - context.Status = new Status(StatusCode.OK, string.Empty); + context.Status = !items.Any() ? + new Status(StatusCode.NotFound, $"ids value invalid. Must be comma-separated list of numbers") : + new Status(StatusCode.OK, string.Empty); + return this.MapToResponse(items); } @@ -104,7 +103,7 @@ namespace Catalog.API.Grpc private PaginatedItemsResponse MapToResponse(List items) { - return this.MapToResponse(items, items.Count(), 1, items.Count()); + return this.MapToResponse(items, items.Count, 1, items.Count); } private PaginatedItemsResponse MapToResponse(List items, long count, int pageIndex, int pageSize) From 921de69418e3e980bea1bf69c2c72a2cf90b50e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 25 Aug 2020 11:52:08 +0100 Subject: [PATCH 05/38] refactored Equals() method on ValueObject (#1316) --- .../AggregatesModel/OrderAggregate/Address.cs | 2 +- .../Ordering.Domain/SeedWork/ValueObject.cs | 23 +-- .../Domain/SeedWork/ValueObjectTests.cs | 190 ++++++++++++++++++ 3 files changed, 197 insertions(+), 18 deletions(-) create mode 100644 src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs diff --git a/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs b/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs index b552f5546..e2c78094d 100644 --- a/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs +++ b/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs @@ -23,7 +23,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O ZipCode = zipcode; } - protected override IEnumerable GetAtomicValues() + protected override IEnumerable GetEqualityComponents() { // Using a yield return statement to return each element one at a time yield return Street; diff --git a/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs b/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs index 40fb117e1..5f36900ee 100644 --- a/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs +++ b/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs @@ -19,7 +19,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork return !(EqualOperator(left, right)); } - protected abstract IEnumerable GetAtomicValues(); + protected abstract IEnumerable GetEqualityComponents(); public override bool Equals(object obj) { @@ -27,26 +27,15 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork { return false; } - ValueObject other = (ValueObject)obj; - IEnumerator thisValues = GetAtomicValues().GetEnumerator(); - IEnumerator otherValues = other.GetAtomicValues().GetEnumerator(); - while (thisValues.MoveNext() && otherValues.MoveNext()) - { - if (ReferenceEquals(thisValues.Current, null) ^ ReferenceEquals(otherValues.Current, null)) - { - return false; - } - if (thisValues.Current != null && !thisValues.Current.Equals(otherValues.Current)) - { - return false; - } - } - return !thisValues.MoveNext() && !otherValues.MoveNext(); + + var other = (ValueObject)obj; + + return this.GetEqualityComponents().SequenceEqual(other.GetEqualityComponents()); } public override int GetHashCode() { - return GetAtomicValues() + return GetEqualityComponents() .Select(x => x != null ? x.GetHashCode() : 0) .Aggregate((x, y) => x ^ y); } diff --git a/src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs b/src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs new file mode 100644 index 000000000..7eed01fe6 --- /dev/null +++ b/src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs @@ -0,0 +1,190 @@ +using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Xunit; + +namespace Ordering.UnitTests.Domain.SeedWork +{ + public class ValueObjectTests + { + public ValueObjectTests() + { } + + [Theory] + [MemberData(nameof(EqualValueObjects))] + public void Equals_EqualValueObjects_ReturnsTrue(ValueObject instanceA, ValueObject instanceB, string reason) + { + // Act + var result = EqualityComparer.Default.Equals(instanceA, instanceB); + + // Assert + Assert.True(result, reason); + } + + [Theory] + [MemberData(nameof(NonEqualValueObjects))] + public void Equals_NonEqualValueObjects_ReturnsFalse(ValueObject instanceA, ValueObject instanceB, string reason) + { + // Act + var result = EqualityComparer.Default.Equals(instanceA, instanceB); + + // Assert + Assert.False(result, reason); + } + + private static readonly ValueObject APrettyValueObject = new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")); + + public static readonly TheoryData EqualValueObjects = new TheoryData + { + { + null, + null, + "they should be equal because they are both null" + }, + { + APrettyValueObject, + APrettyValueObject, + "they should be equal because they are the same object" + }, + { + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")), + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")), + "they should be equal because they have equal members" + }, + { + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3"), notAnEqualityComponent: "xpto"), + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3"), notAnEqualityComponent: "xpto2"), + "they should be equal because all equality components are equal, even though an additional member was set" + }, + { + new ValueObjectB(1, "2", 1, 2, 3 ), + new ValueObjectB(1, "2", 1, 2, 3 ), + "they should be equal because all equality components are equal, including the 'C' list" + } + }; + + public static readonly TheoryData NonEqualValueObjects = new TheoryData + { + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + new ValueObjectA(a: 2, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + "they should not be equal because the 'A' member on ValueObjectA is different among them" + }, + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + new ValueObjectA(a: 1, b: null, c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + "they should not be equal because the 'B' member on ValueObjectA is different among them" + }, + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 2, b: "3")), + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 3, b: "3")), + "they should not be equal because the 'A' member on ValueObjectA's 'D' member is different among them" + }, + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 2, b: "3")), + new ValueObjectB(a: 1, b: "2"), + "they should not be equal because they are not of the same type" + }, + { + new ValueObjectB(1, "2", 1, 2, 3 ), + new ValueObjectB(1, "2", 1, 2, 3, 4 ), + "they should be not be equal because the 'C' list contains one additional value" + }, + { + new ValueObjectB(1, "2", 1, 2, 3, 5 ), + new ValueObjectB(1, "2", 1, 2, 3 ), + "they should be not be equal because the 'C' list contains one additional value" + }, + { + new ValueObjectB(1, "2", 1, 2, 3, 5 ), + new ValueObjectB(1, "2", 1, 2, 3, 4 ), + "they should be not be equal because the 'C' lists are not equal" + } + + }; + + private class ValueObjectA : ValueObject + { + public ValueObjectA(int a, string b, Guid c, ComplexObject d, string notAnEqualityComponent = null) + { + A = a; + B = b; + C = c; + D = d; + NotAnEqualityComponent = notAnEqualityComponent; + } + + public int A { get; } + public string B { get; } + public Guid C { get; } + public ComplexObject D { get; } + public string NotAnEqualityComponent { get; } + + protected override IEnumerable GetEqualityComponents() + { + yield return A; + yield return B; + yield return C; + yield return D; + } + } + + private class ValueObjectB : ValueObject + { + public ValueObjectB(int a, string b, params int[] c) + { + A = a; + B = b; + C = c.ToList(); + } + + public int A { get; } + public string B { get; } + + public List C { get; } + + protected override IEnumerable GetEqualityComponents() + { + yield return A; + yield return B; + + foreach (var c in C) + { + yield return c; + } + } + } + + private class ComplexObject : IEquatable + { + public ComplexObject(int a, string b) + { + A = a; + B = b; + } + + public int A { get; set; } + + public string B { get; set; } + + public override bool Equals(object obj) + { + return Equals(obj as ComplexObject); + } + + public bool Equals(ComplexObject other) + { + return other != null && + A == other.A && + B == other.B; + } + + public override int GetHashCode() + { + return HashCode.Combine(A, B); + } + } + } +} From df2c2bb10ee9942e98aecb1be2d15c8404262bd4 Mon Sep 17 00:00:00 2001 From: InstanceFactory Date: Wed, 26 Aug 2020 16:36:44 +0200 Subject: [PATCH 06/38] Fix/1403and1404 removed duplicate Key SubscriptionClientName and added app.UseAuthorization() call (#1406) * #1403 removed duplicate Key SubscriptionClientName Removed duplicate key SubscriptionClientName from Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json and sorted its content in asc order. * #1404 Added app.UseAuthorization() call Added app.UseAuthorization() call to BasketTestsStartup, LocationsTestsStartup, and MarketingTestsStartup to fix failed unit tests IntegrationEventsScenarios.Post_update_product_price_and_catalog_and_basket_list_modified and MarketingScenarios.Set_new_user_location_and_get_location_campaign_by_user_id (see #1404) --- .../Services/Basket/BasketTestsStartup.cs | 1 + .../Services/Location/LocationsTestsStartup.cs | 1 + .../Services/Marketing/MarketingTestsStartup.cs | 1 + .../Services/Marketing/appsettings.json | 9 ++++----- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs index cfb91fd40..6043a7ab3 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs @@ -16,6 +16,7 @@ namespace FunctionalTests.Services.Basket if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs index fce808759..709c4e7eb 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs @@ -19,6 +19,7 @@ if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs index ae5f4453b..d5d824867 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs @@ -16,6 +16,7 @@ if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json index 2aa46abe6..6d2d7870d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json @@ -1,12 +1,11 @@ { + "AzureServiceBusEnabled": false, "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word", - "MongoConnectionString": "mongodb://localhost:27017", - "MongoDatabase": "MarketingDb", + "EventBusConnection": "localhost", "IdentityUrl": "http://localhost:5105", "isTest": "true", - "EventBusConnection": "localhost", - "AzureServiceBusEnabled": false, - "SubscriptionClientName": "Marketing", + "MongoConnectionString": "mongodb://localhost:27017", + "MongoDatabase": "MarketingDb", "PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/", "SubscriptionClientName": "Marketing" } From 85aea20046ef495ba44c5d6031c75960aa316eb4 Mon Sep 17 00:00:00 2001 From: hfz-r <39443205+hfz-r@users.noreply.github.com> Date: Thu, 27 Aug 2020 17:57:18 +0800 Subject: [PATCH 07/38] Fix for Campaigns exception and SignalR 401 Unauthorized (#1374) * update API Gateway - /locations-api/ @ webmarketing/envoy.yaml * updated signalr services - envoy: webmarketingapigw - latest client: webmvc - service hub: ordering-signalrhub Co-authored-by: hfz-r --- .../Envoy/config/webmarketing/envoy.yaml | 13 ++++++++++++ .../Envoy/config/webshopping/envoy.yaml | 3 +++ .../Ordering/Ordering.SignalrHub/Startup.cs | 21 ++++++++++++++++--- .../WebMVC/Controllers/AccountController.cs | 3 ++- src/Web/WebMVC/Services/LocationService.cs | 2 +- src/Web/WebMVC/libman.json | 2 +- 6 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml b/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml index c6f3421de..11ef504da 100644 --- a/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml +++ b/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml @@ -36,6 +36,19 @@ static_resources: route: auto_host_rewrite: true cluster: marketing + - name: "l-short" + match: + prefix: "/l/" + route: + auto_host_rewrite: true + prefix_rewrite: "/locations-api/" + cluster: locations + - name: "l-long" + match: + prefix: "/locations-api/" + route: + auto_host_rewrite: true + cluster: locations http_filters: - name: envoy.router access_log: diff --git a/src/ApiGateways/Envoy/config/webshopping/envoy.yaml b/src/ApiGateways/Envoy/config/webshopping/envoy.yaml index 1ae8c45a1..688fb740c 100644 --- a/src/ApiGateways/Envoy/config/webshopping/envoy.yaml +++ b/src/ApiGateways/Envoy/config/webshopping/envoy.yaml @@ -56,6 +56,9 @@ static_resources: auto_host_rewrite: true cluster: signalr-hub timeout: 300s + upgrade_configs: + upgrade_type: "websocket" + enabled: true - name: "b-short" match: prefix: "/b/" diff --git a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs index a20a1a196..23aaa7c78 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs +++ b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs @@ -19,6 +19,7 @@ using Ordering.SignalrHub.IntegrationEvents.EventHandling; using Ordering.SignalrHub.IntegrationEvents.Events; using RabbitMQ.Client; using System; +using System.Threading.Tasks; using System.IdentityModel.Tokens.Jwt; namespace Ordering.SignalrHub @@ -109,7 +110,7 @@ namespace Ordering.SignalrHub RegisterEventBus(services); services.AddOptions(); - + //configure autofac var container = new ContainerBuilder(); container.RegisterModule(new ApplicationModule()); @@ -133,7 +134,7 @@ namespace Ordering.SignalrHub loggerFactory.CreateLogger().LogDebug("Using PATH BASE '{pathBase}'", pathBase); app.UsePathBase(pathBase); } - + app.UseRouting(); app.UseCors("CorsPolicy"); app.UseAuthentication(); @@ -150,7 +151,7 @@ namespace Ordering.SignalrHub { Predicate = r => r.Name.Contains("self") }); - endpoints.MapHub("/hub/notificationhub", options => options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransports.All); + endpoints.MapHub("/hub/notificationhub"); }); ConfigureEventBus(app); @@ -185,6 +186,20 @@ namespace Ordering.SignalrHub options.Authority = identityUrl; options.RequireHttpsMetadata = false; options.Audience = "orders.signalrhub"; + options.Events = new JwtBearerEvents + { + OnMessageReceived = context => + { + var accessToken = context.Request.Query["access_token"]; + + var path = context.HttpContext.Request.Path; + if (!string.IsNullOrEmpty(accessToken) && (path.StartsWithSegments("/hub/notificationhub"))) + { + context.Token = accessToken; + } + return Task.CompletedTask; + } + }; }); } diff --git a/src/Web/WebMVC/Controllers/AccountController.cs b/src/Web/WebMVC/Controllers/AccountController.cs index 8b82498ba..68dd166db 100644 --- a/src/Web/WebMVC/Controllers/AccountController.cs +++ b/src/Web/WebMVC/Controllers/AccountController.cs @@ -20,7 +20,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } - [Authorize(AuthenticationSchemes = "OpenIdConnect")] public async Task SignIn(string returnUrl) + [Authorize(AuthenticationSchemes = "OpenIdConnect")] + public async Task SignIn(string returnUrl) { var user = User as ClaimsPrincipal; var token = await HttpContext.GetTokenAsync("access_token"); diff --git a/src/Web/WebMVC/Services/LocationService.cs b/src/Web/WebMVC/Services/LocationService.cs index 8d81cbd22..4619cfd6a 100644 --- a/src/Web/WebMVC/Services/LocationService.cs +++ b/src/Web/WebMVC/Services/LocationService.cs @@ -23,7 +23,7 @@ namespace WebMVC.Services _settings = settings; _logger = logger; - _remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/api/v1/l/locations/"; + _remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/l/api/v1/locations/"; } public async Task CreateOrUpdateUserLocation(LocationDTO location) diff --git a/src/Web/WebMVC/libman.json b/src/Web/WebMVC/libman.json index f7b9d3763..b80fb4ecc 100644 --- a/src/Web/WebMVC/libman.json +++ b/src/Web/WebMVC/libman.json @@ -37,7 +37,7 @@ }, { "provider": "unpkg", - "library": "@microsoft/signalr@3.0.1", + "library": "@microsoft/signalr@latest", "destination": "wwwroot/lib/@microsoft/signalr/", "files": [ "dist/browser/signalr.js", From 7617ee48805a989b328cb837820529d303d379d3 Mon Sep 17 00:00:00 2001 From: Majid Ali Khan Quaid Date: Thu, 27 Aug 2020 15:00:59 +0500 Subject: [PATCH 08/38] Mis-Spelled 'client' (#1411) --- src/Services/Location/Locations.API/appsettings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/Location/Locations.API/appsettings.json b/src/Services/Location/Locations.API/appsettings.json index 7fbe98b3e..3ee24b242 100644 --- a/src/Services/Location/Locations.API/appsettings.json +++ b/src/Services/Location/Locations.API/appsettings.json @@ -23,7 +23,7 @@ "UseVault": false, "Vault": { "Name": "eshop", - "ClientId": "your-clien-id", + "ClientId": "your-client-id", "ClientSecret": "your-client-secret" } -} \ No newline at end of file +} From 66d81f6ea9c47c88096df4c48ea2b858498451b8 Mon Sep 17 00:00:00 2001 From: Javier Vela Date: Fri, 28 Aug 2020 08:00:02 +0200 Subject: [PATCH 09/38] fix parameter error in multiarch job (#1413) --- build/azure-devops/multiarch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-devops/multiarch.yaml b/build/azure-devops/multiarch.yaml index 162128d0a..1639fff87 100644 --- a/build/azure-devops/multiarch.yaml +++ b/build/azure-devops/multiarch.yaml @@ -26,7 +26,7 @@ jobs: mkdir -p ~/.docker sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json - docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:{{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} + docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest From 8f84bd3d09773fc28426e9f58cc538f492031404 Mon Sep 17 00:00:00 2001 From: Facundo La Rocca Date: Fri, 28 Aug 2020 07:37:41 -0300 Subject: [PATCH 10/38] Private readonly string changed to private const string (#1288) --- .../EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs index 5623549d5..6ee3032a8 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs @@ -21,12 +21,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ public class EventBusRabbitMQ : IEventBus, IDisposable { const string BROKER_NAME = "eshop_event_bus"; + const string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; private readonly IRabbitMQPersistentConnection _persistentConnection; private readonly ILogger _logger; private readonly IEventBusSubscriptionsManager _subsManager; private readonly ILifetimeScope _autofac; - private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; private readonly int _retryCount; private IModel _consumerChannel; @@ -86,7 +86,6 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ using (var channel = _persistentConnection.CreateModel()) { - _logger.LogTrace("Declaring RabbitMQ exchange to publish event: {EventId}", @event.Id); channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); From 313879e52b7e80490860470885f2b2da973bbf8d Mon Sep 17 00:00:00 2001 From: Nabil Sedoud Date: Mon, 31 Aug 2020 09:42:34 +0100 Subject: [PATCH 11/38] fix disposing of direct instantiated objects in calalog service #1392 (#1395) --- .../Services/IntegrationEventLogService.cs | 23 ++++++++++++++++++- .../CatalogIntegrationEventService.cs | 22 +++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs index 800b99a38..22c5e1fba 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs @@ -15,11 +15,12 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services { - public class IntegrationEventLogService : IIntegrationEventLogService + public class IntegrationEventLogService : IIntegrationEventLogService,IDisposable { private readonly IntegrationEventLogContext _integrationEventLogContext; private readonly DbConnection _dbConnection; private readonly List _eventTypes; + private volatile bool disposedValue; public IntegrationEventLogService(DbConnection dbConnection) { @@ -89,5 +90,25 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Servi return _integrationEventLogContext.SaveChangesAsync(); } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + _integrationEventLogContext?.Dispose(); + } + + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs index bb3a23d40..3e7ba9868 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs @@ -14,13 +14,14 @@ using System.Threading.Tasks; namespace Catalog.API.IntegrationEvents { - public class CatalogIntegrationEventService : ICatalogIntegrationEventService + public class CatalogIntegrationEventService : ICatalogIntegrationEventService,IDisposable { private readonly Func _integrationEventLogServiceFactory; private readonly IEventBus _eventBus; private readonly CatalogContext _catalogContext; private readonly IIntegrationEventLogService _eventLogService; private readonly ILogger _logger; + private volatile bool disposedValue; public CatalogIntegrationEventService( ILogger logger, @@ -65,5 +66,24 @@ namespace Catalog.API.IntegrationEvents await _eventLogService.SaveEventAsync(evt, _catalogContext.Database.CurrentTransaction); }); } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + (_eventLogService as IDisposable)?.Dispose(); + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } From 0cb8424fdca35f99e859cfdd72f6311469545fe4 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 8 Sep 2020 17:15:02 +0530 Subject: [PATCH 12/38] Updated version of different packages. (#1420) --- src/Web/WebSPA/package-lock.json | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index c3e6ed779..4514d955f 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1863,8 +1863,8 @@ } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { @@ -2943,9 +2943,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -8541,13 +8541,20 @@ "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==" }, "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "requires": { - "eventemitter3": "^3.0.0", + "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", "requires-port": "^1.0.0" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + } } }, "http-proxy-agent": { @@ -17255,9 +17262,9 @@ } }, "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "requires": { "camelcase": "^4.1.0" } From 7c1261bf6983ee6c04f181c60455d483791b3e62 Mon Sep 17 00:00:00 2001 From: jeremiahflaga Date: Mon, 14 Sep 2020 17:26:22 +0800 Subject: [PATCH 13/38] for issue #1423: changed literal string "OpenIdConnect" to constant string (#1424) Co-authored-by: Jeremiah Flaga --- src/Web/WebMVC/Controllers/AccountController.cs | 4 ++-- src/Web/WebMVC/Controllers/CampaignsController.cs | 3 ++- src/Web/WebMVC/Controllers/CartController.cs | 3 ++- src/Web/WebMVC/Controllers/OrderController.cs | 3 ++- src/Web/WebMVC/Controllers/OrderManagementController.cs | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Web/WebMVC/Controllers/AccountController.cs b/src/Web/WebMVC/Controllers/AccountController.cs index 68dd166db..fba04f26d 100644 --- a/src/Web/WebMVC/Controllers/AccountController.cs +++ b/src/Web/WebMVC/Controllers/AccountController.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class AccountController : Controller { private readonly ILogger _logger; @@ -20,7 +20,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public async Task SignIn(string returnUrl) { var user = User as ClaimsPrincipal; diff --git a/src/Web/WebMVC/Controllers/CampaignsController.cs b/src/Web/WebMVC/Controllers/CampaignsController.cs index cf210318b..920269467 100644 --- a/src/Web/WebMVC/Controllers/CampaignsController.cs +++ b/src/Web/WebMVC/Controllers/CampaignsController.cs @@ -11,8 +11,9 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers using System.Threading.Tasks; using ViewModels; using ViewModels.Pagination; + using Microsoft.AspNetCore.Authentication.OpenIdConnect; - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class CampaignsController : Controller { private readonly ICampaignService _campaignService; diff --git a/src/Web/WebMVC/Controllers/CartController.cs b/src/Web/WebMVC/Controllers/CartController.cs index 78cec5670..d7e577c25 100644 --- a/src/Web/WebMVC/Controllers/CartController.cs +++ b/src/Web/WebMVC/Controllers/CartController.cs @@ -1,3 +1,4 @@ +using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.WebMVC.Services; @@ -8,7 +9,7 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class CartController : Controller { private readonly IBasketService _basketSvc; diff --git a/src/Web/WebMVC/Controllers/OrderController.cs b/src/Web/WebMVC/Controllers/OrderController.cs index f308d0bdc..d5e98552a 100644 --- a/src/Web/WebMVC/Controllers/OrderController.cs +++ b/src/Web/WebMVC/Controllers/OrderController.cs @@ -1,3 +1,4 @@ +using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.WebMVC.Services; @@ -7,7 +8,7 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class OrderController : Controller { private IOrderingService _orderSvc; diff --git a/src/Web/WebMVC/Controllers/OrderManagementController.cs b/src/Web/WebMVC/Controllers/OrderManagementController.cs index a488dc4ae..6963c469d 100644 --- a/src/Web/WebMVC/Controllers/OrderManagementController.cs +++ b/src/Web/WebMVC/Controllers/OrderManagementController.cs @@ -7,10 +7,11 @@ using WebMVC.Services.ModelDTOs; using Microsoft.eShopOnContainers.WebMVC.Services; using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authentication.OpenIdConnect; namespace WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class OrderManagementController : Controller { private IOrderingService _orderSvc; From 6a9a78132310abb54c4fbaccfc8dcc55c2b24ac7 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 15 Sep 2020 16:34:07 +0530 Subject: [PATCH 14/38] Updated node-fetch package version. (#1426) * Updated node-fetch package version. * Updated node-forge version. --- src/Web/WebSPA/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 4514d955f..052f24469 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1236,8 +1236,8 @@ "dev": true }, "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", "dev": true }, @@ -10388,8 +10388,8 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "requires": { "encoding": "^0.1.11", @@ -10408,8 +10408,8 @@ } }, "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" }, "node-libs-browser": { From 04ab1279d92f1dcda64e1e40468bd4680a0223c8 Mon Sep 17 00:00:00 2001 From: Wojciech Rak Date: Fri, 18 Sep 2020 20:59:57 +0200 Subject: [PATCH 15/38] Fixes #1474: webspa container does not build when running docker-compose up.Updated sha hashes in packages-lock.json (#1475) --- src/Web/WebSPA/package-lock.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 052f24469..09a5d0707 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1238,8 +1238,7 @@ "node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", - "dev": true + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" }, "node-libs-browser": { "version": "2.2.1", @@ -10410,7 +10409,7 @@ "node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" }, "node-libs-browser": { "version": "2.2.1", From 0b4f44659dc7e8fc6e2a942b16caf02c87532b9a Mon Sep 17 00:00:00 2001 From: Zakaria <23211915+zakaria-c@users.noreply.github.com> Date: Wed, 23 Sep 2020 07:45:53 +0200 Subject: [PATCH 16/38] Change ReadAllBytes to ReadAllBytesAsync in PicController (#1425) --- src/Services/Catalog/Catalog.API/Controllers/PicController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs index 0aa376832..31c93683c 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs @@ -46,7 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers string imageFileExtension = Path.GetExtension(item.PictureFileName); string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension); - var buffer = System.IO.File.ReadAllBytes(path); + var buffer = await System.IO.File.ReadAllBytesAsync(path); return File(buffer, mimetype); } From 78db4b758c57cb2767131b5f434b3e3232b91ed2 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 21 Oct 2020 16:33:29 +0530 Subject: [PATCH 17/38] Fixed parameter bug create resource script (#1494) --- deploy/azure/az/createresources.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/azure/az/createresources.sh b/deploy/azure/az/createresources.sh index 3a71ca8fd..096befe6c 100644 --- a/deploy/azure/az/createresources.sh +++ b/deploy/azure/az/createresources.sh @@ -51,8 +51,8 @@ if [ ! -f "$1.json" ]; then exit 1 fi -if [ ! -f "$2.parameters.json" ]; then - echo "$2.parameters.json doesn't exist" +if [ ! -f "$1.parameters.json" ]; then + echo "$1.parameters.json doesn't exist" exit 1 fi From d910eb416d0f36fc36558e7b4832c93b910401ac Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 21 Oct 2020 16:34:21 +0530 Subject: [PATCH 18/38] Fixed invalid number format in webspa (#1496) --- src/Web/WebSPA/Client/modules/catalog/catalog.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Web/WebSPA/Client/modules/catalog/catalog.component.html b/src/Web/WebSPA/Client/modules/catalog/catalog.component.html index 96f05db56..d03b8433b 100644 --- a/src/Web/WebSPA/Client/modules/catalog/catalog.component.html +++ b/src/Web/WebSPA/Client/modules/catalog/catalog.component.html @@ -40,7 +40,7 @@ {{item.name}}
- {{item.price | number:'3.2-2'}} + {{item.price | number:'.2-2'}}
From b196622846ec9de2309d22e4ae91232edc7cf9a1 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 21 Oct 2020 16:34:55 +0530 Subject: [PATCH 19/38] Updated package version of webpack-subresource-integrity (#1497) --- src/Web/WebSPA/package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 09a5d0707..3c3a97fda 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -74,7 +74,7 @@ "webpack-dev-server": "3.9.0", "webpack-merge": "4.2.1", "webpack-sources": "1.4.3", - "webpack-subresource-integrity": "1.1.0-rc.6", + "webpack-subresource-integrity": "1.5.1", "worker-plugin": "3.2.0" }, "dependencies": { @@ -16876,9 +16876,9 @@ } }, "webpack-subresource-integrity": { - "version": "1.1.0-rc.6", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.6.tgz", - "integrity": "sha512-Az7y8xTniNhaA0620AV1KPwWOqawurVVDzQSpPAeR5RwNbL91GoBSJAAo9cfd+GiFHwsS5bbHepBw1e6Hzxy4w==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.5.1.tgz", + "integrity": "sha512-uekbQ93PZ9e7BFB8Hl9cFIVYQyQqiXp2ExKk9Zv+qZfH/zHXHrCFAfw1VW0+NqWbTWrs/HnuDrto3+tiPXh//Q==", "dev": true, "requires": { "webpack-core": "^0.6.8" From 388d0b7b5d6f983728dca3d9e1fb8fb9fc9f450e Mon Sep 17 00:00:00 2001 From: ansonzhang <3143422472@qq.com> Date: Thu, 5 Nov 2020 06:12:21 -0600 Subject: [PATCH 20/38] Fixed #1495 bug : UseLoadTest missing claimsType (#1508) * Update ByPassAuthMiddleware.cs * Update ByPassAuthMiddleware.cs * remove WebMVC/ByPassAuthMiddleware duplicate cliam * remove Ordering.API/ByPassAuthMid duplicate cliam * remove Location.API/ByPassAuthMid duplicate cliam * remove Market.API/ByPassAuthMid duplicate cliam * change webmvc bypassauth: claimType of sub * change ordering bypassauth: claimType of sub * change location bypassauth: claimType of sub * change market bypassauth: claimType of sub --- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 4 ++-- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index dfe690f6f..2f5eb28b6 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -61,11 +61,11 @@ namespace Basket.API.Infrastructure.Middlewares var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("nonce", Guid.NewGuid().ToString()), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), - new Claim("sub", "1234"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index ae21d10cc..e6b43d109 100644 --- a/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -61,10 +61,10 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Midd var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("sub", "1234"), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index d89e15a7c..6f4ff16e2 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -60,10 +60,10 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Midd var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("sub", "1234"), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index 5a419e7fc..a76b79a21 100644 --- a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -61,10 +61,10 @@ namespace Ordering.API.Infrastructure.Middlewares var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), new Claim("nonce", Guid.NewGuid().ToString()), new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("sub", "1234"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index 72adaaa4d..e39ebfc0a 100644 --- a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -62,10 +62,10 @@ namespace WebMVC.Infrastructure.Middlewares new Claim("emails", currentUserId), new Claim("name", "Test user"), new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("nonce", Guid.NewGuid().ToString()), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), - new Claim("sub", "1234"), + new Claim("sub", currentUserId), new Claim("card_expiration", "12/20"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); From 385318c00f035ddedd9ea9a2f50b7830164c469b Mon Sep 17 00:00:00 2001 From: m-knet <10815022+m-knet@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:40:35 +0100 Subject: [PATCH 21/38] Update solution items (#1515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Manuel Cañete --- src/Mobile/eShopOnContainers-Android.sln | 5 ++--- src/Mobile/eShopOnContainers-MobileApps.sln | 5 ++--- src/eShopOnContainers-ServicesAndWebApps.sln | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Mobile/eShopOnContainers-Android.sln b/src/Mobile/eShopOnContainers-Android.sln index 1ef76e772..3782286c0 100644 --- a/src/Mobile/eShopOnContainers-Android.sln +++ b/src/Mobile/eShopOnContainers-Android.sln @@ -7,9 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject - docker-compose.yml = docker-compose.yml - global.json = global.json - NuGet.config = NuGet.config + ..\docker-compose.yml = ..\docker-compose.yml + ..\NuGet.config = ..\NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{F61357CE-1CC2-410E-8776-B16EEBC98EB8}" diff --git a/src/Mobile/eShopOnContainers-MobileApps.sln b/src/Mobile/eShopOnContainers-MobileApps.sln index 04a0fa223..b10b8a818 100644 --- a/src/Mobile/eShopOnContainers-MobileApps.sln +++ b/src/Mobile/eShopOnContainers-MobileApps.sln @@ -7,9 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject - docker-compose.yml = docker-compose.yml - global.json = global.json - NuGet.config = NuGet.config + ..\docker-compose.yml = ..\docker-compose.yml + ..\NuGet.config = ..\NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{F61357CE-1CC2-410E-8776-B16EEBC98EB8}" diff --git a/src/eShopOnContainers-ServicesAndWebApps.sln b/src/eShopOnContainers-ServicesAndWebApps.sln index 3a1dec68a..55d5b7359 100644 --- a/src/eShopOnContainers-ServicesAndWebApps.sln +++ b/src/eShopOnContainers-ServicesAndWebApps.sln @@ -10,7 +10,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject .env = .env - Local.testsettings = Local.testsettings NuGet.config = NuGet.config EndProjectSection EndProject From 07d36e3188f8e22d5d8d3010b5e1b23472fb5df6 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 10 Nov 2020 19:33:28 +0530 Subject: [PATCH 22/38] Updated solution file. (#1514) --- src/eShopOnContainers-ServicesAndWebApps.sln | 143 +++++++++---------- 1 file changed, 64 insertions(+), 79 deletions(-) diff --git a/src/eShopOnContainers-ServicesAndWebApps.sln b/src/eShopOnContainers-ServicesAndWebApps.sln index 55d5b7359..95a8ad397 100644 --- a/src/eShopOnContainers-ServicesAndWebApps.sln +++ b/src/eShopOnContainers-ServicesAndWebApps.sln @@ -73,27 +73,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "Bu EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{77849D35-37D4-4802-81DC-9477B2775A40}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Marketing", "Mobile.Bff.Marketing", "{DB813A36-11BA-41FE-B258-CA9A7152247B}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Mobile.Bff.Marketing\apigw\configuration.json = ApiGateways\Mobile.Bff.Marketing\apigw\configuration.json - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Shopping", "Mobile.Bff.Shopping", "{0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Mobile.Bff.Shopping\apigw\configuration.json = ApiGateways\Mobile.Bff.Shopping\apigw\configuration.json - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web.Bff.Marketing", "Web.Bff.Marketing", "{F8F0921C-EE5D-4AED-A4D6-5BF5FAE02CB5}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Web.Bff.Marketing\apigw\configuration.json = ApiGateways\Web.Bff.Marketing\apigw\configuration.json - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web.Bff.Shopping", "Web.Bff.Shopping", "{28C0F5C8-4849-4035-80AB-45639424E73F}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Web.Bff.Shopping\apigw\configuration.json = ApiGateways\Web.Bff.Shopping\apigw\configuration.json - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "ApiGateways\Mobile.Bff.Shopping\aggregator\Mobile.Shopping.HttpAggregator.csproj", "{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.Shopping.HttpAggregator", "ApiGateways\Web.Bff.Shopping\aggregator\Web.Shopping.HttpAggregator.csproj", "{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}" EndProject @@ -142,19 +122,24 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devspaces.Support", "BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj", "{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Envoy", "Envoy", "{882A8F3A-C61F-4C44-86DD-A5A258714BF2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{3ABEEE8C-35E0-4185-9825-C44326151F5B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "Services\Ordering\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webmarketing", "webmarketing", "{4AB8D97B-1A96-434D-A10F-2A646A687859}" ProjectSection(SolutionItems) = preProject - ApiGateways\Envoy\Dockerfile = ApiGateways\Envoy\Dockerfile + ApiGateways\Envoy\config\webmarketing\envoy.yaml = ApiGateways\Envoy\config\webmarketing\envoy.yaml EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{3ABEEE8C-35E0-4185-9825-C44326151F5B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webshopping", "webshopping", "{966B1B0B-2AE0-4438-8741-1C5A05556095}" ProjectSection(SolutionItems) = preProject - ApiGateways\Envoy\config\catalog.proto = ApiGateways\Envoy\config\catalog.proto - ApiGateways\Envoy\config\catalog.proto-descriptor.pb = ApiGateways\Envoy\config\catalog.proto-descriptor.pb - ApiGateways\Envoy\Dockerfile = ApiGateways\Envoy\Dockerfile - ApiGateways\Envoy\config\envoy.yaml = ApiGateways\Envoy\config\envoy.yaml + ApiGateways\Envoy\config\webshopping\envoy.yaml = ApiGateways\Envoy\config\webshopping\envoy.yaml EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "Services\Ordering\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Shopping", "Mobile.Bff.Shopping", "{798BFC44-2CCD-45FA-B37A-5173B03C2B30}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "ApiGateways\Mobile.Bff.Shopping\aggregator\Mobile.Shopping.HttpAggregator.csproj", "{B62E859F-825E-4C8B-93EC-5966EACFD026}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -890,54 +875,6 @@ Global {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x64.Build.0 = Release|Any CPU {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.ActiveCfg = Release|Any CPU {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|ARM.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhone.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x64.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x64.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x86.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x86.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|ARM.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|ARM.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhone.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x64.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x64.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x86.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x86.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|Any CPU.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|ARM.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|ARM.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhone.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhone.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x64.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x64.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x86.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x86.Build.0 = Release|Any CPU {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1706,6 +1643,54 @@ Global {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}.Release|x64.Build.0 = Release|Any CPU {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}.Release|x86.ActiveCfg = Release|Any CPU {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}.Release|x86.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|ARM.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhone.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x64.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x64.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x86.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x86.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|ARM.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|ARM.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhone.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x64.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x64.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x86.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x86.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|Any CPU.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|ARM.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|ARM.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhone.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhone.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x64.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x64.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x86.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1740,11 +1725,7 @@ Global {1815B651-941C-466B-AE33-D1D7EEB8F77F} = {DB0EFB20-B024-4E5E-A75C-52143C131D25} {15F4B3AA-89B6-4A0D-9051-414305974781} = {1815B651-941C-466B-AE33-D1D7EEB8F77F} {77849D35-37D4-4802-81DC-9477B2775A40} = {932D8224-11F6-4D07-B109-DA28AD288A63} - {DB813A36-11BA-41FE-B258-CA9A7152247B} = {77849D35-37D4-4802-81DC-9477B2775A40} - {0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB} = {77849D35-37D4-4802-81DC-9477B2775A40} - {F8F0921C-EE5D-4AED-A4D6-5BF5FAE02CB5} = {77849D35-37D4-4802-81DC-9477B2775A40} {28C0F5C8-4849-4035-80AB-45639424E73F} = {77849D35-37D4-4802-81DC-9477B2775A40} - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0} = {0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB} {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1} = {28C0F5C8-4849-4035-80AB-45639424E73F} {E1D2B260-4E7F-4A88-BC13-9910F7C44623} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} {9D9CE4E4-1DD0-4961-861F-219731DE06CE} = {2751AC5C-D148-4D7A-AE8F-149B47C9A82D} @@ -1771,6 +1752,10 @@ Global {882A8F3A-C61F-4C44-86DD-A5A258714BF2} = {77849D35-37D4-4802-81DC-9477B2775A40} {3ABEEE8C-35E0-4185-9825-C44326151F5B} = {882A8F3A-C61F-4C44-86DD-A5A258714BF2} {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} + {4AB8D97B-1A96-434D-A10F-2A646A687859} = {3ABEEE8C-35E0-4185-9825-C44326151F5B} + {966B1B0B-2AE0-4438-8741-1C5A05556095} = {3ABEEE8C-35E0-4185-9825-C44326151F5B} + {798BFC44-2CCD-45FA-B37A-5173B03C2B30} = {77849D35-37D4-4802-81DC-9477B2775A40} + {B62E859F-825E-4C8B-93EC-5966EACFD026} = {798BFC44-2CCD-45FA-B37A-5173B03C2B30} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9} From 7e59cd1ffc7c7c7c6af7f823451819e09881476e Mon Sep 17 00:00:00 2001 From: ansonzhang <3143422472@qq.com> Date: Mon, 23 Nov 2020 19:26:09 +0800 Subject: [PATCH 23/38] Fixed #1518 bug (#1520) * Update CatalogContextModelSnapshot.cs * Update CatalogContextSeed.cs * Modify CSV data * Give PictureFileName assignment --- .../Catalog.API/Infrastructure/CatalogContextSeed.cs | 4 ++-- .../CatalogMigrations/CatalogContextModelSnapshot.cs | 9 +++++---- src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs index cd1ea4ab1..e425072e0 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs @@ -181,7 +181,7 @@ string[] csvheaders; try { - string[] requiredHeaders = { "catalogtypename", "catalogbrandname", "description", "name", "price", "pictureFileName" }; + string[] requiredHeaders = { "catalogtypename", "catalogbrandname", "description", "name", "price", "picturefilename" }; string[] optionalheaders = { "availablestock", "restockthreshold", "maxstockthreshold", "onreorder" }; csvheaders = GetHeaders(csvFileCatalogItems, requiredHeaders, optionalheaders ); } @@ -234,7 +234,7 @@ Description = column[Array.IndexOf(headers, "description")].Trim('"').Trim(), Name = column[Array.IndexOf(headers, "name")].Trim('"').Trim(), Price = price, - PictureUri = column[Array.IndexOf(headers, "pictureuri")].Trim('"').Trim(), + PictureFileName = column[Array.IndexOf(headers, "picturefilename")].Trim('"').Trim(), }; int availableStockIndex = Array.IndexOf(headers, "availablestock"); diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs index 851cfefe6..7b72f3388 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs @@ -14,9 +14,10 @@ namespace Catalog.API.Infrastructure.Migrations { modelBuilder .HasAnnotation("ProductVersion", "1.1.1") - .HasAnnotation("SqlServer:Sequence:.catalog_brand_hilo", "'catalog_brand_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:Sequence:.catalog_hilo", "'catalog_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:Sequence:.catalog_type_hilo", "'catalog_type_hilo', '', '1', '10', '', '', 'Int64', 'False'") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("Relational:Sequence:.catalog_brand_hilo", "'catalog_brand_hilo', '', '1', '10', '', '', 'Int64', 'False'") + .HasAnnotation("Relational:Sequence:.catalog_hilo", "'catalog_hilo', '', '1', '10', '', '', 'Int64', 'False'") + .HasAnnotation("Relational:Sequence:.catalog_type_hilo", "'catalog_type_hilo', '', '1', '10', '', '', 'Int64', 'False'") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogBrand", b => @@ -58,7 +59,7 @@ namespace Catalog.API.Infrastructure.Migrations b.Property("OnReorder"); - b.Property("PictureUri"); + b.Property("PictureFileName"); b.Property("Price"); diff --git a/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv b/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv index 0257216d4..430d52f20 100644 --- a/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv +++ b/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv @@ -5,7 +5,7 @@ T-Shirt,Other,Prism White T-Shirt,Prism White T-Shirt,12,3.png,56,false T-Shirt,.NET,.NET Foundation T-shirt,.NET Foundation T-shirt,12,4.png,120,false Sheet,Other,Roslyn Red Sheet,Roslyn Red Sheet,8.5,5.png,55,false T-Shirt,.NET,.NET Blue Hoodie,.NET Blue Hoodie,12,6.png,17,false -T-Shirt,Other,Roslyn Red T-Shirt,Roslyn Red T-Shirt",12,7.png,8,false +T-Shirt,Other,Roslyn Red T-Shirt,Roslyn Red T-Shirt,12,7.png,8,false T-Shirt,Other,Kudu Purple Hoodie,Kudu Purple Hoodie,8.5,8.png,34,false Mug,Other,Cup White Mug,Cup White Mug,12,9.png,76,false Sheet,.NET,.NET Foundation Sheet,.NET Foundation Sheet,12,10.png,11,false From 9dec3b16e826d91e64f2c33a4c5ae043bf0e9a98 Mon Sep 17 00:00:00 2001 From: n-stefan <38526229+n-stefan@users.noreply.github.com> Date: Tue, 24 Nov 2020 12:54:31 +0200 Subject: [PATCH 24/38] Fix PurchaseUrl port in WebSPA appsettings.json (#1525) --- src/Web/WebSPA/appsettings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Web/WebSPA/appsettings.json b/src/Web/WebSPA/appsettings.json index 5a65eecc0..4c829aad0 100644 --- a/src/Web/WebSPA/appsettings.json +++ b/src/Web/WebSPA/appsettings.json @@ -2,7 +2,7 @@ "IdentityUrl": "http://localhost:5105", "MarketingUrl": "http://localhost:5110", "CallBackUrl": "http://localhost:5104/", - "PurchaseUrl": "http://localhost:5200", + "PurchaseUrl": "http://localhost:5202", "PurchaseUrlHC": "http://localhost:5202/hc", "MarketingUrlHC": "http://localhost:5203/hc", "IdentityUrlHC": "http://localhost:5105/hc", From 0a4110a1e9145c56bb1752d09da65cf1f1e036ee Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 1 Dec 2020 17:16:37 +0530 Subject: [PATCH 25/38] Updated highlight version to latest. (#1531) --- src/Web/WebSPA/package-lock.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 3c3a97fda..f4d8c16b2 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -8474,10 +8474,9 @@ } }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", - "dev": true + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.0.tgz", + "integrity": "sha512-EfrUGcQ63oLJbj0J0RI9ebX6TAITbsDBLbsjr881L/X5fMO9+oadKzEF21C7R3ULKG6Gv3uoab2HiqVJa/4+oA==" }, "hmac-drbg": { "version": "1.0.1", From c59e522161df902270a43c161b55b349dbe9e512 Mon Sep 17 00:00:00 2001 From: Gerard Gunnewijk Date: Tue, 8 Dec 2020 12:39:39 +0100 Subject: [PATCH 26/38] Finished sentence and fixed spelling mistake. (#1536) --- .../Events/ProductPriceChangedIntegrationEvent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/ProductPriceChangedIntegrationEvent.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/ProductPriceChangedIntegrationEvent.cs index 7c14a07d1..00f25b9e5 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/ProductPriceChangedIntegrationEvent.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/ProductPriceChangedIntegrationEvent.cs @@ -3,8 +3,8 @@ using BuildingBlocks.EventBus.Events; // Integration Events notes: - // An Event is “something that has happened in the past”, therefore its name has to be - // An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems. + // An Event is “something that has happened in the past”, therefore its name has to be past tense + // An Integration Event is an event that can cause side effects to other microservices, Bounded-Contexts or external systems. public class ProductPriceChangedIntegrationEvent : IntegrationEvent { public int ProductId { get; private set; } @@ -20,4 +20,4 @@ OldPrice = oldPrice; } } -} \ No newline at end of file +} From 2711d33e3f34b529567a1c14d121d5f413adeb58 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 8 Dec 2020 20:42:32 +0530 Subject: [PATCH 27/38] Updated credit card default exipiration value. (#1535) --- .../Identity/Identity.API/Data/ApplicationDbContextSeed.cs | 2 +- src/Services/Identity/Identity.API/Setup/Users.csv | 2 +- .../WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs b/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs index 60102ee74..ba6677563 100644 --- a/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs +++ b/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs @@ -149,7 +149,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Data City = "Redmond", Country = "U.S.", Email = "demouser@microsoft.com", - Expiration = "12/20", + Expiration = "12/21", Id = Guid.NewGuid().ToString(), LastName = "DemoLastName", Name = "DemoUser", diff --git a/src/Services/Identity/Identity.API/Setup/Users.csv b/src/Services/Identity/Identity.API/Setup/Users.csv index 3e5081078..42f582aab 100644 --- a/src/Services/Identity/Identity.API/Setup/Users.csv +++ b/src/Services/Identity/Identity.API/Setup/Users.csv @@ -1,2 +1,2 @@ CardHolderName,CardNumber,CardType,City,Country,Email,Expiration,LastName,Name,PhoneNumber,UserName,ZipCode,State,Street,SecurityNumber,NormalizedEmail,NormalizedUserName,Password -DemoUser,4012888888881881,1,Redmond,U.S.,demouser@microsoft.com,12/20,DemoLastName,DemoUser,1234567890,demouser@microsoft.com,98052,WA,15703 NE 61st Ct,535,DEMOUSER@MICROSOFT.COM,DEMOUSER@MICROSOFT.COM,Pass@word1 \ No newline at end of file +DemoUser,4012888888881881,1,Redmond,U.S.,demouser@microsoft.com,12/21,DemoLastName,DemoUser,1234567890,demouser@microsoft.com,98052,WA,15703 NE 61st Ct,535,DEMOUSER@MICROSOFT.COM,DEMOUSER@MICROSOFT.COM,Pass@word1 \ No newline at end of file diff --git a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index e39ebfc0a..4661aa13c 100644 --- a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -66,7 +66,7 @@ namespace WebMVC.Infrastructure.Middlewares new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("sub", currentUserId), - new Claim("card_expiration", "12/20"), + new Claim("card_expiration", "12/21"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); From d2a1e5ac1eabc3ca12ef1f45642b69a3b9357a5d Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Tue, 8 Dec 2020 23:17:03 +0800 Subject: [PATCH 28/38] Fix login issue Exception: Correlation failed (#1516) Fix samesite issue when running eShop from docker-compose locally as by default http protocol is being used Refer to https://github.com/dotnet-architecture/eShopOnContainers/issues/1391 --- src/Web/WebMVC/Startup.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index 299af38cb..e438e9d6c 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -82,6 +82,10 @@ namespace Microsoft.eShopOnContainers.WebMVC } WebContextSeed.Seed(app, env); + + // Fix samesite issue when running eShop from docker-compose locally as by default http protocol is being used + // Refer to https://github.com/dotnet-architecture/eShopOnContainers/issues/1391 + app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = AspNetCore.Http.SameSiteMode.Lax }); app.UseRouting(); From 07a1caf5662c0f67a48c198c4a436fabef03b5d6 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 9 Dec 2020 20:34:55 +0530 Subject: [PATCH 29/38] Updated getting started section in readme file. (#1538) * Updated get started section in readme file. * Updated docker-compose specific link * Updated instructions in the readme file. --- README.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ad35a6d2b..916174963 100644 --- a/README.md +++ b/README.md @@ -23,25 +23,40 @@ Sample .NET Core reference application, powered by Microsoft, based on a simplif _**Dev** branch contains the latest **beta** code and their images are tagged with `:linux-dev` in our [Docker Hub](https://hub.docker.com/u/eshop)_ -## Are you new to **microservices** and **cloud-native development**? -Take a look at the free course [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/) on MS Learn. This module explains microservices concepts, cloud-native technologies, and reduce the friction in getting started with `eShopOnContainers`. - ## Getting Started -*eShopOnContainers* is provided in two flavors: Basic and Advanced. +Make sure you have [installed](https://docs.docker.com/docker-for-windows/install/) and [configured](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup#configure-docker) docker in your environment. After that, you can run the below commands from the **/src/** directory and get started with the `eShopOnContainers` immediately. + +```powershell +docker-compose build +docker-compose up +``` + +You should be able to browse different components of the application by using the below URLs : + +``` +Web Status : http://host.docker.internal:5107/ +Web MVC : http://host.docker.internal:5100/ +Web SPA : http://host.docker.internal:5104/ +``` + +>!Note: If you are running this application in macOS then use `docker.for.mac.localhost` as DNS name in `.env` file and the above URLs instead of `host.docker.internal`. + +Below are the other avenues to setup *eShopOnContainers*. ### Basic scenario The basic scenario can be run locally using docker-compose, and also deployed to a local Kubernetes cluster. Refer to these Wiki pages to Get Started: -- [CLI or Visual Studio Code](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup) + - [Visual Studio (F5 experience)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup#optional---use-visual-studio) -- [Docker compose](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Docker-compose-deployment-files) +- [Docker compose on windows](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup) +- [Docker compose on macOS](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Mac-setup) - [Local Kubernetes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Local-Kubernetes) ### Advanced scenario -The Advanced scenario can be run only in a Kubernetes cluster. Currently this scenario is the same as basic scenario with the following differences: +The Advanced scenario can be run only in a Kubernetes cluster. Currently this scenario is the same as a basic scenario with the following differences: - [Deploy to AKS with a Service Mesh for resiliency](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Azure-Kubernetes-Service-(AKS)) @@ -91,6 +106,8 @@ You can download them and start reviewing these Guides/eBooks here: For more free e-Books check out [.NET Architecture center](https://dot.net/architecture). If you have an e-book feedback, let us know by creating a new issue here: +## Are you new to **microservices** and **cloud-native development**? +Take a look at the free course [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/) on MS Learn. This module explains microservices concepts, cloud-native technologies, and reduce the friction in getting started with `eShopOnContainers`. ## Read further From 4ddfdc2d1f12f71caef8ee263c23e3592b502ece Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Thu, 10 Dec 2020 16:01:47 +0530 Subject: [PATCH 30/38] Updated packages to latest version. (#1539) --- src/Web/WebSPA/package-lock.json | 325 ++++++++++++++++--------------- src/Web/WebSPA/package.json | 3 +- 2 files changed, 172 insertions(+), 156 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index f4d8c16b2..e6c9ae748 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -74,7 +74,7 @@ "webpack-dev-server": "3.9.0", "webpack-merge": "4.2.1", "webpack-sources": "1.4.3", - "webpack-subresource-integrity": "1.5.1", + "webpack-subresource-integrity": "1.1.0-rc.6", "worker-plugin": "3.2.0" }, "dependencies": { @@ -687,10 +687,8 @@ } }, "minimist": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true + "version": "0.0.8", + "bundled": true }, "minipass": { "version": "2.9.0", @@ -718,6 +716,15 @@ "optional": true, "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true, + "optional": true + } } }, "ms": { @@ -1422,6 +1429,14 @@ "dev": true, "requires": { "node-forge": "0.9.0" + }, + "dependencies": { + "node-forge": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", + "dev": true + } } }, "semver": { @@ -1477,7 +1492,7 @@ } }, "serialize-javascript": { - "version": "3.1.0", + "version": "2.1.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", "dev": true @@ -1817,6 +1832,15 @@ } } }, + "webpack-subresource-integrity": { + "version": "1.1.0-rc.6", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.6.tgz", + "integrity": "sha512-Az7y8xTniNhaA0620AV1KPwWOqawurVVDzQSpPAeR5RwNbL91GoBSJAAo9cfd+GiFHwsS5bbHepBw1e6Hzxy4w==", + "dev": true, + "requires": { + "webpack-core": "^0.6.8" + } + }, "worker-farm": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", @@ -1862,9 +1886,9 @@ } }, "yargs-parser": { - "version": "13.1.2", + "version": "11.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -4737,6 +4761,11 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -4816,15 +4845,6 @@ "object.assign": "^4.1.0" } }, - "backbone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", - "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", - "dev": true, - "requires": { - "underscore": ">=1.8.3" - } - }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", @@ -5922,6 +5942,17 @@ "unique-string": "^1.0.0", "write-file-atomic": "^2.0.0", "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", + "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + } } }, "connect": { @@ -6810,15 +6841,6 @@ "resolved": "https://registry.npmjs.org/domino/-/domino-2.1.4.tgz", "integrity": "sha512-l70mlQ7IjPKC8kT7GljQXJZmt5OqFL+RE91ik5y5WWQtsd9wP8R7gpFnNu96fK5MqAAZRXfLLsnzKtkty5fWGQ==" }, - "dot-prop": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.1.1.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -7460,11 +7482,6 @@ "es5-ext": "~0.10.14" } }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" - }, "events": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", @@ -8300,7 +8317,6 @@ "version": "4.7.6", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", - "dev": true, "requires": { "minimist": "^1.2.5", "neo-async": "^2.6.0", @@ -8312,26 +8328,22 @@ "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "neo-async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" } } }, @@ -8474,9 +8486,9 @@ } }, "highlight.js": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.0.tgz", - "integrity": "sha512-EfrUGcQ63oLJbj0J0RI9ebX6TAITbsDBLbsjr881L/X5fMO9+oadKzEF21C7R3ULKG6Gv3uoab2HiqVJa/4+oA==" + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.1.tgz", + "integrity": "sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==" }, "hmac-drbg": { "version": "1.0.1", @@ -8963,10 +8975,9 @@ } }, "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" }, "invariant": { "version": "2.2.4", @@ -9322,6 +9333,17 @@ "requires": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } } }, "isstream": { @@ -9915,10 +9937,9 @@ } }, "lunr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", - "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", - "dev": true + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" }, "magic-string": { "version": "0.25.3", @@ -10027,10 +10048,9 @@ } }, "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.5.tgz", + "integrity": "sha512-2AlqgYnVPOc9WDyWu7S5DJaEZsfk6dNh/neatQ3IHUW4QLutM/VPSH9lG7bif+XjFWc9K9XR3QvR+fXuECmfdA==" }, "md5.js": { "version": "1.3.4", @@ -10189,12 +10209,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", @@ -10385,15 +10399,6 @@ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, - "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, "node-fetch-npm": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", @@ -10405,11 +10410,6 @@ "safe-buffer": "^5.1.1" } }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, "node-libs-browser": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", @@ -11424,6 +11424,14 @@ "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + } } }, "optionator": { @@ -11816,8 +11824,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { "version": "0.1.7", @@ -12066,8 +12073,7 @@ "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "promise": { "version": "7.3.1", @@ -12495,7 +12501,6 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, "requires": { "resolve": "^1.1.6" } @@ -12687,7 +12692,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, "requires": { "path-parse": "^1.0.5" } @@ -13203,6 +13207,13 @@ "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", "requires": { "node-forge": "0.7.5" + }, + "dependencies": { + "node-forge": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" + } } }, "semver": { @@ -14784,80 +14795,102 @@ "dev": true }, "typedoc": { - "version": "0.15.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.15.8.tgz", - "integrity": "sha512-a0zypcvfIFsS7Gqpf2MkC1+jNND3K1Om38pbDdy/gYWX01NuJZhC5+O0HkIp0oRIZOo7PWrA5+fC24zkANY28Q==", - "dev": true, - "requires": { - "@types/minimatch": "3.0.3", - "fs-extra": "^8.1.0", - "handlebars": "^4.7.0", - "highlight.js": "^9.17.1", - "lodash": "^4.17.15", - "marked": "^0.8.0", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.19.2.tgz", + "integrity": "sha512-oDEg1BLEzi1qvgdQXc658EYgJ5qJLVSeZ0hQ57Eq4JXy6Vj2VX4RVo18qYxRWz75ifAaYuYNBUCnbhjd37TfOg==", + "requires": { + "fs-extra": "^9.0.1", + "handlebars": "^4.7.6", + "highlight.js": "^10.2.0", + "lodash": "^4.17.20", + "lunr": "^2.3.9", + "marked": "^1.1.1", "minimatch": "^3.0.0", "progress": "^2.0.3", - "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.6.3", - "typescript": "3.7.x" + "semver": "^7.3.2", + "shelljs": "^0.8.4", + "typedoc-default-themes": "^0.11.4" }, "dependencies": { "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", - "dev": true + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + }, + "dependencies": { + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" } }, "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", "requires": { "glob": "^7.0.0", "interpret": "^1.0.0", "rechoir": "^0.6.2" } }, - "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", - "dev": true + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, "typedoc-default-themes": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.6.3.tgz", - "integrity": "sha512-rouf0TcIA4M2nOQFfC7Zp4NEwoYiEX4vX/ZtudJWU9IHA29MPC+PPgSXYLPESkUo7FuB//GxigO3mk9Qe1xp3Q==", - "dev": true, - "requires": { - "backbone": "^1.4.0", - "jquery": "^3.4.1", - "lunr": "^2.3.8", - "underscore": "^1.9.1" - } + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.11.4.tgz", + "integrity": "sha512-Y4Lf+qIb9NTydrexlazAM46SSLrmrQRqWiD52593g53SsmUFioAsMWt8m834J6qsp+7wHRjxCXSZeiiW5cMUdw==" }, "typescript": { "version": "3.4.5", @@ -14869,7 +14902,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", - "dev": true, "optional": true, "requires": { "commander": "~2.20.0", @@ -14880,14 +14912,12 @@ "version": "2.20.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, "optional": true }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "optional": true } } @@ -14918,12 +14948,6 @@ } } }, - "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -16874,15 +16898,6 @@ } } }, - "webpack-subresource-integrity": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.5.1.tgz", - "integrity": "sha512-uekbQ93PZ9e7BFB8Hl9cFIVYQyQqiXp2ExKk9Zv+qZfH/zHXHrCFAfw1VW0+NqWbTWrs/HnuDrto3+tiPXh//Q==", - "dev": true, - "requires": { - "webpack-core": "^0.6.8" - } - }, "websocket-driver": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", @@ -17256,17 +17271,17 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "requires": { + "camelcase": "^4.1.0" + } } } }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "requires": { - "camelcase": "^4.1.0" - } - }, "yeast": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", diff --git a/src/Web/WebSPA/package.json b/src/Web/WebSPA/package.json index cc60ba65f..a77732502 100644 --- a/src/Web/WebSPA/package.json +++ b/src/Web/WebSPA/package.json @@ -52,6 +52,7 @@ "popper.js": "1.16.1", "rxjs": "~6.4.0", "rxjs-compat": "~6.4.0", + "typedoc": "^0.19.2", "webpack-dev-server": "3.1.14", "zone.js": "~0.9.1" }, @@ -85,7 +86,7 @@ "ts-helpers": "1.1.2", "ts-node": "~7.0.1", "tslint": "^5.14.0", - "typedoc": "^0.15.8", + "typedoc": "^0.19.2", "typescript": "3.4.5", "url-loader": "1.1.1", "webpack": "^4.42.1" From a88f6c514986bad0c26b5878cc9b9fe1aed3395f Mon Sep 17 00:00:00 2001 From: Nish Anil Date: Thu, 10 Dec 2020 16:03:31 +0530 Subject: [PATCH 31/38] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 916174963..e457ff9ea 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Web MVC : http://host.docker.internal:5100/ Web SPA : http://host.docker.internal:5104/ ``` ->!Note: If you are running this application in macOS then use `docker.for.mac.localhost` as DNS name in `.env` file and the above URLs instead of `host.docker.internal`. +>Note: If you are running this application in macOS then use `docker.for.mac.localhost` as DNS name in `.env` file and the above URLs instead of `host.docker.internal`. Below are the other avenues to setup *eShopOnContainers*. From 3f051b3407381682b00009e02f29c225f72482aa Mon Sep 17 00:00:00 2001 From: Mads Rosenberg Date: Fri, 11 Dec 2020 14:57:03 +0100 Subject: [PATCH 32/38] fix(#1261): remove helm chart indent for config map glob (#1533) --- deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml | 2 +- deploy/k8s/helm/apigwms/templates/envoy-cm.yaml | 2 +- deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml | 2 +- deploy/k8s/helm/apigwws/templates/envoy-cm.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml index 71728d084..66de90f5c 100644 --- a/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml +++ b/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml @@ -10,5 +10,5 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} +{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} diff --git a/deploy/k8s/helm/apigwms/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwms/templates/envoy-cm.yaml index 76da5832b..0842f889a 100644 --- a/deploy/k8s/helm/apigwms/templates/envoy-cm.yaml +++ b/deploy/k8s/helm/apigwms/templates/envoy-cm.yaml @@ -10,5 +10,5 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} +{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} diff --git a/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml index 4d6307e36..e197812c8 100644 --- a/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml +++ b/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml @@ -10,5 +10,5 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}} +{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}} diff --git a/deploy/k8s/helm/apigwws/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwws/templates/envoy-cm.yaml index 6d41bd2e2..2abbc7559 100644 --- a/deploy/k8s/helm/apigwws/templates/envoy-cm.yaml +++ b/deploy/k8s/helm/apigwws/templates/envoy-cm.yaml @@ -10,5 +10,5 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} +{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} From 6824c1cb4c7be55d3434bba628820c662acba260 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Mon, 14 Dec 2020 18:50:22 +0530 Subject: [PATCH 33/38] Updated ini package in package-lock.json file. (#1541) --- src/Web/WebSPA/package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index e6c9ae748..717917b9a 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -657,7 +657,7 @@ "optional": true }, "ini": { - "version": "1.3.5", + "version": "1.3.7", "bundled": true, "dev": true, "optional": true @@ -2538,7 +2538,7 @@ "optional": true }, "ini": { - "version": "1.3.5", + "version": "1.3.7", "bundled": true, "dev": true, "optional": true @@ -8837,9 +8837,9 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", "dev": true }, "inquirer": { @@ -10712,7 +10712,7 @@ "optional": true }, "ini": { - "version": "1.3.5", + "version": "1.3.7", "bundled": true, "dev": true, "optional": true @@ -15529,7 +15529,7 @@ "optional": true }, "ini": { - "version": "1.3.5", + "version": "1.3.7", "bundled": true, "dev": true, "optional": true @@ -16502,7 +16502,7 @@ "optional": true }, "ini": { - "version": "1.3.5", + "version": "1.3.7", "bundled": true, "optional": true }, From b50296428b1d39cfc570d28e06e1ec6ccc7ffb1e Mon Sep 17 00:00:00 2001 From: Gur Galler <35164039+GurGaller@users.noreply.github.com> Date: Wed, 16 Dec 2020 12:30:29 +0200 Subject: [PATCH 34/38] Removed unnecessary await (#1546) --- .../Ordering.BackgroundTasks/Tasks/GracePeriodManagerTask.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Tasks/GracePeriodManagerTask.cs b/src/Services/Ordering/Ordering.BackgroundTasks/Tasks/GracePeriodManagerTask.cs index 247ed9d67..d921a1178 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Tasks/GracePeriodManagerTask.cs +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Tasks/GracePeriodManagerTask.cs @@ -41,8 +41,6 @@ namespace Ordering.BackgroundTasks.Tasks } _logger.LogDebug("GracePeriodManagerService background task is stopping."); - - await Task.CompletedTask; } private void CheckConfirmedGracePeriodOrders() From 716aca6779d90c54a0d9e18f51af6d2ab9892e33 Mon Sep 17 00:00:00 2001 From: Viswanatha Swamy Date: Thu, 17 Dec 2020 16:20:22 +0530 Subject: [PATCH 35/38] 1. remove unused using, 2. Reorganized the using, 3. Moved the class into separate file and 4. Added line and spacing formats (#1532) * Removed Unused Using and Reorganized the Using * Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API * Revert "Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API" This reverts commit 34241c430619b3b0bbeaabafa44c078c859237c4. * Removed unused using and reorganized the using inside "Services" folder * Removed Unused using and reoganized the using * Refactor Webhooks.API * Removed unused using and reorganized using inside Catalog.API --- .../AuthorizationHeaderParameterOperationFilter.cs | 1 - .../Basket/Basket.API/Controllers/BasketController.cs | 1 - src/Services/Basket/Basket.API/Grpc/BasketService.cs | 1 - .../Middlewares/ByPassAuthMiddleware.cs | 1 - src/Services/Basket/Basket.API/Startup.cs | 4 +--- .../Catalog.API/Extensions/CatalogItemExtensions.cs | 7 +------ .../Catalog/Catalog.API/Extensions/HostExtensions.cs | 7 ++----- .../Catalog.API/Extensions/WebHostExtensions.cs | 6 +++--- .../Catalog/Catalog.API/Grpc/CatalogService.cs | 11 +++++------ .../Catalog.API/Infrastructure/CatalogContext.cs | 4 ++-- .../CatalogIntegrationEventService.cs | 2 -- ...ngedToAwaitingValidationIntegrationEventHandler.cs | 10 +++++----- ...OrderStatusChangedToPaidIntegrationEventHandler.cs | 2 +- src/Services/Catalog/Catalog.API/Program.cs | 5 +---- src/Services/Catalog/Catalog.API/Startup.cs | 1 - .../Exceptions/WebhooksDomainException.cs | 3 --- .../Infrastructure/HttpGlobalExceptionFilter.cs | 4 ---- .../Webhooks.API/Infrastructure/WebhooksContext.cs | 4 ---- .../OrderStatusChangedToPaidIntegrationEvent.cs | 3 --- ...OrderStatusChangedToPaidIntegrationEventHandler.cs | 4 +--- .../OrderStatusChangedToShippedIntegrationEvent.cs | 4 ---- ...erStatusChangedToShippedIntegrationEventHandler.cs | 4 +--- .../ProductPriceChangedIntegrationEvent.cs | 4 ---- .../ProductPriceChangedIntegrationEventHandler.cs | 3 --- .../Webhooks/Webhooks.API/Model/WebhookData.cs | 3 --- .../Webhooks.API/Model/WebhookSubscription.cs | 3 --- .../Webhooks/Webhooks.API/Model/WebhookType.cs | 7 +------ src/Services/Webhooks/Webhooks.API/Program.cs | 7 +------ .../Webhooks.API/Services/IGrantUrlTesterService.cs | 5 +---- .../Webhooks.API/Services/IWebhooksRetriever.cs | 4 +--- .../Webhooks.API/Services/WebhooksRetriever.cs | 1 - .../Extensions/HttpClientExtensions.cs | 2 -- .../Middleware/AutoAuthorizeMiddleware.cs | 3 --- .../Services/Catalog/CatalogScenariosBase.cs | 5 ++--- .../Services/IntegrationEventsScenarios.cs | 5 ++--- .../Services/Location/LocationsScenariosBase.cs | 1 - .../Services/Location/LocationsTestsStartup.cs | 1 - .../Services/Marketing/CampaignScenariosBase.cs | 2 -- .../Services/Marketing/MarketingScenarios.cs | 9 +++------ .../Services/Marketing/MarketingScenariosBase.cs | 5 ++--- .../Services/Ordering/OrderingTestsStartup.cs | 4 ---- 41 files changed, 36 insertions(+), 127 deletions(-) diff --git a/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs b/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs index 7fe19bae3..3d505b4ee 100644 --- a/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs +++ b/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Mvc.Authorization; using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.SwaggerGen; using System.Collections.Generic; using System.Linq; diff --git a/src/Services/Basket/Basket.API/Controllers/BasketController.cs b/src/Services/Basket/Basket.API/Controllers/BasketController.cs index 9864e21e8..f51dbdb59 100644 --- a/src/Services/Basket/Basket.API/Controllers/BasketController.cs +++ b/src/Services/Basket/Basket.API/Controllers/BasketController.cs @@ -7,7 +7,6 @@ using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.eShopOnContainers.Services.Basket.API.Services; using Microsoft.Extensions.Logging; using System; -using System.Linq; using System.Net; using System.Security.Claims; using System.Threading.Tasks; diff --git a/src/Services/Basket/Basket.API/Grpc/BasketService.cs b/src/Services/Basket/Basket.API/Grpc/BasketService.cs index 830703b59..51633b326 100644 --- a/src/Services/Basket/Basket.API/Grpc/BasketService.cs +++ b/src/Services/Basket/Basket.API/Grpc/BasketService.cs @@ -4,7 +4,6 @@ using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; -using GrpcBasket; namespace GrpcBasket { diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index 2f5eb28b6..b3f42c14e 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; using System; -using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index e8576b238..eb29c12ca 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -4,6 +4,7 @@ using Basket.API.Infrastructure.Filters; using Basket.API.Infrastructure.Middlewares; using Basket.API.IntegrationEvents.EventHandling; using Basket.API.IntegrationEvents.Events; +using GrpcBasket; using HealthChecks.UI.Client; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; @@ -33,9 +34,6 @@ using System; using System.Collections.Generic; using System.IdentityModel.Tokens.Jwt; using System.IO; -using GrpcBasket; -using Microsoft.AspNetCore.Http.Features; -using Serilog; namespace Microsoft.eShopOnContainers.Services.Basket.API { diff --git a/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs index fa2c3f60e..e953df581 100644 --- a/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs +++ b/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model { public static class CatalogItemExtensions { diff --git a/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs index cfa7e9d2f..ccdd73558 100644 --- a/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs +++ b/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs @@ -1,13 +1,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using System; using Microsoft.Extensions.DependencyInjection; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Polly; +using System; using System.Data.SqlClient; namespace Catalog.API.Extensions diff --git a/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs index b7a982b2e..07fc11770 100644 --- a/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs +++ b/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs @@ -1,11 +1,11 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; -using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Polly; +using System; using System.Data.SqlClient; -using Microsoft.AspNetCore.Hosting; namespace Catalog.API.Extensions { diff --git a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs index ef22b5be2..e502780ee 100644 --- a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs +++ b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs @@ -1,16 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using CatalogApi; +using CatalogApi; using Grpc.Core; using Microsoft.EntityFrameworkCore; using Microsoft.eShopOnContainers.Services.Catalog.API; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; using Microsoft.eShopOnContainers.Services.Catalog.API.Model; -using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; using static CatalogApi.Catalog; namespace Catalog.API.Grpc diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs index 8cff66b08..cee4b5e33 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs @@ -1,9 +1,9 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure { - using Microsoft.EntityFrameworkCore; using EntityConfigurations; - using Model; + using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; + using Model; public class CatalogContext : DbContext { diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs index 3e7ba9868..6c4839297 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Storage; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services; @@ -7,7 +6,6 @@ using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Utilities using Microsoft.eShopOnContainers.Services.Catalog.API; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; using Microsoft.Extensions.Logging; -using Serilog.Context; using System; using System.Data.Common; using System.Threading.Tasks; diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs index 493a271cc..d7da9951e 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs @@ -1,15 +1,15 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.EventHandling { using BuildingBlocks.EventBus.Abstractions; - using System.Threading.Tasks; using BuildingBlocks.EventBus.Events; - using Infrastructure; - using System.Collections.Generic; - using System.Linq; using global::Catalog.API.IntegrationEvents; + using Infrastructure; using IntegrationEvents.Events; - using Serilog.Context; using Microsoft.Extensions.Logging; + using Serilog.Context; + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; public class OrderStatusChangedToAwaitingValidationIntegrationEventHandler : IIntegrationEventHandler diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs index 7d383254f..1a8836186 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs @@ -1,11 +1,11 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.EventHandling { using BuildingBlocks.EventBus.Abstractions; - using System.Threading.Tasks; using Infrastructure; using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events; using Microsoft.Extensions.Logging; using Serilog.Context; + using System.Threading.Tasks; public class OrderStatusChangedToPaidIntegrationEventHandler : IIntegrationEventHandler diff --git a/src/Services/Catalog/Catalog.API/Program.cs b/src/Services/Catalog/Catalog.API/Program.cs index 3632609b4..b737d0142 100644 --- a/src/Services/Catalog/Catalog.API/Program.cs +++ b/src/Services/Catalog/Catalog.API/Program.cs @@ -1,5 +1,4 @@ -using Autofac.Extensions.DependencyInjection; -using Catalog.API.Extensions; +using Catalog.API.Extensions; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Server.Kestrel.Core; @@ -12,9 +11,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Serilog; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Net; namespace Microsoft.eShopOnContainers.Services.Catalog.API diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 836b6a7b8..2b7082e25 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.ServiceBus; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; diff --git a/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs b/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs index 8d4024583..6307a6296 100644 --- a/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs +++ b/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.Exceptions { diff --git a/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs b/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs index 44cc9547a..7bb818879 100644 --- a/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs +++ b/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs @@ -4,11 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; using System.Net; -using System.Threading.Tasks; using Webhooks.API.Exceptions; using Webhooks.API.Infrastructure.ActionResult; diff --git a/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs b/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs index 88769bc53..f5b9fbf34 100644 --- a/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs +++ b/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs @@ -1,9 +1,5 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Webhooks.API.Model; namespace Webhooks.API.Infrastructure diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs index c4adda56e..256d60d5a 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs @@ -1,8 +1,5 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs index 0b118bb61..5b59c9401 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs @@ -1,11 +1,9 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using System; -using System.Collections.Generic; +using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; using Webhooks.API.Model; using Webhooks.API.Services; -using Microsoft.Extensions.Logging; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs index 10693eb8b..0e678835c 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs @@ -1,8 +1,4 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs index 9e2325d91..9981d97bd 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs @@ -1,11 +1,9 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using System; -using System.Collections.Generic; +using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; using Webhooks.API.Model; using Webhooks.API.Services; -using Microsoft.Extensions.Logging; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs index 18821f9fc..39fba6426 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs @@ -1,8 +1,4 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs index 10e1542c8..044ce3bd3 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs @@ -1,7 +1,4 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents diff --git a/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs b/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs index ecf17c65d..e0ec8caab 100644 --- a/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs +++ b/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs @@ -1,8 +1,5 @@ using Newtonsoft.Json; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.Model { diff --git a/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs b/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs index 1b2eb48fe..72d726834 100644 --- a/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs +++ b/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.Model { diff --git a/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs b/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs index eceb15913..cda3d7316 100644 --- a/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs +++ b/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Webhooks.API.Model +namespace Webhooks.API.Model { public enum WebhookType { diff --git a/src/Services/Webhooks/Webhooks.API/Program.cs b/src/Services/Webhooks/Webhooks.API/Program.cs index b08a1c2da..590d2b335 100644 --- a/src/Services/Webhooks/Webhooks.API/Program.cs +++ b/src/Services/Webhooks/Webhooks.API/Program.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; diff --git a/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs b/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs index c78475fb0..c69e41934 100644 --- a/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs +++ b/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; namespace Webhooks.API.Services { diff --git a/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs b/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs index ed75cfc64..0ae20f03b 100644 --- a/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs +++ b/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using System.Threading.Tasks; using Webhooks.API.Model; diff --git a/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs b/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs index 7caa76220..1f7fb3f1c 100644 --- a/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs +++ b/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs b/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs index a41ffd3a2..25475462d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs +++ b/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs @@ -1,8 +1,6 @@ using Microsoft.AspNetCore.TestHost; using System; -using System.Collections.Generic; using System.Net.Http; -using System.Text; namespace FunctionalTests.Extensions { diff --git a/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs b/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs index 65206db4f..bce9cc751 100644 --- a/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs +++ b/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs @@ -1,8 +1,5 @@ using Microsoft.AspNetCore.Http; -using System; -using System.Collections.Generic; using System.Security.Claims; -using System.Text; using System.Threading.Tasks; namespace FunctionalTests.Middleware diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs index ffaef64a3..96d625b72 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs @@ -1,15 +1,14 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF; using Microsoft.eShopOnContainers.Services.Catalog.API; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using System.IO; using System.Reflection; -using Microsoft.Extensions.Configuration; namespace FunctionalTests.Services.Catalog { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs index dd6eef99a..ff06ad78f 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs @@ -5,13 +5,12 @@ using Microsoft.eShopOnContainers.Services.Catalog.API.Model; using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; using Newtonsoft.Json; using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; +using System.Net.Http; using System.Text; using System.Threading.Tasks; using Xunit; -using System.Net.Http; -using System.Threading; namespace FunctionalTests.Services { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs index 4c3bd1b29..7c340ce5e 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs @@ -1,6 +1,5 @@ namespace FunctionalTests.Services.Locations { - using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.Configuration; diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs index 709c4e7eb..b86d72041 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs @@ -1,7 +1,6 @@ namespace FunctionalTests.Services.Locations { using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.eShopOnContainers.Services.Locations.API; using Microsoft.Extensions.Configuration; diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs index ab21dccba..447067dd4 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs @@ -1,7 +1,5 @@ namespace FunctionalTests.Services.Marketing { - using System; - public class CampaignScenariosBase : MarketingScenariosBase { public static class Get diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs index 4c808565b..b0ecfd725 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs @@ -1,17 +1,14 @@ namespace FunctionalTests.Services.Marketing { - using UserLocation = Microsoft.eShopOnContainers.Services.Locations.API.Model.UserLocation; - using LocationRequest = Microsoft.eShopOnContainers.Services.Locations.API.ViewModel.LocationRequest; using FunctionalTests.Services.Locations; + using Microsoft.eShopOnContainers.Services.Marketing.API.Dto; using Newtonsoft.Json; - using System; + using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Xunit; - using System.Collections.Generic; - using Microsoft.eShopOnContainers.Services.Marketing.API.Dto; - using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; + using LocationRequest = Microsoft.eShopOnContainers.Services.Locations.API.ViewModel.LocationRequest; public class MarketingScenarios : MarketingScenariosBase { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs index 63b9214b2..9a70c875d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs @@ -1,12 +1,11 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using System.IO; using System.Reflection; -using Microsoft.Extensions.Configuration; namespace FunctionalTests.Services.Marketing { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs index 46e5fe8c1..02a14759e 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs @@ -1,11 +1,7 @@ using FunctionalTests.Middleware; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; using Microsoft.eShopOnContainers.Services.Ordering.API; using Microsoft.Extensions.Configuration; -using System; -using System.Collections.Generic; -using System.Text; namespace FunctionalTests.Services.Ordering { From 0c575b5799c977bf0c379e8949af39f19eb067c6 Mon Sep 17 00:00:00 2001 From: Viswanatha Swamy Date: Fri, 18 Dec 2020 11:52:45 +0530 Subject: [PATCH 36/38] Swamy/remove unused using and refactor the code (#1552) * Removed Unused Using and Reorganized the Using * Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API * Revert "Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API" This reverts commit 34241c430619b3b0bbeaabafa44c078c859237c4. * Removed unused using and reorganized the using inside "Services" folder * Removed Unused using and reoganized the using * Refactor Webhooks.API * Removed unused using and reorganized using inside Catalog.API * Refactoring * Removed unsed using * Added line break just to differentiate between the messages --- src/Services/Catalog/Catalog.API/CatalogSettings.cs | 3 ++- .../Events/OrderStatusChangedToPaidIntegrationEvent.cs | 2 +- src/Services/Catalog/Catalog.API/Proto/catalog.proto | 1 + .../Catalog/Catalog.FunctionalTests/CatalogScenarioBase.cs | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/CatalogSettings.cs b/src/Services/Catalog/Catalog.API/CatalogSettings.cs index a8c47991e..3bff82f3f 100644 --- a/src/Services/Catalog/Catalog.API/CatalogSettings.cs +++ b/src/Services/Catalog/Catalog.API/CatalogSettings.cs @@ -7,6 +7,7 @@ public string EventBusConnection { get; set; } public bool UseCustomizationData { get; set; } - public bool AzureStorageEnabled { get; set; } + + public bool AzureStorageEnabled { get; set; } } } diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/OrderStatusChangedToPaidIntegrationEvent.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/OrderStatusChangedToPaidIntegrationEvent.cs index 881aa21fe..b338690ae 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/OrderStatusChangedToPaidIntegrationEvent.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/Events/OrderStatusChangedToPaidIntegrationEvent.cs @@ -1,7 +1,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events { - using System.Collections.Generic; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; + using System.Collections.Generic; public class OrderStatusChangedToPaidIntegrationEvent : IntegrationEvent { diff --git a/src/Services/Catalog/Catalog.API/Proto/catalog.proto b/src/Services/Catalog/Catalog.API/Proto/catalog.proto index fa83d45c4..cac5895dc 100644 --- a/src/Services/Catalog/Catalog.API/Proto/catalog.proto +++ b/src/Services/Catalog/Catalog.API/Proto/catalog.proto @@ -10,6 +10,7 @@ package CatalogApi; message CatalogItemRequest { int32 id = 1; } + message CatalogItemsRequest { string ids = 1; int32 pageSize = 2; diff --git a/src/Services/Catalog/Catalog.FunctionalTests/CatalogScenarioBase.cs b/src/Services/Catalog/Catalog.FunctionalTests/CatalogScenarioBase.cs index 6a8cbd72f..8545d14aa 100644 --- a/src/Services/Catalog/Catalog.FunctionalTests/CatalogScenarioBase.cs +++ b/src/Services/Catalog/Catalog.FunctionalTests/CatalogScenarioBase.cs @@ -1,4 +1,3 @@ -using Autofac.Extensions.DependencyInjection; using Catalog.API.Extensions; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; From 811874b76a98e649ad913347e0043397a4291419 Mon Sep 17 00:00:00 2001 From: Viswanatha Swamy Date: Wed, 23 Dec 2020 15:19:36 +0530 Subject: [PATCH 37/38] Swamy/remove unused using and refactor the code (#1555) * Removed Unused Using and Reorganized the Using * Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API * Revert "Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API" This reverts commit 34241c430619b3b0bbeaabafa44c078c859237c4. * Removed unused using and reorganized the using inside "Services" folder * Removed Unused using and reoganized the using * Refactor Webhooks.API * Removed unused using and reorganized using inside Catalog.API * Refactoring * Removed unsed using * Added line break just to differentiate between the messages * Removed unused usings * Simple Refactoring --- .../Services/Catalog/CatalogScenariosBase.cs | 2 +- .../Services/IntegrationEventsScenarios.cs | 8 ++++---- .../Marketing/UserLocationRoleScenariosBase.cs | 2 +- .../Services/Ordering/OrderingScenarios.cs | 16 ++++++++-------- src/Web/WebMVC/AppSettings.cs | 7 +------ .../WebMVC/Controllers/CampaignsController.cs | 8 ++++---- src/Web/WebMVC/Controllers/CatalogController.cs | 15 +++++++-------- .../Controllers/OrderManagementController.cs | 13 +++++-------- src/Web/WebMVC/Controllers/TestController.cs | 2 +- .../WebMVC/Extensions/HttpClientExtensions.cs | 3 --- src/Web/WebMVC/Extensions/SessionExtensions.cs | 4 ---- .../HttpClientRequestIdDelegatingHandler.cs | 2 +- .../Middlewares/ByPassAuthMiddleware.cs | 3 +-- src/Web/WebMVC/Infrastructure/WebContextSeed.cs | 6 +++--- src/Web/WebMVC/Program.cs | 10 ++++++---- src/Web/WebMVC/Services/BasketService.cs | 6 +++--- src/Web/WebMVC/Services/IBasketService.cs | 2 -- src/Web/WebMVC/Services/ICampaignService.cs | 1 - src/Web/WebMVC/Services/ICatalogService.cs | 2 -- src/Web/WebMVC/Services/IIdentityParser.cs | 6 +----- src/Web/WebMVC/Services/IOrderingService.cs | 2 -- src/Web/WebMVC/Services/IdentityParser.cs | 4 +--- src/Web/WebMVC/Services/ModelDTOs/BasketDTO.cs | 4 ++-- src/Web/WebMVC/Startup.cs | 13 +++++-------- src/Web/WebMVC/ViewComponents/Cart.cs | 7 ++----- src/Web/WebMVC/ViewComponents/CartList.cs | 6 ++---- .../ViewModels/Annotations/CardExpiration.cs | 6 ++---- .../Annotations/LongitudeCoordinate.cs | 2 +- src/Web/WebMVC/ViewModels/ApplicationUser.cs | 6 +----- src/Web/WebMVC/ViewModels/Basket.cs | 3 +-- src/Web/WebMVC/ViewModels/BasketItem.cs | 7 +------ .../CampaignViewModel/CampaignViewModel.cs | 4 ++-- .../ViewModels/CartViewModels/IndexViewModel.cs | 8 +------- src/Web/WebMVC/ViewModels/Catalog.cs | 5 +---- src/Web/WebMVC/ViewModels/CatalogItem.cs | 4 +--- .../CatalogViewModels/IndexViewModel.cs | 3 --- src/Web/WebMVC/ViewModels/Header.cs | 4 +--- src/Web/WebMVC/ViewModels/Order.cs | 8 +++----- src/Web/WebMVC/ViewModels/OrderItem.cs | 7 +------ .../ViewModels/Pagination/PaginationInfo.cs | 7 +------ src/Web/WebSPA/AppSettings.cs | 7 +------ src/Web/WebSPA/Program.cs | 6 +++--- .../WebSPA/Server/Controllers/HomeController.cs | 4 ++-- src/Web/WebSPA/Startup.cs | 2 +- src/Web/WebStatus/Controllers/HomeController.cs | 4 +--- 45 files changed, 84 insertions(+), 167 deletions(-) diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs index 96d625b72..c5d9ab72d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs @@ -27,7 +27,7 @@ namespace FunctionalTests.Services.Catalog .AddEnvironmentVariables(); }).UseStartup(); - var testServer = new TestServer(hostBuilder); + var testServer = new TestServer(hostBuilder); testServer.Host .MigrateDbContext((context, services) => diff --git a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs index ff06ad78f..a8bdcd122 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs @@ -43,8 +43,8 @@ namespace FunctionalTests.Services var oldPrice = itemToModify.UnitPrice; var newPrice = oldPrice + priceModification; var pRes = await catalogClient.PutAsync(CatalogScenariosBase.Put.UpdateCatalogProduct, new StringContent(ChangePrice(itemToModify, newPrice, originalCatalogProducts), UTF8Encoding.UTF8, "application/json")); - - var modifiedCatalogProducts = await GetCatalogAsync(catalogClient); + + var modifiedCatalogProducts = await GetCatalogAsync(catalogClient); var itemUpdated = await GetUpdatedBasketItem(newPrice, itemToModify.ProductId, userId, basketClient); @@ -71,7 +71,7 @@ namespace FunctionalTests.Services BasketItem itemUpdated = null; while (continueLoop && counter < 20) - { + { //get the basket and verify that the price of the modified product is updated var basketGetResponse = await basketClient.GetAsync(BasketScenariosBase.Get.GetBasketByCustomer(userId)); var basketUpdated = JsonConvert.DeserializeObject(await basketGetResponse.Content.ReadAsStringAsync()); @@ -92,7 +92,7 @@ namespace FunctionalTests.Services return itemUpdated; } - private async Task> GetCatalogAsync(HttpClient catalogClient) + private async Task> GetCatalogAsync(HttpClient catalogClient) { var response = await catalogClient.GetAsync(CatalogScenariosBase.Get.Items); var items = await response.Content.ReadAsStringAsync(); diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs index 20beeef48..3949d5f87 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/UserLocationRoleScenariosBase.cs @@ -15,7 +15,7 @@ public static class Post { - public static string AddNewuserLocationRule(int campaignId) + public static string AddNewuserLocationRule(int campaignId) => GetUserLocationRolesUrlBase(campaignId); } diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs index cb1fc2526..3a6e1c04b 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingScenarios.cs @@ -15,7 +15,7 @@ using Xunit; namespace FunctionalTests.Services.Ordering { public class OrderingScenarios : OrderingScenariosBase - { + { [Fact] public async Task Cancel_basket_and_check_order_status_cancelled() { @@ -69,7 +69,8 @@ namespace FunctionalTests.Services.Ordering var ordersGetResponse = await orderClient.GetStringAsync(OrderingScenariosBase.Get.Orders); var orders = JsonConvert.DeserializeObject>(ordersGetResponse); - if (orders == null || orders.Count == 0) { + if (orders == null || orders.Count == 0) + { counter++; await Task.Delay(100); continue; @@ -84,9 +85,9 @@ namespace FunctionalTests.Services.Ordering if (IsOrderCreated(order, city)) { break; - } - } - + } + } + return order; } @@ -117,7 +118,7 @@ namespace FunctionalTests.Services.Ordering var order = new OrderDTO() { OrderNumber = orderId - }; + }; return JsonConvert.SerializeObject(order); } @@ -135,7 +136,7 @@ namespace FunctionalTests.Services.Ordering CardExpiration = DateTime.Now.AddYears(1), CardSecurityNumber = "123", CardTypeId = 1, - Buyer = "Buyer", + Buyer = "Buyer", RequestId = Guid.NewGuid() }; @@ -143,4 +144,3 @@ namespace FunctionalTests.Services.Ordering } } } - \ No newline at end of file diff --git a/src/Web/WebMVC/AppSettings.cs b/src/Web/WebMVC/AppSettings.cs index a705c5a90..dacb92adc 100644 --- a/src/Web/WebMVC/AppSettings.cs +++ b/src/Web/WebMVC/AppSettings.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.WebMVC +namespace Microsoft.eShopOnContainers.WebMVC { public class AppSettings { diff --git a/src/Web/WebMVC/Controllers/CampaignsController.cs b/src/Web/WebMVC/Controllers/CampaignsController.cs index 920269467..ff98850db 100644 --- a/src/Web/WebMVC/Controllers/CampaignsController.cs +++ b/src/Web/WebMVC/Controllers/CampaignsController.cs @@ -2,16 +2,16 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers { using AspNetCore.Authorization; using AspNetCore.Mvc; - using global::WebMVC.Services.ModelDTOs; using global::WebMVC.Services; + using global::WebMVC.Services.ModelDTOs; using global::WebMVC.ViewModels; + using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.Extensions.Options; using Services; using System; using System.Threading.Tasks; using ViewModels; using ViewModels.Pagination; - using Microsoft.AspNetCore.Authentication.OpenIdConnect; [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class CampaignsController : Controller @@ -31,12 +31,12 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers { var campaignList = await _campaignService.GetCampaigns(pageSize, page); - if(campaignList is null) + if (campaignList is null) { return View(); } - var totalPages = (int) Math.Ceiling((decimal) campaignList.Count / pageSize); + var totalPages = (int)Math.Ceiling((decimal)campaignList.Count / pageSize); var vm = new CampaignViewModel { diff --git a/src/Web/WebMVC/Controllers/CatalogController.cs b/src/Web/WebMVC/Controllers/CatalogController.cs index 9e0859858..0ac5ecacc 100644 --- a/src/Web/WebMVC/Controllers/CatalogController.cs +++ b/src/Web/WebMVC/Controllers/CatalogController.cs @@ -1,10 +1,9 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination; +using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.WebMVC.Services; using Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels; -using Microsoft.AspNetCore.Http; +using Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination; +using System; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Controllers { @@ -12,10 +11,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers { private ICatalogService _catalogSvc; - public CatalogController(ICatalogService catalogSvc) => + public CatalogController(ICatalogService catalogSvc) => _catalogSvc = catalogSvc; - public async Task Index(int? BrandFilterApplied, int? TypesFilterApplied, int? page, [FromQuery]string errorMsg) + public async Task Index(int? BrandFilterApplied, int? TypesFilterApplied, int? page, [FromQuery] string errorMsg) { var itemsPage = 10; var catalog = await _catalogSvc.GetCatalogItems(page ?? 0, itemsPage, BrandFilterApplied, TypesFilterApplied); @@ -30,7 +29,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers { ActualPage = page ?? 0, ItemsPerPage = catalog.Data.Count, - TotalItems = catalog.Count, + TotalItems = catalog.Count, TotalPages = (int)Math.Ceiling(((decimal)catalog.Count / itemsPage)) } }; diff --git a/src/Web/WebMVC/Controllers/OrderManagementController.cs b/src/Web/WebMVC/Controllers/OrderManagementController.cs index 6963c469d..27ad642ba 100644 --- a/src/Web/WebMVC/Controllers/OrderManagementController.cs +++ b/src/Web/WebMVC/Controllers/OrderManagementController.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Microsoft.AspNetCore.Authentication.OpenIdConnect; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using WebMVC.Services.ModelDTOs; using Microsoft.eShopOnContainers.WebMVC.Services; using Microsoft.eShopOnContainers.WebMVC.ViewModels; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Authentication.OpenIdConnect; +using System.Threading.Tasks; +using WebMVC.Services.ModelDTOs; namespace WebMVC.Controllers { @@ -37,7 +34,7 @@ namespace WebMVC.Controllers { await _orderSvc.ShipOrder(orderId); } - + return RedirectToAction("Index"); } } diff --git a/src/Web/WebMVC/Controllers/TestController.cs b/src/Web/WebMVC/Controllers/TestController.cs index 2cf053126..a80fe9ad8 100644 --- a/src/Web/WebMVC/Controllers/TestController.cs +++ b/src/Web/WebMVC/Controllers/TestController.cs @@ -48,7 +48,7 @@ namespace WebMVC.Controllers if (response.IsSuccessStatusCode) { - var str = await response.Content.ReadAsStringAsync(); + var str = await response.Content.ReadAsStringAsync(); return Ok(str); } diff --git a/src/Web/WebMVC/Extensions/HttpClientExtensions.cs b/src/Web/WebMVC/Extensions/HttpClientExtensions.cs index a1d6f215d..087c0dd8a 100644 --- a/src/Web/WebMVC/Extensions/HttpClientExtensions.cs +++ b/src/Web/WebMVC/Extensions/HttpClientExtensions.cs @@ -1,11 +1,8 @@ using System; -using System.Collections.Generic; using System.IdentityModel.Tokens.Jwt; -using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Text; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Extensions { diff --git a/src/Web/WebMVC/Extensions/SessionExtensions.cs b/src/Web/WebMVC/Extensions/SessionExtensions.cs index 79bd435f0..47b079158 100644 --- a/src/Web/WebMVC/Extensions/SessionExtensions.cs +++ b/src/Web/WebMVC/Extensions/SessionExtensions.cs @@ -1,9 +1,5 @@ using Microsoft.AspNetCore.Http; using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; public static class SessionExtensions diff --git a/src/Web/WebMVC/Infrastructure/HttpClientRequestIdDelegatingHandler.cs b/src/Web/WebMVC/Infrastructure/HttpClientRequestIdDelegatingHandler.cs index 37bea4d30..a59c757c0 100644 --- a/src/Web/WebMVC/Infrastructure/HttpClientRequestIdDelegatingHandler.cs +++ b/src/Web/WebMVC/Infrastructure/HttpClientRequestIdDelegatingHandler.cs @@ -22,7 +22,7 @@ namespace WebMVC.Infrastructure request.Headers.Add("x-requestid", Guid.NewGuid().ToString()); } } - + return await base.SendAsync(request, cancellationToken); } } diff --git a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index 4661aa13c..dd56c28e2 100644 --- a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; using System; -using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; @@ -63,7 +62,7 @@ namespace WebMVC.Infrastructure.Middlewares new Claim("name", "Test user"), new Claim("nonce", Guid.NewGuid().ToString()), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), - new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("sub", currentUserId), new Claim("card_expiration", "12/21"), diff --git a/src/Web/WebMVC/Infrastructure/WebContextSeed.cs b/src/Web/WebMVC/Infrastructure/WebContextSeed.cs index ab3b8d801..16696af9d 100644 --- a/src/Web/WebMVC/Infrastructure/WebContextSeed.cs +++ b/src/Web/WebMVC/Infrastructure/WebContextSeed.cs @@ -35,7 +35,7 @@ namespace WebMVC.Infrastructure static void GetPreconfiguredCSS(string contentRootPath, string webroot, ILogger log) { try - { + { string overrideCssFile = Path.Combine(contentRootPath, "Setup", "override.css"); if (!File.Exists(overrideCssFile)) { @@ -44,7 +44,7 @@ namespace WebMVC.Infrastructure } string destinationFilename = Path.Combine(webroot, "css", "override.css"); - File.Copy(overrideCssFile, destinationFilename, true ); + File.Copy(overrideCssFile, destinationFilename, true); } catch (Exception ex) { @@ -86,7 +86,7 @@ namespace WebMVC.Infrastructure } } } - catch ( Exception ex ) + catch (Exception ex) { log.Error(ex, "EXCEPTION ERROR: {Message}", ex.Message); } diff --git a/src/Web/WebMVC/Program.cs b/src/Web/WebMVC/Program.cs index eb99cd42e..36292dca8 100644 --- a/src/Web/WebMVC/Program.cs +++ b/src/Web/WebMVC/Program.cs @@ -42,13 +42,13 @@ namespace Microsoft.eShopOnContainers.WebMVC private static IWebHost BuildWebHost(IConfiguration configuration, string[] args) => WebHost.CreateDefaultBuilder(args) - .CaptureStartupErrors(false) + .CaptureStartupErrors(false) .ConfigureAppConfiguration(x => x.AddConfiguration(configuration)) .UseStartup() .UseSerilog() .Build(); - private static Serilog.ILogger CreateSerilogLogger(IConfiguration configuration) + private static Serilog.ILogger CreateSerilogLogger(IConfiguration configuration) { var seqServerUrl = configuration["Serilog:SeqServerUrl"]; var logstashUrl = configuration["Serilog:LogstashgUrl"]; @@ -57,10 +57,12 @@ namespace Microsoft.eShopOnContainers.WebMVC .Enrich.WithProperty("ApplicationContext", AppName) .Enrich.FromLogContext() .WriteTo.Console(); - if (!string.IsNullOrWhiteSpace(seqServerUrl)) { + if (!string.IsNullOrWhiteSpace(seqServerUrl)) + { cfg.WriteTo.Seq(seqServerUrl); } - if (!string.IsNullOrWhiteSpace(logstashUrl)) { + if (!string.IsNullOrWhiteSpace(logstashUrl)) + { cfg.WriteTo.Http(logstashUrl); } return cfg.CreateLogger(); diff --git a/src/Web/WebMVC/Services/BasketService.cs b/src/Web/WebMVC/Services/BasketService.cs index 64184f7b2..26985a671 100644 --- a/src/Web/WebMVC/Services/BasketService.cs +++ b/src/Web/WebMVC/Services/BasketService.cs @@ -23,7 +23,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services { _apiClient = httpClient; _settings = settings; - _logger =logger; + _logger = logger; _basketByPassUrl = $"{_settings.Value.PurchaseUrl}/b/api/v1/basket"; _purchaseUrl = $"{_settings.Value.PurchaseUrl}/api/v1"; @@ -33,7 +33,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services { var uri = API.Basket.GetBasket(_basketByPassUrl, user.Id); _logger.LogDebug("[GetBasket] -> Calling {Uri} to get the basket", uri); - var response = await _apiClient.GetAsync(uri); + var response = await _apiClient.GetAsync(uri); _logger.LogDebug("[GetBasket] -> response code {StatusCode}", response.StatusCode); var responseString = await response.Content.ReadAsStringAsync(); return string.IsNullOrEmpty(responseString) ? @@ -97,7 +97,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services var responseString = await _apiClient.GetStringAsync(uri); - var response = JsonConvert.DeserializeObject(responseString); + var response = JsonConvert.DeserializeObject(responseString); return response; } diff --git a/src/Web/WebMVC/Services/IBasketService.cs b/src/Web/WebMVC/Services/IBasketService.cs index 8c096bfaf..cc576ec11 100644 --- a/src/Web/WebMVC/Services/IBasketService.cs +++ b/src/Web/WebMVC/Services/IBasketService.cs @@ -1,7 +1,5 @@ using Microsoft.eShopOnContainers.WebMVC.ViewModels; -using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using WebMVC.Services.ModelDTOs; diff --git a/src/Web/WebMVC/Services/ICampaignService.cs b/src/Web/WebMVC/Services/ICampaignService.cs index ab80e930a..c12a3ae01 100644 --- a/src/Web/WebMVC/Services/ICampaignService.cs +++ b/src/Web/WebMVC/Services/ICampaignService.cs @@ -1,6 +1,5 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services { - using System.Collections.Generic; using System.Threading.Tasks; using ViewModels; diff --git a/src/Web/WebMVC/Services/ICatalogService.cs b/src/Web/WebMVC/Services/ICatalogService.cs index b126168fd..3879ad13d 100644 --- a/src/Web/WebMVC/Services/ICatalogService.cs +++ b/src/Web/WebMVC/Services/ICatalogService.cs @@ -1,8 +1,6 @@ using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.eShopOnContainers.WebMVC.ViewModels; -using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Services diff --git a/src/Web/WebMVC/Services/IIdentityParser.cs b/src/Web/WebMVC/Services/IIdentityParser.cs index a4f98c61c..aaf2ab8cd 100644 --- a/src/Web/WebMVC/Services/IIdentityParser.cs +++ b/src/Web/WebMVC/Services/IIdentityParser.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Principal; -using System.Threading.Tasks; +using System.Security.Principal; namespace Microsoft.eShopOnContainers.WebMVC.Services { diff --git a/src/Web/WebMVC/Services/IOrderingService.cs b/src/Web/WebMVC/Services/IOrderingService.cs index 480ea4119..cc1968c53 100644 --- a/src/Web/WebMVC/Services/IOrderingService.cs +++ b/src/Web/WebMVC/Services/IOrderingService.cs @@ -1,7 +1,5 @@ using Microsoft.eShopOnContainers.WebMVC.ViewModels; -using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using WebMVC.Services.ModelDTOs; diff --git a/src/Web/WebMVC/Services/IdentityParser.cs b/src/Web/WebMVC/Services/IdentityParser.cs index 70e82e53b..5360ebed4 100644 --- a/src/Web/WebMVC/Services/IdentityParser.cs +++ b/src/Web/WebMVC/Services/IdentityParser.cs @@ -1,14 +1,12 @@ using Microsoft.eShopOnContainers.WebMVC.ViewModels; using System; -using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Security.Principal; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Services { - public class IdentityParser:IIdentityParser + public class IdentityParser : IIdentityParser { public ApplicationUser Parse(IPrincipal principal) { diff --git a/src/Web/WebMVC/Services/ModelDTOs/BasketDTO.cs b/src/Web/WebMVC/Services/ModelDTOs/BasketDTO.cs index 130a729f5..246991058 100644 --- a/src/Web/WebMVC/Services/ModelDTOs/BasketDTO.cs +++ b/src/Web/WebMVC/Services/ModelDTOs/BasketDTO.cs @@ -22,7 +22,7 @@ namespace WebMVC.Services.ModelDTOs [Required] public DateTime CardExpiration { get; set; } - + [Required] public string CardSecurityNumber { get; set; } @@ -31,7 +31,7 @@ namespace WebMVC.Services.ModelDTOs public string Buyer { get; set; } [Required] - public Guid RequestId { get; set; } + public Guid RequestId { get; set; } } } diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index e438e9d6c..ccae68a09 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -7,19 +7,16 @@ using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.WebMVC.Services; using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; using Microsoft.IdentityModel.Logging; using StackExchange.Redis; using System; using System.IdentityModel.Tokens.Jwt; -using System.Net.Http; using WebMVC.Infrastructure; using WebMVC.Infrastructure.Middlewares; using WebMVC.Services; @@ -46,8 +43,8 @@ namespace Microsoft.eShopOnContainers.WebMVC .AddDevspaces() .AddHttpClientServices(Configuration); - IdentityModelEventSource.ShowPII = true; // Caution! Do NOT use in production: https://aka.ms/IdentityModel/PII - + IdentityModelEventSource.ShowPII = true; // Caution! Do NOT use in production: https://aka.ms/IdentityModel/PII + services.AddControllers(); services.AddCustomAuthentication(Configuration); @@ -82,13 +79,13 @@ namespace Microsoft.eShopOnContainers.WebMVC } WebContextSeed.Seed(app, env); - + // Fix samesite issue when running eShop from docker-compose locally as by default http protocol is being used // Refer to https://github.com/dotnet-architecture/eShopOnContainers/issues/1391 - app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = AspNetCore.Http.SameSiteMode.Lax }); + app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = AspNetCore.Http.SameSiteMode.Lax }); app.UseRouting(); - + app.UseAuthentication(); app.UseAuthorization(); diff --git a/src/Web/WebMVC/ViewComponents/Cart.cs b/src/Web/WebMVC/ViewComponents/Cart.cs index 6cd8bf2d5..0fa004a49 100644 --- a/src/Web/WebMVC/ViewComponents/Cart.cs +++ b/src/Web/WebMVC/ViewComponents/Cart.cs @@ -1,10 +1,7 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.eShopOnContainers.WebMVC.Services; using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.eShopOnContainers.WebMVC.ViewModels.CartViewModels; -using Microsoft.eShopOnContainers.WebMVC.Services; -using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents @@ -24,7 +21,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents vm.ItemsCount = itemsInCart; return View(vm); } - catch + catch { ViewBag.IsBasketInoperative = true; } diff --git a/src/Web/WebMVC/ViewComponents/CartList.cs b/src/Web/WebMVC/ViewComponents/CartList.cs index 88d1f9abb..f572c8437 100644 --- a/src/Web/WebMVC/ViewComponents/CartList.cs +++ b/src/Web/WebMVC/ViewComponents/CartList.cs @@ -1,9 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.eShopOnContainers.WebMVC.Services; +using Microsoft.eShopOnContainers.WebMVC.ViewModels; using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents @@ -29,7 +27,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents return View(vm); } - + private Task GetItemsAsync(ApplicationUser user) => _cartSvc.GetBasket(user); } } diff --git a/src/Web/WebMVC/ViewModels/Annotations/CardExpiration.cs b/src/Web/WebMVC/ViewModels/Annotations/CardExpiration.cs index d60150a44..3819f6fb0 100644 --- a/src/Web/WebMVC/ViewModels/Annotations/CardExpiration.cs +++ b/src/Web/WebMVC/ViewModels/Annotations/CardExpiration.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.Annotations { @@ -24,7 +21,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.Annotations DateTime d = new DateTime(year, month, 1); return d > DateTime.UtcNow; - } else + } + else { return false; } diff --git a/src/Web/WebMVC/ViewModels/Annotations/LongitudeCoordinate.cs b/src/Web/WebMVC/ViewModels/Annotations/LongitudeCoordinate.cs index de2266711..de1f5cd3e 100644 --- a/src/Web/WebMVC/ViewModels/Annotations/LongitudeCoordinate.cs +++ b/src/Web/WebMVC/ViewModels/Annotations/LongitudeCoordinate.cs @@ -16,7 +16,7 @@ namespace WebMVC.ViewModels.Annotations ("Longitude must be between -180 and 180 degrees inclusive."); } - return ValidationResult.Success; + return ValidationResult.Success; } } } diff --git a/src/Web/WebMVC/ViewModels/ApplicationUser.cs b/src/Web/WebMVC/ViewModels/ApplicationUser.cs index 23016a6db..ec0318850 100644 --- a/src/Web/WebMVC/ViewModels/ApplicationUser.cs +++ b/src/Web/WebMVC/ViewModels/ApplicationUser.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Microsoft.AspNetCore.Identity; using System.ComponentModel.DataAnnotations; -using Microsoft.AspNetCore.Identity; namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { diff --git a/src/Web/WebMVC/ViewModels/Basket.cs b/src/Web/WebMVC/ViewModels/Basket.cs index b95a910a2..cf9bdcb08 100644 --- a/src/Web/WebMVC/ViewModels/Basket.cs +++ b/src/Web/WebMVC/ViewModels/Basket.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { @@ -16,7 +15,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewModels public decimal Total() { - return Math.Round(Items.Sum(x => x.UnitPrice * x.Quantity),2); + return Math.Round(Items.Sum(x => x.UnitPrice * x.Quantity), 2); } } } diff --git a/src/Web/WebMVC/ViewModels/BasketItem.cs b/src/Web/WebMVC/ViewModels/BasketItem.cs index ab767f8f5..2703b6def 100644 --- a/src/Web/WebMVC/ViewModels/BasketItem.cs +++ b/src/Web/WebMVC/ViewModels/BasketItem.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.WebMVC.ViewModels +namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { public class BasketItem { diff --git a/src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs b/src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs index 80018202f..e67bf27d0 100644 --- a/src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs +++ b/src/Web/WebMVC/ViewModels/CampaignViewModel/CampaignViewModel.cs @@ -1,11 +1,11 @@ namespace WebMVC.ViewModels { - using System.Collections.Generic; using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination; - using WebMVC.ViewModels.Annotations; using Newtonsoft.Json; + using System.Collections.Generic; using System.ComponentModel.DataAnnotations; + using WebMVC.ViewModels.Annotations; public class CampaignViewModel { diff --git a/src/Web/WebMVC/ViewModels/CartViewModels/IndexViewModel.cs b/src/Web/WebMVC/ViewModels/CartViewModels/IndexViewModel.cs index 9a8802542..be7d6dd1f 100644 --- a/src/Web/WebMVC/ViewModels/CartViewModels/IndexViewModel.cs +++ b/src/Web/WebMVC/ViewModels/CartViewModels/IndexViewModel.cs @@ -1,10 +1,4 @@ -using Microsoft.AspNetCore.Mvc.Rendering; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CartViewModels +namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CartViewModels { public class CartComponentViewModel { diff --git a/src/Web/WebMVC/ViewModels/Catalog.cs b/src/Web/WebMVC/ViewModels/Catalog.cs index d36968565..9624c51c2 100644 --- a/src/Web/WebMVC/ViewModels/Catalog.cs +++ b/src/Web/WebMVC/ViewModels/Catalog.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Collections.Generic; namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { diff --git a/src/Web/WebMVC/ViewModels/CatalogItem.cs b/src/Web/WebMVC/ViewModels/CatalogItem.cs index c869b7382..f97adf2d5 100644 --- a/src/Web/WebMVC/ViewModels/CatalogItem.cs +++ b/src/Web/WebMVC/ViewModels/CatalogItem.cs @@ -1,6 +1,4 @@ -using System; - -namespace Microsoft.eShopOnContainers.WebMVC.ViewModels +namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { public class CatalogItem { diff --git a/src/Web/WebMVC/ViewModels/CatalogViewModels/IndexViewModel.cs b/src/Web/WebMVC/ViewModels/CatalogViewModels/IndexViewModel.cs index ab14b4ee4..8f70b32d9 100644 --- a/src/Web/WebMVC/ViewModels/CatalogViewModels/IndexViewModel.cs +++ b/src/Web/WebMVC/ViewModels/CatalogViewModels/IndexViewModel.cs @@ -1,9 +1,6 @@ using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination; -using System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels { diff --git a/src/Web/WebMVC/ViewModels/Header.cs b/src/Web/WebMVC/ViewModels/Header.cs index 212638fbc..ee97a238e 100644 --- a/src/Web/WebMVC/ViewModels/Header.cs +++ b/src/Web/WebMVC/ViewModels/Header.cs @@ -1,6 +1,4 @@ -using System; - -namespace Microsoft.eShopOnContainers.WebMVC.ViewModels +namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { public class Header { diff --git a/src/Web/WebMVC/ViewModels/Order.cs b/src/Web/WebMVC/ViewModels/Order.cs index 2beaf43b1..4de37ca00 100644 --- a/src/Web/WebMVC/ViewModels/Order.cs +++ b/src/Web/WebMVC/ViewModels/Order.cs @@ -5,21 +5,19 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; using WebMVC.Services.ModelDTOs; namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { public class Order { - public string OrderNumber {get;set;} + public string OrderNumber { get; set; } - public DateTime Date {get;set;} + public DateTime Date { get; set; } public string Status { get; set; } - public decimal Total {get;set;} + public decimal Total { get; set; } public string Description { get; set; } diff --git a/src/Web/WebMVC/ViewModels/OrderItem.cs b/src/Web/WebMVC/ViewModels/OrderItem.cs index 3ba03b96a..a5eb4812c 100644 --- a/src/Web/WebMVC/ViewModels/OrderItem.cs +++ b/src/Web/WebMVC/ViewModels/OrderItem.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.WebMVC.ViewModels +namespace Microsoft.eShopOnContainers.WebMVC.ViewModels { public class OrderItem { diff --git a/src/Web/WebMVC/ViewModels/Pagination/PaginationInfo.cs b/src/Web/WebMVC/ViewModels/Pagination/PaginationInfo.cs index 0baf8e961..a10280659 100644 --- a/src/Web/WebMVC/ViewModels/Pagination/PaginationInfo.cs +++ b/src/Web/WebMVC/ViewModels/Pagination/PaginationInfo.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination +namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination { public class PaginationInfo { diff --git a/src/Web/WebSPA/AppSettings.cs b/src/Web/WebSPA/AppSettings.cs index 037ed858f..c1b5bf38e 100644 --- a/src/Web/WebSPA/AppSettings.cs +++ b/src/Web/WebSPA/AppSettings.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace eShopOnContainers.WebSPA +namespace eShopOnContainers.WebSPA { public class AppSettings { diff --git a/src/Web/WebSPA/Program.cs b/src/Web/WebSPA/Program.cs index d8b138e47..21d29237e 100644 --- a/src/Web/WebSPA/Program.cs +++ b/src/Web/WebSPA/Program.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; -using System.IO; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; using Serilog; +using System.IO; namespace eShopConContainers.WebSPA { @@ -36,6 +36,6 @@ namespace eShopConContainers.WebSPA .Enrich.FromLogContext() .WriteTo.Console(); }) - .Build(); + .Build(); } } diff --git a/src/Web/WebSPA/Server/Controllers/HomeController.cs b/src/Web/WebSPA/Server/Controllers/HomeController.cs index 14e8a8871..992cac113 100644 --- a/src/Web/WebSPA/Server/Controllers/HomeController.cs +++ b/src/Web/WebSPA/Server/Controllers/HomeController.cs @@ -1,9 +1,9 @@ // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 +using eShopOnContainers.WebSPA; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; -using eShopOnContainers.WebSPA; namespace eShopConContainers.WebSPA.Server.Controllers { @@ -20,6 +20,6 @@ namespace eShopConContainers.WebSPA.Server.Controllers public IActionResult Configuration() { return Json(_settings.Value); - } + } } } diff --git a/src/Web/WebSPA/Startup.cs b/src/Web/WebSPA/Startup.cs index 2b50e7add..134b55696 100644 --- a/src/Web/WebSPA/Startup.cs +++ b/src/Web/WebSPA/Startup.cs @@ -70,7 +70,7 @@ namespace eShopConContainers.WebSPA { app.UseDeveloperExceptionPage(); } - + // Configure XSRF middleware, This pattern is for SPA style applications where XSRF token is added on Index page // load and passed back token on every subsequent async request // app.Use(async (context, next) => diff --git a/src/Web/WebStatus/Controllers/HomeController.cs b/src/Web/WebStatus/Controllers/HomeController.cs index e87e655a6..f1673b642 100644 --- a/src/Web/WebStatus/Controllers/HomeController.cs +++ b/src/Web/WebStatus/Controllers/HomeController.cs @@ -1,8 +1,6 @@ -using HealthChecks.UI.Configuration; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using System.Linq; -using System.Threading.Tasks; namespace WebStatus.Controllers { From c3d91dd914e4105751d20f69d42d9a5e8c05aac1 Mon Sep 17 00:00:00 2001 From: InstanceFactory Date: Wed, 23 Dec 2020 15:12:52 +0100 Subject: [PATCH 38/38] Fixed Issue #1410 (#1560) Added IdentityUrlExternal to src\Services\Ordering\Ordering.FunctionalTests\appsettings.json; sorted the properties --- .../Ordering/Ordering.FunctionalTests/appsettings.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Services/Ordering/Ordering.FunctionalTests/appsettings.json b/src/Services/Ordering/Ordering.FunctionalTests/appsettings.json index 07bb1638a..c59b5284e 100644 --- a/src/Services/Ordering/Ordering.FunctionalTests/appsettings.json +++ b/src/Services/Ordering/Ordering.FunctionalTests/appsettings.json @@ -1,11 +1,12 @@ { + "CheckUpdateTime": "30000", "ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;", + "EventBusConnection": "localhost", "ExternalCatalogBaseUrl": "http://localhost:5101", + "GracePeriodTime": "1", "IdentityUrl": "http://localhost:5105", + "IdentityUrlExternal": "http://localhost:5105", "isTest": "true", - "EventBusConnection": "localhost", - "CheckUpdateTime": "30000", - "GracePeriodTime": "1", "SubscriptionClientName": "Ordering", - "SuppressCheckForUnhandledSecurityMetadata":true + "SuppressCheckForUnhandledSecurityMetadata": true }