From 7c1b33961921fa8f2888a529edc9b67f57583424 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Mon, 6 Jun 2022 15:04:13 +0200 Subject: [PATCH] Upgrade backend. (#885) * Upgrade backend. * Downgrade version. * Update CLI --- .../Squidex.Extensions.csproj | 18 ++++---- backend/src/Migrations/Migrations.csproj | 2 +- .../Squidex.Domain.Apps.Core.Model.csproj | 4 +- ...Squidex.Domain.Apps.Core.Operations.csproj | 4 +- ...quidex.Domain.Apps.Entities.MongoDb.csproj | 2 +- .../History/NotifoService.cs | 10 ++--- .../Squidex.Domain.Apps.Entities.csproj | 14 +++---- .../Squidex.Domain.Apps.Events.csproj | 4 +- .../Squidex.Domain.Users.MongoDb.csproj | 2 +- .../Squidex.Domain.Users.csproj | 4 +- .../EventSourcing/GetEventStore.cs | 8 ++-- .../GetEventStoreSubscription.cs | 8 ++-- ...quidex.Infrastructure.GetEventStore.csproj | 10 ++--- .../Squidex.Infrastructure.MongoDb.csproj | 2 +- .../Squidex.Infrastructure.RabbitMq.csproj | 4 +- .../Squidex.Infrastructure.csproj | 18 ++++---- .../src/Squidex.Shared/Squidex.Shared.csproj | 2 +- backend/src/Squidex.Web/Squidex.Web.csproj | 4 +- backend/src/Squidex/Squidex.csproj | 42 +++++++++---------- .../Squidex.Domain.Apps.Core.Tests.csproj | 12 +++--- .../Squidex.Domain.Apps.Entities.Tests.csproj | 14 +++---- .../Squidex.Domain.Users.Tests.csproj | 10 ++--- .../Squidex.Infrastructure.Tests.csproj | 16 +++---- .../Squidex.Web.Tests.csproj | 8 ++-- 24 files changed, 112 insertions(+), 110 deletions(-) diff --git a/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj b/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj index f67f49985..4492ff04e 100644 --- a/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj +++ b/backend/extensions/Squidex.Extensions/Squidex.Extensions.csproj @@ -9,29 +9,29 @@ - + - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - - - + + + diff --git a/backend/src/Migrations/Migrations.csproj b/backend/src/Migrations/Migrations.csproj index e7aaf543b..e7223472d 100644 --- a/backend/src/Migrations/Migrations.csproj +++ b/backend/src/Migrations/Migrations.csproj @@ -6,7 +6,7 @@ enable - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj b/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj index d23bbca87..ff6dd9636 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Squidex.Domain.Apps.Core.Model.csproj @@ -12,11 +12,11 @@ True - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj b/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj index 335538761..02651950e 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj @@ -21,12 +21,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj index 80d6d2b83..7fb8c085a 100644 --- a/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj +++ b/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Squidex.Domain.Apps.Entities.MongoDb.csproj @@ -19,7 +19,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs b/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs index b84f3c9ef..9612bf17b 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/History/NotifoService.cs @@ -93,17 +93,17 @@ namespace Squidex.Domain.Apps.Entities.History try { - var settings = new Dictionary + var settings = new Dictionary { - [Providers.WebPush] = new NotificationSettingDto + [Providers.WebPush] = new ChannelSettingDto { - Send = NotificationSend.Send, + Send = ChannelSend.Send, DelayInSeconds = null }, - [Providers.Email] = new NotificationSettingDto + [Providers.Email] = new ChannelSettingDto { - Send = NotificationSend.Send, + Send = ChannelSend.Send, DelayInSeconds = 5 * 60 } }; diff --git a/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj b/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj index 34625f0c0..b199757b2 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj +++ b/backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj @@ -22,24 +22,24 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers - - + + - + - + diff --git a/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj b/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj index f00d8eaa6..a952ea208 100644 --- a/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj +++ b/backend/src/Squidex.Domain.Apps.Events/Squidex.Domain.Apps.Events.csproj @@ -14,11 +14,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj b/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj index 61b6843fa..0adbc621e 100644 --- a/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj +++ b/backend/src/Squidex.Domain.Users.MongoDb/Squidex.Domain.Users.MongoDb.csproj @@ -19,7 +19,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj b/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj index 67e945cda..7120aac55 100644 --- a/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj +++ b/backend/src/Squidex.Domain.Users/Squidex.Domain.Users.csproj @@ -18,11 +18,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs index 664139e92..a9bc46b7a 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStore.cs @@ -36,7 +36,7 @@ namespace Squidex.Infrastructure.EventSourcing { try { - await client.SoftDeleteAsync(Guid.NewGuid().ToString(), StreamState.Any, cancellationToken: ct); + await client.DeleteAsync(Guid.NewGuid().ToString(), StreamState.Any, cancellationToken: ct); } catch (Exception ex) { @@ -142,7 +142,7 @@ namespace Squidex.Infrastructure.EventSourcing streamName, start, count, - resolveLinkTos: true, + true, cancellationToken: ct); return result.Select(x => Formatter.Read(x, StreamPrefix, serializer)); @@ -167,7 +167,7 @@ namespace Squidex.Infrastructure.EventSourcing { Guard.NotNullOrEmpty(streamName); - await client.SoftDeleteAsync(GetStreamName(streamName), StreamState.Any, cancellationToken: ct); + await client.DeleteAsync(GetStreamName(streamName), StreamState.Any, cancellationToken: ct); } public Task AppendAsync(Guid commitId, string streamName, ICollection events, @@ -243,7 +243,7 @@ namespace Squidex.Infrastructure.EventSourcing if (deleted.Add(streamToDelete)) { - await client.SoftDeleteAsync(streamToDelete, StreamState.Any, cancellationToken: ct); + await client.DeleteAsync(streamToDelete, StreamState.Any, cancellationToken: ct); } } } diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs index 2d41936a0..5487723b3 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs +++ b/backend/src/Squidex.Infrastructure.GetEventStore/EventSourcing/GetEventStoreSubscription.cs @@ -51,16 +51,18 @@ namespace Squidex.Infrastructure.EventSourcing if (!string.IsNullOrWhiteSpace(position)) { - var streamPosition = position.ToPosition(true); + var from = FromStream.After(position.ToPosition(true)); - subscription = await client.SubscribeToStreamAsync(streamName, streamPosition, + subscription = await client.SubscribeToStreamAsync(streamName, from, OnEvent, true, OnError, cancellationToken: ct); } else { - subscription = await client.SubscribeToStreamAsync(streamName, + var from = FromStream.Start; + + subscription = await client.SubscribeToStreamAsync(streamName, from, OnEvent, true, OnError, cancellationToken: ct); diff --git a/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj b/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj index 3f0297a7a..8b22b6975 100644 --- a/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj +++ b/backend/src/Squidex.Infrastructure.GetEventStore/Squidex.Infrastructure.GetEventStore.csproj @@ -11,11 +11,11 @@ True - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj b/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj index 735c3d293..d04454dda 100644 --- a/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj +++ b/backend/src/Squidex.Infrastructure.MongoDb/Squidex.Infrastructure.MongoDb.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj b/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj index 24aeaaccb..d128b4572 100644 --- a/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj +++ b/backend/src/Squidex.Infrastructure.RabbitMq/Squidex.Infrastructure.RabbitMq.csproj @@ -11,11 +11,11 @@ True - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj b/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj index 933c886f6..4c1e69297 100644 --- a/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj +++ b/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj @@ -12,24 +12,24 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + all runtime; build; native; contentfiles; analyzers - - + + - + @@ -43,7 +43,7 @@ - + diff --git a/backend/src/Squidex.Shared/Squidex.Shared.csproj b/backend/src/Squidex.Shared/Squidex.Shared.csproj index 7f75888e8..b08d4696a 100644 --- a/backend/src/Squidex.Shared/Squidex.Shared.csproj +++ b/backend/src/Squidex.Shared/Squidex.Shared.csproj @@ -9,7 +9,7 @@ True - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex.Web/Squidex.Web.csproj b/backend/src/Squidex.Web/Squidex.Web.csproj index 58c5df8f8..b7186fbfd 100644 --- a/backend/src/Squidex.Web/Squidex.Web.csproj +++ b/backend/src/Squidex.Web/Squidex.Web.csproj @@ -13,7 +13,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -21,7 +21,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/src/Squidex/Squidex.csproj b/backend/src/Squidex/Squidex.csproj index a07dbfdec..29111af81 100644 --- a/backend/src/Squidex/Squidex.csproj +++ b/backend/src/Squidex/Squidex.csproj @@ -34,44 +34,44 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + - - - - - - - + + + + + + + - + - + - - + + - + @@ -88,7 +88,7 @@ - + diff --git a/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj b/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj index f8b6b895f..12a1cf1f7 100644 --- a/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj +++ b/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj @@ -13,20 +13,20 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - + all runtime; build; native; contentfiles; analyzers diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj index 112f39c0d..a8d4ee96b 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj @@ -20,25 +20,25 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + - + all runtime; build; native; contentfiles; analyzers diff --git a/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj b/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj index e3990a881..fd2607b03 100644 --- a/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj +++ b/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj @@ -14,17 +14,17 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + all runtime; build; native; contentfiles; analyzers diff --git a/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj b/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj index 8e33dc038..4f7965ade 100644 --- a/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj +++ b/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj @@ -14,17 +14,17 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + all runtime; build; native; contentfiles; analyzers @@ -32,7 +32,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj b/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj index 36f5942a3..ceaad1ea0 100644 --- a/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj +++ b/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj @@ -12,15 +12,15 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + all runtime; build; native; contentfiles; analyzers