Skip to content

Commit

Permalink
Indented
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Mar 20, 2024
1 parent 6fd5d57 commit 9d2cbd7
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.SimpleEmail" Version="3.7.300.52" />
<PackageReference Include="AWSSDK.SimpleEmail" Version="3.7.300.59" />
<PackageReference Include="Confluent.Kafka" Version="2.3.0" />
<PackageReference Include="FirebaseAdmin" Version="2.4.0" />
<PackageReference Include="FluentValidation" Version="11.9.0" />
<PackageReference Include="Fluid.Core" Version="2.5.0" />
<PackageReference Include="libphonenumber-csharp" Version="8.13.30" />
<PackageReference Include="Fluid.Core" Version="2.7.0" />
<PackageReference Include="libphonenumber-csharp" Version="8.13.32" />
<PackageReference Include="Mailjet.Api" Version="3.0.0" />
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="MailKit" Version="4.4.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="MongoDB.Driver" Version="2.23.1" />
<PackageReference Include="MongoDB.Driver" Version="2.24.0" />
<PackageReference Include="NodaTime" Version="3.1.11" />
<PackageReference Include="OpenNotifications" Version="0.3.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="Telegram.Bot" Version="19.0.0" />
<PackageReference Include="Twilio" Version="6.18.0" />
<PackageReference Include="Twilio" Version="7.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ public async Task<DeliveryResult> SendAsync(IntegrationContext context, SmsMessa
var to = message.To;

var result = await MessageResource.CreateAsync(
ConvertPhoneNumber(to), null,
ConvertPhoneNumber(phoneNumber), null,
ConvertPhoneNumber(to),
null,
ConvertPhoneNumber(phoneNumber.ToString(CultureInfo.InvariantCulture)),
null,
message.Text,
statusCallback: new Uri(BuildCallbackUrl(context, message)), client: client);
statusCallback: new Uri(BuildCallbackUrl(context, message)),
client: client);

if (!string.IsNullOrWhiteSpace(result.ErrorMessage))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public async Task<IntegrationStatus> OnConfiguredAsync(IntegrationContext contex
{
var client = clientPool.GetServer(accountSid, accountToken);

await PhoneNumberResource.FetchAsync(ConvertPhoneNumber(phoneNumber), client: client);
await PhoneNumberResource.FetchAsync(new FetchPhoneNumberOptions($"+{phoneNumber}"), client: client);
}
catch
{
Expand All @@ -83,9 +83,4 @@ public async Task<IntegrationStatus> OnConfiguredAsync(IntegrationContext contex

return IntegrationStatus.Verified;
}

private static PhoneNumber ConvertPhoneNumber(long number)
{
return new PhoneNumber($"+{number}");
}
}
12 changes: 6 additions & 6 deletions backend/src/Notifo.Domain/Notifo.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@

<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.9.0" />
<PackageReference Include="Fluid.Core" Version="2.5.0" />
<PackageReference Include="Jint" Version="3.0.0" />
<PackageReference Include="libphonenumber-csharp" Version="8.13.30" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Fluid.Core" Version="2.7.0" />
<PackageReference Include="Jint" Version="3.0.1" />
<PackageReference Include="libphonenumber-csharp" Version="8.13.32" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="Mjml.Net" Version="3.10.0" />
<PackageReference Include="MongoDB.Driver" Version="2.23.1" />
<PackageReference Include="Mjml.Net" Version="3.11.0" />
<PackageReference Include="MongoDB.Driver" Version="2.24.0" />
<PackageReference Include="NodaTime" Version="3.1.11" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="System.Collections" Version="4.3.0" />
Expand Down
8 changes: 4 additions & 4 deletions backend/src/Notifo.Identity/Notifo.Identity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

<ItemGroup>
<PackageReference Include="AspNet.Security.OAuth.GitHub" Version="8.0.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="OpenIddict.AspNetCore" Version="5.2.0" />
<PackageReference Include="OpenIddict.AspNetCore" Version="5.3.0" />
<PackageReference Include="Squidex.OpenIddict.MongoDb" Version="5.1.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ public static class CachingServiceExtensions
{
public static void AddMyCaching(this IServiceCollection services)
{
services.AddReplicatedCache(options =>
{
options.Enable = true;
});

services.AddReplicatedCache();
services.AddAsyncLocalCache();
}
}
2 changes: 1 addition & 1 deletion backend/src/Notifo.Infrastructure/NodaPatterns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class NodaPatterns
public static readonly LocalTimePattern HourIsoPatternImpl =
LocalTimePattern.CreateWithInvariantCulture("HH");

public static readonly LocalTimePattern HourMinuteIsoPatternImpl =
public static readonly LocalTimePattern HourMinuteIsoPatternImpl =
LocalTimePattern.CreateWithInvariantCulture("HH':'mm");

public static readonly IPattern<LocalTime> VariablePrecisionIso = new CompositePatternBuilder<LocalTime>
Expand Down
40 changes: 20 additions & 20 deletions backend/src/Notifo.Infrastructure/Notifo.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@

<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.9.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
<PackageReference Include="MongoDB.Driver" Version="2.23.1" />
<PackageReference Include="MongoDB.Driver" Version="2.24.0" />
<PackageReference Include="MongoDB.Driver.Core.Extensions.OpenTelemetry" Version="1.0.0" />
<PackageReference Include="NodaTime" Version="3.1.11" />
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.1.2" />
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.2.0" />
<PackageReference Include="OpenTelemetry" Version="1.7.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Squidex.Assets" Version="6.3.7" />
<PackageReference Include="Squidex.Assets.Azure" Version="6.3.7" />
<PackageReference Include="Squidex.Assets.FTP" Version="6.3.7" />
<PackageReference Include="Squidex.Assets.GoogleCloud" Version="6.3.7" />
<PackageReference Include="Squidex.Assets.ImageMagick" Version="6.3.7" />
<PackageReference Include="Squidex.Assets.ImageSharp" Version="6.3.7" />
<PackageReference Include="Squidex.Assets.Mongo" Version="6.3.7" />
<PackageReference Include="Squidex.Assets.S3" Version="6.3.7" />
<PackageReference Include="Squidex.Caching" Version="6.3.7" />
<PackageReference Include="Squidex.Hosting" Version="6.3.7" />
<PackageReference Include="Squidex.Hosting.Abstractions" Version="6.3.7" />
<PackageReference Include="Squidex.Log" Version="6.3.7" />
<PackageReference Include="Squidex.Messaging" Version="6.3.7" />
<PackageReference Include="Squidex.Text" Version="6.3.7" />
<PackageReference Include="Squidex.Assets" Version="6.5.0" />
<PackageReference Include="Squidex.Assets.Azure" Version="6.5.0" />
<PackageReference Include="Squidex.Assets.FTP" Version="6.5.0" />
<PackageReference Include="Squidex.Assets.GoogleCloud" Version="6.5.0" />
<PackageReference Include="Squidex.Assets.ImageMagick" Version="6.5.0" />
<PackageReference Include="Squidex.Assets.ImageSharp" Version="6.5.0" />
<PackageReference Include="Squidex.Assets.Mongo" Version="6.5.0" />
<PackageReference Include="Squidex.Assets.S3" Version="6.5.0" />
<PackageReference Include="Squidex.Caching" Version="6.5.0" />
<PackageReference Include="Squidex.Hosting" Version="6.5.0" />
<PackageReference Include="Squidex.Hosting.Abstractions" Version="6.5.0" />
<PackageReference Include="Squidex.Log" Version="6.5.0" />
<PackageReference Include="Squidex.Messaging" Version="6.5.0" />
<PackageReference Include="Squidex.Text" Version="6.5.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ private async Task ResizeAsync(ResizeSource source, string destinationContentTyp
#pragma warning disable MA0040 // Flow the cancellation token
using var activity = Telemetry.Activities.StartActivity("Resize");

await using var assetOriginal = new TempAssetFile(source.FileName, source.MimeType, 0);
await using var assetResized = new TempAssetFile(source.FileName, destinationContentType, 0);
await using var assetOriginal = new TempAssetFile(source.FileName, source.MimeType);
await using var assetResized = new TempAssetFile(source.FileName, destinationContentType);

using (Telemetry.Activities.StartActivity("Read"))
{
Expand Down
20 changes: 10 additions & 10 deletions backend/src/Notifo/Notifo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@

<ItemGroup>
<PackageReference Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.2.0" />
<PackageReference Include="Google.Cloud.Diagnostics.Common" Version="5.1.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Google.Cloud.Diagnostics.Common" Version="5.2.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.2" />
<PackageReference Include="Namotion.Reflection" Version="3.1.1" />
<PackageReference Include="NSwag.AspNetCore" Version="14.0.3" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.7.0" />
Expand All @@ -30,10 +30,10 @@
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.7.1" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Squidex.Messaging.All" Version="6.3.7" />
<PackageReference Include="Squidex.Messaging.All" Version="6.5.0" />
<PackageReference Include="Squidex.OpenTelemetry.Exporter.Stackdriver" Version="0.0.0-alpha.0.97" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" Version="8.0.2" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="FakeItEasy" Version="8.1.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ namespace Notifo.Domain.Channels.Email;

public class MjmlSchemaTests
{
private static readonly JsonSerializerOptions Indented = new JsonSerializerOptions
{
WriteIndented = true
};

private readonly IMjmlRenderer mjmlRenderer = new MjmlRenderer();

[Fact]
Expand All @@ -26,10 +31,7 @@ public async Task Should_build_schema()
[Fact]
public async Task Should_build_schema_as_json()
{
var json = JsonSerializer.Serialize(MjmlSchema.Build(mjmlRenderer), new JsonSerializerOptions
{
WriteIndented = true
});
var json = JsonSerializer.Serialize(MjmlSchema.Build(mjmlRenderer), Indented);

await Verify(json);
}
Expand Down
6 changes: 3 additions & 3 deletions backend/tests/Notifo.Domain.Tests/Notifo.Domain.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
<PackageReference Include="EphemeralMongo6" Version="1.1.3" />
<PackageReference Include="FakeItEasy" Version="8.1.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="Verify.Xunit" Version="23.2.0" />
<PackageReference Include="Verify.Xunit" Version="23.5.2" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="FakeItEasy" Version="8.1.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.142">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.146">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -21,7 +21,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading

0 comments on commit 9d2cbd7

Please sign in to comment.